@heynixie/contract 0.80.0 → 0.81.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.
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ export declare const hostBackupsContract: {
3
+ stage: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
4
+ sequence: z.ZodInt;
5
+ kind: z.ZodEnum<{
6
+ forget: "forget";
7
+ scheduled: "scheduled";
8
+ }>;
9
+ stagedAt: z.ZodDate;
10
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
11
+ BACKUP_SET_WAITING: {
12
+ message: string;
13
+ status: number;
14
+ };
15
+ BACKUPS_OFF: {
16
+ message: string;
17
+ status: number;
18
+ };
19
+ BACKUPS_NOT_STARTED: {
20
+ message: string;
21
+ status: number;
22
+ };
23
+ RESTORE_PAUSED: {
24
+ message: string;
25
+ status: number;
26
+ };
27
+ }>, Record<never, never>>;
28
+ };
@@ -88,6 +88,33 @@ export declare const hostContract: {
88
88
  }, z.core.$strip>>;
89
89
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
90
90
  };
91
+ backups: {
92
+ stage: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
93
+ sequence: z.ZodInt;
94
+ kind: z.ZodEnum<{
95
+ forget: "forget";
96
+ scheduled: "scheduled";
97
+ }>;
98
+ stagedAt: z.ZodDate;
99
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
100
+ BACKUP_SET_WAITING: {
101
+ message: string;
102
+ status: number;
103
+ };
104
+ BACKUPS_OFF: {
105
+ message: string;
106
+ status: number;
107
+ };
108
+ BACKUPS_NOT_STARTED: {
109
+ message: string;
110
+ status: number;
111
+ };
112
+ RESTORE_PAUSED: {
113
+ message: string;
114
+ status: number;
115
+ };
116
+ }>, Record<never, never>>;
117
+ };
91
118
  tasks: {
92
119
  pause: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
93
120
  taskID: z.ZodString;
package/dist/index.js CHANGED
@@ -1818,8 +1818,8 @@ var contract = {
1818
1818
  }
1819
1819
  };
1820
1820
  // src/contract/host-contract.ts
1821
- import { oc as oc7 } from "@orpc/contract";
1822
- import { z as z49 } from "zod";
1821
+ import { oc as oc8 } from "@orpc/contract";
1822
+ import { z as z50 } from "zod";
1823
1823
 
1824
1824
  // src/contract/action-proposal-schema.ts
1825
1825
  import { z as z40 } from "zod";
@@ -1848,100 +1848,128 @@ var forgottenItemsSchema = z41.object({
1848
1848
  backup: forgetBackupSchema
1849
1849
  });
1850
1850
 
1851
- // src/contract/host-budgets-contract.ts
1851
+ // src/contract/host-backups-contract.ts
1852
1852
  import { oc as oc3 } from "@orpc/contract";
1853
1853
  import { z as z42 } from "zod";
1854
- var budgets = oc3.errors({
1854
+ var hostBackupsContract = {
1855
+ stage: oc3.errors({
1856
+ BACKUP_SET_WAITING: {
1857
+ message: "a backup set waits for the backup job, so nixie stages no other set",
1858
+ status: 409
1859
+ },
1860
+ BACKUPS_OFF: {
1861
+ message: "backups are off in nixie's configuration, so nixie stages no set",
1862
+ status: 409
1863
+ },
1864
+ BACKUPS_NOT_STARTED: {
1865
+ message: "nixie has not started its backups yet; try again in a moment",
1866
+ status: 503
1867
+ },
1868
+ RESTORE_PAUSED: {
1869
+ message: "nixie is paused after a restore and stages no backup set until you read `nixie recovery` and run `nixie resume`",
1870
+ status: 409
1871
+ }
1872
+ }).output(z42.object({
1873
+ sequence: z42.int().positive(),
1874
+ kind: z42.enum(["scheduled", "forget"]),
1875
+ stagedAt: z42.date()
1876
+ }))
1877
+ };
1878
+
1879
+ // src/contract/host-budgets-contract.ts
1880
+ import { oc as oc4 } from "@orpc/contract";
1881
+ import { z as z43 } from "zod";
1882
+ var budgets = oc4.errors({
1855
1883
  BUDGETS_NOT_CONFIGURED: { message: "the server holds no budgets", status: 409 }
1856
1884
  });
1857
- var budgetStatusSchema = z42.object({
1858
- budgetID: z42.string(),
1859
- counts: z42.string(),
1860
- limitMicros: z42.number(),
1861
- period: z42.enum(["day", "week", "month"]),
1862
- spentMicros: z42.number(),
1863
- resetsAt: z42.date(),
1864
- source: z42.enum(["definitions", "built_in"])
1865
- });
1866
- var budgetChargeSchema = z42.object({
1867
- chargeID: z42.string(),
1868
- amountMicros: z42.number(),
1869
- for: z42.object({ kind: z42.string(), id: z42.string() }),
1870
- isCredited: z42.boolean()
1885
+ var budgetStatusSchema = z43.object({
1886
+ budgetID: z43.string(),
1887
+ counts: z43.string(),
1888
+ limitMicros: z43.number(),
1889
+ period: z43.enum(["day", "week", "month"]),
1890
+ spentMicros: z43.number(),
1891
+ resetsAt: z43.date(),
1892
+ source: z43.enum(["definitions", "built_in"])
1893
+ });
1894
+ var budgetChargeSchema = z43.object({
1895
+ chargeID: z43.string(),
1896
+ amountMicros: z43.number(),
1897
+ for: z43.object({ kind: z43.string(), id: z43.string() }),
1898
+ isCredited: z43.boolean()
1871
1899
  });
1872
1900
  var hostBudgetsContract = {
1873
- list: budgets.output(z42.array(budgetStatusSchema)),
1874
- ledger: budgets.errors({ NOT_FOUND: { message: "no budget has that ID", status: 404 } }).input(z42.strictObject({ budgetID: z42.string().min(1) })).output(z42.object({
1875
- budgetID: z42.string(),
1876
- periodStart: z42.string(),
1877
- resetsAt: z42.date(),
1878
- spentMicros: z42.number(),
1879
- charges: z42.array(budgetChargeSchema)
1901
+ list: budgets.output(z43.array(budgetStatusSchema)),
1902
+ ledger: budgets.errors({ NOT_FOUND: { message: "no budget has that ID", status: 404 } }).input(z43.strictObject({ budgetID: z43.string().min(1) })).output(z43.object({
1903
+ budgetID: z43.string(),
1904
+ periodStart: z43.string(),
1905
+ resetsAt: z43.date(),
1906
+ spentMicros: z43.number(),
1907
+ charges: z43.array(budgetChargeSchema)
1880
1908
  }))
1881
1909
  };
1882
1910
 
1883
1911
  // src/contract/host-mandates-contract.ts
1884
- import { oc as oc4 } from "@orpc/contract";
1885
- import { z as z43 } from "zod";
1886
- var mandates = oc4.errors({
1912
+ import { oc as oc5 } from "@orpc/contract";
1913
+ import { z as z44 } from "zod";
1914
+ var mandates = oc5.errors({
1887
1915
  NOT_FOUND: { message: "no mandate has that ID", status: 404 }
1888
1916
  });
1889
- var hostMandateRuleSchema = z43.object({ ruleID: z43.string(), sentence: z43.string() });
1890
- var hostMandateSchema = z43.object({
1891
- mandateID: z43.string(),
1892
- title: z43.string().nullable(),
1893
- rules: z43.array(hostMandateRuleSchema),
1894
- startedAt: z43.date(),
1895
- expires: z43.date()
1917
+ var hostMandateRuleSchema = z44.object({ ruleID: z44.string(), sentence: z44.string() });
1918
+ var hostMandateSchema = z44.object({
1919
+ mandateID: z44.string(),
1920
+ title: z44.string().nullable(),
1921
+ rules: z44.array(hostMandateRuleSchema),
1922
+ startedAt: z44.date(),
1923
+ expires: z44.date()
1896
1924
  });
1897
1925
  var hostMandatesContract = {
1898
- list: mandates.output(z43.array(hostMandateSchema)),
1899
- end: mandates.input(z43.strictObject({ mandateID: z43.string().min(1) })).output(z43.object({ mandateID: z43.string(), state: z43.enum(["ended", "expired"]) }))
1926
+ list: mandates.output(z44.array(hostMandateSchema)),
1927
+ end: mandates.input(z44.strictObject({ mandateID: z44.string().min(1) })).output(z44.object({ mandateID: z44.string(), state: z44.enum(["ended", "expired"]) }))
1900
1928
  };
1901
1929
 
1902
1930
  // src/contract/host-passkey-contract.ts
1903
- import { oc as oc5 } from "@orpc/contract";
1904
- import { z as z44 } from "zod";
1905
- var hostPasskeySchema = z44.object({
1906
- passkeyID: z44.string(),
1907
- label: z44.string(),
1908
- synced: z44.boolean(),
1909
- origin: z44.string(),
1910
- registeredBy: z44.string(),
1911
- authorizedBy: z44.string(),
1912
- registeredAt: z44.date(),
1913
- lastUsedAt: z44.date().nullable(),
1914
- revokedAt: z44.date().nullable()
1931
+ import { oc as oc6 } from "@orpc/contract";
1932
+ import { z as z45 } from "zod";
1933
+ var hostPasskeySchema = z45.object({
1934
+ passkeyID: z45.string(),
1935
+ label: z45.string(),
1936
+ synced: z45.boolean(),
1937
+ origin: z45.string(),
1938
+ registeredBy: z45.string(),
1939
+ authorizedBy: z45.string(),
1940
+ registeredAt: z45.date(),
1941
+ lastUsedAt: z45.date().nullable(),
1942
+ revokedAt: z45.date().nullable()
1915
1943
  });
1916
1944
  var hostPasskeyContract = {
1917
- issueCode: oc5.output(z44.object({ code: z44.string(), expiresAt: z44.date() })),
1918
- list: oc5.output(z44.array(hostPasskeySchema)),
1919
- revoke: oc5.errors({
1945
+ issueCode: oc6.output(z45.object({ code: z45.string(), expiresAt: z45.date() })),
1946
+ list: oc6.output(z45.array(hostPasskeySchema)),
1947
+ revoke: oc6.errors({
1920
1948
  PASSKEY_NOT_FOUND: { message: "no passkey has that ID", status: 404 }
1921
- }).input(z44.strictObject({ passkeyID: z44.string().min(1) })).output(z44.object({ passkeyID: z44.string(), revokedAt: z44.date() }))
1949
+ }).input(z45.strictObject({ passkeyID: z45.string().min(1) })).output(z45.object({ passkeyID: z45.string(), revokedAt: z45.date() }))
1922
1950
  };
1923
1951
 
1924
1952
  // src/contract/known-contact-schema.ts
1925
- import { z as z45 } from "zod";
1926
- var knownContactSchema = z45.object({
1927
- contactID: z45.string(),
1928
- name: z45.string().nullable(),
1929
- destination: z45.string().nullable(),
1930
- markedAt: z45.date()
1953
+ import { z as z46 } from "zod";
1954
+ var knownContactSchema = z46.object({
1955
+ contactID: z46.string(),
1956
+ name: z46.string().nullable(),
1957
+ destination: z46.string().nullable(),
1958
+ markedAt: z46.date()
1931
1959
  });
1932
1960
 
1933
1961
  // src/contract/turn-inputs-contract.ts
1934
- import { oc as oc6 } from "@orpc/contract";
1935
- import { z as z48 } from "zod";
1962
+ import { oc as oc7 } from "@orpc/contract";
1963
+ import { z as z49 } from "zod";
1936
1964
 
1937
1965
  // src/contract/input-miss-schema.ts
1938
- import { z as z46 } from "zod";
1939
- var inputMissSchema = z46.object({
1940
- missID: z46.string(),
1941
- captureID: z46.string().nullable(),
1942
- taskID: z46.string(),
1943
- stepRunID: z46.string(),
1944
- reason: z46.enum([
1966
+ import { z as z47 } from "zod";
1967
+ var inputMissSchema = z47.object({
1968
+ missID: z47.string(),
1969
+ captureID: z47.string().nullable(),
1970
+ taskID: z47.string(),
1971
+ stepRunID: z47.string(),
1972
+ reason: z47.enum([
1945
1973
  "queue_full",
1946
1974
  "spool_full",
1947
1975
  "spool_write_failed",
@@ -1953,46 +1981,46 @@ var inputMissSchema = z46.object({
1953
1981
  "intake_failed",
1954
1982
  "holds_own_value"
1955
1983
  ]),
1956
- count: z46.int().positive(),
1957
- writer: z46.string().nullable(),
1958
- counter: z46.int().nullable(),
1959
- createdAt: z46.date()
1984
+ count: z47.int().positive(),
1985
+ writer: z47.string().nullable(),
1986
+ counter: z47.int().nullable(),
1987
+ createdAt: z47.date()
1960
1988
  });
1961
1989
 
1962
1990
  // src/contract/logged-input-schema.ts
1963
- import { z as z47 } from "zod";
1964
- var loggedInputSchema = z47.object({
1965
- inputID: z47.string(),
1966
- captureID: z47.string(),
1967
- taskID: z47.string(),
1968
- stepRunID: z47.string(),
1969
- writer: z47.string(),
1970
- counter: z47.int(),
1971
- role: z47.string(),
1972
- profile: z47.string(),
1973
- model: z47.string(),
1974
- harness: z47.string(),
1975
- api: z47.string(),
1976
- endpoint: z47.string(),
1977
- route: z47.string(),
1978
- isRewritten: z47.boolean(),
1979
- upstreamStatus: z47.int(),
1980
- bytes: z47.int(),
1981
- intakeSequence: z47.int(),
1982
- receivedAt: z47.date(),
1983
- takenAt: z47.date(),
1984
- state: z47.enum(["writing", "stored", "missing", "removed"]),
1985
- removedCause: z47.enum(["retention_days", "retention_bytes", "forget", "dropped", "restore", "reset"]).nullable()
1991
+ import { z as z48 } from "zod";
1992
+ var loggedInputSchema = z48.object({
1993
+ inputID: z48.string(),
1994
+ captureID: z48.string(),
1995
+ taskID: z48.string(),
1996
+ stepRunID: z48.string(),
1997
+ writer: z48.string(),
1998
+ counter: z48.int(),
1999
+ role: z48.string(),
2000
+ profile: z48.string(),
2001
+ model: z48.string(),
2002
+ harness: z48.string(),
2003
+ api: z48.string(),
2004
+ endpoint: z48.string(),
2005
+ route: z48.string(),
2006
+ isRewritten: z48.boolean(),
2007
+ upstreamStatus: z48.int(),
2008
+ bytes: z48.int(),
2009
+ intakeSequence: z48.int(),
2010
+ receivedAt: z48.date(),
2011
+ takenAt: z48.date(),
2012
+ state: z48.enum(["writing", "stored", "missing", "removed"]),
2013
+ removedCause: z48.enum(["retention_days", "retention_bytes", "forget", "dropped", "restore", "reset"]).nullable()
1986
2014
  });
1987
2015
 
1988
2016
  // src/contract/turn-inputs-contract.ts
1989
- var turnInputOn = z48.strictObject({
1990
- state: z48.literal("on"),
1991
- forMs: z48.int().positive().nullable()
2017
+ var turnInputOn = z49.strictObject({
2018
+ state: z49.literal("on"),
2019
+ forMs: z49.int().positive().nullable()
1992
2020
  });
1993
- var turnInputOff = z48.strictObject({ state: z48.literal("off"), drop: z48.boolean() });
1994
- var turnInputSetSchema = z48.discriminatedUnion("state", [turnInputOn, turnInputOff]);
1995
- var turnInputs = oc6.errors({
2021
+ var turnInputOff = z49.strictObject({ state: z49.literal("off"), drop: z49.boolean() });
2022
+ var turnInputSetSchema = z49.discriminatedUnion("state", [turnInputOn, turnInputOff]);
2023
+ var turnInputs = oc7.errors({
1996
2024
  NOT_FOUND: { message: "no logged request has that ID", status: 404 },
1997
2025
  REMOVED: { message: "that request is removed or its body is missing", status: 410 },
1998
2026
  OPEN_NOT_RECORDED: {
@@ -2001,27 +2029,27 @@ var turnInputs = oc6.errors({
2001
2029
  },
2002
2030
  NOT_CONFIGURED: { message: "the turn-input log is not configured", status: 409 }
2003
2031
  });
2004
- var listedInputsSchema = z48.object({
2005
- inputs: z48.array(loggedInputSchema),
2006
- misses: z48.array(inputMissSchema)
2032
+ var listedInputsSchema = z49.object({
2033
+ inputs: z49.array(loggedInputSchema),
2034
+ misses: z49.array(inputMissSchema)
2007
2035
  });
2008
2036
  var turnInputsContract = {
2009
- list: turnInputs.input(z48.strictObject({ limit: z48.int().positive().max(500).default(50) })).output(listedInputsSchema),
2010
- open: turnInputs.input(z48.strictObject({ inputID: z48.string().min(1) })).output(z48.object({ inputID: z48.string(), body: z48.base64() })),
2011
- set: turnInputs.input(turnInputSetSchema).output(z48.object({ state: z48.enum(["on", "off"]), until: z48.number().nullable() }))
2037
+ list: turnInputs.input(z49.strictObject({ limit: z49.int().positive().max(500).default(50) })).output(listedInputsSchema),
2038
+ open: turnInputs.input(z49.strictObject({ inputID: z49.string().min(1) })).output(z49.object({ inputID: z49.string(), body: z49.base64() })),
2039
+ set: turnInputs.input(turnInputSetSchema).output(z49.object({ state: z49.enum(["on", "off"]), until: z49.number().nullable() }))
2012
2040
  };
2013
2041
 
2014
2042
  // src/contract/host-contract.ts
2015
- var versionRefSchema2 = z49.object({ itemID: z49.string(), version: z49.int().positive() });
2016
- var versionTargetSchema2 = z49.strictObject({
2017
- itemID: z49.string().min(1),
2018
- version: z49.int().positive()
2019
- });
2020
- var itemTextSchema = z49.string().max(2000).regex(/\S/u);
2021
- var proposalOriginSchema2 = z49.enum(["owner", "conversation", "task"]);
2022
- var memoryOriginSchema = z49.enum([...proposalOriginSchema2.options, "lapse"]);
2023
- var contentSourceSchema = z49.enum(["owner", "owner_data", "untrusted"]);
2024
- var reviewReasonSchema2 = z49.enum([
2043
+ var versionRefSchema2 = z50.object({ itemID: z50.string(), version: z50.int().positive() });
2044
+ var versionTargetSchema2 = z50.strictObject({
2045
+ itemID: z50.string().min(1),
2046
+ version: z50.int().positive()
2047
+ });
2048
+ var itemTextSchema = z50.string().max(2000).regex(/\S/u);
2049
+ var proposalOriginSchema2 = z50.enum(["owner", "conversation", "task"]);
2050
+ var memoryOriginSchema = z50.enum([...proposalOriginSchema2.options, "lapse"]);
2051
+ var contentSourceSchema = z50.enum(["owner", "owner_data", "untrusted"]);
2052
+ var reviewReasonSchema2 = z50.enum([
2025
2053
  "no_quote",
2026
2054
  "quote_not_typed",
2027
2055
  "quote_in_quoted_block",
@@ -2040,70 +2068,70 @@ var reviewReasonSchema2 = z49.enum([
2040
2068
  "labels",
2041
2069
  "ask_rule"
2042
2070
  ]);
2043
- var proposalSourceSchema2 = z49.object({
2071
+ var proposalSourceSchema2 = z50.object({
2044
2072
  origin: proposalOriginSchema2,
2045
- thread: z49.string().nullable(),
2046
- proposedAt: z49.date()
2047
- });
2048
- var pendingProposalSchema = z49.object({
2049
- proposalID: z49.string(),
2050
- operation: z49.enum(["remember", "retire", "pin"]),
2051
- itemID: z49.string(),
2052
- targetVersion: z49.int().nullable(),
2053
- isPinned: z49.boolean(),
2054
- subject: z49.enum(["owner", "self", "shared"]),
2055
- newSubject: z49.enum(["owner", "self", "shared"]).nullable(),
2056
- kind: z49.enum(["fact", "self"]),
2073
+ thread: z50.string().nullable(),
2074
+ proposedAt: z50.date()
2075
+ });
2076
+ var pendingProposalSchema = z50.object({
2077
+ proposalID: z50.string(),
2078
+ operation: z50.enum(["remember", "retire", "pin"]),
2079
+ itemID: z50.string(),
2080
+ targetVersion: z50.int().nullable(),
2081
+ isPinned: z50.boolean(),
2082
+ subject: z50.enum(["owner", "self", "shared"]),
2083
+ newSubject: z50.enum(["owner", "self", "shared"]).nullable(),
2084
+ kind: z50.enum(["fact", "self"]),
2057
2085
  reason: reviewReasonSchema2,
2058
- actionHash: z49.string(),
2086
+ actionHash: z50.string(),
2059
2087
  origin: proposalOriginSchema2,
2060
2088
  source: contentSourceSchema,
2061
- createdAt: z49.date(),
2062
- lapseAt: z49.date(),
2063
- sources: z49.array(proposalSourceSchema2),
2064
- text: z49.string(),
2065
- quote: z49.string().nullable()
2066
- });
2067
- var closeMatchSchema2 = z49.object({ itemID: z49.string(), version: z49.int(), text: z49.string() });
2068
- var approvalResultSchema = z49.discriminatedUnion("status", [
2069
- z49.object({ status: z49.literal("applied"), itemID: z49.string(), version: z49.int() }),
2070
- z49.object({ status: z49.literal("close_match"), item: closeMatchSchema2 })
2089
+ createdAt: z50.date(),
2090
+ lapseAt: z50.date(),
2091
+ sources: z50.array(proposalSourceSchema2),
2092
+ text: z50.string(),
2093
+ quote: z50.string().nullable()
2094
+ });
2095
+ var closeMatchSchema2 = z50.object({ itemID: z50.string(), version: z50.int(), text: z50.string() });
2096
+ var approvalResultSchema = z50.discriminatedUnion("status", [
2097
+ z50.object({ status: z50.literal("applied"), itemID: z50.string(), version: z50.int() }),
2098
+ z50.object({ status: z50.literal("close_match"), item: closeMatchSchema2 })
2071
2099
  ]);
2072
- var historyVersionSchema = z49.object({
2073
- version: z49.int(),
2074
- change: z49.enum(["created", "edited", "retired", "restored", "undone"]),
2075
- state: z49.enum(["active", "retired"]),
2100
+ var historyVersionSchema = z50.object({
2101
+ version: z50.int(),
2102
+ change: z50.enum(["created", "edited", "retired", "restored", "undone"]),
2103
+ state: z50.enum(["active", "retired"]),
2076
2104
  origin: memoryOriginSchema,
2077
2105
  source: contentSourceSchema,
2078
- recordedAt: z49.date(),
2079
- isRemoved: z49.boolean(),
2080
- isBridge: z49.boolean(),
2081
- status: z49.enum(["readable", "shredded", "unreadable"]),
2082
- text: z49.string().nullable()
2083
- });
2084
- var itemHistorySchema = z49.object({
2085
- itemID: z49.string(),
2086
- subject: z49.enum(["owner", "self", "shared"]),
2087
- kind: z49.enum(["fact", "self"]),
2088
- state: z49.enum(["active", "retired", "forgetting", "forgotten"]),
2089
- versions: z49.array(historyVersionSchema)
2090
- });
2091
- var proposalAnswerSchema = z49.strictObject({
2092
- proposalID: z49.string().min(1),
2093
- actionHash: z49.string().min(1)
2094
- });
2095
- var hostSessionSchema = z49.object({
2096
- sessionID: z49.string(),
2097
- deviceName: z49.string(),
2098
- createdAt: z49.date(),
2099
- lastUsedAt: z49.date()
2100
- });
2101
- var subjectCountSchema = z49.object({
2102
- owner: z49.int().nonnegative(),
2103
- shared: z49.int().nonnegative(),
2104
- self: z49.int().nonnegative()
2105
- });
2106
- var memory = oc7.errors({
2106
+ recordedAt: z50.date(),
2107
+ isRemoved: z50.boolean(),
2108
+ isBridge: z50.boolean(),
2109
+ status: z50.enum(["readable", "shredded", "unreadable"]),
2110
+ text: z50.string().nullable()
2111
+ });
2112
+ var itemHistorySchema = z50.object({
2113
+ itemID: z50.string(),
2114
+ subject: z50.enum(["owner", "self", "shared"]),
2115
+ kind: z50.enum(["fact", "self"]),
2116
+ state: z50.enum(["active", "retired", "forgetting", "forgotten"]),
2117
+ versions: z50.array(historyVersionSchema)
2118
+ });
2119
+ var proposalAnswerSchema = z50.strictObject({
2120
+ proposalID: z50.string().min(1),
2121
+ actionHash: z50.string().min(1)
2122
+ });
2123
+ var hostSessionSchema = z50.object({
2124
+ sessionID: z50.string(),
2125
+ deviceName: z50.string(),
2126
+ createdAt: z50.date(),
2127
+ lastUsedAt: z50.date()
2128
+ });
2129
+ var subjectCountSchema = z50.object({
2130
+ owner: z50.int().nonnegative(),
2131
+ shared: z50.int().nonnegative(),
2132
+ self: z50.int().nonnegative()
2133
+ });
2134
+ var memory = oc8.errors({
2107
2135
  MEMORY_NOT_STARTED: { message: "the memory store has not started yet", status: 503 },
2108
2136
  NOT_FOUND: { message: "nothing has that ID", status: 404 },
2109
2137
  PROPOSAL_HASH: { message: "the action hash names another proposal", status: 409 },
@@ -2116,30 +2144,30 @@ var memory = oc7.errors({
2116
2144
  PIN_EDIT: { message: "a pin takes no edited text", status: 400 },
2117
2145
  SELF_NOTE_REFUSED: { message: "a self-note never takes that change", status: 409 }
2118
2146
  });
2119
- var skillFileSchema = z49.object({ path: z49.string(), text: z49.string() });
2120
- var pendingSkillProposalSchema = z49.object({
2121
- proposalID: z49.string(),
2122
- name: z49.string(),
2123
- skillHash: z49.string(),
2124
- baseHash: z49.string().nullable(),
2125
- files: z49.array(skillFileSchema),
2126
- inForce: z49.object({
2127
- skillHash: z49.string(),
2128
- origin: z49.enum(["definitions", "vendored", "nixie"]),
2129
- files: z49.array(skillFileSchema)
2147
+ var skillFileSchema = z50.object({ path: z50.string(), text: z50.string() });
2148
+ var pendingSkillProposalSchema = z50.object({
2149
+ proposalID: z50.string(),
2150
+ name: z50.string(),
2151
+ skillHash: z50.string(),
2152
+ baseHash: z50.string().nullable(),
2153
+ files: z50.array(skillFileSchema),
2154
+ inForce: z50.object({
2155
+ skillHash: z50.string(),
2156
+ origin: z50.enum(["definitions", "vendored", "nixie"]),
2157
+ files: z50.array(skillFileSchema)
2130
2158
  }).nullable(),
2131
- untypedToken: z49.object({ kind: z49.string(), raw: z49.string() }).nullable(),
2132
- thread: z49.string().nullable(),
2133
- provenance: z49.object({ runID: z49.string(), callID: z49.string(), profile: z49.string() }),
2134
- createdAt: z49.date(),
2135
- lapseAt: z49.date(),
2136
- isStale: z49.boolean()
2137
- });
2138
- var skillAnswerSchema = z49.strictObject({
2139
- proposalID: z49.string().min(1),
2140
- skillHash: z49.string().min(1)
2141
- });
2142
- var skills = oc7.errors({
2159
+ untypedToken: z50.object({ kind: z50.string(), raw: z50.string() }).nullable(),
2160
+ thread: z50.string().nullable(),
2161
+ provenance: z50.object({ runID: z50.string(), callID: z50.string(), profile: z50.string() }),
2162
+ createdAt: z50.date(),
2163
+ lapseAt: z50.date(),
2164
+ isStale: z50.boolean()
2165
+ });
2166
+ var skillAnswerSchema = z50.strictObject({
2167
+ proposalID: z50.string().min(1),
2168
+ skillHash: z50.string().min(1)
2169
+ });
2170
+ var skills = oc8.errors({
2143
2171
  NOT_FOUND: { message: "nothing has that ID", status: 404 },
2144
2172
  PROPOSAL_HASH: { message: "the skill hash names other files", status: 409 },
2145
2173
  PROPOSAL_CLOSED: { message: "the proposal is answered or lapsed", status: 409 },
@@ -2147,103 +2175,103 @@ var skills = oc7.errors({
2147
2175
  SKILL_CHECK: { message: "the files fail the seed checks", status: 400 },
2148
2176
  WRONG_STATE: { message: "the skill nixie wrote is no longer in force", status: 409 }
2149
2177
  });
2150
- var definitionsSkillSchema = z49.object({ skillHash: z49.string(), origin: z49.enum(["definitions", "vendored"]) }).nullable();
2151
- var writtenSkillSchema = z49.object({
2152
- approvalID: z49.string(),
2153
- proposalID: z49.string(),
2154
- name: z49.string(),
2155
- skillHash: z49.string(),
2178
+ var definitionsSkillSchema = z50.object({ skillHash: z50.string(), origin: z50.enum(["definitions", "vendored"]) }).nullable();
2179
+ var writtenSkillSchema = z50.object({
2180
+ approvalID: z50.string(),
2181
+ proposalID: z50.string(),
2182
+ name: z50.string(),
2183
+ skillHash: z50.string(),
2156
2184
  base: definitionsSkillSchema,
2157
2185
  definitions: definitionsSkillSchema,
2158
- isConflict: z49.boolean(),
2159
- pullRequestURL: z49.url().nullable(),
2160
- approvedAt: z49.date()
2161
- });
2162
- var promptPartFileSchema = z49.object({ path: z49.string(), text: z49.string() });
2163
- var promptEntrySchema = z49.record(z49.string(), z49.string());
2164
- var pendingPromptProposalSchema = z49.object({
2165
- proposalID: z49.string(),
2166
- promptID: z49.string(),
2167
- proposalHash: z49.string(),
2168
- baseHash: z49.string().nullable(),
2186
+ isConflict: z50.boolean(),
2187
+ pullRequestURL: z50.url().nullable(),
2188
+ approvedAt: z50.date()
2189
+ });
2190
+ var promptPartFileSchema = z50.object({ path: z50.string(), text: z50.string() });
2191
+ var promptEntrySchema = z50.record(z50.string(), z50.string());
2192
+ var pendingPromptProposalSchema = z50.object({
2193
+ proposalID: z50.string(),
2194
+ promptID: z50.string(),
2195
+ proposalHash: z50.string(),
2196
+ baseHash: z50.string().nullable(),
2169
2197
  entry: promptEntrySchema,
2170
- files: z49.array(promptPartFileSchema),
2171
- reason: z49.string(),
2172
- inForce: z49.object({ parts: promptEntrySchema, template: z49.string().nullable() }).nullable(),
2173
- thread: z49.string().nullable(),
2174
- provenance: z49.object({ runID: z49.string(), callID: z49.string(), profile: z49.string() }),
2175
- createdAt: z49.date(),
2176
- lapseAt: z49.date(),
2177
- isStale: z49.boolean()
2178
- });
2179
- var promptAnswerSchema = z49.strictObject({
2180
- proposalID: z49.string().min(1),
2181
- proposalHash: z49.string().min(1)
2182
- });
2183
- var prompts = oc7.errors({
2198
+ files: z50.array(promptPartFileSchema),
2199
+ reason: z50.string(),
2200
+ inForce: z50.object({ parts: promptEntrySchema, template: z50.string().nullable() }).nullable(),
2201
+ thread: z50.string().nullable(),
2202
+ provenance: z50.object({ runID: z50.string(), callID: z50.string(), profile: z50.string() }),
2203
+ createdAt: z50.date(),
2204
+ lapseAt: z50.date(),
2205
+ isStale: z50.boolean()
2206
+ });
2207
+ var promptAnswerSchema = z50.strictObject({
2208
+ proposalID: z50.string().min(1),
2209
+ proposalHash: z50.string().min(1)
2210
+ });
2211
+ var prompts = oc8.errors({
2184
2212
  NOT_FOUND: { message: "nothing has that ID", status: 404 },
2185
2213
  PROPOSAL_HASH: { message: "the proposal hash names another override", status: 409 },
2186
2214
  PROPOSAL_CLOSED: { message: "the proposal is answered or lapsed", status: 409 },
2187
2215
  STALE_BASE: { message: "the override in force moved past the proposal", status: 409 },
2188
2216
  PROMPT_CHECK: { message: "the override fails the definitions checks", status: 400 }
2189
2217
  });
2190
- var ruleVersionSchema = z49.object({ ruleHash: z49.string(), sentence: z49.string() }).nullable();
2191
- var ruleInForceSchema = z49.object({
2192
- ruleID: z49.string(),
2193
- revision: z49.int().positive(),
2194
- ruleHash: z49.string(),
2195
- sentence: z49.string(),
2196
- origin: z49.enum(["definitions", "nixie"]),
2197
- changeID: z49.string().nullable(),
2198
- lastFiredAt: z49.date().nullable()
2199
- });
2200
- var ruleConflictSchema = z49.object({
2201
- ruleID: z49.string(),
2202
- changeID: z49.string(),
2218
+ var ruleVersionSchema = z50.object({ ruleHash: z50.string(), sentence: z50.string() }).nullable();
2219
+ var ruleInForceSchema = z50.object({
2220
+ ruleID: z50.string(),
2221
+ revision: z50.int().positive(),
2222
+ ruleHash: z50.string(),
2223
+ sentence: z50.string(),
2224
+ origin: z50.enum(["definitions", "nixie"]),
2225
+ changeID: z50.string().nullable(),
2226
+ lastFiredAt: z50.date().nullable()
2227
+ });
2228
+ var ruleConflictSchema = z50.object({
2229
+ ruleID: z50.string(),
2230
+ changeID: z50.string(),
2203
2231
  nixie: ruleVersionSchema,
2204
2232
  repo: ruleVersionSchema,
2205
2233
  base: ruleVersionSchema,
2206
- changedBy: z49.enum(["owner", "nixie"]),
2207
- reason: z49.string(),
2208
- changedAt: z49.date()
2234
+ changedBy: z50.enum(["owner", "nixie"]),
2235
+ reason: z50.string(),
2236
+ changedAt: z50.date()
2209
2237
  });
2210
- var ruleProposalChangeSchema = z49.object({
2211
- ruleID: z49.string(),
2238
+ var ruleProposalChangeSchema = z50.object({
2239
+ ruleID: z50.string(),
2212
2240
  before: ruleVersionSchema,
2213
2241
  after: ruleVersionSchema
2214
2242
  });
2215
- var effectChangeSchema = z49.object({
2216
- tool: z49.string(),
2217
- remove: z49.array(z49.string()),
2218
- sentence: z49.string()
2243
+ var effectChangeSchema = z50.object({
2244
+ tool: z50.string(),
2245
+ remove: z50.array(z50.string()),
2246
+ sentence: z50.string()
2219
2247
  });
2220
- var pendingRuleProposalSchema = z49.object({
2221
- proposalID: z49.string(),
2222
- changes: z49.array(ruleProposalChangeSchema),
2223
- effectChanges: z49.array(effectChangeSchema),
2224
- createdAt: z49.date(),
2225
- lapseAt: z49.date()
2248
+ var pendingRuleProposalSchema = z50.object({
2249
+ proposalID: z50.string(),
2250
+ changes: z50.array(ruleProposalChangeSchema),
2251
+ effectChanges: z50.array(effectChangeSchema),
2252
+ createdAt: z50.date(),
2253
+ lapseAt: z50.date()
2226
2254
  });
2227
- var ruleProposalAnswerSchema = z49.strictObject({ proposalID: z49.string().min(1) });
2255
+ var ruleProposalAnswerSchema = z50.strictObject({ proposalID: z50.string().min(1) });
2228
2256
  var ruleProposalRejectionSchema = ruleProposalAnswerSchema.extend({
2229
- reason: z49.string().max(500).regex(/\S/u)
2257
+ reason: z50.string().max(500).regex(/\S/u)
2230
2258
  });
2231
2259
  var actionRejectionSchema = ruleProposalAnswerSchema.extend({
2232
- reason: z49.string().max(500).regex(/\S/u).optional()
2260
+ reason: z50.string().max(500).regex(/\S/u).optional()
2233
2261
  });
2234
2262
  var ruleProposalErrors = {
2235
2263
  NOT_FOUND: { message: "nothing has that ID", status: 404 },
2236
2264
  PROPOSAL_CLOSED: { message: "the proposal is answered, withdrawn or lapsed", status: 409 }
2237
2265
  };
2238
- var rules = oc7.errors(ruleProposalErrors);
2239
- var definitions = oc7.errors({
2266
+ var rules = oc8.errors(ruleProposalErrors);
2267
+ var definitions = oc8.errors({
2240
2268
  NOT_FOUND: { message: "the definition has no conflict with the repo", status: 404 },
2241
2269
  DEFINITIONS_NOT_STARTED: { message: "nixie has not started its definitions yet", status: 503 }
2242
2270
  });
2243
- var contacts = oc7.errors({
2271
+ var contacts = oc8.errors({
2244
2272
  NOT_FOUND: { message: "no known contact has that ID", status: 404 }
2245
2273
  });
2246
- var hostTaskStateSchema = z49.enum([
2274
+ var hostTaskStateSchema = z50.enum([
2247
2275
  "ready",
2248
2276
  "running",
2249
2277
  "waiting",
@@ -2254,7 +2282,7 @@ var hostTaskStateSchema = z49.enum([
2254
2282
  "closed"
2255
2283
  ]);
2256
2284
  var spendStopErrors2 = { SPEND_STOP_STANDS: spendStopStandsError };
2257
- var taskControl2 = oc7.errors({
2285
+ var taskControl2 = oc8.errors({
2258
2286
  TASK_NOT_FOUND: { message: "no task has that ID", status: 404 },
2259
2287
  TASK_STATE_REFUSED: {
2260
2288
  message: "the task is in a state that does not take this control",
@@ -2264,40 +2292,41 @@ var taskControl2 = oc7.errors({
2264
2292
  message: "the runner of the task does not take this control",
2265
2293
  status: 409
2266
2294
  }
2267
- }).input(z49.strictObject({ taskID: z49.string().min(1) })).output(z49.object({
2268
- taskID: z49.string(),
2295
+ }).input(z50.strictObject({ taskID: z50.string().min(1) })).output(z50.object({
2296
+ taskID: z50.string(),
2269
2297
  state: hostTaskStateSchema,
2270
- isPauseRequested: z49.boolean()
2298
+ isPauseRequested: z50.boolean()
2271
2299
  }));
2272
2300
  var hostContract = {
2273
- reset: oc7.output(z49.object({
2274
- resetAt: z49.date(),
2275
- lastSequence: z49.int().nonnegative(),
2276
- keptSessions: z49.int().nonnegative()
2301
+ reset: oc8.output(z50.object({
2302
+ resetAt: z50.date(),
2303
+ lastSequence: z50.int().nonnegative(),
2304
+ keptSessions: z50.int().nonnegative()
2277
2305
  })),
2278
- resetConversations: oc7.output(z49.object({
2279
- resetAt: z49.date(),
2280
- lastSequence: z49.int().nonnegative(),
2281
- shreddedRecords: z49.int().nonnegative(),
2306
+ resetConversations: oc8.output(z50.object({
2307
+ resetAt: z50.date(),
2308
+ lastSequence: z50.int().nonnegative(),
2309
+ shreddedRecords: z50.int().nonnegative(),
2282
2310
  backup: forgetBackupSchema
2283
2311
  })),
2284
2312
  nixie: {
2285
- pause: oc7.output(z49.object({ paused: pauseStateSchema })),
2286
- resume: oc7.errors(spendStopErrors2).output(z49.object({ paused: pauseStateSchema }))
2313
+ pause: oc8.output(z50.object({ paused: pauseStateSchema })),
2314
+ resume: oc8.errors(spendStopErrors2).output(z50.object({ paused: pauseStateSchema }))
2287
2315
  },
2288
2316
  spend: {
2289
- raise: oc7.errors({
2317
+ raise: oc8.errors({
2290
2318
  SPEND_NOT_CONFIGURED: { message: "the config sets no spendStop", status: 409 }
2291
- }).input(z49.strictObject({ turns: z49.int().positive() })).output(z49.object({
2292
- start: z49.string(),
2293
- dollars: z49.number(),
2294
- tokens: z49.number(),
2295
- turns: z49.number()
2319
+ }).input(z50.strictObject({ turns: z50.int().positive() })).output(z50.object({
2320
+ start: z50.string(),
2321
+ dollars: z50.number(),
2322
+ tokens: z50.number(),
2323
+ turns: z50.number()
2296
2324
  }))
2297
2325
  },
2298
2326
  recovery: {
2299
- read: oc7.output(z49.object({ recovery: recoverySchema }))
2327
+ read: oc8.output(z50.object({ recovery: recoverySchema }))
2300
2328
  },
2329
+ backups: hostBackupsContract,
2301
2330
  tasks: {
2302
2331
  pause: taskControl2,
2303
2332
  resume: taskControl2.errors(spendStopErrors2),
@@ -2311,114 +2340,114 @@ var hostContract = {
2311
2340
  }
2312
2341
  }),
2313
2342
  interrupt: taskControl2,
2314
- raise: oc7.errors({
2343
+ raise: oc8.errors({
2315
2344
  TASK_NOT_FOUND: { message: "no task has that ID", status: 404 },
2316
2345
  TASK_NOT_AT_LIMIT: { message: "the task is not paused at its limit", status: 409 },
2317
2346
  LIMIT_NOT_RAISED: { message: "the new limits are not above the old ones", status: 409 }
2318
- }).input(z49.strictObject({
2319
- taskID: z49.string().min(1),
2320
- turns: z49.int().positive().optional(),
2321
- dollars: z49.number().positive().optional()
2347
+ }).input(z50.strictObject({
2348
+ taskID: z50.string().min(1),
2349
+ turns: z50.int().positive().optional(),
2350
+ dollars: z50.number().positive().optional()
2322
2351
  }).refine((input) => input.turns !== undefined || input.dollars !== undefined, {
2323
2352
  message: "a raise sets turns, dollars or both"
2324
- })).output(z49.object({
2325
- taskID: z49.string(),
2353
+ })).output(z50.object({
2354
+ taskID: z50.string(),
2326
2355
  state: hostTaskStateSchema,
2327
- isPauseRequested: z49.boolean(),
2328
- turns: z49.int().positive(),
2329
- dollars: z49.number().positive()
2356
+ isPauseRequested: z50.boolean(),
2357
+ turns: z50.int().positive(),
2358
+ dollars: z50.number().positive()
2330
2359
  }))
2331
2360
  },
2332
2361
  sessions: {
2333
- issueCode: oc7.output(z49.object({ code: z49.string(), expiresAt: z49.date() })),
2334
- list: oc7.output(z49.array(hostSessionSchema)),
2335
- label: oc7.errors({
2362
+ issueCode: oc8.output(z50.object({ code: z50.string(), expiresAt: z50.date() })),
2363
+ list: oc8.output(z50.array(hostSessionSchema)),
2364
+ label: oc8.errors({
2336
2365
  SESSION_NOT_FOUND: {
2337
2366
  message: "no device session that is still signed in has that ID",
2338
2367
  status: 404
2339
2368
  },
2340
2369
  LABEL_INVALID: { message: "a label holds 1 to 100 characters besides spaces", status: 400 }
2341
- }).input(z49.strictObject({ sessionID: z49.string().min(1), label: z49.string() })).output(z49.object({ sessionID: z49.string(), label: z49.string() }))
2370
+ }).input(z50.strictObject({ sessionID: z50.string().min(1), label: z50.string() })).output(z50.object({ sessionID: z50.string(), label: z50.string() }))
2342
2371
  },
2343
2372
  passkeys: hostPasskeyContract,
2344
2373
  memory: {
2345
2374
  proposals: {
2346
- list: memory.output(z49.array(pendingProposalSchema)),
2375
+ list: memory.output(z50.array(pendingProposalSchema)),
2347
2376
  approve: memory.input(proposalAnswerSchema.extend({
2348
2377
  revisionOf: versionTargetSchema2.optional(),
2349
- ignoreCloseMatch: z49.boolean().optional(),
2378
+ ignoreCloseMatch: z50.boolean().optional(),
2350
2379
  editedText: itemTextSchema.optional()
2351
2380
  })).output(approvalResultSchema),
2352
- reject: memory.input(proposalAnswerSchema.extend({ reason: z49.string().max(500).regex(/\S/u).optional() })).output(z49.object({ proposalID: z49.string() }))
2381
+ reject: memory.input(proposalAnswerSchema.extend({ reason: z50.string().max(500).regex(/\S/u).optional() })).output(z50.object({ proposalID: z50.string() }))
2353
2382
  },
2354
- subjects: memory.output(z49.object({ items: subjectCountSchema, proposals: subjectCountSchema })),
2383
+ subjects: memory.output(z50.object({ items: subjectCountSchema, proposals: subjectCountSchema })),
2355
2384
  items: {
2356
- read: memory.input(z49.strictObject({ itemID: z49.string().min(1) })).output(itemHistorySchema),
2385
+ read: memory.input(z50.strictObject({ itemID: z50.string().min(1) })).output(itemHistorySchema),
2357
2386
  edit: memory.input(versionTargetSchema2.extend({ text: itemTextSchema })).output(versionRefSchema2),
2358
2387
  retire: memory.input(versionTargetSchema2).output(versionRefSchema2),
2359
2388
  restore: memory.input(versionTargetSchema2).output(versionRefSchema2),
2360
- forget: memory.input(versionTargetSchema2).output(z49.object({ itemID: z49.string(), backup: forgetBackupSchema })),
2389
+ forget: memory.input(versionTargetSchema2).output(z50.object({ itemID: z50.string(), backup: forgetBackupSchema })),
2361
2390
  forgetAll: memory.output(forgottenItemsSchema),
2362
- pin: memory.input(z49.strictObject({ itemID: z49.string().min(1), isPinned: z49.boolean() })).output(z49.object({ itemID: z49.string(), isPinned: z49.boolean() }))
2391
+ pin: memory.input(z50.strictObject({ itemID: z50.string().min(1), isPinned: z50.boolean() })).output(z50.object({ itemID: z50.string(), isPinned: z50.boolean() }))
2363
2392
  }
2364
2393
  },
2365
2394
  skills: {
2366
2395
  proposals: {
2367
- list: skills.output(z49.array(pendingSkillProposalSchema)),
2368
- approve: skills.input(skillAnswerSchema.extend({ files: z49.array(skillFileSchema).min(1).optional() })).output(z49.object({ proposalID: z49.string(), approvalID: z49.string(), skillHash: z49.string() })),
2369
- reject: skills.input(skillAnswerSchema.extend({ reason: z49.string().max(500).regex(/\S/u) })).output(z49.object({ proposalID: z49.string() }))
2396
+ list: skills.output(z50.array(pendingSkillProposalSchema)),
2397
+ approve: skills.input(skillAnswerSchema.extend({ files: z50.array(skillFileSchema).min(1).optional() })).output(z50.object({ proposalID: z50.string(), approvalID: z50.string(), skillHash: z50.string() })),
2398
+ reject: skills.input(skillAnswerSchema.extend({ reason: z50.string().max(500).regex(/\S/u) })).output(z50.object({ proposalID: z50.string() }))
2370
2399
  },
2371
2400
  written: {
2372
- list: skills.output(z49.array(writtenSkillSchema)),
2373
- resolve: skills.input(z49.strictObject({
2374
- approvalID: z49.string().min(1),
2375
- keep: z49.enum(["nixie", "definitions"])
2376
- })).output(z49.object({ approvalID: z49.string(), keep: z49.enum(["nixie", "definitions"]) }))
2401
+ list: skills.output(z50.array(writtenSkillSchema)),
2402
+ resolve: skills.input(z50.strictObject({
2403
+ approvalID: z50.string().min(1),
2404
+ keep: z50.enum(["nixie", "definitions"])
2405
+ })).output(z50.object({ approvalID: z50.string(), keep: z50.enum(["nixie", "definitions"]) }))
2377
2406
  }
2378
2407
  },
2379
2408
  rules: {
2380
- list: rules.output(z49.array(ruleInForceSchema)),
2381
- conflicts: rules.output(z49.array(ruleConflictSchema)),
2382
- resolve: rules.input(z49.strictObject({ ruleID: z49.string().min(1), keep: z49.enum(["nixie", "repo"]) })).output(z49.object({ ruleID: z49.string(), changeID: z49.string(), keep: z49.enum(["nixie", "repo"]) })),
2409
+ list: rules.output(z50.array(ruleInForceSchema)),
2410
+ conflicts: rules.output(z50.array(ruleConflictSchema)),
2411
+ resolve: rules.input(z50.strictObject({ ruleID: z50.string().min(1), keep: z50.enum(["nixie", "repo"]) })).output(z50.object({ ruleID: z50.string(), changeID: z50.string(), keep: z50.enum(["nixie", "repo"]) })),
2383
2412
  proposals: {
2384
- list: rules.output(z49.array(pendingRuleProposalSchema)),
2385
- approve: rules.input(ruleProposalAnswerSchema).output(z49.object({ proposalID: z49.string() })),
2386
- reject: rules.input(ruleProposalRejectionSchema).output(z49.object({ proposalID: z49.string() }))
2413
+ list: rules.output(z50.array(pendingRuleProposalSchema)),
2414
+ approve: rules.input(ruleProposalAnswerSchema).output(z50.object({ proposalID: z50.string() })),
2415
+ reject: rules.input(ruleProposalRejectionSchema).output(z50.object({ proposalID: z50.string() }))
2387
2416
  }
2388
2417
  },
2389
2418
  definitions: {
2390
- resolve: definitions.input(z49.strictObject({ definitionID: z49.string().min(1), keep: z49.enum(["nixie", "repo"]) })).output(z49.object({
2391
- definitionID: z49.string(),
2392
- changeID: z49.string(),
2393
- keep: z49.enum(["nixie", "repo"])
2419
+ resolve: definitions.input(z50.strictObject({ definitionID: z50.string().min(1), keep: z50.enum(["nixie", "repo"]) })).output(z50.object({
2420
+ definitionID: z50.string(),
2421
+ changeID: z50.string(),
2422
+ keep: z50.enum(["nixie", "repo"])
2394
2423
  }))
2395
2424
  },
2396
2425
  actions: {
2397
2426
  proposals: {
2398
- list: rules.output(z49.array(actionProposalSchema)),
2399
- approve: rules.input(ruleProposalAnswerSchema).output(z49.object({ proposalID: z49.string() })),
2400
- reject: rules.input(actionRejectionSchema).output(z49.object({ proposalID: z49.string() }))
2427
+ list: rules.output(z50.array(actionProposalSchema)),
2428
+ approve: rules.input(ruleProposalAnswerSchema).output(z50.object({ proposalID: z50.string() })),
2429
+ reject: rules.input(actionRejectionSchema).output(z50.object({ proposalID: z50.string() }))
2401
2430
  }
2402
2431
  },
2403
2432
  mandates: hostMandatesContract,
2404
2433
  budgets: hostBudgetsContract,
2405
2434
  contacts: {
2406
- list: contacts.output(z49.array(knownContactSchema)),
2407
- markKnown: contacts.input(z49.strictObject({
2408
- destination: z49.string().min(1).max(500),
2409
- name: z49.string().min(1).max(200).optional()
2410
- })).output(z49.object({ contact: knownContactSchema, isNew: z49.boolean() })),
2411
- unmark: contacts.input(z49.strictObject({ contactID: z49.string().min(1) })).output(z49.object({ contactID: z49.string() }))
2435
+ list: contacts.output(z50.array(knownContactSchema)),
2436
+ markKnown: contacts.input(z50.strictObject({
2437
+ destination: z50.string().min(1).max(500),
2438
+ name: z50.string().min(1).max(200).optional()
2439
+ })).output(z50.object({ contact: knownContactSchema, isNew: z50.boolean() })),
2440
+ unmark: contacts.input(z50.strictObject({ contactID: z50.string().min(1) })).output(z50.object({ contactID: z50.string() }))
2412
2441
  },
2413
2442
  turnInputs: turnInputsContract,
2414
2443
  prompts: {
2415
2444
  proposals: {
2416
- list: prompts.output(z49.array(pendingPromptProposalSchema)),
2445
+ list: prompts.output(z50.array(pendingPromptProposalSchema)),
2417
2446
  approve: prompts.input(promptAnswerSchema.extend({
2418
2447
  entry: promptEntrySchema.optional(),
2419
- files: z49.array(promptPartFileSchema).optional()
2420
- })).output(z49.object({ proposalID: z49.string(), approvalID: z49.string(), proposalHash: z49.string() })),
2421
- reject: prompts.input(promptAnswerSchema.extend({ reason: z49.string().max(500).regex(/\S/u) })).output(z49.object({ proposalID: z49.string() }))
2448
+ files: z50.array(promptPartFileSchema).optional()
2449
+ })).output(z50.object({ proposalID: z50.string(), approvalID: z50.string(), proposalHash: z50.string() })),
2450
+ reject: prompts.input(promptAnswerSchema.extend({ reason: z50.string().max(500).regex(/\S/u) })).output(z50.object({ proposalID: z50.string() }))
2422
2451
  }
2423
2452
  }
2424
2453
  };
@@ -2527,11 +2556,11 @@ function renderSessionCookie(token) {
2527
2556
  return `${sessionCookieName}=${token ?? ""}; Path=/; HttpOnly; Secure; SameSite=Lax; Max-Age=${maxAgeS}`;
2528
2557
  }
2529
2558
  // src/message/task-message-input-schema.ts
2530
- import { z as z51 } from "zod";
2559
+ import { z as z52 } from "zod";
2531
2560
 
2532
2561
  // src/message/task-message-kind-schema.ts
2533
- import { z as z50 } from "zod";
2534
- var taskMessageKindSchema = z50.enum([
2562
+ import { z as z51 } from "zod";
2563
+ var taskMessageKindSchema = z51.enum([
2535
2564
  "progress",
2536
2565
  "question",
2537
2566
  "request",
@@ -2541,21 +2570,21 @@ var taskMessageKindSchema = z50.enum([
2541
2570
  ]);
2542
2571
 
2543
2572
  // src/message/task-message-input-schema.ts
2544
- var taskMessageInputSchema = z51.object({
2545
- to: z51.string(),
2573
+ var taskMessageInputSchema = z52.object({
2574
+ to: z52.string(),
2546
2575
  kind: taskMessageKindSchema,
2547
- body: z51.string(),
2548
- replyTo: z51.string().optional(),
2549
- onBehalfOf: z51.string().array().optional(),
2550
- wake: z51.boolean().optional()
2576
+ body: z52.string(),
2577
+ replyTo: z52.string().optional(),
2578
+ onBehalfOf: z52.string().array().optional(),
2579
+ wake: z52.boolean().optional()
2551
2580
  });
2552
2581
  // src/message/task-message-result-schema.ts
2553
- import { z as z52 } from "zod";
2554
- var taskMessageResultSchema = z52.object({
2555
- messageID: z52.string(),
2556
- woke: z52.boolean(),
2557
- hop: z52.int().nonnegative(),
2558
- note: z52.string().optional()
2582
+ import { z as z53 } from "zod";
2583
+ var taskMessageResultSchema = z53.object({
2584
+ messageID: z53.string(),
2585
+ woke: z53.boolean(),
2586
+ hop: z53.int().nonnegative(),
2587
+ note: z53.string().optional()
2559
2588
  });
2560
2589
  export {
2561
2590
  buildPendingInput,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heynixie/contract",
3
- "version": "0.80.0",
3
+ "version": "0.81.0",
4
4
  "description": "The oRPC contract of the nixie API, with the types a client needs",
5
5
  "license": "MIT",
6
6
  "repository": {