@heynixie/contract 0.57.0 → 0.58.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/build-query-utils.d.ts +162 -0
- package/dist/contract.d.ts +231 -0
- package/dist/index.js +35 -2
- package/package.json +1 -1
|
@@ -14,6 +14,14 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
14
14
|
preTokens: number;
|
|
15
15
|
trigger: "auto" | "manual";
|
|
16
16
|
} | undefined;
|
|
17
|
+
exchangeNotice?: {
|
|
18
|
+
link: {
|
|
19
|
+
label: string;
|
|
20
|
+
messageID: string;
|
|
21
|
+
taskID: string;
|
|
22
|
+
};
|
|
23
|
+
text: string;
|
|
24
|
+
} | undefined;
|
|
17
25
|
compactionFailure?: {
|
|
18
26
|
failures: number;
|
|
19
27
|
} | undefined;
|
|
@@ -66,6 +74,12 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
66
74
|
taskID: string;
|
|
67
75
|
} | undefined;
|
|
68
76
|
sequence: number;
|
|
77
|
+
stop?: {
|
|
78
|
+
cancelledActions: {
|
|
79
|
+
actionID: string;
|
|
80
|
+
tool: string;
|
|
81
|
+
}[];
|
|
82
|
+
} | undefined;
|
|
69
83
|
summary?: {
|
|
70
84
|
contextSize?: number | undefined;
|
|
71
85
|
summaryTokens: number;
|
|
@@ -81,6 +95,17 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
81
95
|
stepKey?: string | undefined;
|
|
82
96
|
taskID: string;
|
|
83
97
|
} | undefined;
|
|
98
|
+
taskMessage?: {
|
|
99
|
+
from: string;
|
|
100
|
+
fromName: string;
|
|
101
|
+
hop: number;
|
|
102
|
+
kind: string;
|
|
103
|
+
messageID: string;
|
|
104
|
+
replyTo?: string | undefined;
|
|
105
|
+
text?: string | undefined;
|
|
106
|
+
to: string;
|
|
107
|
+
woke: boolean;
|
|
108
|
+
} | undefined;
|
|
84
109
|
toolCall?: {
|
|
85
110
|
callID: string;
|
|
86
111
|
content?: Record<string, unknown> | undefined;
|
|
@@ -95,6 +120,14 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
95
120
|
preTokens: number;
|
|
96
121
|
trigger: "auto" | "manual";
|
|
97
122
|
} | undefined;
|
|
123
|
+
exchangeNotice?: {
|
|
124
|
+
link: {
|
|
125
|
+
label: string;
|
|
126
|
+
messageID: string;
|
|
127
|
+
taskID: string;
|
|
128
|
+
};
|
|
129
|
+
text: string;
|
|
130
|
+
} | undefined;
|
|
98
131
|
compactionFailure?: {
|
|
99
132
|
failures: number;
|
|
100
133
|
} | undefined;
|
|
@@ -147,6 +180,12 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
147
180
|
taskID: string;
|
|
148
181
|
} | undefined;
|
|
149
182
|
sequence: number;
|
|
183
|
+
stop?: {
|
|
184
|
+
cancelledActions: {
|
|
185
|
+
actionID: string;
|
|
186
|
+
tool: string;
|
|
187
|
+
}[];
|
|
188
|
+
} | undefined;
|
|
150
189
|
summary?: {
|
|
151
190
|
contextSize?: number | undefined;
|
|
152
191
|
summaryTokens: number;
|
|
@@ -162,6 +201,17 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
162
201
|
stepKey?: string | undefined;
|
|
163
202
|
taskID: string;
|
|
164
203
|
} | undefined;
|
|
204
|
+
taskMessage?: {
|
|
205
|
+
from: string;
|
|
206
|
+
fromName: string;
|
|
207
|
+
hop: number;
|
|
208
|
+
kind: string;
|
|
209
|
+
messageID: string;
|
|
210
|
+
replyTo?: string | undefined;
|
|
211
|
+
text?: string | undefined;
|
|
212
|
+
to: string;
|
|
213
|
+
woke: boolean;
|
|
214
|
+
} | undefined;
|
|
165
215
|
toolCall?: {
|
|
166
216
|
callID: string;
|
|
167
217
|
content?: Record<string, unknown> | undefined;
|
|
@@ -343,14 +393,22 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
343
393
|
} & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
344
394
|
tasks: {
|
|
345
395
|
list: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, unknown, {
|
|
396
|
+
readAtSequence: number;
|
|
346
397
|
tasks: {
|
|
398
|
+
actions: {
|
|
399
|
+
cancelled: number;
|
|
400
|
+
queued: number;
|
|
401
|
+
started: number;
|
|
402
|
+
};
|
|
347
403
|
brief: string;
|
|
404
|
+
controls: ("close" | "interrupt" | "pause" | "restart" | "resume" | "stop")[];
|
|
348
405
|
isPauseRequested: boolean;
|
|
349
406
|
isTakingMessages: boolean;
|
|
350
407
|
lastActivityAt: Date;
|
|
351
408
|
name: string;
|
|
352
409
|
state: "closed" | "done" | "failed" | "paused" | "ready" | "running" | "stopped" | "waiting";
|
|
353
410
|
taskID: string;
|
|
411
|
+
waitingOn?: string | undefined;
|
|
354
412
|
}[];
|
|
355
413
|
}, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
356
414
|
UNAUTHORIZED: {
|
|
@@ -358,6 +416,60 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
358
416
|
status: number;
|
|
359
417
|
};
|
|
360
418
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
419
|
+
read: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
|
|
420
|
+
taskID: string;
|
|
421
|
+
}, {
|
|
422
|
+
actions: {
|
|
423
|
+
cancelled: number;
|
|
424
|
+
queued: number;
|
|
425
|
+
started: number;
|
|
426
|
+
};
|
|
427
|
+
brief: string;
|
|
428
|
+
controls: ("close" | "interrupt" | "pause" | "restart" | "resume" | "stop")[];
|
|
429
|
+
isPauseRequested: boolean;
|
|
430
|
+
isTakingMessages: boolean;
|
|
431
|
+
lastActivityAt: Date;
|
|
432
|
+
name: string;
|
|
433
|
+
state: "closed" | "done" | "failed" | "paused" | "ready" | "running" | "stopped" | "waiting";
|
|
434
|
+
taskID: string;
|
|
435
|
+
waitingOn?: string | undefined;
|
|
436
|
+
}, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
437
|
+
UNAUTHORIZED: {
|
|
438
|
+
message: string;
|
|
439
|
+
status: number;
|
|
440
|
+
};
|
|
441
|
+
}>, {
|
|
442
|
+
TASK_NOT_FOUND: {
|
|
443
|
+
message: string;
|
|
444
|
+
status: number;
|
|
445
|
+
};
|
|
446
|
+
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
447
|
+
taskID: string;
|
|
448
|
+
}>;
|
|
449
|
+
readActions: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
|
|
450
|
+
taskID: string;
|
|
451
|
+
}, {
|
|
452
|
+
queued: {
|
|
453
|
+
actionID: string;
|
|
454
|
+
tool: string;
|
|
455
|
+
}[];
|
|
456
|
+
started: {
|
|
457
|
+
actionID: string;
|
|
458
|
+
tool: string;
|
|
459
|
+
}[];
|
|
460
|
+
}, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
461
|
+
UNAUTHORIZED: {
|
|
462
|
+
message: string;
|
|
463
|
+
status: number;
|
|
464
|
+
};
|
|
465
|
+
}>, {
|
|
466
|
+
TASK_NOT_FOUND: {
|
|
467
|
+
message: string;
|
|
468
|
+
status: number;
|
|
469
|
+
};
|
|
470
|
+
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
471
|
+
taskID: string;
|
|
472
|
+
}>;
|
|
361
473
|
pause: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
|
|
362
474
|
clientActionID: string;
|
|
363
475
|
taskID: string;
|
|
@@ -1952,6 +2064,14 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
1952
2064
|
preTokens: number;
|
|
1953
2065
|
trigger: "auto" | "manual";
|
|
1954
2066
|
} | undefined;
|
|
2067
|
+
exchangeNotice?: {
|
|
2068
|
+
link: {
|
|
2069
|
+
label: string;
|
|
2070
|
+
messageID: string;
|
|
2071
|
+
taskID: string;
|
|
2072
|
+
};
|
|
2073
|
+
text: string;
|
|
2074
|
+
} | undefined;
|
|
1955
2075
|
compactionFailure?: {
|
|
1956
2076
|
failures: number;
|
|
1957
2077
|
} | undefined;
|
|
@@ -2004,6 +2124,12 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2004
2124
|
taskID: string;
|
|
2005
2125
|
} | undefined;
|
|
2006
2126
|
sequence: number;
|
|
2127
|
+
stop?: {
|
|
2128
|
+
cancelledActions: {
|
|
2129
|
+
actionID: string;
|
|
2130
|
+
tool: string;
|
|
2131
|
+
}[];
|
|
2132
|
+
} | undefined;
|
|
2007
2133
|
summary?: {
|
|
2008
2134
|
contextSize?: number | undefined;
|
|
2009
2135
|
summaryTokens: number;
|
|
@@ -2019,6 +2145,17 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2019
2145
|
stepKey?: string | undefined;
|
|
2020
2146
|
taskID: string;
|
|
2021
2147
|
} | undefined;
|
|
2148
|
+
taskMessage?: {
|
|
2149
|
+
from: string;
|
|
2150
|
+
fromName: string;
|
|
2151
|
+
hop: number;
|
|
2152
|
+
kind: string;
|
|
2153
|
+
messageID: string;
|
|
2154
|
+
replyTo?: string | undefined;
|
|
2155
|
+
text?: string | undefined;
|
|
2156
|
+
to: string;
|
|
2157
|
+
woke: boolean;
|
|
2158
|
+
} | undefined;
|
|
2022
2159
|
toolCall?: {
|
|
2023
2160
|
callID: string;
|
|
2024
2161
|
content?: Record<string, unknown> | undefined;
|
|
@@ -2048,6 +2185,14 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2048
2185
|
preTokens: number;
|
|
2049
2186
|
trigger: "auto" | "manual";
|
|
2050
2187
|
} | undefined;
|
|
2188
|
+
exchangeNotice?: {
|
|
2189
|
+
link: {
|
|
2190
|
+
label: string;
|
|
2191
|
+
messageID: string;
|
|
2192
|
+
taskID: string;
|
|
2193
|
+
};
|
|
2194
|
+
text: string;
|
|
2195
|
+
} | undefined;
|
|
2051
2196
|
compactionFailure?: {
|
|
2052
2197
|
failures: number;
|
|
2053
2198
|
} | undefined;
|
|
@@ -2100,6 +2245,12 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2100
2245
|
taskID: string;
|
|
2101
2246
|
} | undefined;
|
|
2102
2247
|
sequence: number;
|
|
2248
|
+
stop?: {
|
|
2249
|
+
cancelledActions: {
|
|
2250
|
+
actionID: string;
|
|
2251
|
+
tool: string;
|
|
2252
|
+
}[];
|
|
2253
|
+
} | undefined;
|
|
2103
2254
|
summary?: {
|
|
2104
2255
|
contextSize?: number | undefined;
|
|
2105
2256
|
summaryTokens: number;
|
|
@@ -2115,6 +2266,17 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2115
2266
|
stepKey?: string | undefined;
|
|
2116
2267
|
taskID: string;
|
|
2117
2268
|
} | undefined;
|
|
2269
|
+
taskMessage?: {
|
|
2270
|
+
from: string;
|
|
2271
|
+
fromName: string;
|
|
2272
|
+
hop: number;
|
|
2273
|
+
kind: string;
|
|
2274
|
+
messageID: string;
|
|
2275
|
+
replyTo?: string | undefined;
|
|
2276
|
+
text?: string | undefined;
|
|
2277
|
+
to: string;
|
|
2278
|
+
woke: boolean;
|
|
2279
|
+
} | undefined;
|
|
2118
2280
|
toolCall?: {
|
|
2119
2281
|
callID: string;
|
|
2120
2282
|
content?: Record<string, unknown> | undefined;
|
package/dist/contract.d.ts
CHANGED
|
@@ -17,6 +17,14 @@ export declare const contract: {
|
|
|
17
17
|
manual: "manual";
|
|
18
18
|
}>;
|
|
19
19
|
}, z.core.$strip>>;
|
|
20
|
+
exchangeNotice: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
link: z.ZodObject<{
|
|
22
|
+
label: z.ZodString;
|
|
23
|
+
messageID: z.ZodString;
|
|
24
|
+
taskID: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
text: z.ZodString;
|
|
27
|
+
}, z.core.$strip>>;
|
|
20
28
|
compactionFailure: z.ZodOptional<z.ZodObject<{
|
|
21
29
|
failures: z.ZodInt;
|
|
22
30
|
}, z.core.$strip>>;
|
|
@@ -83,6 +91,12 @@ export declare const contract: {
|
|
|
83
91
|
taskID: z.ZodString;
|
|
84
92
|
}, z.core.$strip>>;
|
|
85
93
|
sequence: z.ZodInt;
|
|
94
|
+
stop: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
cancelledActions: z.ZodArray<z.ZodObject<{
|
|
96
|
+
actionID: z.ZodString;
|
|
97
|
+
tool: z.ZodString;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
86
100
|
summary: z.ZodOptional<z.ZodObject<{
|
|
87
101
|
contextSize: z.ZodOptional<z.ZodInt>;
|
|
88
102
|
summaryTokens: z.ZodInt;
|
|
@@ -101,6 +115,17 @@ export declare const contract: {
|
|
|
101
115
|
stepKey: z.ZodOptional<z.ZodString>;
|
|
102
116
|
taskID: z.ZodString;
|
|
103
117
|
}, z.core.$strip>>;
|
|
118
|
+
taskMessage: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
from: z.ZodString;
|
|
120
|
+
fromName: z.ZodString;
|
|
121
|
+
hop: z.ZodInt;
|
|
122
|
+
kind: z.ZodString;
|
|
123
|
+
messageID: z.ZodString;
|
|
124
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
|
125
|
+
text: z.ZodOptional<z.ZodString>;
|
|
126
|
+
to: z.ZodString;
|
|
127
|
+
woke: z.ZodBoolean;
|
|
128
|
+
}, z.core.$strip>>;
|
|
104
129
|
toolCall: z.ZodOptional<z.ZodObject<{
|
|
105
130
|
callID: z.ZodString;
|
|
106
131
|
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -118,6 +143,14 @@ export declare const contract: {
|
|
|
118
143
|
manual: "manual";
|
|
119
144
|
}>;
|
|
120
145
|
}, z.core.$strip>>;
|
|
146
|
+
exchangeNotice: z.ZodOptional<z.ZodObject<{
|
|
147
|
+
link: z.ZodObject<{
|
|
148
|
+
label: z.ZodString;
|
|
149
|
+
messageID: z.ZodString;
|
|
150
|
+
taskID: z.ZodString;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
text: z.ZodString;
|
|
153
|
+
}, z.core.$strip>>;
|
|
121
154
|
compactionFailure: z.ZodOptional<z.ZodObject<{
|
|
122
155
|
failures: z.ZodInt;
|
|
123
156
|
}, z.core.$strip>>;
|
|
@@ -184,6 +217,12 @@ export declare const contract: {
|
|
|
184
217
|
taskID: z.ZodString;
|
|
185
218
|
}, z.core.$strip>>;
|
|
186
219
|
sequence: z.ZodInt;
|
|
220
|
+
stop: z.ZodOptional<z.ZodObject<{
|
|
221
|
+
cancelledActions: z.ZodArray<z.ZodObject<{
|
|
222
|
+
actionID: z.ZodString;
|
|
223
|
+
tool: z.ZodString;
|
|
224
|
+
}, z.core.$strip>>;
|
|
225
|
+
}, z.core.$strip>>;
|
|
187
226
|
summary: z.ZodOptional<z.ZodObject<{
|
|
188
227
|
contextSize: z.ZodOptional<z.ZodInt>;
|
|
189
228
|
summaryTokens: z.ZodInt;
|
|
@@ -202,6 +241,17 @@ export declare const contract: {
|
|
|
202
241
|
stepKey: z.ZodOptional<z.ZodString>;
|
|
203
242
|
taskID: z.ZodString;
|
|
204
243
|
}, z.core.$strip>>;
|
|
244
|
+
taskMessage: z.ZodOptional<z.ZodObject<{
|
|
245
|
+
from: z.ZodString;
|
|
246
|
+
fromName: z.ZodString;
|
|
247
|
+
hop: z.ZodInt;
|
|
248
|
+
kind: z.ZodString;
|
|
249
|
+
messageID: z.ZodString;
|
|
250
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
|
251
|
+
text: z.ZodOptional<z.ZodString>;
|
|
252
|
+
to: z.ZodString;
|
|
253
|
+
woke: z.ZodBoolean;
|
|
254
|
+
}, z.core.$strip>>;
|
|
205
255
|
toolCall: z.ZodOptional<z.ZodObject<{
|
|
206
256
|
callID: z.ZodString;
|
|
207
257
|
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -352,8 +402,22 @@ export declare const contract: {
|
|
|
352
402
|
};
|
|
353
403
|
tasks: {
|
|
354
404
|
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
405
|
+
readAtSequence: z.ZodInt;
|
|
355
406
|
tasks: z.ZodArray<z.ZodObject<{
|
|
407
|
+
actions: z.ZodObject<{
|
|
408
|
+
cancelled: z.ZodInt;
|
|
409
|
+
queued: z.ZodInt;
|
|
410
|
+
started: z.ZodInt;
|
|
411
|
+
}, z.core.$strip>;
|
|
356
412
|
brief: z.ZodString;
|
|
413
|
+
controls: z.ZodArray<z.ZodEnum<{
|
|
414
|
+
close: "close";
|
|
415
|
+
interrupt: "interrupt";
|
|
416
|
+
pause: "pause";
|
|
417
|
+
restart: "restart";
|
|
418
|
+
resume: "resume";
|
|
419
|
+
stop: "stop";
|
|
420
|
+
}>>;
|
|
357
421
|
isPauseRequested: z.ZodBoolean;
|
|
358
422
|
isTakingMessages: z.ZodBoolean;
|
|
359
423
|
lastActivityAt: z.ZodDate;
|
|
@@ -369,6 +433,7 @@ export declare const contract: {
|
|
|
369
433
|
waiting: "waiting";
|
|
370
434
|
}>;
|
|
371
435
|
taskID: z.ZodString;
|
|
436
|
+
waitingOn: z.ZodOptional<z.ZodString>;
|
|
372
437
|
}, z.core.$strip>>;
|
|
373
438
|
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
374
439
|
UNAUTHORIZED: {
|
|
@@ -376,6 +441,72 @@ export declare const contract: {
|
|
|
376
441
|
status: number;
|
|
377
442
|
};
|
|
378
443
|
}>, Record<never, never>>;
|
|
444
|
+
read: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
445
|
+
taskID: z.ZodString;
|
|
446
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
447
|
+
actions: z.ZodObject<{
|
|
448
|
+
cancelled: z.ZodInt;
|
|
449
|
+
queued: z.ZodInt;
|
|
450
|
+
started: z.ZodInt;
|
|
451
|
+
}, z.core.$strip>;
|
|
452
|
+
brief: z.ZodString;
|
|
453
|
+
controls: z.ZodArray<z.ZodEnum<{
|
|
454
|
+
close: "close";
|
|
455
|
+
interrupt: "interrupt";
|
|
456
|
+
pause: "pause";
|
|
457
|
+
restart: "restart";
|
|
458
|
+
resume: "resume";
|
|
459
|
+
stop: "stop";
|
|
460
|
+
}>>;
|
|
461
|
+
isPauseRequested: z.ZodBoolean;
|
|
462
|
+
isTakingMessages: z.ZodBoolean;
|
|
463
|
+
lastActivityAt: z.ZodDate;
|
|
464
|
+
name: z.ZodString;
|
|
465
|
+
state: z.ZodEnum<{
|
|
466
|
+
closed: "closed";
|
|
467
|
+
done: "done";
|
|
468
|
+
failed: "failed";
|
|
469
|
+
paused: "paused";
|
|
470
|
+
ready: "ready";
|
|
471
|
+
running: "running";
|
|
472
|
+
stopped: "stopped";
|
|
473
|
+
waiting: "waiting";
|
|
474
|
+
}>;
|
|
475
|
+
taskID: z.ZodString;
|
|
476
|
+
waitingOn: z.ZodOptional<z.ZodString>;
|
|
477
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
478
|
+
UNAUTHORIZED: {
|
|
479
|
+
message: string;
|
|
480
|
+
status: number;
|
|
481
|
+
};
|
|
482
|
+
}>, {
|
|
483
|
+
TASK_NOT_FOUND: {
|
|
484
|
+
message: string;
|
|
485
|
+
status: number;
|
|
486
|
+
};
|
|
487
|
+
}>, Record<never, never>>;
|
|
488
|
+
readActions: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
489
|
+
taskID: z.ZodString;
|
|
490
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
491
|
+
queued: z.ZodArray<z.ZodObject<{
|
|
492
|
+
actionID: z.ZodString;
|
|
493
|
+
tool: z.ZodString;
|
|
494
|
+
}, z.core.$strip>>;
|
|
495
|
+
started: z.ZodArray<z.ZodObject<{
|
|
496
|
+
actionID: z.ZodString;
|
|
497
|
+
tool: z.ZodString;
|
|
498
|
+
}, z.core.$strip>>;
|
|
499
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
500
|
+
UNAUTHORIZED: {
|
|
501
|
+
message: string;
|
|
502
|
+
status: number;
|
|
503
|
+
};
|
|
504
|
+
}>, {
|
|
505
|
+
TASK_NOT_FOUND: {
|
|
506
|
+
message: string;
|
|
507
|
+
status: number;
|
|
508
|
+
};
|
|
509
|
+
}>, Record<never, never>>;
|
|
379
510
|
pause: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
380
511
|
clientActionID: z.ZodUUID;
|
|
381
512
|
taskID: z.ZodString;
|
|
@@ -2257,6 +2388,14 @@ export declare const contract: {
|
|
|
2257
2388
|
preTokens: number;
|
|
2258
2389
|
trigger: "auto" | "manual";
|
|
2259
2390
|
} | undefined;
|
|
2391
|
+
exchangeNotice?: {
|
|
2392
|
+
link: {
|
|
2393
|
+
label: string;
|
|
2394
|
+
messageID: string;
|
|
2395
|
+
taskID: string;
|
|
2396
|
+
};
|
|
2397
|
+
text: string;
|
|
2398
|
+
} | undefined;
|
|
2260
2399
|
compactionFailure?: {
|
|
2261
2400
|
failures: number;
|
|
2262
2401
|
} | undefined;
|
|
@@ -2309,6 +2448,12 @@ export declare const contract: {
|
|
|
2309
2448
|
taskID: string;
|
|
2310
2449
|
} | undefined;
|
|
2311
2450
|
sequence: number;
|
|
2451
|
+
stop?: {
|
|
2452
|
+
cancelledActions: {
|
|
2453
|
+
actionID: string;
|
|
2454
|
+
tool: string;
|
|
2455
|
+
}[];
|
|
2456
|
+
} | undefined;
|
|
2312
2457
|
summary?: {
|
|
2313
2458
|
contextSize?: number | undefined;
|
|
2314
2459
|
summaryTokens: number;
|
|
@@ -2324,6 +2469,17 @@ export declare const contract: {
|
|
|
2324
2469
|
stepKey?: string | undefined;
|
|
2325
2470
|
taskID: string;
|
|
2326
2471
|
} | undefined;
|
|
2472
|
+
taskMessage?: {
|
|
2473
|
+
from: string;
|
|
2474
|
+
fromName: string;
|
|
2475
|
+
hop: number;
|
|
2476
|
+
kind: string;
|
|
2477
|
+
messageID: string;
|
|
2478
|
+
replyTo?: string | undefined;
|
|
2479
|
+
text?: string | undefined;
|
|
2480
|
+
to: string;
|
|
2481
|
+
woke: boolean;
|
|
2482
|
+
} | undefined;
|
|
2327
2483
|
toolCall?: {
|
|
2328
2484
|
callID: string;
|
|
2329
2485
|
content?: Record<string, unknown> | undefined;
|
|
@@ -2339,6 +2495,14 @@ export declare const contract: {
|
|
|
2339
2495
|
preTokens: number;
|
|
2340
2496
|
trigger: "auto" | "manual";
|
|
2341
2497
|
} | undefined;
|
|
2498
|
+
exchangeNotice?: {
|
|
2499
|
+
link: {
|
|
2500
|
+
label: string;
|
|
2501
|
+
messageID: string;
|
|
2502
|
+
taskID: string;
|
|
2503
|
+
};
|
|
2504
|
+
text: string;
|
|
2505
|
+
} | undefined;
|
|
2342
2506
|
compactionFailure?: {
|
|
2343
2507
|
failures: number;
|
|
2344
2508
|
} | undefined;
|
|
@@ -2391,6 +2555,12 @@ export declare const contract: {
|
|
|
2391
2555
|
taskID: string;
|
|
2392
2556
|
} | undefined;
|
|
2393
2557
|
sequence: number;
|
|
2558
|
+
stop?: {
|
|
2559
|
+
cancelledActions: {
|
|
2560
|
+
actionID: string;
|
|
2561
|
+
tool: string;
|
|
2562
|
+
}[];
|
|
2563
|
+
} | undefined;
|
|
2394
2564
|
summary?: {
|
|
2395
2565
|
contextSize?: number | undefined;
|
|
2396
2566
|
summaryTokens: number;
|
|
@@ -2406,6 +2576,17 @@ export declare const contract: {
|
|
|
2406
2576
|
stepKey?: string | undefined;
|
|
2407
2577
|
taskID: string;
|
|
2408
2578
|
} | undefined;
|
|
2579
|
+
taskMessage?: {
|
|
2580
|
+
from: string;
|
|
2581
|
+
fromName: string;
|
|
2582
|
+
hop: number;
|
|
2583
|
+
kind: string;
|
|
2584
|
+
messageID: string;
|
|
2585
|
+
replyTo?: string | undefined;
|
|
2586
|
+
text?: string | undefined;
|
|
2587
|
+
to: string;
|
|
2588
|
+
woke: boolean;
|
|
2589
|
+
} | undefined;
|
|
2409
2590
|
toolCall?: {
|
|
2410
2591
|
callID: string;
|
|
2411
2592
|
content?: Record<string, unknown> | undefined;
|
|
@@ -2432,6 +2613,14 @@ export declare const contract: {
|
|
|
2432
2613
|
preTokens: number;
|
|
2433
2614
|
trigger: "auto" | "manual";
|
|
2434
2615
|
} | undefined;
|
|
2616
|
+
exchangeNotice?: {
|
|
2617
|
+
link: {
|
|
2618
|
+
label: string;
|
|
2619
|
+
messageID: string;
|
|
2620
|
+
taskID: string;
|
|
2621
|
+
};
|
|
2622
|
+
text: string;
|
|
2623
|
+
} | undefined;
|
|
2435
2624
|
compactionFailure?: {
|
|
2436
2625
|
failures: number;
|
|
2437
2626
|
} | undefined;
|
|
@@ -2484,6 +2673,12 @@ export declare const contract: {
|
|
|
2484
2673
|
taskID: string;
|
|
2485
2674
|
} | undefined;
|
|
2486
2675
|
sequence: number;
|
|
2676
|
+
stop?: {
|
|
2677
|
+
cancelledActions: {
|
|
2678
|
+
actionID: string;
|
|
2679
|
+
tool: string;
|
|
2680
|
+
}[];
|
|
2681
|
+
} | undefined;
|
|
2487
2682
|
summary?: {
|
|
2488
2683
|
contextSize?: number | undefined;
|
|
2489
2684
|
summaryTokens: number;
|
|
@@ -2499,6 +2694,17 @@ export declare const contract: {
|
|
|
2499
2694
|
stepKey?: string | undefined;
|
|
2500
2695
|
taskID: string;
|
|
2501
2696
|
} | undefined;
|
|
2697
|
+
taskMessage?: {
|
|
2698
|
+
from: string;
|
|
2699
|
+
fromName: string;
|
|
2700
|
+
hop: number;
|
|
2701
|
+
kind: string;
|
|
2702
|
+
messageID: string;
|
|
2703
|
+
replyTo?: string | undefined;
|
|
2704
|
+
text?: string | undefined;
|
|
2705
|
+
to: string;
|
|
2706
|
+
woke: boolean;
|
|
2707
|
+
} | undefined;
|
|
2502
2708
|
toolCall?: {
|
|
2503
2709
|
callID: string;
|
|
2504
2710
|
content?: Record<string, unknown> | undefined;
|
|
@@ -2514,6 +2720,14 @@ export declare const contract: {
|
|
|
2514
2720
|
preTokens: number;
|
|
2515
2721
|
trigger: "auto" | "manual";
|
|
2516
2722
|
} | undefined;
|
|
2723
|
+
exchangeNotice?: {
|
|
2724
|
+
link: {
|
|
2725
|
+
label: string;
|
|
2726
|
+
messageID: string;
|
|
2727
|
+
taskID: string;
|
|
2728
|
+
};
|
|
2729
|
+
text: string;
|
|
2730
|
+
} | undefined;
|
|
2517
2731
|
compactionFailure?: {
|
|
2518
2732
|
failures: number;
|
|
2519
2733
|
} | undefined;
|
|
@@ -2566,6 +2780,12 @@ export declare const contract: {
|
|
|
2566
2780
|
taskID: string;
|
|
2567
2781
|
} | undefined;
|
|
2568
2782
|
sequence: number;
|
|
2783
|
+
stop?: {
|
|
2784
|
+
cancelledActions: {
|
|
2785
|
+
actionID: string;
|
|
2786
|
+
tool: string;
|
|
2787
|
+
}[];
|
|
2788
|
+
} | undefined;
|
|
2569
2789
|
summary?: {
|
|
2570
2790
|
contextSize?: number | undefined;
|
|
2571
2791
|
summaryTokens: number;
|
|
@@ -2581,6 +2801,17 @@ export declare const contract: {
|
|
|
2581
2801
|
stepKey?: string | undefined;
|
|
2582
2802
|
taskID: string;
|
|
2583
2803
|
} | undefined;
|
|
2804
|
+
taskMessage?: {
|
|
2805
|
+
from: string;
|
|
2806
|
+
fromName: string;
|
|
2807
|
+
hop: number;
|
|
2808
|
+
kind: string;
|
|
2809
|
+
messageID: string;
|
|
2810
|
+
replyTo?: string | undefined;
|
|
2811
|
+
text?: string | undefined;
|
|
2812
|
+
to: string;
|
|
2813
|
+
woke: boolean;
|
|
2814
|
+
} | undefined;
|
|
2584
2815
|
toolCall?: {
|
|
2585
2816
|
callID: string;
|
|
2586
2817
|
content?: Record<string, unknown> | undefined;
|
package/dist/index.js
CHANGED
|
@@ -677,8 +677,25 @@ var routeSchema = z9.object({
|
|
|
677
677
|
messages: z9.array(sequenceSchema),
|
|
678
678
|
taskID: threadSchema
|
|
679
679
|
});
|
|
680
|
+
var listedActionSchema = z9.object({ actionID: z9.string(), tool: z9.string() });
|
|
681
|
+
var taskMessageSchema = z9.object({
|
|
682
|
+
from: threadSchema,
|
|
683
|
+
fromName: z9.string(),
|
|
684
|
+
hop: z9.int().nonnegative(),
|
|
685
|
+
kind: z9.string(),
|
|
686
|
+
messageID: z9.string(),
|
|
687
|
+
replyTo: z9.string().optional(),
|
|
688
|
+
text: z9.string().optional(),
|
|
689
|
+
to: threadSchema,
|
|
690
|
+
woke: z9.boolean()
|
|
691
|
+
});
|
|
692
|
+
var exchangeNoticeSchema = z9.object({
|
|
693
|
+
link: z9.object({ label: z9.string(), messageID: z9.string(), taskID: threadSchema }),
|
|
694
|
+
text: z9.string()
|
|
695
|
+
});
|
|
680
696
|
var recordSchema = z9.object({
|
|
681
697
|
compaction: compactionSchema.optional(),
|
|
698
|
+
exchangeNotice: exchangeNoticeSchema.optional(),
|
|
682
699
|
compactionFailure: compactionFailureSchema.optional(),
|
|
683
700
|
forget: z9.object({ sequence: sequenceSchema }).optional(),
|
|
684
701
|
context: contextSchema.optional(),
|
|
@@ -695,9 +712,11 @@ var recordSchema = z9.object({
|
|
|
695
712
|
recordedAt: z9.date(),
|
|
696
713
|
route: routeSchema.optional(),
|
|
697
714
|
sequence: sequenceSchema,
|
|
715
|
+
stop: z9.object({ cancelledActions: z9.array(listedActionSchema) }).optional(),
|
|
698
716
|
summary: summarySchema.optional(),
|
|
699
717
|
thread: threadSchema,
|
|
700
718
|
task: taskSchema.optional(),
|
|
719
|
+
taskMessage: taskMessageSchema.optional(),
|
|
701
720
|
toolCall: toolCallSchema.optional()
|
|
702
721
|
});
|
|
703
722
|
var writerErrorSchema = z9.object({ at: z9.date(), code: z9.string(), message: z9.string().nullable() }).nullable();
|
|
@@ -730,14 +749,23 @@ var taskStateSchema = z9.enum([
|
|
|
730
749
|
"failed",
|
|
731
750
|
"closed"
|
|
732
751
|
]);
|
|
752
|
+
var taskControlSchema = z9.enum(["pause", "resume", "stop", "restart", "close", "interrupt"]);
|
|
753
|
+
var actionCountSchema = z9.int().nonnegative();
|
|
733
754
|
var listedTaskSchema = z9.object({
|
|
755
|
+
actions: z9.object({
|
|
756
|
+
cancelled: actionCountSchema,
|
|
757
|
+
queued: actionCountSchema,
|
|
758
|
+
started: actionCountSchema
|
|
759
|
+
}),
|
|
734
760
|
brief: z9.string(),
|
|
761
|
+
controls: z9.array(taskControlSchema),
|
|
735
762
|
isPauseRequested: z9.boolean(),
|
|
736
763
|
isTakingMessages: z9.boolean(),
|
|
737
764
|
lastActivityAt: z9.date(),
|
|
738
765
|
name: z9.string(),
|
|
739
766
|
state: taskStateSchema,
|
|
740
|
-
taskID: threadSchema
|
|
767
|
+
taskID: threadSchema,
|
|
768
|
+
waitingOn: threadSchema.optional()
|
|
741
769
|
});
|
|
742
770
|
var controlledTaskSchema = z9.object({
|
|
743
771
|
controlledAt: z9.date(),
|
|
@@ -808,7 +836,12 @@ var contract = {
|
|
|
808
836
|
})).output(z9.object({ movedAt: z9.date(), taskID: threadSchema }))
|
|
809
837
|
},
|
|
810
838
|
tasks: {
|
|
811
|
-
list: signedIn.output(z9.object({ tasks: z9.array(listedTaskSchema) })),
|
|
839
|
+
list: signedIn.output(z9.object({ readAtSequence: sequenceSchema, tasks: z9.array(listedTaskSchema) })),
|
|
840
|
+
read: signedIn.errors({ TASK_NOT_FOUND: { message: "No task has this ID", status: 404 } }).input(z9.object({ taskID: threadSchema })).output(listedTaskSchema),
|
|
841
|
+
readActions: signedIn.errors({ TASK_NOT_FOUND: { message: "No task has this ID", status: 404 } }).input(z9.object({ taskID: threadSchema })).output(z9.object({
|
|
842
|
+
queued: z9.array(listedActionSchema),
|
|
843
|
+
started: z9.array(listedActionSchema)
|
|
844
|
+
})),
|
|
812
845
|
pause: taskControl,
|
|
813
846
|
resume: taskControl,
|
|
814
847
|
stop: taskControl,
|