@outerlayer/cli 0.13.0 → 0.14.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/agent-setup-CN2HUBEJ.js +26 -0
  3. package/dist/{build-LELVCWHV.js → build-BG2YENGK.js} +2 -2
  4. package/dist/build-info.json +1 -1
  5. package/dist/{builder-UUS4ORDH.js → builder-2D3WSOOY.js} +4 -4
  6. package/dist/{check-63IDCEEV.js → check-SRGR36KI.js} +30 -30
  7. package/dist/{chunk-GI4XXD4I.js → chunk-3NLOVYJQ.js} +4 -4
  8. package/dist/{chunk-C6IV5BV7.js → chunk-4OGPT6I2.js} +11 -11
  9. package/dist/{chunk-DXQ5MHCO.js → chunk-FOJGZYFC.js} +11 -5
  10. package/dist/{chunk-HDTVTA6I.js → chunk-HFKKFTXU.js} +11 -15
  11. package/dist/{chunk-DPKX26LT.js → chunk-HFKQIZXL.js} +9 -6
  12. package/dist/{chunk-6S3H3J6H.js → chunk-JJEGKEFV.js} +5 -7
  13. package/dist/{chunk-P6FX4D43.js → chunk-JYIEHQIF.js} +1 -1
  14. package/dist/{chunk-XJKL4BNU.js → chunk-KFRM23WD.js} +2 -2
  15. package/dist/{chunk-3KTA5UU2.js → chunk-KMDLFI4P.js} +1 -1
  16. package/dist/{chunk-3D4OYFCD.js → chunk-MSASO5O4.js} +42 -6
  17. package/dist/chunk-MTF3PHVZ.js +161 -0
  18. package/dist/{chunk-SVEP7PVH.js → chunk-NHDVD7DU.js} +9 -9
  19. package/dist/{chunk-EFZLAYPE.js → chunk-NPQWKGUA.js} +1 -1
  20. package/dist/{chunk-SFFHGX3G.js → chunk-PQUM37BK.js} +1 -1
  21. package/dist/{chunk-MJXXRX4M.js → chunk-Q2UK3C4P.js} +2 -2
  22. package/dist/{chunk-MZN7AQOB.js → chunk-RBKIH5ST.js} +11 -11
  23. package/dist/{chunk-TOPDNXHZ.js → chunk-SMHOCDCI.js} +4 -4
  24. package/dist/{chunk-P4MM66C6.js → chunk-SWHQ4LUM.js} +4 -4
  25. package/dist/{agent-setup-QE6PSCEZ.js → chunk-SXWS25JC.js} +6 -19
  26. package/dist/{chunk-CNFVHDHG.js → chunk-WUYTWNMA.js} +3 -1
  27. package/dist/{chunk-R7OQTKWT.js → chunk-XCK2YAY5.js} +12 -3
  28. package/dist/{chunk-4QVZCVWT.js → chunk-YDSMROTB.js} +1 -1
  29. package/dist/{chunk-TCIW27FM.js → chunk-ZA5CHAFY.js} +1 -1
  30. package/dist/{cli-WSBIAVZU.js → cli-UW2H3UUW.js} +79 -62
  31. package/dist/{command-N7BAB4XJ.js → command-5LD7G2QQ.js} +22 -22
  32. package/dist/{connect-cmd-FGYRLLXL.js → connect-cmd-JUAW6MU4.js} +2 -2
  33. package/dist/{context-adopt-B3PWGFHL.js → context-adopt-PJUMW2EZ.js} +5 -5
  34. package/dist/{context-materialize-7S6NLLRO.js → context-materialize-FDHYKNDT.js} +5 -5
  35. package/dist/{docker-BZ55BMBJ.js → docker-4J77Q2BF.js} +5 -5
  36. package/dist/{doctor-3H25Q7WT.js → doctor-H7REBSLQ.js} +24 -24
  37. package/dist/{emit-artifact-cmd-IQCRXOH7.js → emit-artifact-cmd-FOGNJXVR.js} +15 -18
  38. package/dist/{emit-cmd-KDSM5VAO.js → emit-cmd-ZEYWLC2C.js} +3 -2
  39. package/dist/{emit-criteria-cmd-EYUXME26.js → emit-criteria-cmd-HBP6XS5C.js} +5 -8
  40. package/dist/{emit-finding-cmd-P4RKBPBB.js → emit-finding-cmd-DLI4MKMN.js} +5 -8
  41. package/dist/{emit-result-cmd-6XYENU6H.js → emit-result-cmd-MUSL7GQA.js} +9 -12
  42. package/dist/{hook-fast-PXWKQPN6.js → hook-fast-WYQD6D7T.js} +1 -1
  43. package/dist/{import-capture-cmd-2BKM5I2N.js → import-capture-cmd-6QVCOIHK.js} +8 -11
  44. package/dist/{import-ruler-cmd-IXR7YK47.js → import-ruler-cmd-KLRGRBCP.js} +5 -8
  45. package/dist/index.js +3 -3
  46. package/dist/{init-2LWVS4AH.js → init-NTXA3SN7.js} +23 -23
  47. package/dist/{init-ZL7ORPTF.js → init-UBXK6MF7.js} +23 -23
  48. package/dist/{init-cmd-JXOBCOIB.js → init-cmd-NARDUPIG.js} +13 -8
  49. package/dist/init-update-O5YYFGF4.js +165 -0
  50. package/dist/{loop-XOAE6ZIY.js → loop-SW2M5VDD.js} +30 -30
  51. package/dist/{machine-G6PY2J2J.js → machine-U66FKVDP.js} +21 -21
  52. package/dist/mcp-install-cmd-FDTPQQS6.js +9 -0
  53. package/dist/{runner-key-TDTLNAKJ.js → runner-key-3JSMDRJA.js} +23 -23
  54. package/dist/{session-sender-XVGZFWRK.js → session-sender-4M247XSV.js} +5 -5
  55. package/dist/{starter-pack-B7JPGEDO.js → starter-pack-IB4UUIX3.js} +2 -2
  56. package/dist/{status-MRTPG34B.js → status-STZYPU3W.js} +26 -26
  57. package/dist/{sync-cmd-UBUZMMDN.js → sync-cmd-UWD5JOFU.js} +4 -4
  58. package/dist/{watch-STNPEWD6.js → watch-DBNB7R6X.js} +4 -4
  59. package/dist/{work-claim-cmd-CWGYEIJE.js → work-claim-cmd-LY4U6QHN.js} +11 -11
  60. package/dist/{work-cmd-X7NMJDFL.js → work-cmd-RVRQ32EH.js} +4 -4
  61. package/dist/{work-comment-cmd-FI2TMAYQ.js → work-comment-cmd-FFUM4TJU.js} +7 -10
  62. package/dist/{work-open-pr-cmd-OVHJ5I5H.js → work-open-pr-cmd-HLDWP4T2.js} +7 -10
  63. package/dist/{work-pr-cmd-Y5TDMQ4O.js → work-pr-cmd-L77K32WK.js} +4 -4
  64. package/package.json +1 -1
  65. package/skill-pack/maintained/emitting-evidence/SKILL.md +8 -2
  66. package/skill-pack/shipped.json +70 -0
  67. package/skill-pack/template/build/SKILL.md +6 -2
  68. package/skill-pack/template/build/references/release.md +36 -8
  69. package/skill-pack/template/build/references/review-loop.md +1 -1
  70. package/skill-pack/template/spec/SKILL.md +33 -22
  71. package/skill-pack/template/writing-specs/SKILL.md +36 -3
  72. package/skill-pack/template/writing-specs/references/agents-snippet.md +57 -0
  73. package/skill-pack/template/writing-tests/SKILL.md +117 -0
  74. package/skill-pack/validators/acceptance-criteria.yaml +35 -0
  75. package/dist/mcp-install-cmd-VXVIH7PH.js +0 -9
  76. package/dist/{chunk-NX57IBNK.js → chunk-4NPZVMJU.js} +2 -2
  77. package/dist/{chunk-3FMPZPJQ.js → chunk-R7PF5OOU.js} +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @outerlayer/cli
2
2
 
3
+ ## 0.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4921c80: `outerlayer init --update` brings the files `init` wrote once up to the installed CLI's version: the template skills, `.outerlayer/policy.yaml`, the `code-review.yaml` and `acceptance-criteria.yaml` checks in `.outerlayer/validators/`, and the `outerlayer` and `outerlayer-docs` MCP entries. A file still equal to what an earlier release wrote is replaced, a missing one is written, and a file you edited is never touched. It then runs `outerlayer context emit` and leaves the changes uncommitted. `--dry-run` prints the plan, with a command to compare each edited file. `outerlayer doctor` adds a **Starter files** check that reports each file as current, outdated, edited or missing. An `outerlayer` MCP entry an earlier `init` wrote is reported there, not by the **MCP server** check. The quickstart no longer says the MCP server needs a global install.
8
+ - 23aa007: The starter skills `outerlayer init` installs gain three practices. `/spec` decides a docs verdict and a structural verdict for every issue, each with a one-line reason, and `writing-specs` defines both. A new `writing-tests` template holds a language-neutral test standard: strong assertions, the right seam, a criterion id in a comment above its test, and an optional mutation check. `writing-specs/references/agents-snippet.md` holds optional writing rules to paste into an instructions file. The `writing-specs` frontmatter now parses as YAML, so tools that read it see its description.
9
+ - 789f55f: `outerlayer sync` prints a line for each artifact it uploads, with its file name, caption and dashboard link, so an agent can pass the link straight to `outerlayer emit code-review --link`. `sync --json` lists them under `uploadedArtifacts`, and the spool state records each artifact's server id and link against its client id. `outerlayer emit artifact` prints the link when it uploads at once, and inside a session says the next `sync` prints it.
10
+ - ef97624: `outerlayer init` writes a second check, `.outerlayer/validators/acceptance-criteria.yaml`, only when it is missing. The starter `/build` skill records its criteria judge's verdict on that check, so every pull request it opens has a row for it. The build records pass only when the judge found every criterion it judged satisfied, and fail when it found one unmet. When there is no criterion to judge, it records nothing, so the row reads "not proven".
11
+
12
+ ### Patch Changes
13
+
14
+ - 0e6256b: `work comment`, `work threads`, `work pr`, `work open-pr`, `emit result`, `emit artifact`, `emit criteria`, `emit finding`, `context emit`, `import capture` and `import ruler` no longer print ANSI color codes when output is piped or `NO_COLOR` is set. They follow the same color rules as the rest of the CLI, including `--no-color` and `FORCE_COLOR`. Output on a terminal is unchanged.
15
+
3
16
  ## 0.13.0
4
17
 
5
18
  ### Minor Changes
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ export { keepHandWritten, runAgentSetup } from './chunk-SXWS25JC.js';
4
+ import './chunk-HFKKFTXU.js';
5
+ import './chunk-XCK2YAY5.js';
6
+ import './chunk-FOJGZYFC.js';
7
+ import './chunk-YRYMNBGQ.js';
8
+ import './chunk-3NLOVYJQ.js';
9
+ import './chunk-LCEXHCHD.js';
10
+ import './chunk-ZJSNLVCE.js';
11
+ import './chunk-YO4PSLVB.js';
12
+ import './chunk-BYT5O5RV.js';
13
+ import './chunk-ZA5CHAFY.js';
14
+ import './chunk-2M63GG56.js';
15
+ import './chunk-PLMTLGYH.js';
16
+ import './chunk-J5M7BSJQ.js';
17
+ import './chunk-EABW6AJQ.js';
18
+ import './chunk-RA3O54FC.js';
19
+ import './chunk-V7NIVOFD.js';
20
+ import './chunk-ZM2IMMYN.js';
21
+ import './chunk-XCCLFVXM.js';
22
+ import './chunk-BJ3KTMDH.js';
23
+ import './chunk-VNVZDWO3.js';
24
+ import './chunk-Z5GEFMRW.js';
25
+
26
+ createRequire(import.meta.url);
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { buildRepositoryImage } from './chunk-3FMPZPJQ.js';
4
- import './chunk-N5FOE5PS.js';
3
+ export { buildRepositoryImage } from './chunk-R7PF5OOU.js';
5
4
  export { RecipeError } from './chunk-QOZKPLVJ.js';
5
+ import './chunk-N5FOE5PS.js';
6
6
  import './chunk-CX22S5BA.js';
7
7
  import './chunk-BYT5O5RV.js';
8
8
  import './chunk-ZM2IMMYN.js';
@@ -1 +1 @@
1
- {"id":"2026-10-08T17:26:49.421Z+36ec792","root":"/home/runner/_work/outerlayer/outerlayer","pkg":"outerlayer"}
1
+ {"id":"2026-10-08T21:15:36.925Z+415a9ac","root":"/home/runner/_work/outerlayer/outerlayer","pkg":"outerlayer"}
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { MIN_BUILDX_VERSION, builderName, builderSpec, buildxState, ensureBuilder, ensureFailureCount, isOutOfMemory, proxyEnvironment, trackImageBuild } from './chunk-NX57IBNK.js';
4
- import './chunk-CX22S5BA.js';
5
- import './chunk-JXYVA45C.js';
3
+ export { MIN_BUILDX_VERSION, builderName, builderSpec, buildxState, ensureBuilder, ensureFailureCount, isOutOfMemory, proxyEnvironment, trackImageBuild } from './chunk-4NPZVMJU.js';
6
4
  import './chunk-7RQ73DLO.js';
7
5
  import './chunk-4Q7OMKAT.js';
8
- import './chunk-J5M7BSJQ.js';
6
+ import './chunk-CX22S5BA.js';
7
+ import './chunk-JXYVA45C.js';
9
8
  import './chunk-BYT5O5RV.js';
9
+ import './chunk-J5M7BSJQ.js';
10
10
  import './chunk-ZM2IMMYN.js';
11
11
  import './chunk-Z5GEFMRW.js';
12
12
 
@@ -1,69 +1,69 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { probeCredentials } from './chunk-SVEP7PVH.js';
4
- import './chunk-C6IV5BV7.js';
3
+ import { probeCredentials } from './chunk-NHDVD7DU.js';
4
+ import './chunk-4OGPT6I2.js';
5
5
  import './chunk-O765JR4W.js';
6
6
  import './chunk-UGP76IZ5.js';
7
7
  import './chunk-3JVYMD4G.js';
8
8
  import './chunk-YETTWTAY.js';
9
9
  import './chunk-RMWLBUCJ.js';
10
10
  import './chunk-I2UOAV7X.js';
11
+ import './chunk-HYZRY4KZ.js';
11
12
  import './chunk-FI5UYJMQ.js';
12
- import './chunk-XJKL4BNU.js';
13
- import './chunk-3D4OYFCD.js';
13
+ import './chunk-KFRM23WD.js';
14
+ import './chunk-MSASO5O4.js';
14
15
  import './chunk-HHJDN6AU.js';
15
- import './chunk-HYZRY4KZ.js';
16
- import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem } from './chunk-TOPDNXHZ.js';
16
+ import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem } from './chunk-SMHOCDCI.js';
17
17
  import './chunk-YYYRBYWG.js';
18
18
  import './chunk-TI7B7UEO.js';
19
19
  import './chunk-TBT347UY.js';
20
- import './chunk-MJXXRX4M.js';
21
- import './chunk-P6FX4D43.js';
22
- import './chunk-MZN7AQOB.js';
20
+ import './chunk-Q2UK3C4P.js';
21
+ import './chunk-JYIEHQIF.js';
22
+ import './chunk-RBKIH5ST.js';
23
+ import './chunk-KMDLFI4P.js';
24
+ import './chunk-QKFB4K7X.js';
25
+ import './chunk-RSNSZ2LJ.js';
23
26
  import './chunk-T5VPP6H7.js';
24
27
  import './chunk-RLYZLUQ7.js';
25
28
  import { parseRunnerEnv } from './chunk-6MZSX4M7.js';
26
- import './chunk-3FMPZPJQ.js';
29
+ import './chunk-SWHQ4LUM.js';
30
+ import './chunk-NPQWKGUA.js';
31
+ import './chunk-IP7BIBXJ.js';
32
+ import { loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-22RMZBGW.js';
33
+ import './chunk-UXYLWVTQ.js';
34
+ import './chunk-R7PF5OOU.js';
35
+ import './chunk-QOZKPLVJ.js';
27
36
  import './chunk-N5FOE5PS.js';
28
37
  import './chunk-OGFGZQA3.js';
29
- import './chunk-3KTA5UU2.js';
30
- import './chunk-QOZKPLVJ.js';
31
- import './chunk-NX57IBNK.js';
38
+ import './chunk-4NPZVMJU.js';
39
+ import './chunk-7RQ73DLO.js';
40
+ import './chunk-4Q7OMKAT.js';
32
41
  import './chunk-CX22S5BA.js';
33
- import './chunk-QKFB4K7X.js';
34
- import './chunk-RSNSZ2LJ.js';
35
42
  import './chunk-F7CU5ABH.js';
36
43
  import './chunk-BKO6JEZI.js';
37
- import './chunk-P4MM66C6.js';
38
- import './chunk-EFZLAYPE.js';
39
- import './chunk-IP7BIBXJ.js';
40
- import './chunk-4QVZCVWT.js';
41
- import './chunk-CNFVHDHG.js';
44
+ import './chunk-YDSMROTB.js';
45
+ import './chunk-WUYTWNMA.js';
42
46
  import './chunk-JXYVA45C.js';
43
47
  import './chunk-4KSQKQXE.js';
44
48
  import './chunk-N6LURUEF.js';
45
49
  import './chunk-YRYMNBGQ.js';
46
- import { loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-22RMZBGW.js';
47
- import './chunk-UXYLWVTQ.js';
48
- import './chunk-7RQ73DLO.js';
49
- import './chunk-4Q7OMKAT.js';
50
50
  import './chunk-GQD22KKN.js';
51
51
  import './chunk-WZBHBH3J.js';
52
52
  import './chunk-5QRP3MVS.js';
53
- import './chunk-GI4XXD4I.js';
54
- import './chunk-ZJSNLVCE.js';
55
- import './chunk-TCIW27FM.js';
53
+ import './chunk-3NLOVYJQ.js';
56
54
  import './chunk-LCEXHCHD.js';
57
- import './chunk-2M63GG56.js';
55
+ import './chunk-ZJSNLVCE.js';
58
56
  import './chunk-YO4PSLVB.js';
57
+ import './chunk-BYT5O5RV.js';
58
+ import './chunk-ZA5CHAFY.js';
59
+ import './chunk-2M63GG56.js';
59
60
  import './chunk-PLMTLGYH.js';
60
61
  import './chunk-J5M7BSJQ.js';
61
62
  import './chunk-EABW6AJQ.js';
62
- import './chunk-BYT5O5RV.js';
63
63
  import './chunk-RA3O54FC.js';
64
64
  import './chunk-V7NIVOFD.js';
65
65
  import './chunk-ZM2IMMYN.js';
66
- import './chunk-SFFHGX3G.js';
66
+ import './chunk-PQUM37BK.js';
67
67
  import './chunk-XCCLFVXM.js';
68
68
  import './chunk-BJ3KTMDH.js';
69
69
  import './chunk-VNVZDWO3.js';
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { appendContextProvenance } from './chunk-ZJSNLVCE.js';
4
- import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-TCIW27FM.js';
5
3
  import { readPin, pinExists, readBuildHold, readContextManifest, manifestFilesPresent, writeDegraded, writeSourceCache, SOURCE_CACHE_TTL_RETRY_MS, SOURCE_CACHE_TTL_SUCCESS_MS, isLastCheckFresh, readDegraded, touchLastCheck, clearDegraded, writeContextManifest, writePinIfChanged, readSourceCache, isSourceCacheFresh } from './chunk-LCEXHCHD.js';
6
- import { normalizeRepoName, parseGoverns, CONTEXT_SOURCE_CONFIG_PATH, parseOuterlayerConfig, classifyTree, emitTree } from './chunk-2M63GG56.js';
4
+ import { appendContextProvenance } from './chunk-ZJSNLVCE.js';
7
5
  import { defaultFetch } from './chunk-YO4PSLVB.js';
8
- import { resolveGatewayCredentials } from './chunk-PLMTLGYH.js';
9
6
  import { withTokenHeader } from './chunk-BYT5O5RV.js';
7
+ import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-ZA5CHAFY.js';
8
+ import { normalizeRepoName, parseGoverns, CONTEXT_SOURCE_CONFIG_PATH, parseOuterlayerConfig, classifyTree, emitTree } from './chunk-2M63GG56.js';
9
+ import { resolveGatewayCredentials } from './chunk-PLMTLGYH.js';
10
10
  import { ensureContextExcludes, ensurePreCommitGuardHook } from './chunk-XCCLFVXM.js';
11
11
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
12
12
  import { execFileSync } from 'child_process';
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { writeJobFile, readJobFile } from './chunk-RMWLBUCJ.js';
4
- import { senderPidfile } from './chunk-XJKL4BNU.js';
5
- import { installScrubContext } from './chunk-3D4OYFCD.js';
6
4
  import { DOCKERD_LOG } from './chunk-HYZRY4KZ.js';
7
- import { AssetError, describeCallFailure, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createBuildDisk, machineConfig, refusalCode, resolveAgentUser, AgentUserError, runBuildSteps, removeStagedContext, stageGovernedContext, shellQuote, createRunnerLog, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, formatDuration, retrySend, formatClock, containerSenderCommand, syncInContainer, copyTranscriptsFromContainer, GH_CONFIG_YML, ghHostsYml, ADDED_USER, isLiteralAddress, signalInContainer, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript } from './chunk-MZN7AQOB.js';
8
- import { readBranchHead, diffBetween, fetchCommit } from './chunk-3FMPZPJQ.js';
9
- import { isSameProcess, startTimeOf } from './chunk-N5FOE5PS.js';
10
- import { childEnvironment } from './chunk-3KTA5UU2.js';
11
- import { CLAUDE_CODE_VERSION } from './chunk-CX22S5BA.js';
5
+ import { senderPidfile } from './chunk-KFRM23WD.js';
6
+ import { installScrubContext } from './chunk-MSASO5O4.js';
7
+ import { AssetError, describeCallFailure, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createBuildDisk, machineConfig, refusalCode, resolveAgentUser, AgentUserError, runBuildSteps, removeStagedContext, stageGovernedContext, shellQuote, createRunnerLog, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, formatDuration, retrySend, formatClock, containerSenderCommand, syncInContainer, copyTranscriptsFromContainer, GH_CONFIG_YML, ghHostsYml, ADDED_USER, isLiteralAddress, signalInContainer, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript } from './chunk-RBKIH5ST.js';
8
+ import { childEnvironment } from './chunk-KMDLFI4P.js';
12
9
  import { waitForAgent, vmExecArgs } from './chunk-QKFB4K7X.js';
13
10
  import { socketPathProblem, vsockLinks, linkVsockSockets } from './chunk-RSNSZ2LJ.js';
14
- import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-P4MM66C6.js';
15
- import { planArtifactUpload } from './chunk-CNFVHDHG.js';
16
- import { scrubText } from './chunk-JXYVA45C.js';
11
+ import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-SWHQ4LUM.js';
17
12
  import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-22RMZBGW.js';
13
+ import { readBranchHead, diffBetween, fetchCommit } from './chunk-R7PF5OOU.js';
14
+ import { isSameProcess, startTimeOf } from './chunk-N5FOE5PS.js';
18
15
  import { parseSize } from './chunk-7RQ73DLO.js';
19
16
  import { claudeCredential, repositoriesOf, primaryOf, buildEnvironment, JOB_MOUNT, CHECKOUT_DIR, parseIsolation, proxyEnvironment, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, startBuildServices, BUILT_IN_NAMES, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, withTunnelRecord, RELAY_PORT, checkEnvironment, EVAL_INPUT_DIR } from './chunk-4Q7OMKAT.js';
17
+ import { CLAUDE_CODE_VERSION } from './chunk-CX22S5BA.js';
18
+ import { planArtifactUpload } from './chunk-WUYTWNMA.js';
19
+ import { scrubText } from './chunk-JXYVA45C.js';
20
+ import { withHooksPath, authorEnvironment, commitIdentityRecord } from './chunk-BYT5O5RV.js';
20
21
  import { parsePolicy } from './chunk-2M63GG56.js';
21
22
  import { readCloudConfig } from './chunk-EABW6AJQ.js';
22
- import { withHooksPath, authorEnvironment, commitIdentityRecord } from './chunk-BYT5O5RV.js';
23
23
  import { resolveVersion } from './chunk-RA3O54FC.js';
24
24
  import { signerFor } from './chunk-V7NIVOFD.js';
25
25
  import { runnerDir, buildDir, vsockPath, RUNNER_FILE_MODE } from './chunk-ZM2IMMYN.js';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { C } from './chunk-YRYMNBGQ.js';
4
- import { resolvePackRoot, loadTemplateFiles, loadMaintainedFiles, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MAINTAINED_SKILLS } from './chunk-TCIW27FM.js';
4
+ import { resolvePackRoot, loadTemplateFiles, loadMaintainedFiles, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MAINTAINED_SKILLS } from './chunk-ZA5CHAFY.js';
5
5
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
6
6
  import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
7
7
  import { join, dirname } from 'path';
@@ -10,7 +10,10 @@ createRequire(import.meta.url);
10
10
  var DEFAULT_TEMPLATE = "default";
11
11
  var POLICY_PATH = ".outerlayer/policy.yaml";
12
12
  var POLICY_CONTENT = "review: required\n";
13
- var VALIDATOR_FILES = ["code-review.yaml"];
13
+ var VALIDATOR_FILES = [
14
+ { name: "code-review.yaml", label: "the code review check" },
15
+ { name: "acceptance-criteria.yaml", label: "the criteria judge check" }
16
+ ];
14
17
  var VALIDATORS_DIR = ".outerlayer/validators";
15
18
  var StarterPackError = class extends Error {
16
19
  };
@@ -24,7 +27,7 @@ function installStarterPack(opts) {
24
27
  const version = opts.version ?? resolvePackageVersion();
25
28
  const templateFiles = loadTemplateFiles(packRoot, version);
26
29
  const maintainedFiles = loadMaintainedFiles(packRoot, version);
27
- const validatorFiles = VALIDATOR_FILES.map((name) => ({
30
+ const validatorFiles = VALIDATOR_FILES.map(({ name }) => ({
28
31
  path: `${VALIDATORS_DIR}/${name}`,
29
32
  content: readFileSync(join(packRoot, "validators", name), "utf8")
30
33
  }));
@@ -72,6 +75,9 @@ function installStarterPack(opts) {
72
75
  };
73
76
  }
74
77
  var skillFile = (skill) => `${skillDir(skill)}/SKILL.md`;
78
+ function validatorLabel(path) {
79
+ return VALIDATOR_FILES.find(({ name }) => path === `${VALIDATORS_DIR}/${name}`)?.label ?? "a check";
80
+ }
75
81
  function formatStarterPackOutput(result) {
76
82
  const lines = [];
77
83
  lines.push(`${C.green}\u2713${C.reset} Installed the starter skills in .outerlayer/skills/`, "");
@@ -87,7 +93,7 @@ function formatStarterPackOutput(result) {
87
93
  "",
88
94
  result.policy === "written" ? `${C.green}\u2713${C.reset} Wrote ${POLICY_PATH} (review required)` : `${C.dim}${POLICY_PATH} already exists \u2014 left as it is${C.reset}`,
89
95
  ...result.validatorsWritten.map(
90
- (path) => `${C.green}\u2713${C.reset} Wrote ${path} (yours to edit \u2014 the code review check)`
96
+ (path) => `${C.green}\u2713${C.reset} Wrote ${path} (yours to edit \u2014 ${validatorLabel(path)})`
91
97
  ),
92
98
  ...result.validatorsKept.map((path) => `${C.dim}${path} already exists \u2014 left as it is${C.reset}`),
93
99
  "",
@@ -97,4 +103,4 @@ function formatStarterPackOutput(result) {
97
103
  return lines.join("\n") + "\n";
98
104
  }
99
105
 
100
- export { StarterPackError, assertKnownTemplate, formatStarterPackOutput, installStarterPack };
106
+ export { POLICY_CONTENT, POLICY_PATH, StarterPackError, VALIDATORS_DIR, VALIDATOR_FILES, assertKnownTemplate, formatStarterPackOutput, installStarterPack };
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-TCIW27FM.js';
3
+ import { C } from './chunk-YRYMNBGQ.js';
4
+ import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-ZA5CHAFY.js';
4
5
  import { emitTree, parseOuterlayerConfig, classifyTree, generatedHeaderSource, CONTEXT_PIN_FILENAME, normalizePath } from './chunk-2M63GG56.js';
5
6
  import { existsSync, readFileSync, mkdirSync, writeFileSync, copyFileSync, readdirSync } from 'fs';
6
7
  import { join, dirname, relative, sep } from 'path';
@@ -9,11 +10,6 @@ createRequire(import.meta.url);
9
10
  var CONTENT_KINDS = /* @__PURE__ */ new Set(["instructions", "skill", "skill-reference", "command", "mcp"]);
10
11
  var SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git"]);
11
12
  var NO_CONFIG_MESSAGE = 'no .outerlayer/config.json with a non-empty targets array \u2014 create one, e.g. {"targets": ["claude-code"]}';
12
- var GREEN = "\x1B[32m";
13
- var YELLOW = "\x1B[33m";
14
- var RED = "\x1B[31m";
15
- var DIM = "\x1B[2m";
16
- var RESET = "\x1B[0m";
17
13
  var EmitError = class extends Error {
18
14
  };
19
15
  function resolveTargetsFromConfig(repoRoot) {
@@ -87,20 +83,20 @@ function writeOutputs(repoRoot, result, maintained) {
87
83
  function renderSuccess(targets, files, copies, maintained) {
88
84
  const copySuffix = copies.length > 0 ? `, ${copies.length} ${copies.length === 1 ? "copy" : "copies"}` : "";
89
85
  const lines = [
90
- `${GREEN}\u2713${RESET} emitted ${files.length} file${files.length === 1 ? "" : "s"}${copySuffix} for ${DIM}${targets.join(", ")}${RESET}`
86
+ `${C.green}\u2713${C.reset} emitted ${files.length} file${files.length === 1 ? "" : "s"}${copySuffix} for ${C.dim}${targets.join(", ")}${C.reset}`
91
87
  ];
92
- for (const path of maintained) lines.push(` ${DIM}updated ${path} to this CLI's version${RESET}`);
88
+ for (const path of maintained) lines.push(` ${C.dim}updated ${path} to this CLI's version${C.reset}`);
93
89
  return lines.join("\n");
94
90
  }
95
91
  function renderFailure(errors) {
96
- const lines = [`${RED}\u2717${RESET} emit failed \u2014 nothing written`];
97
- for (const e of errors) lines.push(` ${RED}\u2717${RESET} ${e.path}: ${e.message}`);
92
+ const lines = [`${C.red}\u2717${C.reset} emit failed \u2014 nothing written`];
93
+ for (const e of errors) lines.push(` ${C.red}\u2717${C.reset} ${e.path}: ${e.message}`);
98
94
  return lines.join("\n");
99
95
  }
100
96
  function renderCheck(targets, drift) {
101
- if (drift.length === 0) return `${GREEN}\u2713${RESET} up to date for ${DIM}${targets.join(", ")}${RESET}`;
102
- const lines = [`${RED}\u2717${RESET} drift detected (${drift.length}) \u2014 run \`outerlayer emit\` to update`];
103
- for (const d of drift) lines.push(` ${RED}\u2717${RESET} ${d.kind.padEnd(8)} ${d.path}`);
97
+ if (drift.length === 0) return `${C.green}\u2713${C.reset} up to date for ${C.dim}${targets.join(", ")}${C.reset}`;
98
+ const lines = [`${C.red}\u2717${C.reset} drift detected (${drift.length}) \u2014 run \`outerlayer emit\` to update`];
99
+ for (const d of drift) lines.push(` ${C.red}\u2717${C.reset} ${d.kind.padEnd(8)} ${d.path}`);
104
100
  return lines.join("\n");
105
101
  }
106
102
  function compareFile(repoRoot, path, expectedContent) {
@@ -205,7 +201,7 @@ function runEmit(opts = {}) {
205
201
  process.stderr.write(output + "\n");
206
202
  } else {
207
203
  process.stdout.write(output + "\n");
208
- for (const w of result.warnings) process.stderr.write(` ${YELLOW}!${RESET} ${w.path}: ${w.message}
204
+ for (const w of result.warnings) process.stderr.write(` ${C.yellow}!${C.reset} ${w.path}: ${w.message}
209
205
  `);
210
206
  }
211
207
  }
@@ -249,7 +245,7 @@ function runCheck(cwd, opts, targets, result, hasErrors, sourcePaths, maintained
249
245
  process.stderr.write(output + "\n");
250
246
  } else {
251
247
  process.stdout.write(output + "\n");
252
- for (const w of result.warnings) process.stderr.write(` ${YELLOW}!${RESET} ${w.path}: ${w.message}
248
+ for (const w of result.warnings) process.stderr.write(` ${C.yellow}!${C.reset} ${w.path}: ${w.message}
253
249
  `);
254
250
  }
255
251
  }
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
+ import { checkStarterFiles } from './chunk-MTF3PHVZ.js';
4
+ import { resolveCredentials, getJson, WorkCommandError } from './chunk-SWHQ4LUM.js';
3
5
  import { readStatuslineState, STATE_FRESH_MS } from './chunk-F47JBIAW.js';
4
- import { resolveCredentials, getJson, WorkCommandError } from './chunk-P4MM66C6.js';
5
- import { isLinkedRepository } from './chunk-4QVZCVWT.js';
6
- import { sanitizeTerminal } from './chunk-CNFVHDHG.js';
6
+ import { isLinkedRepository } from './chunk-YDSMROTB.js';
7
+ import { sanitizeTerminal } from './chunk-WUYTWNMA.js';
7
8
  import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-JXYVA45C.js';
8
9
  import { C } from './chunk-YRYMNBGQ.js';
9
10
  import { readSettings, settingsPath, isOurStatuslineSlot, statuslineWrappedOriginal, REGISTERED_EVENTS, isOurHookCommand, ourCommandBins, cliBinResolvable, ourDirectScriptBins, wrappedOriginalCommand } from './chunk-5QRP3MVS.js';
@@ -11,7 +12,7 @@ import { readPin, readContextManifest, readDegraded, readSourceCache } from './c
11
12
  import { defaultFetch } from './chunk-YO4PSLVB.js';
12
13
  import { resolveGatewayCredentials } from './chunk-PLMTLGYH.js';
13
14
  import { readCloudConfig } from './chunk-EABW6AJQ.js';
14
- import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-SFFHGX3G.js';
15
+ import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-PQUM37BK.js';
15
16
  import { deadHooksState, preparePackageManagerCommand, contextExcludesPresent } from './chunk-XCCLFVXM.js';
16
17
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
17
18
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
@@ -174,6 +175,7 @@ function runDoctor(env = {}) {
174
175
  const now = env.now ?? Date.now;
175
176
  const laptop = env.runnerHost !== true;
176
177
  const transcripts = laptop ? scanTranscripts(home) : void 0;
178
+ const starter = laptop ? checkStarterFiles(env.cwd) : void 0;
177
179
  return [
178
180
  ...laptop ? [checkClaudeDir(home), checkTranscripts(transcripts, now), ...checkHooks(home, env.cwd, transcripts, now)] : [LAPTOP_CHECKS_NOT_APPLICABLE],
179
181
  ...checkDeadHooksState(env.cwd),
@@ -186,7 +188,8 @@ function runDoctor(env = {}) {
186
188
  checkSettingsValid(home, env.cwd),
187
189
  ...laptop ? checkStatusline(home, now, env.cwd) : [],
188
190
  ...checkInstalls(env),
189
- ...laptop ? checkMcpCommand(env.cwd, env.processEnv) : [],
191
+ ...starter?.checks ?? [],
192
+ ...starter !== void 0 && !starter.mcpOutdated ? checkMcpCommand(env.cwd, env.processEnv) : [],
190
193
  ...checkContextSource(home, env.cwd),
191
194
  ...checkInstalledCli(home, env.cwd ?? process.cwd())
192
195
  ];
@@ -1092,7 +1095,7 @@ async function gatherDoctorChecks() {
1092
1095
  const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
1093
1096
  checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
1094
1097
  } else if (hasRunnerBlock(configPath)) {
1095
- const { runnerHostChecks } = await import('./doctor-3H25Q7WT.js');
1098
+ const { runnerHostChecks } = await import('./doctor-H7REBSLQ.js');
1096
1099
  const hooks = (() => {
1097
1100
  try {
1098
1101
  return loadRunnerConfig(configPath).hooks;
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { autoConnect } from './chunk-EFZLAYPE.js';
3
+ import { autoConnect } from './chunk-NPQWKGUA.js';
4
4
  import { detectActiveSession } from './chunk-IP7BIBXJ.js';
5
5
  import { resolveRepoIdentity } from './chunk-JXYVA45C.js';
6
+ import { C } from './chunk-YRYMNBGQ.js';
6
7
  import { parseWorkItemEnv } from './chunk-GQD22KKN.js';
7
8
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
8
9
  import { defaultFetch } from './chunk-YO4PSLVB.js';
@@ -12,9 +13,6 @@ import { homeFromEnv } from './chunk-VNVZDWO3.js';
12
13
  createRequire(import.meta.url);
13
14
 
14
15
  // src/work-pr-cmd.ts
15
- var GREEN = "\x1B[32m";
16
- var DIM = "\x1B[2m";
17
- var RESET = "\x1B[0m";
18
16
  var WorkPrCommandError = class extends Error {
19
17
  };
20
18
  function resolveCredentials(opts) {
@@ -43,7 +41,7 @@ function sessionNotOnItemMessage(error, sessionId) {
43
41
  }
44
42
  function itemLabel(data) {
45
43
  if (data.workItemNumber == null) return data.workItemId;
46
- return data.workItemTitle ? `item ${data.workItemNumber} ${DIM}\xB7${RESET} ${data.workItemTitle}` : `item ${data.workItemNumber}`;
44
+ return data.workItemTitle ? `item ${data.workItemNumber} ${C.dim}\xB7${C.reset} ${data.workItemTitle}` : `item ${data.workItemNumber}`;
47
45
  }
48
46
  async function runWorkPrWithdraw(opts, ctx) {
49
47
  const itemNumber = parseTrackerNumber(opts.item);
@@ -88,7 +86,7 @@ async function runWorkPrWithdraw(opts, ctx) {
88
86
  throw new WorkPrCommandError(json.error?.message ?? `request failed (${response.status})`);
89
87
  }
90
88
  const data = json.data;
91
- const output = opts.json ? JSON.stringify(data) : `${GREEN}\u2713${RESET} withdrawn ${DIM}\xB7${RESET} ${data.repository}#${data.prNumber} ${DIM}from${RESET} item ${itemNumber}`;
89
+ const output = opts.json ? JSON.stringify(data) : `${C.green}\u2713${C.reset} withdrawn ${C.dim}\xB7${C.reset} ${data.repository}#${data.prNumber} ${C.dim}from${C.reset} item ${itemNumber}`;
92
90
  if (!opts.quiet) process.stdout.write(output + "\n");
93
91
  return { data, output };
94
92
  }
@@ -170,7 +168,7 @@ async function runWorkPr(opts) {
170
168
  }
171
169
  const data = json.data;
172
170
  const verb = data.created ? "declared" : "already declared";
173
- const output = opts.json ? JSON.stringify(data) : `${GREEN}\u2713${RESET} ${verb} ${DIM}\xB7${RESET} ${data.repository}#${data.prNumber} ${DIM}\u2192${RESET} ${itemLabel(data)}`;
171
+ const output = opts.json ? JSON.stringify(data) : `${C.green}\u2713${C.reset} ${verb} ${C.dim}\xB7${C.reset} ${data.repository}#${data.prNumber} ${C.dim}\u2192${C.reset} ${itemLabel(data)}`;
174
172
  if (!opts.quiet) process.stdout.write(output + "\n");
175
173
  return { data, output };
176
174
  }
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { MIN_ENGINE_MAJOR } from './chunk-MZN7AQOB.js';
3
+ import { MIN_ENGINE_MAJOR } from './chunk-RBKIH5ST.js';
4
4
  import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-CX22S5BA.js';
5
5
  import { spawnSync } from 'child_process';
6
6
  import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { LiveUploader } from './chunk-3D4OYFCD.js';
3
+ import { LiveUploader } from './chunk-MSASO5O4.js';
4
4
  import { CaptureDaemon } from './chunk-JXYVA45C.js';
5
5
  import { parseWorkItemEnv } from './chunk-GQD22KKN.js';
6
- import { spoolDir } from './chunk-SFFHGX3G.js';
6
+ import { spoolDir } from './chunk-PQUM37BK.js';
7
7
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
8
8
  import { mkdirSync, writeFileSync, rmSync } from 'fs';
9
9
  import { join } from 'path';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { RecipeError } from './chunk-QOZKPLVJ.js';
4
- import { trackImageBuild, isOutOfMemory, ensureBuilder } from './chunk-NX57IBNK.js';
4
+ import { trackImageBuild, isOutOfMemory, ensureBuilder } from './chunk-4NPZVMJU.js';
5
5
  import { spawn } from 'child_process';
6
6
  import { existsSync, mkdirSync, createWriteStream, rmSync, readFileSync } from 'fs';
7
7
  import { join, dirname } from 'path';
@@ -4,7 +4,7 @@ import { LaunchFilter } from './chunk-HHJDN6AU.js';
4
4
  import { RepoFilter } from './chunk-TBT347UY.js';
5
5
  import { hookExecSpoolPath } from './chunk-F7CU5ABH.js';
6
6
  import { applyReportedCost } from './chunk-BKO6JEZI.js';
7
- import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-CNFVHDHG.js';
7
+ import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-WUYTWNMA.js';
8
8
  import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-JXYVA45C.js';
9
9
  import { C } from './chunk-YRYMNBGQ.js';
10
10
  import { readLaunchSpoolState, launchStatusIsDecisive, launchedItemsBySession, launchesPath } from './chunk-GQD22KKN.js';
@@ -14,7 +14,7 @@ import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-PLMTLGYH
14
14
  import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-J5M7BSJQ.js';
15
15
  import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-EABW6AJQ.js';
16
16
  import { signerFor, signRunnerRequest } from './chunk-V7NIVOFD.js';
17
- import { writeSyncStatus, spoolDir } from './chunk-SFFHGX3G.js';
17
+ import { writeSyncStatus, spoolDir } from './chunk-PQUM37BK.js';
18
18
  import { removeJournalHooks } from './chunk-XCCLFVXM.js';
19
19
  import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
20
20
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
@@ -928,6 +928,21 @@ var NEVER_REACHED_SERVER_ERROR_CODES = /* @__PURE__ */ new Set([
928
928
  "payload_too_large",
929
929
  "unreadable_test_results"
930
930
  ]);
931
+ async function readUploadedIdentity(response) {
932
+ let data;
933
+ try {
934
+ data = (await response.json()).data;
935
+ } catch {
936
+ }
937
+ return {
938
+ id: typeof data?.id === "string" ? data.id : null,
939
+ url: typeof data?.url === "string" ? data.url : null
940
+ };
941
+ }
942
+ function uploadedArtifactLine(artifact) {
943
+ const where = artifact.url !== null ? sanitizeTerminal(artifact.url) : artifact.id !== null ? `id ${sanitizeTerminal(artifact.id)} ${C.dim}(the gateway returned no link)${C.reset}` : `${C.dim}(the gateway returned no link)${C.reset}`;
944
+ return ` ${C.green}\u2191${C.reset} ${sanitizeTerminal(artifact.filename)} ${C.dim}\xB7${C.reset} ${sanitizeTerminal(artifact.caption)} ${C.dim}\xB7${C.reset} ${where}`;
945
+ }
931
946
  function splitPayload(payload) {
932
947
  const mid = Math.ceil(payload.sessions.length / 2);
933
948
  const first = payload.sessions.slice(0, mid);
@@ -1553,10 +1568,12 @@ ${C.yellow}!${C.reset} batch ${shippedBatches + 1}/${batches.length} accounting
1553
1568
  }
1554
1569
  let artifactsUploaded;
1555
1570
  let artifactsHeld;
1571
+ let uploadedArtifacts;
1556
1572
  const artifactLock = combinedRecords.length > 0 || artifactPlan.held.length > 0 ? await acquireArtifactSpoolLock(home, { waitMs: opts.artifactLockWaitMs }) : void 0;
1557
1573
  if (artifactLock !== void 0 && !artifactLock.ok) {
1558
1574
  artifactsUploaded = 0;
1559
1575
  artifactsHeld = combinedRecords.length + artifactPlan.held.length;
1576
+ uploadedArtifacts = [];
1560
1577
  if (!opts.quiet) {
1561
1578
  process.stderr.write(
1562
1579
  `${C.yellow}!${C.reset} artifacts not attempted: ${artifactLock.reason} \u2014 ${artifactsHeld} record(s) stay queued for the next sync
@@ -1575,6 +1592,7 @@ ${C.yellow}!${C.reset} batch ${shippedBatches + 1}/${batches.length} accounting
1575
1592
  let uploadedCount = 0;
1576
1593
  let heldCount = livePlan.held.length;
1577
1594
  let droppedCount = 0;
1595
+ const uploadedThisRun = [];
1578
1596
  const warn = (message) => {
1579
1597
  if (!opts.quiet) process.stderr.write(`${C.yellow}!${C.reset} ${message}
1580
1598
  `);
@@ -1651,6 +1669,7 @@ ${C.yellow}!${C.reset} batch ${shippedBatches + 1}/${batches.length} accounting
1651
1669
  let status;
1652
1670
  let errorCode = "";
1653
1671
  let serverMessage = "";
1672
+ let accepted;
1654
1673
  try {
1655
1674
  const response = await fetchImpl(artifactEndpoint, {
1656
1675
  method: "POST",
@@ -1670,19 +1689,31 @@ ${C.yellow}!${C.reset} batch ${shippedBatches + 1}/${batches.length} accounting
1670
1689
  if (typeof body.error?.message === "string") serverMessage = body.error.message;
1671
1690
  } catch {
1672
1691
  }
1692
+ } else {
1693
+ accepted = response;
1673
1694
  }
1674
1695
  } catch (err) {
1675
1696
  failure = String(err);
1676
1697
  }
1677
- if (!failure) {
1698
+ if (accepted !== void 0) {
1699
+ const identity = await readUploadedIdentity(accepted);
1678
1700
  state.set(record.artifactId, {
1679
1701
  state: "uploaded",
1680
1702
  attempts: (existing?.attempts ?? 0) + 1,
1681
1703
  firstSeen: firstSeenIso,
1682
1704
  sha256: record.sha256,
1683
- reachedServer: true
1705
+ reachedServer: true,
1706
+ ...identity.id !== null ? { serverId: identity.id } : {},
1707
+ ...identity.url !== null ? { url: identity.url } : {}
1684
1708
  });
1685
1709
  uploadedCount += 1;
1710
+ uploadedThisRun.push({
1711
+ artifactId: record.artifactId,
1712
+ filename: record.filename,
1713
+ caption: record.caption,
1714
+ id: identity.id,
1715
+ url: identity.url
1716
+ });
1686
1717
  continue;
1687
1718
  }
1688
1719
  if (status === 401) {
@@ -1739,11 +1770,15 @@ ${C.yellow}!${C.reset} batch ${shippedBatches + 1}/${batches.length} accounting
1739
1770
  artifactsUploaded = uploadedCount;
1740
1771
  artifactsHeld = heldCount;
1741
1772
  artifactsDropped = droppedCount;
1773
+ uploadedArtifacts = uploadedThisRun;
1742
1774
  if (!opts.quiet) {
1743
1775
  process.stderr.write(
1744
1776
  `${C.dim}artifacts${C.reset} ${uploadedCount} uploaded \xB7 ${heldCount} held \xB7 ${droppedCount} dropped
1745
1777
  `
1746
1778
  );
1779
+ if (!opts.json) {
1780
+ for (const uploaded of uploadedThisRun) process.stdout.write(uploadedArtifactLine(uploaded) + "\n");
1781
+ }
1747
1782
  }
1748
1783
  }
1749
1784
  const persisted = writeArtifactSpoolState(state, home);
@@ -1776,6 +1811,7 @@ ${C.yellow}!${C.reset} batch ${shippedBatches + 1}/${batches.length} accounting
1776
1811
  );
1777
1812
  }
1778
1813
  }
1814
+ const artifactReport = artifactsUploaded !== void 0 ? { artifactsUploaded, artifactsHeld, uploadedArtifacts } : {};
1779
1815
  let output;
1780
1816
  if (opts.json) {
1781
1817
  output = JSON.stringify({
@@ -1787,7 +1823,7 @@ ${C.yellow}!${C.reset} batch ${shippedBatches + 1}/${batches.length} accounting
1787
1823
  artifactsDropped,
1788
1824
  tier,
1789
1825
  url,
1790
- ...artifactsUploaded !== void 0 ? { artifactsUploaded, artifactsHeld } : {}
1826
+ ...artifactReport
1791
1827
  });
1792
1828
  } else {
1793
1829
  const lines = [];
@@ -1826,7 +1862,7 @@ ${C.yellow}!${C.reset} batch ${shippedBatches + 1}/${batches.length} accounting
1826
1862
  url,
1827
1863
  dryRun: false,
1828
1864
  watermarkMs,
1829
- ...artifactsUploaded !== void 0 ? { artifactsUploaded, artifactsHeld } : {},
1865
+ ...artifactReport,
1830
1866
  output
1831
1867
  };
1832
1868
  }