@twelvehart/orcats 0.0.0-seed.0 → 0.2.3

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 (275) hide show
  1. package/LICENSE +48 -0
  2. package/NOTICE +5 -0
  3. package/README.md +399 -0
  4. package/bin/orcats +4 -0
  5. package/dist/backends/acp-client.d.ts +74 -0
  6. package/dist/backends/acp-client.d.ts.map +1 -0
  7. package/dist/backends/acp-run.d.ts +31 -0
  8. package/dist/backends/acp-run.d.ts.map +1 -0
  9. package/dist/backends/claude-run.d.ts +35 -0
  10. package/dist/backends/claude-run.d.ts.map +1 -0
  11. package/dist/backends/claude-stream-json.d.ts +15 -0
  12. package/dist/backends/claude-stream-json.d.ts.map +1 -0
  13. package/dist/backends/codex-jsonl.d.ts +34 -0
  14. package/dist/backends/codex-jsonl.d.ts.map +1 -0
  15. package/dist/backends/codex-run.d.ts +40 -0
  16. package/dist/backends/codex-run.d.ts.map +1 -0
  17. package/dist/backends/codex.d.ts +5 -0
  18. package/dist/backends/codex.d.ts.map +1 -0
  19. package/dist/backends/conversation-config.d.ts +12 -0
  20. package/dist/backends/conversation-config.d.ts.map +1 -0
  21. package/dist/backends/index.d.ts +14 -0
  22. package/dist/backends/index.d.ts.map +1 -0
  23. package/dist/backends/opencode-run.d.ts +48 -0
  24. package/dist/backends/opencode-run.d.ts.map +1 -0
  25. package/dist/backends/opencode-sse.d.ts +35 -0
  26. package/dist/backends/opencode-sse.d.ts.map +1 -0
  27. package/dist/backends/pi-rpc.d.ts +21 -0
  28. package/dist/backends/pi-rpc.d.ts.map +1 -0
  29. package/dist/backends/pi-run.d.ts +21 -0
  30. package/dist/backends/pi-run.d.ts.map +1 -0
  31. package/dist/backends/select.d.ts +17 -0
  32. package/dist/backends/select.d.ts.map +1 -0
  33. package/dist/backends/subprocess-run.d.ts +68 -0
  34. package/dist/backends/subprocess-run.d.ts.map +1 -0
  35. package/dist/backends/types.d.ts +17 -0
  36. package/dist/backends/types.d.ts.map +1 -0
  37. package/dist/backends/unsupported.d.ts +9 -0
  38. package/dist/backends/unsupported.d.ts.map +1 -0
  39. package/dist/baseline/index.d.ts +56 -0
  40. package/dist/baseline/index.d.ts.map +1 -0
  41. package/dist/cli/args.d.ts +22 -0
  42. package/dist/cli/args.d.ts.map +1 -0
  43. package/dist/cli/embedded.d.ts +7 -0
  44. package/dist/cli/embedded.d.ts.map +1 -0
  45. package/dist/cli/main.d.ts +6 -0
  46. package/dist/cli/main.d.ts.map +1 -0
  47. package/dist/cli/version.d.ts +2 -0
  48. package/dist/cli/version.d.ts.map +1 -0
  49. package/dist/conversation/ask-user.d.ts +17 -0
  50. package/dist/conversation/ask-user.d.ts.map +1 -0
  51. package/dist/conversation/conversation.d.ts +46 -0
  52. package/dist/conversation/conversation.d.ts.map +1 -0
  53. package/dist/conversation/harness.d.ts +14 -0
  54. package/dist/conversation/harness.d.ts.map +1 -0
  55. package/dist/conversation/index.d.ts +5 -0
  56. package/dist/conversation/index.d.ts.map +1 -0
  57. package/dist/conversation/queue.d.ts +15 -0
  58. package/dist/conversation/queue.d.ts.map +1 -0
  59. package/dist/flow/accessors.d.ts +13 -0
  60. package/dist/flow/accessors.d.ts.map +1 -0
  61. package/dist/flow/approvals.d.ts +6 -0
  62. package/dist/flow/approvals.d.ts.map +1 -0
  63. package/dist/flow/args.d.ts +4 -0
  64. package/dist/flow/args.d.ts.map +1 -0
  65. package/dist/flow/context.d.ts +36 -0
  66. package/dist/flow/context.d.ts.map +1 -0
  67. package/dist/flow/index.d.ts +5 -0
  68. package/dist/flow/index.d.ts.map +1 -0
  69. package/dist/index.d.ts +16 -0
  70. package/dist/index.d.ts.map +1 -0
  71. package/dist/loop/builder/index.d.ts +17 -0
  72. package/dist/loop/builder/index.d.ts.map +1 -0
  73. package/dist/loop/builder/types.d.ts +97 -0
  74. package/dist/loop/builder/types.d.ts.map +1 -0
  75. package/dist/loop/context/compaction.d.ts +38 -0
  76. package/dist/loop/context/compaction.d.ts.map +1 -0
  77. package/dist/loop/context/index.d.ts +4 -0
  78. package/dist/loop/context/index.d.ts.map +1 -0
  79. package/dist/loop/context/offload.d.ts +34 -0
  80. package/dist/loop/context/offload.d.ts.map +1 -0
  81. package/dist/loop/context/types.d.ts +13 -0
  82. package/dist/loop/context/types.d.ts.map +1 -0
  83. package/dist/loop/engine/bridge.d.ts +21 -0
  84. package/dist/loop/engine/bridge.d.ts.map +1 -0
  85. package/dist/loop/engine/index.d.ts +73 -0
  86. package/dist/loop/engine/index.d.ts.map +1 -0
  87. package/dist/loop/execution.d.ts +68 -0
  88. package/dist/loop/execution.d.ts.map +1 -0
  89. package/dist/loop/fanout.d.ts +148 -0
  90. package/dist/loop/fanout.d.ts.map +1 -0
  91. package/dist/loop/firing.d.ts +54 -0
  92. package/dist/loop/firing.d.ts.map +1 -0
  93. package/dist/loop/graph/analyze.d.ts +8 -0
  94. package/dist/loop/graph/analyze.d.ts.map +1 -0
  95. package/dist/loop/graph/index.d.ts +3 -0
  96. package/dist/loop/graph/index.d.ts.map +1 -0
  97. package/dist/loop/graph/types.d.ts +35 -0
  98. package/dist/loop/graph/types.d.ts.map +1 -0
  99. package/dist/loop/index.d.ts +7 -0
  100. package/dist/loop/index.d.ts.map +1 -0
  101. package/dist/loop/io/index.d.ts +4 -0
  102. package/dist/loop/io/index.d.ts.map +1 -0
  103. package/dist/loop/io/linear.d.ts +142 -0
  104. package/dist/loop/io/linear.d.ts.map +1 -0
  105. package/dist/loop/io/sink.d.ts +47 -0
  106. package/dist/loop/io/sink.d.ts.map +1 -0
  107. package/dist/loop/io/source.d.ts +64 -0
  108. package/dist/loop/io/source.d.ts.map +1 -0
  109. package/dist/loop/serve.d.ts +97 -0
  110. package/dist/loop/serve.d.ts.map +1 -0
  111. package/dist/loop/state/index.d.ts +5 -0
  112. package/dist/loop/state/index.d.ts.map +1 -0
  113. package/dist/loop/state/manifest.d.ts +36 -0
  114. package/dist/loop/state/manifest.d.ts.map +1 -0
  115. package/dist/loop/state/port.d.ts +33 -0
  116. package/dist/loop/state/port.d.ts.map +1 -0
  117. package/dist/loop/state/snapshot.d.ts +15 -0
  118. package/dist/loop/state/snapshot.d.ts.map +1 -0
  119. package/dist/loop/state/sqlite.d.ts +31 -0
  120. package/dist/loop/state/sqlite.d.ts.map +1 -0
  121. package/dist/loop/termination-contract.d.ts +28 -0
  122. package/dist/loop/termination-contract.d.ts.map +1 -0
  123. package/dist/loop/termination.d.ts +33 -0
  124. package/dist/loop/termination.d.ts.map +1 -0
  125. package/dist/model/backend-config.d.ts +30 -0
  126. package/dist/model/backend-config.d.ts.map +1 -0
  127. package/dist/model/brand.d.ts +9 -0
  128. package/dist/model/brand.d.ts.map +1 -0
  129. package/dist/model/errors.d.ts +11 -0
  130. package/dist/model/errors.d.ts.map +1 -0
  131. package/dist/model/index.d.ts +8 -0
  132. package/dist/model/index.d.ts.map +1 -0
  133. package/dist/model/json-schema.d.ts +4 -0
  134. package/dist/model/json-schema.d.ts.map +1 -0
  135. package/dist/model/result.d.ts +3 -0
  136. package/dist/model/result.d.ts.map +1 -0
  137. package/dist/model/schemas.d.ts +435 -0
  138. package/dist/model/schemas.d.ts.map +1 -0
  139. package/dist/model/structured.d.ts +9 -0
  140. package/dist/model/structured.d.ts.map +1 -0
  141. package/dist/monitor/index.d.ts +139 -0
  142. package/dist/monitor/index.d.ts.map +1 -0
  143. package/dist/plan/index.d.ts +3 -0
  144. package/dist/plan/index.d.ts.map +1 -0
  145. package/dist/plan/persistent.d.ts +23 -0
  146. package/dist/plan/persistent.d.ts.map +1 -0
  147. package/dist/plan/verdict.d.ts +9 -0
  148. package/dist/plan/verdict.d.ts.map +1 -0
  149. package/dist/review/index.d.ts +4 -0
  150. package/dist/review/index.d.ts.map +1 -0
  151. package/dist/review/loop.d.ts +117 -0
  152. package/dist/review/loop.d.ts.map +1 -0
  153. package/dist/review/reviewers.d.ts +13 -0
  154. package/dist/review/reviewers.d.ts.map +1 -0
  155. package/dist/review/tool.d.ts +20 -0
  156. package/dist/review/tool.d.ts.map +1 -0
  157. package/dist/run-output/index.d.ts +112 -0
  158. package/dist/run-output/index.d.ts.map +1 -0
  159. package/dist/runner/index.d.ts +2 -0
  160. package/dist/runner/index.d.ts.map +1 -0
  161. package/dist/runner/typecheck.d.ts +23 -0
  162. package/dist/runner/typecheck.d.ts.map +1 -0
  163. package/dist/test-utils/fakes.d.ts +76 -0
  164. package/dist/test-utils/fakes.d.ts.map +1 -0
  165. package/dist/test-utils/fixtures.d.ts +4 -0
  166. package/dist/test-utils/fixtures.d.ts.map +1 -0
  167. package/dist/test-utils/index.d.ts +4 -0
  168. package/dist/test-utils/index.d.ts.map +1 -0
  169. package/dist/test-utils/tier2.d.ts +8 -0
  170. package/dist/test-utils/tier2.d.ts.map +1 -0
  171. package/dist/tools/fs.d.ts +11 -0
  172. package/dist/tools/fs.d.ts.map +1 -0
  173. package/dist/tools/git.d.ts +10 -0
  174. package/dist/tools/git.d.ts.map +1 -0
  175. package/dist/tools/github.d.ts +13 -0
  176. package/dist/tools/github.d.ts.map +1 -0
  177. package/dist/tools/index.d.ts +7 -0
  178. package/dist/tools/index.d.ts.map +1 -0
  179. package/dist/tools/linear.d.ts +117 -0
  180. package/dist/tools/linear.d.ts.map +1 -0
  181. package/dist/tools/process.d.ts +40 -0
  182. package/dist/tools/process.d.ts.map +1 -0
  183. package/dist/tools/terminal.d.ts +23 -0
  184. package/dist/tools/terminal.d.ts.map +1 -0
  185. package/package.json +89 -9
  186. package/src/backends/acp-client.ts +324 -0
  187. package/src/backends/acp-run.ts +636 -0
  188. package/src/backends/claude-run.ts +226 -0
  189. package/src/backends/claude-stream-json.ts +273 -0
  190. package/src/backends/codex-jsonl.ts +339 -0
  191. package/src/backends/codex-run.ts +177 -0
  192. package/src/backends/codex.ts +84 -0
  193. package/src/backends/conversation-config.ts +26 -0
  194. package/src/backends/index.ts +13 -0
  195. package/src/backends/opencode-run.ts +432 -0
  196. package/src/backends/opencode-sse.ts +360 -0
  197. package/src/backends/pi-rpc.ts +242 -0
  198. package/src/backends/pi-run.ts +154 -0
  199. package/src/backends/select.ts +77 -0
  200. package/src/backends/subprocess-run.ts +305 -0
  201. package/src/backends/types.ts +29 -0
  202. package/src/backends/unsupported.ts +48 -0
  203. package/src/baseline/index.ts +437 -0
  204. package/src/cli/args.ts +109 -0
  205. package/src/cli/embedded.ts +206 -0
  206. package/src/cli/main.ts +332 -0
  207. package/src/cli/version.ts +1 -0
  208. package/src/conversation/ask-user.ts +105 -0
  209. package/src/conversation/conversation.ts +109 -0
  210. package/src/conversation/harness.ts +39 -0
  211. package/src/conversation/index.ts +4 -0
  212. package/src/conversation/queue.ts +86 -0
  213. package/src/flow/accessors.ts +43 -0
  214. package/src/flow/approvals.ts +10 -0
  215. package/src/flow/args.ts +26 -0
  216. package/src/flow/context.ts +106 -0
  217. package/src/flow/index.ts +4 -0
  218. package/src/index.ts +17 -0
  219. package/src/loop/builder/index.ts +346 -0
  220. package/src/loop/builder/types.ts +131 -0
  221. package/src/loop/context/compaction.ts +175 -0
  222. package/src/loop/context/index.ts +3 -0
  223. package/src/loop/context/offload.ts +79 -0
  224. package/src/loop/context/types.ts +17 -0
  225. package/src/loop/engine/bridge.ts +61 -0
  226. package/src/loop/engine/index.ts +166 -0
  227. package/src/loop/execution.ts +453 -0
  228. package/src/loop/fanout.ts +444 -0
  229. package/src/loop/firing.ts +188 -0
  230. package/src/loop/graph/analyze.ts +128 -0
  231. package/src/loop/graph/index.ts +2 -0
  232. package/src/loop/graph/types.ts +45 -0
  233. package/src/loop/index.ts +11 -0
  234. package/src/loop/io/index.ts +3 -0
  235. package/src/loop/io/linear.ts +714 -0
  236. package/src/loop/io/sink.ts +170 -0
  237. package/src/loop/io/source.ts +255 -0
  238. package/src/loop/serve.ts +307 -0
  239. package/src/loop/state/index.ts +4 -0
  240. package/src/loop/state/manifest.ts +56 -0
  241. package/src/loop/state/port.ts +43 -0
  242. package/src/loop/state/snapshot.ts +129 -0
  243. package/src/loop/state/sqlite.ts +265 -0
  244. package/src/loop/termination-contract.ts +89 -0
  245. package/src/loop/termination.ts +156 -0
  246. package/src/model/backend-config.ts +34 -0
  247. package/src/model/brand.ts +11 -0
  248. package/src/model/errors.ts +28 -0
  249. package/src/model/index.ts +7 -0
  250. package/src/model/json-schema.ts +14 -0
  251. package/src/model/result.ts +28 -0
  252. package/src/model/schemas.ts +218 -0
  253. package/src/model/structured.ts +26 -0
  254. package/src/monitor/index.ts +367 -0
  255. package/src/plan/index.ts +2 -0
  256. package/src/plan/persistent.ts +98 -0
  257. package/src/plan/verdict.ts +3 -0
  258. package/src/review/index.ts +3 -0
  259. package/src/review/loop.ts +365 -0
  260. package/src/review/reviewers.ts +92 -0
  261. package/src/review/tool.ts +41 -0
  262. package/src/run-output/index.ts +319 -0
  263. package/src/runner/index.ts +1 -0
  264. package/src/runner/typecheck.ts +72 -0
  265. package/src/test-utils/fakes.ts +260 -0
  266. package/src/test-utils/fixtures.ts +33 -0
  267. package/src/test-utils/index.ts +3 -0
  268. package/src/test-utils/tier2.ts +12 -0
  269. package/src/tools/fs.ts +44 -0
  270. package/src/tools/git.ts +34 -0
  271. package/src/tools/github.ts +25 -0
  272. package/src/tools/index.ts +6 -0
  273. package/src/tools/linear.ts +428 -0
  274. package/src/tools/process.ts +156 -0
  275. package/src/tools/terminal.ts +116 -0
@@ -0,0 +1,64 @@
1
+ import { type Result } from "neverthrow";
2
+ import { type RuntimeError } from "../../model/index.ts";
3
+ /** Bundled source kinds. A custom trigger reuses the closest kind or its own structural object. */
4
+ export type SourceKind = "manual" | "cron" | "watch" | "webhook" | "queue" | "linear-issue" | "linear-agent";
5
+ /** Handle returned by a started Source so the supervisor can stop the trigger. */
6
+ export interface SourceSubscription {
7
+ stop(): Promise<Result<void, RuntimeError>>;
8
+ }
9
+ /** A loop trigger — the only loop-level entry boundary. */
10
+ export interface Source<E = unknown> {
11
+ readonly kind: SourceKind;
12
+ start(handler: (event: E) => void): Promise<Result<SourceSubscription, RuntimeError>>;
13
+ }
14
+ export interface ManualSource<E = void> extends Source<E> {
15
+ readonly kind: "manual";
16
+ /** Push a trigger event to the started handler. No-op until started / after stop. */
17
+ fire(event: E): void;
18
+ /** Whether a handler is currently subscribed. */
19
+ isStarted(): boolean;
20
+ }
21
+ export declare function manual<E = void>(): ManualSource<E>;
22
+ /** Schedules `fire` on the loop's cadence and returns a cancel handle. */
23
+ export type CronScheduler = (fire: () => void) => () => void;
24
+ export declare function cron(expression: string, scheduler?: CronScheduler): Source<void>;
25
+ export interface WatchEvent {
26
+ readonly eventType: string;
27
+ readonly filename: string | null;
28
+ /** The watched path that produced the event. */
29
+ readonly path: string;
30
+ }
31
+ /** Opens a watcher on `path`, invoking `onEvent` per change; returns a close handle. */
32
+ export type WatcherFactory = (path: string, onEvent: (eventType: string, filename: string | null) => void) => {
33
+ close(): void;
34
+ };
35
+ export interface WatchOptions {
36
+ readonly paths: readonly string[];
37
+ readonly watcherFactory?: WatcherFactory;
38
+ }
39
+ export declare function watch(options: WatchOptions): Source<WatchEvent>;
40
+ export interface WebhookEvent {
41
+ readonly method: string;
42
+ readonly url: string;
43
+ readonly body: string;
44
+ }
45
+ /** Starts a listener that invokes `onRequest` per inbound request and returns a close handle. */
46
+ export type ListenerFactory = (onRequest: (event: WebhookEvent) => void) => Promise<Result<{
47
+ close(): Promise<void>;
48
+ }, RuntimeError>>;
49
+ export interface WebhookOptions {
50
+ readonly port: number;
51
+ /** Only requests to this path fire the handler; default: any path. */
52
+ readonly path?: string;
53
+ readonly listenerFactory?: ListenerFactory;
54
+ }
55
+ export declare function webhook(options: WebhookOptions): Source<WebhookEvent>;
56
+ export interface QueueConsumer<E> {
57
+ /** Subscribe to messages, delivering each; resolves to an unsubscribe handle. */
58
+ subscribe(deliver: (message: E) => void): Promise<Result<() => void, RuntimeError>>;
59
+ }
60
+ export interface QueueSourceOptions<E> {
61
+ readonly consumer: QueueConsumer<E>;
62
+ }
63
+ export declare function queueSource<E = unknown>(options: QueueSourceOptions<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C;CAC5C;AAmCD,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAAC,YAAY,CAAC,CAkBrE;AAMD,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,iFAAiF;IACjF,SAAS,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC;CACrF;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACrC;AAED,wBAAgB,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAWlF"}
@@ -0,0 +1,97 @@
1
+ import { type Result } from "neverthrow";
2
+ import { type RuntimeError } from "../model/index.ts";
3
+ import type { LoopOutcome, LoopRunError } from "./builder/index.ts";
4
+ import { type ChildHandle, type ChildSpawner } from "./firing.ts";
5
+ import type { Sink, Source } from "./io/index.ts";
6
+ export { exitCodeForRun, exitCodeForStop, } from "./firing.ts";
7
+ export type { ChildHandle, ChildSpec, ChildSpawner, } from "./firing.ts";
8
+ /** A registered loop: its trigger `Source`, output `Sink`, and a one-shot runner. */
9
+ export interface LoopDefinition<E = unknown, A = unknown, S = unknown> {
10
+ readonly name: string;
11
+ readonly source: Source<E>;
12
+ readonly sink: Sink<A>;
13
+ /** Run the loop once for a trigger event, emit its output to the sink, resolve to the stop outcome. */
14
+ run(event: E): Promise<Result<LoopOutcome<S>, LoopRunError>>;
15
+ }
16
+ /** What one loop firing produces: the stop outcome plus the value to emit to the sink. */
17
+ export interface LoopEmission<A = unknown, S = unknown> {
18
+ readonly outcome: LoopOutcome<S>;
19
+ readonly output: A;
20
+ }
21
+ /** Authoring config for `defineLoop`. `onTrigger` runs the loop; the sink emit is wired for you. */
22
+ export interface LoopConfig<E = unknown, A = unknown, S = unknown> {
23
+ readonly name: string;
24
+ readonly source: Source<E>;
25
+ readonly sink: Sink<A>;
26
+ /** Execute the loop once for `event`; return the stop outcome and the value to emit. */
27
+ readonly onTrigger: (event: E) => Promise<Result<LoopEmission<A, S>, LoopRunError>>;
28
+ }
29
+ /**
30
+ * Package a loop with its Source + Sink into a discoverable definition. A loop module exports the
31
+ * result; importing the module only registers it (no Source fires, no backend runs, no Sink emits)
32
+ * so `orcats loops` discovery is side-effect-free. `run` folds the sink emit into one Result so the
33
+ * CLI and the `serve` child share identical output behavior.
34
+ */
35
+ export declare function defineLoop<E = unknown, A = unknown, S = unknown>(config: LoopConfig<E, A, S>): LoopDefinition<E, A, S>;
36
+ /** Structural guard: an object with a name, a `run`, and Source/Sink-shaped seams. */
37
+ export declare function isLoopDefinition(value: unknown): value is LoopDefinition;
38
+ /** Imports a module by absolute path, returning its export namespace. */
39
+ export type ModuleImporter = (absolutePath: string) => Promise<Record<string, unknown>>;
40
+ /** Lists candidate loop-module files under a directory. */
41
+ export type FileLister = (dir: string) => Promise<string[]>;
42
+ /** Scan imported module namespaces for exported LoopDefinitions, keyed by loop name. */
43
+ export declare function collectDefinitions(modules: Iterable<Record<string, unknown>>): Map<string, LoopDefinition>;
44
+ export interface DiscoverOptions {
45
+ readonly dir: string;
46
+ readonly list?: FileLister;
47
+ readonly import?: ModuleImporter;
48
+ }
49
+ /**
50
+ * Discover loop definitions under `dir` (by convention `.orca/loops`, holding export-only loop
51
+ * modules — NOT self-executing flow scripts). Import-only: constructing a definition via
52
+ * `defineLoop` fires no Source, backend, or Sink, so discovery has no side effects.
53
+ */
54
+ export declare function discoverLoops(options: DiscoverOptions): Promise<Result<Map<string, LoopDefinition>, RuntimeError>>;
55
+ export interface LoadOptions {
56
+ readonly cwd: string;
57
+ readonly import?: ModuleImporter;
58
+ readonly list?: FileLister;
59
+ /** Directory scanned when the target is a registered name; default `<cwd>/.orca/loops`. */
60
+ readonly loopsDir?: string;
61
+ }
62
+ /**
63
+ * Resolve a loop by module path OR registered name (spec distribution). A path imports that one
64
+ * module; a name discovers the `.orca/loops` directory and looks it up. Import-only: no firing.
65
+ */
66
+ export declare function loadDefinition(target: string, options: LoadOptions): Promise<Result<LoopDefinition, RuntimeError>>;
67
+ export interface LoopListing {
68
+ readonly name: string;
69
+ readonly source: string;
70
+ readonly sink: string;
71
+ }
72
+ /** Project loop definitions to listing rows — reads `kind` metadata only, never `start`/`emit`/`run`. */
73
+ export declare function listLoops(definitions: Iterable<LoopDefinition>): LoopListing[];
74
+ /** Render the loop listing as text for `orcats loops`. */
75
+ export declare function formatLoopListing(rows: readonly LoopListing[]): string;
76
+ export interface ServeOptions {
77
+ /** Spawn an ephemeral child per firing; default re-invokes `orcats run <loop>` as a subprocess. */
78
+ readonly spawn?: ChildSpawner;
79
+ /** What the child runs: a loop name or path. Default: the definition name. */
80
+ readonly loopRef?: string;
81
+ }
82
+ /** Live supervisor handle: owns the trigger and the in-flight children, not the loop runs. */
83
+ export interface Supervisor {
84
+ /** In-flight child handles, one per firing not yet exited. */
85
+ children(): readonly ChildHandle[];
86
+ /** Stop the trigger and `SIGKILL` any in-flight children. */
87
+ stop(): Promise<Result<void, RuntimeError>>;
88
+ }
89
+ /**
90
+ * The thin `serve` supervisor (design D8): a long-lived process owning ONLY the trigger. Each
91
+ * firing spawns an ephemeral child that runs the loop and exits — the loop never runs in the
92
+ * supervisor, so one loop's crash/OOM cannot take down the supervisor or its siblings, and a
93
+ * runaway child is killable at the OS level. Cross-loop coordination is via the shared manifest
94
+ * store (L05), not shared process memory.
95
+ */
96
+ export declare function serve(definition: LoopDefinition, options?: ServeOptions): Promise<Result<Supervisor, RuntimeError>>;
97
+ //# sourceMappingURL=serve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/loop/serve.ts"],"names":[],"mappings":"AAGA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC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C1B,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,CA4B3C"}
@@ -0,0 +1,5 @@
1
+ export * from "./port.ts";
2
+ export * from "./manifest.ts";
3
+ export * from "./snapshot.ts";
4
+ export * from "./sqlite.ts";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/loop/state/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type Result } from "neverthrow";
2
+ import { z } from "zod";
3
+ import { type RuntimeError } from "../../model/index.ts";
4
+ /** A single atomic subtask; `passes` is the progress flag flipped by the loop. */
5
+ export declare const ManifestTaskSchema: z.ZodObject<{
6
+ id: z.ZodString;
7
+ passes: z.ZodBoolean;
8
+ }, z.core.$strip>;
9
+ /** Typed loop manifest — the single progress/variant/monitor spine. */
10
+ export declare const TaskManifestSchema: z.ZodObject<{
11
+ tasks: z.ZodArray<z.ZodObject<{
12
+ id: z.ZodString;
13
+ passes: z.ZodBoolean;
14
+ }, z.core.$strip>>;
15
+ }, z.core.$strip>;
16
+ export type ManifestTask = z.infer<typeof ManifestTaskSchema>;
17
+ export type TaskManifest = z.infer<typeof TaskManifestSchema>;
18
+ /** Validate raw state against the manifest schema each cycle; a validation
19
+ * failure surfaces as `err(RuntimeError)` (`StructuredOutputValidationFailed`). */
20
+ export declare function parseManifest(raw: unknown): Result<TaskManifest, RuntimeError>;
21
+ /** The single shared projection: count of tasks not yet passing. The termination
22
+ * variant, reported progress, and the monitor signal all read this one value, so
23
+ * they always reflect the same number. */
24
+ export declare function measure(manifest: TaskManifest): number;
25
+ export interface ManifestProgress {
26
+ readonly total: number;
27
+ readonly passed: number;
28
+ readonly pending: number;
29
+ /** Fraction of tasks passing in `[0, 1]`; `1` for an empty manifest. */
30
+ readonly ratio: number;
31
+ }
32
+ /** Progress report derived from {@link measure} so it cannot drift from the variant. */
33
+ export declare function progress(manifest: TaskManifest): ManifestProgress;
34
+ /** Termination predicate: the manifest is complete when nothing is pending. */
35
+ export declare function isComplete(manifest: TaskManifest): boolean;
36
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/loop/state/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAOhF,kFAAkF;AAClF,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAEH,uEAAuE;AACvE,eAAO,MAAM,kBAAkB;;;;;iBAE7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;mFACmF;AACnF,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,CAE9E;AAED;;0CAE0C;AAC1C,wBAAgB,OAAO,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAEtD;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,wFAAwF;AACxF,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,YAAY,GAAG,gBAAgB,CAKjE;AAED,+EAA+E;AAC/E,wBAAgB,UAAU,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAE1D"}
@@ -0,0 +1,33 @@
1
+ import type { Result } from "neverthrow";
2
+ import type { RuntimeError } from "../../model/index.ts";
3
+ import type { TaskManifest } from "./manifest.ts";
4
+ /** Content hash identifying a per-cycle state snapshot. */
5
+ export type StateHash = string;
6
+ /** Service-free-by-default adapters (design D4). `dbos`/`dolt` stay deferred but
7
+ * the port shape keeps them expressible. */
8
+ export type StateAdapterId = "snapshot" | "sqlite";
9
+ /** Fan-in merge: the ONLY place branch state combines (event-sourced/reduce,
10
+ * never shared-mutable). */
11
+ export type StateReducer<S> = (states: readonly S[]) => S;
12
+ /**
13
+ * StateStore port — `load / checkpoint / branch / merge / history`, all Result-typed
14
+ * over `RuntimeError`. Default state is the {@link TaskManifest}.
15
+ */
16
+ export interface StateStore<S = TaskManifest> {
17
+ /** Read a snapshot by hash, or the most recent checkpoint when omitted. */
18
+ load(hash?: StateHash): Promise<Result<S, RuntimeError>>;
19
+ /** Validate and persist a cycle's state, returning its content hash. */
20
+ checkpoint(state: S): Promise<Result<StateHash, RuntimeError>>;
21
+ /** Fan-out: copy a snapshot into an isolated branch handle. */
22
+ branch(from: StateHash): Promise<Result<StateHash, RuntimeError>>;
23
+ /** Fan-in: combine branch snapshots through the reducer (the only merge point). */
24
+ merge(branches: readonly StateHash[], reducer: StateReducer<S>): Promise<Result<S, RuntimeError>>;
25
+ /** Monitoring: the ordered hashes of prior cycle snapshots. */
26
+ history(): Promise<Result<readonly StateHash[], RuntimeError>>;
27
+ }
28
+ /** Store capability required only by store-backed fan-out branch result persistence. */
29
+ export interface BranchWritableStateStore<S = TaskManifest> extends StateStore<S> {
30
+ /** Persist isolated branch state without appending to the cycle history. */
31
+ saveBranch(branch: StateHash, state: S): Promise<Result<StateHash, RuntimeError>>;
32
+ }
33
+ //# sourceMappingURL=port.d.ts.map
@@ -0,0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AAwB,CAAC,CAAC,GAAG,YAAY,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAC/E,4EAA4E;IAC5E,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;CACnF"}
@@ -0,0 +1,15 @@
1
+ import { type FsTool } from "../../tools/index.ts";
2
+ import { type TaskManifest } from "./manifest.ts";
3
+ import type { BranchWritableStateStore, StateHash } from "./port.ts";
4
+ export interface SnapshotStoreOptions {
5
+ /** Repo/working root; snapshots land under `<root>/.orca/`. */
6
+ readonly root: string;
7
+ /** Injectable filesystem for tests; defaults to the real adapter. */
8
+ readonly fsTool?: FsTool;
9
+ }
10
+ /** Content hash of a manifest — canonical JSON so equal manifests share a file. */
11
+ export declare function stateHash(manifest: TaskManifest): StateHash;
12
+ /** Per-cycle snapshot path: `<root>/.orca/state-<hash>.json`. */
13
+ export declare function statePath(root: string, hash: StateHash): string;
14
+ export declare function createSnapshotStore(options: SnapshotStoreOptions): BranchWritableStateStore;
15
+ //# sourceMappingURL=snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../src/loop/state/snapshot.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAgB,MAAM,WAAW,CAAC;AAUnF,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAK3D;AAED,iEAAiE;AACjE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAE/D;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,GAAG,wBAAwB,CA4F3F"}
@@ -0,0 +1,31 @@
1
+ import { type Result } from "neverthrow";
2
+ import type { RuntimeError } from "../../model/index.ts";
3
+ import type { BranchWritableStateStore } from "./port.ts";
4
+ export interface SqliteStoreOptions {
5
+ /** Database file path; durability and crash recovery require a real file
6
+ * (`:memory:` works but is lost on exit). */
7
+ readonly path: string;
8
+ /** Lease owner id for this runner; defaults to a random per-process id. */
9
+ readonly owner?: string;
10
+ /** A lease whose heartbeat is older than this many ms is treated as a crashed
11
+ * holder and reclaimed on open. */
12
+ readonly leaseTtlMs?: number;
13
+ /** Injectable clock (ms epoch) for deterministic lease tests; defaults to `Date.now`. */
14
+ readonly now?: () => number;
15
+ }
16
+ /**
17
+ * The `sqlite` adapter: a {@link StateStore} plus lease lifecycle controls. The
18
+ * extra members are NOT part of the port — loop code targets `StateStore` and never
19
+ * sees them, so swapping `snapshot` <-> `sqlite` needs no loop-definition change.
20
+ */
21
+ export interface SqliteStore extends BranchWritableStateStore {
22
+ /** This runner's lease owner id. */
23
+ readonly owner: string;
24
+ /** Refresh the lease heartbeat mid-step so a long step keeps its lease;
25
+ * `err` once another runner has reclaimed a stale lease. */
26
+ heartbeat(): Result<void, RuntimeError>;
27
+ /** Release the lease and close the database (clean shutdown — not a crash). */
28
+ close(): void;
29
+ }
30
+ export declare function createSqliteStore(options: SqliteStoreOptions): Result<SqliteStore, RuntimeError>;
31
+ //# sourceMappingURL=sqlite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../../src/loop/state/sqlite.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,KAAK,EAAE,wBAAwB,EAA2B,MAAM,WAAW,CAAC;AA+BnF,MAAM,WAAW,kBAAkB;IACjC;iDAC6C;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;uCACmC;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,yFAAyF;IACzF,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,wBAAwB;IAC3D,oCAAoC;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;gEAC4D;IAC5D,SAAS,IAAI,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACxC,+EAA+E;IAC/E,KAAK,IAAI,IAAI,CAAC;CACf;AAiBD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAwLhG"}
@@ -0,0 +1,28 @@
1
+ import { type Result } from "neverthrow";
2
+ import type { BackEdge, CycleReport, NodeId } from "./graph/index.ts";
3
+ /**
4
+ * Predicate the contract queries per loop. L06 implements it by checking whether the back-edge's
5
+ * head node has a bound preset archetype or `.measure()` variant. Queried with the back-edge
6
+ * head (`BackEdge.to`) — the node a loop jumps back to.
7
+ */
8
+ export type HasVariant = (node: NodeId) => boolean;
9
+ export type CycleViolationKind = "unguarded-back-edge" | "accidental-cycle";
10
+ export interface CycleViolation {
11
+ readonly kind: CycleViolationKind;
12
+ readonly backEdge: BackEdge;
13
+ /** The cycle's node path, used to name it in the message. */
14
+ readonly cycle: readonly NodeId[];
15
+ }
16
+ export interface TerminationContractError {
17
+ readonly _tag: "TerminationContractViolated";
18
+ readonly violations: readonly CycleViolation[];
19
+ /** Human-readable summary naming every offending cycle. */
20
+ readonly message: string;
21
+ }
22
+ /**
23
+ * Enforce the termination contract over an analyzed loop graph. Returns `ok` when every cycle is
24
+ * a declared loop back-edge whose head carries a variant; otherwise `err` naming each offending
25
+ * cycle. Collects ALL violations in one pass so the author sees every problem at once.
26
+ */
27
+ export declare function enforceTerminationContract(report: CycleReport, hasVariant: HasVariant): Result<void, TerminationContractError>;
28
+ //# sourceMappingURL=termination-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"termination-contract.d.ts","sourceRoot":"","sources":["../../src/loop/termination-contract.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,GAAG,kBAAkB,CAAC;AAE5E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,SAAS,cAAc,EAAE,CAAC;IAC/C,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAoBD;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,WAAW,EACnB,UAAU,EAAE,UAAU,GACrB,MAAM,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAmBxC"}
@@ -0,0 +1,33 @@
1
+ import type { Usage } from "../model/index.ts";
2
+ export interface FingerprintAction {
3
+ readonly identity: string;
4
+ readonly inputs: unknown;
5
+ }
6
+ export interface FingerprintDetectorOptions<T> {
7
+ readonly project: (value: T) => FingerprintAction | undefined;
8
+ /** Number of recent fingerprints retained for repeat detection. */
9
+ readonly windowSize?: number;
10
+ /** Repeated occurrences within the window required to declare stuck. */
11
+ readonly repeatThreshold?: number;
12
+ }
13
+ export type TokenUsageSummary = {
14
+ readonly kind: "known";
15
+ readonly total: number;
16
+ readonly budget?: number;
17
+ } | {
18
+ readonly kind: "unknown";
19
+ readonly knownTotal: number;
20
+ readonly budget?: number;
21
+ };
22
+ export declare function usageTokens(usage: Usage): number;
23
+ export declare class TokenBudgetCounter {
24
+ #private;
25
+ constructor(budget?: number);
26
+ record(usage: Usage | undefined): void;
27
+ get shouldReport(): boolean;
28
+ get exhausted(): boolean;
29
+ summary(): TokenUsageSummary;
30
+ }
31
+ export declare function makeFingerprintStuckDetector<T>(options: FingerprintDetectorOptions<T>): (value: T) => boolean;
32
+ export declare function fingerprintAction(action: FingerprintAction): string;
33
+ //# sourceMappingURL=termination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"termination.d.ts","sourceRoot":"","sources":["../../src/loop/termination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,0BAA0B,CAAC,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,iBAAiB,GAAG,SAAS,CAAC;IAC9D,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,MAAM,iBAAiB,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5E;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEhD;AAED,qBAAa,kBAAkB;;gBAMjB,MAAM,CAAC,EAAE,MAAM;IAI3B,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,IAAI;IAStC,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,OAAO,IAAI,iBAAiB;CAM7B;AAED,wBAAgB,4BAA4B,CAAC,CAAC,EAC5C,OAAO,EAAE,0BAA0B,CAAC,CAAC,CAAC,GACrC,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CA8BvB;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAEnE"}
@@ -0,0 +1,30 @@
1
+ import type { z } from "zod";
2
+ import type { BackendTag, LlmResult } from "./schemas.ts";
3
+ import type { SessionId } from "./brand.ts";
4
+ export type BackendApprovalPolicy = "never" | "on-request" | "on-failure" | "granular" | "untrusted";
5
+ export type BackendSandboxMode = "read-only" | "workspace-write" | "danger-full-access";
6
+ export interface BackendRetryConfig {
7
+ readonly attempts: number;
8
+ }
9
+ export interface StructuredOutputConfig<Output = unknown> {
10
+ readonly schema: z.ZodType<Output>;
11
+ readonly name?: string;
12
+ readonly description?: string;
13
+ }
14
+ export interface BackendConfig<B extends BackendTag = BackendTag, Output = unknown> {
15
+ readonly model?: string;
16
+ readonly systemPrompt?: string;
17
+ readonly approvalPolicy?: BackendApprovalPolicy;
18
+ readonly readOnly?: boolean;
19
+ readonly sandbox?: BackendSandboxMode;
20
+ readonly selfManagedGit?: boolean;
21
+ readonly retry?: BackendRetryConfig;
22
+ readonly structuredOutput?: StructuredOutputConfig<Output>;
23
+ readonly resumeSessionId?: SessionId<B>;
24
+ readonly interactive?: boolean;
25
+ }
26
+ export type BackendResult<B extends BackendTag> = Omit<LlmResult, "backend" | "sessionId"> & {
27
+ readonly backend: B;
28
+ readonly sessionId: SessionId<B>;
29
+ };
30
+ //# sourceMappingURL=backend-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend-config.d.ts","sourceRoot":"","sources":["../../src/model/backend-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,YAAY,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC;AACrG,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAExF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB,CAAC,MAAM,GAAG,OAAO;IACtD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,EAAE,MAAM,GAAG,OAAO;IAChF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC3D,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACxC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,UAAU,IAAI,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CAAC,GAAG;IAC3F,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { BackendTag } from "./schemas.ts";
2
+ declare const brand: unique symbol;
3
+ export type Brand<T, Name extends string> = T & {
4
+ readonly [brand]: Name;
5
+ };
6
+ export type SessionId<B extends BackendTag> = Brand<string, `SessionId:${B}`>;
7
+ export declare function sessionId<B extends BackendTag>(backend: B, value: string): SessionId<B>;
8
+ export {};
9
+ //# sourceMappingURL=brand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/model/brand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,CAAC,MAAM,KAAK,EAAE,OAAO,MAAM,CAAC;AAEnC,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,IAAI,SAAS,MAAM,IAAI,CAAC,GAAG;IAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAE3E,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,UAAU,IAAI,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;AAE9E,wBAAgB,SAAS,CAAC,CAAC,SAAS,UAAU,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAEvF"}
@@ -0,0 +1,11 @@
1
+ import type { BackendTag, RuntimeError } from "./schemas.ts";
2
+ type RuntimeErrorArgs<Tag extends RuntimeError["_tag"]> = Omit<Extract<RuntimeError, {
3
+ _tag: Tag;
4
+ }>, "_tag">;
5
+ export declare function unsupportedFeature(feature: string, reason: string): RuntimeError;
6
+ export declare function backendFailed(backend: BackendTag, message: string): RuntimeError;
7
+ export declare function commandFailed(args: RuntimeErrorArgs<"CommandFailed">): RuntimeError;
8
+ export declare function structuredOutputValidationFailed(args: RuntimeErrorArgs<"StructuredOutputValidationFailed">): RuntimeError;
9
+ export declare function ioFailed(seam: "source" | "sink" | "tool", kind: string, message: string): RuntimeError;
10
+ export {};
11
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/model/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE7D,KAAK,gBAAgB,CAAC,GAAG,SAAS,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,CAC5D,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC,EACpC,MAAM,CACP,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAEhF;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,YAAY,CAEhF;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,gBAAgB,CAAC,eAAe,CAAC,GAAG,YAAY,CAEnF;AAED,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,gBAAgB,CAAC,kCAAkC,CAAC,GACzD,YAAY,CAEd;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,YAAY,CAEtG"}
@@ -0,0 +1,8 @@
1
+ export type * from "./backend-config.ts";
2
+ export * from "./brand.ts";
3
+ export * from "./errors.ts";
4
+ export * from "./json-schema.ts";
5
+ export * from "./result.ts";
6
+ export * from "./schemas.ts";
7
+ export * from "./structured.ts";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,qBAAqB,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { z } from "zod";
2
+ export declare function jsonSchemaFromZod(schema: z.ZodType): unknown;
3
+ export declare function canonicalJsonSchemas(): Record<string, unknown>;
4
+ //# sourceMappingURL=json-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../src/model/json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,OAAO,CAE5D;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAM9D"}
@@ -0,0 +1,3 @@
1
+ import type { Result } from "neverthrow";
2
+ export declare function orThrow<T, E>(result: Result<T, E>): T;
3
+ //# sourceMappingURL=result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/model/result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAUrD"}