@kitman-sh/cli 0.13.19 → 0.14.1
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/{chunk-d917m1ak.js → chunk-0axm9scx.js} +99 -23
- package/dist/{chunk-40ee20qs.js → chunk-27k0egfz.js} +20 -7
- package/dist/{chunk-82w8rmkc.js → chunk-4qpmjrd2.js} +2 -2
- package/dist/{chunk-yh7twvn9.js → chunk-5jqqhvv2.js} +4 -4
- package/dist/{chunk-s4pejxc8.js → chunk-5x44qb6d.js} +6 -6
- package/dist/{chunk-590h6emd.js → chunk-77jk3v8v.js} +3 -3
- package/dist/{chunk-gy9rf14f.js → chunk-93xj74qp.js} +3 -3
- package/dist/{chunk-9964wmp9.js → chunk-a9srrnsk.js} +15 -15
- package/dist/{chunk-q5w3v4k1.js → chunk-c80dvhxf.js} +1 -1
- package/dist/{chunk-y1krmnbv.js → chunk-cwdrhsvk.js} +2 -2
- package/dist/{chunk-xt6db7sf.js → chunk-enabwyrn.js} +7 -7
- package/dist/{chunk-0n46rkk9.js → chunk-f1y7ysjg.js} +24 -4
- package/dist/{chunk-fc2bhh5v.js → chunk-fch7pjzh.js} +2 -2
- package/dist/{chunk-2bds7yc8.js → chunk-gvs5fcvy.js} +2 -2
- package/dist/{chunk-ysz1v2cq.js → chunk-jnpv483d.js} +4 -4
- package/dist/{chunk-zfqn6dc1.js → chunk-jp7cjnng.js} +4 -4
- package/dist/{chunk-4yg6da62.js → chunk-kwkh8hxt.js} +1 -1
- package/dist/{chunk-5f80t96q.js → chunk-nvncrs4n.js} +4 -4
- package/dist/{chunk-9krvh1na.js → chunk-pyss20q2.js} +3 -3
- package/dist/{chunk-nf9gdnsf.js → chunk-rbbh4f56.js} +1 -1
- package/dist/{chunk-gq7y5v3e.js → chunk-vt8aqeby.js} +1 -1
- package/dist/{chunk-xjmfnqh9.js → chunk-vx4qe0fe.js} +4 -4
- package/dist/{chunk-zw3gf6r5.js → chunk-wttgq85b.js} +59 -1
- package/dist/{chunk-f86q3a6s.js → chunk-zr59g5bk.js} +3 -3
- package/dist/{chunk-12afnp8q.js → chunk-zw2mzy00.js} +9 -9
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -168,12 +168,12 @@ import {
|
|
|
168
168
|
decodeJsonStringSync,
|
|
169
169
|
encodeUnknownJsonStringSync,
|
|
170
170
|
storable
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-wttgq85b.js";
|
|
172
172
|
import {
|
|
173
173
|
Id,
|
|
174
174
|
secretReference,
|
|
175
175
|
secretPlaceholder
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-c80dvhxf.js";
|
|
177
177
|
import {
|
|
178
178
|
currentTimeMillis,
|
|
179
179
|
SecureRandom,
|
|
@@ -254,7 +254,7 @@ import {
|
|
|
254
254
|
checkServicesFile,
|
|
255
255
|
checkServices,
|
|
256
256
|
serviceChecks
|
|
257
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-f1y7ysjg.js";
|
|
258
258
|
import {
|
|
259
259
|
join,
|
|
260
260
|
interrupt,
|
|
@@ -274,6 +274,7 @@ import {
|
|
|
274
274
|
splitLines,
|
|
275
275
|
run,
|
|
276
276
|
runCollect,
|
|
277
|
+
runFold,
|
|
277
278
|
runHead,
|
|
278
279
|
runForEach,
|
|
279
280
|
FileSystem,
|
|
@@ -297,7 +298,7 @@ import {
|
|
|
297
298
|
writeSrtSettings2,
|
|
298
299
|
srtStepArgv2,
|
|
299
300
|
srtArgv2
|
|
300
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-rbbh4f56.js";
|
|
301
302
|
import {
|
|
302
303
|
writeAgentEnvironmentConfigFile2,
|
|
303
304
|
readManifestSkillPaths2,
|
|
@@ -313,8 +314,8 @@ import {
|
|
|
313
314
|
applyAgentEnvironmentMaterialization2,
|
|
314
315
|
isPathWithin2,
|
|
315
316
|
skillIdentity2
|
|
316
|
-
} from "./chunk-
|
|
317
|
-
import"./chunk-
|
|
317
|
+
} from "./chunk-5jqqhvv2.js";
|
|
318
|
+
import"./chunk-pyss20q2.js";
|
|
318
319
|
import {
|
|
319
320
|
egressAllowed,
|
|
320
321
|
writeSecretRegistry,
|
|
@@ -324,7 +325,7 @@ import {
|
|
|
324
325
|
secretFilter2,
|
|
325
326
|
opaqueTunnelRefusal2,
|
|
326
327
|
isOpaqueConnectReason2
|
|
327
|
-
} from "./chunk-
|
|
328
|
+
} from "./chunk-cwdrhsvk.js";
|
|
328
329
|
import {
|
|
329
330
|
sliceBytes2,
|
|
330
331
|
maxLineBytes2,
|
|
@@ -332,23 +333,23 @@ import {
|
|
|
332
333
|
decodedOption2,
|
|
333
334
|
decoded2,
|
|
334
335
|
readOpencode2
|
|
335
|
-
} from "./chunk-
|
|
336
|
+
} from "./chunk-77jk3v8v.js";
|
|
336
337
|
import {
|
|
337
338
|
uploadRunFile,
|
|
338
339
|
programLease,
|
|
339
340
|
rpcRunFiles,
|
|
340
341
|
programHostsEnv,
|
|
341
342
|
undeclaredHostsEnv
|
|
342
|
-
} from "./chunk-
|
|
343
|
-
import"./chunk-
|
|
343
|
+
} from "./chunk-nvncrs4n.js";
|
|
344
|
+
import"./chunk-vx4qe0fe.js";
|
|
344
345
|
import {
|
|
345
346
|
nextInt
|
|
346
|
-
} from "./chunk-
|
|
347
|
+
} from "./chunk-vt8aqeby.js";
|
|
347
348
|
import {
|
|
348
349
|
ChildProcessSpawner,
|
|
349
350
|
make3
|
|
350
|
-
} from "./chunk-
|
|
351
|
-
import"./chunk-
|
|
351
|
+
} from "./chunk-4qpmjrd2.js";
|
|
352
|
+
import"./chunk-zr59g5bk.js";
|
|
352
353
|
|
|
353
354
|
// packages/core/src/sync-kit.ts
|
|
354
355
|
import { createHash } from "crypto";
|
|
@@ -565,6 +566,61 @@ function sortValue(value) {
|
|
|
565
566
|
return result;
|
|
566
567
|
}
|
|
567
568
|
|
|
569
|
+
// packages/core/src/parallel-output.ts
|
|
570
|
+
var maxLineLength = 1000;
|
|
571
|
+
var ansiColours = /\u001B\[[\d;]*m/gu;
|
|
572
|
+
var failedEnding = /^(\S(?:(?! +\| ).)*) +\| (?:Exited with code (\d+)|Signaled: (SIG[A-Z\d]+))$/u;
|
|
573
|
+
var printed = (line) => line.slice(0, maxLineLength).replaceAll(ansiColours, "").trimEnd();
|
|
574
|
+
var parallelFailureOfLine = (line) => {
|
|
575
|
+
const found = failedEnding.exec(printed(line));
|
|
576
|
+
if (found === null || found[2] === "0")
|
|
577
|
+
return;
|
|
578
|
+
return {
|
|
579
|
+
command: found[1] ?? "",
|
|
580
|
+
ending: found[2] === undefined ? `was signaled ${found[3]}` : `exited with code ${found[2]}`
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
var parallelCommandOutput = (line, command) => {
|
|
584
|
+
const text = printed(line);
|
|
585
|
+
if (!text.startsWith(command))
|
|
586
|
+
return;
|
|
587
|
+
return /^ +\| ?(.*)$/su.exec(text.slice(command.length))?.[1];
|
|
588
|
+
};
|
|
589
|
+
var failuresBudget = 3300;
|
|
590
|
+
var headerLimit = 600;
|
|
591
|
+
var headerStart = "Failed in parallel: ";
|
|
592
|
+
var lastLinesWithin = (lines, budget) => {
|
|
593
|
+
const kept = [];
|
|
594
|
+
let left = budget;
|
|
595
|
+
for (const line of [...lines].reverse()) {
|
|
596
|
+
if (line.length + 1 > left) {
|
|
597
|
+
if (left > 1)
|
|
598
|
+
kept.unshift(line.slice(-(left - 1)));
|
|
599
|
+
break;
|
|
600
|
+
}
|
|
601
|
+
kept.unshift(line);
|
|
602
|
+
left -= line.length + 1;
|
|
603
|
+
}
|
|
604
|
+
return kept;
|
|
605
|
+
};
|
|
606
|
+
var outputTailWithParallelFailures = (failures, output) => {
|
|
607
|
+
if (failures.length === 0)
|
|
608
|
+
return redactedOutputTail(output);
|
|
609
|
+
const named = failures.map((failure) => `\`${failure.command}\` ${failure.ending}`).join("; ");
|
|
610
|
+
const header = redactCredentials(`${headerStart}${named}.`).slice(0, headerLimit);
|
|
611
|
+
const each = Math.floor(failuresBudget / failures.length);
|
|
612
|
+
const sections = failures.map((failure) => {
|
|
613
|
+
const title = redactCredentials(`--- ${failure.command} ---`).slice(0, each);
|
|
614
|
+
const lines = lastLinesWithin(redactCredentials(failure.lines.join(`
|
|
615
|
+
`)).split(`
|
|
616
|
+
`), each - title.length - 1);
|
|
617
|
+
return [title, ...lines].join(`
|
|
618
|
+
`);
|
|
619
|
+
});
|
|
620
|
+
return [header, ...sections, "--- end of output ---", redactedOutputTail(output)].join(`
|
|
621
|
+
`);
|
|
622
|
+
};
|
|
623
|
+
|
|
568
624
|
// packages/agent-runtime/src/agent-environment.ts
|
|
569
625
|
class AgentEnvironmentResolutionError extends TaggedError("AgentEnvironmentResolutionError") {
|
|
570
626
|
get message() {
|
|
@@ -1688,7 +1744,7 @@ var HarnessAdapters = [
|
|
|
1688
1744
|
],
|
|
1689
1745
|
tools: {
|
|
1690
1746
|
flag: "--tools",
|
|
1691
|
-
base: ["Bash", "Read", "Edit", "Write", "Grep", "Glob", "Monitor", "TaskStop"],
|
|
1747
|
+
base: ["Bash", "Read", "Edit", "Write", "Grep", "Glob", "Monitor", "TaskStop", "REPL"],
|
|
1692
1748
|
skill: "Skill",
|
|
1693
1749
|
capabilities: {
|
|
1694
1750
|
web: ["WebFetch", "WebSearch"],
|
|
@@ -1697,7 +1753,7 @@ var HarnessAdapters = [
|
|
|
1697
1753
|
},
|
|
1698
1754
|
args: ["--strict-mcp-config"]
|
|
1699
1755
|
},
|
|
1700
|
-
browserArgs: { on: ["--chrome"], off: ["--no-chrome"] },
|
|
1756
|
+
browserArgs: { on: ["--chrome"], off: ["--no-chrome"], onEnv: { CLAUDE_CODE_EXPERIMENTAL_CODE_MODE: "0" } },
|
|
1701
1757
|
toolless: { args: ["--tools", "", "--strict-mcp-config"] },
|
|
1702
1758
|
mcp: { kind: "json_arg", flag: "--mcp-config" },
|
|
1703
1759
|
brief: { kind: "file_flag", flag: "--append-system-prompt-file" },
|
|
@@ -1708,7 +1764,8 @@ var HarnessAdapters = [
|
|
|
1708
1764
|
CLAUDE_CODE_DISABLE_AUTO_MEMORY: "1",
|
|
1709
1765
|
CLAUDE_CODE_DISABLE_ADVISOR_TOOL: "1",
|
|
1710
1766
|
CLAUDE_CODE_DISABLE_FEATURE_FLAGS: "1",
|
|
1711
|
-
ENABLE_TOOL_SEARCH: "false"
|
|
1767
|
+
ENABLE_TOOL_SEARCH: "false",
|
|
1768
|
+
CLAUDE_CODE_EXPERIMENTAL_CODE_MODE: "1"
|
|
1712
1769
|
},
|
|
1713
1770
|
mcpToolTimeout: { kind: "env", variables: ["MCP_TOOL_TIMEOUT", "CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT"], unit: "ms" },
|
|
1714
1771
|
tempDirectoryVariable: "CLAUDE_CODE_TMPDIR",
|
|
@@ -2137,6 +2194,7 @@ function mcpLaunch(input, skillsDir) {
|
|
|
2137
2194
|
const allowlist = adapter.tools;
|
|
2138
2195
|
const listsSkills = (input.kitSetup?.skills ?? []).length > 0;
|
|
2139
2196
|
const browser = adapter.browserArgs === undefined ? [] : capabilities.includes("browser") ? adapter.browserArgs.on : adapter.browserArgs.off;
|
|
2197
|
+
const browserEnv = capabilities.includes("browser") ? adapter.browserArgs?.onEnv ?? {} : {};
|
|
2140
2198
|
const toolArgs = allowlist === undefined ? [] : [
|
|
2141
2199
|
allowlist.flag,
|
|
2142
2200
|
[
|
|
@@ -2177,7 +2235,7 @@ function mcpLaunch(input, skillsDir) {
|
|
|
2177
2235
|
JSON.stringify({ mcpServers: { kitman: { ...server, ...serverFields } } }),
|
|
2178
2236
|
...Object.keys(kitServers).length === 0 ? [] : [`${input.configDir}/.mcp.json`]
|
|
2179
2237
|
],
|
|
2180
|
-
env: timeoutEnv,
|
|
2238
|
+
env: { ...timeoutEnv, ...browserEnv },
|
|
2181
2239
|
files: []
|
|
2182
2240
|
};
|
|
2183
2241
|
case "toml_overrides": {
|
|
@@ -2200,7 +2258,7 @@ function mcpLaunch(input, skillsDir) {
|
|
|
2200
2258
|
`mcp_servers.${/^[A-Za-z0-9_-]+$/u.test(name) ? name : JSON.stringify(name)}=${tomlInline(value)}`
|
|
2201
2259
|
])
|
|
2202
2260
|
],
|
|
2203
|
-
env: timeoutEnv,
|
|
2261
|
+
env: { ...timeoutEnv, ...browserEnv },
|
|
2204
2262
|
files: []
|
|
2205
2263
|
};
|
|
2206
2264
|
}
|
|
@@ -2208,7 +2266,7 @@ function mcpLaunch(input, skillsDir) {
|
|
|
2208
2266
|
return {
|
|
2209
2267
|
binary: adapter.binary,
|
|
2210
2268
|
args: [...session, ...accessArgs, ...model],
|
|
2211
|
-
env: timeoutEnv,
|
|
2269
|
+
env: { ...timeoutEnv, ...browserEnv },
|
|
2212
2270
|
files: [{ path: `${input.configDir}/${delivery.path}`, content: fileConfig() }]
|
|
2213
2271
|
};
|
|
2214
2272
|
case "config_env":
|
|
@@ -2217,6 +2275,7 @@ function mcpLaunch(input, skillsDir) {
|
|
|
2217
2275
|
args: [...session, ...accessArgs, ...model],
|
|
2218
2276
|
env: {
|
|
2219
2277
|
...timeoutEnv,
|
|
2278
|
+
...browserEnv,
|
|
2220
2279
|
[delivery.variable]: JSON.stringify({
|
|
2221
2280
|
...input.model === undefined ? undefined : { model: input.model },
|
|
2222
2281
|
mcp: {
|
|
@@ -3103,6 +3162,8 @@ class ClaudeTrustNotRecorded extends TaggedError("ClaudeTrustNotRecorded") {
|
|
|
3103
3162
|
class ConfigLockHeld extends TaggedError("ConfigLockHeld") {
|
|
3104
3163
|
}
|
|
3105
3164
|
var withEntry = (object, key, value) => Object.fromEntries([...Object.entries(object), [key, value]]);
|
|
3165
|
+
var codeModeCaveats = ["codeModeCaveatsAcceptedV1", "codeModeAutoModeCaveatAcceptedV1"];
|
|
3166
|
+
var isSettled = (config, workspace) => projectOf(config, workspace).project.hasTrustDialogAccepted === true && codeModeCaveats.every((key) => config[key] === true);
|
|
3106
3167
|
var configLockStaleMs = 1e4;
|
|
3107
3168
|
var configLockPollMs = 25;
|
|
3108
3169
|
var configLockPolls = 2 * configLockStaleMs / configLockPollMs;
|
|
@@ -3144,7 +3205,7 @@ var projectOf = (config, workspace) => {
|
|
|
3144
3205
|
const project = isJsonObject(projects[workspace]) ? projects[workspace] : {};
|
|
3145
3206
|
return { projects, project };
|
|
3146
3207
|
};
|
|
3147
|
-
var isTrusted = (file, workspace) => map8(readConfig(file), (config) => isSome(config)
|
|
3208
|
+
var isTrusted = (file, workspace) => map8(readConfig(file), (config) => isSome(config) && isSettled(config.value, workspace));
|
|
3148
3209
|
var holdConfigLock = (file) => gen(function* () {
|
|
3149
3210
|
const fs = yield* FileSystem;
|
|
3150
3211
|
const lock = `${file}.lock`;
|
|
@@ -3168,9 +3229,10 @@ var record = (home, workspace) => gen(function* () {
|
|
|
3168
3229
|
if (isNone(config))
|
|
3169
3230
|
return yield* new ClaudeTrustNotRecorded({ file, reason: "it is not a JSON object" });
|
|
3170
3231
|
const { projects, project } = projectOf(config.value, workspace);
|
|
3171
|
-
if (
|
|
3232
|
+
if (isSettled(config.value, workspace))
|
|
3172
3233
|
return;
|
|
3173
|
-
const
|
|
3234
|
+
const trusted = withEntry(config.value, "projects", withEntry(projects, workspace, withEntry(project, "hasTrustDialogAccepted", true)));
|
|
3235
|
+
const json = yield* encodePrettyJsonString(codeModeCaveats.reduce((settled, key) => withEntry(settled, key, true), trusted));
|
|
3174
3236
|
const temporary = yield* fs.makeTempFile({ directory: home, prefix: ".claude.json.kitman-" });
|
|
3175
3237
|
yield* fs.chmod(temporary, 384);
|
|
3176
3238
|
yield* fs.writeFileString(temporary, `${json}
|
|
@@ -7895,6 +7957,19 @@ var printedFailures = (output) => gen(function* () {
|
|
|
7895
7957
|
const fs = yield* FileSystem;
|
|
7896
7958
|
return yield* fs.stream(output).pipe(decodeText, splitLines, map2(failedTestOfLine), filter((name) => name !== undefined), take2(failingLinesRead), runCollect);
|
|
7897
7959
|
}).pipe(orElseSucceed(() => []));
|
|
7960
|
+
var maxParallelFailures = 10;
|
|
7961
|
+
var parallelLinesKept = 200;
|
|
7962
|
+
var parallelFailures = (output) => gen(function* () {
|
|
7963
|
+
const fs = yield* FileSystem;
|
|
7964
|
+
const lines = () => fs.stream(output).pipe(decodeText, splitLines);
|
|
7965
|
+
const ended = yield* lines().pipe(map2(parallelFailureOfLine), filter((failure) => failure !== undefined), runFold(() => [], (found, failure) => found.length >= maxParallelFailures || found.some((known) => known.command === failure.command) ? found : [...found, failure]));
|
|
7966
|
+
if (ended.length === 0)
|
|
7967
|
+
return [];
|
|
7968
|
+
return yield* lines().pipe(runFold(() => ended.map((failure) => ({ ...failure, lines: [] })), (kept, line) => kept.map((failure) => {
|
|
7969
|
+
const text = parallelCommandOutput(line, failure.command);
|
|
7970
|
+
return text === undefined ? failure : { ...failure, lines: [...failure.lines, text].slice(-parallelLinesKept) };
|
|
7971
|
+
})));
|
|
7972
|
+
}).pipe(orElseSucceed(() => []));
|
|
7898
7973
|
var startedCheckPostgres = (worktree, services, run) => gen(function* () {
|
|
7899
7974
|
const started = yield* checkoutPostgres(worktree, services);
|
|
7900
7975
|
return started === undefined ? undefined : yield* reachCheckPostgres(started, services, worktree, run);
|
|
@@ -7923,6 +7998,7 @@ var runCheck = (worktree, check, run, keeper, services, postgres) => gen(functio
|
|
|
7923
7998
|
});
|
|
7924
7999
|
const durationMs = (yield* currentTimeMillis) - startedAt;
|
|
7925
8000
|
const printed = ran.exitCode === 0 ? [] : yield* printedFailures(output);
|
|
8001
|
+
const failedInParallel = ran.exitCode === 0 ? [] : yield* parallelFailures(output);
|
|
7926
8002
|
const { tests: checked, statuses } = yield* checkedTests(filesDir, printed);
|
|
7927
8003
|
const { failedTests, ...tests } = checked;
|
|
7928
8004
|
const fileIds = keeper === undefined ? undefined : yield* keeper.keep({ check: check.name, prefix: keeper.prefix, output, filesDir });
|
|
@@ -7933,7 +8009,7 @@ var runCheck = (worktree, check, run, keeper, services, postgres) => gen(functio
|
|
|
7933
8009
|
status: ran.exitCode === 0 ? "passed" : "failed",
|
|
7934
8010
|
...ran.exitCode === undefined ? undefined : { exitCode: ran.exitCode },
|
|
7935
8011
|
durationMs,
|
|
7936
|
-
outputTail:
|
|
8012
|
+
outputTail: outputTailWithParallelFailures(failedInParallel, ran.output),
|
|
7937
8013
|
...fileIds === undefined ? undefined : { fileIds },
|
|
7938
8014
|
tests: { ...tests, ...ran.exitCode === 0 || failedTests === undefined ? undefined : { failedTests } }
|
|
7939
8015
|
},
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
decodeJsonStringOption,
|
|
119
119
|
encodeJsonStringSync,
|
|
120
120
|
encodePrettyJsonString
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-wttgq85b.js";
|
|
122
122
|
import {
|
|
123
123
|
currentTimeMillis,
|
|
124
124
|
SecureRandom,
|
|
@@ -170,13 +170,13 @@ import {
|
|
|
170
170
|
runMcpEffect,
|
|
171
171
|
createAgentAuthSignedFetch,
|
|
172
172
|
setupMcpAgentCredential
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-f1y7ysjg.js";
|
|
174
174
|
import {
|
|
175
175
|
guard,
|
|
176
176
|
Id,
|
|
177
177
|
Timestamp,
|
|
178
178
|
ActorType
|
|
179
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-c80dvhxf.js";
|
|
180
180
|
import {
|
|
181
181
|
join,
|
|
182
182
|
interrupt,
|
|
@@ -193,21 +193,21 @@ import {
|
|
|
193
193
|
withDefault,
|
|
194
194
|
option,
|
|
195
195
|
String2
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-rbbh4f56.js";
|
|
197
197
|
import {
|
|
198
198
|
searchDocs2,
|
|
199
199
|
readDoc2
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-gvs5fcvy.js";
|
|
201
201
|
import {
|
|
202
202
|
nextInt
|
|
203
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-vt8aqeby.js";
|
|
204
204
|
import {
|
|
205
205
|
layerJson,
|
|
206
206
|
make4,
|
|
207
207
|
withHeaders,
|
|
208
208
|
layerProtocolSocket,
|
|
209
209
|
ConnectionHooks
|
|
210
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-zr59g5bk.js";
|
|
211
211
|
|
|
212
212
|
// apps/cli/src/mcp.ts
|
|
213
213
|
import { tmpdir as tmpdir2 } from "os";
|
|
@@ -2226,6 +2226,7 @@ import { McpServer, fromJsonSchema } from "@modelcontextprotocol/server";
|
|
|
2226
2226
|
var generatedOpenApiSchemas = {
|
|
2227
2227
|
"0081ac4452412a57": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId"],"properties":{"workspaceId":{"type":"string"},"options":{"type":"object","additionalProperties":false,"properties":{"teamId":{"type":"string"},"includeSnoozed":{"type":"string","enum":["true","false"]}}}}}'),
|
|
2228
2228
|
"00f7548b091fdfe9": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"runnerId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time"}},"required":["runnerId","workspaceId","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
|
|
2229
|
+
"018d60262e213f02": JSON.parse('{"type":"object","additionalProperties":false,"required":["runId","fileId"],"properties":{"runId":{"type":"string"},"fileId":{"type":"string"},"options":{"type":"object","additionalProperties":false,"properties":{"offset":{"anyOf":[{"type":"number"},{"type":"string"}],"multipleOf":1,"minimum":0},"length":{"anyOf":[{"type":"number"},{"type":"string"}],"multipleOf":1,"minimum":1,"maximum":262144}}}}}'),
|
|
2229
2230
|
"027dc751b86d8885": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId","input"],"properties":{"workspaceId":{"type":"string","minLength":1},"input":{"type":"object","properties":{"target":{"type":"object","properties":{"kind":{"type":"string","enum":["task"]},"taskId":{"type":"string","minLength":1,"maxLength":240}},"required":["kind","taskId"],"additionalProperties":false},"preset":{"type":"string","enum":["attention","all"]}},"required":["target"],"additionalProperties":false}}}'),
|
|
2230
2231
|
"04a869801e712407": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"teamId":{"type":"string","minLength":1},"taskId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"stepKey":{"type":"string","minLength":1,"maxLength":240},"waitId":{"type":"string","minLength":1},"taskThreadEntryId":{"type":"string","minLength":1},"prompt":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"freeText":{"type":"boolean"},"optionDescriptions":{"type":"object","additionalProperties":{"type":"string"}},"recommended":{"type":"string"},"recommendationReason":{"type":"string"},"informationOnly":{"type":"boolean"},"default":{"type":"string","maxLength":4000,"pattern":"^(?![\\\\s\\\\S]*(?:(?:^|[^A-Za-z0-9])sk-[A-Za-z0-9_-]{16,}|ghp_[A-Za-z0-9_]+|github_pat_[A-Za-z0-9_]+|glpat-[A-Za-z0-9_-]+|\\\\b[Bb][Ee][Aa][Rr][Ee][Rr]\\\\s+[A-Za-z0-9._~+/=-]+|eyJ[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+|[A-Za-z][A-Za-z0-9+.-]*:\\\\/\\\\/(?:[^\\\\s/?#]*@|[^\\\\s?#]*\\\\?)))[\\\\s\\\\S]*$"},"defaultAt":{"type":"string","format":"date-time"},"responderPolicy":{"type":"object","properties":{"eligibleMemberIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":100,"uniqueItems":true},"allowWorkspaceAdmins":{"type":"boolean"}},"required":["eligibleMemberIds","allowWorkspaceAdmins"],"additionalProperties":false},"status":{"type":"string","enum":["open","answered","resume_requested","resumed","resume_failed","expired","cancelled"]},"answer":{"type":"object","properties":{"value":{"type":"string","maxLength":4000,"pattern":"^(?![\\\\s\\\\S]*(?:(?:^|[^A-Za-z0-9])sk-[A-Za-z0-9_-]{16,}|ghp_[A-Za-z0-9_]+|github_pat_[A-Za-z0-9_]+|glpat-[A-Za-z0-9_-]+|\\\\b[Bb][Ee][Aa][Rr][Ee][Rr]\\\\s+[A-Za-z0-9._~+/=-]+|eyJ[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+|[A-Za-z][A-Za-z0-9+.-]*:\\\\/\\\\/(?:[^\\\\s/?#]*@|[^\\\\s?#]*\\\\?)))[\\\\s\\\\S]*$"},"answeredByUserId":{"type":"string","minLength":1},"byDefault":{"type":"boolean"},"byAuto":{"type":"boolean"},"evidence":{"type":"object","properties":{"review":{"type":"string","minLength":1,"maxLength":240},"head":{"type":"string","minLength":1,"maxLength":240}},"additionalProperties":false},"answeredAt":{"type":"string","format":"date-time"},"idempotencyKey":{"type":"string","minLength":1,"maxLength":240}},"required":["value","answeredAt","idempotencyKey"],"additionalProperties":false},"resolutionOutcome":{"type":"string","maxLength":4000,"pattern":"^(?![\\\\s\\\\S]*(?:(?:^|[^A-Za-z0-9])sk-[A-Za-z0-9_-]{16,}|ghp_[A-Za-z0-9_]+|github_pat_[A-Za-z0-9_]+|glpat-[A-Za-z0-9_-]+|\\\\b[Bb][Ee][Aa][Rr][Ee][Rr]\\\\s+[A-Za-z0-9._~+/=-]+|eyJ[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+|[A-Za-z][A-Za-z0-9+.-]*:\\\\/\\\\/(?:[^\\\\s/?#]*@|[^\\\\s?#]*\\\\?)))[\\\\s\\\\S]*$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","runId","stepKey","waitId","prompt","responderPolicy","status","createdAt","updatedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
|
|
2231
2232
|
"05202550daf612b4": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string"},"kind":{"type":"string","enum":["offer","stop","pause","resume"]},"loop":{"type":"string"}},"required":["id","title","kind"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
|
|
@@ -2307,6 +2308,7 @@ var generatedOpenApiSchemas = {
|
|
|
2307
2308
|
"32ac7de3d8fc8949": JSON.parse('{"type":"object","properties":{"usedBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quotaBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byPurpose":{"type":"object","properties":{"runFile":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"taskAsset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checkpoint":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["runFile","taskAsset","checkpoint"],"additionalProperties":false},"limits":{"type":"object","properties":{"fileBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"filesPerRun":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["fileBytes","filesPerRun"],"additionalProperties":false},"runFileRetentionDays":{"type":["integer","null"],"minimum":1,"maximum":3650}},"required":["usedBytes","quotaBytes","byPurpose","limits","runFileRetentionDays"],"additionalProperties":false}'),
|
|
2308
2309
|
"33ecc39a5e097505": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"version":{"type":"string"},"layer":{"type":"string","enum":["team","workspace"]},"digest":{"type":"string"},"outcome":{"type":"string"},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"loop":{"type":"string"},"from":{"type":"string"}},"required":["id","title","loop"],"additionalProperties":false}},"publishedAt":{"type":"string","format":"date-time"},"kit":{"type":"string"}},"required":["id","title","layer","digest","offers","publishedAt","kit"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
|
|
2309
2310
|
"3470fe86bc616e81": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId","taskId","entryId","input"],"properties":{"workspaceId":{"type":"string"},"taskId":{"type":"string","description":"The Task: its id or any key it has had, such as `KIT-12`."},"entryId":{"type":"string"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reaction":{"type":"string","enum":["thumbs_up","thumbs_down","heart","laugh","hooray","confused","eyes","rocket"]},"reacted":{"type":"boolean"}},"required":["reaction","reacted"],"additionalProperties":true}}}'),
|
|
2311
|
+
"35eacb8b04a38525": JSON.parse('{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"step":{"type":"string"},"stepAttemptId":{"type":"string"},"verificationId":{"type":"string"},"madeBy":{"type":"string","enum":["program","agent","check"]},"name":{"type":"string"},"caption":{"type":"string"},"kind":{"type":"string","enum":["image","video","html","text","other"]},"contentType":{"type":"string"},"byteSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"status":{"type":"string","enum":["uploading","available","rejected","refused","removing","removed","expired"]},"reason":{"type":"string"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"actual":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"removedBy":{"type":"string"},"removedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","runId","step","madeBy","name","kind","contentType","byteSize","sha256","status","createdAt"],"additionalProperties":false},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"text":{"type":"string"}},"required":["file","offset","end","text"],"additionalProperties":false}'),
|
|
2310
2312
|
"3656a0b2fb1be79d": JSON.parse('{"type":"object","additionalProperties":false,"required":["runId"],"properties":{"runId":{"type":"string"},"options":{"type":"object","additionalProperties":false,"properties":{"step":{"type":"string"}}}}}'),
|
|
2311
2313
|
"36683821fbfbdcdc": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId"],"properties":{"workspaceId":{"type":"string"},"options":{"type":"object","additionalProperties":false,"properties":{"teamId":{"type":"string","minLength":1},"repoBindingId":{"type":"string","minLength":1}}}}}'),
|
|
2312
2314
|
"36d948dddd6a9e41": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"host":{"type":"string","maxLength":260,"pattern":"^(?:localhost|[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+|\\\\*\\\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*)(?::(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$"},"teamId":{"type":"string","minLength":1},"repoBindingId":{"type":"string","minLength":1},"addedByActorType":{"type":"string","enum":["human","delegated_agent","agent"]},"addedByActorId":{"type":"string"},"addedAt":{"type":"string","format":"date-time"}},"required":["host","addedByActorType","addedByActorId","addedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
|
|
@@ -2840,6 +2842,7 @@ var generatedOpenApiOperationContracts = {
|
|
|
2840
2842
|
proposeMemory: { inputSchemaId: "057355d0d5ce3c32", outputSchemaId: "d5afb090a9ae987f" },
|
|
2841
2843
|
provisionRunnerCredential: { inputSchemaId: "b39474afb7d54a65", outputSchemaId: "e64e9adeb28a4fe2" },
|
|
2842
2844
|
reactToTaskThreadEntry: { inputSchemaId: "3470fe86bc616e81", outputSchemaId: "45564933894e30ae" },
|
|
2845
|
+
readRunFile: { inputSchemaId: "018d60262e213f02", outputSchemaId: "35eacb8b04a38525" },
|
|
2843
2846
|
readTranscript: { inputSchemaId: "9f0cec57a4cf20a1", outputSchemaId: "de9952eda651264a" },
|
|
2844
2847
|
recordChangeRequestReview: { inputSchemaId: "678f394db28394ec", outputSchemaId: "f7dae9095279fe57" },
|
|
2845
2848
|
recordSessionUpdate: { inputSchemaId: "e90d3f6a3c555be7", outputSchemaId: "efc4a219a6db5db6" },
|
|
@@ -4779,6 +4782,13 @@ var operationSpecs = [
|
|
|
4779
4782
|
tags: ["runs"],
|
|
4780
4783
|
summary: "Short-lived download links to available Run Files, by id, valid for 15 minutes. Each call is audited."
|
|
4781
4784
|
},
|
|
4785
|
+
{
|
|
4786
|
+
name: "readRunFile",
|
|
4787
|
+
parameters: ["runId", "fileId", ["options", false]],
|
|
4788
|
+
namespacePath: ["runs", "readFile"],
|
|
4789
|
+
tags: ["runs"],
|
|
4790
|
+
summary: "Read a text Run File, such as the `<check>.log` a failed check left, redacted: `length` bytes (64 KiB by default, at most 256 KiB) from `offset`, or the file\u2019s end without one. Answers the file, the `offset` and `end` read, and the text. Each call is audited."
|
|
4791
|
+
},
|
|
4782
4792
|
{
|
|
4783
4793
|
name: "removeRunFile",
|
|
4784
4794
|
parameters: ["runId", "fileId", ["request", false]],
|
|
@@ -7867,6 +7877,9 @@ class KitmanClient {
|
|
|
7867
7877
|
runFileUrls(runId, request) {
|
|
7868
7878
|
return this.run(this.effectClient.runFileUrls(runId, request));
|
|
7869
7879
|
}
|
|
7880
|
+
readRunFile(runId, fileId, options = {}) {
|
|
7881
|
+
return this.run(this.effectClient.readRunFile(runId, fileId, options));
|
|
7882
|
+
}
|
|
7870
7883
|
removeRunFile(runId, fileId, request = {}) {
|
|
7871
7884
|
return this.run(this.effectClient.removeRunFile(runId, fileId, request));
|
|
7872
7885
|
}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
map8,
|
|
23
23
|
raceFirst,
|
|
24
24
|
scoped
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-wttgq85b.js";
|
|
26
26
|
import {
|
|
27
27
|
unwrap,
|
|
28
28
|
drainFork,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
runCollect,
|
|
32
32
|
runDrain,
|
|
33
33
|
mkString
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-rbbh4f56.js";
|
|
35
35
|
|
|
36
36
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/redacted.js
|
|
37
37
|
var redactedRegistry = /* @__PURE__ */ new WeakMap;
|
|
@@ -25,21 +25,21 @@ import {
|
|
|
25
25
|
isString2,
|
|
26
26
|
encodePrettyJsonString,
|
|
27
27
|
decodeJsonStringSync
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-wttgq85b.js";
|
|
29
29
|
import {
|
|
30
30
|
FileSystem,
|
|
31
31
|
Path,
|
|
32
32
|
optionalEnv,
|
|
33
33
|
tempDirectoryScoped
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-rbbh4f56.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentHarnessIds,
|
|
37
37
|
sha2562,
|
|
38
38
|
runCommand2
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-f1y7ysjg.js";
|
|
40
40
|
import {
|
|
41
41
|
NpmRegistry
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-pyss20q2.js";
|
|
43
43
|
|
|
44
44
|
// packages/agent-runtime/src/config-convergence.ts
|
|
45
45
|
var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
runnerRpcUrl2,
|
|
5
5
|
makeRunnerRpcClient2,
|
|
6
6
|
makeProgramRpcClient2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
10
|
-
import"./chunk-
|
|
11
|
-
import"./chunk-
|
|
12
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-vx4qe0fe.js";
|
|
8
|
+
import"./chunk-zr59g5bk.js";
|
|
9
|
+
import"./chunk-f1y7ysjg.js";
|
|
10
|
+
import"./chunk-c80dvhxf.js";
|
|
11
|
+
import"./chunk-rbbh4f56.js";
|
|
12
|
+
import"./chunk-wttgq85b.js";
|
|
13
13
|
export {
|
|
14
14
|
makeProgramRpcClient2 as makeProgramRpcClient,
|
|
15
15
|
makeRunnerRpcClient2 as makeRunnerRpcClient,
|
|
@@ -25,16 +25,16 @@ import {
|
|
|
25
25
|
isJsonObject,
|
|
26
26
|
isString2,
|
|
27
27
|
encodeUnknownJsonStringSync
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-wttgq85b.js";
|
|
29
29
|
import {
|
|
30
30
|
make11,
|
|
31
31
|
runForEach,
|
|
32
32
|
compiled2
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-rbbh4f56.js";
|
|
34
34
|
import {
|
|
35
35
|
ChildProcessSpawner,
|
|
36
36
|
make3
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-4qpmjrd2.js";
|
|
38
38
|
|
|
39
39
|
// packages/agent-runtime/src/opencode-store.ts
|
|
40
40
|
import { lstatSync, readFileSync, realpathSync } from "fs";
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
opaqueTunnelRefusal2,
|
|
5
5
|
isOpaqueConnectReason2,
|
|
6
6
|
runSrtStep2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-cwdrhsvk.js";
|
|
8
|
+
import"./chunk-c80dvhxf.js";
|
|
9
|
+
import"./chunk-wttgq85b.js";
|
|
10
10
|
export {
|
|
11
11
|
isOpaqueConnectReason2 as isOpaqueConnectReason,
|
|
12
12
|
opaqueTunnelRefusal2 as opaqueTunnelRefusal,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
decodeJsonString,
|
|
105
105
|
encodeJsonStringSync,
|
|
106
106
|
encodePrettyJsonString
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-wttgq85b.js";
|
|
108
108
|
import {
|
|
109
109
|
tap,
|
|
110
110
|
mapError,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
withDefault,
|
|
117
117
|
option,
|
|
118
118
|
String2
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-rbbh4f56.js";
|
|
120
120
|
import {
|
|
121
121
|
currentTimeMillis,
|
|
122
122
|
SecureRandom,
|
|
@@ -232,14 +232,14 @@ import {
|
|
|
232
232
|
harnessNames,
|
|
233
233
|
herdrRunnerCapabilities2,
|
|
234
234
|
declaredChecks
|
|
235
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-f1y7ysjg.js";
|
|
236
236
|
import {
|
|
237
237
|
Id
|
|
238
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-c80dvhxf.js";
|
|
239
239
|
import {
|
|
240
240
|
ChildProcessSpawner,
|
|
241
241
|
make3
|
|
242
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-4qpmjrd2.js";
|
|
243
243
|
|
|
244
244
|
// apps/cli/src/cli-error.ts
|
|
245
245
|
function cliErrorCode(error, status) {
|
|
@@ -1020,10 +1020,10 @@ var sandboxMissing = (sandbox, missing) => ({
|
|
|
1020
1020
|
var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
|
|
1021
1021
|
var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
|
|
1022
1022
|
var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
|
|
1023
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
1023
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-jnpv483d.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
|
|
1024
1024
|
});
|
|
1025
1025
|
var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
|
|
1026
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
1026
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-jnpv483d.js")), (module) => module.updateHerdrCore(options))
|
|
1027
1027
|
});
|
|
1028
1028
|
var herdrCoreMissing = (error) => {
|
|
1029
1029
|
if (isTagged(error, "HerdrCoreMissing"))
|
|
@@ -1449,7 +1449,7 @@ var syncTargets = (harness) => gen(function* () {
|
|
|
1449
1449
|
});
|
|
1450
1450
|
var syncKits = (input) => gen(function* () {
|
|
1451
1451
|
const fs = yield* FileSystem;
|
|
1452
|
-
const { syncKitSetup } = yield* promise(() => import("./chunk-
|
|
1452
|
+
const { syncKitSetup } = yield* promise(() => import("./chunk-enabwyrn.js"));
|
|
1453
1453
|
const harnesses = yield* syncTargets(input.harness);
|
|
1454
1454
|
const chain = yield* input.client.getKitChain(input.workspaceId);
|
|
1455
1455
|
for (const { name, problem } of chain.skipped)
|
|
@@ -2368,7 +2368,7 @@ var package_default = {
|
|
|
2368
2368
|
};
|
|
2369
2369
|
|
|
2370
2370
|
// apps/cli/src/scaffold.ts
|
|
2371
|
-
var cliVersion = "0.
|
|
2371
|
+
var cliVersion = "0.14.1";
|
|
2372
2372
|
var packageJson = (name, scaffold) => `${JSON.stringify({
|
|
2373
2373
|
name,
|
|
2374
2374
|
private: true,
|
|
@@ -2520,7 +2520,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
|
|
|
2520
2520
|
|
|
2521
2521
|
// apps/cli/src/commands.ts
|
|
2522
2522
|
var ClientId = "kitman-cli";
|
|
2523
|
-
var agentRuntime = promise(() => import("./chunk-
|
|
2523
|
+
var agentRuntime = promise(() => import("./chunk-0axm9scx.js"));
|
|
2524
2524
|
var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
|
|
2525
2525
|
defaultValue: () => gen(function* () {
|
|
2526
2526
|
const tui = yield* tryPromise({
|
|
@@ -3556,7 +3556,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
|
|
|
3556
3556
|
});
|
|
3557
3557
|
var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
|
|
3558
3558
|
defaultValue: () => (options) => gen(function* () {
|
|
3559
|
-
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-
|
|
3559
|
+
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-5x44qb6d.js"));
|
|
3560
3560
|
return yield* makeRunnerRpcClient({
|
|
3561
3561
|
runnerId: options.runnerId,
|
|
3562
3562
|
bearer: options.bearer,
|
|
@@ -4123,7 +4123,7 @@ function mcpCommand(args) {
|
|
|
4123
4123
|
if (command.action === "run") {
|
|
4124
4124
|
if (command.args.length > 0)
|
|
4125
4125
|
return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
|
|
4126
|
-
const { runMcpServerCommand } = yield* promise(() => import("./chunk-
|
|
4126
|
+
const { runMcpServerCommand } = yield* promise(() => import("./chunk-27k0egfz.js"));
|
|
4127
4127
|
return yield* runMcpServerCommand({ flags: command.flags });
|
|
4128
4128
|
}
|
|
4129
4129
|
if (command.action !== "setup")
|
|
@@ -4611,7 +4611,7 @@ function programLoopCommand(command) {
|
|
|
4611
4611
|
return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
|
|
4612
4612
|
});
|
|
4613
4613
|
}
|
|
4614
|
-
var docsModule = promise(() => import("./chunk-
|
|
4614
|
+
var docsModule = promise(() => import("./chunk-kwkh8hxt.js"));
|
|
4615
4615
|
function docsCommand(args) {
|
|
4616
4616
|
return gen(function* () {
|
|
4617
4617
|
const command = parseCommand(args);
|
|
@@ -5453,9 +5453,9 @@ function changeRequestCommand(args) {
|
|
|
5453
5453
|
yield* log(command.action === "approve" ? `Approved ${short} of ${changeRequest.title}. A Run waiting on approval of ${short} resumes; one waiting on another head does not.` : `Requested changes to ${short} of ${changeRequest.title}`);
|
|
5454
5454
|
});
|
|
5455
5455
|
}
|
|
5456
|
-
var KitWriter = map8(promise(() => import("./chunk-
|
|
5456
|
+
var KitWriter = map8(promise(() => import("./chunk-zw2mzy00.js")), (build) => build.writeKit);
|
|
5457
5457
|
var KitBuilder = Reference("kitman/cli/KitBuilder", {
|
|
5458
|
-
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-
|
|
5458
|
+
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-zw2mzy00.js")), (build) => build.buildKit(directory))
|
|
5459
5459
|
});
|
|
5460
5460
|
var uploadKit = (client, workspaceId, built) => gen(function* () {
|
|
5461
5461
|
yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isMinLength,
|
|
19
19
|
isMaxLength,
|
|
20
20
|
FiniteFromString
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-wttgq85b.js";
|
|
22
22
|
|
|
23
23
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/JsonSchema.js
|
|
24
24
|
var PRE_2020_TO_2020_COLLISIONS = ["$anchor", "$defs", "$dynamicAnchor", "$dynamicRef", "$vocabulary", "contentSchema", "dependentRequired", "dependentSchemas", "maxContains", "minContains", "prefixItems", "unevaluatedItems", "unevaluatedProperties"];
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
ArraySchema,
|
|
14
14
|
decodeJsonStringOption,
|
|
15
15
|
encodeUnknownJsonStringSync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-wttgq85b.js";
|
|
17
17
|
import {
|
|
18
18
|
replaceSecretReferences,
|
|
19
19
|
secretReferencesIn
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-c80dvhxf.js";
|
|
21
21
|
|
|
22
22
|
// packages/agent-runtime/src/srt-step.ts
|
|
23
23
|
import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
|
|
@@ -13,27 +13,27 @@ import {
|
|
|
13
13
|
isJsonObject,
|
|
14
14
|
decodeJsonString,
|
|
15
15
|
encodePrettyJsonString
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import"./chunk-
|
|
16
|
+
} from "./chunk-wttgq85b.js";
|
|
17
|
+
import"./chunk-c80dvhxf.js";
|
|
18
18
|
import {
|
|
19
19
|
FileSystem,
|
|
20
20
|
Path
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-rbbh4f56.js";
|
|
22
22
|
import {
|
|
23
23
|
tomlTableHeader2,
|
|
24
24
|
tomlKeyPath2,
|
|
25
25
|
kitmanSkillEntry,
|
|
26
26
|
isPathWithin2
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5jqqhvv2.js";
|
|
28
28
|
import {
|
|
29
29
|
instructionsStart,
|
|
30
30
|
instructionsEnd,
|
|
31
31
|
renderMcpServer,
|
|
32
32
|
materializeKitSetup,
|
|
33
33
|
tomlInline
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import"./chunk-
|
|
36
|
-
import"./chunk-
|
|
34
|
+
} from "./chunk-f1y7ysjg.js";
|
|
35
|
+
import"./chunk-pyss20q2.js";
|
|
36
|
+
import"./chunk-4qpmjrd2.js";
|
|
37
37
|
|
|
38
38
|
// packages/agent-runtime/src/kit-setup-sync.ts
|
|
39
39
|
class KitSyncError extends TaggedError("KitSyncError") {
|
|
@@ -231,6 +231,7 @@ import {
|
|
|
231
231
|
Finite,
|
|
232
232
|
isGreaterThanOrEqualTo,
|
|
233
233
|
isLessThanOrEqualTo,
|
|
234
|
+
isBetween,
|
|
234
235
|
Int,
|
|
235
236
|
isMinLength,
|
|
236
237
|
isMaxLength,
|
|
@@ -262,7 +263,7 @@ import {
|
|
|
262
263
|
decodeJsonStringOption,
|
|
263
264
|
encodeJsonStringSync,
|
|
264
265
|
encodePrettyJsonString
|
|
265
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-wttgq85b.js";
|
|
266
267
|
import {
|
|
267
268
|
map,
|
|
268
269
|
makeEquivalence,
|
|
@@ -329,7 +330,7 @@ import {
|
|
|
329
330
|
String2,
|
|
330
331
|
optionalEnv,
|
|
331
332
|
harnessesUnsupportedInSrt2
|
|
332
|
-
} from "./chunk-
|
|
333
|
+
} from "./chunk-rbbh4f56.js";
|
|
333
334
|
import {
|
|
334
335
|
isDateTime,
|
|
335
336
|
Numeric,
|
|
@@ -342,7 +343,7 @@ import {
|
|
|
342
343
|
SecretScope,
|
|
343
344
|
SecretHosts,
|
|
344
345
|
isSecretReference
|
|
345
|
-
} from "./chunk-
|
|
346
|
+
} from "./chunk-c80dvhxf.js";
|
|
346
347
|
import {
|
|
347
348
|
isRedacted,
|
|
348
349
|
make,
|
|
@@ -356,7 +357,8 @@ import {
|
|
|
356
357
|
make3,
|
|
357
358
|
parseFdName,
|
|
358
359
|
fdName
|
|
359
|
-
} from "./chunk-
|
|
360
|
+
} from "./chunk-4qpmjrd2.js";
|
|
361
|
+
|
|
360
362
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
|
|
361
363
|
var makeEquivalence3 = Tuple;
|
|
362
364
|
|
|
@@ -9645,6 +9647,17 @@ var RunFileUrlsRequest = Struct({
|
|
|
9645
9647
|
ids: ArraySchema(Id).check(isMinLength(1), isMaxLength(200)),
|
|
9646
9648
|
use: Literals(["view", "download"])
|
|
9647
9649
|
});
|
|
9650
|
+
var maxRunFileTextBytes = 256 * 1024;
|
|
9651
|
+
var RunFileTextRequest = Struct({
|
|
9652
|
+
offset: optionalKey(Int.check(isGreaterThanOrEqualTo(0))),
|
|
9653
|
+
length: optionalKey(Int.check(isBetween({ minimum: 1, maximum: maxRunFileTextBytes })))
|
|
9654
|
+
});
|
|
9655
|
+
var RunFileText = Struct({
|
|
9656
|
+
file: RunFileView,
|
|
9657
|
+
offset: Int,
|
|
9658
|
+
end: Int,
|
|
9659
|
+
text: String4
|
|
9660
|
+
});
|
|
9648
9661
|
var RunFileRemoveRequest = Struct({
|
|
9649
9662
|
note: optionalKey(String4.check(isMaxLength(500)))
|
|
9650
9663
|
});
|
|
@@ -12702,6 +12715,13 @@ class KitmanEffectClient {
|
|
|
12702
12715
|
body: JSON.stringify(request)
|
|
12703
12716
|
});
|
|
12704
12717
|
}
|
|
12718
|
+
readRunFile(runId, fileId, options = {}) {
|
|
12719
|
+
const params = new URLSearchParams(Object.entries(options).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]])).toString();
|
|
12720
|
+
const query = params === "" ? "" : `?${params}`;
|
|
12721
|
+
return this.request("readRunFile", `/runs/${segment(runId)}/files/${segment(fileId)}/text${query}`, {
|
|
12722
|
+
headers: this.headers()
|
|
12723
|
+
});
|
|
12724
|
+
}
|
|
12705
12725
|
removeRunFile(runId, fileId, request = {}) {
|
|
12706
12726
|
return this.request("removeRunFile", `/runs/${segment(runId)}/files/${segment(fileId)}`, {
|
|
12707
12727
|
method: "DELETE",
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
writeSrtSettings2,
|
|
15
15
|
srtStepArgv2,
|
|
16
16
|
srtArgv2
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import"./chunk-
|
|
17
|
+
} from "./chunk-rbbh4f56.js";
|
|
18
|
+
import"./chunk-wttgq85b.js";
|
|
19
19
|
export {
|
|
20
20
|
compiled2 as compiled,
|
|
21
21
|
harnessesUnsupportedInSrt2 as harnessesUnsupportedInSrt,
|
|
@@ -737,7 +737,7 @@ Runners execute StepAttempts in user-controlled environments. A runner advertise
|
|
|
737
737
|
path: "runner-operations#harnesses",
|
|
738
738
|
level: 3,
|
|
739
739
|
link: "https://kitman.sh/knowledge/docs/runner-operations#harnesses",
|
|
740
|
-
text: "### Harnesses\n\nWhen it starts, the Runner offers each of Pi, Claude Code and Codex that is installed and logged in:\n\n| Harness | Installed when | Logged in when |\n| ----------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| Pi | `pi` is on `PATH` | `~/.pi/agent/auth.json` exists, or `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY` or `OPENROUTER_API_KEY` is set |\n| Claude Code | `claude` is on `PATH` | `~/.claude/.credentials.json` exists, `~/.claude.json` records an `oauthAccount`, or `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN` is set |\n| Codex | `codex` is on `PATH` | `~/.codex/auth.json` exists, or `OPENAI_API_KEY` or `CODEX_API_KEY` is set |\n\nFor each Harness it does not offer, the Runner reports what is missing, and the Runners tab under **Agents** and `kitman runner doctor` show it. After you install or log in to a Harness, restart the Runner's service so it is detected. OpenCode is never detected; an Agent that names it still launches it on a Runner that offers it."
|
|
740
|
+
text: "### Harnesses\n\nWhen it starts, the Runner offers each of Pi, Claude Code and Codex that is installed and logged in:\n\n| Harness | Installed when | Logged in when |\n| ----------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| Pi | `pi` is on `PATH` | `~/.pi/agent/auth.json` exists, or `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY` or `OPENROUTER_API_KEY` is set |\n| Claude Code | `claude` is on `PATH` | `~/.claude/.credentials.json` exists, `~/.claude.json` records an `oauthAccount`, or `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN` is set |\n| Codex | `codex` is on `PATH` | `~/.codex/auth.json` exists, or `OPENAI_API_KEY` or `CODEX_API_KEY` is set |\n\nFor each Harness it does not offer, the Runner reports what is missing, and the Runners tab under **Agents** and `kitman runner doctor` show it. After you install or log in to a Harness, restart the Runner's service so it is detected. OpenCode is never detected; an Agent that names it still launches it on a Runner that offers it.\n\nA Claude Code Step runs in Claude Code's experimental Code Mode: its agent writes JavaScript that calls its tools in one `REPL` call, instead of calling them one at a time. The Runner records Code Mode's caveats as accepted in the Step's `.claude.json`, so the Step never stops at its opt-in question. Code Mode turns Claude in Chrome off, so a Step whose Agent has the `browser` capability runs without it."
|
|
741
741
|
},
|
|
742
742
|
{
|
|
743
743
|
title: "Runner Operations Guide \u203A Default Harness",
|
|
@@ -1555,7 +1555,7 @@ var pathOfLink = (link) => {
|
|
|
1555
1555
|
return page === null ? link : page[1] || "index";
|
|
1556
1556
|
};
|
|
1557
1557
|
var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
|
|
1558
|
-
var pinnedLink2 = (link, version = "0.
|
|
1558
|
+
var pinnedLink2 = (link, version = "0.14.1") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
|
|
1559
1559
|
var pageOf = (path) => path.split("#")[0];
|
|
1560
1560
|
var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
|
|
1561
1561
|
function excerpt(text, queryTerms) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-4qpmjrd2.js";
|
|
3
3
|
import {
|
|
4
4
|
HERDR_CORE_GENERATION2,
|
|
5
5
|
HERDR_CORE_INSTALL_COMMAND2,
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
herdrCoreLayer2,
|
|
13
13
|
herdrCoreTransportLayer2,
|
|
14
14
|
updateHerdrCore2
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import"./chunk-
|
|
17
|
-
import"./chunk-
|
|
15
|
+
} from "./chunk-f1y7ysjg.js";
|
|
16
|
+
import"./chunk-rbbh4f56.js";
|
|
17
|
+
import"./chunk-wttgq85b.js";
|
|
18
18
|
export {
|
|
19
19
|
HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
|
|
20
20
|
HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
decoded2,
|
|
8
8
|
readOpencode2,
|
|
9
9
|
runOpencodeReader2
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import"./chunk-
|
|
12
|
-
import"./chunk-
|
|
13
|
-
import"./chunk-
|
|
10
|
+
} from "./chunk-77jk3v8v.js";
|
|
11
|
+
import"./chunk-4qpmjrd2.js";
|
|
12
|
+
import"./chunk-rbbh4f56.js";
|
|
13
|
+
import"./chunk-wttgq85b.js";
|
|
14
14
|
export {
|
|
15
15
|
decoded2 as decoded,
|
|
16
16
|
decodedOption2 as decodedOption,
|
|
@@ -75,10 +75,10 @@ import {
|
|
|
75
75
|
toEquivalence,
|
|
76
76
|
toCodecJson,
|
|
77
77
|
Json
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-wttgq85b.js";
|
|
79
79
|
import {
|
|
80
80
|
guard
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-c80dvhxf.js";
|
|
82
82
|
import {
|
|
83
83
|
currentTimeMillis,
|
|
84
84
|
WebCrypto,
|
|
@@ -105,11 +105,11 @@ import {
|
|
|
105
105
|
KitDigest,
|
|
106
106
|
KitSetup,
|
|
107
107
|
RunnerRpcError
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-f1y7ysjg.js";
|
|
109
109
|
import {
|
|
110
110
|
runForEach,
|
|
111
111
|
FileSystem
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-rbbh4f56.js";
|
|
113
113
|
|
|
114
114
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/crypto/internal/webCrypto.js
|
|
115
115
|
var subtleUnavailable = () => new Error("crypto.subtle is unavailable; browsers expose it only in secure contexts");
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
Record,
|
|
25
25
|
Int,
|
|
26
26
|
fromJsonString
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-wttgq85b.js";
|
|
28
28
|
import {
|
|
29
29
|
withDefault,
|
|
30
30
|
String2
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-rbbh4f56.js";
|
|
32
32
|
import {
|
|
33
33
|
newerKitmanVersion,
|
|
34
34
|
digestSha256,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
get2,
|
|
40
40
|
layer4,
|
|
41
41
|
KitDigest
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-f1y7ysjg.js";
|
|
43
43
|
|
|
44
44
|
// packages/core/src/npm-registry.ts
|
|
45
45
|
var KitManifest = Struct({
|
|
@@ -201,7 +201,7 @@ import {
|
|
|
201
201
|
String4,
|
|
202
202
|
toCodecStringTree,
|
|
203
203
|
encodeUnknownJsonStringSync
|
|
204
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-wttgq85b.js";
|
|
205
205
|
|
|
206
206
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
|
|
207
207
|
var headUnsafe = (self) => {
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
gen,
|
|
7
7
|
flatMap3,
|
|
8
8
|
provideContext2
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-wttgq85b.js";
|
|
10
10
|
import {
|
|
11
11
|
runForEach
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-rbbh4f56.js";
|
|
13
13
|
import {
|
|
14
14
|
WebSocketConstructor,
|
|
15
15
|
layerWebSocketConstructorGlobal,
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
RunnerReplicaRpcs,
|
|
20
20
|
RunnerRunFileRpcs,
|
|
21
21
|
ProgramRpcs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-f1y7ysjg.js";
|
|
23
23
|
import {
|
|
24
24
|
layerJson,
|
|
25
25
|
make4,
|
|
26
26
|
withHeaders,
|
|
27
27
|
layerProtocolSocket
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-zr59g5bk.js";
|
|
29
29
|
|
|
30
30
|
// packages/live/src/rpc/runner-client.ts
|
|
31
31
|
var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
|
|
@@ -1506,6 +1506,7 @@ var Number2 = /* @__PURE__ */ make((self, that) => {
|
|
|
1506
1506
|
return self < that ? -1 : 1;
|
|
1507
1507
|
});
|
|
1508
1508
|
var mapInput = /* @__PURE__ */ dual(2, (self, f) => make((b1, b2) => self(f(b1), f(b2))));
|
|
1509
|
+
var isLessThan = (O) => dual(2, (self, that) => O(self, that) === -1);
|
|
1509
1510
|
var isGreaterThan2 = (O) => dual(2, (self, that) => O(self, that) === 1);
|
|
1510
1511
|
var isLessThanOrEqualTo2 = (O) => dual(2, (self, that) => O(self, that) !== 1);
|
|
1511
1512
|
var isGreaterThanOrEqualTo2 = (O) => dual(2, (self, that) => O(self, that) !== -1);
|
|
@@ -9418,6 +9419,33 @@ function makeIsLessThanOrEqualTo(options) {
|
|
|
9418
9419
|
});
|
|
9419
9420
|
};
|
|
9420
9421
|
}
|
|
9422
|
+
function makeIsBetween(deriveOptions) {
|
|
9423
|
+
const greaterThanOrEqualTo = isGreaterThanOrEqualTo2(deriveOptions.order);
|
|
9424
|
+
const greaterThan = isGreaterThan2(deriveOptions.order);
|
|
9425
|
+
const lessThanOrEqualTo = isLessThanOrEqualTo2(deriveOptions.order);
|
|
9426
|
+
const lessThan = isLessThan(deriveOptions.order);
|
|
9427
|
+
const formatter = deriveOptions.formatter ?? format;
|
|
9428
|
+
return (options, annotations) => {
|
|
9429
|
+
const gte = options.exclusiveMinimum ? greaterThan : greaterThanOrEqualTo;
|
|
9430
|
+
const lte = options.exclusiveMaximum ? lessThan : lessThanOrEqualTo;
|
|
9431
|
+
return makeFilter((input) => gte(input, options.minimum) && lte(input, options.maximum), {
|
|
9432
|
+
expected: `a value between ${formatter(options.minimum)}${options.exclusiveMinimum ? " (excluded)" : ""} and ${formatter(options.maximum)}${options.exclusiveMaximum ? " (excluded)" : ""}`,
|
|
9433
|
+
arbitraryConstraint: {
|
|
9434
|
+
order: deriveOptions.order,
|
|
9435
|
+
minimum: options.minimum,
|
|
9436
|
+
maximum: options.maximum,
|
|
9437
|
+
...options.exclusiveMinimum && {
|
|
9438
|
+
exclusiveMinimum: true
|
|
9439
|
+
},
|
|
9440
|
+
...options.exclusiveMaximum && {
|
|
9441
|
+
exclusiveMaximum: true
|
|
9442
|
+
}
|
|
9443
|
+
},
|
|
9444
|
+
...deriveOptions.annotate?.(options),
|
|
9445
|
+
...annotations
|
|
9446
|
+
});
|
|
9447
|
+
};
|
|
9448
|
+
}
|
|
9421
9449
|
function encodeNumberPayload(number) {
|
|
9422
9450
|
if (!globalThis.Number.isFinite(number)) {
|
|
9423
9451
|
throw new globalThis.RangeError(`Expected a finite number, got ${format(number)}`);
|
|
@@ -9475,6 +9503,36 @@ var isLessThanOrEqualTo = /* @__PURE__ */ makeIsLessThanOrEqualTo({
|
|
|
9475
9503
|
})
|
|
9476
9504
|
})
|
|
9477
9505
|
});
|
|
9506
|
+
var isBetween = /* @__PURE__ */ makeIsBetween({
|
|
9507
|
+
order: Number2,
|
|
9508
|
+
annotate: (options) => {
|
|
9509
|
+
const exclusiveMinimum = options.exclusiveMinimum ? true : undefined;
|
|
9510
|
+
const exclusiveMaximum = options.exclusiveMaximum ? true : undefined;
|
|
9511
|
+
const payload = {
|
|
9512
|
+
minimum: encodeNumberPayload(options.minimum),
|
|
9513
|
+
maximum: encodeNumberPayload(options.maximum),
|
|
9514
|
+
...exclusiveMinimum && {
|
|
9515
|
+
exclusiveMinimum
|
|
9516
|
+
},
|
|
9517
|
+
...exclusiveMaximum && {
|
|
9518
|
+
exclusiveMaximum
|
|
9519
|
+
}
|
|
9520
|
+
};
|
|
9521
|
+
return {
|
|
9522
|
+
representation: {
|
|
9523
|
+
id: "effect/schema/isBetween",
|
|
9524
|
+
payload
|
|
9525
|
+
},
|
|
9526
|
+
toJsonSchema: () => ({
|
|
9527
|
+
[exclusiveMinimum ? "exclusiveMinimum" : "minimum"]: options.minimum,
|
|
9528
|
+
[exclusiveMaximum ? "exclusiveMaximum" : "maximum"]: options.maximum
|
|
9529
|
+
}),
|
|
9530
|
+
toCode: () => ({
|
|
9531
|
+
runtime: `Schema.isBetween({ minimum: ${format(options.minimum)}, maximum: ${format(options.maximum)}, exclusiveMinimum: ${format(exclusiveMinimum)}, exclusiveMaximum: ${format(exclusiveMaximum)} })`
|
|
9532
|
+
})
|
|
9533
|
+
};
|
|
9534
|
+
}
|
|
9535
|
+
});
|
|
9478
9536
|
function isInt(annotations) {
|
|
9479
9537
|
return makeFilter((n) => globalThis.Number.isSafeInteger(n), {
|
|
9480
9538
|
expected: "an integer",
|
|
@@ -10296,4 +10354,4 @@ var encodeUnknownJsonStringSync = encodeSync(fromJsonString(Unknown));
|
|
|
10296
10354
|
var storableText = (text) => text.replaceAll("\x00", "").replaceAll(/\p{Cs}/gu, "");
|
|
10297
10355
|
var storable = (value) => isString2(value) ? storableText(value) : Array.isArray(value) ? value.map(storable) : isJsonObject(value) ? Object.fromEntries(Object.entries(value).map(([key, field]) => [storableText(key), storable(field)])) : value;
|
|
10298
10356
|
|
|
10299
|
-
export { pipeArguments, dual, identity, constant, constTrue, constFalse, constVoid, pipe, flow, memoize, isString, isNumber, isBoolean, isFunction, isUndefined, isNotUndefined, isNotNull, isNullish, isObject, hasProperty, isTagged, isUint8Array, symbol, hash, combine, number, string, structure, array, symbol2, equals, asEquivalence, symbolRedactable, redact, currentFiberTypeId, format, NodeInspectSymbol, toJson, BaseProto, Class, getStackTraceLimit, setStackTraceLimit, assignProperty, args, evaluate, PipeInspectableProto, isExit, causeFail, makePrimitive, exitSucceed, exitFailCause, exitFail, withFiber, Done, Prototype, make14, strictEqual, Tuple, String3, Number2, mapInput, none, some, isNone, isSome, match, getOrElse, orElse, fromNullishOr, fromUndefinedOr, getOrUndefined, liftThrowable, map4, flatMap, toArray, filter2, exists, Service2, makeUnsafe4, empty3, make15, add, getOrUndefined2, getOrUndefinedUnsafe, getUnsafe, get4, merge3, Reference, fromInputUnsafe, isFinite, zero, infinity, millis, seconds, minutes, toMillis, toMinutes, min, max, subtract, format2, normalize, succeed, fail3, try_, isResult, isFailure, isSuccess, map5, getOrElse2, getOrThrow, all2, allocate, fromIterable, isArrayNonEmpty, isReadonlyArrayNonEmpty, isCanonicalArrayIndex, getUnsafe2, sort, of, map6, makeEquivalence2, TaggedClass, Error2, TaggedError, encode, DisablePropagation, getCurrentFiber, fiberJoin, fiberInterrupt, succeed2, sync, suspend2, succeedNone, void_, callback2, asSome, andThen, flatMap2, map7, exitInterrupt, exitVoid, exitZipRight, scopeAddFinalizer, scope, onExitPrimitive, onExitUnsafe, uninterruptibleMask, fiberRunIn, makeLatchUnsafe, makeLatch, ClockRef, currentTimeMillis2, ConsoleRef, succeed3, failCause2, fail4, die, interrupt2, void_2, isSuccess2, isFailure2, hasInterrupts, asVoidAll, makeUnsafe5, make16, _await, fail5, interruptWith, isDone, isDoneUnsafe, succeed4, doneUnsafe, TracerTimingEnabled, Scope, makeUnsafe6, provide, addFinalizerExit, addFinalizer, forkUnsafe, close, build, buildWithScope, succeed5, effect, effectContext, effectDiscard, mergeAll, provide2, provideMerge, isCause, isFailReason, isDieReason, fromReasons, fail6, die2, makeFailReason, makeDieReason, hasInterruptsOnly, squash, findError, findErrorOption, hasInterrupts2, interruptors, pretty, isDone2, Done2, done, IllegalArgumentError, UnknownError, reasonAnnotations, Random, catchDone, isDoneCause, filterDone, doneExitFromCause, matchEffect, max2, during, min2, exponential, jittered, spaced, isEffect, all3, findFirst, forEach, whileLoop, promise, tryPromise, succeed6, suspend3, sync2, void_3, undefined_, callback3, never, gen, fail7, failSync, failCause3, die3, try_2, yieldNow, withFiber2, fromResult, fromNullishOr2, flatMap3, flatten, andThen2, tap2, result, option2, exit, map8, as, asSome2, asVoid, zipWith, catch_, catchTag, catchTags, catchReason, catchCause2, catchDefect, catchIf, catchCauseIf, mapError2, orDie, tapError2, tapCause, retry, retryOrElse, ignore, ignoreCause, orElseSucceed, timeout, timeoutOption, timeoutOrElse, delay, sleep, raceAllFirst, raceFirst, filter3, filterOrFail, when, matchCauseEffect, matchEffect2, context, contextWith, provide3, provideContext2, service, serviceOption, updateContext, updateService, provideService, scope2, scoped, scopedWith, acquireRelease, acquireUseRelease, addFinalizer2, ensuring2, onError, onExitPrimitive2, onExit, cached, interrupt3, interruptible, onInterrupt, uninterruptible, uninterruptibleMask2, forever, repeat, annotateCurrentSpan, makeSpanScoped, useSpan, withSpan, withParentSpan, forkChild, forkIn, forkScoped, forkDetach, runFork, runForkWith, runPromise, runPromiseWith, runSync, runSyncExitWith, fnUntraced, fn, clockWith, logWarning, logError, logInfo, annotateLogs, effectify, mapEager, flatMapEager, catchEager, encode2, decode, Pointer, makeFormatterStandardSchemaV1, passthrough, transformEffect, Transformation, transform, defaultParseOptions, unknown, getIndexSignatureKeys, applyToSelfOrLastLinkEncoding, decodeTo, toEncoded, decodeUnknownEffect, omit, map9, declare, SchemaError, is, decodeUnknownEffect2, decodeEffect, decodeUnknownExit, decodeUnknownOption, decodeOption, decodeSync, encodeEffect, make17, isSchema, optionalKey, optional, toType, Literal, Never, Unknown, Null, String4, Boolean2, Void, Struct, Record, StructWithRest, ArraySchema, NonEmptyArray, Union, Literals, NullOr, UndefinedOr, suspend4, decodeTo2, withDecodingDefaultKey, tag, TaggedStruct, makeFilter, isPattern, Finite, isGreaterThan, isGreaterThanOrEqualTo, isLessThanOrEqualTo, Int, isMinLength, isMaxLength, isMinProperties, isMaxProperties, isUnique, NonEmptyString, Defect, Date2, fromJsonString, FiniteFromString, Cause, Exit, Class2, Error3, TaggedError2, toEquivalence, toCodecJson, toCodecStringTree, Json, JsonObject, toJsonValue, isOneOf, isKeyOf, toJsonObject, isBigInt, isBoolean2, isFunction2, isNumber2, isObject2, isJsonObject, isString2, isSymbol, isUndefined2, kindOf, decodeJsonString, decodeJsonStringOption, encodeJsonStringSync, encodePrettyJsonString, decodeJsonStringSync, encodeUnknownJsonStringSync, storable };
|
|
10357
|
+
export { pipeArguments, dual, identity, constant, constTrue, constFalse, constVoid, pipe, flow, memoize, isString, isNumber, isBoolean, isFunction, isUndefined, isNotUndefined, isNotNull, isNullish, isObject, hasProperty, isTagged, isUint8Array, symbol, hash, combine, number, string, structure, array, symbol2, equals, asEquivalence, symbolRedactable, redact, currentFiberTypeId, format, NodeInspectSymbol, toJson, BaseProto, Class, getStackTraceLimit, setStackTraceLimit, assignProperty, args, evaluate, PipeInspectableProto, isExit, causeFail, makePrimitive, exitSucceed, exitFailCause, exitFail, withFiber, Done, Prototype, make14, strictEqual, Tuple, String3, Number2, mapInput, none, some, isNone, isSome, match, getOrElse, orElse, fromNullishOr, fromUndefinedOr, getOrUndefined, liftThrowable, map4, flatMap, toArray, filter2, exists, Service2, makeUnsafe4, empty3, make15, add, getOrUndefined2, getOrUndefinedUnsafe, getUnsafe, get4, merge3, Reference, fromInputUnsafe, isFinite, zero, infinity, millis, seconds, minutes, toMillis, toMinutes, min, max, subtract, format2, normalize, succeed, fail3, try_, isResult, isFailure, isSuccess, map5, getOrElse2, getOrThrow, all2, allocate, fromIterable, isArrayNonEmpty, isReadonlyArrayNonEmpty, isCanonicalArrayIndex, getUnsafe2, sort, of, map6, makeEquivalence2, TaggedClass, Error2, TaggedError, encode, DisablePropagation, getCurrentFiber, fiberJoin, fiberInterrupt, succeed2, sync, suspend2, succeedNone, void_, callback2, asSome, andThen, flatMap2, map7, exitInterrupt, exitVoid, exitZipRight, scopeAddFinalizer, scope, onExitPrimitive, onExitUnsafe, uninterruptibleMask, fiberRunIn, makeLatchUnsafe, makeLatch, ClockRef, currentTimeMillis2, ConsoleRef, succeed3, failCause2, fail4, die, interrupt2, void_2, isSuccess2, isFailure2, hasInterrupts, asVoidAll, makeUnsafe5, make16, _await, fail5, interruptWith, isDone, isDoneUnsafe, succeed4, doneUnsafe, TracerTimingEnabled, Scope, makeUnsafe6, provide, addFinalizerExit, addFinalizer, forkUnsafe, close, build, buildWithScope, succeed5, effect, effectContext, effectDiscard, mergeAll, provide2, provideMerge, isCause, isFailReason, isDieReason, fromReasons, fail6, die2, makeFailReason, makeDieReason, hasInterruptsOnly, squash, findError, findErrorOption, hasInterrupts2, interruptors, pretty, isDone2, Done2, done, IllegalArgumentError, UnknownError, reasonAnnotations, Random, catchDone, isDoneCause, filterDone, doneExitFromCause, matchEffect, max2, during, min2, exponential, jittered, spaced, isEffect, all3, findFirst, forEach, whileLoop, promise, tryPromise, succeed6, suspend3, sync2, void_3, undefined_, callback3, never, gen, fail7, failSync, failCause3, die3, try_2, yieldNow, withFiber2, fromResult, fromNullishOr2, flatMap3, flatten, andThen2, tap2, result, option2, exit, map8, as, asSome2, asVoid, zipWith, catch_, catchTag, catchTags, catchReason, catchCause2, catchDefect, catchIf, catchCauseIf, mapError2, orDie, tapError2, tapCause, retry, retryOrElse, ignore, ignoreCause, orElseSucceed, timeout, timeoutOption, timeoutOrElse, delay, sleep, raceAllFirst, raceFirst, filter3, filterOrFail, when, matchCauseEffect, matchEffect2, context, contextWith, provide3, provideContext2, service, serviceOption, updateContext, updateService, provideService, scope2, scoped, scopedWith, acquireRelease, acquireUseRelease, addFinalizer2, ensuring2, onError, onExitPrimitive2, onExit, cached, interrupt3, interruptible, onInterrupt, uninterruptible, uninterruptibleMask2, forever, repeat, annotateCurrentSpan, makeSpanScoped, useSpan, withSpan, withParentSpan, forkChild, forkIn, forkScoped, forkDetach, runFork, runForkWith, runPromise, runPromiseWith, runSync, runSyncExitWith, fnUntraced, fn, clockWith, logWarning, logError, logInfo, annotateLogs, effectify, mapEager, flatMapEager, catchEager, encode2, decode, Pointer, makeFormatterStandardSchemaV1, passthrough, transformEffect, Transformation, transform, defaultParseOptions, unknown, getIndexSignatureKeys, applyToSelfOrLastLinkEncoding, decodeTo, toEncoded, decodeUnknownEffect, omit, map9, declare, SchemaError, is, decodeUnknownEffect2, decodeEffect, decodeUnknownExit, decodeUnknownOption, decodeOption, decodeSync, encodeEffect, make17, isSchema, optionalKey, optional, toType, Literal, Never, Unknown, Null, String4, Boolean2, Void, Struct, Record, StructWithRest, ArraySchema, NonEmptyArray, Union, Literals, NullOr, UndefinedOr, suspend4, decodeTo2, withDecodingDefaultKey, tag, TaggedStruct, makeFilter, isPattern, Finite, isGreaterThan, isGreaterThanOrEqualTo, isLessThanOrEqualTo, isBetween, Int, isMinLength, isMaxLength, isMinProperties, isMaxProperties, isUnique, NonEmptyString, Defect, Date2, fromJsonString, FiniteFromString, Cause, Exit, Class2, Error3, TaggedError2, toEquivalence, toCodecJson, toCodecStringTree, Json, JsonObject, toJsonValue, isOneOf, isKeyOf, toJsonObject, isBigInt, isBoolean2, isFunction2, isNumber2, isObject2, isJsonObject, isString2, isSymbol, isUndefined2, kindOf, decodeJsonString, decodeJsonStringOption, encodeJsonStringSync, encodePrettyJsonString, decodeJsonStringSync, encodeUnknownJsonStringSync, storable };
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
Defect,
|
|
97
97
|
Exit,
|
|
98
98
|
toCodecJson
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-wttgq85b.js";
|
|
100
100
|
import {
|
|
101
101
|
interrupt,
|
|
102
102
|
getCurrent,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
shutdownUnsafe,
|
|
109
109
|
fromQueue,
|
|
110
110
|
unwrap
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-rbbh4f56.js";
|
|
112
112
|
import {
|
|
113
113
|
Clock,
|
|
114
114
|
empty,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
ParseOptions,
|
|
124
124
|
RpcClientDefect,
|
|
125
125
|
RpcClientError
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-f1y7ysjg.js";
|
|
127
127
|
|
|
128
128
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workers/Transferable.js
|
|
129
129
|
class Collector extends (/* @__PURE__ */ Service2()("effect/workers/Transferable/Collector")) {
|
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
toCodecJson,
|
|
33
33
|
Json,
|
|
34
34
|
encodePrettyJsonString
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import"./chunk-
|
|
35
|
+
} from "./chunk-wttgq85b.js";
|
|
36
|
+
import"./chunk-c80dvhxf.js";
|
|
37
37
|
import {
|
|
38
38
|
SecureRandom,
|
|
39
39
|
layerWebCrypto,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
layer4,
|
|
46
46
|
kitmanMcpServer,
|
|
47
47
|
RunnerRpcProtocolVersion
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-f1y7ysjg.js";
|
|
49
49
|
import {
|
|
50
50
|
decodeText,
|
|
51
51
|
mkString,
|
|
@@ -53,23 +53,23 @@ import {
|
|
|
53
53
|
Path,
|
|
54
54
|
withDefault,
|
|
55
55
|
String2
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-rbbh4f56.js";
|
|
57
57
|
import {
|
|
58
58
|
Packument,
|
|
59
59
|
tarballMatches
|
|
60
|
-
} from "./chunk-
|
|
61
|
-
import"./chunk-
|
|
60
|
+
} from "./chunk-pyss20q2.js";
|
|
61
|
+
import"./chunk-vx4qe0fe.js";
|
|
62
62
|
import {
|
|
63
63
|
AgentDeclaration,
|
|
64
64
|
KitDeclarations,
|
|
65
65
|
describeFlag,
|
|
66
66
|
Described
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-nvncrs4n.js";
|
|
68
68
|
import {
|
|
69
69
|
ChildProcessSpawner,
|
|
70
70
|
make3
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import"./chunk-
|
|
71
|
+
} from "./chunk-4qpmjrd2.js";
|
|
72
|
+
import"./chunk-zr59g5bk.js";
|
|
73
73
|
|
|
74
74
|
// packages/sdk/src/build/index.ts
|
|
75
75
|
class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
|
package/dist/index.js
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
var args = process.argv.slice(2);
|
|
6
6
|
if (args[0] === "srt") {
|
|
7
7
|
process.argv.splice(2, 1);
|
|
8
|
-
const { runSrtCli } = await import("./chunk-
|
|
8
|
+
const { runSrtCli } = await import("./chunk-fch7pjzh.js");
|
|
9
9
|
await runSrtCli();
|
|
10
10
|
} else if (args[0] === "srt-step") {
|
|
11
|
-
const { runSrtStep } = await import("./chunk-
|
|
11
|
+
const { runSrtStep } = await import("./chunk-93xj74qp.js");
|
|
12
12
|
await runSrtStep(args.slice(1));
|
|
13
13
|
} else if (args[0] === "opencode-read") {
|
|
14
|
-
const { runOpencodeReader } = await import("./chunk-
|
|
14
|
+
const { runOpencodeReader } = await import("./chunk-jp7cjnng.js");
|
|
15
15
|
runOpencodeReader();
|
|
16
16
|
} else {
|
|
17
|
-
const { runCli } = await import("./chunk-
|
|
17
|
+
const { runCli } = await import("./chunk-a9srrnsk.js");
|
|
18
18
|
runCli(args);
|
|
19
19
|
}
|