@intentic/sandbox-contract 1.126.0 → 1.133.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/dist/agent-catalog.d.ts.map +1 -1
- package/dist/contracts/activity.contract.d.ts +4 -4
- package/dist/contracts/activity.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.d.ts +283 -252
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +4 -3
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/agents.contract.d.ts +15 -13
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/automations.contract.d.ts +3 -3
- package/dist/contracts/automations.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +21 -16
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/claude.contract.d.ts.map +1 -1
- package/dist/contracts/codex.contract.d.ts.map +1 -1
- package/dist/contracts/drafts.contract.d.ts +6 -6
- package/dist/contracts/drafts.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +4 -4
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/git.contract.d.ts +6 -4
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/grok.contract.d.ts.map +1 -1
- package/dist/contracts/history.contract.d.ts +3 -3
- package/dist/contracts/history.contract.d.ts.map +1 -1
- package/dist/contracts/intentic.contract.d.ts.map +1 -1
- package/dist/contracts/inventory.contract.d.ts +20 -20
- package/dist/contracts/inventory.contract.d.ts.map +1 -1
- package/dist/contracts/logs.contract.d.ts.map +1 -1
- package/dist/contracts/panels.contract.d.ts +1 -1
- package/dist/contracts/panels.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.d.ts +1 -1
- package/dist/contracts/ports.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.d.ts +4 -4
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +1 -1
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +26 -26
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/translator.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.d.ts +21 -21
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/effects.d.ts +1 -1
- package/dist/effects.d.ts.map +1 -1
- package/dist/effects.js +2 -0
- package/dist/effects.js.map +1 -1
- package/dist/events.d.ts +213 -29
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +5 -0
- package/dist/events.js.map +1 -1
- package/dist/hostnames.d.ts.map +1 -1
- package/dist/index.d.ts +417 -377
- package/dist/index.d.ts.map +1 -1
- package/dist/model-metadata.d.ts.map +1 -1
- package/dist/schemas.d.ts +221 -212
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +13 -6
- package/dist/schemas.js.map +1 -1
- package/dist/sse.d.ts.map +1 -1
- package/dist/tunnel-ids.d.ts.map +1 -1
- package/package.json +8 -6
- package/src/agent-catalog.ts +62 -0
- package/src/contracts/activity.contract.ts +9 -0
- package/src/contracts/agent.contract.ts +17 -0
- package/src/contracts/agents.contract.ts +28 -0
- package/src/contracts/automations.contract.ts +23 -0
- package/src/contracts/capabilities.contract.ts +31 -0
- package/src/contracts/claude.contract.ts +22 -0
- package/src/contracts/codex.contract.ts +23 -0
- package/src/contracts/drafts.contract.ts +11 -0
- package/src/contracts/extensions.contract.ts +28 -0
- package/src/contracts/git.contract.ts +64 -0
- package/src/contracts/grok.contract.ts +16 -0
- package/src/contracts/history.contract.ts +12 -0
- package/src/contracts/intentic.contract.ts +17 -0
- package/src/contracts/inventory.contract.ts +11 -0
- package/src/contracts/logs.contract.ts +9 -0
- package/src/contracts/panels.contract.ts +12 -0
- package/src/contracts/ports.contract.ts +11 -0
- package/src/contracts/secrets.contract.ts +15 -0
- package/src/contracts/sessions.contract.ts +14 -0
- package/src/contracts/settings.contract.ts +11 -0
- package/src/contracts/system.contract.ts +37 -0
- package/src/contracts/translator.contract.ts +20 -0
- package/src/contracts/workspace.contract.ts +74 -0
- package/src/effects.test.ts +132 -0
- package/src/effects.ts +138 -0
- package/src/events.ts +277 -0
- package/src/hostnames.test.ts +44 -0
- package/src/hostnames.ts +97 -0
- package/src/index.ts +84 -0
- package/src/model-metadata.ts +30 -0
- package/src/schemas.ts +1407 -0
- package/src/sse.ts +43 -0
- package/src/terminal-protocol.ts +16 -0
- package/src/tunnel-ids.ts +19 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-catalog.d.ts","sourceRoot":"","sources":["../src/agent-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAOhF,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC1B;AAKD,eAAO,MAAM,SAAS,EAAE,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,cAAc,CAAA;CAAE,EAIxE,CAAC;AAIF,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"agent-catalog.d.ts","sourceRoot":"","sources":["../src/agent-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAOhF,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC1B;AAKD,eAAO,MAAM,SAAS,EAAE,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,cAAc,CAAA;CAAE,EAIxE,CAAC;AAIF,eAAO,MAAM,aAAa,aAAc,aAAa,KAAG,MAAwE,CAAC;AAKjI,eAAO,MAAM,SAAS,EAAE,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,EAGtE,CAAC;AAMF,eAAO,MAAM,eAAe,aAAc,aAAa,WAAW,YAAY,KAAG,OAAwD,CAAC;AAQ1I,eAAO,MAAM,SAAS,aAAc,aAAa,WAAW,YAAY,KAAG,aAAa,EAgBvF,CAAC"}
|
|
@@ -10,8 +10,8 @@ export declare const activityContract: {
|
|
|
10
10
|
provider: import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
11
|
account: import("zod").ZodOptional<import("zod").ZodString>;
|
|
12
12
|
direction: import("zod").ZodEnum<{
|
|
13
|
-
out: "out";
|
|
14
13
|
in: "in";
|
|
14
|
+
out: "out";
|
|
15
15
|
system: "system";
|
|
16
16
|
}>;
|
|
17
17
|
type: import("zod").ZodString;
|
|
@@ -23,8 +23,8 @@ export declare const activityContract: {
|
|
|
23
23
|
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
24
24
|
automationIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
25
25
|
outcome: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
26
|
-
ok: "ok";
|
|
27
26
|
error: "error";
|
|
27
|
+
ok: "ok";
|
|
28
28
|
}>>;
|
|
29
29
|
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
30
|
extra: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
@@ -35,10 +35,10 @@ export declare const activityContract: {
|
|
|
35
35
|
capabilityId: import("zod").ZodString;
|
|
36
36
|
provider: import("zod").ZodString;
|
|
37
37
|
gateway: import("zod").ZodEnum<{
|
|
38
|
-
idle: "idle";
|
|
39
|
-
ready: "ready";
|
|
40
38
|
connecting: "connecting";
|
|
41
39
|
disconnected: "disconnected";
|
|
40
|
+
idle: "idle";
|
|
41
|
+
ready: "ready";
|
|
42
42
|
}>;
|
|
43
43
|
lastError: import("zod").ZodOptional<import("zod").ZodString>;
|
|
44
44
|
}, import("zod/v4/core").$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/activity.contract.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"activity.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/activity.contract.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;IACzB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACJ,MAAM;;;;;;;;;;;;;;;;;;;CACT,CAAC"}
|
|
@@ -5,8 +5,8 @@ export declare const agentContract: {
|
|
|
5
5
|
attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
6
6
|
agent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
7
|
harness: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
8
|
-
native: "native";
|
|
9
8
|
"claude-code": "claude-code";
|
|
9
|
+
native: "native";
|
|
10
10
|
}>>;
|
|
11
11
|
account: import("zod").ZodOptional<import("zod").ZodString>;
|
|
12
12
|
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -14,8 +14,8 @@ export declare const agentContract: {
|
|
|
14
14
|
isolated: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
15
15
|
history: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
16
16
|
role: import("zod").ZodEnum<{
|
|
17
|
-
user: "user";
|
|
18
17
|
assistant: "assistant";
|
|
18
|
+
user: "user";
|
|
19
19
|
}>;
|
|
20
20
|
text: import("zod").ZodString;
|
|
21
21
|
}, import("zod/v4/core").$strip>>>;
|
|
@@ -29,274 +29,305 @@ export declare const agentContract: {
|
|
|
29
29
|
endLine: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
30
30
|
selection: import("zod").ZodOptional<import("zod").ZodString>;
|
|
31
31
|
}, import("zod/v4/core").$strip>>;
|
|
32
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
33
|
+
run: import("zod").ZodString;
|
|
34
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
35
|
+
attach: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
36
|
+
conversationId: import("zod").ZodString;
|
|
37
|
+
run: import("zod").ZodOptional<import("zod").ZodString>;
|
|
38
|
+
after: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
32
39
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
33
|
-
kind: "
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
name: string;
|
|
64
|
-
category: "other" | "search" | "fetch" | "read" | "edit" | "delete" | "move" | "execute" | "think";
|
|
65
|
-
status: "pending" | "completed" | "failed" | "in_progress";
|
|
66
|
-
target?: string | undefined;
|
|
67
|
-
locations?: {
|
|
68
|
-
path: string;
|
|
69
|
-
line?: number | undefined;
|
|
70
|
-
}[] | undefined;
|
|
71
|
-
content?: ({
|
|
72
|
-
type: "text";
|
|
40
|
+
kind: "attached";
|
|
41
|
+
run: string;
|
|
42
|
+
prompt: string;
|
|
43
|
+
startedAt: number;
|
|
44
|
+
seq: number;
|
|
45
|
+
} | {
|
|
46
|
+
kind: "frame";
|
|
47
|
+
seq: number;
|
|
48
|
+
event: {
|
|
49
|
+
kind: "session";
|
|
50
|
+
sessionId: string;
|
|
51
|
+
} | {
|
|
52
|
+
kind: "worktree";
|
|
53
|
+
branch: string;
|
|
54
|
+
base: string;
|
|
55
|
+
} | {
|
|
56
|
+
kind: "landed";
|
|
57
|
+
landed: boolean;
|
|
58
|
+
conflicts?: {
|
|
59
|
+
repo: string;
|
|
60
|
+
paths: string[];
|
|
61
|
+
}[] | undefined;
|
|
62
|
+
} | {
|
|
63
|
+
kind: "init";
|
|
64
|
+
model: string;
|
|
65
|
+
} | {
|
|
66
|
+
kind: "checkpoint";
|
|
67
|
+
id: string;
|
|
68
|
+
} | {
|
|
69
|
+
kind: "delta";
|
|
73
70
|
text: string;
|
|
71
|
+
parentToolUseId?: string | undefined;
|
|
74
72
|
} | {
|
|
75
|
-
|
|
76
|
-
path: string;
|
|
77
|
-
newText: string;
|
|
78
|
-
oldText?: string | undefined;
|
|
79
|
-
truncated?: boolean | undefined;
|
|
80
|
-
})[] | undefined;
|
|
81
|
-
parentToolUseId?: string | undefined;
|
|
82
|
-
} | {
|
|
83
|
-
kind: "tool_call_update";
|
|
84
|
-
id: string;
|
|
85
|
-
status?: "pending" | "completed" | "failed" | "in_progress" | undefined;
|
|
86
|
-
content?: ({
|
|
87
|
-
type: "text";
|
|
73
|
+
kind: "thinking";
|
|
88
74
|
text: string;
|
|
75
|
+
parentToolUseId?: string | undefined;
|
|
89
76
|
} | {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
newText: string;
|
|
93
|
-
oldText?: string | undefined;
|
|
94
|
-
truncated?: boolean | undefined;
|
|
95
|
-
})[] | undefined;
|
|
96
|
-
locations?: {
|
|
97
|
-
path: string;
|
|
98
|
-
line?: number | undefined;
|
|
99
|
-
}[] | undefined;
|
|
100
|
-
} | {
|
|
101
|
-
kind: "terminal";
|
|
102
|
-
session: string;
|
|
103
|
-
} | {
|
|
104
|
-
kind: "todos";
|
|
105
|
-
items: {
|
|
106
|
-
content: string;
|
|
107
|
-
status: "pending" | "completed" | "in_progress";
|
|
108
|
-
activeForm?: string | undefined;
|
|
109
|
-
}[];
|
|
110
|
-
} | {
|
|
111
|
-
kind: "commands";
|
|
112
|
-
items: {
|
|
77
|
+
kind: "tool_call";
|
|
78
|
+
id: string;
|
|
113
79
|
name: string;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
80
|
+
category: "delete" | "edit" | "execute" | "fetch" | "move" | "other" | "read" | "search" | "think";
|
|
81
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
82
|
+
target?: string | undefined;
|
|
83
|
+
locations?: {
|
|
84
|
+
path: string;
|
|
85
|
+
line?: number | undefined;
|
|
86
|
+
}[] | undefined;
|
|
87
|
+
content?: ({
|
|
88
|
+
type: "text";
|
|
89
|
+
text: string;
|
|
90
|
+
} | {
|
|
91
|
+
type: "diff";
|
|
92
|
+
path: string;
|
|
93
|
+
oldText?: string | undefined;
|
|
94
|
+
newText: string;
|
|
95
|
+
truncated?: boolean | undefined;
|
|
96
|
+
})[] | undefined;
|
|
97
|
+
parentToolUseId?: string | undefined;
|
|
98
|
+
} | {
|
|
99
|
+
kind: "tool_call_update";
|
|
100
|
+
id: string;
|
|
101
|
+
status?: "completed" | "failed" | "in_progress" | "pending" | undefined;
|
|
102
|
+
content?: ({
|
|
103
|
+
type: "text";
|
|
104
|
+
text: string;
|
|
105
|
+
} | {
|
|
106
|
+
type: "diff";
|
|
107
|
+
path: string;
|
|
108
|
+
oldText?: string | undefined;
|
|
109
|
+
newText: string;
|
|
110
|
+
truncated?: boolean | undefined;
|
|
111
|
+
})[] | undefined;
|
|
112
|
+
locations?: {
|
|
113
|
+
path: string;
|
|
114
|
+
line?: number | undefined;
|
|
115
|
+
}[] | undefined;
|
|
116
|
+
} | {
|
|
117
|
+
kind: "terminal";
|
|
118
|
+
session: string;
|
|
119
|
+
} | {
|
|
120
|
+
kind: "todos";
|
|
121
|
+
items: {
|
|
122
|
+
content: string;
|
|
123
|
+
status: "completed" | "in_progress" | "pending";
|
|
124
|
+
activeForm?: string | undefined;
|
|
125
|
+
}[];
|
|
126
|
+
} | {
|
|
127
|
+
kind: "commands";
|
|
128
|
+
items: {
|
|
129
|
+
name: string;
|
|
156
130
|
description: string;
|
|
157
|
-
|
|
131
|
+
hint?: string | undefined;
|
|
158
132
|
}[];
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
133
|
+
} | {
|
|
134
|
+
kind: "usage";
|
|
135
|
+
account?: string | undefined;
|
|
136
|
+
costUsd?: number | undefined;
|
|
137
|
+
inputTokens?: number | undefined;
|
|
138
|
+
outputTokens?: number | undefined;
|
|
139
|
+
cacheReadTokens?: number | undefined;
|
|
140
|
+
cacheCreationTokens?: number | undefined;
|
|
141
|
+
durationMs?: number | undefined;
|
|
142
|
+
numTurns?: number | undefined;
|
|
143
|
+
} | {
|
|
144
|
+
status: "allowed" | "allowed_warning" | "rejected";
|
|
145
|
+
resetsAt?: number | undefined;
|
|
146
|
+
rateLimitType?: string | undefined;
|
|
147
|
+
utilization?: number | undefined;
|
|
148
|
+
kind: "rate_limit_info";
|
|
149
|
+
account?: string | undefined;
|
|
150
|
+
} | {
|
|
151
|
+
tokens: number;
|
|
152
|
+
contextWindow: number;
|
|
153
|
+
kind: "context_usage";
|
|
154
|
+
} | {
|
|
155
|
+
kind: "compact";
|
|
156
|
+
trigger: string;
|
|
157
|
+
preTokens?: number | undefined;
|
|
158
|
+
postTokens?: number | undefined;
|
|
159
|
+
} | {
|
|
160
|
+
kind: "plan";
|
|
161
|
+
decisionId: string;
|
|
162
|
+
text: string;
|
|
163
|
+
} | {
|
|
164
|
+
kind: "question";
|
|
165
|
+
requestId: string;
|
|
166
|
+
questions: {
|
|
167
|
+
question: string;
|
|
168
|
+
header: string;
|
|
169
|
+
multiSelect: boolean;
|
|
170
|
+
options: {
|
|
171
|
+
label: string;
|
|
172
|
+
description: string;
|
|
173
|
+
preview?: string | undefined;
|
|
174
|
+
}[];
|
|
175
|
+
}[];
|
|
176
|
+
} | {
|
|
177
|
+
kind: "error";
|
|
178
|
+
message: string;
|
|
179
|
+
code?: "agent-busy" | "codex-model-invalid" | "codex-reauth" | "grok-model-invalid" | "rate_limit" | "session-not-found" | "subscription-required" | undefined;
|
|
180
|
+
} | {
|
|
181
|
+
kind: "done";
|
|
182
|
+
};
|
|
164
183
|
} | {
|
|
165
|
-
kind: "
|
|
184
|
+
kind: "end";
|
|
166
185
|
}, unknown, void>, import("@orpc/contract").AsyncIteratorClass<{
|
|
167
|
-
kind: "
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
name: string;
|
|
198
|
-
category: "other" | "search" | "fetch" | "read" | "edit" | "delete" | "move" | "execute" | "think";
|
|
199
|
-
status: "pending" | "completed" | "failed" | "in_progress";
|
|
200
|
-
target?: string | undefined;
|
|
201
|
-
locations?: {
|
|
202
|
-
path: string;
|
|
203
|
-
line?: number | undefined;
|
|
204
|
-
}[] | undefined;
|
|
205
|
-
content?: ({
|
|
206
|
-
type: "text";
|
|
186
|
+
kind: "attached";
|
|
187
|
+
run: string;
|
|
188
|
+
prompt: string;
|
|
189
|
+
startedAt: number;
|
|
190
|
+
seq: number;
|
|
191
|
+
} | {
|
|
192
|
+
kind: "frame";
|
|
193
|
+
seq: number;
|
|
194
|
+
event: {
|
|
195
|
+
kind: "session";
|
|
196
|
+
sessionId: string;
|
|
197
|
+
} | {
|
|
198
|
+
kind: "worktree";
|
|
199
|
+
branch: string;
|
|
200
|
+
base: string;
|
|
201
|
+
} | {
|
|
202
|
+
kind: "landed";
|
|
203
|
+
landed: boolean;
|
|
204
|
+
conflicts?: {
|
|
205
|
+
repo: string;
|
|
206
|
+
paths: string[];
|
|
207
|
+
}[] | undefined;
|
|
208
|
+
} | {
|
|
209
|
+
kind: "init";
|
|
210
|
+
model: string;
|
|
211
|
+
} | {
|
|
212
|
+
kind: "checkpoint";
|
|
213
|
+
id: string;
|
|
214
|
+
} | {
|
|
215
|
+
kind: "delta";
|
|
207
216
|
text: string;
|
|
217
|
+
parentToolUseId?: string | undefined;
|
|
208
218
|
} | {
|
|
209
|
-
|
|
210
|
-
path: string;
|
|
211
|
-
newText: string;
|
|
212
|
-
oldText?: string | undefined;
|
|
213
|
-
truncated?: boolean | undefined;
|
|
214
|
-
})[] | undefined;
|
|
215
|
-
parentToolUseId?: string | undefined;
|
|
216
|
-
} | {
|
|
217
|
-
kind: "tool_call_update";
|
|
218
|
-
id: string;
|
|
219
|
-
status?: "pending" | "completed" | "failed" | "in_progress" | undefined;
|
|
220
|
-
content?: ({
|
|
221
|
-
type: "text";
|
|
219
|
+
kind: "thinking";
|
|
222
220
|
text: string;
|
|
221
|
+
parentToolUseId?: string | undefined;
|
|
223
222
|
} | {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
newText: string;
|
|
227
|
-
oldText?: string | undefined;
|
|
228
|
-
truncated?: boolean | undefined;
|
|
229
|
-
})[] | undefined;
|
|
230
|
-
locations?: {
|
|
231
|
-
path: string;
|
|
232
|
-
line?: number | undefined;
|
|
233
|
-
}[] | undefined;
|
|
234
|
-
} | {
|
|
235
|
-
kind: "terminal";
|
|
236
|
-
session: string;
|
|
237
|
-
} | {
|
|
238
|
-
kind: "todos";
|
|
239
|
-
items: {
|
|
240
|
-
content: string;
|
|
241
|
-
status: "pending" | "completed" | "in_progress";
|
|
242
|
-
activeForm?: string | undefined;
|
|
243
|
-
}[];
|
|
244
|
-
} | {
|
|
245
|
-
kind: "commands";
|
|
246
|
-
items: {
|
|
223
|
+
kind: "tool_call";
|
|
224
|
+
id: string;
|
|
247
225
|
name: string;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
226
|
+
category: "delete" | "edit" | "execute" | "fetch" | "move" | "other" | "read" | "search" | "think";
|
|
227
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
228
|
+
target?: string | undefined;
|
|
229
|
+
locations?: {
|
|
230
|
+
path: string;
|
|
231
|
+
line?: number | undefined;
|
|
232
|
+
}[] | undefined;
|
|
233
|
+
content?: ({
|
|
234
|
+
type: "text";
|
|
235
|
+
text: string;
|
|
236
|
+
} | {
|
|
237
|
+
type: "diff";
|
|
238
|
+
path: string;
|
|
239
|
+
oldText?: string | undefined;
|
|
240
|
+
newText: string;
|
|
241
|
+
truncated?: boolean | undefined;
|
|
242
|
+
})[] | undefined;
|
|
243
|
+
parentToolUseId?: string | undefined;
|
|
244
|
+
} | {
|
|
245
|
+
kind: "tool_call_update";
|
|
246
|
+
id: string;
|
|
247
|
+
status?: "completed" | "failed" | "in_progress" | "pending" | undefined;
|
|
248
|
+
content?: ({
|
|
249
|
+
type: "text";
|
|
250
|
+
text: string;
|
|
251
|
+
} | {
|
|
252
|
+
type: "diff";
|
|
253
|
+
path: string;
|
|
254
|
+
oldText?: string | undefined;
|
|
255
|
+
newText: string;
|
|
256
|
+
truncated?: boolean | undefined;
|
|
257
|
+
})[] | undefined;
|
|
258
|
+
locations?: {
|
|
259
|
+
path: string;
|
|
260
|
+
line?: number | undefined;
|
|
261
|
+
}[] | undefined;
|
|
262
|
+
} | {
|
|
263
|
+
kind: "terminal";
|
|
264
|
+
session: string;
|
|
265
|
+
} | {
|
|
266
|
+
kind: "todos";
|
|
267
|
+
items: {
|
|
268
|
+
content: string;
|
|
269
|
+
status: "completed" | "in_progress" | "pending";
|
|
270
|
+
activeForm?: string | undefined;
|
|
271
|
+
}[];
|
|
272
|
+
} | {
|
|
273
|
+
kind: "commands";
|
|
274
|
+
items: {
|
|
275
|
+
name: string;
|
|
290
276
|
description: string;
|
|
291
|
-
|
|
277
|
+
hint?: string | undefined;
|
|
292
278
|
}[];
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
279
|
+
} | {
|
|
280
|
+
kind: "usage";
|
|
281
|
+
account?: string | undefined;
|
|
282
|
+
costUsd?: number | undefined;
|
|
283
|
+
inputTokens?: number | undefined;
|
|
284
|
+
outputTokens?: number | undefined;
|
|
285
|
+
cacheReadTokens?: number | undefined;
|
|
286
|
+
cacheCreationTokens?: number | undefined;
|
|
287
|
+
durationMs?: number | undefined;
|
|
288
|
+
numTurns?: number | undefined;
|
|
289
|
+
} | {
|
|
290
|
+
status: "allowed" | "allowed_warning" | "rejected";
|
|
291
|
+
resetsAt?: number | undefined;
|
|
292
|
+
rateLimitType?: string | undefined;
|
|
293
|
+
utilization?: number | undefined;
|
|
294
|
+
kind: "rate_limit_info";
|
|
295
|
+
account?: string | undefined;
|
|
296
|
+
} | {
|
|
297
|
+
tokens: number;
|
|
298
|
+
contextWindow: number;
|
|
299
|
+
kind: "context_usage";
|
|
300
|
+
} | {
|
|
301
|
+
kind: "compact";
|
|
302
|
+
trigger: string;
|
|
303
|
+
preTokens?: number | undefined;
|
|
304
|
+
postTokens?: number | undefined;
|
|
305
|
+
} | {
|
|
306
|
+
kind: "plan";
|
|
307
|
+
decisionId: string;
|
|
308
|
+
text: string;
|
|
309
|
+
} | {
|
|
310
|
+
kind: "question";
|
|
311
|
+
requestId: string;
|
|
312
|
+
questions: {
|
|
313
|
+
question: string;
|
|
314
|
+
header: string;
|
|
315
|
+
multiSelect: boolean;
|
|
316
|
+
options: {
|
|
317
|
+
label: string;
|
|
318
|
+
description: string;
|
|
319
|
+
preview?: string | undefined;
|
|
320
|
+
}[];
|
|
321
|
+
}[];
|
|
322
|
+
} | {
|
|
323
|
+
kind: "error";
|
|
324
|
+
message: string;
|
|
325
|
+
code?: "agent-busy" | "codex-model-invalid" | "codex-reauth" | "grok-model-invalid" | "rate_limit" | "session-not-found" | "subscription-required" | undefined;
|
|
326
|
+
} | {
|
|
327
|
+
kind: "done";
|
|
328
|
+
};
|
|
298
329
|
} | {
|
|
299
|
-
kind: "
|
|
330
|
+
kind: "end";
|
|
300
331
|
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
301
332
|
decision: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
302
333
|
decisionId: import("zod").ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/agent.contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/agent.contract.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa;IACtB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACH,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACN,QAAQ;;;;;;;IACR,MAAM;;;;;;;IACN,KAAK;;;;;;IACL,IAAI;;;;;CACP,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { eventIterator, oc } from "@orpc/contract";
|
|
2
|
-
import {
|
|
3
|
-
import { AgentTurnSchema, AnswerSchema, DecisionSchema, OkSchema, SteerSchema, StopTurnSchema } from "../schemas.js";
|
|
2
|
+
import { AttachFrameSchema } from "../events.js";
|
|
3
|
+
import { AgentTurnSchema, AnswerSchema, AttachTurnSchema, DecisionSchema, OkSchema, StartedTurnSchema, SteerSchema, StopTurnSchema } from "../schemas.js";
|
|
4
4
|
export const agentContract = {
|
|
5
|
-
run: oc.route({ method: "POST", path: "/agent" }).input(AgentTurnSchema).output(
|
|
5
|
+
run: oc.route({ method: "POST", path: "/agent" }).input(AgentTurnSchema).output(StartedTurnSchema),
|
|
6
|
+
attach: oc.route({ method: "POST", path: "/agent/attach" }).input(AttachTurnSchema).output(eventIterator(AttachFrameSchema)),
|
|
6
7
|
decision: oc.route({ method: "POST", path: "/agent/decision" }).input(DecisionSchema).output(OkSchema),
|
|
7
8
|
answer: oc.route({ method: "POST", path: "/agent/answer" }).input(AnswerSchema).output(OkSchema),
|
|
8
9
|
steer: oc.route({ method: "POST", path: "/agent/steer" }).input(SteerSchema).output(OkSchema),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.contract.js","sourceRoot":"","sources":["../../src/contracts/agent.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"agent.contract.js","sourceRoot":"","sources":["../../src/contracts/agent.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,QAAQ,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAO1J,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC;IAClG,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC5H,QAAQ,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;IACtG,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;IAChG,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC7F,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;CACjG,CAAC"}
|