replicas-cli 0.3.432 → 0.3.434
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.cjs +106 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21907,7 +21907,8 @@ var init_types4 = __esm({
|
|
|
21907
21907
|
...DEFAULT_OPENROUTER_MODELS,
|
|
21908
21908
|
GLM_5_3_FLASH_MODEL,
|
|
21909
21909
|
"minimax/minimax-m3",
|
|
21910
|
-
"meta/muse-spark-1.3"
|
|
21910
|
+
"meta/muse-spark-1.3",
|
|
21911
|
+
"qwen/qwen4-max"
|
|
21911
21912
|
];
|
|
21912
21913
|
CLAUDE_MODEL_CONTEXT_WINDOWS = {
|
|
21913
21914
|
[CLAUDE_FABLE_5_2_MODEL]: 1e6,
|
|
@@ -22072,6 +22073,7 @@ var init_types4 = __esm({
|
|
|
22072
22073
|
[DEFAULT_MUSE_MODEL]: "Muse Spark 1.2",
|
|
22073
22074
|
"meta/muse-spark-1.3": "Muse Spark 1.3 via OpenRouter",
|
|
22074
22075
|
"google/gemini-3.8-flash": "Gemini 3.8 Flash via OpenRouter",
|
|
22076
|
+
"qwen/qwen4-max": "Qwen4 Max via OpenRouter",
|
|
22075
22077
|
...ASTER_MODEL_LABELS,
|
|
22076
22078
|
"gpt-5.4": "GPT-5.4",
|
|
22077
22079
|
"gpt-5.4-mini": "GPT-5.4 Mini",
|
|
@@ -38498,7 +38500,7 @@ var CLI_VERSION;
|
|
|
38498
38500
|
var init_cli_version = __esm({
|
|
38499
38501
|
"../shared/src/cli-version.ts"() {
|
|
38500
38502
|
"use strict";
|
|
38501
|
-
CLI_VERSION = "0.3.
|
|
38503
|
+
CLI_VERSION = "0.3.434";
|
|
38502
38504
|
}
|
|
38503
38505
|
});
|
|
38504
38506
|
|
|
@@ -38536,6 +38538,101 @@ var init_chat_tabs = __esm({
|
|
|
38536
38538
|
}
|
|
38537
38539
|
});
|
|
38538
38540
|
|
|
38541
|
+
// ../shared/src/engine/exec-protocol.ts
|
|
38542
|
+
var EXEC_MAX_FRAME_BYTES, EXEC_DEFAULT_READ_BYTES, EXEC_PROCESS_BUFFER_BYTES, EXEC_DEFAULT_IDLE_TTL_MS, EXEC_MAX_IDLE_TTL_MS, encoder2, decoder2, EXEC_ERROR_CODES, execRequestSchema, execStartedSchema, execExitSchema, execReplySchemas, execEventSchema, execErrorBodySchema;
|
|
38543
|
+
var init_exec_protocol = __esm({
|
|
38544
|
+
"../shared/src/engine/exec-protocol.ts"() {
|
|
38545
|
+
"use strict";
|
|
38546
|
+
init_zod();
|
|
38547
|
+
EXEC_MAX_FRAME_BYTES = 16 * 1024 * 1024;
|
|
38548
|
+
EXEC_DEFAULT_READ_BYTES = 8 * 1024 * 1024;
|
|
38549
|
+
EXEC_PROCESS_BUFFER_BYTES = 2 * 1024 * 1024;
|
|
38550
|
+
EXEC_DEFAULT_IDLE_TTL_MS = 30 * 6e4;
|
|
38551
|
+
EXEC_MAX_IDLE_TTL_MS = 24 * 60 * 6e4;
|
|
38552
|
+
encoder2 = new TextEncoder();
|
|
38553
|
+
decoder2 = new TextDecoder();
|
|
38554
|
+
EXEC_ERROR_CODES = [
|
|
38555
|
+
"ENOENT",
|
|
38556
|
+
"EISDIR",
|
|
38557
|
+
"ENOTDIR",
|
|
38558
|
+
"EACCES",
|
|
38559
|
+
"EEXIST",
|
|
38560
|
+
"EINVAL",
|
|
38561
|
+
"EFBIG",
|
|
38562
|
+
"ESRCH",
|
|
38563
|
+
"ENOTSUP",
|
|
38564
|
+
"spawn_error",
|
|
38565
|
+
"aborted",
|
|
38566
|
+
"lost",
|
|
38567
|
+
"unknown"
|
|
38568
|
+
];
|
|
38569
|
+
execRequestSchema = external_exports.object({
|
|
38570
|
+
/** The thread that owns the process; ending the thread kills its processes. */
|
|
38571
|
+
threadId: external_exports.string().min(1),
|
|
38572
|
+
label: external_exports.string().max(200).optional(),
|
|
38573
|
+
/** Run through bash; `login` (default true) sources the login profile like Codex's `bash -lc`. */
|
|
38574
|
+
command: external_exports.string().min(1).optional(),
|
|
38575
|
+
argv: external_exports.array(external_exports.string()).min(1).optional(),
|
|
38576
|
+
login: external_exports.boolean().optional(),
|
|
38577
|
+
cwd: external_exports.string().min(1).optional(),
|
|
38578
|
+
env: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
38579
|
+
/** Kill after this long, whoever is attached. */
|
|
38580
|
+
timeoutMs: external_exports.number().int().positive().optional(),
|
|
38581
|
+
/** Kill after this long with nobody attached. */
|
|
38582
|
+
idleTtlMs: external_exports.number().int().positive().max(EXEC_MAX_IDLE_TTL_MS).optional()
|
|
38583
|
+
}).refine((body) => body.command === void 0 !== (body.argv === void 0), { message: "Pass exactly one of command or argv" });
|
|
38584
|
+
execStartedSchema = external_exports.object({ processId: external_exports.string(), pid: external_exports.number() });
|
|
38585
|
+
execExitSchema = external_exports.object({ exitCode: external_exports.number(), signal: external_exports.string().nullable(), reason: external_exports.enum(["exit", "timeout", "killed", "idle"]) });
|
|
38586
|
+
execReplySchemas = {
|
|
38587
|
+
hello: external_exports.object({
|
|
38588
|
+
protocol: external_exports.number(),
|
|
38589
|
+
version: external_exports.string(),
|
|
38590
|
+
os: external_exports.string(),
|
|
38591
|
+
arch: external_exports.string(),
|
|
38592
|
+
home: external_exports.string(),
|
|
38593
|
+
root: external_exports.string(),
|
|
38594
|
+
bootId: external_exports.string(),
|
|
38595
|
+
features: external_exports.array(external_exports.string())
|
|
38596
|
+
}),
|
|
38597
|
+
stat: external_exports.object({ kind: external_exports.enum(["file", "directory", "symlink", "other"]), size: external_exports.number(), mtimeMs: external_exports.number() }),
|
|
38598
|
+
read: external_exports.object({ size: external_exports.number() }),
|
|
38599
|
+
write: external_exports.object({ bytes: external_exports.number() }),
|
|
38600
|
+
exit: execExitSchema,
|
|
38601
|
+
kill: external_exports.object({}).strip(),
|
|
38602
|
+
killThread: external_exports.object({ killed: external_exports.number() }),
|
|
38603
|
+
list: external_exports.object({
|
|
38604
|
+
processes: external_exports.array(execStartedSchema.extend({
|
|
38605
|
+
threadId: external_exports.string(),
|
|
38606
|
+
label: external_exports.string().nullable(),
|
|
38607
|
+
command: external_exports.string(),
|
|
38608
|
+
startedAt: external_exports.string(),
|
|
38609
|
+
outputBytes: external_exports.number(),
|
|
38610
|
+
bufferStart: external_exports.number(),
|
|
38611
|
+
exit: execExitSchema.nullable()
|
|
38612
|
+
}))
|
|
38613
|
+
})
|
|
38614
|
+
};
|
|
38615
|
+
execEventSchema = external_exports.discriminatedUnion("kind", [
|
|
38616
|
+
execStartedSchema.extend({ kind: external_exports.literal("started") }),
|
|
38617
|
+
external_exports.object({ kind: external_exports.literal("output"), stream: external_exports.enum(["stdout", "stderr"]), offset: external_exports.number() }),
|
|
38618
|
+
external_exports.object({ kind: external_exports.literal("skipped"), offset: external_exports.number(), bytes: external_exports.number() })
|
|
38619
|
+
]);
|
|
38620
|
+
execErrorBodySchema = external_exports.object({ code: external_exports.enum(EXEC_ERROR_CODES), message: external_exports.string(), path: external_exports.string().optional() });
|
|
38621
|
+
}
|
|
38622
|
+
});
|
|
38623
|
+
|
|
38624
|
+
// ../shared/src/engine/exec-client.ts
|
|
38625
|
+
var RECONNECT_GIVE_UP_MS, encoder3;
|
|
38626
|
+
var init_exec_client = __esm({
|
|
38627
|
+
"../shared/src/engine/exec-client.ts"() {
|
|
38628
|
+
"use strict";
|
|
38629
|
+
init_result();
|
|
38630
|
+
init_exec_protocol();
|
|
38631
|
+
RECONNECT_GIVE_UP_MS = 2 * 6e4;
|
|
38632
|
+
encoder3 = new TextEncoder();
|
|
38633
|
+
}
|
|
38634
|
+
});
|
|
38635
|
+
|
|
38539
38636
|
// ../shared/src/engine/webhook.ts
|
|
38540
38637
|
var init_webhook = __esm({
|
|
38541
38638
|
"../shared/src/engine/webhook.ts"() {
|
|
@@ -49551,14 +49648,14 @@ function parseSseChunk(chunk) {
|
|
|
49551
49648
|
}
|
|
49552
49649
|
async function* iterateSseStream(body, onChunk) {
|
|
49553
49650
|
const reader = body.getReader();
|
|
49554
|
-
const
|
|
49651
|
+
const decoder3 = new TextDecoder();
|
|
49555
49652
|
let buffer = "";
|
|
49556
49653
|
let searchFrom = 0;
|
|
49557
49654
|
while (true) {
|
|
49558
49655
|
const { done, value } = await reader.read();
|
|
49559
49656
|
if (done) break;
|
|
49560
49657
|
onChunk?.();
|
|
49561
|
-
buffer +=
|
|
49658
|
+
buffer += decoder3.decode(value, { stream: true });
|
|
49562
49659
|
let end = buffer.indexOf("\n\n", searchFrom);
|
|
49563
49660
|
while (end >= 0) {
|
|
49564
49661
|
const event = parseSseChunk(buffer.slice(0, end));
|
|
@@ -49766,6 +49863,8 @@ var init_src = __esm({
|
|
|
49766
49863
|
init_environment_files();
|
|
49767
49864
|
init_chat_tabs();
|
|
49768
49865
|
init_environment2();
|
|
49866
|
+
init_exec_protocol();
|
|
49867
|
+
init_exec_client();
|
|
49769
49868
|
init_types4();
|
|
49770
49869
|
init_v1();
|
|
49771
49870
|
init_chat_kind();
|
|
@@ -55563,7 +55662,7 @@ async function gpuDeleteCommand(id, options) {
|
|
|
55563
55662
|
}
|
|
55564
55663
|
async function streamOutput(response) {
|
|
55565
55664
|
if (!response.body) throw new Error("Empty response from the GPU sandbox");
|
|
55566
|
-
const
|
|
55665
|
+
const decoder3 = new TextDecoder();
|
|
55567
55666
|
let buffer = "";
|
|
55568
55667
|
let exit;
|
|
55569
55668
|
const handle = (line) => {
|
|
@@ -55575,12 +55674,12 @@ async function streamOutput(response) {
|
|
|
55575
55674
|
else if (event.type === "exit") exit = { exitCode: event.exitCode };
|
|
55576
55675
|
};
|
|
55577
55676
|
for await (const chunk of import_node_stream.Readable.fromWeb(response.body)) {
|
|
55578
|
-
buffer +=
|
|
55677
|
+
buffer += decoder3.decode(chunk, { stream: true });
|
|
55579
55678
|
const lines = buffer.split("\n");
|
|
55580
55679
|
buffer = lines.pop() ?? "";
|
|
55581
55680
|
lines.forEach(handle);
|
|
55582
55681
|
}
|
|
55583
|
-
handle(buffer +
|
|
55682
|
+
handle(buffer + decoder3.decode());
|
|
55584
55683
|
if (!exit) {
|
|
55585
55684
|
throw new Error('Lost the connection to the GPU sandbox; the command may still be running. Use --detach and "replicas gpu logs -f" for long jobs.');
|
|
55586
55685
|
}
|