safeword 0.78.3 → 0.78.5

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 (126) hide show
  1. package/codex-plugin/.codex-plugin/plugin.json +1 -1
  2. package/codex-plugin/hooks.json +5 -5
  3. package/dist/{architecture-RQ377ZER.js → architecture-DUETRLYE.js} +7 -7
  4. package/dist/{architecture-document-KS3CLSYN.js → architecture-document-5ZKHSXEK.js} +4 -4
  5. package/dist/{architecture-monorepo-NJWWU65G.js → architecture-monorepo-W5S7OHPU.js} +2 -2
  6. package/dist/{boundary-OPTC2RVJ.js → boundary-3KVA2ENZ.js} +2 -2
  7. package/dist/{chunk-CFME47IY.js → chunk-73TABQRT.js} +5 -5
  8. package/dist/{chunk-CNBZ3S5U.js → chunk-DBXX5K74.js} +4 -4
  9. package/dist/{chunk-AXAGJLMP.js → chunk-G757F3EU.js} +4 -4
  10. package/dist/{chunk-IDRLACDS.js → chunk-GFDINP7M.js} +11 -11
  11. package/dist/{chunk-CRGPYC35.js → chunk-OGMP5ANP.js} +28 -134
  12. package/dist/chunk-OGMP5ANP.js.map +1 -0
  13. package/dist/{chunk-QLOUSTQE.js → chunk-OWNUJWUX.js} +2 -2
  14. package/dist/{chunk-QLOUSTQE.js.map → chunk-OWNUJWUX.js.map} +1 -1
  15. package/dist/{chunk-MZKTOX6X.js → chunk-QDBGWS4E.js} +7 -7
  16. package/dist/{chunk-76XHADUG.js → chunk-RQ7RZYNB.js} +4 -4
  17. package/dist/chunk-SOO72SJT.js +138 -0
  18. package/dist/chunk-SOO72SJT.js.map +1 -0
  19. package/dist/{chunk-LH2FAQTI.js → chunk-VJUPD7JI.js} +5 -5
  20. package/dist/{cleanup-ELVHZPRC.js → cleanup-XY5H4O36.js} +4 -4
  21. package/dist/{cleanup-command-5BY4FWAT.js → cleanup-command-YPO2M7TJ.js} +7 -7
  22. package/dist/cli.js +74 -66
  23. package/dist/cli.js.map +1 -1
  24. package/dist/{clients-WRPBRO6V.js → clients-RKXDEWUB.js} +2 -2
  25. package/dist/{codex-bootstrap-GYG7N4XU.js → codex-bootstrap-MTB4P2K7.js} +53 -21
  26. package/dist/codex-bootstrap-MTB4P2K7.js.map +1 -0
  27. package/dist/{codex-hook-7ILIPLYM.js → codex-hook-GQN7QWWY.js} +4 -4
  28. package/dist/{codify-HSDVRZFI.js → codify-WODYURFP.js} +2 -2
  29. package/dist/{commands-X4KBCMHS.js → commands-BP3PIBX7.js} +30 -29
  30. package/dist/commands-BP3PIBX7.js.map +1 -0
  31. package/dist/{config-TXJRCN3W.js → config-A3H4KUVL.js} +2 -2
  32. package/dist/{configured-paths-4CRHLBIF.js → configured-paths-Y3PRFSMZ.js} +2 -2
  33. package/dist/{contract-B7NDKO5B.js → contract-3X2VMC6G.js} +2 -2
  34. package/dist/{coordinator-ZMD3467F.js → coordinator-5VRVY2IN.js} +2 -2
  35. package/dist/{corpus-PUBXCCSN.js → corpus-P5XJOBN2.js} +2 -2
  36. package/dist/{doctor-RPXETRSJ.js → doctor-52RLRKIY.js} +10 -10
  37. package/dist/{feature-directories-ASNDEM7J.js → feature-directories-XZT32CEW.js} +2 -2
  38. package/dist/{finalization-BGPOEBAL.js → finalization-A3KO7SWO.js} +4 -4
  39. package/dist/{gh-cli-OTX7PORT.js → gh-cli-MUIPLCO5.js} +2 -2
  40. package/dist/{github-rest-JCW32377.js → github-rest-PMQWQF5H.js} +2 -2
  41. package/dist/index.js +1 -1
  42. package/dist/{job-NXXG4U5K.js → job-6HJWVFNX.js} +2 -2
  43. package/dist/{learning-sync-2WIAOTW3.js → learning-sync-XKG26WON.js} +2 -2
  44. package/dist/{legacy-global-guidance-WTDI53H7.js → legacy-global-guidance-TNXH2RMA.js} +2 -2
  45. package/dist/{lint-gherkin-LS3CHW3J.js → lint-gherkin-DKY3CEXU.js} +2 -2
  46. package/dist/{operations-OZKEQCS4.js → operations-2WQNEZFS.js} +13 -11
  47. package/dist/{output-ZYTEW6SC.js → output-FXDIFWBE.js} +2 -2
  48. package/dist/{packet-7S6CZJQR.js → packet-JG3BUG22.js} +2 -2
  49. package/dist/presets/typescript/index.js +1 -1
  50. package/dist/{profile-SDFSBKH5.js → profile-7WH7S5PY.js} +2 -2
  51. package/dist/{prompt-LYPODDC3.js → prompt-AG7KBS7V.js} +2 -2
  52. package/dist/{remove-P5JQNS5P.js → remove-VF42QVXD.js} +5 -5
  53. package/dist/{retro-EQK2Z2Z6.js → retro-TJDZGQWA.js} +8 -8
  54. package/dist/{retro-draft-spool-MDPBVM6J.js → retro-draft-spool-DTPDP77W.js} +2 -2
  55. package/dist/{retro-extract-CZMDD4WB.js → retro-extract-RHJEIY4D.js} +2 -2
  56. package/dist/{review-pr-CWRD446M.js → review-pr-OD7ROMJD.js} +2 -2
  57. package/dist/{review-pr-publication-AIX2U3VM.js → review-pr-publication-2SO7JDOW.js} +2 -2
  58. package/dist/{run-T45X6Z6C.js → run-U7IB5MQE.js} +2 -2
  59. package/dist/{self-report-V7PHKTS6.js → self-report-DUGBPF2B.js} +2 -2
  60. package/dist/{status-S24PDFXB.js → status-7AXGONQZ.js} +10 -10
  61. package/dist/{status-F5TFEIZ6.js → status-UZHHEUOA.js} +4 -4
  62. package/dist/{sync-config-EUVBPUUG.js → sync-config-BXH6ODQK.js} +2 -2
  63. package/dist/{sync-tracker-5FSIIAMS.js → sync-tracker-YTR6I3ZV.js} +2 -2
  64. package/dist/{test-execution-HASVO6EL.js → test-execution-JZEGAVJN.js} +2 -2
  65. package/dist/{test-plan-EM3PVGIX.js → test-plan-YDGE4LPC.js} +2 -2
  66. package/dist/{ticket-new-H6ZNIRS4.js → ticket-new-AVKM6VFO.js} +2 -2
  67. package/dist/{ticket-sync-7QRH6PVT.js → ticket-sync-WCPSGQGG.js} +2 -2
  68. package/dist/{tracker-map-7AGCTWBZ.js → tracker-map-UW5OVXPD.js} +2 -2
  69. package/dist/{tracker-sync-MLVYGFQJ.js → tracker-sync-OZQQWCHS.js} +2 -2
  70. package/package.json +1 -1
  71. package/dist/chunk-CRGPYC35.js.map +0 -1
  72. package/dist/codex-bootstrap-GYG7N4XU.js.map +0 -1
  73. package/dist/commands-X4KBCMHS.js.map +0 -1
  74. /package/dist/{architecture-RQ377ZER.js.map → architecture-DUETRLYE.js.map} +0 -0
  75. /package/dist/{architecture-document-KS3CLSYN.js.map → architecture-document-5ZKHSXEK.js.map} +0 -0
  76. /package/dist/{architecture-monorepo-NJWWU65G.js.map → architecture-monorepo-W5S7OHPU.js.map} +0 -0
  77. /package/dist/{boundary-OPTC2RVJ.js.map → boundary-3KVA2ENZ.js.map} +0 -0
  78. /package/dist/{chunk-CFME47IY.js.map → chunk-73TABQRT.js.map} +0 -0
  79. /package/dist/{chunk-CNBZ3S5U.js.map → chunk-DBXX5K74.js.map} +0 -0
  80. /package/dist/{chunk-AXAGJLMP.js.map → chunk-G757F3EU.js.map} +0 -0
  81. /package/dist/{chunk-IDRLACDS.js.map → chunk-GFDINP7M.js.map} +0 -0
  82. /package/dist/{chunk-MZKTOX6X.js.map → chunk-QDBGWS4E.js.map} +0 -0
  83. /package/dist/{chunk-76XHADUG.js.map → chunk-RQ7RZYNB.js.map} +0 -0
  84. /package/dist/{chunk-LH2FAQTI.js.map → chunk-VJUPD7JI.js.map} +0 -0
  85. /package/dist/{cleanup-ELVHZPRC.js.map → cleanup-XY5H4O36.js.map} +0 -0
  86. /package/dist/{cleanup-command-5BY4FWAT.js.map → cleanup-command-YPO2M7TJ.js.map} +0 -0
  87. /package/dist/{clients-WRPBRO6V.js.map → clients-RKXDEWUB.js.map} +0 -0
  88. /package/dist/{codex-hook-7ILIPLYM.js.map → codex-hook-GQN7QWWY.js.map} +0 -0
  89. /package/dist/{codify-HSDVRZFI.js.map → codify-WODYURFP.js.map} +0 -0
  90. /package/dist/{config-TXJRCN3W.js.map → config-A3H4KUVL.js.map} +0 -0
  91. /package/dist/{configured-paths-4CRHLBIF.js.map → configured-paths-Y3PRFSMZ.js.map} +0 -0
  92. /package/dist/{contract-B7NDKO5B.js.map → contract-3X2VMC6G.js.map} +0 -0
  93. /package/dist/{coordinator-ZMD3467F.js.map → coordinator-5VRVY2IN.js.map} +0 -0
  94. /package/dist/{corpus-PUBXCCSN.js.map → corpus-P5XJOBN2.js.map} +0 -0
  95. /package/dist/{doctor-RPXETRSJ.js.map → doctor-52RLRKIY.js.map} +0 -0
  96. /package/dist/{feature-directories-ASNDEM7J.js.map → feature-directories-XZT32CEW.js.map} +0 -0
  97. /package/dist/{finalization-BGPOEBAL.js.map → finalization-A3KO7SWO.js.map} +0 -0
  98. /package/dist/{gh-cli-OTX7PORT.js.map → gh-cli-MUIPLCO5.js.map} +0 -0
  99. /package/dist/{github-rest-JCW32377.js.map → github-rest-PMQWQF5H.js.map} +0 -0
  100. /package/dist/{job-NXXG4U5K.js.map → job-6HJWVFNX.js.map} +0 -0
  101. /package/dist/{learning-sync-2WIAOTW3.js.map → learning-sync-XKG26WON.js.map} +0 -0
  102. /package/dist/{legacy-global-guidance-WTDI53H7.js.map → legacy-global-guidance-TNXH2RMA.js.map} +0 -0
  103. /package/dist/{lint-gherkin-LS3CHW3J.js.map → lint-gherkin-DKY3CEXU.js.map} +0 -0
  104. /package/dist/{operations-OZKEQCS4.js.map → operations-2WQNEZFS.js.map} +0 -0
  105. /package/dist/{output-ZYTEW6SC.js.map → output-FXDIFWBE.js.map} +0 -0
  106. /package/dist/{packet-7S6CZJQR.js.map → packet-JG3BUG22.js.map} +0 -0
  107. /package/dist/{profile-SDFSBKH5.js.map → profile-7WH7S5PY.js.map} +0 -0
  108. /package/dist/{prompt-LYPODDC3.js.map → prompt-AG7KBS7V.js.map} +0 -0
  109. /package/dist/{remove-P5JQNS5P.js.map → remove-VF42QVXD.js.map} +0 -0
  110. /package/dist/{retro-EQK2Z2Z6.js.map → retro-TJDZGQWA.js.map} +0 -0
  111. /package/dist/{retro-draft-spool-MDPBVM6J.js.map → retro-draft-spool-DTPDP77W.js.map} +0 -0
  112. /package/dist/{retro-extract-CZMDD4WB.js.map → retro-extract-RHJEIY4D.js.map} +0 -0
  113. /package/dist/{review-pr-CWRD446M.js.map → review-pr-OD7ROMJD.js.map} +0 -0
  114. /package/dist/{review-pr-publication-AIX2U3VM.js.map → review-pr-publication-2SO7JDOW.js.map} +0 -0
  115. /package/dist/{run-T45X6Z6C.js.map → run-U7IB5MQE.js.map} +0 -0
  116. /package/dist/{self-report-V7PHKTS6.js.map → self-report-DUGBPF2B.js.map} +0 -0
  117. /package/dist/{status-F5TFEIZ6.js.map → status-7AXGONQZ.js.map} +0 -0
  118. /package/dist/{status-S24PDFXB.js.map → status-UZHHEUOA.js.map} +0 -0
  119. /package/dist/{sync-config-EUVBPUUG.js.map → sync-config-BXH6ODQK.js.map} +0 -0
  120. /package/dist/{sync-tracker-5FSIIAMS.js.map → sync-tracker-YTR6I3ZV.js.map} +0 -0
  121. /package/dist/{test-execution-HASVO6EL.js.map → test-execution-JZEGAVJN.js.map} +0 -0
  122. /package/dist/{test-plan-EM3PVGIX.js.map → test-plan-YDGE4LPC.js.map} +0 -0
  123. /package/dist/{ticket-new-H6ZNIRS4.js.map → ticket-new-AVKM6VFO.js.map} +0 -0
  124. /package/dist/{ticket-sync-7QRH6PVT.js.map → ticket-sync-WCPSGQGG.js.map} +0 -0
  125. /package/dist/{tracker-map-7AGCTWBZ.js.map → tracker-map-UW5OVXPD.js.map} +0 -0
  126. /package/dist/{tracker-sync-MLVYGFQJ.js.map → tracker-sync-OZQQWCHS.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "safeword",
3
- "version": "0.78.3",
3
+ "version": "0.78.5",
4
4
  "description": "Safeword workflow guidance and gates for Codex.",
5
5
  "author": {
6
6
  "name": "Arcade AI"
@@ -6,7 +6,7 @@
6
6
  "hooks": [
7
7
  {
8
8
  "type": "command",
9
- "command": "bunx --bun safeword@0.78.3 hook codex session-start --plugin-hook",
9
+ "command": "bunx --bun safeword@0.78.5 hook codex session-start --plugin-hook",
10
10
  "timeout": 120,
11
11
  "statusMessage": "Loading Safeword standing instructions"
12
12
  }
@@ -19,7 +19,7 @@
19
19
  "hooks": [
20
20
  {
21
21
  "type": "command",
22
- "command": "bunx --bun safeword@0.78.3 hook codex pre-tool-use --plugin-hook",
22
+ "command": "bunx --bun safeword@0.78.5 hook codex pre-tool-use --plugin-hook",
23
23
  "timeout": 30,
24
24
  "statusMessage": "Checking Safeword edit gates"
25
25
  }
@@ -32,7 +32,7 @@
32
32
  "hooks": [
33
33
  {
34
34
  "type": "command",
35
- "command": "bunx --bun safeword@0.78.3 hook codex post-tool-use --plugin-hook",
35
+ "command": "bunx --bun safeword@0.78.5 hook codex post-tool-use --plugin-hook",
36
36
  "timeout": 30,
37
37
  "statusMessage": "Surfacing Safeword post-tool context"
38
38
  }
@@ -45,7 +45,7 @@
45
45
  "hooks": [
46
46
  {
47
47
  "type": "command",
48
- "command": "bunx --bun safeword@0.78.3 hook codex user-prompt-submit --plugin-hook",
48
+ "command": "bunx --bun safeword@0.78.5 hook codex user-prompt-submit --plugin-hook",
49
49
  "timeout": 30,
50
50
  "statusMessage": "Checking queued Safeword prompt context"
51
51
  }
@@ -58,7 +58,7 @@
58
58
  "hooks": [
59
59
  {
60
60
  "type": "command",
61
- "command": "bunx --bun safeword@0.78.3 hook codex stop --plugin-hook",
61
+ "command": "bunx --bun safeword@0.78.5 hook codex stop --plugin-hook",
62
62
  "timeout": 600,
63
63
  "statusMessage": "Checking Safeword stop continuation"
64
64
  }
@@ -9,11 +9,7 @@ import {
9
9
  planSelfHealProject,
10
10
  selfHealProject,
11
11
  selfHealProjectPreservingProse
12
- } from "./chunk-LH2FAQTI.js";
13
- import {
14
- discoverUnreadableWorkspaces,
15
- extractMonorepoArchitectureSnapshot
16
- } from "./chunk-VZ5B2SIO.js";
12
+ } from "./chunk-VJUPD7JI.js";
17
13
  import {
18
14
  GENERATED_ARCHITECTURE_FILENAME,
19
15
  isArchitectureDocumentEnforcementEnabled,
@@ -21,11 +17,15 @@ import {
21
17
  resolveGeneratedArchitecturePath,
22
18
  toRepoDirectory
23
19
  } from "./chunk-RVDXBHUG.js";
20
+ import {
21
+ discoverUnreadableWorkspaces,
22
+ extractMonorepoArchitectureSnapshot
23
+ } from "./chunk-VZ5B2SIO.js";
24
24
  import {
25
25
  readJson,
26
26
  writeJson
27
27
  } from "./chunk-HF3DXZEA.js";
28
- import "./chunk-QLOUSTQE.js";
28
+ import "./chunk-OWNUJWUX.js";
29
29
 
30
30
  // src/commands/architecture.ts
31
31
  import { execFileSync } from "child_process";
@@ -650,4 +650,4 @@ export {
650
650
  architectureStage,
651
651
  architectureStaged
652
652
  };
653
- //# sourceMappingURL=architecture-RQ377ZER.js.map
653
+ //# sourceMappingURL=architecture-DUETRLYE.js.map
@@ -7,11 +7,11 @@ import {
7
7
  selfHeal,
8
8
  selfHealProject,
9
9
  selfHealProjectPreservingProse
10
- } from "./chunk-LH2FAQTI.js";
11
- import "./chunk-VZ5B2SIO.js";
10
+ } from "./chunk-VJUPD7JI.js";
12
11
  import "./chunk-RVDXBHUG.js";
12
+ import "./chunk-VZ5B2SIO.js";
13
13
  import "./chunk-HF3DXZEA.js";
14
- import "./chunk-QLOUSTQE.js";
14
+ import "./chunk-OWNUJWUX.js";
15
15
  export {
16
16
  isSafewordOwned,
17
17
  isWouldChangeAction,
@@ -22,4 +22,4 @@ export {
22
22
  selfHealProject,
23
23
  selfHealProjectPreservingProse
24
24
  };
25
- //# sourceMappingURL=architecture-document-KS3CLSYN.js.map
25
+ //# sourceMappingURL=architecture-document-5ZKHSXEK.js.map
@@ -5,11 +5,11 @@ import {
5
5
  monorepoFingerprintOf
6
6
  } from "./chunk-VZ5B2SIO.js";
7
7
  import "./chunk-HF3DXZEA.js";
8
- import "./chunk-QLOUSTQE.js";
8
+ import "./chunk-OWNUJWUX.js";
9
9
  export {
10
10
  discoverUnreadableWorkspaces,
11
11
  discoverWorkspaces,
12
12
  extractMonorepoArchitectureSnapshot,
13
13
  monorepoFingerprintOf
14
14
  };
15
- //# sourceMappingURL=architecture-monorepo-NJWWU65G.js.map
15
+ //# sourceMappingURL=architecture-monorepo-W5S7OHPU.js.map
@@ -25,7 +25,7 @@ import {
25
25
  import {
26
26
  readFileSafe
27
27
  } from "./chunk-HF3DXZEA.js";
28
- import "./chunk-QLOUSTQE.js";
28
+ import "./chunk-OWNUJWUX.js";
29
29
 
30
30
  // src/commands/boundary.ts
31
31
  import { execFileSync as execFileSync2 } from "child_process";
@@ -630,4 +630,4 @@ function boundary(options) {
630
630
  export {
631
631
  boundary
632
632
  };
633
- //# sourceMappingURL=boundary-OPTC2RVJ.js.map
633
+ //# sourceMappingURL=boundary-3KVA2ENZ.js.map
@@ -15,15 +15,15 @@ import {
15
15
  writeClaudeMigrationAttention,
16
16
  writeClaudePluginMode
17
17
  } from "./chunk-WVA4Q6BX.js";
18
+ import {
19
+ writeDurableFile,
20
+ writeDurableFileExclusive
21
+ } from "./chunk-QOLHGAD5.js";
18
22
  import {
19
23
  cataloguedClaudeLegacyPaths,
20
24
  isAcceptedHistoricalFile,
21
25
  isAcceptedHistoricalHook
22
26
  } from "./chunk-HNCUIXDY.js";
23
- import {
24
- writeDurableFile,
25
- writeDurableFileExclusive
26
- } from "./chunk-QOLHGAD5.js";
27
27
  import {
28
28
  createResult
29
29
  } from "./chunk-FOYGZ4MK.js";
@@ -833,4 +833,4 @@ export {
833
833
  migrateClaudeLegacyAutomatically,
834
834
  recoverClaudeCleanup
835
835
  };
836
- //# sourceMappingURL=chunk-CFME47IY.js.map
836
+ //# sourceMappingURL=chunk-73TABQRT.js.map
@@ -1,3 +1,6 @@
1
+ import {
2
+ writeDurableFile
3
+ } from "./chunk-QOLHGAD5.js";
1
4
  import {
2
5
  SAFEWORD_SCHEMA
3
6
  } from "./chunk-IPTM5VE7.js";
@@ -7,9 +10,6 @@ import {
7
10
  import {
8
11
  CODEX_MIGRATION_SCHEMA
9
12
  } from "./chunk-AVAUUIDB.js";
10
- import {
11
- writeDurableFile
12
- } from "./chunk-QOLHGAD5.js";
13
13
 
14
14
  // src/codex-plugin/legacy-authority.ts
15
15
  import { accessSync, constants, lstatSync, readFileSync } from "fs";
@@ -772,4 +772,4 @@ export {
772
772
  observeCodexSessionProof,
773
773
  observeCodexHookProof
774
774
  };
775
- //# sourceMappingURL=chunk-CNBZ3S5U.js.map
775
+ //# sourceMappingURL=chunk-DBXX5K74.js.map
@@ -1,6 +1,3 @@
1
- import {
2
- CODEX_MIGRATION_SCHEMA
3
- } from "./chunk-AVAUUIDB.js";
4
1
  import {
5
2
  durableRename,
6
3
  writeDurableFile
@@ -8,6 +5,9 @@ import {
8
5
  import {
9
6
  CodexMigrationError
10
7
  } from "./chunk-CDWNLTHY.js";
8
+ import {
9
+ CODEX_MIGRATION_SCHEMA
10
+ } from "./chunk-AVAUUIDB.js";
11
11
 
12
12
  // src/codex-plugin/finalization.ts
13
13
  import { createHash, randomUUID } from "crypto";
@@ -492,4 +492,4 @@ export {
492
492
  observeCodexRecoveryPlan,
493
493
  applyCodexFinalization
494
494
  };
495
- //# sourceMappingURL=chunk-AXAGJLMP.js.map
495
+ //# sourceMappingURL=chunk-G757F3EU.js.map
@@ -39,6 +39,16 @@ import {
39
39
  hasLegacyClaudePluginMode,
40
40
  readClaudePluginMode
41
41
  } from "./chunk-WVA4Q6BX.js";
42
+ import {
43
+ codexFinalizationIsComplete
44
+ } from "./chunk-G757F3EU.js";
45
+ import {
46
+ findDanglingDependencies,
47
+ findTicketsInCycles,
48
+ formatTicketReference,
49
+ inspectTicketIndexConflicts,
50
+ readTickets
51
+ } from "./chunk-MVFHTUQ3.js";
42
52
  import {
43
53
  BDD_LANE_FILE_PATHS,
44
54
  BDD_LANE_SCRIPT,
@@ -51,16 +61,6 @@ import {
51
61
  import {
52
62
  getPythonToolDependencyGaps
53
63
  } from "./chunk-JSR3HXFT.js";
54
- import {
55
- codexFinalizationIsComplete
56
- } from "./chunk-AXAGJLMP.js";
57
- import {
58
- findDanglingDependencies,
59
- findTicketsInCycles,
60
- formatTicketReference,
61
- inspectTicketIndexConflicts,
62
- readTickets
63
- } from "./chunk-MVFHTUQ3.js";
64
64
  import {
65
65
  createResult
66
66
  } from "./chunk-FOYGZ4MK.js";
@@ -1088,4 +1088,4 @@ export {
1088
1088
  observeCursorProject,
1089
1089
  unselectedCursorFinding
1090
1090
  };
1091
- //# sourceMappingURL=chunk-IDRLACDS.js.map
1091
+ //# sourceMappingURL=chunk-GFDINP7M.js.map
@@ -4,13 +4,7 @@ import {
4
4
  legacyCommandIdentity,
5
5
  observeCodexHookProof,
6
6
  writeCodexActivationMarker
7
- } from "./chunk-CNBZ3S5U.js";
8
- import {
9
- SAFEWORD_SCHEMA
10
- } from "./chunk-IPTM5VE7.js";
11
- import {
12
- parse
13
- } from "./chunk-JSR3HXFT.js";
7
+ } from "./chunk-DBXX5K74.js";
14
8
  import {
15
9
  legacyGlobalGuidanceDiagnostic,
16
10
  observeLegacyGlobalGuidance
@@ -22,10 +16,7 @@ import {
22
16
  recoverCodexFinalization,
23
17
  resolveCodexFinalizationConfirmation,
24
18
  validateCodexFinalizationPaths
25
- } from "./chunk-AXAGJLMP.js";
26
- import {
27
- CODEX_MIGRATION_SCHEMA
28
- } from "./chunk-AVAUUIDB.js";
19
+ } from "./chunk-G757F3EU.js";
29
20
  import {
30
21
  compareVersions,
31
22
  isSafePackageVersion
@@ -33,9 +24,26 @@ import {
33
24
  import {
34
25
  writeDurableFile
35
26
  } from "./chunk-QOLHGAD5.js";
27
+ import {
28
+ CODEX_RESTART_CONTEXT,
29
+ CODEX_REVIEW_THEN_RESTART_ACTION,
30
+ codexMigrationExitCode,
31
+ codexPluginVersionMatchesPackage,
32
+ deriveCodexMigrationResult,
33
+ renderCodexMigrationHuman
34
+ } from "./chunk-SOO72SJT.js";
35
+ import {
36
+ SAFEWORD_SCHEMA
37
+ } from "./chunk-IPTM5VE7.js";
38
+ import {
39
+ parse
40
+ } from "./chunk-JSR3HXFT.js";
36
41
  import {
37
42
  CodexMigrationError
38
43
  } from "./chunk-CDWNLTHY.js";
44
+ import {
45
+ CODEX_MIGRATION_SCHEMA
46
+ } from "./chunk-AVAUUIDB.js";
39
47
  import {
40
48
  createResult
41
49
  } from "./chunk-FOYGZ4MK.js";
@@ -343,124 +351,6 @@ function observeLegacyEvents(cwd) {
343
351
  }
344
352
  }
345
353
 
346
- // src/codex-plugin/migration.ts
347
- function codexInstallRequiresMutation(observation) {
348
- return observation.plugin.enabled !== true || observation.state === "plugin_update_required";
349
- }
350
- var CODEX_RESTART_INSTRUCTION = "Restart Codex, start a new task, then review the installed hooks with /hooks.";
351
- var CODEX_RESTART_CONTEXT = "This Codex app may keep its loaded Safeword catalogue.";
352
- function codexPluginVersionMatchesPackage(plugin) {
353
- return plugin.version === null || plugin.version === SAFEWORD_SCHEMA.version;
354
- }
355
- function pluginProtectionIsCurrent(facts) {
356
- return !facts.activationPending && facts.plugin.enabled === true && codexPluginVersionMatchesPackage(facts.plugin) && facts.proof.status === "current" && (facts.plugin.version === null || facts.proof.plugin_version === facts.plugin.version);
357
- }
358
- function deriveCodexMigrationResult(facts) {
359
- const hasLegacy = facts.legacyAssets.length > 0 || facts.legacyEvents.length > 0;
360
- const protectedStatus = legacyProtection(facts, hasLegacy);
361
- const state = migrationState(facts, hasLegacy);
362
- const next = nextAction(state);
363
- return {
364
- schema_version: "2",
365
- ok: state === "plugin",
366
- state,
367
- protected: facts.recoveryRequired ? "uncertain" : protectedStatus,
368
- changed: false,
369
- plugin: facts.plugin,
370
- proof: facts.proof,
371
- legacy: {
372
- events: facts.legacyEvents,
373
- viable_events: facts.viableLegacyEvents,
374
- assets: facts.legacyAssets
375
- },
376
- effects: { files: [] },
377
- errors: [],
378
- next_actions: next === void 0 ? [] : [next]
379
- };
380
- }
381
- var MIGRATION_STATE_RULES = [
382
- { state: "recovery_required", matches: (facts) => facts.recoveryRequired },
383
- {
384
- state: "plugin_setup_required",
385
- matches: (facts) => facts.finalized && facts.plugin.enabled !== true
386
- },
387
- {
388
- state: "plugin_disabled",
389
- matches: (facts) => facts.plugin.installed && facts.plugin.enabled === false
390
- },
391
- {
392
- state: "plugin_update_required",
393
- matches: (facts) => facts.plugin.enabled === true && !codexPluginVersionMatchesPackage(facts.plugin)
394
- },
395
- {
396
- state: "plugin_installed_app_restart_required",
397
- matches: (facts) => facts.activationPending && facts.plugin.enabled === true
398
- },
399
- {
400
- state: "plugin_enabled_hook_unproven",
401
- matches: (facts) => facts.plugin.enabled === true && !pluginProtectionIsCurrent(facts)
402
- },
403
- {
404
- state: "compatibility",
405
- matches: (facts, hasLegacy) => pluginProtectionIsCurrent(facts) && hasLegacy
406
- },
407
- {
408
- state: "plugin",
409
- matches: (facts) => pluginProtectionIsCurrent(facts)
410
- },
411
- { state: "legacy", matches: (_facts, hasLegacy) => hasLegacy }
412
- ];
413
- function migrationState(facts, hasLegacy) {
414
- return MIGRATION_STATE_RULES.find((rule) => rule.matches(facts, hasLegacy))?.state ?? "not_configured";
415
- }
416
- function legacyProtection(facts, hasLegacy) {
417
- if (pluginProtectionIsCurrent(facts)) return "protected";
418
- if (!hasLegacy || facts.viableLegacyEvents.length === 0) return "unprotected";
419
- return facts.viableLegacyEvents.length === facts.legacyEvents.length ? "protected" : "partial";
420
- }
421
- var NEXT_COMMANDS = {
422
- recovery_required: "safeword codex recover",
423
- compatibility: "safeword codex migrate --finalize",
424
- plugin: void 0,
425
- plugin_installed_app_restart_required: void 0,
426
- plugin_enabled_hook_unproven: void 0,
427
- plugin_setup_required: "safeword codex migrate",
428
- plugin_disabled: "safeword codex migrate",
429
- plugin_update_required: "safeword codex migrate",
430
- legacy: "safeword codex migrate",
431
- not_configured: "safeword codex migrate"
432
- };
433
- function nextAction(state) {
434
- if (state === "plugin_installed_app_restart_required" || state === "plugin_enabled_hook_unproven") {
435
- return {
436
- kind: "human",
437
- instruction: CODEX_RESTART_INSTRUCTION,
438
- mutates: false,
439
- requires_human: true
440
- };
441
- }
442
- const command = NEXT_COMMANDS[state];
443
- return command === void 0 ? void 0 : { command, mutates: true, requires_human: true };
444
- }
445
- function renderCodexMigrationHuman(result) {
446
- const lines = [`Codex migration: ${result.state}`, `Protection: ${result.protected}`];
447
- if (result.state === "plugin_setup_required") {
448
- lines.push(`Setup: ${CODEX_MIGRATION_SCHEMA.paths.bootstrapSkill}`);
449
- } else if (result.state === "plugin_installed_app_restart_required" || result.state === "plugin_enabled_hook_unproven") {
450
- lines.push(CODEX_RESTART_CONTEXT);
451
- }
452
- const next = result.next_actions[0];
453
- if (next !== void 0) {
454
- lines.push(`Next: ${"command" in next ? next.command : next.instruction}`);
455
- }
456
- return `${lines.join("\n")}
457
- `;
458
- }
459
- function codexMigrationExitCode(result) {
460
- if (result.errors.length > 0) return 1;
461
- return result.ok ? 0 : 2;
462
- }
463
-
464
354
  // src/codex-plugin/profile-lock.ts
465
355
  import { randomUUID } from "crypto";
466
356
  import { mkdirSync, readFileSync as readFileSync2, rmSync, statSync, writeFileSync } from "fs";
@@ -1044,7 +934,7 @@ function installCodexPlugin(options = {}) {
1044
934
  if (options.json !== true) {
1045
935
  success("Safeword Codex plugin is enabled for this profile.");
1046
936
  info(
1047
- "This Codex app may keep its loaded Safeword catalogue. Restart Codex, start a new task, then review the installed skills and hooks with /hooks. If this project uses Safeword legacy hooks, run `safeword codex migrate --remove-legacy-hooks` to remove only those hooks."
937
+ `This Codex app may keep its loaded Safeword catalogue. ${CODEX_REVIEW_THEN_RESTART_ACTION}. If this project uses Safeword legacy hooks, run \`safeword codex migrate --remove-legacy-hooks\` to remove only those hooks.`
1048
938
  );
1049
939
  }
1050
940
  if (options.reportMigrationState === true) {
@@ -1088,7 +978,13 @@ function buildCodexFinalizationMutations(cwd, preparedLegacyHookRemoval) {
1088
978
  },
1089
979
  {
1090
980
  path: CODEX_MIGRATION_SCHEMA.paths.bootstrapSkill,
1091
- content: "---\nname: safeword-plugin-setup\ndescription: Restore the Safeword Codex profile plugin for this project.\n---\n\nRun `safeword codex migrate` to install or re-enable the profile plugin. Restart Codex after installation, start a new Codex task, then review its hooks with `/hooks`. Run `safeword codex status` to verify this project is protected.\n"
981
+ content: `---
982
+ name: safeword-plugin-setup
983
+ description: Restore the Safeword Codex profile plugin for this project.
984
+ ---
985
+
986
+ Run \`safeword codex migrate\` to install or re-enable the profile plugin. ${CODEX_REVIEW_THEN_RESTART_ACTION}. Run \`safeword codex status\` to verify this project is protected.
987
+ `
1092
988
  }
1093
989
  );
1094
990
  return mutations;
@@ -1329,8 +1225,6 @@ function recoverCodexMigration(cwd = process.cwd(), options = {}) {
1329
1225
  }
1330
1226
 
1331
1227
  export {
1332
- codexInstallRequiresMutation,
1333
- codexPluginVersionMatchesPackage,
1334
1228
  preparedCodexProjectBootstrap,
1335
1229
  installCodexProjectBootstrap,
1336
1230
  observeCodexMigrationResult,
@@ -1344,4 +1238,4 @@ export {
1344
1238
  migrateCodexPlugin,
1345
1239
  recoverCodexMigration
1346
1240
  };
1347
- //# sourceMappingURL=chunk-CRGPYC35.js.map
1241
+ //# sourceMappingURL=chunk-OGMP5ANP.js.map