@heynixie/contract 0.75.0 → 0.77.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/contract/approval-contract.d.ts +0 -4
- package/dist/contract/build-query-utils.d.ts +579 -116
- package/dist/contract/clip-record-payloads.d.ts +2 -0
- package/dist/contract/clipped-payload-schema.d.ts +11 -0
- package/dist/contract/contract.d.ts +814 -139
- package/dist/contract/definition-notice-schema.d.ts +24 -0
- package/dist/contract/definitions-contract.d.ts +72 -0
- package/dist/contract/forgettable-kinds.d.ts +1 -1
- package/dist/contract/host-contract.d.ts +31 -2
- package/dist/contract/listed-task-schema.d.ts +91 -0
- package/dist/contract/memory-view-contract.d.ts +15 -45
- package/dist/contract/payload-clip-bytes.d.ts +1 -0
- package/dist/contract/read-payload-contract.d.ts +29 -0
- package/dist/contract/schedule-schema.d.ts +31 -0
- package/dist/contract/sequence-schema.d.ts +2 -0
- package/dist/contract/thread-schema.d.ts +2 -0
- package/dist/contract/tool-call-schema.d.ts +1 -0
- package/dist/contract/trigger-schema.d.ts +36 -0
- package/dist/contract/view-contract.d.ts +209 -0
- package/dist/contract/worker-view-schema.d.ts +37 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +1075 -639
- package/package.json +1 -1
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const skipReasonSchema: z.ZodEnum<{
|
|
3
|
+
catch_up_off: "catch_up_off";
|
|
4
|
+
still_running: "still_running";
|
|
5
|
+
task_held: "task_held";
|
|
6
|
+
too_late: "too_late";
|
|
7
|
+
window_closed: "window_closed";
|
|
8
|
+
}>;
|
|
9
|
+
export declare const viewContract: {
|
|
10
|
+
tasks: {
|
|
11
|
+
listEnded: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
12
|
+
limit: z.ZodInt;
|
|
13
|
+
before: z.ZodOptional<z.ZodInt>;
|
|
14
|
+
definitionID: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
16
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
17
|
+
actions: z.ZodObject<{
|
|
18
|
+
cancelled: z.ZodInt;
|
|
19
|
+
queued: z.ZodInt;
|
|
20
|
+
started: z.ZodInt;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
brief: z.ZodString;
|
|
23
|
+
closedBy: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
disposable: "disposable";
|
|
25
|
+
nixie: "nixie";
|
|
26
|
+
owner: "owner";
|
|
27
|
+
}>>;
|
|
28
|
+
controls: z.ZodArray<z.ZodEnum<{
|
|
29
|
+
close: "close";
|
|
30
|
+
interrupt: "interrupt";
|
|
31
|
+
pause: "pause";
|
|
32
|
+
restart: "restart";
|
|
33
|
+
resume: "resume";
|
|
34
|
+
stop: "stop";
|
|
35
|
+
}>>;
|
|
36
|
+
definitionID: z.ZodOptional<z.ZodString>;
|
|
37
|
+
disposable: z.ZodNullable<z.ZodBoolean>;
|
|
38
|
+
fire: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
39
|
+
scheduledFor: z.ZodString;
|
|
40
|
+
firedAt: z.ZodString;
|
|
41
|
+
isCatchUp: z.ZodBoolean;
|
|
42
|
+
}, z.core.$strip>>>;
|
|
43
|
+
isPauseRequested: z.ZodBoolean;
|
|
44
|
+
isPausedByNixie: z.ZodBoolean;
|
|
45
|
+
isTakingMessages: z.ZodBoolean;
|
|
46
|
+
lastActivityAt: z.ZodDate;
|
|
47
|
+
listedState: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
asleep: "asleep";
|
|
49
|
+
closed: "closed";
|
|
50
|
+
done: "done";
|
|
51
|
+
failed: "failed";
|
|
52
|
+
finished: "finished";
|
|
53
|
+
idle: "idle";
|
|
54
|
+
paused: "paused";
|
|
55
|
+
ready: "ready";
|
|
56
|
+
running: "running";
|
|
57
|
+
stopped: "stopped";
|
|
58
|
+
waiting: "waiting";
|
|
59
|
+
}>>;
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
nextRunAt: z.ZodOptional<z.ZodString>;
|
|
62
|
+
runner: z.ZodString;
|
|
63
|
+
state: z.ZodEnum<{
|
|
64
|
+
closed: "closed";
|
|
65
|
+
done: "done";
|
|
66
|
+
failed: "failed";
|
|
67
|
+
paused: "paused";
|
|
68
|
+
ready: "ready";
|
|
69
|
+
running: "running";
|
|
70
|
+
stopped: "stopped";
|
|
71
|
+
waiting: "waiting";
|
|
72
|
+
}>;
|
|
73
|
+
taskID: z.ZodString;
|
|
74
|
+
wakeable: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
waitingOn: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
78
|
+
runID: z.ZodString;
|
|
79
|
+
taskID: z.ZodString;
|
|
80
|
+
definitionID: z.ZodNullable<z.ZodString>;
|
|
81
|
+
startedAt: z.ZodDate;
|
|
82
|
+
endedAt: z.ZodDate;
|
|
83
|
+
sequence: z.ZodInt;
|
|
84
|
+
cause: z.ZodString;
|
|
85
|
+
endedBy: z.ZodString;
|
|
86
|
+
carriesRunID: z.ZodNullable<z.ZodString>;
|
|
87
|
+
reportID: z.ZodString;
|
|
88
|
+
delivery: z.ZodEnum<{
|
|
89
|
+
kept: "kept";
|
|
90
|
+
next_turn: "next_turn";
|
|
91
|
+
wake: "wake";
|
|
92
|
+
}>;
|
|
93
|
+
fire: z.ZodNullable<z.ZodObject<{
|
|
94
|
+
scheduledFor: z.ZodString;
|
|
95
|
+
firedAt: z.ZodString;
|
|
96
|
+
isCatchUp: z.ZodBoolean;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
used: z.ZodObject<{
|
|
99
|
+
turns: z.ZodNumber;
|
|
100
|
+
dollars: z.ZodNumber;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
next: z.ZodNullable<z.ZodInt>;
|
|
104
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
105
|
+
UNAUTHORIZED: {
|
|
106
|
+
message: string;
|
|
107
|
+
status: number;
|
|
108
|
+
};
|
|
109
|
+
}>, Record<never, never>>;
|
|
110
|
+
};
|
|
111
|
+
triggers: {
|
|
112
|
+
report: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
113
|
+
since: z.ZodString;
|
|
114
|
+
definitionID: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
116
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
117
|
+
definitionID: z.ZodString;
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
kind: z.ZodEnum<{
|
|
120
|
+
late: "late";
|
|
121
|
+
skipped: "skipped";
|
|
122
|
+
}>;
|
|
123
|
+
scheduledFor: z.ZodString;
|
|
124
|
+
firedAt: z.ZodNullable<z.ZodString>;
|
|
125
|
+
lateBySeconds: z.ZodNullable<z.ZodNumber>;
|
|
126
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
127
|
+
catch_up_off: "catch_up_off";
|
|
128
|
+
still_running: "still_running";
|
|
129
|
+
task_held: "task_held";
|
|
130
|
+
too_late: "too_late";
|
|
131
|
+
window_closed: "window_closed";
|
|
132
|
+
}>>;
|
|
133
|
+
sequence: z.ZodInt;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
136
|
+
UNAUTHORIZED: {
|
|
137
|
+
message: string;
|
|
138
|
+
status: number;
|
|
139
|
+
};
|
|
140
|
+
}>, Record<never, never>>;
|
|
141
|
+
};
|
|
142
|
+
definitions: {
|
|
143
|
+
listTasks: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
144
|
+
definitions: z.ZodArray<z.ZodObject<{
|
|
145
|
+
definitionID: z.ZodString;
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
enabled: z.ZodBoolean;
|
|
148
|
+
target: z.ZodEnum<{
|
|
149
|
+
conversation: "conversation";
|
|
150
|
+
task: "task";
|
|
151
|
+
}>;
|
|
152
|
+
trigger: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
153
|
+
schedule: z.ZodObject<{
|
|
154
|
+
every: z.ZodUnion<readonly [z.ZodEnum<{
|
|
155
|
+
day: "day";
|
|
156
|
+
hour: "hour";
|
|
157
|
+
week: "week";
|
|
158
|
+
}>, z.ZodObject<{
|
|
159
|
+
minutes: z.ZodInt;
|
|
160
|
+
}, z.core.$strict>]>;
|
|
161
|
+
at: z.ZodOptional<z.ZodString>;
|
|
162
|
+
on: z.ZodOptional<z.ZodEnum<{
|
|
163
|
+
fri: "fri";
|
|
164
|
+
mon: "mon";
|
|
165
|
+
sat: "sat";
|
|
166
|
+
sun: "sun";
|
|
167
|
+
thu: "thu";
|
|
168
|
+
tue: "tue";
|
|
169
|
+
wed: "wed";
|
|
170
|
+
}>>;
|
|
171
|
+
window: z.ZodOptional<z.ZodObject<{
|
|
172
|
+
from: z.ZodString;
|
|
173
|
+
until: z.ZodString;
|
|
174
|
+
}, z.core.$strict>>;
|
|
175
|
+
idleMinutes: z.ZodOptional<z.ZodInt>;
|
|
176
|
+
zone: z.ZodDefault<z.ZodString>;
|
|
177
|
+
catchUp: z.ZodDefault<z.ZodEnum<{
|
|
178
|
+
once: "once";
|
|
179
|
+
skip: "skip";
|
|
180
|
+
}>>;
|
|
181
|
+
}, z.core.$strict>;
|
|
182
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
183
|
+
at: z.ZodISODateTime;
|
|
184
|
+
}, z.core.$strict>]>>;
|
|
185
|
+
rendered: z.ZodNullable<z.ZodString>;
|
|
186
|
+
next: z.ZodNullable<z.ZodString>;
|
|
187
|
+
tools: z.ZodArray<z.ZodString>;
|
|
188
|
+
origin: z.ZodEnum<{
|
|
189
|
+
definitions: "definitions";
|
|
190
|
+
nixie: "nixie";
|
|
191
|
+
}>;
|
|
192
|
+
createdBy: z.ZodObject<{
|
|
193
|
+
sequence: z.ZodInt;
|
|
194
|
+
kind: z.ZodEnum<{
|
|
195
|
+
"definition.changed": "definition.changed";
|
|
196
|
+
definitions_seeded: "definitions_seeded";
|
|
197
|
+
}>;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
taskID: z.ZodNullable<z.ZodString>;
|
|
200
|
+
isUnreadable: z.ZodBoolean;
|
|
201
|
+
}, z.core.$strip>>;
|
|
202
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
203
|
+
UNAUTHORIZED: {
|
|
204
|
+
message: string;
|
|
205
|
+
status: number;
|
|
206
|
+
};
|
|
207
|
+
}>, Record<never, never>>;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const workerViewSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
phase: z.ZodLiteral<"started">;
|
|
4
|
+
workerRunID: z.ZodString;
|
|
5
|
+
shortID: z.ZodString;
|
|
6
|
+
callID: z.ZodString;
|
|
7
|
+
model: z.ZodString;
|
|
8
|
+
tools: z.ZodArray<z.ZodString>;
|
|
9
|
+
limits: z.ZodObject<{
|
|
10
|
+
minutes: z.ZodNumber;
|
|
11
|
+
turns: z.ZodNumber;
|
|
12
|
+
tokens: z.ZodNumber;
|
|
13
|
+
dollars: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
isTaskLimit: z.ZodBoolean;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
phase: z.ZodLiteral<"turn">;
|
|
18
|
+
workerRunID: z.ZodString;
|
|
19
|
+
callID: z.ZodString;
|
|
20
|
+
turn: z.ZodNumber;
|
|
21
|
+
tokens: z.ZodNumber;
|
|
22
|
+
dollars: z.ZodNumber;
|
|
23
|
+
text: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
phase: z.ZodLiteral<"ended">;
|
|
26
|
+
workerRunID: z.ZodString;
|
|
27
|
+
callID: z.ZodString;
|
|
28
|
+
outcome: z.ZodString;
|
|
29
|
+
limit: z.ZodOptional<z.ZodString>;
|
|
30
|
+
used: z.ZodObject<{
|
|
31
|
+
minutes: z.ZodNumber;
|
|
32
|
+
turns: z.ZodNumber;
|
|
33
|
+
tokens: z.ZodNumber;
|
|
34
|
+
dollars: z.ZodNumber;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>], "phase">;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,9 +5,19 @@ export { buildSpanState } from './span/build-span-state.js';
|
|
|
5
5
|
export { clientHeaderName } from './contract/client-header-name.js';
|
|
6
6
|
export { forgettableKinds } from './contract/forgettable-kinds.js';
|
|
7
7
|
export { contract } from './contract/contract.js';
|
|
8
|
+
export type { DefinitionNotice } from './contract/definition-notice-schema.js';
|
|
8
9
|
export { hostContract } from './contract/host-contract.js';
|
|
10
|
+
export { listedStateSchema, runFireSchema } from './contract/listed-task-schema.js';
|
|
11
|
+
export { workerViewSchema } from './contract/worker-view-schema.js';
|
|
12
|
+
export { clipRecordPayloads } from './contract/clip-record-payloads.js';
|
|
13
|
+
export { payloadClipBytes } from './contract/payload-clip-bytes.js';
|
|
9
14
|
export { imageLimits } from './contract/image-limits.js';
|
|
10
15
|
export { isTimeZone } from './contract/is-time-zone.js';
|
|
16
|
+
export type { Schedule } from './contract/schedule-schema.js';
|
|
17
|
+
export { scheduleSchema } from './contract/schedule-schema.js';
|
|
18
|
+
export type { Trigger } from './contract/trigger-schema.js';
|
|
19
|
+
export { triggerAtSchema, triggerSchema } from './contract/trigger-schema.js';
|
|
20
|
+
export { skipReasonSchema } from './contract/view-contract.js';
|
|
11
21
|
export { pickSpanSource } from './span/pick-span-source.js';
|
|
12
22
|
export { renderSessionCookie } from './contract/render-session-cookie.js';
|
|
13
23
|
export { sessionCookieName } from './contract/session-cookie-name.js';
|