@outerlayer/cli 0.33.0-next.20261023030517 → 0.33.0-next.20261023122246
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 +15 -4
- package/dist/{agent-setup-APFM4MZ4.js → agent-setup-YHEW3WXB.js} +10 -10
- package/dist/{artifact-link-cmd-IHHMU4EA.js → artifact-link-cmd-7FYKWA7J.js} +2 -2
- package/dist/{build-disk-55M4ZMDX.js → build-disk-ECTLWTPC.js} +4 -4
- package/dist/build-info.json +1 -1
- package/dist/{builder-DQZCPB7J.js → builder-LUPHKUFM.js} +3 -3
- package/dist/{check-AEMFDR55.js → check-YCFZ3H35.js} +29 -29
- package/dist/{chunk-X62C7V4B.js → chunk-2JLM4GUF.js} +12 -12
- package/dist/{chunk-M24H6JQW.js → chunk-44V5SD4G.js} +1 -1
- package/dist/{chunk-C66Q2CLW.js → chunk-5M2J7B5N.js} +2 -2
- package/dist/{chunk-PNIFQX73.js → chunk-6CXNWKWD.js} +1 -1
- package/dist/{chunk-UAJYWZ2F.js → chunk-6SPD266O.js} +3 -3
- package/dist/{chunk-4NKHOCTF.js → chunk-7IFYI7XF.js} +3 -3
- package/dist/{chunk-HUBRTT2C.js → chunk-7UPMYRPS.js} +4 -4
- package/dist/{chunk-X37GC7DM.js → chunk-7V5GUEDU.js} +1 -1
- package/dist/{chunk-2WZ66FXA.js → chunk-AKZRGFGT.js} +3 -3
- package/dist/{chunk-T4S2DVOA.js → chunk-D3EDZPJR.js} +5 -5
- package/dist/{chunk-35DSTT37.js → chunk-DKFUXYGD.js} +4 -4
- package/dist/{chunk-7HZH5D7H.js → chunk-EHOFFTVX.js} +2 -2
- package/dist/{chunk-6ANIBEQ6.js → chunk-EJL6CWSP.js} +6 -6
- package/dist/{chunk-UHFU3CBN.js → chunk-EXZACZ2P.js} +1 -1
- package/dist/{chunk-V7Q5OKN7.js → chunk-F2D5BSXS.js} +27 -2
- package/dist/{chunk-C7WGCI77.js → chunk-FT7MUQGO.js} +2 -2
- package/dist/{chunk-M3RYZRMH.js → chunk-GO2DUPQS.js} +3 -3
- package/dist/{chunk-CCOU4NXE.js → chunk-HLZMAJJD.js} +2 -2
- package/dist/{chunk-GFTWZSOW.js → chunk-IUPY54BZ.js} +10 -10
- package/dist/{chunk-T4TT76GG.js → chunk-JEVKOZBB.js} +1 -1
- package/dist/{chunk-XMPE5TT4.js → chunk-KUE4V2SK.js} +2 -2
- package/dist/{chunk-DHUHQPRQ.js → chunk-L6MDOEHN.js} +7 -7
- package/dist/{chunk-PJI5D2XT.js → chunk-LYGI3T66.js} +2 -2
- package/dist/{chunk-E4F7YE7P.js → chunk-MPC2UAW2.js} +1 -1
- package/dist/{chunk-QQXNS4G2.js → chunk-NIY2UBT6.js} +1 -1
- package/dist/{chunk-QKEOAQ2W.js → chunk-OGMXVPCS.js} +1 -1
- package/dist/{chunk-A5FFANL7.js → chunk-QKNFU5GA.js} +5 -5
- package/dist/{chunk-AXIK6F52.js → chunk-RAMTJ2XP.js} +15 -15
- package/dist/{chunk-VJGQEASF.js → chunk-S5CNYXUA.js} +4 -4
- package/dist/{chunk-B6WW6AKO.js → chunk-SQQD5MST.js} +4 -4
- package/dist/{chunk-MZYOUIY5.js → chunk-TRP3KPGK.js} +1 -1
- package/dist/{chunk-JB4R5IFJ.js → chunk-UK4RGH46.js} +2 -2
- package/dist/{chunk-PILHDNHX.js → chunk-V673DFOL.js} +4 -4
- package/dist/{chunk-ONUACB5C.js → chunk-VWQCYOBS.js} +2 -2
- package/dist/{chunk-LHKWWEQZ.js → chunk-X4JEBMYN.js} +1 -1
- package/dist/{chunk-Z4GLZTDF.js → chunk-XCRET2GZ.js} +2 -2
- package/dist/{chunk-67KCGRKA.js → chunk-Y6KIGWFO.js} +48 -17
- package/dist/{chunk-5FSVA3CO.js → chunk-YXMGHGHR.js} +5 -5
- package/dist/{chunk-6ZLI652Y.js → chunk-ZF24JN7R.js} +1 -1
- package/dist/chunk-ZUVERBFB.js +81 -0
- package/dist/{claude-launcher-B55NWRH5.js → claude-launcher-YRPW4SWA.js} +5 -5
- package/dist/{cli-5YT5EL2R.js → cli-WFLOFK42.js} +108 -105
- package/dist/{command-DYLRDCGC.js → command-SQ4466SL.js} +19 -19
- package/dist/{config-RRY7DIJG.js → config-MVA7YTFW.js} +5 -5
- package/dist/{connect-cmd-7C6W2SEP.js → connect-cmd-KWXV2CGC.js} +8 -8
- package/dist/{container-start-F7PBMTAL.js → container-start-C4XCYPUA.js} +50 -27
- package/dist/{context-cleanup-EKTPKJJT.js → context-cleanup-A2FGVVPH.js} +3 -3
- package/dist/{context-show-cmd-I5JC7EFH.js → context-show-cmd-6F4UF4ND.js} +9 -9
- package/dist/{control-plane-launch-NOKM6CBH.js → control-plane-launch-7SOH6IMA.js} +6 -6
- package/dist/{dist-LLYL5UCV.js → dist-IG2DKUJJ.js} +2 -2
- package/dist/{docker-W7WWFZ3Q.js → docker-YKYQJHL2.js} +3 -3
- package/dist/{doctor-LYOFFCQS.js → doctor-4YZOP343.js} +20 -20
- package/dist/{emit-artifact-cmd-RO34UG7A.js → emit-artifact-cmd-6QTTWBVN.js} +13 -13
- package/dist/{emit-cmd-GY7Z26DY.js → emit-cmd-3FG7FEGO.js} +6 -6
- package/dist/{emit-criteria-cmd-Y36QCPAM.js → emit-criteria-cmd-22VVCL2W.js} +10 -10
- package/dist/{emit-demo-cmd-YMWVF5U4.js → emit-demo-cmd-IQRS7BP2.js} +168 -46
- package/dist/{emit-finding-cmd-MH3ZWUNV.js → emit-finding-cmd-TXDPJFVT.js} +10 -10
- package/dist/{emit-result-cmd-ZARZZZ3Y.js → emit-result-cmd-QHJDUC7J.js} +12 -12
- package/dist/{emit-step-cmd-A6HQJDBY.js → emit-step-cmd-TQCOLXAA.js} +10 -10
- package/dist/{findings-cmd-OLLBWJXJ.js → findings-cmd-EURKADAY.js} +10 -10
- package/dist/{fleet-readiness-VB5QSFSY.js → fleet-readiness-GXDSFTLP.js} +8 -8
- package/dist/{governing-source-ZX7VXTOA.js → governing-source-IRRP7G5G.js} +13 -13
- package/dist/{hook-fast-4RYMBFPO.js → hook-fast-3IYSWDL4.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/{init-BQCGL7UD.js → init-63X6ECKF.js} +19 -19
- package/dist/{init-NCCMB2UE.js → init-T64C4MID.js} +19 -19
- package/dist/{init-cmd-OW2L5HTI.js → init-cmd-7CGCDLBZ.js} +18 -18
- package/dist/{init-update-7LUMOECE.js → init-update-LFKSC6Y4.js} +17 -17
- package/dist/{install-5BQ3TFBT.js → install-47Z7VNWP.js} +6 -6
- package/dist/{layout-RGVPCX7Y.js → layout-44S4OYLK.js} +4 -4
- package/dist/{login-browser-BC2Z5QKG.js → login-browser-BJZYKWHF.js} +2 -2
- package/dist/{loop-BU634Y6A.js → loop-KRGNTFZ2.js} +29 -29
- package/dist/{machine-RI4KHRYP.js → machine-VBITNWTR.js} +19 -19
- package/dist/{machine-skills-CS5HAQHF.js → machine-skills-GOKW3U5N.js} +4 -4
- package/dist/{runner-env-QSLLOFNF.js → runner-env-ILP6BAC2.js} +7 -7
- package/dist/{runner-identity-DQAXW4DL.js → runner-identity-MF3AYBR6.js} +3 -3
- package/dist/{runner-key-UWL475RU.js → runner-key-5SGBLTDJ.js} +19 -19
- package/dist/{session-sender-OGDUJ2KK.js → session-sender-2DYAJIMM.js} +13 -13
- package/dist/{spec-cmd-WB4UOFPG.js → spec-cmd-E6SINBX6.js} +11 -11
- package/dist/{starter-pack-XHATFTO3.js → starter-pack-FWTXE6XB.js} +5 -5
- package/dist/{status-GFZFND6L.js → status-YVJQWWDP.js} +24 -24
- package/dist/{sync-cmd-GPZD2C45.js → sync-cmd-NGX2PGIW.js} +12 -12
- package/dist/{watch-5I3GURXY.js → watch-ZIWZVU3Z.js} +12 -12
- package/dist/{work-claim-cmd-J52UVCAF.js → work-claim-cmd-GBU2ACRF.js} +16 -16
- package/dist/{work-cmd-PQZ5RYDB.js → work-cmd-OO6K6ELP.js} +10 -10
- package/dist/{work-comment-cmd-WI6B3IOS.js → work-comment-cmd-SY7NY2CR.js} +10 -10
- package/dist/{work-demo-cmd-3NDGSQKJ.js → work-demo-cmd-Y7EU335L.js} +10 -10
- package/dist/{work-logs-cmd-QCYZ5X5A.js → work-logs-cmd-PWOFLTGD.js} +10 -10
- package/dist/{work-open-pr-cmd-BRDF3ZKL.js → work-open-pr-cmd-AJUTKYWN.js} +11 -11
- package/dist/{work-pr-cmd-WY2TBAKW.js → work-pr-cmd-DH43AH3V.js} +10 -10
- package/dist/{work-proofs-cmd-R25HT6WP.js → work-proofs-cmd-6W6DDAP6.js} +10 -10
- package/dist/{work-stop-cmd-C52JPZ4E.js → work-stop-cmd-WZHBEKE4.js} +10 -10
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-build/references/agent-briefs.md +8 -5
- package/skill-pack/maintained/outerlayer-build/references/evidence.md +3 -1
- package/skill-pack/maintained/outerlayer-evidence/SKILL.md +17 -16
- package/dist/chunk-RLAKWXDK.js +0 -36
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
|
|
4
|
-
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-
|
|
4
|
+
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-EXZACZ2P.js';
|
|
5
5
|
import { readDefaultBranchHead, cloneRepository, buildRepositoryImage, prepareImageBuild, KEY_PREFIX, FETCHED_DIR, toolsDockerfile, TAG_HOST, metadataFromLabels, writeRecord, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_VOICE_DIR } from './chunk-YXHKCHWG.js';
|
|
6
6
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
7
7
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
8
8
|
import { runExec, execCapture, waitForAgent } from './chunk-5THSC6BD.js';
|
|
9
9
|
import { GUEST_CID, linkVsockSockets } from './chunk-L26V6ILJ.js';
|
|
10
|
-
import { describeCallFailure, keepStagedContext, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, prefetchGovernedContext, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript, WORKFLOW_PERMISSION_REASON } from './chunk-
|
|
10
|
+
import { describeCallFailure, keepStagedContext, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, prefetchGovernedContext, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript, WORKFLOW_PERMISSION_REASON } from './chunk-XCRET2GZ.js';
|
|
11
11
|
import { runnerImageVersion } from './chunk-MZBQTVFG.js';
|
|
12
|
-
import { runnerCredentialProblem, builtinKind, hostAllowed } from './chunk-
|
|
13
|
-
import { formatBytes, allocatedBytes } from './chunk-
|
|
14
|
-
import { createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, readDu, JUDGE_DIR, MAX_ITEMS_BYTES, JUDGE_ITEMS, MAX_REPORT_BYTES, JUDGE_REPORT, spawnRun } from './chunk-
|
|
12
|
+
import { runnerCredentialProblem, builtinKind, hostAllowed } from './chunk-VWQCYOBS.js';
|
|
13
|
+
import { formatBytes, allocatedBytes } from './chunk-X4JEBMYN.js';
|
|
14
|
+
import { createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, readDu, JUDGE_DIR, MAX_ITEMS_BYTES, JUDGE_ITEMS, MAX_REPORT_BYTES, JUDGE_REPORT, spawnRun } from './chunk-OGMXVPCS.js';
|
|
15
15
|
import { RecipeError, DOCKER_FEATURE, writeSanitizedRecipe, classifyProperties } from './chunk-3Z3MPR55.js';
|
|
16
16
|
import { firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, CLAUDE_CODE_VERSION, guestAssetsPinned, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, builderDiskPinned, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE } from './chunk-NE63JADS.js';
|
|
17
|
-
import { WorkCommandError, getJson } from './chunk-
|
|
18
|
-
import { sanitizeTerminal } from './chunk-
|
|
19
|
-
import { setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-
|
|
17
|
+
import { WorkCommandError, getJson } from './chunk-YXMGHGHR.js';
|
|
18
|
+
import { sanitizeTerminal } from './chunk-MPC2UAW2.js';
|
|
19
|
+
import { setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-NIY2UBT6.js';
|
|
20
20
|
import { signerFor } from './chunk-SOI6K5DY.js';
|
|
21
21
|
import { vmAssetsDir, RUNNER_DIR_MODE, rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, buildsDir, buildDir, runnerDir, deliveryDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, SHIM_DIR, vsockPath, builderCacheDiskPath, builderConsolePath } from './chunk-PA6CK6WQ.js';
|
|
22
22
|
import { parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, claudeCredential, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, repositoriesOf, primaryOf, RELAY_PORT, repositoryPath, CHECKOUT_DIR, lifecycleWorkdir, buildEnvironment, writeBuildMavenSettings, checkEnvironment, AGENT_CREDENTIAL_MISSING, mavenSettingsXml, namesGlobalSettings, MAVEN_NO_PROXY_NOTE, mavenArgs, MAVEN_SPACE_NOTE, writeMavenSettings, checkoutPath, JOB_MOUNT } from './chunk-BALIE3BA.js';
|
|
23
23
|
import { sharedSkillNames, skillConflictMessage } from './chunk-FGF52V4V.js';
|
|
24
24
|
import { versionAtLeast, MINIMUM_CLAUDE_VERSION } from './chunk-HCVLP7XA.js';
|
|
25
|
-
import { orderSessions, extractFacts, sessionsToTimeline } from './chunk-
|
|
26
|
-
import { downconvertSession } from './chunk-
|
|
25
|
+
import { orderSessions, extractFacts, sessionsToTimeline } from './chunk-6CXNWKWD.js';
|
|
26
|
+
import { downconvertSession } from './chunk-F2D5BSXS.js';
|
|
27
27
|
import { realFdStorePort } from './chunk-HACGUL52.js';
|
|
28
28
|
import { RELAY_USER, RELAY_ID, UNKNOWN_TRANSPORT_REASON, DOCKER_DESKTOP_REASON, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath } from './chunk-MESOOLF4.js';
|
|
29
29
|
import { spawn, spawnSync } from 'child_process';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { loadMachineSkillFiles, resolvePackRoot } from './chunk-
|
|
3
|
+
import { loadMachineSkillFiles, resolvePackRoot } from './chunk-44V5SD4G.js';
|
|
4
4
|
import { MAINTAINED_SKILLS, maintainedLineVersion } from './chunk-CDDED64E.js';
|
|
5
5
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
6
6
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { C } from './chunk-ANPNT6PM.js';
|
|
4
|
-
import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-
|
|
4
|
+
import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-44V5SD4G.js';
|
|
5
5
|
import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
|
|
6
6
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
7
7
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
8
|
-
import { linkedAgentsPath } from './chunk-
|
|
8
|
+
import { linkedAgentsPath } from './chunk-ZF24JN7R.js';
|
|
9
9
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
10
10
|
import { join, dirname } from 'path';
|
|
11
11
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { runEmit } from './chunk-
|
|
3
|
+
import { runEmit } from './chunk-V673DFOL.js';
|
|
4
4
|
import { addStdioMcpEntryIfAbsent, addDocsMcpEntryIfAbsent, DOCS_MCP_SERVER_NAME } from './chunk-KT4CN6OU.js';
|
|
5
|
-
import { installStarterPack } from './chunk-
|
|
6
|
-
import { AGENTS_MD_LAYOUT, declareAgentsMdLayout, linkClaudeSkills, SKILLS_LINK_PATH, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-
|
|
5
|
+
import { installStarterPack } from './chunk-KUE4V2SK.js';
|
|
6
|
+
import { AGENTS_MD_LAYOUT, declareAgentsMdLayout, linkClaudeSkills, SKILLS_LINK_PATH, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-LYGI3T66.js';
|
|
7
7
|
import { C } from './chunk-ANPNT6PM.js';
|
|
8
|
-
import { resolveGitCommonDir, defaultGitRunner } from './chunk-
|
|
9
|
-
import { loadTemplateFiles, loadMaintainedFiles, skillDir, AGENTS_SKILLS_BASE } from './chunk-
|
|
8
|
+
import { resolveGitCommonDir, defaultGitRunner } from './chunk-AKZRGFGT.js';
|
|
9
|
+
import { loadTemplateFiles, loadMaintainedFiles, skillDir, AGENTS_SKILLS_BASE } from './chunk-44V5SD4G.js';
|
|
10
10
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
11
|
-
import { linkedAgentsPath } from './chunk-
|
|
11
|
+
import { linkedAgentsPath } from './chunk-ZF24JN7R.js';
|
|
12
12
|
import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
|
|
13
|
-
import { generatedHeaderSource } from './chunk-
|
|
13
|
+
import { generatedHeaderSource } from './chunk-6CXNWKWD.js';
|
|
14
14
|
import { execFileSync } from 'child_process';
|
|
15
15
|
import { existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
16
16
|
import { join, dirname } from 'path';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE } from './chunk-
|
|
4
|
-
import { normalizePath, CONTEXT_PIN_FILENAME } from './chunk-
|
|
3
|
+
import { AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE } from './chunk-44V5SD4G.js';
|
|
4
|
+
import { normalizePath, CONTEXT_PIN_FILENAME } from './chunk-6CXNWKWD.js';
|
|
5
5
|
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, lstatSync, readlinkSync, symlinkSync, rmdirSync } from 'fs';
|
|
6
6
|
import { relative, sep, join } from 'path';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { ArtifactTombstoneRecordSchema, ArtifactSpoolRecordSchema } from './chunk-
|
|
3
|
+
import { ArtifactTombstoneRecordSchema, ArtifactSpoolRecordSchema } from './chunk-F2D5BSXS.js';
|
|
4
4
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
5
5
|
import { mkdirSync, appendFileSync, writeFileSync, renameSync, unlinkSync, existsSync, readdirSync, readFileSync, statSync } from 'fs';
|
|
6
6
|
import { join, dirname } from 'path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, SPEED_MAX_LENGTH, inputBandOf, BUCKET_MODEL_MAX_LENGTH } from './chunk-
|
|
3
|
+
import { EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, SPEED_MAX_LENGTH, inputBandOf, BUCKET_MODEL_MAX_LENGTH } from './chunk-F2D5BSXS.js';
|
|
4
4
|
import { createHash } from 'crypto';
|
|
5
5
|
import { readFileSync, readdirSync, statSync, mkdirSync, copyFileSync, renameSync, unlinkSync, writeFileSync, stat as stat$1, unwatchFile, watchFile, watch as watch$1 } from 'fs';
|
|
6
6
|
import { type, homedir } from 'os';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { RecipeError } from './chunk-3Z3MPR55.js';
|
|
4
4
|
import { BUILDKIT_IMAGE } from './chunk-NE63JADS.js';
|
|
5
|
-
import { compareVersions } from './chunk-
|
|
5
|
+
import { compareVersions } from './chunk-NIY2UBT6.js';
|
|
6
6
|
import { ensureHostKey } from './chunk-SOI6K5DY.js';
|
|
7
7
|
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-PA6CK6WQ.js';
|
|
8
8
|
import { CLAUDE_PORT, JOB_MOUNT, GATEWAY_PORT, GATEWAY_SOCKET, CLAUDE_SOCKET, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-BALIE3BA.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
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-D3EDZPJR.js';
|
|
4
4
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
5
5
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
6
|
-
import { autoConnect } from './chunk-
|
|
7
|
-
import { readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, sanitizeTerminal, appendArtifactTombstone } from './chunk-
|
|
8
|
-
import { resolveRepoIdentity } from './chunk-
|
|
6
|
+
import { autoConnect } from './chunk-HLZMAJJD.js';
|
|
7
|
+
import { readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, sanitizeTerminal, appendArtifactTombstone } from './chunk-MPC2UAW2.js';
|
|
8
|
+
import { resolveRepoIdentity } from './chunk-NIY2UBT6.js';
|
|
9
9
|
import { C } from './chunk-ANPNT6PM.js';
|
|
10
10
|
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
11
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
12
12
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
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-
|
|
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-F2D5BSXS.js';
|
|
14
14
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
15
15
|
import { createHash, randomUUID } from 'crypto';
|
|
16
16
|
import { statSync, readFileSync, mkdirSync, existsSync, writeFileSync, renameSync, unlinkSync } from 'fs';
|
|
@@ -4,30 +4,30 @@ import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk
|
|
|
4
4
|
import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-HVRQQOMH.js';
|
|
5
5
|
import { writeDockerClientConfig } from './chunk-6LBSAW6I.js';
|
|
6
6
|
import { zodProblem } from './chunk-I3LTIAOR.js';
|
|
7
|
-
import { senderPidfile } from './chunk-
|
|
8
|
-
import { installScrubContext } from './chunk-
|
|
9
|
-
import { ADDED_USER, shellQuote, GH_CONFIG_YML, ghHostsYml, AssetError, obtainImage, ensureRootfs, makeBuildsDirPrivate, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, startJailedInto, resolveAgentUser, AgentUserError, runBuildSteps, startHostServices, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, closeHostBuild, containerSenderCommand, hostCommandEnvironment, execArgv, signalInContainer, syncInContainer, copyTranscriptsFromContainer, MANAGED_UNJAILED_REASON, senderAliveScript, helperFirecrackerNote, stopJailed, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, ROOT_DISK_ID_PREFIX, copyJudgeTree } from './chunk-
|
|
7
|
+
import { senderPidfile } from './chunk-7IFYI7XF.js';
|
|
8
|
+
import { installScrubContext } from './chunk-D3EDZPJR.js';
|
|
9
|
+
import { ADDED_USER, shellQuote, GH_CONFIG_YML, ghHostsYml, AssetError, obtainImage, ensureRootfs, makeBuildsDirPrivate, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, startJailedInto, resolveAgentUser, AgentUserError, runBuildSteps, startHostServices, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, closeHostBuild, containerSenderCommand, hostCommandEnvironment, execArgv, signalInContainer, syncInContainer, copyTranscriptsFromContainer, MANAGED_UNJAILED_REASON, senderAliveScript, helperFirecrackerNote, stopJailed, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, ROOT_DISK_ID_PREFIX, copyJudgeTree } from './chunk-IUPY54BZ.js';
|
|
10
10
|
import { readBranchHead, fetchCommit, diffBetween } from './chunk-YXHKCHWG.js';
|
|
11
11
|
import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
|
|
12
12
|
import { waitForAgent, vmExecArgs } from './chunk-5THSC6BD.js';
|
|
13
13
|
import { socketPathProblem, vsockLinks, LEASE_LINK, linkVsockSockets } from './chunk-L26V6ILJ.js';
|
|
14
|
-
import { describeCallFailure, resolveGoverningSource, prefetchGovernedContext, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, removeKeptContext, formatDuration, retrySend, formatClock, WORKFLOW_PERMISSION_REASON, keptContextTree } from './chunk-
|
|
15
|
-
import { imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-
|
|
16
|
-
import { DEFAULT_CACHE_DISK, formatBytes, allocatedBytes } from './chunk-
|
|
17
|
-
import { parseSize, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, childEnvironment, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, JUDGE_MAX_TURNS, JUDGE_DIR, COMMAND_DIR, MAX_ITEMS_BYTES } from './chunk-
|
|
14
|
+
import { describeCallFailure, resolveGoverningSource, prefetchGovernedContext, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, removeKeptContext, formatDuration, retrySend, formatClock, WORKFLOW_PERMISSION_REASON, keptContextTree } from './chunk-XCRET2GZ.js';
|
|
15
|
+
import { imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-VWQCYOBS.js';
|
|
16
|
+
import { DEFAULT_CACHE_DISK, formatBytes, allocatedBytes } from './chunk-X4JEBMYN.js';
|
|
17
|
+
import { parseSize, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, childEnvironment, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, JUDGE_MAX_TURNS, JUDGE_DIR, COMMAND_DIR, MAX_ITEMS_BYTES } from './chunk-OGMXVPCS.js';
|
|
18
18
|
import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-NE63JADS.js';
|
|
19
|
-
import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-
|
|
20
|
-
import { planArtifactUpload } from './chunk-
|
|
21
|
-
import { scrubText } from './chunk-
|
|
19
|
+
import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-YXMGHGHR.js';
|
|
20
|
+
import { planArtifactUpload } from './chunk-MPC2UAW2.js';
|
|
21
|
+
import { scrubText } from './chunk-NIY2UBT6.js';
|
|
22
22
|
import { readCloudConfig } from './chunk-PJDQPF5N.js';
|
|
23
23
|
import { signerFor } from './chunk-SOI6K5DY.js';
|
|
24
24
|
import { RUNNER_FILE_MODE, runnerDir, buildDir, vsockPath, jobConsolePath } from './chunk-PA6CK6WQ.js';
|
|
25
|
-
import { JOB_MOUNT, claudeCredential, repositoriesOf, primaryOf, buildEnvironment, CHECKOUT_DIR, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, authorEnvironment, withTunnelRecord, commitIdentityRecord, buildMavenSettingsXml,
|
|
26
|
-
import { resolvePackRoot } from './chunk-
|
|
25
|
+
import { JOB_MOUNT, claudeCredential, repositoriesOf, primaryOf, buildEnvironment, CHECKOUT_DIR, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, authorEnvironment, withTunnelRecord, commitIdentityRecord, buildMavenSettingsXml, CLAUDE_CREDENTIAL_VARIABLES, currentClaudeCredential, removedClaudeCredentialValues, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, MAVEN_SETTINGS_FILE, checkEnvironment, EVAL_INPUT_DIR } from './chunk-BALIE3BA.js';
|
|
26
|
+
import { resolvePackRoot } from './chunk-44V5SD4G.js';
|
|
27
27
|
import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
|
|
28
28
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
29
|
-
import { parsePolicy } from './chunk-
|
|
30
|
-
import { CheckItemsSchema, CHECK_ITEM_REASON_MAX_LENGTH } from './chunk-
|
|
29
|
+
import { parsePolicy } from './chunk-6CXNWKWD.js';
|
|
30
|
+
import { CheckItemsSchema, CHECK_ITEM_REASON_MAX_LENGTH } from './chunk-F2D5BSXS.js';
|
|
31
31
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
32
32
|
import { fdName } from './chunk-HACGUL52.js';
|
|
33
33
|
import { RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON } from './chunk-MESOOLF4.js';
|
|
@@ -3547,4 +3547,4 @@ async function stopSender(input) {
|
|
|
3547
3547
|
}
|
|
3548
3548
|
}
|
|
3549
3549
|
|
|
3550
|
-
export { ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, MICROVM_COMMAND_DIR, RENEW_INTERVAL_SECONDS, appendCommandLog, commandLogOffset, deliverCommitHooks, describeHookEnd, finishJob, foldSample, hookLimitsFor, inTeardown, isContainerTracked, isGroupAlive, isIdle, isMicroVmTracked, isReadable, isTimedOut, isTracked, isUnfinished, jobEnv, judgeProbe, listAdoptableJobs, listTrackedJobs, listUnreadableJobs, microVmCommandLine, microVmOomKills, needsRenew, outcomeFromExitCode, probeCommand, probeMicroVmCommand, provisionMicroVm, provisionProcess, readCpuUsec, readProvisionOut, recoverLostJobs, releaseLease, renewLease, restartSender, retryFailedReleases, runCommand, runHook, sampleGuest, serveLease, setStage, startMicroVmCommand, startSender, stopOrphanedMicroVms, unfinishedJobs, vmAlive, workdirProblem, writeGuestGhConfig };
|
|
3550
|
+
export { ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, MICROVM_COMMAND_DIR, RENEW_INTERVAL_SECONDS, appendCommandLog, commandLogOffset, deliverCommitHooks, describeHookEnd, finishJob, foldSample, hookLimitsFor, inTeardown, isContainerTracked, isGroupAlive, isIdle, isMicroVmTracked, isReadable, isTimedOut, isTracked, isUnfinished, jobEnv, judgeProbe, listAdoptableJobs, listTrackedJobs, listUnreadableJobs, microVmCommandLine, microVmOomKills, needsRenew, outcomeFromExitCode, probeCommand, probeMicroVmCommand, provisionMicroVm, provisionProcess, readCpuUsec, readProvisionOut, recoverLostJobs, releaseLease, renewLease, restartSender, retryFailedReleases, runCommand, runHook, sampleGuest, scrubReason, serveLease, setStage, startMicroVmCommand, startSender, stopOrphanedMicroVms, stripTerminalControls, unfinishedJobs, vmAlive, workdirProblem, writeGuestGhConfig };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { sanitizeTerminal } from './chunk-
|
|
4
|
-
import { remoteLookupFailed } from './chunk-
|
|
5
|
-
import { isAgentsMdLayout } from './chunk-
|
|
6
|
-
import { DEFAULT_DASHBOARD } from './chunk-
|
|
3
|
+
import { sanitizeTerminal } from './chunk-MPC2UAW2.js';
|
|
4
|
+
import { remoteLookupFailed } from './chunk-NIY2UBT6.js';
|
|
5
|
+
import { isAgentsMdLayout } from './chunk-LYGI3T66.js';
|
|
6
|
+
import { DEFAULT_DASHBOARD } from './chunk-7V5GUEDU.js';
|
|
7
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';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { placeholderQueues, placeholderProblem } from './chunk-
|
|
4
|
-
import { checkFit } from './chunk-
|
|
5
|
-
import { builtinKind, imageBuildOf } from './chunk-
|
|
6
|
-
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-
|
|
3
|
+
import { placeholderQueues, placeholderProblem } from './chunk-IUPY54BZ.js';
|
|
4
|
+
import { checkFit } from './chunk-EHOFFTVX.js';
|
|
5
|
+
import { builtinKind, imageBuildOf } from './chunk-VWQCYOBS.js';
|
|
6
|
+
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-X4JEBMYN.js';
|
|
7
7
|
import { builderDiskPinned } from './chunk-NE63JADS.js';
|
|
8
8
|
import { claudeCredentialVariablesSet, claudeCredential } from './chunk-BALIE3BA.js';
|
|
9
9
|
import { closeSync, openSync, constants } from 'fs';
|
|
@@ -680,11 +680,11 @@ async function missingControlPlane(cwd, sessionId, home, env) {
|
|
|
680
680
|
const dirs = findGitDirs(cwd);
|
|
681
681
|
if (dirs === void 0) return void 0;
|
|
682
682
|
if (existsSync(join(dirs.gitCommonDir, "outerlayer", "materialized.json")) || hasExcludeBlock(dirs.gitCommonDir)) {
|
|
683
|
-
const { cleanupEarlierCopies } = await import('./context-cleanup-
|
|
683
|
+
const { cleanupEarlierCopies } = await import('./context-cleanup-A2FGVVPH.js');
|
|
684
684
|
cleanupEarlierCopies(dirs);
|
|
685
685
|
}
|
|
686
686
|
if (!contextPossiblyGoverned(cwd, home)) return void 0;
|
|
687
|
-
const { governanceOf } = await import('./control-plane-launch-
|
|
687
|
+
const { governanceOf } = await import('./control-plane-launch-7SOH6IMA.js');
|
|
688
688
|
if (await governanceOf({ cwd, env, home }) !== "governed") return void 0;
|
|
689
689
|
recordMissingContext(dirs, sessionId, home);
|
|
690
690
|
const launcher = `${cliInvocation()} claude`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-
|
|
3
|
+
import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-LYGI3T66.js';
|
|
4
4
|
import { C } from './chunk-ANPNT6PM.js';
|
|
5
|
-
import { retiredSkillPaths, removeRetiredSkills } from './chunk-
|
|
6
|
-
import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-
|
|
5
|
+
import { retiredSkillPaths, removeRetiredSkills } from './chunk-FT7MUQGO.js';
|
|
6
|
+
import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-44V5SD4G.js';
|
|
7
7
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
8
|
-
import { emitTree, generatedHeaderSource, parseOuterlayerConfig, classifyTree } from './chunk-
|
|
8
|
+
import { emitTree, generatedHeaderSource, parseOuterlayerConfig, classifyTree } from './chunk-6CXNWKWD.js';
|
|
9
9
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, copyFileSync, unlinkSync, rmdirSync, readdirSync } from 'fs';
|
|
10
10
|
import { join, dirname } from 'path';
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-
|
|
4
|
-
import { parseSize } from './chunk-
|
|
3
|
+
import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-X4JEBMYN.js';
|
|
4
|
+
import { parseSize } from './chunk-OGMXVPCS.js';
|
|
5
5
|
import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-BALIE3BA.js';
|
|
6
6
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
7
7
|
import { existsSync, statSync, accessSync, constants, readFileSync } from 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-
|
|
3
|
+
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-OGMXVPCS.js';
|
|
4
4
|
import { buildsDir, rootfsDir, runnerDir, imagesDir, builderCacheDiskPath } from './chunk-PA6CK6WQ.js';
|
|
5
5
|
import { spawnSync } from 'child_process';
|
|
6
6
|
import { statfsSync, statSync, existsSync, readdirSync } from 'fs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { WorkCommandError, postJson } from './chunk-
|
|
4
|
-
import { defaultGitRunner, materializeContext, fetchControlPlaneCommit, lookupGoverningSource } from './chunk-
|
|
3
|
+
import { WorkCommandError, postJson } from './chunk-YXMGHGHR.js';
|
|
4
|
+
import { defaultGitRunner, materializeContext, fetchControlPlaneCommit, lookupGoverningSource } from './chunk-AKZRGFGT.js';
|
|
5
5
|
import { signingFetchFor } from './chunk-6RKD7YZ6.js';
|
|
6
6
|
import { signerFor } from './chunk-SOI6K5DY.js';
|
|
7
7
|
import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-PA6CK6WQ.js';
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, readProvisionOut, workdirProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, startSender, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, serveLease, vmAlive, writeGuestGhConfig, ALREADY_RELEASED, inTeardown } from './chunk-AXIK6F52.js';
|
|
4
3
|
import { writePendingUpdate } from './chunk-GH246BGV.js';
|
|
5
|
-
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
6
4
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-57L2YAJA.js';
|
|
7
5
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
8
6
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
9
|
-
import { fitImageBuildMemory } from './chunk-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-ZUVERBFB.js';
|
|
8
|
+
import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, readProvisionOut, workdirProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, startSender, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, serveLease, vmAlive, writeGuestGhConfig, ALREADY_RELEASED, inTeardown } from './chunk-RAMTJ2XP.js';
|
|
9
|
+
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
10
|
+
import { RUNNER_PROTOCOL } from './chunk-TRP3KPGK.js';
|
|
11
|
+
import { realBlockedProbes, checkBlockedWithSlots, keepsHostBuilder } from './chunk-SQQD5MST.js';
|
|
12
12
|
import { writeMarker, readMarker, currentVersion, removeMarker, entryIn, versionDir, startedThroughCurrent, switchCurrent, isInLayout, cleanVersions, stagingDir } from './chunk-NBZ7XBT6.js';
|
|
13
13
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
14
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, LEASE_SECONDS, attemptNote, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionEnvironment, resolveHostBuild, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, containerCommandExec, execCommandLine, startHostServices, setUpRunnerCgroup, sweepImageBuilders, measureDisk, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, gitRemoteFor, startServicesFor, createLeaseChannel } from './chunk-
|
|
14
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, LEASE_SECONDS, attemptNote, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionEnvironment, resolveHostBuild, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, containerCommandExec, execCommandLine, startHostServices, setUpRunnerCgroup, sweepImageBuilders, measureDisk, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, gitRemoteFor, startServicesFor, createLeaseChannel } from './chunk-IUPY54BZ.js';
|
|
15
15
|
import { claimPidFile, writePidFile, readPidFile, releasePidFile } from './chunk-F5UL23I2.js';
|
|
16
16
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
17
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-
|
|
17
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-XCRET2GZ.js';
|
|
18
18
|
import { tagToPull, pullInstruction, imageTag, writeUpdateStatus } from './chunk-MZBQTVFG.js';
|
|
19
19
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
20
|
-
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-
|
|
21
|
-
import { freeBytes, formatBytes, volumeBytes } from './chunk-
|
|
22
|
-
import { writeJobFile, ensureRunnerIdentity, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-
|
|
23
|
-
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-
|
|
20
|
+
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-VWQCYOBS.js';
|
|
21
|
+
import { freeBytes, formatBytes, volumeBytes } from './chunk-X4JEBMYN.js';
|
|
22
|
+
import { writeJobFile, ensureRunnerIdentity, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-OGMXVPCS.js';
|
|
23
|
+
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-YXMGHGHR.js';
|
|
24
24
|
import { loadHostKey, ensureHostKey, signerFor } from './chunk-SOI6K5DY.js';
|
|
25
25
|
import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, spoolDir, imagesDir, rootfsDir, builderCacheDiskPath } from './chunk-PA6CK6WQ.js';
|
|
26
26
|
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT, takeClaudeCredential, heldClaudeCredential, currentClaudeCredential } from './chunk-BALIE3BA.js';
|
|
@@ -1864,7 +1864,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
1864
1864
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
1865
1865
|
);
|
|
1866
1866
|
async function tryClaimAndStart(state, item, queue) {
|
|
1867
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
1867
|
+
const { postJson: postJson2 } = await import('./work-cmd-OO6K6ELP.js');
|
|
1868
1868
|
const log = logOf(state);
|
|
1869
1869
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
1870
1870
|
const claim = await retrySend(
|
|
@@ -2813,21 +2813,26 @@ async function probeCredentials(config, fetchImpl = fetch) {
|
|
|
2813
2813
|
return { ok: true };
|
|
2814
2814
|
} catch (err) {
|
|
2815
2815
|
const status = err instanceof WorkCommandError ? err.status : void 0;
|
|
2816
|
+
const code = err instanceof WorkCommandError ? err.code : void 0;
|
|
2816
2817
|
if (err instanceof WorkCommandError && isSignatureRefusal(err.code)) {
|
|
2817
2818
|
return {
|
|
2818
2819
|
ok: false,
|
|
2819
2820
|
fatal: err.code === "runner_key_signature_invalid",
|
|
2820
|
-
reason: `${config.configPath}: ${err.message}
|
|
2821
|
+
reason: `${config.configPath}: ${err.message}`,
|
|
2822
|
+
status,
|
|
2823
|
+
code
|
|
2821
2824
|
};
|
|
2822
2825
|
}
|
|
2823
2826
|
if (status === 401 || status === 403) {
|
|
2824
2827
|
return {
|
|
2825
2828
|
ok: false,
|
|
2826
2829
|
fatal: true,
|
|
2827
|
-
reason: `${config.configPath}: the API key was refused (${status}). A runner key needs git.read and work.read to list and read work items, and work.claim to claim, renew and release
|
|
2830
|
+
reason: `${config.configPath}: the API key was refused (${status}). A runner key needs git.read and work.read to list and read work items, and work.claim to claim, renew and release.`,
|
|
2831
|
+
status,
|
|
2832
|
+
code
|
|
2828
2833
|
};
|
|
2829
2834
|
}
|
|
2830
|
-
return { ok: false, fatal: false, reason: describeCallFailure(err) };
|
|
2835
|
+
return { ok: false, fatal: false, reason: describeCallFailure(err), status, code };
|
|
2831
2836
|
}
|
|
2832
2837
|
}
|
|
2833
2838
|
async function rejoinContainerBuild(state, adopted) {
|
|
@@ -3071,6 +3076,15 @@ function hooksOf(configPath) {
|
|
|
3071
3076
|
}
|
|
3072
3077
|
}
|
|
3073
3078
|
async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
3079
|
+
const startup = {};
|
|
3080
|
+
try {
|
|
3081
|
+
return await startRunner(configPath, deps, startup);
|
|
3082
|
+
} catch (err) {
|
|
3083
|
+
await startup.report?.(err);
|
|
3084
|
+
throw err;
|
|
3085
|
+
}
|
|
3086
|
+
}
|
|
3087
|
+
async function startRunner(configPath, deps, startup) {
|
|
3074
3088
|
const log = deps.log ??= createRunnerLog(deps.now ?? (() => /* @__PURE__ */ new Date()));
|
|
3075
3089
|
takeClaudeCredential(process.env, hooksOf(configPath));
|
|
3076
3090
|
const update = deps.update;
|
|
@@ -3081,7 +3095,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
3081
3095
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
3082
3096
|
const held = heldClaudeCredential();
|
|
3083
3097
|
const env = held === void 0 ? process.env : { ...process.env, [held.variable]: held.value };
|
|
3084
|
-
return (await import('./check-
|
|
3098
|
+
return (await import('./check-YCFZ3H35.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
3085
3099
|
},
|
|
3086
3100
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
3087
3101
|
log
|
|
@@ -3092,22 +3106,37 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
3092
3106
|
}
|
|
3093
3107
|
}
|
|
3094
3108
|
const loaded = loadRunnerConfig(configPath);
|
|
3109
|
+
let check = "hooks";
|
|
3110
|
+
let probeRefusal;
|
|
3111
|
+
startup.report = (err) => reportFailedStart(
|
|
3112
|
+
{ config: loaded, cliVersion: deps.cliVersion ?? resolveVersion(), check, error: err, refusal: probeRefusal },
|
|
3113
|
+
deps.fetchImpl
|
|
3114
|
+
);
|
|
3095
3115
|
const hookProblem = checkHooks(loaded);
|
|
3096
3116
|
if (hookProblem) throw new RunnerStartError(hookProblem);
|
|
3117
|
+
check = "image";
|
|
3097
3118
|
const { config, note: fitNote } = fitForImage(deps, loaded);
|
|
3119
|
+
check = "host-key";
|
|
3098
3120
|
await ensureHostKey(configPath);
|
|
3121
|
+
check = "identity";
|
|
3099
3122
|
if (builtinKind(config.hooks.provision) === "container" || builtinKind(config.hooks.provision) === "vm") {
|
|
3100
3123
|
await ensureRunnerIdentity(configPath, {
|
|
3101
3124
|
docker: deps.runnerIdentity ?? (deps.container?.host === void 0 ? void 0 : { holdsObjects: async () => false }),
|
|
3102
3125
|
log: (line) => log.error(line)
|
|
3103
3126
|
}).catch((err) => log.error(`the runner's Docker identity could not be stored: ${describeCallFailure(err)} \xB7 using the names its folder's path gives`));
|
|
3104
3127
|
}
|
|
3128
|
+
check = "credentials";
|
|
3105
3129
|
const probe = await probeCredentials(config, deps.fetchImpl);
|
|
3106
|
-
if (!probe.ok && probe.fatal)
|
|
3130
|
+
if (!probe.ok && probe.fatal) {
|
|
3131
|
+
probeRefusal = { status: probe.status, code: probe.code };
|
|
3132
|
+
throw new RunnerStartError(probe.reason);
|
|
3133
|
+
}
|
|
3107
3134
|
if (!probe.ok) log.error(`the gateway did not answer at start: ${probe.reason} \xB7 starting anyway`);
|
|
3135
|
+
check = "pid-file";
|
|
3108
3136
|
mkdirSync(jobsDir(configPath), { recursive: true, mode: RUNNER_DIR_MODE });
|
|
3109
3137
|
const self = { pid: process.pid, start: startTimeOf(process.pid) ?? "" };
|
|
3110
3138
|
claimPidFile(pidFilePath(configPath), self);
|
|
3139
|
+
check = "cgroup";
|
|
3111
3140
|
const { delegated, refusal } = setUpRunnerCgroup();
|
|
3112
3141
|
if (refusal !== void 0) log.error(`the kernel refused a cgroup step for the runner's service: ${refusal}`);
|
|
3113
3142
|
if (isBuiltinVm(config.hooks.provision) && !delegated) {
|
|
@@ -3122,6 +3151,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
3122
3151
|
const state = { config, jobs: /* @__PURE__ */ new Map(), deps, configMtimeMs };
|
|
3123
3152
|
log.line(`runner ${config.host} started \xB7 config ${configPath} \xB7 ${describeConfig(config)}`);
|
|
3124
3153
|
if (fitNote !== void 0) log.line(fitNote);
|
|
3154
|
+
check = "recovery";
|
|
3125
3155
|
const leavesBuilds = await canLeaveBuilds(state);
|
|
3126
3156
|
let sigusr2Target;
|
|
3127
3157
|
let sigusr2Early = false;
|
|
@@ -3189,6 +3219,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
|
|
|
3189
3219
|
`recovered job ${recovered.queue} #${recovered.item} (claim ${shortClaim(recovered.claimId)}) as ${recovered.outcome ?? "interrupted"}: ${why}`
|
|
3190
3220
|
);
|
|
3191
3221
|
}
|
|
3222
|
+
startup.report = void 0;
|
|
3192
3223
|
let intakeClosed = false;
|
|
3193
3224
|
let closed = false;
|
|
3194
3225
|
let stopping = false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
4
|
-
import { autoConnect } from './chunk-
|
|
5
|
-
import { workPageUrl } from './chunk-
|
|
6
|
-
import { sanitizeTerminal } from './chunk-
|
|
7
|
-
import { resolveRepoIdentity } from './chunk-
|
|
4
|
+
import { autoConnect } from './chunk-HLZMAJJD.js';
|
|
5
|
+
import { workPageUrl } from './chunk-S5CNYXUA.js';
|
|
6
|
+
import { sanitizeTerminal } from './chunk-MPC2UAW2.js';
|
|
7
|
+
import { resolveRepoIdentity } from './chunk-NIY2UBT6.js';
|
|
8
8
|
import { C } from './chunk-ANPNT6PM.js';
|
|
9
9
|
import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-6RKD7YZ6.js';
|
|
10
10
|
import { signRunnerRequest } from './chunk-SOI6K5DY.js';
|
|
@@ -442,7 +442,7 @@ async function runWorkLinkSession(opts) {
|
|
|
442
442
|
return await linkSession(opts);
|
|
443
443
|
} catch (err) {
|
|
444
444
|
if (opts.logFailures) {
|
|
445
|
-
const { logHookError } = await import('./hook-fast-
|
|
445
|
+
const { logHookError } = await import('./hook-fast-3IYSWDL4.js');
|
|
446
446
|
const reason = err instanceof Error ? err.message : String(err);
|
|
447
447
|
logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
|
|
448
448
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readContextManifest, removeContextManifest } from './chunk-YQR6E6OV.js';
|
|
4
4
|
import { removePreCommitGuardHook } from './chunk-TUSYOL2O.js';
|
|
5
|
-
import { CONTEXT_PIN_FILENAME } from './chunk-
|
|
5
|
+
import { CONTEXT_PIN_FILENAME } from './chunk-6CXNWKWD.js';
|
|
6
6
|
import { execFileSync } from 'child_process';
|
|
7
7
|
import { lstatSync, existsSync, unlinkSync, readdirSync, rmdirSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
8
8
|
import { join, dirname, isAbsolute } from 'path';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { scrubReason, stripTerminalControls } from './chunk-RAMTJ2XP.js';
|
|
4
|
+
import { RunnerAlreadyRunningError, readPidFile } from './chunk-F5UL23I2.js';
|
|
5
|
+
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
6
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-EHOFFTVX.js';
|
|
7
|
+
import { isSignatureRefusal, postJson } from './chunk-YXMGHGHR.js';
|
|
8
|
+
import { signerFor } from './chunk-SOI6K5DY.js';
|
|
9
|
+
import { pidFilePath } from './chunk-PA6CK6WQ.js';
|
|
10
|
+
import { readFileSync } from 'fs';
|
|
11
|
+
|
|
12
|
+
createRequire(import.meta.url);
|
|
13
|
+
var GIB = 1024 ** 3;
|
|
14
|
+
var DEFAULT_GIB = 8;
|
|
15
|
+
var MINIMUM_GIB = 4;
|
|
16
|
+
var BUILD_MEMORY_VARIABLE = "OUTERLAYER_BUILD_MEMORY";
|
|
17
|
+
function memoryIsSet(configPath) {
|
|
18
|
+
try {
|
|
19
|
+
const raw = JSON.parse(readFileSync(configPath, "utf8"));
|
|
20
|
+
return raw.runner.build.memory !== void 0;
|
|
21
|
+
} catch {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function gib(bytes) {
|
|
26
|
+
return `${Number((bytes / GIB).toFixed(1))} GiB`;
|
|
27
|
+
}
|
|
28
|
+
function fitImageBuildMemory(config, totalMemoryBytes) {
|
|
29
|
+
if (memoryIsSet(config.configPath)) return { config };
|
|
30
|
+
const current = config.build?.memory ?? `${DEFAULT_GIB}g`;
|
|
31
|
+
if (checkFit({ concurrency: config.concurrency, buildMemory: current, usableBytes: totalMemoryBytes }).fits) return { config };
|
|
32
|
+
const available = Math.max(0, totalMemoryBytes - RUNNER_RESERVE_BYTES);
|
|
33
|
+
const perBuild = Math.floor(available / config.concurrency / GIB);
|
|
34
|
+
if (perBuild < MINIMUM_GIB) return { config };
|
|
35
|
+
const memory = `${perBuild}g`;
|
|
36
|
+
return {
|
|
37
|
+
config: { ...config, build: { ...config.build, memory } },
|
|
38
|
+
note: `builds get ${memory} of memory to fit this machine's ${gib(totalMemoryBytes)}; set ${BUILD_MEMORY_VARIABLE} to choose another value`
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/runner/startup-report.ts
|
|
43
|
+
var REPORT_TIMEOUT_MS = 5e3;
|
|
44
|
+
var EMPTY_MESSAGE = "the check failed with no message";
|
|
45
|
+
async function reportFailedStart(failed, fetchImpl, deps = {}) {
|
|
46
|
+
try {
|
|
47
|
+
if (failed.error instanceof RunnerAlreadyRunningError || refusesReport(failed.refusal)) return;
|
|
48
|
+
if (otherRunnerLive(failed.config.configPath, deps.isSameProcess ?? isSameProcess)) return;
|
|
49
|
+
await sendStartupReport(failed, fetchImpl, deps);
|
|
50
|
+
} catch {
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function refusesReport(refusal) {
|
|
54
|
+
return refusal !== void 0 && (refusal.status === 401 || isSignatureRefusal(refusal.code));
|
|
55
|
+
}
|
|
56
|
+
function otherRunnerLive(configPath, isSame) {
|
|
57
|
+
const entry = readPidFile(pidFilePath(configPath));
|
|
58
|
+
return entry !== null && entry.pid !== process.pid && isSame(entry.pid, entry.start);
|
|
59
|
+
}
|
|
60
|
+
async function sendStartupReport(failed, fetchImpl, deps) {
|
|
61
|
+
const now = deps.now ?? (() => performance.now());
|
|
62
|
+
const startedAt = now();
|
|
63
|
+
const { config } = failed;
|
|
64
|
+
const text = failed.error instanceof Error ? failed.error.message : String(failed.error);
|
|
65
|
+
const message = (deps.scrub ?? scrubReason)(stripTerminalControls(text), config) ?? EMPTY_MESSAGE;
|
|
66
|
+
const signer = await signerFor(config.configPath).catch(() => void 0);
|
|
67
|
+
const left = REPORT_TIMEOUT_MS - (now() - startedAt);
|
|
68
|
+
if (left <= 0) return;
|
|
69
|
+
await postJson(
|
|
70
|
+
config.url,
|
|
71
|
+
"/v1/hosts/startup-report",
|
|
72
|
+
config.apiKey,
|
|
73
|
+
config.appId,
|
|
74
|
+
{ host: config.host, cliVersion: failed.cliVersion, check: failed.check, message },
|
|
75
|
+
fetchImpl,
|
|
76
|
+
left,
|
|
77
|
+
signer
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { BUILD_MEMORY_VARIABLE, fitImageBuildMemory, reportFailedStart };
|