@outerlayer/cli 0.33.0-next.20261023003700 → 0.33.0-next.20261023120437

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 (107) hide show
  1. package/README.md +11 -4
  2. package/dist/{agent-setup-55ZDEXCS.js → agent-setup-YHEW3WXB.js} +10 -10
  3. package/dist/{artifact-link-cmd-6FF2Y6QI.js → artifact-link-cmd-7FYKWA7J.js} +2 -2
  4. package/dist/{build-disk-JHTMPRAA.js → build-disk-ECTLWTPC.js} +4 -4
  5. package/dist/build-info.json +1 -1
  6. package/dist/{builder-Y4P7QARW.js → builder-LUPHKUFM.js} +3 -3
  7. package/dist/{check-MRYFTLOO.js → check-4QNLMDP7.js} +28 -28
  8. package/dist/{chunk-3RIFVLPO.js → chunk-2JLM4GUF.js} +12 -12
  9. package/dist/{chunk-G63KT5I5.js → chunk-44V5SD4G.js} +1 -1
  10. package/dist/{chunk-ULBNTSAD.js → chunk-5M2J7B5N.js} +2 -2
  11. package/dist/{chunk-LJG6EMLJ.js → chunk-6CXNWKWD.js} +1 -1
  12. package/dist/{chunk-BKADJZ7F.js → chunk-6SPD266O.js} +3 -3
  13. package/dist/{chunk-Q2CMEQV7.js → chunk-7IFYI7XF.js} +3 -3
  14. package/dist/{chunk-AU346ENF.js → chunk-7UPMYRPS.js} +4 -4
  15. package/dist/{chunk-NSPRS7WK.js → chunk-7V5GUEDU.js} +1 -1
  16. package/dist/{chunk-EUVE2EAE.js → chunk-AKZRGFGT.js} +3 -3
  17. package/dist/{chunk-2N67C6IV.js → chunk-D3EDZPJR.js} +5 -5
  18. package/dist/{chunk-BJQ25STI.js → chunk-DKFUXYGD.js} +4 -4
  19. package/dist/{chunk-HE4FBF4T.js → chunk-EHOFFTVX.js} +2 -2
  20. package/dist/{chunk-HXA5GIHK.js → chunk-EJL6CWSP.js} +6 -6
  21. package/dist/chunk-ER6KQCVJ.js +18 -0
  22. package/dist/{chunk-DISTLL2Q.js → chunk-EXZACZ2P.js} +1 -1
  23. package/dist/{chunk-E6CO3MJE.js → chunk-F2D5BSXS.js} +38 -2
  24. package/dist/{chunk-UIUGTW5C.js → chunk-FT7MUQGO.js} +2 -2
  25. package/dist/{chunk-PWH3BEZF.js → chunk-FZUFUVLK.js} +13 -13
  26. package/dist/{chunk-XL2XWWU7.js → chunk-GO2DUPQS.js} +3 -3
  27. package/dist/{chunk-B2JURP6A.js → chunk-HLZMAJJD.js} +2 -2
  28. package/dist/{chunk-2EGCI2VW.js → chunk-IUPY54BZ.js} +10 -10
  29. package/dist/{chunk-GFYEMCPP.js → chunk-JEVKOZBB.js} +1 -1
  30. package/dist/{chunk-DY7Y7UT4.js → chunk-KUE4V2SK.js} +2 -2
  31. package/dist/{chunk-SVDOA4W2.js → chunk-L6MDOEHN.js} +7 -7
  32. package/dist/{chunk-HJYBWJAS.js → chunk-LYGI3T66.js} +2 -2
  33. package/dist/{chunk-EWVYQLD3.js → chunk-MPC2UAW2.js} +1 -1
  34. package/dist/{chunk-5DNCFOXA.js → chunk-NIY2UBT6.js} +1 -1
  35. package/dist/{chunk-FR7HWWCF.js → chunk-OGMXVPCS.js} +1 -1
  36. package/dist/{chunk-6Z4SZHV2.js → chunk-QKNFU5GA.js} +5 -5
  37. package/dist/{chunk-2WMZPJVE.js → chunk-S5CNYXUA.js} +4 -4
  38. package/dist/{chunk-7HHNGZS5.js → chunk-SQQD5MST.js} +4 -4
  39. package/dist/{chunk-QPWFVE3X.js → chunk-UK4RGH46.js} +2 -2
  40. package/dist/{chunk-JHTJPQSL.js → chunk-V673DFOL.js} +4 -4
  41. package/dist/{chunk-RQJMN5TJ.js → chunk-VWQCYOBS.js} +2 -2
  42. package/dist/{chunk-W2AEL4BJ.js → chunk-X4JEBMYN.js} +1 -1
  43. package/dist/{chunk-T5REPMNL.js → chunk-XCRET2GZ.js} +2 -2
  44. package/dist/{chunk-XHHTMFCX.js → chunk-YGZLRX5U.js} +1 -1
  45. package/dist/{chunk-SDU2IE22.js → chunk-YSM4EEUK.js} +12 -12
  46. package/dist/{chunk-VT4TTJPG.js → chunk-YXMGHGHR.js} +5 -5
  47. package/dist/{chunk-AVTI3FL5.js → chunk-ZF24JN7R.js} +1 -1
  48. package/dist/{claude-launcher-NTYHJUJM.js → claude-launcher-YRPW4SWA.js} +5 -5
  49. package/dist/{cli-K6XGL4EZ.js → cli-BC7JWQUQ.js} +149 -103
  50. package/dist/{command-7FAIIQGF.js → command-SQ4466SL.js} +19 -19
  51. package/dist/{config-QXMUWJAQ.js → config-MVA7YTFW.js} +5 -5
  52. package/dist/{connect-cmd-P5GASVAF.js → connect-cmd-KWXV2CGC.js} +8 -8
  53. package/dist/{container-start-CVP3NTDG.js → container-start-AQJ64LCF.js} +20 -20
  54. package/dist/{context-cleanup-BX5Y3AFL.js → context-cleanup-A2FGVVPH.js} +3 -3
  55. package/dist/{context-show-cmd-3EPJ7CJC.js → context-show-cmd-6F4UF4ND.js} +9 -9
  56. package/dist/{control-plane-launch-A3YCHQNQ.js → control-plane-launch-7SOH6IMA.js} +6 -6
  57. package/dist/{dist-ACTRIBVW.js → dist-IG2DKUJJ.js} +2 -2
  58. package/dist/{docker-ANW76BNW.js → docker-YKYQJHL2.js} +3 -3
  59. package/dist/{doctor-GJAHI3KU.js → doctor-4YZOP343.js} +20 -20
  60. package/dist/{emit-artifact-cmd-FDPJKGOO.js → emit-artifact-cmd-6QTTWBVN.js} +13 -13
  61. package/dist/{emit-cmd-OX6LYS6I.js → emit-cmd-3FG7FEGO.js} +6 -6
  62. package/dist/{emit-criteria-cmd-3SVGCMJN.js → emit-criteria-cmd-22VVCL2W.js} +10 -10
  63. package/dist/{emit-demo-cmd-6DF2QIAS.js → emit-demo-cmd-IQRS7BP2.js} +243 -51
  64. package/dist/{emit-finding-cmd-TLJWBGQE.js → emit-finding-cmd-TXDPJFVT.js} +10 -10
  65. package/dist/{emit-result-cmd-CJNVDV5V.js → emit-result-cmd-QHJDUC7J.js} +12 -12
  66. package/dist/{emit-step-cmd-347CZO7Y.js → emit-step-cmd-TQCOLXAA.js} +10 -10
  67. package/dist/{findings-cmd-LHTYEHYB.js → findings-cmd-EURKADAY.js} +10 -10
  68. package/dist/{fleet-readiness-KGR5AC2J.js → fleet-readiness-GXDSFTLP.js} +8 -8
  69. package/dist/{governing-source-JZQZUTMA.js → governing-source-IRRP7G5G.js} +13 -13
  70. package/dist/{hook-fast-6WDMNZG5.js → hook-fast-3IYSWDL4.js} +1 -1
  71. package/dist/index.js +4 -4
  72. package/dist/{init-ZQ5B3TJZ.js → init-63X6ECKF.js} +19 -19
  73. package/dist/{init-XDOKWBL2.js → init-T64C4MID.js} +19 -19
  74. package/dist/{init-cmd-YMGW2WXJ.js → init-cmd-7CGCDLBZ.js} +18 -18
  75. package/dist/{init-update-X7YLZL6H.js → init-update-LFKSC6Y4.js} +17 -17
  76. package/dist/{install-QPA7DQHO.js → install-47Z7VNWP.js} +6 -6
  77. package/dist/{layout-JGF7MJHG.js → layout-44S4OYLK.js} +4 -4
  78. package/dist/{login-browser-3RIZQJY2.js → login-browser-BJZYKWHF.js} +2 -2
  79. package/dist/{loop-UJL2UCUM.js → loop-YJF27PUS.js} +28 -28
  80. package/dist/{machine-2YPAFFCH.js → machine-VBITNWTR.js} +19 -19
  81. package/dist/{machine-skills-AGERT2HN.js → machine-skills-GOKW3U5N.js} +4 -4
  82. package/dist/{runner-env-HOUXKWIJ.js → runner-env-ILP6BAC2.js} +7 -7
  83. package/dist/{runner-identity-KPUVTRLS.js → runner-identity-MF3AYBR6.js} +3 -3
  84. package/dist/{runner-key-FUJD66R6.js → runner-key-5SGBLTDJ.js} +19 -19
  85. package/dist/{session-sender-7B3ZDWMC.js → session-sender-2DYAJIMM.js} +13 -13
  86. package/dist/{spec-cmd-Q26NE22H.js → spec-cmd-E6SINBX6.js} +11 -11
  87. package/dist/{starter-pack-UBEC5LTE.js → starter-pack-FWTXE6XB.js} +5 -5
  88. package/dist/{status-2KNTILGQ.js → status-AYHBGIAP.js} +24 -24
  89. package/dist/{sync-cmd-SSUYTMLJ.js → sync-cmd-NGX2PGIW.js} +12 -12
  90. package/dist/{watch-L5NCO46E.js → watch-ZIWZVU3Z.js} +12 -12
  91. package/dist/{work-claim-cmd-NJNOQFQE.js → work-claim-cmd-CIVWB7EJ.js} +15 -15
  92. package/dist/{work-cmd-W7WEHMQJ.js → work-cmd-OO6K6ELP.js} +10 -10
  93. package/dist/{work-comment-cmd-SSUOGVDD.js → work-comment-cmd-SY7NY2CR.js} +10 -10
  94. package/dist/work-demo-cmd-Y7EU335L.js +62 -0
  95. package/dist/{work-logs-cmd-WPMWMDX6.js → work-logs-cmd-PWOFLTGD.js} +10 -10
  96. package/dist/{work-open-pr-cmd-NO5YLOXD.js → work-open-pr-cmd-AJUTKYWN.js} +11 -11
  97. package/dist/{work-pr-cmd-37B5KECR.js → work-pr-cmd-DH43AH3V.js} +10 -10
  98. package/dist/work-proofs-cmd-6W6DDAP6.js +111 -0
  99. package/dist/{work-stop-cmd-3BJLXUJ3.js → work-stop-cmd-WZHBEKE4.js} +10 -10
  100. package/package.json +1 -1
  101. package/skill-pack/maintained/outerlayer-amend/SKILL.md +36 -34
  102. package/skill-pack/maintained/outerlayer-amend/scripts/rerecord-demo.mjs +187 -0
  103. package/skill-pack/maintained/outerlayer-build/SKILL.md +7 -2
  104. package/skill-pack/maintained/outerlayer-build/references/agent-briefs.md +16 -4
  105. package/skill-pack/maintained/outerlayer-build/references/evidence.md +11 -1
  106. package/skill-pack/maintained/outerlayer-build/references/release.md +3 -2
  107. package/skill-pack/maintained/outerlayer-evidence/SKILL.md +21 -18
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { resolveCredentials, postJson, getJson } from './chunk-VT4TTJPG.js';
3
+ import { resolveCredentials, postJson, getJson } from './chunk-YXMGHGHR.js';
4
4
  import { detectActiveSession } from './chunk-IP7BIBXJ.js';
5
- import './chunk-B2JURP6A.js';
6
- import './chunk-2WMZPJVE.js';
7
- import { sanitizeTerminal } from './chunk-EWVYQLD3.js';
8
- import { resolveRepoIdentity } from './chunk-5DNCFOXA.js';
9
- import './chunk-HJYBWJAS.js';
10
- import './chunk-NSPRS7WK.js';
5
+ import './chunk-HLZMAJJD.js';
6
+ import './chunk-S5CNYXUA.js';
7
+ import { sanitizeTerminal } from './chunk-MPC2UAW2.js';
8
+ import { resolveRepoIdentity } from './chunk-NIY2UBT6.js';
9
+ import './chunk-LYGI3T66.js';
10
+ import './chunk-7V5GUEDU.js';
11
11
  import './chunk-G2JWZDFA.js';
12
12
  import { C } from './chunk-ANPNT6PM.js';
13
13
  import { defaultFetch } from './chunk-6RKD7YZ6.js';
@@ -16,14 +16,14 @@ import './chunk-SOI6K5DY.js';
16
16
  import './chunk-PA6CK6WQ.js';
17
17
  import './chunk-BALIE3BA.js';
18
18
  import './chunk-BJ3KTMDH.js';
19
- import './chunk-G63KT5I5.js';
19
+ import './chunk-44V5SD4G.js';
20
20
  import './chunk-5BHIBJDA.js';
21
21
  import './chunk-CDDED64E.js';
22
22
  import './chunk-RA3O54FC.js';
23
23
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
24
24
  import './chunk-CRB3POP4.js';
25
- import './chunk-LJG6EMLJ.js';
26
- import './chunk-E6CO3MJE.js';
25
+ import './chunk-6CXNWKWD.js';
26
+ import './chunk-F2D5BSXS.js';
27
27
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
28
28
  import './chunk-HACGUL52.js';
29
29
  import './chunk-MESOOLF4.js';
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { readNewestDemo } from './chunk-ER6KQCVJ.js';
4
+ import { resolveCredentials, WorkCommandError } from './chunk-YXMGHGHR.js';
5
+ import './chunk-IP7BIBXJ.js';
6
+ import './chunk-HLZMAJJD.js';
7
+ import './chunk-S5CNYXUA.js';
8
+ import './chunk-MPC2UAW2.js';
9
+ import './chunk-NIY2UBT6.js';
10
+ import './chunk-LYGI3T66.js';
11
+ import './chunk-7V5GUEDU.js';
12
+ import './chunk-G2JWZDFA.js';
13
+ import './chunk-ANPNT6PM.js';
14
+ import { defaultFetch } from './chunk-6RKD7YZ6.js';
15
+ import './chunk-PJDQPF5N.js';
16
+ import './chunk-SOI6K5DY.js';
17
+ import './chunk-PA6CK6WQ.js';
18
+ import './chunk-BALIE3BA.js';
19
+ import './chunk-BJ3KTMDH.js';
20
+ import './chunk-44V5SD4G.js';
21
+ import './chunk-5BHIBJDA.js';
22
+ import './chunk-CDDED64E.js';
23
+ import './chunk-RA3O54FC.js';
24
+ import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
25
+ import './chunk-CRB3POP4.js';
26
+ import './chunk-6CXNWKWD.js';
27
+ import './chunk-F2D5BSXS.js';
28
+ import './chunk-VNVZDWO3.js';
29
+ import './chunk-HACGUL52.js';
30
+ import './chunk-MESOOLF4.js';
31
+ import './chunk-Z5GEFMRW.js';
32
+
33
+ createRequire(import.meta.url);
34
+
35
+ // src/work-demo-cmd.ts
36
+ var WorkDemoCommandError = class extends Error {
37
+ };
38
+ async function runWorkDemo(opts) {
39
+ const item = parseTrackerNumber(opts.item);
40
+ if (item === void 0) throw new WorkDemoCommandError(trackerNumberError("--item", opts.item ?? ""));
41
+ const creds = resolveCredentials(opts);
42
+ let demo;
43
+ try {
44
+ demo = await readNewestDemo({ ...creds, item, fetchImpl: opts.fetchImpl ?? defaultFetch });
45
+ } catch (err) {
46
+ throw new WorkCommandError(err instanceof Error ? err.message : String(err));
47
+ }
48
+ const data = { demo };
49
+ const output = opts.json ? JSON.stringify(data) : describe(item, demo);
50
+ if (!opts.quiet) process.stdout.write(output + "\n");
51
+ return { data, output };
52
+ }
53
+ function describe(item, demo) {
54
+ if (demo === null) return `Item ${item} has no demo.`;
55
+ const test = demo.record !== null && demo.record.schemaVersion === 3 ? demo.record.test : void 0;
56
+ return [
57
+ `Item ${item}: demo ${demo.artifactId}, recorded at ${demo.commitSha === "" ? "an unknown commit" : demo.commitSha} on ${demo.emittedAt}.`,
58
+ test === void 0 ? "The record names no test, so a session cannot record it again." : `Recorded by the test ${test}.`
59
+ ].join("\n");
60
+ }
61
+
62
+ export { WorkDemoCommandError, runWorkDemo };
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { resolveCredentials, getJson } from './chunk-VT4TTJPG.js';
3
+ import { resolveCredentials, getJson } from './chunk-YXMGHGHR.js';
4
4
  import './chunk-IP7BIBXJ.js';
5
- import './chunk-B2JURP6A.js';
6
- import './chunk-2WMZPJVE.js';
7
- import './chunk-EWVYQLD3.js';
8
- import './chunk-5DNCFOXA.js';
9
- import './chunk-HJYBWJAS.js';
10
- import './chunk-NSPRS7WK.js';
5
+ import './chunk-HLZMAJJD.js';
6
+ import './chunk-S5CNYXUA.js';
7
+ import './chunk-MPC2UAW2.js';
8
+ import './chunk-NIY2UBT6.js';
9
+ import './chunk-LYGI3T66.js';
10
+ import './chunk-7V5GUEDU.js';
11
11
  import './chunk-G2JWZDFA.js';
12
12
  import './chunk-ANPNT6PM.js';
13
13
  import { defaultFetch } from './chunk-6RKD7YZ6.js';
@@ -16,14 +16,14 @@ import './chunk-SOI6K5DY.js';
16
16
  import './chunk-PA6CK6WQ.js';
17
17
  import './chunk-BALIE3BA.js';
18
18
  import './chunk-BJ3KTMDH.js';
19
- import './chunk-G63KT5I5.js';
19
+ import './chunk-44V5SD4G.js';
20
20
  import './chunk-5BHIBJDA.js';
21
21
  import './chunk-CDDED64E.js';
22
22
  import './chunk-RA3O54FC.js';
23
23
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
24
24
  import './chunk-CRB3POP4.js';
25
- import './chunk-LJG6EMLJ.js';
26
- import './chunk-E6CO3MJE.js';
25
+ import './chunk-6CXNWKWD.js';
26
+ import './chunk-F2D5BSXS.js';
27
27
  import './chunk-VNVZDWO3.js';
28
28
  import './chunk-HACGUL52.js';
29
29
  import './chunk-MESOOLF4.js';
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { itemLabel, runWorkPr, WorkPrCommandError } from './chunk-ULBNTSAD.js';
4
- import { resolveCredentials } from './chunk-VT4TTJPG.js';
3
+ import { itemLabel, runWorkPr, WorkPrCommandError } from './chunk-5M2J7B5N.js';
4
+ import { resolveCredentials } from './chunk-YXMGHGHR.js';
5
5
  import './chunk-IP7BIBXJ.js';
6
- import './chunk-B2JURP6A.js';
7
- import './chunk-2WMZPJVE.js';
8
- import './chunk-EWVYQLD3.js';
9
- import './chunk-5DNCFOXA.js';
10
- import './chunk-HJYBWJAS.js';
11
- import './chunk-NSPRS7WK.js';
6
+ import './chunk-HLZMAJJD.js';
7
+ import './chunk-S5CNYXUA.js';
8
+ import './chunk-MPC2UAW2.js';
9
+ import './chunk-NIY2UBT6.js';
10
+ import './chunk-LYGI3T66.js';
11
+ import './chunk-7V5GUEDU.js';
12
12
  import './chunk-G2JWZDFA.js';
13
13
  import { C } from './chunk-ANPNT6PM.js';
14
14
  import { defaultFetch } from './chunk-6RKD7YZ6.js';
@@ -17,15 +17,15 @@ import './chunk-SOI6K5DY.js';
17
17
  import './chunk-PA6CK6WQ.js';
18
18
  import './chunk-BALIE3BA.js';
19
19
  import './chunk-BJ3KTMDH.js';
20
- import './chunk-G63KT5I5.js';
20
+ import './chunk-44V5SD4G.js';
21
21
  import './chunk-5BHIBJDA.js';
22
22
  import './chunk-CDDED64E.js';
23
23
  import './chunk-RA3O54FC.js';
24
24
  import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
25
25
  import './chunk-WZBHBH3J.js';
26
26
  import './chunk-CRB3POP4.js';
27
- import './chunk-LJG6EMLJ.js';
28
- import './chunk-E6CO3MJE.js';
27
+ import './chunk-6CXNWKWD.js';
28
+ import './chunk-F2D5BSXS.js';
29
29
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
30
30
  import './chunk-HACGUL52.js';
31
31
  import './chunk-MESOOLF4.js';
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { WorkPrCommandError, itemLabel, runWorkPr } from './chunk-ULBNTSAD.js';
3
+ export { WorkPrCommandError, itemLabel, runWorkPr } from './chunk-5M2J7B5N.js';
4
4
  import './chunk-IP7BIBXJ.js';
5
- import './chunk-B2JURP6A.js';
6
- import './chunk-2WMZPJVE.js';
7
- import './chunk-EWVYQLD3.js';
8
- import './chunk-5DNCFOXA.js';
9
- import './chunk-HJYBWJAS.js';
10
- import './chunk-NSPRS7WK.js';
5
+ import './chunk-HLZMAJJD.js';
6
+ import './chunk-S5CNYXUA.js';
7
+ import './chunk-MPC2UAW2.js';
8
+ import './chunk-NIY2UBT6.js';
9
+ import './chunk-LYGI3T66.js';
10
+ import './chunk-7V5GUEDU.js';
11
11
  import './chunk-G2JWZDFA.js';
12
12
  import './chunk-ANPNT6PM.js';
13
13
  import './chunk-6RKD7YZ6.js';
@@ -16,15 +16,15 @@ import './chunk-SOI6K5DY.js';
16
16
  import './chunk-PA6CK6WQ.js';
17
17
  import './chunk-BALIE3BA.js';
18
18
  import './chunk-BJ3KTMDH.js';
19
- import './chunk-G63KT5I5.js';
19
+ import './chunk-44V5SD4G.js';
20
20
  import './chunk-5BHIBJDA.js';
21
21
  import './chunk-CDDED64E.js';
22
22
  import './chunk-RA3O54FC.js';
23
23
  import './chunk-T2Q7ISPE.js';
24
24
  import './chunk-WZBHBH3J.js';
25
25
  import './chunk-CRB3POP4.js';
26
- import './chunk-LJG6EMLJ.js';
27
- import './chunk-E6CO3MJE.js';
26
+ import './chunk-6CXNWKWD.js';
27
+ import './chunk-F2D5BSXS.js';
28
28
  import './chunk-VNVZDWO3.js';
29
29
  import './chunk-HACGUL52.js';
30
30
  import './chunk-MESOOLF4.js';
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { WorkCommandError, resolveCredentials, getJson } from './chunk-YXMGHGHR.js';
4
+ import './chunk-IP7BIBXJ.js';
5
+ import './chunk-HLZMAJJD.js';
6
+ import './chunk-S5CNYXUA.js';
7
+ import { sanitizeTerminal } from './chunk-MPC2UAW2.js';
8
+ import { resolveRepoIdentity } from './chunk-NIY2UBT6.js';
9
+ import './chunk-LYGI3T66.js';
10
+ import './chunk-7V5GUEDU.js';
11
+ import './chunk-G2JWZDFA.js';
12
+ import { C } from './chunk-ANPNT6PM.js';
13
+ import { defaultFetch } from './chunk-6RKD7YZ6.js';
14
+ import './chunk-PJDQPF5N.js';
15
+ import './chunk-SOI6K5DY.js';
16
+ import './chunk-PA6CK6WQ.js';
17
+ import './chunk-BALIE3BA.js';
18
+ import './chunk-BJ3KTMDH.js';
19
+ import './chunk-44V5SD4G.js';
20
+ import './chunk-5BHIBJDA.js';
21
+ import './chunk-CDDED64E.js';
22
+ import './chunk-RA3O54FC.js';
23
+ import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
24
+ import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
25
+ import './chunk-CRB3POP4.js';
26
+ import './chunk-6CXNWKWD.js';
27
+ import './chunk-F2D5BSXS.js';
28
+ import './chunk-VNVZDWO3.js';
29
+ import './chunk-HACGUL52.js';
30
+ import './chunk-MESOOLF4.js';
31
+ import './chunk-Z5GEFMRW.js';
32
+
33
+ createRequire(import.meta.url);
34
+
35
+ // src/work-proofs-cmd.ts
36
+ function classifyProofs(data, checkoutHead) {
37
+ const heads = /* @__PURE__ */ new Set();
38
+ if (checkoutHead !== void 0 && checkoutHead !== "") heads.add(checkoutHead.toLowerCase());
39
+ data.pullRequests?.forEach((pr) => {
40
+ if ((pr.state === "open" || pr.state === "merged") && typeof pr.headSha === "string" && pr.headSha !== "") {
41
+ heads.add(pr.headSha.toLowerCase());
42
+ }
43
+ });
44
+ const entries = [];
45
+ for (const criterion of data.criteria?.items ?? []) {
46
+ if (criterion.proof === null || criterion.proof === "test") continue;
47
+ const newest = criterion.newestProof;
48
+ if (newest === null || newest === void 0) {
49
+ entries.push({ id: criterion.id, proof: criterion.proof, state: "missing", commit: null });
50
+ } else if (newest.commitSha !== null && heads.has(newest.commitSha.toLowerCase())) {
51
+ entries.push({ id: criterion.id, proof: criterion.proof, state: "current", commit: newest.commitSha });
52
+ } else {
53
+ entries.push({ id: criterion.id, proof: criterion.proof, state: "out-of-date", commit: newest.commitSha });
54
+ }
55
+ }
56
+ return entries;
57
+ }
58
+ var STATE_LABEL = { current: "current", "out-of-date": "out of date", missing: "missing" };
59
+ function render(entries, json) {
60
+ if (json) return JSON.stringify(entries);
61
+ if (entries.length === 0) return "No criterion declares a proof other than test.";
62
+ return entries.map((e) => `${sanitizeTerminal(e.id)} ${sanitizeTerminal(e.proof)} ${STATE_LABEL[e.state]} ${sanitizeTerminal(e.commit ?? "no commit")}`).join("\n");
63
+ }
64
+ async function runWorkProofs(opts) {
65
+ const env = opts.env ?? process.env;
66
+ let item;
67
+ if (opts.item !== void 0) {
68
+ item = parseTrackerNumber(opts.item);
69
+ if (item === void 0) throw new WorkCommandError(trackerNumberError("--item", opts.item));
70
+ } else if (env.OUTERLAYER_WORK !== void 0) {
71
+ const parsed = parseWorkItemEnv(env.OUTERLAYER_WORK);
72
+ if (!("number" in parsed)) throw new WorkCommandError(parsed.reason);
73
+ item = parsed.number;
74
+ }
75
+ if (item === void 0) {
76
+ throw new WorkCommandError("no work item. Pass --item <number>, or set OUTERLAYER_WORK to the item's number.");
77
+ }
78
+ const creds = resolveCredentials(opts);
79
+ const { data } = await getJson(creds.url, `/v1/work-items/${item}`, creds.apiKey, creds.appId, opts.fetchImpl ?? defaultFetch);
80
+ const body = data;
81
+ const items = body.criteria?.items ?? [];
82
+ if (items.some((c) => c.proof !== null && c.proof !== "test" && !("newestProof" in c))) {
83
+ throw new WorkCommandError(
84
+ "the gateway does not report each criterion's newest proof. Update the gateway, then run this again."
85
+ );
86
+ }
87
+ const checkoutHead = opts.checkoutHead ?? resolveRepoIdentity(opts.cwd ?? process.cwd()).commitSha;
88
+ if (!checkoutHead) {
89
+ throw new WorkCommandError("cannot read the checkout's HEAD. Run this inside the git checkout, or pass the head explicitly.");
90
+ }
91
+ const entries = classifyProofs(body, checkoutHead);
92
+ const output = render(entries, opts.json === true);
93
+ if (!opts.quiet) process.stdout.write(output + "\n");
94
+ return { entries, output, exitCode: entries.every((e) => e.state === "current") ? 0 : 1 };
95
+ }
96
+ async function runWorkProofsCommand(opts) {
97
+ try {
98
+ const result = await runWorkProofs(opts);
99
+ process.exitCode = result.exitCode;
100
+ } catch (err) {
101
+ if (err instanceof WorkCommandError) {
102
+ process.stderr.write(`${C.red}\u2717${C.reset} ${err.message}
103
+ `);
104
+ process.exitCode = 2;
105
+ return;
106
+ }
107
+ throw err;
108
+ }
109
+ }
110
+
111
+ export { classifyProofs, runWorkProofs, runWorkProofsCommand };
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { resolveCredentials, postJson, WorkCommandError } from './chunk-VT4TTJPG.js';
3
+ import { resolveCredentials, postJson, WorkCommandError } from './chunk-YXMGHGHR.js';
4
4
  import './chunk-IP7BIBXJ.js';
5
- import './chunk-B2JURP6A.js';
6
- import './chunk-2WMZPJVE.js';
7
- import './chunk-EWVYQLD3.js';
8
- import './chunk-5DNCFOXA.js';
9
- import './chunk-HJYBWJAS.js';
10
- import './chunk-NSPRS7WK.js';
5
+ import './chunk-HLZMAJJD.js';
6
+ import './chunk-S5CNYXUA.js';
7
+ import './chunk-MPC2UAW2.js';
8
+ import './chunk-NIY2UBT6.js';
9
+ import './chunk-LYGI3T66.js';
10
+ import './chunk-7V5GUEDU.js';
11
11
  import './chunk-G2JWZDFA.js';
12
12
  import './chunk-ANPNT6PM.js';
13
13
  import { defaultFetch } from './chunk-6RKD7YZ6.js';
@@ -16,14 +16,14 @@ import './chunk-SOI6K5DY.js';
16
16
  import './chunk-PA6CK6WQ.js';
17
17
  import './chunk-BALIE3BA.js';
18
18
  import './chunk-BJ3KTMDH.js';
19
- import './chunk-G63KT5I5.js';
19
+ import './chunk-44V5SD4G.js';
20
20
  import './chunk-5BHIBJDA.js';
21
21
  import './chunk-CDDED64E.js';
22
22
  import './chunk-RA3O54FC.js';
23
23
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
24
24
  import './chunk-CRB3POP4.js';
25
- import './chunk-LJG6EMLJ.js';
26
- import './chunk-E6CO3MJE.js';
25
+ import './chunk-6CXNWKWD.js';
26
+ import './chunk-F2D5BSXS.js';
27
27
  import './chunk-VNVZDWO3.js';
28
28
  import './chunk-HACGUL52.js';
29
29
  import './chunk-MESOOLF4.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outerlayer/cli",
3
- "version": "0.33.0-next.20261023003700",
3
+ "version": "0.33.0-next.20261023120437",
4
4
  "description": "OuterLayer CLI — commands: init, claude, connect, doctor, login, logout, sync, daemon (alias: watch), emit, findings, work, spec, runner, hooks, mcp, context. Capture and sync coding-agent sessions, and record proof of factory work.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Magu Studios, Inc.",
@@ -6,7 +6,7 @@ description: >
6
6
  reply on the thread with a replacement artifact or a sentence, and push. Also resolve a
7
7
  merge conflict with the base branch. Use when a work item has threads waiting on an
8
8
  agent or a conflicting pull request, or when asked to "answer the review" or "fix what
9
- the reviewer failed". Invoke with /outerlayer-amend.
9
+ the reviewer failed".
10
10
  ---
11
11
 
12
12
  Run the CLI as `outerlayer`. If that command is not on PATH, run `npx -y @outerlayer/cli` with the same arguments. Every `outerlayer ...` command below follows this rule. Write the full command each time. Do not put it in a shell variable: zsh runs `$VAR args` as one command name, not as a command with arguments.
@@ -22,7 +22,7 @@ or fails a thread. A session can only reply.
22
22
  A session never records a pass or fail on an artifact.
23
23
 
24
24
  `OUTERLAYER_WORK` is the work item's number. Check out the pull request's
25
- branch first if the working tree is not already on it.
25
+ branch first, unless the working tree is on it.
26
26
 
27
27
  ## Arguments
28
28
 
@@ -31,17 +31,16 @@ branch first if the working tree is not already on it.
31
31
 
32
32
  ## Builds and local sessions
33
33
 
34
- A session a runner started is a build: `OUTERLAYER_JOB_DIR` is set there and
35
- nowhere else. A build's GitHub token cannot comment on the issue or the pull
36
- request, and its pushes go through the runner. A local session uses the
37
- person's own git remote and `gh` login.
34
+ A runner build sets `OUTERLAYER_JOB_DIR`; no other session does. A build's
35
+ GitHub token cannot comment on the issue or the pull request, and its pushes
36
+ go through the runner. A local session uses the person's own git remote and
37
+ `gh` login.
38
38
 
39
39
  ## Several repositories
40
40
 
41
- `OUTERLAYER_REPOSITORIES` lists a build's repositories, each with its `path`,
42
- `branch` and whether it is `primary`. Fix each thread in the checkout of the
43
- repository its pull request is in. Commit and push in each checkout you
44
- change, to its own branch only.
41
+ `OUTERLAYER_REPOSITORIES` lists a build's repositories, each with `path`,
42
+ `branch` and `primary`. Fix each thread in the checkout of its pull request's
43
+ repository. Commit and push in each checkout you change, to its own branch only.
45
44
 
46
45
  ## Steps
47
46
 
@@ -59,7 +58,7 @@ change, to its own branch only.
59
58
  **Hand off a conflict you cannot resolve.** If the resolution needs a
60
59
  product decision, or the gate stays red after one fix, abort the merge.
61
60
  Push nothing. Post on the general thread with `--ready`. Name the
62
- conflicting files, the base commits behind them and the decision needed.
61
+ conflicting files, their base commits and the decision needed.
63
62
  Tell the person to fail the general thread with their answer.
64
63
  2. **Read the threads.**
65
64
  `outerlayer work threads --item "$OUTERLAYER_WORK" --json` prints
@@ -69,26 +68,24 @@ change, to its own branch only.
69
68
  `body`, `action` and `artifact`. Keep the threads whose `waitingOn` is
70
69
  `agent`.
71
70
  If none is waiting and step 1 resolved no conflict, say so and stop. Take
72
- the pull request (`repository`, `prNumber`) from the step 1 status JSON's
73
- `pullRequests`.
71
+ the pull request (`repository`, `prNumber`) from step 1's `pullRequests`.
74
72
  3. **Re-orient.** The status JSON's `issue.body` is OuterLayer's copy of the
75
73
  issue. It is the spec: find each thread's criterion there. Read the pull
76
- request, with its evidence comment, through the git host. Read every person's comment since the last agent
77
- comment on the thread. Read them literally.
74
+ request and its evidence comment through the git host. Read every person's
75
+ comment since the last agent comment, literally.
78
76
  Then read `checks` in the status JSON. A failing check lists its check
79
- items under `items`, one per thing it judged, each with a `result` and a
80
- `reason`. When a person asks you to fix failing checks or criteria, fix
81
- each failing check item by its reason.
77
+ items under `items`, each with a `result` and a `reason`. When a person asks you to fix failing
78
+ checks or criteria, fix each failing check item by its reason.
82
79
  4. **Decide each thread.** Reply on every criterion thread waiting on an
83
80
  agent, with `--criterion`. Read each note and pick one:
84
- - **Answer it.** A question gets an answer. Reply with the answer and
85
- change nothing. Say which file or test you looked at.
81
+ - **Answer it.** A question gets an answer. Change nothing. Say which
82
+ file or test you looked at.
86
83
  - **Fix it.** A requested change gets a fix. Change the code, tests, docs or
87
- evidence so the criterion is met as written, and attach new proof when the
88
- criterion declares one.
84
+ evidence so the criterion is met as written, and attach new proof when it
85
+ declares one.
89
86
  - **The spec is wrong.** The criterion cannot be met as written, for
90
- example because it names a path a repository rule forbids. Never rewrite
91
- a criterion: hand it off (step 7) with the wording change to make.
87
+ example one that names a path a repository rule forbids. Never rewrite it:
88
+ hand it off (step 7) with the wording change.
92
89
  - **Cannot tell.** Hand an ambiguous comment off with `--ready`: quote it
93
90
  and ask one question.
94
91
  5. **Fix, prove, reply.** An answer needs no commit: reply on its criterion
@@ -107,13 +104,12 @@ change, to its own branch only.
107
104
  Note the id it prints. Run `outerlayer sync`, so the attach can find the
108
105
  artifact. Then reply, which supersedes the old proof:
109
106
  `outerlayer work comment --item "$OUTERLAYER_WORK" --criterion <criterion> --body "<what changed>" --artifact <uuid> --attach`.
110
- A replacement whose bytes match the current proof is flagged `unchanged`,
111
- so the thread still waits on you.
107
+ A replacement with the current proof's bytes is flagged `unchanged`, and
108
+ the thread still waits on you.
112
109
  - **A check the factory host records**, such as `acceptance-criteria`, is
113
110
  judged again after this session ends. Name each failing check item and
114
111
  your fix. Never claim the check passes.
115
- - **Otherwise** (the general thread, or a fix that needs no new proof),
116
- reply with a sentence naming what changed and the commit:
112
+ - **Otherwise**, reply with a sentence naming what changed and the commit:
117
113
  `outerlayer work comment --item "$OUTERLAYER_WORK" [--criterion <criterion>] --body "<what changed>" --ready`.
118
114
  Omit `--criterion` on the general thread.
119
115
  6. **Watch CI.** Skip this step when you pushed nothing. Run
@@ -128,14 +124,20 @@ change, to its own branch only.
128
124
  sentence of fact, then the decision a person must make. For a spec problem,
129
125
  quote the criterion and give the replacement wording. `--ready` hands the
130
126
  thread back to a person.
131
- 8. **Check nothing is left waiting.** Read the threads again. A thread you
132
- started with that still waits on an agent has a reply that did not land or
133
- was flagged `unchanged`. Fix that, or report it.
134
- 9. **Report.** Write one line per thread: the criterion (or the general
127
+ 8. **Check nothing is left waiting.** Reread threads. A thread still waiting
128
+ on an agent has a reply that did not land or was flagged `unchanged`. Fix
129
+ or report it. Then run `outerlayer sync` and `outerlayer work proofs`.
130
+ 9. **Record the demo again.** Skip this step when you pushed nothing. With
131
+ the app running, run in each pushed checkout
132
+ `node .outerlayer/skills/outerlayer-amend/scripts/rerecord-demo.mjs --item "$OUTERLAYER_WORK" --pr <prNumber> --repository <owner/name>`.
133
+ It prints the demo line for the report.
134
+ 10. **Report.** Write one line per thread: the criterion (or the general
135
135
  thread), and fixed (with the replacement) or handed off (with the reason).
136
136
  Add a line for a merge conflict (merged with the base sha, or handed off
137
- with the reason), and a CI line when you pushed: green, or each red check
138
- and why. Post the lines once on the general thread:
137
+ with the reason), a CI line when you pushed (green, or each red check and
138
+ why), the demo line from step 9, and a line naming each proof missing or
139
+ out of date.
140
+ Post the lines once on the general thread:
139
141
  `outerlayer work comment --item "$OUTERLAYER_WORK" --body "<the lines>"`.
140
142
  A plain comment from an agent leaves the general thread waiting on a person.
141
143
  A local session also posts them on the pull request. End with the same lines.