@myagentroam/agent 0.9.141 → 0.9.143
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.
- package/dist/agent-core/host/contracts.d.ts +64 -0
- package/dist/{host → agent-core/host}/local-agent-host.d.ts +6 -5
- package/dist/{host → agent-core/host}/local-agent-host.js +4 -4
- package/dist/{model → agent-core/model}/anthropic-messages.js +24 -13
- package/dist/{model → agent-core/model}/contracts.d.ts +6 -16
- package/dist/{model → agent-core/model}/openai-responses.js +16 -9
- package/dist/agent-core/model/recovery.d.ts +4 -0
- package/dist/agent-core/model/recovery.js +71 -0
- package/dist/{prompts → agent-core/prompts}/core.d.ts +3 -13
- package/dist/{prompts → agent-core/prompts}/index.d.ts +1 -1
- package/dist/{prompts → agent-core/prompts}/modes.d.ts +1 -1
- package/dist/{prompts → agent-core/prompts}/resources.d.ts +1 -1
- package/dist/{runtime/compact.d.ts → agent-core/runtime/compaction/history.d.ts} +2 -23
- package/dist/{runtime/compact.js → agent-core/runtime/compaction/history.js} +2 -92
- package/dist/agent-core/runtime/compaction/operation.d.ts +22 -0
- package/dist/agent-core/runtime/compaction/operation.js +91 -0
- package/dist/agent-core/runtime/context/contracts.d.ts +12 -0
- package/dist/{runtime/environment-context.d.ts → agent-core/runtime/context/environment.d.ts} +2 -2
- package/dist/{runtime/environment-context.js → agent-core/runtime/context/environment.js} +1 -1
- package/dist/{runtime/context-gc-runtime.d.ts → agent-core/runtime/context/gc-runtime.d.ts} +4 -4
- package/dist/{runtime/context-gc-runtime.js → agent-core/runtime/context/gc-runtime.js} +3 -3
- package/dist/{runtime/context-gc-tokens.d.ts → agent-core/runtime/context/gc-tokens.d.ts} +2 -2
- package/dist/{runtime/context-gc-tokens.js → agent-core/runtime/context/gc-tokens.js} +7 -5
- package/dist/{runtime/context-gc.d.ts → agent-core/runtime/context/gc.d.ts} +3 -3
- package/dist/{runtime/context-gc.js → agent-core/runtime/context/gc.js} +152 -19
- package/dist/{runtime → agent-core/runtime/context}/instructions.d.ts +1 -1
- package/dist/{runtime → agent-core/runtime/context}/instructions.js +1 -1
- package/dist/{runtime → agent-core/runtime/context}/normalize.d.ts +1 -1
- package/dist/{runtime/context-projection.d.ts → agent-core/runtime/context/projection.d.ts} +3 -3
- package/dist/{runtime/context-projection.js → agent-core/runtime/context/projection.js} +35 -4
- package/dist/agent-core/runtime/context/request-budget.d.ts +6 -0
- package/dist/agent-core/runtime/context/request-budget.js +22 -0
- package/dist/agent-core/runtime/context/restore.d.ts +15 -0
- package/dist/agent-core/runtime/context/restore.js +85 -0
- package/dist/agent-core/runtime/context/usage.d.ts +18 -0
- package/dist/agent-core/runtime/context/usage.js +138 -0
- package/dist/agent-core/runtime/context/world-state.d.ts +35 -0
- package/dist/agent-core/runtime/context/world-state.js +133 -0
- package/dist/agent-core/runtime/contracts.d.ts +37 -0
- package/dist/agent-core/runtime/event-projection.d.ts +5 -0
- package/dist/agent-core/runtime/event-projection.js +17 -0
- package/dist/agent-core/runtime/events.d.ts +143 -0
- package/dist/agent-core/runtime/execution.d.ts +50 -0
- package/dist/agent-core/runtime/execution.js +397 -0
- package/dist/{runtime → agent-core/runtime}/rollout-budget.d.ts +1 -1
- package/dist/agent-core/sdk/agent.js +209 -0
- package/dist/agent-core/sdk/model-runtime.d.ts +13 -0
- package/dist/agent-core/sdk/model-runtime.js +63 -0
- package/dist/agent-core/sdk/session-title.d.ts +3 -0
- package/dist/agent-core/sdk/session-title.js +42 -0
- package/dist/agent-core/sdk/session.d.ts +62 -0
- package/dist/agent-core/sdk/session.js +1147 -0
- package/dist/agent-core/sdk/subagent-backend.d.ts +3 -0
- package/dist/agent-core/sdk/subagent-backend.js +46 -0
- package/dist/agent-core/sdk/types.d.ts +56 -0
- package/dist/{session → agent-core/session}/catalog.d.ts +2 -1
- package/dist/{session → agent-core/session}/context-gc-checkpoint.d.ts +3 -0
- package/dist/{session → agent-core/session}/context-gc-checkpoint.js +122 -23
- package/dist/agent-core/session/context-gc-observations.d.ts +38 -0
- package/dist/agent-core/session/context-gc-observations.js +150 -0
- package/dist/{session → agent-core/session}/context-gc-replacements.d.ts +1 -1
- package/dist/{session → agent-core/session}/context-gc-replacements.js +6 -2
- package/dist/{session → agent-core/session}/jsonl-store.d.ts +2 -2
- package/dist/{session → agent-core/session}/jsonl-store.js +1 -1
- package/dist/agent-core/subagent/contracts.d.ts +91 -0
- package/dist/agent-core/subagent/contracts.js +1 -0
- package/dist/agent-core/subagent/scheduler.d.ts +117 -0
- package/dist/{subagent → agent-core/subagent}/session-controller.d.ts +3 -2
- package/dist/agent-core/tools/agent/agent-cancel.d.ts +7 -0
- package/dist/{tools → agent-core/tools/agent}/agent-cancel.js +1 -1
- package/dist/agent-core/tools/agent/agent-message.d.ts +7 -0
- package/dist/{tools → agent-core/tools/agent}/agent-message.js +2 -2
- package/dist/{tools → agent-core/tools/agent}/agent-start.d.ts +3 -3
- package/dist/{tools → agent-core/tools/agent}/agent-start.js +3 -3
- package/dist/agent-core/tools/agent/agent-wait.d.ts +7 -0
- package/dist/{tools → agent-core/tools/agent}/agent-wait.js +2 -2
- package/dist/{tools → agent-core/tools/agent}/question.d.ts +2 -2
- package/dist/{tools → agent-core/tools/agent}/question.js +2 -2
- package/dist/{tools → agent-core/tools/agent}/skill.d.ts +2 -2
- package/dist/{tools → agent-core/tools/agent}/skill.js +2 -2
- package/dist/{tools → agent-core/tools/agent}/todo-read.d.ts +2 -2
- package/dist/{tools → agent-core/tools/agent}/todo-write.d.ts +2 -2
- package/dist/{tools → agent-core/tools/agent}/todo-write.js +2 -2
- package/dist/{tools → agent-core/tools/agent}/todo.d.ts +2 -9
- package/dist/{tools → agent-core/tools/agent}/todo.js +1 -1
- package/dist/{tools → agent-core/tools}/code-mode/cells.d.ts +4 -1
- package/dist/{tools → agent-core/tools}/code-mode/cells.js +60 -6
- package/dist/{tools → agent-core/tools}/code-mode/dispatch.d.ts +2 -4
- package/dist/{tools → agent-core/tools}/code-mode/dispatch.js +10 -6
- package/dist/{tools → agent-core/tools}/code-mode/engine.d.ts +13 -1
- package/dist/agent-core/tools/code-mode/engine.js +1 -0
- package/dist/{tools/code-mode.d.ts → agent-core/tools/code-mode/index.d.ts} +7 -7
- package/dist/{tools/code-mode.js → agent-core/tools/code-mode/index.js} +190 -28
- package/dist/agent-core/tools/code-mode/observations.d.ts +103 -0
- package/dist/agent-core/tools/code-mode/observations.js +195 -0
- package/dist/{tools → agent-core/tools}/code-mode/quickjs-engine.js +91 -17
- package/dist/{tools → agent-core/tools}/code-mode/state.d.ts +2 -13
- package/dist/agent-core/tools/code-mode/worker.d.ts +1 -0
- package/dist/{tools → agent-core/tools}/code-mode/worker.js +8 -1
- package/dist/agent-core/tools/contracts.d.ts +172 -0
- package/dist/agent-core/tools/contracts.js +1 -0
- package/dist/agent-core/tools/execution.d.ts +36 -0
- package/dist/agent-core/tools/execution.js +111 -0
- package/dist/agent-core/tools/local/apply-patch.d.ts +19 -0
- package/dist/{tools → agent-core/tools/local}/apply-patch.js +8 -2
- package/dist/{tools → agent-core/tools/local}/exec.d.ts +5 -17
- package/dist/{tools → agent-core/tools/local}/exec.js +4 -4
- package/dist/{tools → agent-core/tools/local}/read.d.ts +7 -15
- package/dist/{tools → agent-core/tools/local}/read.js +185 -2
- package/dist/{tools/local-registry.d.ts → agent-core/tools/local/registry.d.ts} +5 -5
- package/dist/agent-core/tools/local/registry.js +101 -0
- package/dist/{tools → agent-core/tools/local}/view-image.d.ts +4 -9
- package/dist/{tools → agent-core/tools/local}/view-image.js +2 -2
- package/dist/agent-core/tools/local/web-fetch.d.ts +4 -0
- package/dist/agent-core/tools/local/web-fetch.js +85 -0
- package/dist/agent-core/tools/local/web-search.d.ts +7 -0
- package/dist/agent-core/tools/local/web-search.js +34 -0
- package/dist/{tools/local-workspace-tools.js → agent-core/tools/local/workspace-tools.js} +1 -1
- package/dist/{sdk/mcp-catalog.d.ts → agent-core/tools/mcp/catalog.d.ts} +1 -2
- package/dist/{sdk/mcp-catalog.js → agent-core/tools/mcp/catalog.js} +1 -1
- package/dist/agent-core/tools/mcp/history.d.ts +4 -0
- package/dist/agent-core/tools/mcp/history.js +33 -0
- package/dist/{tools → agent-core/tools/mcp}/tool-search.d.ts +3 -3
- package/dist/{tools → agent-core/tools/mcp}/tool-search.js +4 -4
- package/dist/agent-core/tools/output-projection.d.ts +14 -0
- package/dist/agent-core/tools/output-projection.js +223 -0
- package/dist/{tools → agent-core/tools}/registry.d.ts +1 -1
- package/dist/agent-core/tools/registry.js +47 -0
- package/dist/{tools → agent-core/tools}/runtime-context.d.ts +8 -7
- package/dist/agent-core/tools/runtime-context.js +1 -0
- package/dist/{tools → agent-core/tools}/runtime.d.ts +1 -1
- package/dist/cli/codex-auth-file.d.ts +1 -1
- package/dist/cli/codex-auth-file.js +2 -2
- package/dist/cli/main.js +9 -9
- package/dist/index.d.ts +17 -15
- package/dist/index.js +8 -8
- package/dist/sandbox/linux/bubblewrap-sandbox-executor.d.ts +1 -1
- package/dist/sandbox/linux/bubblewrap-sandbox-executor.js +1 -1
- package/package.json +3 -3
- package/dist/host/contracts.d.ts +0 -21
- package/dist/sdk/agent.js +0 -2548
- package/dist/sdk/types.d.ts +0 -349
- package/dist/subagent/scheduler.d.ts +0 -206
- package/dist/tools/agent-cancel.d.ts +0 -7
- package/dist/tools/agent-message.d.ts +0 -7
- package/dist/tools/agent-wait.d.ts +0 -7
- package/dist/tools/apply-patch.d.ts +0 -32
- package/dist/tools/local-registry.js +0 -373
- package/dist/tools/registry.js +0 -47
- package/dist/tools/web-fetch.d.ts +0 -2
- package/dist/tools/web-fetch.js +0 -12
- package/dist/tools/web-search.d.ts +0 -2
- package/dist/tools/web-search.js +0 -15
- /package/dist/{error.d.ts → agent-core/error.d.ts} +0 -0
- /package/dist/{error.js → agent-core/error.js} +0 -0
- /package/dist/{host → agent-core/host}/contracts.js +0 -0
- /package/dist/{host → agent-core/host}/local-process-executor.d.ts +0 -0
- /package/dist/{host → agent-core/host}/local-process-executor.js +0 -0
- /package/dist/{host → agent-core/host}/network.d.ts +0 -0
- /package/dist/{host → agent-core/host}/network.js +0 -0
- /package/dist/{model → agent-core/model}/anthropic-messages.d.ts +0 -0
- /package/dist/{model → agent-core/model}/anthropic-thinking.d.ts +0 -0
- /package/dist/{model → agent-core/model}/anthropic-thinking.js +0 -0
- /package/dist/{model → agent-core/model}/catalog-file.d.ts +0 -0
- /package/dist/{model → agent-core/model}/catalog-file.js +0 -0
- /package/dist/{model → agent-core/model}/configuration.d.ts +0 -0
- /package/dist/{model → agent-core/model}/configuration.js +0 -0
- /package/dist/{model → agent-core/model}/contracts.js +0 -0
- /package/dist/{model → agent-core/model}/http.d.ts +0 -0
- /package/dist/{model → agent-core/model}/http.js +0 -0
- /package/dist/{model → agent-core/model}/openai-responses.d.ts +0 -0
- /package/dist/{model → agent-core/model}/runtime-credential.d.ts +0 -0
- /package/dist/{model → agent-core/model}/runtime-credential.js +0 -0
- /package/dist/{model → agent-core/model}/sse.d.ts +0 -0
- /package/dist/{model → agent-core/model}/sse.js +0 -0
- /package/dist/{model → agent-core/model}/transport-test.d.ts +0 -0
- /package/dist/{model → agent-core/model}/transport-test.js +0 -0
- /package/dist/{prompts → agent-core/prompts}/compact.d.ts +0 -0
- /package/dist/{prompts → agent-core/prompts}/compact.js +0 -0
- /package/dist/{prompts → agent-core/prompts}/core.js +0 -0
- /package/dist/{prompts → agent-core/prompts}/execution-budget.d.ts +0 -0
- /package/dist/{prompts → agent-core/prompts}/execution-budget.js +0 -0
- /package/dist/{prompts → agent-core/prompts}/index.js +0 -0
- /package/dist/{prompts → agent-core/prompts}/modes.js +0 -0
- /package/dist/{prompts → agent-core/prompts}/output.d.ts +0 -0
- /package/dist/{prompts → agent-core/prompts}/output.js +0 -0
- /package/dist/{prompts → agent-core/prompts}/resources.js +0 -0
- /package/dist/{prompts → agent-core/prompts}/subagent.d.ts +0 -0
- /package/dist/{prompts → agent-core/prompts}/subagent.js +0 -0
- /package/dist/{prompts → agent-core/prompts}/title.d.ts +0 -0
- /package/dist/{prompts → agent-core/prompts}/title.js +0 -0
- /package/dist/{prompts → agent-core/prompts}/workflow.d.ts +0 -0
- /package/dist/{prompts → agent-core/prompts}/workflow.js +0 -0
- /package/dist/{runtime → agent-core/runtime}/async-queue.d.ts +0 -0
- /package/dist/{runtime → agent-core/runtime}/async-queue.js +0 -0
- /package/dist/{sdk/types.js → agent-core/runtime/context/contracts.js} +0 -0
- /package/dist/{runtime → agent-core/runtime/context}/normalize.js +0 -0
- /package/dist/{session/types.js → agent-core/runtime/contracts.js} +0 -0
- /package/dist/{tools/code-mode/engine.js → agent-core/runtime/events.js} +0 -0
- /package/dist/{runtime → agent-core/runtime}/execution-policy.d.ts +0 -0
- /package/dist/{runtime → agent-core/runtime}/execution-policy.js +0 -0
- /package/dist/{runtime → agent-core/runtime}/plan-output.d.ts +0 -0
- /package/dist/{runtime → agent-core/runtime}/plan-output.js +0 -0
- /package/dist/{runtime → agent-core/runtime}/rollout-budget.js +0 -0
- /package/dist/{runtime → agent-core/runtime}/token-budget.d.ts +0 -0
- /package/dist/{runtime → agent-core/runtime}/token-budget.js +0 -0
- /package/dist/{sdk → agent-core/sdk}/agent.d.ts +0 -0
- /package/dist/{tools/code-mode/worker.d.ts → agent-core/sdk/types.js} +0 -0
- /package/dist/{session → agent-core/session}/catalog.js +0 -0
- /package/dist/{session → agent-core/session}/context-gc-subagent.d.ts +0 -0
- /package/dist/{session → agent-core/session}/context-gc-subagent.js +0 -0
- /package/dist/{session → agent-core/session}/transaction-recovery.d.ts +0 -0
- /package/dist/{session → agent-core/session}/transaction-recovery.js +0 -0
- /package/dist/{session → agent-core/session}/types.d.ts +0 -0
- /package/dist/{tools/runtime-context.js → agent-core/session/types.js} +0 -0
- /package/dist/{subagent → agent-core/subagent}/scheduler.js +0 -0
- /package/dist/{subagent → agent-core/subagent}/session-controller.js +0 -0
- /package/dist/{tools → agent-core/tools/agent}/todo-read.js +0 -0
- /package/dist/{tools → agent-core/tools}/callers.d.ts +0 -0
- /package/dist/{tools → agent-core/tools}/callers.js +0 -0
- /package/dist/{tools → agent-core/tools}/code-mode/quickjs-engine.d.ts +0 -0
- /package/dist/{tools → agent-core/tools}/code-mode/state.js +0 -0
- /package/dist/{tools → agent-core/tools}/code-mode/text-output.d.ts +0 -0
- /package/dist/{tools → agent-core/tools}/code-mode/text-output.js +0 -0
- /package/dist/{tools → agent-core/tools}/execution-limits.d.ts +0 -0
- /package/dist/{tools → agent-core/tools}/execution-limits.js +0 -0
- /package/dist/{tools → agent-core/tools/local}/read-context.d.ts +0 -0
- /package/dist/{tools → agent-core/tools/local}/read-context.js +0 -0
- /package/dist/{tools/local-workspace-tools.d.ts → agent-core/tools/local/workspace-tools.d.ts} +0 -0
- /package/dist/{tools → agent-core/tools}/runtime.js +0 -0
- /package/dist/{tools → agent-core/tools}/scheduler.d.ts +0 -0
- /package/dist/{tools → agent-core/tools}/scheduler.js +0 -0
- /package/dist/{tools → agent-core/tools}/shared/path-resolver.d.ts +0 -0
- /package/dist/{tools → agent-core/tools}/shared/path-resolver.js +0 -0
package/dist/sdk/types.d.ts
DELETED
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
import type { HostDescription } from '../host/contracts.js';
|
|
2
|
-
import type { MarAgentModelConfiguration, MarAgentReasoningEffort } from '../model/configuration.js';
|
|
3
|
-
import type { ClientToolDefinition } from '../model/contracts.js';
|
|
4
|
-
import type { MarAgentSessionPage, MarAgentSessionSummary } from '../session/catalog.js';
|
|
5
|
-
import type { SessionListInput, SessionSource } from '../session/types.js';
|
|
6
|
-
import type { CodeModeStateEntry, CodeModeStateMutation } from '../tools/code-mode/state.js';
|
|
7
|
-
/** @deprecated MAR Agent always executes tools directly through the Host. */
|
|
8
|
-
export type AccessMode = 'full-access';
|
|
9
|
-
export type ExecutionMode = 'run' | 'plan' | 'compact';
|
|
10
|
-
export interface ToolCall {
|
|
11
|
-
name: string;
|
|
12
|
-
arguments: unknown;
|
|
13
|
-
callId?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ToolExecutionContext {
|
|
16
|
-
mode: ExecutionMode;
|
|
17
|
-
signal: AbortSignal;
|
|
18
|
-
sessionId: string;
|
|
19
|
-
executionId: string;
|
|
20
|
-
recentImages?: readonly {
|
|
21
|
-
readonly mimeType: string;
|
|
22
|
-
readonly data: Buffer;
|
|
23
|
-
}[];
|
|
24
|
-
codeMode?: {
|
|
25
|
-
retainSession?(): Promise<() => Promise<void>>;
|
|
26
|
-
onSettled?(result: CodeCellEventData): Promise<void>;
|
|
27
|
-
supportsImages?: boolean;
|
|
28
|
-
tools: readonly import('../model/contracts.js').ClientToolDefinition[];
|
|
29
|
-
state?: readonly CodeModeStateEntry[];
|
|
30
|
-
commitState?(mutations: readonly CodeModeStateMutation[]): Promise<readonly CodeModeStateEntry[]>;
|
|
31
|
-
invoke(call: ToolCall, signal: AbortSignal): Promise<ToolExecutionResult>;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export interface McpToolCatalogContext extends Pick<ToolExecutionContext, 'sessionId' | 'executionId'> {
|
|
35
|
-
executionScopeId?: string;
|
|
36
|
-
claimExecutionScope?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface McpToolCatalog {
|
|
39
|
-
readonly revision: string;
|
|
40
|
-
readonly servers: readonly {
|
|
41
|
-
readonly id: string;
|
|
42
|
-
readonly name: string;
|
|
43
|
-
readonly description?: string;
|
|
44
|
-
readonly instructions?: string;
|
|
45
|
-
}[];
|
|
46
|
-
readonly tools: readonly McpCatalogTool[];
|
|
47
|
-
}
|
|
48
|
-
export interface McpCatalogTool {
|
|
49
|
-
readonly definition: import('../model/contracts.js').ClientToolDefinition;
|
|
50
|
-
readonly serverId: string;
|
|
51
|
-
readonly rawName: string;
|
|
52
|
-
readonly sourceIdentity: string;
|
|
53
|
-
readonly definitionRevision: string;
|
|
54
|
-
readonly lifetime: 'session' | 'execution';
|
|
55
|
-
readonly exposure: 'direct' | 'deferred';
|
|
56
|
-
/** Untrusted MCP hints; never an authorization or parallel-safety decision. */
|
|
57
|
-
readonly annotations?: Readonly<Record<string, unknown>>;
|
|
58
|
-
}
|
|
59
|
-
export interface McpToolCallContext extends Pick<ToolExecutionContext, 'sessionId' | 'executionId'> {
|
|
60
|
-
readonly mode?: ExecutionMode;
|
|
61
|
-
readonly expectedTool?: {
|
|
62
|
-
readonly sourceIdentity: string;
|
|
63
|
-
readonly definitionRevision: string;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
export interface HostSkill {
|
|
67
|
-
readonly name: string;
|
|
68
|
-
readonly description: string;
|
|
69
|
-
readonly requiredTools: readonly string[];
|
|
70
|
-
load(): Promise<string>;
|
|
71
|
-
}
|
|
72
|
-
export interface HostExecutionExtensions {
|
|
73
|
-
readonly tools?: readonly import('../model/contracts.js').ClientToolDefinition[];
|
|
74
|
-
readonly skills?: readonly HostSkill[];
|
|
75
|
-
}
|
|
76
|
-
export interface MarAgentToolImageArtifact {
|
|
77
|
-
kind: 'image';
|
|
78
|
-
name: string;
|
|
79
|
-
mimeType: 'image/png';
|
|
80
|
-
byteSize: number;
|
|
81
|
-
sha256: string;
|
|
82
|
-
fileName: string;
|
|
83
|
-
}
|
|
84
|
-
export type MarAgentToolArtifact = MarAgentToolImageArtifact;
|
|
85
|
-
export interface ToolExecutionResult {
|
|
86
|
-
content: string;
|
|
87
|
-
data?: unknown;
|
|
88
|
-
/** Runtime-only definitions used to encode a Tool Search output. */
|
|
89
|
-
toolSearchTools?: readonly ClientToolDefinition[];
|
|
90
|
-
truncated?: boolean;
|
|
91
|
-
images?: readonly {
|
|
92
|
-
mimeType: string;
|
|
93
|
-
dataBase64: string;
|
|
94
|
-
}[];
|
|
95
|
-
artifacts?: readonly MarAgentToolArtifact[];
|
|
96
|
-
}
|
|
97
|
-
export interface CodeCellEventData {
|
|
98
|
-
cellId: string;
|
|
99
|
-
status: 'running' | 'completed' | 'failed' | 'cancelled';
|
|
100
|
-
cached?: boolean;
|
|
101
|
-
}
|
|
102
|
-
export interface HostSessionResourceSnapshot {
|
|
103
|
-
codeCells?: readonly {
|
|
104
|
-
cellId: string;
|
|
105
|
-
status: 'running' | 'completed' | 'failed' | 'cancelled';
|
|
106
|
-
executionId: string;
|
|
107
|
-
}[];
|
|
108
|
-
idleTtlMs?: number;
|
|
109
|
-
processes: readonly {
|
|
110
|
-
processId: string;
|
|
111
|
-
status: 'running' | 'completed' | 'cancelled';
|
|
112
|
-
command: string;
|
|
113
|
-
cwd: string;
|
|
114
|
-
}[];
|
|
115
|
-
}
|
|
116
|
-
/** The Host owns workspace/tool effects; the SDK owns JSONL storage beneath its supplied HOME. */
|
|
117
|
-
export interface MarAgentHost {
|
|
118
|
-
describe(): Promise<HostDescription>;
|
|
119
|
-
executeTool(call: ToolCall, context: ToolExecutionContext): Promise<ToolExecutionResult>;
|
|
120
|
-
listExecutionExtensions?(context: McpToolCatalogContext): Promise<HostExecutionExtensions>;
|
|
121
|
-
emit(event: MarAgentEvent): Promise<void> | void;
|
|
122
|
-
requestUserInput?(input: {
|
|
123
|
-
requestId: string;
|
|
124
|
-
questions: unknown[];
|
|
125
|
-
}, signal: AbortSignal): Promise<Record<string, unknown>>;
|
|
126
|
-
listMcpTools?(context?: McpToolCatalogContext): Promise<readonly import('../model/contracts.js').ClientToolDefinition[]>;
|
|
127
|
-
listMcpToolCatalog?(context: McpToolCatalogContext): Promise<McpToolCatalog>;
|
|
128
|
-
callMcpTool?(call: ToolCall, signal: AbortSignal, context?: McpToolCallContext): Promise<ToolExecutionResult>;
|
|
129
|
-
listSessionResources?(sessionId: string): Promise<HostSessionResourceSnapshot>;
|
|
130
|
-
disposeSessionResources?(sessionId: string): Promise<void>;
|
|
131
|
-
dispose(): Promise<void>;
|
|
132
|
-
}
|
|
133
|
-
export interface MarAgentEventBase {
|
|
134
|
-
eventId: string;
|
|
135
|
-
sequence: number;
|
|
136
|
-
timestamp: string;
|
|
137
|
-
sessionId: string;
|
|
138
|
-
executionId: string;
|
|
139
|
-
turnId?: string;
|
|
140
|
-
}
|
|
141
|
-
export type MarAgentEvent = MarAgentEventBase & ({
|
|
142
|
-
type: 'execution.started';
|
|
143
|
-
mode: ExecutionMode;
|
|
144
|
-
} | {
|
|
145
|
-
type: 'message.delta';
|
|
146
|
-
itemId: string;
|
|
147
|
-
phase: 'commentary' | 'final_answer';
|
|
148
|
-
delta: string;
|
|
149
|
-
} | {
|
|
150
|
-
type: 'message.completed';
|
|
151
|
-
itemId: string;
|
|
152
|
-
phase: 'commentary' | 'final_answer';
|
|
153
|
-
text: string;
|
|
154
|
-
modelId: string;
|
|
155
|
-
modelName: string;
|
|
156
|
-
} | {
|
|
157
|
-
type: 'model.performance';
|
|
158
|
-
latencyMs: number;
|
|
159
|
-
outputTokens?: number | undefined;
|
|
160
|
-
outputDurationMs?: number | undefined;
|
|
161
|
-
tokensPerSecond?: number | undefined;
|
|
162
|
-
} | {
|
|
163
|
-
/** Legacy history event; new executions publish model.performance instead. */
|
|
164
|
-
type: 'message.performance';
|
|
165
|
-
itemId: string;
|
|
166
|
-
ttftMs: number;
|
|
167
|
-
outputTokens?: number | undefined;
|
|
168
|
-
outputDurationMs?: number | undefined;
|
|
169
|
-
tokensPerSecond?: number | undefined;
|
|
170
|
-
} | {
|
|
171
|
-
type: 'plan.completed';
|
|
172
|
-
itemId: string;
|
|
173
|
-
text: string;
|
|
174
|
-
} | {
|
|
175
|
-
type: 'reasoning.summary';
|
|
176
|
-
text: string;
|
|
177
|
-
} | {
|
|
178
|
-
type: 'hosted_tool.updated';
|
|
179
|
-
itemId: string;
|
|
180
|
-
kind: 'WEB_SEARCH' | 'WEB_FETCH';
|
|
181
|
-
status: 'RUNNING' | 'COMPLETED' | 'FAILED';
|
|
182
|
-
summary: {
|
|
183
|
-
query?: string | undefined;
|
|
184
|
-
url?: string | undefined;
|
|
185
|
-
title?: string | undefined;
|
|
186
|
-
sources?: readonly {
|
|
187
|
-
url: string;
|
|
188
|
-
title?: string | undefined;
|
|
189
|
-
}[] | undefined;
|
|
190
|
-
sourcesTruncated?: boolean | undefined;
|
|
191
|
-
};
|
|
192
|
-
} | {
|
|
193
|
-
type: 'citation.added';
|
|
194
|
-
id: string;
|
|
195
|
-
url: string;
|
|
196
|
-
title?: string;
|
|
197
|
-
} | {
|
|
198
|
-
type: 'tool.started';
|
|
199
|
-
toolName: string;
|
|
200
|
-
callId: string;
|
|
201
|
-
parentCallId?: string;
|
|
202
|
-
input?: unknown;
|
|
203
|
-
} | {
|
|
204
|
-
type: 'tool.completed';
|
|
205
|
-
toolName: string;
|
|
206
|
-
callId: string;
|
|
207
|
-
parentCallId?: string;
|
|
208
|
-
summary: string;
|
|
209
|
-
truncated?: boolean;
|
|
210
|
-
artifacts?: readonly MarAgentToolArtifact[];
|
|
211
|
-
data?: CodeCellEventData | import('../tools/exec.js').ExecResult | Omit<import('../tools/exec.js').ExecResult, 'stdout' | 'stderr'> | import('../tools/apply-patch.js').ApplyPatchResult | import('../tools/read.js').ReadEventData | import('../tools/view-image.js').ViewImageResult | import('../subagent/scheduler.js').SubagentTaskSnapshot;
|
|
212
|
-
} | {
|
|
213
|
-
type: 'tool.failed';
|
|
214
|
-
toolName: string;
|
|
215
|
-
callId: string;
|
|
216
|
-
parentCallId?: string;
|
|
217
|
-
code: string;
|
|
218
|
-
message?: string;
|
|
219
|
-
} | {
|
|
220
|
-
type: 'usage.updated';
|
|
221
|
-
inputTokens?: number | undefined;
|
|
222
|
-
contextInputTokens?: number | undefined;
|
|
223
|
-
outputTokens?: number | undefined;
|
|
224
|
-
cacheReadTokens?: number | undefined;
|
|
225
|
-
cacheWriteTokens?: number | undefined;
|
|
226
|
-
} | {
|
|
227
|
-
type: 'todo.updated';
|
|
228
|
-
revision: number;
|
|
229
|
-
items: readonly import('../tools/todo.js').TodoItem[];
|
|
230
|
-
} | {
|
|
231
|
-
type: 'user_input.requested';
|
|
232
|
-
requestId: string;
|
|
233
|
-
questions: unknown[];
|
|
234
|
-
} | {
|
|
235
|
-
type: 'user_input.resolved';
|
|
236
|
-
requestId: string;
|
|
237
|
-
} | {
|
|
238
|
-
type: 'subagent.started';
|
|
239
|
-
agentId: string;
|
|
240
|
-
description: string;
|
|
241
|
-
modelId?: string;
|
|
242
|
-
modelName?: string;
|
|
243
|
-
reasoningEffort?: MarAgentReasoningEffort;
|
|
244
|
-
} | {
|
|
245
|
-
type: 'subagent.completed';
|
|
246
|
-
agentId: string;
|
|
247
|
-
description?: string;
|
|
248
|
-
status: string;
|
|
249
|
-
modelId?: string;
|
|
250
|
-
modelName?: string;
|
|
251
|
-
reasoningEffort?: MarAgentReasoningEffort;
|
|
252
|
-
latestMessage?: import('../subagent/scheduler.js').SubagentLatestMessage;
|
|
253
|
-
latestActivity?: import('../subagent/scheduler.js').SubagentLatestActivity;
|
|
254
|
-
errorCode?: string;
|
|
255
|
-
errorMessage?: string;
|
|
256
|
-
} | {
|
|
257
|
-
type: 'execution.completed';
|
|
258
|
-
} | {
|
|
259
|
-
type: 'execution.failed';
|
|
260
|
-
code: string;
|
|
261
|
-
message?: string;
|
|
262
|
-
} | {
|
|
263
|
-
type: 'execution.cancelled';
|
|
264
|
-
} | {
|
|
265
|
-
type: 'context.compacting';
|
|
266
|
-
compactionId: string;
|
|
267
|
-
} | {
|
|
268
|
-
type: 'context.compacted';
|
|
269
|
-
compactionId: string;
|
|
270
|
-
});
|
|
271
|
-
export interface RunInputImage {
|
|
272
|
-
name: string;
|
|
273
|
-
mimeType: string;
|
|
274
|
-
dataBase64: string;
|
|
275
|
-
}
|
|
276
|
-
export interface MarAgentImageMetadata {
|
|
277
|
-
name: string;
|
|
278
|
-
mimeType: string;
|
|
279
|
-
byteSize: number;
|
|
280
|
-
}
|
|
281
|
-
export interface RunInput {
|
|
282
|
-
prompt: string;
|
|
283
|
-
clientMessageId?: string;
|
|
284
|
-
modelId?: string;
|
|
285
|
-
reasoningEffort?: MarAgentReasoningEffort;
|
|
286
|
-
/** @deprecated Accepted for source compatibility and otherwise ignored. */
|
|
287
|
-
access?: AccessMode;
|
|
288
|
-
images?: readonly RunInputImage[];
|
|
289
|
-
}
|
|
290
|
-
export interface CreateSessionInput {
|
|
291
|
-
workspace: string;
|
|
292
|
-
title?: string;
|
|
293
|
-
}
|
|
294
|
-
export interface ExecutionResult {
|
|
295
|
-
executionId: string;
|
|
296
|
-
status: 'completed' | 'failed' | 'cancelled';
|
|
297
|
-
finalAnswer: string;
|
|
298
|
-
errorCode?: string;
|
|
299
|
-
errorMessage?: string;
|
|
300
|
-
}
|
|
301
|
-
/** A live execution exposes streamed events separately from its terminal result. */
|
|
302
|
-
export interface ExecutionHandle extends AsyncIterable<MarAgentEvent> {
|
|
303
|
-
readonly executionId: string;
|
|
304
|
-
result(): Promise<ExecutionResult>;
|
|
305
|
-
/** Signals abort; await result() to observe the terminal status and cleanup. */
|
|
306
|
-
cancel(): void;
|
|
307
|
-
}
|
|
308
|
-
/** A persisted Session permits one active main execution at a time. */
|
|
309
|
-
export interface MarAgentSession {
|
|
310
|
-
readonly id: string;
|
|
311
|
-
run(input: RunInput): ExecutionHandle;
|
|
312
|
-
plan(input: RunInput): ExecutionHandle;
|
|
313
|
-
compact(input?: Partial<RunInput>): ExecutionHandle;
|
|
314
|
-
cancel(executionId: string): Promise<void>;
|
|
315
|
-
}
|
|
316
|
-
export interface MarAgent {
|
|
317
|
-
createSession(input: CreateSessionInput): Promise<MarAgentSession>;
|
|
318
|
-
openSession(sessionId: string): Promise<MarAgentSession>;
|
|
319
|
-
listSessions(input?: SessionListInput): Promise<MarAgentSessionPage>;
|
|
320
|
-
clearSession(sessionId: string): Promise<void>;
|
|
321
|
-
/** Rebinds future main executions only; running subagents keep their captured model providers. */
|
|
322
|
-
reconfigureModels(input: {
|
|
323
|
-
readonly models: readonly MarAgentModelConfiguration[];
|
|
324
|
-
readonly defaultModelId?: string;
|
|
325
|
-
}): Promise<void>;
|
|
326
|
-
deleteSession(sessionId: string): Promise<void>;
|
|
327
|
-
/** Cancels active executions, then closes SDK-owned providers, the Host and the Session store. */
|
|
328
|
-
dispose(): Promise<void>;
|
|
329
|
-
}
|
|
330
|
-
export interface RolloutBudgetOptions {
|
|
331
|
-
limitTokens?: number;
|
|
332
|
-
conserveAtRemainingTokens?: number;
|
|
333
|
-
finalizeAtRemainingTokens?: number;
|
|
334
|
-
samplingTokenWeight?: number;
|
|
335
|
-
prefillTokenWeight?: number;
|
|
336
|
-
}
|
|
337
|
-
export interface CreateMarAgentOptions {
|
|
338
|
-
mode: 'normal' | 'node';
|
|
339
|
-
host: MarAgentHost;
|
|
340
|
-
models: readonly MarAgentModelConfiguration[];
|
|
341
|
-
defaultModelId?: string;
|
|
342
|
-
systemInstruction?: string;
|
|
343
|
-
workspaceMapping?: {
|
|
344
|
-
readonly logicalPath: string;
|
|
345
|
-
readonly physicalPath: string;
|
|
346
|
-
};
|
|
347
|
-
rolloutBudget?: false | RolloutBudgetOptions;
|
|
348
|
-
}
|
|
349
|
-
export type { MarAgentSessionSummary, SessionListInput, SessionSource };
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import { type MarAgentReasoningEffort } from '../model/configuration.js';
|
|
2
|
-
export interface SubagentTaskInput {
|
|
3
|
-
description: string;
|
|
4
|
-
prompt: string;
|
|
5
|
-
role: 'general-purpose' | 'explore';
|
|
6
|
-
modelId?: string;
|
|
7
|
-
reasoningEffort?: MarAgentReasoningEffort;
|
|
8
|
-
background?: boolean;
|
|
9
|
-
parentSubagentId?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface SubagentTaskResult {
|
|
12
|
-
summary: string;
|
|
13
|
-
changedFiles: string[];
|
|
14
|
-
verification: string[];
|
|
15
|
-
evidence: Array<{
|
|
16
|
-
path: string;
|
|
17
|
-
startLine?: number;
|
|
18
|
-
endLine?: number;
|
|
19
|
-
}>;
|
|
20
|
-
}
|
|
21
|
-
export interface SubagentLatestMessage {
|
|
22
|
-
itemId: string;
|
|
23
|
-
turnId: string;
|
|
24
|
-
phase: 'commentary' | 'final_answer';
|
|
25
|
-
text: string;
|
|
26
|
-
timestamp: string;
|
|
27
|
-
truncated: boolean;
|
|
28
|
-
}
|
|
29
|
-
export type SubagentLatestActivity = {
|
|
30
|
-
kind: 'message';
|
|
31
|
-
timestamp: string;
|
|
32
|
-
phase: 'commentary' | 'final_answer';
|
|
33
|
-
} | {
|
|
34
|
-
kind: 'tool';
|
|
35
|
-
timestamp: string;
|
|
36
|
-
toolName: string;
|
|
37
|
-
status: 'started' | 'completed' | 'failed';
|
|
38
|
-
};
|
|
39
|
-
export interface SubagentTaskSnapshot extends Record<string, unknown> {
|
|
40
|
-
agentId: string;
|
|
41
|
-
description: string;
|
|
42
|
-
status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled' | 'interrupted';
|
|
43
|
-
modelId?: string;
|
|
44
|
-
modelName?: string;
|
|
45
|
-
reasoningEffort?: MarAgentReasoningEffort;
|
|
46
|
-
latestMessage?: SubagentLatestMessage;
|
|
47
|
-
latestActivity?: SubagentLatestActivity;
|
|
48
|
-
summary?: string;
|
|
49
|
-
changedFiles?: string[];
|
|
50
|
-
verification?: string[];
|
|
51
|
-
evidence?: Array<{
|
|
52
|
-
path: string;
|
|
53
|
-
startLine?: number;
|
|
54
|
-
endLine?: number;
|
|
55
|
-
}>;
|
|
56
|
-
errorCode?: string;
|
|
57
|
-
errorMessage?: string;
|
|
58
|
-
messageId?: string;
|
|
59
|
-
turnId?: string;
|
|
60
|
-
deliveryStatus?: 'accepted' | 'applied' | 'cancelled' | 'failed';
|
|
61
|
-
waitOutcome?: SubagentWaitOutcome;
|
|
62
|
-
}
|
|
63
|
-
export type SubagentWaitFor = 'completion' | 'message';
|
|
64
|
-
export type SubagentWaitOutcome = 'snapshot' | 'message' | 'completion' | 'timeout';
|
|
65
|
-
export interface SubagentMessageOptions {
|
|
66
|
-
delivery?: 'append' | 'replace';
|
|
67
|
-
signal?: AbortSignal;
|
|
68
|
-
}
|
|
69
|
-
export interface SubagentRunOptions {
|
|
70
|
-
signal?: AbortSignal;
|
|
71
|
-
onCreated?: (task: SubagentTaskSnapshot) => Promise<void> | void;
|
|
72
|
-
}
|
|
73
|
-
export interface SubagentOutputOptions {
|
|
74
|
-
waitMs?: number;
|
|
75
|
-
waitFor?: SubagentWaitFor;
|
|
76
|
-
signal?: AbortSignal;
|
|
77
|
-
}
|
|
78
|
-
export interface SubagentController {
|
|
79
|
-
beginExecution?(runner: (task: SubagentTaskInput, signal: AbortSignal) => Promise<SubagentTaskResult>): void;
|
|
80
|
-
run(input: SubagentTaskInput, options?: SubagentRunOptions): Promise<SubagentTaskSnapshot>;
|
|
81
|
-
output(agentId: string, options?: SubagentOutputOptions): Promise<SubagentTaskSnapshot>;
|
|
82
|
-
outputAny(options?: SubagentOutputOptions): Promise<SubagentTaskSnapshot>;
|
|
83
|
-
message(agentId: string, message: string, options?: SubagentMessageOptions): Promise<SubagentTaskSnapshot>;
|
|
84
|
-
cancel(agentId: string): Promise<SubagentTaskSnapshot>;
|
|
85
|
-
listSessionResources(): readonly {
|
|
86
|
-
agentId: string;
|
|
87
|
-
status: SubagentTaskSnapshot['status'];
|
|
88
|
-
description: string;
|
|
89
|
-
}[];
|
|
90
|
-
dispose(): Promise<void>;
|
|
91
|
-
}
|
|
92
|
-
export declare class SubagentScheduler implements SubagentController {
|
|
93
|
-
#private;
|
|
94
|
-
readonly limits: {
|
|
95
|
-
maxTasks: number;
|
|
96
|
-
maxConcurrent: number;
|
|
97
|
-
};
|
|
98
|
-
constructor(runner: (task: SubagentTaskInput, signal: AbortSignal) => Promise<SubagentTaskResult>, limits?: {
|
|
99
|
-
maxTasks: number;
|
|
100
|
-
maxConcurrent: number;
|
|
101
|
-
});
|
|
102
|
-
beginExecution(runner: (task: SubagentTaskInput, signal: AbortSignal) => Promise<SubagentTaskResult>): void;
|
|
103
|
-
run(input: SubagentTaskInput, options?: SubagentRunOptions): Promise<SubagentTaskSnapshot>;
|
|
104
|
-
output(agentId: string, options?: SubagentOutputOptions): Promise<{
|
|
105
|
-
waitOutcome: "snapshot";
|
|
106
|
-
agentId: string;
|
|
107
|
-
description: string;
|
|
108
|
-
status: "queued" | "running" | "completed" | "failed" | "cancelled" | "interrupted";
|
|
109
|
-
modelId?: string;
|
|
110
|
-
modelName?: string;
|
|
111
|
-
reasoningEffort?: MarAgentReasoningEffort;
|
|
112
|
-
latestMessage?: SubagentLatestMessage;
|
|
113
|
-
latestActivity?: SubagentLatestActivity;
|
|
114
|
-
summary?: string;
|
|
115
|
-
changedFiles?: string[];
|
|
116
|
-
verification?: string[];
|
|
117
|
-
evidence?: Array<{
|
|
118
|
-
path: string;
|
|
119
|
-
startLine?: number;
|
|
120
|
-
endLine?: number;
|
|
121
|
-
}>;
|
|
122
|
-
errorCode?: string;
|
|
123
|
-
errorMessage?: string;
|
|
124
|
-
messageId?: string;
|
|
125
|
-
turnId?: string;
|
|
126
|
-
deliveryStatus?: "accepted" | "applied" | "cancelled" | "failed";
|
|
127
|
-
} | {
|
|
128
|
-
waitOutcome: "completion" | "timeout";
|
|
129
|
-
agentId: string;
|
|
130
|
-
description: string;
|
|
131
|
-
status: "queued" | "running" | "completed" | "failed" | "cancelled" | "interrupted";
|
|
132
|
-
modelId?: string;
|
|
133
|
-
modelName?: string;
|
|
134
|
-
reasoningEffort?: MarAgentReasoningEffort;
|
|
135
|
-
latestMessage?: SubagentLatestMessage;
|
|
136
|
-
latestActivity?: SubagentLatestActivity;
|
|
137
|
-
summary?: string;
|
|
138
|
-
changedFiles?: string[];
|
|
139
|
-
verification?: string[];
|
|
140
|
-
evidence?: Array<{
|
|
141
|
-
path: string;
|
|
142
|
-
startLine?: number;
|
|
143
|
-
endLine?: number;
|
|
144
|
-
}>;
|
|
145
|
-
errorCode?: string;
|
|
146
|
-
errorMessage?: string;
|
|
147
|
-
messageId?: string;
|
|
148
|
-
turnId?: string;
|
|
149
|
-
deliveryStatus?: "accepted" | "applied" | "cancelled" | "failed";
|
|
150
|
-
}>;
|
|
151
|
-
outputAny(options?: SubagentOutputOptions): Promise<{
|
|
152
|
-
waitOutcome: "snapshot";
|
|
153
|
-
agentId: string;
|
|
154
|
-
description: string;
|
|
155
|
-
status: "queued" | "running" | "completed" | "failed" | "cancelled" | "interrupted";
|
|
156
|
-
modelId?: string;
|
|
157
|
-
modelName?: string;
|
|
158
|
-
reasoningEffort?: MarAgentReasoningEffort;
|
|
159
|
-
latestMessage?: SubagentLatestMessage;
|
|
160
|
-
latestActivity?: SubagentLatestActivity;
|
|
161
|
-
summary?: string;
|
|
162
|
-
changedFiles?: string[];
|
|
163
|
-
verification?: string[];
|
|
164
|
-
evidence?: Array<{
|
|
165
|
-
path: string;
|
|
166
|
-
startLine?: number;
|
|
167
|
-
endLine?: number;
|
|
168
|
-
}>;
|
|
169
|
-
errorCode?: string;
|
|
170
|
-
errorMessage?: string;
|
|
171
|
-
messageId?: string;
|
|
172
|
-
turnId?: string;
|
|
173
|
-
deliveryStatus?: "accepted" | "applied" | "cancelled" | "failed";
|
|
174
|
-
} | {
|
|
175
|
-
waitOutcome: "completion" | "timeout";
|
|
176
|
-
agentId: string;
|
|
177
|
-
description: string;
|
|
178
|
-
status: "queued" | "running" | "completed" | "failed" | "cancelled" | "interrupted";
|
|
179
|
-
modelId?: string;
|
|
180
|
-
modelName?: string;
|
|
181
|
-
reasoningEffort?: MarAgentReasoningEffort;
|
|
182
|
-
latestMessage?: SubagentLatestMessage;
|
|
183
|
-
latestActivity?: SubagentLatestActivity;
|
|
184
|
-
summary?: string;
|
|
185
|
-
changedFiles?: string[];
|
|
186
|
-
verification?: string[];
|
|
187
|
-
evidence?: Array<{
|
|
188
|
-
path: string;
|
|
189
|
-
startLine?: number;
|
|
190
|
-
endLine?: number;
|
|
191
|
-
}>;
|
|
192
|
-
errorCode?: string;
|
|
193
|
-
errorMessage?: string;
|
|
194
|
-
messageId?: string;
|
|
195
|
-
turnId?: string;
|
|
196
|
-
deliveryStatus?: "accepted" | "applied" | "cancelled" | "failed";
|
|
197
|
-
}>;
|
|
198
|
-
cancel(agentId: string): Promise<SubagentTaskSnapshot>;
|
|
199
|
-
message(_agentId: string, _message: string): Promise<SubagentTaskSnapshot>;
|
|
200
|
-
listSessionResources(): {
|
|
201
|
-
agentId: string;
|
|
202
|
-
status: "completed" | "cancelled" | "running" | "queued" | "failed";
|
|
203
|
-
description: string;
|
|
204
|
-
}[];
|
|
205
|
-
dispose(): Promise<void>;
|
|
206
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ClientToolDefinition } from '../model/contracts.js';
|
|
2
|
-
import type { ToolRuntimeContext } from './runtime-context.js';
|
|
3
|
-
export declare const agentCancelToolDefinition: ClientToolDefinition;
|
|
4
|
-
export declare function executeAgentCancel(arguments_: unknown, context: ToolRuntimeContext): Promise<{
|
|
5
|
-
content: string;
|
|
6
|
-
data: import("../subagent/scheduler.js").SubagentTaskSnapshot;
|
|
7
|
-
}>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ClientToolDefinition } from '../model/contracts.js';
|
|
2
|
-
import type { ToolRuntimeContext } from './runtime-context.js';
|
|
3
|
-
export declare const agentMessageToolDefinition: ClientToolDefinition;
|
|
4
|
-
export declare function executeAgentMessage(arguments_: unknown, context: ToolRuntimeContext): Promise<{
|
|
5
|
-
content: string;
|
|
6
|
-
data: import("../subagent/scheduler.js").SubagentTaskSnapshot;
|
|
7
|
-
}>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ClientToolDefinition } from '../model/contracts.js';
|
|
2
|
-
import type { ToolRuntimeContext } from './runtime-context.js';
|
|
3
|
-
export declare const agentWaitToolDefinition: ClientToolDefinition;
|
|
4
|
-
export declare function executeAgentWait(arguments_: unknown, context: ToolRuntimeContext): Promise<{
|
|
5
|
-
content: string;
|
|
6
|
-
data: import("../subagent/scheduler.js").SubagentTaskSnapshot;
|
|
7
|
-
}>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ClientToolDefinition } from '../model/contracts.js';
|
|
2
|
-
import { WorkspacePathResolver } from './shared/path-resolver.js';
|
|
3
|
-
export declare const applyPatchToolDefinition: ClientToolDefinition;
|
|
4
|
-
export interface ApplyPatchFileResult {
|
|
5
|
-
path: string;
|
|
6
|
-
targetPath?: string;
|
|
7
|
-
operation: 'added' | 'modified' | 'deleted' | 'moved';
|
|
8
|
-
addedLines: number;
|
|
9
|
-
deletedLines: number;
|
|
10
|
-
}
|
|
11
|
-
export interface ApplyPatchResult {
|
|
12
|
-
files: ApplyPatchFileResult[];
|
|
13
|
-
totals: {
|
|
14
|
-
files: number;
|
|
15
|
-
addedLines: number;
|
|
16
|
-
deletedLines: number;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
interface PatchFileOperations {
|
|
20
|
-
rename(source: string, target: string): Promise<void>;
|
|
21
|
-
rm(path: string, options?: {
|
|
22
|
-
force?: boolean;
|
|
23
|
-
recursive?: boolean;
|
|
24
|
-
}): Promise<void>;
|
|
25
|
-
}
|
|
26
|
-
export declare class ApplyPatchTool {
|
|
27
|
-
#private;
|
|
28
|
-
private readonly paths;
|
|
29
|
-
constructor(paths: WorkspacePathResolver, operations?: Partial<PatchFileOperations>);
|
|
30
|
-
execute(patch: string): Promise<ApplyPatchResult>;
|
|
31
|
-
}
|
|
32
|
-
export {};
|