programmatic subagents
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: bootstrap bun monorepo, guardrails, and spec docs structure

+1982
+8
.ast-grep/rules/no-any.yml
··· 1 + id: no-any 2 + language: TypeScript 3 + severity: error 4 + message: Avoid `any`; use precise types. 5 + rule: 6 + any: 7 + - pattern: "$A: any" 8 + - pattern: "<any>$A"
+6
.ast-grep/rules/no-as-unknown-as.yml
··· 1 + id: no-as-unknown-as 2 + language: TypeScript 3 + severity: error 4 + message: Avoid `as unknown as` double assertions. 5 + rule: 6 + pattern: "$A as unknown as $B"
+8
.ast-grep/rules/no-bun-globals.yml
··· 1 + id: no-bun-globals 2 + language: TypeScript 3 + severity: error 4 + message: Use Effect platform services instead of Bun globals in runtime modules. 5 + rule: 6 + any: 7 + - pattern: "Bun.$X" 8 + - pattern: "Bun[$X]"
+6
.ast-grep/rules/no-date-now-outside-clock.yml
··· 1 + id: no-date-now-outside-clock 2 + language: TypeScript 3 + severity: error 4 + message: Use injected Clock service instead of Date.now in internal runtime. 5 + rule: 6 + pattern: "Date.now()"
+6
.ast-grep/rules/no-dot-then.yml
··· 1 + id: no-dot-then 2 + language: TypeScript 3 + severity: error 4 + message: Prefer Effect combinators or await at public boundary, not .then chains. 5 + rule: 6 + pattern: "$A.then($B)"
+6
.ast-grep/rules/no-dynamic-import.yml
··· 1 + id: no-dynamic-import 2 + language: TypeScript 3 + severity: error 4 + message: Dynamic import is disallowed in core runtime modules. 5 + rule: 6 + pattern: "import($A)"
+8
.ast-grep/rules/no-effect-runpromise.yml
··· 1 + id: no-effect-runpromise 2 + language: TypeScript 3 + severity: error 4 + message: Effect.runPromise* is disallowed; use Runtime.runPromise at boundaries only. 5 + rule: 6 + any: 7 + - pattern: "Effect.runPromise($A)" 8 + - pattern: "Effect.runPromiseExit($A)"
+8
.ast-grep/rules/no-interface-for-domain-models.yml
··· 1 + id: no-interface-for-domain-models 2 + language: TypeScript 3 + severity: error 4 + message: Domain models must be Schema-based; interfaces are disallowed in domain modules. 5 + files: 6 + - "**/src/domain/**/*.ts" 7 + rule: 8 + pattern: "interface $NAME { $$$BODY }"
+11
.ast-grep/rules/no-interface-outside-public.yml
··· 1 + id: no-interface-outside-public 2 + language: TypeScript 3 + severity: error 4 + message: Interfaces are allowed only in public boundary modules and declaration files. 5 + ignores: 6 + - "**/src/public/**" 7 + - "**/*.d.ts" 8 + - "**/*.effect.ts" 9 + - "**/*.service.ts" 10 + rule: 11 + pattern: "interface $NAME { $$$BODY }"
+9
.ast-grep/rules/no-json-parse-outside-codec.yml
··· 1 + id: no-json-parse-outside-codec 2 + language: TypeScript 3 + severity: error 4 + message: JSON.parse is restricted to codec/schema decoding modules. 5 + ignores: 6 + - "**/*.codec.ts" 7 + - "**/*.schema.ts" 8 + rule: 9 + pattern: "JSON.parse($A)"
+6
.ast-grep/rules/no-math-random-outside-random.yml
··· 1 + id: no-math-random-outside-random 2 + language: TypeScript 3 + severity: error 4 + message: Use injected Random service instead of Math.random in internal runtime. 5 + rule: 6 + pattern: "Math.random()"
+12
.ast-grep/rules/no-node-imports.yml
··· 1 + id: no-node-imports 2 + language: TypeScript 3 + severity: error 4 + message: "Direct node: imports are disallowed in application source modules." 5 + files: 6 + - "**/src/**/*.ts" 7 + rule: 8 + any: 9 + - pattern: "import $A from 'node:$B'" 10 + - pattern: 'import $A from "node:$B"' 11 + - pattern: "import { $$$A } from 'node:$B'" 12 + - pattern: 'import { $$$A } from "node:$B"'
+11
.ast-grep/rules/no-process-env-outside-config.yml
··· 1 + id: no-process-env-outside-config 2 + language: TypeScript 3 + severity: error 4 + message: process.env access is allowed only in config/bootstrap modules. 5 + ignores: 6 + - "**/*config*.ts" 7 + - "**/*bootstrap*.ts" 8 + rule: 9 + any: 10 + - pattern: "process.env.$A" 11 + - pattern: "process.env[$A]"
+12
.ast-grep/rules/no-promise-outside-public.yml
··· 1 + id: no-promise-outside-public 2 + language: TypeScript 3 + severity: error 4 + message: Promise contracts are allowed only in boundary APIs. 5 + ignores: 6 + - "**/src/public/**" 7 + - "**/*.api.ts" 8 + - "**/*.d.ts" 9 + rule: 10 + any: 11 + - pattern: "Promise<$T>" 12 + - pattern: "new Promise($A)"
+14
.ast-grep/rules/no-public-import-internal.yml
··· 1 + id: no-public-import-internal 2 + language: TypeScript 3 + severity: error 4 + message: Public modules must not import private internal/runtime/domain modules directly. 5 + files: 6 + - "**/src/public/**/*.ts" 7 + rule: 8 + any: 9 + - pattern: "import $A from '../internal/$B'" 10 + - pattern: "import $A from '../runtime/$B'" 11 + - pattern: "import $A from '../domain/$B'" 12 + - pattern: "import { $$$A } from '../internal/$B'" 13 + - pattern: "import { $$$A } from '../runtime/$B'" 14 + - pattern: "import { $$$A } from '../domain/$B'"
+6
.ast-grep/rules/no-raw-promise.yml
··· 1 + id: no-raw-promise 2 + language: TypeScript 3 + severity: error 4 + message: Raw Promise construction is disallowed; use Effect abstractions. 5 + rule: 6 + pattern: "new Promise($A)"
+12
.ast-grep/rules/no-runtime-runpromise-outside-boundary.yml
··· 1 + id: no-runtime-runpromise-outside-boundary 2 + language: TypeScript 3 + severity: error 4 + message: Runtime.runPromise bridge is allowed only in public boundary and CLI entry adapters. 5 + ignores: 6 + - "**/src/public/**" 7 + - "**/src/bin/**" 8 + - "**/*.api.ts" 9 + rule: 10 + any: 11 + - pattern: "Runtime.runPromise($A)" 12 + - pattern: "Runtime.runPromiseExit($A)"
+10
.ast-grep/rules/no-shell-string-command.yml
··· 1 + id: no-shell-string-command 2 + language: TypeScript 3 + severity: error 4 + message: Shell-eval command patterns are disallowed; use argument vectors with Command.make. 5 + rule: 6 + any: 7 + - pattern: "Command.make('sh', '-lc', $CMD)" 8 + - pattern: 'Command.make("sh", "-lc", $CMD)' 9 + - pattern: "Command.make('bash', '-lc', $CMD)" 10 + - pattern: 'Command.make("bash", "-lc", $CMD)'
+10
.ast-grep/rules/no-stub-functions.yml
··· 1 + id: no-stub-functions 2 + language: TypeScript 3 + severity: error 4 + message: Stub placeholders are disallowed in committed code. 5 + rule: 6 + any: 7 + - pattern: "TODO" 8 + - pattern: "FIXME" 9 + - pattern: "throw new Error('Not implemented')" 10 + - pattern: 'throw new Error("Not implemented")'
+6
.ast-grep/rules/no-throw.yml
··· 1 + id: no-throw 2 + language: TypeScript 3 + severity: error 4 + message: Use typed Effect errors instead of throw. 5 + rule: 6 + pattern: "throw $E"
+11
.ast-grep/rules/no-try-catch.yml
··· 1 + id: no-try-catch 2 + language: TypeScript 3 + severity: error 4 + message: Avoid try/catch control flow; use Effect error channels. 5 + rule: 6 + pattern: | 7 + try { 8 + $$$A 9 + } catch ($$$B) { 10 + $$$C 11 + }
+2
.ast-grep/sgconfig.yml
··· 1 + ruleDirs: 2 + - rules
+7
.ast-grep/tests/no-throw.test.yml
··· 1 + id: no-throw 2 + valid: 3 + - | 4 + export const safe = 1; 5 + invalid: 6 + - | 7 + throw new Error("boom");
+5
.gitignore
··· 1 + node_modules/ 2 + packages/*/node_modules/ 3 + .bun/ 4 + dist/ 5 + implement.factory.ts
+4
.oxfmtrc.json
··· 1 + { 2 + "$schema": "./node_modules/oxfmt/configuration_schema.json", 3 + "ignorePatterns": ["node_modules", ".jj", "dist", "SPEC.md"] 4 + }
+6
.oxlintrc.json
··· 1 + { 2 + "$schema": "./node_modules/oxlint/configuration_schema.json", 3 + "env": { "builtin": true }, 4 + "categories": { "correctness": "error" }, 5 + "ignorePatterns": ["node_modules", ".jj", "dist"] 6 + }
+18
AGENTS.md
··· 1 + # AGENTS.md 2 + 3 + ## Source of truth 4 + 5 + - Product and architecture constraints are split from `SPEC.md` under `docs/`. 6 + - Start with `docs/indexes/docs.index.md`. 7 + 8 + ## Implementation guidance location 9 + 10 + - Product requirements: `docs/product-specs/` 11 + - Architecture and boundary contracts: `docs/design-docs/` 12 + - Toolchain + guardrails + invariants: `docs/references/` 13 + - Active execution plan: `docs/exec-plans/active/` 14 + 15 + ## Guardrail reminder 16 + 17 + - Respect file boundary naming (`public/*.api.ts`, `domain/*.schema.ts`, `internal/runtime/*.effect.ts`). 18 + - Use only public package exports across packages.
+19
CLAUDE.md
··· 1 + # CLAUDE.md 2 + 3 + ## Docs navigation 4 + 5 + - Primary index: `docs/indexes/docs.index.md` 6 + - Product spec split: `docs/product-specs/mill-v0-product-spec.md` 7 + - Design contracts split: `docs/design-docs/mill-v0-architecture-and-boundaries.md` 8 + - Guardrail/toolchain reference: `docs/references/mill-v0-toolchain-and-invariants.md` 9 + 10 + ## Where implementation guidance lives 11 + 12 + - Use `docs/exec-plans/active/` for current execution steps. 13 + - Move finished plans to `docs/exec-plans/completed/` with outcomes. 14 + 15 + ## Boundary policy 16 + 17 + - Public API boundary: `src/public/**` and `*.api.ts` 18 + - Domain contracts: `src/domain/**` and `*.schema.ts` 19 + - Internal/runtime orchestration: `src/internal/**`, `src/runtime/**`, `*.effect.ts`
+254
bun.lock
··· 1 + { 2 + "lockfileVersion": 1, 3 + "configVersion": 1, 4 + "workspaces": { 5 + "": { 6 + "name": "mill", 7 + "dependencies": { 8 + "@effect/platform": "^0.94.5", 9 + "@effect/platform-bun": "^0.87.1", 10 + "@effect/schema": "^0.75.5", 11 + "effect": "^3.19.19", 12 + }, 13 + "devDependencies": { 14 + "@ast-grep/cli": "^0.39.6", 15 + "@typescript/native-preview": "latest", 16 + "oxfmt": "^0.26.0", 17 + "oxlint": "^1.18.0", 18 + }, 19 + }, 20 + "packages/cli": { 21 + "name": "@mill/cli", 22 + "version": "0.0.0", 23 + "bin": { 24 + "mill": "./src/bin/mill.ts", 25 + }, 26 + "dependencies": { 27 + "@mill/core": "workspace:*", 28 + }, 29 + }, 30 + "packages/core": { 31 + "name": "@mill/core", 32 + "version": "0.0.0", 33 + }, 34 + "packages/driver-claude": { 35 + "name": "@mill/driver-claude", 36 + "version": "0.0.0", 37 + "dependencies": { 38 + "@mill/core": "workspace:*", 39 + }, 40 + }, 41 + "packages/driver-codex": { 42 + "name": "@mill/driver-codex", 43 + "version": "0.0.0", 44 + "dependencies": { 45 + "@mill/core": "workspace:*", 46 + }, 47 + }, 48 + "packages/driver-pi": { 49 + "name": "@mill/driver-pi", 50 + "version": "0.0.0", 51 + "dependencies": { 52 + "@mill/core": "workspace:*", 53 + }, 54 + }, 55 + }, 56 + "trustedDependencies": [ 57 + "@ast-grep/cli", 58 + ], 59 + "packages": { 60 + "@ast-grep/cli": ["@ast-grep/cli@0.39.9", "", { "dependencies": { "detect-libc": "2.1.2" }, "optionalDependencies": { "@ast-grep/cli-darwin-arm64": "0.39.9", "@ast-grep/cli-darwin-x64": "0.39.9", "@ast-grep/cli-linux-arm64-gnu": "0.39.9", "@ast-grep/cli-linux-x64-gnu": "0.39.9", "@ast-grep/cli-win32-arm64-msvc": "0.39.9", "@ast-grep/cli-win32-ia32-msvc": "0.39.9", "@ast-grep/cli-win32-x64-msvc": "0.39.9" }, "bin": { "sg": "sg", "ast-grep": "ast-grep" } }, "sha512-qMtu3GplcMS4PRefPtOeN2slcn6s+ccDiMRk+RvEQoxJqflNbKZi3ZbYq7O2Xh49N/VjeiU3n+5WYHaVFFEyAg=="], 61 + 62 + "@ast-grep/cli-darwin-arm64": ["@ast-grep/cli-darwin-arm64@0.39.9", "", { "os": "darwin", "cpu": "arm64" }, "sha512-DCmooChgotx4uu8B8rKfCAD05P8Au1lXn4wVLDJMbYYUxVjYIaF+fdjKj+hTRD2POAtQHtHN1F2l9gl8zcQAyw=="], 63 + 64 + "@ast-grep/cli-darwin-x64": ["@ast-grep/cli-darwin-x64@0.39.9", "", { "os": "darwin", "cpu": "x64" }, "sha512-0jMyF0DOXjDmL61VuT8l/QRcBKbJQeMEEhH7G6sUF+mBuFBjYjoSEDg9+FSjUU+vPN3flJ99Kg4pT+einy+pjg=="], 65 + 66 + "@ast-grep/cli-linux-arm64-gnu": ["@ast-grep/cli-linux-arm64-gnu@0.39.9", "", { "os": "linux", "cpu": "arm64" }, "sha512-fygNBarEJB4LS4kLk+v//s1AWH7iTRX/vUdepsVivmP8MAwdsQJQ3HH/uKgoE+KFj2FCrq9CxfaCswlpbFtdpg=="], 67 + 68 + "@ast-grep/cli-linux-x64-gnu": ["@ast-grep/cli-linux-x64-gnu@0.39.9", "", { "os": "linux", "cpu": "x64" }, "sha512-StC8APEfKqMKt23+JE40BLMFAx6KAQZfy8UTZM2rSUGUYetjZDoTVYnfh1aaH+oyIQzB+ef11dRsMp/ls5Pilg=="], 69 + 70 + "@ast-grep/cli-win32-arm64-msvc": ["@ast-grep/cli-win32-arm64-msvc@0.39.9", "", { "os": "win32", "cpu": "arm64" }, "sha512-HbIwYoh7NlJfYn957+9wj6bywQdGy2S+KpFj4Is7hnto6Yh1eRyG0szZkr6kzJuXQxF5NZoE12odWgTElpDUAg=="], 71 + 72 + "@ast-grep/cli-win32-ia32-msvc": ["@ast-grep/cli-win32-ia32-msvc@0.39.9", "", { "os": "win32", "cpu": "ia32" }, "sha512-SMFSuTRzeM3857UX467YCy6uIi7onwOxf6YGlNsOwg6ShiWcNodssoPCir9kZccLoSp+9dxANmV/6n8CMHwH0w=="], 73 + 74 + "@ast-grep/cli-win32-x64-msvc": ["@ast-grep/cli-win32-x64-msvc@0.39.9", "", { "os": "win32", "cpu": "x64" }, "sha512-+Kopx/NUEmFORNmQ/nsHXvnqoOuj45vCrDhQ/cj01D4AoeQ9MxbzVAk8sjSJsJbazDaV9if41+HTAhpVWhC4CQ=="], 75 + 76 + "@effect/cluster": ["@effect/cluster@0.56.4", "", { "dependencies": { "kubernetes-types": "^1.30.0" }, "peerDependencies": { "@effect/platform": "^0.94.5", "@effect/rpc": "^0.73.1", "@effect/sql": "^0.49.0", "@effect/workflow": "^0.16.0", "effect": "^3.19.17" } }, "sha512-7Je5/JlbZOlsSxsbKjr97dJed2cNGWsb+TLNgMcr5mRDbcWlFOTUGvsrisEJV6waosYLIg+2omPdvnvRoYKdhA=="], 77 + 78 + "@effect/experimental": ["@effect/experimental@0.58.0", "", { "dependencies": { "uuid": "^11.0.3" }, "peerDependencies": { "@effect/platform": "^0.94.0", "effect": "^3.19.13", "ioredis": "^5", "lmdb": "^3" }, "optionalPeers": ["ioredis", "lmdb"] }, "sha512-IEP9sapjF6rFy5TkoqDPc86st/fnqUfjT7Xa3pWJrFGr1hzaMXHo+mWsYOZS9LAOVKnpHuVziDK97EP5qsCHVA=="], 79 + 80 + "@effect/platform": ["@effect/platform@0.94.5", "", { "dependencies": { "find-my-way-ts": "^0.1.6", "msgpackr": "^1.11.4", "multipasta": "^0.2.7" }, "peerDependencies": { "effect": "^3.19.17" } }, "sha512-z05APUiDDPbodhTkH/RJqOLoCU11bU2IZLfcwLFrld03+ob1VeqRnELQlmueLIYm6NZifHAtjl32V+GRt34y4A=="], 81 + 82 + "@effect/platform-bun": ["@effect/platform-bun@0.87.1", "", { "dependencies": { "@effect/platform-node-shared": "^0.57.1", "multipasta": "^0.2.7" }, "peerDependencies": { "@effect/cluster": "^0.56.1", "@effect/platform": "^0.94.2", "@effect/rpc": "^0.73.0", "@effect/sql": "^0.49.0", "effect": "^3.19.15" } }, "sha512-I88d0YqWbvLY2GGeIxK3r5k0l/MoUCCnxiHJG+X6gqaHu+pIs0djDtJ+ORhw/3qha9ojcVu6pyaBmnUjgzQHWQ=="], 83 + 84 + "@effect/platform-node-shared": ["@effect/platform-node-shared@0.57.1", "", { "dependencies": { "@parcel/watcher": "^2.5.1", "multipasta": "^0.2.7", "ws": "^8.18.2" }, "peerDependencies": { "@effect/cluster": "^0.56.1", "@effect/platform": "^0.94.2", "@effect/rpc": "^0.73.0", "@effect/sql": "^0.49.0", "effect": "^3.19.15" } }, "sha512-oX/bApMdoKsyrDiNdJxo7U9Rz1RXsjRv+ecfAPp1qGlSdGIo32wVRvJ2XCHqYj0sqaYJS0pU0/GCulRfVGuJag=="], 85 + 86 + "@effect/rpc": ["@effect/rpc@0.73.2", "", { "dependencies": { "msgpackr": "^1.11.4" }, "peerDependencies": { "@effect/platform": "^0.94.5", "effect": "^3.19.18" } }, "sha512-td7LHDgBOYKg+VgGWEelD8rSAmvjXz7am17vfxZROX5qIYuvH7drL/z4p5xQFadhHZ7DYdlFpqdO9ggc77OCIw=="], 87 + 88 + "@effect/schema": ["@effect/schema@0.75.5", "", { "dependencies": { "fast-check": "^3.21.0" }, "peerDependencies": { "effect": "^3.9.2" } }, "sha512-TQInulTVCuF+9EIbJpyLP6dvxbQJMphrnRqgexm/Ze39rSjfhJuufF7XvU3SxTgg3HnL7B/kpORTJbHhlE6thw=="], 89 + 90 + "@effect/sql": ["@effect/sql@0.49.0", "", { "dependencies": { "uuid": "^11.0.3" }, "peerDependencies": { "@effect/experimental": "^0.58.0", "@effect/platform": "^0.94.0", "effect": "^3.19.13" } }, "sha512-9UEKR+z+MrI/qMAmSvb/RiD9KlgIazjZUCDSpwNgm0lEK9/Q6ExEyfziiYFVCPiptp52cBw8uBHRic8hHnwqXA=="], 91 + 92 + "@effect/workflow": ["@effect/workflow@0.16.0", "", { "peerDependencies": { "@effect/experimental": "^0.58.0", "@effect/platform": "^0.94.0", "@effect/rpc": "^0.73.0", "effect": "^3.19.13" } }, "sha512-MiAdlxx3TixkgHdbw+Yf1Z3tHAAE0rOQga12kIydJqj05Fnod+W/I+kQGRMY/XWRg+QUsVxhmh1qTr7Ype6lrw=="], 93 + 94 + "@mill/cli": ["@mill/cli@workspace:packages/cli"], 95 + 96 + "@mill/core": ["@mill/core@workspace:packages/core"], 97 + 98 + "@mill/driver-claude": ["@mill/driver-claude@workspace:packages/driver-claude"], 99 + 100 + "@mill/driver-codex": ["@mill/driver-codex@workspace:packages/driver-codex"], 101 + 102 + "@mill/driver-pi": ["@mill/driver-pi@workspace:packages/driver-pi"], 103 + 104 + "@msgpackr-extract/msgpackr-extract-darwin-arm64": ["@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw=="], 105 + 106 + "@msgpackr-extract/msgpackr-extract-darwin-x64": ["@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw=="], 107 + 108 + "@msgpackr-extract/msgpackr-extract-linux-arm": ["@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3", "", { "os": "linux", "cpu": "arm" }, "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw=="], 109 + 110 + "@msgpackr-extract/msgpackr-extract-linux-arm64": ["@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg=="], 111 + 112 + "@msgpackr-extract/msgpackr-extract-linux-x64": ["@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3", "", { "os": "linux", "cpu": "x64" }, "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg=="], 113 + 114 + "@msgpackr-extract/msgpackr-extract-win32-x64": ["@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3", "", { "os": "win32", "cpu": "x64" }, "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ=="], 115 + 116 + "@oxfmt/darwin-arm64": ["@oxfmt/darwin-arm64@0.26.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-AAGc+8CffkiWeVgtWf4dPfQwHEE5c/j/8NWH7VGVxxJRCZFdmWcqCXprvL2H6qZFewvDLrFbuSPRCqYCpYGaTQ=="], 117 + 118 + "@oxfmt/darwin-x64": ["@oxfmt/darwin-x64@0.26.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-xFx5ijCTjw577wJvFlZEMmKDnp3HSCcbYdCsLRmC5i3TZZiDe9DEYh3P46uqhzj8BkEw1Vm1ZCWdl48aEYAzvQ=="], 119 + 120 + "@oxfmt/linux-arm64-gnu": ["@oxfmt/linux-arm64-gnu@0.26.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-GubkQeQT5d3B/Jx/IiR7NMkSmXrCZcVI0BPh1i7mpFi8HgD1hQ/LbhiBKAMsMqs5bbugdQOgBEl8bOhe8JhW1g=="], 121 + 122 + "@oxfmt/linux-arm64-musl": ["@oxfmt/linux-arm64-musl@0.26.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-OEypUwK69bFPj+aa3/LYCnlIUPgoOLu//WNcriwpnWNmt47808Ht7RJSg+MNK8a7pSZHpXJ5/E6CRK/OTwFdaQ=="], 123 + 124 + "@oxfmt/linux-x64-gnu": ["@oxfmt/linux-x64-gnu@0.26.0", "", { "os": "linux", "cpu": "x64" }, "sha512-xO6iEW2bC6ZHyOTPmPWrg/nM6xgzyRPaS84rATy6F8d79wz69LdRdJ3l/PXlkqhi7XoxhvX4ExysA0Nf10ZZEQ=="], 125 + 126 + "@oxfmt/linux-x64-musl": ["@oxfmt/linux-x64-musl@0.26.0", "", { "os": "linux", "cpu": "x64" }, "sha512-Z3KuZFC+MIuAyFCXBHY71kCsdRq1ulbsbzTe71v+hrEv7zVBn6yzql+/AZcgfIaKzWO9OXNuz5WWLWDmVALwow=="], 127 + 128 + "@oxfmt/win32-arm64": ["@oxfmt/win32-arm64@0.26.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-3zRbqwVWK1mDhRhTknlQFpRFL9GhEB5GfU6U7wawnuEwpvi39q91kJ+SRJvJnhyPCARkjZBd1V8XnweN5IFd1g=="], 129 + 130 + "@oxfmt/win32-x64": ["@oxfmt/win32-x64@0.26.0", "", { "os": "win32", "cpu": "x64" }, "sha512-m8TfIljU22i9UEIkD+slGPifTFeaCwIUfxszN3E6ABWP1KQbtwSw9Ak0TdoikibvukF/dtbeyG3WW63jv9DnEg=="], 131 + 132 + "@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.50.0", "", { "os": "android", "cpu": "arm" }, "sha512-G7MRGk/6NCe+L8ntonRdZP7IkBfEpiZ/he3buLK6JkLgMHgJShXZ+BeOwADmspXez7U7F7L1Anf4xLSkLHiGTg=="], 133 + 134 + "@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.50.0", "", { "os": "android", "cpu": "arm64" }, "sha512-GeSuMoJWCVpovJi/e3xDSNgjeR8WEZ6MCXL6EtPiCIM2NTzv7LbflARINTXTJy2oFBYyvdf/l2PwHzYo6EdXvg=="], 135 + 136 + "@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.50.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-w3SY5YtxGnxCHPJ8Twl3KmS9oja1gERYk3AMoZ7Hv8P43ZtB6HVfs02TxvarxfL214Tm3uzvc2vn+DhtUNeKnw=="], 137 + 138 + "@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.50.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-hNfogDqy7tvmllXKBSlHo6k5x7dhTUVOHbMSE15CCAcXzmqf5883aPvBYPOq9AE7DpDUQUZ1kVE22YbiGW+tuw=="], 139 + 140 + "@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.50.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-ykZevOWEyu0nsxolA911ucxpEv0ahw8jfEeGWOwwb/VPoE4xoexuTOAiPNlWZNJqANlJl7yp8OyzCtXTUAxotw=="], 141 + 142 + "@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.50.0", "", { "os": "linux", "cpu": "arm" }, "sha512-hif3iDk7vo5GGJ4OLCCZAf2vjnU9FztGw4L0MbQL0M2iY9LKFtDMMiQAHmkF0PQGQMVbTYtPdXCLKVgdkiqWXQ=="], 143 + 144 + "@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.50.0", "", { "os": "linux", "cpu": "arm" }, "sha512-dVp9iSssiGAnTNey2Ruf6xUaQhdnvcFOJyRWd/mu5o2jVbFK15E5fbWGeFRfmuobu5QXuROtFga44+7DOS3PLg=="], 145 + 146 + "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.50.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-1cT7yz2HA910CKA9NkH1ZJo50vTtmND2fkoW1oyiSb0j6WvNtJ0Wx2zoySfXWc/c+7HFoqRK5AbEoL41LOn9oA=="], 147 + 148 + "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.50.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-++B3k/HEPFVlj89cOz8kWfQccMZB/aWL9AhsW7jPIkG++63Mpwb2cE9XOEsd0PATbIan78k2Gky+09uWM1d/gQ=="], 149 + 150 + "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.50.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Z9b/KpFMkx66w3gVBqjIC1AJBTZAGoI9+U+K5L4QM0CB/G0JSNC1es9b3Y0Vcrlvtdn8A+IQTkYjd/Q0uCSaZw=="], 151 + 152 + "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.50.0", "", { "os": "linux", "cpu": "none" }, "sha512-jvmuIw8wRSohsQlFNIST5uUwkEtEJmOQYr33bf/K2FrFPXHhM4KqGekI3ShYJemFS/gARVacQFgBzzJKCAyJjg=="], 153 + 154 + "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.50.0", "", { "os": "linux", "cpu": "none" }, "sha512-x+UrN47oYNh90nmAAyql8eQaaRpHbDPu5guasDg10+OpszUQ3/1+1J6zFMmV4xfIEgTcUXG/oI5fxJhF4eWCNA=="], 155 + 156 + "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.50.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-i/JLi2ljLUIVfekMj4ISmdt+Hn11wzYUdRRrkVUYsCWw7zAy5xV7X9iA+KMyM156LTFympa7s3oKBjuCLoTAUQ=="], 157 + 158 + "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.50.0", "", { "os": "linux", "cpu": "x64" }, "sha512-/C7brhn6c6UUPccgSPCcpLQXcp+xKIW/3sji/5VZ8/OItL3tQ2U7KalHz887UxxSQeEOmd1kY6lrpuwFnmNqOA=="], 159 + 160 + "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.50.0", "", { "os": "linux", "cpu": "x64" }, "sha512-oDR1f+bGOYU8LfgtEW8XtotWGB63ghtcxk5Jm6IDTCk++rTA/IRMsjOid2iMd+1bW+nP9Mdsmcdc7VbPD3+iyQ=="], 161 + 162 + "@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.50.0", "", { "os": "none", "cpu": "arm64" }, "sha512-4CmRGPp5UpvXyu4jjP9Tey/SrXDQLRvZXm4pb4vdZBxAzbFZkCyh0KyRy4txld/kZKTJlW4TO8N1JKrNEk+mWw=="], 163 + 164 + "@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.50.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-Fq0M6vsGcFsSfeuWAACDhd5KJrO85ckbEfe1EGuBj+KPyJz7KeWte2fSFrFGmNKNXyhEMyx4tbgxiWRujBM2KQ=="], 165 + 166 + "@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.50.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-qTdWR9KwY/vxJGhHVIZG2eBOhidOQvOwzDxnX+jhW/zIVacal1nAhR8GLkiywW8BIFDkQKXo/zOfT+/DY+ns/w=="], 167 + 168 + "@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.50.0", "", { "os": "win32", "cpu": "x64" }, "sha512-682t7npLC4G2Ca+iNlI9fhAKTcFPYYXJjwoa88H4q+u5HHHlsnL/gHULapX3iqp+A8FIJbgdylL5KMYo2LaluQ=="], 169 + 170 + "@parcel/watcher": ["@parcel/watcher@2.5.6", "", { "dependencies": { "detect-libc": "^2.0.3", "is-glob": "^4.0.3", "node-addon-api": "^7.0.0", "picomatch": "^4.0.3" }, "optionalDependencies": { "@parcel/watcher-android-arm64": "2.5.6", "@parcel/watcher-darwin-arm64": "2.5.6", "@parcel/watcher-darwin-x64": "2.5.6", "@parcel/watcher-freebsd-x64": "2.5.6", "@parcel/watcher-linux-arm-glibc": "2.5.6", "@parcel/watcher-linux-arm-musl": "2.5.6", "@parcel/watcher-linux-arm64-glibc": "2.5.6", "@parcel/watcher-linux-arm64-musl": "2.5.6", "@parcel/watcher-linux-x64-glibc": "2.5.6", "@parcel/watcher-linux-x64-musl": "2.5.6", "@parcel/watcher-win32-arm64": "2.5.6", "@parcel/watcher-win32-ia32": "2.5.6", "@parcel/watcher-win32-x64": "2.5.6" } }, "sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ=="], 171 + 172 + "@parcel/watcher-android-arm64": ["@parcel/watcher-android-arm64@2.5.6", "", { "os": "android", "cpu": "arm64" }, "sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A=="], 173 + 174 + "@parcel/watcher-darwin-arm64": ["@parcel/watcher-darwin-arm64@2.5.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA=="], 175 + 176 + "@parcel/watcher-darwin-x64": ["@parcel/watcher-darwin-x64@2.5.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg=="], 177 + 178 + "@parcel/watcher-freebsd-x64": ["@parcel/watcher-freebsd-x64@2.5.6", "", { "os": "freebsd", "cpu": "x64" }, "sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng=="], 179 + 180 + "@parcel/watcher-linux-arm-glibc": ["@parcel/watcher-linux-arm-glibc@2.5.6", "", { "os": "linux", "cpu": "arm" }, "sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ=="], 181 + 182 + "@parcel/watcher-linux-arm-musl": ["@parcel/watcher-linux-arm-musl@2.5.6", "", { "os": "linux", "cpu": "arm" }, "sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg=="], 183 + 184 + "@parcel/watcher-linux-arm64-glibc": ["@parcel/watcher-linux-arm64-glibc@2.5.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA=="], 185 + 186 + "@parcel/watcher-linux-arm64-musl": ["@parcel/watcher-linux-arm64-musl@2.5.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA=="], 187 + 188 + "@parcel/watcher-linux-x64-glibc": ["@parcel/watcher-linux-x64-glibc@2.5.6", "", { "os": "linux", "cpu": "x64" }, "sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ=="], 189 + 190 + "@parcel/watcher-linux-x64-musl": ["@parcel/watcher-linux-x64-musl@2.5.6", "", { "os": "linux", "cpu": "x64" }, "sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg=="], 191 + 192 + "@parcel/watcher-win32-arm64": ["@parcel/watcher-win32-arm64@2.5.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q=="], 193 + 194 + "@parcel/watcher-win32-ia32": ["@parcel/watcher-win32-ia32@2.5.6", "", { "os": "win32", "cpu": "ia32" }, "sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g=="], 195 + 196 + "@parcel/watcher-win32-x64": ["@parcel/watcher-win32-x64@2.5.6", "", { "os": "win32", "cpu": "x64" }, "sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw=="], 197 + 198 + "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="], 199 + 200 + "@typescript/native-preview": ["@typescript/native-preview@7.0.0-dev.20260223.1", "", { "optionalDependencies": { "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260223.1", "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260223.1", "@typescript/native-preview-linux-arm": "7.0.0-dev.20260223.1", "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260223.1", "@typescript/native-preview-linux-x64": "7.0.0-dev.20260223.1", "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260223.1", "@typescript/native-preview-win32-x64": "7.0.0-dev.20260223.1" }, "bin": { "tsgo": "bin/tsgo.js" } }, "sha512-NEifR9F/0khbTQRztM4Yuxcj9dFuK9ubWIXJwLSmKMlncSp4u1fzRnlfv1vlNKKrXB7BUXoANFHpsM5BEXJ06w=="], 201 + 202 + "@typescript/native-preview-darwin-arm64": ["@typescript/native-preview-darwin-arm64@7.0.0-dev.20260223.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uDvCfIGr3PR8iKBA6OCNq6w0b2WMvmtkS8KUZVy04CH8ieFsxChYStLiyFTDX4GZs9BtWKeth/7qGDZewY20sQ=="], 203 + 204 + "@typescript/native-preview-darwin-x64": ["@typescript/native-preview-darwin-x64@7.0.0-dev.20260223.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-hOKQicSgd1DhFbsqdpC5fMgg0R46sYbbtVjfXgYTAHg/WO6whfZ2SfPy9IIzsQ/CXYUZuwoJElCnc9DTcd66+w=="], 205 + 206 + "@typescript/native-preview-linux-arm": ["@typescript/native-preview-linux-arm@7.0.0-dev.20260223.1", "", { "os": "linux", "cpu": "arm" }, "sha512-FVq6XjzqtLC1MVgQiumwpuW7Ug+S+WVEbvCUJQhrs8Szbf6fIFU/6+D6fOGCKzzo9SAD6zq2RNHtejBw74JSFA=="], 207 + 208 + "@typescript/native-preview-linux-arm64": ["@typescript/native-preview-linux-arm64@7.0.0-dev.20260223.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-oRt0l3O/itqBEwd5rhfDAyziEzbSgWar1NShduK4n2mHWTHCI1I7mFsbSPbox2pdrqOwOr0QW8xu7xEgDWWRXA=="], 209 + 210 + "@typescript/native-preview-linux-x64": ["@typescript/native-preview-linux-x64@7.0.0-dev.20260223.1", "", { "os": "linux", "cpu": "x64" }, "sha512-qpFTW7q8Vvq1v/0bzfT8+D0wLjqydIP0qKlomrEGLlMnCCAnPodo2oLc2JCtacc40TSMZZARvhctTszCn1gWBA=="], 211 + 212 + "@typescript/native-preview-win32-arm64": ["@typescript/native-preview-win32-arm64@7.0.0-dev.20260223.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-HHu63F8cDhgIlqFGBnqBVQn7HSiORxyT0M6yPzG4tG4gdzx+aFUdogbYily0nzN5b6NolQTrFfh3Q85UfHCHqg=="], 213 + 214 + "@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20260223.1", "", { "os": "win32", "cpu": "x64" }, "sha512-vSis36O5qT+vOYfei7GtfWWzvIoaNdmxa1zDypBKkGGCCHt/c5vp0pXls85+8jBVS11Ep6p7ECcHlt+R5CBaug=="], 215 + 216 + "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], 217 + 218 + "effect": ["effect@3.19.19", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "fast-check": "^3.23.1" } }, "sha512-Yc8U/SVXo2dHnaP7zNBlAo83h/nzSJpi7vph6Hzyl4ulgMBIgPmz3UzOjb9sBgpFE00gC0iETR244sfXDNLHRg=="], 219 + 220 + "fast-check": ["fast-check@3.23.2", "", { "dependencies": { "pure-rand": "^6.1.0" } }, "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A=="], 221 + 222 + "find-my-way-ts": ["find-my-way-ts@0.1.6", "", {}, "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA=="], 223 + 224 + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], 225 + 226 + "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], 227 + 228 + "kubernetes-types": ["kubernetes-types@1.30.0", "", {}, "sha512-Dew1okvhM/SQcIa2rcgujNndZwU8VnSapDgdxlYoB84ZlpAD43U6KLAFqYo17ykSFGHNPrg0qry0bP+GJd9v7Q=="], 229 + 230 + "msgpackr": ["msgpackr@1.11.8", "", { "optionalDependencies": { "msgpackr-extract": "^3.0.2" } }, "sha512-bC4UGzHhVvgDNS7kn9tV8fAucIYUBuGojcaLiz7v+P63Lmtm0Xeji8B/8tYKddALXxJLpwIeBmUN3u64C4YkRA=="], 231 + 232 + "msgpackr-extract": ["msgpackr-extract@3.0.3", "", { "dependencies": { "node-gyp-build-optional-packages": "5.2.2" }, "optionalDependencies": { "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3", "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3", "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3", "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3", "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3", "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3" }, "bin": { "download-msgpackr-prebuilds": "bin/download-prebuilds.js" } }, "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA=="], 233 + 234 + "multipasta": ["multipasta@0.2.7", "", {}, "sha512-KPA58d68KgGil15oDqXjkUBEBYc00XvbPj5/X+dyzeo/lWm9Nc25pQRlf1D+gv4OpK7NM0J1odrbu9JNNGvynA=="], 235 + 236 + "node-addon-api": ["node-addon-api@7.1.1", "", {}, "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="], 237 + 238 + "node-gyp-build-optional-packages": ["node-gyp-build-optional-packages@5.2.2", "", { "dependencies": { "detect-libc": "^2.0.1" }, "bin": { "node-gyp-build-optional-packages": "bin.js", "node-gyp-build-optional-packages-optional": "optional.js", "node-gyp-build-optional-packages-test": "build-test.js" } }, "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw=="], 239 + 240 + "oxfmt": ["oxfmt@0.26.0", "", { "dependencies": { "tinypool": "2.0.0" }, "optionalDependencies": { "@oxfmt/darwin-arm64": "0.26.0", "@oxfmt/darwin-x64": "0.26.0", "@oxfmt/linux-arm64-gnu": "0.26.0", "@oxfmt/linux-arm64-musl": "0.26.0", "@oxfmt/linux-x64-gnu": "0.26.0", "@oxfmt/linux-x64-musl": "0.26.0", "@oxfmt/win32-arm64": "0.26.0", "@oxfmt/win32-x64": "0.26.0" }, "bin": { "oxfmt": "bin/oxfmt" } }, "sha512-UDD1wFNwfeorMm2ZY0xy1KRAAvJ5NjKBfbDmiMwGP7baEHTq65cYpC0aPP+BGHc8weXUbSZaK8MdGyvuRUvS4Q=="], 241 + 242 + "oxlint": ["oxlint@1.50.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.50.0", "@oxlint/binding-android-arm64": "1.50.0", "@oxlint/binding-darwin-arm64": "1.50.0", "@oxlint/binding-darwin-x64": "1.50.0", "@oxlint/binding-freebsd-x64": "1.50.0", "@oxlint/binding-linux-arm-gnueabihf": "1.50.0", "@oxlint/binding-linux-arm-musleabihf": "1.50.0", "@oxlint/binding-linux-arm64-gnu": "1.50.0", "@oxlint/binding-linux-arm64-musl": "1.50.0", "@oxlint/binding-linux-ppc64-gnu": "1.50.0", "@oxlint/binding-linux-riscv64-gnu": "1.50.0", "@oxlint/binding-linux-riscv64-musl": "1.50.0", "@oxlint/binding-linux-s390x-gnu": "1.50.0", "@oxlint/binding-linux-x64-gnu": "1.50.0", "@oxlint/binding-linux-x64-musl": "1.50.0", "@oxlint/binding-openharmony-arm64": "1.50.0", "@oxlint/binding-win32-arm64-msvc": "1.50.0", "@oxlint/binding-win32-ia32-msvc": "1.50.0", "@oxlint/binding-win32-x64-msvc": "1.50.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.14.1" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-iSJ4IZEICBma8cZX7kxIIz9PzsYLF2FaLAYN6RKu7VwRVKdu7RIgpP99bTZaGl//Yao7fsaGZLSEo5xBrI5ReQ=="], 243 + 244 + "picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="], 245 + 246 + "pure-rand": ["pure-rand@6.1.0", "", {}, "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA=="], 247 + 248 + "tinypool": ["tinypool@2.0.0", "", {}, "sha512-/RX9RzeH2xU5ADE7n2Ykvmi9ED3FBGPAjw9u3zucrNNaEBIO0HPSYgL0NT7+3p147ojeSdaVu08F6hjpv31HJg=="], 249 + 250 + "uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="], 251 + 252 + "ws": ["ws@8.19.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg=="], 253 + } 254 + }
+3
docs/README.md
··· 1 + # mill docs 2 + 3 + Start here: `docs/indexes/docs.index.md`
+3
docs/design-docs/README.md
··· 1 + # Design Docs Index 2 + 3 + - `mill-v0-architecture-and-boundaries.md` — Sections 8–18 from SPEC (boundary contracts, services, event model, driver/executor architecture, worker, extensions, SDK/export boundaries).
+511
docs/design-docs/mill-v0-architecture-and-boundaries.md
··· 1 + # mill v0 Architecture & Boundaries (Sections 8–18) 2 + 3 + _Source: `SPEC.md` (verbatim split for cedar-style docs tree)._ 4 + 5 + ## 8) Boundary contracts: public Promise API, internal Effect core 6 + 7 + Rule of thumb (strict): 8 + 9 + - **User-exposed surface**: Promise-based API + interfaces are allowed. 10 + - **Everything else**: Effect-first (`Effect`, `Stream`, `Layer`) + Schema-defined domain types. 11 + 12 + Concretely: 13 + 14 + - Public boundary (`src/public/**`, ambient `*.d.ts`): 15 + - can expose `Promise<T>` 16 + - can use `interface` for ergonomics 17 + - Internal/domain/runtime (`src/internal/**`, `src/domain/**`, `src/runtime/**`): 18 + - no public Promise contracts 19 + - domain shapes must be defined by `@effect/schema/Schema` 20 + - no interface-based domain modelling 21 + 22 + Effect contracts used internally: 23 + 24 + - effects: `Effect.Effect<A, E, R>` 25 + - streams: `Stream.Stream<A, E, R>` 26 + - layers: `Layer.Layer<ROut, E, RIn>` 27 + - queue/pubsub for event fanout 28 + - schemas via `@effect/schema/Schema` 29 + 30 + ### 8.1 Domain schemas (representative) 31 + 32 + ```ts 33 + import * as Schema from "@effect/schema/Schema"; 34 + 35 + export const RunId = Schema.String.pipe(Schema.brand("RunId")); 36 + export type RunId = Schema.Schema.Type<typeof RunId>; 37 + 38 + export const SpawnId = Schema.String.pipe(Schema.brand("SpawnId")); 39 + export type SpawnId = Schema.Schema.Type<typeof SpawnId>; 40 + 41 + export const RunStatus = Schema.Literal("pending", "running", "complete", "failed", "cancelled"); 42 + export type RunStatus = Schema.Schema.Type<typeof RunStatus>; 43 + 44 + export const SpawnOptions = Schema.Struct({ 45 + agent: Schema.NonEmptyString, 46 + systemPrompt: Schema.NonEmptyString, 47 + prompt: Schema.NonEmptyString, 48 + model: Schema.optional(Schema.NonEmptyString), 49 + }); 50 + 51 + export type SpawnOptions = Schema.Schema.Type<typeof SpawnOptions>; 52 + 53 + export const SpawnResult = Schema.Struct({ 54 + text: Schema.String, 55 + sessionRef: Schema.NonEmptyString, 56 + agent: Schema.NonEmptyString, 57 + model: Schema.NonEmptyString, 58 + driver: Schema.NonEmptyString, 59 + exitCode: Schema.Number, 60 + stopReason: Schema.optional(Schema.String), 61 + errorMessage: Schema.optional(Schema.String), 62 + }); 63 + 64 + export type SpawnResult = Schema.Schema.Type<typeof SpawnResult>; 65 + ``` 66 + 67 + ### 8.2 Error model 68 + 69 + All errors are tagged Effect data errors. 70 + 71 + ```ts 72 + class ConfigError extends Data.TaggedError("ConfigError")<{ message: string }> {} 73 + class RunNotFoundError extends Data.TaggedError("RunNotFoundError")<{ runId: string }> {} 74 + class DriverError extends Data.TaggedError("DriverError")<{ driver: string; message: string }> {} 75 + class ProgramExecutionError extends Data.TaggedError("ProgramExecutionError")<{ 76 + runId: string; 77 + message: string; 78 + }> {} 79 + class PersistenceError extends Data.TaggedError("PersistenceError")<{ 80 + path: string; 81 + message: string; 82 + }> {} 83 + ``` 84 + 85 + ### 8.3 Core services 86 + 87 + Service contracts may use `interface`, but only for **capabilities** (methods), not domain data modelling. Their methods remain Effect-typed. 88 + 89 + ```ts 90 + interface RunStore { 91 + create(meta: RunMeta): Effect.Effect<void, PersistenceError>; 92 + appendEvent(runId: RunId, event: MillEvent): Effect.Effect<void, PersistenceError>; 93 + setStatus(runId: RunId, status: RunStatus): Effect.Effect<void, PersistenceError>; 94 + setResult(runId: RunId, result: RunResult): Effect.Effect<void, PersistenceError>; 95 + getRun(runId: RunId): Effect.Effect<RunRecord, RunNotFoundError | PersistenceError>; 96 + listRuns(filter?: RunFilter): Effect.Effect<ReadonlyArray<RunRecord>, PersistenceError>; 97 + } 98 + 99 + interface Driver { 100 + readonly name: string; 101 + readonly spawn: ( 102 + input: DriverSpawnInput, 103 + ) => Effect.Effect<DriverSpawnHandle, DriverError, Scope.Scope>; 104 + } 105 + 106 + interface DriverSpawnHandle { 107 + readonly events: Stream.Stream<DriverEvent, DriverError>; 108 + readonly raw: Stream.Stream<Uint8Array, never>; 109 + readonly result: Effect.Effect<SpawnResult, DriverError>; 110 + readonly cancel: Effect.Effect<void, never>; 111 + } 112 + 113 + interface Executor { 114 + readonly name: string; 115 + readonly runProgram: ( 116 + input: ProgramRunInput, 117 + ) => Effect.Effect<ProgramRunHandle, ProgramExecutionError, Scope.Scope>; 118 + } 119 + 120 + interface ProgramRunHandle { 121 + readonly events: Stream.Stream<MillEvent, ProgramExecutionError>; 122 + readonly result: Effect.Effect<RunResult, ProgramExecutionError>; 123 + readonly cancel: Effect.Effect<void, never>; 124 + } 125 + ``` 126 + 127 + ### 8.4 Engine service 128 + 129 + ```ts 130 + interface MillEngine { 131 + submit( 132 + input: SubmitRunInput, 133 + ): Effect.Effect<SubmitRunOutput, ConfigError | PersistenceError | ProgramExecutionError>; 134 + runSync( 135 + input: SubmitRunInput, 136 + ): Effect.Effect<RunResult, ConfigError | PersistenceError | ProgramExecutionError>; 137 + status(runId: RunId): Effect.Effect<RunRecord, RunNotFoundError | PersistenceError>; 138 + wait( 139 + runId: RunId, 140 + timeout: Duration.DurationInput, 141 + ): Effect.Effect<RunRecord, RunNotFoundError | PersistenceError>; 142 + watch(runId: RunId): Stream.Stream<MillEvent, RunNotFoundError | PersistenceError>; 143 + cancel(runId: RunId): Effect.Effect<void, RunNotFoundError | PersistenceError>; 144 + inspect(ref: RunOrSpawnRef): Effect.Effect<InspectResult, RunNotFoundError | PersistenceError>; 145 + } 146 + ``` 147 + 148 + ### 8.5 Effect runtime primitives used in mill 149 + 150 + `mill` implementation uses these Effect modules as first-class building blocks: 151 + 152 + - `Effect.gen`, `Effect.scoped`, `Effect.acquireRelease`, `Effect.timeout`, `Effect.retry`, `Effect.interrupt` 153 + - `Fiber` / `FiberSet` for supervised detached run workers 154 + - `Queue` for per-run ordered event buffering 155 + - `PubSub` for fanout to multiple live watchers 156 + - `Stream` for driver output decoding and watch subscriptions 157 + - `Ref` / `SynchronizedRef` for in-memory run registry snapshots 158 + - `Layer` + `Context.Tag` for all services (`RunStore`, `DriverRegistry`, `ExecutorRegistry`, `Clock`, etc.) 159 + - `Runtime` for bridging program-facing Promise API (`mill.spawn(): Promise<...>`) to internal Effects via **only** `Runtime.runPromise` 160 + 161 + Target platform services: 162 + 163 + - `@effect/platform/Command` 164 + - `@effect/platform/FileSystem` 165 + - `@effect/platform/Path` 166 + - `@effect/platform/Terminal` 167 + - `@effect/platform-bun` runtime layer for Bun-backed implementations 168 + 169 + ### 8.6 Package baseline (Effect v4 target) 170 + 171 + `mill` pins to Effect v4-compatible package line: 172 + 173 + ```json 174 + { 175 + "dependencies": { 176 + "effect": "^4.x", 177 + "@effect/platform": "^1.x", 178 + "@effect/platform-bun": "^1.x", 179 + "@effect/schema": "^1.x" 180 + } 181 + } 182 + ``` 183 + 184 + (Exact minor versions are implementation-time decisions; API usage must stay within documented stable modules.) 185 + 186 + ### 8.7 File layout + naming (boundary is visible in filenames) 187 + 188 + ```text 189 + src/ 190 + public/ 191 + mill.api.ts # Promise-based user API 192 + discovery.api.ts # Promise-based CLI/discovery payload builders 193 + types.ts # user-facing interfaces allowed 194 + domain/ 195 + run.schema.ts # Schema-based domain models (no interfaces) 196 + spawn.schema.ts 197 + internal/ 198 + engine.effect.ts # internal Effect programs/services 199 + run-store.effect.ts 200 + driver.effect.ts 201 + runtime/ 202 + worker.effect.ts 203 + ``` 204 + 205 + Naming rules: 206 + 207 + - `*.api.ts` => user boundary (Promise + interfaces allowed) 208 + - `*.schema.ts` => domain data contracts (`Schema` + `Schema.Type` exports) 209 + - `*.effect.ts` => internal runtime/effectful orchestration code 210 + 211 + If a file defines domain entities and is not `*.schema.ts`, it is considered a spec violation. 212 + 213 + ### 8.8 Quick classification examples 214 + 215 + Allowed (public boundary): 216 + 217 + ```ts 218 + // src/public/mill.api.ts 219 + export interface Mill { 220 + spawn(input: SpawnInput): Promise<SpawnOutput>; 221 + } 222 + ``` 223 + 224 + Required (internal): 225 + 226 + ```ts 227 + // src/internal/engine.effect.ts 228 + export const submit = ( 229 + input: SubmitRunInput, 230 + ): Effect.Effect<SubmitRunOutput, SubmitError, RunStore | DriverRegistry> => 231 + Effect.gen(function* () { 232 + // ... 233 + }); 234 + ``` 235 + 236 + Required (domain): 237 + 238 + ```ts 239 + // src/domain/run.schema.ts 240 + export const RunRecord = Schema.Struct({ 241 + id: RunId, 242 + status: RunStatus, 243 + startedAt: Schema.String, 244 + }); 245 + export type RunRecord = Schema.Schema.Type<typeof RunRecord>; 246 + ``` 247 + 248 + Disallowed: 249 + 250 + ```ts 251 + // src/domain/run.ts 252 + export interface RunRecord { 253 + // lint error 254 + id: string; 255 + status: string; 256 + } 257 + ``` 258 + 259 + ### 8.9 Promise bridge and decode boundaries 260 + 261 + - Allowed bridge: 262 + - `Runtime.runPromise` only 263 + - Disallowed bridges: 264 + - `Effect.runPromise` 265 + - `Effect.runPromiseExit` 266 + - `Runtime.runPromiseExit` 267 + - Bridge location: 268 + - boundary adapters only (`src/public/**`, CLI boundary entrypoints) 269 + 270 + Decode policy: 271 + 272 + - `JSON.parse` is only allowed in codec/schema decoding modules (`*.codec.ts`, `*.schema.ts`). 273 + - Parsed values must be validated with `Schema.decodeUnknown*` before use. 274 + - Ad-hoc parsing in engine/runtime/business modules is disallowed. 275 + 276 + ## 9) Event model 277 + 278 + Two tiers: 279 + 280 + ### Tier 1 (structured, persisted) 281 + 282 + Required core events: 283 + 284 + - `run:start` 285 + - `run:status` 286 + - `run:complete` 287 + - `run:failed` 288 + - `run:cancelled` 289 + - `spawn:start` 290 + - `spawn:milestone` 291 + - `spawn:tool_call` 292 + - `spawn:error` 293 + - `spawn:complete` 294 + - `spawn:cancelled` 295 + 296 + All tier-1 events must include: 297 + 298 + - `schemaVersion` (integer, starts at `1`) 299 + - `runId` 300 + - event `type` (discriminant) 301 + - monotonic sequence number 302 + - timestamp 303 + 304 + Encoding/decoding requirements: 305 + 306 + - persisted event payloads are defined as a Schema discriminated union 307 + - writers encode from typed values 308 + - readers decode with `Schema.decodeUnknown*` 309 + - unknown schema versions are surfaced as typed decode errors 310 + 311 + Tier 1 is written to `events.ndjson` and is the source for `watch`, `inspect`, and extensions. 312 + 313 + ### Tier 1 lifecycle invariants 314 + 315 + Exactly one terminal event is allowed per run and per spawn: 316 + 317 + - run terminal set: `run:complete | run:failed | run:cancelled` 318 + - spawn terminal set: `spawn:complete | spawn:error | spawn:cancelled` 319 + 320 + Transition table: 321 + 322 + ```text 323 + run: pending -> running -> complete|failed|cancelled 324 + spawn: pending -> running -> complete|error|cancelled 325 + ``` 326 + 327 + Terminal states have no outgoing transitions. 328 + `mill wait` resolves on first observed terminal event and treats additional terminal events as invariant violations. 329 + 330 + ### Tier 2 (raw passthrough, ephemeral) 331 + 332 + - full raw bytes/text from driver process or remote stream 333 + - available live via `watch --raw` 334 + - not persisted by engine 335 + 336 + ## 10) Driver architecture 337 + 338 + ### 10.1 Generic driver + codec split 339 + 340 + Core does not encode vendor semantics. 341 + 342 + - `processDriver(...)` and `httpDriver(...)` are generic factories. 343 + - `codec` parses native output into `DriverEvent` + `SpawnResult`. 344 + 345 + ```ts 346 + interface DriverCodec { 347 + readonly decodeEvent: ( 348 + chunk: Uint8Array, 349 + ) => Effect.Effect<ReadonlyArray<DriverEvent>, CodecError>; 350 + readonly decodeFinal: ( 351 + aggregate: ReadonlyArray<Uint8Array>, 352 + ) => Effect.Effect<SpawnResult, CodecError>; 353 + readonly modelCatalog: Effect.Effect<ReadonlyArray<string>, never>; 354 + } 355 + ``` 356 + 357 + ### 10.2 Process driver execution (Bun-backed via Effect) 358 + 359 + Driver process spawning MUST be implemented with Effect platform command APIs and Bun context layer. 360 + 361 + Implementation pattern: 362 + 363 + 1. Build command (`Command.make(command, ...args)`) 364 + 2. Apply env/cwd/stdin 365 + 3. Start process via platform `Command` executor 366 + 4. Consume stdout/stderr as `Stream` 367 + 5. Parse via codec to structured events 368 + 6. Await exit code and final decode 369 + 370 + Command safety requirements: 371 + 372 + - commands must be built as arg vectors (`Command.make(cmd, ...args)`) 373 + - `sh -lc`, `bash -lc`, and interpolated shell command strings are disallowed 374 + - untrusted/user-provided values must flow as args, never shell source text 375 + 376 + The implementation layer includes `@effect/platform-bun` runtime context so process operations are backed by Bun spawn internally while preserving typed Effect semantics. 377 + 378 + ## 11) Executor architecture 379 + 380 + ### 11.1 Direct executor (default) 381 + 382 + - executes the TS program using Bun in local environment 383 + - injects `globalThis.mill` 384 + - enforces scoped lifecycle and cancellation 385 + 386 + ### 11.2 VM executor (optional) 387 + 388 + - same engine contracts 389 + - runs program in sandboxed runtime (docker/firecracker/gvisor) 390 + 391 + Executor has no driver knowledge. 392 + 393 + ## 12) Program API injected into runtime 394 + 395 + This is a **user-facing boundary**, so Promise-returning signatures are intentional. 396 + 397 + ```ts 398 + declare global { 399 + const mill: { 400 + spawn(opts: SpawnOptions): Promise<SpawnResult>; 401 + // extension APIs merged in at runtime 402 + [key: string]: unknown; 403 + }; 404 + } 405 + ``` 406 + 407 + Runtime validation: 408 + 409 + - `systemPrompt` must be non-empty 410 + - `prompt` must be non-empty 411 + - `agent` must be non-empty 412 + 413 + Behavior: 414 + 415 + - each `spawn` allocates `spawnId` 416 + - engine emits `spawn:start` 417 + - driver handle streams events 418 + - engine maps to tier-1 events and persists 419 + - resolve final `SpawnResult` 420 + 421 + ## 13) Background worker process 422 + 423 + Internal worker command (private API): 424 + 425 + ```bash 426 + mill _worker --run-id <id> --program <abs-path> --config <resolved-config> [--driver ...] [--executor ...] 427 + ``` 428 + 429 + Worker responsibilities: 430 + 431 + 1. mark run `running` 432 + 2. execute program through engine 433 + 3. append tier-1 events 434 + 4. write final `result.json` 435 + 5. mark terminal status exactly once (idempotent finalize) 436 + 437 + CLI `run` command only submits and detaches worker (unless `--sync`). 438 + 439 + ## 14) Extensions 440 + 441 + ```ts 442 + interface Extension { 443 + readonly name: string; 444 + readonly setup?: (ctx: ExtensionContext) => Effect.Effect<void, ExtensionError, Scope.Scope>; 445 + readonly onEvent?: ( 446 + event: MillEvent, 447 + ctx: ExtensionContext, 448 + ) => Effect.Effect<void, ExtensionError>; 449 + readonly api?: Record<string, (...args: ReadonlyArray<unknown>) => Promise<unknown>>; 450 + } 451 + ``` 452 + 453 + Rules: 454 + 455 + - Extension failure does not crash engine by default; failure becomes `extension:error` event. 456 + - `api` contributions are namespaced into injected `mill` object. 457 + - Extension hooks (`setup`, `onEvent`) stay Effect-native. 458 + - Extension `api` is user-facing, therefore Promise-based by contract. 459 + - Promise adapters for extension API must use `Runtime.runPromise` as the only bridge. 460 + 461 + ## 15) Observers 462 + 463 + Observers consume tier-1 stream (and optionally tier-2 live raw stream): 464 + 465 + - `mill watch` 466 + - `mill inspect` 467 + - future TUI/web UI 468 + - automation reading NDJSON 469 + 470 + Observers are read-only; they do not mutate engine state. 471 + 472 + ## 16) `inspect --session` 473 + 474 + `mill inspect <runId>.<spawnId> --session` resolves the spawn `sessionRef` via the originating driver and opens or prints a pointer to full native session history. 475 + 476 + Engine never normalizes full transcript ownership. 477 + 478 + ## 17) Cancellation semantics 479 + 480 + `mill cancel <runId>`: 481 + 482 + 1. mark run as cancelling 483 + 2. interrupt worker fiber 484 + 3. propagate cancel to all live spawn handles (`handle.cancel`) 485 + 4. append `run:cancelled` (only if run is not already terminal) 486 + 5. mark terminal state `cancelled` 487 + 488 + Cancellation must be interruption-safe and idempotent. 489 + If run is already terminal, cancellation is a no-op. 490 + 491 + ## 18) SDK contract (`@mill/core`) 492 + 493 + ```ts 494 + interface CreateEngineInput { 495 + readonly config: MillConfig; 496 + } 497 + 498 + declare const createEngine: ( 499 + input: CreateEngineInput, 500 + ) => Effect.Effect<MillEngine, ConfigError, Scope.Scope>; 501 + ``` 502 + 503 + CLI is a thin wrapper around SDK service methods. 504 + 505 + ### 18.1 Package export boundary 506 + 507 + `package.json` exports must expose only public entrypoints (`src/public/**` build outputs). 508 + 509 + - consumers must not import `src/internal/**` / `src/runtime/**` directly 510 + - internal modules are considered private implementation detail 511 + - CI should fail if an internal path is exported
+6
docs/exec-plans/README.md
··· 1 + # Execution Plans Index 2 + 3 + - Active: `active/` 4 + - Completed: `completed/` 5 + 6 + Use active plans for current implementation tracks. Move finished plans to completed with outcomes + follow-ups.
+28
docs/exec-plans/active/0001-repository-foundation.md
··· 1 + # 0001 — Repository Foundation (Active) 2 + 3 + ## Goal 4 + 5 + Implement the baseline monorepo scaffold and guardrail toolchain for `mill` per SPEC sections 8.6 and 19. 6 + 7 + ## Scope 8 + 9 + - Bun workspace monorepo with: 10 + - `packages/core` 11 + - `packages/cli` 12 + - `packages/driver-pi` 13 + - `packages/driver-claude` 14 + - `packages/driver-codex` 15 + - Baseline Effect dependencies (`effect`, `@effect/platform`, `@effect/platform-bun`, `@effect/schema`) 16 + - Constraint toolchain files/scripts 17 + - Minimal compileable package wiring + baseline tests 18 + - Docs split from `SPEC.md` into cedar-style `docs/` tree 19 + 20 + ## Exit criteria 21 + 22 + - `bun install` succeeds 23 + - baseline checks pass (`format:check`, lint config/rules, `bun test`) 24 + - docs indexes and root guidance files exist 25 + 26 + ## Notes 27 + 28 + This plan establishes foundations only; engine/driver execution semantics are follow-on implementation phases.
+3
docs/exec-plans/completed/README.md
··· 1 + # Completed Execution Plans 2 + 3 + No completed plans yet.
+19
docs/indexes/docs.index.md
··· 1 + # Docs Index 2 + 3 + ## Primary split of `SPEC.md` 4 + 5 + - Product spec: `docs/product-specs/mill-v0-product-spec.md` 6 + - Architecture & boundaries: `docs/design-docs/mill-v0-architecture-and-boundaries.md` 7 + - Toolchain, invariants, non-goals, order: `docs/references/mill-v0-toolchain-and-invariants.md` 8 + 9 + ## Execution plans 10 + 11 + - Active plans: `docs/exec-plans/active/` 12 + - Completed plans: `docs/exec-plans/completed/` 13 + 14 + ## Directory indexes 15 + 16 + - `docs/product-specs/README.md` 17 + - `docs/design-docs/README.md` 18 + - `docs/references/README.md` 19 + - `docs/exec-plans/README.md`
+3
docs/product-specs/README.md
··· 1 + # Product Specs Index 2 + 3 + - `mill-v0-product-spec.md` — Sections 1–7 from SPEC (product definition, constraints, CLI, run model, config, discovery).
+226
docs/product-specs/mill-v0-product-spec.md
··· 1 + # mill v0 Product Spec (Sections 1–7) 2 + 3 + _Source: `SPEC.md` (verbatim split for cedar-style docs tree)._ 4 + 5 + ## 1) Product definition 6 + 7 + `mill` is a runtime for executing TypeScript orchestration programs that spawn and coordinate AI agents. 8 + 9 + A mill program is regular TS (sequential with `await`, parallel with `Promise.all`), with one injected global API: 10 + 11 + - `mill.spawn(...)` (core) 12 + - extension-contributed APIs (optional) 13 + 14 + `mill` stores orchestration state and structured run events. Agent conversations remain owned by each agent tool; mill keeps `sessionRef` pointers. 15 + 16 + ## 2) Hard constraints 17 + 18 + 1. **Effect is the only execution system** 19 + - No `async/await` in core runtime modules. 20 + - No raw `Promise` construction. 21 + - No `try/catch` control flow (except inside Effect wrappers where required by external APIs). 22 + 2. **Process execution through Effect platform abstractions** 23 + - Drivers use Effect `Command` / process services. 24 + - On Bun, these are provided by `@effect/platform-bun` (Bun-backed runtime under the hood). 25 + 3. **Minimal CLI surface** 26 + - No `spec` or `template` subcommands in v0. 27 + 4. **Async-by-default runs** 28 + - `mill run <program.ts>` returns `runId` immediately unless `--sync` is passed. 29 + 5. **Drivers are generic infra adapters** 30 + - No vendor-specific driver concepts in core contracts. 31 + - Vendor specifics belong in codecs and config. 32 + 6. **Boundary clarity is mandatory** 33 + - `src/public/**` / `*.api.ts`: user-facing Promise + interface contracts. 34 + - `src/internal/**`, `src/domain/**`, `src/runtime/**`: Effect contracts + Schema domain models. 35 + - Internal interfaces are capability-only (method signatures), never domain shape definitions. 36 + - The boundary must be visible in filenames and enforced via ast-grep. 37 + 7. **Promise bridge is explicit and singular** 38 + - Only `Runtime.runPromise` is allowed as the Effect→Promise bridge. 39 + - It is allowed only at public boundary adapters (`src/public/**`, CLI entry adapters). 40 + - `Effect.runPromise*` and `Runtime.runPromiseExit` are disallowed. 41 + 8. **No shell-string command execution** 42 + - Drivers must construct commands as argument vectors (`Command.make(cmd, ...args)`). 43 + - Shell-eval patterns (`sh -lc`, `bash -lc`, interpolated command strings) are disallowed. 44 + 9. **Environment access is centralized** 45 + - `process.env` reads are allowed only in config/bootstrap loading modules. 46 + - Internal runtime logic receives resolved values via services/config objects. 47 + 10. **Time/random are injected** 48 + 49 + - `Date.now()` and `Math.random()` are disallowed in runtime/domain internals. 50 + - Use injected Effect services (`Clock`, `Random`) instead. 51 + 52 + 11. **Internal module boundaries are strict** 53 + 54 + - Public modules must not import from `src/internal/**` directly. 55 + - Package exports expose only public API entrypoints. 56 + 57 + 12. **Terminal state is single-shot** 58 + 59 + - Each run/spawn emits exactly one terminal event (`complete` | `failed` | `cancelled`). 60 + - Terminal states are immutable and idempotent. 61 + 62 + ## 3) CLI surface (v0) 63 + 64 + ```bash 65 + mill run <program.ts> [--json] [--sync] [--driver <name>] [--executor <name>] [--confirm=false] 66 + mill status <runId> [--json] 67 + mill wait <runId> --timeout <seconds> [--json] 68 + mill watch <runId> [--json] [--raw] 69 + mill ls [--json] [--status <status>] 70 + mill inspect <runId>[.<spawnId>] [--json] [--session] 71 + mill cancel <runId> [--json] 72 + mill init 73 + ``` 74 + 75 + Discovery (for humans and agents): 76 + 77 + - `mill` (no subcommand): concise discovery card 78 + - `mill --help`: help text + authoring guidance 79 + - `mill --help --json`: machine-readable discovery payload 80 + 81 + No other commands in v0. 82 + 83 + ### 3.1 Output mode contract 84 + 85 + - `--json` mode: 86 + - `stdout` is machine-readable only (JSON for single response, JSONL for streams like `watch`). 87 + - human-friendly diagnostics/progress may be emitted on `stderr`. 88 + - non-`--json` mode: 89 + - human output on `stdout` is expected. 90 + - `--json` payloads may include `summaryHuman` fields for agent readability without breaking parsers. 91 + 92 + ## 4) Runtime topology 93 + 94 + ```text 95 + mill program (TS) 96 + -> executor (direct | vm) 97 + -> engine (run lifecycle, API injection, events, persistence) 98 + -> driver (generic) 99 + -> agent process / remote endpoint 100 + 101 + engine events -> watch/inspect/tui/automation 102 + ``` 103 + 104 + All layers are orthogonal: 105 + 106 + - Executor = where program runs 107 + - Driver = how spawns invoke agents 108 + - Extension = hooks + extra API 109 + - Observer = event consumer 110 + 111 + ## 5) Run model 112 + 113 + ### 5.1 Async default 114 + 115 + `mill run` flow (default): 116 + 117 + 1. Resolve config 118 + 2. Validate program path 119 + 3. Optional interactive confirmation 120 + 4. Allocate `runId`, create run directory, write initial metadata 121 + 5. Start detached worker process 122 + 6. Return immediately (`runId`, `status=running`, paths) 123 + 124 + `--sync` blocks until completion (implemented as submit + wait internally). 125 + 126 + ### 5.2 Run state machine 127 + 128 + ```text 129 + pending -> running -> complete 130 + -> failed 131 + -> cancelled 132 + ``` 133 + 134 + ### 5.3 Storage layout 135 + 136 + ```text 137 + ~/.mill/ 138 + runs/ 139 + <runId>/ 140 + run.json # run metadata snapshot 141 + events.ndjson # tier-1 structured events (append-only) 142 + result.json # final summarized result 143 + program.ts # copied execution input 144 + logs/ 145 + worker.log 146 + spawns/ 147 + <spawnId>.json # optional derived spawn summary 148 + ``` 149 + 150 + ## 6) Config contract (`mill.config.ts`) 151 + 152 + ```ts 153 + import { defineConfig } from "@mill/core"; 154 + 155 + export default defineConfig({ 156 + defaultDriver: "default", 157 + defaultModel: "openai/gpt-5.3-codex", 158 + defaultExecutor: "direct", 159 + 160 + drivers: { 161 + default: processDriver({ 162 + command: "pi", 163 + args: ["-p"], 164 + codec: piCodec(), 165 + env: {}, 166 + }), 167 + }, 168 + 169 + executors: { 170 + direct: directExecutor(), 171 + vm: vmExecutor({ runtime: "docker", image: "mill-sandbox:latest" }), 172 + }, 173 + 174 + authoring: { 175 + instructions: 176 + "Use systemPrompt for WHO and prompt for WHAT. Prefer cheaper models for search and stronger models for synthesis.", 177 + }, 178 + 179 + extensions: [ 180 + // optional 181 + ], 182 + }); 183 + ``` 184 + 185 + ### 6.1 Config resolution order 186 + 187 + 1. `./mill.config.ts` (cwd) 188 + 2. walk upward to repo root 189 + 3. `~/.mill/config.ts` 190 + 4. internal defaults 191 + 192 + ### 6.2 Environment resolution policy 193 + 194 + - Environment variables are read in config/bootstrap only. 195 + - Resolved env values are normalized into config/services and passed downward. 196 + - Runtime/domain modules must not read `process.env` directly. 197 + 198 + ## 7) Discovery contract (`mill --help --json`) 199 + 200 + `mill --help --json` MUST include enough info for an agent to author a program without extra docs: 201 + 202 + ```json 203 + { 204 + "discoveryVersion": 1, 205 + "programApi": { 206 + "spawnRequired": ["agent", "systemPrompt", "prompt"], 207 + "spawnOptional": ["model"], 208 + "resultFields": ["text", "sessionRef", "agent", "model", "driver", "exitCode", "stopReason"] 209 + }, 210 + "drivers": { 211 + "default": { 212 + "description": "Local process driver", 213 + "modelFormat": "provider/model-id", 214 + "models": ["openai/gpt-5.3-codex", "anthropic/claude-sonnet-4-6"] 215 + } 216 + }, 217 + "authoring": { 218 + "instructions": "...from config..." 219 + }, 220 + "async": { 221 + "submit": "mill run <program.ts> --json", 222 + "status": "mill status <runId> --json", 223 + "wait": "mill wait <runId> --timeout 30 --json" 224 + } 225 + } 226 + ```
+3
docs/references/README.md
··· 1 + # References Index 2 + 3 + - `mill-v0-toolchain-and-invariants.md` — Sections 19–23 from SPEC (toolchain, scripts, guardrails, invariants, non-goals, implementation order).
+190
docs/references/mill-v0-toolchain-and-invariants.md
··· 1 + # mill v0 Toolchain, Invariants, Non-goals, and Order (Sections 19–23) 2 + 3 + _Source: `SPEC.md` (verbatim split for cedar-style docs tree)._ 4 + 5 + ## 19) Constraint toolchain (cedar-style) 6 + 7 + This is mandatory for mill repo setup. 8 + 9 + ### 19.1 Tooling 10 + 11 + - `ast-grep` (structural guardrails) 12 + - `oxlint` (fast lint) 13 + - `oxfmt` (format) 14 + - `tsgo` (`@typescript/native-preview`) for typecheck 15 + - `bun test` for tests 16 + 17 + ### 19.2 Required files 18 + 19 + ```text 20 + .ast-grep/ 21 + sgconfig.yml 22 + rules/ 23 + no-any.yml 24 + no-as-unknown-as.yml 25 + no-bun-globals.yml 26 + no-date-now-outside-clock.yml 27 + no-dot-then.yml 28 + no-dynamic-import.yml 29 + no-effect-runpromise.yml 30 + no-interface-for-domain-models.yml 31 + no-interface-outside-public.yml 32 + no-json-parse-outside-codec.yml 33 + no-math-random-outside-random.yml 34 + no-node-imports.yml 35 + no-process-env-outside-config.yml 36 + no-promise-outside-public.yml 37 + no-public-import-internal.yml 38 + no-raw-promise.yml 39 + no-runtime-runpromise-outside-boundary.yml 40 + no-shell-string-command.yml 41 + no-stub-functions.yml 42 + no-throw.yml 43 + no-try-catch.yml 44 + tests/ 45 + *.test.yml 46 + .oxlintrc.json 47 + .oxfmtrc.json 48 + scripts/ 49 + check-exports.ts 50 + ``` 51 + 52 + `sgconfig.yml` pattern (cedar-style): 53 + 54 + ```yml 55 + ruleDirs: 56 + - .ast-grep/rules 57 + ``` 58 + 59 + ### 19.3 Required scripts 60 + 61 + ```json 62 + { 63 + "scripts": { 64 + "test": "bun test", 65 + "typecheck": "tsgo --noEmit", 66 + "lint": "oxlint .", 67 + "lint:fix": "oxlint . --fix", 68 + "lint:ast-grep:test": "ast-grep test --config .ast-grep/sgconfig.yml --skip-snapshot-tests", 69 + "lint:ast-grep": "ast-grep scan --config .ast-grep/sgconfig.yml src --error", 70 + "lint:effect": "ast-grep scan --config .ast-grep/sgconfig.yml src/internal src/domain src/runtime --error --filter 'no-(raw-promise|try-catch|throw|dot-then|any|bun-globals|node-imports|dynamic-import)'", 71 + "lint:boundary": "ast-grep scan --config .ast-grep/sgconfig.yml src --error --filter 'no-(interface-outside-public|promise-outside-public|interface-for-domain-models|effect-runpromise|runtime-runpromise-outside-boundary|public-import-internal)'", 72 + "lint:runtime-safety": "ast-grep scan --config .ast-grep/sgconfig.yml src/internal src/domain src/runtime --error --filter 'no-(json-parse-outside-codec|shell-string-command|process-env-outside-config|date-now-outside-clock|math-random-outside-random)'", 73 + "lint:exports": "bun run scripts/check-exports.ts", 74 + "format": "oxfmt . --write", 75 + "format:check": "oxfmt . --check", 76 + "check": "bun run lint:ast-grep:test && bun run lint:effect && bun run lint:boundary && bun run lint:runtime-safety && bun run lint:exports && bun run lint:ast-grep && bun run lint && bun run format:check && bun run typecheck && bun test" 77 + } 78 + } 79 + ``` 80 + 81 + ### 19.4 Baseline lint/format config 82 + 83 + `.oxlintrc.json`: 84 + 85 + ```json 86 + { 87 + "$schema": "./node_modules/oxlint/configuration_schema.json", 88 + "env": { "builtin": true }, 89 + "categories": { "correctness": "error" }, 90 + "ignorePatterns": ["node_modules", ".jj", "dist"] 91 + } 92 + ``` 93 + 94 + `.oxfmtrc.json`: 95 + 96 + ```json 97 + { 98 + "$schema": "./node_modules/oxfmt/configuration_schema.json", 99 + "ignorePatterns": ["node_modules", ".jj", "dist", "SPEC.md"] 100 + } 101 + ``` 102 + 103 + ### 19.5 Guardrail intent 104 + 105 + - ban direct Bun globals (`Bun.spawn`, `Bun.file`, etc.) in core runtime 106 + - ban direct `node:` imports in app modules 107 + - ban untyped throw/catch/promise patterns 108 + - enforce Effect-centric architecture and composability 109 + - enforce boundary policy: 110 + - `no-interface-for-domain-models`: domain entities must come from `Schema` 111 + - `no-interface-outside-public`: interfaces are allowed only in `src/public/**` and `*.d.ts` (plus explicit allowlist files like config declarations) 112 + - `no-promise-outside-public`: Promise-returning contracts are allowed only at user boundary files (`*.api.ts`, `src/public/**`) 113 + - `no-effect-runpromise`: ban `Effect.runPromise*` usage entirely 114 + - `no-runtime-runpromise-outside-boundary`: only `Runtime.runPromise` may bridge, and only in boundary adapters 115 + - `no-public-import-internal`: public API modules cannot import private internals directly 116 + - enforce parsing/process/runtime safety: 117 + - `no-json-parse-outside-codec`: restrict `JSON.parse` to decode modules and require Schema decode 118 + - `no-shell-string-command`: disallow shell-eval process invocation patterns 119 + - `no-process-env-outside-config`: restrict env reads to config/bootstrap 120 + - `no-date-now-outside-clock`: force injected clock usage 121 + - `no-math-random-outside-random`: force injected random service usage 122 + 123 + Practical exception policy: 124 + 125 + - internal service capability interfaces (method-only, Effect return types) are allowed in `*.service.ts` / `*.effect.ts` through explicit ast-grep rule allow patterns 126 + - any interface with data fields in `src/domain/**`, `src/internal/**`, `src/runtime/**` is a lint error 127 + - codec/schema files are allowlisted for parsing operations; all downstream modules consume decoded typed values 128 + 129 + ### 19.6 Required contract tests 130 + 131 + - `--json` mode contract tests: 132 + - stdout contains valid JSON/JSONL only 133 + - human-readable diagnostics are emitted to stderr only 134 + - lifecycle contract tests: 135 + - exactly one terminal event per run 136 + - exactly one terminal event per spawn 137 + - no terminal -> non-terminal transitions 138 + - duplicate terminal emissions are ignored or rejected deterministically 139 + 140 + ## 20) Invariants 141 + 142 + 1. Every run has append-only tier-1 event log. 143 + 2. Every spawn completion includes `sessionRef`. 144 + 3. Engine persists orchestration state only (not full transcript). 145 + 4. Public user APIs are Promise-based façades; internal APIs remain Effect-typed. 146 + 5. `--json` mode writes machine payloads to `stdout` only; human diagnostics go to `stderr`. 147 + 6. Each run/spawn emits exactly one terminal event and never transitions afterward. 148 + 7. All persisted tier-1 events include `schemaVersion` and decode via Schema unions. 149 + 8. `Runtime.runPromise` is the only permitted Effect→Promise bridge. 150 + 9. Runtime/domain internals do not read `process.env`, `Date.now()`, or `Math.random()` directly. 151 + 10. `mill run` returns immediately by default. 152 + 153 + ## 21) v0 non-goals 154 + 155 + - hosted control plane / multi-tenant server 156 + - built-in template subcommands 157 + - advanced workflow DSLs beyond plain TS 158 + - driver hot-swapping policies inside program logic 159 + 160 + ## 22) Implementation order 161 + 162 + 1. Core domain schemas + error model 163 + 2. RunStore + event append persistence 164 + 3. Generic process driver + one codec (pi or claude) 165 + 4. Engine submit/status/wait/watch/cancel 166 + 5. Worker process + detached `run` 167 + 6. `inspect` and `--session` bridge 168 + 7. Extension hooks 169 + 8. Guardrail toolchain + rules/tests 170 + 171 + ## 23) Canonical program example 172 + 173 + ```ts 174 + const scan = await mill.spawn({ 175 + agent: "scout", 176 + systemPrompt: "You are a code risk analyst. Prioritize highest-impact findings.", 177 + prompt: "Review src/auth and summarize top security and reliability risks.", 178 + model: "openai/gpt-5.3-codex", 179 + }); 180 + 181 + const synth = await mill.spawn({ 182 + agent: "synth", 183 + systemPrompt: "You turn findings into an execution-ready plan.", 184 + prompt: `Create a step-by-step remediation plan from this analysis:\n\n${scan.text}`, 185 + }); 186 + 187 + console.log(synth.text); 188 + ``` 189 + 190 + This remains plain TypeScript orchestration with `await` / `Promise.all` and no DSL.
+37
package.json
··· 1 + { 2 + "name": "mill", 3 + "private": true, 4 + "workspaces": [ 5 + "packages/*" 6 + ], 7 + "scripts": { 8 + "test": "bun test", 9 + "typecheck": "tsgo --noEmit", 10 + "lint": "oxlint .", 11 + "lint:fix": "oxlint . --fix", 12 + "lint:ast-grep:test": "ast-grep test --config .ast-grep/sgconfig.yml --test-dir .ast-grep/tests --skip-snapshot-tests", 13 + "lint:ast-grep": "ast-grep scan --config .ast-grep/sgconfig.yml packages/*/src --error", 14 + "lint:effect": "ast-grep scan --config .ast-grep/sgconfig.yml packages/*/src/internal packages/*/src/domain packages/*/src/runtime --error --filter 'no-(raw-promise|try-catch|throw|dot-then|any|bun-globals|node-imports|dynamic-import)'", 15 + "lint:boundary": "ast-grep scan --config .ast-grep/sgconfig.yml packages/*/src --error --filter 'no-(interface-outside-public|promise-outside-public|interface-for-domain-models|effect-runpromise|runtime-runpromise-outside-boundary|public-import-internal)'", 16 + "lint:runtime-safety": "ast-grep scan --config .ast-grep/sgconfig.yml packages/*/src/internal packages/*/src/domain packages/*/src/runtime --error --filter 'no-(json-parse-outside-codec|shell-string-command|process-env-outside-config|date-now-outside-clock|math-random-outside-random)'", 17 + "lint:exports": "bun run scripts/check-exports.ts", 18 + "format": "oxfmt . --write", 19 + "format:check": "oxfmt . --check", 20 + "check": "bun run lint:ast-grep:test && bun run lint:effect && bun run lint:boundary && bun run lint:runtime-safety && bun run lint:exports && bun run lint:ast-grep && bun run lint && bun run format:check && bun run typecheck && bun test" 21 + }, 22 + "dependencies": { 23 + "@effect/platform": "^0.94.5", 24 + "@effect/platform-bun": "^0.87.1", 25 + "@effect/schema": "^0.75.5", 26 + "effect": "^3.19.19" 27 + }, 28 + "devDependencies": { 29 + "@ast-grep/cli": "^0.39.6", 30 + "@typescript/native-preview": "latest", 31 + "oxfmt": "^0.26.0", 32 + "oxlint": "^1.18.0" 33 + }, 34 + "trustedDependencies": [ 35 + "@ast-grep/cli" 36 + ] 37 + }
+14
packages/cli/package.json
··· 1 + { 2 + "name": "@mill/cli", 3 + "version": "0.0.0", 4 + "bin": { 5 + "mill": "./src/bin/mill.ts" 6 + }, 7 + "type": "module", 8 + "exports": { 9 + ".": "./src/public/index.api.ts" 10 + }, 11 + "dependencies": { 12 + "@mill/core": "workspace:*" 13 + } 14 + }
+4
packages/cli/src/bin/mill.ts
··· 1 + import { runCli } from "../public/index.api"; 2 + 3 + const code = await runCli(process.argv.slice(2)); 4 + process.exit(code);
+15
packages/cli/src/public/index.api.test.ts
··· 1 + import { describe, expect, it, spyOn } from "bun:test"; 2 + import { runCli } from "./index.api"; 3 + 4 + describe("runCli", () => { 5 + it("prints discovery help in json mode", async () => { 6 + const logSpy = spyOn(console, "log").mockImplementation(() => {}); 7 + 8 + const code = await runCli(["--help", "--json"]); 9 + 10 + expect(code).toBe(0); 11 + expect(logSpy).toHaveBeenCalledTimes(1); 12 + 13 + logSpy.mockRestore(); 14 + }); 15 + });
+21
packages/cli/src/public/index.api.ts
··· 1 + import { createDiscoveryPayload } from "@mill/core"; 2 + 3 + export const runCli = async (argv: ReadonlyArray<string>): Promise<number> => { 4 + const showHelp = argv.length === 0 || argv.includes("--help"); 5 + 6 + if (showHelp) { 7 + const payload = await createDiscoveryPayload(); 8 + const output = argv.includes("--json") 9 + ? JSON.stringify(payload) 10 + : [ 11 + "mill — Effect-first orchestration runtime", 12 + "", 13 + "Run `mill --help --json` for machine-readable discovery.", 14 + ].join("\n"); 15 + console.log(output); 16 + return 0; 17 + } 18 + 19 + console.log("v0 scaffold: only help/discovery is wired in this foundation stage."); 20 + return 0; 21 + };
+9
packages/cli/tsconfig.json
··· 1 + { 2 + "extends": "../../tsconfig.base.json", 3 + "compilerOptions": { 4 + "composite": true, 5 + "rootDir": "src" 6 + }, 7 + "include": ["src"], 8 + "references": [{ "path": "../core" }] 9 + }
+8
packages/core/package.json
··· 1 + { 2 + "name": "@mill/core", 3 + "version": "0.0.0", 4 + "type": "module", 5 + "exports": { 6 + ".": "./src/public/index.api.ts" 7 + } 8 + }
+16
packages/core/src/domain/run.schema.ts
··· 1 + import * as Schema from "@effect/schema/Schema"; 2 + 3 + export const RunId = Schema.String.pipe(Schema.brand("RunId")); 4 + export type RunId = Schema.Schema.Type<typeof RunId>; 5 + 6 + export const SpawnId = Schema.String.pipe(Schema.brand("SpawnId")); 7 + export type SpawnId = Schema.Schema.Type<typeof SpawnId>; 8 + 9 + export const RunStatus = Schema.Literal("pending", "running", "complete", "failed", "cancelled"); 10 + export type RunStatus = Schema.Schema.Type<typeof RunStatus>; 11 + 12 + export const RunRecord = Schema.Struct({ 13 + id: RunId, 14 + status: RunStatus, 15 + }); 16 + export type RunRecord = Schema.Schema.Type<typeof RunRecord>;
+23
packages/core/src/domain/spawn.schema.ts
··· 1 + import * as Schema from "@effect/schema/Schema"; 2 + 3 + export const SpawnOptions = Schema.Struct({ 4 + agent: Schema.NonEmptyString, 5 + systemPrompt: Schema.NonEmptyString, 6 + prompt: Schema.NonEmptyString, 7 + model: Schema.optional(Schema.NonEmptyString), 8 + }); 9 + 10 + export type SpawnOptions = Schema.Schema.Type<typeof SpawnOptions>; 11 + 12 + export const SpawnResult = Schema.Struct({ 13 + text: Schema.String, 14 + sessionRef: Schema.NonEmptyString, 15 + agent: Schema.NonEmptyString, 16 + model: Schema.NonEmptyString, 17 + driver: Schema.NonEmptyString, 18 + exitCode: Schema.Number, 19 + stopReason: Schema.optional(Schema.String), 20 + errorMessage: Schema.optional(Schema.String), 21 + }); 22 + 23 + export type SpawnResult = Schema.Schema.Type<typeof SpawnResult>;
+38
packages/core/src/internal/engine.effect.ts
··· 1 + import { Data, Effect } from "effect"; 2 + import type { RunId, RunRecord } from "../domain/run.schema"; 3 + import type { SpawnOptions, SpawnResult } from "../domain/spawn.schema"; 4 + 5 + export class ConfigError extends Data.TaggedError("ConfigError")<{ message: string }> {} 6 + 7 + export class RunNotFoundError extends Data.TaggedError("RunNotFoundError")<{ runId: string }> {} 8 + 9 + export class ProgramExecutionError extends Data.TaggedError("ProgramExecutionError")<{ 10 + runId: string; 11 + message: string; 12 + }> {} 13 + 14 + export class PersistenceError extends Data.TaggedError("PersistenceError")<{ 15 + path: string; 16 + message: string; 17 + }> {} 18 + 19 + export interface MillEngine { 20 + readonly submit: ( 21 + input: SpawnOptions, 22 + ) => Effect.Effect<SpawnResult, ConfigError | PersistenceError | ProgramExecutionError>; 23 + readonly status: (runId: RunId) => Effect.Effect<RunRecord, RunNotFoundError | PersistenceError>; 24 + } 25 + 26 + const buildNoopResult = (input: SpawnOptions): SpawnResult => ({ 27 + text: `noop response for ${input.agent}`, 28 + sessionRef: "session/noop", 29 + agent: input.agent, 30 + model: input.model ?? "openai/gpt-5.3-codex", 31 + driver: "default", 32 + exitCode: 0, 33 + }); 34 + 35 + export const makeNoopMillEngine: Effect.Effect<MillEngine> = Effect.succeed({ 36 + submit: (input) => Effect.succeed(buildNoopResult(input)), 37 + status: () => Effect.fail(new RunNotFoundError({ runId: "missing" })), 38 + });
+12
packages/core/src/public/discovery.api.test.ts
··· 1 + import { describe, expect, it } from "bun:test"; 2 + import { createDiscoveryPayload } from "./discovery.api"; 3 + 4 + describe("createDiscoveryPayload", () => { 5 + it("returns discovery contract v1", async () => { 6 + const payload = await createDiscoveryPayload(); 7 + 8 + expect(payload.discoveryVersion).toBe(1); 9 + expect(payload.async.submit).toContain("mill run"); 10 + expect(payload.programApi.spawnRequired).toContain("agent"); 11 + }); 12 + });
+26
packages/core/src/public/discovery.api.ts
··· 1 + import type { DiscoveryPayload } from "./types"; 2 + 3 + export const createDiscoveryPayload = async (): Promise<DiscoveryPayload> => ({ 4 + discoveryVersion: 1, 5 + programApi: { 6 + spawnRequired: ["agent", "systemPrompt", "prompt"], 7 + spawnOptional: ["model"], 8 + resultFields: ["text", "sessionRef", "agent", "model", "driver", "exitCode", "stopReason"], 9 + }, 10 + drivers: { 11 + default: { 12 + description: "Local process driver", 13 + modelFormat: "provider/model-id", 14 + models: ["openai/gpt-5.3-codex", "anthropic/claude-sonnet-4-6"], 15 + }, 16 + }, 17 + authoring: { 18 + instructions: 19 + "Use systemPrompt for WHO and prompt for WHAT. Prefer cheaper models for search and stronger models for synthesis.", 20 + }, 21 + async: { 22 + submit: "mill run <program.ts> --json", 23 + status: "mill status <runId> --json", 24 + wait: "mill wait <runId> --timeout 30 --json", 25 + }, 26 + });
+3
packages/core/src/public/index.api.ts
··· 1 + export * from "./mill.api"; 2 + export * from "./discovery.api"; 3 + export * from "./types";
+18
packages/core/src/public/mill.api.test.ts
··· 1 + import { describe, expect, it } from "bun:test"; 2 + import { createMill } from "./mill.api"; 3 + 4 + describe("createMill", () => { 5 + it("returns a Promise-based mill API backed by Effect core", async () => { 6 + const mill = await createMill(); 7 + 8 + const result = await mill.spawn({ 9 + agent: "scout", 10 + systemPrompt: "You are concise.", 11 + prompt: "Say hello", 12 + }); 13 + 14 + expect(result.driver).toBe("default"); 15 + expect(result.sessionRef).toBe("session/noop"); 16 + expect(result.exitCode).toBe(0); 17 + }); 18 + });
+21
packages/core/src/public/mill.api.ts
··· 1 + import { Effect, Runtime } from "effect"; 2 + import type { Mill, SpawnInput, SpawnOutput } from "./types"; 3 + 4 + const runtime = Runtime.defaultRuntime; 5 + 6 + const buildSpawnOutput = (input: SpawnInput): SpawnOutput => ({ 7 + text: `noop response for ${input.agent}`, 8 + sessionRef: "session/noop", 9 + agent: input.agent, 10 + model: input.model ?? "openai/gpt-5.3-codex", 11 + driver: "default", 12 + exitCode: 0, 13 + }); 14 + 15 + export const createMill = (): Promise<Mill> => 16 + Runtime.runPromise(runtime)( 17 + Effect.succeed({ 18 + spawn: (input: SpawnInput) => 19 + Runtime.runPromise(runtime)(Effect.succeed(buildSpawnOutput(input))), 20 + }), 21 + );
+54
packages/core/src/public/types.ts
··· 1 + export interface SpawnInput { 2 + readonly agent: string; 3 + readonly systemPrompt: string; 4 + readonly prompt: string; 5 + readonly model?: string; 6 + } 7 + 8 + export interface SpawnOutput { 9 + readonly text: string; 10 + readonly sessionRef: string; 11 + readonly agent: string; 12 + readonly model: string; 13 + readonly driver: string; 14 + readonly exitCode: number; 15 + readonly stopReason?: string; 16 + readonly errorMessage?: string; 17 + } 18 + 19 + export interface Mill { 20 + spawn(input: SpawnInput): Promise<SpawnOutput>; 21 + } 22 + 23 + export interface DriverProcessConfig { 24 + readonly command: string; 25 + readonly args: ReadonlyArray<string>; 26 + readonly env?: Readonly<Record<string, string>>; 27 + } 28 + 29 + export interface DiscoveryPayload { 30 + readonly discoveryVersion: number; 31 + readonly programApi: { 32 + readonly spawnRequired: ReadonlyArray<string>; 33 + readonly spawnOptional: ReadonlyArray<string>; 34 + readonly resultFields: ReadonlyArray<string>; 35 + }; 36 + readonly drivers: Readonly< 37 + Record< 38 + string, 39 + { 40 + readonly description: string; 41 + readonly modelFormat: string; 42 + readonly models: ReadonlyArray<string>; 43 + } 44 + > 45 + >; 46 + readonly authoring: { 47 + readonly instructions: string; 48 + }; 49 + readonly async: { 50 + readonly submit: string; 51 + readonly status: string; 52 + readonly wait: string; 53 + }; 54 + }
+11
packages/core/src/runtime/worker.effect.ts
··· 1 + import { Effect } from "effect"; 2 + import type { MillEngine } from "../internal/engine.effect"; 3 + import type { SpawnOptions, SpawnResult } from "../domain/spawn.schema"; 4 + 5 + export interface WorkerInput { 6 + readonly engine: MillEngine; 7 + readonly spawn: SpawnOptions; 8 + } 9 + 10 + export const runWorker = (input: WorkerInput): Effect.Effect<SpawnResult> => 11 + input.engine.submit(input.spawn);
+8
packages/core/tsconfig.json
··· 1 + { 2 + "extends": "../../tsconfig.base.json", 3 + "compilerOptions": { 4 + "composite": true, 5 + "rootDir": "src" 6 + }, 7 + "include": ["src"] 8 + }
+11
packages/driver-claude/package.json
··· 1 + { 2 + "name": "@mill/driver-claude", 3 + "version": "0.0.0", 4 + "type": "module", 5 + "exports": { 6 + ".": "./src/public/index.api.ts" 7 + }, 8 + "dependencies": { 9 + "@mill/core": "workspace:*" 10 + } 11 + }
+7
packages/driver-claude/src/public/index.api.ts
··· 1 + import type { DriverProcessConfig } from "@mill/core"; 2 + 3 + export const createClaudeDriverConfig = (): DriverProcessConfig => ({ 4 + command: "claude", 5 + args: [], 6 + env: {}, 7 + });
+9
packages/driver-claude/tsconfig.json
··· 1 + { 2 + "extends": "../../tsconfig.base.json", 3 + "compilerOptions": { 4 + "composite": true, 5 + "rootDir": "src" 6 + }, 7 + "include": ["src"], 8 + "references": [{ "path": "../core" }] 9 + }
+11
packages/driver-codex/package.json
··· 1 + { 2 + "name": "@mill/driver-codex", 3 + "version": "0.0.0", 4 + "type": "module", 5 + "exports": { 6 + ".": "./src/public/index.api.ts" 7 + }, 8 + "dependencies": { 9 + "@mill/core": "workspace:*" 10 + } 11 + }
+7
packages/driver-codex/src/public/index.api.ts
··· 1 + import type { DriverProcessConfig } from "@mill/core"; 2 + 3 + export const createCodexDriverConfig = (): DriverProcessConfig => ({ 4 + command: "codex", 5 + args: [], 6 + env: {}, 7 + });
+9
packages/driver-codex/tsconfig.json
··· 1 + { 2 + "extends": "../../tsconfig.base.json", 3 + "compilerOptions": { 4 + "composite": true, 5 + "rootDir": "src" 6 + }, 7 + "include": ["src"], 8 + "references": [{ "path": "../core" }] 9 + }
+11
packages/driver-pi/package.json
··· 1 + { 2 + "name": "@mill/driver-pi", 3 + "version": "0.0.0", 4 + "type": "module", 5 + "exports": { 6 + ".": "./src/public/index.api.ts" 7 + }, 8 + "dependencies": { 9 + "@mill/core": "workspace:*" 10 + } 11 + }
+7
packages/driver-pi/src/public/index.api.ts
··· 1 + import type { DriverProcessConfig } from "@mill/core"; 2 + 3 + export const createPiDriverConfig = (): DriverProcessConfig => ({ 4 + command: "pi", 5 + args: ["-p"], 6 + env: {}, 7 + });
+9
packages/driver-pi/tsconfig.json
··· 1 + { 2 + "extends": "../../tsconfig.base.json", 3 + "compilerOptions": { 4 + "composite": true, 5 + "rootDir": "src" 6 + }, 7 + "include": ["src"], 8 + "references": [{ "path": "../core" }] 9 + }
+42
scripts/check-exports.ts
··· 1 + const normalizeExportEntries = (value: unknown): Array<string> => { 2 + if (typeof value === "string") { 3 + return [value]; 4 + } 5 + 6 + if (typeof value === "object" && value !== null) { 7 + return Object.values(value).flatMap((entry) => normalizeExportEntries(entry)); 8 + } 9 + 10 + return []; 11 + }; 12 + 13 + const run = async (): Promise<void> => { 14 + const exportViolations: Array<string> = []; 15 + 16 + for await (const path of new Bun.Glob("packages/*/package.json").scan(".")) { 17 + const packageJson = await Bun.file(path).json(); 18 + const exportsField = packageJson.exports as unknown; 19 + const exportPaths = normalizeExportEntries(exportsField); 20 + const invalidPaths = exportPaths.filter( 21 + (entry) => 22 + /\/src\/(internal|runtime|domain)\//.test(entry) || 23 + /\/(internal|runtime|domain)\//.test(entry), 24 + ); 25 + 26 + if (invalidPaths.length > 0) { 27 + exportViolations.push(`${packageJson.name}: ${invalidPaths.join(", ")}`); 28 + } 29 + } 30 + 31 + if (exportViolations.length > 0) { 32 + console.error("Invalid package exports detected:"); 33 + for (const violation of exportViolations) { 34 + console.error(`- ${violation}`); 35 + } 36 + process.exit(1); 37 + } 38 + 39 + console.log("Package export boundary check passed."); 40 + }; 41 + 42 + void run();
+14
tsconfig.base.json
··· 1 + { 2 + "compilerOptions": { 3 + "target": "ES2023", 4 + "module": "ESNext", 5 + "moduleResolution": "Bundler", 6 + "lib": ["ES2023"], 7 + "strict": true, 8 + "skipLibCheck": true, 9 + "allowSyntheticDefaultImports": true, 10 + "esModuleInterop": true, 11 + "noEmit": true, 12 + "types": ["bun"] 13 + } 14 + }
+11
tsconfig.json
··· 1 + { 2 + "extends": "./tsconfig.base.json", 3 + "files": [], 4 + "references": [ 5 + { "path": "./packages/core" }, 6 + { "path": "./packages/cli" }, 7 + { "path": "./packages/driver-pi" }, 8 + { "path": "./packages/driver-claude" }, 9 + { "path": "./packages/driver-codex" } 10 + ] 11 + }