@heynixie/contract 0.77.0 → 0.79.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.
@@ -749,7 +749,7 @@ export declare function buildQueryUtils(client: ContractClient): {
749
749
  isPauseRequested: boolean;
750
750
  state: "closed" | "done" | "failed" | "paused" | "ready" | "running" | "stopped" | "waiting";
751
751
  taskID: string;
752
- }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
752
+ }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
753
753
  UNAUTHORIZED: {
754
754
  message: string;
755
755
  status: number;
@@ -785,6 +785,11 @@ export declare function buildQueryUtils(client: ContractClient): {
785
785
  message: string;
786
786
  status: number;
787
787
  };
788
+ }>, {
789
+ SPEND_STOP_STANDS: {
790
+ readonly message: 'Model spending is stopped, and nixie resumes when the stop clears';
791
+ readonly status: 409;
792
+ };
788
793
  }>>> & import("@orpc/tanstack-query").GeneralUtils<{
789
794
  clientActionID: string;
790
795
  taskID: string;
@@ -1690,7 +1695,7 @@ export declare function buildQueryUtils(client: ContractClient): {
1690
1695
  }, {
1691
1696
  notices: {
1692
1697
  entries: {
1693
- change: "created" | "edited" | "proposed" | "restored" | "retired" | "undone";
1698
+ change: "created" | "edited" | "labelled" | "pinned" | "proposed" | "restored" | "retired" | "undone" | "unpinned";
1694
1699
  isKept: boolean;
1695
1700
  item: {
1696
1701
  changedAt: Date;
@@ -2206,7 +2211,7 @@ export declare function buildQueryUtils(client: ContractClient): {
2206
2211
  cause: "owner" | "restore" | "spending";
2207
2212
  since: Date;
2208
2213
  } | null;
2209
- }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2214
+ }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2210
2215
  UNAUTHORIZED: {
2211
2216
  message: string;
2212
2217
  status: number;
@@ -2216,10 +2221,85 @@ export declare function buildQueryUtils(client: ContractClient): {
2216
2221
  message: string;
2217
2222
  status: number;
2218
2223
  };
2224
+ }>, {
2225
+ SPEND_STOP_STANDS: {
2226
+ readonly message: 'Model spending is stopped, and nixie resumes when the stop clears';
2227
+ readonly status: 409;
2228
+ };
2219
2229
  }>>> & import("@orpc/tanstack-query").GeneralUtils<{
2220
2230
  clientActionID: string;
2221
2231
  }>;
2222
2232
  } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
2233
+ spend: {
2234
+ read: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, unknown, {
2235
+ state: "clear";
2236
+ } | {
2237
+ state: "unreachable";
2238
+ } | {
2239
+ state: "lost";
2240
+ } | {
2241
+ state: "tripped";
2242
+ period: "day" | "month";
2243
+ start: string;
2244
+ measure: "dollars" | "tokens" | "turns";
2245
+ limit: number;
2246
+ spent: number;
2247
+ at: Date;
2248
+ resetsAt: Date;
2249
+ canRaise: boolean;
2250
+ limits: {
2251
+ dollars: number;
2252
+ tokens: number;
2253
+ turns: number;
2254
+ };
2255
+ used: {
2256
+ dollars: number;
2257
+ tokens: number;
2258
+ turns: number;
2259
+ };
2260
+ cap: {
2261
+ dollars: number;
2262
+ tokens: number;
2263
+ turns: number;
2264
+ };
2265
+ }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2266
+ UNAUTHORIZED: {
2267
+ message: string;
2268
+ status: number;
2269
+ };
2270
+ }>>> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
2271
+ raise: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
2272
+ start: string;
2273
+ dollars: number;
2274
+ tokens: number;
2275
+ turns: number;
2276
+ }, {
2277
+ state: "clear";
2278
+ } | {
2279
+ state: "stopped";
2280
+ } | {
2281
+ error: "above_cap";
2282
+ cap: {
2283
+ dollars: number;
2284
+ tokens: number;
2285
+ turns: number;
2286
+ };
2287
+ } | {
2288
+ error: "period_ended";
2289
+ } | {
2290
+ error: "unreachable";
2291
+ }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2292
+ UNAUTHORIZED: {
2293
+ message: string;
2294
+ status: number;
2295
+ };
2296
+ }>>> & import("@orpc/tanstack-query").GeneralUtils<{
2297
+ start: string;
2298
+ dollars: number;
2299
+ tokens: number;
2300
+ turns: number;
2301
+ }>;
2302
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
2223
2303
  recovery: {
2224
2304
  read: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, unknown, {
2225
2305
  recovery: {
@@ -902,7 +902,7 @@ export declare const contract: {
902
902
  waiting: "waiting";
903
903
  }>;
904
904
  taskID: z.ZodString;
905
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
905
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
906
906
  UNAUTHORIZED: {
907
907
  message: string;
908
908
  status: number;
@@ -938,6 +938,11 @@ export declare const contract: {
938
938
  message: string;
939
939
  status: number;
940
940
  };
941
+ }>, {
942
+ SPEND_STOP_STANDS: {
943
+ readonly message: 'Model spending is stopped, and nixie resumes when the stop clears';
944
+ readonly status: 409;
945
+ };
941
946
  }>, Record<never, never>>;
942
947
  stop: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
943
948
  clientActionID: z.ZodUUID;
@@ -1961,10 +1966,13 @@ export declare const contract: {
1961
1966
  change: z.ZodEnum<{
1962
1967
  created: "created";
1963
1968
  edited: "edited";
1969
+ labelled: "labelled";
1970
+ pinned: "pinned";
1964
1971
  proposed: "proposed";
1965
1972
  restored: "restored";
1966
1973
  retired: "retired";
1967
1974
  undone: "undone";
1975
+ unpinned: "unpinned";
1968
1976
  }>;
1969
1977
  isKept: z.ZodBoolean;
1970
1978
  item: z.ZodNullable<z.ZodObject<{
@@ -2572,7 +2580,7 @@ export declare const contract: {
2572
2580
  }>;
2573
2581
  since: z.ZodDate;
2574
2582
  }, z.core.$strip>>;
2575
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2583
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2576
2584
  UNAUTHORIZED: {
2577
2585
  message: string;
2578
2586
  status: number;
@@ -2582,6 +2590,83 @@ export declare const contract: {
2582
2590
  message: string;
2583
2591
  status: number;
2584
2592
  };
2593
+ }>, {
2594
+ SPEND_STOP_STANDS: {
2595
+ readonly message: 'Model spending is stopped, and nixie resumes when the stop clears';
2596
+ readonly status: 409;
2597
+ };
2598
+ }>, Record<never, never>>;
2599
+ };
2600
+ spend: {
2601
+ read: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodDiscriminatedUnion<[z.ZodObject<{
2602
+ state: z.ZodLiteral<"clear">;
2603
+ }, z.core.$strip>, z.ZodObject<{
2604
+ state: z.ZodLiteral<"unreachable">;
2605
+ }, z.core.$strip>, z.ZodObject<{
2606
+ state: z.ZodLiteral<"lost">;
2607
+ }, z.core.$strip>, z.ZodObject<{
2608
+ state: z.ZodLiteral<"tripped">;
2609
+ period: z.ZodEnum<{
2610
+ day: "day";
2611
+ month: "month";
2612
+ }>;
2613
+ start: z.ZodString;
2614
+ measure: z.ZodEnum<{
2615
+ dollars: "dollars";
2616
+ tokens: "tokens";
2617
+ turns: "turns";
2618
+ }>;
2619
+ limit: z.ZodNumber;
2620
+ spent: z.ZodNumber;
2621
+ at: z.ZodDate;
2622
+ resetsAt: z.ZodDate;
2623
+ canRaise: z.ZodBoolean;
2624
+ limits: z.ZodObject<{
2625
+ dollars: z.ZodNumber;
2626
+ tokens: z.ZodNumber;
2627
+ turns: z.ZodNumber;
2628
+ }, z.core.$strip>;
2629
+ used: z.ZodObject<{
2630
+ dollars: z.ZodNumber;
2631
+ tokens: z.ZodNumber;
2632
+ turns: z.ZodNumber;
2633
+ }, z.core.$strip>;
2634
+ cap: z.ZodObject<{
2635
+ dollars: z.ZodNumber;
2636
+ tokens: z.ZodNumber;
2637
+ turns: z.ZodNumber;
2638
+ }, z.core.$strip>;
2639
+ }, z.core.$strip>], "state">, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2640
+ UNAUTHORIZED: {
2641
+ message: string;
2642
+ status: number;
2643
+ };
2644
+ }>, Record<never, never>>;
2645
+ raise: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2646
+ start: z.ZodString;
2647
+ dollars: z.ZodNumber;
2648
+ tokens: z.ZodInt;
2649
+ turns: z.ZodInt;
2650
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
2651
+ state: z.ZodLiteral<"clear">;
2652
+ }, z.core.$strip>, z.ZodObject<{
2653
+ state: z.ZodLiteral<"stopped">;
2654
+ }, z.core.$strip>, z.ZodObject<{
2655
+ error: z.ZodLiteral<"above_cap">;
2656
+ cap: z.ZodObject<{
2657
+ dollars: z.ZodNumber;
2658
+ tokens: z.ZodNumber;
2659
+ turns: z.ZodNumber;
2660
+ }, z.core.$strip>;
2661
+ }, z.core.$strip>, z.ZodObject<{
2662
+ error: z.ZodLiteral<"period_ended">;
2663
+ }, z.core.$strip>, z.ZodObject<{
2664
+ error: z.ZodLiteral<"unreachable">;
2665
+ }, z.core.$strip>]>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2666
+ UNAUTHORIZED: {
2667
+ message: string;
2668
+ status: number;
2669
+ };
2585
2670
  }>, Record<never, never>>;
2586
2671
  };
2587
2672
  recovery: {
@@ -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>, 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;
@@ -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,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
+ };
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';