@outerlayer/cli 0.15.0 → 0.17.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 +34 -0
- package/README.md +11 -11
- package/dist/{agent-setup-CN2HUBEJ.js → agent-setup-T624CWPD.js} +8 -7
- package/dist/artifact-link-cmd-2F47LT7F.js +24 -0
- package/dist/build-info.json +1 -1
- package/dist/{check-2JSSXCKJ.js → check-5XE7XMC4.js} +22 -19
- package/dist/{chunk-HFKKFTXU.js → chunk-2MNPHL23.js} +19 -11
- package/dist/{chunk-YDSMROTB.js → chunk-3NSNIIBE.js} +8 -4
- package/dist/{chunk-FOJGZYFC.js → chunk-42ZI52JW.js} +1 -1
- package/dist/{chunk-NPQWKGUA.js → chunk-6Y5RUTHO.js} +1 -1
- package/dist/{chunk-PQUM37BK.js → chunk-BWQ66M6N.js} +1 -1
- package/dist/chunk-C5Y5ZJJZ.js +88 -0
- package/dist/{chunk-ASOSIKA4.js → chunk-G5NPRL2K.js} +27 -6
- package/dist/{chunk-QLTYTPYU.js → chunk-HGECYFEI.js} +64 -7
- package/dist/{chunk-SXWS25JC.js → chunk-KG5ECZGJ.js} +6 -6
- package/dist/{chunk-F7GBYX2P.js → chunk-LWSJQJC6.js} +18 -4
- package/dist/{chunk-UUDDPNRJ.js → chunk-MAK5LYRF.js} +33 -10
- package/dist/{chunk-MTF3PHVZ.js → chunk-NBGDBTO2.js} +3 -3
- package/dist/{chunk-KFRM23WD.js → chunk-NNRTPG7X.js} +2 -2
- package/dist/{chunk-MSASO5O4.js → chunk-NWQTTSBB.js} +1 -1
- package/dist/{chunk-2M63GG56.js → chunk-OHVJA253.js} +1 -1
- package/dist/{chunk-Z3NOIFDR.js → chunk-ONKJUM6R.js} +1 -1
- package/dist/{chunk-T5VPP6H7.js → chunk-OZGHL5Y5.js} +1 -1
- package/dist/{chunk-ZA5CHAFY.js → chunk-POJMEEJJ.js} +21 -4
- package/dist/{chunk-JR6ERP3M.js → chunk-S3NYLI2P.js} +3 -3
- package/dist/{chunk-HXLMZOKU.js → chunk-VQYBXPI7.js} +4 -4
- package/dist/{chunk-LCEXHCHD.js → chunk-WTE3MQML.js} +1 -1
- package/dist/{chunk-NXUH742G.js → chunk-WVUIRTWA.js} +10 -8
- package/dist/{chunk-JJEGKEFV.js → chunk-YU3VKZ5F.js} +1 -1
- package/dist/{chunk-3NLOVYJQ.js → chunk-YZ5F4PIS.js} +134 -38
- package/dist/{cli-RGGXQTWI.js → cli-A76AXELQ.js} +90 -79
- package/dist/{command-ETUAEXP2.js → command-R2QCVX55.js} +10 -9
- package/dist/{connect-cmd-JUAW6MU4.js → connect-cmd-JBKAQNSF.js} +1 -1
- package/dist/{context-adopt-PJUMW2EZ.js → context-adopt-NFHCLVUB.js} +5 -4
- package/dist/{context-materialize-FDHYKNDT.js → context-materialize-IV2TUUFO.js} +5 -4
- package/dist/{doctor-CORFPYY6.js → doctor-4TAIARIG.js} +15 -13
- package/dist/{emit-artifact-cmd-FOGNJXVR.js → emit-artifact-cmd-MPZVR56N.js} +4 -4
- package/dist/{emit-cmd-ZEYWLC2C.js → emit-cmd-IJ3GVRFD.js} +4 -3
- package/dist/{emit-criteria-cmd-HBP6XS5C.js → emit-criteria-cmd-EFGYI23V.js} +2 -2
- package/dist/{emit-finding-cmd-DLI4MKMN.js → emit-finding-cmd-5GF3V4LR.js} +160 -47
- package/dist/{emit-result-cmd-MUSL7GQA.js → emit-result-cmd-I4OADKMD.js} +4 -4
- package/dist/hidden-prompt-UXBFMQC5.js +68 -0
- package/dist/{hook-fast-WYQD6D7T.js → hook-fast-R4FVSZ2H.js} +1 -1
- package/dist/{import-capture-cmd-6QVCOIHK.js → import-capture-cmd-EQ35EARA.js} +3 -3
- package/dist/{import-ruler-cmd-KLRGRBCP.js → import-ruler-cmd-BGAZXCQM.js} +1 -1
- package/dist/index.js +3 -3
- package/dist/{init-OPB7HHXO.js → init-6XPDRDTC.js} +12 -11
- package/dist/{init-MIC37V6J.js → init-PWU5YVL7.js} +54 -29
- package/dist/{init-cmd-JR3RKNFB.js → init-cmd-XAVO7HYZ.js} +11 -10
- package/dist/{init-update-O5YYFGF4.js → init-update-CVCWD6VS.js} +10 -9
- package/dist/{loop-QNSM5GXS.js → loop-FK3LPMMZ.js} +19 -18
- package/dist/{machine-IT6GG7FF.js → machine-SQXEBAM2.js} +10 -9
- package/dist/{runner-env-XTC53CHN.js → runner-env-EN7YE7QX.js} +1 -1
- package/dist/runner-key-6SLBI7PP.js +174 -0
- package/dist/{session-sender-4M247XSV.js → session-sender-FO3LCREV.js} +3 -3
- package/dist/{starter-pack-IB4UUIX3.js → starter-pack-KF66HGZR.js} +3 -3
- package/dist/{status-7ZX57OFJ.js → status-7VNQN5PW.js} +13 -12
- package/dist/{sync-cmd-UWD5JOFU.js → sync-cmd-GVPPFZ3G.js} +2 -2
- package/dist/{watch-DBNB7R6X.js → watch-23HSAEI6.js} +2 -2
- package/dist/{work-claim-cmd-A6IS6CQ7.js → work-claim-cmd-LKL3GHFQ.js} +5 -5
- package/dist/{work-cmd-EQSW5DTD.js → work-cmd-Z2WXLZPH.js} +3 -3
- package/dist/{work-comment-cmd-7VLKI7FN.js → work-comment-cmd-AWHP56M2.js} +3 -3
- package/dist/{work-open-pr-cmd-JEVD4HMQ.js → work-open-pr-cmd-IOM4AVQQ.js} +4 -4
- package/dist/{work-pr-cmd-L77K32WK.js → work-pr-cmd-HNEUIEN7.js} +3 -3
- package/package.json +1 -1
- package/skill-pack/maintained/{amend → outerlayer-amend}/SKILL.md +4 -2
- package/skill-pack/maintained/{outerlayer → outerlayer-cli}/SKILL.md +5 -3
- package/skill-pack/maintained/{emitting-evidence → outerlayer-evidence}/SKILL.md +5 -3
- package/skill-pack/maintained/{reporting-findings → outerlayer-findings}/SKILL.md +26 -30
- package/skill-pack/shipped.json +20 -4
- package/skill-pack/template/build/SKILL.md +7 -1
- package/skill-pack/template/build/references/agent-briefs.md +7 -1
- package/skill-pack/template/build/references/evidence.md +1 -1
- package/skill-pack/template/build/references/release.md +14 -12
- package/skill-pack/template/build/references/review-briefs.md +6 -0
- package/skill-pack/template/build/scripts/criterion-citations.mjs +8 -3
- package/skill-pack/template/build/scripts/record-criteria.mjs +8 -2
- package/skill-pack/template/spec/SKILL.md +2 -0
- package/skill-pack/template/writing-specs/SKILL.md +1 -1
- package/skill-pack/validators/acceptance-criteria.yaml +6 -5
- package/skill-pack/validators/code-review.yaml +6 -5
- package/dist/runner-key-7SSNMUBQ.js +0 -154
- /package/skill-pack/maintained/{outerlayer → outerlayer-cli}/references/open-pull-request.md +0 -0
- /package/skill-pack/maintained/{emitting-evidence → outerlayer-evidence}/references/agents-snippet.md +0 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { checkStarterFiles } from './chunk-
|
|
4
|
-
import { resolveCredentials, getJson, WorkCommandError } from './chunk-
|
|
3
|
+
import { checkStarterFiles, contextIsGoverned } from './chunk-NBGDBTO2.js';
|
|
4
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-S3NYLI2P.js';
|
|
5
5
|
import { readStatuslineState, STATE_FRESH_MS } from './chunk-F47JBIAW.js';
|
|
6
|
-
import { isLinkedRepository } from './chunk-
|
|
6
|
+
import { isLinkedRepository } from './chunk-3NSNIIBE.js';
|
|
7
7
|
import { sanitizeTerminal } from './chunk-WUYTWNMA.js';
|
|
8
8
|
import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-JXYVA45C.js';
|
|
9
9
|
import { C } from './chunk-YRYMNBGQ.js';
|
|
10
10
|
import { readSettings, settingsPath, isOurStatuslineSlot, statuslineWrappedOriginal, REGISTERED_EVENTS, isOurHookCommand, ourCommandBins, cliBinResolvable, ourDirectScriptBins, wrappedOriginalCommand } from './chunk-5QRP3MVS.js';
|
|
11
|
-
import { readPin, readContextManifest, readDegraded, readSourceCache } from './chunk-
|
|
11
|
+
import { readPin, readContextManifest, readDegraded, readSourceCache } from './chunk-WTE3MQML.js';
|
|
12
|
+
import { checkFormerSkillNames } from './chunk-C5Y5ZJJZ.js';
|
|
12
13
|
import { defaultFetch } from './chunk-YO4PSLVB.js';
|
|
13
14
|
import { resolveGatewayCredentials } from './chunk-PLMTLGYH.js';
|
|
14
15
|
import { readCloudConfig } from './chunk-EABW6AJQ.js';
|
|
15
|
-
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-
|
|
16
|
+
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-BWQ66M6N.js';
|
|
16
17
|
import { deadHooksState, preparePackageManagerCommand, contextExcludesPresent } from './chunk-XCCLFVXM.js';
|
|
17
18
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
18
19
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -189,11 +190,17 @@ function runDoctor(env = {}) {
|
|
|
189
190
|
...laptop ? checkStatusline(home, now, env.cwd) : [],
|
|
190
191
|
...checkInstalls(env),
|
|
191
192
|
...starter?.checks ?? [],
|
|
193
|
+
...laptop ? checkRenamedSkills(env.cwd) : [],
|
|
192
194
|
...starter !== void 0 && !starter.mcpOutdated ? checkMcpCommand(env.cwd, env.processEnv) : [],
|
|
193
195
|
...checkContextSource(home, env.cwd),
|
|
194
196
|
...checkInstalledCli(home, env.cwd ?? process.cwd())
|
|
195
197
|
];
|
|
196
198
|
}
|
|
199
|
+
function checkRenamedSkills(cwd) {
|
|
200
|
+
const dirs = findGitDirs(cwd ?? process.cwd());
|
|
201
|
+
if (dirs === void 0 || contextIsGoverned(dirs.repoRoot, dirs.gitCommonDir)) return [];
|
|
202
|
+
return checkFormerSkillNames(dirs.repoRoot);
|
|
203
|
+
}
|
|
197
204
|
function checkInstalledCli(home, cwd) {
|
|
198
205
|
const name = "Installed CLI";
|
|
199
206
|
const result = checkInstalledCliStaleness({ home, cwd });
|
|
@@ -1077,6 +1084,56 @@ async function credentialChecks(options = {}) {
|
|
|
1077
1084
|
const source = env.OUTERLAYER_API_KEY ? "OUTERLAYER_API_KEY" : "~/.outerlayer/config.json";
|
|
1078
1085
|
return factoryKeyChecks(fetchImpl, resolved.url, resolved.credential, resolved.appId, source, local);
|
|
1079
1086
|
}
|
|
1087
|
+
function governedDetail(source) {
|
|
1088
|
+
return `governed by ${sanitizeTerminal(source.repository)} (ref ${sanitizeTerminal(source.ref)}, stored commit ${sanitizeTerminal(source.sha.slice(0, 7))})`;
|
|
1089
|
+
}
|
|
1090
|
+
async function governanceChecks(options = {}) {
|
|
1091
|
+
const name = "Governance";
|
|
1092
|
+
const env = options.env ?? process.env;
|
|
1093
|
+
const cwd = options.cwd ?? process.cwd();
|
|
1094
|
+
const resolved = resolveGatewayCredentials({ home: options.home, env, cwd });
|
|
1095
|
+
if (resolved.credential === void 0 || resolved.url === void 0) {
|
|
1096
|
+
return [skippedCheck(name, "there is no credential to ask with", "Run `outerlayer login` to sign in.")];
|
|
1097
|
+
}
|
|
1098
|
+
const local = resolveRepoIdentity(cwd).gitRepo;
|
|
1099
|
+
if (local === void 0) return [skippedCheck(name, "not inside a git repository with a remote")];
|
|
1100
|
+
if (resolved.appId === void 0) return [skippedCheck(name, "no factory is chosen for this repository", CONNECT_FIX)];
|
|
1101
|
+
const fetchImpl = options.fetchImpl ?? defaultFetch;
|
|
1102
|
+
const reply = await askGateway(fetchImpl, resolved.url, `/v1/context/source?${new URLSearchParams({ repo: local.split("/").slice(-2).join("/") }).toString()}`, resolved.credential, resolved.appId);
|
|
1103
|
+
const unanswered = unansweredDetail(reply);
|
|
1104
|
+
if (unanswered !== void 0 && !("failure" in reply) && reply.status === 503) {
|
|
1105
|
+
const message = refusalMessage(reply.body);
|
|
1106
|
+
return [{ name, status: "warn", detail: message === "" ? unanswered : `governed, but ${message}`, fix: "Check that the GitHub App can read the control plane, then run `outerlayer doctor` again." }];
|
|
1107
|
+
}
|
|
1108
|
+
if (unanswered !== void 0) return [{ name, status: "warn", detail: unanswered, fix: NETWORK_FIX }];
|
|
1109
|
+
const { status, body } = reply;
|
|
1110
|
+
if (status === 401 || status === 403) {
|
|
1111
|
+
return [{ name, status: "warn", detail: `the gateway refused to say what governs ${sanitizeTerminal(local)} (HTTP ${status})`, fix: LOGIN_FIX }];
|
|
1112
|
+
}
|
|
1113
|
+
if (status < 200 || status >= 300) {
|
|
1114
|
+
return [{ name, status: "warn", detail: `the gateway did not answer which control plane governs ${sanitizeTerminal(local)} (HTTP ${status})`, fix: UPDATE_FIX }];
|
|
1115
|
+
}
|
|
1116
|
+
const data = body?.data;
|
|
1117
|
+
const source = data?.source;
|
|
1118
|
+
if (source === void 0) {
|
|
1119
|
+
return [
|
|
1120
|
+
{
|
|
1121
|
+
name,
|
|
1122
|
+
status: "warn",
|
|
1123
|
+
detail: "the gateway is too old to say which control plane governs this repository: its answer has no source",
|
|
1124
|
+
fix: UPDATE_FIX
|
|
1125
|
+
}
|
|
1126
|
+
];
|
|
1127
|
+
}
|
|
1128
|
+
if (source === null) {
|
|
1129
|
+
return [{ name, status: "pass", detail: `${sanitizeTerminal(local)} is self-governed: it supplies its own context` }];
|
|
1130
|
+
}
|
|
1131
|
+
const named = source;
|
|
1132
|
+
if (typeof named.repository !== "string" || typeof named.ref !== "string" || typeof named.sha !== "string") {
|
|
1133
|
+
return [{ name, status: "warn", detail: "the gateway named a control plane without its repository, ref and commit", fix: UPDATE_FIX }];
|
|
1134
|
+
}
|
|
1135
|
+
return [{ name, status: "pass", detail: governedDetail({ repository: named.repository, ref: named.ref, sha: named.sha }) }];
|
|
1136
|
+
}
|
|
1080
1137
|
function doctorExitCode(checks) {
|
|
1081
1138
|
return checks.some((c) => c.status === "fail") ? 1 : 0;
|
|
1082
1139
|
}
|
|
@@ -1088,14 +1145,14 @@ async function gatherDoctorChecks() {
|
|
|
1088
1145
|
const checks = runDoctor({ runnerHost: hasRunnerBlock(configPath) });
|
|
1089
1146
|
const credential = await credentialChecks();
|
|
1090
1147
|
checks.push(...credential);
|
|
1091
|
-
if (credential[0]?.status === "pass") checks.push(...await githubAppChecks());
|
|
1148
|
+
if (credential[0]?.status === "pass") checks.push(...await githubAppChecks(), ...await governanceChecks());
|
|
1092
1149
|
const runnerVm = runnerVmOf(configPath);
|
|
1093
1150
|
if (runnerVm !== void 0) {
|
|
1094
1151
|
const { realLima } = await import('./lima-7NPCNGWT.js');
|
|
1095
1152
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1096
1153
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1097
1154
|
} else if (hasRunnerBlock(configPath)) {
|
|
1098
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1155
|
+
const { runnerHostChecks } = await import('./doctor-4TAIARIG.js');
|
|
1099
1156
|
const hooks = (() => {
|
|
1100
1157
|
try {
|
|
1101
1158
|
return loadRunnerConfig(configPath).hooks;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { runEmit } from './chunk-
|
|
3
|
+
import { runEmit } from './chunk-2MNPHL23.js';
|
|
4
4
|
import { addStdioMcpEntryIfAbsent, addDocsMcpEntryIfAbsent, DOCS_MCP_SERVER_NAME } from './chunk-XCK2YAY5.js';
|
|
5
|
-
import { installStarterPack } from './chunk-
|
|
5
|
+
import { installStarterPack } from './chunk-42ZI52JW.js';
|
|
6
6
|
import { C } from './chunk-YRYMNBGQ.js';
|
|
7
|
-
import { resolveGitCommonDir, defaultGitRunner } from './chunk-
|
|
8
|
-
import { pinExists, readContextManifest } from './chunk-
|
|
9
|
-
import { loadTemplateFiles, loadMaintainedFiles, skillDir } from './chunk-
|
|
10
|
-
import { generatedHeaderSource } from './chunk-
|
|
7
|
+
import { resolveGitCommonDir, defaultGitRunner } from './chunk-YZ5F4PIS.js';
|
|
8
|
+
import { pinExists, readContextManifest } from './chunk-WTE3MQML.js';
|
|
9
|
+
import { loadTemplateFiles, loadMaintainedFiles, skillDir } from './chunk-POJMEEJJ.js';
|
|
10
|
+
import { generatedHeaderSource } from './chunk-OHVJA253.js';
|
|
11
11
|
import { execFileSync } from 'child_process';
|
|
12
12
|
import { existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
13
13
|
import { join, dirname } from 'path';
|
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
3
|
+
import { isPlaceholderCommand } from './chunk-VQYBXPI7.js';
|
|
4
|
+
import { describeCallFailure } from './chunk-MAK5LYRF.js';
|
|
5
|
+
import { WorkCommandError, getJson } from './chunk-S3NYLI2P.js';
|
|
6
6
|
import { builtinKind } from './chunk-22RMZBGW.js';
|
|
7
7
|
import { CLAUDE_CREDENTIAL_VARIABLES, claudeCredential } from './chunk-4Q7OMKAT.js';
|
|
8
8
|
import { sanitizeTerminal } from './chunk-WUYTWNMA.js';
|
|
@@ -40,6 +40,20 @@ function permissionModeProblems(config) {
|
|
|
40
40
|
function permissionModeProblem(problems) {
|
|
41
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
42
|
}
|
|
43
|
+
var FORMER_AMEND_COMMAND = /(^|["'\s])\/amend(?=["'\s]|$)/g;
|
|
44
|
+
function currentSkillCommand(command) {
|
|
45
|
+
return command.replace(FORMER_AMEND_COMMAND, "$1/outerlayer-amend");
|
|
46
|
+
}
|
|
47
|
+
function formerSkillQueues(config) {
|
|
48
|
+
return config.queues.filter((queue) => {
|
|
49
|
+
const command = config.commands[queue];
|
|
50
|
+
return command !== void 0 && currentSkillCommand(command) !== command;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function formerSkillProblem(queues) {
|
|
54
|
+
const keys = queues.map((queue) => `runner.commands.${queue}`).join(", ");
|
|
55
|
+
return `${keys} ${queues.length === 1 ? "starts" : "start"} /amend, which is now /outerlayer-amend. The runner runs /outerlayer-amend in its place; edit the config to say so`;
|
|
56
|
+
}
|
|
43
57
|
function needsClaudeCredential(hooks) {
|
|
44
58
|
return builtinKind(hooks.provision) !== "own";
|
|
45
59
|
}
|
|
@@ -99,4 +113,4 @@ async function claimPermissionProblem(config, fetchImpl = fetch) {
|
|
|
99
113
|
}
|
|
100
114
|
}
|
|
101
115
|
|
|
102
|
-
export { claimPermissionProblem, claudeCredentialCheck, missingPermissionFix, missingPermissionOf, needsClaudeCredential, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues };
|
|
116
|
+
export { claimPermissionProblem, claudeCredentialCheck, currentSkillCommand, formerSkillProblem, formerSkillQueues, missingPermissionFix, missingPermissionOf, needsClaudeCredential, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues };
|
|
@@ -3,7 +3,7 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { createDockerHost, childEnvironment, spawnRun } from './chunk-KMDLFI4P.js';
|
|
4
4
|
import { execCapture } from './chunk-QKFB4K7X.js';
|
|
5
5
|
import { GUEST_CID } from './chunk-RSNSZ2LJ.js';
|
|
6
|
-
import { WorkCommandError, postJson } from './chunk-
|
|
6
|
+
import { WorkCommandError, postJson } from './chunk-S3NYLI2P.js';
|
|
7
7
|
import { hostAllowed } from './chunk-UXYLWVTQ.js';
|
|
8
8
|
import { readDefaultBranchHead, cloneRepository, buildRepositoryImage } from './chunk-R7PF5OOU.js';
|
|
9
9
|
import { RecipeError } from './chunk-QOZKPLVJ.js';
|
|
@@ -14,15 +14,15 @@ import { parseDuKilobytes } from './chunk-7RQ73DLO.js';
|
|
|
14
14
|
import { repositoriesOf, primaryOf, RELAY_PORT, CHECKOUT_DIR, JOB_MOUNT, claudeCredential, buildEnvironment, startBuildServices, checkEnvironment, AGENT_CREDENTIAL_MISSING, checkoutPath } from './chunk-4Q7OMKAT.js';
|
|
15
15
|
import { CLAUDE_CODE_VERSION, firecrackerArch, MICROVM_ARCHES, DEFAULT_BASE_IMAGE, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, FIRECRACKER_VERSION, GUEST_ASSETS_VERSION } from './chunk-CX22S5BA.js';
|
|
16
16
|
import { setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-JXYVA45C.js';
|
|
17
|
-
import { defaultGitRunner, materializeContext } from './chunk-
|
|
18
|
-
import { readContextManifest, readSourceCache } from './chunk-
|
|
17
|
+
import { defaultGitRunner, materializeContext } from './chunk-YZ5F4PIS.js';
|
|
18
|
+
import { readContextManifest, readSourceCache } from './chunk-WTE3MQML.js';
|
|
19
19
|
import { signingFetchFor } from './chunk-YO4PSLVB.js';
|
|
20
|
-
import { orderSessions, extractFacts, sessionsToTimeline } from './chunk-
|
|
20
|
+
import { orderSessions, extractFacts, sessionsToTimeline } from './chunk-OHVJA253.js';
|
|
21
21
|
import { downconvertSession } from './chunk-J5M7BSJQ.js';
|
|
22
22
|
import { signerFor } from './chunk-V7NIVOFD.js';
|
|
23
23
|
import { rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, stagedContextDir, contextHomeDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, buildDir, RUNNER_DIR_MODE, vmAssetsDir } from './chunk-ZM2IMMYN.js';
|
|
24
|
+
import { fstatSync, readFileSync, existsSync, mkdirSync, chmodSync, truncateSync, rmSync, writeFileSync, accessSync, constants, readdirSync, statSync, rmdirSync, renameSync, lstatSync, unlinkSync, openSync, closeSync, mkdtempSync, createWriteStream, createReadStream } from 'fs';
|
|
24
25
|
import { relative, join, dirname, basename } from 'path';
|
|
25
|
-
import { readFileSync, existsSync, mkdirSync, chmodSync, truncateSync, rmSync, writeFileSync, accessSync, constants, readdirSync, statSync, rmdirSync, renameSync, lstatSync, unlinkSync, openSync, closeSync, mkdtempSync, createWriteStream, createReadStream } from 'fs';
|
|
26
26
|
import { spawnSync, spawn } from 'child_process';
|
|
27
27
|
import { availableParallelism, networkInterfaces } from 'os';
|
|
28
28
|
import { randomBytes, createHash } from 'crypto';
|
|
@@ -38,16 +38,25 @@ createRequire(import.meta.url);
|
|
|
38
38
|
function logStamp(at) {
|
|
39
39
|
return at.toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function sameDestination(stat = fstatSync) {
|
|
42
|
+
try {
|
|
43
|
+
const out = stat(1);
|
|
44
|
+
const err = stat(2);
|
|
45
|
+
return out.dev === err.dev && out.ino === err.ino;
|
|
46
|
+
} catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function createRunnerLog(now = () => /* @__PURE__ */ new Date(), io = { stdout: process.stdout, stderr: process.stderr, joined: () => sameDestination() }) {
|
|
42
51
|
const write = (stream, text) => {
|
|
43
52
|
stream.write(`${logStamp(now())} ${text}
|
|
44
53
|
`);
|
|
45
54
|
};
|
|
46
55
|
return {
|
|
47
|
-
line: (text) => write(
|
|
56
|
+
line: (text) => write(io.stdout, text),
|
|
48
57
|
error: (text) => {
|
|
49
|
-
write(
|
|
50
|
-
write(
|
|
58
|
+
write(io.stdout, text);
|
|
59
|
+
if (!io.joined()) write(io.stderr, text);
|
|
51
60
|
}
|
|
52
61
|
};
|
|
53
62
|
}
|
|
@@ -1231,6 +1240,19 @@ var NoControlPlane = class extends Error {
|
|
|
1231
1240
|
var GatewayConflict = class extends Error {
|
|
1232
1241
|
};
|
|
1233
1242
|
var unavailable = (why) => ({ kind: "refused", reason: `context_unavailable: ${why}` });
|
|
1243
|
+
var DESIGNATION_LOOKUP = { timeoutMs: 1e4, attempts: 2 };
|
|
1244
|
+
function lookupFailureReason(failure, repository) {
|
|
1245
|
+
switch (failure?.kind) {
|
|
1246
|
+
case "timeout":
|
|
1247
|
+
return `the gateway did not answer which repository governs ${repository} within ${failure.timeoutMs / 1e3} seconds, twice`;
|
|
1248
|
+
case "status":
|
|
1249
|
+
return `the gateway answered ${failure.status} when asked which repository governs ${repository}`;
|
|
1250
|
+
case "network":
|
|
1251
|
+
return `the request asking which repository governs ${repository} failed: ${failure.message}`;
|
|
1252
|
+
default:
|
|
1253
|
+
return `the gateway did not say which repository governs ${repository}`;
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1234
1256
|
function makeReadable(tree, dir, files) {
|
|
1235
1257
|
chmodSync(dir, 493);
|
|
1236
1258
|
chmodSync(tree, 493);
|
|
@@ -1268,6 +1290,7 @@ async function stageGovernedContext(input) {
|
|
|
1268
1290
|
home: contextHomeDir(configPath),
|
|
1269
1291
|
cloud: { url, apiKey, appId },
|
|
1270
1292
|
fetchImpl: signingFetchFor(input.fetchImpl, configPath, apiKey),
|
|
1293
|
+
designationLookup: DESIGNATION_LOOKUP,
|
|
1271
1294
|
git: git2,
|
|
1272
1295
|
now: input.now,
|
|
1273
1296
|
resolveControlPlaneUrl: (repository) => input.controlPlaneUrl(repository),
|
|
@@ -1303,7 +1326,7 @@ async function stageGovernedContext(input) {
|
|
|
1303
1326
|
if (result.authRejected === true) {
|
|
1304
1327
|
return finish(unavailable(`the gateway rejected the runner's API key (401/403) when asked which repository governs ${input.repository}`));
|
|
1305
1328
|
}
|
|
1306
|
-
return finish(unavailable(
|
|
1329
|
+
return finish(unavailable(lookupFailureReason(result.lookupFailure, input.repository)));
|
|
1307
1330
|
case "conflict":
|
|
1308
1331
|
return finish({ kind: "refused", reason: `context_conflict: ${result.message ?? "two control planes claim this repository"}` });
|
|
1309
1332
|
default:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { mcpTargetPath, INIT_STDIO_ENTRY, INIT_DOCS_ENTRY, DOCS_MCP_SERVER_NAME } from './chunk-XCK2YAY5.js';
|
|
4
|
-
import { POLICY_CONTENT, VALIDATOR_FILES, VALIDATORS_DIR, POLICY_PATH } from './chunk-
|
|
5
|
-
import { pinExists, readContextManifest } from './chunk-
|
|
6
|
-
import { resolvePackRoot, loadTemplateFiles, skillDir } from './chunk-
|
|
4
|
+
import { POLICY_CONTENT, VALIDATOR_FILES, VALIDATORS_DIR, POLICY_PATH } from './chunk-42ZI52JW.js';
|
|
5
|
+
import { pinExists, readContextManifest } from './chunk-WTE3MQML.js';
|
|
6
|
+
import { resolvePackRoot, loadTemplateFiles, skillDir } from './chunk-POJMEEJJ.js';
|
|
7
7
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
8
8
|
import { createHash } from 'crypto';
|
|
9
9
|
import { existsSync, readFileSync } from 'fs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { LiveUploader } from './chunk-
|
|
3
|
+
import { LiveUploader } from './chunk-NWQTTSBB.js';
|
|
4
4
|
import { CaptureDaemon } from './chunk-JXYVA45C.js';
|
|
5
5
|
import { parseWorkItemEnv } from './chunk-GQD22KKN.js';
|
|
6
|
-
import { spoolDir } from './chunk-
|
|
6
|
+
import { spoolDir } from './chunk-BWQ66M6N.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
8
8
|
import { mkdirSync, writeFileSync, rmSync } from 'fs';
|
|
9
9
|
import { join } from 'path';
|
|
@@ -14,7 +14,7 @@ import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-PLMTLGYH
|
|
|
14
14
|
import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-J5M7BSJQ.js';
|
|
15
15
|
import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-EABW6AJQ.js';
|
|
16
16
|
import { signerFor, signRunnerRequest } from './chunk-V7NIVOFD.js';
|
|
17
|
-
import { writeSyncStatus, spoolDir } from './chunk-
|
|
17
|
+
import { writeSyncStatus, spoolDir } from './chunk-BWQ66M6N.js';
|
|
18
18
|
import { removeJournalHooks } from './chunk-XCCLFVXM.js';
|
|
19
19
|
import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
20
20
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -8685,4 +8685,4 @@ function sessionsToTimeline(sessions) {
|
|
|
8685
8685
|
return out;
|
|
8686
8686
|
}
|
|
8687
8687
|
|
|
8688
|
-
export { CONTEXT_PIN_FILENAME, CONTEXT_PIN_SCHEMA_VERSION, CONTEXT_SOURCE_CONFIG_PATH, classifyTree, emitTree, extractFacts, generatedHeaderSource, normalizePath, normalizeRepoName, orderSessions, parseGoverns, parseOuterlayerConfig, parsePolicy, sessionsToTimeline, splitRawFile };
|
|
8688
|
+
export { ALL_TARGET_IDS, CONTEXT_PIN_FILENAME, CONTEXT_PIN_SCHEMA_VERSION, CONTEXT_SOURCE_CONFIG_PATH, classifyTree, emitTree, extractFacts, generatedHeaderSource, normalizePath, normalizeRepoName, orderSessions, parseGoverns, parseOuterlayerConfig, parsePolicy, sessionsToTimeline, splitRawFile };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { MIN_ENGINE_MAJOR } from './chunk-
|
|
3
|
+
import { MIN_ENGINE_MAJOR } from './chunk-MAK5LYRF.js';
|
|
4
4
|
import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-CX22S5BA.js';
|
|
5
5
|
import { spawnSync } from 'child_process';
|
|
6
6
|
import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
|
|
@@ -10,7 +10,7 @@ createRequire(import.meta.url);
|
|
|
10
10
|
var AGENT_COMMANDS = {
|
|
11
11
|
claude: {
|
|
12
12
|
implement: 'claude -p "/build" --permission-mode bypassPermissions',
|
|
13
|
-
amend: 'claude -p "/amend" --permission-mode bypassPermissions'
|
|
13
|
+
amend: 'claude -p "/outerlayer-amend" --permission-mode bypassPermissions'
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
function isAgentName(name) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { splitRawFile } from './chunk-
|
|
3
|
+
import { splitRawFile } from './chunk-OHVJA253.js';
|
|
4
4
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
5
5
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from 'fs';
|
|
6
6
|
import { join, dirname } from 'path';
|
|
@@ -8,7 +8,7 @@ import { fileURLToPath } from 'url';
|
|
|
8
8
|
|
|
9
9
|
createRequire(import.meta.url);
|
|
10
10
|
var TEMPLATE_SKILLS = ["spec", "writing-specs", "writing-tests", "build"];
|
|
11
|
-
var MAINTAINED_SKILLS = ["
|
|
11
|
+
var MAINTAINED_SKILLS = ["outerlayer-evidence", "outerlayer-amend", "outerlayer-findings", "outerlayer-cli"];
|
|
12
12
|
var TEMPLATE_CLASS_LINE = "<!-- yours to edit. Copied once from the default template by outerlayer init; never overwritten. -->";
|
|
13
13
|
function maintainedClassLine(version) {
|
|
14
14
|
return `<!-- maintained by OuterLayer ${version}. Edits are overwritten on the next outerlayer context emit. -->`;
|
|
@@ -77,7 +77,24 @@ function writeMaintainedFiles(repoRoot, files) {
|
|
|
77
77
|
return { created, rewritten };
|
|
78
78
|
}
|
|
79
79
|
function maintainedFilesForExistingSkills(repoRoot, files) {
|
|
80
|
-
return files.filter((file) => existsSync(join(repoRoot, skillDir(file.skill))));
|
|
80
|
+
return files.filter((file) => existsSync(join(repoRoot, skillDir(file.skill))) || formerNameExists(repoRoot, file.skill));
|
|
81
|
+
}
|
|
82
|
+
var FORMER_MAINTAINED_NAMES = {
|
|
83
|
+
amend: "outerlayer-amend",
|
|
84
|
+
"emitting-evidence": "outerlayer-evidence",
|
|
85
|
+
"reporting-findings": "outerlayer-findings",
|
|
86
|
+
outerlayer: "outerlayer-cli"
|
|
87
|
+
};
|
|
88
|
+
var MAINTAINED_LINE = /^<!-- maintained by OuterLayer \S+?\. /m;
|
|
89
|
+
function isMaintainedCopy(repoRoot, skill) {
|
|
90
|
+
try {
|
|
91
|
+
return MAINTAINED_LINE.test(readFileSync(join(repoRoot, skillDir(skill), "SKILL.md"), "utf8"));
|
|
92
|
+
} catch {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function formerNameExists(repoRoot, skill) {
|
|
97
|
+
return Object.entries(FORMER_MAINTAINED_NAMES).some(([former, current]) => current === skill && isMaintainedCopy(repoRoot, former));
|
|
81
98
|
}
|
|
82
99
|
|
|
83
|
-
export { MAINTAINED_SKILLS, TEMPLATE_SKILLS, loadMaintainedFiles, loadTemplateFiles, maintainedFilesForExistingSkills, resolvePackRoot, skillDir, writeMaintainedFiles };
|
|
100
|
+
export { FORMER_MAINTAINED_NAMES, MAINTAINED_SKILLS, TEMPLATE_SKILLS, isMaintainedCopy, loadMaintainedFiles, loadTemplateFiles, maintainedFilesForExistingSkills, resolvePackRoot, skillDir, writeMaintainedFiles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { autoConnect } from './chunk-
|
|
3
|
+
import { autoConnect } from './chunk-6Y5RUTHO.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
5
|
-
import { workPageUrl } from './chunk-
|
|
5
|
+
import { workPageUrl } from './chunk-3NSNIIBE.js';
|
|
6
6
|
import { sanitizeTerminal } from './chunk-WUYTWNMA.js';
|
|
7
7
|
import { resolveRepoIdentity } from './chunk-JXYVA45C.js';
|
|
8
8
|
import { C } from './chunk-YRYMNBGQ.js';
|
|
@@ -360,7 +360,7 @@ async function runWorkLinkSession(opts) {
|
|
|
360
360
|
return await linkSession(opts);
|
|
361
361
|
} catch (err) {
|
|
362
362
|
if (opts.logFailures) {
|
|
363
|
-
const { logHookError } = await import('./hook-fast-
|
|
363
|
+
const { logHookError } = await import('./hook-fast-R4FVSZ2H.js');
|
|
364
364
|
const reason = err instanceof Error ? err.message : String(err);
|
|
365
365
|
logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
|
|
366
366
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
5
|
-
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-
|
|
3
|
+
import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-ONKJUM6R.js';
|
|
4
|
+
import { MIN_ENGINE_MAJOR } from './chunk-MAK5LYRF.js';
|
|
5
|
+
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-OZGHL5Y5.js';
|
|
6
6
|
import { runnerCredentialProblem } from './chunk-22RMZBGW.js';
|
|
7
7
|
import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-ZM2IMMYN.js';
|
|
8
8
|
import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
@@ -112,7 +112,7 @@ function prepareRunnerInit(configPath, opts = {}) {
|
|
|
112
112
|
function writeRunnerInit(prepared, runnerKey) {
|
|
113
113
|
const { configPath, config, carried, credential, agent, machine, hooks } = prepared;
|
|
114
114
|
if (prepared.needsKey && runnerKey === void 0) {
|
|
115
|
-
throw new RunnerInitError(`${configPath}: apiKey is missing, and no runner key was
|
|
115
|
+
throw new RunnerInitError(`${configPath}: apiKey is missing, and no runner key was pasted.`);
|
|
116
116
|
}
|
|
117
117
|
if (runnerKey !== void 0) Object.assign(config, { url: runnerKey.url, apiKey: runnerKey.apiKey, appId: runnerKey.appId });
|
|
118
118
|
mkdirSync(runnerDir(configPath), { recursive: true, mode: RUNNER_DIR_MODE });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { CONTEXT_PIN_SCHEMA_VERSION, CONTEXT_PIN_FILENAME } from './chunk-
|
|
3
|
+
import { CONTEXT_PIN_SCHEMA_VERSION, CONTEXT_PIN_FILENAME } from './chunk-OHVJA253.js';
|
|
4
4
|
import { readFileSync, existsSync, writeFileSync, mkdirSync, utimesSync, statSync, unlinkSync } from 'fs';
|
|
5
5
|
import { join, dirname } from 'path';
|
|
6
6
|
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
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-
|
|
3
|
+
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-G5NPRL2K.js';
|
|
4
|
+
import { writeJobFile, readJobFile, readJobFileChecked } from './chunk-RMWLBUCJ.js';
|
|
4
5
|
import { writePendingUpdate } from './chunk-O765JR4W.js';
|
|
5
6
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-UGP76IZ5.js';
|
|
6
7
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
7
8
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-YETTWTAY.js';
|
|
8
|
-
import { writeJobFile, readJobFile, readJobFileChecked } from './chunk-RMWLBUCJ.js';
|
|
9
9
|
import { compareVersions, satisfiesRange } from './chunk-I2UOAV7X.js';
|
|
10
10
|
import { RUNNER_PROTOCOL } from './chunk-ADJRGVZC.js';
|
|
11
|
-
import { placeholderQueues, placeholderProblem } from './chunk-
|
|
11
|
+
import { currentSkillCommand, formerSkillProblem, placeholderQueues, placeholderProblem } from './chunk-LWSJQJC6.js';
|
|
12
12
|
import { freeBytes, formatBytes } from './chunk-YYYRBYWG.js';
|
|
13
13
|
import { writeMarker, readMarker, currentVersion, removeMarker, entryIn, versionDir, startedThroughCurrent, switchCurrent, cleanVersions, isInLayout, stagingDir } from './chunk-TI7B7UEO.js';
|
|
14
14
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
15
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, provisionContainer, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandLine, BuildTokens, classifyRefusal, refusalCode, measureDisk, createRunnerLog, setUpRunnerCgroup, parseCpuList, ensureTunnel, keepGhConfigCurrent, createContainerRuntime, formatClock } from './chunk-
|
|
15
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, provisionContainer, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandLine, BuildTokens, classifyRefusal, refusalCode, measureDisk, createRunnerLog, setUpRunnerCgroup, parseCpuList, ensureTunnel, keepGhConfigCurrent, createContainerRuntime, formatClock } from './chunk-MAK5LYRF.js';
|
|
16
16
|
import { spawnRun } from './chunk-KMDLFI4P.js';
|
|
17
17
|
import { checkFit } from './chunk-RLYZLUQ7.js';
|
|
18
|
-
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-
|
|
18
|
+
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-S3NYLI2P.js';
|
|
19
19
|
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-22RMZBGW.js';
|
|
20
20
|
import { startTimeOf, claimPidFile, readPidFile, isSameProcess, releasePidFile } from './chunk-N5FOE5PS.js';
|
|
21
21
|
import { builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, BUILD_LABEL, RUNNER_LABEL } from './chunk-4NPZVMJU.js';
|
|
@@ -1315,7 +1315,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
1315
1315
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected branch_claimed_elsewhere".split(" ")
|
|
1316
1316
|
);
|
|
1317
1317
|
async function tryClaimAndStart(state, item, queue) {
|
|
1318
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
1318
|
+
const { postJson: postJson2 } = await import('./work-cmd-Z2WXLZPH.js');
|
|
1319
1319
|
const log = logOf(state);
|
|
1320
1320
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
1321
1321
|
const claim = await retrySend(
|
|
@@ -1776,7 +1776,9 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
1776
1776
|
log.line(`${tag} workdir is not a git checkout, so ${branch} was not checked out`);
|
|
1777
1777
|
}
|
|
1778
1778
|
}
|
|
1779
|
-
const
|
|
1779
|
+
const configured = state.config.commands[queue];
|
|
1780
|
+
const cmdline = configured === void 0 ? void 0 : currentSkillCommand(configured);
|
|
1781
|
+
if (cmdline !== configured) log.line(`${tag} ${formerSkillProblem([queue])}`);
|
|
1780
1782
|
if (!cmdline) {
|
|
1781
1783
|
log.error(`${tag} has no runner.commands.${queue} in the config file \xB7 ending job as failed`);
|
|
1782
1784
|
await endJob(state, active, "failed", { stage: "command" });
|
|
@@ -2072,7 +2074,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
2072
2074
|
const outcome = await onStartUnderMarker({
|
|
2073
2075
|
configPath,
|
|
2074
2076
|
own: ownVersionOf(deps),
|
|
2075
|
-
check: update.check ? () => update.check(configPath) : async () => (await import('./check-
|
|
2077
|
+
check: update.check ? () => update.check(configPath) : async () => (await import('./check-5XE7XMC4.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl }),
|
|
2076
2078
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
2077
2079
|
log
|
|
2078
2080
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { autoConnect } from './chunk-
|
|
3
|
+
import { autoConnect } from './chunk-6Y5RUTHO.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
5
5
|
import { resolveRepoIdentity } from './chunk-JXYVA45C.js';
|
|
6
6
|
import { C } from './chunk-YRYMNBGQ.js';
|