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.
Files changed (260) hide show
  1. package/README.md +25 -3
  2. package/agent-agy/cordis.patch.yml +7 -4
  3. package/agent-agy/dist/agent.d.ts +12 -11
  4. package/agent-agy/dist/agy-auth-gateway.d.ts +124 -0
  5. package/agent-agy/dist/agy-auth-gateway.js +233 -0
  6. package/agent-agy/dist/agy-auth.d.ts +153 -0
  7. package/agent-agy/dist/agy-auth.js +179 -0
  8. package/agent-agy/dist/agy-cli-client.d.ts +39 -9
  9. package/agent-agy/dist/agy-cli-client.js +82 -18
  10. package/agent-agy/dist/agy-store.d.ts +8 -0
  11. package/agent-agy/dist/index.d.ts +46 -16
  12. package/agent-agy/dist/index.js +82 -56
  13. package/agent-agy/dist/models.d.ts +70 -0
  14. package/agent-agy/dist/models.js +102 -3
  15. package/agent-agy/package.json +7 -5
  16. package/agent-agy-sdk/cordis.patch.yml +58 -0
  17. package/agent-agy-sdk/dist/adapter.d.ts +15 -0
  18. package/agent-agy-sdk/dist/adapter.js +42 -0
  19. package/agent-agy-sdk/dist/agent-preset-agy.d.ts +27 -0
  20. package/agent-agy-sdk/dist/agent-preset-agy.js +32 -0
  21. package/agent-agy-sdk/dist/agent.d.ts +138 -0
  22. package/agent-agy-sdk/dist/agent.js +494 -0
  23. package/{agent-agy → agent-agy-sdk}/dist/agy-client.d.ts +26 -6
  24. package/{agent-agy → agent-agy-sdk}/dist/agy-client.js +43 -25
  25. package/agent-agy-sdk/dist/agy-sessions.d.ts +25 -0
  26. package/agent-agy-sdk/dist/agy-sessions.js +107 -0
  27. package/agent-agy-sdk/dist/agy-store.d.ts +39 -0
  28. package/agent-agy-sdk/dist/agy-store.js +83 -0
  29. package/agent-agy-sdk/dist/inbox.d.ts +26 -0
  30. package/agent-agy-sdk/dist/inbox.js +53 -0
  31. package/agent-agy-sdk/dist/index.d.ts +93 -0
  32. package/agent-agy-sdk/dist/index.js +476 -0
  33. package/agent-agy-sdk/dist/models.d.ts +41 -0
  34. package/agent-agy-sdk/dist/models.js +74 -0
  35. package/agent-agy-sdk/dist/sdk-venv.d.ts +76 -0
  36. package/agent-agy-sdk/dist/sdk-venv.js +173 -0
  37. package/agent-agy-sdk/dist/world-plugin.d.ts +10 -0
  38. package/agent-agy-sdk/dist/world-plugin.js +82 -0
  39. package/agent-agy-sdk/package.json +64 -0
  40. package/agent-claude/dist/adapter.js +106 -31
  41. package/agent-claude/dist/agent.js +154 -17
  42. package/agent-claude/dist/claude-client.js +84 -43
  43. package/agent-claude/dist/claude-launch.js +101 -0
  44. package/agent-claude/dist/claude-native-config.js +169 -0
  45. package/agent-claude/dist/claude-provider-gateway.js +340 -0
  46. package/agent-claude/dist/claude-providers.js +391 -0
  47. package/agent-claude/dist/claude-route.js +152 -0
  48. package/agent-claude/dist/index.js +214 -37
  49. package/agent-claude/dist/models.js +14 -0
  50. package/agent-claude/dist/sdk-runtime.js +320 -0
  51. package/agent-claude/package.json +6 -4
  52. package/agent-codex/README.md +141 -36
  53. package/agent-codex/cordis.patch.yml +14 -10
  54. package/agent-codex/dist/adapter.js +64 -28
  55. package/agent-codex/dist/agent.js +255 -81
  56. package/agent-codex/dist/app-server-approvals.js +165 -0
  57. package/agent-codex/dist/app-server-client.js +723 -0
  58. package/agent-codex/dist/app-server-events.js +432 -0
  59. package/agent-codex/dist/app-server-protocol.js +95 -0
  60. package/agent-codex/dist/app-server-wire.js +299 -0
  61. package/agent-codex/dist/codex-launch.js +78 -0
  62. package/agent-codex/dist/codex-native-config.js +392 -0
  63. package/agent-codex/dist/codex-provider-gateway.js +402 -0
  64. package/agent-codex/dist/codex-providers.js +376 -0
  65. package/agent-codex/dist/codex-route.js +86 -0
  66. package/agent-codex/dist/index.js +256 -115
  67. package/agent-codex/dist/permission.js +75 -1
  68. package/agent-codex/package.json +1 -2
  69. package/agent-codex-sdk/README.md +79 -0
  70. package/agent-codex-sdk/cordis.patch.yml +81 -0
  71. package/agent-codex-sdk/dist/adapter.js +91 -0
  72. package/agent-codex-sdk/dist/agent-preset-codex.js +32 -0
  73. package/agent-codex-sdk/dist/agent.js +1085 -0
  74. package/agent-codex-sdk/dist/codex-native-config.js +392 -0
  75. package/agent-codex-sdk/dist/codex-provider-gateway.js +402 -0
  76. package/agent-codex-sdk/dist/codex-providers.js +376 -0
  77. package/agent-codex-sdk/dist/codex-route.js +86 -0
  78. package/{agent-codex/dist/codex-client.js → agent-codex-sdk/dist/codex-sdk-client.js} +253 -32
  79. package/agent-codex-sdk/dist/codex-sdk-launch.js +92 -0
  80. package/agent-codex-sdk/dist/codex-store.js +180 -0
  81. package/agent-codex-sdk/dist/inbox.js +53 -0
  82. package/agent-codex-sdk/dist/index.js +739 -0
  83. package/agent-codex-sdk/dist/permission.js +71 -0
  84. package/agent-codex-sdk/dist/sdk-runtime.js +307 -0
  85. package/agent-codex-sdk/dist/session-map.js +167 -0
  86. package/agent-codex-sdk/dist/world-plugin.js +93 -0
  87. package/agent-codex-sdk/package.json +79 -0
  88. package/agent-codex-sdk/scripts/fetch-sdk-runtime.mjs +57 -0
  89. package/agent-omp/README.md +72 -55
  90. package/agent-omp/dist/agent.js +36 -11
  91. package/agent-omp/dist/index.js +92 -52
  92. package/agent-omp/dist/lazy-rpc.js +11 -4
  93. package/agent-omp/dist/omp-cli.js +114 -97
  94. package/agent-omp/dist/omp-store.js +12 -4
  95. package/agent-omp/dist/permission.js +70 -5
  96. package/agent-omp/dist/rpc-client.js +409 -0
  97. package/agent-omp/dist/world-plugin.js +36 -3
  98. package/agent-omp/package.json +2 -6
  99. package/agent-omp-sdk/README.md +103 -0
  100. package/agent-omp-sdk/cordis.patch.yml +108 -0
  101. package/agent-omp-sdk/dist/adapter.d.ts +21 -0
  102. package/agent-omp-sdk/dist/adapter.js +36 -0
  103. package/agent-omp-sdk/dist/agent-preset-omp.d.ts +31 -0
  104. package/agent-omp-sdk/dist/agent-preset-omp.js +32 -0
  105. package/agent-omp-sdk/dist/agent.d.ts +64 -0
  106. package/agent-omp-sdk/dist/agent.js +1178 -0
  107. package/agent-omp-sdk/dist/discovery.d.ts +57 -0
  108. package/agent-omp-sdk/dist/discovery.js +116 -0
  109. package/agent-omp-sdk/dist/inbox.d.ts +28 -0
  110. package/agent-omp-sdk/dist/inbox.js +53 -0
  111. package/agent-omp-sdk/dist/index.d.ts +60 -0
  112. package/agent-omp-sdk/dist/index.js +632 -0
  113. package/agent-omp-sdk/dist/knobs.d.ts +34 -0
  114. package/agent-omp-sdk/dist/knobs.js +50 -0
  115. package/agent-omp-sdk/dist/lazy-rpc.d.ts +98 -0
  116. package/agent-omp-sdk/dist/lazy-rpc.js +178 -0
  117. package/agent-omp-sdk/dist/mobile/zoom-guard.d.ts +187 -0
  118. package/agent-omp-sdk/dist/mobile/zoom-guard.js +294 -0
  119. package/agent-omp-sdk/dist/mobile-boot.d.ts +49 -0
  120. package/agent-omp-sdk/dist/mobile-boot.js +38 -0
  121. package/agent-omp-sdk/dist/models.d.ts +39 -0
  122. package/agent-omp-sdk/dist/models.js +299 -0
  123. package/agent-omp-sdk/dist/omp-cli.d.ts +67 -0
  124. package/agent-omp-sdk/dist/omp-cli.js +164 -0
  125. package/agent-omp-sdk/dist/omp-disk-discovery.d.ts +27 -0
  126. package/agent-omp-sdk/dist/omp-disk-discovery.js +178 -0
  127. package/agent-omp-sdk/dist/omp-executable.d.ts +2 -0
  128. package/agent-omp-sdk/dist/omp-executable.js +30 -0
  129. package/agent-omp-sdk/dist/omp-store.d.ts +134 -0
  130. package/agent-omp-sdk/dist/omp-store.js +526 -0
  131. package/agent-omp-sdk/dist/pairing.d.ts +7 -0
  132. package/agent-omp-sdk/dist/pairing.js +45 -0
  133. package/agent-omp-sdk/dist/permission.d.ts +138 -0
  134. package/agent-omp-sdk/dist/permission.js +161 -0
  135. package/agent-omp-sdk/dist/protocol.d.ts +189 -0
  136. package/agent-omp-sdk/dist/rpc-types.d.ts +77 -0
  137. package/agent-omp-sdk/dist/rpc-types.js +1 -0
  138. package/agent-omp-sdk/dist/sdk-client.d.ts +160 -0
  139. package/{agent-omp → agent-omp-sdk}/dist/sdk-client.js +108 -56
  140. package/agent-omp-sdk/dist/sdk-runtime.d.ts +211 -0
  141. package/agent-omp-sdk/dist/sdk-runtime.js +418 -0
  142. package/agent-omp-sdk/dist/sidecar-client.d.ts +87 -0
  143. package/agent-omp-sdk/dist/sidecar-client.js +197 -0
  144. package/agent-omp-sdk/dist/store/adapter.d.ts +17 -0
  145. package/agent-omp-sdk/dist/store/adapter.js +47 -0
  146. package/agent-omp-sdk/dist/store/db.d.ts +70 -0
  147. package/agent-omp-sdk/dist/store/db.js +210 -0
  148. package/agent-omp-sdk/dist/store/index.d.ts +23 -0
  149. package/agent-omp-sdk/dist/store/index.js +59 -0
  150. package/agent-omp-sdk/dist/store/reconcile.d.ts +15 -0
  151. package/agent-omp-sdk/dist/store/reconcile.js +51 -0
  152. package/agent-omp-sdk/dist/store/schema.d.ts +8 -0
  153. package/agent-omp-sdk/dist/store/schema.js +40 -0
  154. package/agent-omp-sdk/dist/transport.d.ts +49 -0
  155. package/agent-omp-sdk/dist/transport.js +35 -0
  156. package/agent-omp-sdk/dist/world-home.d.ts +4 -0
  157. package/agent-omp-sdk/dist/world-home.js +23 -0
  158. package/agent-omp-sdk/dist/world-plugin.d.ts +10 -0
  159. package/agent-omp-sdk/dist/world-plugin.js +137 -0
  160. package/agent-omp-sdk/package.json +87 -0
  161. package/client/index.js +1883 -287
  162. package/cordis.patch.yml +80 -0
  163. package/package.json +23 -9
  164. package/superd-hub/dist/a2a-delivery.d.ts +189 -0
  165. package/superd-hub/dist/a2a-delivery.js +240 -0
  166. package/superd-hub/dist/a2a-host.d.ts +76 -0
  167. package/superd-hub/dist/a2a-host.js +145 -0
  168. package/superd-hub/dist/a2a-ingest.d.ts +31 -0
  169. package/superd-hub/dist/a2a-ingest.js +636 -0
  170. package/superd-hub/dist/a2a-log.d.ts +17 -0
  171. package/superd-hub/dist/a2a-log.js +42 -0
  172. package/superd-hub/dist/a2a-row.d.ts +65 -0
  173. package/superd-hub/dist/a2a-row.js +162 -0
  174. package/superd-hub/dist/a2a-service.d.ts +357 -0
  175. package/superd-hub/dist/a2a-service.js +980 -0
  176. package/superd-hub/dist/a2a-wire.d.ts +220 -0
  177. package/superd-hub/dist/a2a-wire.js +305 -0
  178. package/superd-hub/dist/agent-ids.d.ts +10 -0
  179. package/superd-hub/dist/agent-ids.js +68 -0
  180. package/superd-hub/dist/agent-roster.d.ts +29 -18
  181. package/superd-hub/dist/agent-roster.js +54 -15
  182. package/superd-hub/dist/agent-status.d.ts +119 -0
  183. package/superd-hub/dist/agent-status.js +386 -0
  184. package/superd-hub/dist/client/agent-settings.d.ts +210 -0
  185. package/superd-hub/dist/client/agent-settings.js +300 -0
  186. package/superd-hub/dist/client/mesh-api.d.ts +134 -0
  187. package/superd-hub/dist/client/mesh-api.js +219 -0
  188. package/superd-hub/dist/client/mesh-groups.d.ts +63 -0
  189. package/superd-hub/dist/client/mesh-groups.js +66 -0
  190. package/superd-hub/dist/client/roster.d.ts +48 -0
  191. package/superd-hub/dist/client/roster.js +102 -0
  192. package/superd-hub/dist/client/runtime-settings-api.d.ts +76 -0
  193. package/superd-hub/dist/client/runtime-settings-api.js +137 -0
  194. package/superd-hub/dist/client/switch.d.ts +165 -0
  195. package/superd-hub/dist/client/switch.js +295 -0
  196. package/superd-hub/dist/exec-pty-channel.d.ts +58 -0
  197. package/superd-hub/dist/exec-pty-channel.js +162 -0
  198. package/superd-hub/dist/exec-pty-framing.d.ts +32 -0
  199. package/superd-hub/dist/exec-pty-framing.js +81 -0
  200. package/superd-hub/dist/exec-pty-rpc.d.ts +21 -0
  201. package/superd-hub/dist/exec-pty-rpc.js +128 -0
  202. package/superd-hub/dist/exec-pty-session.d.ts +76 -0
  203. package/superd-hub/dist/exec-pty-session.js +234 -0
  204. package/superd-hub/dist/exec.d.ts +56 -0
  205. package/superd-hub/dist/exec.js +225 -0
  206. package/superd-hub/dist/gateway.d.ts +39 -2
  207. package/superd-hub/dist/gateway.js +62 -3
  208. package/superd-hub/dist/hub-tool.d.ts +174 -0
  209. package/superd-hub/dist/hub-tool.js +464 -0
  210. package/superd-hub/dist/index.d.ts +15 -1
  211. package/superd-hub/dist/index.js +16 -0
  212. package/superd-hub/dist/machines.d.ts +45 -0
  213. package/superd-hub/dist/machines.js +125 -0
  214. package/superd-hub/dist/mesh-federate.d.ts +138 -0
  215. package/superd-hub/dist/mesh-federate.js +223 -0
  216. package/superd-hub/dist/mesh-gateway.d.ts +67 -0
  217. package/superd-hub/dist/mesh-gateway.js +408 -0
  218. package/superd-hub/dist/mesh-link.d.ts +274 -0
  219. package/superd-hub/dist/mesh-link.js +441 -0
  220. package/superd-hub/dist/mesh-rpc.d.ts +123 -0
  221. package/superd-hub/dist/mesh-rpc.js +250 -0
  222. package/superd-hub/dist/mux-client.d.ts +71 -0
  223. package/superd-hub/dist/mux-client.js +281 -0
  224. package/superd-hub/dist/pack-version.d.ts +2 -0
  225. package/superd-hub/dist/pack-version.js +30 -0
  226. package/superd-hub/dist/roster.d.ts +6 -0
  227. package/superd-hub/dist/rpc.d.ts +18 -2
  228. package/superd-hub/dist/rpc.js +34 -4
  229. package/superd-hub/dist/spawn-world.js +3 -1
  230. package/superd-hub/dist/switch-core.d.ts +62 -25
  231. package/superd-hub/dist/switch-core.js +53 -30
  232. package/superd-hub/dist/system-head.d.ts +22 -12
  233. package/superd-hub/dist/system-head.js +100 -84
  234. package/superd-hub/dist/wire-endpoints.d.ts +264 -0
  235. package/superd-hub/dist/wire-endpoints.js +180 -0
  236. package/superd-hub/lib/client/index.js +1883 -287
  237. package/superd-hub/package.json +11 -2
  238. package/agent-agy/dist/agent-preset-projection.d.ts +0 -31
  239. package/agent-agy/dist/agent-preset-projection.js +0 -33
  240. package/agent-claude/dist/agent-preset-projection.js +0 -30
  241. package/agent-codex/dist/agent-preset-projection.js +0 -37
  242. package/agent-codex/dist/app-home.js +0 -65
  243. package/agent-codex/dist/models.js +0 -152
  244. package/agent-codex/dist/spike.js +0 -46
  245. package/agent-hermes/dist/agent-preset-projection.js +0 -34
  246. package/agent-omp/dist/agent-preset-projection.js +0 -36
  247. package/agent-omp/dist/app-home.js +0 -86
  248. package/agent-omp/dist/sidecar-client.js +0 -195
  249. package/agent-pi/dist/agent-preset-projection.js +0 -29
  250. package/superd-hub/dist/client-shim.d.ts +0 -28
  251. package/superd-hub/dist/client-shim.js +0 -251
  252. package/superd-hub/dist/index-pass.d.ts +0 -22
  253. package/superd-hub/dist/index-pass.js +0 -47
  254. package/superd-hub/dist/labels.d.ts +0 -45
  255. package/superd-hub/dist/labels.js +0 -83
  256. /package/{agent-agy → agent-agy-sdk}/bridge/agy_bridge.py +0 -0
  257. /package/{agent-agy → agent-agy-sdk}/bridge/gemini_openai_server.mjs +0 -0
  258. /package/{agent-codex/dist/codex-events.js → agent-codex-sdk/dist/codex-sdk-events.js} +0 -0
  259. /package/{agent-omp → agent-omp-sdk}/dist/protocol.js +0 -0
  260. /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
+ }