@twelvehart/orcats 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +3 -3
  2. package/dist/backends/acp-client.d.ts +1 -1
  3. package/dist/backends/acp-client.d.ts.map +1 -1
  4. package/dist/backends/acp-run.d.ts.map +1 -1
  5. package/dist/backends/claude-run.d.ts.map +1 -1
  6. package/dist/backends/codex-jsonl.d.ts +2 -1
  7. package/dist/backends/codex-jsonl.d.ts.map +1 -1
  8. package/dist/backends/codex-run.d.ts +2 -1
  9. package/dist/backends/codex-run.d.ts.map +1 -1
  10. package/dist/backends/codex.d.ts.map +1 -1
  11. package/dist/backends/pi-run.d.ts.map +1 -1
  12. package/dist/backends/select.d.ts +1 -1
  13. package/dist/backends/select.d.ts.map +1 -1
  14. package/dist/backends/subprocess-run.d.ts +4 -5
  15. package/dist/backends/subprocess-run.d.ts.map +1 -1
  16. package/dist/backends/subprocess-termination.d.ts +4 -0
  17. package/dist/backends/subprocess-termination.d.ts.map +1 -0
  18. package/dist/baseline/index.d.ts +3 -1
  19. package/dist/baseline/index.d.ts.map +1 -1
  20. package/dist/cli/version.d.ts +1 -1
  21. package/dist/conversation/conversation.d.ts +2 -0
  22. package/dist/conversation/conversation.d.ts.map +1 -1
  23. package/dist/conversation/settlement-reservation.d.ts +10 -0
  24. package/dist/conversation/settlement-reservation.d.ts.map +1 -0
  25. package/dist/model/backend-config.d.ts +2 -0
  26. package/dist/model/backend-config.d.ts.map +1 -1
  27. package/package.json +6 -5
  28. package/src/backends/acp-client.ts +12 -10
  29. package/src/backends/acp-run.ts +18 -18
  30. package/src/backends/claude-run.ts +7 -5
  31. package/src/backends/codex-jsonl.ts +5 -0
  32. package/src/backends/codex-run.ts +15 -1
  33. package/src/backends/codex.ts +4 -1
  34. package/src/backends/pi-run.ts +8 -2
  35. package/src/backends/select.ts +4 -1
  36. package/src/backends/subprocess-run.ts +534 -58
  37. package/src/backends/subprocess-termination.ts +56 -0
  38. package/src/baseline/index.ts +4 -2
  39. package/src/cli/embedded.ts +19 -0
  40. package/src/cli/main.ts +6 -3
  41. package/src/cli/version.ts +1 -1
  42. package/src/conversation/conversation.ts +92 -7
  43. package/src/conversation/settlement-reservation.ts +127 -0
  44. package/src/model/backend-config.ts +8 -0
  45. package/src/monitor/index.ts +4 -2
  46. package/src/run-output/index.ts +2 -2
@@ -10,6 +10,7 @@ import {
10
10
  type SubprocessProcess,
11
11
  type SubprocessSpawner
12
12
  } from "./subprocess-run.ts";
13
+ import { terminateSubprocess } from "./subprocess-termination.ts";
13
14
  import type { AutonomousRequest, LlmBackend } from "./types.ts";
14
15
  import { StreamConversation } from "../conversation/index.ts";
15
16
  import { backendFailed, type BackendConfig } from "../model/index.ts";
@@ -137,12 +138,17 @@ export function pi(options: PiBackendOptions = {}): LlmBackend<"pi"> {
137
138
  backend: "pi",
138
139
  capacity: options.capacity ?? 256,
139
140
  canAskUser: false,
140
- onCancel: () => {
141
- child?.kill("SIGTERM");
141
+ onCancel: async () => {
142
+ if (child) {
143
+ await terminateSubprocess(child);
144
+ }
142
145
  }
143
146
  });
144
147
 
145
148
  queueMicrotask(() => {
149
+ if (conversation.signal.aborted) {
150
+ return;
151
+ }
146
152
  void runPiConversation(request, options, conversation, (process) => {
147
153
  child = process;
148
154
  });
@@ -5,7 +5,10 @@ import { opencode } from "./opencode-run.ts";
5
5
  import { pi } from "./pi-run.ts";
6
6
  import type { LlmBackend } from "./types.ts";
7
7
 
8
- export type PortableBackendConfig = Omit<BackendConfig, "resumeSessionId" | "structuredOutput">;
8
+ export type PortableBackendConfig = Omit<
9
+ BackendConfig,
10
+ "reasoningEffort" | "resumeSessionId" | "structuredOutput"
11
+ >;
9
12
 
10
13
  export interface SelectBackendOptions {
11
14
  readonly default: BackendTag;