@heynixie/contract 0.70.2 → 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 (42) hide show
  1. package/dist/contract/action-proposal-schema.d.ts +18 -0
  2. package/dist/contract/approval-contract.d.ts +479 -0
  3. package/dist/{build-query-utils.d.ts → contract/build-query-utils.d.ts} +548 -191
  4. package/dist/{contract.d.ts → contract/contract.d.ts} +704 -243
  5. package/dist/contract/forgettable-kinds.d.ts +1 -0
  6. package/dist/{host-contract.d.ts → contract/host-contract.d.ts} +284 -0
  7. package/dist/contract/input-miss-schema.d.ts +23 -0
  8. package/dist/contract/known-contact-schema.d.ts +7 -0
  9. package/dist/contract/logged-input-schema.d.ts +36 -0
  10. package/dist/{memory-view-contract.d.ts → contract/memory-view-contract.d.ts} +92 -217
  11. package/dist/{moment-contract.d.ts → contract/moment-contract.d.ts} +1 -0
  12. package/dist/contract/pause-state-schema.d.ts +9 -0
  13. package/dist/contract/recovery-schema.d.ts +21 -0
  14. package/dist/contract/rule-contract.d.ts +106 -0
  15. package/dist/contract/turn-inputs-contract.d.ts +134 -0
  16. package/dist/index.d.ts +17 -17
  17. package/dist/index.js +979 -667
  18. package/dist/{build-pending-input.d.ts → span/build-pending-input.d.ts} +1 -1
  19. package/dist/{build-span-state.d.ts → span/build-span-state.d.ts} +1 -1
  20. package/dist/{pick-span-source.d.ts → span/pick-span-source.d.ts} +1 -1
  21. package/dist/types.d.ts +3 -3
  22. package/package.json +2 -2
  23. package/dist/proposal-outcome-schema.d.ts +0 -37
  24. package/dist/rule-contract.d.ts +0 -65
  25. /package/dist/{client-header-name.d.ts → contract/client-header-name.d.ts} +0 -0
  26. /package/dist/{forget-backup-schema.d.ts → contract/forget-backup-schema.d.ts} +0 -0
  27. /package/dist/{image-limits.d.ts → contract/image-limits.d.ts} +0 -0
  28. /package/dist/{image-not-found-error.d.ts → contract/image-not-found-error.d.ts} +0 -0
  29. /package/dist/{image-refused-error.d.ts → contract/image-refused-error.d.ts} +0 -0
  30. /package/dist/{is-time-zone.d.ts → contract/is-time-zone.d.ts} +0 -0
  31. /package/dist/{memory-export-contract.d.ts → contract/memory-export-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/{task-message-input-schema.d.ts → message/task-message-input-schema.d.ts} +0 -0
  39. /package/dist/{task-message-kind-schema.d.ts → message/task-message-kind-schema.d.ts} +0 -0
  40. /package/dist/{task-message-result-schema.d.ts → message/task-message-result-schema.d.ts} +0 -0
  41. /package/dist/{has-several-words.d.ts → span/has-several-words.d.ts} +0 -0
  42. /package/dist/{span-schema.d.ts → span/span-schema.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ export declare const forgettableKinds: readonly ['action.outcome', 'action.queued', 'action.retry_scheduled', 'memory.writer_failed', 'model.compaction_failed', 'model.reply', 'model.session_summarized', 'owner_message', 'policy.action_answered', 'policy.action_proposed', 'policy.contact_marked_known', 'prompts.override_rejected', 'proposals.deferred', 'session.enrolled', 'session.labelled', 'session_kept', 'skills.write_rejected', 'task.created', 'task.run_ended', 'task.run_report_requested', 'task.step_errored', 'task_message', 'tool_called', 'tool_result'];
@@ -22,6 +22,52 @@ export declare const hostContract: {
22
22
  state: z.ZodLiteral<"unknown">;
23
23
  }, z.core.$strip>], "state">;
24
24
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
25
+ nixie: {
26
+ pause: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
27
+ paused: z.ZodNullable<z.ZodObject<{
28
+ cause: z.ZodEnum<{
29
+ owner: "owner";
30
+ restore: "restore";
31
+ spending: "spending";
32
+ }>;
33
+ since: z.ZodDate;
34
+ }, z.core.$strip>>;
35
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
36
+ resume: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
37
+ paused: z.ZodNullable<z.ZodObject<{
38
+ cause: z.ZodEnum<{
39
+ owner: "owner";
40
+ restore: "restore";
41
+ spending: "spending";
42
+ }>;
43
+ since: z.ZodDate;
44
+ }, z.core.$strip>>;
45
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
46
+ };
47
+ recovery: {
48
+ read: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
49
+ recovery: z.ZodNullable<z.ZodObject<{
50
+ restoredAt: z.ZodDate;
51
+ backupTakenAt: z.ZodDate;
52
+ toCheck: z.ZodArray<z.ZodObject<{
53
+ taskID: z.ZodString;
54
+ name: z.ZodString;
55
+ stateAtBackup: z.ZodEnum<{
56
+ closed: "closed";
57
+ done: "done";
58
+ failed: "failed";
59
+ paused: "paused";
60
+ ready: "ready";
61
+ running: "running";
62
+ stopped: "stopped";
63
+ waiting: "waiting";
64
+ }>;
65
+ wasRunning: z.ZodBoolean;
66
+ pendingActions: z.ZodInt;
67
+ }, z.core.$strip>>;
68
+ }, z.core.$strip>>;
69
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
70
+ };
25
71
  tasks: {
26
72
  pause: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
27
73
  taskID: z.ZodString;
@@ -269,6 +315,7 @@ export declare const hostContract: {
269
315
  }>;
270
316
  reason: z.ZodEnum<{
271
317
  ambiguous_target: "ambiguous_target";
318
+ ask_rule: "ask_rule";
272
319
  checker_not_asserted: "checker_not_asserted";
273
320
  checker_unreachable: "checker_unreachable";
274
321
  checker_unsure: "checker_unsure";
@@ -1473,6 +1520,11 @@ export declare const hostContract: {
1473
1520
  sentence: z.ZodString;
1474
1521
  }, z.core.$strip>>;
1475
1522
  }, z.core.$strip>>;
1523
+ effectChanges: z.ZodArray<z.ZodObject<{
1524
+ tool: z.ZodString;
1525
+ remove: z.ZodArray<z.ZodString>;
1526
+ sentence: z.ZodString;
1527
+ }, z.core.$strip>>;
1476
1528
  createdAt: z.ZodDate;
1477
1529
  lapseAt: z.ZodDate;
1478
1530
  }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
@@ -1516,6 +1568,238 @@ export declare const hostContract: {
1516
1568
  }>, Record<never, never>>;
1517
1569
  };
1518
1570
  };
1571
+ actions: {
1572
+ proposals: {
1573
+ list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
1574
+ proposalID: z.ZodString;
1575
+ tool: z.ZodString;
1576
+ effects: z.ZodArray<z.ZodString>;
1577
+ cause: z.ZodEnum<{
1578
+ always_ask: "always_ask";
1579
+ ask_rule: "ask_rule";
1580
+ direct_request: "direct_request";
1581
+ no_rule: "no_rule";
1582
+ outside_steering: "outside_steering";
1583
+ repeat: "repeat";
1584
+ }>;
1585
+ sentence: z.ZodString;
1586
+ destinations: z.ZodArray<z.ZodString>;
1587
+ createdAt: z.ZodDate;
1588
+ lapseAt: z.ZodDate;
1589
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1590
+ readonly NOT_FOUND: {
1591
+ readonly message: 'nothing has that ID';
1592
+ readonly status: 404;
1593
+ };
1594
+ readonly PROPOSAL_CLOSED: {
1595
+ readonly message: 'the proposal is answered, withdrawn or lapsed';
1596
+ readonly status: 409;
1597
+ };
1598
+ }>, Record<never, never>>;
1599
+ approve: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1600
+ proposalID: z.ZodString;
1601
+ }, z.core.$strict>, z.ZodObject<{
1602
+ proposalID: z.ZodString;
1603
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1604
+ readonly NOT_FOUND: {
1605
+ readonly message: 'nothing has that ID';
1606
+ readonly status: 404;
1607
+ };
1608
+ readonly PROPOSAL_CLOSED: {
1609
+ readonly message: 'the proposal is answered, withdrawn or lapsed';
1610
+ readonly status: 409;
1611
+ };
1612
+ }>, Record<never, never>>;
1613
+ reject: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1614
+ proposalID: z.ZodString;
1615
+ reason: z.ZodOptional<z.ZodString>;
1616
+ }, z.core.$strict>, z.ZodObject<{
1617
+ proposalID: z.ZodString;
1618
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1619
+ readonly NOT_FOUND: {
1620
+ readonly message: 'nothing has that ID';
1621
+ readonly status: 404;
1622
+ };
1623
+ readonly PROPOSAL_CLOSED: {
1624
+ readonly message: 'the proposal is answered, withdrawn or lapsed';
1625
+ readonly status: 409;
1626
+ };
1627
+ }>, Record<never, never>>;
1628
+ };
1629
+ };
1630
+ contacts: {
1631
+ list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
1632
+ contactID: z.ZodString;
1633
+ name: z.ZodNullable<z.ZodString>;
1634
+ destination: z.ZodNullable<z.ZodString>;
1635
+ markedAt: z.ZodDate;
1636
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1637
+ NOT_FOUND: {
1638
+ message: string;
1639
+ status: number;
1640
+ };
1641
+ }>, Record<never, never>>;
1642
+ markKnown: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1643
+ destination: z.ZodString;
1644
+ name: z.ZodOptional<z.ZodString>;
1645
+ }, z.core.$strict>, z.ZodObject<{
1646
+ contact: z.ZodObject<{
1647
+ contactID: z.ZodString;
1648
+ name: z.ZodNullable<z.ZodString>;
1649
+ destination: z.ZodNullable<z.ZodString>;
1650
+ markedAt: z.ZodDate;
1651
+ }, z.core.$strip>;
1652
+ isNew: z.ZodBoolean;
1653
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1654
+ NOT_FOUND: {
1655
+ message: string;
1656
+ status: number;
1657
+ };
1658
+ }>, Record<never, never>>;
1659
+ unmark: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1660
+ contactID: z.ZodString;
1661
+ }, z.core.$strict>, z.ZodObject<{
1662
+ contactID: z.ZodString;
1663
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1664
+ NOT_FOUND: {
1665
+ message: string;
1666
+ status: number;
1667
+ };
1668
+ }>, Record<never, never>>;
1669
+ };
1670
+ turnInputs: {
1671
+ list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1672
+ limit: z.ZodDefault<z.ZodInt>;
1673
+ }, z.core.$strict>, z.ZodObject<{
1674
+ inputs: z.ZodArray<z.ZodObject<{
1675
+ inputID: z.ZodString;
1676
+ captureID: z.ZodString;
1677
+ taskID: z.ZodString;
1678
+ stepRunID: z.ZodString;
1679
+ writer: z.ZodString;
1680
+ counter: z.ZodInt;
1681
+ role: z.ZodString;
1682
+ profile: z.ZodString;
1683
+ model: z.ZodString;
1684
+ harness: z.ZodString;
1685
+ api: z.ZodString;
1686
+ endpoint: z.ZodString;
1687
+ route: z.ZodString;
1688
+ isRewritten: z.ZodBoolean;
1689
+ upstreamStatus: z.ZodInt;
1690
+ bytes: z.ZodInt;
1691
+ intakeSequence: z.ZodInt;
1692
+ receivedAt: z.ZodDate;
1693
+ takenAt: z.ZodDate;
1694
+ state: z.ZodEnum<{
1695
+ missing: "missing";
1696
+ removed: "removed";
1697
+ stored: "stored";
1698
+ writing: "writing";
1699
+ }>;
1700
+ removedCause: z.ZodNullable<z.ZodEnum<{
1701
+ dropped: "dropped";
1702
+ forget: "forget";
1703
+ reset: "reset";
1704
+ restore: "restore";
1705
+ retention_bytes: "retention_bytes";
1706
+ retention_days: "retention_days";
1707
+ }>>;
1708
+ }, z.core.$strip>>;
1709
+ misses: z.ZodArray<z.ZodObject<{
1710
+ missID: z.ZodString;
1711
+ captureID: z.ZodNullable<z.ZodString>;
1712
+ taskID: z.ZodString;
1713
+ stepRunID: z.ZodString;
1714
+ reason: z.ZodEnum<{
1715
+ capture_closed: "capture_closed";
1716
+ holds_own_value: "holds_own_value";
1717
+ intake_failed: "intake_failed";
1718
+ no_capture_point: "no_capture_point";
1719
+ not_received: "not_received";
1720
+ queue_full: "queue_full";
1721
+ seal_failed: "seal_failed";
1722
+ spool_full: "spool_full";
1723
+ spool_write_failed: "spool_write_failed";
1724
+ undecodable: "undecodable";
1725
+ }>;
1726
+ count: z.ZodInt;
1727
+ writer: z.ZodNullable<z.ZodString>;
1728
+ counter: z.ZodNullable<z.ZodInt>;
1729
+ createdAt: z.ZodDate;
1730
+ }, z.core.$strip>>;
1731
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1732
+ NOT_FOUND: {
1733
+ message: string;
1734
+ status: number;
1735
+ };
1736
+ REMOVED: {
1737
+ message: string;
1738
+ status: number;
1739
+ };
1740
+ OPEN_NOT_RECORDED: {
1741
+ message: string;
1742
+ status: number;
1743
+ };
1744
+ NOT_CONFIGURED: {
1745
+ message: string;
1746
+ status: number;
1747
+ };
1748
+ }>, Record<never, never>>;
1749
+ open: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1750
+ inputID: z.ZodString;
1751
+ }, z.core.$strict>, z.ZodObject<{
1752
+ inputID: z.ZodString;
1753
+ body: z.ZodBase64;
1754
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1755
+ NOT_FOUND: {
1756
+ message: string;
1757
+ status: number;
1758
+ };
1759
+ REMOVED: {
1760
+ message: string;
1761
+ status: number;
1762
+ };
1763
+ OPEN_NOT_RECORDED: {
1764
+ message: string;
1765
+ status: number;
1766
+ };
1767
+ NOT_CONFIGURED: {
1768
+ message: string;
1769
+ status: number;
1770
+ };
1771
+ }>, Record<never, never>>;
1772
+ set: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodDiscriminatedUnion<[z.ZodObject<{
1773
+ state: z.ZodLiteral<"on">;
1774
+ forMs: z.ZodNullable<z.ZodInt>;
1775
+ }, z.core.$strict>, z.ZodObject<{
1776
+ state: z.ZodLiteral<"off">;
1777
+ drop: z.ZodBoolean;
1778
+ }, z.core.$strict>], "state">, z.ZodObject<{
1779
+ state: z.ZodEnum<{
1780
+ off: "off";
1781
+ on: "on";
1782
+ }>;
1783
+ until: z.ZodNullable<z.ZodNumber>;
1784
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1785
+ NOT_FOUND: {
1786
+ message: string;
1787
+ status: number;
1788
+ };
1789
+ REMOVED: {
1790
+ message: string;
1791
+ status: number;
1792
+ };
1793
+ OPEN_NOT_RECORDED: {
1794
+ message: string;
1795
+ status: number;
1796
+ };
1797
+ NOT_CONFIGURED: {
1798
+ message: string;
1799
+ status: number;
1800
+ };
1801
+ }>, Record<never, never>>;
1802
+ };
1519
1803
  prompts: {
1520
1804
  proposals: {
1521
1805
  list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const inputMissSchema: z.ZodObject<{
3
+ missID: z.ZodString;
4
+ captureID: z.ZodNullable<z.ZodString>;
5
+ taskID: z.ZodString;
6
+ stepRunID: z.ZodString;
7
+ reason: z.ZodEnum<{
8
+ capture_closed: "capture_closed";
9
+ holds_own_value: "holds_own_value";
10
+ intake_failed: "intake_failed";
11
+ no_capture_point: "no_capture_point";
12
+ not_received: "not_received";
13
+ queue_full: "queue_full";
14
+ seal_failed: "seal_failed";
15
+ spool_full: "spool_full";
16
+ spool_write_failed: "spool_write_failed";
17
+ undecodable: "undecodable";
18
+ }>;
19
+ count: z.ZodInt;
20
+ writer: z.ZodNullable<z.ZodString>;
21
+ counter: z.ZodNullable<z.ZodInt>;
22
+ createdAt: z.ZodDate;
23
+ }, z.core.$strip>;
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const knownContactSchema: z.ZodObject<{
3
+ contactID: z.ZodString;
4
+ name: z.ZodNullable<z.ZodString>;
5
+ destination: z.ZodNullable<z.ZodString>;
6
+ markedAt: z.ZodDate;
7
+ }, z.core.$strip>;
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ export declare const loggedInputSchema: z.ZodObject<{
3
+ inputID: z.ZodString;
4
+ captureID: z.ZodString;
5
+ taskID: z.ZodString;
6
+ stepRunID: z.ZodString;
7
+ writer: z.ZodString;
8
+ counter: z.ZodInt;
9
+ role: z.ZodString;
10
+ profile: z.ZodString;
11
+ model: z.ZodString;
12
+ harness: z.ZodString;
13
+ api: z.ZodString;
14
+ endpoint: z.ZodString;
15
+ route: z.ZodString;
16
+ isRewritten: z.ZodBoolean;
17
+ upstreamStatus: z.ZodInt;
18
+ bytes: z.ZodInt;
19
+ intakeSequence: z.ZodInt;
20
+ receivedAt: z.ZodDate;
21
+ takenAt: z.ZodDate;
22
+ state: z.ZodEnum<{
23
+ missing: "missing";
24
+ removed: "removed";
25
+ stored: "stored";
26
+ writing: "writing";
27
+ }>;
28
+ removedCause: z.ZodNullable<z.ZodEnum<{
29
+ dropped: "dropped";
30
+ forget: "forget";
31
+ reset: "reset";
32
+ restore: "restore";
33
+ retention_bytes: "retention_bytes";
34
+ retention_days: "retention_days";
35
+ }>>;
36
+ }, z.core.$strip>;