@outerlayer/cli 0.33.0-next.20261022195547 → 0.33.0-next.20261023003700
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/README.md +5 -0
- package/dist/{agent-setup-RJOVRRHK.js → agent-setup-55ZDEXCS.js} +6 -6
- package/dist/{bridge-BCG2EB7F.js → bridge-NBCXFTT4.js} +2 -2
- package/dist/{build-GKCVFHF4.js → build-SEAQVLD5.js} +5 -5
- package/dist/build-disk-JHTMPRAA.js +16 -0
- package/dist/build-info.json +1 -1
- package/dist/{builder-DPNHJXG3.js → builder-Y4P7QARW.js} +5 -6
- package/dist/{check-64UX323V.js → check-MRYFTLOO.js} +36 -40
- package/dist/{chunk-D3HRAPNF.js → chunk-2EGCI2VW.js} +3424 -2700
- package/dist/{chunk-3MXPS7ED.js → chunk-2N67C6IV.js} +5 -4
- package/dist/{chunk-ZQOSIMKU.js → chunk-2WMZPJVE.js} +6 -3
- package/dist/{chunk-ZXBQ6E72.js → chunk-3RIFVLPO.js} +15 -10
- package/dist/{chunk-UOFBHIOZ.js → chunk-57L2YAJA.js} +1 -1
- package/dist/{chunk-6NWS455T.js → chunk-5THSC6BD.js} +1 -1
- package/dist/{chunk-QL3LPZ67.js → chunk-6LBSAW6I.js} +1 -1
- package/dist/{chunk-WPGBDY73.js → chunk-6RKD7YZ6.js} +1 -1
- package/dist/{chunk-77B36F5K.js → chunk-6Z4SZHV2.js} +4 -3
- package/dist/chunk-7HHNGZS5.js +146 -0
- package/dist/{chunk-DETKDTNL.js → chunk-AU346ENF.js} +3 -2
- package/dist/chunk-B2JURP6A.js +41 -0
- package/dist/{chunk-BCCI32ME.js → chunk-BALIE3BA.js} +36 -7
- package/dist/{chunk-BY36DVJV.js → chunk-BKADJZ7F.js} +3 -2
- package/dist/{chunk-CUBIZBMF.js → chunk-DISTLL2Q.js} +3 -3
- package/dist/{chunk-GN2R5Z7G.js → chunk-DXJTBU7A.js} +3 -3
- package/dist/{chunk-WCELNMXT.js → chunk-EUVE2EAE.js} +2 -2
- package/dist/{chunk-DDS2ISML.js → chunk-F5UL23I2.js} +1 -1
- package/dist/{chunk-43PV5KDB.js → chunk-FR7HWWCF.js} +37 -6
- package/dist/{chunk-JEKENLLA.js → chunk-GH246BGV.js} +1 -1
- package/dist/{chunk-ZRRUWNJS.js → chunk-HE4FBF4T.js} +4 -4
- package/dist/{chunk-W5DOK7BL.js → chunk-HVRQQOMH.js} +3 -3
- package/dist/{chunk-6IKSUAIA.js → chunk-HXA5GIHK.js} +61 -3
- package/dist/{chunk-2QT4JUW3.js → chunk-IP7BIBXJ.js} +1 -35
- package/dist/{chunk-LWTBE5J6.js → chunk-L26V6ILJ.js} +1 -1
- package/dist/{chunk-SK4TWCN3.js → chunk-MZBQTVFG.js} +1 -1
- package/dist/{chunk-YKYCE4HY.js → chunk-MZYOUIY5.js} +1 -1
- package/dist/{chunk-OWDSO3PE.js → chunk-NBZ7XBT6.js} +1 -1
- package/dist/{chunk-TGHBOXKJ.js → chunk-NE63JADS.js} +2 -2
- package/dist/{chunk-AGZNCIIJ.js → chunk-PA6CK6WQ.js} +1 -1
- package/dist/{chunk-L6JFFP3Q.js → chunk-PWH3BEZF.js} +55 -283
- package/dist/{chunk-QDMMW5PC.js → chunk-Q2CMEQV7.js} +2 -2
- package/dist/{chunk-DJWKUQLO.js → chunk-QPWFVE3X.js} +1 -1
- package/dist/{chunk-5BNWAIHN.js → chunk-RQJMN5TJ.js} +47 -7
- package/dist/{chunk-H7A3IQH5.js → chunk-SDU2IE22.js} +72 -28
- package/dist/{chunk-AA6LYZC4.js → chunk-SOI6K5DY.js} +1 -1
- package/dist/{chunk-35IY5HQY.js → chunk-SVDOA4W2.js} +1 -1
- package/dist/{chunk-RBJG5MM4.js → chunk-T5REPMNL.js} +5 -5
- package/dist/{chunk-6KLPC4U7.js → chunk-ULBNTSAD.js} +3 -2
- package/dist/{chunk-CMKY36NV.js → chunk-VT4TTJPG.js} +6 -5
- package/dist/chunk-W2AEL4BJ.js +179 -0
- package/dist/{chunk-6C2YWM6N.js → chunk-XHHTMFCX.js} +1 -1
- package/dist/{chunk-FAZDYI2D.js → chunk-XL2XWWU7.js} +3 -2
- package/dist/{chunk-KLXWS5Z7.js → chunk-YXHKCHWG.js} +4 -4
- package/dist/{chunk-GWDS42JC.js → chunk-Z5IW4DHH.js} +1 -1
- package/dist/{claude-launcher-66GKNIRZ.js → claude-launcher-NTYHJUJM.js} +1 -1
- package/dist/{cli-WICFAKFW.js → cli-K6XGL4EZ.js} +126 -102
- package/dist/{command-VGR24IPI.js → command-7FAIIQGF.js} +25 -26
- package/dist/{config-DUY2PT7K.js → config-QXMUWJAQ.js} +10 -4
- package/dist/{connect-cmd-ADRPR6ES.js → connect-cmd-P5GASVAF.js} +5 -5
- package/dist/{container-start-QX53HKXW.js → container-start-CVP3NTDG.js} +23 -26
- package/dist/context-show-cmd-3EPJ7CJC.js +115 -0
- package/dist/{control-plane-launch-SMHL6MWW.js → control-plane-launch-A3YCHQNQ.js} +5 -5
- package/dist/{docker-GGRJHHBP.js → docker-ANW76BNW.js} +5 -6
- package/dist/{doctor-N3CDJ66I.js → doctor-GJAHI3KU.js} +32 -39
- package/dist/{emit-artifact-cmd-73OWUBH6.js → emit-artifact-cmd-FDPJKGOO.js} +11 -10
- package/dist/{emit-criteria-cmd-D7OR356Y.js → emit-criteria-cmd-3SVGCMJN.js} +8 -7
- package/dist/{emit-demo-cmd-4AV74GMZ.js → emit-demo-cmd-6DF2QIAS.js} +12 -11
- package/dist/{emit-finding-cmd-GEPRJ6KO.js → emit-finding-cmd-TLJWBGQE.js} +8 -7
- package/dist/{emit-result-cmd-N52IABK6.js → emit-result-cmd-CJNVDV5V.js} +10 -9
- package/dist/{emit-step-cmd-CC6MUJ2S.js → emit-step-cmd-347CZO7Y.js} +8 -7
- package/dist/{exec-client-KLI262IX.js → exec-client-7PT4W7JR.js} +3 -3
- package/dist/{findings-cmd-7I72XX2H.js → findings-cmd-LHTYEHYB.js} +8 -7
- package/dist/{fleet-readiness-EZAGL32M.js → fleet-readiness-KGR5AC2J.js} +5 -5
- package/dist/{governing-source-M7ZRJCGY.js → governing-source-JZQZUTMA.js} +10 -9
- package/dist/{guest-init-ZJIE6MU3.js → guest-init-J3F3AEEY.js} +4 -4
- package/dist/{hook-fast-WNKICZ6E.js → hook-fast-6WDMNZG5.js} +1 -1
- package/dist/{pending-I5TY6SQH.js → host-key-UERIQRE6.js} +3 -3
- package/dist/{image-tag-MORUQ4LF.js → image-tag-ADSLWXBA.js} +3 -3
- package/dist/index.js +4 -4
- package/dist/{init-VCWDBOT4.js → init-XDOKWBL2.js} +22 -25
- package/dist/{init-XG4NRZX4.js → init-ZQ5B3TJZ.js} +22 -25
- package/dist/{init-cmd-2CAMWMRP.js → init-cmd-YMGW2WXJ.js} +11 -10
- package/dist/{init-update-NCM4GA3S.js → init-update-X7YLZL6H.js} +8 -8
- package/dist/install-QPA7DQHO.js +19 -0
- package/dist/{install-cmd-HFGINYEE.js → install-cmd-FV7IZ7XF.js} +5 -5
- package/dist/{logs-QSKJ4G6M.js → logs-HI46FO6Z.js} +2 -2
- package/dist/{loop-PXALY3VY.js → loop-UJL2UCUM.js} +36 -40
- package/dist/{machine-AZRL432D.js → machine-2YPAFFCH.js} +22 -21
- package/dist/{mcp-serve-cmd-DQSO6MOL.js → mcp-serve-cmd-7ABBV2QE.js} +4 -4
- package/dist/{paths-KHDFSBEI.js → paths-7HVTDE6J.js} +2 -2
- package/dist/{host-key-REZADWAM.js → pending-5HZACM2V.js} +3 -3
- package/dist/{pidfile-BSY63HIC.js → pidfile-5UDLYPMC.js} +3 -3
- package/dist/{record-7CNTGRLD.js → record-PPZEXAVA.js} +3 -3
- package/dist/runner-env-HOUXKWIJ.js +20 -0
- package/dist/{runner-identity-WGH73DTV.js → runner-identity-KPUVTRLS.js} +5 -6
- package/dist/{runner-key-6BIULOR4.js → runner-key-FUJD66R6.js} +22 -25
- package/dist/{session-sender-MSHKJSBG.js → session-sender-7B3ZDWMC.js} +11 -10
- package/dist/{spec-cmd-AWIMO32E.js → spec-cmd-Q26NE22H.js} +9 -8
- package/dist/{status-BILERIXB.js → status-2KNTILGQ.js} +29 -28
- package/dist/{sync-cmd-BSUZ65CU.js → sync-cmd-SSUYTMLJ.js} +10 -9
- package/dist/{watch-UF6XCGSI.js → watch-L5NCO46E.js} +10 -9
- package/dist/{work-claim-cmd-4FXVAZWF.js → work-claim-cmd-NJNOQFQE.js} +16 -13
- package/dist/{work-cmd-NCP4637R.js → work-cmd-W7WEHMQJ.js} +8 -7
- package/dist/{work-comment-cmd-YNQYVHYS.js → work-comment-cmd-SSUOGVDD.js} +8 -7
- package/dist/{work-logs-cmd-HHWVYQBG.js → work-logs-cmd-WPMWMDX6.js} +8 -7
- package/dist/{work-open-pr-cmd-ALVD7KLY.js → work-open-pr-cmd-NO5YLOXD.js} +9 -8
- package/dist/{work-pr-cmd-KBNFVRB4.js → work-pr-cmd-37B5KECR.js} +8 -7
- package/dist/{work-stop-cmd-DBWNHZJO.js → work-stop-cmd-3BJLXUJ3.js} +8 -7
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-build/SKILL.md +4 -2
- package/dist/build-disk-6QAXMA2J.js +0 -18
- package/dist/chunk-DNKUSXQU.js +0 -241
- package/dist/chunk-I5LGKZ4M.js +0 -107
- package/dist/chunk-P5FC7VUO.js +0 -111
- package/dist/chunk-UXYLWVTQ.js +0 -43
- package/dist/chunk-WBZJWVT2.js +0 -146
- package/dist/chunk-YJLHUKYS.js +0 -38
- package/dist/chunk-YYYRBYWG.js +0 -32
- package/dist/install-NLVYISAV.js +0 -14
- package/dist/runner-env-26NLQI35.js +0 -15
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { uploadSpooledSteps } from './chunk-
|
|
3
|
+
import { uploadSpooledSteps } from './chunk-AU346ENF.js';
|
|
4
4
|
import { LaunchFilter } from './chunk-ESVW4MJY.js';
|
|
5
5
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
6
6
|
import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-EWVYQLD3.js';
|
|
7
7
|
import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-5DNCFOXA.js';
|
|
8
8
|
import { C } from './chunk-ANPNT6PM.js';
|
|
9
|
-
import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
9
|
+
import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
10
10
|
import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-PJDQPF5N.js';
|
|
11
|
-
import { signerFor, signRunnerRequest } from './chunk-
|
|
12
|
-
import { writeSyncStatus, spoolDir } from './chunk-
|
|
11
|
+
import { signerFor, signRunnerRequest } from './chunk-SOI6K5DY.js';
|
|
12
|
+
import { writeSyncStatus, spoolDir } from './chunk-QPWFVE3X.js';
|
|
13
13
|
import { readLatestProvenanceForSession, readContextProvenance } from './chunk-ZJSNLVCE.js';
|
|
14
14
|
import { hookExecSpoolPath } from './chunk-2O5KA67H.js';
|
|
15
15
|
import { applyReportedCost } from './chunk-BKO6JEZI.js';
|
|
@@ -686,6 +686,7 @@ var LiveUploader = class {
|
|
|
686
686
|
enrichSessionRepo(session);
|
|
687
687
|
destination ??= resolveGatewayCredentials({ home: this.home, env: {}, cwd: session.env.cwd ?? "/" });
|
|
688
688
|
if (!destination.ok) return false;
|
|
689
|
+
if (destination.kind === "login" && readRepoConnection(session.env.cwd ?? "/") === void 0) return false;
|
|
689
690
|
if (this.build === void 0 && !new RepoFilter(cloudConfig.repos).allows(session.env.gitRepo)) return false;
|
|
690
691
|
const launchSpool = readLaunchSpoolState(this.home);
|
|
691
692
|
if (!launchStatusIsDecisive(launchSpool)) return false;
|
|
@@ -4,7 +4,7 @@ import { sanitizeTerminal } from './chunk-EWVYQLD3.js';
|
|
|
4
4
|
import { remoteLookupFailed } from './chunk-5DNCFOXA.js';
|
|
5
5
|
import { isAgentsMdLayout } from './chunk-HJYBWJAS.js';
|
|
6
6
|
import { DEFAULT_DASHBOARD } from './chunk-NSPRS7WK.js';
|
|
7
|
-
import { cliFetch, resolveGatewayCredentials } from './chunk-
|
|
7
|
+
import { cliFetch, resolveGatewayCredentials } from './chunk-6RKD7YZ6.js';
|
|
8
8
|
import { readCloudConfig } from './chunk-PJDQPF5N.js';
|
|
9
9
|
import { findGitDirs, writeRepoConnection, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
10
10
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
@@ -150,6 +150,7 @@ var REASON_TEXT = {
|
|
|
150
150
|
flag: "you passed --factory",
|
|
151
151
|
saved: "already connected",
|
|
152
152
|
linked: "the repository is linked to it",
|
|
153
|
+
configured: "your config file names it",
|
|
153
154
|
owner: "it owns this repository",
|
|
154
155
|
only: "the only factory you can use",
|
|
155
156
|
prompt: "you chose it"
|
|
@@ -237,11 +238,13 @@ async function fetchFactories(fetchImpl, url, token, repository) {
|
|
|
237
238
|
}
|
|
238
239
|
return { ok: true, factories };
|
|
239
240
|
}
|
|
240
|
-
function selectFactory(factories, saved, repository) {
|
|
241
|
+
function selectFactory(factories, saved, repository, configured) {
|
|
241
242
|
const remembered = saved && factories.find((f) => f.id === saved.appId);
|
|
242
243
|
if (remembered) return { factory: remembered, reason: "saved" };
|
|
243
244
|
const linked = factories.filter((f) => f.linked === true);
|
|
244
245
|
if (linked.length === 1) return { factory: linked[0], reason: "linked" };
|
|
246
|
+
const named = (linked.length > 0 ? linked : factories).find((f) => f.id === configured);
|
|
247
|
+
if (named) return { factory: named, reason: "configured" };
|
|
245
248
|
const owners = factories.filter((f) => f.owner);
|
|
246
249
|
if (owners.length === 1) return { factory: owners[0], reason: "owner" };
|
|
247
250
|
if (factories.length === 1) return { factory: factories[0], reason: "only" };
|
|
@@ -271,7 +274,7 @@ async function choose(flags, deps, factories, saved, repository) {
|
|
|
271
274
|
${listText(factories, repository)}`;
|
|
272
275
|
return result(1, "failed", `--factory ${flags.factory} names no factory you can use`, message);
|
|
273
276
|
}
|
|
274
|
-
const decided = selectFactory(factories, saved, repository);
|
|
277
|
+
const decided = selectFactory(factories, saved, repository, readCloudConfig(deps.home).appId);
|
|
275
278
|
if (decided.factory) return { factory: decided.factory, reason: decided.reason };
|
|
276
279
|
const linked = factories.filter((f) => f.linked === true);
|
|
277
280
|
if (!deps.isTerminal) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { checkStarterFiles, contextIsGoverned } from './chunk-BJQ25STI.js';
|
|
4
|
-
import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences } from './chunk-
|
|
5
|
-
import { resolveCredentials, getJson, WorkCommandError } from './chunk-
|
|
6
|
-
import { isLinkedRepository } from './chunk-
|
|
4
|
+
import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-HXA5GIHK.js';
|
|
5
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-VT4TTJPG.js';
|
|
6
|
+
import { isLinkedRepository } from './chunk-2WMZPJVE.js';
|
|
7
7
|
import { sanitizeTerminal } from './chunk-EWVYQLD3.js';
|
|
8
8
|
import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-5DNCFOXA.js';
|
|
9
9
|
import { C } from './chunk-ANPNT6PM.js';
|
|
10
10
|
import { checkFormerSkillNames } from './chunk-UIUGTW5C.js';
|
|
11
|
-
import { resolveGatewayCredentials, defaultFetch } from './chunk-
|
|
12
|
-
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-
|
|
11
|
+
import { resolveGatewayCredentials, defaultFetch } from './chunk-6RKD7YZ6.js';
|
|
12
|
+
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-QPWFVE3X.js';
|
|
13
13
|
import { readStatuslineState, STATE_FRESH_MS } from './chunk-I7RZHMXW.js';
|
|
14
14
|
import { hookCommandEscapesControlPlane, CONTROL_PLANE_DIR_VARIABLE } from './chunk-HCVLP7XA.js';
|
|
15
15
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
@@ -194,6 +194,7 @@ function runDoctor(env = {}) {
|
|
|
194
194
|
...starter?.checks ?? [],
|
|
195
195
|
...laptop ? checkRenamedSkills(env.cwd) : [],
|
|
196
196
|
...checkBuildSkillState(env.cwd, home),
|
|
197
|
+
...checkIgnoredSkills(env.cwd),
|
|
197
198
|
...starter !== void 0 && !starter.mcpOutdated ? checkMcpCommand(env.cwd, env.processEnv) : [],
|
|
198
199
|
...checkContextSource(env.cwd),
|
|
199
200
|
...checkGovernsList(env.cwd),
|
|
@@ -206,6 +207,10 @@ function checkRenamedSkills(cwd) {
|
|
|
206
207
|
if (dirs === void 0 || contextIsGoverned(dirs.gitCommonDir)) return [];
|
|
207
208
|
return checkFormerSkillNames(dirs.repoRoot);
|
|
208
209
|
}
|
|
210
|
+
function checkIgnoredSkills(cwd) {
|
|
211
|
+
const dirs = findGitDirs(cwd ?? process.cwd());
|
|
212
|
+
return dirs === void 0 ? [] : checkIgnoredSkillFolders(dirs.repoRoot);
|
|
213
|
+
}
|
|
209
214
|
function checkBuildSkillState(cwd, home) {
|
|
210
215
|
const dirs = findGitDirs(cwd ?? process.cwd());
|
|
211
216
|
if (dirs === void 0 || contextIsGoverned(dirs.gitCommonDir)) return [];
|
|
@@ -1190,8 +1195,8 @@ function doctorExitCode(checks) {
|
|
|
1190
1195
|
|
|
1191
1196
|
// src/doctor-report.ts
|
|
1192
1197
|
async function gatherDoctorChecks() {
|
|
1193
|
-
const { DEFAULT_BUILD_DISK } = await import('./build-disk-
|
|
1194
|
-
const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-
|
|
1198
|
+
const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-JHTMPRAA.js');
|
|
1199
|
+
const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-QXMUWJAQ.js');
|
|
1195
1200
|
const configPath = defaultRunnerConfigPath();
|
|
1196
1201
|
const runnerHost = hasRunnerBlock(configPath);
|
|
1197
1202
|
const hooks = (() => {
|
|
@@ -1212,7 +1217,7 @@ async function gatherDoctorChecks() {
|
|
|
1212
1217
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1213
1218
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1214
1219
|
} else if (hasRunnerBlock(configPath)) {
|
|
1215
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1220
|
+
const { runnerHostChecks } = await import('./doctor-GJAHI3KU.js');
|
|
1216
1221
|
const gateway = (() => {
|
|
1217
1222
|
try {
|
|
1218
1223
|
const { url, apiKey, appId } = loadRunnerConfig(configPath);
|
|
@@ -1231,7 +1236,7 @@ async function gatherDoctorChecks() {
|
|
|
1231
1236
|
const runner = (() => {
|
|
1232
1237
|
try {
|
|
1233
1238
|
const { concurrency, build, housekeeping, managed } = loadRunnerConfig(configPath);
|
|
1234
|
-
return { concurrency, buildMemory: build?.memory ?? "8g", buildDisk: build?.disk ?? DEFAULT_BUILD_DISK, minFreeDisk: housekeeping?.minFreeDisk, allowHosts: build?.allowHosts, ...build?.imageBuild === void 0 ? {} : { imageBuild: build.imageBuild }, ...managed === true ? { managed } : {} };
|
|
1239
|
+
return { concurrency, buildMemory: build?.memory ?? "8g", buildDisk: build?.disk ?? DEFAULT_BUILD_DISK, cacheDisk: build?.cacheDisk ?? DEFAULT_CACHE_DISK, minFreeDisk: housekeeping?.minFreeDisk, allowHosts: build?.allowHosts, ...build?.imageBuild === void 0 ? {} : { imageBuild: build.imageBuild }, ...managed === true ? { managed } : {} };
|
|
1235
1240
|
} catch {
|
|
1236
1241
|
return void 0;
|
|
1237
1242
|
}
|
|
@@ -1240,7 +1245,7 @@ async function gatherDoctorChecks() {
|
|
|
1240
1245
|
const { existsSync: existsSync3 } = await import('fs');
|
|
1241
1246
|
if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
|
|
1242
1247
|
const { inspectService, realInspectProbes } = await import('./inspect-DNLXTXLA.js');
|
|
1243
|
-
const { DEFAULT_UNIT_NAME } = await import('./install-
|
|
1248
|
+
const { DEFAULT_UNIT_NAME } = await import('./install-QPA7DQHO.js');
|
|
1244
1249
|
const { dirname: dirname2 } = await import('path');
|
|
1245
1250
|
return inspectService(DEFAULT_UNIT_NAME, dirname2(configPath), realInspectProbes());
|
|
1246
1251
|
})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-PA6CK6WQ.js';
|
|
4
4
|
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RELAY_PORT, BUILD_HOME } from './chunk-
|
|
3
|
+
import { RELAY_PORT, BUILD_HOME } from './chunk-BALIE3BA.js';
|
|
4
4
|
import { createServer, connect } from 'net';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readCloudConfigStrict, readCloudConfig, cloudConfigPath } from './chunk-PJDQPF5N.js';
|
|
4
|
-
import { signRunnerRequest, signerFor } from './chunk-
|
|
4
|
+
import { signRunnerRequest, signerFor } from './chunk-SOI6K5DY.js';
|
|
5
5
|
import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
6
6
|
import { PLAIN_VERSION, recordCliVersion, removeRecordedVersion } from './chunk-5BHIBJDA.js';
|
|
7
7
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { staleBuildRefusal, staleBuildWarning, detectCi } from './chunk-
|
|
3
|
+
import { staleBuildRefusal, staleBuildWarning, detectCi } from './chunk-2N67C6IV.js';
|
|
4
4
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
5
|
-
import { detectActiveSession
|
|
5
|
+
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
6
|
+
import { autoConnect } from './chunk-B2JURP6A.js';
|
|
6
7
|
import { readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, sanitizeTerminal, appendArtifactTombstone } from './chunk-EWVYQLD3.js';
|
|
7
8
|
import { resolveRepoIdentity } from './chunk-5DNCFOXA.js';
|
|
8
9
|
import { C } from './chunk-ANPNT6PM.js';
|
|
9
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
10
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
10
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
12
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
12
13
|
import { ARTIFACT_MAX_CAPTION_LENGTH, ArtifactCriterionIdSchema, ARTIFACT_MAX_BYTES, ARTIFACT_MAX_FILENAME_LENGTH, mediaTypeForArtifactPath, inferArtifactKind, ARTIFACT_MAX_REPLACES_TARGETS, parseTestSelector, parseJunit, bindTests } from './chunk-E6CO3MJE.js';
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { placeholderQueues, placeholderProblem } from './chunk-2EGCI2VW.js';
|
|
4
|
+
import { checkFit } from './chunk-HE4FBF4T.js';
|
|
5
|
+
import { builtinKind, imageBuildOf } from './chunk-RQJMN5TJ.js';
|
|
6
|
+
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-W2AEL4BJ.js';
|
|
7
|
+
import { builderDiskPinned } from './chunk-NE63JADS.js';
|
|
8
|
+
import { claudeCredentialVariablesSet, claudeCredential } from './chunk-BALIE3BA.js';
|
|
9
|
+
import { closeSync, openSync, constants } from 'fs';
|
|
10
|
+
import { totalmem } from 'os';
|
|
11
|
+
|
|
12
|
+
createRequire(import.meta.url);
|
|
13
|
+
function openKvm() {
|
|
14
|
+
try {
|
|
15
|
+
closeSync(openSync("/dev/kvm", constants.O_RDWR));
|
|
16
|
+
return "usable";
|
|
17
|
+
} catch (err) {
|
|
18
|
+
return err.code === "ENOENT" ? "absent" : "no-permission";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
var sharedBuildDisk;
|
|
22
|
+
function realBlockedProbes() {
|
|
23
|
+
sharedBuildDisk ??= realBuildDiskProbe();
|
|
24
|
+
return { env: process.env, kvm: openKvm, totalMemoryBytes: totalmem, imageBuilder: "unknown", buildDisk: sharedBuildDisk };
|
|
25
|
+
}
|
|
26
|
+
var DEFAULT_BUILD_MEMORY = "8g";
|
|
27
|
+
function managedProblems(facts) {
|
|
28
|
+
const problems = [];
|
|
29
|
+
if (builtinKind(facts.provision) !== "vm") {
|
|
30
|
+
problems.push({
|
|
31
|
+
condition: "jailer",
|
|
32
|
+
reason: `a managed runner needs builtin:vm hooks, and runner.hooks.provision is ${facts.provision}. Without them builds would run without the jailer. Set runner.hooks.provision and runner.hooks.cleanup to builtin:vm`
|
|
33
|
+
});
|
|
34
|
+
} else if (facts.jailer === "usable") ; else if (facts.jailer === "unknown") {
|
|
35
|
+
problems.push({ condition: "jailer", reason: "the runner has not yet asked the root helper whether builds run under the jailer, so builds would run without the jailer until it answers" });
|
|
36
|
+
} else {
|
|
37
|
+
const { problem } = facts.jailer;
|
|
38
|
+
const advice = problem.includes("pins no helper") || problem.includes("runner install") ? "" : ". Run `outerlayer runner install --service --replace` to install the root helper, then restart the service";
|
|
39
|
+
problems.push({ condition: "jailer", reason: `builds would run without the jailer, which a managed runner does not allow: ${problem}${advice}` });
|
|
40
|
+
}
|
|
41
|
+
if (facts.credentials.has("CLAUDE_CODE_OAUTH_TOKEN")) {
|
|
42
|
+
problems.push({
|
|
43
|
+
condition: "credential",
|
|
44
|
+
reason: "CLAUDE_CODE_OAUTH_TOKEN is set in the runner's environment or credentials directory, and a managed runner accepts only ANTHROPIC_API_KEY. Remove CLAUDE_CODE_OAUTH_TOKEN from the claude.env and runner.env beside the config, store ANTHROPIC_API_KEY, then restart the service"
|
|
45
|
+
});
|
|
46
|
+
} else if (!facts.credentials.has("ANTHROPIC_API_KEY")) {
|
|
47
|
+
problems.push({
|
|
48
|
+
condition: "credential",
|
|
49
|
+
reason: "there is no Claude credential in the runner's environment, and a managed runner needs ANTHROPIC_API_KEY. Store ANTHROPIC_API_KEY with `outerlayer runner init --agent claude`, which writes the claude.env beside the config, then restart the service"
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (facts.allowHosts === void 0) {
|
|
53
|
+
problems.push({
|
|
54
|
+
condition: "allowHosts",
|
|
55
|
+
reason: "runner.build.allowHosts is not set, and a managed runner needs it so that a build reaches only the public hosts it lists. List the hosts your builds need; an empty list allows none"
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (builtinKind(facts.provision) === "vm") {
|
|
59
|
+
if (facts.imageBuild === "host") {
|
|
60
|
+
problems.push({
|
|
61
|
+
condition: "imageBuild",
|
|
62
|
+
reason: "runner.build.imageBuild is host, and a managed runner builds its images in a builder microVM, because a recipe step on the host could reach the host's own services and network. Remove runner.build.imageBuild or set it to vm"
|
|
63
|
+
});
|
|
64
|
+
} else if (!facts.builderDiskPinned) {
|
|
65
|
+
problems.push({
|
|
66
|
+
condition: "imageBuild",
|
|
67
|
+
reason: "this release of the CLI pins no builder root disk, so it cannot build images in a builder microVM, which a managed runner needs for runner.build.imageBuild. Update the CLI to a release that pins one"
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return problems;
|
|
72
|
+
}
|
|
73
|
+
function managedFactsOf(config, probes) {
|
|
74
|
+
return {
|
|
75
|
+
provision: config.hooks.provision,
|
|
76
|
+
jailer: probes.jailer ?? "unknown",
|
|
77
|
+
credentials: claudeCredentialVariablesSet(probes.env),
|
|
78
|
+
allowHosts: config.build?.allowHosts,
|
|
79
|
+
imageBuild: imageBuildOf(config),
|
|
80
|
+
builderDiskPinned: probes.builderDiskPinned ?? builderDiskPinned()
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function keepsHostBuilder(config, builderDiskIsPinned) {
|
|
84
|
+
return !(builtinKind(config.hooks.provision) === "vm" && imageBuildOf(config) === "vm" && (builderDiskIsPinned ?? builderDiskPinned()));
|
|
85
|
+
}
|
|
86
|
+
function checkBlockedWithSlots(config, probes) {
|
|
87
|
+
const blocked = (reason) => ({ blocked: { reason } });
|
|
88
|
+
let slots;
|
|
89
|
+
const placeholders = placeholderQueues(config);
|
|
90
|
+
if (placeholders.length > 0) return blocked(`${placeholderProblem(placeholders)}. The runner takes work again once the config is edited`);
|
|
91
|
+
if (config.managed === true) {
|
|
92
|
+
const unmet = managedProblems(managedFactsOf(config, probes))[0];
|
|
93
|
+
if (unmet !== void 0) return blocked(unmet.reason);
|
|
94
|
+
}
|
|
95
|
+
const kind = builtinKind(config.hooks.provision);
|
|
96
|
+
if (kind === "container" || kind === "vm") {
|
|
97
|
+
const fit = checkFit({
|
|
98
|
+
concurrency: config.concurrency,
|
|
99
|
+
buildMemory: config.build?.memory ?? DEFAULT_BUILD_MEMORY,
|
|
100
|
+
usableBytes: probes.totalMemoryBytes()
|
|
101
|
+
});
|
|
102
|
+
if (!fit.fits) {
|
|
103
|
+
const advice = probes.inImage === true ? "Set OUTERLAYER_BUILD_MEMORY or OUTERLAYER_CONCURRENCY in the env file and recreate the container, or give the machine more memory" : `Lower runner.concurrency or runner.build.memory in ${config.configPath}`;
|
|
104
|
+
return blocked(`${fit.message}. ${advice}`);
|
|
105
|
+
}
|
|
106
|
+
const facts = probes.buildDisk?.(kind, config.configPath);
|
|
107
|
+
if (facts !== void 0) {
|
|
108
|
+
const diskFit = checkDiskFit({ concurrency: config.concurrency, buildDisk: config.build?.disk ?? DEFAULT_BUILD_DISK, cacheDisk: config.build?.cacheDisk ?? DEFAULT_CACHE_DISK, facts });
|
|
109
|
+
slots = diskFit.slots;
|
|
110
|
+
if (diskFit.slots < 1) {
|
|
111
|
+
const advice = probes.inImage === true ? "Set OUTERLAYER_CONCURRENCY in the env file and recreate the container, or give the machine more disk" : `Lower runner.build.disk${kind === "vm" ? " or runner.build.cacheDisk" : ""} in ${config.configPath}, or give the machine more disk`;
|
|
112
|
+
return { blocked: { reason: `${diskFit.message}. ${advice}` }, slots };
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const kvm = kind === "vm" ? probes.kvm() : "usable";
|
|
117
|
+
if (kvm === "absent") {
|
|
118
|
+
return { blocked: { reason: "/dev/kvm does not exist on this machine, so builtin:vm cannot start a microVM. Use a host with KVM enabled, or builtin:container hooks" }, slots };
|
|
119
|
+
}
|
|
120
|
+
if (kvm !== "usable") {
|
|
121
|
+
return {
|
|
122
|
+
slots,
|
|
123
|
+
blocked: {
|
|
124
|
+
reason: "the runner cannot open /dev/kvm, so builtin:vm cannot start a microVM. Add the runner's account to the kvm group, then restart the service, because a service reads its groups only when it starts"
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
if ((kind === "container" || kind === "vm") && keepsHostBuilder(config, probes.builderDiskPinned)) {
|
|
129
|
+
const builder = probes.imageBuilder;
|
|
130
|
+
if (builder === "unknown") {
|
|
131
|
+
return { blocked: { reason: "the runner is still preparing its image builder, the container that limits image builds to runner.build.memory, so it claims nothing yet" }, slots };
|
|
132
|
+
}
|
|
133
|
+
if (builder !== "usable") return { blocked: { reason: `${builder.problem}. The runner takes work again once its image builder works` }, slots };
|
|
134
|
+
}
|
|
135
|
+
if (kind !== "own" && claudeCredential(probes.env) === void 0) {
|
|
136
|
+
return {
|
|
137
|
+
slots,
|
|
138
|
+
blocked: {
|
|
139
|
+
reason: "there is no Claude credential in the runner's environment. Store CLAUDE_CODE_OAUTH_TOKEN (from `claude setup-token`) or ANTHROPIC_API_KEY with `outerlayer runner init --agent claude`, which writes the claude.env beside the config, then restart the service"
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
return { slots };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export { checkBlockedWithSlots, keepsHostBuilder, managedFactsOf, managedProblems, realBlockedProbes };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
4
|
-
import {
|
|
4
|
+
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
5
|
+
import { autoConnect } from './chunk-B2JURP6A.js';
|
|
5
6
|
import { acquireSpoolLockAt } from './chunk-EWVYQLD3.js';
|
|
6
7
|
import { resolveRepoIdentity } from './chunk-5DNCFOXA.js';
|
|
7
8
|
import { C } from './chunk-ANPNT6PM.js';
|
|
8
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
9
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
9
10
|
import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
|
|
10
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
12
|
import { StepNameSchema, StepBodySchema } from './chunk-E6CO3MJE.js';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-2WMZPJVE.js';
|
|
4
|
+
import { resolveRepoIdentity } from './chunk-5DNCFOXA.js';
|
|
5
|
+
import { resolveGatewayCredentials } from './chunk-6RKD7YZ6.js';
|
|
6
|
+
import { readCloudConfig } from './chunk-PJDQPF5N.js';
|
|
7
|
+
import { findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
8
|
+
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
9
|
+
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
10
|
+
|
|
11
|
+
createRequire(import.meta.url);
|
|
12
|
+
|
|
13
|
+
// src/auto-connect.ts
|
|
14
|
+
async function autoConnect(opts) {
|
|
15
|
+
const env = opts.env ?? process.env;
|
|
16
|
+
const home = opts.home ?? homeFromEnv(env);
|
|
17
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
18
|
+
const resolved = resolveGatewayCredentials({ url: opts.url, apiKey: opts.apiKey, appId: opts.appId, home, env, cwd });
|
|
19
|
+
if (resolved.ok || resolved.kind !== "login" || !resolved.credential || !resolved.url) return void 0;
|
|
20
|
+
const dirs = findGitDirs(cwd);
|
|
21
|
+
const repository = opts.repository ?? resolveRepoIdentity(cwd).gitRepo;
|
|
22
|
+
if (dirs === void 0 || repository === void 0) return void 0;
|
|
23
|
+
const listed = await fetchFactories(opts.fetchImpl ?? fetch, resolved.url, resolved.credential, repository);
|
|
24
|
+
if (!listed.ok || listed.factories.length === 0) return void 0;
|
|
25
|
+
const chosen = selectFactory(listed.factories, readRepoConnection(cwd), repository, readCloudConfig(home).appId);
|
|
26
|
+
if (chosen.factory === void 0) {
|
|
27
|
+
return `you are logged in, but no factory is chosen for this repository, and more than one fits. Run \`${cliInvocation()} connect --factory <org>/<factory>\` with one of:
|
|
28
|
+
${chosen.text}
|
|
29
|
+
Or pass --app-id / set OUTERLAYER_APP_ID.`;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
saveFactoryConnection(dirs.gitCommonDir, void 0, chosen.factory, /* @__PURE__ */ new Date());
|
|
33
|
+
} catch {
|
|
34
|
+
return void 0;
|
|
35
|
+
}
|
|
36
|
+
process.stderr.write(`${autoConnectedLine(repository, chosen.factory, chosen.reason)}
|
|
37
|
+
`);
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { autoConnect };
|
|
@@ -318,14 +318,26 @@ async function startDestination(input) {
|
|
|
318
318
|
const headerName = destination.header.name.toLowerCase();
|
|
319
319
|
const dropped = /* @__PURE__ */ new Set(["host", "authorization", "proxy-authorization", "cookie", "connection", "proxy-connection", "keep-alive", "transfer-encoding", "upgrade", ...input.drop ?? []]);
|
|
320
320
|
const handle = (req, res) => {
|
|
321
|
+
let finished = false;
|
|
322
|
+
const finish = (ok) => {
|
|
323
|
+
if (finished) return;
|
|
324
|
+
finished = true;
|
|
325
|
+
input.onFinished?.(destination.name, ok);
|
|
326
|
+
};
|
|
327
|
+
res.on("finish", () => finish(true));
|
|
328
|
+
res.on("close", () => finish(false));
|
|
329
|
+
const fail = (status, body) => {
|
|
330
|
+
finish(false);
|
|
331
|
+
respond(res, status, body);
|
|
332
|
+
};
|
|
321
333
|
const target = req.url ?? "";
|
|
322
334
|
if (!target.startsWith("/")) {
|
|
323
|
-
|
|
335
|
+
fail(400, "send an origin-form request path\n");
|
|
324
336
|
return;
|
|
325
337
|
}
|
|
326
338
|
const expanded = expandHeader(destination.header, hostEnv);
|
|
327
339
|
if ("missing" in expanded) {
|
|
328
|
-
|
|
340
|
+
fail(502, `the destination ${destination.name} cannot be reached: ${expanded.missing} is not set in the runner's environment
|
|
329
341
|
`);
|
|
330
342
|
return;
|
|
331
343
|
}
|
|
@@ -351,20 +363,23 @@ async function startDestination(input) {
|
|
|
351
363
|
res.writeHead(answer.statusCode ?? 502, answer.headers);
|
|
352
364
|
answer.on("error", () => res.destroy());
|
|
353
365
|
answer.on("close", () => {
|
|
354
|
-
if (!answer.complete)
|
|
366
|
+
if (!answer.complete) {
|
|
367
|
+
finish(false);
|
|
368
|
+
res.destroy();
|
|
369
|
+
}
|
|
355
370
|
});
|
|
356
371
|
answer.pipe(res);
|
|
357
372
|
}
|
|
358
373
|
);
|
|
359
374
|
} catch {
|
|
360
|
-
|
|
375
|
+
fail(502, `the destination ${destination.name} cannot be reached: its header value was refused
|
|
361
376
|
`);
|
|
362
377
|
return;
|
|
363
378
|
}
|
|
364
379
|
input.onUsed?.(destination.name);
|
|
365
380
|
forwarded.setTimeout(UPSTREAM_IDLE_MS, () => forwarded.destroy());
|
|
366
381
|
res.on("close", () => forwarded.destroy());
|
|
367
|
-
forwarded.on("error", () =>
|
|
382
|
+
forwarded.on("error", () => fail(502, `the upstream of the destination ${destination.name} could not be reached
|
|
368
383
|
`));
|
|
369
384
|
req.pipe(forwarded);
|
|
370
385
|
};
|
|
@@ -445,9 +460,12 @@ async function startBuildServices(input) {
|
|
|
445
460
|
...input.serve === "socket" || streamed ? {} : { port: input.ports?.destinations?.[index] ?? 0 },
|
|
446
461
|
hostEnv: input.hostEnv,
|
|
447
462
|
onUsed: (name) => tunnel.destinationUsed(name),
|
|
463
|
+
onFinished: (name, ok) => tunnel.routeFinished(name, ok),
|
|
448
464
|
...input.destinationOptions
|
|
449
465
|
});
|
|
450
466
|
servers.push(server);
|
|
467
|
+
tunnel.routeServed(destination.name);
|
|
468
|
+
input.log?.(`route ${destination.name} served to the build`);
|
|
451
469
|
const listener = server.listener?.();
|
|
452
470
|
if (listener !== void 0) listeners[`dest-${index}.sock`] = listener;
|
|
453
471
|
targets.set(destinationTarget(index), (stream) => server.acceptStream(stream));
|
|
@@ -463,9 +481,12 @@ async function startBuildServices(input) {
|
|
|
463
481
|
hostEnv: builtIn.hostEnv,
|
|
464
482
|
drop: builtIn.drop,
|
|
465
483
|
onUsed: (name) => tunnel.destinationUsed(name),
|
|
484
|
+
onFinished: (name, ok) => tunnel.routeFinished(name, ok),
|
|
466
485
|
...input.destinationOptions
|
|
467
486
|
});
|
|
468
487
|
servers.push(server);
|
|
488
|
+
tunnel.routeServed(builtIn.destination.name);
|
|
489
|
+
input.log?.(`route ${builtIn.destination.name} served to the build`);
|
|
469
490
|
const listener = server.listener?.();
|
|
470
491
|
if (listener !== void 0) listeners[builtIn.socket] = listener;
|
|
471
492
|
targets.set(builtIn.destination.name, (stream) => server.acceptStream(stream));
|
|
@@ -828,14 +849,22 @@ function withTunnelRecord(environment, record, onlyWhenUsed = false) {
|
|
|
828
849
|
const base = ignoredProperties === void 0 ? environment : { ...environment, ignoredProperties };
|
|
829
850
|
if (record === void 0) return base;
|
|
830
851
|
const used = record.hosts.length + record.hostsMore + record.refusals.length + record.refusalsMore + (record.destinations?.length ?? 0) > 0;
|
|
831
|
-
|
|
852
|
+
const routed = Object.values(record.routes ?? {}).some((counts) => counts.requests > 0);
|
|
853
|
+
if (onlyWhenUsed && !used && !routed) return base;
|
|
832
854
|
return {
|
|
833
855
|
...base,
|
|
834
856
|
...capHosts(record.hosts, record.hostsMore),
|
|
835
857
|
refusals: record.refusals.slice(0, MAX_HOSTS),
|
|
836
858
|
refusalsMore: Math.max(0, record.refusals.length - MAX_HOSTS) + record.refusalsMore,
|
|
837
|
-
...record.destinations === void 0 || record.destinations.length === 0 ? {} : { destinations: record.destinations }
|
|
859
|
+
...record.destinations === void 0 || record.destinations.length === 0 ? {} : { destinations: record.destinations },
|
|
860
|
+
...routesOf(record.routes)
|
|
838
861
|
};
|
|
839
862
|
}
|
|
863
|
+
var MAX_ROUTES = 32;
|
|
864
|
+
function routesOf(counts) {
|
|
865
|
+
if (counts === void 0) return {};
|
|
866
|
+
const routes = Object.entries(counts).sort(([a], [b]) => a < b ? -1 : 1).slice(0, MAX_ROUTES).map(([name, { requests, failures }]) => ({ name, requests, failures: Math.min(failures, requests) }));
|
|
867
|
+
return routes.length === 0 ? {} : { routes };
|
|
868
|
+
}
|
|
840
869
|
|
|
841
870
|
export { AGENT_CREDENTIAL_MISSING, BUILD_HOME, BUILT_IN_NAMES, CHECKOUT_DIR, CHECK_ITEMS_FILE, CLAUDE_CREDENTIAL_ID, CLAUDE_CREDENTIAL_VARIABLES, CLAUDE_ENV_FILE, CLAUDE_PORT, CLAUDE_SOCKET, DESTINATION_BASE_PORT, EVAL_INPUT_DIR, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, GATEWAY_PORT, GATEWAY_SOCKET, JOB_MOUNT, MAVEN_NO_PROXY_NOTE, MAVEN_SETTINGS_FILE, MAVEN_SPACE_NOTE, PROXY_WARNING_FLAG, RELAY_PORT, authorEnvironment, buildEnvironment, buildMavenSettingsXml, builtInEnvironment, checkEnvironment, checkoutPath, claudeCredential, claudeCredentialVariablesSet, claudeEnvPath, commitIdentityRecord, containerLocalAddress, credentialLineIn, currentClaudeCredential, destinationEnvironment, headerVariables, heldClaudeCredential, isRefusedInConfig, isReservedVariable, lifecycleWorkdir, mavenArgs, mavenSettingsXml, namesGlobalSettings, parseClaimIdentity, parseClaimedRepositories, parseIsolation, parseUnreachable, primaryOf, proxyEnvironment, readClaudeCredential, removedClaudeCredentialValues, repositoriesOf, repositoryPath, resolveDestinations, sharedUserEnvironment, startBuildServices, takeClaudeCredential, tokenHeader, withGitConfig, withHooksPath, withProxyWarningHidden, withTokenHeader, withTunnelRecord, withoutCredentialLines, writeBuildMavenSettings, writeMavenSettings };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
4
|
-
import { detectActiveSession,
|
|
4
|
+
import { detectActiveSession, transcriptPathForSession } from './chunk-IP7BIBXJ.js';
|
|
5
|
+
import { autoConnect } from './chunk-B2JURP6A.js';
|
|
5
6
|
import { resolveRepoIdentity, defaultProjectsDir, findTranscripts, sessionIdFromPath, scrubText } from './chunk-5DNCFOXA.js';
|
|
6
7
|
import { C } from './chunk-ANPNT6PM.js';
|
|
7
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
8
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
8
9
|
import { readLatestProvenanceForSession } from './chunk-ZJSNLVCE.js';
|
|
9
10
|
import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
|
|
10
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
4
|
-
import { RUNNER_FILE_MODE } from './chunk-
|
|
5
|
-
import { claudeEnvPath, withoutCredentialLines } from './chunk-
|
|
3
|
+
import { DEFAULT_UNIT_NAME } from './chunk-HE4FBF4T.js';
|
|
4
|
+
import { RUNNER_FILE_MODE } from './chunk-PA6CK6WQ.js';
|
|
5
|
+
import { claudeEnvPath, withoutCredentialLines } from './chunk-BALIE3BA.js';
|
|
6
6
|
import { parseRunnerEnv } from './chunk-HACGUL52.js';
|
|
7
7
|
import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
|
|
8
8
|
import { join, dirname } from 'path';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { launcherPath, writeLauncher, LauncherWriteError, pathNotes } from './chunk-
|
|
4
|
-
import { currentVersion, currentLink, isInLayout, packageRootIn, versionDir, switchCurrent, execStartLine } from './chunk-
|
|
3
|
+
import { launcherPath, writeLauncher, LauncherWriteError, pathNotes } from './chunk-Z5IW4DHH.js';
|
|
4
|
+
import { currentVersion, currentLink, isInLayout, packageRootIn, versionDir, switchCurrent, execStartLine } from './chunk-NBZ7XBT6.js';
|
|
5
5
|
import { compareVersions } from './chunk-TQMI335S.js';
|
|
6
|
-
import { RUNNER_DIR_MODE } from './chunk-
|
|
6
|
+
import { RUNNER_DIR_MODE } from './chunk-PA6CK6WQ.js';
|
|
7
7
|
import { realpathSync, readFileSync, mkdirSync, rmSync, cpSync, existsSync } from 'fs';
|
|
8
8
|
import { dirname, sep, join } from 'path';
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { removeRetiredSkills } from './chunk-UIUGTW5C.js';
|
|
4
|
-
import { defaultFetch, resolveGatewayCredentials } from './chunk-
|
|
5
|
-
import { withTokenHeader } from './chunk-
|
|
4
|
+
import { defaultFetch, resolveGatewayCredentials } from './chunk-6RKD7YZ6.js';
|
|
5
|
+
import { withTokenHeader } from './chunk-BALIE3BA.js';
|
|
6
6
|
import { appendContextProvenance } from './chunk-ZJSNLVCE.js';
|
|
7
7
|
import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-G63KT5I5.js';
|
|
8
8
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
4
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
4
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-PA6CK6WQ.js';
|
|
5
5
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, rmSync } from 'fs';
|
|
6
6
|
import { dirname } from 'path';
|
|
7
7
|
|