@toddzheng024/dscode-bundle 0.3.0 → 0.5.0

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 (113) hide show
  1. package/THIRD_PARTY_NOTICES.md +15 -0
  2. package/cordis.patch.yml +5 -3
  3. package/package.json +14 -1
  4. package/plugins/clipboard-image/clipboard-image.swift +56 -0
  5. package/plugins/clipboard-image/index.mjs +70 -0
  6. package/plugins/code-review/git.mjs +95 -0
  7. package/plugins/code-review/index.mjs +88 -0
  8. package/plugins/dscode/index.mjs +17 -3
  9. package/plugins/email/cli.mjs +32 -0
  10. package/plugins/email/contacts.mjs +36 -0
  11. package/plugins/email/gmail-oauth.mjs +69 -0
  12. package/plugins/email/gmail-store.mjs +2 -0
  13. package/plugins/email/gmail.mjs +194 -0
  14. package/plugins/email/imap.mjs +136 -0
  15. package/plugins/email/inbox.d.mts +25 -0
  16. package/plugins/email/inbox.mjs +76 -0
  17. package/plugins/email/smtp.mjs +69 -0
  18. package/plugins/email/store.mjs +32 -0
  19. package/plugins/email-tools/index.mjs +44 -0
  20. package/plugins/session-metrics/index.mjs +6 -2
  21. package/plugins/session-metrics/rate.mjs +62 -0
  22. package/plugins/session-metrics/view.mjs +15 -9
  23. package/plugins/tui-tools/doctor-cli.mjs +22 -0
  24. package/plugins/tui-tools/doctor.mjs +141 -0
  25. package/plugins/tui-tools/index.mjs +14 -6
  26. package/plugins/ultra/policy.mjs +12 -1
  27. package/plugins/worktree-subagent/worktree.mjs +50 -0
  28. package/presets/dscode/agent.cordis.yml +7 -2
  29. package/vendor/deepseek/index.js +12 -2
  30. package/vendor/subagent/index.js +29 -9
  31. package/vendor/subagent-core/LICENSE +21 -0
  32. package/vendor/subagent-core/index.js +3232 -0
  33. package/vendor/subagent-core/invariant.js +76 -0
  34. package/vendor/subagent-core/typert.host.d.ts +3 -0
  35. package/vendor/subagent-core/typert.host.js +964 -0
  36. package/vendor/subagent-core/typert.remote-client.d.ts +27 -0
  37. package/vendor/subagent-core/typert.remote-client.js +160 -0
  38. package/vendor/subagent-core/types/assistant-output.d.ts +48 -0
  39. package/vendor/subagent-core/types/assistant-output.js +73 -0
  40. package/vendor/subagent-core/types/catalog.d.ts +77 -0
  41. package/vendor/subagent-core/types/catalog.js +103 -0
  42. package/vendor/subagent-core/types/child-agent.d.ts +150 -0
  43. package/vendor/subagent-core/types/child-agent.js +207 -0
  44. package/vendor/subagent-core/types/client.d.ts +8 -0
  45. package/vendor/subagent-core/types/client.js +7 -0
  46. package/vendor/subagent-core/types/continuation-activation.d.ts +251 -0
  47. package/vendor/subagent-core/types/continuation-activation.js +663 -0
  48. package/vendor/subagent-core/types/continuation-messages.d.ts +62 -0
  49. package/vendor/subagent-core/types/continuation-messages.js +102 -0
  50. package/vendor/subagent-core/types/continuation.d.ts +124 -0
  51. package/vendor/subagent-core/types/continuation.js +455 -0
  52. package/vendor/subagent-core/types/control-types.d.ts +146 -0
  53. package/vendor/subagent-core/types/control-types.js +9 -0
  54. package/vendor/subagent-core/types/control.d.ts +71 -0
  55. package/vendor/subagent-core/types/control.js +116 -0
  56. package/vendor/subagent-core/types/depth.d.ts +31 -0
  57. package/vendor/subagent-core/types/depth.js +39 -0
  58. package/vendor/subagent-core/types/descriptor.d.ts +144 -0
  59. package/vendor/subagent-core/types/descriptor.js +193 -0
  60. package/vendor/subagent-core/types/error.d.ts +11 -0
  61. package/vendor/subagent-core/types/error.js +14 -0
  62. package/vendor/subagent-core/types/inbox.d.ts +43 -0
  63. package/vendor/subagent-core/types/inbox.js +61 -0
  64. package/vendor/subagent-core/types/index.d.ts +316 -0
  65. package/vendor/subagent-core/types/index.js +511 -0
  66. package/vendor/subagent-core/types/internal.d.ts +58 -0
  67. package/vendor/subagent-core/types/internal.js +58 -0
  68. package/vendor/subagent-core/types/invariant.d.ts +13 -0
  69. package/vendor/subagent-core/types/invariant.js +91 -0
  70. package/vendor/subagent-core/types/lifecycle.d.ts +113 -0
  71. package/vendor/subagent-core/types/lifecycle.js +178 -0
  72. package/vendor/subagent-core/types/list-children.d.ts +65 -0
  73. package/vendor/subagent-core/types/list-children.js +381 -0
  74. package/vendor/subagent-core/types/out-of-process.d.ts +118 -0
  75. package/vendor/subagent-core/types/out-of-process.js +219 -0
  76. package/vendor/subagent-core/types/projection-types.d.ts +74 -0
  77. package/vendor/subagent-core/types/projection-types.js +7 -0
  78. package/vendor/subagent-core/types/projection.d.ts +95 -0
  79. package/vendor/subagent-core/types/projection.js +151 -0
  80. package/vendor/subagent-core/types/run-settlement.d.ts +17 -0
  81. package/vendor/subagent-core/types/run-settlement.js +70 -0
  82. package/vendor/subagent-core/types/types.d.ts +377 -0
  83. package/vendor/subagent-core/types/types.js +19 -0
  84. package/vendor/subagent-driver/LICENSE +21 -0
  85. package/vendor/subagent-driver/index.js +255 -0
  86. package/vendor/subagent-driver/types/index.d.ts +33 -0
  87. package/vendor/subagent-driver/types/structured.d.ts +42 -0
  88. package/vendor/subagent-fork/LICENSE +21 -0
  89. package/vendor/subagent-fork/index.js +61 -0
  90. package/vendor/subagent-fork/types/index.d.ts +20 -0
  91. package/vendor/subagent-spawn/LICENSE +21 -0
  92. package/vendor/subagent-spawn/index.js +45 -0
  93. package/vendor/subagent-spawn/types/index.d.ts +19 -0
  94. package/vendor/terminal/LICENSE +21 -0
  95. package/vendor/terminal/index.js +1013 -0
  96. package/vendor/terminal/types/config.d.ts +71 -0
  97. package/vendor/terminal/types/index.d.ts +36 -0
  98. package/vendor/terminal/types/sanitize.d.ts +47 -0
  99. package/vendor/terminal/types/session.d.ts +87 -0
  100. package/vendor/tui/dscode-clipboard-image/clipboard-image.swift +56 -0
  101. package/vendor/tui/dscode-clipboard-image/index.mjs +70 -0
  102. package/vendor/tui/dscode-email/cli.mjs +32 -0
  103. package/vendor/tui/dscode-email/contacts.mjs +36 -0
  104. package/vendor/tui/dscode-email/gmail-oauth.mjs +69 -0
  105. package/vendor/tui/dscode-email/gmail-store.mjs +2 -0
  106. package/vendor/tui/dscode-email/gmail.mjs +194 -0
  107. package/vendor/tui/dscode-email/imap.mjs +136 -0
  108. package/vendor/tui/dscode-email/inbox.d.mts +25 -0
  109. package/vendor/tui/dscode-email/inbox.mjs +76 -0
  110. package/vendor/tui/dscode-email/smtp.mjs +69 -0
  111. package/vendor/tui/dscode-email/store.mjs +32 -0
  112. package/vendor/tui/dscode-email.mjs +69 -0
  113. package/vendor/tui/index.mjs +473 -82
@@ -0,0 +1,316 @@
1
+ /**
2
+ * Service Definition for the subagent capability seam (`ctx.subagents`): a named-provider registry plus a
3
+ * capability-validating asynchronous start API. Providers establish a
4
+ * child before returning its run, so fulfillment is the single publication and
5
+ * ownership-transfer boundary.
6
+ *
7
+ * Multiple providers coexist: each registers under a unique name and callers
8
+ * select one by name.
9
+ *
10
+ * This package owns the Service Definition role of the capability seam. Service Providers
11
+ * (`@deepseek-ai/dsh-subagent-spawn-in-process`, `-fork`, `-acp`) and the model-facing
12
+ * consumer (`@deepseek-ai/dsh-tool-subagent`) are separate packages.
13
+ *
14
+ * Public operations express caller intent: `start` returns one published owned
15
+ * one-shot run, `startContinuable` establishes a durable continuable child, and
16
+ * `sendMessage` steers between adjacent Agents without exposing whether a child
17
+ * is resident. Continuable children never become a {@link SubagentRun}: the
18
+ * continuation manager holds their `AgentHandle` directly and orders every turn
19
+ * through the child's own inbox, so providers contribute only the detached
20
+ * creation spec and see no handle, turn, or teardown. Child and descendant
21
+ * discovery read the live session store and optional session persistence
22
+ * directly and do not require that continuation runtime.
23
+ *
24
+ * Same-process providers are trusted typed collaborators. Requests, provider
25
+ * descriptors, results, and lifecycle payloads are borrowed immutable values;
26
+ * serialization and hostile-input validation belong at real process, worker,
27
+ * persistence, and model boundaries.
28
+ *
29
+ * @module @deepseek-ai/dsh-subagent
30
+ */
31
+ import { Context } from '@deepseek-ai/cordis';
32
+ import type { Scoped } from '@deepseek-ai/dsh-scope';
33
+ import type { ContentBlock, MessageId } from '@deepseek-ai/dsh-llm';
34
+ import type { Agent } from '@deepseek-ai/dsh-agent';
35
+ import type { SessionId } from '@deepseek-ai/dsh-session';
36
+ import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
37
+ import type { SubagentCatalog, SubagentInterruptReceipt, SubagentPromptReceipt, SubagentPromptRequest } from './control-types.ts';
38
+ import type { ContinuableStart, ContinuableStartSpec, SubagentInterruptAuthority, SubagentProvider, SubagentRun, SubagentRunEndInfo, SubagentRunInfo, SubagentSendMessageOptions, SubagentStartRequest } from './types.ts';
39
+ import type { SubagentDescendantListEntry, SubagentListEntry } from './list-children.ts';
40
+ import { deliverSubagentPrompt } from './internal.ts';
41
+ export type {} from './catalog.ts';
42
+ export * from './out-of-process.ts';
43
+ export { AssistantOutputFold, finalAssistantOutput } from './assistant-output.ts';
44
+ export { SubagentRunId } from './types.ts';
45
+ export type { ContinuableCreateRequest, ContinuableCreateSpec, ContinuableStart, ContinuableStartSpec, ResolvedSubagentStartRequest, SubagentCapabilities, SubagentInterruptAuthority, SubagentProvider, SubagentResult, SubagentRun, SubagentSendMessageOptions, SubagentStartRequest, SubagentStopReason, SubagentStopReasonMap, } from './types.ts';
46
+ export { foldSubagentDescriptor, snapshotSubagentDescriptor, SUBAGENT_DESCRIPTOR_VERSION, } from './descriptor.ts';
47
+ export type { ContinuableSubagentDescriptorData, ContinuableSubagentDescriptorInput, OneShotSubagentDescriptorData, OneShotSubagentDescriptorInput, SubagentDescriptorData, SubagentDescriptorInput, } from './descriptor.ts';
48
+ export { SubagentError } from './error.ts';
49
+ export { settleRun } from './run-settlement.ts';
50
+ export { assertSubagentMaxDepth, delegationDepthOf } from './depth.ts';
51
+ export { appendDelegatedPolicyOverrides, applyChildComposition, captureDelegatedPolicyOverrides, childSessionMeta, parentAgentOptionsForDelegation, resolveChildAgentOptions, resolveChildDepth, SubagentDepthError, } from './child-agent.ts';
52
+ export type { ChildComposition, DelegatedPolicyOverrides } from './child-agent.ts';
53
+ export type { AgentMessageSource, SubagentSettledMessageSource } from './continuation-messages.ts';
54
+ export type * from './control-types.ts';
55
+ export type { SubagentDescendantListEntry } from './list-children.ts';
56
+ export type { SubagentRunEndInfo, SubagentRunInfo } from './types.ts';
57
+ export type { SubagentIdentityProjection, SubagentTimingProjection } from './projection-types.ts';
58
+ declare module '@deepseek-ai/cordis' {
59
+ interface Context {
60
+ subagents: SubagentRuntime;
61
+ }
62
+ interface Events {
63
+ /**
64
+ * A provider became resolvable in the registry.
65
+ * @param provider - the registered provider.
66
+ * @mode emit
67
+ */
68
+ 'subagent/provider-added'(provider: SubagentProvider): void;
69
+ /**
70
+ * A provider left the registry. Accepted runs remain holder-owned.
71
+ * @param name - the provider name that no longer resolves.
72
+ * @mode emit
73
+ */
74
+ 'subagent/provider-removed'(name: string): void;
75
+ /**
76
+ * A provider established a published child. For in-process providers,
77
+ * `ctx.agents.get(info.id)` resolves during this notification.
78
+ * Scope-filtered dispatch keys the carrier by the delegating parent, so a
79
+ * parent-scoped listener observes only its own delegations. Paired with
80
+ * `subagent/end`.
81
+ * @param info - the provider and published child identity.
82
+ * @dshScopeScan unsupported
83
+ * @mode emit
84
+ */
85
+ 'subagent/start'(this: Scoped<SubagentRuntime>, info: SubagentRunInfo): void;
86
+ /**
87
+ * A published child settled. Scope-filtered dispatch uses the same delegating
88
+ * parent carrier as `subagent/start`, so the lifecycle pair reaches the
89
+ * same scoped audience.
90
+ * @param info - the run identity and terminal outcome.
91
+ * @dshScopeScan unsupported
92
+ * @mode emit
93
+ */
94
+ 'subagent/end'(this: Scoped<SubagentRuntime>, info: SubagentRunEndInfo): void;
95
+ }
96
+ }
97
+ /** Named provider registry with one-shot runs, durable discovery, and continuable-child operations. */
98
+ export declare class SubagentRuntime extends TypertRemoteService {
99
+ private providers;
100
+ private continuations;
101
+ /**
102
+ * The contained lifecycle-edge publisher. Built here because scoped dispatch
103
+ * keys its carrier by this exact service instance, whose own context filter
104
+ * composes into the carrier.
105
+ */
106
+ private readonly emitLifecycle;
107
+ constructor(ctx: Context);
108
+ /**
109
+ * Establish one durable continuable child and deliver its initial prompt.
110
+ * Resolves when the child's inbox accepts that prompt, without waiting for the
111
+ * turn to start or for the message to reach the Session log; any earlier
112
+ * failure rejects with no ids and rolls back the child entirely.
113
+ * @param spec - provider, delegation request, and caller cancellation.
114
+ * @returns the durable child id and the accepted prompt's message id.
115
+ * @throws when continuation services are unavailable or materialization fails.
116
+ */
117
+ startContinuable(spec: ContinuableStartSpec): Promise<ContinuableStart>;
118
+ /**
119
+ * Steer one model-authored message to the sender's direct parent or direct
120
+ * continuable child. A running target admits it at the nearest step boundary;
121
+ * an idle target starts a turn, and an absent direct child cold-resumes from
122
+ * persistence. The service derives durable sender attribution from the exact
123
+ * live sender. Caller cancellation stops only pre-acceptance work.
124
+ * @param sender - exact live Agent authorizing and originating the message.
125
+ * @param targetId - durable direct-parent or direct-child session id.
126
+ * @param content - model-authored content to deliver.
127
+ * @param options - caller cancellation before inbox acceptance.
128
+ * @returns the accepted message's inbox id.
129
+ * @throws when continuation services are unavailable, adjacency is rejected,
130
+ * or the message was not admitted.
131
+ */
132
+ sendMessage(sender: Agent, targetId: SessionId, content: ContentBlock[], options: SubagentSendMessageOptions): Promise<MessageId>;
133
+ /**
134
+ * Deliver one host-protocol message to a direct continuable child.
135
+ * Symbol-keyed so host adapters can preserve their own provenance without
136
+ * widening the public Service Definition or impersonating an Agent sender.
137
+ * @param parent - exact live direct parent authorizing delivery.
138
+ * @param childId - durable direct-child session id.
139
+ * @param content - host-authored content to deliver.
140
+ * @param source - durable host-protocol provenance.
141
+ * @param signal - caller cancellation before inbox acceptance.
142
+ * @param delivery - Queue as a distinct turn or Steer at the nearest step.
143
+ * @returns the accepted message's inbox id.
144
+ */
145
+ private [deliverSubagentPrompt];
146
+ /**
147
+ * Interrupt one live continuable child's current turn under a human parent
148
+ * address or an exact live ancestor Agent. Fire-and-return: the cancel
149
+ * signal is issued before this returns, but the target may keep running
150
+ * until it observes the signal. Unclaimed pending inbox work, the Activation,
151
+ * and published descendants are preserved; claimed work is not requeued.
152
+ * Once the interrupted driver is idle, a waking send resumes the parked FIFO
153
+ * queue. An absent target — including a one-shot or unknown id —
154
+ * is an accepted no-op, as is a manager-less composition, which cannot own a
155
+ * live Activation.
156
+ * @param targetSessionId - the durable child session id to interrupt.
157
+ * @param authority - the human parent address or exact live ancestor Agent.
158
+ * @throws {SubagentError} `UNAUTHORIZED` when the authority does not own the
159
+ * live target.
160
+ */
161
+ interrupt(targetSessionId: SessionId, authority: SubagentInterruptAuthority): void;
162
+ /**
163
+ * Close continuable admission below exact live parent Agents, stop only their
164
+ * visible descendant Activations synchronously, then await admitted scoped
165
+ * materializations and release those forests child-first. The scoped cutoff
166
+ * lasts until each exact parent leaves the registry; unrelated parent trees
167
+ * remain live.
168
+ * @param parents - exact host-owned parent Agents entering teardown.
169
+ * @returns once every retained descendant Activation released its `AgentHandle`.
170
+ * @throws an aggregate error after all branches settle when any failed.
171
+ */
172
+ drainContinuableDescendants(parents: readonly Agent[]): Promise<void>;
173
+ /**
174
+ * Release selected resident continuable direct children of one exact live
175
+ * parent. Other children of the same parent remain admitted and resident.
176
+ * Absent targets and a manager-less composition are accepted no-ops.
177
+ * @param parent - exact live direct parent authorizing the selected release.
178
+ * @param childIds - durable direct-child ids to release when resident.
179
+ * @returns once every selected Activation released its `AgentHandle`.
180
+ * @throws {SubagentError} `UNAUTHORIZED` when a resident target belongs to a
181
+ * different parent or the supplied parent identity is stale.
182
+ */
183
+ drainContinuableChildren(parent: Agent, childIds: readonly SessionId[]): Promise<void>;
184
+ /**
185
+ * Enumerate the parent's direct session-backed subagents without loading or
186
+ * resuming an Agent. The Session query service supplies one live-preferred
187
+ * corpus and shared point observations; the projection cache supplies
188
+ * immutable descriptor hits without opening cold logs. The registered
189
+ * `subagent` projection remains the sole mode/label classifier.
190
+ *
191
+ * Every query receives `signal`, and the listing rechecks cancellation
192
+ * around each await. Read rejections that settle
193
+ * after an abort become a stable `SubagentError` with code `CANCELLED`.
194
+ * @param parentSessionId - parent session whose direct children are listed.
195
+ * @param signal - caller-owned cancellation forwarded to Session queries
196
+ * and observed around every read await.
197
+ * @returns children and per-child diagnostics ordered by `createdAt`, then id.
198
+ * @throws {@link SubagentError} when the projection registry or the session
199
+ * store is not mounted, or the caller cancels the listing.
200
+ */
201
+ listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<SubagentListEntry[]>;
202
+ /**
203
+ * Enumerate the root's complete session-backed subagent tree in stable
204
+ * pre-order from one live-preferred corpus, without loading or resuming an
205
+ * Agent. Ordinary sessions and one-shot children remain traversal nodes so
206
+ * continuable descendants below them are discovered; each returned entry
207
+ * adds its durable `parentId` and root-relative `depth`. Identity resolution,
208
+ * diagnostics, optional persistence, and cancellation follow the same
209
+ * projection-backed contract as {@link listChildren}.
210
+ * @param rootSessionId - session whose complete descendant tree is listed.
211
+ * @param signal - caller-owned cancellation forwarded to persistence reads
212
+ * and observed around every read await.
213
+ * @returns children and per-candidate diagnostics with tree position, in
214
+ * stable pre-order.
215
+ * @throws {@link SubagentError} under the same conditions as {@link listChildren}.
216
+ */
217
+ listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<SubagentDescendantListEntry[]>;
218
+ /**
219
+ * Remote face of {@link listChildren} for one browser: the durable listing
220
+ * plus live Agent activity and the delivery-time parent availability hint.
221
+ * Parent availability is a hint; {@link prompt} performs the authoritative
222
+ * check. Named apart from the provider-name {@link list}, which owns the
223
+ * member.
224
+ * @param parentSessionId - parent session whose direct children are listed.
225
+ * @param signal - carrier cancellation forwarded to Session queries.
226
+ * @returns the catalog view for that parent.
227
+ * @throws {RemoteError} `gateway/bad-request` for an empty parent id,
228
+ * `gateway/cancelled` for an aborted read, `subagent/projections-unavailable` when
229
+ * the deployment has no projection registry, otherwise `gateway/internal`.
230
+ */
231
+ remoteExportList(parentSessionId: SessionId, signal: AbortSignal): Promise<SubagentCatalog>;
232
+ /**
233
+ * Deliver one browser-authored message to a continuable child through the
234
+ * exact live direct parent, retaining the caller-minted request identity and
235
+ * validated browser zone on the accepted message. Success identifies the
236
+ * message the child's inbox accepted; later execution is independent of this
237
+ * call. Queue delivery targets a later turn; steer delivery targets the
238
+ * nearest step and retains the Agent loop's best-effort fallback semantics.
239
+ * Image parts are admitted and persisted through the attachment store
240
+ * before delivery, and the child's model must accept image input.
241
+ * @param request - durable address, delivery, minted identity, content, and optional browser zone.
242
+ * @param signal - carrier cancellation, owning the call until inbox acceptance.
243
+ * @returns the accepted message's inbox identity.
244
+ * @throws {RemoteError} `gateway/bad-request`, `subagent/attachment-invalid`,
245
+ * `subagent/invalid-time-zone`, `subagent/parent-unavailable`,
246
+ * `subagent/not-resumable`, `subagent/unauthorized`,
247
+ * `subagent/delivery-unavailable`, `gateway/cancelled`, or `gateway/internal`.
248
+ */
249
+ prompt(request: SubagentPromptRequest, signal: AbortSignal): Promise<SubagentPromptReceipt>;
250
+ /**
251
+ * Remote face of {@link interrupt} under one durable parent address. No
252
+ * catalog, history, persistence, or parent Agent lookup runs: the core
253
+ * primitive alone authorizes the address against the live Activation, which
254
+ * is what keeps a live child interruptible while its parent Agent is offline.
255
+ * Absent, idle, and already-completed targets are accepted no-ops there.
256
+ * @param childSessionId - durable child session id to interrupt.
257
+ * @param parentSessionId - durable direct parent whose authority is claimed.
258
+ * @param mode - required continuable-address discriminator.
259
+ * @returns acknowledgement that the cancel signal was admitted, not that the target is quiescent.
260
+ * @throws {RemoteError} `gateway/bad-request` for an empty id,
261
+ * `subagent/unauthorized` when the address does not own the live target,
262
+ * otherwise `gateway/internal`.
263
+ */
264
+ interruptByParent(childSessionId: SessionId, parentSessionId: SessionId, mode: 'continuable'): SubagentInterruptReceipt;
265
+ /**
266
+ * Register a provider under its name. Registration is effect-scoped and HMR
267
+ * safe; removing a provider blocks new starts but does not revoke runs that
268
+ * were already returned to their holders.
269
+ * @param provider - the trusted provider implementation.
270
+ * @returns the exact Cordis effect disposer.
271
+ */
272
+ registerProvider(provider: SubagentProvider): () => void;
273
+ /**
274
+ * Look up a provider by name.
275
+ * @param name - the provider name.
276
+ * @returns the provider, or undefined when absent.
277
+ */
278
+ getProvider(name: string): SubagentProvider | undefined;
279
+ /**
280
+ * List registered provider names in insertion order.
281
+ * @returns the registered names.
282
+ */
283
+ list(): string[];
284
+ /**
285
+ * Establish a published child on the named provider. Capability and semantic
286
+ * checks run before delegation. Provider ownership lasts until its promise
287
+ * fulfills; a rejection therefore has no run for the caller to dispose and
288
+ * emits no run lifecycle events. Post-publication turn and infrastructure
289
+ * failures settle through the returned run.
290
+ * A catalog append failure disposes the run and handles its result rejection;
291
+ * the caller receives the catalog error even if disposal also fails.
292
+ * @param name - the provider to use.
293
+ * @param request - child label, prompt, parent, signal, and optional capabilities.
294
+ * @returns the published holder-owned run.
295
+ */
296
+ start(name: string, request: SubagentStartRequest): Promise<SubagentRun>;
297
+ /**
298
+ * Resolve one provider's detached continuable-creation contribution. Method
299
+ * presence on the provider IS the capability, so a provider without it is
300
+ * rejected before the manager reserves any child resources.
301
+ */
302
+ private prepareContinuable;
303
+ /** Look up a provider for dispatch or fail loud. */
304
+ private expectProvider;
305
+ /** Resolve the optional continuable-subagent manager or fail loud. */
306
+ private requireContinuations;
307
+ /**
308
+ * Build the lifecycle observer for one continuable Activation's residency
309
+ * epoch, so the manager publishes its edges without owning event dispatch.
310
+ */
311
+ private observeActivation;
312
+ /** Reject the first requested capability that the provider lacks. */
313
+ private assertCapabilities;
314
+ }
315
+ export default SubagentRuntime;
316
+ //# sourceMappingURL=index.d.ts.map