@outerlayer/cli 0.8.5 → 0.9.0
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/CHANGELOG.md +21 -0
- package/README.md +22 -14
- package/dist/{agent-setup-LEQF4V5F.js → agent-setup-ODTDC3US.js} +8 -7
- package/dist/{build-3FSJR5OO.js → build-LELVCWHV.js} +2 -2
- package/dist/build-info.json +1 -1
- package/dist/{builder-5UFAF5LW.js → builder-5DKTBWT3.js} +5 -5
- package/dist/{check-HWYLSMEL.js → check-VJRJ2KQ4.js} +69 -34
- package/dist/{chunk-Y7UQHKFY.js → chunk-3FMPZPJQ.js} +1 -4
- package/dist/chunk-3JVYMD4G.js +18 -0
- package/dist/{chunk-K4MGMSMN.js → chunk-4HMXH2OA.js} +8 -2
- package/dist/{chunk-H6IGIE3I.js → chunk-543OT6V5.js} +4 -4
- package/dist/{chunk-PVC36MFI.js → chunk-5MF73XCV.js} +2 -2
- package/dist/{chunk-HWMYGAKF.js → chunk-6CXYORUS.js} +1 -1
- package/dist/{inspect-XAUSB7L3.js → chunk-6MZSX4M7.js} +12 -6
- package/dist/{chunk-IS4DIGBQ.js → chunk-ABIWDUMS.js} +1 -13
- package/dist/{chunk-WLV4KCAW.js → chunk-BGWTYRSS.js} +1 -1
- package/dist/{chunk-2MFYKH3C.js → chunk-BMX3L7CR.js} +1 -1
- package/dist/{chunk-HKMPVPO7.js → chunk-BYT5O5RV.js} +7 -1
- package/dist/{chunk-WGLWDX5J.js → chunk-FKFGQJNN.js} +1 -1
- package/dist/{chunk-MSV44EB5.js → chunk-KPUJGBA4.js} +2 -2
- package/dist/{chunk-TY7EZC7U.js → chunk-KWCJLAHQ.js} +5 -5
- package/dist/{chunk-GJ3OWUFO.js → chunk-LBU4CLK5.js} +113 -24
- package/dist/{chunk-CDISNKM4.js → chunk-LTJPX7TX.js} +93 -13
- package/dist/{chunk-TFJGK4UB.js → chunk-LYESSQUA.js} +22 -4
- package/dist/{chunk-7KI224YS.js → chunk-M2PBLRB7.js} +1 -1
- package/dist/{chunk-2FWL7CE2.js → chunk-M6G7TJVF.js} +1 -1
- package/dist/{chunk-CRLAB4PM.js → chunk-NTLGWCWK.js} +1 -1
- package/dist/{chunk-4KPMIGBQ.js → chunk-OSKO3PAL.js} +25 -20
- package/dist/{chunk-AIW6GLET.js → chunk-PDTSUOVT.js} +1 -1
- package/dist/{chunk-LKUUQ3XV.js → chunk-QPPPUKQJ.js} +1 -1
- package/dist/{chunk-6AFQOYO3.js → chunk-RWQWPZB4.js} +10 -6
- package/dist/{chunk-2E2MG3KW.js → chunk-S6IUUNCD.js} +1 -1
- package/dist/{chunk-AGMIJ725.js → chunk-SUMWRA7K.js} +1 -1
- package/dist/{chunk-NKU5OPYP.js → chunk-TB7EP24C.js} +1 -1
- package/dist/{chunk-DE4GLH3P.js → chunk-TV36SKEN.js} +2 -2
- package/dist/{chunk-J5DPVNL3.js → chunk-V42JY4F6.js} +2 -2
- package/dist/{chunk-FCDET2U5.js → chunk-VMK7I3TB.js} +3 -3
- package/dist/{chunk-IOG6LPEI.js → chunk-WJBJY5DQ.js} +2 -2
- package/dist/{chunk-SWGQAURM.js → chunk-XGCJNSI7.js} +26 -7
- package/dist/{chunk-FTW6C2E7.js → chunk-XZNO4QED.js} +10 -10
- package/dist/{chunk-ZMKXBWIK.js → chunk-YCPV7FN6.js} +31 -19
- package/dist/{chunk-PK5NANMT.js → chunk-YT35WGIP.js} +5 -3
- package/dist/{chunk-DSPYQUH4.js → chunk-YU5GL7QS.js} +2 -2
- package/dist/{chunk-BL63NBJZ.js → chunk-ZEQMTBRD.js} +1 -1
- package/dist/{cli-5QAP7N4A.js → cli-7RQYILJT.js} +81 -81
- package/dist/{command-WKRTL3JQ.js → command-2LYWVGIK.js} +21 -21
- package/dist/{config-OOBPCY7Q.js → config-X45X7AS4.js} +3 -3
- package/dist/{connect-cmd-YEO7WRSL.js → connect-cmd-MPZWSEKY.js} +4 -4
- package/dist/{context-adopt-3REPEEQR.js → context-adopt-A77G67CP.js} +6 -5
- package/dist/{context-materialize-DU6B6RXF.js → context-materialize-KQZYATQZ.js} +6 -5
- package/dist/{dist-PKBWZAAL.js → dist-QY5CL5LB.js} +2 -2
- package/dist/{docker-5DUNHNOH.js → docker-V7B6UKPF.js} +6 -6
- package/dist/{doctor-FEIBPZL7.js → doctor-PUAL5LTL.js} +46 -35
- package/dist/{emit-artifact-cmd-S3CASUQK.js → emit-artifact-cmd-P3IWNSQY.js} +7 -7
- package/dist/{emit-cmd-ETI47BA6.js → emit-cmd-SU62J2PB.js} +4 -4
- package/dist/{emit-criteria-cmd-ZTUP7OGA.js → emit-criteria-cmd-GOSP6X74.js} +5 -5
- package/dist/{emit-finding-cmd-TTXBZ4B7.js → emit-finding-cmd-D554IQKU.js} +5 -5
- package/dist/{emit-result-cmd-34OC6TI5.js → emit-result-cmd-QACXTIBV.js} +7 -7
- package/dist/{exec-client-2UX6NHAO.js → exec-client-QTUO6TZT.js} +4 -4
- package/dist/{guest-init-VHQNFCFS.js → guest-init-4UW4HM6N.js} +4 -4
- package/dist/{hook-fast-CFLLVMSV.js → hook-fast-AQCAQIA6.js} +1 -1
- package/dist/{import-capture-cmd-Z3232HR4.js → import-capture-cmd-5NJVL2HN.js} +3 -3
- package/dist/{import-ruler-cmd-2PLXZXM7.js → import-ruler-cmd-TUK3MRPC.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/{init-AHQHM56A.js → init-TMBE3BRN.js} +20 -20
- package/dist/{init-UZ5TXACM.js → init-WX5XE6L3.js} +47 -23
- package/dist/{init-cmd-F4FS5AVC.js → init-cmd-4FQKQLJ5.js} +14 -14
- package/dist/inspect-6UYAAXH7.js +6 -0
- package/dist/{install-C33LT5KQ.js → install-PYNCWSTV.js} +4 -4
- package/dist/{loop-FN67ZHLO.js → loop-QLL4DKRF.js} +31 -30
- package/dist/{machine-Y3TBDMXD.js → machine-7T7FBSUL.js} +19 -19
- package/dist/{real-deps-TK6JMQSW.js → real-deps-LS64D3M6.js} +4 -3
- package/dist/{session-sender-LKVVLAUP.js → session-sender-HVWTYG35.js} +6 -6
- package/dist/{starter-pack-L5WPXL4Q.js → starter-pack-I35VNYAR.js} +4 -4
- package/dist/{status-7RNWHYG6.js → status-SMF5JG2K.js} +24 -24
- package/dist/{sync-cmd-VH6HSMG5.js → sync-cmd-SLMPCUXO.js} +5 -5
- package/dist/{watch-HUKDEFUX.js → watch-TLM5QN5X.js} +5 -5
- package/dist/{work-claim-cmd-JLCU5SPP.js → work-claim-cmd-VSSZDFY5.js} +34 -12
- package/dist/{work-cmd-SBKQJBJ2.js → work-cmd-TK4VOOHL.js} +6 -6
- package/dist/{work-comment-cmd-TNUDUUAT.js → work-comment-cmd-VQCG72ZQ.js} +6 -6
- package/dist/{work-open-pr-cmd-IB57SMAD.js → work-open-pr-cmd-ZYOC5SPB.js} +7 -7
- package/dist/{work-pr-cmd-HDDNFSKA.js → work-pr-cmd-MX6UO5GO.js} +6 -6
- package/package.json +1 -1
- package/skill-pack/maintained/amend/SKILL.md +22 -12
- package/skill-pack/template/build/SKILL.md +13 -2
- package/skill-pack/template/build/references/evidence.md +2 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { appendContextProvenance } from './chunk-ZJSNLVCE.js';
|
|
4
|
-
import { readPin, pinExists, readBuildHold, readContextManifest, manifestFilesPresent, writeDegraded, writeSourceCache, SOURCE_CACHE_TTL_RETRY_MS, SOURCE_CACHE_TTL_SUCCESS_MS, isLastCheckFresh, readDegraded, touchLastCheck, clearDegraded, writeContextManifest, writePinIfChanged, readSourceCache, isSourceCacheFresh } from './chunk-
|
|
5
|
-
import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-
|
|
6
|
-
import {
|
|
4
|
+
import { readPin, pinExists, readBuildHold, readContextManifest, manifestFilesPresent, writeDegraded, writeSourceCache, SOURCE_CACHE_TTL_RETRY_MS, SOURCE_CACHE_TTL_SUCCESS_MS, isLastCheckFresh, readDegraded, touchLastCheck, clearDegraded, writeContextManifest, writePinIfChanged, readSourceCache, isSourceCacheFresh } from './chunk-BMX3L7CR.js';
|
|
5
|
+
import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-BGWTYRSS.js';
|
|
6
|
+
import { normalizeRepoName, parseGoverns, CONTEXT_SOURCE_CONFIG_PATH, parseOuterlayerConfig, classifyTree, emitTree } from './chunk-TB7EP24C.js';
|
|
7
7
|
import { defaultFetch } from './chunk-YO4PSLVB.js';
|
|
8
8
|
import { resolveGatewayCredentials } from './chunk-PLMTLGYH.js';
|
|
9
|
+
import { withTokenHeader } from './chunk-BYT5O5RV.js';
|
|
9
10
|
import { ensureContextExcludes, ensurePreCommitGuardHook } from './chunk-XCCLFVXM.js';
|
|
10
11
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
11
12
|
import { execFileSync } from 'child_process';
|
|
@@ -61,7 +62,7 @@ var defaultGitRunner = (args, opts) => {
|
|
|
61
62
|
// cat-file stream can't exhaust memory.
|
|
62
63
|
maxBuffer: 64 * 1024 * 1024,
|
|
63
64
|
stdio: ["pipe", "pipe", "pipe"],
|
|
64
|
-
env: {
|
|
65
|
+
env: (opts.env ?? ((base) => base))({
|
|
65
66
|
...process.env,
|
|
66
67
|
// classifyGitFailure greps English stderr substrings
|
|
67
68
|
// ("Authentication failed", "Permission denied", …) — a git running
|
|
@@ -73,7 +74,7 @@ var defaultGitRunner = (args, opts) => {
|
|
|
73
74
|
// terminal to read from here, hanging until OUR OWN timeout instead
|
|
74
75
|
// of failing fast with a classifiable stderr message.
|
|
75
76
|
GIT_TERMINAL_PROMPT: "0"
|
|
76
|
-
}
|
|
77
|
+
})
|
|
77
78
|
});
|
|
78
79
|
return { ok: true, stdout: Buffer.isBuffer(stdout) ? stdout : Buffer.from(stdout), stderr: "" };
|
|
79
80
|
} catch (err) {
|
|
@@ -213,14 +214,17 @@ async function materializeContext(deps) {
|
|
|
213
214
|
const sortedCandidates = [...designation.candidates].sort((a, b) => a.repository.localeCompare(b.repository));
|
|
214
215
|
const claimants = [];
|
|
215
216
|
const unfetched = [];
|
|
217
|
+
const access = await deps.controlPlaneAccess?.(sortedCandidates);
|
|
216
218
|
for (const candidate of sortedCandidates) {
|
|
217
219
|
const candidateUrl = deps.resolveControlPlaneUrl ? deps.resolveControlPlaneUrl(candidate.repository, candidate.ref, repoRoot) : buildControlPlaneUrl(git, repoRoot, candidate.repository);
|
|
218
220
|
const candidateHost = parseRemoteHost(candidateUrl).host || "unknown-host";
|
|
219
221
|
const candidateCacheDir = ensureBareCache(git, home, candidate.repository, candidateHost);
|
|
220
222
|
const candidateLocalRef = `refs/outerlayer/${sanitizeRefName(candidate.ref)}`;
|
|
223
|
+
const token = access !== void 0 && normalizeRepoName(access.repository) === normalizeRepoName(candidate.repository) ? access.token : void 0;
|
|
221
224
|
const candidateFetch = git(["fetch", "--depth", "1", candidateUrl, `+${candidate.ref}:${candidateLocalRef}`], {
|
|
222
225
|
cwd: candidateCacheDir,
|
|
223
|
-
timeoutMs: 1e4
|
|
226
|
+
timeoutMs: 1e4,
|
|
227
|
+
...token === void 0 ? {} : { env: (base) => withTokenHeader(base, candidateUrl, token) }
|
|
224
228
|
});
|
|
225
229
|
if (!candidateFetch.ok) {
|
|
226
230
|
unfetched.push(candidate.repository);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RELAY_PORT, GATEWAY_SOCKET, GATEWAY_PORT, CLAUDE_SOCKET, CLAUDE_PORT, DESTINATION_BASE_PORT } from './chunk-
|
|
3
|
+
import { RELAY_PORT, GATEWAY_SOCKET, GATEWAY_PORT, CLAUDE_SOCKET, CLAUDE_PORT, DESTINATION_BASE_PORT } from './chunk-M6G7TJVF.js';
|
|
4
4
|
import { symlinkSync, unlinkSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { C } from './chunk-YRYMNBGQ.js';
|
|
4
|
-
import { resolvePackRoot, loadTemplateFiles, loadMaintainedFiles, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MAINTAINED_SKILLS } from './chunk-
|
|
4
|
+
import { resolvePackRoot, loadTemplateFiles, loadMaintainedFiles, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MAINTAINED_SKILLS } from './chunk-BGWTYRSS.js';
|
|
5
5
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
6
6
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
7
7
|
import { join, dirname } from 'path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RESERVED_EMIT_NAMES, ARTIFACT_KINDS, ArtifactCriterionIdSchema } from './chunk-
|
|
3
|
+
import { RESERVED_EMIT_NAMES, ARTIFACT_KINDS, ArtifactCriterionIdSchema } from './chunk-YT35WGIP.js';
|
|
4
4
|
import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { BUILDKIT_IMAGE } from './chunk-CX22S5BA.js';
|
|
4
|
-
import { compareVersions } from './chunk-
|
|
4
|
+
import { compareVersions } from './chunk-LTJPX7TX.js';
|
|
5
5
|
import { parseSize } from './chunk-7RQ73DLO.js';
|
|
6
|
-
import { JOB_MOUNT, GATEWAY_PORT, GATEWAY_SOCKET, CLAUDE_PORT, CLAUDE_SOCKET, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-
|
|
6
|
+
import { JOB_MOUNT, GATEWAY_PORT, GATEWAY_SOCKET, CLAUDE_PORT, CLAUDE_SOCKET, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-M6G7TJVF.js';
|
|
7
7
|
import { runnerDir } from './chunk-ZM2IMMYN.js';
|
|
8
8
|
import { createHash } from 'crypto';
|
|
9
9
|
import { realpathSync } from 'fs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { EXEC_PORT } from './chunk-
|
|
4
|
-
import { RELAY_PORT } from './chunk-
|
|
3
|
+
import { EXEC_PORT } from './chunk-S6IUUNCD.js';
|
|
4
|
+
import { RELAY_PORT } from './chunk-M6G7TJVF.js';
|
|
5
5
|
import { spawn, spawnSync } from 'child_process';
|
|
6
6
|
import { writeFileSync, chmodSync, mkdirSync } from 'fs';
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { LiveUploader } from './chunk-
|
|
4
|
-
import { CaptureDaemon } from './chunk-
|
|
3
|
+
import { LiveUploader } from './chunk-543OT6V5.js';
|
|
4
|
+
import { CaptureDaemon } from './chunk-LTJPX7TX.js';
|
|
5
5
|
import { parseWorkItemEnv } from './chunk-GQD22KKN.js';
|
|
6
|
-
import { spoolDir } from './chunk-
|
|
6
|
+
import { spoolDir } from './chunk-4HMXH2OA.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
8
8
|
import { mkdirSync, writeFileSync, rmSync } from 'fs';
|
|
9
9
|
import { join } from 'path';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-
|
|
4
|
-
import { MIN_ENGINE_MAJOR } from './chunk-
|
|
3
|
+
import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-QPPPUKQJ.js';
|
|
4
|
+
import { MIN_ENGINE_MAJOR } from './chunk-LBU4CLK5.js';
|
|
5
5
|
import { RUNNER_DIR_MODE, runnerDir, RUNNER_FILE_MODE } from './chunk-ZM2IMMYN.js';
|
|
6
6
|
import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
7
7
|
import { dirname } from 'path';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { isPlaceholderCommand } from './chunk-
|
|
4
|
-
import { describeCallFailure } from './chunk-
|
|
5
|
-
import { WorkCommandError, getJson } from './chunk-
|
|
6
|
-
import { sanitizeTerminal } from './chunk-
|
|
7
|
-
import { builtinKind } from './chunk-
|
|
8
|
-
import { CLAUDE_CREDENTIAL_VARIABLES, claudeCredential } from './chunk-
|
|
3
|
+
import { isPlaceholderCommand } from './chunk-WJBJY5DQ.js';
|
|
4
|
+
import { describeCallFailure } from './chunk-LBU4CLK5.js';
|
|
5
|
+
import { WorkCommandError, getJson } from './chunk-KWCJLAHQ.js';
|
|
6
|
+
import { sanitizeTerminal } from './chunk-ZEQMTBRD.js';
|
|
7
|
+
import { builtinKind } from './chunk-M2PBLRB7.js';
|
|
8
|
+
import { CLAUDE_CREDENTIAL_VARIABLES, claudeCredential } from './chunk-M6G7TJVF.js';
|
|
9
9
|
import { signerFor } from './chunk-V7NIVOFD.js';
|
|
10
10
|
|
|
11
11
|
createRequire(import.meta.url);
|
|
@@ -21,6 +21,25 @@ function placeholderProblem(queues) {
|
|
|
21
21
|
const keys = queues.map((queue) => `runner.commands.${queue}`).join(", ");
|
|
22
22
|
return `${keys} ${queues.length === 1 ? "is" : "are"} still the placeholder \`runner init\` wrote, which fails every item. Edit ${queues.length === 1 ? "it" : "them"} to start your agent on item $OUTERLAYER_WORK`;
|
|
23
23
|
}
|
|
24
|
+
var CLAUDE_PERMISSION_MODES = ["acceptEdits", "auto", "bypassPermissions", "default", "dontAsk", "manual", "plan"];
|
|
25
|
+
var CLAUDE_COMMAND = /(?:^|[;&|(])\s*(?:(?:exec|env|nohup|time)\s+)*(?:[A-Za-z_][A-Za-z0-9_]*=\S*\s+)*(?:\S*\/)?claude\s/;
|
|
26
|
+
var PERMISSION_MODE_FLAG = /--permission-mode(?:=|\s+)(?:"([^"]*)"|'([^']*)'|([^\s;&|()]+))/g;
|
|
27
|
+
function permissionModeProblems(config) {
|
|
28
|
+
const problems = [];
|
|
29
|
+
for (const queue of config.queues) {
|
|
30
|
+
const command = config.commands[queue];
|
|
31
|
+
if (command === void 0 || !CLAUDE_COMMAND.test(command)) continue;
|
|
32
|
+
for (const match of command.matchAll(PERMISSION_MODE_FLAG)) {
|
|
33
|
+
const value = match[1] ?? match[2] ?? match[3] ?? "";
|
|
34
|
+
if (value.includes("$") || value.includes("`") || CLAUDE_PERMISSION_MODES.includes(value)) continue;
|
|
35
|
+
problems.push({ queue, command, value });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return problems;
|
|
39
|
+
}
|
|
40
|
+
function permissionModeProblem(problems) {
|
|
41
|
+
return problems.map(({ queue, command, value }) => `runner.commands.${queue} is \`${command}\`, and \`${value}\` is not a permission mode Claude Code accepts (${CLAUDE_PERMISSION_MODES.join(", ")}). The command would fail only when a build ran it`).join(". ");
|
|
42
|
+
}
|
|
24
43
|
function needsClaudeCredential(hooks) {
|
|
25
44
|
return builtinKind(hooks.provision) !== "own";
|
|
26
45
|
}
|
|
@@ -80,4 +99,4 @@ async function claimPermissionProblem(config, fetchImpl = fetch) {
|
|
|
80
99
|
}
|
|
81
100
|
}
|
|
82
101
|
|
|
83
|
-
export { claimPermissionProblem, claudeCredentialCheck, missingPermissionFix, missingPermissionOf, needsClaudeCredential, placeholderProblem, placeholderQueues };
|
|
102
|
+
export { claimPermissionProblem, claudeCredentialCheck, missingPermissionFix, missingPermissionOf, needsClaudeCredential, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readStatuslineState, STATE_FRESH_MS } from './chunk-F47JBIAW.js';
|
|
4
|
-
import { resolveCredentials, getJson, WorkCommandError } from './chunk-
|
|
5
|
-
import { isLinkedRepository } from './chunk-
|
|
6
|
-
import { sanitizeTerminal } from './chunk-
|
|
7
|
-
import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-
|
|
4
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-KWCJLAHQ.js';
|
|
5
|
+
import { isLinkedRepository } from './chunk-LYESSQUA.js';
|
|
6
|
+
import { sanitizeTerminal } from './chunk-ZEQMTBRD.js';
|
|
7
|
+
import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-LTJPX7TX.js';
|
|
8
8
|
import { C } from './chunk-YRYMNBGQ.js';
|
|
9
9
|
import { readSettings, settingsPath, isOurStatuslineSlot, statuslineWrappedOriginal, REGISTERED_EVENTS, isOurHookCommand, ourCommandBins, cliBinResolvable, ourDirectScriptBins, wrappedOriginalCommand } from './chunk-5QRP3MVS.js';
|
|
10
|
-
import { readPin, readContextManifest, readDegraded, readSourceCache } from './chunk-
|
|
10
|
+
import { readPin, readContextManifest, readDegraded, readSourceCache } from './chunk-BMX3L7CR.js';
|
|
11
11
|
import { defaultFetch } from './chunk-YO4PSLVB.js';
|
|
12
12
|
import { resolveGatewayCredentials } from './chunk-PLMTLGYH.js';
|
|
13
13
|
import { readCloudConfig } from './chunk-EABW6AJQ.js';
|
|
14
|
-
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-
|
|
14
|
+
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-4HMXH2OA.js';
|
|
15
15
|
import { deadHooksState, preparePackageManagerCommand, contextExcludesPresent } from './chunk-XCCLFVXM.js';
|
|
16
16
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
17
17
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -1004,7 +1004,7 @@ function doctorExitCode(checks) {
|
|
|
1004
1004
|
|
|
1005
1005
|
// src/doctor-report.ts
|
|
1006
1006
|
async function gatherDoctorChecks() {
|
|
1007
|
-
const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-
|
|
1007
|
+
const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-X45X7AS4.js');
|
|
1008
1008
|
const configPath = defaultRunnerConfigPath();
|
|
1009
1009
|
const checks = runDoctor({ runnerHost: hasRunnerBlock(configPath) });
|
|
1010
1010
|
const credential = await credentialChecks();
|
|
@@ -1016,7 +1016,7 @@ async function gatherDoctorChecks() {
|
|
|
1016
1016
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1017
1017
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1018
1018
|
} else if (hasRunnerBlock(configPath)) {
|
|
1019
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1019
|
+
const { runnerHostChecks } = await import('./doctor-PUAL5LTL.js');
|
|
1020
1020
|
const hooks = (() => {
|
|
1021
1021
|
try {
|
|
1022
1022
|
return loadRunnerConfig(configPath).hooks;
|
|
@@ -1050,8 +1050,8 @@ async function gatherDoctorChecks() {
|
|
|
1050
1050
|
const service = await (async () => {
|
|
1051
1051
|
const { existsSync: existsSync2 } = await import('fs');
|
|
1052
1052
|
if (process.platform !== "linux" || !existsSync2("/run/systemd/system")) return void 0;
|
|
1053
|
-
const { inspectService, realInspectProbes } = await import('./inspect-
|
|
1054
|
-
const { DEFAULT_UNIT_NAME } = await import('./install-
|
|
1053
|
+
const { inspectService, realInspectProbes } = await import('./inspect-6UYAAXH7.js');
|
|
1054
|
+
const { DEFAULT_UNIT_NAME } = await import('./install-PYNCWSTV.js');
|
|
1055
1055
|
const { dirname: dirname2 } = await import('path');
|
|
1056
1056
|
return inspectService(DEFAULT_UNIT_NAME, dirname2(configPath), realInspectProbes());
|
|
1057
1057
|
})();
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { decideInstalledSwitch
|
|
3
|
+
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
4
4
|
import { compareVersions, satisfiesRange } from './chunk-I2UOAV7X.js';
|
|
5
|
-
import {
|
|
5
|
+
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-ABIWDUMS.js';
|
|
6
|
+
import { LEASE_SECONDS, releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, hostCommandEnvironment, execArgv, microVmCommandLine, runCommand, execCommandLine, startSender, startHostServices, finishJob, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, hookLimitsFor, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, ALREADY_RELEASED } from './chunk-OSKO3PAL.js';
|
|
6
7
|
import { writeJobFile, readJobFile, readJobFileChecked } from './chunk-T6OIJQRT.js';
|
|
7
|
-
import { RUNNER_PROTOCOL } from './chunk-
|
|
8
|
+
import { RUNNER_PROTOCOL } from './chunk-PDTSUOVT.js';
|
|
8
9
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-UGP76IZ5.js';
|
|
9
|
-
import { placeholderQueues, placeholderProblem } from './chunk-
|
|
10
|
+
import { placeholderQueues, placeholderProblem } from './chunk-XGCJNSI7.js';
|
|
10
11
|
import { writeMarker, readMarker, currentVersion, removeMarker, entryIn, versionDir, startedThroughCurrent, switchCurrent, cleanVersions, isInLayout, stagingDir } from './chunk-TI7B7UEO.js';
|
|
11
12
|
import { freeBytes, formatBytes } from './chunk-YYYRBYWG.js';
|
|
12
13
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
13
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, provisionContainer, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandLine, BuildTokens, classifyRefusal, refusalCode, measureDisk, createRunnerLog, setUpRunnerCgroup, parseCpuList, ensureTunnel, keepGhConfigCurrent, createContainerRuntime, formatClock } from './chunk-
|
|
14
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, provisionContainer, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandLine, BuildTokens, classifyRefusal, refusalCode, measureDisk, createRunnerLog, setUpRunnerCgroup, parseCpuList, ensureTunnel, keepGhConfigCurrent, createContainerRuntime, formatClock } from './chunk-LBU4CLK5.js';
|
|
14
15
|
import { checkFit } from './chunk-JKIWMRFH.js';
|
|
15
16
|
import { startTimeOf, claimPidFile, readPidFile, isSameProcess, releasePidFile } from './chunk-N5FOE5PS.js';
|
|
16
|
-
import { spawnRun } from './chunk-
|
|
17
|
-
import { builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, BUILD_LABEL, RUNNER_LABEL } from './chunk-
|
|
18
|
-
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-
|
|
19
|
-
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind } from './chunk-
|
|
17
|
+
import { spawnRun } from './chunk-FKFGQJNN.js';
|
|
18
|
+
import { builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, BUILD_LABEL, RUNNER_LABEL } from './chunk-TV36SKEN.js';
|
|
19
|
+
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-KWCJLAHQ.js';
|
|
20
|
+
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind } from './chunk-M2PBLRB7.js';
|
|
20
21
|
import { exceedsDisk } from './chunk-7RQ73DLO.js';
|
|
21
|
-
import { sharedUserEnvironment, JOB_MOUNT, claudeCredential } from './chunk-
|
|
22
|
-
import { parseClaimIdentity } from './chunk-
|
|
22
|
+
import { sharedUserEnvironment, JOB_MOUNT, claudeCredential } from './chunk-M6G7TJVF.js';
|
|
23
|
+
import { parseClaimIdentity } from './chunk-BYT5O5RV.js';
|
|
23
24
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
24
25
|
import { loadHostKey, ensureHostKey, signerFor } from './chunk-V7NIVOFD.js';
|
|
25
26
|
import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, jobsDir, pidFilePath, spoolDir, RUNNER_FILE_MODE, rootfsDir } from './chunk-ZM2IMMYN.js';
|
|
@@ -785,8 +786,7 @@ async function removeStaleRootDisks(root, unfinished, options) {
|
|
|
785
786
|
// src/runner/loop.ts
|
|
786
787
|
var QUEUE_ORDER = ["amend", "implement"];
|
|
787
788
|
var TRACKER_REPOSITORY_HOSTS = {
|
|
788
|
-
github: "github.com"
|
|
789
|
-
gitlab: "gitlab.com"
|
|
789
|
+
github: "github.com"
|
|
790
790
|
};
|
|
791
791
|
var HOUSEKEEPING_INTERVAL_MS = 36e5;
|
|
792
792
|
function logOf(state) {
|
|
@@ -1236,7 +1236,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
1236
1236
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous branch_claimed_elsewhere".split(" ")
|
|
1237
1237
|
);
|
|
1238
1238
|
async function tryClaimAndStart(state, item, queue) {
|
|
1239
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
1239
|
+
const { postJson: postJson2 } = await import('./work-cmd-TK4VOOHL.js');
|
|
1240
1240
|
const log = logOf(state);
|
|
1241
1241
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
1242
1242
|
const claim = await retrySend(
|
|
@@ -1455,8 +1455,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity)
|
|
|
1455
1455
|
const provisionTook = formatDuration(nowOf(state).getTime() - provisionStartedMs);
|
|
1456
1456
|
if (active.ending) return;
|
|
1457
1457
|
if (!provisioned.ok) {
|
|
1458
|
-
|
|
1459
|
-
await endJob(state, active, "failed", { stage: "provision", reason: provisioned.reason });
|
|
1458
|
+
await endOnProvisionFailure(state, active, tokens, provisionTook, provisioned.reason);
|
|
1460
1459
|
return;
|
|
1461
1460
|
}
|
|
1462
1461
|
log.line(`${tag} provision ok (${provisionTook}) \xB7 container ${provisioned.state.container}`);
|
|
@@ -1488,8 +1487,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity)
|
|
|
1488
1487
|
const provisionTook = formatDuration(nowOf(state).getTime() - provisionStartedMs);
|
|
1489
1488
|
if (active.ending) return;
|
|
1490
1489
|
if (!provisioned.ok) {
|
|
1491
|
-
|
|
1492
|
-
await endJob(state, active, "failed", { stage: "provision", reason: provisioned.reason });
|
|
1490
|
+
await endOnProvisionFailure(state, active, tokens, provisionTook, provisioned.reason);
|
|
1493
1491
|
return;
|
|
1494
1492
|
}
|
|
1495
1493
|
log.line(`${tag} provision ok (${provisionTook}) \xB7 microVM build ${provisioned.state.buildId}`);
|
|
@@ -1775,6 +1773,20 @@ async function endOnTokenRefusal(state, active, err) {
|
|
|
1775
1773
|
await endJob(state, active, "failed", { stage: "provision", reason: refusal.reason });
|
|
1776
1774
|
}
|
|
1777
1775
|
}
|
|
1776
|
+
async function endOnProvisionFailure(state, active, tokens, took, reason) {
|
|
1777
|
+
const log = logOf(state);
|
|
1778
|
+
const tag = `#${active.job.item}`;
|
|
1779
|
+
if (tokens.refusal()?.kind === "lease_lost") {
|
|
1780
|
+
log.error(`${tag} provision failed (${took}): a token request was refused as a lost lease \xB7 ending job as lease_lost`);
|
|
1781
|
+
await endJob(state, active, "lease_lost");
|
|
1782
|
+
} else if (tokens.controlPlaneUnavailable()) {
|
|
1783
|
+
log.error(`${tag} provision failed (${took}): ${reason} \xB7 releasing the claim to try again`);
|
|
1784
|
+
await endJob(state, active, void 0);
|
|
1785
|
+
} else {
|
|
1786
|
+
log.error(`${tag} provision failed (${took}): ${reason} \xB7 ending job as failed`);
|
|
1787
|
+
await endJob(state, active, "failed", { stage: "provision", reason });
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1778
1790
|
function installCommitHooks(job, log, tag) {
|
|
1779
1791
|
const identity = job.commitIdentity;
|
|
1780
1792
|
if (identity?.coAuthor === void 0) return;
|
|
@@ -1960,7 +1972,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
1960
1972
|
const outcome = await onStartUnderMarker({
|
|
1961
1973
|
configPath,
|
|
1962
1974
|
own: ownVersionOf(deps),
|
|
1963
|
-
check: update.check ? () => update.check(configPath) : async () => (await import('./check-
|
|
1975
|
+
check: update.check ? () => update.check(configPath) : async () => (await import('./check-VJRJ2KQ4.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl }),
|
|
1964
1976
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
1965
1977
|
log
|
|
1966
1978
|
});
|
|
@@ -22381,15 +22381,17 @@ var FindingBatchSchema = external_exports.object({
|
|
|
22381
22381
|
}
|
|
22382
22382
|
});
|
|
22383
22383
|
});
|
|
22384
|
-
var WORK_ITEM_COMMENT_ACTIONS = ["pass", "fail", "attach", "ready"];
|
|
22384
|
+
var WORK_ITEM_COMMENT_ACTIONS = ["pass", "fail", "attach", "ready", "request"];
|
|
22385
22385
|
var WORK_ITEM_COMMENT_MAX_BODY_LENGTH = 2e3;
|
|
22386
|
+
var REVIEW_SEND_ID_PATTERN = /^[A-Za-z0-9_.-]{1,100}$/;
|
|
22386
22387
|
external_exports.object({
|
|
22387
22388
|
clientCommentId: external_exports.string().min(1).max(128),
|
|
22388
22389
|
criterion: ArtifactCriterionIdSchema.optional(),
|
|
22389
22390
|
body: external_exports.string().max(WORK_ITEM_COMMENT_MAX_BODY_LENGTH).default(""),
|
|
22390
22391
|
action: external_exports.enum(WORK_ITEM_COMMENT_ACTIONS).optional(),
|
|
22391
22392
|
artifact: external_exports.string().min(1).max(128).optional(),
|
|
22392
|
-
sessionId: external_exports.string().min(1).optional()
|
|
22393
|
+
sessionId: external_exports.string().min(1).optional(),
|
|
22394
|
+
reviewSendId: external_exports.string().regex(REVIEW_SEND_ID_PATTERN).optional()
|
|
22393
22395
|
});
|
|
22394
22396
|
var WORK_ITEM_REVIEW_NOTES_MAX = 50;
|
|
22395
22397
|
var WorkItemReviewNoteSchema = external_exports.object({
|
|
@@ -22398,7 +22400,7 @@ var WorkItemReviewNoteSchema = external_exports.object({
|
|
|
22398
22400
|
});
|
|
22399
22401
|
external_exports.object({
|
|
22400
22402
|
schemaVersion: external_exports.literal(1),
|
|
22401
|
-
clientSendId: external_exports.string().regex(
|
|
22403
|
+
clientSendId: external_exports.string().regex(REVIEW_SEND_ID_PATTERN),
|
|
22402
22404
|
notes: external_exports.array(WorkItemReviewNoteSchema).min(1).max(WORK_ITEM_REVIEW_NOTES_MAX)
|
|
22403
22405
|
});
|
|
22404
22406
|
/*! Bundled license information:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-
|
|
4
|
-
import { emitTree, parseOuterlayerConfig, classifyTree, generatedHeaderSource, CONTEXT_PIN_FILENAME, normalizePath } from './chunk-
|
|
3
|
+
import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-BGWTYRSS.js';
|
|
4
|
+
import { emitTree, parseOuterlayerConfig, classifyTree, generatedHeaderSource, CONTEXT_PIN_FILENAME, normalizePath } from './chunk-TB7EP24C.js';
|
|
5
5
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, copyFileSync, readdirSync } from 'fs';
|
|
6
6
|
import { join, dirname, relative, sep } from 'path';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { ArtifactTombstoneRecordSchema, ArtifactSpoolRecordSchema } from './chunk-
|
|
3
|
+
import { ArtifactTombstoneRecordSchema, ArtifactSpoolRecordSchema } from './chunk-YT35WGIP.js';
|
|
4
4
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
5
5
|
import { mkdirSync, appendFileSync, writeFileSync, renameSync, existsSync, unlinkSync, readdirSync, readFileSync } from 'fs';
|
|
6
6
|
import { join, dirname } from 'path';
|