@tryarcanist/cli 0.1.150 → 0.1.152
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/dist/index.js +18 -37
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -545,11 +545,6 @@ var AGENT_RUNTIME_BACKENDS = [
|
|
|
545
545
|
function isAgentRuntimeBackend(value) {
|
|
546
546
|
return AGENT_RUNTIME_BACKENDS.includes(value);
|
|
547
547
|
}
|
|
548
|
-
var HARNESS_KIND_BY_BACKEND = {
|
|
549
|
-
[CODEX_AGENT_RUNTIME_BACKEND]: "codex-session",
|
|
550
|
-
[CLAUDE_CODE_AGENT_RUNTIME_BACKEND]: "claude-session",
|
|
551
|
-
[OPENCODE_AGENT_RUNTIME_BACKEND]: "codex-session"
|
|
552
|
-
};
|
|
553
548
|
|
|
554
549
|
// ../../shared/utils/type-guards.ts
|
|
555
550
|
function isRecord(value) {
|
|
@@ -579,7 +574,7 @@ var AnthropicModel = {
|
|
|
579
574
|
Sonnet46: "claude-sonnet-4-6"
|
|
580
575
|
};
|
|
581
576
|
var BasetenModel = {
|
|
582
|
-
|
|
577
|
+
Glm47: "glm-4.7"
|
|
583
578
|
};
|
|
584
579
|
var MODEL_PROVIDERS_SET = /* @__PURE__ */ new Set([
|
|
585
580
|
"openai",
|
|
@@ -737,18 +732,18 @@ var MODEL_REGISTRY = [
|
|
|
737
732
|
sessionStart: { eligible: true }
|
|
738
733
|
},
|
|
739
734
|
{
|
|
740
|
-
id: BasetenModel.
|
|
741
|
-
name: "
|
|
735
|
+
id: BasetenModel.Glm47,
|
|
736
|
+
name: "GLM-4.7",
|
|
742
737
|
provider: "baseten",
|
|
743
738
|
backends: [OPENCODE_AGENT_RUNTIME_BACKEND],
|
|
744
|
-
contextWindow:
|
|
745
|
-
// Verified 2026-06-
|
|
746
|
-
// the served
|
|
747
|
-
|
|
748
|
-
//
|
|
749
|
-
//
|
|
750
|
-
|
|
751
|
-
pricing: { inputPerMillion: 0, outputPerMillion: 0 },
|
|
739
|
+
contextWindow: 2e5,
|
|
740
|
+
// Verified 2026-06-30: GLM-4.6V is not served by Baseten, so opencode GA
|
|
741
|
+
// ships the served GLM-4.7 Model API instead. The served id is namespaced
|
|
742
|
+
// `zai-org/GLM-4.7`, not bare `glm-4.7`. GLM-4.7 is text-only (vision lives
|
|
743
|
+
// in the separate `-V` line), so opencode image input is plumbed but not
|
|
744
|
+
// exercised until a served `-V` model returns.
|
|
745
|
+
providerModelId: "zai-org/GLM-4.7",
|
|
746
|
+
pricing: { inputPerMillion: 0.6, outputPerMillion: 2.2, cacheReadPerMillion: 0.12 },
|
|
752
747
|
sessionStart: { eligible: true, isDefault: true }
|
|
753
748
|
}
|
|
754
749
|
];
|
|
@@ -915,10 +910,6 @@ function sleep(ms) {
|
|
|
915
910
|
}
|
|
916
911
|
|
|
917
912
|
// ../../shared/session/phase.ts
|
|
918
|
-
var NON_REPO_SESSION_KINDS = /* @__PURE__ */ new Set(["terminal_bench", "swe_bench_pro", "swe_polybench"]);
|
|
919
|
-
function isRepoSession(sessionKind) {
|
|
920
|
-
return !sessionKind || !NON_REPO_SESSION_KINDS.has(sessionKind);
|
|
921
|
-
}
|
|
922
913
|
var TERMINAL_PHASES_ARRAY = [
|
|
923
914
|
"completed",
|
|
924
915
|
"superseded",
|
|
@@ -934,17 +925,16 @@ var TERMINAL_FOR_FALLBACK_POLLING_PHASES = new Set(
|
|
|
934
925
|
var CHILD_SLOT_RELEASE_PHASES = new Set(
|
|
935
926
|
TERMINAL_PHASES_ARRAY.filter((phase) => phase !== "stopped")
|
|
936
927
|
);
|
|
937
|
-
function isTerminalPhase(phase,
|
|
938
|
-
|
|
939
|
-
return phase === "idle" && !isRepoSession(sessionKind);
|
|
928
|
+
function isTerminalPhase(phase, _sessionKind) {
|
|
929
|
+
return TERMINAL_PHASES.has(phase);
|
|
940
930
|
}
|
|
941
931
|
|
|
942
932
|
// src/constants/watch.ts
|
|
943
933
|
var MIN_WATCH_POLL_INTERVAL_MS = 1;
|
|
944
934
|
var DEFAULT_WATCH_POLL_INTERVAL_MS = 1e3;
|
|
945
935
|
var WATCH_REPLAY_PAGE_SIZE = 200;
|
|
946
|
-
function isWatchTerminal(phase
|
|
947
|
-
return isTerminalPhase(phase
|
|
936
|
+
function isWatchTerminal(phase) {
|
|
937
|
+
return isTerminalPhase(phase);
|
|
948
938
|
}
|
|
949
939
|
|
|
950
940
|
// src/uploads.ts
|
|
@@ -1112,13 +1102,6 @@ function noChangeOutcomeCopy(reason) {
|
|
|
1112
1102
|
title: "Completed without publishable code changes - no PR created.",
|
|
1113
1103
|
detail: null
|
|
1114
1104
|
};
|
|
1115
|
-
case "repoless_benchmark":
|
|
1116
|
-
return {
|
|
1117
|
-
state: "no_changes",
|
|
1118
|
-
tone: "info",
|
|
1119
|
-
title: "Completed without code changes - no PR created.",
|
|
1120
|
-
detail: null
|
|
1121
|
-
};
|
|
1122
1105
|
case "prep_failed":
|
|
1123
1106
|
return {
|
|
1124
1107
|
state: "no_change_abnormal",
|
|
@@ -2312,7 +2295,6 @@ function parseSsePayload(payload) {
|
|
|
2312
2295
|
if (stopMode !== void 0) entry.stopMode = stopMode;
|
|
2313
2296
|
const finalizingStep = validateEnumField(data.finalizingStep, VALID_FINALIZING_STEPS);
|
|
2314
2297
|
if (finalizingStep !== void 0) entry.finalizingStep = finalizingStep;
|
|
2315
|
-
if (typeof data.sessionKind === "string") entry.sessionKind = data.sessionKind;
|
|
2316
2298
|
if (typeof data.title === "string") entry.title = data.title;
|
|
2317
2299
|
if (typeof data.spawnDurationMs === "number" || data.spawnDurationMs === null) {
|
|
2318
2300
|
entry.spawnDurationMs = data.spawnDurationMs;
|
|
@@ -2498,8 +2480,7 @@ function extractSessionLifecycle(payload) {
|
|
|
2498
2480
|
const root = session && typeof session === "object" ? session : payload;
|
|
2499
2481
|
const phaseRaw = root.phase;
|
|
2500
2482
|
const phase = typeof phaseRaw === "string" && VALID_PHASES.has(phaseRaw) ? phaseRaw : null;
|
|
2501
|
-
|
|
2502
|
-
return { phase, sessionKind };
|
|
2483
|
+
return { phase };
|
|
2503
2484
|
}
|
|
2504
2485
|
async function watchCommand(sessionId, options, command) {
|
|
2505
2486
|
const runtime = getRuntimeOptions(command, options);
|
|
@@ -2580,7 +2561,7 @@ async function watchCommand(sessionId, options, command) {
|
|
|
2580
2561
|
console.log(rendered.line);
|
|
2581
2562
|
}
|
|
2582
2563
|
if (receivedFullPage) continue;
|
|
2583
|
-
if (parsed.status?.phase && isWatchTerminal(parsed.status.phase
|
|
2564
|
+
if (parsed.status?.phase && isWatchTerminal(parsed.status.phase)) {
|
|
2584
2565
|
if (!json && parsed.status.phase === "completed") {
|
|
2585
2566
|
if (textOpen) {
|
|
2586
2567
|
process.stdout.write("\n");
|
|
@@ -2643,7 +2624,7 @@ async function waitForCreatedPromptToSettle(config, sessionId, promptId, pollInt
|
|
|
2643
2624
|
}
|
|
2644
2625
|
const sessionPayload = await apiFetch(config, `/api/sessions/${sessionId}`);
|
|
2645
2626
|
const lifecycle = extractSessionLifecycle(sessionPayload);
|
|
2646
|
-
if (lifecycle.phase && isWatchTerminal(lifecycle.phase
|
|
2627
|
+
if (lifecycle.phase && isWatchTerminal(lifecycle.phase)) {
|
|
2647
2628
|
return fetchCreatedPromptStatus(config, sessionId, promptId);
|
|
2648
2629
|
}
|
|
2649
2630
|
await sleep(effectivePollIntervalMs);
|