@mono-agent/agent-runtime 0.20.11 → 0.21.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.
- package/ARCHITECTURE.md +50 -11
- package/MIGRATION.md +288 -26
- package/README.md +352 -477
- package/package.json +13 -44
- package/src/agent/tool-bloat.js +145 -9
- package/src/agent/tools/agent-tool.js +108 -9
- package/src/agent/tools/bash.js +11 -26
- package/src/agent/tools/codex-subscription-search.js +123 -29
- package/src/agent/tools/exec.js +10 -2
- package/src/agent/tools/index.js +7 -0
- package/src/agent/tools/monitor.js +149 -0
- package/src/agent/tools/pi-bridge.js +123 -19
- package/src/agent/tools/shared/bash-environment.js +31 -0
- package/src/agent/tools/shared/monitors.js +293 -0
- package/src/agent/tools/shared/path-resolver.js +25 -6
- package/src/agent/tools/shared/process-jobs.js +6 -1
- package/src/agent/tools/shared/process-runner.js +26 -6
- package/src/agent/tools/shared/tool-context.js +8 -0
- package/src/agent/tools/web-access-interstitial.js +70 -0
- package/src/agent/tools/web-browser-render.js +83 -58
- package/src/agent/tools/web-controller.js +112 -21
- package/src/agent/tools/web-document-extractor.js +379 -0
- package/src/agent/tools/web-fetch.js +271 -243
- package/src/agent/tools/web-request.js +65 -0
- package/src/agent/tools/web-search-output.js +165 -0
- package/src/agent/tools/web-search-state.js +75 -0
- package/src/agent/tools/web-search.js +532 -71
- package/src/ai/cost.js +13 -68
- package/src/ai/failure.js +3 -3
- package/src/ai/index.js +5 -17
- package/src/ai/observer.js +8 -0
- package/src/ai/pi-interop.js +221 -1
- package/src/ai/pi-oauth-compat.js +1 -1
- package/src/ai/provider-check.js +131 -0
- package/src/ai/providers/codex/app-server-client.js +592 -0
- package/src/ai/providers/pi-models.js +18 -10
- package/src/ai/providers/pi-native/compaction-driver.js +94 -42
- package/src/ai/providers/pi-native/compaction-summary.js +140 -0
- package/src/ai/providers/pi-native/harness-adapter.js +376 -0
- package/src/ai/providers/pi-native/prompt-cache-diagnostics.js +103 -0
- package/src/ai/providers/pi-native/provider-attribution.js +102 -0
- package/src/ai/providers/pi-native/result-builder.js +38 -14
- package/src/ai/providers/pi-native/session-lifecycle.js +253 -55
- package/src/ai/providers/pi-native/stream-subscriber.js +52 -6
- package/src/ai/providers/pi-native/terminal-recovery.js +40 -0
- package/src/ai/providers/pi-native/turn-runner.js +279 -28
- package/src/ai/providers/pi-native.js +206 -61
- package/src/ai/runtime/capabilities.js +11 -56
- package/src/ai/runtime/live-input-events.js +250 -54
- package/src/ai/runtime/model-refs.js +118 -153
- package/src/ai/runtime/registry.js +22 -56
- package/src/ai/runtime/router.js +76 -417
- package/src/ai/runtime/session-liveness.js +3 -4
- package/src/ai/runtime/sessions.js +4 -5
- package/src/ai/runtime/tool-policy.js +0 -2
- package/src/ai/tool-lifecycle.js +32 -18
- package/src/ai/types.js +37 -112
- package/src/index.js +0 -6
- package/src/runtime.js +29 -16
- package/types/agent/tool-bloat.d.ts +1 -1
- package/types/agent/tools/agent-tool.d.ts +4 -2
- package/types/agent/tools/bash.d.ts +5 -3
- package/types/agent/tools/codex-subscription-search.d.ts +7 -3
- package/types/agent/tools/exec.d.ts +5 -3
- package/types/agent/tools/index.d.ts +1 -0
- package/types/agent/tools/monitor.d.ts +47 -0
- package/types/agent/tools/pi-bridge.d.ts +7 -4
- package/types/agent/tools/shared/bash-environment.d.ts +4 -0
- package/types/agent/tools/shared/monitors.d.ts +98 -0
- package/types/agent/tools/shared/process-jobs.d.ts +5 -1
- package/types/agent/tools/shared/process-runner.d.ts +14 -4
- package/types/agent/tools/shared/tool-context.d.ts +2 -0
- package/types/agent/tools/web-access-interstitial.d.ts +23 -0
- package/types/agent/tools/web-browser-render.d.ts +4 -1
- package/types/agent/tools/web-controller.d.ts +4 -2
- package/types/agent/tools/web-document-extractor.d.ts +27 -0
- package/types/agent/tools/web-fetch.d.ts +19 -24
- package/types/agent/tools/web-request.d.ts +20 -0
- package/types/agent/tools/web-search-output.d.ts +31 -0
- package/types/agent/tools/web-search-state.d.ts +21 -0
- package/types/agent/tools/web-search.d.ts +10 -45
- package/types/ai/cost.d.ts +1 -2
- package/types/ai/index.d.ts +2 -4
- package/types/ai/observer.d.ts +6 -0
- package/types/ai/pi-interop.d.ts +81 -0
- package/types/ai/provider-check.d.ts +53 -0
- package/types/ai/providers/codex/app-server-client.d.ts +37 -0
- package/types/ai/providers/pi-native/compaction-driver.d.ts +2 -1
- package/types/ai/providers/pi-native/compaction-summary.d.ts +19 -0
- package/types/ai/providers/pi-native/harness-adapter.d.ts +58 -0
- package/types/ai/providers/pi-native/prompt-cache-diagnostics.d.ts +3 -0
- package/types/ai/providers/pi-native/provider-attribution.d.ts +26 -0
- package/types/ai/providers/pi-native/result-builder.d.ts +14 -4
- package/types/ai/providers/pi-native/session-lifecycle.d.ts +25 -6
- package/types/ai/providers/pi-native/stream-subscriber.d.ts +2 -2
- package/types/ai/providers/pi-native/terminal-recovery.d.ts +2 -0
- package/types/ai/providers/pi-native/turn-runner.d.ts +68 -10
- package/types/ai/providers/pi-native.d.ts +21 -4
- package/types/ai/runtime/capabilities.d.ts +21 -70
- package/types/ai/runtime/live-input-events.d.ts +32 -8
- package/types/ai/runtime/model-refs.d.ts +0 -24
- package/types/ai/runtime/router.d.ts +3 -10
- package/types/ai/runtime/tool-policy.d.ts +0 -2
- package/types/ai/tool-lifecycle.d.ts +4 -3
- package/types/ai/types.d.ts +162 -256
- package/types/index.d.ts +0 -1
- package/src/ai/providers/acp-client.js +0 -1149
- package/src/ai/providers/acp-privacy.js +0 -124
- package/src/ai/providers/acp-public.js +0 -21
- package/src/ai/providers/acp-session-tokens.js +0 -282
- package/src/ai/providers/acp-transport.js +0 -356
- package/src/ai/providers/acp.js +0 -543
- package/src/ai/providers/claude-cli.js +0 -883
- package/src/ai/providers/claude-sandbox.js +0 -71
- package/src/ai/providers/claude-sdk-discovery-worker.js +0 -53
- package/src/ai/providers/claude-sdk-discovery.js +0 -352
- package/src/ai/providers/claude-sdk.js +0 -1127
- package/src/ai/providers/claude-subagent-activity.js +0 -719
- package/src/ai/providers/claude-subagents.js +0 -88
- package/src/ai/providers/codex-app.js +0 -2946
- package/src/ai/providers/opencode-app.js +0 -1109
- package/src/ai/providers/opencode-discovery.js +0 -39
- package/src/ai/providers/opencode-server.js +0 -508
- package/src/ai/runtime/context-windows.js +0 -46
- package/src/ai/runtime/fast-mode.js +0 -8
- package/src/ai/streaming/codex-events.js +0 -146
- package/src/ai/streaming/opencode-events.js +0 -59
- package/types/ai/providers/acp-client.d.ts +0 -227
- package/types/ai/providers/acp-privacy.d.ts +0 -25
- package/types/ai/providers/acp-public.d.ts +0 -7
- package/types/ai/providers/acp-session-tokens.d.ts +0 -41
- package/types/ai/providers/acp-transport.d.ts +0 -45
- package/types/ai/providers/acp.d.ts +0 -93
- package/types/ai/providers/claude-cli.d.ts +0 -305
- package/types/ai/providers/claude-sandbox.d.ts +0 -79
- package/types/ai/providers/claude-sdk-discovery-worker.d.ts +0 -1
- package/types/ai/providers/claude-sdk-discovery.d.ts +0 -97
- package/types/ai/providers/claude-sdk.d.ts +0 -138
- package/types/ai/providers/claude-subagent-activity.d.ts +0 -53
- package/types/ai/providers/claude-subagents.d.ts +0 -18
- package/types/ai/providers/codex-app.d.ts +0 -151
- package/types/ai/providers/opencode-app.d.ts +0 -96
- package/types/ai/providers/opencode-discovery.d.ts +0 -4
- package/types/ai/providers/opencode-server.d.ts +0 -20
- package/types/ai/runtime/context-windows.d.ts +0 -9
- package/types/ai/runtime/fast-mode.d.ts +0 -2
- package/types/ai/streaming/codex-events.d.ts +0 -40
- package/types/ai/streaming/opencode-events.d.ts +0 -42
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {{command?: string, args?: string[], cwd?: any, env?: any, redactionValues?: string[], onNotification?: (msg: any) => void, onServerRequest?: (msg: any) => Promise<any> | any, shutdownGraceMs?: number, killGraceMs?: number}} [options]
|
|
3
|
-
*/
|
|
4
|
-
export function createCodexAppServerClient({ command, args, cwd, env, redactionValues, onNotification, onServerRequest, shutdownGraceMs, killGraceMs, }?: {
|
|
5
|
-
command?: string;
|
|
6
|
-
args?: string[];
|
|
7
|
-
cwd?: any;
|
|
8
|
-
env?: any;
|
|
9
|
-
redactionValues?: string[];
|
|
10
|
-
onNotification?: (msg: any) => void;
|
|
11
|
-
onServerRequest?: (msg: any) => Promise<any> | any;
|
|
12
|
-
shutdownGraceMs?: number;
|
|
13
|
-
killGraceMs?: number;
|
|
14
|
-
}): {
|
|
15
|
-
request: (method: any, params: any, { timeoutMs }?: {
|
|
16
|
-
timeoutMs?: number;
|
|
17
|
-
}) => Promise<any>;
|
|
18
|
-
close: () => Promise<void>;
|
|
19
|
-
child: import("child_process").ChildProcessWithoutNullStreams;
|
|
20
|
-
closed: Promise<any>;
|
|
21
|
-
};
|
|
22
|
-
export function generateCodexAppResponse(systemPrompt: any, options?: {}): Promise<{
|
|
23
|
-
text: any;
|
|
24
|
-
structuredResult: any;
|
|
25
|
-
structuredResultSource: any;
|
|
26
|
-
events: any[];
|
|
27
|
-
usage: {};
|
|
28
|
-
durationMs: number;
|
|
29
|
-
numTurns: number;
|
|
30
|
-
model: any;
|
|
31
|
-
effort: any;
|
|
32
|
-
sdk: string;
|
|
33
|
-
providerSessionId: any;
|
|
34
|
-
provider_session_id: any;
|
|
35
|
-
cancelled: boolean;
|
|
36
|
-
error: any;
|
|
37
|
-
failureKind: any;
|
|
38
|
-
diagnostics: {
|
|
39
|
-
codex_error_code: any;
|
|
40
|
-
};
|
|
41
|
-
capabilitiesUsed: {
|
|
42
|
-
prompt_cache_active: any;
|
|
43
|
-
thinking_enabled: any;
|
|
44
|
-
structured_output_enforced: boolean;
|
|
45
|
-
subagent_invoked: any;
|
|
46
|
-
mcp_servers_used: any[];
|
|
47
|
-
native_subagents_used: any[];
|
|
48
|
-
tool_compaction_applied: boolean;
|
|
49
|
-
context_compaction_applied: any;
|
|
50
|
-
};
|
|
51
|
-
} | {
|
|
52
|
-
text: any;
|
|
53
|
-
structuredResult: any;
|
|
54
|
-
structuredResultSource: any;
|
|
55
|
-
events: any[];
|
|
56
|
-
usage: {
|
|
57
|
-
input_tokens: any;
|
|
58
|
-
output_tokens: any;
|
|
59
|
-
cache_read_tokens: any;
|
|
60
|
-
cache_creation_tokens: any;
|
|
61
|
-
cost_usd: number;
|
|
62
|
-
};
|
|
63
|
-
durationMs: number;
|
|
64
|
-
numTurns: number;
|
|
65
|
-
model: any;
|
|
66
|
-
effort: any;
|
|
67
|
-
sdk: string;
|
|
68
|
-
providerSessionId: any;
|
|
69
|
-
provider_session_id: any;
|
|
70
|
-
cancelled: boolean;
|
|
71
|
-
error: string;
|
|
72
|
-
failureKind: string;
|
|
73
|
-
diagnostics: {
|
|
74
|
-
had_partial_progress?: boolean;
|
|
75
|
-
codex_error_code?: string;
|
|
76
|
-
};
|
|
77
|
-
capabilitiesUsed: {
|
|
78
|
-
prompt_cache_active: any;
|
|
79
|
-
thinking_enabled: any;
|
|
80
|
-
structured_output_enforced: boolean;
|
|
81
|
-
subagent_invoked: any;
|
|
82
|
-
mcp_servers_used: any[];
|
|
83
|
-
native_subagents_used: any[];
|
|
84
|
-
tool_compaction_applied: boolean;
|
|
85
|
-
context_compaction_applied: any;
|
|
86
|
-
};
|
|
87
|
-
} | {
|
|
88
|
-
text: any;
|
|
89
|
-
structuredResult: any;
|
|
90
|
-
structuredResultSource: any;
|
|
91
|
-
events: any[];
|
|
92
|
-
usage: {};
|
|
93
|
-
durationMs: number;
|
|
94
|
-
numTurns: number;
|
|
95
|
-
model: any;
|
|
96
|
-
effort: any;
|
|
97
|
-
sdk: string;
|
|
98
|
-
providerSessionId: any;
|
|
99
|
-
provider_session_id: any;
|
|
100
|
-
cancelled: boolean;
|
|
101
|
-
error: string;
|
|
102
|
-
failureKind: string;
|
|
103
|
-
diagnostics: {
|
|
104
|
-
had_partial_progress?: boolean;
|
|
105
|
-
codex_error_code?: undefined;
|
|
106
|
-
} | {
|
|
107
|
-
had_partial_progress?: boolean;
|
|
108
|
-
stderr_tail?: string;
|
|
109
|
-
codex_error_code: string;
|
|
110
|
-
codex_request_method: string;
|
|
111
|
-
codex_request_timeout_ms: any;
|
|
112
|
-
} | {
|
|
113
|
-
had_partial_progress?: boolean;
|
|
114
|
-
codex_error_code: string;
|
|
115
|
-
};
|
|
116
|
-
capabilitiesUsed: {
|
|
117
|
-
prompt_cache_active: any;
|
|
118
|
-
thinking_enabled: any;
|
|
119
|
-
structured_output_enforced: boolean;
|
|
120
|
-
subagent_invoked: any;
|
|
121
|
-
mcp_servers_used: any[];
|
|
122
|
-
native_subagents_used: any[];
|
|
123
|
-
tool_compaction_applied: boolean;
|
|
124
|
-
context_compaction_applied: any;
|
|
125
|
-
};
|
|
126
|
-
}>;
|
|
127
|
-
export namespace codexAppRuntimeBridge {
|
|
128
|
-
export let id: string;
|
|
129
|
-
export let kind: string;
|
|
130
|
-
export { CODEX_APP_CAPABILITIES as capabilities };
|
|
131
|
-
export function supports(ref: any, options: any): boolean;
|
|
132
|
-
export { generateCodexAppResponse as execute };
|
|
133
|
-
}
|
|
134
|
-
declare namespace CODEX_APP_CAPABILITIES {
|
|
135
|
-
let kind_1: string;
|
|
136
|
-
export { kind_1 as kind };
|
|
137
|
-
export let runtime: string;
|
|
138
|
-
export let streaming: boolean;
|
|
139
|
-
export let structured_output: boolean;
|
|
140
|
-
export let supports_session_resume: boolean;
|
|
141
|
-
export let native_runtime_config: any;
|
|
142
|
-
export let supports_mcp: boolean;
|
|
143
|
-
export let supports_skills: boolean;
|
|
144
|
-
export let supports_builtin_tools: boolean;
|
|
145
|
-
export let supports_live_input: boolean;
|
|
146
|
-
export let supports_native_subagents: boolean;
|
|
147
|
-
export let supports_fast_mode: boolean;
|
|
148
|
-
export { TOOL_POLICY_ALLOW_ALL_ONLY as tool_policy };
|
|
149
|
-
}
|
|
150
|
-
import { TOOL_POLICY_ALLOW_ALL_ONLY } from "../runtime/tool-policy.js";
|
|
151
|
-
export {};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extract only SDK-declared human-readable fields. In particular, never
|
|
3
|
-
* stringify API error objects: `responseBody`, response headers, and metadata
|
|
4
|
-
* can contain provider credentials or echoed request secrets.
|
|
5
|
-
*/
|
|
6
|
-
export function safeOpenCodeErrorMessage(error: any, fallback?: string): any;
|
|
7
|
-
export function mapErrorFailureKind(error: any): "context_limit" | "usage_limit" | "provider_unavailable" | "provider_auth" | "cancelled";
|
|
8
|
-
export function mapSpawnFailureKind(err: any): "spawn" | "provider_unavailable";
|
|
9
|
-
export namespace opencodeAppRuntimeBridge {
|
|
10
|
-
export let id: string;
|
|
11
|
-
export let kind: string;
|
|
12
|
-
export { OPENCODE_APP_CAPABILITIES as capabilities };
|
|
13
|
-
export function supports(ref: any, options: any): boolean;
|
|
14
|
-
export { generateOpencodeAppResponse as execute };
|
|
15
|
-
}
|
|
16
|
-
declare namespace OPENCODE_APP_CAPABILITIES {
|
|
17
|
-
let kind_1: string;
|
|
18
|
-
export { kind_1 as kind };
|
|
19
|
-
export let runtime: string;
|
|
20
|
-
export let streaming: boolean;
|
|
21
|
-
export let structured_output: boolean;
|
|
22
|
-
export let supports_session_resume: boolean;
|
|
23
|
-
export let native_runtime_config: any;
|
|
24
|
-
export let supports_mcp: boolean;
|
|
25
|
-
export let supports_skills: boolean;
|
|
26
|
-
export let supports_builtin_tools: boolean;
|
|
27
|
-
export let supports_live_input: boolean;
|
|
28
|
-
export let supports_native_subagents: boolean;
|
|
29
|
-
export let supports_fast_mode: boolean;
|
|
30
|
-
export { TOOL_POLICY_ALLOW_ALL_ONLY as tool_policy };
|
|
31
|
-
}
|
|
32
|
-
declare function generateOpencodeAppResponse(systemPrompt: any, options?: {}): Promise<{
|
|
33
|
-
text: any;
|
|
34
|
-
structuredResult: any;
|
|
35
|
-
structuredResultSource: any;
|
|
36
|
-
events: any[];
|
|
37
|
-
usage: {};
|
|
38
|
-
durationMs: number;
|
|
39
|
-
numTurns: number;
|
|
40
|
-
model: any;
|
|
41
|
-
effort: any;
|
|
42
|
-
sdk: string;
|
|
43
|
-
providerSessionId: any;
|
|
44
|
-
provider_session_id: any;
|
|
45
|
-
cancelled: boolean;
|
|
46
|
-
error: any;
|
|
47
|
-
failureKind: string;
|
|
48
|
-
diagnostics: {
|
|
49
|
-
opencode_error_code: any;
|
|
50
|
-
};
|
|
51
|
-
capabilitiesUsed: {
|
|
52
|
-
prompt_cache_active: any;
|
|
53
|
-
thinking_enabled: any;
|
|
54
|
-
structured_output_enforced: boolean;
|
|
55
|
-
subagent_invoked: any;
|
|
56
|
-
mcp_servers_used: any[];
|
|
57
|
-
native_subagents_used: any[];
|
|
58
|
-
tool_compaction_applied: boolean;
|
|
59
|
-
context_compaction_applied: any;
|
|
60
|
-
};
|
|
61
|
-
} | {
|
|
62
|
-
text: string;
|
|
63
|
-
structuredResult: any;
|
|
64
|
-
structuredResultSource: any;
|
|
65
|
-
events: any[];
|
|
66
|
-
usage: {
|
|
67
|
-
cost_usd: number;
|
|
68
|
-
};
|
|
69
|
-
durationMs: number;
|
|
70
|
-
numTurns: number;
|
|
71
|
-
model: any;
|
|
72
|
-
effort: any;
|
|
73
|
-
sdk: string;
|
|
74
|
-
providerSessionId: any;
|
|
75
|
-
provider_session_id: any;
|
|
76
|
-
cancelled: boolean;
|
|
77
|
-
error: any;
|
|
78
|
-
failureKind: any;
|
|
79
|
-
diagnostics: {
|
|
80
|
-
opencode_permission_id?: any;
|
|
81
|
-
opencode_error_code?: any;
|
|
82
|
-
had_partial_progress?: boolean;
|
|
83
|
-
};
|
|
84
|
-
capabilitiesUsed: {
|
|
85
|
-
prompt_cache_active: any;
|
|
86
|
-
thinking_enabled: any;
|
|
87
|
-
structured_output_enforced: boolean;
|
|
88
|
-
subagent_invoked: any;
|
|
89
|
-
mcp_servers_used: any[];
|
|
90
|
-
native_subagents_used: any[];
|
|
91
|
-
tool_compaction_applied: boolean;
|
|
92
|
-
context_compaction_applied: any;
|
|
93
|
-
};
|
|
94
|
-
}>;
|
|
95
|
-
import { TOOL_POLICY_ALLOW_ALL_ONLY } from "../runtime/tool-policy.js";
|
|
96
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Start one OpenCode server with mono-agent-owned process state.
|
|
3
|
-
*
|
|
4
|
-
* OpenCode stores sessions and project-wide permission approvals in SQLite. A
|
|
5
|
-
* unique per-run DB prevents pre-existing user approvals and other conversations
|
|
6
|
-
* from entering this tool environment. The normal OpenCode data home remains
|
|
7
|
-
* mounted so auth refresh rotation persists; global/repo config, external
|
|
8
|
-
* plugins, and external skills are disabled below. State is deleted after close.
|
|
9
|
-
*/
|
|
10
|
-
export function createIsolatedOpencode(options?: {}): Promise<{
|
|
11
|
-
client: import("@opencode-ai/sdk/v2").OpencodeClient;
|
|
12
|
-
server: {
|
|
13
|
-
url: any;
|
|
14
|
-
close: () => any;
|
|
15
|
-
};
|
|
16
|
-
}>;
|
|
17
|
-
/** Internal test cleanup for any server state left by an interrupted test/process. */
|
|
18
|
-
export function disposeIsolatedOpenCodeState(): Promise<void>;
|
|
19
|
-
/** Cached security preflight for the CLI features/event contract this bridge requires. */
|
|
20
|
-
export function verifyOpenCodeVersion(): any;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function normalizeContextWindow(value: any): "default" | "1m";
|
|
2
|
-
export function stripContextWindowSuffix(model: any): string;
|
|
3
|
-
export function hasExplicitOneMillionContextWindow(model: any): boolean;
|
|
4
|
-
export function claudeModelSupportsOneMillionContext(model: any): boolean;
|
|
5
|
-
export function claudeModelSupportsContextWindow(model: any, contextWindow: any): boolean;
|
|
6
|
-
export function modelWithContextWindow(model: any, contextWindow: any): string;
|
|
7
|
-
export const DEFAULT_CONTEXT_WINDOW: "default";
|
|
8
|
-
export const ONE_MILLION_CONTEXT_WINDOW: "1m";
|
|
9
|
-
export const CLAUDE_ONE_MILLION_CONTEXT_MODELS: Set<string>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export function normalizeCodexItemType(type: any): any;
|
|
2
|
-
export function normalizeCodexItemEvent(raw: any, context?: {}): {
|
|
3
|
-
is_error: boolean;
|
|
4
|
-
error?: any;
|
|
5
|
-
summary?: any;
|
|
6
|
-
type: string;
|
|
7
|
-
id: any;
|
|
8
|
-
status: any;
|
|
9
|
-
changes: any;
|
|
10
|
-
message?: undefined;
|
|
11
|
-
} | {
|
|
12
|
-
type: string;
|
|
13
|
-
message: {
|
|
14
|
-
content: {
|
|
15
|
-
type: string;
|
|
16
|
-
id: any;
|
|
17
|
-
name: any;
|
|
18
|
-
input: any;
|
|
19
|
-
}[];
|
|
20
|
-
};
|
|
21
|
-
} | {
|
|
22
|
-
type: string;
|
|
23
|
-
message: {
|
|
24
|
-
content: {
|
|
25
|
-
type: string;
|
|
26
|
-
tool_use_id: any;
|
|
27
|
-
content: any;
|
|
28
|
-
is_error: boolean;
|
|
29
|
-
tool_lifecycle: any;
|
|
30
|
-
}[];
|
|
31
|
-
};
|
|
32
|
-
} | {
|
|
33
|
-
type: string;
|
|
34
|
-
message: {
|
|
35
|
-
content: {
|
|
36
|
-
type: string;
|
|
37
|
-
text: any;
|
|
38
|
-
}[];
|
|
39
|
-
};
|
|
40
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export function toolUseEvent(part: any): {
|
|
2
|
-
type: string;
|
|
3
|
-
message: {
|
|
4
|
-
content: {
|
|
5
|
-
type: string;
|
|
6
|
-
id: any;
|
|
7
|
-
name: any;
|
|
8
|
-
input: any;
|
|
9
|
-
}[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export function toolResultEvent(part: any): {
|
|
13
|
-
type: string;
|
|
14
|
-
message: {
|
|
15
|
-
content: {
|
|
16
|
-
type: string;
|
|
17
|
-
tool_use_id: any;
|
|
18
|
-
content: any;
|
|
19
|
-
is_error: boolean;
|
|
20
|
-
tool_lifecycle: any;
|
|
21
|
-
}[];
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export function thinkingEvent(part: any): {
|
|
25
|
-
type: string;
|
|
26
|
-
message: {
|
|
27
|
-
content: {
|
|
28
|
-
type: string;
|
|
29
|
-
text: any;
|
|
30
|
-
}[];
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export function assistantTextEvent(text: any): {
|
|
34
|
-
type: string;
|
|
35
|
-
message: {
|
|
36
|
-
content: {
|
|
37
|
-
type: string;
|
|
38
|
-
text: any;
|
|
39
|
-
}[];
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export function toolPartSettled(part: any): boolean;
|