|
|
@@ -542,7 +542,7 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
|
|
|
},
|
|
|
{
|
|
|
signature: 'async prepare( agent: Agent, content: ContentBlock[], references: SessionReferenceInput[], signal?: AbortSignal, ): Promise<PreparedReferencedMessage>',
|
|
|
- jsDoc: '/**\n * Snapshot all references before enqueue and return one aggregated durable context.\n * @param agent - target agent; references to it are rejected.\n * @param content - already host-normalized readable message content.\n * @param references - structured source sessions in mention order.\n * @param signal - optional cancellation boundary for host request teardown.\n * @returns detached content and zero or one prepared contexts.\n */',
|
|
|
+ jsDoc: '/**\n * Snapshot all references before enqueue and return one aggregated durable context.\n * @param agent - target agent; references to it are rejected.\n * @param content - already host-normalized readable message content.\n * @param references - structured source sessions in mention order.\n * @param signal - optional cancellation boundary for host request teardown.\n * @returns detached content and optional referenced-session context.\n */',
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
@@ -899,7 +899,7 @@ export const EVENT_API: readonly EventApiEntry[] = [
|
|
|
name: 'agent/inbox/discard',
|
|
|
mode: 'emit',
|
|
|
signature: '\'agent/inbox/discard\'(this: Scoped<Agent>, agent: Agent, messages: AgentMessage[]): void',
|
|
|
- jsDoc: '/**\n * Pending inbox items were dropped without delivering them, so every\n * enqueued id receives exactly one terminal `agent/inbox/dequeue` OR\n * `agent/inbox/discard`. Emitters: `cancel()` without `keepInbox` (after\n * `agent/cancel-requested`, before the abort); a terminal `agent/turn-stop`\n * dropping pending steering (in-turn and on the post-turn late-steering\n * drain); and disposal of any still-pending items (before\n * `agent/status(\'disposed\')`). Fires once per drop with every dropped item.\n * @param agent - the agent whose inbox items were dropped.\n * @param messages - the discarded messages in FIFO order (queued then steering); never empty.\n * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.\n * @mode emit\n */',
|
|
|
+ jsDoc: '/**\n * Pending inbox items were dropped without delivering them, so every\n * enqueued id receives exactly one terminal `agent/inbox/dequeue` OR\n * `agent/inbox/discard`. `cancel()` without `keepInbox`, including disposal,\n * emits this after `agent/cancel-requested` when applicable and before\n * aborting the active work. Fires once per drop with every dropped item.\n * @param agent - the agent whose inbox items were dropped.\n * @param messages - the discarded messages in FIFO order (queued then steering); never empty.\n * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.\n * @mode emit\n */',
|
|
|
summary: 'Pending inbox items were dropped without delivering them, so every enqueued id receives exactly one terminal `agent/inbox/dequeue` OR `agent/inbox/discard`.',
|
|
|
},
|
|
|
{
|
|
|
@@ -913,7 +913,7 @@ export const EVENT_API: readonly EventApiEntry[] = [
|
|
|
name: 'agent/prompt-submit',
|
|
|
mode: 'waterfall',
|
|
|
signature: '\'agent/prompt-submit\'(this: Scoped<Agent>, agent: Agent, content: ContentBlock[], source: MessageSource, signal: AbortSignal, next: () => Promise<PromptDecision>): Promise<PromptDecision>',
|
|
|
- jsDoc: '/**\n * Allow, rewrite, or block one claimed prompt before it becomes a user\n * message. Call `next()` for the unchanged default, including contexts\n * captured with the queued item. The signal controls only this turn;\n * listeners may cooperate with it but must not retain it for another turn.\n * @param agent - the agent whose turn claimed the message.\n * @param content - the claimed message\'s blocks, as queued.\n * @param source - the message\'s resolved source.\n * @param signal - the current turn\'s explicit abort signal.\n * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.\n * @mode waterfall\n */',
|
|
|
+ jsDoc: '/**\n * Allow, rewrite, or block one claimed prompt before it becomes a user\n * message. Call `next()` for the unchanged default. The signal controls only this turn;\n * listeners may cooperate with it but must not retain it for another turn.\n * @param agent - the agent whose turn claimed the message.\n * @param content - the claimed message\'s blocks, as queued.\n * @param source - the message\'s resolved source.\n * @param signal - the current turn\'s explicit abort signal.\n * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.\n * @mode waterfall\n */',
|
|
|
summary: 'Allow, rewrite, or block one claimed prompt before it becomes a user message.',
|
|
|
},
|
|
|
{
|
|
|
@@ -1151,6 +1151,10 @@ export const EVENT_API: readonly EventApiEntry[] = [
|
|
|
|
|
|
/** Shapes of every exported type the SERVICE_API signatures reference (transitively), sorted by name. */
|
|
|
export const TYPE_API: readonly TypeApiEntry[] = [
|
|
|
+ {
|
|
|
+ name: 'AdditionalContext',
|
|
|
+ declaration: 'export interface AdditionalContext {\n content: ContentBlock[];\n source: MessageSource;\n}',
|
|
|
+ },
|
|
|
{
|
|
|
name: 'Agent',
|
|
|
declaration: 'export abstract class Agent {\n abstract readonly id: SessionId;\n abstract readonly options: AgentOptions;\n abstract readonly session: Session;\n abstract readonly status: AgentStatus;\n abstract readonly ctx: Context;\n abstract send(content: ContentBlock[], options?: SendOptions): AgentMessageId;\n abstract cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n abstract whenIdle(): Promise<void>;\n followup(content: ContentBlock[], options?: AliasSendOptions): AgentMessageId;\n steer(content: ContentBlock[], options?: AliasSendOptions): AgentMessageId;\n inject(content: ContentBlock[], options?: AliasSendOptions): AgentMessageId;\n abstract retry(): void;\n}',
|
|
|
@@ -1181,7 +1185,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
|
|
|
},
|
|
|
{
|
|
|
name: 'AliasSendOptions',
|
|
|
- declaration: 'export type AliasSendOptions = Omit<SendOptions, \'target\' | \'wakeup\'>;',
|
|
|
+ declaration: 'export interface AliasSendOptions {\n source?: MessageSource;\n}',
|
|
|
},
|
|
|
{
|
|
|
name: 'ApprovalOutcome',
|
|
|
@@ -1491,10 +1495,6 @@ export const TYPE_API: readonly TypeApiEntry[] = [
|
|
|
name: 'GoalView',
|
|
|
declaration: 'export interface GoalView extends GoalSnapshot {\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n readonly activation: GoalActivation;\n}',
|
|
|
},
|
|
|
- {
|
|
|
- name: 'HookContext',
|
|
|
- declaration: 'export interface HookContext {\n content: ContentBlock[];\n source: MessageSource;\n placement?: \'separate\' | \'prompt-prefix\';\n}',
|
|
|
- },
|
|
|
{
|
|
|
name: 'InvariantFailure',
|
|
|
declaration: 'export type InvariantFailure = (message: string) => never;',
|
|
|
@@ -1569,7 +1569,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
|
|
|
},
|
|
|
{
|
|
|
name: 'PreparedReferencedMessage',
|
|
|
- declaration: 'export interface PreparedReferencedMessage {\n content: ContentBlock[];\n contexts: HookContext[];\n}',
|
|
|
+ declaration: 'export interface PreparedReferencedMessage {\n content: ContentBlock[];\n additionalContext?: AdditionalContext;\n}',
|
|
|
},
|
|
|
{
|
|
|
name: 'PresetOption',
|
|
|
@@ -1585,15 +1585,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
|
|
|
},
|
|
|
{
|
|
|
name: 'PromptMessageData',
|
|
|
- declaration: 'export interface PromptMessageData {\n content: ContentBlock[];\n source: MessageSource;\n envelope?: PromptMessageEnvelope;\n}',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'PromptMessageEnvelope',
|
|
|
- declaration: 'export interface PromptMessageEnvelope {\n displayContent: ContentBlock[];\n prefixContexts: PromptPrefixContext[];\n}',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'PromptPrefixContext',
|
|
|
- declaration: 'export interface PromptPrefixContext {\n source: MessageSource;\n}',
|
|
|
+ declaration: 'export interface PromptMessageData {\n content: ContentBlock[];\n source: MessageSource;\n}',
|
|
|
},
|
|
|
{
|
|
|
name: 'PromptSection',
|
|
|
@@ -1725,7 +1717,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
|
|
|
},
|
|
|
{
|
|
|
name: 'SendOptions',
|
|
|
- declaration: 'export interface SendOptions {\n target?: SendTarget;\n wakeup?: boolean;\n source?: MessageSource;\n contexts?: HookContext[];\n}',
|
|
|
+ declaration: 'export interface SendOptions {\n target: SendTarget;\n wakeup: boolean;\n source: MessageSource;\n}',
|
|
|
},
|
|
|
{
|
|
|
name: 'SendTarget',
|
|
|
@@ -2105,7 +2097,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
|
|
|
},
|
|
|
{
|
|
|
name: 'ToolExecutionFailure',
|
|
|
- declaration: 'export interface ToolExecutionFailure {\n readonly isError: true;\n readonly error: ToolFailure;\n readonly value?: never;\n readonly content: ContentBlock[];\n readonly meta?: JsonValue;\n readonly additionalContexts?: HookContext[];\n readonly concludesTurn?: never;\n}',
|
|
|
+ declaration: 'export interface ToolExecutionFailure {\n readonly isError: true;\n readonly error: ToolFailure;\n readonly value?: never;\n readonly content: ContentBlock[];\n readonly meta?: JsonValue;\n readonly additionalContexts?: AdditionalContext[];\n readonly concludesTurn?: never;\n}',
|
|
|
},
|
|
|
{
|
|
|
name: 'ToolExecutionInput',
|
|
|
@@ -2121,7 +2113,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
|
|
|
},
|
|
|
{
|
|
|
name: 'ToolExecutionSuccess',
|
|
|
- declaration: 'export interface ToolExecutionSuccess {\n readonly isError: false;\n readonly value: JsonValue;\n readonly content: ContentBlock[];\n readonly error?: never;\n readonly meta?: JsonValue;\n readonly additionalContexts?: HookContext[];\n readonly concludesTurn?: true;\n}',
|
|
|
+ declaration: 'export interface ToolExecutionSuccess {\n readonly isError: false;\n readonly value: JsonValue;\n readonly content: ContentBlock[];\n readonly error?: never;\n readonly meta?: JsonValue;\n readonly additionalContexts?: AdditionalContext[];\n readonly concludesTurn?: true;\n}',
|
|
|
},
|
|
|
{
|
|
|
name: 'ToolExecutionToken',
|
|
|
@@ -2161,7 +2153,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
|
|
|
},
|
|
|
{
|
|
|
name: 'ToolRunContext',
|
|
|
- declaration: 'export interface ToolRunContext extends ToolExecution {\n deferContext(context: HookContext): void;\n concludeTurn(): void;\n}',
|
|
|
+ declaration: 'export interface ToolRunContext extends ToolExecution {\n deferContext(context: AdditionalContext): void;\n concludeTurn(): void;\n}',
|
|
|
},
|
|
|
{
|
|
|
name: 'ToolSchema',
|