@botiverse/raft-daemon 0.59.1 → 0.60.0-play.20260615055221
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.
|
@@ -1422,6 +1422,11 @@ function parseModeConfig(value) {
|
|
|
1422
1422
|
if (value.kind === "fast") return { kind: "fast" };
|
|
1423
1423
|
return { kind: "default" };
|
|
1424
1424
|
}
|
|
1425
|
+
function parseCommandConfig(runtime, value) {
|
|
1426
|
+
if (runtime !== "claude" || typeof value !== "string") return void 0;
|
|
1427
|
+
const command = value.trim();
|
|
1428
|
+
return command ? command : void 0;
|
|
1429
|
+
}
|
|
1425
1430
|
function hydrateRuntimeConfig(input) {
|
|
1426
1431
|
const stored = isPlainRecord(input.runtimeConfig) && input.runtimeConfig.version === RUNTIME_CONFIG_VERSION ? input.runtimeConfig : null;
|
|
1427
1432
|
const runtime = typeof stored?.runtime === "string" && stored.runtime.trim() || typeof input.runtime === "string" && input.runtime.trim() || "claude";
|
|
@@ -1432,6 +1437,7 @@ function hydrateRuntimeConfig(input) {
|
|
|
1432
1437
|
const legacyClaudeApiKey = runtime === "claude" ? legacyEnvVars?.ANTHROPIC_API_KEY : void 0;
|
|
1433
1438
|
const legacyClaudeCustomModel = runtime === "claude" ? legacyEnvVars?.ANTHROPIC_CUSTOM_MODEL_OPTION : void 0;
|
|
1434
1439
|
const provider = stored ? parseProviderConfig(runtime, stored.provider, legacyClaudeApiUrl, legacyClaudeApiKey) : runtime === "claude" && legacyClaudeApiUrl && legacyClaudeApiKey ? { kind: "custom", apiUrl: legacyClaudeApiUrl, apiKey: legacyClaudeApiKey } : runtime === "claude" ? { kind: "default" } : void 0;
|
|
1440
|
+
const command = stored ? parseCommandConfig(runtime, stored.command) : void 0;
|
|
1435
1441
|
return {
|
|
1436
1442
|
version: RUNTIME_CONFIG_VERSION,
|
|
1437
1443
|
runtime,
|
|
@@ -1439,7 +1445,8 @@ function hydrateRuntimeConfig(input) {
|
|
|
1439
1445
|
model: stored ? parseModelConfig(runtime, stored.model, fallbackModel, provider, legacyClaudeCustomModel) : modelConfigFromLegacy(runtime, fallbackModel),
|
|
1440
1446
|
mode: stored ? parseModeConfig(stored.mode) : { kind: "default" },
|
|
1441
1447
|
reasoningEffort: stored?.reasoningEffort ?? input.reasoningEffort ?? null,
|
|
1442
|
-
envVars: stripControlledRuntimeEnvVars(runtime, stored ? storedEnvVars : legacyEnvVars)
|
|
1448
|
+
envVars: stripControlledRuntimeEnvVars(runtime, stored ? storedEnvVars : legacyEnvVars),
|
|
1449
|
+
...command ? { command } : {}
|
|
1443
1450
|
};
|
|
1444
1451
|
}
|
|
1445
1452
|
function runtimeConfigModelValue(config) {
|
|
@@ -1466,7 +1473,8 @@ function runtimeConfigToLaunchFields(config) {
|
|
|
1466
1473
|
model: runtimeConfigModelValue(normalized),
|
|
1467
1474
|
mode: normalized.mode,
|
|
1468
1475
|
reasoningEffort: normalized.reasoningEffort ?? null,
|
|
1469
|
-
envVars: Object.keys(envVars).length > 0 ? envVars : null
|
|
1476
|
+
envVars: Object.keys(envVars).length > 0 ? envVars : null,
|
|
1477
|
+
...normalized.command ? { command: normalized.command } : {}
|
|
1470
1478
|
};
|
|
1471
1479
|
}
|
|
1472
1480
|
var PLAN_CONFIG = {
|
|
@@ -1477,8 +1485,11 @@ var PLAN_CONFIG = {
|
|
|
1477
1485
|
price: 0,
|
|
1478
1486
|
extraAgentPrice: 0,
|
|
1479
1487
|
displayFeatures: [
|
|
1480
|
-
"
|
|
1481
|
-
"
|
|
1488
|
+
"Channels",
|
|
1489
|
+
"Tasks",
|
|
1490
|
+
"Unlimited agents on your own computers",
|
|
1491
|
+
"Agent Reminders",
|
|
1492
|
+
"Basic observability",
|
|
1482
1493
|
"30 days of message history",
|
|
1483
1494
|
"100 MB file uploads/month"
|
|
1484
1495
|
]
|
|
@@ -2119,6 +2130,19 @@ function listLegacySlockStatePaths(slockHome = resolveSlockHome(), homeDir = os.
|
|
|
2119
2130
|
return candidates.filter((candidate) => existsSync(candidate.path));
|
|
2120
2131
|
}
|
|
2121
2132
|
|
|
2133
|
+
// src/authEnv.ts
|
|
2134
|
+
var DAEMON_API_KEY_ENV = "SLOCK_MACHINE_API_KEY";
|
|
2135
|
+
var SLOCK_AGENT_TOKEN_ENV = "SLOCK_AGENT_TOKEN";
|
|
2136
|
+
function scrubDaemonAuthEnv(env) {
|
|
2137
|
+
delete env[DAEMON_API_KEY_ENV];
|
|
2138
|
+
return env;
|
|
2139
|
+
}
|
|
2140
|
+
function scrubDaemonChildEnv(env) {
|
|
2141
|
+
delete env[DAEMON_API_KEY_ENV];
|
|
2142
|
+
delete env[SLOCK_AGENT_TOKEN_ENV];
|
|
2143
|
+
return env;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2122
2146
|
// src/agentCredentialProxy.ts
|
|
2123
2147
|
import { randomBytes } from "crypto";
|
|
2124
2148
|
import http from "http";
|
|
@@ -3606,7 +3630,9 @@ var LOOPBACK_NO_PROXY = "127.0.0.1,localhost";
|
|
|
3606
3630
|
var CLI_TRANSPORT_TRACE_DIR_ENV = "SLOCK_CLI_TRANSPORT_TRACE_DIR";
|
|
3607
3631
|
var safePathPart = (value) => value.replace(/[^a-zA-Z0-9_.-]/g, "_");
|
|
3608
3632
|
var RAW_CREDENTIAL_ENV_DENYLIST = [
|
|
3609
|
-
"
|
|
3633
|
+
"SLOCK_AGENT_TOKEN",
|
|
3634
|
+
"SLOCK_AGENT_CREDENTIAL_KEY",
|
|
3635
|
+
"SLOCK_AGENT_CREDENTIAL_KEY_FILE"
|
|
3610
3636
|
];
|
|
3611
3637
|
function deriveCliFallbackCandidates(cliPath) {
|
|
3612
3638
|
if (!cliPath || cliPath === "__cli") return [];
|
|
@@ -3921,7 +3947,7 @@ set "SLOCK_AGENT_ACTIVE_CAPABILITIES=${DEFAULT_ACTIVE_CAPABILITIES}"\r
|
|
|
3921
3947
|
...agentCredentialProxy ? {} : { SLOCK_AGENT_TOKEN_FILE: tokenFile },
|
|
3922
3948
|
PATH: `${slockDir}${path2.delimiter}${process.env.PATH ?? ""}`
|
|
3923
3949
|
};
|
|
3924
|
-
|
|
3950
|
+
scrubDaemonChildEnv(spawnEnv);
|
|
3925
3951
|
for (const key of RAW_CREDENTIAL_ENV_DENYLIST) {
|
|
3926
3952
|
delete spawnEnv[key];
|
|
3927
3953
|
}
|
|
@@ -4356,7 +4382,7 @@ function requiresWindowsShell(command, platform = process.platform) {
|
|
|
4356
4382
|
}
|
|
4357
4383
|
function resolveCommandOnPath(command, deps = {}) {
|
|
4358
4384
|
const platform = deps.platform ?? process.platform;
|
|
4359
|
-
const env = withWindowsUserEnvironment(deps.env ?? process.env, deps);
|
|
4385
|
+
const env = scrubDaemonChildEnv({ ...withWindowsUserEnvironment(deps.env ?? process.env, deps) });
|
|
4360
4386
|
const execFileSyncFn = deps.execFileSyncFn ?? execFileSync;
|
|
4361
4387
|
const existsSyncFn = deps.existsSyncFn ?? existsSync3;
|
|
4362
4388
|
if (platform === "win32") {
|
|
@@ -4382,7 +4408,7 @@ function firstExistingPath(candidates, deps = {}) {
|
|
|
4382
4408
|
return null;
|
|
4383
4409
|
}
|
|
4384
4410
|
function readCommandVersion(command, args = [], deps = {}) {
|
|
4385
|
-
const env = withWindowsUserEnvironment(deps.env ?? process.env, deps);
|
|
4411
|
+
const env = scrubDaemonChildEnv({ ...withWindowsUserEnvironment(deps.env ?? process.env, deps) });
|
|
4386
4412
|
const execFileSyncFn = deps.execFileSyncFn ?? execFileSync;
|
|
4387
4413
|
try {
|
|
4388
4414
|
const output = normalizeExecOutput(execFileSyncFn(command, [...args, "--version"], {
|
|
@@ -4421,6 +4447,10 @@ function resolveClaudeCommand(deps = {}) {
|
|
|
4421
4447
|
CLAUDE_DESKTOP_CLI_SYSTEM_PATH
|
|
4422
4448
|
], deps);
|
|
4423
4449
|
}
|
|
4450
|
+
function resolveClaudeLaunchCommand(config, deps = {}) {
|
|
4451
|
+
const launchRuntimeFields = runtimeConfigToLaunchFields(config);
|
|
4452
|
+
return launchRuntimeFields.command?.trim() || resolveClaudeCommand(deps);
|
|
4453
|
+
}
|
|
4424
4454
|
function probeClaude(deps = {}) {
|
|
4425
4455
|
const command = resolveClaudeCommand(deps);
|
|
4426
4456
|
if (!command) return { available: false };
|
|
@@ -4567,7 +4597,7 @@ var ClaudeDriver = class {
|
|
|
4567
4597
|
logger.info(
|
|
4568
4598
|
`[Agent ${ctx.agentId}] transport=cli cli=${ctx.slockCliPath} token_file=${tokenFile}`
|
|
4569
4599
|
);
|
|
4570
|
-
const claudeCommand =
|
|
4600
|
+
const claudeCommand = resolveClaudeLaunchCommand(ctx.config);
|
|
4571
4601
|
const spawnSpec = buildClaudeSpawnSpec(claudeCommand);
|
|
4572
4602
|
const proc = spawn(spawnSpec.command, args, {
|
|
4573
4603
|
cwd: ctx.workingDirectory,
|
|
@@ -5772,11 +5802,11 @@ function detectCursorModels(runCommand = runCursorModelsCommand) {
|
|
|
5772
5802
|
return parseCursorModelsOutput(String(result.stdout || ""));
|
|
5773
5803
|
}
|
|
5774
5804
|
function buildCursorModelProbeEnv(deps = {}) {
|
|
5775
|
-
return withWindowsUserEnvironment({
|
|
5805
|
+
return scrubDaemonChildEnv(withWindowsUserEnvironment({
|
|
5776
5806
|
...deps.env ?? process.env,
|
|
5777
5807
|
FORCE_COLOR: "0",
|
|
5778
5808
|
NO_COLOR: "1"
|
|
5779
|
-
}, deps);
|
|
5809
|
+
}, deps));
|
|
5780
5810
|
}
|
|
5781
5811
|
function runCursorModelsCommand() {
|
|
5782
5812
|
return spawnSync("cursor-agent", ["models"], {
|
|
@@ -5832,7 +5862,7 @@ function resolveGeminiSpawn(commandArgs, deps = {}) {
|
|
|
5832
5862
|
}
|
|
5833
5863
|
const execFileSyncFn = deps.execFileSyncFn ?? execFileSync3;
|
|
5834
5864
|
const existsSyncFn = deps.existsSyncFn ?? existsSync6;
|
|
5835
|
-
const env = deps.env ?? process.env;
|
|
5865
|
+
const env = scrubDaemonChildEnv({ ...deps.env ?? process.env });
|
|
5836
5866
|
const winPath = path7.win32;
|
|
5837
5867
|
let geminiEntry = null;
|
|
5838
5868
|
try {
|
|
@@ -5969,12 +5999,15 @@ var GeminiDriver = class {
|
|
|
5969
5999
|
// src/drivers/kimi.ts
|
|
5970
6000
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
5971
6001
|
import { spawn as spawn7 } from "child_process";
|
|
5972
|
-
import { existsSync as existsSync7, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
6002
|
+
import { chmodSync, existsSync as existsSync7, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
5973
6003
|
import os4 from "os";
|
|
5974
6004
|
import path8 from "path";
|
|
5975
6005
|
var KIMI_WIRE_PROTOCOL_VERSION = "1.3";
|
|
5976
6006
|
var KIMI_SYSTEM_PROMPT_FILE = ".slock-kimi-system.md";
|
|
5977
6007
|
var KIMI_AGENT_FILE = ".slock-kimi-agent.yaml";
|
|
6008
|
+
var KIMI_GENERATED_CONFIG_FILE = ".slock-kimi-config.toml";
|
|
6009
|
+
var SLOCK_KIMI_CONFIG_CONTENT_ENV = "SLOCK_KIMI_CONFIG_CONTENT";
|
|
6010
|
+
var SLOCK_KIMI_CONFIG_FILE_ENV = "SLOCK_KIMI_CONFIG_FILE";
|
|
5978
6011
|
function parseToolArguments(raw) {
|
|
5979
6012
|
if (typeof raw !== "string") return raw;
|
|
5980
6013
|
try {
|
|
@@ -5983,6 +6016,73 @@ function parseToolArguments(raw) {
|
|
|
5983
6016
|
return raw;
|
|
5984
6017
|
}
|
|
5985
6018
|
}
|
|
6019
|
+
function readKimiConfigSource(home = os4.homedir(), env = process.env) {
|
|
6020
|
+
const inlineConfig = env[SLOCK_KIMI_CONFIG_CONTENT_ENV];
|
|
6021
|
+
if (inlineConfig && inlineConfig.trim()) {
|
|
6022
|
+
return {
|
|
6023
|
+
raw: inlineConfig,
|
|
6024
|
+
explicitPath: null,
|
|
6025
|
+
sourcePath: SLOCK_KIMI_CONFIG_CONTENT_ENV
|
|
6026
|
+
};
|
|
6027
|
+
}
|
|
6028
|
+
const explicitPath = env[SLOCK_KIMI_CONFIG_FILE_ENV];
|
|
6029
|
+
const configPath = explicitPath && explicitPath.trim() ? explicitPath : path8.join(home, ".kimi", "config.toml");
|
|
6030
|
+
try {
|
|
6031
|
+
return {
|
|
6032
|
+
raw: readFileSync3(configPath, "utf8"),
|
|
6033
|
+
explicitPath: explicitPath && explicitPath.trim() ? explicitPath : null,
|
|
6034
|
+
sourcePath: configPath
|
|
6035
|
+
};
|
|
6036
|
+
} catch {
|
|
6037
|
+
return {
|
|
6038
|
+
raw: null,
|
|
6039
|
+
explicitPath: explicitPath && explicitPath.trim() ? explicitPath : null,
|
|
6040
|
+
sourcePath: configPath
|
|
6041
|
+
};
|
|
6042
|
+
}
|
|
6043
|
+
}
|
|
6044
|
+
function buildKimiSpawnEnv(env = process.env) {
|
|
6045
|
+
const spawnEnv = { ...env, FORCE_COLOR: "0", NO_COLOR: "1" };
|
|
6046
|
+
delete spawnEnv[SLOCK_KIMI_CONFIG_CONTENT_ENV];
|
|
6047
|
+
delete spawnEnv[SLOCK_KIMI_CONFIG_FILE_ENV];
|
|
6048
|
+
return scrubDaemonChildEnv(spawnEnv);
|
|
6049
|
+
}
|
|
6050
|
+
function buildKimiEffectiveEnv(ctx, overrideEnv) {
|
|
6051
|
+
return {
|
|
6052
|
+
...process.env,
|
|
6053
|
+
...ctx.config.envVars || {},
|
|
6054
|
+
...overrideEnv || {}
|
|
6055
|
+
};
|
|
6056
|
+
}
|
|
6057
|
+
function buildKimiLaunchOptions(ctx, opts = {}) {
|
|
6058
|
+
const env = buildKimiEffectiveEnv(ctx, opts.env);
|
|
6059
|
+
const source = readKimiConfigSource(opts.home ?? os4.homedir(), env);
|
|
6060
|
+
const args = [];
|
|
6061
|
+
let configFilePath = null;
|
|
6062
|
+
let configContent = null;
|
|
6063
|
+
if (source.explicitPath) {
|
|
6064
|
+
configFilePath = source.explicitPath;
|
|
6065
|
+
} else if (source.raw !== null && source.sourcePath === SLOCK_KIMI_CONFIG_CONTENT_ENV) {
|
|
6066
|
+
configFilePath = path8.join(ctx.workingDirectory, KIMI_GENERATED_CONFIG_FILE);
|
|
6067
|
+
configContent = source.raw;
|
|
6068
|
+
if (opts.writeGeneratedConfig !== false) {
|
|
6069
|
+
writeFileSync3(configFilePath, source.raw, { encoding: "utf8", mode: 384 });
|
|
6070
|
+
chmodSync(configFilePath, 384);
|
|
6071
|
+
}
|
|
6072
|
+
}
|
|
6073
|
+
if (configFilePath) {
|
|
6074
|
+
args.push("--config-file", configFilePath);
|
|
6075
|
+
}
|
|
6076
|
+
if (ctx.config.model && ctx.config.model !== "default") {
|
|
6077
|
+
args.push("--model", ctx.config.model);
|
|
6078
|
+
}
|
|
6079
|
+
return {
|
|
6080
|
+
args,
|
|
6081
|
+
env: buildKimiSpawnEnv(env),
|
|
6082
|
+
configFilePath,
|
|
6083
|
+
configContent
|
|
6084
|
+
};
|
|
6085
|
+
}
|
|
5986
6086
|
function resolveKimiSpawn(commandArgs, deps = {}) {
|
|
5987
6087
|
return {
|
|
5988
6088
|
command: resolveCommandOnPath("kimi", deps) ?? "kimi",
|
|
@@ -6006,7 +6106,25 @@ var KimiDriver = class {
|
|
|
6006
6106
|
};
|
|
6007
6107
|
model = {
|
|
6008
6108
|
detectedModelsVerifiedAs: "launchable",
|
|
6009
|
-
toLaunchSpec: (modelId) =>
|
|
6109
|
+
toLaunchSpec: (modelId, ctx, opts) => {
|
|
6110
|
+
if (!ctx) return { args: ["--model", modelId] };
|
|
6111
|
+
const launchCtx = {
|
|
6112
|
+
...ctx,
|
|
6113
|
+
config: {
|
|
6114
|
+
...ctx.config,
|
|
6115
|
+
model: modelId
|
|
6116
|
+
}
|
|
6117
|
+
};
|
|
6118
|
+
const launch = buildKimiLaunchOptions(launchCtx, {
|
|
6119
|
+
home: opts?.home,
|
|
6120
|
+
writeGeneratedConfig: false
|
|
6121
|
+
});
|
|
6122
|
+
return {
|
|
6123
|
+
args: launch.args,
|
|
6124
|
+
env: launch.env,
|
|
6125
|
+
configFiles: launch.configFilePath ? [launch.configFilePath] : void 0
|
|
6126
|
+
};
|
|
6127
|
+
}
|
|
6010
6128
|
};
|
|
6011
6129
|
supportsStdinNotification = true;
|
|
6012
6130
|
busyDeliveryMode = "direct";
|
|
@@ -6030,21 +6148,23 @@ var KimiDriver = class {
|
|
|
6030
6148
|
` system_prompt_path: ./${KIMI_SYSTEM_PROMPT_FILE}`,
|
|
6031
6149
|
""
|
|
6032
6150
|
].join("\n"), "utf8");
|
|
6151
|
+
const launch = buildKimiLaunchOptions(ctx);
|
|
6033
6152
|
const args = [
|
|
6034
6153
|
"--wire",
|
|
6035
6154
|
"--yolo",
|
|
6036
6155
|
"--agent-file",
|
|
6037
6156
|
agentFilePath,
|
|
6038
6157
|
"--session",
|
|
6039
|
-
this.sessionId
|
|
6158
|
+
this.sessionId,
|
|
6159
|
+
...launch.args
|
|
6040
6160
|
];
|
|
6041
6161
|
const launchRuntimeFields = runtimeConfigToLaunchFields(ctx.config);
|
|
6042
6162
|
if (launchRuntimeFields.model && launchRuntimeFields.model !== "default") {
|
|
6043
6163
|
args.push("--model", launchRuntimeFields.model);
|
|
6044
6164
|
}
|
|
6045
6165
|
const spawnEnv = (await prepareCliTransport(ctx, { NO_COLOR: "1" })).spawnEnv;
|
|
6046
|
-
const
|
|
6047
|
-
const proc = spawn7(
|
|
6166
|
+
const spawnTarget = resolveKimiSpawn(args);
|
|
6167
|
+
const proc = spawn7(spawnTarget.command, spawnTarget.args, {
|
|
6048
6168
|
cwd: ctx.workingDirectory,
|
|
6049
6169
|
stdio: ["pipe", "pipe", "pipe"],
|
|
6050
6170
|
env: spawnEnv,
|
|
@@ -6052,7 +6172,7 @@ var KimiDriver = class {
|
|
|
6052
6172
|
// and has an 8191-character command-line limit. Kimi's official
|
|
6053
6173
|
// installer/uv entrypoint is an executable, so launch it directly and
|
|
6054
6174
|
// keep prompts on stdin / files instead of routing through cmd.exe.
|
|
6055
|
-
shell:
|
|
6175
|
+
shell: spawnTarget.shell
|
|
6056
6176
|
});
|
|
6057
6177
|
proc.stdin?.write(JSON.stringify({
|
|
6058
6178
|
jsonrpc: "2.0",
|
|
@@ -6165,14 +6285,9 @@ var KimiDriver = class {
|
|
|
6165
6285
|
return detectKimiModels();
|
|
6166
6286
|
}
|
|
6167
6287
|
};
|
|
6168
|
-
function detectKimiModels(home = os4.homedir()) {
|
|
6169
|
-
const
|
|
6170
|
-
|
|
6171
|
-
try {
|
|
6172
|
-
raw = readFileSync3(configPath, "utf8");
|
|
6173
|
-
} catch {
|
|
6174
|
-
return null;
|
|
6175
|
-
}
|
|
6288
|
+
function detectKimiModels(home = os4.homedir(), opts = {}) {
|
|
6289
|
+
const raw = readKimiConfigSource(home, opts.env).raw;
|
|
6290
|
+
if (raw === null) return null;
|
|
6176
6291
|
const models = [];
|
|
6177
6292
|
const sectionRe = /^\s*\[models(?:\.([^\]]+)|"\.[^"]+"|\."[^"]+")\s*\]\s*$/gm;
|
|
6178
6293
|
const lineRe = /^\s*\[models\.(.+?)\s*\]\s*$/gm;
|
|
@@ -6410,7 +6525,7 @@ function runOpenCodeModelsCommand(home, deps = {}) {
|
|
|
6410
6525
|
const platform = deps.platform ?? process.platform;
|
|
6411
6526
|
const spawnSyncFn = deps.spawnSyncFn ?? spawnSync2;
|
|
6412
6527
|
const result = spawnSyncFn("opencode", ["models"], {
|
|
6413
|
-
env: { ...process.env, HOME: home, FORCE_COLOR: "0", NO_COLOR: "1" },
|
|
6528
|
+
env: scrubDaemonChildEnv({ ...process.env, HOME: home, FORCE_COLOR: "0", NO_COLOR: "1" }),
|
|
6414
6529
|
encoding: "utf8",
|
|
6415
6530
|
timeout: 5e3,
|
|
6416
6531
|
shell: platform === "win32"
|
|
@@ -14215,7 +14330,7 @@ var DAEMON_CORE_TRACE_ATTR_CONTRACTS = {
|
|
|
14215
14330
|
spanAttrs: ["running_agents_count", "idle_agents_count"]
|
|
14216
14331
|
}
|
|
14217
14332
|
};
|
|
14218
|
-
var DAEMON_CLI_USAGE =
|
|
14333
|
+
var DAEMON_CLI_USAGE = `Usage: slock-daemon --server-url <url> (--api-key <key> or ${DAEMON_API_KEY_ENV}=<key>)`;
|
|
14219
14334
|
var RunnerCredentialMintError2 = class extends Error {
|
|
14220
14335
|
code;
|
|
14221
14336
|
retryable;
|
|
@@ -14251,9 +14366,9 @@ function runnerCredentialErrorDetail2(error) {
|
|
|
14251
14366
|
async function waitForRunnerCredentialRetry2() {
|
|
14252
14367
|
await new Promise((resolve) => setTimeout(resolve, RUNNER_CREDENTIAL_MINT_RETRY_DELAY_MS2));
|
|
14253
14368
|
}
|
|
14254
|
-
function parseDaemonCliArgs(args) {
|
|
14369
|
+
function parseDaemonCliArgs(args, env = {}) {
|
|
14255
14370
|
let serverUrl = "";
|
|
14256
|
-
let apiKey = "";
|
|
14371
|
+
let apiKey = env[DAEMON_API_KEY_ENV] ?? "";
|
|
14257
14372
|
for (let i = 0; i < args.length; i++) {
|
|
14258
14373
|
if (args[i] === "--server-url" && args[i + 1]) serverUrl = args[++i];
|
|
14259
14374
|
if (args[i] === "--api-key" && args[i + 1]) apiKey = args[++i];
|
|
@@ -14290,7 +14405,7 @@ function resolveSlockCliPathOrEmpty(moduleUrl = import.meta.url) {
|
|
|
14290
14405
|
}
|
|
14291
14406
|
async function runBundledSlockCli(argv) {
|
|
14292
14407
|
process.argv = [process.execPath, "slock", ...argv];
|
|
14293
|
-
await import("./dist-
|
|
14408
|
+
await import("./dist-JVLCJ2QO.js");
|
|
14294
14409
|
}
|
|
14295
14410
|
function detectRuntimes(tracer = noopTracer) {
|
|
14296
14411
|
const ids = [];
|
|
@@ -15089,6 +15204,8 @@ var DaemonCore = class {
|
|
|
15089
15204
|
};
|
|
15090
15205
|
|
|
15091
15206
|
export {
|
|
15207
|
+
DAEMON_API_KEY_ENV,
|
|
15208
|
+
scrubDaemonAuthEnv,
|
|
15092
15209
|
subscribeDaemonLogs,
|
|
15093
15210
|
resolveWorkspaceDirectoryPath,
|
|
15094
15211
|
scanWorkspaceDirectories,
|
package/dist/cli/index.js
CHANGED
|
@@ -15818,8 +15818,11 @@ var PLAN_CONFIG = {
|
|
|
15818
15818
|
price: 0,
|
|
15819
15819
|
extraAgentPrice: 0,
|
|
15820
15820
|
displayFeatures: [
|
|
15821
|
-
"
|
|
15822
|
-
"
|
|
15821
|
+
"Channels",
|
|
15822
|
+
"Tasks",
|
|
15823
|
+
"Unlimited agents on your own computers",
|
|
15824
|
+
"Agent Reminders",
|
|
15825
|
+
"Basic observability",
|
|
15823
15826
|
"30 days of message history",
|
|
15824
15827
|
"100 MB file uploads/month"
|
|
15825
15828
|
]
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DAEMON_API_KEY_ENV,
|
|
2
3
|
DAEMON_CLI_USAGE,
|
|
3
4
|
DaemonCore,
|
|
4
5
|
deleteWorkspaceDirectory,
|
|
@@ -10,9 +11,11 @@ import {
|
|
|
10
11
|
resolveWorkspaceDirectoryPath,
|
|
11
12
|
runBundledSlockCli,
|
|
12
13
|
scanWorkspaceDirectories,
|
|
14
|
+
scrubDaemonAuthEnv,
|
|
13
15
|
subscribeDaemonLogs
|
|
14
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-62SH5AE4.js";
|
|
15
17
|
export {
|
|
18
|
+
DAEMON_API_KEY_ENV,
|
|
16
19
|
DAEMON_CLI_USAGE,
|
|
17
20
|
DaemonCore,
|
|
18
21
|
deleteWorkspaceDirectory,
|
|
@@ -24,5 +27,6 @@ export {
|
|
|
24
27
|
resolveWorkspaceDirectoryPath,
|
|
25
28
|
runBundledSlockCli,
|
|
26
29
|
scanWorkspaceDirectories,
|
|
30
|
+
scrubDaemonAuthEnv,
|
|
27
31
|
subscribeDaemonLogs
|
|
28
32
|
};
|
|
@@ -15624,8 +15624,11 @@ var PLAN_CONFIG = {
|
|
|
15624
15624
|
price: 0,
|
|
15625
15625
|
extraAgentPrice: 0,
|
|
15626
15626
|
displayFeatures: [
|
|
15627
|
-
"
|
|
15628
|
-
"
|
|
15627
|
+
"Channels",
|
|
15628
|
+
"Tasks",
|
|
15629
|
+
"Unlimited agents on your own computers",
|
|
15630
|
+
"Agent Reminders",
|
|
15631
|
+
"Basic observability",
|
|
15629
15632
|
"30 days of message history",
|
|
15630
15633
|
"100 MB file uploads/month"
|
|
15631
15634
|
]
|
package/dist/index.js
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
DAEMON_CLI_USAGE,
|
|
4
4
|
DaemonCore,
|
|
5
|
-
parseDaemonCliArgs
|
|
6
|
-
|
|
5
|
+
parseDaemonCliArgs,
|
|
6
|
+
scrubDaemonAuthEnv
|
|
7
|
+
} from "./chunk-62SH5AE4.js";
|
|
7
8
|
|
|
8
9
|
// src/index.ts
|
|
9
|
-
var parsedArgs = parseDaemonCliArgs(process.argv.slice(2));
|
|
10
|
+
var parsedArgs = parseDaemonCliArgs(process.argv.slice(2), process.env);
|
|
11
|
+
scrubDaemonAuthEnv(process.env);
|
|
10
12
|
if (!parsedArgs) {
|
|
11
13
|
console.error(DAEMON_CLI_USAGE);
|
|
12
14
|
process.exit(1);
|