@heynixie/contract 0.78.0 → 0.80.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 +9 -0
- package/dist/contract/build-query-utils.d.ts +168 -8
- package/dist/contract/contract.d.ts +197 -12
- package/dist/contract/host-budgets-contract.d.ts +51 -0
- package/dist/contract/host-contract.d.ts +77 -2
- package/dist/contract/memory-view-contract.d.ts +3 -0
- package/dist/contract/reminders-contract.d.ts +74 -0
- package/dist/contract/rule-contract.d.ts +16 -0
- package/dist/contract/spend-stop-schema.d.ts +66 -0
- package/dist/contract/view-contract.d.ts +0 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +804 -667
- package/package.json +1 -1
|
@@ -42,7 +42,27 @@ export declare const hostContract: {
|
|
|
42
42
|
}>;
|
|
43
43
|
since: z.ZodDate;
|
|
44
44
|
}, z.core.$strip>>;
|
|
45
|
-
}, z.core.$strip>, Record<never, never>,
|
|
45
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
46
|
+
SPEND_STOP_STANDS: {
|
|
47
|
+
readonly message: 'Model spending is stopped, and nixie resumes when the stop clears';
|
|
48
|
+
readonly status: 409;
|
|
49
|
+
};
|
|
50
|
+
}>, Record<never, never>>;
|
|
51
|
+
};
|
|
52
|
+
spend: {
|
|
53
|
+
raise: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
54
|
+
turns: z.ZodInt;
|
|
55
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
56
|
+
start: z.ZodString;
|
|
57
|
+
dollars: z.ZodNumber;
|
|
58
|
+
tokens: z.ZodNumber;
|
|
59
|
+
turns: z.ZodNumber;
|
|
60
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
61
|
+
SPEND_NOT_CONFIGURED: {
|
|
62
|
+
message: string;
|
|
63
|
+
status: number;
|
|
64
|
+
};
|
|
65
|
+
}>, Record<never, never>>;
|
|
46
66
|
};
|
|
47
67
|
recovery: {
|
|
48
68
|
read: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
@@ -113,7 +133,7 @@ export declare const hostContract: {
|
|
|
113
133
|
waiting: "waiting";
|
|
114
134
|
}>;
|
|
115
135
|
isPauseRequested: z.ZodBoolean;
|
|
116
|
-
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
136
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
117
137
|
TASK_NOT_FOUND: {
|
|
118
138
|
message: string;
|
|
119
139
|
status: number;
|
|
@@ -126,6 +146,11 @@ export declare const hostContract: {
|
|
|
126
146
|
message: string;
|
|
127
147
|
status: number;
|
|
128
148
|
};
|
|
149
|
+
}>, {
|
|
150
|
+
SPEND_STOP_STANDS: {
|
|
151
|
+
readonly message: 'Model spending is stopped, and nixie resumes when the stop clears';
|
|
152
|
+
readonly status: 409;
|
|
153
|
+
};
|
|
129
154
|
}>, Record<never, never>>;
|
|
130
155
|
stop: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
131
156
|
taskID: z.ZodString;
|
|
@@ -1541,6 +1566,56 @@ export declare const hostContract: {
|
|
|
1541
1566
|
};
|
|
1542
1567
|
}>, Record<never, never>>;
|
|
1543
1568
|
};
|
|
1569
|
+
budgets: {
|
|
1570
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
1571
|
+
budgetID: z.ZodString;
|
|
1572
|
+
counts: z.ZodString;
|
|
1573
|
+
limitMicros: z.ZodNumber;
|
|
1574
|
+
period: z.ZodEnum<{
|
|
1575
|
+
day: "day";
|
|
1576
|
+
month: "month";
|
|
1577
|
+
week: "week";
|
|
1578
|
+
}>;
|
|
1579
|
+
spentMicros: z.ZodNumber;
|
|
1580
|
+
resetsAt: z.ZodDate;
|
|
1581
|
+
source: z.ZodEnum<{
|
|
1582
|
+
built_in: "built_in";
|
|
1583
|
+
definitions: "definitions";
|
|
1584
|
+
}>;
|
|
1585
|
+
}, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1586
|
+
BUDGETS_NOT_CONFIGURED: {
|
|
1587
|
+
message: string;
|
|
1588
|
+
status: number;
|
|
1589
|
+
};
|
|
1590
|
+
}>, Record<never, never>>;
|
|
1591
|
+
ledger: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1592
|
+
budgetID: z.ZodString;
|
|
1593
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1594
|
+
budgetID: z.ZodString;
|
|
1595
|
+
periodStart: z.ZodString;
|
|
1596
|
+
resetsAt: z.ZodDate;
|
|
1597
|
+
spentMicros: z.ZodNumber;
|
|
1598
|
+
charges: z.ZodArray<z.ZodObject<{
|
|
1599
|
+
chargeID: z.ZodString;
|
|
1600
|
+
amountMicros: z.ZodNumber;
|
|
1601
|
+
for: z.ZodObject<{
|
|
1602
|
+
kind: z.ZodString;
|
|
1603
|
+
id: z.ZodString;
|
|
1604
|
+
}, z.core.$strip>;
|
|
1605
|
+
isCredited: z.ZodBoolean;
|
|
1606
|
+
}, z.core.$strip>>;
|
|
1607
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1608
|
+
BUDGETS_NOT_CONFIGURED: {
|
|
1609
|
+
message: string;
|
|
1610
|
+
status: number;
|
|
1611
|
+
};
|
|
1612
|
+
}>, {
|
|
1613
|
+
NOT_FOUND: {
|
|
1614
|
+
message: string;
|
|
1615
|
+
status: number;
|
|
1616
|
+
};
|
|
1617
|
+
}>, Record<never, never>>;
|
|
1618
|
+
};
|
|
1544
1619
|
contacts: {
|
|
1545
1620
|
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
1546
1621
|
contactID: z.ZodString;
|
|
@@ -845,10 +845,13 @@ export declare const memoryViewContract: {
|
|
|
845
845
|
change: z.ZodEnum<{
|
|
846
846
|
created: "created";
|
|
847
847
|
edited: "edited";
|
|
848
|
+
labelled: "labelled";
|
|
849
|
+
pinned: "pinned";
|
|
848
850
|
proposed: "proposed";
|
|
849
851
|
restored: "restored";
|
|
850
852
|
retired: "retired";
|
|
851
853
|
undone: "undone";
|
|
854
|
+
unpinned: "unpinned";
|
|
852
855
|
}>;
|
|
853
856
|
isKept: z.ZodBoolean;
|
|
854
857
|
item: z.ZodNullable<z.ZodObject<{
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const remindersContract: {
|
|
3
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
4
|
+
reminders: z.ZodArray<z.ZodObject<{
|
|
5
|
+
reminder: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
note: z.ZodString;
|
|
8
|
+
trigger: z.ZodUnion<readonly [z.ZodObject<{
|
|
9
|
+
schedule: z.ZodObject<{
|
|
10
|
+
every: z.ZodUnion<readonly [z.ZodEnum<{
|
|
11
|
+
day: "day";
|
|
12
|
+
hour: "hour";
|
|
13
|
+
week: "week";
|
|
14
|
+
}>, z.ZodObject<{
|
|
15
|
+
minutes: z.ZodInt;
|
|
16
|
+
}, z.core.$strict>]>;
|
|
17
|
+
at: z.ZodOptional<z.ZodString>;
|
|
18
|
+
on: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
fri: "fri";
|
|
20
|
+
mon: "mon";
|
|
21
|
+
sat: "sat";
|
|
22
|
+
sun: "sun";
|
|
23
|
+
thu: "thu";
|
|
24
|
+
tue: "tue";
|
|
25
|
+
wed: "wed";
|
|
26
|
+
}>>;
|
|
27
|
+
window: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
from: z.ZodString;
|
|
29
|
+
until: z.ZodString;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
idleMinutes: z.ZodOptional<z.ZodInt>;
|
|
32
|
+
zone: z.ZodDefault<z.ZodString>;
|
|
33
|
+
catchUp: z.ZodDefault<z.ZodEnum<{
|
|
34
|
+
once: "once";
|
|
35
|
+
skip: "skip";
|
|
36
|
+
}>>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
39
|
+
at: z.ZodISODateTime;
|
|
40
|
+
}, z.core.$strict>]>;
|
|
41
|
+
rendered: z.ZodString;
|
|
42
|
+
state: z.ZodEnum<{
|
|
43
|
+
active: "active";
|
|
44
|
+
fired: "fired";
|
|
45
|
+
}>;
|
|
46
|
+
next: z.ZodNullable<z.ZodString>;
|
|
47
|
+
recentFires: z.ZodArray<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
50
|
+
UNAUTHORIZED: {
|
|
51
|
+
message: string;
|
|
52
|
+
status: number;
|
|
53
|
+
};
|
|
54
|
+
}>, Record<never, never>>;
|
|
55
|
+
cancel: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
56
|
+
reminder: z.ZodString;
|
|
57
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
58
|
+
reminder: z.ZodString;
|
|
59
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
60
|
+
UNAUTHORIZED: {
|
|
61
|
+
message: string;
|
|
62
|
+
status: number;
|
|
63
|
+
};
|
|
64
|
+
}>, {
|
|
65
|
+
NOT_FOUND: {
|
|
66
|
+
message: string;
|
|
67
|
+
status: number;
|
|
68
|
+
};
|
|
69
|
+
NOT_ACTIVE: {
|
|
70
|
+
message: string;
|
|
71
|
+
status: number;
|
|
72
|
+
};
|
|
73
|
+
}>, Record<never, never>>;
|
|
74
|
+
};
|
|
@@ -128,6 +128,14 @@ export declare const ruleContract: {
|
|
|
128
128
|
status: number;
|
|
129
129
|
data: z.ZodObject<{
|
|
130
130
|
faults: z.ZodArray<z.ZodString>;
|
|
131
|
+
expiry: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
132
|
+
reason: z.ZodLiteral<"expires_past">;
|
|
133
|
+
now: z.ZodString;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
+
reason: z.ZodLiteral<"expires_beyond_max">;
|
|
136
|
+
maxHours: z.ZodNumber;
|
|
137
|
+
latestExpiry: z.ZodString;
|
|
138
|
+
}, z.core.$strip>], "reason">>;
|
|
131
139
|
}, z.core.$strip>;
|
|
132
140
|
};
|
|
133
141
|
NOT_FOUND: {
|
|
@@ -181,6 +189,14 @@ export declare const ruleContract: {
|
|
|
181
189
|
status: number;
|
|
182
190
|
data: z.ZodObject<{
|
|
183
191
|
faults: z.ZodArray<z.ZodString>;
|
|
192
|
+
expiry: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
193
|
+
reason: z.ZodLiteral<"expires_past">;
|
|
194
|
+
now: z.ZodString;
|
|
195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
196
|
+
reason: z.ZodLiteral<"expires_beyond_max">;
|
|
197
|
+
maxHours: z.ZodNumber;
|
|
198
|
+
latestExpiry: z.ZodString;
|
|
199
|
+
}, z.core.$strip>], "reason">>;
|
|
184
200
|
}, z.core.$strip>;
|
|
185
201
|
};
|
|
186
202
|
}>, Record<never, never>>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const spendStopSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
state: z.ZodLiteral<"clear">;
|
|
4
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5
|
+
state: z.ZodLiteral<"unreachable">;
|
|
6
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7
|
+
state: z.ZodLiteral<"lost">;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
state: z.ZodLiteral<"tripped">;
|
|
10
|
+
period: z.ZodEnum<{
|
|
11
|
+
day: "day";
|
|
12
|
+
month: "month";
|
|
13
|
+
}>;
|
|
14
|
+
start: z.ZodString;
|
|
15
|
+
measure: z.ZodEnum<{
|
|
16
|
+
dollars: "dollars";
|
|
17
|
+
tokens: "tokens";
|
|
18
|
+
turns: "turns";
|
|
19
|
+
}>;
|
|
20
|
+
limit: z.ZodNumber;
|
|
21
|
+
spent: z.ZodNumber;
|
|
22
|
+
at: z.ZodDate;
|
|
23
|
+
resetsAt: z.ZodDate;
|
|
24
|
+
canRaise: z.ZodBoolean;
|
|
25
|
+
limits: z.ZodObject<{
|
|
26
|
+
dollars: z.ZodNumber;
|
|
27
|
+
tokens: z.ZodNumber;
|
|
28
|
+
turns: z.ZodNumber;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
used: z.ZodObject<{
|
|
31
|
+
dollars: z.ZodNumber;
|
|
32
|
+
tokens: z.ZodNumber;
|
|
33
|
+
turns: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
cap: z.ZodObject<{
|
|
36
|
+
dollars: z.ZodNumber;
|
|
37
|
+
tokens: z.ZodNumber;
|
|
38
|
+
turns: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
}, z.core.$strip>], "state">;
|
|
41
|
+
export declare const spendRaiseInputSchema: z.ZodObject<{
|
|
42
|
+
start: z.ZodString;
|
|
43
|
+
dollars: z.ZodNumber;
|
|
44
|
+
tokens: z.ZodInt;
|
|
45
|
+
turns: z.ZodInt;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export declare const spendRaiseOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
48
|
+
state: z.ZodLiteral<"clear">;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
state: z.ZodLiteral<"stopped">;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
error: z.ZodLiteral<"above_cap">;
|
|
53
|
+
cap: z.ZodObject<{
|
|
54
|
+
dollars: z.ZodNumber;
|
|
55
|
+
tokens: z.ZodNumber;
|
|
56
|
+
turns: z.ZodNumber;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
error: z.ZodLiteral<"period_ended">;
|
|
60
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
61
|
+
error: z.ZodLiteral<"unreachable">;
|
|
62
|
+
}, z.core.$strip>]>;
|
|
63
|
+
export declare const spendStopStandsError: {
|
|
64
|
+
readonly message: 'Model spending is stopped, and nixie resumes when the stop clears';
|
|
65
|
+
readonly status: 409;
|
|
66
|
+
};
|
|
@@ -145,10 +145,6 @@ export declare const viewContract: {
|
|
|
145
145
|
definitionID: z.ZodString;
|
|
146
146
|
name: z.ZodString;
|
|
147
147
|
enabled: z.ZodBoolean;
|
|
148
|
-
target: z.ZodEnum<{
|
|
149
|
-
conversation: "conversation";
|
|
150
|
-
task: "task";
|
|
151
|
-
}>;
|
|
152
148
|
trigger: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
153
149
|
schedule: z.ZodObject<{
|
|
154
150
|
every: z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type { Schedule } from './contract/schedule-schema.js';
|
|
|
17
17
|
export { scheduleSchema } from './contract/schedule-schema.js';
|
|
18
18
|
export type { Trigger } from './contract/trigger-schema.js';
|
|
19
19
|
export { triggerAtSchema, triggerSchema } from './contract/trigger-schema.js';
|
|
20
|
+
export { spendStopSchema } from './contract/spend-stop-schema.js';
|
|
20
21
|
export { skipReasonSchema } from './contract/view-contract.js';
|
|
21
22
|
export { pickSpanSource } from './span/pick-span-source.js';
|
|
22
23
|
export { renderSessionCookie } from './contract/render-session-cookie.js';
|