@heynixie/contract 0.71.0 → 0.72.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.
Files changed (43) hide show
  1. package/dist/{approval-contract.d.ts → contract/approval-contract.d.ts} +158 -0
  2. package/dist/{build-query-utils.d.ts → contract/build-query-utils.d.ts} +252 -238
  3. package/dist/{contract.d.ts → contract/contract.d.ts} +340 -285
  4. package/dist/contract/forgettable-kinds.d.ts +1 -0
  5. package/dist/{host-contract.d.ts → contract/host-contract.d.ts} +47 -0
  6. package/dist/{memory-view-contract.d.ts → contract/memory-view-contract.d.ts} +1 -217
  7. package/dist/contract/pause-state-schema.d.ts +9 -0
  8. package/dist/contract/recovery-schema.d.ts +21 -0
  9. package/dist/contract/rule-contract.d.ts +106 -0
  10. package/dist/index.d.ts +17 -18
  11. package/dist/index.js +751 -722
  12. package/dist/{build-pending-input.d.ts → span/build-pending-input.d.ts} +1 -1
  13. package/dist/{build-span-state.d.ts → span/build-span-state.d.ts} +1 -1
  14. package/dist/{pick-span-source.d.ts → span/pick-span-source.d.ts} +1 -1
  15. package/dist/types.d.ts +3 -3
  16. package/package.json +1 -1
  17. package/dist/forgettable-kinds.d.ts +0 -1
  18. package/dist/proposal-outcome-schema.d.ts +0 -37
  19. package/dist/rule-contract.d.ts +0 -124
  20. /package/dist/{action-proposal-schema.d.ts → contract/action-proposal-schema.d.ts} +0 -0
  21. /package/dist/{client-header-name.d.ts → contract/client-header-name.d.ts} +0 -0
  22. /package/dist/{forget-backup-schema.d.ts → contract/forget-backup-schema.d.ts} +0 -0
  23. /package/dist/{image-limits.d.ts → contract/image-limits.d.ts} +0 -0
  24. /package/dist/{image-not-found-error.d.ts → contract/image-not-found-error.d.ts} +0 -0
  25. /package/dist/{image-refused-error.d.ts → contract/image-refused-error.d.ts} +0 -0
  26. /package/dist/{input-miss-schema.d.ts → contract/input-miss-schema.d.ts} +0 -0
  27. /package/dist/{is-time-zone.d.ts → contract/is-time-zone.d.ts} +0 -0
  28. /package/dist/{known-contact-schema.d.ts → contract/known-contact-schema.d.ts} +0 -0
  29. /package/dist/{logged-input-schema.d.ts → contract/logged-input-schema.d.ts} +0 -0
  30. /package/dist/{memory-export-contract.d.ts → contract/memory-export-contract.d.ts} +0 -0
  31. /package/dist/{moment-contract.d.ts → contract/moment-contract.d.ts} +0 -0
  32. /package/dist/{render-session-cookie.d.ts → contract/render-session-cookie.d.ts} +0 -0
  33. /package/dist/{reused-id-errors.d.ts → contract/reused-id-errors.d.ts} +0 -0
  34. /package/dist/{session-cookie-name.d.ts → contract/session-cookie-name.d.ts} +0 -0
  35. /package/dist/{signed-in.d.ts → contract/signed-in.d.ts} +0 -0
  36. /package/dist/{task-schema.d.ts → contract/task-schema.d.ts} +0 -0
  37. /package/dist/{tool-call-schema.d.ts → contract/tool-call-schema.d.ts} +0 -0
  38. /package/dist/{turn-inputs-contract.d.ts → contract/turn-inputs-contract.d.ts} +0 -0
  39. /package/dist/{task-message-input-schema.d.ts → message/task-message-input-schema.d.ts} +0 -0
  40. /package/dist/{task-message-kind-schema.d.ts → message/task-message-kind-schema.d.ts} +0 -0
  41. /package/dist/{task-message-result-schema.d.ts → message/task-message-result-schema.d.ts} +0 -0
  42. /package/dist/{has-several-words.d.ts → span/has-several-words.d.ts} +0 -0
  43. /package/dist/{span-schema.d.ts → span/span-schema.d.ts} +0 -0
@@ -79,6 +79,10 @@ export declare const contract: {
79
79
  ratedBy: z.ZodOptional<z.ZodString>;
80
80
  recalledSequence: z.ZodInt;
81
81
  }, z.core.$strip>>;
82
+ proposal: z.ZodOptional<z.ZodObject<{
83
+ proposalID: z.ZodString;
84
+ shortID: z.ZodString;
85
+ }, z.core.$strip>>;
82
86
  recall: z.ZodOptional<z.ZodObject<{
83
87
  items: z.ZodArray<z.ZodObject<{
84
88
  itemID: z.ZodString;
@@ -205,6 +209,10 @@ export declare const contract: {
205
209
  ratedBy: z.ZodOptional<z.ZodString>;
206
210
  recalledSequence: z.ZodInt;
207
211
  }, z.core.$strip>>;
212
+ proposal: z.ZodOptional<z.ZodObject<{
213
+ proposalID: z.ZodString;
214
+ shortID: z.ZodString;
215
+ }, z.core.$strip>>;
208
216
  recall: z.ZodOptional<z.ZodObject<{
209
217
  items: z.ZodArray<z.ZodObject<{
210
218
  itemID: z.ZodString;
@@ -380,6 +388,18 @@ export declare const contract: {
380
388
  thread: z.ZodString;
381
389
  }, z.core.$strip>, z.ZodObject<{
382
390
  forgottenAt: z.ZodDate;
391
+ backup: z.ZodDiscriminatedUnion<[z.ZodObject<{
392
+ state: z.ZodLiteral<"off">;
393
+ }, z.core.$strip>, z.ZodObject<{
394
+ state: z.ZodLiteral<"pending">;
395
+ }, z.core.$strip>, z.ZodObject<{
396
+ state: z.ZodLiteral<"failed">;
397
+ failure: z.ZodString;
398
+ }, z.core.$strip>, z.ZodObject<{
399
+ state: z.ZodLiteral<"complete">;
400
+ }, z.core.$strip>, z.ZodObject<{
401
+ state: z.ZodLiteral<"unknown">;
402
+ }, z.core.$strip>], "state">;
383
403
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
384
404
  UNAUTHORIZED: {
385
405
  message: string;
@@ -395,6 +415,10 @@ export declare const contract: {
395
415
  message: string;
396
416
  status: number;
397
417
  };
418
+ ACTION_NOT_FINISHED: {
419
+ message: string;
420
+ status: number;
421
+ };
398
422
  }>, Record<never, never>>;
399
423
  };
400
424
  tasks: {
@@ -416,6 +440,7 @@ export declare const contract: {
416
440
  stop: "stop";
417
441
  }>>;
418
442
  isPauseRequested: z.ZodBoolean;
443
+ isPausedByNixie: z.ZodBoolean;
419
444
  isTakingMessages: z.ZodBoolean;
420
445
  lastActivityAt: z.ZodDate;
421
446
  name: z.ZodString;
@@ -456,6 +481,7 @@ export declare const contract: {
456
481
  stop: "stop";
457
482
  }>>;
458
483
  isPauseRequested: z.ZodBoolean;
484
+ isPausedByNixie: z.ZodBoolean;
459
485
  isTakingMessages: z.ZodBoolean;
460
486
  lastActivityAt: z.ZodDate;
461
487
  name: z.ZodString;
@@ -2120,223 +2146,6 @@ export declare const contract: {
2120
2146
  status: number;
2121
2147
  };
2122
2148
  }>, Record<never, never>>;
2123
- listProposals: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
2124
- proposals: z.ZodArray<z.ZodObject<{
2125
- actionHash: z.ZodString;
2126
- createdAt: z.ZodDate;
2127
- evidence: z.ZodNullable<z.ZodObject<{
2128
- end: z.ZodInt;
2129
- message: z.ZodNullable<z.ZodObject<{
2130
- status: z.ZodEnum<{
2131
- missing: "missing";
2132
- readable: "readable";
2133
- shredded: "shredded";
2134
- unreadable: "unreadable";
2135
- }>;
2136
- text: z.ZodOptional<z.ZodString>;
2137
- }, z.core.$strip>>;
2138
- sequence: z.ZodInt;
2139
- start: z.ZodInt;
2140
- }, z.core.$strip>>;
2141
- image: z.ZodNullable<z.ZodObject<{
2142
- position: z.ZodInt;
2143
- sequence: z.ZodInt;
2144
- thread: z.ZodString;
2145
- }, z.core.$strip>>;
2146
- isPinned: z.ZodBoolean;
2147
- isSensitive: z.ZodBoolean;
2148
- itemID: z.ZodString;
2149
- kind: z.ZodEnum<{
2150
- fact: "fact";
2151
- self: "self";
2152
- }>;
2153
- lapseAt: z.ZodDate;
2154
- newSubject: z.ZodNullable<z.ZodEnum<{
2155
- owner: "owner";
2156
- self: "self";
2157
- shared: "shared";
2158
- }>>;
2159
- operation: z.ZodEnum<{
2160
- pin: "pin";
2161
- remember: "remember";
2162
- retire: "retire";
2163
- }>;
2164
- origin: z.ZodEnum<{
2165
- conversation: "conversation";
2166
- memory_writer: "memory_writer";
2167
- owner: "owner";
2168
- task: "task";
2169
- }>;
2170
- proposalID: z.ZodString;
2171
- quote: z.ZodNullable<z.ZodString>;
2172
- reason: z.ZodEnum<{
2173
- ambiguous_target: "ambiguous_target";
2174
- checker_not_asserted: "checker_not_asserted";
2175
- checker_unreachable: "checker_unreachable";
2176
- checker_unsure: "checker_unsure";
2177
- forgotten_evidence: "forgotten_evidence";
2178
- from_photo: "from_photo";
2179
- invisible_character: "invisible_character";
2180
- no_quote: "no_quote";
2181
- other: "other";
2182
- pinned: "pinned";
2183
- quote_in_quoted_block: "quote_in_quoted_block";
2184
- quote_not_typed: "quote_not_typed";
2185
- self_note: "self_note";
2186
- sensitive: "sensitive";
2187
- subject_change: "subject_change";
2188
- token_missing: "token_missing";
2189
- }>;
2190
- source: z.ZodEnum<{
2191
- owner: "owner";
2192
- owner_data: "owner_data";
2193
- untrusted: "untrusted";
2194
- }>;
2195
- sources: z.ZodArray<z.ZodObject<{
2196
- origin: z.ZodEnum<{
2197
- conversation: "conversation";
2198
- memory_writer: "memory_writer";
2199
- owner: "owner";
2200
- task: "task";
2201
- }>;
2202
- proposedAt: z.ZodDate;
2203
- thread: z.ZodNullable<z.ZodString>;
2204
- }, z.core.$strip>>;
2205
- subject: z.ZodEnum<{
2206
- owner: "owner";
2207
- self: "self";
2208
- shared: "shared";
2209
- }>;
2210
- targetVersion: z.ZodNullable<z.ZodInt>;
2211
- text: z.ZodString;
2212
- until: z.ZodNullable<z.ZodDate>;
2213
- }, z.core.$strip>>;
2214
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2215
- UNAUTHORIZED: {
2216
- message: string;
2217
- status: number;
2218
- };
2219
- }>, {
2220
- MEMORY_NOT_STARTED: {
2221
- message: string;
2222
- status: number;
2223
- };
2224
- }>, Record<never, never>>;
2225
- approveProposals: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2226
- answers: z.ZodArray<z.ZodObject<{
2227
- actionHash: z.ZodString;
2228
- clientActionID: z.ZodUUID;
2229
- proposalID: z.ZodString;
2230
- editedText: z.ZodOptional<z.ZodString>;
2231
- ignoreCloseMatch: z.ZodOptional<z.ZodBoolean>;
2232
- revisionOf: z.ZodOptional<z.ZodObject<{
2233
- itemID: z.ZodString;
2234
- version: z.ZodInt;
2235
- }, z.core.$strip>>;
2236
- }, z.core.$strip>>;
2237
- }, z.core.$strip>, z.ZodObject<{
2238
- outcomes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2239
- proposalID: z.ZodString;
2240
- status: z.ZodLiteral<"applied">;
2241
- }, z.core.$strip>, z.ZodObject<{
2242
- proposalID: z.ZodString;
2243
- status: z.ZodLiteral<"rejected">;
2244
- }, z.core.$strip>, z.ZodObject<{
2245
- item: z.ZodObject<{
2246
- itemID: z.ZodString;
2247
- text: z.ZodString;
2248
- version: z.ZodInt;
2249
- }, z.core.$strip>;
2250
- proposalID: z.ZodString;
2251
- status: z.ZodLiteral<"close_match">;
2252
- }, z.core.$strip>, z.ZodObject<{
2253
- cause: z.ZodEnum<{
2254
- answered: "answered";
2255
- changed: "changed";
2256
- gone: "gone";
2257
- lapsed: "lapsed";
2258
- moved: "moved";
2259
- }>;
2260
- proposalID: z.ZodString;
2261
- status: z.ZodLiteral<"stale">;
2262
- }, z.core.$strip>, z.ZodObject<{
2263
- code: z.ZodEnum<{
2264
- CLIENT_ACTION_ID_REUSED: "CLIENT_ACTION_ID_REUSED";
2265
- PINNED_CORE_FULL: "PINNED_CORE_FULL";
2266
- PIN_EDIT: "PIN_EDIT";
2267
- RETIREMENT_EDIT: "RETIREMENT_EDIT";
2268
- REVISION_TARGET: "REVISION_TARGET";
2269
- WRONG_STATE: "WRONG_STATE";
2270
- }>;
2271
- proposalID: z.ZodString;
2272
- status: z.ZodLiteral<"refused">;
2273
- }, z.core.$strip>], "status">>;
2274
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2275
- UNAUTHORIZED: {
2276
- message: string;
2277
- status: number;
2278
- };
2279
- }>, {
2280
- MEMORY_NOT_STARTED: {
2281
- message: string;
2282
- status: number;
2283
- };
2284
- }>, Record<never, never>>;
2285
- rejectProposals: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2286
- answers: z.ZodArray<z.ZodObject<{
2287
- actionHash: z.ZodString;
2288
- clientActionID: z.ZodUUID;
2289
- proposalID: z.ZodString;
2290
- reason: z.ZodOptional<z.ZodString>;
2291
- }, z.core.$strip>>;
2292
- }, z.core.$strip>, z.ZodObject<{
2293
- outcomes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2294
- proposalID: z.ZodString;
2295
- status: z.ZodLiteral<"applied">;
2296
- }, z.core.$strip>, z.ZodObject<{
2297
- proposalID: z.ZodString;
2298
- status: z.ZodLiteral<"rejected">;
2299
- }, z.core.$strip>, z.ZodObject<{
2300
- item: z.ZodObject<{
2301
- itemID: z.ZodString;
2302
- text: z.ZodString;
2303
- version: z.ZodInt;
2304
- }, z.core.$strip>;
2305
- proposalID: z.ZodString;
2306
- status: z.ZodLiteral<"close_match">;
2307
- }, z.core.$strip>, z.ZodObject<{
2308
- cause: z.ZodEnum<{
2309
- answered: "answered";
2310
- changed: "changed";
2311
- gone: "gone";
2312
- lapsed: "lapsed";
2313
- moved: "moved";
2314
- }>;
2315
- proposalID: z.ZodString;
2316
- status: z.ZodLiteral<"stale">;
2317
- }, z.core.$strip>, z.ZodObject<{
2318
- code: z.ZodEnum<{
2319
- CLIENT_ACTION_ID_REUSED: "CLIENT_ACTION_ID_REUSED";
2320
- PINNED_CORE_FULL: "PINNED_CORE_FULL";
2321
- PIN_EDIT: "PIN_EDIT";
2322
- RETIREMENT_EDIT: "RETIREMENT_EDIT";
2323
- REVISION_TARGET: "REVISION_TARGET";
2324
- WRONG_STATE: "WRONG_STATE";
2325
- }>;
2326
- proposalID: z.ZodString;
2327
- status: z.ZodLiteral<"refused">;
2328
- }, z.core.$strip>], "status">>;
2329
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2330
- UNAUTHORIZED: {
2331
- message: string;
2332
- status: number;
2333
- };
2334
- }>, {
2335
- MEMORY_NOT_STARTED: {
2336
- message: string;
2337
- status: number;
2338
- };
2339
- }>, Record<never, never>>;
2340
2149
  readVersions: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2341
2150
  versions: z.ZodArray<z.ZodObject<{
2342
2151
  itemID: z.ZodString;
@@ -2411,15 +2220,15 @@ export declare const contract: {
2411
2220
  };
2412
2221
  }>, Record<never, never>>;
2413
2222
  };
2414
- backups: {
2415
- readNotice: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
2416
- notice: z.ZodNullable<z.ZodObject<{
2223
+ nixie: {
2224
+ read: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
2225
+ paused: z.ZodNullable<z.ZodObject<{
2417
2226
  cause: z.ZodEnum<{
2418
- failed: "failed";
2419
- missing: "missing";
2227
+ owner: "owner";
2228
+ restore: "restore";
2229
+ spending: "spending";
2420
2230
  }>;
2421
- sequence: z.ZodInt;
2422
- raisedAt: z.ZodDate;
2231
+ since: z.ZodDate;
2423
2232
  }, z.core.$strip>>;
2424
2233
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2425
2234
  UNAUTHORIZED: {
@@ -2427,60 +2236,110 @@ export declare const contract: {
2427
2236
  status: number;
2428
2237
  };
2429
2238
  }>, Record<never, never>>;
2430
- };
2431
- rules: {
2432
- listProposals: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
2433
- proposals: z.ZodArray<z.ZodObject<{
2434
- proposalID: z.ZodString;
2435
- changes: z.ZodArray<z.ZodObject<{
2436
- ruleID: z.ZodString;
2437
- before: z.ZodNullable<z.ZodObject<{
2438
- ruleHash: z.ZodString;
2439
- sentence: z.ZodString;
2440
- }, z.core.$strip>>;
2441
- after: z.ZodNullable<z.ZodObject<{
2442
- ruleHash: z.ZodString;
2443
- sentence: z.ZodString;
2444
- }, z.core.$strip>>;
2445
- }, z.core.$strip>>;
2446
- effectChanges: z.ZodArray<z.ZodObject<{
2447
- tool: z.ZodString;
2448
- remove: z.ZodArray<z.ZodString>;
2449
- sentence: z.ZodString;
2450
- }, z.core.$strip>>;
2451
- createdAt: z.ZodDate;
2452
- lapseAt: z.ZodDate;
2239
+ pause: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2240
+ clientActionID: z.ZodUUID;
2241
+ }, z.core.$strip>, z.ZodObject<{
2242
+ paused: z.ZodNullable<z.ZodObject<{
2243
+ cause: z.ZodEnum<{
2244
+ owner: "owner";
2245
+ restore: "restore";
2246
+ spending: "spending";
2247
+ }>;
2248
+ since: z.ZodDate;
2453
2249
  }, z.core.$strip>>;
2454
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2250
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2455
2251
  UNAUTHORIZED: {
2456
2252
  message: string;
2457
2253
  status: number;
2458
2254
  };
2255
+ }>, {
2256
+ CLIENT_ACTION_ID_REUSED: {
2257
+ message: string;
2258
+ status: number;
2259
+ };
2459
2260
  }>, Record<never, never>>;
2460
- approveProposal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2461
- proposalID: z.ZodString;
2261
+ resume: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2262
+ clientActionID: z.ZodUUID;
2462
2263
  }, z.core.$strip>, z.ZodObject<{
2463
- proposalID: z.ZodString;
2264
+ paused: z.ZodNullable<z.ZodObject<{
2265
+ cause: z.ZodEnum<{
2266
+ owner: "owner";
2267
+ restore: "restore";
2268
+ spending: "spending";
2269
+ }>;
2270
+ since: z.ZodDate;
2271
+ }, z.core.$strip>>;
2464
2272
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2465
2273
  UNAUTHORIZED: {
2466
2274
  message: string;
2467
2275
  status: number;
2468
2276
  };
2469
2277
  }>, {
2470
- NOT_FOUND: {
2278
+ CLIENT_ACTION_ID_REUSED: {
2471
2279
  message: string;
2472
2280
  status: number;
2473
2281
  };
2474
- PROPOSAL_CLOSED: {
2282
+ }>, Record<never, never>>;
2283
+ };
2284
+ recovery: {
2285
+ read: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
2286
+ recovery: z.ZodNullable<z.ZodObject<{
2287
+ restoredAt: z.ZodDate;
2288
+ backupTakenAt: z.ZodDate;
2289
+ toCheck: z.ZodArray<z.ZodObject<{
2290
+ taskID: z.ZodString;
2291
+ name: z.ZodString;
2292
+ stateAtBackup: z.ZodEnum<{
2293
+ closed: "closed";
2294
+ done: "done";
2295
+ failed: "failed";
2296
+ paused: "paused";
2297
+ ready: "ready";
2298
+ running: "running";
2299
+ stopped: "stopped";
2300
+ waiting: "waiting";
2301
+ }>;
2302
+ wasRunning: z.ZodBoolean;
2303
+ pendingActions: z.ZodInt;
2304
+ }, z.core.$strip>>;
2305
+ }, z.core.$strip>>;
2306
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2307
+ UNAUTHORIZED: {
2475
2308
  message: string;
2476
2309
  status: number;
2477
2310
  };
2478
2311
  }>, Record<never, never>>;
2479
- rejectProposal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2480
- proposalID: z.ZodString;
2481
- reason: z.ZodString;
2312
+ };
2313
+ backups: {
2314
+ readNotice: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
2315
+ notice: z.ZodNullable<z.ZodObject<{
2316
+ cause: z.ZodEnum<{
2317
+ failed: "failed";
2318
+ missing: "missing";
2319
+ }>;
2320
+ sequence: z.ZodInt;
2321
+ raisedAt: z.ZodDate;
2322
+ }, z.core.$strip>>;
2323
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2324
+ UNAUTHORIZED: {
2325
+ message: string;
2326
+ status: number;
2327
+ };
2328
+ }>, Record<never, never>>;
2329
+ };
2330
+ rules: {
2331
+ readRule: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2332
+ ruleID: z.ZodString;
2482
2333
  }, z.core.$strip>, z.ZodObject<{
2483
- proposalID: z.ZodString;
2334
+ ruleID: z.ZodString;
2335
+ revision: z.ZodInt;
2336
+ sentence: z.ZodString;
2337
+ outcome: z.ZodEnum<{
2338
+ allow: "allow";
2339
+ ask: "ask";
2340
+ deny: "deny";
2341
+ }>;
2342
+ destinations: z.ZodArray<z.ZodString>;
2484
2343
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2485
2344
  UNAUTHORIZED: {
2486
2345
  message: string;
@@ -2491,32 +2350,20 @@ export declare const contract: {
2491
2350
  message: string;
2492
2351
  status: number;
2493
2352
  };
2494
- PROPOSAL_CLOSED: {
2495
- message: string;
2496
- status: number;
2497
- };
2498
2353
  }>, Record<never, never>>;
2499
- listActionProposals: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
2500
- proposals: z.ZodArray<z.ZodObject<{
2501
- proposalID: z.ZodString;
2502
- tool: z.ZodString;
2503
- sentence: z.ZodString;
2504
- destinations: z.ZodArray<z.ZodString>;
2505
- createdAt: z.ZodDate;
2506
- lapseAt: z.ZodDate;
2507
- }, z.core.$strip>>;
2508
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2354
+ removeRule: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2355
+ ruleID: z.ZodString;
2356
+ revision: z.ZodInt;
2357
+ clientActionID: z.ZodUUID;
2358
+ }, z.core.$strip>, z.ZodObject<{
2359
+ ruleID: z.ZodString;
2360
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2509
2361
  UNAUTHORIZED: {
2510
2362
  message: string;
2511
2363
  status: number;
2512
2364
  };
2513
- }>, Record<never, never>>;
2514
- approveActionProposal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2515
- proposalID: z.ZodString;
2516
- }, z.core.$strip>, z.ZodObject<{
2517
- proposalID: z.ZodString;
2518
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2519
- UNAUTHORIZED: {
2365
+ }>, {
2366
+ CLIENT_ACTION_ID_REUSED: {
2520
2367
  message: string;
2521
2368
  status: number;
2522
2369
  };
@@ -2525,29 +2372,63 @@ export declare const contract: {
2525
2372
  message: string;
2526
2373
  status: number;
2527
2374
  };
2528
- PROPOSAL_CLOSED: {
2375
+ CONFLICT: {
2376
+ message: string;
2377
+ status: number;
2378
+ data: z.ZodObject<{
2379
+ revision: z.ZodInt;
2380
+ }, z.core.$strip>;
2381
+ };
2382
+ NOT_ALLOWED: {
2529
2383
  message: string;
2530
2384
  status: number;
2385
+ data: z.ZodObject<{
2386
+ reason: z.ZodEnum<{
2387
+ empty: "empty";
2388
+ widens: "widens";
2389
+ }>;
2390
+ }, z.core.$strip>;
2531
2391
  };
2532
2392
  }>, Record<never, never>>;
2533
- rejectActionProposal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2534
- proposalID: z.ZodString;
2535
- reason: z.ZodString;
2393
+ editRule: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2394
+ ruleID: z.ZodString;
2395
+ revision: z.ZodInt;
2396
+ destinations: z.ZodArray<z.ZodString>;
2397
+ clientActionID: z.ZodUUID;
2536
2398
  }, z.core.$strip>, z.ZodObject<{
2537
- proposalID: z.ZodString;
2538
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2399
+ ruleID: z.ZodString;
2400
+ revision: z.ZodInt;
2401
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2539
2402
  UNAUTHORIZED: {
2540
2403
  message: string;
2541
2404
  status: number;
2542
2405
  };
2406
+ }>, {
2407
+ CLIENT_ACTION_ID_REUSED: {
2408
+ message: string;
2409
+ status: number;
2410
+ };
2543
2411
  }>, {
2544
2412
  NOT_FOUND: {
2545
2413
  message: string;
2546
2414
  status: number;
2547
2415
  };
2548
- PROPOSAL_CLOSED: {
2416
+ CONFLICT: {
2549
2417
  message: string;
2550
2418
  status: number;
2419
+ data: z.ZodObject<{
2420
+ revision: z.ZodInt;
2421
+ }, z.core.$strip>;
2422
+ };
2423
+ NOT_ALLOWED: {
2424
+ message: string;
2425
+ status: number;
2426
+ data: z.ZodObject<{
2427
+ reason: z.ZodEnum<{
2428
+ empty: "empty";
2429
+ widens: "widens";
2430
+ }>;
2431
+ }, z.core.$strip>;
2551
2432
  };
2552
2433
  }>, Record<never, never>>;
2553
2434
  };
@@ -2595,11 +2476,15 @@ export declare const contract: {
2595
2476
  deadlineAt: z.ZodNullable<z.ZodDate>;
2596
2477
  deferGeneration: z.ZodInt;
2597
2478
  deferUntil: z.ZodNullable<z.ZodDate>;
2479
+ thread: z.ZodNullable<z.ZodString>;
2480
+ taskID: z.ZodNullable<z.ZodString>;
2481
+ sequence: z.ZodInt;
2598
2482
  }, z.core.$strip>;
2599
2483
  body: z.ZodObject<{
2600
2484
  sentence: z.ZodString;
2601
2485
  fields: z.ZodRecord<z.ZodString, z.ZodString>;
2602
2486
  ruleSentence: z.ZodNullable<z.ZodString>;
2487
+ approveLabel: z.ZodString;
2603
2488
  memory: z.ZodOptional<z.ZodObject<{
2604
2489
  actionHash: z.ZodString;
2605
2490
  createdAt: z.ZodDate;
@@ -2650,6 +2535,7 @@ export declare const contract: {
2650
2535
  quote: z.ZodNullable<z.ZodString>;
2651
2536
  reason: z.ZodEnum<{
2652
2537
  ambiguous_target: "ambiguous_target";
2538
+ ask_rule: "ask_rule";
2653
2539
  checker_not_asserted: "checker_not_asserted";
2654
2540
  checker_unreachable: "checker_unreachable";
2655
2541
  checker_unsure: "checker_unsure";
@@ -2708,6 +2594,159 @@ export declare const contract: {
2708
2594
  status: number;
2709
2595
  };
2710
2596
  }>, Record<never, never>>;
2597
+ readProposals: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2598
+ proposalIDs: z.ZodArray<z.ZodString>;
2599
+ }, z.core.$strip>, z.ZodObject<{
2600
+ proposals: z.ZodArray<z.ZodObject<{
2601
+ proposal: z.ZodObject<{
2602
+ proposalID: z.ZodString;
2603
+ shortID: z.ZodString;
2604
+ kind: z.ZodEnum<{
2605
+ action: "action";
2606
+ internal_change: "internal_change";
2607
+ memory_write: "memory_write";
2608
+ }>;
2609
+ riskClass: z.ZodEnum<{
2610
+ always_ask: "always_ask";
2611
+ lifting: "lifting";
2612
+ routine: "routine";
2613
+ }>;
2614
+ actionHash: z.ZodString;
2615
+ ruleHash: z.ZodNullable<z.ZodString>;
2616
+ cause: z.ZodString;
2617
+ state: z.ZodEnum<{
2618
+ approved: "approved";
2619
+ declined: "declined";
2620
+ deferred: "deferred";
2621
+ lapsed: "lapsed";
2622
+ pending: "pending";
2623
+ withdrawn: "withdrawn";
2624
+ }>;
2625
+ createdAt: z.ZodDate;
2626
+ lapsesAt: z.ZodDate;
2627
+ deadlineAt: z.ZodNullable<z.ZodDate>;
2628
+ deferGeneration: z.ZodInt;
2629
+ deferUntil: z.ZodNullable<z.ZodDate>;
2630
+ thread: z.ZodNullable<z.ZodString>;
2631
+ taskID: z.ZodNullable<z.ZodString>;
2632
+ sequence: z.ZodInt;
2633
+ }, z.core.$strip>;
2634
+ body: z.ZodNullable<z.ZodObject<{
2635
+ sentence: z.ZodString;
2636
+ fields: z.ZodRecord<z.ZodString, z.ZodString>;
2637
+ ruleSentence: z.ZodNullable<z.ZodString>;
2638
+ approveLabel: z.ZodString;
2639
+ memory: z.ZodOptional<z.ZodObject<{
2640
+ actionHash: z.ZodString;
2641
+ createdAt: z.ZodDate;
2642
+ evidence: z.ZodNullable<z.ZodObject<{
2643
+ end: z.ZodInt;
2644
+ message: z.ZodNullable<z.ZodObject<{
2645
+ status: z.ZodEnum<{
2646
+ missing: "missing";
2647
+ readable: "readable";
2648
+ shredded: "shredded";
2649
+ unreadable: "unreadable";
2650
+ }>;
2651
+ text: z.ZodOptional<z.ZodString>;
2652
+ }, z.core.$strip>>;
2653
+ sequence: z.ZodInt;
2654
+ start: z.ZodInt;
2655
+ }, z.core.$strip>>;
2656
+ image: z.ZodNullable<z.ZodObject<{
2657
+ position: z.ZodInt;
2658
+ sequence: z.ZodInt;
2659
+ thread: z.ZodString;
2660
+ }, z.core.$strip>>;
2661
+ isPinned: z.ZodBoolean;
2662
+ isSensitive: z.ZodBoolean;
2663
+ itemID: z.ZodString;
2664
+ kind: z.ZodEnum<{
2665
+ fact: "fact";
2666
+ self: "self";
2667
+ }>;
2668
+ lapseAt: z.ZodDate;
2669
+ newSubject: z.ZodNullable<z.ZodEnum<{
2670
+ owner: "owner";
2671
+ self: "self";
2672
+ shared: "shared";
2673
+ }>>;
2674
+ operation: z.ZodEnum<{
2675
+ pin: "pin";
2676
+ remember: "remember";
2677
+ retire: "retire";
2678
+ }>;
2679
+ origin: z.ZodEnum<{
2680
+ conversation: "conversation";
2681
+ memory_writer: "memory_writer";
2682
+ owner: "owner";
2683
+ task: "task";
2684
+ }>;
2685
+ proposalID: z.ZodString;
2686
+ quote: z.ZodNullable<z.ZodString>;
2687
+ reason: z.ZodEnum<{
2688
+ ambiguous_target: "ambiguous_target";
2689
+ ask_rule: "ask_rule";
2690
+ checker_not_asserted: "checker_not_asserted";
2691
+ checker_unreachable: "checker_unreachable";
2692
+ checker_unsure: "checker_unsure";
2693
+ forgotten_evidence: "forgotten_evidence";
2694
+ from_photo: "from_photo";
2695
+ invisible_character: "invisible_character";
2696
+ no_quote: "no_quote";
2697
+ other: "other";
2698
+ pinned: "pinned";
2699
+ quote_in_quoted_block: "quote_in_quoted_block";
2700
+ quote_not_typed: "quote_not_typed";
2701
+ self_note: "self_note";
2702
+ sensitive: "sensitive";
2703
+ subject_change: "subject_change";
2704
+ token_missing: "token_missing";
2705
+ }>;
2706
+ source: z.ZodEnum<{
2707
+ owner: "owner";
2708
+ owner_data: "owner_data";
2709
+ untrusted: "untrusted";
2710
+ }>;
2711
+ sources: z.ZodArray<z.ZodObject<{
2712
+ origin: z.ZodEnum<{
2713
+ conversation: "conversation";
2714
+ memory_writer: "memory_writer";
2715
+ owner: "owner";
2716
+ task: "task";
2717
+ }>;
2718
+ proposedAt: z.ZodDate;
2719
+ thread: z.ZodNullable<z.ZodString>;
2720
+ }, z.core.$strip>>;
2721
+ subject: z.ZodEnum<{
2722
+ owner: "owner";
2723
+ self: "self";
2724
+ shared: "shared";
2725
+ }>;
2726
+ targetVersion: z.ZodNullable<z.ZodInt>;
2727
+ text: z.ZodString;
2728
+ until: z.ZodNullable<z.ZodDate>;
2729
+ }, z.core.$strip>>;
2730
+ }, z.core.$strip>>;
2731
+ task: z.ZodNullable<z.ZodObject<{
2732
+ id: z.ZodString;
2733
+ name: z.ZodString;
2734
+ }, z.core.$strip>>;
2735
+ choices: z.ZodArray<z.ZodEnum<{
2736
+ always_allow: "always_allow";
2737
+ approve: "approve";
2738
+ decline: "decline";
2739
+ defer: "defer";
2740
+ }>>;
2741
+ answeredOn: z.ZodNullable<z.ZodString>;
2742
+ isAnsweredHere: z.ZodBoolean;
2743
+ }, z.core.$strip>>;
2744
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
2745
+ UNAUTHORIZED: {
2746
+ message: string;
2747
+ status: number;
2748
+ };
2749
+ }>, Record<never, never>>;
2711
2750
  answerProposal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2712
2751
  proposalID: z.ZodString;
2713
2752
  actionHash: z.ZodString;
@@ -2930,6 +2969,10 @@ export declare const contract: {
2930
2969
  ratedBy?: string | undefined;
2931
2970
  recalledSequence: number;
2932
2971
  } | undefined;
2972
+ proposal?: {
2973
+ proposalID: string;
2974
+ shortID: string;
2975
+ } | undefined;
2933
2976
  recall?: {
2934
2977
  items: {
2935
2978
  itemID: string;
@@ -3037,6 +3080,10 @@ export declare const contract: {
3037
3080
  ratedBy?: string | undefined;
3038
3081
  recalledSequence: number;
3039
3082
  } | undefined;
3083
+ proposal?: {
3084
+ proposalID: string;
3085
+ shortID: string;
3086
+ } | undefined;
3040
3087
  recall?: {
3041
3088
  items: {
3042
3089
  itemID: string;
@@ -3155,6 +3202,10 @@ export declare const contract: {
3155
3202
  ratedBy?: string | undefined;
3156
3203
  recalledSequence: number;
3157
3204
  } | undefined;
3205
+ proposal?: {
3206
+ proposalID: string;
3207
+ shortID: string;
3208
+ } | undefined;
3158
3209
  recall?: {
3159
3210
  items: {
3160
3211
  itemID: string;
@@ -3262,6 +3313,10 @@ export declare const contract: {
3262
3313
  ratedBy?: string | undefined;
3263
3314
  recalledSequence: number;
3264
3315
  } | undefined;
3316
+ proposal?: {
3317
+ proposalID: string;
3318
+ shortID: string;
3319
+ } | undefined;
3265
3320
  recall?: {
3266
3321
  items: {
3267
3322
  itemID: string;