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