@outerlayer/cli 0.23.0 → 0.24.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 +11 -0
- package/README.md +4 -0
- package/dist/{agent-setup-SNDCEHG2.js → agent-setup-QQYRBPK2.js} +6 -6
- package/dist/{bridge-QFN3KJP6.js → bridge-4ZARDVGS.js} +2 -2
- package/dist/{build-WHHFA7KM.js → build-OVZIT2G2.js} +4 -4
- package/dist/build-info.json +1 -1
- package/dist/{builder-7FBQAWQZ.js → builder-MECDEKXX.js} +5 -5
- package/dist/{check-3CGLWMHM.js → check-YYKNYFNI.js} +36 -34
- package/dist/{chunk-G3LHWUBK.js → chunk-5ECUMU53.js} +6 -6
- package/dist/{chunk-OGMZJWWD.js → chunk-5XCAPBE2.js} +4 -4
- package/dist/{chunk-QSEPKZXR.js → chunk-6GSA2SKT.js} +16 -16
- package/dist/{chunk-XOEV4FVK.js → chunk-755WXDBI.js} +1 -1
- package/dist/{chunk-Z42JY3LQ.js → chunk-A62QFN2M.js} +3 -3
- package/dist/{chunk-URWYRAIC.js → chunk-BN3CSI7S.js} +0 -2
- package/dist/{chunk-2TT7DEMZ.js → chunk-BOQY756V.js} +9 -8
- package/dist/{chunk-6AOZD3LY.js → chunk-BUBCPP3F.js} +3 -3
- package/dist/{chunk-WXJXHZVB.js → chunk-CZUH2SLQ.js} +1 -1
- package/dist/{chunk-CBCKD6DO.js → chunk-D4AMAEZ7.js} +12 -11
- package/dist/{chunk-DJYOCD65.js → chunk-D7K446H6.js} +5 -5
- package/dist/{chunk-V5CG75NX.js → chunk-D7X5ITVT.js} +1 -1
- package/dist/{chunk-OBCFK4QD.js → chunk-DG2ULWM6.js} +2 -2
- package/dist/{chunk-XGPC3IOR.js → chunk-E4OUL7ZP.js} +2 -2
- package/dist/{chunk-ZLZ3XVPI.js → chunk-F2W2IYNP.js} +3 -3
- package/dist/{chunk-D64E222W.js → chunk-F7Y2USIM.js} +3 -3
- package/dist/{chunk-QS43O4DR.js → chunk-FKXGQOF5.js} +1 -1
- package/dist/{chunk-JV4YGAAW.js → chunk-FQPN5S4Q.js} +4 -4
- package/dist/{chunk-XACXXKQ5.js → chunk-FWEWFW3F.js} +1 -1
- package/dist/{chunk-BOG4ENP7.js → chunk-GU4PKXN7.js} +9 -9
- package/dist/{chunk-TFGXOHF6.js → chunk-H6IUKXXI.js} +89 -23
- package/dist/{chunk-EFB3FGLC.js → chunk-HHXBOTRO.js} +1 -1
- package/dist/chunk-IDSHLKQA.js +66 -0
- package/dist/{chunk-IHNQWF6F.js → chunk-KF37SUDM.js} +1 -1
- package/dist/{chunk-4AVDD7VX.js → chunk-LBCZXXOX.js} +2 -2
- package/dist/{chunk-NYTZ7HVN.js → chunk-LY2L3O2O.js} +1 -1
- package/dist/{chunk-CQAEV3Z5.js → chunk-NGZID7UI.js} +1 -1
- package/dist/{chunk-UF5L4BAI.js → chunk-NTQTDCYR.js} +1 -1
- package/dist/{chunk-2Q3PZ42G.js → chunk-PDIM5T65.js} +1 -1
- package/dist/{chunk-OW52QLK3.js → chunk-PVRBE7S4.js} +1 -1
- package/dist/{chunk-C64D7HR3.js → chunk-RVYOOYOA.js} +6 -6
- package/dist/{chunk-KGKFEONR.js → chunk-TQ6Y7YV6.js} +5 -5
- package/dist/{chunk-I2UOAV7X.js → chunk-TQMI335S.js} +4 -1
- package/dist/{chunk-QILR6TZP.js → chunk-TTLVQZSH.js} +3 -3
- package/dist/{chunk-GXV73IIS.js → chunk-V5Q3S4NM.js} +17 -5
- package/dist/{chunk-C2XZBNHY.js → chunk-VBEXKEBV.js} +1 -1
- package/dist/{chunk-276D7BJ7.js → chunk-VV7ZD5LR.js} +1 -1
- package/dist/{chunk-WY7HFY62.js → chunk-W7O4LA4E.js} +3 -3
- package/dist/{chunk-ZKWKQIJU.js → chunk-WH2QV3UL.js} +1 -1
- package/dist/{chunk-FX6IHR5C.js → chunk-ZFLOFAUG.js} +8 -8
- package/dist/{claude-launcher-KEESTJHO.js → claude-launcher-JCPSHDZQ.js} +1 -1
- package/dist/{cli-44WGGICQ.js → cli-ZTBH3FBG.js} +122 -93
- package/dist/{command-4FAP2D3P.js → command-DO4TERRT.js} +24 -23
- package/dist/{config-H4QS332G.js → config-7Z5DHSGY.js} +2 -2
- package/dist/connect-cmd-NY5LIKVC.js +25 -0
- package/dist/container-start-OHBUZEJJ.js +170 -0
- package/dist/{control-plane-launch-SEYCOZFH.js → control-plane-launch-GKGI6HJA.js} +5 -5
- package/dist/{dist-SOH3O24Y.js → dist-2APO44JG.js} +1 -1
- package/dist/{docker-KMK4LOET.js → docker-RKGBJESN.js} +5 -5
- package/dist/{doctor-4H77CEB7.js → doctor-DOAFZV4O.js} +37 -24
- package/dist/{emit-artifact-cmd-XCZ3ALLV.js → emit-artifact-cmd-VZHIDPXQ.js} +13 -10
- package/dist/{emit-criteria-cmd-JE72JHKJ.js → emit-criteria-cmd-SYLBCWHW.js} +10 -7
- package/dist/{emit-finding-cmd-ILIDRMYN.js → emit-finding-cmd-52M43NPC.js} +10 -7
- package/dist/{emit-result-cmd-WPKG5YAS.js → emit-result-cmd-BTMTGDAV.js} +13 -10
- package/dist/{emit-step-cmd-OVMLQSL6.js → emit-step-cmd-6XTJITZT.js} +11 -8
- package/dist/{exec-client-ATPF2DDB.js → exec-client-CKPK62K2.js} +3 -3
- package/dist/{governing-source-EQBKPME7.js → governing-source-GWN7GVEN.js} +11 -10
- package/dist/{guest-init-HWSE7W6L.js → guest-init-ZBL5CN7Y.js} +4 -4
- package/dist/{hook-fast-27SHD72I.js → hook-fast-3JL4PXLG.js} +1 -1
- package/dist/{host-key-ATB23GI3.js → host-key-W2DLZGZ7.js} +3 -3
- package/dist/image-tag-AO4RBAKW.js +10 -0
- package/dist/index.js +4 -4
- package/dist/{init-HAAHIQFN.js → init-EQTR7AEF.js} +22 -21
- package/dist/{init-WQ62BXDN.js → init-TSQ3EOQW.js} +22 -21
- package/dist/{init-cmd-VPFIDY64.js → init-cmd-AF2MH36A.js} +11 -11
- package/dist/{init-update-UZIJ2FMU.js → init-update-SHISHMXV.js} +35 -9
- package/dist/{install-SFACZU7E.js → install-ORQC26ZE.js} +4 -4
- package/dist/{install-cmd-6HTP7I43.js → install-cmd-4LA3UJZ4.js} +6 -6
- package/dist/{logs-N3ZX7HFV.js → logs-5EPHIPZB.js} +2 -2
- package/dist/{loop-JPW2QJ64.js → loop-4WUCS5JP.js} +36 -34
- package/dist/{machine-PGDRWPI2.js → machine-6UNLIPLE.js} +18 -17
- package/dist/{mcp-serve-cmd-CNRC5AL5.js → mcp-serve-cmd-KMWEKM7C.js} +4 -4
- package/dist/{paths-AKX2OOLF.js → paths-XY5ADO32.js} +2 -2
- package/dist/{pending-7SGWZCEH.js → pending-35J3ZPLR.js} +3 -3
- package/dist/{pidfile-G2J5WBQS.js → pidfile-OJ7RP4Q2.js} +3 -3
- package/dist/{record-Q4IEYIVV.js → record-BEJB4J7N.js} +3 -3
- package/dist/{runner-env-GZHXM27A.js → runner-env-ZJWJOJKQ.js} +5 -5
- package/dist/{runner-identity-IIZ3RK7M.js → runner-identity-2OOUJSFJ.js} +5 -5
- package/dist/{runner-key-BPP5XRYR.js → runner-key-WDFBSJRX.js} +22 -21
- package/dist/{session-sender-EKKZ5DEU.js → session-sender-X3BBQZMF.js} +14 -11
- package/dist/{spec-cmd-JDHGNFVJ.js → spec-cmd-QRF5YXKK.js} +11 -8
- package/dist/{status-UCQDEMFX.js → status-ZCAAF6MD.js} +33 -24
- package/dist/{sync-cmd-NSVXOYFJ.js → sync-cmd-UQK3RYAC.js} +13 -10
- package/dist/{watch-NQVZWPBJ.js → watch-MOQ3GQTE.js} +13 -10
- package/dist/{work-claim-cmd-FPJXQAXP.js → work-claim-cmd-RT343CLA.js} +14 -11
- package/dist/{work-cmd-FMPDXPU6.js → work-cmd-APXSER2D.js} +11 -8
- package/dist/{work-comment-cmd-ZVUE2IUN.js → work-comment-cmd-AT5NUYUU.js} +11 -8
- package/dist/{work-logs-cmd-CQH2SYT4.js → work-logs-cmd-Z5DMNEJP.js} +11 -8
- package/dist/{work-open-pr-cmd-YY2OGJOI.js → work-open-pr-cmd-ZTS6MJHL.js} +12 -9
- package/dist/{work-pr-cmd-EHFTEVJO.js → work-pr-cmd-IWZCC3WH.js} +11 -8
- package/dist/{work-stop-cmd-LGWSBSBT.js → work-stop-cmd-DCAWFDZC.js} +11 -8
- package/package.json +1 -1
- package/dist/connect-cmd-6DUTUK63.js +0 -22
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { readDefaultBranchHead, cloneRepository, buildRepositoryImage } from './chunk-
|
|
3
|
+
import { readDefaultBranchHead, cloneRepository, buildRepositoryImage } from './chunk-TTLVQZSH.js';
|
|
4
4
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
5
5
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
6
|
-
import { createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, JUDGE_DIR, JUDGE_REPORT, MAX_REPORT_BYTES, spawnRun } from './chunk-
|
|
6
|
+
import { createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, JUDGE_DIR, JUDGE_REPORT, MAX_REPORT_BYTES, spawnRun } from './chunk-5XCAPBE2.js';
|
|
7
7
|
import { RecipeError, 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-3W333NFO.js';
|
|
8
|
-
import { execCapture } from './chunk-
|
|
9
|
-
import { GUEST_CID } from './chunk-
|
|
10
|
-
import { describeCallFailure, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript } from './chunk-
|
|
11
|
-
import { WorkCommandError } from './chunk-
|
|
8
|
+
import { execCapture } from './chunk-LY2L3O2O.js';
|
|
9
|
+
import { GUEST_CID } from './chunk-PDIM5T65.js';
|
|
10
|
+
import { describeCallFailure, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript } from './chunk-TQ6Y7YV6.js';
|
|
11
|
+
import { WorkCommandError } from './chunk-RVYOOYOA.js';
|
|
12
12
|
import { hostAllowed } from './chunk-UXYLWVTQ.js';
|
|
13
13
|
import { parseDuKilobytes } from './chunk-7RQ73DLO.js';
|
|
14
14
|
import { sharedSkillNames, skillConflictMessage } from './chunk-VPEGE3QZ.js';
|
|
15
15
|
import { versionAtLeast, MINIMUM_CLAUDE_VERSION } from './chunk-HCVLP7XA.js';
|
|
16
|
-
import { setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-
|
|
16
|
+
import { setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-D4AMAEZ7.js';
|
|
17
17
|
import { orderSessions, extractFacts, sessionsToTimeline } from './chunk-RKOTJQVG.js';
|
|
18
18
|
import { downconvertSession } from './chunk-QZBXLLTV.js';
|
|
19
|
-
import { rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, deliveryDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, buildDir, RUNNER_DIR_MODE, SHIM_DIR, vmAssetsDir } from './chunk-
|
|
20
|
-
import { repositoriesOf, primaryOf, RELAY_PORT, repositoryPath, CHECKOUT_DIR, lifecycleWorkdir, claudeCredential, buildEnvironment, startBuildServices, checkEnvironment, AGENT_CREDENTIAL_MISSING, checkoutPath, JOB_MOUNT } from './chunk-
|
|
19
|
+
import { rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, deliveryDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, buildDir, RUNNER_DIR_MODE, SHIM_DIR, vmAssetsDir } from './chunk-KF37SUDM.js';
|
|
20
|
+
import { repositoriesOf, primaryOf, RELAY_PORT, repositoryPath, CHECKOUT_DIR, lifecycleWorkdir, claudeCredential, buildEnvironment, startBuildServices, checkEnvironment, AGENT_CREDENTIAL_MISSING, checkoutPath, JOB_MOUNT } from './chunk-BN3CSI7S.js';
|
|
21
21
|
import { RELAY_USER, RELAY_ID, UNKNOWN_TRANSPORT_REASON, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, MAX_OPEN_STREAMS, STREAM_WINDOW, SESSION_WINDOW, targetOfPath } from './chunk-GISNHSYL.js';
|
|
22
22
|
import { readFileSync, existsSync, mkdirSync, chmodSync, truncateSync, rmSync, writeFileSync, readdirSync, lstatSync, copyFileSync, accessSync, constants, statSync, rmdirSync, renameSync, unlinkSync, openSync, closeSync, mkdtempSync, createWriteStream, createReadStream } from 'fs';
|
|
23
23
|
import { join, dirname, basename } from 'path';
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, hostCommandEnvironment, execArgv, microVmCommandLine, runCommand, commandLogOffset, execCommandLine, startSender, startHostServices, finishJob, isContainerTracked, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, hookLimitsFor, AttemptLogBook, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, ALREADY_RELEASED } from './chunk-
|
|
4
|
-
import { writePendingUpdate } from './chunk-
|
|
5
|
-
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-
|
|
3
|
+
import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, hostCommandEnvironment, execArgv, microVmCommandLine, runCommand, commandLogOffset, execCommandLine, startSender, startHostServices, finishJob, isContainerTracked, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, hookLimitsFor, AttemptLogBook, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, ALREADY_RELEASED } from './chunk-6GSA2SKT.js';
|
|
4
|
+
import { writePendingUpdate } from './chunk-NGZID7UI.js';
|
|
5
|
+
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-NTQTDCYR.js';
|
|
6
6
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
7
7
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-YETTWTAY.js';
|
|
8
|
-
import { compareVersions, satisfiesRange } from './chunk-I2UOAV7X.js';
|
|
9
8
|
import { RUNNER_PROTOCOL } from './chunk-TPKYTORP.js';
|
|
10
|
-
import { currentSkillCommand, formerSkillProblem, placeholderQueues, placeholderProblem } from './chunk-
|
|
9
|
+
import { currentSkillCommand, formerSkillProblem, placeholderQueues, placeholderProblem } from './chunk-5ECUMU53.js';
|
|
11
10
|
import { freeBytes, formatBytes } from './chunk-YYYRBYWG.js';
|
|
12
|
-
import { writeMarker, readMarker, currentVersion, removeMarker, entryIn, versionDir, startedThroughCurrent, switchCurrent, cleanVersions, isInLayout, stagingDir } from './chunk-
|
|
11
|
+
import { writeMarker, readMarker, currentVersion, removeMarker, entryIn, versionDir, startedThroughCurrent, switchCurrent, cleanVersions, isInLayout, stagingDir } from './chunk-VV7ZD5LR.js';
|
|
13
12
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
14
|
-
import { LEASE_SECONDS, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandExec, measureDisk, setUpRunnerCgroup, createContainerRuntime, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied } from './chunk-
|
|
15
|
-
import { checkFit } from './chunk-
|
|
16
|
-
import {
|
|
13
|
+
import { LEASE_SECONDS, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandExec, measureDisk, setUpRunnerCgroup, createContainerRuntime, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied } from './chunk-GU4PKXN7.js';
|
|
14
|
+
import { checkFit } from './chunk-DG2ULWM6.js';
|
|
15
|
+
import { tagToPull, pullInstruction, imageTag, writeUpdateStatus } from './chunk-IDSHLKQA.js';
|
|
16
|
+
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
17
|
+
import { claimPidFile, readPidFile, releasePidFile } from './chunk-FWEWFW3F.js';
|
|
17
18
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
18
|
-
import { writeJobFile, ensureRunnerIdentity, readJobFile, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-
|
|
19
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-
|
|
20
|
-
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-
|
|
21
|
-
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-
|
|
19
|
+
import { writeJobFile, ensureRunnerIdentity, readJobFile, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-5XCAPBE2.js';
|
|
20
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-TQ6Y7YV6.js';
|
|
21
|
+
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-RVYOOYOA.js';
|
|
22
|
+
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-D7X5ITVT.js';
|
|
22
23
|
import { exceedsDisk } from './chunk-7RQ73DLO.js';
|
|
23
24
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
24
|
-
import { loadHostKey, ensureHostKey, signerFor } from './chunk-
|
|
25
|
-
import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, spoolDir, rootfsDir } from './chunk-
|
|
26
|
-
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT, claudeCredential } from './chunk-
|
|
25
|
+
import { loadHostKey, ensureHostKey, signerFor } from './chunk-PVRBE7S4.js';
|
|
26
|
+
import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, spoolDir, rootfsDir } from './chunk-KF37SUDM.js';
|
|
27
|
+
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT, claudeCredential } from './chunk-BN3CSI7S.js';
|
|
27
28
|
import { COMMAND_LOST_REASON, CONTAINER_STOPPED_REASON } from './chunk-GISNHSYL.js';
|
|
28
29
|
import { randomBytes } from 'crypto';
|
|
29
30
|
import { mkdirSync, existsSync, chmodSync, writeFileSync, renameSync, statSync, readdirSync, readFileSync, rmSync, closeSync, openSync, constants, lstatSync } from 'fs';
|
|
@@ -1165,6 +1166,10 @@ function selfUpdateBlocker(configPath, entryPath, own) {
|
|
|
1165
1166
|
return void 0;
|
|
1166
1167
|
}
|
|
1167
1168
|
function considerNamedVersion(state, named) {
|
|
1169
|
+
if (state.deps.image !== void 0) {
|
|
1170
|
+
considerNamedImage(state, named);
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1168
1173
|
const update = state.deps.update;
|
|
1169
1174
|
if (update === void 0 || named === void 0) return;
|
|
1170
1175
|
const configPath = state.config.configPath;
|
|
@@ -1187,6 +1192,34 @@ function considerNamedVersion(state, named) {
|
|
|
1187
1192
|
logOf(state).line(`this runner cannot update itself to ${named}: ${blocker}`);
|
|
1188
1193
|
}
|
|
1189
1194
|
}
|
|
1195
|
+
function considerNamedImage(state, named) {
|
|
1196
|
+
if (named !== void 0 && !isVersion(named)) named = void 0;
|
|
1197
|
+
if (named !== void 0) state.imageNamed = named;
|
|
1198
|
+
recordImageStatus(state);
|
|
1199
|
+
const own = ownVersionOf(state.deps);
|
|
1200
|
+
if (named === void 0 || state.imageLogged === named || (compareVersions(own, named) ?? 0) >= 0) return;
|
|
1201
|
+
state.imageLogged = named;
|
|
1202
|
+
logOf(state).line(`the factory names ${named}, newer than the ${own} this image runs \xB7 ${pullInstruction(imageTag(named))}`);
|
|
1203
|
+
}
|
|
1204
|
+
function recordImageStatus(state) {
|
|
1205
|
+
if (state.deps.image === void 0) return;
|
|
1206
|
+
const named = state.imageNamed;
|
|
1207
|
+
const record = {
|
|
1208
|
+
own: ownVersionOf(state.deps),
|
|
1209
|
+
...named === void 0 ? {} : { named, tag: imageTag(named) },
|
|
1210
|
+
upgradeRequired: state.upgradeRefused === true,
|
|
1211
|
+
at: nowOf(state).toISOString()
|
|
1212
|
+
};
|
|
1213
|
+
const key = JSON.stringify({ ...record, at: void 0 });
|
|
1214
|
+
if (state.imageRecord === key) return;
|
|
1215
|
+
try {
|
|
1216
|
+
writeUpdateStatus(runnerDir(state.config.configPath), record);
|
|
1217
|
+
state.imageRecord = key;
|
|
1218
|
+
reportRepeating(state, "the update-status.json record", void 0);
|
|
1219
|
+
} catch (err) {
|
|
1220
|
+
reportRepeating(state, "the update-status.json record", `could not write update-status.json (${describeCallFailure(err)}): \`runner status\` will not name the image to pull`);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1190
1223
|
function adoptUpdateWait(state, version, nowMs) {
|
|
1191
1224
|
const previous = state.updateWait;
|
|
1192
1225
|
const wait = { version, sinceMs: previous?.sinceMs ?? nowMs, holdSinceMs: previous?.holdSinceMs };
|
|
@@ -1488,6 +1521,7 @@ async function housekeepingPass(state) {
|
|
|
1488
1521
|
async function runTick(state) {
|
|
1489
1522
|
state.restarting = false;
|
|
1490
1523
|
state.holdingForUpdate = false;
|
|
1524
|
+
if (state.draining === true) return;
|
|
1491
1525
|
reloadConfig(state);
|
|
1492
1526
|
if (restartOntoInstalled(state)) {
|
|
1493
1527
|
state.restarting = true;
|
|
@@ -1552,7 +1586,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
1552
1586
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
1553
1587
|
);
|
|
1554
1588
|
async function tryClaimAndStart(state, item, queue) {
|
|
1555
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
1589
|
+
const { postJson: postJson2 } = await import('./work-cmd-APXSER2D.js');
|
|
1556
1590
|
const log = logOf(state);
|
|
1557
1591
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
1558
1592
|
const claim = await retrySend(
|
|
@@ -1589,14 +1623,21 @@ async function tryClaimAndStart(state, item, queue) {
|
|
|
1589
1623
|
return { kind: "signature" };
|
|
1590
1624
|
}
|
|
1591
1625
|
if (claim.code === "runner_upgrade_required") {
|
|
1592
|
-
|
|
1626
|
+
const tag = tagToPull(state.imageNamed);
|
|
1627
|
+
reportRepeating(
|
|
1628
|
+
state,
|
|
1629
|
+
"the runner protocol",
|
|
1630
|
+
state.deps.image === void 0 ? claim.message ?? claim.reason : `${claim.message ?? claim.reason} \xB7 ${pullInstruction(tag)}`
|
|
1631
|
+
);
|
|
1593
1632
|
state.upgradeRefused = true;
|
|
1633
|
+
recordImageStatus(state);
|
|
1594
1634
|
return { kind: "outdated" };
|
|
1595
1635
|
}
|
|
1596
1636
|
return { kind: "error", reason: `${claim.reason} (${claim.attempts} attempt(s))` };
|
|
1597
1637
|
}
|
|
1598
1638
|
reportRepeating(state, "the runner protocol", void 0);
|
|
1599
1639
|
state.upgradeRefused = false;
|
|
1640
|
+
recordImageStatus(state);
|
|
1600
1641
|
reportRepeating(state, "the request signature", void 0);
|
|
1601
1642
|
const { data } = claim.value;
|
|
1602
1643
|
const claimId = data.id === void 0 || data.id === null ? "" : String(data.id);
|
|
@@ -2521,7 +2562,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
2521
2562
|
const outcome = await onStartUnderMarker({
|
|
2522
2563
|
configPath,
|
|
2523
2564
|
own: ownVersionOf(deps),
|
|
2524
|
-
check: update.check ? () => update.check(configPath) : async () => (await import('./check-
|
|
2565
|
+
check: update.check ? () => update.check(configPath) : async () => (await import('./check-YYKNYFNI.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl }),
|
|
2525
2566
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
2526
2567
|
log
|
|
2527
2568
|
});
|
|
@@ -2625,8 +2666,9 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
2625
2666
|
const probeTimer = setInterval(() => {
|
|
2626
2667
|
for (const active of state.jobs.values()) void probeBuild(state, active);
|
|
2627
2668
|
}, deps.probeIntervalMs ?? PROBE_INTERVAL_MS);
|
|
2628
|
-
const onSigterm = () => void drain();
|
|
2669
|
+
const onSigterm = () => deps.image === void 0 ? void drain() : leave();
|
|
2629
2670
|
const onSigusr1 = () => void stopNow();
|
|
2671
|
+
const onSigusr2 = () => drainKeepingUp();
|
|
2630
2672
|
const onSigint = () => {
|
|
2631
2673
|
interrupts++;
|
|
2632
2674
|
if (interrupts === 1) {
|
|
@@ -2639,6 +2681,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
2639
2681
|
const detachSignals = () => {
|
|
2640
2682
|
process.off("SIGTERM", onSigterm);
|
|
2641
2683
|
process.off("SIGUSR1", onSigusr1);
|
|
2684
|
+
process.off("SIGUSR2", onSigusr2);
|
|
2642
2685
|
process.off("SIGINT", onSigint);
|
|
2643
2686
|
};
|
|
2644
2687
|
const stopIntake = () => {
|
|
@@ -2685,6 +2728,19 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
2685
2728
|
}
|
|
2686
2729
|
finish2();
|
|
2687
2730
|
};
|
|
2731
|
+
const drainKeepingUp = () => {
|
|
2732
|
+
if (state.draining === true) return;
|
|
2733
|
+
state.draining = true;
|
|
2734
|
+
stopIntake();
|
|
2735
|
+
log.line(`stopping: taking no more work, ${state.jobs.size} build(s) still managed \xB7 docker stop ends this container`);
|
|
2736
|
+
};
|
|
2737
|
+
const leave = () => {
|
|
2738
|
+
if (exited) return;
|
|
2739
|
+
log.line(`stopping: leaving ${state.jobs.size} running build(s) for the next runner to adopt`);
|
|
2740
|
+
state.draining = true;
|
|
2741
|
+
finish2();
|
|
2742
|
+
deps.image?.exit?.(0);
|
|
2743
|
+
};
|
|
2688
2744
|
const stopNow = async () => {
|
|
2689
2745
|
if (stopping) return;
|
|
2690
2746
|
stopping = true;
|
|
@@ -2705,6 +2761,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
2705
2761
|
const handle = { state, drain, stopNow, close };
|
|
2706
2762
|
process.on("SIGTERM", onSigterm);
|
|
2707
2763
|
process.on("SIGUSR1", onSigusr1);
|
|
2764
|
+
if (deps.image !== void 0) process.on("SIGUSR2", onSigusr2);
|
|
2708
2765
|
process.on("SIGINT", onSigint);
|
|
2709
2766
|
deps.onReady?.();
|
|
2710
2767
|
await tick(state);
|
|
@@ -2717,7 +2774,8 @@ function describeWaiting(active, nowMs) {
|
|
|
2717
2774
|
}
|
|
2718
2775
|
var RunnerStartError = class extends Error {
|
|
2719
2776
|
};
|
|
2720
|
-
async function requestStop(configPath, stopNow = false, pollMs = 5e3) {
|
|
2777
|
+
async function requestStop(configPath, stopNow = false, pollMs = 5e3, options = {}) {
|
|
2778
|
+
const kill = options.kill ?? ((pid, signal2) => process.kill(pid, signal2));
|
|
2721
2779
|
const entry = readPidFile(pidFilePath(configPath));
|
|
2722
2780
|
if (!entry) {
|
|
2723
2781
|
process.stdout.write("no runner is running on this config\n");
|
|
@@ -2729,9 +2787,9 @@ async function requestStop(configPath, stopNow = false, pollMs = 5e3) {
|
|
|
2729
2787
|
`);
|
|
2730
2788
|
return;
|
|
2731
2789
|
}
|
|
2732
|
-
const signal = stopNow ? "SIGUSR1" : "SIGTERM";
|
|
2790
|
+
const signal = stopNow ? "SIGUSR1" : options.image === true ? "SIGUSR2" : "SIGTERM";
|
|
2733
2791
|
try {
|
|
2734
|
-
|
|
2792
|
+
kill(entry.pid, signal);
|
|
2735
2793
|
} catch (err) {
|
|
2736
2794
|
const code = err?.code;
|
|
2737
2795
|
if (code === "EPERM") {
|
|
@@ -2744,6 +2802,14 @@ async function requestStop(configPath, stopNow = false, pollMs = 5e3) {
|
|
|
2744
2802
|
`);
|
|
2745
2803
|
return;
|
|
2746
2804
|
}
|
|
2805
|
+
if (signal === "SIGUSR2") {
|
|
2806
|
+
process.stdout.write(
|
|
2807
|
+
`sent SIGUSR2 to runner pid ${entry.pid}: it takes no more work and keeps managing its builds.
|
|
2808
|
+
The container stays up. Run \`outerlayer runner status\` to see what is left, then \`docker stop\` the container once nothing is.
|
|
2809
|
+
`
|
|
2810
|
+
);
|
|
2811
|
+
return;
|
|
2812
|
+
}
|
|
2747
2813
|
process.stdout.write(
|
|
2748
2814
|
stopNow ? `sent SIGUSR1 to runner pid ${entry.pid}, stopping now
|
|
2749
2815
|
` : `sent SIGTERM to runner pid ${entry.pid}, draining
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { currentLink } from './chunk-
|
|
3
|
+
import { currentLink } from './chunk-VV7ZD5LR.js';
|
|
4
4
|
import { readFileSync, statSync, chmodSync, mkdirSync, writeFileSync, renameSync, rmSync, existsSync, lstatSync, accessSync, constants, realpathSync } from 'fs';
|
|
5
5
|
import { randomBytes } from 'crypto';
|
|
6
6
|
import { join, dirname, delimiter, resolve } from 'path';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { isVersion, compareVersions } from './chunk-TQMI335S.js';
|
|
4
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-KF37SUDM.js';
|
|
5
|
+
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
6
|
+
import { join } from 'path';
|
|
7
|
+
|
|
8
|
+
createRequire(import.meta.url);
|
|
9
|
+
var FILE = "update-status.json";
|
|
10
|
+
var TAG_SHAPE = /^[\w./-]+:[\w.+-]+$/;
|
|
11
|
+
function readUpdateStatus(runnerDirPath) {
|
|
12
|
+
try {
|
|
13
|
+
const raw = JSON.parse(readFileSync(join(runnerDirPath, FILE), "utf8"));
|
|
14
|
+
if (typeof raw.own !== "string" || typeof raw.at !== "string") return void 0;
|
|
15
|
+
const named = typeof raw.named === "string" && isVersion(raw.named) ? raw.named : void 0;
|
|
16
|
+
return {
|
|
17
|
+
own: raw.own,
|
|
18
|
+
...named === void 0 ? {} : { named },
|
|
19
|
+
...named !== void 0 && typeof raw.tag === "string" && TAG_SHAPE.test(raw.tag) ? { tag: raw.tag } : {},
|
|
20
|
+
upgradeRequired: raw.upgradeRequired === true,
|
|
21
|
+
at: raw.at
|
|
22
|
+
};
|
|
23
|
+
} catch {
|
|
24
|
+
return void 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function writeUpdateStatus(runnerDirPath, record) {
|
|
28
|
+
mkdirSync(runnerDirPath, { recursive: true, mode: RUNNER_DIR_MODE });
|
|
29
|
+
const path = join(runnerDirPath, FILE);
|
|
30
|
+
const temp = `${path}.partial-${process.pid}`;
|
|
31
|
+
writeFileSync(temp, JSON.stringify(record, null, 2), { mode: RUNNER_FILE_MODE });
|
|
32
|
+
renameSync(temp, path);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// src/runner/image-tag.ts
|
|
36
|
+
var IMAGE_REPOSITORY = "ghcr.io/outerlayerai/runner";
|
|
37
|
+
var IMAGE_VERSION_VARIABLE = "OUTERLAYER_RUNNER_IMAGE";
|
|
38
|
+
var UNNAMED_VERSION = "<version>";
|
|
39
|
+
function imageTag(version) {
|
|
40
|
+
return `${IMAGE_REPOSITORY}:${version}`;
|
|
41
|
+
}
|
|
42
|
+
function tagToPull(named) {
|
|
43
|
+
return imageTag(named === void 0 ? UNNAMED_VERSION : named);
|
|
44
|
+
}
|
|
45
|
+
function runnerImageVersion(env = process.env) {
|
|
46
|
+
const value = env[IMAGE_VERSION_VARIABLE]?.trim();
|
|
47
|
+
return value === void 0 || value === "" ? void 0 : value;
|
|
48
|
+
}
|
|
49
|
+
function imageAdvice(ownVersion, record) {
|
|
50
|
+
if (record === void 0 || record.own !== ownVersion) return void 0;
|
|
51
|
+
const tag = tagToPull(record.named);
|
|
52
|
+
if (record.upgradeRequired) return { tag, reason: "refused" };
|
|
53
|
+
if (record.named !== void 0 && (compareVersions(ownVersion, record.named) ?? 0) < 0) return { tag, reason: "newer" };
|
|
54
|
+
return void 0;
|
|
55
|
+
}
|
|
56
|
+
function pullInstruction(tag) {
|
|
57
|
+
return `docker pull ${tag}, then recreate the container with the same volume`;
|
|
58
|
+
}
|
|
59
|
+
function readImageStatus(runnerDirPath, env = process.env) {
|
|
60
|
+
const version = runnerImageVersion(env);
|
|
61
|
+
if (version === void 0) return void 0;
|
|
62
|
+
const update = imageAdvice(version, readUpdateStatus(runnerDirPath));
|
|
63
|
+
return update === void 0 ? { version } : { version, update };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { IMAGE_VERSION_VARIABLE, imageAdvice, imageTag, pullInstruction, readImageStatus, readUpdateStatus, runnerImageVersion, tagToPull, writeUpdateStatus };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
3
|
+
import { DEFAULT_UNIT_NAME } from './chunk-DG2ULWM6.js';
|
|
4
4
|
import { parseRunnerEnv } from './chunk-6MZSX4M7.js';
|
|
5
|
-
import { RUNNER_FILE_MODE } from './chunk-
|
|
5
|
+
import { RUNNER_FILE_MODE } from './chunk-KF37SUDM.js';
|
|
6
6
|
import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
|
|
7
7
|
import { join, dirname } from 'path';
|
|
8
8
|
|
|
@@ -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-KF37SUDM.js';
|
|
4
4
|
import { readFileSync, existsSync, rmSync, 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 { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-KF37SUDM.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, 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-BN3CSI7S.js';
|
|
4
4
|
import { symlinkSync, unlinkSync } 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 { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-KF37SUDM.js';
|
|
4
4
|
import { generateKeyPairSync, createPrivateKey, createPublicKey, sign } from 'crypto';
|
|
5
5
|
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
6
6
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { detectActiveSession, autoConnect } from './chunk-
|
|
4
|
-
import { workPageUrl } from './chunk-
|
|
3
|
+
import { detectActiveSession, autoConnect } from './chunk-F2W2IYNP.js';
|
|
4
|
+
import { workPageUrl } from './chunk-V5Q3S4NM.js';
|
|
5
5
|
import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
|
|
6
|
-
import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-
|
|
6
|
+
import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-FKXGQOF5.js';
|
|
7
7
|
import { readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
8
|
-
import { resolveRepoIdentity } from './chunk-
|
|
8
|
+
import { resolveRepoIdentity } from './chunk-D4AMAEZ7.js';
|
|
9
9
|
import { C } from './chunk-ANPNT6PM.js';
|
|
10
10
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
11
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
12
|
-
import { signRunnerRequest } from './chunk-
|
|
12
|
+
import { signRunnerRequest } from './chunk-PVRBE7S4.js';
|
|
13
13
|
|
|
14
14
|
createRequire(import.meta.url);
|
|
15
15
|
|
|
@@ -427,7 +427,7 @@ async function runWorkLinkSession(opts) {
|
|
|
427
427
|
return await linkSession(opts);
|
|
428
428
|
} catch (err) {
|
|
429
429
|
if (opts.logFailures) {
|
|
430
|
-
const { logHookError } = await import('./hook-fast-
|
|
430
|
+
const { logHookError } = await import('./hook-fast-3JL4PXLG.js');
|
|
431
431
|
const reason = err instanceof Error ? err.message : String(err);
|
|
432
432
|
logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
|
|
433
433
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { WorkCommandError, postJson } from './chunk-
|
|
4
|
-
import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-
|
|
5
|
-
import { signingFetchFor } from './chunk-
|
|
3
|
+
import { WorkCommandError, postJson } from './chunk-RVYOOYOA.js';
|
|
4
|
+
import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-E4OUL7ZP.js';
|
|
5
|
+
import { signingFetchFor } from './chunk-FKXGQOF5.js';
|
|
6
6
|
import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-VPEGE3QZ.js';
|
|
7
7
|
import { SHIM_SCRIPT, GOVERNANCE_VARIABLE } from './chunk-HCVLP7XA.js';
|
|
8
8
|
import { readDegraded, readContextManifest, readSourceCache } from './chunk-YQR6E6OV.js';
|
|
9
|
-
import { signerFor } from './chunk-
|
|
10
|
-
import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir } from './chunk-
|
|
9
|
+
import { signerFor } from './chunk-PVRBE7S4.js';
|
|
10
|
+
import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir } from './chunk-KF37SUDM.js';
|
|
11
11
|
import { fstatSync, mkdirSync, writeFileSync, chmodSync, rmSync, lstatSync } from 'fs';
|
|
12
12
|
import { relative, join, dirname } from 'path';
|
|
13
13
|
|
|
@@ -9,6 +9,9 @@ function parse(version) {
|
|
|
9
9
|
if (match === null) return void 0;
|
|
10
10
|
return { core: [Number(match[1]), Number(match[2]), Number(match[3])], pre: match[4] };
|
|
11
11
|
}
|
|
12
|
+
function isVersion(text) {
|
|
13
|
+
return parse(text) !== void 0;
|
|
14
|
+
}
|
|
12
15
|
function comparePre(a, b) {
|
|
13
16
|
const left = a.split(".");
|
|
14
17
|
const right = b.split(".");
|
|
@@ -130,4 +133,4 @@ function satisfiesRange(version, range) {
|
|
|
130
133
|
return anyUnreadable ? void 0 : false;
|
|
131
134
|
}
|
|
132
135
|
|
|
133
|
-
export { compareVersions, satisfiesRange };
|
|
136
|
+
export { compareVersions, isVersion, satisfiesRange };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-
|
|
3
|
+
import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-FWEWFW3F.js';
|
|
4
4
|
import { startTimeOf } from './chunk-JBJTC3UU.js';
|
|
5
5
|
import { CLAUDE_CODE_VERSION, NODE_IMAGE, DEFAULT_BASE_IMAGE, RecipeError, locateRecipe, readRecipe, assertBuildable, TINI_VERSION, GH_VERSION, writeSanitizedRecipe, classifyProperties, GH_SHA256, TINI_SHA256, SANITIZED_NAME } from './chunk-3W333NFO.js';
|
|
6
|
-
import { RUNNER_DIR_MODE, repoCacheDir, imagesDir, attemptStamp, runnerDir, rootfsPathFor, RUNNER_FILE_MODE } from './chunk-
|
|
7
|
-
import { withGitConfig, tokenHeader, PROXY_WARNING_FLAG } from './chunk-
|
|
6
|
+
import { RUNNER_DIR_MODE, repoCacheDir, imagesDir, attemptStamp, runnerDir, rootfsPathFor, RUNNER_FILE_MODE } from './chunk-KF37SUDM.js';
|
|
7
|
+
import { withGitConfig, tokenHeader, PROXY_WARNING_FLAG } from './chunk-BN3CSI7S.js';
|
|
8
8
|
import { RELAY_ID, RELAY_USER } from './chunk-GISNHSYL.js';
|
|
9
9
|
import { mkdirSync, rmSync, existsSync, mkdtempSync, cpSync, readFileSync, writeFileSync, readdirSync, lstatSync, readlinkSync } from 'fs';
|
|
10
10
|
import { tmpdir } from 'os';
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
|
|
4
4
|
import { DEFAULT_DASHBOARD } from './chunk-XSPA5ODY.js';
|
|
5
|
-
import { cliFetch, resolveGatewayCredentials } from './chunk-
|
|
5
|
+
import { cliFetch, resolveGatewayCredentials } from './chunk-FKXGQOF5.js';
|
|
6
6
|
import { writeRepoConnection, findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
7
|
-
import { remoteLookupFailed } from './chunk-
|
|
7
|
+
import { remoteLookupFailed } from './chunk-D4AMAEZ7.js';
|
|
8
8
|
import { readCloudConfig } from './chunk-EABW6AJQ.js';
|
|
9
|
+
import { isAgentsMdLayout } from './chunk-JKNYTNYD.js';
|
|
9
10
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
10
11
|
import { execFileSync } from 'child_process';
|
|
11
12
|
import { createInterface } from 'readline/promises';
|
|
@@ -61,9 +62,20 @@ Then run \`${cliInvocation()} connect\` again.
|
|
|
61
62
|
// src/connect-cmd.ts
|
|
62
63
|
var REQUEST_TIMEOUT_MS = 15e3;
|
|
63
64
|
var COMMIT_LINE = "Commit and push .outerlayer/ so the factory reads your policy and skills. No checks run on your pull requests until the policy is on your default branch.";
|
|
65
|
+
var AGENTS_LAYOUT_COMMIT_LINE = "Commit and push .outerlayer/, AGENTS.md, .agents/, .mcp.json and .claude/skills so the factory reads your policy and skills. No checks run on your pull requests until the policy is on your default branch.";
|
|
66
|
+
var COMMIT_PATHS = [":/.outerlayer"];
|
|
67
|
+
var AGENTS_LAYOUT_COMMIT_PATHS = [":/.outerlayer", ":/AGENTS.md", ":/.agents", ":/.mcp.json", ":/.claude/skills"];
|
|
68
|
+
function inAgentsMdLayout(cwd) {
|
|
69
|
+
const dirs = findGitDirs(cwd);
|
|
70
|
+
return dirs !== void 0 && isAgentsMdLayout(dirs.repoRoot);
|
|
71
|
+
}
|
|
72
|
+
function commitLineFor(cwd) {
|
|
73
|
+
return inAgentsMdLayout(cwd) ? AGENTS_LAYOUT_COMMIT_LINE : COMMIT_LINE;
|
|
74
|
+
}
|
|
64
75
|
function hasUncommittedPolicy(cwd) {
|
|
76
|
+
const paths = inAgentsMdLayout(cwd) ? AGENTS_LAYOUT_COMMIT_PATHS : COMMIT_PATHS;
|
|
65
77
|
try {
|
|
66
|
-
const status = execFileSync("git", ["status", "--porcelain", "--untracked-files=all", "--",
|
|
78
|
+
const status = execFileSync("git", ["status", "--porcelain", "--untracked-files=all", "--", ...paths], {
|
|
67
79
|
cwd,
|
|
68
80
|
encoding: "utf8",
|
|
69
81
|
stdio: "pipe",
|
|
@@ -303,7 +315,7 @@ function connectDocument(r) {
|
|
|
303
315
|
async function runConnectCommand(flags, deps, out) {
|
|
304
316
|
const base = await runConnect(flags, deps);
|
|
305
317
|
const r = base.outcome === "done" && hasUncommittedPolicy(deps.cwd) ? { ...base, text: `${base.text}
|
|
306
|
-
${
|
|
318
|
+
${commitLineFor(deps.cwd)}
|
|
307
319
|
` } : base;
|
|
308
320
|
if (flags.json) {
|
|
309
321
|
out.stdout.write(`${JSON.stringify(connectDocument(r), null, 2)}
|
|
@@ -315,4 +327,4 @@ ${COMMIT_LINE}
|
|
|
315
327
|
return r.code;
|
|
316
328
|
}
|
|
317
329
|
|
|
318
|
-
export { COMMIT_LINE, autoConnectedLine, dashboardBase, fetchFactories, hasUncommittedPolicy, isLinkedRepository, listText, promptOnTerminal, realConnectDeps, runConnect, runConnectCommand, saveFactoryConnection, selectFactory, slug, workPageUrl };
|
|
330
|
+
export { AGENTS_LAYOUT_COMMIT_LINE, COMMIT_LINE, autoConnectedLine, commitLineFor, dashboardBase, fetchFactories, hasUncommittedPolicy, isLinkedRepository, listText, promptOnTerminal, realConnectDeps, runConnect, runConnectCommand, saveFactoryConnection, selectFactory, slug, workPageUrl };
|
|
@@ -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-GU4PKXN7.js';
|
|
4
4
|
import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-3W333NFO.js';
|
|
5
5
|
import { spawnSync } from 'child_process';
|
|
6
6
|
import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-KF37SUDM.js';
|
|
4
4
|
import { readlinkSync, realpathSync, mkdirSync, unlinkSync, symlinkSync, renameSync, readFileSync, writeFileSync, rmSync, existsSync, readdirSync } from 'fs';
|
|
5
5
|
import { join, basename, sep, resolve } from 'path';
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { LiveUploader } from './chunk-
|
|
4
|
-
import { spoolDir } from './chunk-
|
|
5
|
-
import { CaptureDaemon } from './chunk-
|
|
3
|
+
import { LiveUploader } from './chunk-D7K446H6.js';
|
|
4
|
+
import { spoolDir } from './chunk-755WXDBI.js';
|
|
5
|
+
import { CaptureDaemon } from './chunk-D4AMAEZ7.js';
|
|
6
6
|
import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
8
8
|
import { mkdirSync, writeFileSync, rmSync } from 'fs';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { runEmit } from './chunk-WX2WEERU.js';
|
|
4
4
|
import { installStarterPack } from './chunk-VJBFQP3H.js';
|
|
5
|
-
import { resolveGitCommonDir, defaultGitRunner } from './chunk-
|
|
5
|
+
import { resolveGitCommonDir, defaultGitRunner } from './chunk-E4OUL7ZP.js';
|
|
6
6
|
import { addStdioMcpEntryIfAbsent, addDocsMcpEntryIfAbsent, DOCS_MCP_SERVER_NAME } from './chunk-YVZJ6GKF.js';
|
|
7
7
|
import { C } from './chunk-ANPNT6PM.js';
|
|
8
8
|
import { AGENTS_MD_LAYOUT, declareAgentsMdLayout, linkClaudeSkills, SKILLS_LINK_PATH, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-JKNYTNYD.js';
|