@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.
- package/README.md +3 -3
- package/dist/backends/acp-client.d.ts +1 -1
- package/dist/backends/acp-client.d.ts.map +1 -1
- package/dist/backends/acp-run.d.ts.map +1 -1
- package/dist/backends/claude-run.d.ts.map +1 -1
- package/dist/backends/codex-jsonl.d.ts +2 -1
- package/dist/backends/codex-jsonl.d.ts.map +1 -1
- package/dist/backends/codex-run.d.ts +2 -1
- package/dist/backends/codex-run.d.ts.map +1 -1
- package/dist/backends/codex.d.ts.map +1 -1
- package/dist/backends/pi-run.d.ts.map +1 -1
- package/dist/backends/select.d.ts +1 -1
- package/dist/backends/select.d.ts.map +1 -1
- package/dist/backends/subprocess-run.d.ts +4 -5
- package/dist/backends/subprocess-run.d.ts.map +1 -1
- package/dist/backends/subprocess-termination.d.ts +4 -0
- package/dist/backends/subprocess-termination.d.ts.map +1 -0
- package/dist/baseline/index.d.ts +3 -1
- package/dist/baseline/index.d.ts.map +1 -1
- package/dist/cli/version.d.ts +1 -1
- package/dist/conversation/conversation.d.ts +2 -0
- package/dist/conversation/conversation.d.ts.map +1 -1
- package/dist/conversation/settlement-reservation.d.ts +10 -0
- package/dist/conversation/settlement-reservation.d.ts.map +1 -0
- package/dist/model/backend-config.d.ts +2 -0
- package/dist/model/backend-config.d.ts.map +1 -1
- package/package.json +6 -5
- package/src/backends/acp-client.ts +12 -10
- package/src/backends/acp-run.ts +18 -18
- package/src/backends/claude-run.ts +7 -5
- package/src/backends/codex-jsonl.ts +5 -0
- package/src/backends/codex-run.ts +15 -1
- package/src/backends/codex.ts +4 -1
- package/src/backends/pi-run.ts +8 -2
- package/src/backends/select.ts +4 -1
- package/src/backends/subprocess-run.ts +534 -58
- package/src/backends/subprocess-termination.ts +56 -0
- package/src/baseline/index.ts +4 -2
- package/src/cli/embedded.ts +19 -0
- package/src/cli/main.ts +6 -3
- package/src/cli/version.ts +1 -1
- package/src/conversation/conversation.ts +92 -7
- package/src/conversation/settlement-reservation.ts +127 -0
- package/src/model/backend-config.ts +8 -0
- package/src/monitor/index.ts +4 -2
- package/src/run-output/index.ts +2 -2
package/src/backends/pi-run.ts
CHANGED
|
@@ -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
|
|
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
|
});
|
package/src/backends/select.ts
CHANGED
|
@@ -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<
|
|
8
|
+
export type PortableBackendConfig = Omit<
|
|
9
|
+
BackendConfig,
|
|
10
|
+
"reasoningEffort" | "resumeSessionId" | "structuredOutput"
|
|
11
|
+
>;
|
|
9
12
|
|
|
10
13
|
export interface SelectBackendOptions {
|
|
11
14
|
readonly default: BackendTag;
|