usebeeline 0.0.113 → 0.0.114
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/usebeeline.mjs +68 -21
- package/package.json +1 -1
package/dist/usebeeline.mjs
CHANGED
|
@@ -3987,7 +3987,7 @@ __export(self_update_exports, {
|
|
|
3987
3987
|
import { createHash as createHash7 } from "node:crypto";
|
|
3988
3988
|
import { constants as fsConstants2 } from "node:fs";
|
|
3989
3989
|
import { access, chmod as chmod5, lstat as lstat3, mkdir as mkdir15, open, readFile as readFile10, rename as rename4, rm as rm6, symlink as symlink3, writeFile as writeFile10 } from "node:fs/promises";
|
|
3990
|
-
import { spawn as
|
|
3990
|
+
import { spawn as spawn7 } from "node:child_process";
|
|
3991
3991
|
import { homedir as homedir9 } from "node:os";
|
|
3992
3992
|
import { dirname as dirname11, join as join10, resolve as resolve22 } from "node:path";
|
|
3993
3993
|
function anchorLayout(rawLibDir) {
|
|
@@ -4137,7 +4137,7 @@ async function fetchText(url, fetchImpl) {
|
|
|
4137
4137
|
}
|
|
4138
4138
|
function run(command, args, timeoutMs) {
|
|
4139
4139
|
return new Promise((resolveRun) => {
|
|
4140
|
-
const child =
|
|
4140
|
+
const child = spawn7(command, args, { stdio: ["ignore", "ignore", "pipe"] });
|
|
4141
4141
|
let stderr = "";
|
|
4142
4142
|
child.stderr?.setEncoding("utf8");
|
|
4143
4143
|
child.stderr?.on("data", (chunk) => {
|
|
@@ -4210,7 +4210,7 @@ async function stageRelease(layout, manifestUrl, published, opts = {}) {
|
|
|
4210
4210
|
}
|
|
4211
4211
|
await writeFile10(tempArchive, Buffer.concat(chunks), { mode: 384 });
|
|
4212
4212
|
const entries = (await new Promise((resolveList, rejectList) => {
|
|
4213
|
-
const child =
|
|
4213
|
+
const child = spawn7("tar", ["-tzf", tempArchive], { stdio: ["ignore", "pipe", "inherit"] });
|
|
4214
4214
|
let out = "";
|
|
4215
4215
|
child.stdout?.on("data", (chunk) => {
|
|
4216
4216
|
out += chunk.toString("utf8");
|
|
@@ -7945,12 +7945,7 @@ function assertModelSelectionAdvertised(advertisedOptions, selection) {
|
|
|
7945
7945
|
continue;
|
|
7946
7946
|
const axis = advertisedOptions.find((option) => target.categories.includes(option.category));
|
|
7947
7947
|
if (!axis) {
|
|
7948
|
-
|
|
7949
|
-
label: target.label,
|
|
7950
|
-
value: target.value,
|
|
7951
|
-
reason: "axis-missing",
|
|
7952
|
-
guidance: `This harness does not advertise a selectable ${target.label} axis.`
|
|
7953
|
-
});
|
|
7948
|
+
continue;
|
|
7954
7949
|
}
|
|
7955
7950
|
assertModelConfigAxisAllowed(axis.id, advertisedOptions);
|
|
7956
7951
|
if (!axis.options.some((choice) => choice.id === target.value)) {
|
|
@@ -18943,9 +18938,9 @@ var GrantCommandRunner = class {
|
|
|
18943
18938
|
...Object.fromEntries(secrets)
|
|
18944
18939
|
};
|
|
18945
18940
|
const cap = this.options.outputCapBytes ?? GRANT_COMMAND_OUTPUT_CAP_BYTES;
|
|
18946
|
-
const
|
|
18941
|
+
const spawn11 = surfaceAllows(policy.surface, "run-host-command") ? { command: argv[0], args: argv.slice(1) } : roomSandboxCommand(policy, room.cwd, argv);
|
|
18947
18942
|
const outcome = await new Promise((resolveRun) => {
|
|
18948
|
-
const child = execFile3(
|
|
18943
|
+
const child = execFile3(spawn11.command, spawn11.args, {
|
|
18949
18944
|
cwd: room.cwd,
|
|
18950
18945
|
env,
|
|
18951
18946
|
timeout: this.options.timeoutMs ?? GRANT_COMMAND_TIMEOUT_MS,
|
|
@@ -25916,7 +25911,7 @@ async function runStartCommand(args, interactiveUi) {
|
|
|
25916
25911
|
}
|
|
25917
25912
|
|
|
25918
25913
|
// apps/body/dist/connect-command.js
|
|
25919
|
-
import { spawn as
|
|
25914
|
+
import { spawn as spawn8 } from "node:child_process";
|
|
25920
25915
|
import { createHash as createHash8, randomUUID as randomUUID5 } from "node:crypto";
|
|
25921
25916
|
import { chmod as chmod6, mkdir as mkdir16, readFile as readFile11, unlink as unlink2, writeFile as writeFile11 } from "node:fs/promises";
|
|
25922
25917
|
import { homedir as homedir10, hostname } from "node:os";
|
|
@@ -25944,6 +25939,50 @@ function unwrapPrompt(value, cancelMessage = "Cancelled.") {
|
|
|
25944
25939
|
return value;
|
|
25945
25940
|
}
|
|
25946
25941
|
|
|
25942
|
+
// apps/body/dist/cursor-models.js
|
|
25943
|
+
import { spawn as spawn5 } from "node:child_process";
|
|
25944
|
+
var CURSOR_MODELS_TIMEOUT_MS = 1e4;
|
|
25945
|
+
function parseCursorModelsOutput(output) {
|
|
25946
|
+
const options = [];
|
|
25947
|
+
for (const line of output.split(/\r?\n/)) {
|
|
25948
|
+
const match = /^\s*([A-Za-z0-9][A-Za-z0-9._-]*)\s+-\s+(\S.*?)\s*$/.exec(line);
|
|
25949
|
+
if (!match)
|
|
25950
|
+
continue;
|
|
25951
|
+
const id = match[1];
|
|
25952
|
+
const name = match[2].replace(/\s*\(current, default\)\s*$/i, "").trim();
|
|
25953
|
+
options.push({ id, ...name && name !== id ? { name } : {} });
|
|
25954
|
+
}
|
|
25955
|
+
if (!options.length)
|
|
25956
|
+
return void 0;
|
|
25957
|
+
return {
|
|
25958
|
+
currentValue: options.some((option) => option.id === "auto") ? "auto" : options[0].id,
|
|
25959
|
+
options
|
|
25960
|
+
};
|
|
25961
|
+
}
|
|
25962
|
+
async function enumerateCursorModels(env = process.env) {
|
|
25963
|
+
return new Promise((resolve31) => {
|
|
25964
|
+
const child = spawn5("cursor-agent", ["models"], {
|
|
25965
|
+
env,
|
|
25966
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
25967
|
+
});
|
|
25968
|
+
let output = "";
|
|
25969
|
+
const timer = setTimeout(() => {
|
|
25970
|
+
child.kill("SIGKILL");
|
|
25971
|
+
}, CURSOR_MODELS_TIMEOUT_MS);
|
|
25972
|
+
child.stdout?.on("data", (chunk) => {
|
|
25973
|
+
output += chunk.toString();
|
|
25974
|
+
});
|
|
25975
|
+
child.on("error", () => {
|
|
25976
|
+
clearTimeout(timer);
|
|
25977
|
+
resolve31(void 0);
|
|
25978
|
+
});
|
|
25979
|
+
child.on("close", (code) => {
|
|
25980
|
+
clearTimeout(timer);
|
|
25981
|
+
resolve31(code === 0 ? parseCursorModelsOutput(output) : void 0);
|
|
25982
|
+
});
|
|
25983
|
+
});
|
|
25984
|
+
}
|
|
25985
|
+
|
|
25947
25986
|
// apps/body/dist/provider-key-check.js
|
|
25948
25987
|
var PROVIDER_LABELS = {
|
|
25949
25988
|
openrouter: "OpenRouter",
|
|
@@ -26004,7 +26043,7 @@ async function verifyProviderKey(input) {
|
|
|
26004
26043
|
}
|
|
26005
26044
|
|
|
26006
26045
|
// apps/body/dist/pair-agent-selection.js
|
|
26007
|
-
import { spawn as
|
|
26046
|
+
import { spawn as spawn6 } from "node:child_process";
|
|
26008
26047
|
import { stdin as stdin2, stdout as stdout3 } from "node:process";
|
|
26009
26048
|
var NO_AGENT_MESSAGE = `No supported ACP-capable coding agent was detected.
|
|
26010
26049
|
Install one of these supported agents:
|
|
@@ -26033,7 +26072,7 @@ async function clackSelectAgent(candidates) {
|
|
|
26033
26072
|
}
|
|
26034
26073
|
async function installAdapter(install, opts) {
|
|
26035
26074
|
await new Promise((resolveInstall, rejectInstall) => {
|
|
26036
|
-
const child =
|
|
26075
|
+
const child = spawn6(install.command, install.args, {
|
|
26037
26076
|
cwd: opts.cwd,
|
|
26038
26077
|
env: opts.env ?? process.env,
|
|
26039
26078
|
stdio: "inherit"
|
|
@@ -26253,7 +26292,9 @@ var DEFAULT_MODELS = {
|
|
|
26253
26292
|
codex: "gpt-5.4",
|
|
26254
26293
|
claude: "claude-opus-4-1",
|
|
26255
26294
|
grok: "grok-4",
|
|
26256
|
-
cursor
|
|
26295
|
+
// cursor-agent's own default; always served, and the only model safe to
|
|
26296
|
+
// assume before `cursor-agent models` has been read.
|
|
26297
|
+
cursor: "auto"
|
|
26257
26298
|
};
|
|
26258
26299
|
function connectHarnessNeedsProvider(harness) {
|
|
26259
26300
|
return CONNECT_PROVIDER_HARNESSES.has(harness);
|
|
@@ -26351,8 +26392,14 @@ async function loadConnectModelCatalog(input) {
|
|
|
26351
26392
|
model
|
|
26352
26393
|
}), input.model ? { model: input.model } : void 0, input.timeoutMs === void 0 ? {} : { timeoutMs: input.timeoutMs });
|
|
26353
26394
|
const effort = connectEffortPickerFromAxes(catalog.catalog, catalog.raw);
|
|
26395
|
+
const picker = connectModelPickerFromAxes(catalog.catalog, defaultConnectModel(input.harness, input.provider), input.harness, catalog.raw);
|
|
26396
|
+
if (input.harness === "cursor" && !catalog.catalog.some((axis) => axis.category === "model" && axis.options.length) && !catalog.raw.some((axis) => axis.category === "model" && axis.options.length)) {
|
|
26397
|
+
const cliModels = await enumerateCursorModels();
|
|
26398
|
+
if (cliModels)
|
|
26399
|
+
return { ...cliModels, ...effort ? { effort } : {} };
|
|
26400
|
+
}
|
|
26354
26401
|
return {
|
|
26355
|
-
...
|
|
26402
|
+
...picker,
|
|
26356
26403
|
...effort ? { effort } : {}
|
|
26357
26404
|
};
|
|
26358
26405
|
}
|
|
@@ -26652,7 +26699,7 @@ async function writeProviderEnv(selection, agentPubkey) {
|
|
|
26652
26699
|
}
|
|
26653
26700
|
async function runInstalledFinish(binary, grantPath) {
|
|
26654
26701
|
await new Promise((resolveRun, rejectRun) => {
|
|
26655
|
-
const child =
|
|
26702
|
+
const child = spawn8(binary, ["connect-finish", grantPath], {
|
|
26656
26703
|
stdio: ["ignore", "pipe", "pipe"]
|
|
26657
26704
|
});
|
|
26658
26705
|
let diagnostic = "";
|
|
@@ -26826,7 +26873,7 @@ init_self_update_manifest();
|
|
|
26826
26873
|
|
|
26827
26874
|
// apps/body/dist/managed-update.js
|
|
26828
26875
|
init_self_update();
|
|
26829
|
-
import { spawn as
|
|
26876
|
+
import { spawn as spawn9 } from "node:child_process";
|
|
26830
26877
|
import { mkdir as mkdir18, rm as rm7, stat as stat3, writeFile as writeFile13 } from "node:fs/promises";
|
|
26831
26878
|
import { dirname as dirname14, resolve as resolve25 } from "node:path";
|
|
26832
26879
|
|
|
@@ -27240,7 +27287,7 @@ async function runManagedUpdateWorkerProcess() {
|
|
|
27240
27287
|
if (!entrypoint)
|
|
27241
27288
|
throw new Error("cannot resolve the current Beeline entrypoint");
|
|
27242
27289
|
await new Promise((resolveWorker, rejectWorker) => {
|
|
27243
|
-
const child =
|
|
27290
|
+
const child = spawn9(process.execPath, [entrypoint, "managed-update-worker"], {
|
|
27244
27291
|
detached: true,
|
|
27245
27292
|
env: { ...process.env, BEELINE_INTERNAL_UPDATE_WORKER: "1" },
|
|
27246
27293
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -27872,7 +27919,7 @@ async function runUpdateFunctionalProbe(input) {
|
|
|
27872
27919
|
}
|
|
27873
27920
|
|
|
27874
27921
|
// apps/body/dist/current-release-probe.js
|
|
27875
|
-
import { spawn as
|
|
27922
|
+
import { spawn as spawn10 } from "node:child_process";
|
|
27876
27923
|
import { dirname as dirname16, join as join11 } from "node:path";
|
|
27877
27924
|
init_self_update();
|
|
27878
27925
|
var CURRENT_RELEASE_PROBE_TIMEOUT_MS = 12e4;
|
|
@@ -27923,7 +27970,7 @@ async function probeReleaseInSubprocess(input) {
|
|
|
27923
27970
|
}
|
|
27924
27971
|
const timeoutMs = input.timeoutMs ?? CURRENT_RELEASE_PROBE_TIMEOUT_MS;
|
|
27925
27972
|
return new Promise((resolve31) => {
|
|
27926
|
-
const child =
|
|
27973
|
+
const child = spawn10(input.execPath ?? process.execPath, [entrypoint, UPDATE_PROBE_COMMAND, "--config", input.runtimeConfigPath], { env: input.env ?? process.env, stdio: ["ignore", "pipe", "pipe"] });
|
|
27927
27974
|
let stdout6 = "";
|
|
27928
27975
|
let stderr = "";
|
|
27929
27976
|
let settled = false;
|