super-dsh 0.1.9 → 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 (178) 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 +1204 -93
  162. package/cordis.patch.yml +64 -0
  163. package/package.json +17 -8
  164. package/superd-hub/dist/client/agent-settings.d.ts +210 -0
  165. package/superd-hub/dist/client/agent-settings.js +300 -0
  166. package/superd-hub/dist/client/roster.js +6 -0
  167. package/superd-hub/dist/client/runtime-settings-api.d.ts +76 -0
  168. package/superd-hub/dist/client/runtime-settings-api.js +137 -0
  169. package/superd-hub/dist/client/switch.d.ts +165 -0
  170. package/superd-hub/dist/client/switch.js +295 -0
  171. package/superd-hub/lib/client/index.js +1204 -93
  172. package/agent-codex/dist/models.js +0 -152
  173. package/agent-omp/dist/sidecar-client.js +0 -195
  174. /package/{agent-agy → agent-agy-sdk}/bridge/agy_bridge.py +0 -0
  175. /package/{agent-agy → agent-agy-sdk}/bridge/gemini_openai_server.mjs +0 -0
  176. /package/{agent-codex/dist/codex-events.js → agent-codex-sdk/dist/codex-sdk-events.js} +0 -0
  177. /package/{agent-omp → agent-omp-sdk}/dist/protocol.js +0 -0
  178. /package/{agent-omp → agent-omp-sdk}/sidecar/main.ts +0 -0
@@ -0,0 +1,57 @@
1
+ /**
2
+ * OMP skills + slash-command discovery, bridged into the host's capability
3
+ * seams (`ctx.skills` + `ctx.commands`). Both services stay mounted by
4
+ * dsh-base/dsh-web-app; the bridge only supplies data/registrations — the
5
+ * UI (SkillRow, the composer `/` menu) already reads them.
6
+ *
7
+ * Sidecar-free since the sidecar-decoupling change (plan
8
+ * 2026-09-16-omp-adapter-sidecar-decoupling): both catalogs are read straight
9
+ * from disk (omp + claude user/project roots, see omp-disk-discovery). Slash
10
+ * commands mount once at boot and re-mount on the hourly discovery refresh —
11
+ * never a sidecar spawn.
12
+ *
13
+ * @module agent-omp/discovery
14
+ */
15
+ import type { Context } from "@deepseek-ai/cordis";
16
+ import { type OmpDiskSlashCommand } from "./omp-disk-discovery.js";
17
+ interface CommandRuntimeSlice {
18
+ register(definition: {
19
+ name: string;
20
+ description: string;
21
+ input?: {
22
+ hint?: string;
23
+ attachments?: boolean;
24
+ };
25
+ handler(): {
26
+ kind: "success";
27
+ text?: string;
28
+ } | {
29
+ kind: "error";
30
+ text: string;
31
+ };
32
+ }): () => void;
33
+ }
34
+ /**
35
+ * Register one set of disk-scanned OMP slash commands on the host runtime.
36
+ * The handler echoes the command body as the result text — a first-pass
37
+ * surface; a deeper integration would route execution through the bridged
38
+ * Agent. Returns a disposer for the whole set.
39
+ */
40
+ export declare function mountSlashCommands(commands: CommandRuntimeSlice, found: OmpDiskSlashCommand[]): () => void;
41
+ /**
42
+ * A refreshable slash-command mount: registers the boot scan immediately,
43
+ * then `refresh()` swaps the live set for a fresh disk scan (dispose-then-
44
+ * register, so a removed command file disappears from the `/` menu).
45
+ */
46
+ export declare function createSlashCommandMount(commands: CommandRuntimeSlice, cwd?: string): {
47
+ refresh: () => void;
48
+ disposeAll: () => void;
49
+ };
50
+ /**
51
+ * Mount OMP discovery on the host seams. Fail-open: a missing `skills` or
52
+ * `commands` service leaves the feature dormant, never blocks host boot.
53
+ *
54
+ * @param ctx - host plugin context.
55
+ */
56
+ export declare function installOmpDiscovery(ctx: Context): void;
57
+ export {};
@@ -0,0 +1,116 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { OMP_DISCOVERY_REFRESH_INTERVAL_MS } from "./knobs.js";
3
+ import { readSkills, readSlashCommands, } from "./omp-disk-discovery.js";
4
+ /** Strip a slash-command name to the host's `/^[a-z][a-z0-9_-]*$/` shape. */
5
+ function sanitizeCommandName(name) {
6
+ const cleaned = name.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+/, "").slice(0, 64);
7
+ return cleaned === "" ? "omp-command" : cleaned;
8
+ }
9
+ /**
10
+ * Register one set of disk-scanned OMP slash commands on the host runtime.
11
+ * The handler echoes the command body as the result text — a first-pass
12
+ * surface; a deeper integration would route execution through the bridged
13
+ * Agent. Returns a disposer for the whole set.
14
+ */
15
+ export function mountSlashCommands(commands, found) {
16
+ const disposers = found.map((command) => commands.register({
17
+ name: sanitizeCommandName(command.name),
18
+ description: command.description,
19
+ handler: () => ({ kind: "success", text: command.content }),
20
+ }));
21
+ return () => {
22
+ for (const dispose of disposers) {
23
+ try {
24
+ dispose();
25
+ }
26
+ catch {
27
+ // A host-side double-dispose must not break the refresh cycle.
28
+ }
29
+ }
30
+ };
31
+ }
32
+ /**
33
+ * A refreshable slash-command mount: registers the boot scan immediately,
34
+ * then `refresh()` swaps the live set for a fresh disk scan (dispose-then-
35
+ * register, so a removed command file disappears from the `/` menu).
36
+ */
37
+ export function createSlashCommandMount(commands, cwd) {
38
+ let dispose = () => { };
39
+ const refresh = () => {
40
+ dispose();
41
+ dispose = mountSlashCommands(commands, readSlashCommands(cwd));
42
+ };
43
+ refresh();
44
+ return {
45
+ refresh,
46
+ disposeAll: () => dispose(),
47
+ };
48
+ }
49
+ /**
50
+ * Mount OMP discovery on the host seams. Fail-open: a missing `skills` or
51
+ * `commands` service leaves the feature dormant, never blocks host boot.
52
+ *
53
+ * @param ctx - host plugin context.
54
+ */
55
+ export function installOmpDiscovery(ctx) {
56
+ // Skills: a discovery provider whose `list(cwd)` scans OMP's disk roots for
57
+ // the caller's workspace; the body is read lazily from SKILL.md in `get`.
58
+ ctx.inject(["skills"], (scoped) => {
59
+ const skills = scoped.get("skills");
60
+ if (skills === undefined)
61
+ return;
62
+ skills.registerProvider(() => ({
63
+ name: "omp",
64
+ list: async (options) => {
65
+ const found = readSkills(options.cwd);
66
+ return found.map((skill, rank) => ({
67
+ name: skill.name,
68
+ description: skill.description,
69
+ rank,
70
+ locator: skill.filePath,
71
+ path: skill.filePath,
72
+ invocation: { modelInvocable: true, userInvocable: true },
73
+ source: "custom",
74
+ provider: "omp",
75
+ }));
76
+ },
77
+ get: async (candidate) => {
78
+ const content = await readFile(String(candidate.locator), "utf8").catch(() => "");
79
+ return {
80
+ name: candidate.name,
81
+ description: candidate.description,
82
+ content,
83
+ invocation: { modelInvocable: true, userInvocable: true },
84
+ source: "custom",
85
+ provider: "omp",
86
+ };
87
+ },
88
+ }));
89
+ });
90
+ // Slash commands: mount the boot scan, then re-scan on the hourly discovery
91
+ // cadence (pure disk reads; `0` disables). The interval + live registrations
92
+ // are fiber-owned: torn down with the plugin context.
93
+ ctx.inject(["commands"], (scoped) => {
94
+ const commands = scoped.get("commands");
95
+ if (commands === undefined)
96
+ return;
97
+ const mount = createSlashCommandMount(commands);
98
+ let timer;
99
+ if (OMP_DISCOVERY_REFRESH_INTERVAL_MS > 0) {
100
+ timer = setInterval(() => {
101
+ try {
102
+ mount.refresh();
103
+ }
104
+ catch {
105
+ // A bad refresh must never kill the interval or the host.
106
+ }
107
+ }, OMP_DISCOVERY_REFRESH_INTERVAL_MS);
108
+ timer.unref?.();
109
+ }
110
+ ctx.effect(() => () => {
111
+ if (timer !== undefined)
112
+ clearInterval(timer);
113
+ mount.disposeAll();
114
+ }, "ompDiscovery.slashCommands");
115
+ });
116
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Minimal in-memory inbox for the OMP agent shim.
3
+ *
4
+ * The 0.1.5 `dsh-agent` contract exposes the inbox as an interface
5
+ * (`Inbox` in `runtime-types`); the durable projection-backed implementation
6
+ * (`ReactLoopInbox`) lives inside the (disabled) `dsh-agent-loop`. OMP owns
7
+ * its own transcript and the bridge delivers messages directly to the OMP
8
+ * process (`OmpAgent.#deliver`), so this inbox is never queued into — it
9
+ * exists to satisfy the `Agent` interface's `inbox` surface with correct
10
+ * (empty) semantics: `nextTurn`/`nextStep` stay empty and every mutation is
11
+ * a faithful in-memory splice.
12
+ *
13
+ * @module agent-omp/inbox
14
+ */
15
+ import type { Inbox as InboxContract, InboxTarget } from "@deepseek-ai/dsh-agent";
16
+ import type { UserMessage } from "@deepseek-ai/dsh-session";
17
+ import type { MessageId } from "@deepseek-ai/dsh-llm";
18
+ export declare class Inbox implements InboxContract {
19
+ #private;
20
+ get nextTurn(): readonly UserMessage[];
21
+ get nextStep(): readonly UserMessage[];
22
+ clear(): void;
23
+ append(target: InboxTarget, message: UserMessage): void;
24
+ prepend(target: InboxTarget, message: UserMessage): void;
25
+ replace(messageId: MessageId, newMessage: UserMessage): boolean;
26
+ remove(messageId: MessageId): boolean;
27
+ splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];
28
+ }
@@ -0,0 +1,53 @@
1
+ export class Inbox {
2
+ #nextTurn = [];
3
+ #nextStep = [];
4
+ get nextTurn() {
5
+ return this.#nextTurn;
6
+ }
7
+ get nextStep() {
8
+ return this.#nextStep;
9
+ }
10
+ clear() {
11
+ this.#nextTurn = [];
12
+ this.#nextStep = [];
13
+ }
14
+ append(target, message) {
15
+ this.#list(target).push(message);
16
+ }
17
+ prepend(target, message) {
18
+ this.#list(target).unshift(message);
19
+ }
20
+ replace(messageId, newMessage) {
21
+ const list = this.#find(messageId);
22
+ if (list === undefined)
23
+ return false;
24
+ const index = list.findIndex((message) => message.id === messageId);
25
+ if (index < 0)
26
+ return false;
27
+ list.splice(index, 1, newMessage);
28
+ return true;
29
+ }
30
+ remove(messageId) {
31
+ const list = this.#find(messageId);
32
+ if (list === undefined)
33
+ return false;
34
+ const index = list.findIndex((message) => message.id === messageId);
35
+ if (index < 0)
36
+ return false;
37
+ list.splice(index, 1);
38
+ return true;
39
+ }
40
+ splice(target, start, deleteCount, inserted) {
41
+ return this.#list(target).splice(start, deleteCount, ...inserted);
42
+ }
43
+ #list(target) {
44
+ return target === "next-turn" ? this.#nextTurn : this.#nextStep;
45
+ }
46
+ #find(messageId) {
47
+ if (this.#nextTurn.some((message) => message.id === messageId))
48
+ return this.#nextTurn;
49
+ if (this.#nextStep.some((message) => message.id === messageId))
50
+ return this.#nextStep;
51
+ return undefined;
52
+ }
53
+ }
@@ -0,0 +1,60 @@
1
+ import { Context, Service } from "@deepseek-ai/cordis";
2
+ import type { AgentFactory, AgentHandle, CreateAgentOptions, ResumeAgentOptions } from "@deepseek-ai/dsh-agent";
3
+ import { type OmpAgentRpc } from "./lazy-rpc.js";
4
+ /**
5
+ * Whether any live OMP session currently holds the SDK transport's child.
6
+ *
7
+ * The reconcile tick's catalog read is a real `omp models --json` subprocess,
8
+ * so this gate is load-bearing (AGENTS.md §五·五: the periodic tick never
9
+ * materializes a runtime). For this line the periodic path does NOT touch the
10
+ * sidecar at all — the data plane is the CLI — but the tick must still pull
11
+ * zero children, and the SDK wrapper's `spawned` is the honest fact to gate on.
12
+ * Sessions count only once they actually spawned: a draft session holds a
13
+ * `LazyOmpRpc` with no child (and no fetched runtime) yet.
14
+ * Exported beside the plugin (the cordis surface itself is unchanged) so the
15
+ * no-sidecar guard can pin this gate's truth table behaviourally — a shape
16
+ * regex alone cannot see an empty input set.
17
+ */
18
+ export declare function liveOmpSessionExists(sessions: Iterable<OmpAgentRpc>): boolean;
19
+ export declare class OmpProvider extends Service implements AgentFactory {
20
+ #private;
21
+ /**
22
+ * `agentDefaultModel` is load-bearing, not decorative: the harness owns the
23
+ * "default for new sessions" selection there (`@deepseek-ai/dsh-agent-default-model`,
24
+ * mounted by dsh-base with a hard-coded `deepseek-official/deepseek-flash`),
25
+ * and this bridge is the only thing that feeds it OMP's configured default.
26
+ * Without the inject the context cannot resolve the service, every
27
+ * `saveSelection` in #syncModelDefaultTick silently no-ops, and a fresh
28
+ * session inherits the unserved native default → `session/model-unavailable`.
29
+ */
30
+ static inject: string[];
31
+ /** Plain holder — prevents Cordis re-tracing the factory's ctx through a caller shadow. */
32
+ private readonly runtime;
33
+ /**
34
+ * The SDK transport (one sidecar pool per provider = per dsh process). Built
35
+ * here, but CONSTRUCTION-FREE: the pool is inert until the first session's
36
+ * first prompt reaches `OmpSdkSidecar#start()`.
37
+ */
38
+ private readonly transport;
39
+ /** Live SDK-backed agents by dash id, for avoidance hand-off. */
40
+ private readonly heldAgents;
41
+ /**
42
+ * Live transport wrappers by dash id — the reconcile tick's liveness gate
43
+ * (AGENTS.md §五·五): a draft session counts as live only once its
44
+ * `spawned` flips, which is exactly when the runtime fetch + sidecar start
45
+ * have happened. Entries are dropped with the handle.
46
+ */
47
+ private readonly liveSessions;
48
+ constructor(ctx: Context);
49
+ createAgent(ownerCtx: Context, options: CreateAgentOptions): Promise<AgentHandle>;
50
+ resume(ownerCtx: Context, options: ResumeAgentOptions): Promise<AgentHandle>;
51
+ /**
52
+ * Track a published RPC-backed agent, register its transport wrapper with the
53
+ * tick's liveness gate, and hand the session to the supervisor as held. Arrow
54
+ * FIELD (not a `#` method): the provider is exposed through a Cordis tracing
55
+ * proxy, and hard-private methods fail their brand check on the proxy receiver
56
+ * (the same reason setupAndPublish is module-level).
57
+ */
58
+ private readonly registerHeld;
59
+ }
60
+ export default OmpProvider;