super-dsh 0.1.3 → 0.1.5

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 (142) hide show
  1. package/README.md +3 -3
  2. package/agent-agy/cordis.patch.yml +8 -4
  3. package/agent-agy/dist/agent-preset-agy.d.ts +23 -43
  4. package/agent-agy/dist/agent-preset-agy.js +29 -166
  5. package/agent-agy/dist/agent.d.ts +2 -1
  6. package/agent-agy/dist/agent.js +3 -2
  7. package/agent-agy/dist/agy-sessions.d.ts +2 -1
  8. package/agent-agy/dist/agy-sessions.js +2 -11
  9. package/agent-agy/dist/index.js +13 -12
  10. package/agent-agy/dist/world-plugin.d.ts +2 -1
  11. package/agent-agy/dist/world-plugin.js +31 -51
  12. package/agent-agy/package.json +6 -6
  13. package/agent-claude/cordis.patch.yml +8 -4
  14. package/agent-claude/dist/agent-preset-claude.js +29 -166
  15. package/agent-claude/dist/agent.js +10 -10
  16. package/agent-claude/dist/claude-client.js +22 -3
  17. package/agent-claude/dist/claude-home.js +0 -8
  18. package/agent-claude/dist/index.js +12 -15
  19. package/agent-claude/dist/session-map.js +2 -5
  20. package/agent-claude/dist/world-plugin.js +3 -3
  21. package/agent-claude/package.json +9 -9
  22. package/agent-codex/README.md +8 -8
  23. package/agent-codex/cordis.patch.yml +9 -5
  24. package/agent-codex/dist/agent-preset-codex.js +29 -168
  25. package/agent-codex/dist/agent.js +17 -12
  26. package/agent-codex/dist/codex-store.js +0 -9
  27. package/agent-codex/dist/index.js +13 -16
  28. package/agent-codex/dist/session-map.js +2 -5
  29. package/agent-codex/dist/world-plugin.js +31 -51
  30. package/agent-codex/package.json +14 -11
  31. package/agent-hermes/README.md +9 -8
  32. package/agent-hermes/cordis.patch.yml +8 -4
  33. package/agent-hermes/dist/agent-preset-hermes.js +29 -168
  34. package/agent-hermes/dist/agent.js +33 -19
  35. package/agent-hermes/dist/hermes-client.js +5 -5
  36. package/agent-hermes/dist/hermes-store.js +2 -11
  37. package/agent-hermes/dist/index.js +13 -12
  38. package/agent-hermes/dist/world-plugin.js +31 -52
  39. package/agent-hermes/package.json +14 -11
  40. package/agent-omp/README.md +2 -2
  41. package/agent-omp/cordis.patch.yml +12 -7
  42. package/agent-omp/dist/agent-preset-omp.js +30 -169
  43. package/agent-omp/dist/agent.js +13 -5
  44. package/agent-omp/dist/index.js +12 -22
  45. package/agent-omp/dist/mobile/gesture.js +2 -2
  46. package/agent-omp/dist/mobile/zoom-guard.js +4 -4
  47. package/agent-omp/dist/mobile-boot.js +2 -2
  48. package/agent-omp/dist/omp-cli.js +1 -1
  49. package/agent-omp/dist/omp-disk-discovery.js +1 -1
  50. package/agent-omp/dist/protocol.js +1 -1
  51. package/agent-omp/dist/sidecar-client.js +1 -1
  52. package/agent-omp/dist/world-plugin.js +37 -50
  53. package/agent-omp/package.json +18 -14
  54. package/agent-omp/sidecar/main.ts +2 -2
  55. package/agent-pi/README.md +5 -5
  56. package/agent-pi/cordis.patch.yml +8 -4
  57. package/agent-pi/dist/agent-preset-pi.js +29 -166
  58. package/agent-pi/dist/agent.js +18 -12
  59. package/agent-pi/dist/index.js +14 -16
  60. package/agent-pi/dist/pi-home.js +2 -12
  61. package/agent-pi/dist/world-plugin.js +31 -51
  62. package/agent-pi/package.json +14 -11
  63. package/client/index.js +1994 -150
  64. package/cordis.patch.yml +38 -15
  65. package/package.json +32 -30
  66. package/{agent-hub → superd-hub}/cordis.patch.yml +3 -3
  67. package/{agent-hub → superd-hub}/dist/agent-roster.d.ts +3 -1
  68. package/{agent-hub → superd-hub}/dist/agent-roster.js +4 -2
  69. package/superd-hub/dist/carrier.d.ts +62 -0
  70. package/superd-hub/dist/carrier.js +213 -0
  71. package/superd-hub/dist/fusion-transport.d.ts +148 -0
  72. package/superd-hub/dist/fusion-transport.js +397 -0
  73. package/{agent-hub → superd-hub}/dist/gateway.d.ts +9 -4
  74. package/superd-hub/dist/gateway.js +44 -0
  75. package/superd-hub/dist/hub-route.d.ts +74 -0
  76. package/superd-hub/dist/hub-route.js +188 -0
  77. package/{agent-hub → superd-hub}/dist/index.d.ts +14 -6
  78. package/{agent-hub → superd-hub}/dist/index.js +14 -6
  79. package/{agent-hub → superd-hub}/dist/roster.d.ts +2 -2
  80. package/{agent-hub → superd-hub}/dist/rpc.js +1 -1
  81. package/{agent-hub → superd-hub}/dist/spawn-world.d.ts +27 -6
  82. package/superd-hub/dist/spawn-world.js +279 -0
  83. package/superd-hub/dist/switch-core.d.ts +630 -0
  84. package/superd-hub/dist/switch-core.js +734 -0
  85. package/superd-hub/dist/system-head.d.ts +69 -0
  86. package/superd-hub/dist/system-head.js +194 -0
  87. package/superd-hub/dist/web-trust.d.ts +112 -0
  88. package/superd-hub/dist/web-trust.js +126 -0
  89. package/superd-hub/dist/world-entry.d.ts +38 -0
  90. package/superd-hub/dist/world-entry.js +47 -0
  91. package/{agent-hub → superd-hub}/dist/world-host.d.ts +15 -20
  92. package/superd-hub/dist/world-host.js +65 -0
  93. package/{agent-hub → superd-hub}/dist/world-join.d.ts +2 -1
  94. package/{agent-hub → superd-hub}/dist/world-join.js +30 -50
  95. package/superd-hub/dist/world-mount.d.ts +82 -0
  96. package/superd-hub/dist/world-mount.js +105 -0
  97. package/{agent-hub → superd-hub}/dist/world-mux.d.ts +21 -6
  98. package/superd-hub/dist/world-mux.js +392 -0
  99. package/{agent-hub → superd-hub}/dist/world-provision.d.ts +20 -4
  100. package/superd-hub/dist/world-provision.js +203 -0
  101. package/superd-hub/dist/world-web-server.d.ts +113 -0
  102. package/superd-hub/dist/world-web-server.js +99 -0
  103. package/superd-hub/lib/client/index.js +2086 -0
  104. package/{agent-hub → superd-hub}/package.json +12 -7
  105. package/agent-agy/dist/agent-preset-projection.d.ts +0 -31
  106. package/agent-agy/dist/agent-preset-projection.js +0 -33
  107. package/agent-claude/dist/agent-preset-projection.js +0 -30
  108. package/agent-codex/dist/agent-preset-projection.js +0 -37
  109. package/agent-codex/dist/app-home.js +0 -65
  110. package/agent-codex/dist/spike.js +0 -46
  111. package/agent-hermes/dist/agent-preset-projection.js +0 -34
  112. package/agent-hub/dist/carrier.d.ts +0 -43
  113. package/agent-hub/dist/carrier.js +0 -241
  114. package/agent-hub/dist/client-shim.d.ts +0 -28
  115. package/agent-hub/dist/client-shim.js +0 -251
  116. package/agent-hub/dist/gateway.js +0 -18
  117. package/agent-hub/dist/index-pass.d.ts +0 -22
  118. package/agent-hub/dist/index-pass.js +0 -47
  119. package/agent-hub/dist/labels.d.ts +0 -45
  120. package/agent-hub/dist/labels.js +0 -83
  121. package/agent-hub/dist/spawn-world.js +0 -72
  122. package/agent-hub/dist/world-entry.d.ts +0 -31
  123. package/agent-hub/dist/world-entry.js +0 -51
  124. package/agent-hub/dist/world-host.js +0 -44
  125. package/agent-hub/dist/world-mount.d.ts +0 -52
  126. package/agent-hub/dist/world-mount.js +0 -52
  127. package/agent-hub/dist/world-mux.js +0 -224
  128. package/agent-hub/dist/world-provision.js +0 -122
  129. package/agent-hub/dist/world-web-server.d.ts +0 -162
  130. package/agent-hub/dist/world-web-server.js +0 -248
  131. package/agent-hub/lib/client/index.js +0 -242
  132. package/agent-omp/dist/agent-preset-projection.js +0 -36
  133. package/agent-omp/dist/app-home.js +0 -86
  134. package/agent-pi/dist/agent-preset-projection.js +0 -29
  135. /package/{agent-hub → superd-hub}/dist/envelope.d.ts +0 -0
  136. /package/{agent-hub → superd-hub}/dist/envelope.js +0 -0
  137. /package/{agent-hub → superd-hub}/dist/ownership.d.ts +0 -0
  138. /package/{agent-hub → superd-hub}/dist/ownership.js +0 -0
  139. /package/{agent-hub → superd-hub}/dist/roster.js +0 -0
  140. /package/{agent-hub → superd-hub}/dist/rpc.d.ts +0 -0
  141. /package/{agent-hub → superd-hub}/dist/targets.d.ts +0 -0
  142. /package/{agent-hub → superd-hub}/dist/targets.js +0 -0
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Per-world virtual webServer (AW-B DL3; path-separation T-C silent sink →
3
+ * T-D registration-only shell).
4
+ *
5
+ * A world's plugins still declare ANY path they like (`/api`, `/plugins`,
6
+ * `/whatever-name-i-like`), and the world root still needs a `webServer`
7
+ * provider for them to bind (the `modules` row injects it; `worldMountPatches`
8
+ * pins that inject). It used to translate every registration onto ctx0's real
9
+ * webServer as `/<label>+path` — the per-label page family. T-C (2026-09-26,
10
+ * user ruling "strip off the per agent url path … no need the url path
11
+ * fallback (we have git history)") severed that: every route a world plugin
12
+ * declares is accepted and SWALLOWED — no `/<label>/…` route ever lands on
13
+ * ctx0's real webServer. T-D (2026-09-26, "disable their webui build, just
14
+ * like disable their webserver") then disabled the world webui rows
15
+ * (`web-runtime`/`client-hmr`, see `worldMountPatches`) and retired the whole
16
+ * index face with them: no `renderIndex`, no taps, no index injections, no
17
+ * client mount shim — nothing renders a world page anywhere, and the mount
18
+ * HTML pass (`index-pass.ts`) plus the shim retired with the last consumer.
19
+ *
20
+ * What REMAINS and why (the data-plane coupling the guardrail protects):
21
+ * - the `webServer` provider itself: world-tree rows (`modules`, adapter
22
+ * rows) inject/bind it; removing the provider would pend them and fail
23
+ * the world boot;
24
+ * - `stripLabelFromUrl`/`RealWebServerFace`: the `/hub` family
25
+ * (`hub-route.ts`) types ctx0's real server and strips the `/hub` prefix
26
+ * with the same URL rule;
27
+ * - the neutral `port`/`host` getters: the shape every remaining reader
28
+ * sees (a world owns no socket).
29
+ *
30
+ * The RPC channel is hub-owned: the `/hub` family (`hub-route.ts`) is the
31
+ * sole foreign entry.
32
+ */
33
+ /** Route match kind (mirrors the upstream contract). */
34
+ export type WebRouteKind = 'exact' | 'prefix';
35
+ /** The slice of node:http we touch (kept structural for testability). */
36
+ export interface WorldRequest {
37
+ url?: string;
38
+ }
39
+ export interface WorldResponse {
40
+ writeHead(status: number, headers: Record<string, string>): unknown;
41
+ end(...args: unknown[]): unknown;
42
+ }
43
+ /** A world route handler as plugins write it. */
44
+ export type WorldHandler = (req: WorldRequest, ...rest: never[]) => void | Promise<void>;
45
+ /** One named route registration (structural mirror of the upstream type). */
46
+ export interface WorldWebRoute {
47
+ kind: WebRouteKind;
48
+ path: string;
49
+ handler: (req: WorldRequest, res: WorldResponse) => void | Promise<void>;
50
+ }
51
+ /** One exact-path HTTP upgrade registration. */
52
+ export interface WorldWebUpgradeRoute {
53
+ path: string;
54
+ handler: (req: WorldRequest, socket: unknown, head: Buffer) => void | Promise<void>;
55
+ }
56
+ /**
57
+ * The real (ctx0) webServer surface — since T-C no longer reachable from a
58
+ * world mount. The type stays for the `/hub` family (`hub-route.ts`), which
59
+ * registers on ctx0's real webServer directly.
60
+ */
61
+ export interface RealWebServerFace {
62
+ register(route: {
63
+ kind: WebRouteKind;
64
+ path: string;
65
+ handler: never;
66
+ }): () => void;
67
+ registerUpgrade(route: {
68
+ path: string;
69
+ handler: never;
70
+ }): () => void;
71
+ registerFallback(handler: never): () => void;
72
+ tapIndex?(transform: (html: string) => string): () => void;
73
+ readonly port?: number;
74
+ readonly host?: string;
75
+ }
76
+ /** Remove the mount label from `req.url`, preserving the trailing query. */
77
+ export declare function stripLabelFromUrl(url: string | undefined, labelPath: string): string;
78
+ /**
79
+ * One world's web surface — a registration-only shell: it accepts every
80
+ * registration a world plugin makes (so the tree boots and composes exactly
81
+ * as before) and forwards none of them anywhere; nothing is stored, nothing
82
+ * is served (T-C), and nothing renders (T-D).
83
+ */
84
+ export declare class WorldWebServer {
85
+ readonly labelPath: string;
86
+ /**
87
+ * @param labelPath - mount root, e.g. `/omp` (no trailing slash) — the
88
+ * world's identity record; no page is ever served under it.
89
+ */
90
+ constructor(labelPath: string);
91
+ /**
92
+ * The ctx0 listener facts (read-through retired with the mount): worlds
93
+ * keep the same neutral defaults the disconnected read-through always
94
+ * fell back to — a world owns no socket and no page anyone can hit.
95
+ */
96
+ get port(): number;
97
+ /** The neutral bind host (see {@link WorldWebServer.port}). */
98
+ get host(): string;
99
+ /**
100
+ * Accept one world route — and swallow it (T-C): pages have no road to
101
+ * ctx0. The disposer is a no-op, matching the swallowed-registration
102
+ * contract the `/api` family always had.
103
+ */
104
+ register(_route: WorldWebRoute): () => void;
105
+ /** Accept one world upgrade route — and swallow it (see {@link register}). */
106
+ registerUpgrade(_route: WorldWebUpgradeRoute): () => void;
107
+ /**
108
+ * Accept the world's SPA fallback claim — and swallow it (see
109
+ * {@link register}): the ctx0 fallback seat was always native
110
+ * frontend-static's alone.
111
+ */
112
+ registerFallback(_handler: (req: WorldRequest, res: WorldResponse) => void | Promise<void>): () => void;
113
+ }
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Per-world virtual webServer (AW-B DL3; path-separation T-C silent sink →
3
+ * T-D registration-only shell).
4
+ *
5
+ * A world's plugins still declare ANY path they like (`/api`, `/plugins`,
6
+ * `/whatever-name-i-like`), and the world root still needs a `webServer`
7
+ * provider for them to bind (the `modules` row injects it; `worldMountPatches`
8
+ * pins that inject). It used to translate every registration onto ctx0's real
9
+ * webServer as `/<label>+path` — the per-label page family. T-C (2026-09-26,
10
+ * user ruling "strip off the per agent url path … no need the url path
11
+ * fallback (we have git history)") severed that: every route a world plugin
12
+ * declares is accepted and SWALLOWED — no `/<label>/…` route ever lands on
13
+ * ctx0's real webServer. T-D (2026-09-26, "disable their webui build, just
14
+ * like disable their webserver") then disabled the world webui rows
15
+ * (`web-runtime`/`client-hmr`, see `worldMountPatches`) and retired the whole
16
+ * index face with them: no `renderIndex`, no taps, no index injections, no
17
+ * client mount shim — nothing renders a world page anywhere, and the mount
18
+ * HTML pass (`index-pass.ts`) plus the shim retired with the last consumer.
19
+ *
20
+ * What REMAINS and why (the data-plane coupling the guardrail protects):
21
+ * - the `webServer` provider itself: world-tree rows (`modules`, adapter
22
+ * rows) inject/bind it; removing the provider would pend them and fail
23
+ * the world boot;
24
+ * - `stripLabelFromUrl`/`RealWebServerFace`: the `/hub` family
25
+ * (`hub-route.ts`) types ctx0's real server and strips the `/hub` prefix
26
+ * with the same URL rule;
27
+ * - the neutral `port`/`host` getters: the shape every remaining reader
28
+ * sees (a world owns no socket).
29
+ *
30
+ * The RPC channel is hub-owned: the `/hub` family (`hub-route.ts`) is the
31
+ * sole foreign entry.
32
+ */
33
+ /** Remove the mount label from `req.url`, preserving the trailing query. */
34
+ export function stripLabelFromUrl(url, labelPath) {
35
+ const raw = typeof url === 'string' && url !== '' ? url : '/';
36
+ const queryAt = raw.indexOf('?');
37
+ const path = queryAt === -1 ? raw : raw.slice(0, queryAt);
38
+ const rest = queryAt === -1 ? '' : raw.slice(queryAt);
39
+ if (path === labelPath)
40
+ return `/${rest}`;
41
+ if (path.startsWith(`${labelPath}/`))
42
+ return `${path.slice(labelPath.length)}${rest}`;
43
+ return raw;
44
+ }
45
+ /** No-op registration disposer (the swallowed-route shape). */
46
+ function swallowed() {
47
+ return () => { };
48
+ }
49
+ /**
50
+ * One world's web surface — a registration-only shell: it accepts every
51
+ * registration a world plugin makes (so the tree boots and composes exactly
52
+ * as before) and forwards none of them anywhere; nothing is stored, nothing
53
+ * is served (T-C), and nothing renders (T-D).
54
+ */
55
+ export class WorldWebServer {
56
+ labelPath;
57
+ /**
58
+ * @param labelPath - mount root, e.g. `/omp` (no trailing slash) — the
59
+ * world's identity record; no page is ever served under it.
60
+ */
61
+ constructor(labelPath) {
62
+ this.labelPath = labelPath;
63
+ if (typeof labelPath !== 'string' || !labelPath.startsWith('/') || labelPath === '/' || labelPath.endsWith('/')) {
64
+ throw new Error(`world-web-server: labelPath must start with "/" and carry no trailing slash, got ${JSON.stringify(labelPath)}`);
65
+ }
66
+ }
67
+ /**
68
+ * The ctx0 listener facts (read-through retired with the mount): worlds
69
+ * keep the same neutral defaults the disconnected read-through always
70
+ * fell back to — a world owns no socket and no page anyone can hit.
71
+ */
72
+ get port() {
73
+ return 0;
74
+ }
75
+ /** The neutral bind host (see {@link WorldWebServer.port}). */
76
+ get host() {
77
+ return '127.0.0.1';
78
+ }
79
+ /**
80
+ * Accept one world route — and swallow it (T-C): pages have no road to
81
+ * ctx0. The disposer is a no-op, matching the swallowed-registration
82
+ * contract the `/api` family always had.
83
+ */
84
+ register(_route) {
85
+ return swallowed();
86
+ }
87
+ /** Accept one world upgrade route — and swallow it (see {@link register}). */
88
+ registerUpgrade(_route) {
89
+ return swallowed();
90
+ }
91
+ /**
92
+ * Accept the world's SPA fallback claim — and swallow it (see
93
+ * {@link register}): the ctx0 fallback seat was always native
94
+ * frontend-static's alone.
95
+ */
96
+ registerFallback(_handler) {
97
+ return swallowed();
98
+ }
99
+ }