@event4u/agent-config 14.20.0 → 14.22.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 (242) hide show
  1. package/.augment-plugin/marketplace.json +3 -3
  2. package/.augment-plugin/plugin.json +1 -1
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/CHANGELOG.md +441 -0
  5. package/CREDITS.md +37 -0
  6. package/README.md +1 -1
  7. package/agents/templates/.ai-council.yml.example +10 -0
  8. package/dist/agent-src/commands/analyze/inbox.md +381 -6
  9. package/dist/agent-src/commands/analyze/{reference-repo.md → repo.md} +251 -34
  10. package/dist/agent-src/commands/analyze/roadmap-repos.md +129 -0
  11. package/dist/agent-src/commands/analyze.md +12 -7
  12. package/dist/agent-src/commands/feature/plan.md +55 -16
  13. package/dist/agent-src/commands/feature/refactor.md +8 -3
  14. package/dist/agent-src/commands/humanize.md +48 -4
  15. package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +69 -0
  16. package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +5 -5
  17. package/dist/agent-src/contexts/execution/contract-decision-sheet.md +22 -1
  18. package/dist/agent-src/contexts/execution/host-capability-manifest.md +4 -1
  19. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +35 -2
  20. package/dist/agent-src/contexts/execution/terminal-states.md +4 -1
  21. package/dist/agent-src/rules/evaluator-independence.md +4 -4
  22. package/dist/agent-src/rules/external-code-graph-interop.md +19 -14
  23. package/dist/agent-src/rules/external-reference-deep-dive.md +2 -2
  24. package/dist/agent-src/rules/token-efficiency.md +26 -3
  25. package/dist/agent-src/scripts/_cli_entry.ts +51 -0
  26. package/dist/agent-src/scripts/archive_completed_roadmaps.ts +14 -23
  27. package/dist/agent-src/scripts/roadmap_gates.ts +4 -20
  28. package/dist/agent-src/scripts/roadmap_set_step.ts +5 -2
  29. package/dist/agent-src/scripts/stubs_due.ts +4 -18
  30. package/dist/agent-src/scripts/update_roadmap_progress.ts +7 -24
  31. package/dist/agent-src/skills/code-intelligence/SKILL.md +25 -0
  32. package/dist/agent-src/skills/competitive-positioning/SKILL.md +2 -2
  33. package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +27 -11
  34. package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +1 -1
  35. package/dist/agent-src/skills/markitdown/SKILL.md +1 -1
  36. package/dist/agent-src/skills/repomix-packer/SKILL.md +1 -1
  37. package/dist/agent-src/skills/roadmap-writing/SKILL.md +17 -0
  38. package/dist/agent-src/skills/technical-specification/SKILL.md +4 -0
  39. package/dist/agent-src/templates/agent-settings.md +0 -1
  40. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  41. package/dist/agent-src/templates/features.md +5 -0
  42. package/dist/agent-src/templates/roadmaps.md +15 -0
  43. package/dist/cli-delegate/_cli_entry.js +8 -0
  44. package/dist/cli-delegate/_lib/pin_resolver.js +170 -0
  45. package/dist/cli-delegate/archival_sweep.js +8 -0
  46. package/dist/cli-delegate/archive_completed_roadmaps.js +494 -0
  47. package/dist/cli-delegate/check_update_banner.js +923 -0
  48. package/dist/cli-delegate/{chunk-KPBWFOPZ.js → chunk-2FTMENJL.js} +194 -37
  49. package/dist/cli-delegate/{chunk-PI2GU3DP.js → chunk-2TAQ2K4V.js} +4 -1
  50. package/dist/cli-delegate/chunk-5EK5WQN6.js +28 -0
  51. package/dist/cli-delegate/chunk-7XGD2OEU.js +96 -0
  52. package/dist/cli-delegate/{chunk-C6IPZRDA.js → chunk-BIXEDQPZ.js} +7 -1
  53. package/dist/cli-delegate/chunk-DBH4AHDK.js +155 -0
  54. package/dist/cli-delegate/{chunk-NUMQHLS5.js → chunk-J3RFNKG4.js} +21 -2
  55. package/dist/cli-delegate/chunk-JO25G5H7.js +20 -0
  56. package/dist/cli-delegate/chunk-LTYVIY76.js +7961 -0
  57. package/dist/cli-delegate/chunk-QAJS5YWY.js +999 -0
  58. package/dist/cli-delegate/{chunk-ZVBOHSVF.js → chunk-TGIPZBCW.js} +1 -1
  59. package/dist/cli-delegate/{chunk-YS6XTLEK.js → chunk-TYSY33MD.js} +56 -6
  60. package/dist/cli-delegate/chunk-ULET4BYS.js +328 -0
  61. package/dist/cli-delegate/chunk-YDQSHTD7.js +187 -0
  62. package/dist/cli-delegate/chunk-YWVXLR44.js +48 -0
  63. package/dist/cli-delegate/chunk-ZZQBUHFK.js +273 -0
  64. package/dist/cli-delegate/cmd_conformance.js +19 -5
  65. package/dist/cli-delegate/cmd_doctor.js +3 -3
  66. package/dist/cli-delegate/cmd_export.js +2 -2
  67. package/dist/cli-delegate/cmd_handoff.js +27 -3
  68. package/dist/cli-delegate/cmd_prune.js +2 -2
  69. package/dist/cli-delegate/cmd_session_recycle.js +2 -2
  70. package/dist/cli-delegate/cmd_settings_migrate.js +2 -2
  71. package/dist/cli-delegate/cmd_sync.js +2 -2
  72. package/dist/cli-delegate/cmd_uninstall.js +2 -2
  73. package/dist/cli-delegate/cmd_validate.js +2 -2
  74. package/dist/cli-delegate/dashboard_mode.js +16 -0
  75. package/dist/cli-delegate/gate_budget.js +24 -0
  76. package/dist/cli-delegate/gate_execute.js +25 -0
  77. package/dist/cli-delegate/guarded_baseline.js +18 -0
  78. package/dist/cli-delegate/resume_probe.js +22 -0
  79. package/dist/cli-delegate/roadmap_gates.js +638 -0
  80. package/dist/cli-delegate/roadmap_set_step.js +173 -0
  81. package/dist/cli-delegate/stub_queue.js +47 -0
  82. package/dist/cli-delegate/stubs_due.js +38 -0
  83. package/dist/cli-delegate/ticket_bundles.js +59 -0
  84. package/dist/cli-delegate/update_roadmap_progress.js +60 -0
  85. package/dist/discovery/deprecation-report.md +1 -1
  86. package/dist/discovery/discovery-manifest.json +60 -29
  87. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  88. package/dist/discovery/discovery-manifest.summary.md +3 -3
  89. package/dist/discovery/dormancy-report.md +1 -1
  90. package/dist/discovery/orphan-report.md +1 -1
  91. package/dist/discovery/packs.json +7 -6
  92. package/dist/discovery/trust-report.md +2 -2
  93. package/dist/discovery/workspaces.json +6 -5
  94. package/dist/hooks/dispatch.js +1522 -1008
  95. package/dist/install/claudeLayerCarriage.js +237 -0
  96. package/dist/install/claudePathsPlan.js +79 -0
  97. package/dist/install/hostLayerFingerprint.js +1 -1
  98. package/dist/install/install.mjs +10 -1
  99. package/dist/install/partitionEligibility.js +231 -117
  100. package/dist/install/ruleLayerPartition.js +10 -7
  101. package/dist/mcp/registry-manifest.json +3 -3
  102. package/dist/mcp/server.json +2 -2
  103. package/dist/mcp/server.mjs +39376 -38902
  104. package/dist/scripts/ai_council/content_ceiling.js +63 -0
  105. package/dist/scripts/ai_council/seat_policy.js +106 -0
  106. package/dist/scripts/ai_council/transport_resolver.js +21 -0
  107. package/dist/scripts/condense.js +32 -25
  108. package/docs/MIGRATION.md +49 -1
  109. package/docs/contracts/settings-classes.md +1 -1
  110. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +73 -0
  111. package/llms.txt +14 -14
  112. package/package.json +7 -4
  113. package/src/agent-src/scripts/_cli_entry.ts +51 -0
  114. package/src/agent-src/scripts/archive_completed_roadmaps.ts +14 -23
  115. package/src/agent-src/scripts/roadmap_gates.ts +4 -20
  116. package/src/agent-src/scripts/roadmap_set_step.ts +5 -2
  117. package/src/agent-src/scripts/stubs_due.ts +4 -18
  118. package/src/agent-src/scripts/update_roadmap_progress.ts +7 -24
  119. package/src/config/continuity-surface.json +509 -0
  120. package/src/config/estate-count-budget.json +1 -1
  121. package/src/config/gate-coverage.yml +29 -8
  122. package/src/config/gate-violation-baselines.json +8 -8
  123. package/src/config/gitignore-block.txt +19 -0
  124. package/src/config/host-injection-effect.json +73 -0
  125. package/src/config/packed-binary-manifest.json +33 -0
  126. package/src/config/preamble-payload-budget.json +112 -105
  127. package/src/config/publish-surface.json +4 -2
  128. package/src/config/release-gate-locality.yml +4 -3
  129. package/src/install/claudeLayerCarriage.ts +273 -0
  130. package/src/install/claudePathsPlan.ts +76 -0
  131. package/src/install/hostLayerFingerprint.ts +1 -1
  132. package/src/install/partitionEligibility.ts +261 -127
  133. package/src/install/ruleLayerPartition.ts +19 -23
  134. package/src/scripts/_dispatch.bash +77 -27
  135. package/src/scripts/_lib/auto_dispatch.ts +2 -2
  136. package/src/scripts/_lib/blocked_by_marker.ts +189 -0
  137. package/src/scripts/_lib/catalogue_layer_parity.ts +146 -0
  138. package/src/scripts/_lib/continuity_surface.ts +296 -0
  139. package/src/scripts/_lib/corpus_manifest.ts +26 -9
  140. package/src/scripts/_lib/hook_settings.ts +1 -1
  141. package/src/scripts/_lib/host_capability.ts +38 -1
  142. package/src/scripts/_lib/injection_effect.ts +151 -0
  143. package/src/scripts/_lib/layer_overlap_notice.ts +50 -6
  144. package/src/scripts/_lib/packed_binary_predicate.ts +225 -0
  145. package/src/scripts/_lib/pin_resolver.ts +13 -0
  146. package/src/scripts/_lib/regression_neighbourhood.ts +1 -1
  147. package/src/scripts/_lib/release_highlights.ts +19 -211
  148. package/src/scripts/_lib/release_material.ts +27 -77
  149. package/src/scripts/_lib/retired_status.ts +74 -0
  150. package/src/scripts/_lib/skill_catalogue.ts +156 -21
  151. package/src/scripts/_lib/structured_ask.ts +117 -0
  152. package/src/scripts/_lib/subagent_capsule.ts +117 -8
  153. package/src/scripts/_lib/tty_prompt.ts +76 -0
  154. package/src/scripts/ai_council/api_transport.ts +168 -0
  155. package/src/scripts/ai_council/clients.ts +58 -63
  156. package/src/scripts/ai_council/config.ts +13 -0
  157. package/src/scripts/ai_council/content_ceiling.ts +79 -0
  158. package/src/scripts/ai_council/deliberation_metrics.ts +353 -0
  159. package/src/scripts/ai_council/jury_aggregate.ts +178 -0
  160. package/src/scripts/ai_council/prompts.ts +9 -0
  161. package/src/scripts/ai_council/seat_policy.ts +137 -0
  162. package/src/scripts/ai_council/status_surface.ts +79 -0
  163. package/src/scripts/ai_council/synthesis_disagreement.ts +206 -0
  164. package/src/scripts/ai_council/transport_resolver.ts +59 -1
  165. package/src/scripts/ai_tells_rules.ts +446 -5
  166. package/src/scripts/ask_block_census.ts +499 -0
  167. package/src/scripts/bench_humanizer_eval.ts +264 -40
  168. package/src/scripts/bench_prose_tells_fp.ts +198 -0
  169. package/src/scripts/capture_skill_catalogue.ts +24 -11
  170. package/src/scripts/check_branch_work_committed.ts +234 -0
  171. package/src/scripts/check_candidate_lines.ts +499 -0
  172. package/src/scripts/check_continuity_surface.ts +475 -0
  173. package/src/scripts/check_dependency_floors.ts +13 -6
  174. package/src/scripts/check_estate_count.ts +40 -79
  175. package/src/scripts/check_pack_size.ts +263 -24
  176. package/src/scripts/check_release_highlights.ts +0 -157
  177. package/src/scripts/check_roadmap_trackable.ts +19 -16
  178. package/src/scripts/check_rule_layer_partition.ts +54 -34
  179. package/src/scripts/check_single_delivery.ts +97 -31
  180. package/src/scripts/check_update_banner.ts +13 -0
  181. package/src/scripts/code_graph/build.ts +138 -15
  182. package/src/scripts/code_graph/cli.ts +76 -8
  183. package/src/scripts/code_graph/extract.ts +11 -0
  184. package/src/scripts/code_graph/grammar_probe.ts +43 -0
  185. package/src/scripts/code_graph/loader.ts +88 -14
  186. package/src/scripts/code_graph/query.ts +121 -11
  187. package/src/scripts/code_graph/resolution_tiers.ts +238 -0
  188. package/src/scripts/code_graph/sqlite_store.ts +247 -6
  189. package/src/scripts/code_graph/types.ts +66 -1
  190. package/src/scripts/code_graph/validate.ts +23 -0
  191. package/src/scripts/condense.ts +34 -22
  192. package/src/scripts/corpus_manifest.ts +5 -5
  193. package/src/scripts/council_cli.ts +29 -39
  194. package/src/scripts/count_intent_disagreement.ts +426 -0
  195. package/src/scripts/detect_ai_tells.ts +142 -20
  196. package/src/scripts/handoff_context_hook.ts +79 -0
  197. package/src/scripts/harvest_reference_tokens.ts +698 -0
  198. package/src/scripts/hook_effect_doctor.ts +82 -1
  199. package/src/scripts/hook_manifest.json +1 -1
  200. package/src/scripts/hook_manifest.yaml +94 -12
  201. package/src/scripts/hooks/chain_nudge_hook.ts +282 -0
  202. package/src/scripts/hooks/code_graph_context_hook.ts +212 -0
  203. package/src/scripts/hooks/concern_registry.ts +6 -2
  204. package/src/scripts/hooks/delegation_nudge_hook.ts +45 -1
  205. package/src/scripts/hooks/host_semantics.ts +1 -1
  206. package/src/scripts/hooks/one_question_per_ask_hook.ts +191 -0
  207. package/src/scripts/hooks/orchestration_record_hook.ts +2 -2
  208. package/src/scripts/hooks/rule_inject_hook.ts +1 -1
  209. package/src/scripts/hooks/skill_route_hook.ts +11 -4
  210. package/src/scripts/inbox_source_census.ts +322 -0
  211. package/src/scripts/install-hooks.sh +134 -0
  212. package/src/scripts/{lint_carrier_integrity.ts → lint_deferral_integrity.ts} +60 -214
  213. package/src/scripts/lint_plan_risk_register.ts +13 -17
  214. package/src/scripts/lint_roadmap_blockers.ts +51 -1
  215. package/src/scripts/mcp_server/suggest_skill.ts +72 -0
  216. package/src/scripts/mcp_server/tools.ts +2 -56
  217. package/src/scripts/media/lib/adapter-contract.md +7 -2
  218. package/src/scripts/media/lib/fixtures/flux/asset-0001.png +0 -0
  219. package/src/scripts/media/lib/fixtures/gemini-image/asset-0001.png +0 -0
  220. package/src/scripts/media/lib/fixtures/ideogram/asset-0001.png +0 -0
  221. package/src/scripts/migrate_command_suggestions.ts +1 -1
  222. package/src/scripts/probe_unblocked_ask.ts +135 -2
  223. package/src/scripts/rdp_candidates_delta.ts +276 -0
  224. package/src/scripts/rdp_quality_eval.ts +217 -19
  225. package/src/scripts/release.ts +26 -71
  226. package/src/scripts/release_drill.ts +6 -10
  227. package/src/scripts/release_env.ts +1 -0
  228. package/src/scripts/release_mix_taxonomy.json +3 -2
  229. package/src/scripts/release_publication.ts +34 -29
  230. package/src/scripts/report_host_injection_effect.ts +189 -0
  231. package/src/scripts/report_layer_overlap.ts +41 -0
  232. package/src/scripts/report_skill_menu_census.ts +341 -0
  233. package/src/scripts/self_review_gate.ts +409 -15
  234. package/src/scripts/skill_tools/score_skill_relevance.ts +70 -6
  235. package/src/scripts/skill_tools/suggest_skill_for_task.ts +37 -3
  236. package/src/vendor/grammars/README.md +61 -0
  237. package/src/vendor/grammars/tree-sitter-javascript.wasm +0 -0
  238. package/src/vendor/grammars/tree-sitter-php.wasm +0 -0
  239. package/src/vendor/grammars/tree-sitter-typescript.wasm +0 -0
  240. package/src/scripts/_lib/carrier_status.ts +0 -118
  241. package/src/scripts/_lib/estate_carrier_cases.ts +0 -72
  242. package/src/scripts/hooks/code_graph_nudge_hook.ts +0 -191
@@ -56,11 +56,13 @@ import { spawnSync } from 'node:child_process';
56
56
  import * as fs from 'node:fs';
57
57
  import * as path from 'node:path';
58
58
  import process from 'node:process';
59
- import { fileURLToPath, pathToFileURL } from 'node:url';
59
+ import { fileURLToPath } from 'node:url';
60
60
 
61
61
  import { collect } from './update_roadmap_progress.js';
62
62
  import { guardedBaselineProblems, parseGuardedBaselines } from './guarded_baseline.js';
63
63
 
64
+ import { isCliEntry } from './_cli_entry.js';
65
+
64
66
  const _HERE = fileURLToPath(import.meta.url);
65
67
 
66
68
  interface CompletedProcess {
@@ -638,6 +640,16 @@ function _regen_dashboard(root: string, dry_run: boolean): void {
638
640
  if (dry_run) {
639
641
  return;
640
642
  }
643
+ // Inside `dist/cli-delegate/` the twin sits next to us as a precompiled
644
+ // bundle, and plain `node` runs it — the tsx walk below would otherwise
645
+ // reach `npx tsx`, which resolves against the CONSUMER's npm config and
646
+ // hard-fails on a mismatched `engines`/`devEngines` pin (the very class
647
+ // ADR-204 removed from the dispatcher and left standing here).
648
+ const bundledTwin = path.join(path.dirname(_HERE), 'update_roadmap_progress.js');
649
+ if (_isFile(bundledTwin)) {
650
+ spawnSync(process.execPath, [bundledTwin], { cwd: root, encoding: 'utf-8' });
651
+ return;
652
+ }
641
653
  const script = path.join(path.dirname(_HERE), 'update_roadmap_progress.ts');
642
654
  // Python: `_run([sys.executable, str(script)], root)`; the twin spawns the
643
655
  // dashboard generator twin through the same `tsx` runtime, cwd=root.
@@ -800,28 +812,7 @@ function main(argv?: readonly string[]): number {
800
812
  return 0;
801
813
  }
802
814
 
803
- function _isCliEntry(): boolean {
804
- if (process.argv[1] === undefined) {
805
- return false;
806
- }
807
- const argvUrl = pathToFileURL(path.resolve(process.argv[1])).href;
808
- if (import.meta.url === argvUrl) {
809
- return true;
810
- }
811
- // A symlinked invocation (e.g. via `.augment/scripts` → `dist/agent-src/scripts`,
812
- // or macOS /var → /private/var temp dirs) makes the raw URLs differ:
813
- // import.meta.url is the resolved real path while argv[1] keeps the symlink
814
- // path. Compare realpaths so the entry guard still fires (without this the
815
- // archival sweep silently no-ops when run through the symlink).
816
- try {
817
- const here = fs.realpathSync(fileURLToPath(import.meta.url));
818
- const argv = fs.realpathSync(path.resolve(process.argv[1]));
819
- return here === argv;
820
- } catch {
821
- return false;
822
- }
823
- }
824
- if (_isCliEntry() || process.argv[1] === _HERE) {
815
+ if (isCliEntry(import.meta.url, 'archive_completed_roadmaps')) {
825
816
  try {
826
817
  process.exitCode = main();
827
818
  } catch (exc) {
@@ -65,7 +65,7 @@
65
65
  */
66
66
 
67
67
  import * as path from 'node:path';
68
- import { fileURLToPath, pathToFileURL } from 'node:url';
68
+ import { fileURLToPath } from 'node:url';
69
69
  import * as fs from 'node:fs';
70
70
  import { spawnSync } from 'node:child_process';
71
71
 
@@ -80,6 +80,8 @@ import { execute } from './gate_execute.js';
80
80
  import { listPending } from '../templates/scripts/work_engine/hooks/builtin/staged_confirmation_store.js';
81
81
  import type { StagedAction } from '../templates/scripts/work_engine/hooks/builtin/staged_confirmation.js';
82
82
 
83
+ import { isCliEntry } from './_cli_entry.js';
84
+
83
85
  const _HERE = fileURLToPath(import.meta.url);
84
86
 
85
87
  /** Hard wrap for the rendered body — keeps output readable in a narrow pane. */
@@ -928,26 +930,8 @@ function main(argv?: readonly string[]): number {
928
930
  return 0;
929
931
  }
930
932
 
931
- function _isCliEntry(): boolean {
932
- if (process.argv[1] === undefined) {
933
- return false;
934
- }
935
- const argvPath = path.resolve(process.argv[1]);
936
- if (import.meta.url === pathToFileURL(argvPath).href) {
937
- return true;
938
- }
939
- // A symlinked invocation (`.augment/scripts` → `dist/agent-src/scripts`, or
940
- // macOS /var → /private/var) makes the raw URLs differ: import.meta.url is
941
- // the resolved real path while argv[1] keeps the symlink. Compare realpaths
942
- // so the entry guard still fires through the projection.
943
- try {
944
- return fs.realpathSync(_HERE) === fs.realpathSync(argvPath);
945
- } catch {
946
- return false;
947
- }
948
- }
949
933
 
950
- if (_isCliEntry()) {
934
+ if (isCliEntry(import.meta.url, 'roadmap_gates')) {
951
935
  process.exitCode = main();
952
936
  }
953
937
 
@@ -30,7 +30,9 @@
30
30
  import * as fs from 'node:fs';
31
31
  import * as path from 'node:path';
32
32
  import process from 'node:process';
33
- import { fileURLToPath, pathToFileURL } from 'node:url';
33
+ import { fileURLToPath } from 'node:url';
34
+
35
+ import { isCliEntry } from './_cli_entry.js';
34
36
 
35
37
  const _HERE = fileURLToPath(import.meta.url);
36
38
 
@@ -246,8 +248,9 @@ export function main(argv: string[] = process.argv.slice(2)): number {
246
248
  }
247
249
  }
248
250
 
251
+
249
252
  /* c8 ignore start */
250
- if (process.argv[1] !== undefined && pathToFileURL(path.resolve(process.argv[1])).href === pathToFileURL(_HERE).href) {
253
+ if (isCliEntry(import.meta.url, 'roadmap_set_step')) {
251
254
  process.exit(main());
252
255
  }
253
256
  /* c8 ignore stop */
@@ -42,7 +42,9 @@
42
42
  */
43
43
  import * as fs from 'node:fs';
44
44
  import * as path from 'node:path';
45
- import { fileURLToPath, pathToFileURL } from 'node:url';
45
+ import { fileURLToPath } from 'node:url';
46
+
47
+ import { isCliEntry } from './_cli_entry.js';
46
48
 
47
49
  const STUB_DIR = path.join('agents', 'roadmaps', 'stubs');
48
50
 
@@ -459,24 +461,8 @@ export function main(argv: readonly string[] = process.argv.slice(2)): number {
459
461
  return 0;
460
462
  }
461
463
 
462
- function _isCliEntry(): boolean {
463
- if (process.argv[1] === undefined) {
464
- return false;
465
- }
466
- const argvUrl = pathToFileURL(path.resolve(process.argv[1])).href;
467
- if (import.meta.url === argvUrl) {
468
- return true;
469
- }
470
- try {
471
- const here = fs.realpathSync(fileURLToPath(import.meta.url));
472
- const argv = fs.realpathSync(path.resolve(process.argv[1]));
473
- return here === argv;
474
- } catch {
475
- return false;
476
- }
477
- }
478
464
 
479
- if (_isCliEntry() || process.argv[1] === _HERE) {
465
+ if (isCliEntry(import.meta.url, 'stubs_due')) {
480
466
  process.exitCode = main();
481
467
  }
482
468
 
@@ -62,7 +62,7 @@ import { createRequire } from 'node:module';
62
62
  import { spawnSync } from 'node:child_process';
63
63
  import * as fs from 'node:fs';
64
64
  import * as path from 'node:path';
65
- import { fileURLToPath, pathToFileURL } from 'node:url';
65
+ import { fileURLToPath } from 'node:url';
66
66
  import { run_archival_sweep } from './archival_sweep.js';
67
67
  import {
68
68
  evaluateDashboardOnDisk,
@@ -72,6 +72,8 @@ import {
72
72
  } from './dashboard_mode.js';
73
73
  import type * as YamlModule from 'yaml';
74
74
  import { headerFragment as stubHeaderFragment } from './stubs_due.js';
75
+
76
+ import { isCliEntry } from './_cli_entry.js';
75
77
  import { reportGuardedBaselines } from './guarded_baseline.js'; // third step state; contract lives there
76
78
 
77
79
  const _HERE = fileURLToPath(import.meta.url);
@@ -96,7 +98,9 @@ const EXCLUDE_DIRS: ReadonlySet<string> = new Set(['archive', 'skipped', 'stubs'
96
98
 
97
99
  // FRONTMATTER_RE = re.compile(r"\A---\n(.*?)\n---\s*\n", re.DOTALL)
98
100
  const FRONTMATTER_RE = /^---\n([\s\S]*?)\n---[ \t\n\r\f\v]*\n/;
99
- const UNSCHEDULED_VALUES: ReadonlySet<string> = new Set(['draft', 'carrier']);
101
+ // A set of one since ADR-262 deleted `status: carrier`; the shape stays so a
102
+ // future unscheduled value is one entry rather than a control-flow change.
103
+ const UNSCHEDULED_VALUES: ReadonlySet<string> = new Set(['draft']);
100
104
 
101
105
  const MERGE_GATED_RE = /merge-gated/i;
102
106
  // PR_NUM_RE = re.compile(r"pr\s*[=#:]?\s*#?\s*(\d+)", re.IGNORECASE)
@@ -1438,28 +1442,7 @@ function main(argv?: readonly string[]): number {
1438
1442
  return guarded.problems > 0 ? 1 : 0;
1439
1443
  }
1440
1444
 
1441
- function _isCliEntry(): boolean {
1442
- if (process.argv[1] === undefined) {
1443
- return false;
1444
- }
1445
- const argvUrl = pathToFileURL(path.resolve(process.argv[1])).href;
1446
- if (import.meta.url === argvUrl) {
1447
- return true;
1448
- }
1449
- // A symlinked invocation (e.g. via `.augment/scripts` → `dist/agent-src/scripts`,
1450
- // or macOS /var → /private/var temp dirs) makes the raw URLs differ:
1451
- // import.meta.url is the resolved real path while argv[1] keeps the symlink
1452
- // path. Compare realpaths so the entry guard still fires (without this the
1453
- // dashboard regen silently no-ops when run through the symlink).
1454
- try {
1455
- const here = fs.realpathSync(fileURLToPath(import.meta.url));
1456
- const argv = fs.realpathSync(path.resolve(process.argv[1]));
1457
- return here === argv;
1458
- } catch {
1459
- return false;
1460
- }
1461
- }
1462
- if (_isCliEntry() || process.argv[1] === _HERE) {
1445
+ if (isCliEntry(import.meta.url, 'update_roadmap_progress')) {
1463
1446
  try {
1464
1447
  process.exitCode = main();
1465
1448
  } catch (exc) {
@@ -182,6 +182,28 @@ consumer-shipped SCIP index. Literal-string probes are reported as a separate
182
182
  cannot answer them at all, which is where grep stays necessary rather than a
183
183
  defect in the engine.
184
184
 
185
+ ## Staleness delivery — which hosts get it for free, and which do not
186
+
187
+ Migrated verbatim from `external-code-graph-interop` so the obligation stays in
188
+ the rule and the per-host delivery detail is paid only on activation.
189
+
190
+ On a host with a verified `pre_tool_use` contract, the `code-graph-context`
191
+ concern supplies this for free: once per session, on the first search or
192
+ code read, it delivers the graph's state as structured `additionalContext` —
193
+ `code-graph: fresh` or `code-graph: N commit(s) behind`. It is silent when no
194
+ graph exists, so hearing nothing is not evidence that the graph is fresh.
195
+
196
+ **On every other host that carrier does not exist**, and this section is the
197
+ delivery: run `agent-config code-graph detect --format json` before trusting a
198
+ relationship answer, and say which state you got. Which hosts those are is
199
+ `agent-config hooks:status` — resolved from the platform table, never guessed
200
+ from the host's name.
201
+
202
+ Either way the disposition is the same: `behind:N` → `agent-config code-graph
203
+ refresh` first, or use grep and say so. This is a freshness obligation, not an
204
+ ordering claim; the rule's query-first ordering still governs which source to
205
+ reach for.
206
+
185
207
  ## Do NOT
186
208
 
187
209
  - Do NOT rebuild a **fresh** consumer-shipped index — query it (interop
@@ -199,3 +221,6 @@ defect in the engine.
199
221
  discipline; the graph is one evidence source, still confirmed against the real
200
222
  code when load-bearing.
201
223
  - `agent-config code-graph` — the CLI surface over the engine (build / query / detect / affected).
224
+ - [`discovery_graph`](../../scripts/discovery_graph.ts) — this suite's OWN
225
+ artifact relation-graph (`affected`/`explain`). The external code-graph is the
226
+ *source-code* analogue; keep the two apart when answering.
@@ -25,7 +25,7 @@ install:
25
25
  - A pattern from another package is being considered for adoption and the trade-off needs to land in writing.
26
26
  - Positioning prose for a README / launch / pricing page needs an ours-vs-theirs decisions table to anchor on.
27
27
 
28
- Do NOT use for general repo audits (route to `analyze-reference-repo`),
28
+ Do NOT use for general repo audits (route to `analyze-repo`),
29
29
  upstream-contribution decisions (route to `upstream-contribute`), or
30
30
  DCF-style valuation work (route to `dcf-modeling`).
31
31
 
@@ -114,7 +114,7 @@ to [`upstream-contribute`](../upstream-contribute/SKILL.md).
114
114
  **WHEN NOT to use this**
115
115
 
116
116
  - The peer repo needs a generic walk-through first — route to
117
- [`analyze-reference-repo`](../../commands/analyze/reference-repo.md);
117
+ [`analyze-repo`](../../commands/analyze/repo.md);
118
118
  this skill consumes its output, never duplicates it.
119
119
  - The decision is to contribute back upstream — route to
120
120
  [`upstream-contribute`](../upstream-contribute/SKILL.md).
@@ -80,17 +80,33 @@ runs over repo documentation — see SKILL.md § When NOT to use.
80
80
  ## Self-validation thresholds (U4 — deterministic self-check bounds)
81
81
 
82
82
  Read after a rewrite; each bound is a **default, not a suite measurement**.
83
- The deterministic subset is enforced by
84
- [`detect_ai_tells.ts`](../../../scripts/detect_ai_tells.ts) when a runtime is
85
- available; without one, the step-3 audit checks these by eye.
86
-
87
- | Bound | Default | Source |
88
- |---|---|---|
89
- | Em/en-dash density | ≤ ~2 per 500 words | patterns.md 3.1 (CP1 parity with design-antipatterns) |
90
- | Consecutive staccato fragments | ≤ 3 short declaratives in a row | patterns.md 3.8 |
91
- | Uniform-shape bullets | merge a run of ≥ 4 identically-shaped `- **X:** …` bullets into prose or real sentences | patterns.md 3.3 |
92
- | Hedge stack | ≤ 1 hedge per claim | patterns.md 5.2 |
93
- | Stock-vocabulary density | ≤ 2 Tier-Medium AI-vocabulary words per 100 words | patterns.md 2.1 |
83
+
84
+ Two columns, because "enforced by the scanner" was one word doing two jobs and
85
+ three of these bounds were attributed to code that did not implement them. A
86
+ **mechanical signal** is something [`detect_ai_tells.ts`](../../../scripts/detect_ai_tells.ts)
87
+ actually counts. **Bound applied by** says who compares that count against the
88
+ number in the Default column — the scanner, when a runtime is available, or the
89
+ step-3 audit by eye. A row can have a signal and still be eye-checked: the
90
+ count exists, the threshold is not machine-applied.
91
+
92
+ `tests/scripts/tell_bound_attribution.test.ts` reads this table and probes the
93
+ scanner for every row, so a bound claimed here and absent from the code fails
94
+ the suite.
95
+
96
+ | Bound | Default | Mechanical signal | Bound applied by | Source |
97
+ |---|---|---|---|---|
98
+ | Em/en-dash density | ≤ ~2 per 500 words; not evaluated below a 50-word floor | `dash_density_per_500` | scanner | patterns.md 3.1 (CP1 parity with design-antipatterns) |
99
+ | Consecutive staccato fragments | ≤ 3 short declaratives in a row | `tell-staccato-run` | scanner | patterns.md 3.8 |
100
+ | Uniform-shape bullets | merge a run of ≥ 4 identically-shaped `- **X:** …` bullets into prose or real sentences | `tell-uniform-bullet-run` | scanner | patterns.md 3.3 |
101
+ | Hedge stack | ≤ 1 hedge per claim | `tell-hedging-stack` | step-3 eye-check | patterns.md 5.2 |
102
+ | Stock-vocabulary density | ≤ 2 Tier-Medium AI-vocabulary words per 100 words | `tell-ai-vocabulary` | step-3 eye-check | patterns.md 2.1 |
103
+
104
+ The two eye-checked rows are eye-checked for the same reason: their signal is a
105
+ count of fixed phrases or words, and their bound is stated per *claim* and per
106
+ *100 words* — neither of which the scanner segments. `tell-hedging-stack`
107
+ matches four stacked-hedge phrases, not one-hedge-per-claim;
108
+ `tell-ai-vocabulary` contributes occurrences to a per-500-words cluster score,
109
+ which is a different denominator from the per-100-words bound above.
94
110
 
95
111
  **Did the rewrite clear the flagged tells without introducing new ones?** A
96
112
  re-run over already-clean prose is a no-op. If a bound is intentionally
@@ -35,7 +35,7 @@ Use this skill when:
35
35
  [`extract_audit_patterns.ts`](../../../scripts/extract_audit_patterns.ts)
36
36
  — the pattern's `count` ≥ 2 already satisfies the repetition gate
37
37
  * A comparative analysis handed over a **`### SEED —` block** from its
38
- `## Seeds` section ([`/analyze:reference-repo`](../../agent-src/commands/analyze/reference-repo.md)
38
+ `## Seeds` section ([`/analyze:repo`](../../agent-src/commands/analyze/repo.md)
39
39
  § 6). This is an accepted intake shape: the block already carries the
40
40
  proposed name, kind, target template, one-line description, and the
41
41
  `Extends instead?` answer, so step 4's overlap search starts from a stated
@@ -218,7 +218,7 @@ Converted Markdown is **adversarial input**. A PDF with the literal string "igno
218
218
  **WHEN NOT to use this**
219
219
 
220
220
  - Source is plain text, Markdown, JSON, YAML, or source code — read directly, no conversion needed.
221
- - Source is a remote repo to be analyzed — route to the [`analyze-reference-repo`](../../commands/analyze/reference-repo.md) command, which composes this skill for non-text artefacts.
221
+ - Source is a remote repo to be analyzed — route to the [`analyze-repo`](../../commands/analyze/repo.md) command, which composes this skill for non-text artefacts.
222
222
  - Source is a screenshot to be visually compared — route to a vision-first skill, not a text-extraction skill.
223
223
 
224
224
  ## When the agent should load this
@@ -99,7 +99,7 @@ If Secretlint flags anything, STOP — sanitize the input or add the offending p
99
99
  Most workflows that call this skill pass the snapshot to:
100
100
 
101
101
  - A code-review pass — pair with [`judge-bug-hunter`](../judge-bug-hunter/SKILL.md) or [`judge-security-auditor`](../judge-security-auditor/SKILL.md).
102
- - Reference-repo analysis — route to [`analyze-reference-repo`](../../commands/analyze/reference-repo.md).
102
+ - Reference-repo analysis — route to [`analyze-repo`](../../commands/analyze/repo.md).
103
103
  - Migration scoping — route to [`blast-radius-analyzer`](../blast-radius-analyzer/SKILL.md).
104
104
 
105
105
  Cite the snapshot path so the consumer skill can read it.
@@ -224,6 +224,23 @@ procedure when [`roadmap-management`](../roadmap-management/SKILL.md)
224
224
  spawns a follow-up). Bare `[~]` / `[-]` is allowed; annotated is
225
225
  preferred.
226
226
 
227
+ #### A prohibition-shaped step closes with `[x]`
228
+
229
+ A step whose content is a **prohibition** (*"Do not build the enforcement"*) has
230
+ no artifact to point at. `[~]` invents receiver work nobody owes, `[-]` mislabels
231
+ restraint as cancellation, `[ ]` makes an honoured bounded obligation
232
+ unarchivable. It closes with **`[x]`** — the obligation was discharged, and `[x]`
233
+ never required that something was created. Its `verify:` must name every
234
+ implementation, registration and semantically-equivalent surface (a structural
235
+ check, not one literal grep, which misses aliases and generated code); **fail if
236
+ an expected search root is missing**, checked BEFORE the absence check, because a
237
+ glob over a vanished directory returns nothing and reads as success; scope the
238
+ claim to the branch diff — *"this change introduced no enforcement"*, never the
239
+ unprovable *"enforcement exists nowhere"*; and be re-run at archival. Not for a
240
+ prohibition meant to hold indefinitely — that belongs in a rule, test or linter,
241
+ because a closed step stops watching. Council convention, 2026-09-08 (2 seats,
242
+ convergent); falsified if tooling defines `[x]` as requiring a positive mutation.
243
+
227
244
  ### 7. Follow-up roadmaps spawn from deferred items — frontmatter shape
228
245
 
229
246
  When a parent roadmap closes with `[~]` items, the
@@ -79,6 +79,8 @@ For complex features or systems. Stored in `agents/features/` or module `agents/
79
79
  |---|---|---|---|
80
80
 
81
81
  ## Open Questions
82
+ {Each line is a question still owed to the user — ask one at a time and move
83
+ the answer into the section it belongs to. Not a storage section.}
82
84
  - [ ] {Unresolved question}
83
85
 
84
86
  ## References
@@ -123,6 +125,8 @@ technical spec, not here.}
123
125
  - **{Module name}** — {one-sentence responsibility}
124
126
 
125
127
  ## Open Questions
128
+ {Each line is a question still owed to the user — ask one at a time and move
129
+ the answer into the section it belongs to. Not a storage section.}
126
130
  - [ ] {Unresolved product question — pricing, permission, copy, edge case}
127
131
 
128
132
  ## References
@@ -629,7 +629,6 @@ the canonical narrative lives in
629
629
  | `hooks.injection_scan.enabled` | `true`, `false` | `false` | PostToolUse prompt-injection scanner: scans tool output for injection signatures and warns in context (exit 2) — never blocks. |
630
630
  | `hooks.rtk_wrap.enabled` | `true`, `false` | `false` | PreToolUse RTK-wrap nudge: when `rtk` is on PATH, warns (exit 2, never blocks) to re-run a verbose CLI command wrapped with rtk. |
631
631
  | `hooks.design_slop.enabled` | `true`, `false` | `false` | PreToolUse anti-slop nudge: runs the `lint_design_slop` registry against about-to-be-written UI content and warns (exit 2, never blocks) on P0/P1 aesthetic tells. |
632
- | `hooks.code_graph.enabled` | `true`, `false` | `false` | PreToolUse code-graph nudge (deprecated — honest null 2026-07-28): when a code-graph index exists, warns once per session to query the graph before grep. Requires manually installing the ABI-locked parser pair. |
633
632
  | `pipelines.skill_improvement` | `true`, `false` | `true` | When `true`: propose learning capture after meaningful tasks. When `false`: silent. Included in every profile except `custom`. |
634
633
  | `roadmap.skip_pre_run_gate` | `true`, `false` | `true` | When `true` (default): `/roadmap:process-step\|phase\|full` skips the interactive pre-run summary and starts the loop immediately — the resolved roadmap, cadence, and council are surfaced inline so an unwanted pick can still be aborted. When `false`: the loop shows the pre-run summary with numbered options (Go / Different roadmap / Different scope / Toggle council / Abort) and waits. The gate is always shown — regardless of this flag — when the roadmap is ambiguous (multiple active, none named) or a scope / cadence conflict has no sensible default. |
635
634
  | `roadmap.quality_cadence` | `end_of_roadmap`, `per_phase`, `per_step` | `end_of_roadmap` | When `/roadmap:process-step|phase|full` runs the project's quality pipeline — only relevant when `quality.local_auto_run` is `true`; when it is `false` (the default) local pipeline runs are suppressed at every cadence and remote CI is the gate. Default skips per-step / per-phase runs and gates only the final archival. `per_phase` runs once after every phase; `per_step` is the legacy verbose mode. Step checkboxes and the dashboard are always updated regardless. |
@@ -39,7 +39,7 @@ schema_version: 1
39
39
  # CI guard: a release bump of `package.json` must update this value
40
40
  # in lockstep — see scripts/check_template_pin_drift.ts (road-to-
41
41
  # portable-runtime-and-update-check P3.3).
42
- agent_config_version: "14.20.0"
42
+ agent_config_version: "14.22.0"
43
43
 
44
44
  # --- Project identity ---
45
45
  project:
@@ -90,6 +90,11 @@ Reference existing code where helpful.}
90
90
 
91
91
  ## Open Questions
92
92
 
93
+ > Every entry here is a question still **owed to the user** — not a permanent
94
+ > section and not a place to file a decision. Each one is put to the user in the
95
+ > chat, one at a time, and the answer moves out of this list into the section it
96
+ > belongs to. A question that stays here across a session was parked, not asked.
97
+
93
98
  - [ ] {Unresolved question 1}
94
99
  - [ ] {Unresolved question 2}
95
100
 
@@ -301,6 +301,21 @@ that was never a judgement call.
301
301
  step gated by a specific blocker may cross-reference it inline:
302
302
  `- [ ] … <!-- blocked-by: <blocker-id> -->`.
303
303
 
304
+ **A user-decision blocker's annotation records whether the question
305
+ was actually put.** Where the blocker's `Owner:` is the maintainer,
306
+ the user or the owner, the marker carries an `asked:` field —
307
+ `<!-- blocked-by: <id> | asked: yes -->` when the question reached
308
+ the user, `<!-- blocked-by: <id> | asked: no — <reason> -->` when it
309
+ did not. `lint_roadmap_blockers` fails on a missing field and on an
310
+ `asked: no` with no reason. Without it a decision only the user can
311
+ make can be filed, correctly labelled, in a file nobody is watching,
312
+ and a later reader cannot tell a declined decision from one that was
313
+ never offered. On an interactive host the question is put FIRST;
314
+ only a decline, a timeout, or a non-interactive context writes the
315
+ marker, and a timeout is never consent — see
316
+ [`roadmap-process-loop`](../contexts/execution/roadmap-process-loop.md)
317
+ § Ask before park.
318
+
304
319
  **A blocker is a decision the owner can make in one sitting, or it
305
320
  is not finished being written.** The five original fields describe
306
321
  the *situation*; they do not make it decidable, and a blocker that
@@ -0,0 +1,8 @@
1
+ import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
+ import {
3
+ isCliEntry
4
+ } from "./chunk-5EK5WQN6.js";
5
+ import "./chunk-JO25G5H7.js";
6
+ export {
7
+ isCliEntry
8
+ };
@@ -0,0 +1,170 @@
1
+ import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
+
3
+ // src/scripts/_lib/pin_resolver.ts
4
+ import { spawnSync } from "node:child_process";
5
+ import * as fs from "node:fs";
6
+ import * as path from "node:path";
7
+ import { fileURLToPath, pathToFileURL } from "node:url";
8
+ var PACKAGE_NAME = "@event4u/agent-config";
9
+ var PIN_KEY = "agent_config_version";
10
+ var NO_REEXEC_ENV = "AGENT_CONFIG_NO_PIN_REEXEC";
11
+ var REEXEC_DEPTH_ENV = "AGENT_CONFIG_PIN_REEXEC_DEPTH";
12
+ function _normalize(version) {
13
+ return version.trim().replace(/^v+/, "");
14
+ }
15
+ async function read_pin(cwd, options = {}) {
16
+ let settings;
17
+ try {
18
+ let loader = options.settings_loader;
19
+ if (loader === void 0) {
20
+ const specifier = "./agent_settings";
21
+ const mod = await import(specifier);
22
+ if (typeof mod.load_agent_settings !== "function") {
23
+ return null;
24
+ }
25
+ loader = mod.load_agent_settings;
26
+ }
27
+ settings = await loader({ cwd });
28
+ } catch {
29
+ return null;
30
+ }
31
+ const raw = settings[PIN_KEY];
32
+ if (typeof raw !== "string") {
33
+ return null;
34
+ }
35
+ const pin = raw.trim();
36
+ return pin || null;
37
+ }
38
+ function should_reexec(pin, installed, options = {}) {
39
+ const env = options.env ?? process.env;
40
+ if (env[NO_REEXEC_ENV] === "1") {
41
+ return false;
42
+ }
43
+ if (env[REEXEC_DEPTH_ENV] === "1") {
44
+ return false;
45
+ }
46
+ if (!pin) {
47
+ return false;
48
+ }
49
+ if (!installed) {
50
+ return false;
51
+ }
52
+ return _normalize(pin) !== _normalize(installed);
53
+ }
54
+ function build_reexec_argv(pin, argv) {
55
+ return ["npx", "--yes", `${PACKAGE_NAME}@${_normalize(pin)}`, ...argv];
56
+ }
57
+ function _which(cmd) {
58
+ const path_var = process.env.PATH ?? "";
59
+ const exts = process.platform === "win32" ? (process.env.PATHEXT ?? ".COM;.EXE;.BAT;.CMD").split(";") : [""];
60
+ for (const dir of path_var.split(path.delimiter)) {
61
+ if (!dir) {
62
+ continue;
63
+ }
64
+ for (const ext of exts) {
65
+ const candidate = path.join(dir, cmd + ext.toLowerCase());
66
+ try {
67
+ const st = fs.statSync(candidate);
68
+ if (st.isFile()) {
69
+ if (process.platform !== "win32") {
70
+ fs.accessSync(candidate, fs.constants.X_OK);
71
+ }
72
+ return candidate;
73
+ }
74
+ } catch {
75
+ }
76
+ }
77
+ }
78
+ return null;
79
+ }
80
+ function _exec_runner(npx, argv, env) {
81
+ const result = spawnSync(npx, argv.slice(1), {
82
+ env,
83
+ stdio: "inherit"
84
+ });
85
+ process.exit(result.status ?? 1);
86
+ }
87
+ async function maybe_reexec(installed, options = {}) {
88
+ const cwd = options.cwd ?? process.cwd();
89
+ const argv = options.argv ?? process.argv.slice(1);
90
+ const env = options.env ?? process.env;
91
+ const pin_reader = options.pin_reader ?? ((c) => read_pin(c));
92
+ const which = options.which ?? _which;
93
+ const pin = await pin_reader(cwd);
94
+ if (!should_reexec(pin, installed, { env })) {
95
+ return null;
96
+ }
97
+ if (pin == null) {
98
+ throw new Error("maybe_reexec: pin narrowed to null after should_reexec");
99
+ }
100
+ const npx = which("npx");
101
+ if (!npx) {
102
+ return null;
103
+ }
104
+ const new_argv = build_reexec_argv(pin, argv.length > 0 ? argv.slice(1) : []);
105
+ const child_env = { ...env };
106
+ child_env[REEXEC_DEPTH_ENV] = "1";
107
+ const runner = options.runner ?? null;
108
+ if (runner === null) {
109
+ return _exec_runner(npx, new_argv, child_env);
110
+ }
111
+ return runner(npx, new_argv, child_env);
112
+ }
113
+ function _parse_cli(argv) {
114
+ let cwd = process.cwd();
115
+ let installed = "";
116
+ let forward = [];
117
+ let i = 0;
118
+ while (i < argv.length) {
119
+ const token = argv[i];
120
+ if (token === "--cwd" && i + 1 < argv.length) {
121
+ cwd = argv[i + 1];
122
+ i += 2;
123
+ } else if (token === "--installed" && i + 1 < argv.length) {
124
+ installed = argv[i + 1];
125
+ i += 2;
126
+ } else if (token === "--") {
127
+ forward = argv.slice(i + 1);
128
+ break;
129
+ } else {
130
+ i += 1;
131
+ }
132
+ }
133
+ return { cwd, installed, forward };
134
+ }
135
+ function _isCliEntry() {
136
+ if (process.argv[1] === void 0) {
137
+ return false;
138
+ }
139
+ if (true) {
140
+ if (path.basename(process.argv[1], ".js") === "pin_resolver") {
141
+ return true;
142
+ }
143
+ }
144
+ const argvUrl = pathToFileURL(path.resolve(process.argv[1])).href;
145
+ if (import.meta.url === argvUrl) {
146
+ return true;
147
+ }
148
+ try {
149
+ const here = fs.realpathSync(fileURLToPath(import.meta.url));
150
+ const argv = fs.realpathSync(path.resolve(process.argv[1]));
151
+ return here === argv;
152
+ } catch {
153
+ return false;
154
+ }
155
+ }
156
+ if (_isCliEntry()) {
157
+ const { cwd, installed, forward } = _parse_cli(process.argv.slice(2));
158
+ const child_argv = ["agent-config", ...forward];
159
+ await maybe_reexec(installed, { cwd, argv: child_argv });
160
+ }
161
+ export {
162
+ NO_REEXEC_ENV,
163
+ PACKAGE_NAME,
164
+ PIN_KEY,
165
+ REEXEC_DEPTH_ENV,
166
+ build_reexec_argv,
167
+ maybe_reexec,
168
+ read_pin,
169
+ should_reexec
170
+ };
@@ -0,0 +1,8 @@
1
+ import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
+ import {
3
+ run_archival_sweep
4
+ } from "./chunk-YWVXLR44.js";
5
+ import "./chunk-JO25G5H7.js";
6
+ export {
7
+ run_archival_sweep
8
+ };