super-dsh 0.1.6 → 0.1.10-e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -3
- package/agent-agy/cordis.patch.yml +7 -4
- package/agent-agy/dist/agent.d.ts +12 -11
- package/agent-agy/dist/agy-auth-gateway.d.ts +124 -0
- package/agent-agy/dist/agy-auth-gateway.js +233 -0
- package/agent-agy/dist/agy-auth.d.ts +153 -0
- package/agent-agy/dist/agy-auth.js +179 -0
- package/agent-agy/dist/agy-cli-client.d.ts +39 -9
- package/agent-agy/dist/agy-cli-client.js +82 -18
- package/agent-agy/dist/agy-store.d.ts +8 -0
- package/agent-agy/dist/index.d.ts +46 -16
- package/agent-agy/dist/index.js +82 -56
- package/agent-agy/dist/models.d.ts +70 -0
- package/agent-agy/dist/models.js +102 -3
- package/agent-agy/package.json +7 -5
- package/agent-agy-sdk/cordis.patch.yml +58 -0
- package/agent-agy-sdk/dist/adapter.d.ts +15 -0
- package/agent-agy-sdk/dist/adapter.js +42 -0
- package/agent-agy-sdk/dist/agent-preset-agy.d.ts +27 -0
- package/agent-agy-sdk/dist/agent-preset-agy.js +32 -0
- package/agent-agy-sdk/dist/agent.d.ts +138 -0
- package/agent-agy-sdk/dist/agent.js +494 -0
- package/{agent-agy → agent-agy-sdk}/dist/agy-client.d.ts +26 -6
- package/{agent-agy → agent-agy-sdk}/dist/agy-client.js +43 -25
- package/agent-agy-sdk/dist/agy-sessions.d.ts +25 -0
- package/agent-agy-sdk/dist/agy-sessions.js +107 -0
- package/agent-agy-sdk/dist/agy-store.d.ts +39 -0
- package/agent-agy-sdk/dist/agy-store.js +83 -0
- package/agent-agy-sdk/dist/inbox.d.ts +26 -0
- package/agent-agy-sdk/dist/inbox.js +53 -0
- package/agent-agy-sdk/dist/index.d.ts +93 -0
- package/agent-agy-sdk/dist/index.js +476 -0
- package/agent-agy-sdk/dist/models.d.ts +41 -0
- package/agent-agy-sdk/dist/models.js +74 -0
- package/agent-agy-sdk/dist/sdk-venv.d.ts +76 -0
- package/agent-agy-sdk/dist/sdk-venv.js +173 -0
- package/agent-agy-sdk/dist/world-plugin.d.ts +10 -0
- package/agent-agy-sdk/dist/world-plugin.js +82 -0
- package/agent-agy-sdk/package.json +64 -0
- package/agent-claude/dist/adapter.js +106 -31
- package/agent-claude/dist/agent.js +154 -17
- package/agent-claude/dist/claude-client.js +84 -43
- package/agent-claude/dist/claude-launch.js +101 -0
- package/agent-claude/dist/claude-native-config.js +169 -0
- package/agent-claude/dist/claude-provider-gateway.js +340 -0
- package/agent-claude/dist/claude-providers.js +391 -0
- package/agent-claude/dist/claude-route.js +152 -0
- package/agent-claude/dist/index.js +214 -37
- package/agent-claude/dist/models.js +14 -0
- package/agent-claude/dist/sdk-runtime.js +320 -0
- package/agent-claude/package.json +6 -4
- package/agent-codex/README.md +141 -36
- package/agent-codex/cordis.patch.yml +14 -10
- package/agent-codex/dist/adapter.js +64 -28
- package/agent-codex/dist/agent.js +255 -81
- package/agent-codex/dist/app-server-approvals.js +165 -0
- package/agent-codex/dist/app-server-client.js +723 -0
- package/agent-codex/dist/app-server-events.js +432 -0
- package/agent-codex/dist/app-server-protocol.js +95 -0
- package/agent-codex/dist/app-server-wire.js +299 -0
- package/agent-codex/dist/codex-launch.js +78 -0
- package/agent-codex/dist/codex-native-config.js +392 -0
- package/agent-codex/dist/codex-provider-gateway.js +402 -0
- package/agent-codex/dist/codex-providers.js +376 -0
- package/agent-codex/dist/codex-route.js +86 -0
- package/agent-codex/dist/index.js +256 -115
- package/agent-codex/dist/permission.js +75 -1
- package/agent-codex/package.json +1 -2
- package/agent-codex-sdk/README.md +79 -0
- package/agent-codex-sdk/cordis.patch.yml +81 -0
- package/agent-codex-sdk/dist/adapter.js +91 -0
- package/agent-codex-sdk/dist/agent-preset-codex.js +32 -0
- package/agent-codex-sdk/dist/agent.js +1085 -0
- package/agent-codex-sdk/dist/codex-native-config.js +392 -0
- package/agent-codex-sdk/dist/codex-provider-gateway.js +402 -0
- package/agent-codex-sdk/dist/codex-providers.js +376 -0
- package/agent-codex-sdk/dist/codex-route.js +86 -0
- package/{agent-codex/dist/codex-client.js → agent-codex-sdk/dist/codex-sdk-client.js} +253 -32
- package/agent-codex-sdk/dist/codex-sdk-launch.js +92 -0
- package/agent-codex-sdk/dist/codex-store.js +180 -0
- package/agent-codex-sdk/dist/inbox.js +53 -0
- package/agent-codex-sdk/dist/index.js +739 -0
- package/agent-codex-sdk/dist/permission.js +71 -0
- package/agent-codex-sdk/dist/sdk-runtime.js +307 -0
- package/agent-codex-sdk/dist/session-map.js +167 -0
- package/agent-codex-sdk/dist/world-plugin.js +93 -0
- package/agent-codex-sdk/package.json +79 -0
- package/agent-codex-sdk/scripts/fetch-sdk-runtime.mjs +57 -0
- package/agent-omp/README.md +72 -55
- package/agent-omp/dist/agent.js +36 -11
- package/agent-omp/dist/index.js +92 -52
- package/agent-omp/dist/lazy-rpc.js +11 -4
- package/agent-omp/dist/omp-cli.js +114 -97
- package/agent-omp/dist/omp-store.js +12 -4
- package/agent-omp/dist/permission.js +70 -5
- package/agent-omp/dist/rpc-client.js +409 -0
- package/agent-omp/dist/world-plugin.js +36 -3
- package/agent-omp/package.json +2 -6
- package/agent-omp-sdk/README.md +103 -0
- package/agent-omp-sdk/cordis.patch.yml +108 -0
- package/agent-omp-sdk/dist/adapter.d.ts +21 -0
- package/agent-omp-sdk/dist/adapter.js +36 -0
- package/agent-omp-sdk/dist/agent-preset-omp.d.ts +31 -0
- package/agent-omp-sdk/dist/agent-preset-omp.js +32 -0
- package/agent-omp-sdk/dist/agent.d.ts +64 -0
- package/agent-omp-sdk/dist/agent.js +1178 -0
- package/agent-omp-sdk/dist/discovery.d.ts +57 -0
- package/agent-omp-sdk/dist/discovery.js +116 -0
- package/agent-omp-sdk/dist/inbox.d.ts +28 -0
- package/agent-omp-sdk/dist/inbox.js +53 -0
- package/agent-omp-sdk/dist/index.d.ts +60 -0
- package/agent-omp-sdk/dist/index.js +632 -0
- package/agent-omp-sdk/dist/knobs.d.ts +34 -0
- package/agent-omp-sdk/dist/knobs.js +50 -0
- package/agent-omp-sdk/dist/lazy-rpc.d.ts +98 -0
- package/agent-omp-sdk/dist/lazy-rpc.js +178 -0
- package/agent-omp-sdk/dist/mobile/zoom-guard.d.ts +187 -0
- package/agent-omp-sdk/dist/mobile/zoom-guard.js +294 -0
- package/agent-omp-sdk/dist/mobile-boot.d.ts +49 -0
- package/agent-omp-sdk/dist/mobile-boot.js +38 -0
- package/agent-omp-sdk/dist/models.d.ts +39 -0
- package/agent-omp-sdk/dist/models.js +299 -0
- package/agent-omp-sdk/dist/omp-cli.d.ts +67 -0
- package/agent-omp-sdk/dist/omp-cli.js +164 -0
- package/agent-omp-sdk/dist/omp-disk-discovery.d.ts +27 -0
- package/agent-omp-sdk/dist/omp-disk-discovery.js +178 -0
- package/agent-omp-sdk/dist/omp-executable.d.ts +2 -0
- package/agent-omp-sdk/dist/omp-executable.js +30 -0
- package/agent-omp-sdk/dist/omp-store.d.ts +134 -0
- package/agent-omp-sdk/dist/omp-store.js +526 -0
- package/agent-omp-sdk/dist/pairing.d.ts +7 -0
- package/agent-omp-sdk/dist/pairing.js +45 -0
- package/agent-omp-sdk/dist/permission.d.ts +138 -0
- package/agent-omp-sdk/dist/permission.js +161 -0
- package/agent-omp-sdk/dist/protocol.d.ts +189 -0
- package/agent-omp-sdk/dist/rpc-types.d.ts +77 -0
- package/agent-omp-sdk/dist/rpc-types.js +1 -0
- package/agent-omp-sdk/dist/sdk-client.d.ts +160 -0
- package/{agent-omp → agent-omp-sdk}/dist/sdk-client.js +108 -56
- package/agent-omp-sdk/dist/sdk-runtime.d.ts +211 -0
- package/agent-omp-sdk/dist/sdk-runtime.js +418 -0
- package/agent-omp-sdk/dist/sidecar-client.d.ts +87 -0
- package/agent-omp-sdk/dist/sidecar-client.js +197 -0
- package/agent-omp-sdk/dist/store/adapter.d.ts +17 -0
- package/agent-omp-sdk/dist/store/adapter.js +47 -0
- package/agent-omp-sdk/dist/store/db.d.ts +70 -0
- package/agent-omp-sdk/dist/store/db.js +210 -0
- package/agent-omp-sdk/dist/store/index.d.ts +23 -0
- package/agent-omp-sdk/dist/store/index.js +59 -0
- package/agent-omp-sdk/dist/store/reconcile.d.ts +15 -0
- package/agent-omp-sdk/dist/store/reconcile.js +51 -0
- package/agent-omp-sdk/dist/store/schema.d.ts +8 -0
- package/agent-omp-sdk/dist/store/schema.js +40 -0
- package/agent-omp-sdk/dist/transport.d.ts +49 -0
- package/agent-omp-sdk/dist/transport.js +35 -0
- package/agent-omp-sdk/dist/world-home.d.ts +4 -0
- package/agent-omp-sdk/dist/world-home.js +23 -0
- package/agent-omp-sdk/dist/world-plugin.d.ts +10 -0
- package/agent-omp-sdk/dist/world-plugin.js +137 -0
- package/agent-omp-sdk/package.json +87 -0
- package/client/index.js +1883 -287
- package/cordis.patch.yml +80 -0
- package/package.json +23 -9
- package/superd-hub/dist/a2a-delivery.d.ts +189 -0
- package/superd-hub/dist/a2a-delivery.js +240 -0
- package/superd-hub/dist/a2a-host.d.ts +76 -0
- package/superd-hub/dist/a2a-host.js +145 -0
- package/superd-hub/dist/a2a-ingest.d.ts +31 -0
- package/superd-hub/dist/a2a-ingest.js +636 -0
- package/superd-hub/dist/a2a-log.d.ts +17 -0
- package/superd-hub/dist/a2a-log.js +42 -0
- package/superd-hub/dist/a2a-row.d.ts +65 -0
- package/superd-hub/dist/a2a-row.js +162 -0
- package/superd-hub/dist/a2a-service.d.ts +357 -0
- package/superd-hub/dist/a2a-service.js +980 -0
- package/superd-hub/dist/a2a-wire.d.ts +220 -0
- package/superd-hub/dist/a2a-wire.js +305 -0
- package/superd-hub/dist/agent-ids.d.ts +10 -0
- package/superd-hub/dist/agent-ids.js +68 -0
- package/superd-hub/dist/agent-roster.d.ts +29 -18
- package/superd-hub/dist/agent-roster.js +54 -15
- package/superd-hub/dist/agent-status.d.ts +119 -0
- package/superd-hub/dist/agent-status.js +386 -0
- package/superd-hub/dist/client/agent-settings.d.ts +210 -0
- package/superd-hub/dist/client/agent-settings.js +300 -0
- package/superd-hub/dist/client/mesh-api.d.ts +134 -0
- package/superd-hub/dist/client/mesh-api.js +219 -0
- package/superd-hub/dist/client/mesh-groups.d.ts +63 -0
- package/superd-hub/dist/client/mesh-groups.js +66 -0
- package/superd-hub/dist/client/roster.d.ts +48 -0
- package/superd-hub/dist/client/roster.js +102 -0
- package/superd-hub/dist/client/runtime-settings-api.d.ts +76 -0
- package/superd-hub/dist/client/runtime-settings-api.js +137 -0
- package/superd-hub/dist/client/switch.d.ts +165 -0
- package/superd-hub/dist/client/switch.js +295 -0
- package/superd-hub/dist/exec-pty-channel.d.ts +58 -0
- package/superd-hub/dist/exec-pty-channel.js +162 -0
- package/superd-hub/dist/exec-pty-framing.d.ts +32 -0
- package/superd-hub/dist/exec-pty-framing.js +81 -0
- package/superd-hub/dist/exec-pty-rpc.d.ts +21 -0
- package/superd-hub/dist/exec-pty-rpc.js +128 -0
- package/superd-hub/dist/exec-pty-session.d.ts +76 -0
- package/superd-hub/dist/exec-pty-session.js +234 -0
- package/superd-hub/dist/exec.d.ts +56 -0
- package/superd-hub/dist/exec.js +225 -0
- package/superd-hub/dist/gateway.d.ts +39 -2
- package/superd-hub/dist/gateway.js +62 -3
- package/superd-hub/dist/hub-tool.d.ts +174 -0
- package/superd-hub/dist/hub-tool.js +464 -0
- package/superd-hub/dist/index.d.ts +15 -1
- package/superd-hub/dist/index.js +16 -0
- package/superd-hub/dist/machines.d.ts +45 -0
- package/superd-hub/dist/machines.js +125 -0
- package/superd-hub/dist/mesh-federate.d.ts +138 -0
- package/superd-hub/dist/mesh-federate.js +223 -0
- package/superd-hub/dist/mesh-gateway.d.ts +67 -0
- package/superd-hub/dist/mesh-gateway.js +408 -0
- package/superd-hub/dist/mesh-link.d.ts +274 -0
- package/superd-hub/dist/mesh-link.js +441 -0
- package/superd-hub/dist/mesh-rpc.d.ts +123 -0
- package/superd-hub/dist/mesh-rpc.js +250 -0
- package/superd-hub/dist/mux-client.d.ts +71 -0
- package/superd-hub/dist/mux-client.js +281 -0
- package/superd-hub/dist/pack-version.d.ts +2 -0
- package/superd-hub/dist/pack-version.js +30 -0
- package/superd-hub/dist/roster.d.ts +6 -0
- package/superd-hub/dist/rpc.d.ts +18 -2
- package/superd-hub/dist/rpc.js +34 -4
- package/superd-hub/dist/spawn-world.js +3 -1
- package/superd-hub/dist/switch-core.d.ts +62 -25
- package/superd-hub/dist/switch-core.js +53 -30
- package/superd-hub/dist/system-head.d.ts +22 -12
- package/superd-hub/dist/system-head.js +100 -84
- package/superd-hub/dist/wire-endpoints.d.ts +264 -0
- package/superd-hub/dist/wire-endpoints.js +180 -0
- package/superd-hub/lib/client/index.js +1883 -287
- package/superd-hub/package.json +11 -2
- package/agent-agy/dist/agent-preset-projection.d.ts +0 -31
- package/agent-agy/dist/agent-preset-projection.js +0 -33
- package/agent-claude/dist/agent-preset-projection.js +0 -30
- package/agent-codex/dist/agent-preset-projection.js +0 -37
- package/agent-codex/dist/app-home.js +0 -65
- package/agent-codex/dist/models.js +0 -152
- package/agent-codex/dist/spike.js +0 -46
- package/agent-hermes/dist/agent-preset-projection.js +0 -34
- package/agent-omp/dist/agent-preset-projection.js +0 -36
- package/agent-omp/dist/app-home.js +0 -86
- package/agent-omp/dist/sidecar-client.js +0 -195
- package/agent-pi/dist/agent-preset-projection.js +0 -29
- package/superd-hub/dist/client-shim.d.ts +0 -28
- package/superd-hub/dist/client-shim.js +0 -251
- package/superd-hub/dist/index-pass.d.ts +0 -22
- package/superd-hub/dist/index-pass.js +0 -47
- package/superd-hub/dist/labels.d.ts +0 -45
- package/superd-hub/dist/labels.js +0 -83
- /package/{agent-agy → agent-agy-sdk}/bridge/agy_bridge.py +0 -0
- /package/{agent-agy → agent-agy-sdk}/bridge/gemini_openai_server.mjs +0 -0
- /package/{agent-codex/dist/codex-events.js → agent-codex-sdk/dist/codex-sdk-events.js} +0 -0
- /package/{agent-omp → agent-omp-sdk}/dist/protocol.js +0 -0
- /package/{agent-omp → agent-omp-sdk}/sidecar/main.ts +0 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session-plane wire vocabulary (mesh P3 Task 1).
|
|
3
|
+
*
|
|
4
|
+
* The hub CALLS the native session-plane RPCs through a GatewayFace
|
|
5
|
+
* (`CarrierGatewayFace.dispatchRpc` / `.openWireStream`, P2 machinery — local
|
|
6
|
+
* in-process or remote wire). These endpoint strings are exactly the ones the
|
|
7
|
+
* official browser UI reaches the Host through: the generated
|
|
8
|
+
* `ctx.remote.session` namespace emits `connection.rpc.call('/api', endpoint,
|
|
9
|
+
* { args }, signal)` with `endpoint = '<namespace>/<method>'`, and the native
|
|
10
|
+
* gateway dispatches that same string.
|
|
11
|
+
*
|
|
12
|
+
* Every constant below is extracted from the upstream checkout
|
|
13
|
+
* (`upstream/deepseek-harness` @ `dsh-v0.1.7-rc.1`, read-only). Each JSDoc
|
|
14
|
+
* block carries the primary anchor (the `@Remote` declaration on the Host
|
|
15
|
+
* controller) plus the payload-type anchor. Missing methods are `undefined`
|
|
16
|
+
* with a comment — names are NEVER invented here.
|
|
17
|
+
*
|
|
18
|
+
* Wire-arg convention (how a GatewayFace payload is built):
|
|
19
|
+
* payload = { args: { <parameterWireName>: <value> } }
|
|
20
|
+
* The client gateway builds it at
|
|
21
|
+
* `packages/api/gateway/src/client/index.ts:445` (`{ args: prepared.args }`,
|
|
22
|
+
* with `args[parameter.wire] = value` at :525); the Host gateway unpacks it at
|
|
23
|
+
* `packages/api/gateway/src/index.ts:692–704` (`assertExactArguments` +
|
|
24
|
+
* `resolveParameter` per declared parameter). For every session-plane method
|
|
25
|
+
* the single business parameter is named `request` — EXCEPT `session/list`,
|
|
26
|
+
* whose parameter is declared `_request` (the controller ignores it), so its
|
|
27
|
+
* args key is `_request`. The trailing `signal` parameter never travels in
|
|
28
|
+
* `args` (it is carried by the envelope/stream carrier, not the payload).
|
|
29
|
+
*
|
|
30
|
+
* Namespace binding: `super(ctx, 'sessionController', { namespace: 'session' })`
|
|
31
|
+
* — packages/api/session-controller/src/index.ts:136 (Cordis service key
|
|
32
|
+
* `sessionController`, wire namespace `session`).
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* `session/list` — cold Session list (the sidebar's session rows).
|
|
36
|
+
*
|
|
37
|
+
* Upstream anchors:
|
|
38
|
+
* - `@Remote('list')`: packages/api/session-controller/src/index.ts:251
|
|
39
|
+
* (method `list(_request: SessionListRequest, signal)` at :252)
|
|
40
|
+
* - payload type: packages/api/session-controller/src/types.ts:262
|
|
41
|
+
* (`SessionListRequest`), value at :267 (`SessionListValue`)
|
|
42
|
+
* - generated client string: packages/api/session-controller/lib/typert.remote-client.d.ts:47
|
|
43
|
+
* - wire-arg key quirk: `_request` (declared name, ignored by the Host) —
|
|
44
|
+
* typert.remote-client.js `session/list` descriptor, parameter wire `_request`
|
|
45
|
+
*
|
|
46
|
+
* Wire payload: `{ args: { _request: SessionListRequestMirror } }`.
|
|
47
|
+
*/
|
|
48
|
+
export declare const WIRE_SESSION_LIST = "session/list";
|
|
49
|
+
/**
|
|
50
|
+
* `session/create` — create a Session (or adopt an explicit id).
|
|
51
|
+
*
|
|
52
|
+
* Upstream anchors:
|
|
53
|
+
* - `@Remote('create')`: packages/api/session-controller/src/index.ts:272
|
|
54
|
+
* (method `create(request: SessionCreateRequest)` at :273)
|
|
55
|
+
* - payload type: packages/api/session-controller/src/types.ts:283
|
|
56
|
+
* (`SessionCreateRequest`), value at :291 (`SessionCreateValue`)
|
|
57
|
+
* - generated client string: .../typert.remote-client.d.ts:44
|
|
58
|
+
*
|
|
59
|
+
* Wire payload: `{ args: { request: SessionCreateRequestMirror } }`.
|
|
60
|
+
*/
|
|
61
|
+
export declare const WIRE_SESSION_CREATE = "session/create";
|
|
62
|
+
/**
|
|
63
|
+
* `session/rename` — set a Session's title (the dedicated title-set RPC).
|
|
64
|
+
*
|
|
65
|
+
* Upstream anchors:
|
|
66
|
+
* - `@Remote('rename')`: packages/api/session-controller/src/index.ts:384
|
|
67
|
+
* (method `rename(request: SessionRenameRequest)` at :385)
|
|
68
|
+
* - payload type: packages/api/session-controller/src/types.ts:307
|
|
69
|
+
* (`SessionRenameRequest`), value at :313 (`SessionRenameValue`)
|
|
70
|
+
* - generated client string: .../typert.remote-client.d.ts:53
|
|
71
|
+
* - invalid title → typed error `session/title-invalid`
|
|
72
|
+
* (types.ts:223, thrown at commands.ts:204)
|
|
73
|
+
*
|
|
74
|
+
* Wire payload: `{ args: { request: SessionRenameRequestMirror } }`.
|
|
75
|
+
*/
|
|
76
|
+
export declare const WIRE_SESSION_TITLE = "session/rename";
|
|
77
|
+
/**
|
|
78
|
+
* `session/prompt` — submit one user turn into a Session.
|
|
79
|
+
*
|
|
80
|
+
* Upstream anchors:
|
|
81
|
+
* - `@Remote('prompt')`: packages/api/session-controller/src/index.ts:407
|
|
82
|
+
* (method `prompt(request: SessionPromptRequest, signal)` at :408)
|
|
83
|
+
* - payload type: packages/api/session-controller/src/types.ts:331
|
|
84
|
+
* (`SessionPromptRequest`), value at :342 (`SessionPromptValue`)
|
|
85
|
+
* - generated client string: .../typert.remote-client.d.ts:52
|
|
86
|
+
* - typed rejections: `session/agent-busy` / `session/attachment-invalid` /
|
|
87
|
+
* `session/not-found` (commands.ts:366–398)
|
|
88
|
+
*
|
|
89
|
+
* Wire payload: `{ args: { request: SessionPromptRequestMirror } }`.
|
|
90
|
+
*/
|
|
91
|
+
export declare const WIRE_PROMPT_SUBMIT = "session/prompt";
|
|
92
|
+
/**
|
|
93
|
+
* `session/follow` — open the event/log stream the UI renders (logical stream).
|
|
94
|
+
*
|
|
95
|
+
* Upstream anchors:
|
|
96
|
+
* - `@Remote({ mode: 'stream' })`: packages/api/session-controller/src/index.ts:461
|
|
97
|
+
* (method `follow(request: SessionFollowRequest, signal): AsyncIterable<SessionFollowFrame>` at :462)
|
|
98
|
+
* - payload type: packages/api/session-controller/src/types.ts:485
|
|
99
|
+
* (`SessionFollowRequest`), frame union at :550 (`SessionFollowFrame`)
|
|
100
|
+
* - generated client string: .../typert.remote-client.d.ts:45
|
|
101
|
+
* - UI consumption: packages/api/session-controller/src/client/transport.ts:172
|
|
102
|
+
* (`SessionEventStream.follow` → `remote.session.follow({ address, assistantStream: true, ... })`)
|
|
103
|
+
*
|
|
104
|
+
* Wire payload: `{ args: { request: SessionFollowRequestMirror } }`, opened
|
|
105
|
+
* via `openWireStream` (not `dispatchRpc`). The opening frame is
|
|
106
|
+
* `{ type: 'snapshot', header, cursor, records, hasMore, projections }`; then
|
|
107
|
+
* ordered `{ type: 'event', event }` entries.
|
|
108
|
+
*/
|
|
109
|
+
export declare const WIRE_STREAM_OPEN = "session/follow";
|
|
110
|
+
/**
|
|
111
|
+
* `session/cancel` — cancel/interrupt the active Agent turn.
|
|
112
|
+
*
|
|
113
|
+
* Upstream anchors:
|
|
114
|
+
* - `@Remote('cancel')`: packages/api/session-controller/src/index.ts:438
|
|
115
|
+
* (method `cancel(request: SessionCancelRequest)` at :439)
|
|
116
|
+
* - payload type: packages/api/session-controller/src/types.ts:371
|
|
117
|
+
* (`SessionCancelRequest`), value at :376 (`SessionCancelValue`)
|
|
118
|
+
* - generated client string: .../typert.remote-client.d.ts:41
|
|
119
|
+
*
|
|
120
|
+
* Wire payload: `{ args: { request: SessionCancelRequestMirror } }`.
|
|
121
|
+
*/
|
|
122
|
+
export declare const WIRE_TURN_CANCEL = "session/cancel";
|
|
123
|
+
/**
|
|
124
|
+
* `session/close` / session delete — DOES NOT EXIST upstream.
|
|
125
|
+
*
|
|
126
|
+
* The session namespace (packages/api/session-controller/src/index.ts:251–501,
|
|
127
|
+
* complete `@Remote` set: list, search, create, selectModel, modelCatalog,
|
|
128
|
+
* canOpenWorkspacePath, openWorkspacePath, workspacePathApplications, rename,
|
|
129
|
+
* fork, prompt, attachment, updateQueue, cancel, page, follow, projections,
|
|
130
|
+
* control) has no close/dispose/delete/archive method. Session lifetime is
|
|
131
|
+
* Host-owned (Agent lifecycle + `session/disposed` events); the browser never
|
|
132
|
+
* closes a session over the wire. The nearest upstream analogues live on a
|
|
133
|
+
* DIFFERENT namespace (workspace, not session-plane): `workspace/archiveSession`
|
|
134
|
+
* (packages/api/workspace-controller/src/index.ts:159) and
|
|
135
|
+
* `workspace/unarchiveSession` (:169). Kept `undefined` per the no-invention
|
|
136
|
+
* rule; Task 2 must not route a close through the session plane.
|
|
137
|
+
*/
|
|
138
|
+
export declare const WIRE_SESSION_CLOSE: undefined;
|
|
139
|
+
/**
|
|
140
|
+
* The session-plane endpoint vocabulary (mesh P3 Task 1 deliverable).
|
|
141
|
+
* Undefined keys = no upstream counterpart (see the constant's JSDoc).
|
|
142
|
+
*/
|
|
143
|
+
export declare const WIRE: {
|
|
144
|
+
readonly sessionList: "session/list";
|
|
145
|
+
readonly sessionCreate: "session/create";
|
|
146
|
+
readonly sessionTitle: "session/rename";
|
|
147
|
+
readonly promptSubmit: "session/prompt";
|
|
148
|
+
readonly streamOpen: "session/follow";
|
|
149
|
+
readonly turnCancel: "session/cancel";
|
|
150
|
+
readonly sessionClose: undefined;
|
|
151
|
+
};
|
|
152
|
+
/** Opaque branded string ids on the wire are plain JSON strings here. */
|
|
153
|
+
export type SessionIdMirror = string;
|
|
154
|
+
/** Client-minted prompt identity (`Branded<'session-request-id'>` upstream). */
|
|
155
|
+
export type SessionRequestIdMirror = string;
|
|
156
|
+
/**
|
|
157
|
+
* MIRROR of upstream `SessionListRequest`
|
|
158
|
+
* (packages/api/session-controller/src/types.ts:262). Reference data for the
|
|
159
|
+
* wire caller — not an owned contract.
|
|
160
|
+
*/
|
|
161
|
+
export interface SessionListRequestMirror {
|
|
162
|
+
readonly cursor?: string;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* MIRROR of upstream `SessionCreateRequest` (types.ts:283). `workspaceId` +
|
|
166
|
+
* `cwd` name the workspace (cwd alone is accepted), `sessionId` adopts an
|
|
167
|
+
* explicit id, `agentPreset` selects the composition.
|
|
168
|
+
*/
|
|
169
|
+
export interface SessionCreateRequestMirror {
|
|
170
|
+
readonly workspaceId?: SessionIdMirror;
|
|
171
|
+
readonly cwd?: string;
|
|
172
|
+
readonly sessionId?: SessionIdMirror;
|
|
173
|
+
readonly agentPreset?: string;
|
|
174
|
+
}
|
|
175
|
+
/** MIRROR of upstream `SessionRenameRequest` (types.ts:307). */
|
|
176
|
+
export interface SessionRenameRequestMirror {
|
|
177
|
+
readonly sessionId: SessionIdMirror;
|
|
178
|
+
readonly title: string;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* MIRROR of upstream `PromptContentPart` (types.ts:89): browser-submitted
|
|
182
|
+
* prompt content; the Host promotes image bytes to durable references.
|
|
183
|
+
*/
|
|
184
|
+
export type PromptContentPartMirror = {
|
|
185
|
+
readonly type: 'text';
|
|
186
|
+
readonly text: string;
|
|
187
|
+
} | {
|
|
188
|
+
readonly type: 'image';
|
|
189
|
+
readonly mediaType: string;
|
|
190
|
+
readonly data: string;
|
|
191
|
+
readonly name?: string;
|
|
192
|
+
} | {
|
|
193
|
+
readonly type: 'file';
|
|
194
|
+
readonly receiptId: string;
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* MIRROR of upstream `SessionPromptRequest` (types.ts:331). `mode` picks
|
|
198
|
+
* delivery: `'queue'` waits for the live turn, `'steer'` steers it.
|
|
199
|
+
*/
|
|
200
|
+
export interface SessionPromptRequestMirror {
|
|
201
|
+
readonly requestId: SessionRequestIdMirror;
|
|
202
|
+
readonly sessionId: SessionIdMirror;
|
|
203
|
+
readonly mode: 'queue' | 'steer';
|
|
204
|
+
readonly content: readonly PromptContentPartMirror[];
|
|
205
|
+
readonly clientTimeZone?: string;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* MIRROR of upstream `SessionAddress` (types.ts:406): one ordinary Session or
|
|
209
|
+
* one direct subagent child.
|
|
210
|
+
*/
|
|
211
|
+
export type SessionAddressMirror = {
|
|
212
|
+
readonly kind: 'session';
|
|
213
|
+
readonly sessionId: SessionIdMirror;
|
|
214
|
+
} | {
|
|
215
|
+
readonly kind: 'subagent';
|
|
216
|
+
readonly parentSessionId: SessionIdMirror;
|
|
217
|
+
readonly childSessionId: SessionIdMirror;
|
|
218
|
+
readonly mode: 'one-shot' | 'continuable' | 'unknown';
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* MIRROR of upstream `SessionFollowRequest` (types.ts:485; page-budget fields
|
|
222
|
+
* from `SessionPageRequest` at :469–482). The UI always passes
|
|
223
|
+
* `assistantStream: true` (transport.ts:172–175) to opt into live
|
|
224
|
+
* assistant-stream frames.
|
|
225
|
+
*/
|
|
226
|
+
export interface SessionFollowRequestMirror {
|
|
227
|
+
readonly address: SessionAddressMirror;
|
|
228
|
+
readonly assistantStream?: true;
|
|
229
|
+
readonly maxMessages?: number;
|
|
230
|
+
readonly turnWindow?: {
|
|
231
|
+
readonly minMessages: number;
|
|
232
|
+
readonly minTurns: number;
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
/** MIRROR of upstream `SessionCancelRequest` (types.ts:371). */
|
|
236
|
+
export interface SessionCancelRequestMirror {
|
|
237
|
+
readonly sessionId: SessionIdMirror;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Wire-arg wrapper keys per endpoint, as the native gateway's
|
|
241
|
+
* `assertExactArguments`/`resolveParameter` expects them
|
|
242
|
+
* (packages/api/gateway/src/index.ts:692–704; client builds
|
|
243
|
+
* `{ args: { [parameter.wire]: value } }` at api/gateway/src/client/index.ts:525).
|
|
244
|
+
* `session/list` alone uses `_request` (its controller parameter is declared
|
|
245
|
+
* `_request` and ignored).
|
|
246
|
+
*/
|
|
247
|
+
export declare const WIRE_ARGS: {
|
|
248
|
+
readonly "session/list": "_request";
|
|
249
|
+
readonly "session/create": "request";
|
|
250
|
+
readonly "session/rename": "request";
|
|
251
|
+
readonly "session/prompt": "request";
|
|
252
|
+
readonly "session/follow": "request";
|
|
253
|
+
readonly "session/cancel": "request";
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Build the GatewayFace payload (`{ args: { <key>: value } }`) for one
|
|
257
|
+
* session-plane endpoint.
|
|
258
|
+
* @param endpoint - one of the defined `WIRE` constants.
|
|
259
|
+
* @param value - the mirrored request object for that endpoint.
|
|
260
|
+
* @returns the wire payload accepted by `dispatchRpc`/`openWireStream`.
|
|
261
|
+
*/
|
|
262
|
+
export declare function wireArgsOf(endpoint: string, value: unknown): {
|
|
263
|
+
args: Record<string, unknown>;
|
|
264
|
+
};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session-plane wire vocabulary (mesh P3 Task 1).
|
|
3
|
+
*
|
|
4
|
+
* The hub CALLS the native session-plane RPCs through a GatewayFace
|
|
5
|
+
* (`CarrierGatewayFace.dispatchRpc` / `.openWireStream`, P2 machinery — local
|
|
6
|
+
* in-process or remote wire). These endpoint strings are exactly the ones the
|
|
7
|
+
* official browser UI reaches the Host through: the generated
|
|
8
|
+
* `ctx.remote.session` namespace emits `connection.rpc.call('/api', endpoint,
|
|
9
|
+
* { args }, signal)` with `endpoint = '<namespace>/<method>'`, and the native
|
|
10
|
+
* gateway dispatches that same string.
|
|
11
|
+
*
|
|
12
|
+
* Every constant below is extracted from the upstream checkout
|
|
13
|
+
* (`upstream/deepseek-harness` @ `dsh-v0.1.7-rc.1`, read-only). Each JSDoc
|
|
14
|
+
* block carries the primary anchor (the `@Remote` declaration on the Host
|
|
15
|
+
* controller) plus the payload-type anchor. Missing methods are `undefined`
|
|
16
|
+
* with a comment — names are NEVER invented here.
|
|
17
|
+
*
|
|
18
|
+
* Wire-arg convention (how a GatewayFace payload is built):
|
|
19
|
+
* payload = { args: { <parameterWireName>: <value> } }
|
|
20
|
+
* The client gateway builds it at
|
|
21
|
+
* `packages/api/gateway/src/client/index.ts:445` (`{ args: prepared.args }`,
|
|
22
|
+
* with `args[parameter.wire] = value` at :525); the Host gateway unpacks it at
|
|
23
|
+
* `packages/api/gateway/src/index.ts:692–704` (`assertExactArguments` +
|
|
24
|
+
* `resolveParameter` per declared parameter). For every session-plane method
|
|
25
|
+
* the single business parameter is named `request` — EXCEPT `session/list`,
|
|
26
|
+
* whose parameter is declared `_request` (the controller ignores it), so its
|
|
27
|
+
* args key is `_request`. The trailing `signal` parameter never travels in
|
|
28
|
+
* `args` (it is carried by the envelope/stream carrier, not the payload).
|
|
29
|
+
*
|
|
30
|
+
* Namespace binding: `super(ctx, 'sessionController', { namespace: 'session' })`
|
|
31
|
+
* — packages/api/session-controller/src/index.ts:136 (Cordis service key
|
|
32
|
+
* `sessionController`, wire namespace `session`).
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* `session/list` — cold Session list (the sidebar's session rows).
|
|
36
|
+
*
|
|
37
|
+
* Upstream anchors:
|
|
38
|
+
* - `@Remote('list')`: packages/api/session-controller/src/index.ts:251
|
|
39
|
+
* (method `list(_request: SessionListRequest, signal)` at :252)
|
|
40
|
+
* - payload type: packages/api/session-controller/src/types.ts:262
|
|
41
|
+
* (`SessionListRequest`), value at :267 (`SessionListValue`)
|
|
42
|
+
* - generated client string: packages/api/session-controller/lib/typert.remote-client.d.ts:47
|
|
43
|
+
* - wire-arg key quirk: `_request` (declared name, ignored by the Host) —
|
|
44
|
+
* typert.remote-client.js `session/list` descriptor, parameter wire `_request`
|
|
45
|
+
*
|
|
46
|
+
* Wire payload: `{ args: { _request: SessionListRequestMirror } }`.
|
|
47
|
+
*/
|
|
48
|
+
export const WIRE_SESSION_LIST = 'session/list';
|
|
49
|
+
/**
|
|
50
|
+
* `session/create` — create a Session (or adopt an explicit id).
|
|
51
|
+
*
|
|
52
|
+
* Upstream anchors:
|
|
53
|
+
* - `@Remote('create')`: packages/api/session-controller/src/index.ts:272
|
|
54
|
+
* (method `create(request: SessionCreateRequest)` at :273)
|
|
55
|
+
* - payload type: packages/api/session-controller/src/types.ts:283
|
|
56
|
+
* (`SessionCreateRequest`), value at :291 (`SessionCreateValue`)
|
|
57
|
+
* - generated client string: .../typert.remote-client.d.ts:44
|
|
58
|
+
*
|
|
59
|
+
* Wire payload: `{ args: { request: SessionCreateRequestMirror } }`.
|
|
60
|
+
*/
|
|
61
|
+
export const WIRE_SESSION_CREATE = 'session/create';
|
|
62
|
+
/**
|
|
63
|
+
* `session/rename` — set a Session's title (the dedicated title-set RPC).
|
|
64
|
+
*
|
|
65
|
+
* Upstream anchors:
|
|
66
|
+
* - `@Remote('rename')`: packages/api/session-controller/src/index.ts:384
|
|
67
|
+
* (method `rename(request: SessionRenameRequest)` at :385)
|
|
68
|
+
* - payload type: packages/api/session-controller/src/types.ts:307
|
|
69
|
+
* (`SessionRenameRequest`), value at :313 (`SessionRenameValue`)
|
|
70
|
+
* - generated client string: .../typert.remote-client.d.ts:53
|
|
71
|
+
* - invalid title → typed error `session/title-invalid`
|
|
72
|
+
* (types.ts:223, thrown at commands.ts:204)
|
|
73
|
+
*
|
|
74
|
+
* Wire payload: `{ args: { request: SessionRenameRequestMirror } }`.
|
|
75
|
+
*/
|
|
76
|
+
export const WIRE_SESSION_TITLE = 'session/rename';
|
|
77
|
+
/**
|
|
78
|
+
* `session/prompt` — submit one user turn into a Session.
|
|
79
|
+
*
|
|
80
|
+
* Upstream anchors:
|
|
81
|
+
* - `@Remote('prompt')`: packages/api/session-controller/src/index.ts:407
|
|
82
|
+
* (method `prompt(request: SessionPromptRequest, signal)` at :408)
|
|
83
|
+
* - payload type: packages/api/session-controller/src/types.ts:331
|
|
84
|
+
* (`SessionPromptRequest`), value at :342 (`SessionPromptValue`)
|
|
85
|
+
* - generated client string: .../typert.remote-client.d.ts:52
|
|
86
|
+
* - typed rejections: `session/agent-busy` / `session/attachment-invalid` /
|
|
87
|
+
* `session/not-found` (commands.ts:366–398)
|
|
88
|
+
*
|
|
89
|
+
* Wire payload: `{ args: { request: SessionPromptRequestMirror } }`.
|
|
90
|
+
*/
|
|
91
|
+
export const WIRE_PROMPT_SUBMIT = 'session/prompt';
|
|
92
|
+
/**
|
|
93
|
+
* `session/follow` — open the event/log stream the UI renders (logical stream).
|
|
94
|
+
*
|
|
95
|
+
* Upstream anchors:
|
|
96
|
+
* - `@Remote({ mode: 'stream' })`: packages/api/session-controller/src/index.ts:461
|
|
97
|
+
* (method `follow(request: SessionFollowRequest, signal): AsyncIterable<SessionFollowFrame>` at :462)
|
|
98
|
+
* - payload type: packages/api/session-controller/src/types.ts:485
|
|
99
|
+
* (`SessionFollowRequest`), frame union at :550 (`SessionFollowFrame`)
|
|
100
|
+
* - generated client string: .../typert.remote-client.d.ts:45
|
|
101
|
+
* - UI consumption: packages/api/session-controller/src/client/transport.ts:172
|
|
102
|
+
* (`SessionEventStream.follow` → `remote.session.follow({ address, assistantStream: true, ... })`)
|
|
103
|
+
*
|
|
104
|
+
* Wire payload: `{ args: { request: SessionFollowRequestMirror } }`, opened
|
|
105
|
+
* via `openWireStream` (not `dispatchRpc`). The opening frame is
|
|
106
|
+
* `{ type: 'snapshot', header, cursor, records, hasMore, projections }`; then
|
|
107
|
+
* ordered `{ type: 'event', event }` entries.
|
|
108
|
+
*/
|
|
109
|
+
export const WIRE_STREAM_OPEN = 'session/follow';
|
|
110
|
+
/**
|
|
111
|
+
* `session/cancel` — cancel/interrupt the active Agent turn.
|
|
112
|
+
*
|
|
113
|
+
* Upstream anchors:
|
|
114
|
+
* - `@Remote('cancel')`: packages/api/session-controller/src/index.ts:438
|
|
115
|
+
* (method `cancel(request: SessionCancelRequest)` at :439)
|
|
116
|
+
* - payload type: packages/api/session-controller/src/types.ts:371
|
|
117
|
+
* (`SessionCancelRequest`), value at :376 (`SessionCancelValue`)
|
|
118
|
+
* - generated client string: .../typert.remote-client.d.ts:41
|
|
119
|
+
*
|
|
120
|
+
* Wire payload: `{ args: { request: SessionCancelRequestMirror } }`.
|
|
121
|
+
*/
|
|
122
|
+
export const WIRE_TURN_CANCEL = 'session/cancel';
|
|
123
|
+
/**
|
|
124
|
+
* `session/close` / session delete — DOES NOT EXIST upstream.
|
|
125
|
+
*
|
|
126
|
+
* The session namespace (packages/api/session-controller/src/index.ts:251–501,
|
|
127
|
+
* complete `@Remote` set: list, search, create, selectModel, modelCatalog,
|
|
128
|
+
* canOpenWorkspacePath, openWorkspacePath, workspacePathApplications, rename,
|
|
129
|
+
* fork, prompt, attachment, updateQueue, cancel, page, follow, projections,
|
|
130
|
+
* control) has no close/dispose/delete/archive method. Session lifetime is
|
|
131
|
+
* Host-owned (Agent lifecycle + `session/disposed` events); the browser never
|
|
132
|
+
* closes a session over the wire. The nearest upstream analogues live on a
|
|
133
|
+
* DIFFERENT namespace (workspace, not session-plane): `workspace/archiveSession`
|
|
134
|
+
* (packages/api/workspace-controller/src/index.ts:159) and
|
|
135
|
+
* `workspace/unarchiveSession` (:169). Kept `undefined` per the no-invention
|
|
136
|
+
* rule; Task 2 must not route a close through the session plane.
|
|
137
|
+
*/
|
|
138
|
+
export const WIRE_SESSION_CLOSE = undefined;
|
|
139
|
+
/**
|
|
140
|
+
* The session-plane endpoint vocabulary (mesh P3 Task 1 deliverable).
|
|
141
|
+
* Undefined keys = no upstream counterpart (see the constant's JSDoc).
|
|
142
|
+
*/
|
|
143
|
+
export const WIRE = {
|
|
144
|
+
sessionList: WIRE_SESSION_LIST,
|
|
145
|
+
sessionCreate: WIRE_SESSION_CREATE,
|
|
146
|
+
sessionTitle: WIRE_SESSION_TITLE,
|
|
147
|
+
promptSubmit: WIRE_PROMPT_SUBMIT,
|
|
148
|
+
streamOpen: WIRE_STREAM_OPEN,
|
|
149
|
+
turnCancel: WIRE_TURN_CANCEL,
|
|
150
|
+
sessionClose: WIRE_SESSION_CLOSE,
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Wire-arg wrapper keys per endpoint, as the native gateway's
|
|
154
|
+
* `assertExactArguments`/`resolveParameter` expects them
|
|
155
|
+
* (packages/api/gateway/src/index.ts:692–704; client builds
|
|
156
|
+
* `{ args: { [parameter.wire]: value } }` at api/gateway/src/client/index.ts:525).
|
|
157
|
+
* `session/list` alone uses `_request` (its controller parameter is declared
|
|
158
|
+
* `_request` and ignored).
|
|
159
|
+
*/
|
|
160
|
+
export const WIRE_ARGS = {
|
|
161
|
+
[WIRE_SESSION_LIST]: '_request',
|
|
162
|
+
[WIRE_SESSION_CREATE]: 'request',
|
|
163
|
+
[WIRE_SESSION_TITLE]: 'request',
|
|
164
|
+
[WIRE_PROMPT_SUBMIT]: 'request',
|
|
165
|
+
[WIRE_STREAM_OPEN]: 'request',
|
|
166
|
+
[WIRE_TURN_CANCEL]: 'request',
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Build the GatewayFace payload (`{ args: { <key>: value } }`) for one
|
|
170
|
+
* session-plane endpoint.
|
|
171
|
+
* @param endpoint - one of the defined `WIRE` constants.
|
|
172
|
+
* @param value - the mirrored request object for that endpoint.
|
|
173
|
+
* @returns the wire payload accepted by `dispatchRpc`/`openWireStream`.
|
|
174
|
+
*/
|
|
175
|
+
export function wireArgsOf(endpoint, value) {
|
|
176
|
+
const key = WIRE_ARGS[endpoint];
|
|
177
|
+
if (key === undefined)
|
|
178
|
+
throw new Error(`wire-endpoints: no wire-arg key for ${endpoint}`);
|
|
179
|
+
return { args: { [key]: value } };
|
|
180
|
+
}
|