Skip to content

Commit 8b8f171

Browse files
committed
chore(gates): retarget ownership tables to the moved command-runtime contracts
Delete the moved modules' ROOT_MODULE_ZONES rows (command-runtime keeps src/io.ts and src/runtime.ts), pin the contracts exports snapshot for the five new subpaths (generate-contracts-exports-snapshot.ts), refresh the root-module and tracked-sources path examples, drop the retired src/runtime.ts re-export suppressions from .fallowrc, and drop the retired src/backend*.ts clause from ADR 0019's not-migration-target list.
1 parent 639efc0 commit 8b8f171

7 files changed

Lines changed: 35 additions & 20 deletions

File tree

‎.fallowrc.json‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@
287287
"exports": ["applyRuntimeHintValues", "clearRuntimeHintValues"]
288288
},
289289
{
290-
// createAgentDevice and localCommandPolicy are consumed by the lazy imports in src/cli/commands/{recording,screenshot}.ts; Fallow cannot connect the dynamic member reads.
290+
// createAgentDevice is consumed by the lazy imports in src/cli/commands/{recording,screenshot}.ts; Fallow cannot connect the dynamic member reads.
291291
"file": "src/runtime.ts",
292-
"exports": ["createAgentDevice", "localCommandPolicy"]
292+
"exports": ["createAgentDevice"]
293293
},
294294
{
295295
// The contracts snapshot façade must re-export every symbol of ../snapshot-scope.ts (scripts/layering/package-boundaries.test.ts, façade exhaustiveness); callers import it from @agent-device/contracts/snapshot-scope, so the façade copy has no consumer.
@@ -591,11 +591,6 @@
591591
"summarizeAgentBrowserProcesses",
592592
"summarizeManagedAgentBrowserProcesses"
593593
]
594-
},
595-
{
596-
// src/runtime.ts keeps its published type surface while its implementation moves to src/command-runtime/runtime-factory.ts (#2540, #3294). These two re-exports have no in-repo consumer; they stay so the module's exported shape is unchanged.
597-
"file": "src/runtime.ts",
598-
"exports": ["CommandPolicy", "CommandSessionRecord"]
599594
}
600595
],
601596
"usedClassMembers": [

‎docs/adr/0019-request-bound-platform-runtime.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,8 +959,8 @@ anchor, not as a proposed commitment.
959959
`packages/provider-limrun/src/`; these root files are the composition-time wiring, comparable in
960960
role to `src/platform-runtime.ts` itself.
961961
- `src/core` (R13-governed consumer seams), `src/commands`, `src/cli`, `src/cli-schema`,
962-
`src/mcp`, `src/client`, `src/sdk`, `src/ai-sdk`, `src/remote`, `src/request`, `src/metro`,
963-
`src/backend*.ts`. Not migration targets: these are command-surface, protocol-projection, and
962+
`src/mcp`, `src/client`, `src/sdk`, `src/ai-sdk`, `src/remote`, `src/request`, `src/metro`.
963+
Not migration targets: these are command-surface, protocol-projection, and
964964
daemon-owned zones this ADR keeps in `src/` by design, not residue awaiting a package.
965965

966966
Neither number has an owning issue, gate, or accepted budget yet. Treat both as inputs to a

‎packages/contracts/package.json‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@
8484
"types": "./src/application-lifecycle-runtime-plan.ts",
8585
"default": "./src/application-lifecycle-runtime-plan.ts"
8686
},
87+
"./artifact-adapter": {
88+
"types": "./src/artifact-adapter.ts",
89+
"default": "./src/artifact-adapter.ts"
90+
},
8791
"./async-lifecycle": {
8892
"types": "./src/async-lifecycle.ts",
8993
"default": "./src/async-lifecycle.ts"
@@ -116,10 +120,18 @@
116120
"types": "./src/back-runtime.ts",
117121
"default": "./src/back-runtime.ts"
118122
},
123+
"./backend": {
124+
"types": "./src/backend.ts",
125+
"default": "./src/backend.ts"
126+
},
119127
"./backend-diagnostics": {
120128
"types": "./src/backend-diagnostics.ts",
121129
"default": "./src/backend-diagnostics.ts"
122130
},
131+
"./backend-snapshot-options": {
132+
"types": "./src/backend-snapshot-options.ts",
133+
"default": "./src/backend-snapshot-options.ts"
134+
},
123135
"./boot-failure": {
124136
"types": "./src/boot-failure.ts",
125137
"default": "./src/boot-failure.ts"
@@ -152,6 +164,10 @@
152164
"types": "./src/command-platform-execution.ts",
153165
"default": "./src/command-platform-execution.ts"
154166
},
167+
"./command-policy": {
168+
"types": "./src/command-policy.ts",
169+
"default": "./src/command-policy.ts"
170+
},
155171
"./daemon-http": {
156172
"types": "./src/daemon-http.ts",
157173
"default": "./src/daemon-http.ts"
@@ -356,6 +372,10 @@
356372
"types": "./src/platform-runtime-unavailable.ts",
357373
"default": "./src/platform-runtime-unavailable.ts"
358374
},
375+
"./runtime-contract": {
376+
"types": "./src/runtime-contract.ts",
377+
"default": "./src/runtime-contract.ts"
378+
},
359379
"./runtime-contract-error": {
360380
"types": "./src/runtime-contract-error.ts",
361381
"default": "./src/runtime-contract-error.ts"

‎scripts/layering/contracts-exports.snapshot.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@agent-device/contracts/application-lifecycle-interaction",
1919
"@agent-device/contracts/application-lifecycle-runtime",
2020
"@agent-device/contracts/application-lifecycle-runtime-plan",
21+
"@agent-device/contracts/artifact-adapter",
2122
"@agent-device/contracts/async-lifecycle",
2223
"@agent-device/contracts/audio-probe-result",
2324
"@agent-device/contracts/audio-probe-runtime",
@@ -26,7 +27,9 @@
2627
"@agent-device/contracts/audio-runtime-plan",
2728
"@agent-device/contracts/back-mode",
2829
"@agent-device/contracts/back-runtime",
30+
"@agent-device/contracts/backend",
2931
"@agent-device/contracts/backend-diagnostics",
32+
"@agent-device/contracts/backend-snapshot-options",
3033
"@agent-device/contracts/boot-failure",
3134
"@agent-device/contracts/capture",
3235
"@agent-device/contracts/click-button",
@@ -35,6 +38,7 @@
3538
"@agent-device/contracts/clipboard-runtime",
3639
"@agent-device/contracts/command",
3740
"@agent-device/contracts/command-platform-execution",
41+
"@agent-device/contracts/command-policy",
3842
"@agent-device/contracts/daemon-http",
3943
"@agent-device/contracts/device",
4044
"@agent-device/contracts/device-boot",
@@ -97,6 +101,7 @@
97101
"@agent-device/contracts/remote",
98102
"@agent-device/contracts/replay",
99103
"@agent-device/contracts/runner-lease-context",
104+
"@agent-device/contracts/runtime-contract",
100105
"@agent-device/contracts/runtime-contract-error",
101106
"@agent-device/contracts/runtime-operation-names",
102107
"@agent-device/contracts/screen-capture-contract",

‎scripts/layering/model.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ test('every production zone is deliberately classified as ranked or unranked', (
548548

549549
test('listSourceFiles includes root-level src/*.ts production files', () => {
550550
const files = new Set(listSourceFiles());
551-
for (const rootFile of ['src/cli.ts', 'src/runtime.ts', 'src/backend.ts']) {
551+
for (const rootFile of ['src/cli.ts', 'src/runtime.ts', 'src/io.ts']) {
552552
assert.ok(files.has(rootFile), `expected ${rootFile} in analyzed source files`);
553553
}
554554
assert.ok(![...files].some((file) => file.endsWith('.test.ts')));

‎scripts/layering/root-module-zones.ts‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,10 @@ export const ROOT_MODULE_ZONES: Readonly<Record<string, readonly string[]>> = {
3434
'src/request-progress-protocol.ts',
3535
'src/session-repair-tombstone.ts',
3636
],
37-
// The in-process command runtime: the backend and artifact contracts it drives and the
38-
// assemblies that bind command families onto it. The daemon executes commands through it.
39-
'command-runtime': [
40-
'src/backend-snapshot-options.ts',
41-
'src/backend.ts',
42-
'src/io.ts',
43-
'src/runtime-contract.ts',
44-
'src/runtime.ts',
45-
],
37+
// The in-process command runtime: the local artifact-adapter implementation and the assembly
38+
// that binds command families onto it. The backend and runtime contracts it drives moved to
39+
// @agent-device/contracts, so the daemon reads that vocabulary from below the daemon.
40+
'command-runtime': ['src/io.ts', 'src/runtime.ts'],
4641
// The platform composition the daemon, CLI and SDK import eagerly. It shares the zone with its
4742
// private `src/platform-runtime/` submodule.
4843
'platform-runtime': [

‎scripts/layering/tracked-sources.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import { execFileSync } from 'node:child_process';
2121

2222
// `src/**/*.ts` only matches NESTED files, so root-level `src/*.ts` (src/cli.ts,
23-
// src/backend.ts) needs its own pathspec or it silently drops out of every scan.
23+
// src/io.ts) needs its own pathspec or it silently drops out of every scan.
2424
// Workspace package sources are production files too (#1490 W0).
2525
const TRACKED_SOURCE_PATHSPECS = [
2626
'src/*.ts',

0 commit comments

Comments
 (0)