@agent-watch-ai/edge 0.4.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.
- package/CHANGELOG.md +29 -0
- package/README.md +3 -3
- package/SECURITY.md +1 -1
- package/dist/config/config-store.js +1 -1
- package/dist/config/repo-config.js +1 -1
- package/dist/config/schemas/config.schema.d.ts +93 -857
- package/dist/config/schemas/config.schema.js +5 -5
- package/dist/credentials/credentials.js +2 -2
- package/dist/credentials/schemas/device-api.schema.d.ts +4 -51
- package/dist/credentials/schemas/device-state.schema.d.ts +3 -38
- package/dist/git/code-state.d.ts +33 -0
- package/dist/git/code-state.js +44 -0
- package/dist/git/constants/git.constants.d.ts +6 -0
- package/dist/git/constants/git.constants.js +6 -0
- package/dist/git/index.d.ts +2 -1
- package/dist/git/index.js +1 -0
- package/dist/git/types/git.types.d.ts +6 -0
- package/dist/privacy/command-fingerprint.d.ts +42 -0
- package/dist/privacy/command-fingerprint.js +249 -0
- package/dist/privacy/constants/command-fingerprint.constants.d.ts +34 -0
- package/dist/privacy/constants/command-fingerprint.constants.js +38 -0
- package/dist/privacy/index.d.ts +3 -1
- package/dist/privacy/index.js +2 -0
- package/dist/privacy/product-capture.js +19 -1
- package/dist/privacy/types/privacy.types.d.ts +7 -0
- package/dist/providers/antigravity/antigravity.adapter.js +3 -0
- package/dist/providers/antigravity/schemas/antigravity.schema.d.ts +18 -492
- package/dist/providers/claude/claude.adapter.js +12 -1
- package/dist/providers/claude/constants/claude.constants.d.ts +6 -0
- package/dist/providers/claude/constants/claude.constants.js +6 -0
- package/dist/providers/claude/schemas/claude.schema.d.ts +1 -43
- package/dist/providers/codex/codex.adapter.js +14 -0
- package/dist/providers/codex/schemas/codex.schema.d.ts +1 -41
- package/dist/providers/cursor/cursor.adapter.js +5 -2
- package/dist/providers/cursor/schemas/cursor.schema.d.ts +5 -85
- package/dist/providers/gemini/constants/gemini.constants.d.ts +2 -0
- package/dist/providers/gemini/constants/gemini.constants.js +2 -0
- package/dist/providers/gemini/constants/gemini.otel.constants.d.ts +10 -1
- package/dist/providers/gemini/constants/gemini.otel.constants.js +11 -2
- package/dist/providers/gemini/gemini.detect.d.ts +11 -0
- package/dist/providers/gemini/gemini.detect.js +14 -1
- package/dist/providers/gemini/gemini.hooks.d.ts +3 -3
- package/dist/providers/gemini/gemini.hooks.js +5 -5
- package/dist/providers/gemini/gemini.otel.d.ts +6 -6
- package/dist/providers/gemini/gemini.otel.js +392 -121
- package/dist/providers/gemini/schemas/gemini.schema.d.ts +1 -49
- package/dist/providers/shared/event-builder.d.ts +17 -2
- package/dist/providers/shared/event-builder.js +43 -3
- package/dist/providers/shared/install-record.d.ts +2 -0
- package/dist/providers/shared/install-record.js +3 -2
- package/dist/providers/shared/tooling.d.ts +7 -0
- package/dist/providers/shared/tooling.js +10 -1
- package/dist/providers/shared/types/adapter.types.d.ts +18 -0
- package/dist/storage/schemas/storage.schema.d.ts +11 -175
- package/dist/storage/schemas/storage.schema.js +7 -1
- package/dist/transport/schemas/queue.schema.d.ts +1 -16
- package/dist/transport/schemas/queue.schema.js +1 -1
- package/dist/turns/constants/turns.constants.d.ts +17 -0
- package/dist/turns/constants/turns.constants.js +17 -0
- package/dist/turns/index.d.ts +3 -2
- package/dist/turns/index.js +1 -0
- package/dist/turns/tool-events.d.ts +15 -0
- package/dist/turns/tool-events.js +59 -0
- package/dist/turns/turn-state.js +2 -2
- package/dist/turns/turn-summary.d.ts +1 -1
- package/dist/turns/turn-summary.js +1 -0
- package/dist/turns/turn-tracker.js +138 -7
- package/dist/turns/types/turn-state.types.d.ts +28 -1
- package/dist/turns/types/turn-summary.types.d.ts +30 -0
- package/dist/turns/types/turn-tracker.types.d.ts +10 -0
- package/docs/AUDIT_PROMPT.md +11 -0
- package/docs/DATA_HANDLING.md +58 -10
- package/docs/ENTERPRISE_DEPLOYMENT.md +2 -1
- package/package.json +9 -8
package/dist/privacy/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* The last gate before anything leaves the machine: known credential shapes
|
|
3
3
|
* are removed from every outgoing value, whatever the capture settings.
|
|
4
4
|
*/
|
|
5
|
-
export type { SecretPattern } from './types/privacy.types.js';
|
|
5
|
+
export type { CommandFingerprint, SecretPattern } from './types/privacy.types.js';
|
|
6
6
|
export { REDACTED, SECRET_PATTERNS, SENSITIVE_KEY_PATTERN } from './constants/privacy.constants.js';
|
|
7
7
|
export { sanitizeText, sanitizeValue } from './sanitizer.js';
|
|
8
8
|
export { applyProductCapture } from './product-capture.js';
|
|
9
|
+
export { CHECK_MIN_DURATION_MS, COMMAND_SCHEME } from './constants/command-fingerprint.constants.js';
|
|
10
|
+
export { checkSegment, commandFingerprint, commandText, normaliseCommand } from './command-fingerprint.js';
|
package/dist/privacy/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { REDACTED, SECRET_PATTERNS, SENSITIVE_KEY_PATTERN } from './constants/privacy.constants.js';
|
|
2
2
|
export { sanitizeText, sanitizeValue } from './sanitizer.js';
|
|
3
3
|
export { applyProductCapture } from './product-capture.js';
|
|
4
|
+
export { CHECK_MIN_DURATION_MS, COMMAND_SCHEME } from './constants/command-fingerprint.constants.js';
|
|
5
|
+
export { checkSegment, commandFingerprint, commandText, normaliseCommand } from './command-fingerprint.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { foldMcpNames } from '../providers/shared/tooling.js';
|
|
1
|
+
import { foldMcpName, foldMcpNames } from '../providers/shared/tooling.js';
|
|
2
2
|
import { sanitizeValue } from './sanitizer.js';
|
|
3
3
|
/**
|
|
4
4
|
* Reapply current capture policy to persisted records before queueing or sending.
|
|
@@ -49,6 +49,10 @@ export function applyProductCapture(event, capture) {
|
|
|
49
49
|
prompt_jira_ids: git ? undefined : summary.prompt_jira_ids,
|
|
50
50
|
work_evidence: git ? undefined : summary.work_evidence,
|
|
51
51
|
parent_session_id: git ? undefined : summary.parent_session_id,
|
|
52
|
+
// Content-free (ids, times, outcome, digests), but on by default with git
|
|
53
|
+
// context and withheld whole without it: a digest of a command still says
|
|
54
|
+
// which command ran when.
|
|
55
|
+
tool_events: git ? undefined : withMcpPolicy(summary.tool_events, capture?.mcpNames === false),
|
|
52
56
|
content_hashes: files ? undefined : summary.content_hashes,
|
|
53
57
|
manifest_repository: files ? undefined : summary.manifest_repository,
|
|
54
58
|
files_changed: files ? undefined : summary.files_changed,
|
|
@@ -58,6 +62,20 @@ export function applyProductCapture(event, capture) {
|
|
|
58
62
|
external_files_read: files ? undefined : summary.external_files_read
|
|
59
63
|
});
|
|
60
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Tool events with MCP names folded as `tools_used` folds them, when the
|
|
67
|
+
* policy withholds them: one name per call would otherwise say what the
|
|
68
|
+
* counts were folded to hide.
|
|
69
|
+
*
|
|
70
|
+
* @param events - The summary's tool events, if any.
|
|
71
|
+
* @param fold - Whether `capture.mcpNames` is off.
|
|
72
|
+
* @returns The events, folded when asked.
|
|
73
|
+
*/
|
|
74
|
+
function withMcpPolicy(events, fold) {
|
|
75
|
+
if (!fold || events === undefined)
|
|
76
|
+
return events;
|
|
77
|
+
return events.map((event) => ({ ...event, tool: foldMcpName(event.tool) }));
|
|
78
|
+
}
|
|
61
79
|
/**
|
|
62
80
|
* A snapshot with no commit file names, for a policy that withholds paths.
|
|
63
81
|
*
|
|
@@ -11,3 +11,10 @@ export interface SecretPattern {
|
|
|
11
11
|
*/
|
|
12
12
|
readonly replacement?: string;
|
|
13
13
|
}
|
|
14
|
+
/** What the edge sends for one shell call. Never the command itself. */
|
|
15
|
+
export interface CommandFingerprint {
|
|
16
|
+
/** sha256 hex of the check segment when there is one, else of the whole normalised command; null when nothing is left. */
|
|
17
|
+
readonly digest: string | null;
|
|
18
|
+
/** A segment is on the check allowlist. A check also needs `CHECK_MIN_DURATION_MS`. */
|
|
19
|
+
readonly matchesCheck: boolean;
|
|
20
|
+
}
|
|
@@ -187,6 +187,9 @@ function antigravityToolPatch(payload, hook, context) {
|
|
|
187
187
|
status: toolStatus(hook, failed),
|
|
188
188
|
kind,
|
|
189
189
|
input: toolCall?.args,
|
|
190
|
+
// Unique within an execution, which is the turn: it pairs the two hooks
|
|
191
|
+
// of one call, and is never sent as the call's id.
|
|
192
|
+
pairingKey: stepIdxOf(payload, hook),
|
|
190
193
|
output: hook === 'PostToolUse' ? payload.postToolHookArgs?.result : undefined,
|
|
191
194
|
error: failed ? payload.postToolHookArgs?.error : undefined,
|
|
192
195
|
providerFields: mcp ? { mcpServer: mcp.server, mcpTool: mcp.tool } : undefined
|
|
@@ -2,520 +2,46 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const antigravityPayloadSchema: z.ZodObject<{
|
|
3
3
|
common: z.ZodOptional<z.ZodObject<{
|
|
4
4
|
conversationId: z.ZodOptional<z.ZodString>;
|
|
5
|
-
workspacePaths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
5
|
+
workspacePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
6
|
transcriptPath: z.ZodOptional<z.ZodString>;
|
|
7
7
|
artifactDirectoryPath: z.ZodOptional<z.ZodString>;
|
|
8
8
|
executionId: z.ZodOptional<z.ZodString>;
|
|
9
9
|
modelName: z.ZodOptional<z.ZodString>;
|
|
10
10
|
isBattleMode: z.ZodOptional<z.ZodBoolean>;
|
|
11
11
|
lastUserInput: z.ZodOptional<z.ZodString>;
|
|
12
|
-
},
|
|
13
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
14
|
-
workspacePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
|
-
transcriptPath: z.ZodOptional<z.ZodString>;
|
|
16
|
-
artifactDirectoryPath: z.ZodOptional<z.ZodString>;
|
|
17
|
-
executionId: z.ZodOptional<z.ZodString>;
|
|
18
|
-
modelName: z.ZodOptional<z.ZodString>;
|
|
19
|
-
isBattleMode: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
-
lastUserInput: z.ZodOptional<z.ZodString>;
|
|
21
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
22
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
23
|
-
workspacePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
24
|
-
transcriptPath: z.ZodOptional<z.ZodString>;
|
|
25
|
-
artifactDirectoryPath: z.ZodOptional<z.ZodString>;
|
|
26
|
-
executionId: z.ZodOptional<z.ZodString>;
|
|
27
|
-
modelName: z.ZodOptional<z.ZodString>;
|
|
28
|
-
isBattleMode: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
-
lastUserInput: z.ZodOptional<z.ZodString>;
|
|
30
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
31
|
-
preToolHookArgs: z.ZodOptional<z.ZodObject<{
|
|
32
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
33
|
-
name: z.ZodOptional<z.ZodString>;
|
|
34
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
35
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
36
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
37
|
-
name: z.ZodOptional<z.ZodString>;
|
|
38
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
39
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
40
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
41
|
-
name: z.ZodOptional<z.ZodString>;
|
|
42
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
43
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
44
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
45
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
46
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
47
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
48
|
-
name: z.ZodOptional<z.ZodString>;
|
|
49
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
50
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
51
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
52
|
-
name: z.ZodOptional<z.ZodString>;
|
|
53
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
54
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
55
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
56
|
-
name: z.ZodOptional<z.ZodString>;
|
|
57
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
58
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
59
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
60
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
61
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
62
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
63
|
-
name: z.ZodOptional<z.ZodString>;
|
|
64
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
65
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
66
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
67
|
-
name: z.ZodOptional<z.ZodString>;
|
|
68
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
69
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
70
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
71
|
-
name: z.ZodOptional<z.ZodString>;
|
|
72
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
73
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
74
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
75
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
76
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
77
|
-
postToolHookArgs: z.ZodOptional<z.ZodObject<{
|
|
78
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
79
|
-
name: z.ZodOptional<z.ZodString>;
|
|
80
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
81
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
82
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
83
|
-
name: z.ZodOptional<z.ZodString>;
|
|
84
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
85
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
86
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
87
|
-
name: z.ZodOptional<z.ZodString>;
|
|
88
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
89
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
90
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
91
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
92
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
93
|
-
result: z.ZodOptional<z.ZodUnknown>;
|
|
94
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
95
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
96
|
-
name: z.ZodOptional<z.ZodString>;
|
|
97
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
98
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
99
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
100
|
-
name: z.ZodOptional<z.ZodString>;
|
|
101
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
102
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
103
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
104
|
-
name: z.ZodOptional<z.ZodString>;
|
|
105
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
106
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
107
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
108
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
109
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
110
|
-
result: z.ZodOptional<z.ZodUnknown>;
|
|
111
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
112
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
113
|
-
name: z.ZodOptional<z.ZodString>;
|
|
114
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
115
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
116
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
117
|
-
name: z.ZodOptional<z.ZodString>;
|
|
118
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
119
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
120
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
121
|
-
name: z.ZodOptional<z.ZodString>;
|
|
122
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
123
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
124
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
125
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
126
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
127
|
-
result: z.ZodOptional<z.ZodUnknown>;
|
|
128
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
129
|
-
preInvocationHookArgs: z.ZodOptional<z.ZodObject<{
|
|
130
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
131
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
132
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
133
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
134
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
135
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
136
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
137
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
138
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
139
|
-
postInvocationHookArgs: z.ZodOptional<z.ZodObject<{
|
|
140
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
141
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
142
|
-
modelOutput: z.ZodOptional<z.ZodString>;
|
|
143
|
-
modelThinking: z.ZodOptional<z.ZodString>;
|
|
144
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
145
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
146
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
147
|
-
modelOutput: z.ZodOptional<z.ZodString>;
|
|
148
|
-
modelThinking: z.ZodOptional<z.ZodString>;
|
|
149
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
150
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
151
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
152
|
-
modelOutput: z.ZodOptional<z.ZodString>;
|
|
153
|
-
modelThinking: z.ZodOptional<z.ZodString>;
|
|
154
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
155
|
-
stopHookArgs: z.ZodOptional<z.ZodObject<{
|
|
156
|
-
executionNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
157
|
-
terminationReason: z.ZodOptional<z.ZodString>;
|
|
158
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
159
|
-
fullyIdle: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
-
finalModelOutput: z.ZodOptional<z.ZodString>;
|
|
161
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
162
|
-
executionNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
163
|
-
terminationReason: z.ZodOptional<z.ZodString>;
|
|
164
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
165
|
-
fullyIdle: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
-
finalModelOutput: z.ZodOptional<z.ZodString>;
|
|
167
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
168
|
-
executionNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
169
|
-
terminationReason: z.ZodOptional<z.ZodString>;
|
|
170
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
171
|
-
fullyIdle: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
-
finalModelOutput: z.ZodOptional<z.ZodString>;
|
|
173
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
174
|
-
sessionStartHookArgs: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
|
|
175
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
176
|
-
common: z.ZodOptional<z.ZodObject<{
|
|
177
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
178
|
-
workspacePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
179
|
-
transcriptPath: z.ZodOptional<z.ZodString>;
|
|
180
|
-
artifactDirectoryPath: z.ZodOptional<z.ZodString>;
|
|
181
|
-
executionId: z.ZodOptional<z.ZodString>;
|
|
182
|
-
modelName: z.ZodOptional<z.ZodString>;
|
|
183
|
-
isBattleMode: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
-
lastUserInput: z.ZodOptional<z.ZodString>;
|
|
185
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
186
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
187
|
-
workspacePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
188
|
-
transcriptPath: z.ZodOptional<z.ZodString>;
|
|
189
|
-
artifactDirectoryPath: z.ZodOptional<z.ZodString>;
|
|
190
|
-
executionId: z.ZodOptional<z.ZodString>;
|
|
191
|
-
modelName: z.ZodOptional<z.ZodString>;
|
|
192
|
-
isBattleMode: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
-
lastUserInput: z.ZodOptional<z.ZodString>;
|
|
194
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
195
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
196
|
-
workspacePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
197
|
-
transcriptPath: z.ZodOptional<z.ZodString>;
|
|
198
|
-
artifactDirectoryPath: z.ZodOptional<z.ZodString>;
|
|
199
|
-
executionId: z.ZodOptional<z.ZodString>;
|
|
200
|
-
modelName: z.ZodOptional<z.ZodString>;
|
|
201
|
-
isBattleMode: z.ZodOptional<z.ZodBoolean>;
|
|
202
|
-
lastUserInput: z.ZodOptional<z.ZodString>;
|
|
203
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
204
|
-
preToolHookArgs: z.ZodOptional<z.ZodObject<{
|
|
205
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
206
|
-
name: z.ZodOptional<z.ZodString>;
|
|
207
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
208
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
209
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
210
|
-
name: z.ZodOptional<z.ZodString>;
|
|
211
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
212
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
213
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
214
|
-
name: z.ZodOptional<z.ZodString>;
|
|
215
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
216
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
217
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
218
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
219
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
220
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
221
|
-
name: z.ZodOptional<z.ZodString>;
|
|
222
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
223
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
224
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
225
|
-
name: z.ZodOptional<z.ZodString>;
|
|
226
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
227
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
228
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
229
|
-
name: z.ZodOptional<z.ZodString>;
|
|
230
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
231
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
232
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
233
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
234
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
235
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
236
|
-
name: z.ZodOptional<z.ZodString>;
|
|
237
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
238
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
239
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
240
|
-
name: z.ZodOptional<z.ZodString>;
|
|
241
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
242
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
243
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
244
|
-
name: z.ZodOptional<z.ZodString>;
|
|
245
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
246
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
247
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
248
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
249
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
250
|
-
postToolHookArgs: z.ZodOptional<z.ZodObject<{
|
|
251
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
252
|
-
name: z.ZodOptional<z.ZodString>;
|
|
253
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
254
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
255
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
256
|
-
name: z.ZodOptional<z.ZodString>;
|
|
257
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
258
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
259
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
260
|
-
name: z.ZodOptional<z.ZodString>;
|
|
261
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
262
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
263
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
264
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
265
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
266
|
-
result: z.ZodOptional<z.ZodUnknown>;
|
|
267
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
268
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
269
|
-
name: z.ZodOptional<z.ZodString>;
|
|
270
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
271
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
272
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
273
|
-
name: z.ZodOptional<z.ZodString>;
|
|
274
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
275
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
276
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
277
|
-
name: z.ZodOptional<z.ZodString>;
|
|
278
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
279
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
280
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
281
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
282
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
283
|
-
result: z.ZodOptional<z.ZodUnknown>;
|
|
284
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
285
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
286
|
-
name: z.ZodOptional<z.ZodString>;
|
|
287
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
288
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
289
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
290
|
-
name: z.ZodOptional<z.ZodString>;
|
|
291
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
292
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
293
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
294
|
-
name: z.ZodOptional<z.ZodString>;
|
|
295
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
296
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
297
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
298
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
299
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
300
|
-
result: z.ZodOptional<z.ZodUnknown>;
|
|
301
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
302
|
-
preInvocationHookArgs: z.ZodOptional<z.ZodObject<{
|
|
303
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
304
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
305
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
306
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
307
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
308
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
309
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
310
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
311
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
312
|
-
postInvocationHookArgs: z.ZodOptional<z.ZodObject<{
|
|
313
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
314
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
315
|
-
modelOutput: z.ZodOptional<z.ZodString>;
|
|
316
|
-
modelThinking: z.ZodOptional<z.ZodString>;
|
|
317
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
318
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
319
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
320
|
-
modelOutput: z.ZodOptional<z.ZodString>;
|
|
321
|
-
modelThinking: z.ZodOptional<z.ZodString>;
|
|
322
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
323
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
324
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
325
|
-
modelOutput: z.ZodOptional<z.ZodString>;
|
|
326
|
-
modelThinking: z.ZodOptional<z.ZodString>;
|
|
327
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
328
|
-
stopHookArgs: z.ZodOptional<z.ZodObject<{
|
|
329
|
-
executionNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
330
|
-
terminationReason: z.ZodOptional<z.ZodString>;
|
|
331
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
332
|
-
fullyIdle: z.ZodOptional<z.ZodBoolean>;
|
|
333
|
-
finalModelOutput: z.ZodOptional<z.ZodString>;
|
|
334
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
335
|
-
executionNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
336
|
-
terminationReason: z.ZodOptional<z.ZodString>;
|
|
337
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
338
|
-
fullyIdle: z.ZodOptional<z.ZodBoolean>;
|
|
339
|
-
finalModelOutput: z.ZodOptional<z.ZodString>;
|
|
340
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
341
|
-
executionNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
342
|
-
terminationReason: z.ZodOptional<z.ZodString>;
|
|
343
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
344
|
-
fullyIdle: z.ZodOptional<z.ZodBoolean>;
|
|
345
|
-
finalModelOutput: z.ZodOptional<z.ZodString>;
|
|
346
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
347
|
-
sessionStartHookArgs: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
|
|
348
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
349
|
-
common: z.ZodOptional<z.ZodObject<{
|
|
350
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
351
|
-
workspacePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
352
|
-
transcriptPath: z.ZodOptional<z.ZodString>;
|
|
353
|
-
artifactDirectoryPath: z.ZodOptional<z.ZodString>;
|
|
354
|
-
executionId: z.ZodOptional<z.ZodString>;
|
|
355
|
-
modelName: z.ZodOptional<z.ZodString>;
|
|
356
|
-
isBattleMode: z.ZodOptional<z.ZodBoolean>;
|
|
357
|
-
lastUserInput: z.ZodOptional<z.ZodString>;
|
|
358
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
359
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
360
|
-
workspacePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
361
|
-
transcriptPath: z.ZodOptional<z.ZodString>;
|
|
362
|
-
artifactDirectoryPath: z.ZodOptional<z.ZodString>;
|
|
363
|
-
executionId: z.ZodOptional<z.ZodString>;
|
|
364
|
-
modelName: z.ZodOptional<z.ZodString>;
|
|
365
|
-
isBattleMode: z.ZodOptional<z.ZodBoolean>;
|
|
366
|
-
lastUserInput: z.ZodOptional<z.ZodString>;
|
|
367
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
368
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
369
|
-
workspacePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
370
|
-
transcriptPath: z.ZodOptional<z.ZodString>;
|
|
371
|
-
artifactDirectoryPath: z.ZodOptional<z.ZodString>;
|
|
372
|
-
executionId: z.ZodOptional<z.ZodString>;
|
|
373
|
-
modelName: z.ZodOptional<z.ZodString>;
|
|
374
|
-
isBattleMode: z.ZodOptional<z.ZodBoolean>;
|
|
375
|
-
lastUserInput: z.ZodOptional<z.ZodString>;
|
|
376
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
12
|
+
}, z.core.$loose>>;
|
|
377
13
|
preToolHookArgs: z.ZodOptional<z.ZodObject<{
|
|
378
14
|
toolCall: z.ZodOptional<z.ZodObject<{
|
|
379
15
|
name: z.ZodOptional<z.ZodString>;
|
|
380
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
381
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
382
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
383
|
-
name: z.ZodOptional<z.ZodString>;
|
|
384
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
385
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
386
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
387
|
-
name: z.ZodOptional<z.ZodString>;
|
|
388
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
389
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
390
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
391
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
392
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
393
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
394
|
-
name: z.ZodOptional<z.ZodString>;
|
|
395
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
396
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
397
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
398
|
-
name: z.ZodOptional<z.ZodString>;
|
|
399
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
400
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
401
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
402
|
-
name: z.ZodOptional<z.ZodString>;
|
|
403
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
404
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
405
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
406
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
407
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
408
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
409
|
-
name: z.ZodOptional<z.ZodString>;
|
|
410
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
411
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
412
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
413
|
-
name: z.ZodOptional<z.ZodString>;
|
|
414
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
415
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
416
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
417
|
-
name: z.ZodOptional<z.ZodString>;
|
|
418
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
419
16
|
args: z.ZodOptional<z.ZodUnknown>;
|
|
420
|
-
}, z.
|
|
421
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
422
|
-
}, z.
|
|
17
|
+
}, z.core.$loose>>;
|
|
18
|
+
stepIdx: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
19
|
+
}, z.core.$loose>>;
|
|
423
20
|
postToolHookArgs: z.ZodOptional<z.ZodObject<{
|
|
424
21
|
toolCall: z.ZodOptional<z.ZodObject<{
|
|
425
22
|
name: z.ZodOptional<z.ZodString>;
|
|
426
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
427
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
428
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
429
|
-
name: z.ZodOptional<z.ZodString>;
|
|
430
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
431
23
|
args: z.ZodOptional<z.ZodUnknown>;
|
|
432
|
-
}, z.
|
|
433
|
-
|
|
434
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
435
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
436
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
437
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
438
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
439
|
-
result: z.ZodOptional<z.ZodUnknown>;
|
|
440
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
441
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
442
|
-
name: z.ZodOptional<z.ZodString>;
|
|
443
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
444
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
445
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
446
|
-
name: z.ZodOptional<z.ZodString>;
|
|
447
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
448
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
449
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
450
|
-
name: z.ZodOptional<z.ZodString>;
|
|
451
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
452
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
453
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
454
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
24
|
+
}, z.core.$loose>>;
|
|
25
|
+
stepIdx: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
455
26
|
error: z.ZodOptional<z.ZodUnknown>;
|
|
456
27
|
result: z.ZodOptional<z.ZodUnknown>;
|
|
457
|
-
}, z.
|
|
458
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
459
|
-
name: z.ZodOptional<z.ZodString>;
|
|
460
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
461
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
462
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
463
|
-
name: z.ZodOptional<z.ZodString>;
|
|
464
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
465
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
466
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
467
|
-
name: z.ZodOptional<z.ZodString>;
|
|
468
|
-
/** `google.protobuf.Struct`: an arbitrary JSON object. */
|
|
469
|
-
args: z.ZodOptional<z.ZodUnknown>;
|
|
470
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
471
|
-
stepIdx: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
472
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
473
|
-
result: z.ZodOptional<z.ZodUnknown>;
|
|
474
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
28
|
+
}, z.core.$loose>>;
|
|
475
29
|
preInvocationHookArgs: z.ZodOptional<z.ZodObject<{
|
|
476
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
477
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
478
|
-
},
|
|
479
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
480
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
481
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
482
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
483
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
484
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
30
|
+
invocationNum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
31
|
+
initialNumSteps: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
32
|
+
}, z.core.$loose>>;
|
|
485
33
|
postInvocationHookArgs: z.ZodOptional<z.ZodObject<{
|
|
486
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
487
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
488
|
-
modelOutput: z.ZodOptional<z.ZodString>;
|
|
489
|
-
modelThinking: z.ZodOptional<z.ZodString>;
|
|
490
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
491
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
492
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
493
|
-
modelOutput: z.ZodOptional<z.ZodString>;
|
|
494
|
-
modelThinking: z.ZodOptional<z.ZodString>;
|
|
495
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
496
|
-
invocationNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
497
|
-
initialNumSteps: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
34
|
+
invocationNum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
35
|
+
initialNumSteps: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
498
36
|
modelOutput: z.ZodOptional<z.ZodString>;
|
|
499
37
|
modelThinking: z.ZodOptional<z.ZodString>;
|
|
500
|
-
}, z.
|
|
38
|
+
}, z.core.$loose>>;
|
|
501
39
|
stopHookArgs: z.ZodOptional<z.ZodObject<{
|
|
502
|
-
executionNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
503
|
-
terminationReason: z.ZodOptional<z.ZodString>;
|
|
504
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
505
|
-
fullyIdle: z.ZodOptional<z.ZodBoolean>;
|
|
506
|
-
finalModelOutput: z.ZodOptional<z.ZodString>;
|
|
507
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
508
|
-
executionNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
509
|
-
terminationReason: z.ZodOptional<z.ZodString>;
|
|
510
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
511
|
-
fullyIdle: z.ZodOptional<z.ZodBoolean>;
|
|
512
|
-
finalModelOutput: z.ZodOptional<z.ZodString>;
|
|
513
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
514
|
-
executionNum: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
40
|
+
executionNum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
515
41
|
terminationReason: z.ZodOptional<z.ZodString>;
|
|
516
42
|
error: z.ZodOptional<z.ZodUnknown>;
|
|
517
43
|
fullyIdle: z.ZodOptional<z.ZodBoolean>;
|
|
518
44
|
finalModelOutput: z.ZodOptional<z.ZodString>;
|
|
519
|
-
}, z.
|
|
520
|
-
sessionStartHookArgs: z.ZodOptional<z.ZodObject<{},
|
|
521
|
-
}, z.
|
|
45
|
+
}, z.core.$loose>>;
|
|
46
|
+
sessionStartHookArgs: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
47
|
+
}, z.core.$loose>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { sha256Hex } from '../../events/event-id.js';
|
|
2
2
|
import { baseEvent, promptPatch, responsePatch, toolPatch, withPatch } from '../shared/event-builder.js';
|
|
3
3
|
import { classifyTool, extractCommand, parseMcpToolName, toolCompleteType, toolStartType } from '../shared/tooling.js';
|
|
4
|
-
import { CLAUDE_DISPLAY_NAME, CLAUDE_EVENT_TYPE_MAP, CLAUDE_PROVIDER_ID, CLAUDE_SHELL_REREAD_EVENTS, CLAUDE_TOOL_EVENTS, CLAUDE_TOOL_START_EVENTS, CLAUDE_UNKNOWN_EVENT } from './constants/claude.constants.js';
|
|
4
|
+
import { CLAUDE_DISPLAY_NAME, CLAUDE_EVENT_TYPE_MAP, CLAUDE_PROVIDER_ID, CLAUDE_SHELL_REREAD_EVENTS, CLAUDE_TOOL_EVENTS, CLAUDE_TOOL_START_EVENTS, CLAUDE_UNKNOWN_EVENT, RE_CLAUDE_EXIT_CODE } from './constants/claude.constants.js';
|
|
5
5
|
import { claudePayloadSchema } from './schemas/claude.schema.js';
|
|
6
6
|
/**
|
|
7
7
|
* Translate one Claude Code hook payload into canonical events.
|
|
@@ -124,9 +124,20 @@ function claudeToolPatch(payload, providerEventType, context) {
|
|
|
124
124
|
input: payload.tool_input,
|
|
125
125
|
output: payload.tool_response,
|
|
126
126
|
error: providerEventType === 'PostToolUseFailure' ? payload.tool_error : undefined,
|
|
127
|
+
exitCode: providerEventType === 'PostToolUseFailure' && kind === 'shell' ? exitCodeIn(payload.tool_error) : undefined,
|
|
127
128
|
providerFields: mcp ? { mcpServer: mcp.server, mcpTool: mcp.tool } : undefined
|
|
128
129
|
}, context.config.capture);
|
|
129
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* The exit code a failed shell call's error text states.
|
|
133
|
+
*
|
|
134
|
+
* @param error - `tool_error` as the payload carries it.
|
|
135
|
+
* @returns The code, or undefined when the text names none.
|
|
136
|
+
*/
|
|
137
|
+
function exitCodeIn(error) {
|
|
138
|
+
const match = typeof error === 'string' ? RE_CLAUDE_EXIT_CODE.exec(error) : null;
|
|
139
|
+
return match?.[1] === undefined ? undefined : Number(match[1]);
|
|
140
|
+
}
|
|
130
141
|
/**
|
|
131
142
|
* Whether a tool hook reports a start, a failure, or a completion.
|
|
132
143
|
*
|