@tryarcanist/cli 0.1.285 → 0.1.287
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 -65
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8593,10 +8593,6 @@ var OpenAIModel = {
|
|
|
8593
8593
|
GPT52ChatLatest: "gpt-5.2-chat-latest",
|
|
8594
8594
|
GPT52Codex: "gpt-5.2-codex"
|
|
8595
8595
|
};
|
|
8596
|
-
var DeepSeekModel = {
|
|
8597
|
-
V4Flash: "deepseek-v4-flash",
|
|
8598
|
-
V4Pro: "deepseek-v4-pro"
|
|
8599
|
-
};
|
|
8600
8596
|
var MODEL_PROVIDERS_SET = /* @__PURE__ */ new Set(["openai", "anthropic"]);
|
|
8601
8597
|
var BACKEND_DESKTOP_IMAGE_FEEDBACK_CONFIGS = {
|
|
8602
8598
|
[CODEX_AGENT_RUNTIME_BACKEND]: {
|
|
@@ -8804,47 +8800,6 @@ var MODEL_REGISTRY = [
|
|
|
8804
8800
|
sessionStart: { eligible: true },
|
|
8805
8801
|
visibility: "internal_probe"
|
|
8806
8802
|
},
|
|
8807
|
-
{
|
|
8808
|
-
// Served by Fireworks through Ramp Router, never by OpenAI. Pricing is Fireworks' published
|
|
8809
|
-
// per-million rate, confirmed against billed dashboard rows to the cent on 2026-08-12 --
|
|
8810
|
-
// Ramp's own `GET /v1/models` catalog misprices the OpenAI family and is not a source here.
|
|
8811
|
-
id: DeepSeekModel.V4Flash,
|
|
8812
|
-
name: "DeepSeek V4 Flash",
|
|
8813
|
-
provider: "openai",
|
|
8814
|
-
backends: [CODEX_AGENT_RUNTIME_BACKEND],
|
|
8815
|
-
capabilities: { codexToolSearch: true },
|
|
8816
|
-
contextWindow: 1048576,
|
|
8817
|
-
reasoning: { efforts: ["high"], default: "high" },
|
|
8818
|
-
pricing: { inputPerMillion: 0.14, outputPerMillion: 0.28, cacheReadPerMillion: 0.028 },
|
|
8819
|
-
// Startable but hidden, the same two-axis shape gpt-5.3-codex-spark uses. `sessionStart` is
|
|
8820
|
-
// what lets an explicitly authorized caller actually start a session on this model --
|
|
8821
|
-
// createSessionState resolves through extractSessionStartModelIdForBackend, which reads this
|
|
8822
|
-
// block. `visibility` is what keeps it out of every customer surface: the public provider
|
|
8823
|
-
// groups filter on it, and extractSessionStartModelIdAnyBackend refuses a non-subscription
|
|
8824
|
-
// probe outright, so no stored default or automatic route can reach it.
|
|
8825
|
-
sessionStart: { eligible: true },
|
|
8826
|
-
visibility: "internal_probe"
|
|
8827
|
-
},
|
|
8828
|
-
{
|
|
8829
|
-
// The second candidate on the Ramp fallback list, so a Flash capacity 429 does not strand a
|
|
8830
|
-
// review. Roughly 12x Flash's rate, which is why the budget reservation prices against Pro.
|
|
8831
|
-
id: DeepSeekModel.V4Pro,
|
|
8832
|
-
name: "DeepSeek V4 Pro",
|
|
8833
|
-
provider: "openai",
|
|
8834
|
-
backends: [CODEX_AGENT_RUNTIME_BACKEND],
|
|
8835
|
-
capabilities: { codexToolSearch: true },
|
|
8836
|
-
contextWindow: 1048576,
|
|
8837
|
-
reasoning: { efforts: ["high"], default: "high" },
|
|
8838
|
-
pricing: { inputPerMillion: 1.74, outputPerMillion: 3.48, cacheReadPerMillion: 0.348 },
|
|
8839
|
-
// Startable but hidden, the same two-axis shape gpt-5.3-codex-spark uses. `sessionStart` is
|
|
8840
|
-
// what lets an explicitly authorized caller actually start a session on this model --
|
|
8841
|
-
// createSessionState resolves through extractSessionStartModelIdForBackend, which reads this
|
|
8842
|
-
// block. `visibility` is what keeps it out of every customer surface: the public provider
|
|
8843
|
-
// groups filter on it, and extractSessionStartModelIdAnyBackend refuses a non-subscription
|
|
8844
|
-
// probe outright, so no stored default or automatic route can reach it.
|
|
8845
|
-
sessionStart: { eligible: true },
|
|
8846
|
-
visibility: "internal_probe"
|
|
8847
|
-
},
|
|
8848
8803
|
{
|
|
8849
8804
|
id: OpenAIModel.GPT53Codex,
|
|
8850
8805
|
name: "GPT-5.3 Codex",
|
|
@@ -8954,14 +8909,12 @@ function splitModelIdentifier(value) {
|
|
|
8954
8909
|
}
|
|
8955
8910
|
function getRawModelValue(raw) {
|
|
8956
8911
|
if (typeof raw === "string") return asNonEmptyString(raw);
|
|
8957
|
-
if (!raw
|
|
8958
|
-
|
|
8959
|
-
return asNonEmptyString(value.modelID) ?? asNonEmptyString(value.modelId) ?? asNonEmptyString(value.id);
|
|
8912
|
+
if (!isRecord(raw)) return void 0;
|
|
8913
|
+
return asNonEmptyString(raw.modelID) ?? asNonEmptyString(raw.modelId) ?? asNonEmptyString(raw.id);
|
|
8960
8914
|
}
|
|
8961
8915
|
function getExplicitProvider(raw) {
|
|
8962
|
-
if (raw
|
|
8963
|
-
const
|
|
8964
|
-
const providerID = asNonEmptyString(value.providerID) ?? asNonEmptyString(value.providerId);
|
|
8916
|
+
if (isRecord(raw)) {
|
|
8917
|
+
const providerID = asNonEmptyString(raw.providerID) ?? asNonEmptyString(raw.providerId);
|
|
8965
8918
|
if (providerID && MODEL_PROVIDERS_SET.has(providerID)) {
|
|
8966
8919
|
return providerID;
|
|
8967
8920
|
}
|
|
@@ -9273,7 +9226,7 @@ function yamlLineForPath(doc, keyPath) {
|
|
|
9273
9226
|
}
|
|
9274
9227
|
function assertKnownKeys(path, doc, value) {
|
|
9275
9228
|
const issues = [];
|
|
9276
|
-
if (!
|
|
9229
|
+
if (!isRecord(value)) {
|
|
9277
9230
|
return [issue(path, "manifest must be a YAML object", { code: "manifest_type" })];
|
|
9278
9231
|
}
|
|
9279
9232
|
const root = value;
|
|
@@ -9292,7 +9245,7 @@ function assertKnownKeys(path, doc, value) {
|
|
|
9292
9245
|
);
|
|
9293
9246
|
}
|
|
9294
9247
|
}
|
|
9295
|
-
if (
|
|
9248
|
+
if (isRecord(root.layer)) {
|
|
9296
9249
|
for (const key of Object.keys(root.layer)) {
|
|
9297
9250
|
if (key !== "dockerfile") {
|
|
9298
9251
|
issues.push(
|
|
@@ -9305,7 +9258,7 @@ function assertKnownKeys(path, doc, value) {
|
|
|
9305
9258
|
}
|
|
9306
9259
|
}
|
|
9307
9260
|
}
|
|
9308
|
-
if (
|
|
9261
|
+
if (isRecord(root.smoke)) {
|
|
9309
9262
|
for (const key of Object.keys(root.smoke)) {
|
|
9310
9263
|
if (key !== "commands") {
|
|
9311
9264
|
issues.push(
|
|
@@ -9335,7 +9288,7 @@ function parseSandboxLayerManifest(path, text) {
|
|
|
9335
9288
|
}
|
|
9336
9289
|
const parsed = doc.toJSON();
|
|
9337
9290
|
const issues = assertKnownKeys(path, doc, parsed);
|
|
9338
|
-
const raw =
|
|
9291
|
+
const raw = isRecord(parsed) ? parsed : {};
|
|
9339
9292
|
if (!Object.prototype.hasOwnProperty.call(raw, "version")) {
|
|
9340
9293
|
issues.push(issue(path, "version is required", { field: "version", code: "required" }));
|
|
9341
9294
|
} else if (raw.version !== 1) {
|
|
@@ -9368,7 +9321,7 @@ function parseSandboxLayerManifest(path, text) {
|
|
|
9368
9321
|
);
|
|
9369
9322
|
}
|
|
9370
9323
|
let normalizedDockerfile;
|
|
9371
|
-
const dockerfile =
|
|
9324
|
+
const dockerfile = isRecord(layer) ? layer.dockerfile : void 0;
|
|
9372
9325
|
if (typeof dockerfile !== "string") {
|
|
9373
9326
|
issues.push(
|
|
9374
9327
|
issue(path, "layer.dockerfile must be a string", {
|
|
@@ -9393,7 +9346,7 @@ function parseSandboxLayerManifest(path, text) {
|
|
|
9393
9346
|
}
|
|
9394
9347
|
}
|
|
9395
9348
|
const commandsNode = (0, import_yaml.isMap)(doc.contents) ? doc.getIn(["smoke", "commands"], true) : void 0;
|
|
9396
|
-
const rawCommands = raw.smoke
|
|
9349
|
+
const rawCommands = isRecord(raw.smoke) ? raw.smoke.commands : [];
|
|
9397
9350
|
const smokeCommands = [];
|
|
9398
9351
|
if (!Array.isArray(rawCommands)) {
|
|
9399
9352
|
issues.push(
|
|
@@ -9633,7 +9586,7 @@ function normalizeSandboxLayerInstructions(instructions) {
|
|
|
9633
9586
|
}
|
|
9634
9587
|
function sortJsonValue(value) {
|
|
9635
9588
|
if (Array.isArray(value)) return value.map(sortJsonValue);
|
|
9636
|
-
if (!value
|
|
9589
|
+
if (!isRecord(value)) return value;
|
|
9637
9590
|
return Object.fromEntries(
|
|
9638
9591
|
Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, entry]) => [key, sortJsonValue(entry)])
|
|
9639
9592
|
);
|
|
@@ -10255,7 +10208,7 @@ function isOnboardingStageStatus(value) {
|
|
|
10255
10208
|
return typeof value === "string" && ONBOARDING_STAGE_STATUSES.includes(value);
|
|
10256
10209
|
}
|
|
10257
10210
|
function parseOnboardingStageEvent(input) {
|
|
10258
|
-
if (!
|
|
10211
|
+
if (!isRecord(input)) return null;
|
|
10259
10212
|
const record = input;
|
|
10260
10213
|
if (!isOnboardingStage(record.stage)) return null;
|
|
10261
10214
|
const status = isOnboardingStageStatus(record.status) ? record.status : "started";
|
|
@@ -11650,7 +11603,8 @@ function parseSsePayload(payload) {
|
|
|
11650
11603
|
let status = null;
|
|
11651
11604
|
const events = [];
|
|
11652
11605
|
for (const message of messages) {
|
|
11653
|
-
const
|
|
11606
|
+
const parsed = message.data ? parseJsonObject(message.data) : {};
|
|
11607
|
+
const data = isRecord(parsed) ? parsed : {};
|
|
11654
11608
|
if (message.event === "status") {
|
|
11655
11609
|
const phaseRaw = data.phase;
|
|
11656
11610
|
const phase = typeof phaseRaw === "string" && VALID_PHASES.has(phaseRaw) ? phaseRaw : null;
|
|
@@ -11683,8 +11637,7 @@ function validateEnumField(value, validSet) {
|
|
|
11683
11637
|
}
|
|
11684
11638
|
function parseJsonObject(value) {
|
|
11685
11639
|
try {
|
|
11686
|
-
|
|
11687
|
-
return parsed && typeof parsed === "object" ? parsed : {};
|
|
11640
|
+
return JSON.parse(value);
|
|
11688
11641
|
} catch (err) {
|
|
11689
11642
|
throw new Error(`Malformed SSE JSON payload: ${stringifyError(err)}`);
|
|
11690
11643
|
}
|
|
@@ -11703,7 +11656,7 @@ function buildPromptLabelMap(prompts) {
|
|
|
11703
11656
|
return labels;
|
|
11704
11657
|
}
|
|
11705
11658
|
function renderWatchEvent(event, state) {
|
|
11706
|
-
const data = event.data;
|
|
11659
|
+
const data = isRecord(event.data) ? event.data : {};
|
|
11707
11660
|
switch (event.type) {
|
|
11708
11661
|
case "text":
|
|
11709
11662
|
return { kind: "text", text: String(data.text ?? "") };
|
|
@@ -11980,7 +11933,7 @@ async function getSessionCommand(sessionId, options, command) {
|
|
|
11980
11933
|
writeJson(payload);
|
|
11981
11934
|
return;
|
|
11982
11935
|
}
|
|
11983
|
-
const session = payload.session && typeof payload.session === "object" ? payload.session : payload;
|
|
11936
|
+
const session = payload.session && typeof payload.session === "object" && !Array.isArray(payload.session) ? payload.session : payload;
|
|
11984
11937
|
console.log(`Session: ${String(session.sessionId ?? session.id ?? sessionId)}`);
|
|
11985
11938
|
console.log(`Status: ${String(session.phase ?? session.status ?? "unknown")}`);
|
|
11986
11939
|
if (session.repoUrl) console.log(`Repo: ${String(session.repoUrl)}`);
|
|
@@ -12062,7 +12015,7 @@ async function usageCommand(sessionId, options, command) {
|
|
|
12062
12015
|
writeJson(payload);
|
|
12063
12016
|
return;
|
|
12064
12017
|
}
|
|
12065
|
-
const usage = payload.usage && typeof payload.usage === "object" ? payload.usage : payload;
|
|
12018
|
+
const usage = payload.usage && typeof payload.usage === "object" && !Array.isArray(payload.usage) ? payload.usage : payload;
|
|
12066
12019
|
console.log(`Input tokens: ${String(usage.inputTokens ?? 0)}`);
|
|
12067
12020
|
console.log(`Output tokens: ${String(usage.outputTokens ?? 0)}`);
|
|
12068
12021
|
console.log(`Total tokens: ${String(usage.totalTokens ?? 0)}`);
|