@archastro/sdk 0.15.0 → 0.16.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/client.d.ts +4 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -1
- package/dist/client.js.map +1 -1
- package/dist/effective-access.d.ts +34 -0
- package/dist/effective-access.d.ts.map +1 -0
- package/dist/effective-access.js +51 -0
- package/dist/effective-access.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/types/ai.d.ts +109 -109
- package/dist/types/ai.js +10 -10
- package/dist/types/ai.js.map +1 -1
- package/dist/types/automations.d.ts +15 -15
- package/dist/types/automations.js +6 -6
- package/dist/types/automations.js.map +1 -1
- package/dist/types/chat.d.ts +2520 -2520
- package/dist/types/chat.js +3 -3
- package/dist/types/chat.js.map +1 -1
- package/dist/types/common.d.ts +2545 -3272
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +204 -228
- package/dist/types/common.js.map +1 -1
- package/dist/types/config.d.ts +11 -11
- package/dist/types/config.js +3 -3
- package/dist/types/config.js.map +1 -1
- package/dist/types/events.d.ts +810 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +77 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/expressions.d.ts +66 -0
- package/dist/types/expressions.d.ts.map +1 -0
- package/dist/types/expressions.js +27 -0
- package/dist/types/expressions.js.map +1 -0
- package/dist/types/extractions.d.ts +3 -3
- package/dist/types/extractions.js +2 -2
- package/dist/types/extractions.js.map +1 -1
- package/dist/types/graph.d.ts +34 -0
- package/dist/types/graph.d.ts.map +1 -0
- package/dist/types/graph.js +16 -0
- package/dist/types/graph.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +6 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/notifications.d.ts +3 -3
- package/dist/types/notifications.js +2 -2
- package/dist/types/notifications.js.map +1 -1
- package/dist/types/oauth.d.ts +5 -5
- package/dist/types/scripts.d.ts +800 -0
- package/dist/types/scripts.d.ts.map +1 -0
- package/dist/types/scripts.js +112 -0
- package/dist/types/scripts.js.map +1 -0
- package/dist/types/status.d.ts +8 -8
- package/dist/types/status.js +2 -2
- package/dist/types/status.js.map +1 -1
- package/dist/types/tasks.d.ts +6 -6
- package/dist/types/tasks.js +3 -3
- package/dist/types/tasks.js.map +1 -1
- package/dist/types/teams.d.ts +334 -334
- package/dist/types/teams.js +5 -5
- package/dist/types/teams.js.map +1 -1
- package/dist/types/threads.d.ts +209 -209
- package/dist/types/threads.js +6 -6
- package/dist/types/threads.js.map +1 -1
- package/dist/types/users.d.ts +6 -6
- package/dist/types/users.js +3 -3
- package/dist/types/users.js.map +1 -1
- package/dist/types/workflows.d.ts +544 -0
- package/dist/types/workflows.d.ts.map +1 -0
- package/dist/types/workflows.js +91 -0
- package/dist/types/workflows.js.map +1 -0
- package/dist/v1/resources/agents.d.ts +4 -3
- package/dist/v1/resources/agents.d.ts.map +1 -1
- package/dist/v1/resources/agents.js +1 -1
- package/dist/v1/resources/agents.js.map +1 -1
- package/dist/v1/resources/ai.d.ts +2 -2
- package/dist/v1/resources/ai.d.ts.map +1 -1
- package/dist/v1/resources/ai.js +1 -1
- package/dist/v1/resources/event_subscriptions.d.ts +1 -1
- package/dist/v1/resources/event_subscriptions.js +1 -1
- package/dist/v1/resources/index.d.ts +2 -0
- package/dist/v1/resources/index.d.ts.map +1 -1
- package/dist/v1/resources/index.js +3 -1
- package/dist/v1/resources/index.js.map +1 -1
- package/dist/v1/resources/scripts.d.ts +117 -0
- package/dist/v1/resources/scripts.d.ts.map +1 -0
- package/dist/v1/resources/scripts.js +116 -0
- package/dist/v1/resources/scripts.js.map +1 -0
- package/dist/v1/resources/users.d.ts +8 -3
- package/dist/v1/resources/users.d.ts.map +1 -1
- package/dist/v1/resources/users.js +9 -3
- package/dist/v1/resources/users.js.map +1 -1
- package/dist/v1/resources/work_items.d.ts +1 -1
- package/dist/v1/resources/work_items.d.ts.map +1 -1
- package/dist/v1/resources/work_items.js +1 -1
- package/dist/v1/resources/workflows.d.ts +205 -0
- package/dist/v1/resources/workflows.d.ts.map +1 -0
- package/dist/v1/resources/workflows.js +205 -0
- package/dist/v1/resources/workflows.js.map +1 -0
- package/dist/v1.d.ts +4 -0
- package/dist/v1.d.ts.map +1 -1
- package/dist/v1.js +7 -1
- package/dist/v1.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** One ordered, replayable record from a durable workflow journal. */
|
|
3
|
+
export interface WorkflowJournalEntry {
|
|
4
|
+
/** Durable command identifier associated with the record, when present. */
|
|
5
|
+
command_id?: string | undefined;
|
|
6
|
+
/** When this entry was durably committed. */
|
|
7
|
+
created_at?: string | undefined;
|
|
8
|
+
/** Journal entry ID (`wdr_...`). */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Workflow node associated with the record. `null` for execution-level records. */
|
|
11
|
+
node_id?: string | undefined;
|
|
12
|
+
/** Replayable workflow record body, including payload, context, environment, metadata, and timestamp. */
|
|
13
|
+
record: Record<string, unknown>;
|
|
14
|
+
/** Monotonically increasing sequence within the journal. */
|
|
15
|
+
sequence: number;
|
|
16
|
+
/** Durable timer identifier associated with the record, when present. */
|
|
17
|
+
timer_id?: string | undefined;
|
|
18
|
+
/** Workflow record type, such as `node_started`, `node_completed`, or `node_failed`. */
|
|
19
|
+
type: string;
|
|
20
|
+
}
|
|
21
|
+
/** Runtime validator for {@link WorkflowJournalEntry}. */
|
|
22
|
+
export declare const workflowJournalEntrySchema: z.ZodObject<{
|
|
23
|
+
/** Durable command identifier associated with the record, when present. */
|
|
24
|
+
command_id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
/** When this entry was durably committed. */
|
|
26
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
27
|
+
/** Journal entry ID (`wdr_...`). */
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
/** Workflow node associated with the record. `null` for execution-level records. */
|
|
30
|
+
node_id: z.ZodOptional<z.ZodString>;
|
|
31
|
+
/** Replayable workflow record body, including payload, context, environment, metadata, and timestamp. */
|
|
32
|
+
record: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
|
|
33
|
+
/** Monotonically increasing sequence within the journal. */
|
|
34
|
+
sequence: z.ZodNumber;
|
|
35
|
+
/** Durable timer identifier associated with the record, when present. */
|
|
36
|
+
timer_id: z.ZodOptional<z.ZodString>;
|
|
37
|
+
/** Workflow record type, such as `node_started`, `node_completed`, or `node_failed`. */
|
|
38
|
+
type: z.ZodString;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
type: string;
|
|
41
|
+
id: string;
|
|
42
|
+
record: Record<string, {} | null>;
|
|
43
|
+
sequence: number;
|
|
44
|
+
created_at?: string | undefined;
|
|
45
|
+
command_id?: string | undefined;
|
|
46
|
+
node_id?: string | undefined;
|
|
47
|
+
timer_id?: string | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
type: string;
|
|
50
|
+
id: string;
|
|
51
|
+
record: Record<string, {} | null>;
|
|
52
|
+
sequence: number;
|
|
53
|
+
created_at?: string | undefined;
|
|
54
|
+
command_id?: string | undefined;
|
|
55
|
+
node_id?: string | undefined;
|
|
56
|
+
timer_id?: string | undefined;
|
|
57
|
+
}>;
|
|
58
|
+
/** Summary of the durable workflow execution journal associated with a run. */
|
|
59
|
+
export interface WorkflowJournal {
|
|
60
|
+
/** When durable workflow execution reached a terminal state. `null` while it is active. */
|
|
61
|
+
completed_at?: string | undefined;
|
|
62
|
+
/** When the journal was created. */
|
|
63
|
+
created_at?: string | undefined;
|
|
64
|
+
/** Highest workflow record sequence durably committed to this journal. */
|
|
65
|
+
current_sequence: number;
|
|
66
|
+
/** Journal execution ID (`wde_...`). */
|
|
67
|
+
id: string;
|
|
68
|
+
/** When durable workflow execution started. */
|
|
69
|
+
started_at?: string | undefined;
|
|
70
|
+
/** Current durable execution status: `pending`, `running`, `waiting`, `completed`, `failed`, or `cancelled`. */
|
|
71
|
+
status: string;
|
|
72
|
+
/** When the journal was last updated. */
|
|
73
|
+
updated_at?: string | undefined;
|
|
74
|
+
}
|
|
75
|
+
/** Runtime validator for {@link WorkflowJournal}. */
|
|
76
|
+
export declare const workflowJournalSchema: z.ZodObject<{
|
|
77
|
+
/** When durable workflow execution reached a terminal state. `null` while it is active. */
|
|
78
|
+
completed_at: z.ZodOptional<z.ZodString>;
|
|
79
|
+
/** When the journal was created. */
|
|
80
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
81
|
+
/** Highest workflow record sequence durably committed to this journal. */
|
|
82
|
+
current_sequence: z.ZodNumber;
|
|
83
|
+
/** Journal execution ID (`wde_...`). */
|
|
84
|
+
id: z.ZodString;
|
|
85
|
+
/** When durable workflow execution started. */
|
|
86
|
+
started_at: z.ZodOptional<z.ZodString>;
|
|
87
|
+
/** Current durable execution status: `pending`, `running`, `waiting`, `completed`, `failed`, or `cancelled`. */
|
|
88
|
+
status: z.ZodString;
|
|
89
|
+
/** When the journal was last updated. */
|
|
90
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
status: string;
|
|
93
|
+
id: string;
|
|
94
|
+
current_sequence: number;
|
|
95
|
+
created_at?: string | undefined;
|
|
96
|
+
updated_at?: string | undefined;
|
|
97
|
+
completed_at?: string | undefined;
|
|
98
|
+
started_at?: string | undefined;
|
|
99
|
+
}, {
|
|
100
|
+
status: string;
|
|
101
|
+
id: string;
|
|
102
|
+
current_sequence: number;
|
|
103
|
+
created_at?: string | undefined;
|
|
104
|
+
updated_at?: string | undefined;
|
|
105
|
+
completed_at?: string | undefined;
|
|
106
|
+
started_at?: string | undefined;
|
|
107
|
+
}>;
|
|
108
|
+
/** Externally executable work yielded by a durable workflow. */
|
|
109
|
+
export interface WorkflowWorkItem {
|
|
110
|
+
/** Agent assigned to execute this work. */
|
|
111
|
+
agent: string;
|
|
112
|
+
/** Number of times this work has been freshly claimed or reclaimed. */
|
|
113
|
+
attempt_count: number;
|
|
114
|
+
/** Opaque journal command identity used to resume the workflow exactly once. */
|
|
115
|
+
command_id: string;
|
|
116
|
+
created_at: string;
|
|
117
|
+
/** Durable workflow execution that owns this work. */
|
|
118
|
+
execution: string;
|
|
119
|
+
/** Work item ID (`wdi_...`). */
|
|
120
|
+
id: string;
|
|
121
|
+
/** When the current claim expires. Null for queued or terminal work. */
|
|
122
|
+
lease_expires_at?: string | undefined;
|
|
123
|
+
/** Workflow graph node that yielded the work. */
|
|
124
|
+
node_id: string;
|
|
125
|
+
/** Instructions and participant bindings needed to execute the work. */
|
|
126
|
+
payload: Record<string, unknown>;
|
|
127
|
+
/** Routine run that owns the execution, when this work came from a routine. */
|
|
128
|
+
routine_run?: string | undefined;
|
|
129
|
+
/** Current queue lifecycle status. */
|
|
130
|
+
status: string;
|
|
131
|
+
/** Stable resource discriminator. Always `workflow_work_item`. */
|
|
132
|
+
type: string;
|
|
133
|
+
updated_at: string;
|
|
134
|
+
}
|
|
135
|
+
/** Runtime validator for {@link WorkflowWorkItem}. */
|
|
136
|
+
export declare const workflowWorkItemSchema: z.ZodObject<{
|
|
137
|
+
/** Agent assigned to execute this work. */
|
|
138
|
+
agent: z.ZodString;
|
|
139
|
+
/** Number of times this work has been freshly claimed or reclaimed. */
|
|
140
|
+
attempt_count: z.ZodNumber;
|
|
141
|
+
/** Opaque journal command identity used to resume the workflow exactly once. */
|
|
142
|
+
command_id: z.ZodString;
|
|
143
|
+
created_at: z.ZodString;
|
|
144
|
+
/** Durable workflow execution that owns this work. */
|
|
145
|
+
execution: z.ZodString;
|
|
146
|
+
/** Work item ID (`wdi_...`). */
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
/** When the current claim expires. Null for queued or terminal work. */
|
|
149
|
+
lease_expires_at: z.ZodOptional<z.ZodString>;
|
|
150
|
+
/** Workflow graph node that yielded the work. */
|
|
151
|
+
node_id: z.ZodString;
|
|
152
|
+
/** Instructions and participant bindings needed to execute the work. */
|
|
153
|
+
payload: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
|
|
154
|
+
/** Routine run that owns the execution, when this work came from a routine. */
|
|
155
|
+
routine_run: z.ZodOptional<z.ZodString>;
|
|
156
|
+
/** Current queue lifecycle status. */
|
|
157
|
+
status: z.ZodString;
|
|
158
|
+
/** Stable resource discriminator. Always `workflow_work_item`. */
|
|
159
|
+
type: z.ZodString;
|
|
160
|
+
updated_at: z.ZodString;
|
|
161
|
+
}, "strip", z.ZodTypeAny, {
|
|
162
|
+
agent: string;
|
|
163
|
+
type: string;
|
|
164
|
+
status: string;
|
|
165
|
+
payload: Record<string, {} | null>;
|
|
166
|
+
created_at: string;
|
|
167
|
+
id: string;
|
|
168
|
+
updated_at: string;
|
|
169
|
+
command_id: string;
|
|
170
|
+
node_id: string;
|
|
171
|
+
attempt_count: number;
|
|
172
|
+
execution: string;
|
|
173
|
+
lease_expires_at?: string | undefined;
|
|
174
|
+
routine_run?: string | undefined;
|
|
175
|
+
}, {
|
|
176
|
+
agent: string;
|
|
177
|
+
type: string;
|
|
178
|
+
status: string;
|
|
179
|
+
payload: Record<string, {} | null>;
|
|
180
|
+
created_at: string;
|
|
181
|
+
id: string;
|
|
182
|
+
updated_at: string;
|
|
183
|
+
command_id: string;
|
|
184
|
+
node_id: string;
|
|
185
|
+
attempt_count: number;
|
|
186
|
+
execution: string;
|
|
187
|
+
lease_expires_at?: string | undefined;
|
|
188
|
+
routine_run?: string | undefined;
|
|
189
|
+
}>;
|
|
190
|
+
/** A claimed workflow work item and its caller-held lease token. */
|
|
191
|
+
export interface WorkflowWorkItemLease {
|
|
192
|
+
/** Opaque lease token that must be persisted and presented for later transitions. */
|
|
193
|
+
lease_owner: string;
|
|
194
|
+
/** The claimed, resumed, started, or heartbeated work item. */
|
|
195
|
+
work_item: WorkflowWorkItem;
|
|
196
|
+
}
|
|
197
|
+
/** Runtime validator for {@link WorkflowWorkItemLease}. */
|
|
198
|
+
export declare const workflowWorkItemLeaseSchema: z.ZodObject<{
|
|
199
|
+
/** Opaque lease token that must be persisted and presented for later transitions. */
|
|
200
|
+
lease_owner: z.ZodString;
|
|
201
|
+
/** The claimed, resumed, started, or heartbeated work item. */
|
|
202
|
+
work_item: z.ZodObject<{
|
|
203
|
+
/** Agent assigned to execute this work. */
|
|
204
|
+
agent: z.ZodString;
|
|
205
|
+
/** Number of times this work has been freshly claimed or reclaimed. */
|
|
206
|
+
attempt_count: z.ZodNumber;
|
|
207
|
+
/** Opaque journal command identity used to resume the workflow exactly once. */
|
|
208
|
+
command_id: z.ZodString;
|
|
209
|
+
created_at: z.ZodString;
|
|
210
|
+
/** Durable workflow execution that owns this work. */
|
|
211
|
+
execution: z.ZodString;
|
|
212
|
+
/** Work item ID (`wdi_...`). */
|
|
213
|
+
id: z.ZodString;
|
|
214
|
+
/** When the current claim expires. Null for queued or terminal work. */
|
|
215
|
+
lease_expires_at: z.ZodOptional<z.ZodString>;
|
|
216
|
+
/** Workflow graph node that yielded the work. */
|
|
217
|
+
node_id: z.ZodString;
|
|
218
|
+
/** Instructions and participant bindings needed to execute the work. */
|
|
219
|
+
payload: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
|
|
220
|
+
/** Routine run that owns the execution, when this work came from a routine. */
|
|
221
|
+
routine_run: z.ZodOptional<z.ZodString>;
|
|
222
|
+
/** Current queue lifecycle status. */
|
|
223
|
+
status: z.ZodString;
|
|
224
|
+
/** Stable resource discriminator. Always `workflow_work_item`. */
|
|
225
|
+
type: z.ZodString;
|
|
226
|
+
updated_at: z.ZodString;
|
|
227
|
+
}, "strip", z.ZodTypeAny, {
|
|
228
|
+
agent: string;
|
|
229
|
+
type: string;
|
|
230
|
+
status: string;
|
|
231
|
+
payload: Record<string, {} | null>;
|
|
232
|
+
created_at: string;
|
|
233
|
+
id: string;
|
|
234
|
+
updated_at: string;
|
|
235
|
+
command_id: string;
|
|
236
|
+
node_id: string;
|
|
237
|
+
attempt_count: number;
|
|
238
|
+
execution: string;
|
|
239
|
+
lease_expires_at?: string | undefined;
|
|
240
|
+
routine_run?: string | undefined;
|
|
241
|
+
}, {
|
|
242
|
+
agent: string;
|
|
243
|
+
type: string;
|
|
244
|
+
status: string;
|
|
245
|
+
payload: Record<string, {} | null>;
|
|
246
|
+
created_at: string;
|
|
247
|
+
id: string;
|
|
248
|
+
updated_at: string;
|
|
249
|
+
command_id: string;
|
|
250
|
+
node_id: string;
|
|
251
|
+
attempt_count: number;
|
|
252
|
+
execution: string;
|
|
253
|
+
lease_expires_at?: string | undefined;
|
|
254
|
+
routine_run?: string | undefined;
|
|
255
|
+
}>;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
lease_owner: string;
|
|
258
|
+
work_item: {
|
|
259
|
+
agent: string;
|
|
260
|
+
type: string;
|
|
261
|
+
status: string;
|
|
262
|
+
payload: Record<string, {} | null>;
|
|
263
|
+
created_at: string;
|
|
264
|
+
id: string;
|
|
265
|
+
updated_at: string;
|
|
266
|
+
command_id: string;
|
|
267
|
+
node_id: string;
|
|
268
|
+
attempt_count: number;
|
|
269
|
+
execution: string;
|
|
270
|
+
lease_expires_at?: string | undefined;
|
|
271
|
+
routine_run?: string | undefined;
|
|
272
|
+
};
|
|
273
|
+
}, {
|
|
274
|
+
lease_owner: string;
|
|
275
|
+
work_item: {
|
|
276
|
+
agent: string;
|
|
277
|
+
type: string;
|
|
278
|
+
status: string;
|
|
279
|
+
payload: Record<string, {} | null>;
|
|
280
|
+
created_at: string;
|
|
281
|
+
id: string;
|
|
282
|
+
updated_at: string;
|
|
283
|
+
command_id: string;
|
|
284
|
+
node_id: string;
|
|
285
|
+
attempt_count: number;
|
|
286
|
+
execution: string;
|
|
287
|
+
lease_expires_at?: string | undefined;
|
|
288
|
+
routine_run?: string | undefined;
|
|
289
|
+
};
|
|
290
|
+
}>;
|
|
291
|
+
/** Result of polling an agent's durable workflow work queue. */
|
|
292
|
+
export interface WorkflowWorkItemClaim {
|
|
293
|
+
/** Claimed or resumed work and its lease; null when no eligible item exists. */
|
|
294
|
+
data?: WorkflowWorkItemLease | undefined;
|
|
295
|
+
}
|
|
296
|
+
/** Runtime validator for {@link WorkflowWorkItemClaim}. */
|
|
297
|
+
export declare const workflowWorkItemClaimSchema: z.ZodObject<{
|
|
298
|
+
/** Claimed or resumed work and its lease; null when no eligible item exists. */
|
|
299
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
300
|
+
/** Opaque lease token that must be persisted and presented for later transitions. */
|
|
301
|
+
lease_owner: z.ZodString;
|
|
302
|
+
/** The claimed, resumed, started, or heartbeated work item. */
|
|
303
|
+
work_item: z.ZodObject<{
|
|
304
|
+
/** Agent assigned to execute this work. */
|
|
305
|
+
agent: z.ZodString;
|
|
306
|
+
/** Number of times this work has been freshly claimed or reclaimed. */
|
|
307
|
+
attempt_count: z.ZodNumber;
|
|
308
|
+
/** Opaque journal command identity used to resume the workflow exactly once. */
|
|
309
|
+
command_id: z.ZodString;
|
|
310
|
+
created_at: z.ZodString;
|
|
311
|
+
/** Durable workflow execution that owns this work. */
|
|
312
|
+
execution: z.ZodString;
|
|
313
|
+
/** Work item ID (`wdi_...`). */
|
|
314
|
+
id: z.ZodString;
|
|
315
|
+
/** When the current claim expires. Null for queued or terminal work. */
|
|
316
|
+
lease_expires_at: z.ZodOptional<z.ZodString>;
|
|
317
|
+
/** Workflow graph node that yielded the work. */
|
|
318
|
+
node_id: z.ZodString;
|
|
319
|
+
/** Instructions and participant bindings needed to execute the work. */
|
|
320
|
+
payload: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
|
|
321
|
+
/** Routine run that owns the execution, when this work came from a routine. */
|
|
322
|
+
routine_run: z.ZodOptional<z.ZodString>;
|
|
323
|
+
/** Current queue lifecycle status. */
|
|
324
|
+
status: z.ZodString;
|
|
325
|
+
/** Stable resource discriminator. Always `workflow_work_item`. */
|
|
326
|
+
type: z.ZodString;
|
|
327
|
+
updated_at: z.ZodString;
|
|
328
|
+
}, "strip", z.ZodTypeAny, {
|
|
329
|
+
agent: string;
|
|
330
|
+
type: string;
|
|
331
|
+
status: string;
|
|
332
|
+
payload: Record<string, {} | null>;
|
|
333
|
+
created_at: string;
|
|
334
|
+
id: string;
|
|
335
|
+
updated_at: string;
|
|
336
|
+
command_id: string;
|
|
337
|
+
node_id: string;
|
|
338
|
+
attempt_count: number;
|
|
339
|
+
execution: string;
|
|
340
|
+
lease_expires_at?: string | undefined;
|
|
341
|
+
routine_run?: string | undefined;
|
|
342
|
+
}, {
|
|
343
|
+
agent: string;
|
|
344
|
+
type: string;
|
|
345
|
+
status: string;
|
|
346
|
+
payload: Record<string, {} | null>;
|
|
347
|
+
created_at: string;
|
|
348
|
+
id: string;
|
|
349
|
+
updated_at: string;
|
|
350
|
+
command_id: string;
|
|
351
|
+
node_id: string;
|
|
352
|
+
attempt_count: number;
|
|
353
|
+
execution: string;
|
|
354
|
+
lease_expires_at?: string | undefined;
|
|
355
|
+
routine_run?: string | undefined;
|
|
356
|
+
}>;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
lease_owner: string;
|
|
359
|
+
work_item: {
|
|
360
|
+
agent: string;
|
|
361
|
+
type: string;
|
|
362
|
+
status: string;
|
|
363
|
+
payload: Record<string, {} | null>;
|
|
364
|
+
created_at: string;
|
|
365
|
+
id: string;
|
|
366
|
+
updated_at: string;
|
|
367
|
+
command_id: string;
|
|
368
|
+
node_id: string;
|
|
369
|
+
attempt_count: number;
|
|
370
|
+
execution: string;
|
|
371
|
+
lease_expires_at?: string | undefined;
|
|
372
|
+
routine_run?: string | undefined;
|
|
373
|
+
};
|
|
374
|
+
}, {
|
|
375
|
+
lease_owner: string;
|
|
376
|
+
work_item: {
|
|
377
|
+
agent: string;
|
|
378
|
+
type: string;
|
|
379
|
+
status: string;
|
|
380
|
+
payload: Record<string, {} | null>;
|
|
381
|
+
created_at: string;
|
|
382
|
+
id: string;
|
|
383
|
+
updated_at: string;
|
|
384
|
+
command_id: string;
|
|
385
|
+
node_id: string;
|
|
386
|
+
attempt_count: number;
|
|
387
|
+
execution: string;
|
|
388
|
+
lease_expires_at?: string | undefined;
|
|
389
|
+
routine_run?: string | undefined;
|
|
390
|
+
};
|
|
391
|
+
}>>;
|
|
392
|
+
}, "strip", z.ZodTypeAny, {
|
|
393
|
+
data?: {
|
|
394
|
+
lease_owner: string;
|
|
395
|
+
work_item: {
|
|
396
|
+
agent: string;
|
|
397
|
+
type: string;
|
|
398
|
+
status: string;
|
|
399
|
+
payload: Record<string, {} | null>;
|
|
400
|
+
created_at: string;
|
|
401
|
+
id: string;
|
|
402
|
+
updated_at: string;
|
|
403
|
+
command_id: string;
|
|
404
|
+
node_id: string;
|
|
405
|
+
attempt_count: number;
|
|
406
|
+
execution: string;
|
|
407
|
+
lease_expires_at?: string | undefined;
|
|
408
|
+
routine_run?: string | undefined;
|
|
409
|
+
};
|
|
410
|
+
} | undefined;
|
|
411
|
+
}, {
|
|
412
|
+
data?: {
|
|
413
|
+
lease_owner: string;
|
|
414
|
+
work_item: {
|
|
415
|
+
agent: string;
|
|
416
|
+
type: string;
|
|
417
|
+
status: string;
|
|
418
|
+
payload: Record<string, {} | null>;
|
|
419
|
+
created_at: string;
|
|
420
|
+
id: string;
|
|
421
|
+
updated_at: string;
|
|
422
|
+
command_id: string;
|
|
423
|
+
node_id: string;
|
|
424
|
+
attempt_count: number;
|
|
425
|
+
execution: string;
|
|
426
|
+
lease_expires_at?: string | undefined;
|
|
427
|
+
routine_run?: string | undefined;
|
|
428
|
+
};
|
|
429
|
+
} | undefined;
|
|
430
|
+
}>;
|
|
431
|
+
/** Active durable workflow work available to the viewer. */
|
|
432
|
+
export interface WorkflowWorkItemList {
|
|
433
|
+
/** Opaque cursor for the next page, or null at the end. */
|
|
434
|
+
after_cursor?: string | undefined;
|
|
435
|
+
/** Always null because queue pagination is forward-only. */
|
|
436
|
+
before_cursor?: string | undefined;
|
|
437
|
+
/** Active work items. Lease tokens are intentionally never included in list responses. */
|
|
438
|
+
data: WorkflowWorkItem[];
|
|
439
|
+
/** Whether another page of work exists. */
|
|
440
|
+
has_more: boolean;
|
|
441
|
+
}
|
|
442
|
+
/** Runtime validator for {@link WorkflowWorkItemList}. */
|
|
443
|
+
export declare const workflowWorkItemListSchema: z.ZodObject<{
|
|
444
|
+
/** Opaque cursor for the next page, or null at the end. */
|
|
445
|
+
after_cursor: z.ZodOptional<z.ZodString>;
|
|
446
|
+
/** Always null because queue pagination is forward-only. */
|
|
447
|
+
before_cursor: z.ZodOptional<z.ZodString>;
|
|
448
|
+
/** Active work items. Lease tokens are intentionally never included in list responses. */
|
|
449
|
+
data: z.ZodArray<z.ZodObject<{
|
|
450
|
+
/** Agent assigned to execute this work. */
|
|
451
|
+
agent: z.ZodString;
|
|
452
|
+
/** Number of times this work has been freshly claimed or reclaimed. */
|
|
453
|
+
attempt_count: z.ZodNumber;
|
|
454
|
+
/** Opaque journal command identity used to resume the workflow exactly once. */
|
|
455
|
+
command_id: z.ZodString;
|
|
456
|
+
created_at: z.ZodString;
|
|
457
|
+
/** Durable workflow execution that owns this work. */
|
|
458
|
+
execution: z.ZodString;
|
|
459
|
+
/** Work item ID (`wdi_...`). */
|
|
460
|
+
id: z.ZodString;
|
|
461
|
+
/** When the current claim expires. Null for queued or terminal work. */
|
|
462
|
+
lease_expires_at: z.ZodOptional<z.ZodString>;
|
|
463
|
+
/** Workflow graph node that yielded the work. */
|
|
464
|
+
node_id: z.ZodString;
|
|
465
|
+
/** Instructions and participant bindings needed to execute the work. */
|
|
466
|
+
payload: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
|
|
467
|
+
/** Routine run that owns the execution, when this work came from a routine. */
|
|
468
|
+
routine_run: z.ZodOptional<z.ZodString>;
|
|
469
|
+
/** Current queue lifecycle status. */
|
|
470
|
+
status: z.ZodString;
|
|
471
|
+
/** Stable resource discriminator. Always `workflow_work_item`. */
|
|
472
|
+
type: z.ZodString;
|
|
473
|
+
updated_at: z.ZodString;
|
|
474
|
+
}, "strip", z.ZodTypeAny, {
|
|
475
|
+
agent: string;
|
|
476
|
+
type: string;
|
|
477
|
+
status: string;
|
|
478
|
+
payload: Record<string, {} | null>;
|
|
479
|
+
created_at: string;
|
|
480
|
+
id: string;
|
|
481
|
+
updated_at: string;
|
|
482
|
+
command_id: string;
|
|
483
|
+
node_id: string;
|
|
484
|
+
attempt_count: number;
|
|
485
|
+
execution: string;
|
|
486
|
+
lease_expires_at?: string | undefined;
|
|
487
|
+
routine_run?: string | undefined;
|
|
488
|
+
}, {
|
|
489
|
+
agent: string;
|
|
490
|
+
type: string;
|
|
491
|
+
status: string;
|
|
492
|
+
payload: Record<string, {} | null>;
|
|
493
|
+
created_at: string;
|
|
494
|
+
id: string;
|
|
495
|
+
updated_at: string;
|
|
496
|
+
command_id: string;
|
|
497
|
+
node_id: string;
|
|
498
|
+
attempt_count: number;
|
|
499
|
+
execution: string;
|
|
500
|
+
lease_expires_at?: string | undefined;
|
|
501
|
+
routine_run?: string | undefined;
|
|
502
|
+
}>, "many">;
|
|
503
|
+
/** Whether another page of work exists. */
|
|
504
|
+
has_more: z.ZodBoolean;
|
|
505
|
+
}, "strip", z.ZodTypeAny, {
|
|
506
|
+
data: {
|
|
507
|
+
agent: string;
|
|
508
|
+
type: string;
|
|
509
|
+
status: string;
|
|
510
|
+
payload: Record<string, {} | null>;
|
|
511
|
+
created_at: string;
|
|
512
|
+
id: string;
|
|
513
|
+
updated_at: string;
|
|
514
|
+
command_id: string;
|
|
515
|
+
node_id: string;
|
|
516
|
+
attempt_count: number;
|
|
517
|
+
execution: string;
|
|
518
|
+
lease_expires_at?: string | undefined;
|
|
519
|
+
routine_run?: string | undefined;
|
|
520
|
+
}[];
|
|
521
|
+
has_more: boolean;
|
|
522
|
+
before_cursor?: string | undefined;
|
|
523
|
+
after_cursor?: string | undefined;
|
|
524
|
+
}, {
|
|
525
|
+
data: {
|
|
526
|
+
agent: string;
|
|
527
|
+
type: string;
|
|
528
|
+
status: string;
|
|
529
|
+
payload: Record<string, {} | null>;
|
|
530
|
+
created_at: string;
|
|
531
|
+
id: string;
|
|
532
|
+
updated_at: string;
|
|
533
|
+
command_id: string;
|
|
534
|
+
node_id: string;
|
|
535
|
+
attempt_count: number;
|
|
536
|
+
execution: string;
|
|
537
|
+
lease_expires_at?: string | undefined;
|
|
538
|
+
routine_run?: string | undefined;
|
|
539
|
+
}[];
|
|
540
|
+
has_more: boolean;
|
|
541
|
+
before_cursor?: string | undefined;
|
|
542
|
+
after_cursor?: string | undefined;
|
|
543
|
+
}>;
|
|
544
|
+
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/types/workflows.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sEAAsE;AACtE,MAAM,WAAW,oBAAoB;IACnC,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,yGAAyG;IACzG,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,wFAAwF;IACxF,IAAI,EAAE,MAAM,C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AA+D;;YAtC/D,2CAA2C;;YAE3C,uEAAuE;;YAEvE,gFAAgF;;;YAGhF,sDAAsD;;YAEtD,gCAAgC;;YAEhC,wEAAwE;;YAExE,iDAAiD;;YAEjD,wEAAwE;;YAExE,+EAA+E;;YAE/E,sCAAsC;;YAEtC,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B+C,CAAC;AAEpH,4DAA4D;AAC5D,MAAM,WAAW,oBAAoB;IACnC,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,4DAA4D;IAC5D,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,0FAA0F;IAC1F,IAAI,EAAE,gBAAgB,EAAE,CAAC;IACzB,2CAA2C;IAC3C,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B;IACrC,2DAA2D;;IAE3D,4DAA4D;;IAE5D,0FAA0F;;QAxE1F,2CAA2C;;QAE3C,uEAAuE;;QAEvE,gFAAgF;;;QAGhF,sDAAsD;;QAEtD,gCAAgC;;QAEhC,wEAAwE;;QAExE,iDAAiD;;QAEjD,wEAAwE;;QAExE,+EAA+E;;QAE/E,sCAAsC;;QAEtC,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqDlE,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEiE,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
|
|
2
|
+
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
+
// Content hash: 2cf2247d02d7
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
/** Runtime validator for {@link WorkflowJournalEntry}. */
|
|
6
|
+
export const workflowJournalEntrySchema = z.object({
|
|
7
|
+
/** Durable command identifier associated with the record, when present. */
|
|
8
|
+
command_id: z.string().optional().describe("Durable command identifier associated with the record, when present."),
|
|
9
|
+
/** When this entry was durably committed. */
|
|
10
|
+
created_at: z.string().optional().describe("When this entry was durably committed."),
|
|
11
|
+
/** Journal entry ID (`wdr_...`). */
|
|
12
|
+
id: z.string().describe("Journal entry ID (`wdr_...`)."),
|
|
13
|
+
/** Workflow node associated with the record. `null` for execution-level records. */
|
|
14
|
+
node_id: z.string().optional().describe("Workflow node associated with the record. `null` for execution-level records."),
|
|
15
|
+
/** Replayable workflow record body, including payload, context, environment, metadata, and timestamp. */
|
|
16
|
+
record: z.record(z.custom((value) => value !== undefined)).describe("Replayable workflow record body, including payload, context, environment, metadata, and timestamp."),
|
|
17
|
+
/** Monotonically increasing sequence within the journal. */
|
|
18
|
+
sequence: z.number().int().describe("Monotonically increasing sequence within the journal."),
|
|
19
|
+
/** Durable timer identifier associated with the record, when present. */
|
|
20
|
+
timer_id: z.string().optional().describe("Durable timer identifier associated with the record, when present."),
|
|
21
|
+
/** Workflow record type, such as `node_started`, `node_completed`, or `node_failed`. */
|
|
22
|
+
type: z.string().describe("Workflow record type, such as `node_started`, `node_completed`, or `node_failed`."),
|
|
23
|
+
}).describe("One ordered, replayable record from a durable workflow journal.");
|
|
24
|
+
/** Runtime validator for {@link WorkflowJournal}. */
|
|
25
|
+
export const workflowJournalSchema = z.object({
|
|
26
|
+
/** When durable workflow execution reached a terminal state. `null` while it is active. */
|
|
27
|
+
completed_at: z.string().optional().describe("When durable workflow execution reached a terminal state. `null` while it is active."),
|
|
28
|
+
/** When the journal was created. */
|
|
29
|
+
created_at: z.string().optional().describe("When the journal was created."),
|
|
30
|
+
/** Highest workflow record sequence durably committed to this journal. */
|
|
31
|
+
current_sequence: z.number().int().describe("Highest workflow record sequence durably committed to this journal."),
|
|
32
|
+
/** Journal execution ID (`wde_...`). */
|
|
33
|
+
id: z.string().describe("Journal execution ID (`wde_...`)."),
|
|
34
|
+
/** When durable workflow execution started. */
|
|
35
|
+
started_at: z.string().optional().describe("When durable workflow execution started."),
|
|
36
|
+
/** Current durable execution status: `pending`, `running`, `waiting`, `completed`, `failed`, or `cancelled`. */
|
|
37
|
+
status: z.string().describe("Current durable execution status: `pending`, `running`, `waiting`, `completed`, `failed`, or `cancelled`."),
|
|
38
|
+
/** When the journal was last updated. */
|
|
39
|
+
updated_at: z.string().optional().describe("When the journal was last updated."),
|
|
40
|
+
}).describe("Summary of the durable workflow execution journal associated with a run.");
|
|
41
|
+
/** Runtime validator for {@link WorkflowWorkItem}. */
|
|
42
|
+
export const workflowWorkItemSchema = z.object({
|
|
43
|
+
/** Agent assigned to execute this work. */
|
|
44
|
+
agent: z.string().describe("Agent assigned to execute this work."),
|
|
45
|
+
/** Number of times this work has been freshly claimed or reclaimed. */
|
|
46
|
+
attempt_count: z.number().int().describe("Number of times this work has been freshly claimed or reclaimed."),
|
|
47
|
+
/** Opaque journal command identity used to resume the workflow exactly once. */
|
|
48
|
+
command_id: z.string().describe("Opaque journal command identity used to resume the workflow exactly once."),
|
|
49
|
+
created_at: z.string(),
|
|
50
|
+
/** Durable workflow execution that owns this work. */
|
|
51
|
+
execution: z.string().describe("Durable workflow execution that owns this work."),
|
|
52
|
+
/** Work item ID (`wdi_...`). */
|
|
53
|
+
id: z.string().describe("Work item ID (`wdi_...`)."),
|
|
54
|
+
/** When the current claim expires. Null for queued or terminal work. */
|
|
55
|
+
lease_expires_at: z.string().optional().describe("When the current claim expires. Null for queued or terminal work."),
|
|
56
|
+
/** Workflow graph node that yielded the work. */
|
|
57
|
+
node_id: z.string().describe("Workflow graph node that yielded the work."),
|
|
58
|
+
/** Instructions and participant bindings needed to execute the work. */
|
|
59
|
+
payload: z.record(z.custom((value) => value !== undefined)).describe("Instructions and participant bindings needed to execute the work."),
|
|
60
|
+
/** Routine run that owns the execution, when this work came from a routine. */
|
|
61
|
+
routine_run: z.string().optional().describe("Routine run that owns the execution, when this work came from a routine."),
|
|
62
|
+
/** Current queue lifecycle status. */
|
|
63
|
+
status: z.string().describe("Current queue lifecycle status."),
|
|
64
|
+
/** Stable resource discriminator. Always `workflow_work_item`. */
|
|
65
|
+
type: z.string().describe("Stable resource discriminator. Always `workflow_work_item`."),
|
|
66
|
+
updated_at: z.string(),
|
|
67
|
+
}).describe("Externally executable work yielded by a durable workflow.");
|
|
68
|
+
/** Runtime validator for {@link WorkflowWorkItemLease}. */
|
|
69
|
+
export const workflowWorkItemLeaseSchema = z.object({
|
|
70
|
+
/** Opaque lease token that must be persisted and presented for later transitions. */
|
|
71
|
+
lease_owner: z.string().describe("Opaque lease token that must be persisted and presented for later transitions."),
|
|
72
|
+
/** The claimed, resumed, started, or heartbeated work item. */
|
|
73
|
+
work_item: workflowWorkItemSchema.describe("The claimed, resumed, started, or heartbeated work item."),
|
|
74
|
+
}).describe("A claimed workflow work item and its caller-held lease token.");
|
|
75
|
+
/** Runtime validator for {@link WorkflowWorkItemClaim}. */
|
|
76
|
+
export const workflowWorkItemClaimSchema = z.object({
|
|
77
|
+
/** Claimed or resumed work and its lease; null when no eligible item exists. */
|
|
78
|
+
data: workflowWorkItemLeaseSchema.optional().describe("Claimed or resumed work and its lease; null when no eligible item exists."),
|
|
79
|
+
}).describe("Result of polling an agent's durable workflow work queue.");
|
|
80
|
+
/** Runtime validator for {@link WorkflowWorkItemList}. */
|
|
81
|
+
export const workflowWorkItemListSchema = z.object({
|
|
82
|
+
/** Opaque cursor for the next page, or null at the end. */
|
|
83
|
+
after_cursor: z.string().optional().describe("Opaque cursor for the next page, or null at the end."),
|
|
84
|
+
/** Always null because queue pagination is forward-only. */
|
|
85
|
+
before_cursor: z.string().optional().describe("Always null because queue pagination is forward-only."),
|
|
86
|
+
/** Active work items. Lease tokens are intentionally never included in list responses. */
|
|
87
|
+
data: z.array(workflowWorkItemSchema).describe("Active work items. Lease tokens are intentionally never included in list responses."),
|
|
88
|
+
/** Whether another page of work exists. */
|
|
89
|
+
has_more: z.boolean().describe("Whether another page of work exists."),
|
|
90
|
+
}).describe("Active durable workflow work available to the viewer.");
|
|
91
|
+
//# sourceMappingURL=workflows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/types/workflows.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAE7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,0DAA0D;AAC1D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,2EAA2E;IAC3E,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sEAAsE,CAAC;IAClH,6CAA6C;IAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;IACpF,oCAAoC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IACxD,oFAAoF;IACpF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+EAA+E,CAAC;IACxH,yGAAyG;IACzG,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAY,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,oGAAoG,CAAC;IACpL,4DAA4D;IAC5D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IAC5F,yEAAyE;IACzE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oEAAoE,CAAC;IAC9G,wFAAwF;IACxF,I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