Skip to content

Commit 2e2b9af

Browse files
authored
chore: drop hosted runtime entrypoints (#448)
1 parent 5375008 commit 2e2b9af

28 files changed

Lines changed: 128 additions & 2643 deletions

COMMAND_OWNERSHIP.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Command Ownership Inventory
22

3-
This inventory keeps the public boundary stable while command semantics move into
4-
the runtime layer. New integrations should prefer the runtime, backend, and IO
5-
interfaces over helper subpaths.
3+
This inventory tracks the internal command-runtime ownership used by daemon and
4+
CLI compatibility shims. New Node integrations should use the typed client and
5+
the remaining helper subpaths documented in `website/docs/docs/client-api.md`.
66

77
## Portable Command Runtime
88

99
These commands describe device, app, capture, selector, or interaction behavior.
10-
Their semantics should live in `agent-device/commands` as they migrate.
10+
Their semantics live in internal runtime modules under `src/commands`.
1111

1212
- `alert`
1313
- `app-switcher`
@@ -104,26 +104,27 @@ Their semantics should live in `agent-device/commands` as they migrate.
104104
sources and local path policy enforcement.
105105
- `install-from-source`: runtime `admin.installFromSource` implemented with the
106106
same structured source resolver used by install/reinstall.
107-
- `batch`: runtime router command implemented; nested steps are dispatched
108-
through `createCommandRouter()` so policy and error formatting run per step.
109-
- `record`: runtime `record` router/API command implemented with typed record
107+
- `batch`: daemon-owned; nested steps are dispatched through the daemon command
108+
handler so existing session semantics and error formatting are preserved.
109+
- `record`: runtime `recording.record` command implemented with typed record
110110
start/stop result unions.
111-
- `trace`: runtime `trace` router/API command implemented with typed trace
111+
- `trace`: runtime `recording.trace` command implemented with typed trace
112112
start/stop result unions.
113113
- `logs`: runtime `diagnostics.logs` implemented with bounded, paginated,
114114
best-effort redacted log entries.
115115
- `network`: runtime `diagnostics.network` implemented with bounded,
116116
structured, best-effort redacted network entries.
117117
- `perf`: runtime `diagnostics.perf` implemented with typed metric entries.
118-
- `replay`: still daemon/CLI owned; runtime router migration is deferred until
119-
it can reuse the real `.ad` parser and healing semantics.
120-
- `test`: still daemon/CLI owned; runtime router migration is deferred until it
121-
can share daemon replay-suite semantics end to end.
118+
- `replay`: daemon/CLI owned so it can reuse the real `.ad` parser and healing
119+
semantics.
120+
- `test`: daemon/CLI owned so it can share daemon replay-suite semantics end to
121+
end.
122122

123123
## Boundary Requirements
124124

125-
- Public command APIs expose only implemented commands. Planned commands belong
126-
in `commandCatalog`, not as methods that throw at runtime.
125+
- Public Node APIs expose only supported client/helper surfaces from
126+
`package.json` exports. Do not add command-runtime modules back as public
127+
subpaths without an explicit API decision.
127128
- Runtime services default to `restrictedCommandPolicy()`. Local input and
128129
output paths require an explicit local policy or adapter decision.
129130
- File inputs and outputs cross the runtime boundary through `agent-device/io`
@@ -139,8 +140,8 @@ Their semantics should live in `agent-device/commands` as they migrate.
139140
- Runtime command modules should depend on shared `src/utils/*` helpers, not
140141
daemon-only modules. Keep daemon paths as compatibility shims when older
141142
handlers still import them.
142-
- New backend adapters should run `agent-device/testing/conformance` suites for
143-
the command families they claim to support.
143+
- New backend/runtime work should add focused behavioral tests for the command
144+
families it touches.
144145

145146
## Backend And Admin Capabilities
146147

@@ -183,6 +184,10 @@ bounded result windows and backend-specific support.
183184
These subpaths remain available during migration, but they should not be the
184185
primary boundary for new command behavior:
185186

187+
- `agent-device/io`
188+
- `agent-device/artifacts`
189+
- `agent-device/metro`
190+
- `agent-device/remote-config`
186191
- `agent-device/contracts`
187192
- `agent-device/selectors`
188193
- `agent-device/finders`

bin/agent-device.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import { dirname, join } from 'node:path';
44
import { fileURLToPath, pathToFileURL } from 'node:url';
55

66
const here = dirname(fileURLToPath(import.meta.url));
7-
const distPath = join(here, '..', 'dist', 'src', 'bin.js');
7+
const distPaths = [
8+
join(here, '..', 'dist', 'src', 'internal', 'bin.js'),
9+
join(here, '..', 'dist', 'src', 'bin.js'),
10+
];
11+
const distPath = distPaths.find((candidate) => existsSync(candidate));
812

9-
if (!existsSync(distPath)) {
13+
if (!distPath) {
1014
process.stderr.write('Missing dist build. Run `pnpm build` before using the binary.\n');
1115
process.exit(1);
1216
}

package.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,14 @@
2020
"import": "./dist/src/index.js",
2121
"types": "./dist/src/index.d.ts"
2222
},
23-
"./commands": {
24-
"import": "./dist/src/commands/index.js",
25-
"types": "./dist/src/commands/index.d.ts"
26-
},
27-
"./backend": {
28-
"import": "./dist/src/backend.js",
29-
"types": "./dist/src/backend.d.ts"
30-
},
3123
"./io": {
3224
"import": "./dist/src/io.js",
3325
"types": "./dist/src/io.d.ts"
3426
},
35-
"./testing/conformance": {
36-
"import": "./dist/src/testing/conformance.js",
37-
"types": "./dist/src/testing/conformance.d.ts"
38-
},
3927
"./artifacts": {
4028
"import": "./dist/src/artifacts.js",
4129
"types": "./dist/src/artifacts.d.ts"
4230
},
43-
"./observability": {
44-
"import": "./dist/src/observability.js",
45-
"types": "./dist/src/observability.d.ts"
46-
},
4731
"./metro": {
4832
"import": "./dist/src/metro.js",
4933
"types": "./dist/src/metro.d.ts"

rslib.config.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,19 @@ export default defineConfig({
1717
source: {
1818
entry: {
1919
index: 'src/index.ts',
20-
'commands/index': 'src/commands/index.ts',
21-
backend: 'src/backend.ts',
2220
io: 'src/io.ts',
23-
'testing/conformance': 'src/testing/conformance.ts',
2421
artifacts: 'src/artifacts.ts',
25-
observability: 'src/observability.ts',
2622
metro: 'src/metro.ts',
2723
'remote-config': 'src/remote-config.ts',
2824
'install-source': 'src/install-source.ts',
2925
'android-apps': 'src/android-apps.ts',
3026
contracts: 'src/contracts.ts',
3127
selectors: 'src/selectors.ts',
3228
finders: 'src/finders.ts',
33-
bin: 'src/bin.ts',
34-
'companion-tunnel': 'src/companion-tunnel.ts',
35-
daemon: 'src/daemon.ts',
36-
'update-check-entry': 'src/utils/update-check-entry.ts',
29+
'internal/bin': 'src/bin.ts',
30+
'internal/companion-tunnel': 'src/companion-tunnel.ts',
31+
'internal/daemon': 'src/daemon.ts',
32+
'internal/update-check-entry': 'src/utils/update-check-entry.ts',
3733
},
3834
tsconfigPath: 'tsconfig.lib.json',
3935
},

src/__tests__/observability.test.ts

Lines changed: 0 additions & 156 deletions
This file was deleted.

0 commit comments

Comments
 (0)