@shivaedev/agent-claude-code 0.2.0 → 0.4.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 +14 -0
- package/README.md +71 -1
- package/dist/SessionConnection.d.ts +10 -0
- package/dist/SessionConnection.d.ts.map +1 -0
- package/dist/SessionConnection.js +2 -0
- package/dist/SessionConnection.js.map +1 -0
- package/dist/adapters/ClaudeProvider.d.ts +15 -0
- package/dist/adapters/ClaudeProvider.d.ts.map +1 -0
- package/dist/adapters/ClaudeProvider.js +6 -0
- package/dist/adapters/ClaudeProvider.js.map +1 -0
- package/dist/adapters/InputQueue.d.ts +11 -0
- package/dist/adapters/InputQueue.d.ts.map +1 -0
- package/dist/adapters/InputQueue.js +84 -0
- package/dist/adapters/InputQueue.js.map +1 -0
- package/dist/adapters/blocks.d.ts +7 -0
- package/dist/adapters/blocks.d.ts.map +1 -0
- package/dist/adapters/blocks.js +57 -0
- package/dist/adapters/blocks.js.map +1 -0
- package/dist/adapters/consumeSession.d.ts +8 -0
- package/dist/adapters/consumeSession.d.ts.map +1 -0
- package/dist/adapters/consumeSession.js +26 -0
- package/dist/adapters/consumeSession.js.map +1 -0
- package/dist/adapters/loadClaudeSdk.d.ts +4 -0
- package/dist/adapters/loadClaudeSdk.d.ts.map +1 -0
- package/dist/adapters/loadClaudeSdk.js +7 -0
- package/dist/adapters/loadClaudeSdk.js.map +1 -0
- package/dist/adapters/mirrorKeys.d.ts +10 -0
- package/dist/adapters/mirrorKeys.d.ts.map +1 -0
- package/dist/adapters/mirrorKeys.js +26 -0
- package/dist/adapters/mirrorKeys.js.map +1 -0
- package/dist/adapters/openSession.d.ts +23 -0
- package/dist/adapters/openSession.d.ts.map +1 -0
- package/dist/adapters/openSession.js +78 -0
- package/dist/adapters/openSession.js.map +1 -0
- package/dist/adapters/openSessionMapping.d.ts +9 -0
- package/dist/adapters/openSessionMapping.d.ts.map +1 -0
- package/dist/adapters/openSessionMapping.js +65 -0
- package/dist/adapters/openSessionMapping.js.map +1 -0
- package/dist/adapters/openSubsessions.d.ts +10 -0
- package/dist/adapters/openSubsessions.d.ts.map +1 -0
- package/dist/adapters/openSubsessions.js +45 -0
- package/dist/adapters/openSubsessions.js.map +1 -0
- package/dist/adapters/openTurnUsage.d.ts +9 -0
- package/dist/adapters/openTurnUsage.d.ts.map +1 -0
- package/dist/adapters/openTurnUsage.js +40 -0
- package/dist/adapters/openTurnUsage.js.map +1 -0
- package/dist/adapters/openWorkflowNodes.d.ts +13 -0
- package/dist/adapters/openWorkflowNodes.d.ts.map +1 -0
- package/dist/adapters/openWorkflowNodes.js +60 -0
- package/dist/adapters/openWorkflowNodes.js.map +1 -0
- package/dist/adapters/rateLimitEvent.d.ts +7 -0
- package/dist/adapters/rateLimitEvent.d.ts.map +1 -0
- package/dist/adapters/rateLimitEvent.js +27 -0
- package/dist/adapters/rateLimitEvent.js.map +1 -0
- package/dist/adapters/rawPayload.d.ts +5 -0
- package/dist/adapters/rawPayload.d.ts.map +1 -0
- package/dist/adapters/rawPayload.js +12 -0
- package/dist/adapters/rawPayload.js.map +1 -0
- package/dist/adapters/repairSession.d.ts +5 -0
- package/dist/adapters/repairSession.d.ts.map +1 -0
- package/dist/adapters/repairSession.js +17 -0
- package/dist/adapters/repairSession.js.map +1 -0
- package/dist/adapters/sessionLanes.d.ts +22 -0
- package/dist/adapters/sessionLanes.d.ts.map +1 -0
- package/dist/adapters/sessionLanes.js +100 -0
- package/dist/adapters/sessionLanes.js.map +1 -0
- package/dist/adapters/sessionOptions.d.ts +6 -0
- package/dist/adapters/sessionOptions.d.ts.map +1 -0
- package/dist/adapters/sessionOptions.js +30 -0
- package/dist/adapters/sessionOptions.js.map +1 -0
- package/dist/adapters/spilledPreview.d.ts +5 -0
- package/dist/adapters/spilledPreview.d.ts.map +1 -0
- package/dist/adapters/spilledPreview.js +22 -0
- package/dist/adapters/spilledPreview.js.map +1 -0
- package/dist/adapters/subsessionEndings.d.ts +23 -0
- package/dist/adapters/subsessionEndings.d.ts.map +1 -0
- package/dist/adapters/subsessionEndings.js +54 -0
- package/dist/adapters/subsessionEndings.js.map +1 -0
- package/dist/adapters/systemEvents.d.ts +9 -0
- package/dist/adapters/systemEvents.d.ts.map +1 -0
- package/dist/adapters/systemEvents.js +39 -0
- package/dist/adapters/systemEvents.js.map +1 -0
- package/dist/adapters/toolIdentity.d.ts +5 -0
- package/dist/adapters/toolIdentity.d.ts.map +1 -0
- package/dist/adapters/toolIdentity.js +10 -0
- package/dist/adapters/toolIdentity.js.map +1 -0
- package/dist/adapters/toolServer.d.ts +4 -0
- package/dist/adapters/toolServer.d.ts.map +1 -0
- package/dist/adapters/toolServer.js +30 -0
- package/dist/adapters/toolServer.js.map +1 -0
- package/dist/adapters/transcriptEvents.d.ts +5 -0
- package/dist/adapters/transcriptEvents.d.ts.map +1 -0
- package/dist/adapters/transcriptEvents.js +18 -0
- package/dist/adapters/transcriptEvents.js.map +1 -0
- package/dist/adapters/workflowAdoption.d.ts +13 -0
- package/dist/adapters/workflowAdoption.d.ts.map +1 -0
- package/dist/adapters/workflowAdoption.js +48 -0
- package/dist/adapters/workflowAdoption.js.map +1 -0
- package/dist/adapters/workflowIdentity.d.ts +22 -0
- package/dist/adapters/workflowIdentity.d.ts.map +1 -0
- package/dist/adapters/workflowIdentity.js +50 -0
- package/dist/adapters/workflowIdentity.js.map +1 -0
- package/dist/claudeCode.d.ts +6 -1
- package/dist/claudeCode.d.ts.map +1 -1
- package/dist/claudeCode.js +101 -1
- package/dist/claudeCode.js.map +1 -1
- package/dist/options.d.ts +17 -0
- package/dist/options.d.ts.map +1 -0
- package/dist/options.js +2 -0
- package/dist/options.js.map +1 -0
- package/dist/protocol.d.ts +7 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +2 -0
- package/dist/protocol.js.map +1 -0
- package/dist/runState.d.ts +584 -0
- package/dist/runState.d.ts.map +1 -0
- package/dist/runState.js +52 -0
- package/dist/runState.js.map +1 -0
- package/package.json +32 -4
- package/src/SessionConnection.ts +10 -0
- package/src/adapters/ClaudeProvider.ts +16 -0
- package/src/adapters/InputQueue.ts +89 -0
- package/src/adapters/blocks.ts +63 -0
- package/src/adapters/consumeSession.ts +35 -0
- package/src/adapters/loadClaudeSdk.ts +6 -0
- package/src/adapters/mirrorKeys.ts +33 -0
- package/src/adapters/openSession.ts +102 -0
- package/src/adapters/openSessionMapping.ts +84 -0
- package/src/adapters/openSubsessions.ts +70 -0
- package/src/adapters/openTurnUsage.ts +52 -0
- package/src/adapters/openWorkflowNodes.ts +73 -0
- package/src/adapters/rateLimitEvent.ts +45 -0
- package/src/adapters/rawPayload.ts +13 -0
- package/src/adapters/repairSession.ts +20 -0
- package/src/adapters/sessionLanes.ts +127 -0
- package/src/adapters/sessionOptions.ts +42 -0
- package/src/adapters/spilledPreview.ts +24 -0
- package/src/adapters/subsessionEndings.ts +80 -0
- package/src/adapters/systemEvents.ts +60 -0
- package/src/adapters/toolIdentity.ts +12 -0
- package/src/adapters/toolServer.ts +31 -0
- package/src/adapters/transcriptEvents.ts +21 -0
- package/src/adapters/workflowAdoption.ts +58 -0
- package/src/adapters/workflowIdentity.ts +75 -0
- package/src/claudeCode.ts +117 -1
- package/src/options.ts +19 -0
- package/src/protocol.ts +9 -0
- package/src/runState.ts +70 -0
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
import { Deferred, Effect, Ref, Stream } from "effect";
|
|
2
|
+
import { type ReadFailure, UnknownAcceptance } from "@shivaedev/agent/failures.ts";
|
|
3
|
+
import type { SessionConnection } from "#SessionConnection.ts";
|
|
4
|
+
export declare const makeRunState: (operationId: string, session: SessionConnection) => Effect.Effect<{
|
|
5
|
+
acknowledged: Deferred.Deferred<{
|
|
6
|
+
readonly backend: string;
|
|
7
|
+
readonly operationId: string;
|
|
8
|
+
readonly reference: {
|
|
9
|
+
readonly value: string;
|
|
10
|
+
readonly version: number;
|
|
11
|
+
};
|
|
12
|
+
readonly session?: {
|
|
13
|
+
readonly value: string;
|
|
14
|
+
readonly version: number;
|
|
15
|
+
} | undefined;
|
|
16
|
+
}, UnknownAcceptance>;
|
|
17
|
+
events: Stream.Stream<{
|
|
18
|
+
readonly origin?: {
|
|
19
|
+
readonly node?: string | undefined;
|
|
20
|
+
readonly parentNode?: string | undefined;
|
|
21
|
+
readonly spawnedBy: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
readonly raw?: {
|
|
24
|
+
readonly kind: string;
|
|
25
|
+
readonly payload: string;
|
|
26
|
+
readonly source: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
readonly receipt: {
|
|
29
|
+
readonly backend: string;
|
|
30
|
+
readonly operationId: string;
|
|
31
|
+
readonly reference: {
|
|
32
|
+
readonly value: string;
|
|
33
|
+
readonly version: number;
|
|
34
|
+
};
|
|
35
|
+
readonly session?: {
|
|
36
|
+
readonly value: string;
|
|
37
|
+
readonly version: number;
|
|
38
|
+
} | undefined;
|
|
39
|
+
};
|
|
40
|
+
readonly type: "acknowledged";
|
|
41
|
+
} | {
|
|
42
|
+
readonly origin?: {
|
|
43
|
+
readonly node?: string | undefined;
|
|
44
|
+
readonly parentNode?: string | undefined;
|
|
45
|
+
readonly spawnedBy: string;
|
|
46
|
+
} | undefined;
|
|
47
|
+
readonly raw?: {
|
|
48
|
+
readonly kind: string;
|
|
49
|
+
readonly payload: string;
|
|
50
|
+
readonly source: string;
|
|
51
|
+
} | undefined;
|
|
52
|
+
readonly state: "accepted" | "awaiting-input" | "completed" | "failed" | "interrupted" | "running";
|
|
53
|
+
readonly type: "execution";
|
|
54
|
+
} | {
|
|
55
|
+
readonly origin?: {
|
|
56
|
+
readonly node?: string | undefined;
|
|
57
|
+
readonly parentNode?: string | undefined;
|
|
58
|
+
readonly spawnedBy: string;
|
|
59
|
+
} | undefined;
|
|
60
|
+
readonly raw?: {
|
|
61
|
+
readonly kind: string;
|
|
62
|
+
readonly payload: string;
|
|
63
|
+
readonly source: string;
|
|
64
|
+
} | undefined;
|
|
65
|
+
readonly reference: string;
|
|
66
|
+
readonly type: "session.opened";
|
|
67
|
+
} | {
|
|
68
|
+
readonly origin?: {
|
|
69
|
+
readonly node?: string | undefined;
|
|
70
|
+
readonly parentNode?: string | undefined;
|
|
71
|
+
readonly spawnedBy: string;
|
|
72
|
+
} | undefined;
|
|
73
|
+
readonly raw?: {
|
|
74
|
+
readonly kind: string;
|
|
75
|
+
readonly payload: string;
|
|
76
|
+
readonly source: string;
|
|
77
|
+
} | undefined;
|
|
78
|
+
readonly inputId?: string | undefined;
|
|
79
|
+
readonly parts: readonly ({
|
|
80
|
+
readonly text: string;
|
|
81
|
+
readonly type: "text";
|
|
82
|
+
} | {
|
|
83
|
+
readonly mediaType: string;
|
|
84
|
+
readonly path: string;
|
|
85
|
+
readonly type: "image";
|
|
86
|
+
} | {
|
|
87
|
+
readonly kind: string;
|
|
88
|
+
readonly payload: string;
|
|
89
|
+
readonly type: "native";
|
|
90
|
+
})[];
|
|
91
|
+
readonly role: "agent" | "user";
|
|
92
|
+
readonly type: "message";
|
|
93
|
+
} | {
|
|
94
|
+
readonly origin?: {
|
|
95
|
+
readonly node?: string | undefined;
|
|
96
|
+
readonly parentNode?: string | undefined;
|
|
97
|
+
readonly spawnedBy: string;
|
|
98
|
+
} | undefined;
|
|
99
|
+
readonly raw?: {
|
|
100
|
+
readonly kind: string;
|
|
101
|
+
readonly payload: string;
|
|
102
|
+
readonly source: string;
|
|
103
|
+
} | undefined;
|
|
104
|
+
readonly text: string;
|
|
105
|
+
readonly type: "thinking";
|
|
106
|
+
} | {
|
|
107
|
+
readonly origin?: {
|
|
108
|
+
readonly node?: string | undefined;
|
|
109
|
+
readonly parentNode?: string | undefined;
|
|
110
|
+
readonly spawnedBy: string;
|
|
111
|
+
} | undefined;
|
|
112
|
+
readonly raw?: {
|
|
113
|
+
readonly kind: string;
|
|
114
|
+
readonly payload: string;
|
|
115
|
+
readonly source: string;
|
|
116
|
+
} | undefined;
|
|
117
|
+
readonly input: string;
|
|
118
|
+
readonly name: string;
|
|
119
|
+
readonly providerName?: string | undefined;
|
|
120
|
+
readonly toolId: string;
|
|
121
|
+
readonly type: "tool.started";
|
|
122
|
+
} | {
|
|
123
|
+
readonly origin?: {
|
|
124
|
+
readonly node?: string | undefined;
|
|
125
|
+
readonly parentNode?: string | undefined;
|
|
126
|
+
readonly spawnedBy: string;
|
|
127
|
+
} | undefined;
|
|
128
|
+
readonly raw?: {
|
|
129
|
+
readonly kind: string;
|
|
130
|
+
readonly payload: string;
|
|
131
|
+
readonly source: string;
|
|
132
|
+
} | undefined;
|
|
133
|
+
readonly ok: boolean;
|
|
134
|
+
readonly output: string;
|
|
135
|
+
readonly toolId: string;
|
|
136
|
+
readonly type: "tool.completed";
|
|
137
|
+
} | {
|
|
138
|
+
readonly origin?: {
|
|
139
|
+
readonly node?: string | undefined;
|
|
140
|
+
readonly parentNode?: string | undefined;
|
|
141
|
+
readonly spawnedBy: string;
|
|
142
|
+
} | undefined;
|
|
143
|
+
readonly raw?: {
|
|
144
|
+
readonly kind: string;
|
|
145
|
+
readonly payload: string;
|
|
146
|
+
readonly source: string;
|
|
147
|
+
} | undefined;
|
|
148
|
+
readonly approvalId: string;
|
|
149
|
+
readonly description: string;
|
|
150
|
+
readonly toolId?: string | undefined;
|
|
151
|
+
readonly type: "approval.requested";
|
|
152
|
+
} | {
|
|
153
|
+
readonly origin?: {
|
|
154
|
+
readonly node?: string | undefined;
|
|
155
|
+
readonly parentNode?: string | undefined;
|
|
156
|
+
readonly spawnedBy: string;
|
|
157
|
+
} | undefined;
|
|
158
|
+
readonly raw?: {
|
|
159
|
+
readonly kind: string;
|
|
160
|
+
readonly payload: string;
|
|
161
|
+
readonly source: string;
|
|
162
|
+
} | undefined;
|
|
163
|
+
readonly type: "usage";
|
|
164
|
+
readonly cacheReadTokens?: number | undefined;
|
|
165
|
+
readonly cacheWriteTokens?: number | undefined;
|
|
166
|
+
readonly inputTokens?: number | undefined;
|
|
167
|
+
readonly model?: string | undefined;
|
|
168
|
+
readonly outputTokens?: number | undefined;
|
|
169
|
+
readonly scope: "cumulative" | "delta";
|
|
170
|
+
readonly unit: "run" | "session" | "turn";
|
|
171
|
+
} | {
|
|
172
|
+
readonly origin?: {
|
|
173
|
+
readonly node?: string | undefined;
|
|
174
|
+
readonly parentNode?: string | undefined;
|
|
175
|
+
readonly spawnedBy: string;
|
|
176
|
+
} | undefined;
|
|
177
|
+
readonly raw?: {
|
|
178
|
+
readonly kind: string;
|
|
179
|
+
readonly payload: string;
|
|
180
|
+
readonly source: string;
|
|
181
|
+
} | undefined;
|
|
182
|
+
readonly type: "cost";
|
|
183
|
+
readonly amount: number;
|
|
184
|
+
readonly currency: string;
|
|
185
|
+
readonly model?: string | undefined;
|
|
186
|
+
readonly scope: "cumulative" | "delta";
|
|
187
|
+
readonly source: "estimated" | "provider";
|
|
188
|
+
readonly unit: "run" | "session" | "turn";
|
|
189
|
+
} | {
|
|
190
|
+
readonly origin?: {
|
|
191
|
+
readonly node?: string | undefined;
|
|
192
|
+
readonly parentNode?: string | undefined;
|
|
193
|
+
readonly spawnedBy: string;
|
|
194
|
+
} | undefined;
|
|
195
|
+
readonly raw?: {
|
|
196
|
+
readonly kind: string;
|
|
197
|
+
readonly payload: string;
|
|
198
|
+
readonly source: string;
|
|
199
|
+
} | undefined;
|
|
200
|
+
readonly model: string;
|
|
201
|
+
readonly reason?: string | undefined;
|
|
202
|
+
readonly type: "model.changed";
|
|
203
|
+
} | {
|
|
204
|
+
readonly origin?: {
|
|
205
|
+
readonly node?: string | undefined;
|
|
206
|
+
readonly parentNode?: string | undefined;
|
|
207
|
+
readonly spawnedBy: string;
|
|
208
|
+
} | undefined;
|
|
209
|
+
readonly raw?: {
|
|
210
|
+
readonly kind: string;
|
|
211
|
+
readonly payload: string;
|
|
212
|
+
readonly source: string;
|
|
213
|
+
} | undefined;
|
|
214
|
+
readonly charter?: string | undefined;
|
|
215
|
+
readonly childRef: string;
|
|
216
|
+
readonly label?: string | undefined;
|
|
217
|
+
readonly parentRef?: string | undefined;
|
|
218
|
+
readonly spawnedBy: string;
|
|
219
|
+
readonly type: "child.opened";
|
|
220
|
+
} | {
|
|
221
|
+
readonly origin?: {
|
|
222
|
+
readonly node?: string | undefined;
|
|
223
|
+
readonly parentNode?: string | undefined;
|
|
224
|
+
readonly spawnedBy: string;
|
|
225
|
+
} | undefined;
|
|
226
|
+
readonly raw?: {
|
|
227
|
+
readonly kind: string;
|
|
228
|
+
readonly payload: string;
|
|
229
|
+
readonly source: string;
|
|
230
|
+
} | undefined;
|
|
231
|
+
readonly childRef: string;
|
|
232
|
+
readonly outcome: "completed" | "failed" | "interrupted" | "unknown";
|
|
233
|
+
readonly summary?: string | undefined;
|
|
234
|
+
readonly type: "child.ended";
|
|
235
|
+
} | {
|
|
236
|
+
readonly origin?: {
|
|
237
|
+
readonly node?: string | undefined;
|
|
238
|
+
readonly parentNode?: string | undefined;
|
|
239
|
+
readonly spawnedBy: string;
|
|
240
|
+
} | undefined;
|
|
241
|
+
readonly raw?: {
|
|
242
|
+
readonly kind: string;
|
|
243
|
+
readonly payload: string;
|
|
244
|
+
readonly source: string;
|
|
245
|
+
} | undefined;
|
|
246
|
+
readonly status: "allowed" | "rejected" | "unknown" | "warning";
|
|
247
|
+
readonly type: "rate.limit";
|
|
248
|
+
readonly windows: readonly {
|
|
249
|
+
readonly durationMinutes?: number | undefined;
|
|
250
|
+
readonly model?: string | undefined;
|
|
251
|
+
readonly resetsAt?: number | undefined;
|
|
252
|
+
readonly usedPercent: number;
|
|
253
|
+
}[];
|
|
254
|
+
} | {
|
|
255
|
+
readonly origin?: {
|
|
256
|
+
readonly node?: string | undefined;
|
|
257
|
+
readonly parentNode?: string | undefined;
|
|
258
|
+
readonly spawnedBy: string;
|
|
259
|
+
} | undefined;
|
|
260
|
+
readonly raw?: {
|
|
261
|
+
readonly kind: string;
|
|
262
|
+
readonly payload: string;
|
|
263
|
+
readonly source: string;
|
|
264
|
+
} | undefined;
|
|
265
|
+
readonly tasks: readonly {
|
|
266
|
+
readonly description: string;
|
|
267
|
+
readonly id: string;
|
|
268
|
+
readonly kind: string;
|
|
269
|
+
}[];
|
|
270
|
+
readonly type: "session.background";
|
|
271
|
+
} | {
|
|
272
|
+
readonly origin?: {
|
|
273
|
+
readonly node?: string | undefined;
|
|
274
|
+
readonly parentNode?: string | undefined;
|
|
275
|
+
readonly spawnedBy: string;
|
|
276
|
+
} | undefined;
|
|
277
|
+
readonly raw?: {
|
|
278
|
+
readonly kind: string;
|
|
279
|
+
readonly payload: string;
|
|
280
|
+
readonly source: string;
|
|
281
|
+
} | undefined;
|
|
282
|
+
readonly type: "gap";
|
|
283
|
+
readonly detail: string;
|
|
284
|
+
readonly kind: string;
|
|
285
|
+
} | {
|
|
286
|
+
readonly origin?: {
|
|
287
|
+
readonly node?: string | undefined;
|
|
288
|
+
readonly parentNode?: string | undefined;
|
|
289
|
+
readonly spawnedBy: string;
|
|
290
|
+
} | undefined;
|
|
291
|
+
readonly raw: {
|
|
292
|
+
readonly kind: string;
|
|
293
|
+
readonly payload: string;
|
|
294
|
+
readonly source: string;
|
|
295
|
+
};
|
|
296
|
+
readonly type: "raw";
|
|
297
|
+
}, ReadFailure, never>;
|
|
298
|
+
failure: Ref.Ref<ReadFailure | undefined>;
|
|
299
|
+
history: Ref.Ref<readonly ({
|
|
300
|
+
readonly origin?: {
|
|
301
|
+
readonly node?: string | undefined;
|
|
302
|
+
readonly parentNode?: string | undefined;
|
|
303
|
+
readonly spawnedBy: string;
|
|
304
|
+
} | undefined;
|
|
305
|
+
readonly raw?: {
|
|
306
|
+
readonly kind: string;
|
|
307
|
+
readonly payload: string;
|
|
308
|
+
readonly source: string;
|
|
309
|
+
} | undefined;
|
|
310
|
+
readonly receipt: {
|
|
311
|
+
readonly backend: string;
|
|
312
|
+
readonly operationId: string;
|
|
313
|
+
readonly reference: {
|
|
314
|
+
readonly value: string;
|
|
315
|
+
readonly version: number;
|
|
316
|
+
};
|
|
317
|
+
readonly session?: {
|
|
318
|
+
readonly value: string;
|
|
319
|
+
readonly version: number;
|
|
320
|
+
} | undefined;
|
|
321
|
+
};
|
|
322
|
+
readonly type: "acknowledged";
|
|
323
|
+
} | {
|
|
324
|
+
readonly origin?: {
|
|
325
|
+
readonly node?: string | undefined;
|
|
326
|
+
readonly parentNode?: string | undefined;
|
|
327
|
+
readonly spawnedBy: string;
|
|
328
|
+
} | undefined;
|
|
329
|
+
readonly raw?: {
|
|
330
|
+
readonly kind: string;
|
|
331
|
+
readonly payload: string;
|
|
332
|
+
readonly source: string;
|
|
333
|
+
} | undefined;
|
|
334
|
+
readonly state: "accepted" | "awaiting-input" | "completed" | "failed" | "interrupted" | "running";
|
|
335
|
+
readonly type: "execution";
|
|
336
|
+
} | {
|
|
337
|
+
readonly origin?: {
|
|
338
|
+
readonly node?: string | undefined;
|
|
339
|
+
readonly parentNode?: string | undefined;
|
|
340
|
+
readonly spawnedBy: string;
|
|
341
|
+
} | undefined;
|
|
342
|
+
readonly raw?: {
|
|
343
|
+
readonly kind: string;
|
|
344
|
+
readonly payload: string;
|
|
345
|
+
readonly source: string;
|
|
346
|
+
} | undefined;
|
|
347
|
+
readonly reference: string;
|
|
348
|
+
readonly type: "session.opened";
|
|
349
|
+
} | {
|
|
350
|
+
readonly origin?: {
|
|
351
|
+
readonly node?: string | undefined;
|
|
352
|
+
readonly parentNode?: string | undefined;
|
|
353
|
+
readonly spawnedBy: string;
|
|
354
|
+
} | undefined;
|
|
355
|
+
readonly raw?: {
|
|
356
|
+
readonly kind: string;
|
|
357
|
+
readonly payload: string;
|
|
358
|
+
readonly source: string;
|
|
359
|
+
} | undefined;
|
|
360
|
+
readonly inputId?: string | undefined;
|
|
361
|
+
readonly parts: readonly ({
|
|
362
|
+
readonly text: string;
|
|
363
|
+
readonly type: "text";
|
|
364
|
+
} | {
|
|
365
|
+
readonly mediaType: string;
|
|
366
|
+
readonly path: string;
|
|
367
|
+
readonly type: "image";
|
|
368
|
+
} | {
|
|
369
|
+
readonly kind: string;
|
|
370
|
+
readonly payload: string;
|
|
371
|
+
readonly type: "native";
|
|
372
|
+
})[];
|
|
373
|
+
readonly role: "agent" | "user";
|
|
374
|
+
readonly type: "message";
|
|
375
|
+
} | {
|
|
376
|
+
readonly origin?: {
|
|
377
|
+
readonly node?: string | undefined;
|
|
378
|
+
readonly parentNode?: string | undefined;
|
|
379
|
+
readonly spawnedBy: string;
|
|
380
|
+
} | undefined;
|
|
381
|
+
readonly raw?: {
|
|
382
|
+
readonly kind: string;
|
|
383
|
+
readonly payload: string;
|
|
384
|
+
readonly source: string;
|
|
385
|
+
} | undefined;
|
|
386
|
+
readonly text: string;
|
|
387
|
+
readonly type: "thinking";
|
|
388
|
+
} | {
|
|
389
|
+
readonly origin?: {
|
|
390
|
+
readonly node?: string | undefined;
|
|
391
|
+
readonly parentNode?: string | undefined;
|
|
392
|
+
readonly spawnedBy: string;
|
|
393
|
+
} | undefined;
|
|
394
|
+
readonly raw?: {
|
|
395
|
+
readonly kind: string;
|
|
396
|
+
readonly payload: string;
|
|
397
|
+
readonly source: string;
|
|
398
|
+
} | undefined;
|
|
399
|
+
readonly input: string;
|
|
400
|
+
readonly name: string;
|
|
401
|
+
readonly providerName?: string | undefined;
|
|
402
|
+
readonly toolId: string;
|
|
403
|
+
readonly type: "tool.started";
|
|
404
|
+
} | {
|
|
405
|
+
readonly origin?: {
|
|
406
|
+
readonly node?: string | undefined;
|
|
407
|
+
readonly parentNode?: string | undefined;
|
|
408
|
+
readonly spawnedBy: string;
|
|
409
|
+
} | undefined;
|
|
410
|
+
readonly raw?: {
|
|
411
|
+
readonly kind: string;
|
|
412
|
+
readonly payload: string;
|
|
413
|
+
readonly source: string;
|
|
414
|
+
} | undefined;
|
|
415
|
+
readonly ok: boolean;
|
|
416
|
+
readonly output: string;
|
|
417
|
+
readonly toolId: string;
|
|
418
|
+
readonly type: "tool.completed";
|
|
419
|
+
} | {
|
|
420
|
+
readonly origin?: {
|
|
421
|
+
readonly node?: string | undefined;
|
|
422
|
+
readonly parentNode?: string | undefined;
|
|
423
|
+
readonly spawnedBy: string;
|
|
424
|
+
} | undefined;
|
|
425
|
+
readonly raw?: {
|
|
426
|
+
readonly kind: string;
|
|
427
|
+
readonly payload: string;
|
|
428
|
+
readonly source: string;
|
|
429
|
+
} | undefined;
|
|
430
|
+
readonly approvalId: string;
|
|
431
|
+
readonly description: string;
|
|
432
|
+
readonly toolId?: string | undefined;
|
|
433
|
+
readonly type: "approval.requested";
|
|
434
|
+
} | {
|
|
435
|
+
readonly origin?: {
|
|
436
|
+
readonly node?: string | undefined;
|
|
437
|
+
readonly parentNode?: string | undefined;
|
|
438
|
+
readonly spawnedBy: string;
|
|
439
|
+
} | undefined;
|
|
440
|
+
readonly raw?: {
|
|
441
|
+
readonly kind: string;
|
|
442
|
+
readonly payload: string;
|
|
443
|
+
readonly source: string;
|
|
444
|
+
} | undefined;
|
|
445
|
+
readonly type: "usage";
|
|
446
|
+
readonly cacheReadTokens?: number | undefined;
|
|
447
|
+
readonly cacheWriteTokens?: number | undefined;
|
|
448
|
+
readonly inputTokens?: number | undefined;
|
|
449
|
+
readonly model?: string | undefined;
|
|
450
|
+
readonly outputTokens?: number | undefined;
|
|
451
|
+
readonly scope: "cumulative" | "delta";
|
|
452
|
+
readonly unit: "run" | "session" | "turn";
|
|
453
|
+
} | {
|
|
454
|
+
readonly origin?: {
|
|
455
|
+
readonly node?: string | undefined;
|
|
456
|
+
readonly parentNode?: string | undefined;
|
|
457
|
+
readonly spawnedBy: string;
|
|
458
|
+
} | undefined;
|
|
459
|
+
readonly raw?: {
|
|
460
|
+
readonly kind: string;
|
|
461
|
+
readonly payload: string;
|
|
462
|
+
readonly source: string;
|
|
463
|
+
} | undefined;
|
|
464
|
+
readonly type: "cost";
|
|
465
|
+
readonly amount: number;
|
|
466
|
+
readonly currency: string;
|
|
467
|
+
readonly model?: string | undefined;
|
|
468
|
+
readonly scope: "cumulative" | "delta";
|
|
469
|
+
readonly source: "estimated" | "provider";
|
|
470
|
+
readonly unit: "run" | "session" | "turn";
|
|
471
|
+
} | {
|
|
472
|
+
readonly origin?: {
|
|
473
|
+
readonly node?: string | undefined;
|
|
474
|
+
readonly parentNode?: string | undefined;
|
|
475
|
+
readonly spawnedBy: string;
|
|
476
|
+
} | undefined;
|
|
477
|
+
readonly raw?: {
|
|
478
|
+
readonly kind: string;
|
|
479
|
+
readonly payload: string;
|
|
480
|
+
readonly source: string;
|
|
481
|
+
} | undefined;
|
|
482
|
+
readonly model: string;
|
|
483
|
+
readonly reason?: string | undefined;
|
|
484
|
+
readonly type: "model.changed";
|
|
485
|
+
} | {
|
|
486
|
+
readonly origin?: {
|
|
487
|
+
readonly node?: string | undefined;
|
|
488
|
+
readonly parentNode?: string | undefined;
|
|
489
|
+
readonly spawnedBy: string;
|
|
490
|
+
} | undefined;
|
|
491
|
+
readonly raw?: {
|
|
492
|
+
readonly kind: string;
|
|
493
|
+
readonly payload: string;
|
|
494
|
+
readonly source: string;
|
|
495
|
+
} | undefined;
|
|
496
|
+
readonly charter?: string | undefined;
|
|
497
|
+
readonly childRef: string;
|
|
498
|
+
readonly label?: string | undefined;
|
|
499
|
+
readonly parentRef?: string | undefined;
|
|
500
|
+
readonly spawnedBy: string;
|
|
501
|
+
readonly type: "child.opened";
|
|
502
|
+
} | {
|
|
503
|
+
readonly origin?: {
|
|
504
|
+
readonly node?: string | undefined;
|
|
505
|
+
readonly parentNode?: string | undefined;
|
|
506
|
+
readonly spawnedBy: string;
|
|
507
|
+
} | undefined;
|
|
508
|
+
readonly raw?: {
|
|
509
|
+
readonly kind: string;
|
|
510
|
+
readonly payload: string;
|
|
511
|
+
readonly source: string;
|
|
512
|
+
} | undefined;
|
|
513
|
+
readonly childRef: string;
|
|
514
|
+
readonly outcome: "completed" | "failed" | "interrupted" | "unknown";
|
|
515
|
+
readonly summary?: string | undefined;
|
|
516
|
+
readonly type: "child.ended";
|
|
517
|
+
} | {
|
|
518
|
+
readonly origin?: {
|
|
519
|
+
readonly node?: string | undefined;
|
|
520
|
+
readonly parentNode?: string | undefined;
|
|
521
|
+
readonly spawnedBy: string;
|
|
522
|
+
} | undefined;
|
|
523
|
+
readonly raw?: {
|
|
524
|
+
readonly kind: string;
|
|
525
|
+
readonly payload: string;
|
|
526
|
+
readonly source: string;
|
|
527
|
+
} | undefined;
|
|
528
|
+
readonly status: "allowed" | "rejected" | "unknown" | "warning";
|
|
529
|
+
readonly type: "rate.limit";
|
|
530
|
+
readonly windows: readonly {
|
|
531
|
+
readonly durationMinutes?: number | undefined;
|
|
532
|
+
readonly model?: string | undefined;
|
|
533
|
+
readonly resetsAt?: number | undefined;
|
|
534
|
+
readonly usedPercent: number;
|
|
535
|
+
}[];
|
|
536
|
+
} | {
|
|
537
|
+
readonly origin?: {
|
|
538
|
+
readonly node?: string | undefined;
|
|
539
|
+
readonly parentNode?: string | undefined;
|
|
540
|
+
readonly spawnedBy: string;
|
|
541
|
+
} | undefined;
|
|
542
|
+
readonly raw?: {
|
|
543
|
+
readonly kind: string;
|
|
544
|
+
readonly payload: string;
|
|
545
|
+
readonly source: string;
|
|
546
|
+
} | undefined;
|
|
547
|
+
readonly tasks: readonly {
|
|
548
|
+
readonly description: string;
|
|
549
|
+
readonly id: string;
|
|
550
|
+
readonly kind: string;
|
|
551
|
+
}[];
|
|
552
|
+
readonly type: "session.background";
|
|
553
|
+
} | {
|
|
554
|
+
readonly origin?: {
|
|
555
|
+
readonly node?: string | undefined;
|
|
556
|
+
readonly parentNode?: string | undefined;
|
|
557
|
+
readonly spawnedBy: string;
|
|
558
|
+
} | undefined;
|
|
559
|
+
readonly raw?: {
|
|
560
|
+
readonly kind: string;
|
|
561
|
+
readonly payload: string;
|
|
562
|
+
readonly source: string;
|
|
563
|
+
} | undefined;
|
|
564
|
+
readonly type: "gap";
|
|
565
|
+
readonly detail: string;
|
|
566
|
+
readonly kind: string;
|
|
567
|
+
} | {
|
|
568
|
+
readonly origin?: {
|
|
569
|
+
readonly node?: string | undefined;
|
|
570
|
+
readonly parentNode?: string | undefined;
|
|
571
|
+
readonly spawnedBy: string;
|
|
572
|
+
} | undefined;
|
|
573
|
+
readonly raw: {
|
|
574
|
+
readonly kind: string;
|
|
575
|
+
readonly payload: string;
|
|
576
|
+
readonly source: string;
|
|
577
|
+
};
|
|
578
|
+
readonly type: "raw";
|
|
579
|
+
})[]>;
|
|
580
|
+
session: SessionConnection;
|
|
581
|
+
state: Ref.Ref<"accepted" | "awaiting-input" | "completed" | "failed" | "interrupted" | "running">;
|
|
582
|
+
}, never, import("effect/Scope").Scope>;
|
|
583
|
+
export type RunState = Effect.Success<ReturnType<typeof makeRunState>>;
|
|
584
|
+
//# sourceMappingURL=runState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runState.d.ts","sourceRoot":"","sources":["../src/runState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAgB,GAAG,EAAE,MAAM,EAAa,MAAM,QAAQ,CAAC;AAEhF,OAAO,EAAE,KAAK,WAAW,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCA+DvB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC"}
|
package/dist/runState.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Deferred, Effect, Exit, PubSub, Ref, Stream } from "effect";
|
|
2
|
+
import { UnknownAcceptance } from "@shivaedev/agent/failures.ts";
|
|
3
|
+
export const makeRunState = Effect.fn("ClaudeCode.makeRunState")(function* (operationId, session) {
|
|
4
|
+
const acknowledged = yield* Deferred.make();
|
|
5
|
+
const history = yield* Ref.make([]);
|
|
6
|
+
const state = yield* Ref.make("accepted");
|
|
7
|
+
const terminalSeen = yield* Ref.make(false);
|
|
8
|
+
const failure = yield* Ref.make(undefined);
|
|
9
|
+
const hub = yield* PubSub.unbounded({ replay: Number.POSITIVE_INFINITY });
|
|
10
|
+
function publish(event) {
|
|
11
|
+
return Ref.update(history, (events) => [...events, event]).pipe(Effect.andThen(PubSub.publish(hub, [event])));
|
|
12
|
+
}
|
|
13
|
+
function observe(event) {
|
|
14
|
+
return Effect.gen(function* () {
|
|
15
|
+
if (event.type === "session.opened") {
|
|
16
|
+
const receipt = {
|
|
17
|
+
backend: "claude-code",
|
|
18
|
+
operationId,
|
|
19
|
+
reference: { value: operationId, version: 1 },
|
|
20
|
+
session: { value: event.reference, version: 1 },
|
|
21
|
+
};
|
|
22
|
+
if (yield* Deferred.succeed(acknowledged, receipt)) {
|
|
23
|
+
yield* publish({ receipt, type: "acknowledged" });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (event.type === "execution") {
|
|
27
|
+
yield* Ref.set(state, event.state);
|
|
28
|
+
if (event.state !== "awaiting-input") {
|
|
29
|
+
yield* Ref.set(terminalSeen, event.state === "completed" || event.state === "failed" || event.state === "interrupted");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
yield* publish(event);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const consume = session.events.pipe(Stream.runForEach(observe), Effect.matchEffect({
|
|
36
|
+
onFailure: (error) => Ref.set(failure, error).pipe(Effect.andThen(publish({ detail: error.message, kind: "provider-unavailable", type: "gap" })), Effect.andThen(PubSub.end(hub, Exit.fail(error)))),
|
|
37
|
+
onSuccess: () => Effect.gen(function* () {
|
|
38
|
+
const terminal = yield* Ref.get(terminalSeen);
|
|
39
|
+
if (!terminal) {
|
|
40
|
+
yield* publish({ detail: "The provider stream ended without a terminal turn result", kind: "missing-output", type: "gap" });
|
|
41
|
+
}
|
|
42
|
+
yield* PubSub.end(hub, Exit.void);
|
|
43
|
+
}),
|
|
44
|
+
}), Effect.ensuring(Deferred.fail(acknowledged, new UnknownAcceptance({
|
|
45
|
+
backend: "claude-code",
|
|
46
|
+
message: "The provider ended before acknowledging its native session identity",
|
|
47
|
+
operationId,
|
|
48
|
+
}))), Effect.onInterrupt(() => PubSub.end(hub, Exit.void)));
|
|
49
|
+
yield* Effect.forkScoped(consume);
|
|
50
|
+
return { acknowledged, events: Stream.fromPubSubTake(hub), failure, history, session, state };
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=runState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runState.js","sourceRoot":"","sources":["../src/runState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAa,MAAM,QAAQ,CAAC;AAEhF,OAAO,EAAoB,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;A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