@skillcap/gdh 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/INSTALL-BUNDLE.json +1 -1
  2. package/RELEASE-SPAN-UPDATE-CONTRACTS.json +64 -0
  3. package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -1
  4. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +2 -1
  5. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -1
  6. package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts.map +1 -1
  7. package/node_modules/@gdh/adapters/dist/claude-statusline-render.js +2 -1
  8. package/node_modules/@gdh/adapters/dist/claude-statusline-render.js.map +1 -1
  9. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.d.ts.map +1 -1
  10. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js +2 -1
  11. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js.map +1 -1
  12. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.d.ts.map +1 -1
  13. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js +2 -1
  14. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js.map +1 -1
  15. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.d.ts +71 -0
  16. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.d.ts.map +1 -0
  17. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js +89 -0
  18. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js.map +1 -0
  19. package/node_modules/@gdh/adapters/dist/durable-backup.d.ts +209 -0
  20. package/node_modules/@gdh/adapters/dist/durable-backup.d.ts.map +1 -0
  21. package/node_modules/@gdh/adapters/dist/durable-backup.js +346 -0
  22. package/node_modules/@gdh/adapters/dist/durable-backup.js.map +1 -0
  23. package/node_modules/@gdh/adapters/dist/index.d.ts +10 -1
  24. package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
  25. package/node_modules/@gdh/adapters/dist/index.js +24 -2
  26. package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
  27. package/node_modules/@gdh/adapters/dist/inventory-sweep.d.ts +53 -0
  28. package/node_modules/@gdh/adapters/dist/inventory-sweep.d.ts.map +1 -0
  29. package/node_modules/@gdh/adapters/dist/inventory-sweep.js +98 -0
  30. package/node_modules/@gdh/adapters/dist/inventory-sweep.js.map +1 -0
  31. package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts +223 -0
  32. package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts.map +1 -0
  33. package/node_modules/@gdh/adapters/dist/process-orchestration.js +368 -0
  34. package/node_modules/@gdh/adapters/dist/process-orchestration.js.map +1 -0
  35. package/node_modules/@gdh/adapters/dist/self-update-mechanics.d.ts +157 -14
  36. package/node_modules/@gdh/adapters/dist/self-update-mechanics.d.ts.map +1 -1
  37. package/node_modules/@gdh/adapters/dist/self-update-mechanics.js +570 -89
  38. package/node_modules/@gdh/adapters/dist/self-update-mechanics.js.map +1 -1
  39. package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts.map +1 -1
  40. package/node_modules/@gdh/adapters/dist/skill-rendering.js +25 -0
  41. package/node_modules/@gdh/adapters/dist/skill-rendering.js.map +1 -1
  42. package/node_modules/@gdh/adapters/package.json +8 -8
  43. package/node_modules/@gdh/authoring/package.json +2 -2
  44. package/node_modules/@gdh/cli/dist/index.d.ts +9 -0
  45. package/node_modules/@gdh/cli/dist/index.d.ts.map +1 -1
  46. package/node_modules/@gdh/cli/dist/index.js +244 -2
  47. package/node_modules/@gdh/cli/dist/index.js.map +1 -1
  48. package/node_modules/@gdh/cli/dist/migrate.d.ts +152 -1
  49. package/node_modules/@gdh/cli/dist/migrate.d.ts.map +1 -1
  50. package/node_modules/@gdh/cli/dist/migrate.js +290 -6
  51. package/node_modules/@gdh/cli/dist/migrate.js.map +1 -1
  52. package/node_modules/@gdh/cli/dist/self-update.d.ts +14 -0
  53. package/node_modules/@gdh/cli/dist/self-update.d.ts.map +1 -1
  54. package/node_modules/@gdh/cli/dist/self-update.js +197 -15
  55. package/node_modules/@gdh/cli/dist/self-update.js.map +1 -1
  56. package/node_modules/@gdh/cli/package.json +10 -10
  57. package/node_modules/@gdh/core/dist/index.d.ts +97 -5
  58. package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
  59. package/node_modules/@gdh/core/dist/index.js +23 -5
  60. package/node_modules/@gdh/core/dist/index.js.map +1 -1
  61. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.d.ts +3 -0
  62. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.d.ts.map +1 -0
  63. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js +247 -0
  64. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js.map +1 -0
  65. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.d.ts +3 -0
  66. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.d.ts.map +1 -0
  67. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js +152 -0
  68. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js.map +1 -0
  69. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.d.ts +3 -0
  70. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.d.ts.map +1 -0
  71. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.js +67 -0
  72. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.js.map +1 -0
  73. package/node_modules/@gdh/core/dist/migrations/envelopes/index.d.ts +37 -0
  74. package/node_modules/@gdh/core/dist/migrations/envelopes/index.d.ts.map +1 -0
  75. package/node_modules/@gdh/core/dist/migrations/envelopes/index.js +60 -0
  76. package/node_modules/@gdh/core/dist/migrations/envelopes/index.js.map +1 -0
  77. package/node_modules/@gdh/core/dist/migrations/envelopes/types.d.ts +121 -0
  78. package/node_modules/@gdh/core/dist/migrations/envelopes/types.d.ts.map +1 -0
  79. package/node_modules/@gdh/core/dist/migrations/envelopes/types.js +2 -0
  80. package/node_modules/@gdh/core/dist/migrations/envelopes/types.js.map +1 -0
  81. package/node_modules/@gdh/core/dist/migrations/golden-harness.d.ts +40 -0
  82. package/node_modules/@gdh/core/dist/migrations/golden-harness.d.ts.map +1 -0
  83. package/node_modules/@gdh/core/dist/migrations/golden-harness.js +71 -0
  84. package/node_modules/@gdh/core/dist/migrations/golden-harness.js.map +1 -0
  85. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts +322 -0
  86. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts.map +1 -0
  87. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js +384 -0
  88. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js.map +1 -0
  89. package/node_modules/@gdh/core/dist/migrations/probes.d.ts +58 -0
  90. package/node_modules/@gdh/core/dist/migrations/probes.d.ts.map +1 -0
  91. package/node_modules/@gdh/core/dist/migrations/probes.js +112 -0
  92. package/node_modules/@gdh/core/dist/migrations/probes.js.map +1 -0
  93. package/node_modules/@gdh/core/dist/migrations/registry.d.ts +205 -0
  94. package/node_modules/@gdh/core/dist/migrations/registry.d.ts.map +1 -0
  95. package/node_modules/@gdh/core/dist/migrations/registry.js +214 -0
  96. package/node_modules/@gdh/core/dist/migrations/registry.js.map +1 -0
  97. package/node_modules/@gdh/core/dist/state/atomic-write.d.ts +19 -0
  98. package/node_modules/@gdh/core/dist/state/atomic-write.d.ts.map +1 -0
  99. package/node_modules/@gdh/core/dist/state/atomic-write.js +34 -0
  100. package/node_modules/@gdh/core/dist/state/atomic-write.js.map +1 -0
  101. package/node_modules/@gdh/core/dist/state/migration-state.d.ts +135 -0
  102. package/node_modules/@gdh/core/dist/state/migration-state.d.ts.map +1 -0
  103. package/node_modules/@gdh/core/dist/state/migration-state.js +186 -0
  104. package/node_modules/@gdh/core/dist/state/migration-state.js.map +1 -0
  105. package/node_modules/@gdh/core/dist/state/processes-snapshot.d.ts +72 -0
  106. package/node_modules/@gdh/core/dist/state/processes-snapshot.d.ts.map +1 -0
  107. package/node_modules/@gdh/core/dist/state/processes-snapshot.js +113 -0
  108. package/node_modules/@gdh/core/dist/state/processes-snapshot.js.map +1 -0
  109. package/node_modules/@gdh/core/dist/state/render-inventory.d.ts +54 -0
  110. package/node_modules/@gdh/core/dist/state/render-inventory.d.ts.map +1 -0
  111. package/node_modules/@gdh/core/dist/state/render-inventory.js +77 -0
  112. package/node_modules/@gdh/core/dist/state/render-inventory.js.map +1 -0
  113. package/node_modules/@gdh/core/package.json +1 -1
  114. package/node_modules/@gdh/docs/dist/agent-contract.d.ts.map +1 -1
  115. package/node_modules/@gdh/docs/dist/agent-contract.js +2 -1
  116. package/node_modules/@gdh/docs/dist/agent-contract.js.map +1 -1
  117. package/node_modules/@gdh/docs/dist/guidance.d.ts.map +1 -1
  118. package/node_modules/@gdh/docs/dist/guidance.js +3 -1
  119. package/node_modules/@gdh/docs/dist/guidance.js.map +1 -1
  120. package/node_modules/@gdh/docs/package.json +2 -2
  121. package/node_modules/@gdh/mcp/package.json +8 -8
  122. package/node_modules/@gdh/observability/package.json +2 -2
  123. package/node_modules/@gdh/runtime/dist/bridge-surface.js +63 -2
  124. package/node_modules/@gdh/runtime/dist/bridge-surface.js.map +1 -1
  125. package/node_modules/@gdh/runtime/package.json +2 -2
  126. package/node_modules/@gdh/scan/package.json +3 -3
  127. package/node_modules/@gdh/verify/package.json +7 -7
  128. package/package.json +11 -11
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "product": "GDH",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "installMode": "packaged_install"
5
5
  }
@@ -2492,6 +2492,70 @@
2492
2492
  }
2493
2493
  ]
2494
2494
  }
2495
+ },
2496
+ {
2497
+ "version": "0.24.0",
2498
+ "releaseTag": "v0.24.0",
2499
+ "migrationStatus": "required",
2500
+ "summary": "v0.24.0 ships v1.18 Migration Chain Integrity. Five managed-surface version constants bump (GDH_AGENT_CONTRACT_VERSION 8 -> 9, GDH_GUIDANCE_INDEX_VERSION 4 -> 5, GDH_GUIDANCE_UNIT_VERSION 17 -> 18, GDH_UPDATE_HOOK_VERSION 5 -> 6, GDH_RUNTIME_BRIDGE_SURFACE_VERSION 11 -> 12). The migration registry adds entry s3c8_to_s3c9_register_runtime_bridge_autoload — a class-3 project-native register_autoload op that writes the GDHBridge autoload entry into project.godot deterministically, replacing the pre-v0.24 manual editor plugin-enable detour the chain matrix flagged as compatibility_degraded.",
2501
+ "releaseHighlights": {
2502
+ "summary": "v0.24.0 ships the v1.18 Migration Chain Integrity milestone. GDH now guarantees that every supported version listed in `docs/product/SUPPORTED-VERSIONS.md` reaches HEAD through `gdh self-update` without manual editor intervention. The release adds a falsifiable five-condition `release:apply` gate (registry completeness, chain matrix, corpus parity, goldens, migration-verify outcome `pass`), a typed managed-surface drift manifest with module-load `assertClassRegistered` guards, deterministic GDHBridge autoload registration during install/repair/self-update, a single-direction migration registry with paired golden fixtures, durable backup with crash-resilient restore, render-inventory orphan sweeping, and a `bumpAndRebakePin` 12-step orchestrator that composes all of the above.",
2503
+ "operatorChanges": [
2504
+ "**Deterministic GDHBridge autoload registration.** `gdh setup`, `gdh self-update`, and `gdh migrate --apply` now write the GDHBridge autoload entry into `project.godot` directly. Pre-v0.24, agents driving self-update had to instruct the operator to open the Godot editor and enable the GDH Runtime Bridge plugin so it could register the autoload itself. The chain matrix flagged that detour as `compatibility_degraded`; v0.24 closes it as a class-3 project-native `register_autoload` op on the v1.18 manifest allowlist.",
2505
+ "**Migration chain matrix.** `npm run test:migration-chain` exercises every supported version (v0.18.0 through v0.23.0) end-to-end against HEAD via the installed tarball. `release:apply` invokes the matrix in-process and refuses to tag on non-zero exit.",
2506
+ "**Five-condition release-apply gate.** `corepack yarn release:apply` enforces five machine-verifiable conditions before tagging: registry completeness (every `surfaceVersionChange` has a bracketing `MIGRATION_REGISTRY_ENTRIES` entry), chain matrix exit 0, corpus parity (`SUPPORTED-VERSIONS.md` rows match `tests/fixtures/migration-corpus/v<version>/` directories), goldens exit 0, and migration-verify outcome `pass`. There is no env-flag bypass, no `--force`, no skip-attestation file.",
2507
+ "**Managed surface drift classification.** `GDH_MANAGED_SURFACE_CLASSES` from `@gdh/core` is the typed source of truth for the three drift classes (deterministic / user-data / project-native). Every managed-surface renderer carries a module-load `assertClassRegistered` guard that aborts the install pipeline if the manifest and a renderer drift.",
2508
+ "**Local pre-commit and pre-push hooks.** `corepack yarn hooks:install` installs simple-git-hooks. Pre-commit catches schema-affecting diffs without paired migration entries and goldens; pre-push runs the adjacent star-case chain test plus all goldens. Hooks are bypass-able by `git commit --no-verify` and `git push --no-verify` — these are git-level escapes that no hook framework can prevent.",
2509
+ "**Maintainer release skills.** `/gdh-dev:release`, `/gdh-dev:migration-verify`, and `/gdh-dev:publish` (Claude) and the Codex/Cursor equivalents now own the end-to-end release flow. `/gdh-dev:migration-verify` is a thin wrapper around `node scripts/release-lib/migration-verify.mjs` and consumes its locked JSON outcome contract.",
2510
+ "**Durable backup.** `bumpAndRebakePin` step 5 writes a directory-level durable backup at `.gdh-state/backup/` via the staged-rename strategy (`.gdh-state/backup.new/` → atomic `fs.rename`). Restore is byte-equal round-trip; user-edit drift is detected by absence of any KNOWN_GDH_MARKERS and persisted in the manifest's `preservation_notes`.",
2511
+ "**Render-inventory orphan sweeping.** `bumpAndRebakePin` writes `.gdh-state/render-inventory.json` after each successful re-bake; the next run computes set-diff against the previous inventory and deletes orphaned managed files. Symlink-safe (`fs.lstat` existence probe + `fs.rm` unlink semantics) and path-traversal-gated.",
2512
+ "**Migration-verifier JSON outcome contract.** `scripts/release-lib/migration-verify.mjs` returns one of `pass | blocked | incomplete` over six conditions (artifacts, registry completeness, release-note/manifest/verification consistency, corpus parity, chain matrix, goldens). Both `/gdh-dev:migration-verify` and `release:apply` consume the same JSON; `release:apply` passes pre-computed chain + goldens evidence so the helper does not double-spawn."
2513
+ ]
2514
+ },
2515
+ "updateContract": {
2516
+ "summary": "Managed targets need release-specific migration for v0.24.0 because five managed-surface version constants bumped and the migration registry now writes the GDHBridge autoload entry into project.godot deterministically. After self-update, run gdh migrate --apply, then validate adapter status, drift, and the deterministic autoload registration.",
2517
+ "steps": [
2518
+ {
2519
+ "id": "self_update_runtime_workflow_package",
2520
+ "kind": "mechanical",
2521
+ "summary": "Install the v0.24.0 GDH package.",
2522
+ "detail": "Run gdh self-update so the new managed surface contract versions and the s3c8_to_s3c9_register_runtime_bridge_autoload registry entry are available to the host.",
2523
+ "commands": [
2524
+ "gdh self-update --apply"
2525
+ ],
2526
+ "validationCommands": [
2527
+ "gdh status"
2528
+ ]
2529
+ },
2530
+ {
2531
+ "id": "rebake_v118_managed_surfaces",
2532
+ "kind": "mechanical",
2533
+ "summary": "Re-bake managed AGENTS.md, guidance, and hook surfaces; register the GDHBridge autoload in project.godot.",
2534
+ "detail": "Run gdh migrate --apply so agent contract version 9 writes the new AGENTS.md contract block, guidance index version 5 and unit version 18 write the refreshed guidance, hook version 6 writes managed hook scripts, and the v1.18 register_autoload op writes the GDHBridge autoload entry into project.godot if it is missing.",
2535
+ "commands": [
2536
+ "gdh migrate --apply"
2537
+ ],
2538
+ "validationCommands": [
2539
+ "gdh adapters status",
2540
+ "gdh verify drift",
2541
+ "gdh status"
2542
+ ]
2543
+ },
2544
+ {
2545
+ "id": "verify_runtime_bridge_autoload_registered",
2546
+ "kind": "agent_reasoning",
2547
+ "summary": "Confirm the GDHBridge autoload is registered deterministically in project.godot.",
2548
+ "detail": "Open project.godot and confirm an `[autoload]` section contains `GDHBridge=\"*res://addons/gdh_bridge/runtime/gdh_runtime_bridge.gd\"`. Pre-v0.24 targets that relied on the manual editor plugin-enable detour pick up the entry automatically during gdh migrate --apply. No editor session is required.",
2549
+ "commands": [
2550
+ "gdh status"
2551
+ ],
2552
+ "validationCommands": [
2553
+ "gdh status",
2554
+ "gdh authoring check --mode final"
2555
+ ]
2556
+ }
2557
+ ]
2558
+ }
2495
2559
  }
2496
2560
  ]
2497
2561
  }
@@ -1 +1 @@
1
- {"version":3,"file":"authoring-hook-render.d.ts","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mCAAmC,yCAAyC,CAAC;AAC1F,eAAO,MAAM,kCAAkC,wCAAwC,CAAC;AACxF,eAAO,MAAM,6BAA6B,uRAC4O,CAAC;AACvR,eAAO,MAAM,4BAA4B,qRAC2O,CAAC;AAErR,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;CACpC,GAAG,MAAM,CAmIT"}
1
+ {"version":3,"file":"authoring-hook-render.d.ts","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mCAAmC,yCAAyC,CAAC;AAC1F,eAAO,MAAM,kCAAkC,wCAAwC,CAAC;AACxF,eAAO,MAAM,6BAA6B,uRAC4O,CAAC;AACvR,eAAO,MAAM,4BAA4B,qRAC2O,CAAC;AAErR,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;CACpC,GAAG,MAAM,CAmIT"}
@@ -1,4 +1,5 @@
1
- import { GDH_UPDATE_HOOK_VERSION } from "@gdh/core";
1
+ import { GDH_UPDATE_HOOK_VERSION, assertClassRegistered } from "@gdh/core";
2
+ assertClassRegistered("authoring_hook", "deterministic");
2
3
  export const CLAUDE_AUTHORING_HOOK_RELATIVE_PATH = ".claude/hooks/gdh-authoring-guard.js";
3
4
  export const CODEX_AUTHORING_HOOK_RELATIVE_PATH = ".codex/hooks/gdh-authoring-guard.js";
4
5
  export const CLAUDE_AUTHORING_HOOK_COMMAND = "node -e \"const fs=require('fs'),path=require('path');let d=process.cwd();for(;;){const f=path.join(d,'.claude/hooks/gdh-authoring-guard.js');if(fs.existsSync(f)){require(f);break}const p=path.dirname(d);if(p===d)throw new Error('GDH Claude authoring hook not found');d=p}\"";
@@ -1 +1 @@
1
- {"version":3,"file":"authoring-hook-render.js","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,CAAC,MAAM,mCAAmC,GAAG,sCAAsC,CAAC;AAC1F,MAAM,CAAC,MAAM,kCAAkC,GAAG,qCAAqC,CAAC;AACxF,MAAM,CAAC,MAAM,6BAA6B,GACxC,oRAAoR,CAAC;AACvR,MAAM,CAAC,MAAM,4BAA4B,GACvC,kRAAkR,CAAC;AAErR,MAAM,UAAU,sBAAsB,CAAC,KAItC;IACC,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,8DAA8D;QAC9D,0BAA0B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG;QAChE,gCAAgC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG;QAC3E,iBAAiB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG;QAC/C,EAAE;QACF,2BAA2B;QAC3B,+BAA+B;QAC/B,iDAAiD;QACjD,EAAE;QACF,kEAAkE;QAClE,yBAAyB;QACzB,EAAE;QACF,SAAS;QACT,EAAE;QACF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4C;QAC5C,iFAAiF;QACjF,sEAAsE;QACtE,GAAG;QACH,EAAE;QACF,qCAAqC;QACrC,qDAAqD;QACrD,uEAAuE;QACvE,qDAAqD;QACrD,iEAAiE;QACjE,yBAAyB;QACzB,GAAG;QACH,EAAE;QACF,iFAAiF;QACjF,kHAAkH;QAClH,EAAE;QACF,uCAAuC;QACvC,0BAA0B;QAC1B,kDAAkD;QAClD,oHAAoH;QACpH,0DAA0D;QAC1D,oBAAoB;QACpB,GAAG;QACH,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"authoring-hook-render.js","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAE3E,qBAAqB,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;AAEzD,MAAM,CAAC,MAAM,mCAAmC,GAAG,sCAAsC,CAAC;AAC1F,MAAM,CAAC,MAAM,kCAAkC,GAAG,qCAAqC,CAAC;AACxF,MAAM,CAAC,MAAM,6BAA6B,GACxC,oRAAoR,CAAC;AACvR,MAAM,CAAC,MAAM,4BAA4B,GACvC,kRAAkR,CAAC;AAErR,MAAM,UAAU,sBAAsB,CAAC,KAItC;IACC,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,8DAA8D;QAC9D,0BAA0B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG;QAChE,gCAAgC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG;QAC3E,iBAAiB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG;QAC/C,EAAE;QACF,2BAA2B;QAC3B,+BAA+B;QAC/B,iDAAiD;QACjD,EAAE;QACF,kEAAkE;QAClE,yBAAyB;QACzB,EAAE;QACF,SAAS;QACT,EAAE;QACF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4C;QAC5C,iFAAiF;QACjF,sEAAsE;QACtE,GAAG;QACH,EAAE;QACF,qCAAqC;QACrC,qDAAqD;QACrD,uEAAuE;QACvE,qDAAqD;QACrD,iEAAiE;QACjE,yBAAyB;QACzB,GAAG;QACH,EAAE;QACF,iFAAiF;QACjF,kHAAkH;QAClH,EAAE;QACF,uCAAuC;QACvC,0BAA0B;QAC1B,kDAAkD;QAClD,oHAAoH;QACpH,0DAA0D;QAC1D,oBAAoB;QACpB,GAAG;QACH,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"claude-statusline-render.d.ts","sourceRoot":"","sources":["../src/claude-statusline-render.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,oCACT,CAAC;AAEpC;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,yCAAyC,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,4BAA4B,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CA4B5E"}
1
+ {"version":3,"file":"claude-statusline-render.d.ts","sourceRoot":"","sources":["../src/claude-statusline-render.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,oCACT,CAAC;AAEpC;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,yCAAyC,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,4BAA4B,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CA4B5E"}
@@ -1,4 +1,5 @@
1
- import { GDH_UPDATE_HOOK_VERSION } from "@gdh/core";
1
+ import { GDH_UPDATE_HOOK_VERSION, assertClassRegistered } from "@gdh/core";
2
+ assertClassRegistered("claude_statusline", "deterministic");
2
3
  /**
3
4
  * Relative path of the optional managed Claude statusline renderer script.
4
5
  * GDH bakes this file so projects can opt into it manually, but adapter
@@ -1 +1 @@
1
- {"version":3,"file":"claude-statusline-render.js","sourceRoot":"","sources":["../src/claude-statusline-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iCAAiC,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,sCAAsC,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,4BAA4B,CAAC,cAAuB;IAClE,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,gGAAgG;QAChG,wFAAwF;QACxF,qFAAqF;QACrF,EAAE;QACF,2BAA2B;QAC3B,+BAA+B;QAC/B,2BAA2B;QAC3B,EAAE;QACF,+BAA+B;QAC/B,6EAA6E;QAC7E,EAAE;QACF,qBAAqB;QACrB,iCAAiC;QACjC,SAAS;QACT,mEAAmE;QACnE,2CAA2C;QAC3C,wDAAwD;QACxD,OAAO;QACP,kBAAkB;QAClB,GAAG;QACH,EAAE;QACF,kCAAkC;QAClC,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"claude-statusline-render.js","sourceRoot":"","sources":["../src/claude-statusline-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAE3E,qBAAqB,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iCAAiC,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,sCAAsC,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,4BAA4B,CAAC,cAAuB;IAClE,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,gGAAgG;QAChG,wFAAwF;QACxF,qFAAqF;QACrF,EAAE;QACF,2BAA2B;QAC3B,+BAA+B;QAC/B,2BAA2B;QAC3B,EAAE;QACF,+BAA+B;QAC/B,6EAA6E;QAC7E,EAAE;QACF,qBAAqB;QACrB,iCAAiC;QACjC,SAAS;QACT,mEAAmE;QACnE,2CAA2C;QAC3C,wDAAwD;QACxD,OAAO;QACP,kBAAkB;QAClB,GAAG;QACH,EAAE;QACF,kCAAkC;QAClC,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"claude-update-hook-render.d.ts","sourceRoot":"","sources":["../src/claude-update-hook-render.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,sCACd,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,wCAAwC,6CACT,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAwCzE"}
1
+ {"version":3,"file":"claude-update-hook-render.d.ts","sourceRoot":"","sources":["../src/claude-update-hook-render.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,sCACd,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,wCAAwC,6CACT,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAwCzE"}
@@ -1,4 +1,5 @@
1
- import { GDH_UPDATE_HOOK_VERSION } from "@gdh/core";
1
+ import { GDH_UPDATE_HOOK_VERSION, assertClassRegistered } from "@gdh/core";
2
+ assertClassRegistered("claude_update_hook", "deterministic");
2
3
  /**
3
4
  * Relative path of the managed Claude SessionStart parent hook script.
4
5
  * This is the .js file Claude Code invokes when a session opens on a
@@ -1 +1 @@
1
- {"version":3,"file":"claude-update-hook-render.js","sourceRoot":"","sources":["../src/claude-update-hook-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sCAAsC,GACjD,mCAAmC,CAAC;AAEtC;;;GAGG;AACH,MAAM,CAAC,MAAM,wCAAwC,GACnD,0CAA0C,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,2BAA2B,CAAC,aAAqB;IAC/D,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,gEAAgE;QAChE,qEAAqE;QACrE,uFAAuF;QACvF,EAAE;QACF,2BAA2B;QAC3B,+BAA+B;QAC/B,2BAA2B;QAC3B,6CAA6C;QAC7C,EAAE;QACF,gBAAgB;QAChB,gGAAgG;QAChG,qHAAqH;QACrH,4EAA4E;QAC5E,EAAE;QACF,iCAAiC;QACjC,yDAAyD;QACzD,+DAA+D;QAC/D,EAAE;QACF,qEAAqE;QACrE,EAAE;QACF,0EAA0E;QAC1E,yDAAyD;QACzD,sBAAsB;QACtB,wBAAwB;QACxB,qBAAqB;QACrB,YAAY;QACZ,uBAAuB;QACvB,kCAAkC;QAClC,6BAA6B,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG;QAC7D,QAAQ;QACR,OAAO;QACP,EAAE;QACF,kBAAkB;QAClB,OAAO;QACP,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"claude-update-hook-render.js","sourceRoot":"","sources":["../src/claude-update-hook-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAE3E,qBAAqB,CAAC,oBAAoB,EAAE,eAAe,CAAC,CAAC;AAE7D;;;;GAIG;AACH,MAAM,CAAC,MAAM,sCAAsC,GACjD,mCAAmC,CAAC;AAEtC;;;GAGG;AACH,MAAM,CAAC,MAAM,wCAAwC,GACnD,0CAA0C,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,2BAA2B,CAAC,aAAqB;IAC/D,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,gEAAgE;QAChE,qEAAqE;QACrE,uFAAuF;QACvF,EAAE;QACF,2BAA2B;QAC3B,+BAA+B;QAC/B,2BAA2B;QAC3B,6CAA6C;QAC7C,EAAE;QACF,gBAAgB;QAChB,gGAAgG;QAChG,qHAAqH;QACrH,4EAA4E;QAC5E,EAAE;QACF,iCAAiC;QACjC,yDAAyD;QACzD,+DAA+D;QAC/D,EAAE;QACF,qEAAqE;QACrE,EAAE;QACF,0EAA0E;QAC1E,yDAAyD;QACzD,sBAAsB;QACtB,wBAAwB;QACxB,qBAAqB;QACrB,YAAY;QACZ,uBAAuB;QACvB,kCAAkC;QAClC,6BAA6B,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG;QAC7D,QAAQ;QACR,OAAO;QACP,EAAE;QACF,kBAAkB;QAClB,OAAO;QACP,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"claude-update-worker-render.d.ts","sourceRoot":"","sources":["../src/claude-update-worker-render.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,6BAA6B,CAC3C,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM,CAsER"}
1
+ {"version":3,"file":"claude-update-worker-render.d.ts","sourceRoot":"","sources":["../src/claude-update-worker-render.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,6BAA6B,CAC3C,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM,CAsER"}
@@ -1,4 +1,5 @@
1
- import { GDH_UPDATE_HOOK_VERSION, GDH_UPDATE_REGISTRY_URL, } from "@gdh/core";
1
+ import { GDH_UPDATE_HOOK_VERSION, GDH_UPDATE_REGISTRY_URL, assertClassRegistered, } from "@gdh/core";
2
+ assertClassRegistered("claude_update_worker", "deterministic");
2
3
  /**
3
4
  * Render the background worker source that is spawned (detached + unref) by
4
5
  * the SessionStart parent hook. The worker performs the HTTPS probe against
@@ -1 +1 @@
1
- {"version":3,"file":"claude-update-worker-render.js","sourceRoot":"","sources":["../src/claude-update-worker-render.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,6BAA6B,CAC3C,cAAuB;IAEvB,wEAAwE;IACxE,0EAA0E;IAC1E,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,mEAAmE;QACnE,0EAA0E;QAC1E,oEAAoE;QACpE,kEAAkE;QAClE,EAAE;QACF,eAAe;QACf,EAAE;QACF,2BAA2B;QAC3B,EAAE;QACF,wDAAwD;QACxD,oFAAoF;QACpF,0BAA0B;QAC1B,gFAAgF;QAChF,gFAAgF;QAChF,iCAAiC;QACjC,qCAAqC;QACrC,sCAAsC;QACtC,KAAK;QACL,iBAAiB;QACjB,GAAG;QACH,EAAE;QACF,gBAAgB;QAChB,gGAAgG;QAChG,+FAA+F;QAC/F,4EAA4E;QAC5E,EAAE;QACF,kDAAkD;QAClD,wBAAwB;QACxB,EAAE;QACF,iDAAiD;QACjD,2BAA2B;QAC3B,EAAE;QACF,mBAAmB;QACnB,SAAS;QACT,yBAAyB,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,KAAK;QACrE,2CAA2C;QAC3C,SAAS;QACT,kBAAkB;QAClB,EAAE;QACF,sBAAsB;QACtB,wBAAwB;QACxB,WAAW;QACX,sCAAsC;QACtC,+CAA+C;QAC/C,gCAAgC;QAChC,SAAS;QACT,oBAAoB;QACpB,KAAK;QACL,EAAE;QACF,qEAAqE;QACrE,gCAAgC;QAChC,EAAE;QACF,oBAAoB;QACpB,aAAa;QACb,aAAa;QACb,0CAA0C;QAC1C,oCAAoC;QACpC,+CAA+C;QAC/C,MAAM;QACN,EAAE;QACF,sFAAsF;QACtF,OAAO;QACP,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"claude-update-worker-render.js","sourceRoot":"","sources":["../src/claude-update-worker-render.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AAEnB,qBAAqB,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,6BAA6B,CAC3C,cAAuB;IAEvB,wEAAwE;IACxE,0EAA0E;IAC1E,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,mEAAmE;QACnE,0EAA0E;QAC1E,oEAAoE;QACpE,kEAAkE;QAClE,EAAE;QACF,eAAe;QACf,EAAE;QACF,2BAA2B;QAC3B,EAAE;QACF,wDAAwD;QACxD,oFAAoF;QACpF,0BAA0B;QAC1B,gFAAgF;QAChF,gFAAgF;QAChF,iCAAiC;QACjC,qCAAqC;QACrC,sCAAsC;QACtC,KAAK;QACL,iBAAiB;QACjB,GAAG;QACH,EAAE;QACF,gBAAgB;QAChB,gGAAgG;QAChG,+FAA+F;QAC/F,4EAA4E;QAC5E,EAAE;QACF,kDAAkD;QAClD,wBAAwB;QACxB,EAAE;QACF,iDAAiD;QACjD,2BAA2B;QAC3B,EAAE;QACF,mBAAmB;QACnB,SAAS;QACT,yBAAyB,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,KAAK;QACrE,2CAA2C;QAC3C,SAAS;QACT,kBAAkB;QAClB,EAAE;QACF,sBAAsB;QACtB,wBAAwB;QACxB,WAAW;QACX,sCAAsC;QACtC,+CAA+C;QAC/C,gCAAgC;QAChC,SAAS;QACT,oBAAoB;QACpB,KAAK;QACL,EAAE;QACF,qEAAqE;QACrE,gCAAgC;QAChC,EAAE;QACF,oBAAoB;QACpB,aAAa;QACb,aAAa;QACb,0CAA0C;QAC1C,oCAAoC;QACpC,+CAA+C;QAC/C,MAAM;QACN,EAAE;QACF,sFAAsF;QACtF,OAAO;QACP,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { type GdhDeferredActionStatus, type GdhEnvelopePendingAdvisory, type GdhHostHarnessIntrospect, type GdhProcessRestartProbe } from "@gdh/core";
2
+ /**
3
+ * Adapters consumed by {@link computeDeferredActionsAdvisory} (and threaded
4
+ * through `buildGdhStatusResult`). Both fields default to `null` so unit tests
5
+ * (which cannot introspect a real host harness) see probe results degrade to
6
+ * `pending` and the advisory remains correctly gated.
7
+ */
8
+ export interface GdhStatusBuildAdapters {
9
+ readonly hostHarnessIntrospect: GdhHostHarnessIntrospect;
10
+ readonly processProbe: GdhProcessRestartProbe;
11
+ }
12
+ /**
13
+ * Probed deferred-action entry surfaced through `gdh status`.
14
+ *
15
+ * Mirrors the `GdhDeferredAction` shape minus the on-disk-only fields; carries
16
+ * the live probe result so consumers can rebuild rendering without re-running
17
+ * the probes.
18
+ */
19
+ export interface GdhDeferredActionStatusEntry {
20
+ readonly id: string;
21
+ readonly description: string;
22
+ readonly status: GdhDeferredActionStatus;
23
+ readonly reason?: string;
24
+ }
25
+ /**
26
+ * Backup-cleanup advisory shape (D-17). Emitted ONLY when:
27
+ * 1. every probed deferred action returns `clean` (or there are zero), AND
28
+ * 2. `.gdh-state/backup/` exists (a manifest was readable), AND
29
+ * 3. `.gdh-state/backup.new/` does NOT exist (no in-progress migration).
30
+ *
31
+ * The `command` literal is the verbatim CLI invocation users run.
32
+ */
33
+ export interface GdhBackupAdvisory {
34
+ readonly command: "gdh migration clear-backups";
35
+ readonly reason: "all_deferred_actions_clean";
36
+ readonly from_pin: string;
37
+ readonly to_pin: string;
38
+ }
39
+ export interface GdhDeferredActionsAdvisoryResult {
40
+ readonly deferredActions: readonly GdhDeferredActionStatusEntry[];
41
+ readonly backupAdvisory: GdhBackupAdvisory | null;
42
+ /**
43
+ * Phase 73 D-12: envelope-pending advisory. `null` unless
44
+ * `migration.json.pending_envelope_resume` is non-null. Mutually exclusive
45
+ * with {@link GdhBackupAdvisory} — when this is non-null, `backupAdvisory`
46
+ * is `null` because clearing the durable backup while a chain is paused
47
+ * destroys the rollback substrate.
48
+ */
49
+ readonly envelopeAdvisory: GdhEnvelopePendingAdvisory | null;
50
+ }
51
+ /**
52
+ * Read `migration.json`, run the probe per deferred action, and decide whether
53
+ * to emit the backup-cleanup advisory.
54
+ *
55
+ * Threat mitigations:
56
+ * - T-72-05-03 (TOCTOU): re-reads migration.json AND backup state freshly
57
+ * inside this function; no cached probe results are consumed across calls.
58
+ * - T-72-05-04 (malformed migration.json): `readMigrationState` returns null
59
+ * on parse/shape failure → `deferredActions` is `[]` and the advisory is
60
+ * gated through the standard truth table.
61
+ * - T-72-05-06 (stale probe → clean): the gate requires `status === "clean"`
62
+ * for every probe; `stale` and `pending` both block the advisory.
63
+ * - T-72-05-07 (interrupted migration): staging-dir check forces the advisory
64
+ * to null whenever `.gdh-state/backup.new/` exists.
65
+ *
66
+ * Defaults: `adapters.hostHarnessIntrospect = null` and `adapters.processProbe
67
+ * = null` (every probe degrades to `pending`, so the advisory does not spuriously
68
+ * fire when a host cannot evaluate the deferred conditions).
69
+ */
70
+ export declare function computeDeferredActionsAdvisory(targetPath: string, adapters?: GdhStatusBuildAdapters): Promise<GdhDeferredActionsAdvisoryResult>;
71
+ //# sourceMappingURL=deferred-actions-advisory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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path from "node:path";
3
+ import { readMigrationState, runDeferredActionProbe, } from "@gdh/core";
4
+ import { BACKUP_STAGING_RELATIVE_PATH, readBackupManifest, } from "./durable-backup.js";
5
+ /**
6
+ * Read `migration.json`, run the probe per deferred action, and decide whether
7
+ * to emit the backup-cleanup advisory.
8
+ *
9
+ * Threat mitigations:
10
+ * - T-72-05-03 (TOCTOU): re-reads migration.json AND backup state freshly
11
+ * inside this function; no cached probe results are consumed across calls.
12
+ * - T-72-05-04 (malformed migration.json): `readMigrationState` returns null
13
+ * on parse/shape failure → `deferredActions` is `[]` and the advisory is
14
+ * gated through the standard truth table.
15
+ * - T-72-05-06 (stale probe → clean): the gate requires `status === "clean"`
16
+ * for every probe; `stale` and `pending` both block the advisory.
17
+ * - T-72-05-07 (interrupted migration): staging-dir check forces the advisory
18
+ * to null whenever `.gdh-state/backup.new/` exists.
19
+ *
20
+ * Defaults: `adapters.hostHarnessIntrospect = null` and `adapters.processProbe
21
+ * = null` (every probe degrades to `pending`, so the advisory does not spuriously
22
+ * fire when a host cannot evaluate the deferred conditions).
23
+ */
24
+ export async function computeDeferredActionsAdvisory(targetPath, adapters) {
25
+ const hostHarnessIntrospect = adapters?.hostHarnessIntrospect ?? null;
26
+ const processProbe = adapters?.processProbe ?? null;
27
+ const migrationState = await readMigrationState(targetPath);
28
+ const probedActions = [];
29
+ for (const action of migrationState?.deferred_actions ?? []) {
30
+ const result = await runDeferredActionProbe(action, {
31
+ targetPath,
32
+ hostHarnessIntrospect,
33
+ processProbe,
34
+ });
35
+ const entry = result.reason !== undefined
36
+ ? {
37
+ id: action.id,
38
+ description: action.description,
39
+ status: result.status,
40
+ reason: result.reason,
41
+ }
42
+ : {
43
+ id: action.id,
44
+ description: action.description,
45
+ status: result.status,
46
+ };
47
+ probedActions.push(entry);
48
+ }
49
+ // Phase 73 D-12 — envelope-pending fourth gate. The marker is the in-flight
50
+ // resume substrate (D-11); clearing the durable backup while a chain is
51
+ // paused mid-bump destroys the rollback substrate. The two advisories are
52
+ // mutually exclusive: when the envelope marker is set, the backup advisory
53
+ // MUST be null, regardless of whether the other backup-cleanup gates pass.
54
+ const pendingEnvelope = migrationState?.pending_envelope_resume ?? null;
55
+ const noEnvelopePending = pendingEnvelope === null;
56
+ // Gate evaluation (advisory truth table):
57
+ // (a) every probed action is clean (zero is trivially true)
58
+ // (b) `.gdh-state/backup/` is present (manifest readable)
59
+ // (c) `.gdh-state/backup.new/` is NOT present (no interrupted migration)
60
+ // (d) Phase 73 D-12: no envelope is pending (mutually exclusive with
61
+ // envelopeAdvisory)
62
+ const allClean = probedActions.every((a) => a.status === "clean");
63
+ const manifest = await readBackupManifest(targetPath);
64
+ const backupExists = manifest !== null;
65
+ const stagingPath = path.join(targetPath, BACKUP_STAGING_RELATIVE_PATH);
66
+ const stagingExists = await fs
67
+ .stat(stagingPath)
68
+ .then(() => true)
69
+ .catch(() => false);
70
+ const noMigrationInProgress = !stagingExists;
71
+ const backupAdvisory = allClean && backupExists && noMigrationInProgress && noEnvelopePending
72
+ ? {
73
+ command: "gdh migration clear-backups",
74
+ reason: "all_deferred_actions_clean",
75
+ from_pin: manifest.from_pin,
76
+ to_pin: manifest.to_pin,
77
+ }
78
+ : null;
79
+ const envelopeAdvisory = pendingEnvelope !== null
80
+ ? {
81
+ envelope_ref: pendingEnvelope.envelope_ref,
82
+ from_pin: pendingEnvelope.from_pin,
83
+ to_pin: pendingEnvelope.to_pin,
84
+ command: `gdh migration record-envelope-result ${pendingEnvelope.envelope_ref} --result-file <path>`,
85
+ }
86
+ : null;
87
+ return { deferredActions: probedActions, backupAdvisory, envelopeAdvisory };
88
+ }
89
+ //# sourceMappingURL=deferred-actions-advisory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferred-actions-advisory.js","sourceRoot":"","sources":["../src/deferred-actions-advisory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL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AC;AAC9E,CAAC"}
@@ -0,0 +1,209 @@
1
+ import { type GdhMigrationVersionPair } from "@gdh/core";
2
+ /**
3
+ * Workspace-relative directory for the durable update backup.
4
+ *
5
+ * Single durable backup per STA-01 / D-14: this directory is overwritten
6
+ * (rm -rf semantics) on every successful backup write. Multi-backup retention
7
+ * is explicitly deferred (see 72-CONTEXT.md "Deferred Ideas").
8
+ */
9
+ export declare const BACKUP_RELATIVE_PATH = ".gdh-state/backup";
10
+ /**
11
+ * Workspace-relative staging directory used to make the backup write atomic
12
+ * at the directory level (Pitfall 6 / T-72-04-03). The staged tree is built
13
+ * here, then renamed onto BACKUP_RELATIVE_PATH so the prior backup is never
14
+ * absent from disk between rm-rf and write.
15
+ */
16
+ export declare const BACKUP_STAGING_RELATIVE_PATH = ".gdh-state/backup.new";
17
+ /** Workspace-relative path to the per-backup manifest. */
18
+ export declare const BACKUP_MANIFEST_RELATIVE_PATH = ".gdh-state/backup/manifest.json";
19
+ export type GdhBackupPreservationReason = "class_1_backup_then_overwrite";
20
+ export type GdhBackupMarkerState = "absent" | "present" | "not_applicable";
21
+ /**
22
+ * WFL-02 / D-24 preservation note attached to the backup manifest. Emitted
23
+ * when a class-1 file's GDH ownership marker is absent (user-edited drift)
24
+ * and the file is captured into the backup BEFORE re-rendering.
25
+ */
26
+ export interface GdhBackupPreservationNote {
27
+ readonly path: string;
28
+ readonly reason: GdhBackupPreservationReason;
29
+ readonly marker_state: GdhBackupMarkerState;
30
+ }
31
+ /**
32
+ * Per-path capture entry recorded in the backup manifest. `existed: false`
33
+ * matches the legacy in-memory rollbackOriginals null-content semantics: the
34
+ * file did not exist pre-update, so restore must `rm` the original path.
35
+ */
36
+ export interface GdhBackupCapturedPath {
37
+ readonly path: string;
38
+ readonly existed: boolean;
39
+ }
40
+ /**
41
+ * Backup manifest schema (D-13). Version-locked at 1; readers reject any
42
+ * other backup_version with `null` (degraded fallback) so a future schema
43
+ * bump does not silently corrupt restore.
44
+ */
45
+ export interface GdhBackupManifest {
46
+ readonly backup_version: 1;
47
+ readonly applied_at: string;
48
+ readonly from_pair: GdhMigrationVersionPair;
49
+ readonly to_pair: GdhMigrationVersionPair;
50
+ readonly from_pin: string;
51
+ readonly to_pin: string;
52
+ readonly captured_paths: readonly GdhBackupCapturedPath[];
53
+ readonly preservation_notes: readonly GdhBackupPreservationNote[];
54
+ }
55
+ export interface GdhWriteDurableBackupInput {
56
+ readonly targetPath: string;
57
+ readonly fromPair: GdhMigrationVersionPair;
58
+ readonly toPair: GdhMigrationVersionPair;
59
+ readonly fromPin: string;
60
+ readonly toPin: string;
61
+ /** Workspace-relative POSIX paths to capture (planned action paths + .gdh/project.yaml). */
62
+ readonly plannedPaths: readonly string[];
63
+ /** WFL-02 preservation notes attached to the manifest. */
64
+ readonly preservationNotes?: readonly GdhBackupPreservationNote[];
65
+ /** Optional clock for tests; defaults to () => new Date().toISOString(). */
66
+ readonly nowIso?: () => string;
67
+ }
68
+ export interface GdhWriteDurableBackupSkipped {
69
+ readonly path: string;
70
+ readonly reason: "path_traversal_blocked";
71
+ }
72
+ export type GdhWriteDurableBackupResult = {
73
+ readonly state: "written";
74
+ readonly backupPath: string;
75
+ readonly manifest: GdhBackupManifest;
76
+ readonly skipped: readonly GdhWriteDurableBackupSkipped[];
77
+ } | {
78
+ readonly state: "skipped_no_planned_paths";
79
+ };
80
+ /**
81
+ * Write a single durable backup at .gdh-state/backup/ (STA-01 / D-13 / D-14).
82
+ *
83
+ * Staged-write strategy (T-72-04-03 mitigation, Pitfall 6):
84
+ * 1. Pre-clean .gdh-state/backup.new/ from any prior interrupted run.
85
+ * 2. Capture every plannedPaths entry into .gdh-state/backup.new/, mirroring
86
+ * the workspace-relative directory structure. Missing files are recorded
87
+ * in the manifest with existed: false but no file is written.
88
+ * 3. Write manifest.json into the staging directory via writeFileAtomic.
89
+ * 4. Remove the prior .gdh-state/backup/ (if any) and rename the staging
90
+ * directory onto it.
91
+ *
92
+ * If interrupted between steps 2 and 4, the prior .gdh-state/backup/ is
93
+ * unchanged and the next call's pre-clean (step 1) removes the partial
94
+ * staging tree before it can corrupt anything.
95
+ *
96
+ * Path-traversal candidates (failing isWorkspaceRelativePath) are recorded
97
+ * in `skipped` with `path_traversal_blocked` and never written or captured.
98
+ */
99
+ export declare function writeDurableBackup(input: GdhWriteDurableBackupInput): Promise<GdhWriteDurableBackupResult>;
100
+ /**
101
+ * Read the backup manifest from .gdh-state/backup/manifest.json.
102
+ *
103
+ * Returns null on any failure (missing file, JSON parse error, schema
104
+ * mismatch). Never throws — degraded fallback so callers can branch on
105
+ * "no backup present" without try/catch ceremony, and so a corrupted
106
+ * manifest cannot trigger a partial restore (T-72-04-06).
107
+ */
108
+ export declare function readBackupManifest(targetPath: string): Promise<GdhBackupManifest | null>;
109
+ export type GdhRestoreFromDurableBackupResult = {
110
+ readonly state: "restored";
111
+ readonly restored: readonly string[];
112
+ readonly removed: readonly string[];
113
+ readonly skipped: readonly {
114
+ readonly path: string;
115
+ readonly reason: string;
116
+ }[];
117
+ /**
118
+ * WR-06: Count of captured_paths entries that failed to restore (i.e.,
119
+ * the length of `skipped`). Surfaced as a top-level field so callers
120
+ * can branch on actual restoration success without re-scanning the
121
+ * `skipped` array. When `restored.length === 0 && removed.length === 0
122
+ * && failedCount > 0`, the rollback is effectively a NO-RESTORE: every
123
+ * captured path failed (e.g., disk full, EROFS, EACCES) and the
124
+ * caller should NOT report this as a clean rollback. Pre-existing
125
+ * "best-effort" semantics are preserved (the function still returns
126
+ * \`state: "restored"\` to keep the discriminated-union contract
127
+ * stable for existing callers); the new field is additive.
128
+ */
129
+ readonly failedCount: number;
130
+ } | {
131
+ readonly state: "no_backup_present";
132
+ };
133
+ /**
134
+ * Restore byte-equal content for every captured_paths entry in the backup
135
+ * manifest. Mirrors the legacy in-memory rollbackOriginals semantics:
136
+ *
137
+ * - existed: true → atomic-write the backup content over the original path
138
+ * - existed: false → fs.rm the original path (file did not exist pre-update)
139
+ *
140
+ * The backup directory itself is read-only during restore (T-72-04 contract):
141
+ * each restore is a fresh copy from .gdh-state/backup/, so running restore
142
+ * twice produces the same final state.
143
+ *
144
+ * Path-traversal candidates in captured_paths are skipped with a structured
145
+ * warning (T-72-04-01); the rest of the restore still completes. If the
146
+ * backup content for an existed:true entry is missing on disk, that entry
147
+ * is skipped with reason "backup_content_missing" rather than aborting.
148
+ */
149
+ export declare function restoreFromDurableBackup(input: {
150
+ readonly targetPath: string;
151
+ }): Promise<GdhRestoreFromDurableBackupResult>;
152
+ export interface GdhClass1MarkerDriftInput {
153
+ readonly targetPath: string;
154
+ /**
155
+ * Workspace-relative POSIX paths of class-1 (deterministic) managed files
156
+ * that the planned action set will re-render.
157
+ */
158
+ readonly plannedClass1Paths: readonly string[];
159
+ /**
160
+ * Optional per-path expected markers. Overrides KNOWN_GDH_MARKERS for
161
+ * files whose format ships its own marker convention. Use for class-1
162
+ * file types not covered by the default list (rare).
163
+ */
164
+ readonly expectedMarkersByPath?: ReadonlyMap<string, readonly string[]>;
165
+ }
166
+ export interface GdhClass1MarkerDriftEntry {
167
+ readonly path: string;
168
+ readonly markerState: GdhBackupMarkerState;
169
+ }
170
+ export interface GdhClass1MarkerDriftResult {
171
+ readonly driftedPaths: readonly GdhClass1MarkerDriftEntry[];
172
+ readonly absentPaths: readonly string[];
173
+ readonly skipped: readonly {
174
+ readonly path: string;
175
+ readonly reason: string;
176
+ }[];
177
+ }
178
+ /**
179
+ * Detect WFL-02 / D-24 class-1 marker drift.
180
+ *
181
+ * For each `plannedClass1Paths` entry that exists on disk, check whether the
182
+ * file contains any of its expected GDH ownership markers:
183
+ * - Marker present → file is GDH-rendered; no drift; not flagged.
184
+ * - Marker absent (but file exists) → user-edited drift; flagged with
185
+ * marker_state: "absent".
186
+ * - Per-path override supplied but no marker matches → conservative
187
+ * marker_state: "not_applicable" + flagged as drifted (T-72-04-07: err on
188
+ * the side of preservation when the marker convention is uncertain).
189
+ * - File does not exist on disk → no drift; reported in absentPaths so
190
+ * the caller knows the file will be rendered fresh (no preservation).
191
+ *
192
+ * Path-traversal candidates (failing isWorkspaceRelativePath) are skipped
193
+ * with structured warnings (T-72-04-01); never read.
194
+ *
195
+ * Pair the result with `driftResultToPreservationNotes` to produce the
196
+ * preservation-notes payload for `writeDurableBackup`.
197
+ */
198
+ export declare function detectClass1MarkerDrift(input: GdhClass1MarkerDriftInput): Promise<GdhClass1MarkerDriftResult>;
199
+ /**
200
+ * Convert a drift-detection result into preservation notes ready to attach
201
+ * to a `writeDurableBackup` call.
202
+ *
203
+ * Per D-24, every drifted path is preserved with reason
204
+ * `class_1_backup_then_overwrite`; the marker_state propagates from the
205
+ * drift entry so the manifest carries an audit trail of the detection
206
+ * outcome (absent vs not_applicable).
207
+ */
208
+ export declare function driftResultToPreservationNotes(drift: GdhClass1MarkerDriftResult): readonly GdhBackupPreservationNote[];
209
+ //# sourceMappingURL=durable-backup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"durable-backup.d.ts","sourceRoot":"","sources":["../src/durable-backup.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,WAAW,CAAC;AAEnB;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AACxD;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,0BAA0B,CAAC;AACpE,0DAA0D;AAC1D,eAAO,MAAM,6BAA6B,oCAAoC,CAAC;AAE/E,MAAM,MAAM,2BAA2B,GAAG,+BAA+B,CAAC;AAC1E,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,SAAS,GAAG,gBAAgB,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAC7C,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;CAC7C;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,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