@intentic/sandbox-contract 1.226.0 → 1.226.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/contracts/activity.contract.d.ts.map +1 -1
  2. package/dist/contracts/activity.contract.js +17 -2
  3. package/dist/contracts/activity.contract.js.map +1 -1
  4. package/dist/contracts/agent.contract.d.ts.map +1 -1
  5. package/dist/contracts/agent.contract.js +71 -8
  6. package/dist/contracts/agent.contract.js.map +1 -1
  7. package/dist/contracts/agents.contract.d.ts +1 -0
  8. package/dist/contracts/agents.contract.d.ts.map +1 -1
  9. package/dist/contracts/agents.contract.js +164 -19
  10. package/dist/contracts/agents.contract.js.map +1 -1
  11. package/dist/contracts/automations.contract.d.ts.map +1 -1
  12. package/dist/contracts/automations.contract.js +78 -9
  13. package/dist/contracts/automations.contract.js.map +1 -1
  14. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  15. package/dist/contracts/capabilities.contract.js +98 -11
  16. package/dist/contracts/capabilities.contract.js.map +1 -1
  17. package/dist/contracts/chores.contract.d.ts.map +1 -1
  18. package/dist/contracts/chores.contract.js +26 -3
  19. package/dist/contracts/chores.contract.js.map +1 -1
  20. package/dist/contracts/ci.contract.d.ts.map +1 -1
  21. package/dist/contracts/ci.contract.js +52 -6
  22. package/dist/contracts/ci.contract.js.map +1 -1
  23. package/dist/contracts/claude.contract.d.ts.map +1 -1
  24. package/dist/contracts/claude.contract.js +44 -5
  25. package/dist/contracts/claude.contract.js.map +1 -1
  26. package/dist/contracts/drafts.contract.d.ts.map +1 -1
  27. package/dist/contracts/drafts.contract.js +26 -3
  28. package/dist/contracts/drafts.contract.js.map +1 -1
  29. package/dist/contracts/endpoints.contract.d.ts.map +1 -1
  30. package/dist/contracts/endpoints.contract.js +17 -2
  31. package/dist/contracts/endpoints.contract.js.map +1 -1
  32. package/dist/contracts/exit.contract.d.ts.map +1 -1
  33. package/dist/contracts/exit.contract.js +62 -7
  34. package/dist/contracts/exit.contract.js.map +1 -1
  35. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  36. package/dist/contracts/extensions.contract.js +124 -15
  37. package/dist/contracts/extensions.contract.js.map +1 -1
  38. package/dist/contracts/git.contract.d.ts.map +1 -1
  39. package/dist/contracts/git.contract.js +384 -43
  40. package/dist/contracts/git.contract.js.map +1 -1
  41. package/dist/contracts/grok.contract.d.ts.map +1 -1
  42. package/dist/contracts/grok.contract.js +25 -3
  43. package/dist/contracts/grok.contract.js.map +1 -1
  44. package/dist/contracts/history.contract.d.ts.map +1 -1
  45. package/dist/contracts/history.contract.js +35 -4
  46. package/dist/contracts/history.contract.js.map +1 -1
  47. package/dist/contracts/intentic.contract.d.ts.map +1 -1
  48. package/dist/contracts/intentic.contract.js +25 -3
  49. package/dist/contracts/intentic.contract.js.map +1 -1
  50. package/dist/contracts/inventory.contract.d.ts.map +1 -1
  51. package/dist/contracts/inventory.contract.js +26 -3
  52. package/dist/contracts/inventory.contract.js.map +1 -1
  53. package/dist/contracts/logs.contract.d.ts.map +1 -1
  54. package/dist/contracts/logs.contract.js +17 -2
  55. package/dist/contracts/logs.contract.js.map +1 -1
  56. package/dist/contracts/loops.contract.d.ts.map +1 -1
  57. package/dist/contracts/loops.contract.js +52 -6
  58. package/dist/contracts/loops.contract.js.map +1 -1
  59. package/dist/contracts/panels.contract.d.ts.map +1 -1
  60. package/dist/contracts/panels.contract.js +26 -3
  61. package/dist/contracts/panels.contract.js.map +1 -1
  62. package/dist/contracts/personas.contract.d.ts.map +1 -1
  63. package/dist/contracts/personas.contract.js +71 -8
  64. package/dist/contracts/personas.contract.js.map +1 -1
  65. package/dist/contracts/ports.contract.d.ts.map +1 -1
  66. package/dist/contracts/ports.contract.js +26 -3
  67. package/dist/contracts/ports.contract.js.map +1 -1
  68. package/dist/contracts/prepush.contract.d.ts.map +1 -1
  69. package/dist/contracts/prepush.contract.js +24 -3
  70. package/dist/contracts/prepush.contract.js.map +1 -1
  71. package/dist/contracts/providers.contract.d.ts.map +1 -1
  72. package/dist/contracts/providers.contract.js +9 -1
  73. package/dist/contracts/providers.contract.js.map +1 -1
  74. package/dist/contracts/public.contract.d.ts.map +1 -1
  75. package/dist/contracts/public.contract.js +26 -3
  76. package/dist/contracts/public.contract.js.map +1 -1
  77. package/dist/contracts/push.contract.d.ts.map +1 -1
  78. package/dist/contracts/push.contract.js +35 -4
  79. package/dist/contracts/push.contract.js.map +1 -1
  80. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  81. package/dist/contracts/secrets.contract.js +43 -5
  82. package/dist/contracts/secrets.contract.js.map +1 -1
  83. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  84. package/dist/contracts/sessions.contract.js +15 -2
  85. package/dist/contracts/sessions.contract.js.map +1 -1
  86. package/dist/contracts/settings.contract.d.ts.map +1 -1
  87. package/dist/contracts/settings.contract.js +43 -5
  88. package/dist/contracts/settings.contract.js.map +1 -1
  89. package/dist/contracts/share.contract.d.ts.map +1 -1
  90. package/dist/contracts/share.contract.js +35 -4
  91. package/dist/contracts/share.contract.js.map +1 -1
  92. package/dist/contracts/skills.contract.d.ts.map +1 -1
  93. package/dist/contracts/skills.contract.js +35 -4
  94. package/dist/contracts/skills.contract.js.map +1 -1
  95. package/dist/contracts/system.contract.d.ts.map +1 -1
  96. package/dist/contracts/system.contract.js +107 -14
  97. package/dist/contracts/system.contract.js.map +1 -1
  98. package/dist/contracts/translator.contract.d.ts.map +1 -1
  99. package/dist/contracts/translator.contract.js +29 -4
  100. package/dist/contracts/translator.contract.js.map +1 -1
  101. package/dist/contracts/usage.contract.d.ts.map +1 -1
  102. package/dist/contracts/usage.contract.js +9 -1
  103. package/dist/contracts/usage.contract.js.map +1 -1
  104. package/dist/contracts/vpn.contract.d.ts.map +1 -1
  105. package/dist/contracts/vpn.contract.js +32 -4
  106. package/dist/contracts/vpn.contract.js.map +1 -1
  107. package/dist/contracts/workflows.contract.d.ts.map +1 -1
  108. package/dist/contracts/workflows.contract.js +70 -8
  109. package/dist/contracts/workflows.contract.js.map +1 -1
  110. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  111. package/dist/contracts/workspace.contract.js +216 -25
  112. package/dist/contracts/workspace.contract.js.map +1 -1
  113. package/dist/events.d.ts.map +1 -1
  114. package/dist/events.js +179 -88
  115. package/dist/events.js.map +1 -1
  116. package/dist/history-state.d.ts.map +1 -1
  117. package/dist/history-state.js +1 -0
  118. package/dist/history-state.js.map +1 -1
  119. package/dist/index.d.ts +1 -0
  120. package/dist/index.d.ts.map +1 -1
  121. package/dist/schemas.d.ts +1 -0
  122. package/dist/schemas.d.ts.map +1 -1
  123. package/dist/schemas.js +2856 -1276
  124. package/dist/schemas.js.map +1 -1
  125. package/package.json +4 -4
  126. package/src/contracts/activity.contract.ts +18 -2
  127. package/src/contracts/agent.contract.ts +78 -8
  128. package/src/contracts/agents.contract.ts +180 -19
  129. package/src/contracts/automations.contract.ts +80 -9
  130. package/src/contracts/capabilities.contract.ts +106 -11
  131. package/src/contracts/chores.contract.ts +29 -3
  132. package/src/contracts/ci.contract.ts +55 -6
  133. package/src/contracts/claude.contract.ts +47 -5
  134. package/src/contracts/drafts.contract.ts +26 -3
  135. package/src/contracts/endpoints.contract.ts +19 -2
  136. package/src/contracts/exit.contract.ts +69 -7
  137. package/src/contracts/extensions.contract.ts +134 -15
  138. package/src/contracts/git.contract.ts +421 -43
  139. package/src/contracts/grok.contract.ts +26 -3
  140. package/src/contracts/history.contract.ts +37 -4
  141. package/src/contracts/intentic.contract.ts +28 -3
  142. package/src/contracts/inventory.contract.ts +27 -3
  143. package/src/contracts/logs.contract.ts +18 -2
  144. package/src/contracts/loops.contract.ts +58 -6
  145. package/src/contracts/panels.contract.ts +26 -3
  146. package/src/contracts/personas.contract.ts +77 -8
  147. package/src/contracts/ports.contract.ts +27 -3
  148. package/src/contracts/prepush.contract.ts +26 -3
  149. package/src/contracts/providers.contract.ts +10 -1
  150. package/src/contracts/public.contract.ts +29 -3
  151. package/src/contracts/push.contract.ts +37 -4
  152. package/src/contracts/secrets.contract.ts +46 -5
  153. package/src/contracts/sessions.contract.ts +16 -2
  154. package/src/contracts/settings.contract.ts +46 -5
  155. package/src/contracts/share.contract.ts +37 -4
  156. package/src/contracts/skills.contract.ts +39 -4
  157. package/src/contracts/system.contract.ts +119 -14
  158. package/src/contracts/translator.contract.ts +32 -4
  159. package/src/contracts/usage.contract.ts +10 -1
  160. package/src/contracts/vpn.contract.ts +35 -4
  161. package/src/contracts/workflows.contract.ts +77 -8
  162. package/src/contracts/workspace.contract.ts +231 -25
  163. package/src/events.ts +207 -88
  164. package/src/history-state.ts +6 -0
  165. package/src/schemas.ts +3506 -1260
@@ -3,30 +3,123 @@ import { z } from "zod";
3
3
  import { SessionTranscriptSchema, SystemEventSchema } from "../events.js";
4
4
  import { BrowserNameParamSchema, BrowsersListSchema, DaemonSessionSchema, InfoSchema, ManifestProblemsSchema, MachineFlowLineSchema, MachineSandboxFlowInputSchema, OkSchema, PresenceReportSchema, SubagentIdParamSchema, SubagentsListSchema, TerminalNameParamSchema, TerminalScrollbackQuerySchema, TerminalScrollbackSchema, TerminalsListSchema, UsageSummarySchema, } from "../schemas.js";
5
5
  export const systemContract = {
6
- info: oc.route({ method: "GET", path: "/info" }).output(InfoSchema),
7
- manifestProblems: oc.route({ method: "GET", path: "/system/manifest-problems" }).output(ManifestProblemsSchema),
8
- session: oc.route({ method: "POST", path: "/system/session" }).output(DaemonSessionSchema),
6
+ info: oc
7
+ .route({
8
+ method: "GET",
9
+ path: "/info",
10
+ summary: "What this sandbox is",
11
+ description: "The sandbox's own identity and state: which workspace it holds, which image it runs, what it is called, and the list of calls it actually implements. Start here, because a browser is routinely newer than the sandbox it is talking to and this is how it finds out what is there.",
12
+ })
13
+ .output(InfoSchema),
14
+ manifestProblems: oc
15
+ .route({
16
+ method: "GET",
17
+ path: "/system/manifest-problems",
18
+ summary: "Settings files the sandbox could not read",
19
+ description: "Anything the daemon tripped over in its own configuration on disk: a file it had to fall back from, a key it did not recognise, an entry it skipped. Separate from the identity call because it goes stale for a different reason, namely a file changing.",
20
+ })
21
+ .output(ManifestProblemsSchema),
22
+ session: oc
23
+ .route({
24
+ method: "POST",
25
+ path: "/system/session",
26
+ summary: "Trade a sign-in for a session",
27
+ description: "Exchanges a verified sign-in, or a session that has not expired yet, for a fresh session the daemon minted. That session is the credential every other call carries, and calling this again with a live one renews it.",
28
+ })
29
+ .output(DaemonSessionSchema),
9
30
  events: oc
10
- .route({ method: "GET", path: "/events" })
31
+ .route({
32
+ method: "GET",
33
+ path: "/events",
34
+ summary: "The live event stream",
35
+ description: "A stream held open for as long as you want it, carrying heartbeats so a caller notices the sandbox dying at once, batches of file changes so a tree or an editor can refresh itself, and the roster of who else is looking. Give it an id for this connection to appear in that roster; leave it out and you watch without being seen.",
36
+ })
11
37
  .input(z.object({ clientId: z.string().optional() }))
12
38
  .output(eventIterator(SystemEventSchema)),
13
- presence: oc.route({ method: "POST", path: "/system/presence" }).input(PresenceReportSchema).output(OkSchema),
14
- usage: oc.route({ method: "GET", path: "/system/usage" }).output(UsageSummarySchema),
15
- terminals: oc.route({ method: "GET", path: "/system/terminals" }).output(TerminalsListSchema),
16
- killTerminal: oc.route({ method: "DELETE", path: "/system/terminals/{name}" }).input(TerminalNameParamSchema).output(OkSchema),
39
+ presence: oc
40
+ .route({
41
+ method: "POST",
42
+ path: "/system/presence",
43
+ summary: "Say what you are looking at",
44
+ description: "Reports which view, conversation or file this connection is on, or that it has gone idle. The daemon fans it back out on the event stream so everyone else's roster updates.",
45
+ })
46
+ .input(PresenceReportSchema)
47
+ .output(OkSchema),
48
+ usage: oc
49
+ .route({
50
+ method: "GET",
51
+ path: "/system/usage",
52
+ summary: "What has been spent",
53
+ description: "Token and cost totals per account, added up from the record of every finished turn.",
54
+ })
55
+ .output(UsageSummarySchema),
56
+ terminals: oc
57
+ .route({
58
+ method: "GET",
59
+ path: "/system/terminals",
60
+ summary: "Open terminals",
61
+ description: "The terminal sessions this sandbox is holding, which is what a terminal panel rebuilds its tabs from after a reload. The live typing and output run over a separate socket; this is the list.",
62
+ })
63
+ .output(TerminalsListSchema),
64
+ killTerminal: oc
65
+ .route({
66
+ method: "DELETE",
67
+ path: "/system/terminals/{name}",
68
+ summary: "Close a terminal",
69
+ description: "Destroys one terminal session and whatever was running inside it.",
70
+ })
71
+ .input(TerminalNameParamSchema)
72
+ .output(OkSchema),
17
73
  terminalScrollback: oc
18
- .route({ method: "GET", path: "/system/terminals/{name}/scrollback" })
74
+ .route({
75
+ method: "GET",
76
+ path: "/system/terminals/{name}/scrollback",
77
+ summary: "A terminal's history as plain text",
78
+ description: "What has scrolled past in one terminal, as text you can select and copy. The live view is a picture of a screen on the far side of a socket, with nothing in the page to select, so scrolling back and copying is this call rather than a gesture.",
79
+ })
19
80
  .input(TerminalScrollbackQuerySchema)
20
81
  .output(TerminalScrollbackSchema),
21
- browsers: oc.route({ method: "GET", path: "/system/browsers" }).output(BrowsersListSchema),
22
- closeBrowser: oc.route({ method: "DELETE", path: "/system/browsers/{name}" }).input(BrowserNameParamSchema).output(OkSchema),
23
- subagents: oc.route({ method: "GET", path: "/system/subagents" }).output(SubagentsListSchema),
82
+ browsers: oc
83
+ .route({
84
+ method: "GET",
85
+ path: "/system/browsers",
86
+ summary: "Browsers the agent has open",
87
+ description: "Every browser a conversation currently has running and the pages inside each one. The picture of what they are showing comes over a separate socket; this is the roster.",
88
+ })
89
+ .output(BrowsersListSchema),
90
+ closeBrowser: oc
91
+ .route({
92
+ method: "DELETE",
93
+ path: "/system/browsers/{name}",
94
+ summary: "Shut a browser down",
95
+ description: "Closes one of the agent's browsers. Its next attempt to use that browser then fails as though it had crashed, which is the honest account of somebody pulling the plug.",
96
+ })
97
+ .input(BrowserNameParamSchema)
98
+ .output(OkSchema),
99
+ subagents: oc
100
+ .route({
101
+ method: "GET",
102
+ path: "/system/subagents",
103
+ summary: "Helpers the agents have started",
104
+ description: "Every helper agent this sandbox's conversations have delegated work to, whichever tool started it, with what each one is doing.",
105
+ })
106
+ .output(SubagentsListSchema),
24
107
  subagentTranscript: oc
25
- .route({ method: "GET", path: "/system/subagents/{id}/transcript" })
108
+ .route({
109
+ method: "GET",
110
+ path: "/system/subagents/{id}/transcript",
111
+ summary: "A helper agent's record",
112
+ description: "The full record of one delegated helper, in the same shape as any other conversation. It comes live from the parent turn while the helper works, and from stored history once it has finished.",
113
+ })
26
114
  .input(SubagentIdParamSchema)
27
115
  .output(SessionTranscriptSchema),
28
116
  manageMachineSandbox: oc
29
- .route({ method: "POST", path: "/system/computers/{id}/sandboxes/{slug}" })
117
+ .route({
118
+ method: "POST",
119
+ path: "/system/computers/{id}/sandboxes/{slug}",
120
+ summary: "Drive a sandbox on one of your own computers",
121
+ description: "Start, stop, restart, update, rebuild, roll back or remove a sandbox running on a machine you own, relayed over the connection that machine holds open. The answer is a stream because the slowest of these takes minutes, and it is the same stream whichever you ask for. The daemon adds no opinion: the machine enforces its own permissions and a refusal arrives as the last line, in the machine's words, naming the switch to flip.",
122
+ })
30
123
  .input(MachineSandboxFlowInputSchema)
31
124
  .output(eventIterator(MachineFlowLineSchema)),
32
125
  };
@@ -1 +1 @@
1
- {"version":3,"file":"system.contract.js","sourceRoot":"","sources":["../../src/contracts/system.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EACH,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,sBAAsB,EACtB,qBAAqB,EACrB,6BAA6B,EAC7B,QAAQ,EACR,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,6BAA6B,EAC7B,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,eAAe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6BAA6B;QACtC,WAAW,EACP,0KAA0K;KACjL,CAAC;SACD,MAAM,CAAC,kBAAkB,CAAC;IAC/B,YAAY,EAAE,EAAE;SACX,KAAK,CAAC;QACH,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,qBAAqB;QAC9B,WAAW,EACP,yKAAyK;KAChL,CAAC;SACD,KAAK,CAAC,sBAAsB,CAAC;SAC7B,MAAM,CAAC,QAAQ,CAAC;IAQrB,SAAS,EAAE,EAAE;SACR,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,iCAAiC;QAC1C,WAAW,EACP,iIAAiI;KACxI,CAAC;SACD,MAAM,CAAC,mBAAmB,CAAC;IAChC,kBAAkB,EAAE,EAAE;SACjB,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,mCAAmC;QACzC,OAAO,EAAE,yBAAyB;QAClC,WAAW,EACP,gMAAgM;KACvM,CAAC;SACD,KAAK,CAAC,qBAAqB,CAAC;SAC5B,MAAM,CAAC,uBAAuB,CAAC;IAQpC,oBAAoB,EAAE,EAAE;SACnB,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,yCAAyC;QAC/C,OAAO,EAAE,8CAA8C;QACvD,WAAW,EACP,6aAA6a;KACpb,CAAC;SACD,KAAK,CAAC,6BAA6B,CAAC;SACpC,MAAM,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"translator.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/translator.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,kBAAkB;IAC3B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACR,OAAO;;;;;;;;;;;;;;;;IAIP,QAAQ;;;;;;;;;;;;IACR,UAAU;;;;;;;;;;;CAIb,CAAC"}
1
+ {"version":3,"file":"translator.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/translator.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,kBAAkB;IAC3B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASR,OAAO;;;;;;;;;;;;;;;;IAUP,QAAQ;;;;;;;;;;;;IAUR,UAAU;;;;;;;;;;;CASb,CAAC"}
@@ -2,14 +2,39 @@ import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
3
  import { KeyedProviderSchema, OkSchema, TranslatorAccountsSchema, TranslatorCompleteSchema, TranslatorStartSchema } from "../schemas.js";
4
4
  export const translatorContract = {
5
- accounts: oc.route({ method: "GET", path: "/translator/accounts" }).output(TranslatorAccountsSchema),
5
+ accounts: oc
6
+ .route({
7
+ method: "GET",
8
+ path: "/translator/accounts",
9
+ summary: "Subscriptions connected through the translator",
10
+ description: "What is signed in per provider. Each provider can hold several accounts at once, and the translator spreads work across them.",
11
+ })
12
+ .output(TranslatorAccountsSchema),
6
13
  connect: oc
7
- .route({ method: "POST", path: "/translator/{provider}/connect" })
14
+ .route({
15
+ method: "POST",
16
+ path: "/translator/{provider}/connect",
17
+ summary: "Start connecting a subscription",
18
+ description: "Begins the sign-in for one provider and says which of the two shapes it is: a code you type into a device page, which finishes by itself in the background, or a redirect whose landing address you hand back afterwards.",
19
+ })
8
20
  .input(z.object({ provider: KeyedProviderSchema }))
9
21
  .output(TranslatorStartSchema),
10
- complete: oc.route({ method: "POST", path: "/translator/{provider}/complete" }).input(TranslatorCompleteSchema).output(OkSchema),
22
+ complete: oc
23
+ .route({
24
+ method: "POST",
25
+ path: "/translator/{provider}/complete",
26
+ summary: "Finish a redirect sign-in",
27
+ description: "For the providers that redirect somewhere this sandbox cannot receive: hand back the address you landed on and the connection completes.",
28
+ })
29
+ .input(TranslatorCompleteSchema)
30
+ .output(OkSchema),
11
31
  disconnect: oc
12
- .route({ method: "POST", path: "/translator/{provider}/disconnect" })
32
+ .route({
33
+ method: "POST",
34
+ path: "/translator/{provider}/disconnect",
35
+ summary: "Disconnect one subscription",
36
+ description: "Clears a single account by name. Any others under the same provider stay connected.",
37
+ })
13
38
  .input(z.object({ provider: KeyedProviderSchema, name: z.string().min(1) }))
14
39
  .output(OkSchema),
15
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"translator.contract.js","sourceRoot":"","sources":["../../src/contracts/translator.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAWzI,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,QAAQ,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC;IACpG,OAAO,EAAE,EAAE;SACN,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gCAAgC,EAAE,CAAC;SACjE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC,CAAC;SAClD,MAAM,CAAC,qBAAqB,CAAC;IAClC,QAAQ,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAiC,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;IAChI,UAAU,EAAE,EAAE;SACT,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,mCAAmC,EAAE,CAAC;SACpE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAC3E,MAAM,CAAC,QAAQ,CAAC;CACxB,CAAC"}
1
+ {"version":3,"file":"translator.contract.js","sourceRoot":"","sources":["../../src/contracts/translator.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAWzI,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,QAAQ,EAAE,EAAE;SACP,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,sBAAsB;QAC5B,OAAO,EAAE,gDAAgD;QACzD,WAAW,EACP,+HAA+H;KACtI,CAAC;SACD,MAAM,CAAC,wBAAwB,CAAC;IACrC,OAAO,EAAE,EAAE;SACN,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,gCAAgC;QACtC,OAAO,EAAE,iCAAiC;QAC1C,WAAW,EACP,2NAA2N;KAClO,CAAC;SACD,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC,CAAC;SAClD,MAAM,CAAC,qBAAqB,CAAC;IAClC,QAAQ,EAAE,EAAE;SACP,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,iCAAiC;QACvC,OAAO,EAAE,2BAA2B;QACpC,WAAW,EACP,0IAA0I;KACjJ,CAAC;SACD,KAAK,CAAC,wBAAwB,CAAC;SAC/B,MAAM,CAAC,QAAQ,CAAC;IACrB,UAAU,EAAE,EAAE;SACT,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,mCAAmC;QACzC,OAAO,EAAE,6BAA6B;QACtC,WAAW,EAAE,qFAAqF;KACrG,CAAC;SACD,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAC3E,MAAM,CAAC,QAAQ,CAAC;CACxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"usage.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/usage.contract.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;IACtB,MAAM;;;;;;;;;;;;;;;;;;;;CACT,CAAC"}
1
+ {"version":3,"file":"usage.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/usage.contract.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;IACtB,MAAM;;;;;;;;;;;;;;;;;;;;CAUT,CAAC"}
@@ -1,6 +1,14 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { DayWindowQuerySchema, UsageRollupSchema } from "../schemas.js";
3
3
  export const usageContract = {
4
- rollup: oc.route({ method: "GET", path: "/usage/rollup" }).input(DayWindowQuerySchema).output(UsageRollupSchema),
4
+ rollup: oc
5
+ .route({
6
+ method: "GET",
7
+ path: "/usage/rollup",
8
+ summary: "What was spent, grouped",
9
+ description: "The spending record over a range of days, grouped by day, provider, account and model. Everything a cost screen shows is a rearrangement of this one answer, so nothing needs a second call. Read-only: rows are written by the sandbox as turns end, which is what makes it worth trusting.",
10
+ })
11
+ .input(DayWindowQuerySchema)
12
+ .output(UsageRollupSchema),
5
13
  };
6
14
  //# sourceMappingURL=usage.contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage.contract.js","sourceRoot":"","sources":["../../src/contracts/usage.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAMxE,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC;CACnH,CAAC"}
1
+ {"version":3,"file":"usage.contract.js","sourceRoot":"","sources":["../../src/contracts/usage.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAMxE,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,MAAM,EAAE,EAAE;SACL,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,yBAAyB;QAClC,WAAW,EACP,8RAA8R;KACrS,CAAC;SACD,KAAK,CAAC,oBAAoB,CAAC;SAC3B,MAAM,CAAC,iBAAiB,CAAC;CACjC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"vpn.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/vpn.contract.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,WAAW;IAEpB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;IAIJ,OAAO;;;;;;;;;;IAEP,UAAU;;;;;IAGV,iBAAiB;;;;;;;;;;;;;;;;;;;;;;CAIpB,CAAC"}
1
+ {"version":3,"file":"vpn.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/vpn.contract.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,WAAW;IAEpB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;IAYJ,OAAO;;;;;;;;;;IAWP,UAAU;;;;;IAWV,iBAAiB;;;;;;;;;;;;;;;;;;;;;;CAUpB,CAAC"}
@@ -2,11 +2,39 @@ import { eventIterator, oc } from "@orpc/contract";
2
2
  import { IntenticLineSchema } from "../events.js";
3
3
  import { ForticlientImportInputSchema, ForticlientImportSchema, OkSchema, VpnConnectInputSchema, VpnIdParamSchema, VpnListSchema, } from "../schemas.js";
4
4
  export const vpnContract = {
5
- list: oc.route({ method: "GET", path: "/vpn" }).output(VpnListSchema),
6
- connect: oc.route({ method: "POST", path: "/vpn/{id}/connect" }).input(VpnConnectInputSchema).output(eventIterator(IntenticLineSchema)),
7
- disconnect: oc.route({ method: "POST", path: "/vpn/{id}/disconnect" }).input(VpnIdParamSchema).output(OkSchema),
5
+ list: oc
6
+ .route({
7
+ method: "GET",
8
+ path: "/vpn",
9
+ summary: "Configured tunnels and which are up",
10
+ description: "Every stored VPN with its live link state, read back from the operating system rather than from memory, so a tunnel dropped from a shell and one dropped from a screen look the same here.",
11
+ })
12
+ .output(VpnListSchema),
13
+ connect: oc
14
+ .route({
15
+ method: "POST",
16
+ path: "/vpn/{id}/connect",
17
+ summary: "Dial a VPN",
18
+ description: "Brings a stored tunnel up, streaming the client's progress as it authenticates and then sets up routing. Streamed because a dial takes seconds and can fail with something you have to read: a wrong password, a gateway certificate nobody trusts, a code it wants. Connecting one that is already up simply says so.",
19
+ })
20
+ .input(VpnConnectInputSchema)
21
+ .output(eventIterator(IntenticLineSchema)),
22
+ disconnect: oc
23
+ .route({
24
+ method: "POST",
25
+ path: "/vpn/{id}/disconnect",
26
+ summary: "Drop a tunnel",
27
+ description: "Takes the tunnel down. One that was already down is fine: the promise is that it is not up afterwards.",
28
+ })
29
+ .input(VpnIdParamSchema)
30
+ .output(OkSchema),
8
31
  importForticlient: oc
9
- .route({ method: "POST", path: "/vpn/import-forticlient" })
32
+ .route({
33
+ method: "POST",
34
+ path: "/vpn/import-forticlient",
35
+ summary: "Read connections out of an exported config",
36
+ description: "Turns an exported FortiClient configuration into a list of connections you can add, so somebody holding that file picks from a list instead of retyping a host and port for every tunnel.",
37
+ })
10
38
  .input(ForticlientImportInputSchema)
11
39
  .output(ForticlientImportSchema),
12
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"vpn.contract.js","sourceRoot":"","sources":["../../src/contracts/vpn.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EACH,4BAA4B,EAC5B,uBAAuB,EACvB,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,GAChB,MAAM,eAAe,CAAC;AAUvB,MAAM,CAAC,MAAM,WAAW,GAAG;IAEvB,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;IAIrE,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAEvI,UAAU,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;IAG/G,iBAAiB,EAAE,EAAE;SAChB,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;SAC1D,KAAK,CAAC,4BAA4B,CAAC;SACnC,MAAM,CAAC,uBAAuB,CAAC;CACvC,CAAC"}
1
+ {"version":3,"file":"vpn.contract.js","sourceRoot":"","sources":["../../src/contracts/vpn.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EACH,4BAA4B,EAC5B,uBAAuB,EACvB,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,GAChB,MAAM,eAAe,CAAC;AAUvB,MAAM,CAAC,MAAM,WAAW,GAAG;IAEvB,IAAI,EAAE,EAAE;SACH,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,qCAAqC;QAC9C,WAAW,EACP,4LAA4L;KACnM,CAAC;SACD,MAAM,CAAC,aAAa,CAAC;IAI1B,OAAO,EAAE,EAAE;SACN,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,YAAY;QACrB,WAAW,EACP,wTAAwT;KAC/T,CAAC;SACD,KAAK,CAAC,qBAAqB,CAAC;SAC5B,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAE9C,UAAU,EAAE,EAAE;SACT,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,sBAAsB;QAC5B,OAAO,EAAE,eAAe;QACxB,WAAW,EAAE,wGAAwG;KACxH,CAAC;SACD,KAAK,CAAC,gBAAgB,CAAC;SACvB,MAAM,CAAC,QAAQ,CAAC;IAGrB,iBAAiB,EAAE,EAAE;SAChB,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,4CAA4C;QACrD,WAAW,EACP,2LAA2L;KAClM,CAAC;SACD,KAAK,CAAC,4BAA4B,CAAC;SACnC,MAAM,CAAC,uBAAuB,CAAC;CACvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/workflows.contract.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,iBAAiB;IAG1B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGJ,MAAM;;;;;IAMN,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAcJ,OAAO;;;;;IAaP,UAAU;;;;;IAGV,YAAY;;;;;CACf,CAAC"}
1
+ {"version":3,"file":"workflows.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/workflows.contract.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,iBAAiB;IAG1B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAcJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYJ,MAAM;;;;;IAeN,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYH,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsBJ,OAAO;;;;;IAsBP,UAAU;;;;;IAYV,YAAY;;;;;CASf,CAAC"}
@@ -1,13 +1,75 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { OkSchema, WorkflowIdParamSchema, WorkflowRunIdParamSchema, WorkflowRunSchema, WorkflowRunsListSchema, WorkflowRunStartSchema, WorkflowSaveSchema, WorkflowSchema, WorkflowsListSchema, } from "../schemas.js";
3
3
  export const workflowsContract = {
4
- list: oc.route({ method: "GET", path: "/workflows" }).output(WorkflowsListSchema),
5
- save: oc.route({ method: "POST", path: "/workflows" }).input(WorkflowSaveSchema).output(WorkflowSchema),
6
- remove: oc.route({ method: "DELETE", path: "/workflows/{id}" }).input(WorkflowIdParamSchema).output(OkSchema),
7
- run: oc.route({ method: "POST", path: "/workflows/{id}/run" }).input(WorkflowRunStartSchema).output(WorkflowRunSchema),
8
- runs: oc.route({ method: "GET", path: "/workflows/runs" }).output(WorkflowRunsListSchema),
9
- stopRun: oc.route({ method: "POST", path: "/workflows/runs/{runId}/stop" }).input(WorkflowRunIdParamSchema).output(OkSchema),
10
- archiveRun: oc.route({ method: "POST", path: "/workflows/runs/{runId}/archive" }).input(WorkflowRunIdParamSchema).output(OkSchema),
11
- unarchiveRun: oc.route({ method: "POST", path: "/workflows/runs/{runId}/unarchive" }).input(WorkflowRunIdParamSchema).output(OkSchema),
4
+ list: oc
5
+ .route({
6
+ method: "GET",
7
+ path: "/workflows",
8
+ summary: "Saved workflows and their runs",
9
+ description: "Every workflow somebody has designed, each with its own run history, newest first. One answer rather than two, because a workflow that has never been run is the interesting case rather than a mistake.",
10
+ })
11
+ .output(WorkflowsListSchema),
12
+ save: oc
13
+ .route({
14
+ method: "POST",
15
+ path: "/workflows",
16
+ summary: "Create or replace a workflow",
17
+ description: "Writes a workflow design. Say which of the two you mean, so an id that happens to collide cannot silently overwrite somebody's work. A design that could never run is refused, in the same words the editor shows while you type: a loop in the steps, a step waiting on one that is not there, a step with no way of knowing it is finished.",
18
+ })
19
+ .input(WorkflowSaveSchema)
20
+ .output(WorkflowSchema),
21
+ remove: oc
22
+ .route({
23
+ method: "DELETE",
24
+ path: "/workflows/{id}",
25
+ summary: "Delete a workflow",
26
+ description: "Removes the design. A run of it that is already going keeps going and stays readable and stoppable, because a run takes its own copy of the design when it starts.",
27
+ })
28
+ .input(WorkflowIdParamSchema)
29
+ .output(OkSchema),
30
+ run: oc
31
+ .route({
32
+ method: "POST",
33
+ path: "/workflows/{id}/run",
34
+ summary: "Start a workflow",
35
+ description: "Kicks a workflow off and answers immediately with the run as recorded; the work carries on without you. Point it at a question and every step gets that on top of its own instructions. Every step is written down as waiting up front, so the picture is complete from the first frame. Several runs of one design can be in flight at once without colliding.",
36
+ })
37
+ .input(WorkflowRunStartSchema)
38
+ .output(WorkflowRunSchema),
39
+ runs: oc
40
+ .route({
41
+ method: "GET",
42
+ path: "/workflows/runs",
43
+ summary: "Every workflow run",
44
+ description: "All runs across all workflows, newest first. This is also the only place the runs of a deleted workflow are still reachable.",
45
+ })
46
+ .output(WorkflowRunsListSchema),
47
+ stopRun: oc
48
+ .route({
49
+ method: "POST",
50
+ path: "/workflows/runs/{runId}/stop",
51
+ summary: "Stop a run now",
52
+ description: "Nothing further starts, and the steps already going are cut off where they stand. Whatever they had written stays on their branches. Deliberately abrupt rather than letting the current step finish: a step is a whole agent turn, and a stop that kept spending for minutes afterwards is indistinguishable from a button that does nothing. It always ends the run, including one left stranded by a daemon that was replaced mid-flight.",
53
+ })
54
+ .input(WorkflowRunIdParamSchema)
55
+ .output(OkSchema),
56
+ archiveRun: oc
57
+ .route({
58
+ method: "POST",
59
+ path: "/workflows/runs/{runId}/archive",
60
+ summary: "Take a finished run off the board",
61
+ description: "Nothing is lost and the working copies are reclaimed. Every conversation the run started is put away with it, which is what makes this an archive rather than a dismissal: a step has no card of its own, so merely dropping the run would spill its conversations onto the board at the moment somebody said they were done. Refused while the run is still going.",
62
+ })
63
+ .input(WorkflowRunIdParamSchema)
64
+ .output(OkSchema),
65
+ unarchiveRun: oc
66
+ .route({
67
+ method: "POST",
68
+ path: "/workflows/runs/{runId}/unarchive",
69
+ summary: "Bring an archived run back",
70
+ description: "Puts a run and every conversation it started back on the board.",
71
+ })
72
+ .input(WorkflowRunIdParamSchema)
73
+ .output(OkSchema),
12
74
  };
13
75
  //# sourceMappingURL=workflows.contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.contract.js","sourceRoot":"","sources":["../../src/contracts/workflows.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EACH,QAAQ,EACR,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,GACtB,MAAM,eAAe,CAAC;AAcvB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAG7B,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC;IAMjF,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,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