@agntk/agent-harness 0.1.5 → 0.1.6

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 (151) hide show
  1. package/README.md +104 -43
  2. package/dist/{analytics-RPT73WNM.js → analytics-L24W3B7U.js} +1 -2
  3. package/dist/{auto-processor-SDAJF67T.js → auto-processor-QIRUOGEI.js} +1 -2
  4. package/dist/{chunk-NBEAK63K.js → chunk-4P6TRFPZ.js} +1 -1
  5. package/dist/chunk-4P6TRFPZ.js.map +1 -0
  6. package/dist/{chunk-NOJW5KG2.js → chunk-5CO5JTYT.js} +2 -2
  7. package/dist/chunk-5CO5JTYT.js.map +1 -0
  8. package/dist/{chunk-P74KXHA4.js → chunk-KLYMGWQJ.js} +2 -2
  9. package/dist/chunk-KLYMGWQJ.js.map +1 -0
  10. package/dist/{chunk-PTQ37NRI.js → chunk-M62KLIEK.js} +2 -2
  11. package/dist/chunk-M62KLIEK.js.map +1 -0
  12. package/dist/{chunk-2ENYRENZ.js → chunk-PMFAYKBD.js} +1 -1
  13. package/dist/chunk-PMFAYKBD.js.map +1 -0
  14. package/dist/{chunk-GX2RCSFJ.js → chunk-QMOIVORH.js} +1 -1
  15. package/dist/chunk-QMOIVORH.js.map +1 -0
  16. package/dist/cli/index.js +150 -165
  17. package/dist/cli/index.js.map +1 -1
  18. package/dist/{config-2O6S2YJO.js → config-PYSS3QY6.js} +1 -2
  19. package/dist/{context-loader-XCZ5EXNG.js → context-loader-RSXXFW5R.js} +1 -2
  20. package/dist/{conversation-OPLE23IM.js → conversation-TBTFIJVU.js} +1 -2
  21. package/dist/{cost-tracker-RS3W7SVY.js → cost-tracker-NZRZEHVA.js} +1 -2
  22. package/dist/{delegate-ZJCIADNN.js → delegate-3KJAL4NZ.js} +4 -5
  23. package/dist/{emotional-state-VQVRA6ED.js → emotional-state-IN4ZUL2Q.js} +1 -2
  24. package/dist/{emotional-state-VQVRA6ED.js.map → emotional-state-IN4ZUL2Q.js.map} +1 -1
  25. package/dist/{env-discovery-2BLVMAIM.js → env-discovery-PXBRE5FX.js} +1 -2
  26. package/dist/{env-discovery-2BLVMAIM.js.map → env-discovery-PXBRE5FX.js.map} +1 -1
  27. package/dist/{export-2HEAAOUF.js → export-GYLWROMB.js} +1 -2
  28. package/dist/{export-2HEAAOUF.js.map → export-GYLWROMB.js.map} +1 -1
  29. package/dist/{graph-5MKRTC3J.js → graph-LEEO37L3.js} +2 -3
  30. package/dist/{harness-XSBQBY7T.js → harness-R5FKRICG.js} +4 -5
  31. package/dist/{health-NZ6WNIMV.js → health-HL2JYHIY.js} +1 -2
  32. package/dist/{indexer-YKSGUVYT.js → indexer-L5UC6J2V.js} +1 -2
  33. package/dist/{instinct-learner-CWVMLUWX.js → instinct-learner-QGAMIS3X.js} +1 -2
  34. package/dist/{intake-M5NRR6QR.js → intake-SVJKFHTL.js} +1 -2
  35. package/dist/{intelligence-UW4TCOC7.js → intelligence-XPV3MC5U.js} +2 -5
  36. package/dist/intelligence-XPV3MC5U.js.map +1 -0
  37. package/dist/{journal-KN265YLU.js → journal-ITUMKT6U.js} +2 -3
  38. package/dist/{loader-BOCVXVCH.js → loader-27PLDCOJ.js} +1 -2
  39. package/dist/{mcp-WTQJJZAO.js → mcp-JSIUJJZV.js} +1 -2
  40. package/dist/{mcp-discovery-WPAQFL6S.js → mcp-discovery-DG3RQYLM.js} +1 -2
  41. package/dist/{mcp-discovery-WPAQFL6S.js.map → mcp-discovery-DG3RQYLM.js.map} +1 -1
  42. package/dist/{mcp-installer-KV3XZRRF.js → mcp-installer-X2TJ2S2G.js} +1 -2
  43. package/dist/{mcp-installer-KV3XZRRF.js.map → mcp-installer-X2TJ2S2G.js.map} +1 -1
  44. package/dist/{metrics-KXGNFAAB.js → metrics-2MNINXNQ.js} +1 -2
  45. package/dist/{primitive-registry-HOJMUFBT.js → primitive-registry-ZMGGXSO5.js} +1 -2
  46. package/dist/{primitive-registry-HOJMUFBT.js.map → primitive-registry-ZMGGXSO5.js.map} +1 -1
  47. package/dist/{project-discovery-C4UMD7JI.js → project-discovery-FQLAZKEM.js} +1 -2
  48. package/dist/project-discovery-FQLAZKEM.js.map +1 -0
  49. package/dist/{provider-SXPQZ74H.js → provider-HQY6SPZI.js} +1 -2
  50. package/dist/{rate-limiter-RLRVM325.js → rate-limiter-PH5DCVU4.js} +1 -2
  51. package/dist/{rule-engine-I4AFQSSR.js → rule-engine-DM26S77N.js} +1 -2
  52. package/dist/{rule-engine-I4AFQSSR.js.map → rule-engine-DM26S77N.js.map} +1 -1
  53. package/dist/{scaffold-ZY4XWINP.js → scaffold-2F36YVW6.js} +3 -4
  54. package/dist/{scaffold-ZY4XWINP.js.map → scaffold-2F36YVW6.js.map} +1 -1
  55. package/dist/{scheduler-TYOQKO4C.js → scheduler-Q7GB2KCW.js} +6 -7
  56. package/dist/{scheduler-TYOQKO4C.js.map → scheduler-Q7GB2KCW.js.map} +1 -1
  57. package/dist/{search-4IYM525O.js → search-6Y6NCOLQ.js} +1 -2
  58. package/dist/search-6Y6NCOLQ.js.map +1 -0
  59. package/dist/{semantic-search-G624D6CI.js → semantic-search-FN6FZIXI.js} +1 -2
  60. package/dist/semantic-search-FN6FZIXI.js.map +1 -0
  61. package/dist/{serve-QFUZWOU3.js → serve-MXRTP2HE.js} +3 -4
  62. package/dist/serve-MXRTP2HE.js.map +1 -0
  63. package/dist/{sessions-CZGVXKQE.js → sessions-G6SZZXWS.js} +1 -2
  64. package/dist/{sources-RW5DT56F.js → sources-7LDYO5GK.js} +1 -2
  65. package/dist/{starter-packs-76YUVHEU.js → starter-packs-OR7NI5NA.js} +1 -2
  66. package/dist/{starter-packs-76YUVHEU.js.map → starter-packs-OR7NI5NA.js.map} +1 -1
  67. package/dist/{state-GMXILIHW.js → state-25IQEC5C.js} +1 -2
  68. package/dist/{state-merge-NKO5FRBA.js → state-merge-E333OEIQ.js} +1 -2
  69. package/dist/{state-merge-NKO5FRBA.js.map → state-merge-E333OEIQ.js.map} +1 -1
  70. package/dist/{telemetry-MVDNGJEC.js → telemetry-RS2JZUZP.js} +1 -2
  71. package/dist/{tool-executor-KEYQLO4M.js → tool-executor-6I5PHQDY.js} +3 -4
  72. package/dist/{tools-EB3BHRRF.js → tools-NDFJNVHK.js} +2 -3
  73. package/dist/{types-NYKB2DN3.js → types-NPJZAI72.js} +1 -2
  74. package/dist/{universal-installer-7MFCJUW7.js → universal-installer-LCAZHFZR.js} +2 -3
  75. package/dist/universal-installer-LCAZHFZR.js.map +1 -0
  76. package/dist/{validator-LZXBFEPV.js → validator-LM7RZWSH.js} +1 -2
  77. package/dist/{verification-gate-ALSJVKSW.js → verification-gate-2O6DF2B7.js} +1 -2
  78. package/dist/verification-gate-2O6DF2B7.js.map +1 -0
  79. package/dist/{versioning-Z3XNE2Q2.js → versioning-WEGF6KJG.js} +1 -2
  80. package/dist/versioning-WEGF6KJG.js.map +1 -0
  81. package/dist/{watcher-CSHVDOCM.js → watcher-GZWQSWZ6.js} +1 -2
  82. package/dist/{watcher-CSHVDOCM.js.map → watcher-GZWQSWZ6.js.map} +1 -1
  83. package/dist/{web-server-7NGOTK7J.js → web-server-2Y4CHD2W.js} +1 -2
  84. package/package.json +1 -9
  85. package/dist/agent-framework-CMFC3VJM.js +0 -344
  86. package/dist/agent-framework-CMFC3VJM.js.map +0 -1
  87. package/dist/chunk-2ENYRENZ.js.map +0 -1
  88. package/dist/chunk-DGUM43GV.js +0 -11
  89. package/dist/chunk-FD55B3IO.js +0 -204
  90. package/dist/chunk-FD55B3IO.js.map +0 -1
  91. package/dist/chunk-GX2RCSFJ.js.map +0 -1
  92. package/dist/chunk-MSO7DKBK.js +0 -2123
  93. package/dist/chunk-MSO7DKBK.js.map +0 -1
  94. package/dist/chunk-NBEAK63K.js.map +0 -1
  95. package/dist/chunk-NOJW5KG2.js.map +0 -1
  96. package/dist/chunk-P74KXHA4.js.map +0 -1
  97. package/dist/chunk-PTQ37NRI.js.map +0 -1
  98. package/dist/chunk-RPBC2QOA.js +0 -235
  99. package/dist/chunk-RPBC2QOA.js.map +0 -1
  100. package/dist/chunk-XVFVTDE6.js +0 -98
  101. package/dist/chunk-XVFVTDE6.js.map +0 -1
  102. package/dist/chunk-ZZJOFKAT.js +0 -13
  103. package/dist/config-LLQZYN2Q.js +0 -11
  104. package/dist/harness-ABKZWP47.js +0 -11
  105. package/dist/index.d.ts +0 -3634
  106. package/dist/index.js +0 -13797
  107. package/dist/index.js.map +0 -1
  108. package/dist/intelligence-UW4TCOC7.js.map +0 -1
  109. package/dist/project-discovery-C4UMD7JI.js.map +0 -1
  110. package/dist/provider-LQHQX7Z7.js +0 -26
  111. package/dist/search-4IYM525O.js.map +0 -1
  112. package/dist/semantic-search-G624D6CI.js.map +0 -1
  113. package/dist/serve-QFUZWOU3.js.map +0 -1
  114. package/dist/tool-executor-KEYQLO4M.js.map +0 -1
  115. package/dist/tools-EB3BHRRF.js.map +0 -1
  116. package/dist/types-NYKB2DN3.js.map +0 -1
  117. package/dist/types-VRSXU4AM.js +0 -16
  118. package/dist/types-VRSXU4AM.js.map +0 -1
  119. package/dist/universal-installer-7MFCJUW7.js.map +0 -1
  120. package/dist/validator-LZXBFEPV.js.map +0 -1
  121. package/dist/verification-gate-ALSJVKSW.js.map +0 -1
  122. package/dist/versioning-Z3XNE2Q2.js.map +0 -1
  123. package/dist/web-server-7NGOTK7J.js.map +0 -1
  124. /package/dist/{analytics-RPT73WNM.js.map → analytics-L24W3B7U.js.map} +0 -0
  125. /package/dist/{auto-processor-SDAJF67T.js.map → auto-processor-QIRUOGEI.js.map} +0 -0
  126. /package/dist/{chunk-DGUM43GV.js.map → config-PYSS3QY6.js.map} +0 -0
  127. /package/dist/{chunk-ZZJOFKAT.js.map → context-loader-RSXXFW5R.js.map} +0 -0
  128. /package/dist/{config-2O6S2YJO.js.map → conversation-TBTFIJVU.js.map} +0 -0
  129. /package/dist/{config-LLQZYN2Q.js.map → cost-tracker-NZRZEHVA.js.map} +0 -0
  130. /package/dist/{context-loader-XCZ5EXNG.js.map → delegate-3KJAL4NZ.js.map} +0 -0
  131. /package/dist/{conversation-OPLE23IM.js.map → graph-LEEO37L3.js.map} +0 -0
  132. /package/dist/{cost-tracker-RS3W7SVY.js.map → harness-R5FKRICG.js.map} +0 -0
  133. /package/dist/{delegate-ZJCIADNN.js.map → health-HL2JYHIY.js.map} +0 -0
  134. /package/dist/{graph-5MKRTC3J.js.map → indexer-L5UC6J2V.js.map} +0 -0
  135. /package/dist/{harness-ABKZWP47.js.map → instinct-learner-QGAMIS3X.js.map} +0 -0
  136. /package/dist/{harness-XSBQBY7T.js.map → intake-SVJKFHTL.js.map} +0 -0
  137. /package/dist/{health-NZ6WNIMV.js.map → journal-ITUMKT6U.js.map} +0 -0
  138. /package/dist/{indexer-YKSGUVYT.js.map → loader-27PLDCOJ.js.map} +0 -0
  139. /package/dist/{instinct-learner-CWVMLUWX.js.map → mcp-JSIUJJZV.js.map} +0 -0
  140. /package/dist/{intake-M5NRR6QR.js.map → metrics-2MNINXNQ.js.map} +0 -0
  141. /package/dist/{journal-KN265YLU.js.map → provider-HQY6SPZI.js.map} +0 -0
  142. /package/dist/{loader-BOCVXVCH.js.map → rate-limiter-PH5DCVU4.js.map} +0 -0
  143. /package/dist/{mcp-WTQJJZAO.js.map → sessions-G6SZZXWS.js.map} +0 -0
  144. /package/dist/{metrics-KXGNFAAB.js.map → sources-7LDYO5GK.js.map} +0 -0
  145. /package/dist/{provider-LQHQX7Z7.js.map → state-25IQEC5C.js.map} +0 -0
  146. /package/dist/{provider-SXPQZ74H.js.map → telemetry-RS2JZUZP.js.map} +0 -0
  147. /package/dist/{rate-limiter-RLRVM325.js.map → tool-executor-6I5PHQDY.js.map} +0 -0
  148. /package/dist/{sessions-CZGVXKQE.js.map → tools-NDFJNVHK.js.map} +0 -0
  149. /package/dist/{sources-RW5DT56F.js.map → types-NPJZAI72.js.map} +0 -0
  150. /package/dist/{state-GMXILIHW.js.map → validator-LM7RZWSH.js.map} +0 -0
  151. /package/dist/{telemetry-MVDNGJEC.js.map → web-server-2Y4CHD2W.js.map} +0 -0
package/dist/cli/index.js CHANGED
@@ -3,7 +3,6 @@
3
3
  import {
4
4
  setGlobalLogLevel
5
5
  } from "../chunk-BSKDOFRT.js";
6
- import "../chunk-ZZJOFKAT.js";
7
6
 
8
7
  // src/cli/index.ts
9
8
  import { Command } from "commander";
@@ -101,7 +100,7 @@ function askQuestion(rl, question, defaultValue) {
101
100
  });
102
101
  }
103
102
  program.command("init [name]").description("Scaffold a new agent harness directory (interactive if no name given)").option("-d, --dir <path>", "Parent directory", ".").option("-t, --template <name>", "Config template (base, claude-opus, gpt4, local)", "base").option("-p, --purpose <description>", "Agent purpose description").option("-i, --interactive", "Force interactive mode", false).option("--generate", "Generate CORE.md using LLM (requires API key)", false).option("--no-discover-mcp", "Skip MCP server auto-discovery").option("--no-discover-env", "Skip environment variable scanning").option("--no-discover-project", "Skip project context detection").option("-y, --yes", "Accept defaults for all prompts (skip MCP confirmation)", false).action(async (name, opts) => {
104
- const { scaffoldHarness, generateCoreMd, listTemplates } = await import("../scaffold-ZY4XWINP.js");
103
+ const { scaffoldHarness, generateCoreMd, listTemplates } = await import("../scaffold-2F36YVW6.js");
105
104
  const isInteractive = !name || opts.interactive;
106
105
  let agentName = name ?? "";
107
106
  let purpose = opts.purpose ?? "";
@@ -162,7 +161,7 @@ program.command("init [name]").description("Scaffold a new agent harness directo
162
161
  console.log(`
163
162
  \u2713 Agent harness created: ${targetDir}`);
164
163
  if (opts.discoverMcp !== false) {
165
- const { discoverMcpServers, discoveredServersToYaml, filterUnsafeServers } = await import("../mcp-discovery-WPAQFL6S.js");
164
+ const { discoverMcpServers, discoveredServersToYaml, filterUnsafeServers } = await import("../mcp-discovery-DG3RQYLM.js");
166
165
  const discovery = discoverMcpServers();
167
166
  const safeServers = filterUnsafeServers(discovery.servers);
168
167
  if (safeServers.length > 0) {
@@ -202,7 +201,7 @@ Add these ${safeServers.length} server(s) to config.yaml? [Y/n] `, (a) => res(a.
202
201
  }
203
202
  }
204
203
  if (opts.discoverEnv !== false) {
205
- const { discoverEnvKeys } = await import("../env-discovery-2BLVMAIM.js");
204
+ const { discoverEnvKeys } = await import("../env-discovery-PXBRE5FX.js");
206
205
  const envResult = discoverEnvKeys({ dir: parentDir, extraDirs: [targetDir] });
207
206
  if (envResult.suggestions.length > 0) {
208
207
  console.log(`
@@ -214,7 +213,7 @@ Add these ${safeServers.length} server(s) to config.yaml? [Y/n] `, (a) => res(a.
214
213
  }
215
214
  }
216
215
  if (opts.discoverProject !== false) {
217
- const { discoverProjectContext } = await import("../project-discovery-C4UMD7JI.js");
216
+ const { discoverProjectContext } = await import("../project-discovery-FQLAZKEM.js");
218
217
  const projectResult = discoverProjectContext({ dir: parentDir });
219
218
  if (projectResult.signals.length > 0) {
220
219
  const stack = projectResult.signals.map((s) => s.name).join(", ");
@@ -250,7 +249,7 @@ The agent gets better the more you use it. See README.md inside`);
250
249
  }
251
250
  });
252
251
  program.command("run <prompt>").description("Run a prompt through the agent").option("-d, --dir <path>", "Harness directory", ".").option("-s, --stream", "Stream output", false).option("-m, --model <model>", "Model override (or alias: gemma, qwen, glm, claude)").option("-p, --provider <provider>", "Provider override (openrouter, anthropic, openai)").option("-k, --api-key <key>", "API key override (default: from environment)").action(async (prompt, opts) => {
253
- const { createHarness } = await import("../harness-XSBQBY7T.js");
252
+ const { createHarness } = await import("../harness-R5FKRICG.js");
254
253
  const dir = resolve(opts.dir);
255
254
  loadEnvFromDir(dir);
256
255
  requireHarness(dir);
@@ -291,10 +290,10 @@ program.command("run <prompt>").description("Run a prompt through the agent").op
291
290
  }
292
291
  });
293
292
  program.command("chat").description("Start an interactive chat session with conversation memory").option("-d, --dir <path>", "Harness directory", ".").option("-m, --model <model>", "Model override").option("-p, --provider <provider>", "Provider override (openrouter, anthropic, openai)").option("-k, --api-key <key>", "API key override (default: from environment)").option("--fresh", "Start fresh (clear conversation history)", false).action(async (opts) => {
294
- const { Conversation } = await import("../conversation-OPLE23IM.js");
295
- const { loadConfig } = await import("../config-2O6S2YJO.js");
296
- const { buildToolSet } = await import("../tool-executor-KEYQLO4M.js");
297
- const { createMcpManager } = await import("../mcp-WTQJJZAO.js");
293
+ const { Conversation } = await import("../conversation-TBTFIJVU.js");
294
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
295
+ const { buildToolSet } = await import("../tool-executor-6I5PHQDY.js");
296
+ const { createMcpManager } = await import("../mcp-JSIUJJZV.js");
298
297
  const readline = await import("readline");
299
298
  const dir = resolve(opts.dir);
300
299
  requireHarness(dir);
@@ -392,9 +391,9 @@ ${config.agent.name} is ready. ${history.length > 0 ? `(${history.length} messag
392
391
  ask();
393
392
  });
394
393
  program.command("info").description("Show harness info and loaded context").option("-d, --dir <path>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
395
- const { loadConfig } = await import("../config-2O6S2YJO.js");
396
- const { buildSystemPrompt } = await import("../context-loader-XCZ5EXNG.js");
397
- const { loadState } = await import("../state-GMXILIHW.js");
394
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
395
+ const { buildSystemPrompt } = await import("../context-loader-RSXXFW5R.js");
396
+ const { loadState } = await import("../state-25IQEC5C.js");
398
397
  const dir = resolve(opts.dir);
399
398
  requireHarness(dir);
400
399
  try {
@@ -452,8 +451,8 @@ MCP servers: ${mcpEntries.length} configured (${enabledCount} enabled)`);
452
451
  }
453
452
  });
454
453
  program.command("prompt").description("Show the full assembled system prompt").option("-d, --dir <path>", "Harness directory", ".").option("--json", "Output metadata as JSON (includes prompt, budget, warnings)").action(async (opts) => {
455
- const { loadConfig } = await import("../config-2O6S2YJO.js");
456
- const { buildSystemPrompt } = await import("../context-loader-XCZ5EXNG.js");
454
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
455
+ const { buildSystemPrompt } = await import("../context-loader-RSXXFW5R.js");
457
456
  const dir = resolve(opts.dir);
458
457
  requireHarness(dir);
459
458
  try {
@@ -475,12 +474,12 @@ program.command("prompt").description("Show the full assembled system prompt").o
475
474
  }
476
475
  });
477
476
  program.command("dev").description("Start dev mode \u2014 watches for file changes, rebuilds indexes, runs scheduled workflows, serves dashboard").option("-d, --dir <path>", "Harness directory", ".").option("-k, --api-key <key>", "API key override (default: from environment)").option("--no-schedule", "Disable workflow scheduler").option("--no-auto-process", "Disable auto-processing of primitives on save").option("--no-web", "Disable web dashboard server").option("-p, --port <number>", "Web dashboard port", "3000").action(async (opts) => {
478
- const { loadConfig } = await import("../config-2O6S2YJO.js");
479
- const { rebuildAllIndexes } = await import("../indexer-YKSGUVYT.js");
480
- const { createWatcher } = await import("../watcher-CSHVDOCM.js");
481
- const { Scheduler } = await import("../scheduler-TYOQKO4C.js");
482
- const { autoProcessAll } = await import("../auto-processor-SDAJF67T.js");
483
- const { generateSystemMd } = await import("../scaffold-ZY4XWINP.js");
477
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
478
+ const { rebuildAllIndexes } = await import("../indexer-L5UC6J2V.js");
479
+ const { createWatcher } = await import("../watcher-GZWQSWZ6.js");
480
+ const { Scheduler } = await import("../scheduler-Q7GB2KCW.js");
481
+ const { autoProcessAll } = await import("../auto-processor-QIRUOGEI.js");
482
+ const { generateSystemMd } = await import("../scaffold-2F36YVW6.js");
484
483
  const { writeFileSync } = await import("fs");
485
484
  const dir = resolve(opts.dir);
486
485
  loadEnvFromDir(dir);
@@ -548,7 +547,7 @@ program.command("dev").description("Start dev mode \u2014 watches for file chang
548
547
  }
549
548
  let webServer = null;
550
549
  if (opts.web) {
551
- const { startWebServer } = await import("../web-server-7NGOTK7J.js");
550
+ const { startWebServer } = await import("../web-server-2Y4CHD2W.js");
552
551
  const port = parseInt(opts.port, 10) || 3e3;
553
552
  webServer = await startWebServer({
554
553
  harnessDir: dir,
@@ -609,8 +608,8 @@ program.command("dev").description("Start dev mode \u2014 watches for file chang
609
608
  process.on("SIGTERM", cleanup);
610
609
  });
611
610
  program.command("index").description("Rebuild all index files").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
612
- const { rebuildAllIndexes } = await import("../indexer-YKSGUVYT.js");
613
- const { loadConfig } = await import("../config-2O6S2YJO.js");
611
+ const { rebuildAllIndexes } = await import("../indexer-L5UC6J2V.js");
612
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
614
613
  const dir = resolve(opts.dir);
615
614
  let extDirs = [];
616
615
  try {
@@ -623,7 +622,7 @@ program.command("index").description("Rebuild all index files").option("-d, --di
623
622
  console.log(`\u2713 All indexes rebuilt in ${dir}`);
624
623
  });
625
624
  program.command("process").description("Auto-process all primitives: fill missing frontmatter and generate L0/L1 summaries").option("-d, --dir <path>", "Harness directory", ".").option("--no-frontmatter", "Skip frontmatter generation").option("--no-summaries", "Skip L0/L1 summary generation").action(async (opts) => {
626
- const { autoProcessAll } = await import("../auto-processor-SDAJF67T.js");
625
+ const { autoProcessAll } = await import("../auto-processor-QIRUOGEI.js");
627
626
  const dir = resolve(opts.dir);
628
627
  requireHarness(dir);
629
628
  const results = autoProcessAll(dir, {
@@ -649,8 +648,8 @@ Processed ${modified} file(s)${errors > 0 ? `, ${errors} error(s)` : ""}`);
649
648
  }
650
649
  });
651
650
  program.command("system").description("Regenerate SYSTEM.md from current directory structure").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
652
- const { loadConfig } = await import("../config-2O6S2YJO.js");
653
- const { generateSystemMd } = await import("../scaffold-ZY4XWINP.js");
651
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
652
+ const { generateSystemMd } = await import("../scaffold-2F36YVW6.js");
654
653
  const { writeFileSync } = await import("fs");
655
654
  const dir = resolve(opts.dir);
656
655
  requireHarness(dir);
@@ -665,7 +664,7 @@ program.command("journal").description("Synthesize sessions into journal entries
665
664
  loadEnvFromDir(dir);
666
665
  requireHarness(dir);
667
666
  if (opts.pending) {
668
- const { listUnjournaled } = await import("../journal-KN265YLU.js");
667
+ const { listUnjournaled } = await import("../journal-ITUMKT6U.js");
669
668
  const dates = listUnjournaled(dir);
670
669
  if (dates.length === 0) {
671
670
  console.log("All sessions have been journaled.");
@@ -681,7 +680,7 @@ Run "harness journal --all" to synthesize them.
681
680
  return;
682
681
  }
683
682
  if (opts.from || opts.all) {
684
- const { synthesizeJournalRange } = await import("../journal-KN265YLU.js");
683
+ const { synthesizeJournalRange } = await import("../journal-ITUMKT6U.js");
685
684
  try {
686
685
  const label = opts.all ? "all dates" : `${opts.from}${opts.to ? ` to ${opts.to}` : " to today"}`;
687
686
  console.log(`Synthesizing journals for ${label}${opts.force ? " (force)" : ""}...`);
@@ -705,7 +704,7 @@ Run "harness journal --all" to synthesize them.
705
704
  }
706
705
  console.log();
707
706
  if (opts.autoHarvest) {
708
- const { harvestInstincts } = await import("../instinct-learner-CWVMLUWX.js");
707
+ const { harvestInstincts } = await import("../instinct-learner-QGAMIS3X.js");
709
708
  const dates = entries.map((e) => e.date).sort();
710
709
  const harvest = harvestInstincts(dir, {
711
710
  from: dates[0],
@@ -724,7 +723,7 @@ Run "harness journal --all" to synthesize them.
724
723
  }
725
724
  return;
726
725
  }
727
- const { synthesizeJournal } = await import("../journal-KN265YLU.js");
726
+ const { synthesizeJournal } = await import("../journal-ITUMKT6U.js");
728
727
  try {
729
728
  console.log(`Synthesizing journal...`);
730
729
  const entry = await synthesizeJournal(dir, opts.date);
@@ -736,7 +735,7 @@ Run "harness journal --all" to synthesize them.
736
735
  console.log(` Instinct candidates:`);
737
736
  entry.instinct_candidates.forEach((c) => console.log(` - ${c}`));
738
737
  if (opts.autoHarvest) {
739
- const { harvestInstincts } = await import("../instinct-learner-CWVMLUWX.js");
738
+ const { harvestInstincts } = await import("../instinct-learner-QGAMIS3X.js");
740
739
  const harvest = harvestInstincts(dir, {
741
740
  from: entry.date,
742
741
  to: entry.date,
@@ -756,7 +755,7 @@ ${entry.synthesis}`);
756
755
  }
757
756
  });
758
757
  program.command("compress").description("Compress daily journals into weekly roll-up summaries").option("-d, --dir <path>", "Harness directory", ".").option("--force", "Overwrite existing weekly summaries", false).action(async (opts) => {
759
- const { compressJournals } = await import("../journal-KN265YLU.js");
758
+ const { compressJournals } = await import("../journal-ITUMKT6U.js");
760
759
  const dir = resolve(opts.dir);
761
760
  requireHarness(dir);
762
761
  const results = compressJournals(dir, { force: opts.force });
@@ -776,7 +775,7 @@ program.command("compress").description("Compress daily journals into weekly rol
776
775
  console.log();
777
776
  });
778
777
  program.command("learn").description("Analyze sessions and propose new instincts").option("-d, --dir <path>", "Harness directory", ".").option("--install", "Auto-install proposed instincts", false).action(async (opts) => {
779
- const { learnFromSessions } = await import("../instinct-learner-CWVMLUWX.js");
778
+ const { learnFromSessions } = await import("../instinct-learner-QGAMIS3X.js");
780
779
  const dir = resolve(opts.dir);
781
780
  requireHarness(dir);
782
781
  try {
@@ -802,7 +801,7 @@ ${result.candidates.length} instinct candidate(s):
802
801
  }
803
802
  });
804
803
  program.command("harvest").description("Extract instinct candidates from journal entries and optionally install them").option("-d, --dir <path>", "Harness directory", ".").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--install", "Auto-install candidates as draft instincts", false).action(async (opts) => {
805
- const { harvestInstincts } = await import("../instinct-learner-CWVMLUWX.js");
804
+ const { harvestInstincts } = await import("../instinct-learner-QGAMIS3X.js");
806
805
  const dir = resolve(opts.dir);
807
806
  requireHarness(dir);
808
807
  const result = harvestInstincts(dir, {
@@ -832,7 +831,7 @@ Scanned ${result.journalsScanned} journal(s)`);
832
831
  }
833
832
  });
834
833
  program.command("intake").description("Process all pending files in the intake/ directory").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
835
- const { processIntake } = await import("../intake-M5NRR6QR.js");
834
+ const { processIntake } = await import("../intake-SVJKFHTL.js");
836
835
  const dir = resolve(opts.dir);
837
836
  const results = processIntake(dir);
838
837
  if (results.length === 0) {
@@ -848,7 +847,7 @@ program.command("intake").description("Process all pending files in the intake/
848
847
  }
849
848
  });
850
849
  program.command("validate").description("Validate harness structure and configuration").option("-d, --dir <path>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
851
- const { validateHarness } = await import("../validator-LZXBFEPV.js");
850
+ const { validateHarness } = await import("../validator-LM7RZWSH.js");
852
851
  const dir = resolve(opts.dir);
853
852
  const result = validateHarness(dir);
854
853
  if (opts.json) {
@@ -885,7 +884,7 @@ Summary: ${result.ok.length} passed, ${result.warnings.length} warnings, ${resul
885
884
  }
886
885
  });
887
886
  program.command("doctor").description("Validate harness and auto-fix all fixable issues in one pass").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
888
- const { doctorHarness } = await import("../validator-LZXBFEPV.js");
887
+ const { doctorHarness } = await import("../validator-LM7RZWSH.js");
889
888
  const dir = resolve(opts.dir);
890
889
  console.log(`
891
890
  Running doctor on: ${dir}
@@ -925,7 +924,7 @@ Summary: ${result.ok.length} ok, ${result.warnings.length} warnings, ${result.er
925
924
  }
926
925
  });
927
926
  program.command("fix <file>").description("Auto-fix common issues in a capability markdown file (missing id, status, L0/L1)").action(async (file) => {
928
- const { fixCapability } = await import("../intake-M5NRR6QR.js");
927
+ const { fixCapability } = await import("../intake-SVJKFHTL.js");
929
928
  const filePath = resolve(file);
930
929
  const result = fixCapability(filePath);
931
930
  if (result.fixes_applied.length > 0) {
@@ -951,14 +950,14 @@ Remaining errors (manual fix required):`);
951
950
  }
952
951
  });
953
952
  program.command("cleanup").description("Archive sessions and journals older than retention period").option("-d, --dir <path>", "Harness directory", ".").option("--dry-run", "Show what would be archived without acting", false).option("--delete", "Permanently delete instead of archiving", false).action(async (opts) => {
954
- const { loadConfig } = await import("../config-2O6S2YJO.js");
953
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
955
954
  const dir = resolve(opts.dir);
956
955
  requireHarness(dir);
957
956
  const config = loadConfig(dir);
958
957
  const sessionDays = config.memory.session_retention_days;
959
958
  const journalDays = config.memory.journal_retention_days;
960
959
  if (opts.dryRun) {
961
- const { listExpiredFiles } = await import("../sessions-CZGVXKQE.js");
960
+ const { listExpiredFiles } = await import("../sessions-G6SZZXWS.js");
962
961
  const expired = listExpiredFiles(dir, sessionDays, journalDays);
963
962
  const action = opts.delete ? "delete" : "archive";
964
963
  console.log(`
@@ -971,7 +970,7 @@ Dry run \u2014 retention policy (sessions: ${sessionDays}d, journals: ${journalD
971
970
  return;
972
971
  }
973
972
  if (opts.delete) {
974
- const { cleanupOldFiles } = await import("../sessions-CZGVXKQE.js");
973
+ const { cleanupOldFiles } = await import("../sessions-G6SZZXWS.js");
975
974
  const result = cleanupOldFiles(dir, sessionDays, journalDays);
976
975
  console.log(`
977
976
  Deleted ${result.sessionsRemoved} session(s), ${result.journalsRemoved} journal(s)`);
@@ -982,7 +981,7 @@ Deleted ${result.sessionsRemoved} session(s), ${result.journalsRemoved} journal(
982
981
  result.journalFiles.forEach((f) => console.log(` - ${f}`));
983
982
  }
984
983
  } else {
985
- const { archiveOldFiles } = await import("../sessions-CZGVXKQE.js");
984
+ const { archiveOldFiles } = await import("../sessions-G6SZZXWS.js");
986
985
  const result = archiveOldFiles(dir, sessionDays, journalDays);
987
986
  console.log(`
988
987
  Archived ${result.sessionsArchived} session(s), ${result.journalsArchived} journal(s)`);
@@ -999,10 +998,10 @@ Archived ${result.sessionsArchived} session(s), ${result.journalsArchived} journ
999
998
  });
1000
999
  program.command("status").description("Show harness status: primitives, sessions, config, state").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
1001
1000
  const { existsSync: existsSync2, readdirSync } = await import("fs");
1002
- const { validateHarness } = await import("../validator-LZXBFEPV.js");
1003
- const { loadConfig } = await import("../config-2O6S2YJO.js");
1004
- const { loadState } = await import("../state-GMXILIHW.js");
1005
- const { listSessions } = await import("../sessions-CZGVXKQE.js");
1001
+ const { validateHarness } = await import("../validator-LM7RZWSH.js");
1002
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
1003
+ const { loadState } = await import("../state-25IQEC5C.js");
1004
+ const { listSessions } = await import("../sessions-G6SZZXWS.js");
1006
1005
  const dir = resolve(opts.dir);
1007
1006
  requireHarness(dir);
1008
1007
  const config = loadConfig(dir);
@@ -1118,7 +1117,7 @@ program.command("scratch").description("Write a note to scratch.md (working memo
1118
1117
  });
1119
1118
  var workflowCmd = program.command("workflow").description("Manage workflows");
1120
1119
  workflowCmd.command("list").description("List all workflows and their schedules").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
1121
- const { loadDirectory } = await import("../loader-BOCVXVCH.js");
1120
+ const { loadDirectory } = await import("../loader-27PLDCOJ.js");
1122
1121
  const dir = resolve(opts.dir);
1123
1122
  requireHarness(dir);
1124
1123
  const workflowDir = join(dir, "workflows");
@@ -1145,7 +1144,7 @@ ${docs.length} workflow(s):
1145
1144
  console.log();
1146
1145
  });
1147
1146
  workflowCmd.command("run <id>").description("Execute a workflow by ID (bypasses quiet hours)").option("-d, --dir <path>", "Harness directory", ".").action(async (workflowId, opts) => {
1148
- const { Scheduler } = await import("../scheduler-TYOQKO4C.js");
1147
+ const { Scheduler } = await import("../scheduler-Q7GB2KCW.js");
1149
1148
  const dir = resolve(opts.dir);
1150
1149
  loadEnvFromDir(dir);
1151
1150
  requireHarness(dir);
@@ -1174,8 +1173,8 @@ Executing workflow: ${workflowId}...`);
1174
1173
  }
1175
1174
  });
1176
1175
  program.command("search [query]").description("Search primitives by text query and/or filters").option("-d, --dir <path>", "Harness directory", ".").option("-t, --tag <tag>", "Filter by tag").option("--type <type>", "Filter by primitive type (e.g., rules, skills)").option("--status <status>", "Filter by status (active, draft, archived, deprecated)").option("--author <author>", "Filter by author (human, agent, infrastructure)").option("--json", "Output as JSON").action(async (query, opts) => {
1177
- const { searchPrimitives } = await import("../search-4IYM525O.js");
1178
- const { loadConfig } = await import("../config-2O6S2YJO.js");
1176
+ const { searchPrimitives } = await import("../search-6Y6NCOLQ.js");
1177
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
1179
1178
  const dir = resolve(opts.dir);
1180
1179
  requireHarness(dir);
1181
1180
  let config;
@@ -1222,7 +1221,7 @@ ${results.length} result(s):
1222
1221
  });
1223
1222
  var configCmd = program.command("config").description("Show or inspect configuration");
1224
1223
  configCmd.command("show").description("Show full resolved configuration (merged defaults + file + env)").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
1225
- const { loadConfig } = await import("../config-2O6S2YJO.js");
1224
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
1226
1225
  const YAML = await import("yaml");
1227
1226
  const dir = resolve(opts.dir);
1228
1227
  requireHarness(dir);
@@ -1239,7 +1238,7 @@ configCmd.command("show").description("Show full resolved configuration (merged
1239
1238
  }
1240
1239
  });
1241
1240
  configCmd.command("get <key>").description("Get a specific config value (dot-notation, e.g. model.id)").option("-d, --dir <path>", "Harness directory", ".").action(async (key, opts) => {
1242
- const { loadConfig } = await import("../config-2O6S2YJO.js");
1241
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
1243
1242
  const dir = resolve(opts.dir);
1244
1243
  requireHarness(dir);
1245
1244
  try {
@@ -1289,7 +1288,7 @@ configCmd.command("set <key> <value>").description("Set a config value (writes t
1289
1288
  const parts = key.split(".");
1290
1289
  doc.setIn(parts, parsed);
1291
1290
  writeFileSync(configPath, doc.toString(), "utf-8");
1292
- const { loadConfig } = await import("../config-2O6S2YJO.js");
1291
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
1293
1292
  try {
1294
1293
  loadConfig(dir);
1295
1294
  console.log(`\u2713 ${key} = ${String(parsed)}`);
@@ -1304,7 +1303,7 @@ configCmd.command("set <key> <value>").description("Set a config value (writes t
1304
1303
  });
1305
1304
  var metricsCmd = program.command("metrics").description("View workflow execution metrics and stats");
1306
1305
  metricsCmd.command("show").description("Show stats for all workflows (default)").option("-d, --dir <path>", "Harness directory", ".").option("--workflow <id>", "Show stats for a specific workflow").action(async (opts) => {
1307
- const { getAllWorkflowStats, getWorkflowStats } = await import("../metrics-KXGNFAAB.js");
1306
+ const { getAllWorkflowStats, getWorkflowStats } = await import("../metrics-2MNINXNQ.js");
1308
1307
  const dir = resolve(opts.dir);
1309
1308
  requireHarness(dir);
1310
1309
  if (opts.workflow) {
@@ -1348,7 +1347,7 @@ ${allStats.length} workflow(s) with metrics:
1348
1347
  console.log();
1349
1348
  });
1350
1349
  metricsCmd.command("clear").description("Clear metrics for a specific workflow or all workflows").option("-d, --dir <path>", "Harness directory", ".").option("--workflow <id>", "Clear only this workflow (clears all if omitted)").action(async (opts) => {
1351
- const { clearMetrics } = await import("../metrics-KXGNFAAB.js");
1350
+ const { clearMetrics } = await import("../metrics-2MNINXNQ.js");
1352
1351
  const dir = resolve(opts.dir);
1353
1352
  requireHarness(dir);
1354
1353
  const removed = clearMetrics(dir, opts.workflow);
@@ -1359,7 +1358,7 @@ metricsCmd.command("clear").description("Clear metrics for a specific workflow o
1359
1358
  }
1360
1359
  });
1361
1360
  metricsCmd.command("history").description("Show recent workflow run history").option("-d, --dir <path>", "Harness directory", ".").option("--workflow <id>", "Filter by workflow ID").option("-n, --limit <count>", "Number of recent runs to show", "10").action(async (opts) => {
1362
- const { loadMetrics } = await import("../metrics-KXGNFAAB.js");
1361
+ const { loadMetrics } = await import("../metrics-2MNINXNQ.js");
1363
1362
  const dir = resolve(opts.dir);
1364
1363
  requireHarness(dir);
1365
1364
  const store = loadMetrics(dir);
@@ -1396,7 +1395,7 @@ function formatDuration(ms) {
1396
1395
  }
1397
1396
  var toolsCmd = program.command("tools").description("List and inspect tool definitions");
1398
1397
  toolsCmd.command("list").description("List all defined tools with auth status").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
1399
- const { listToolSummaries } = await import("../tools-EB3BHRRF.js");
1398
+ const { listToolSummaries } = await import("../tools-NDFJNVHK.js");
1400
1399
  const dir = resolve(opts.dir);
1401
1400
  requireHarness(dir);
1402
1401
  const tools = listToolSummaries(dir);
@@ -1417,7 +1416,7 @@ ${tools.length} tool(s):
1417
1416
  console.log();
1418
1417
  });
1419
1418
  toolsCmd.command("show <id>").description("Show detailed info for a specific tool").option("-d, --dir <path>", "Harness directory", ".").action(async (toolId, opts) => {
1420
- const { getToolById } = await import("../tools-EB3BHRRF.js");
1419
+ const { getToolById } = await import("../tools-NDFJNVHK.js");
1421
1420
  const dir = resolve(opts.dir);
1422
1421
  requireHarness(dir);
1423
1422
  const tool = getToolById(dir, toolId);
@@ -1461,7 +1460,7 @@ Tool: ${tool.id}`);
1461
1460
  console.log();
1462
1461
  });
1463
1462
  toolsCmd.command("auth").description("Check auth status for all tools").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
1464
- const { checkToolAuth } = await import("../tools-EB3BHRRF.js");
1463
+ const { checkToolAuth } = await import("../tools-NDFJNVHK.js");
1465
1464
  const dir = resolve(opts.dir);
1466
1465
  requireHarness(dir);
1467
1466
  const results = checkToolAuth(dir);
@@ -1485,7 +1484,7 @@ toolsCmd.command("auth").description("Check auth status for all tools").option("
1485
1484
  console.log();
1486
1485
  });
1487
1486
  program.command("export [output]").description("Export harness to a portable JSON bundle").option("-d, --dir <path>", "Harness directory", ".").option("--no-sessions", "Exclude session files").option("--no-journals", "Exclude journal files").option("--no-metrics", "Exclude metrics").option("--no-state", "Exclude state and scratch").action(async (output, opts) => {
1488
- const { exportHarness, writeBundle } = await import("../export-2HEAAOUF.js");
1487
+ const { exportHarness, writeBundle } = await import("../export-GYLWROMB.js");
1489
1488
  const dir = resolve(opts.dir);
1490
1489
  requireHarness(dir);
1491
1490
  const bundle = exportHarness(dir, {
@@ -1503,7 +1502,7 @@ Exported "${bundle.agent_name}" to ${outputPath}`);
1503
1502
  `);
1504
1503
  });
1505
1504
  program.command("import <bundle>").description("Import a harness bundle into current directory").option("-d, --dir <path>", "Harness directory", ".").option("--overwrite", "Overwrite existing files", false).action(async (bundlePath, opts) => {
1506
- const { readBundle, importBundle } = await import("../export-2HEAAOUF.js");
1505
+ const { readBundle, importBundle } = await import("../export-GYLWROMB.js");
1507
1506
  const dir = resolve(opts.dir);
1508
1507
  try {
1509
1508
  const bundle = readBundle(resolve(bundlePath));
@@ -1527,7 +1526,7 @@ Importing bundle: "${bundle.agent_name}" (exported ${bundle.exported_at})`);
1527
1526
  }
1528
1527
  });
1529
1528
  program.command("bundle <output>").description("Pack primitives into a shareable bundle with manifest.yaml").option("-d, --dir <path>", "Harness directory", ".").option("-n, --name <name>", "Bundle name").option("--description <text>", "Bundle description", "").option("--author <name>", "Author name").option("--version <ver>", "Bundle version", "1.0.0").option("-t, --types <types...>", "Primitive types to include (e.g., rules instincts)").option("-f, --files <files...>", "Specific files to include (relative paths)").option("--tags <tags...>", "Tags for search/discovery").option("--license <id>", "License identifier (e.g., MIT)").option("--json", "Output as JSON", false).action(async (output, opts) => {
1530
- const { packBundle, writeBundleDir } = await import("../primitive-registry-HOJMUFBT.js");
1529
+ const { packBundle, writeBundleDir } = await import("../primitive-registry-ZMGGXSO5.js");
1531
1530
  const dir = resolve(opts.dir);
1532
1531
  requireHarness(dir);
1533
1532
  const bundleName = opts.name ?? basename(dir);
@@ -1555,8 +1554,8 @@ Bundled "${bundleName}" v${opts.version}`);
1555
1554
  }
1556
1555
  });
1557
1556
  program.command("bundle-install <source>").description("Install primitives from a bundle directory, JSON file, or URL").option("-d, --dir <path>", "Harness directory", ".").option("--overwrite", "Overwrite existing files", false).option("--force", "Skip dependency checks", false).option("--json", "Output as JSON", false).action(async (source, opts) => {
1558
- const { readBundleDir, installBundle, fetchRemoteBundle } = await import("../primitive-registry-HOJMUFBT.js");
1559
- const { readBundle } = await import("../export-2HEAAOUF.js");
1557
+ const { readBundleDir, installBundle, fetchRemoteBundle } = await import("../primitive-registry-ZMGGXSO5.js");
1558
+ const { readBundle } = await import("../export-GYLWROMB.js");
1560
1559
  const dir = resolve(opts.dir);
1561
1560
  try {
1562
1561
  let bundle;
@@ -1569,7 +1568,7 @@ program.command("bundle-install <source>").description("Install primitives from
1569
1568
  bundle = readBundleDir(sourcePath);
1570
1569
  } else if (source.endsWith(".json")) {
1571
1570
  const jsonBundle = readBundle(sourcePath);
1572
- const { CORE_PRIMITIVE_DIRS } = await import("../types-NYKB2DN3.js");
1571
+ const { CORE_PRIMITIVE_DIRS } = await import("../types-NPJZAI72.js");
1573
1572
  const files = jsonBundle.entries;
1574
1573
  const types = /* @__PURE__ */ new Set();
1575
1574
  for (const entry of files) {
@@ -1622,7 +1621,7 @@ Installation failed:`);
1622
1621
  }
1623
1622
  });
1624
1623
  program.command("uninstall <bundle-name>").description("Uninstall a previously installed bundle (moves files to archive/)").option("-d, --dir <path>", "Harness directory", ".").option("--hard", "Permanently delete files instead of archiving", false).option("--json", "Output as JSON", false).action(async (bundleName, opts) => {
1625
- const { uninstallBundle } = await import("../primitive-registry-HOJMUFBT.js");
1624
+ const { uninstallBundle } = await import("../primitive-registry-ZMGGXSO5.js");
1626
1625
  const dir = resolve(opts.dir);
1627
1626
  requireHarness(dir);
1628
1627
  const result = uninstallBundle(dir, bundleName, { hard: opts.hard });
@@ -1646,7 +1645,7 @@ Uninstall failed:`);
1646
1645
  }
1647
1646
  });
1648
1647
  program.command("update <source>").description("Update an installed bundle from a new version").option("-d, --dir <path>", "Harness directory", ".").option("--remove-deleted", "Archive files removed in new version", false).option("--json", "Output as JSON", false).action(async (source, opts) => {
1649
- const { readBundleDir, diffBundle, updateBundle, fetchRemoteBundle } = await import("../primitive-registry-HOJMUFBT.js");
1648
+ const { readBundleDir, diffBundle, updateBundle, fetchRemoteBundle } = await import("../primitive-registry-ZMGGXSO5.js");
1650
1649
  const dir = resolve(opts.dir);
1651
1650
  requireHarness(dir);
1652
1651
  try {
@@ -1705,7 +1704,7 @@ Update "${bundle.manifest.name}" to v${bundle.manifest.bundle_version}:`);
1705
1704
  }
1706
1705
  });
1707
1706
  program.command("installed").description("List installed bundles").option("-d, --dir <path>", "Harness directory", ".").option("--json", "Output as JSON", false).action(async (opts) => {
1708
- const { listInstalledBundles } = await import("../primitive-registry-HOJMUFBT.js");
1707
+ const { listInstalledBundles } = await import("../primitive-registry-ZMGGXSO5.js");
1709
1708
  const dir = resolve(opts.dir);
1710
1709
  requireHarness(dir);
1711
1710
  const bundles = listInstalledBundles(dir);
@@ -1728,8 +1727,8 @@ ${bundles.length} bundle(s) installed:
1728
1727
  });
1729
1728
  var registryCmd = program.command("registry").description("Search and install bundles from configured registries");
1730
1729
  registryCmd.command("search <query>").description("Search all configured registries for bundles").option("-d, --dir <path>", "Harness directory", ".").option("--limit <n>", "Max results", "20").option("--json", "Output as JSON", false).action(async (query, opts) => {
1731
- const { searchConfiguredRegistries } = await import("../primitive-registry-HOJMUFBT.js");
1732
- const { loadConfig } = await import("../config-2O6S2YJO.js");
1730
+ const { searchConfiguredRegistries } = await import("../primitive-registry-ZMGGXSO5.js");
1731
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
1733
1732
  const dir = resolve(opts.dir);
1734
1733
  requireHarness(dir);
1735
1734
  const config = loadConfig(dir);
@@ -1770,8 +1769,8 @@ Searched ${result.registriesSearched} registry(ies) for "${query}"
1770
1769
  }
1771
1770
  });
1772
1771
  registryCmd.command("install <bundle-name>").description("Install a bundle from configured registries").option("-d, --dir <path>", "Harness directory", ".").option("--version <ver>", "Specific version to install").option("--overwrite", "Overwrite existing files", false).option("--force", "Skip dependency checks", false).option("--json", "Output as JSON", false).action(async (bundleName, opts) => {
1773
- const { installFromRegistry } = await import("../primitive-registry-HOJMUFBT.js");
1774
- const { loadConfig } = await import("../config-2O6S2YJO.js");
1772
+ const { installFromRegistry } = await import("../primitive-registry-ZMGGXSO5.js");
1773
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
1775
1774
  const dir = resolve(opts.dir);
1776
1775
  requireHarness(dir);
1777
1776
  const config = loadConfig(dir);
@@ -1813,7 +1812,7 @@ Installation failed:`);
1813
1812
  }
1814
1813
  });
1815
1814
  registryCmd.command("list").description("List configured registries").option("-d, --dir <path>", "Harness directory", ".").option("--json", "Output as JSON", false).action(async (opts) => {
1816
- const { loadConfig } = await import("../config-2O6S2YJO.js");
1815
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
1817
1816
  const dir = resolve(opts.dir);
1818
1817
  requireHarness(dir);
1819
1818
  const config = loadConfig(dir);
@@ -1842,8 +1841,8 @@ ${registries.length} registry(ies) configured:
1842
1841
  console.log();
1843
1842
  });
1844
1843
  program.command("graph").description("Analyze primitive dependency graph (related:/with: fields)").option("-d, --dir <path>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
1845
- const { buildDependencyGraph, getGraphStats } = await import("../graph-5MKRTC3J.js");
1846
- const { loadConfig } = await import("../config-2O6S2YJO.js");
1844
+ const { buildDependencyGraph, getGraphStats } = await import("../graph-LEEO37L3.js");
1845
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
1847
1846
  const dir = resolve(opts.dir);
1848
1847
  requireHarness(dir);
1849
1848
  let config;
@@ -1898,7 +1897,7 @@ Dependency Graph
1898
1897
  console.log();
1899
1898
  });
1900
1899
  program.command("analytics").description("Show session analytics and usage patterns").option("-d, --dir <path>", "Harness directory", ".").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--json", "Output as JSON").action(async (opts) => {
1901
- const { getSessionAnalytics, getSessionsInRange } = await import("../analytics-RPT73WNM.js");
1900
+ const { getSessionAnalytics, getSessionsInRange } = await import("../analytics-L24W3B7U.js");
1902
1901
  const dir = resolve(opts.dir);
1903
1902
  requireHarness(dir);
1904
1903
  if (opts.from || opts.to) {
@@ -1970,7 +1969,7 @@ Session Analytics
1970
1969
  console.log();
1971
1970
  });
1972
1971
  program.command("auto-promote").description("Find instinct patterns appearing 3+ times across journals and optionally install them").option("-d, --dir <path>", "Harness directory", ".").option("--threshold <n>", "Minimum occurrences across different dates", "3").option("--install", "Auto-install promoted instincts", false).option("--json", "Output as JSON", false).action(async (opts) => {
1973
- const { autoPromoteInstincts } = await import("../intelligence-UW4TCOC7.js");
1972
+ const { autoPromoteInstincts } = await import("../intelligence-XPV3MC5U.js");
1974
1973
  const dir = resolve(opts.dir);
1975
1974
  requireHarness(dir);
1976
1975
  const result = autoPromoteInstincts(dir, {
@@ -2004,8 +2003,8 @@ function behaviorToCliId(behavior) {
2004
2003
  return behavior.toLowerCase().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").slice(0, 50).replace(/-+$/, "");
2005
2004
  }
2006
2005
  program.command("dead-primitives").description("Detect orphaned primitives not modified in 30+ days").option("-d, --dir <path>", "Harness directory", ".").option("--days <n>", "Threshold days since last modification", "30").option("--json", "Output as JSON", false).action(async (opts) => {
2007
- const { detectDeadPrimitives } = await import("../intelligence-UW4TCOC7.js");
2008
- const { loadConfig } = await import("../config-2O6S2YJO.js");
2006
+ const { detectDeadPrimitives } = await import("../intelligence-XPV3MC5U.js");
2007
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
2009
2008
  const dir = resolve(opts.dir);
2010
2009
  requireHarness(dir);
2011
2010
  let config;
@@ -2037,7 +2036,7 @@ Scanned ${result.totalScanned} primitive(s) (threshold: ${result.thresholdDays}
2037
2036
  }
2038
2037
  });
2039
2038
  program.command("contradictions").description("Detect contradictions between rules and instincts").option("-d, --dir <path>", "Harness directory", ".").option("--json", "Output as JSON", false).action(async (opts) => {
2040
- const { detectContradictions } = await import("../intelligence-UW4TCOC7.js");
2039
+ const { detectContradictions } = await import("../intelligence-XPV3MC5U.js");
2041
2040
  const dir = resolve(opts.dir);
2042
2041
  requireHarness(dir);
2043
2042
  const result = detectContradictions(dir);
@@ -2062,8 +2061,8 @@ Checked ${result.rulesChecked} rule(s) and ${result.instinctsChecked} instinct(s
2062
2061
  }
2063
2062
  });
2064
2063
  program.command("enrich").description("Enrich sessions with extracted topics, tools, and primitive references").option("-d, --dir <path>", "Harness directory", ".").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--json", "Output as JSON", false).action(async (opts) => {
2065
- const { enrichSessions } = await import("../intelligence-UW4TCOC7.js");
2066
- const { loadConfig } = await import("../config-2O6S2YJO.js");
2064
+ const { enrichSessions } = await import("../intelligence-XPV3MC5U.js");
2065
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
2067
2066
  const dir = resolve(opts.dir);
2068
2067
  requireHarness(dir);
2069
2068
  let config;
@@ -2094,8 +2093,8 @@ Enriched ${result.sessionsScanned} session(s)
2094
2093
  }
2095
2094
  });
2096
2095
  program.command("suggest").description("Suggest capabilities (skills/playbooks) for frequent uncovered session topics").option("-d, --dir <path>", "Harness directory", ".").option("--min-frequency <n>", "Minimum topic frequency", "3").option("--json", "Output as JSON", false).action(async (opts) => {
2097
- const { suggestCapabilities } = await import("../intelligence-UW4TCOC7.js");
2098
- const { loadConfig } = await import("../config-2O6S2YJO.js");
2096
+ const { suggestCapabilities } = await import("../intelligence-XPV3MC5U.js");
2097
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
2099
2098
  const dir = resolve(opts.dir);
2100
2099
  requireHarness(dir);
2101
2100
  let config;
@@ -2127,7 +2126,7 @@ Analyzed ${result.topicsAnalyzed} topic(s) from ${result.sessionsScanned} sessio
2127
2126
  }
2128
2127
  });
2129
2128
  program.command("agents").description("List available sub-agents").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
2130
- const { listAgents } = await import("../delegate-ZJCIADNN.js");
2129
+ const { listAgents } = await import("../delegate-3KJAL4NZ.js");
2131
2130
  const dir = resolve(opts.dir);
2132
2131
  const agents = listAgents(dir);
2133
2132
  if (agents.length === 0) {
@@ -2160,7 +2159,7 @@ program.command("delegate <agent-id> <prompt>").description("Delegate a prompt t
2160
2159
  try {
2161
2160
  console.error(`[delegate] Invoking agent "${agentId}"${opts.stream ? " (streaming)" : ""}...`);
2162
2161
  if (opts.stream) {
2163
- const { delegateStream } = await import("../delegate-ZJCIADNN.js");
2162
+ const { delegateStream } = await import("../delegate-3KJAL4NZ.js");
2164
2163
  const result = delegateStream(delegateOpts);
2165
2164
  process.stdout.write("\n");
2166
2165
  for await (const chunk of result.textStream) {
@@ -2171,7 +2170,7 @@ program.command("delegate <agent-id> <prompt>").description("Delegate a prompt t
2171
2170
  `[delegate] Agent: ${result.agentId} | session: ${result.sessionId}`
2172
2171
  );
2173
2172
  } else {
2174
- const { delegateTo } = await import("../delegate-ZJCIADNN.js");
2173
+ const { delegateTo } = await import("../delegate-3KJAL4NZ.js");
2175
2174
  const result = await delegateTo(delegateOpts);
2176
2175
  console.log("\n" + result.text + "\n");
2177
2176
  console.error(
@@ -2185,7 +2184,7 @@ program.command("delegate <agent-id> <prompt>").description("Delegate a prompt t
2185
2184
  });
2186
2185
  var costsCmd = program.command("costs").description("View and manage API spending");
2187
2186
  costsCmd.command("show").description("Show spending summary (default: today)").option("-d, --dir <path>", "Harness directory", ".").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--json", "Output as JSON").action(async (opts) => {
2188
- const { getSpending } = await import("../cost-tracker-RS3W7SVY.js");
2187
+ const { getSpending } = await import("../cost-tracker-NZRZEHVA.js");
2189
2188
  const dir = resolve(opts.dir);
2190
2189
  requireHarness(dir);
2191
2190
  const summary = getSpending(dir, opts.from, opts.to);
@@ -2225,7 +2224,7 @@ Spending \u2014 ${label}
2225
2224
  console.log();
2226
2225
  });
2227
2226
  costsCmd.command("budget").description("Check spending against budget limits").option("-d, --dir <path>", "Harness directory", ".").option("--daily <usd>", "Daily budget limit in USD").option("--monthly <usd>", "Monthly budget limit in USD").action(async (opts) => {
2228
- const { checkBudget } = await import("../cost-tracker-RS3W7SVY.js");
2227
+ const { checkBudget } = await import("../cost-tracker-NZRZEHVA.js");
2229
2228
  const dir = resolve(opts.dir);
2230
2229
  requireHarness(dir);
2231
2230
  const dailyLimit = opts.daily ? parseFloat(opts.daily) : void 0;
@@ -2265,7 +2264,7 @@ costsCmd.command("budget").description("Check spending against budget limits").o
2265
2264
  }
2266
2265
  });
2267
2266
  costsCmd.command("clear").description("Clear all cost records").option("-d, --dir <path>", "Harness directory", ".").option("--model <id>", "Clear only entries for this model").action(async (opts) => {
2268
- const { clearCosts } = await import("../cost-tracker-RS3W7SVY.js");
2267
+ const { clearCosts } = await import("../cost-tracker-NZRZEHVA.js");
2269
2268
  const dir = resolve(opts.dir);
2270
2269
  requireHarness(dir);
2271
2270
  const removed = clearCosts(dir, opts.model);
@@ -2276,7 +2275,7 @@ costsCmd.command("clear").description("Clear all cost records").option("-d, --di
2276
2275
  }
2277
2276
  });
2278
2277
  program.command("health").description("Show system health status and metrics").option("-d, --dir <path>", "Harness directory", ".").option("--reset", "Reset health metrics", false).option("--json", "Output as JSON").action(async (opts) => {
2279
- const { getHealthStatus, resetHealth } = await import("../health-NZ6WNIMV.js");
2278
+ const { getHealthStatus, resetHealth } = await import("../health-HL2JYHIY.js");
2280
2279
  const dir = resolve(opts.dir);
2281
2280
  requireHarness(dir);
2282
2281
  if (opts.reset) {
@@ -2325,7 +2324,7 @@ Health: ${statusIcon} (${health.status})
2325
2324
  });
2326
2325
  var rateLimitCmd = program.command("ratelimit").description("View and manage rate limit state");
2327
2326
  rateLimitCmd.command("status").description("Show current rate limit usage for a key").argument("<key>", "Rate limit key (e.g., tool:github, model:claude)").option("-d, --dir <path>", "Harness directory", ".").option("--window <ms>", "Window size in ms", "3600000").action(async (key, opts) => {
2328
- const { getUsage } = await import("../rate-limiter-RLRVM325.js");
2327
+ const { getUsage } = await import("../rate-limiter-PH5DCVU4.js");
2329
2328
  const dir = resolve(opts.dir);
2330
2329
  requireHarness(dir);
2331
2330
  const windowMs = parseInt(opts.window, 10) || 36e5;
@@ -2344,7 +2343,7 @@ Rate limit: ${key} (${windowLabel} window)
2344
2343
  console.log();
2345
2344
  });
2346
2345
  rateLimitCmd.command("clear").description("Clear rate limit events").option("-d, --dir <path>", "Harness directory", ".").option("--key <key>", "Clear only this key (clears all if omitted)").action(async (opts) => {
2347
- const { clearRateLimits } = await import("../rate-limiter-RLRVM325.js");
2346
+ const { clearRateLimits } = await import("../rate-limiter-PH5DCVU4.js");
2348
2347
  const dir = resolve(opts.dir);
2349
2348
  requireHarness(dir);
2350
2349
  const removed = clearRateLimits(dir, opts.key);
@@ -2356,8 +2355,8 @@ rateLimitCmd.command("clear").description("Clear rate limit events").option("-d,
2356
2355
  });
2357
2356
  var mcpCmd = program.command("mcp").description("Manage MCP (Model Context Protocol) server connections");
2358
2357
  mcpCmd.command("list").description("List configured MCP servers and their status").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
2359
- const { loadConfig } = await import("../config-2O6S2YJO.js");
2360
- const { validateMcpConfig } = await import("../mcp-WTQJJZAO.js");
2358
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
2359
+ const { validateMcpConfig } = await import("../mcp-JSIUJJZV.js");
2361
2360
  const dir = resolve(opts.dir);
2362
2361
  requireHarness(dir);
2363
2362
  const config = loadConfig(dir);
@@ -2398,8 +2397,8 @@ ${entries.length} MCP server(s) configured:
2398
2397
  console.log();
2399
2398
  });
2400
2399
  mcpCmd.command("test").description("Test MCP server connections and list available tools").option("-d, --dir <path>", "Harness directory", ".").option("-s, --server <name>", "Test only a specific server").action(async (opts) => {
2401
- const { loadConfig } = await import("../config-2O6S2YJO.js");
2402
- const { createMcpManager } = await import("../mcp-WTQJJZAO.js");
2400
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
2401
+ const { createMcpManager } = await import("../mcp-JSIUJJZV.js");
2403
2402
  const dir = resolve(opts.dir);
2404
2403
  loadEnvFromDir(dir);
2405
2404
  requireHarness(dir);
@@ -2457,7 +2456,7 @@ Testing MCP server connections...
2457
2456
  }
2458
2457
  });
2459
2458
  mcpCmd.command("discover").description("Scan for MCP servers from other tools (Claude Desktop, Cursor, VS Code, etc.)").option("--json", "Output raw JSON", false).action(async (opts) => {
2460
- const { discoverMcpServers, discoveredServersToYaml, getScannedTools } = await import("../mcp-discovery-WPAQFL6S.js");
2459
+ const { discoverMcpServers, discoveredServersToYaml, getScannedTools } = await import("../mcp-discovery-DG3RQYLM.js");
2461
2460
  const discovery = discoverMcpServers();
2462
2461
  if (opts.json) {
2463
2462
  console.log(JSON.stringify(discovery, null, 2));
@@ -2492,7 +2491,7 @@ ${discovery.totalServers} unique server(s) after dedup:
2492
2491
  }
2493
2492
  });
2494
2493
  mcpCmd.command("search <query>").description("Search the MCP registry for available servers").option("-n, --limit <number>", "Max results", "10").option("--json", "Output raw JSON", false).action(async (query, opts) => {
2495
- const { searchRegistry, formatRegistryServer } = await import("../mcp-installer-KV3XZRRF.js");
2494
+ const { searchRegistry, formatRegistryServer } = await import("../mcp-installer-X2TJ2S2G.js");
2496
2495
  try {
2497
2496
  const result = await searchRegistry(query, { limit: parseInt(opts.limit, 10) });
2498
2497
  if (opts.json) {
@@ -2518,7 +2517,7 @@ ${result.servers.length} server(s) found for "${query}":
2518
2517
  }
2519
2518
  });
2520
2519
  mcpCmd.command("install <query>").description("Install an MCP server from the registry into config.yaml").option("-d, --dir <path>", "Harness directory", ".").option("-n, --name <name>", "Custom name for the server in config").option("--force", "Overwrite if server already exists", false).option("--skip-test", "Skip connection testing", false).option("--skip-docs", "Skip tool doc generation", false).option("--json", "Output raw JSON", false).action(async (query, opts) => {
2521
- const { installMcpServer } = await import("../mcp-installer-KV3XZRRF.js");
2520
+ const { installMcpServer } = await import("../mcp-installer-X2TJ2S2G.js");
2522
2521
  const dir = resolve(opts.dir);
2523
2522
  loadEnvFromDir(dir);
2524
2523
  requireHarness(dir);
@@ -2591,7 +2590,7 @@ Installed MCP server: ${result.name}`);
2591
2590
  });
2592
2591
  var discoverCmd = program.command("discover").description("Discover environment variables, project context, and MCP servers");
2593
2592
  discoverCmd.command("env").description("Scan .env files for API keys and suggest MCP servers").option("-d, --dir <path>", "Directory to scan", ".").option("--json", "Output raw JSON", false).action(async (opts) => {
2594
- const { discoverEnvKeys } = await import("../env-discovery-2BLVMAIM.js");
2593
+ const { discoverEnvKeys } = await import("../env-discovery-PXBRE5FX.js");
2595
2594
  const dir = resolve(opts.dir);
2596
2595
  const result = discoverEnvKeys({ dir });
2597
2596
  if (opts.json) {
@@ -2624,7 +2623,7 @@ Suggested MCP servers:
2624
2623
  console.log();
2625
2624
  });
2626
2625
  discoverCmd.command("project").description("Scan project files to detect tech stack and suggest rules/skills").option("-d, --dir <path>", "Project directory to scan", ".").option("--json", "Output raw JSON", false).action(async (opts) => {
2627
- const { discoverProjectContext } = await import("../project-discovery-C4UMD7JI.js");
2626
+ const { discoverProjectContext } = await import("../project-discovery-FQLAZKEM.js");
2628
2627
  const dir = resolve(opts.dir);
2629
2628
  const result = discoverProjectContext({ dir });
2630
2629
  if (opts.json) {
@@ -2665,10 +2664,10 @@ Suggestions:
2665
2664
  });
2666
2665
  var generateCmd = program.command("generate").description("Auto-generate harness files");
2667
2666
  generateCmd.command("system").description("Regenerate SYSTEM.md from actual directory structure").option("-d, --dir <path>", "Harness directory", ".").action(async (opts) => {
2668
- const { generateSystemMd } = await import("../scaffold-ZY4XWINP.js");
2667
+ const { generateSystemMd } = await import("../scaffold-2F36YVW6.js");
2669
2668
  const dir = resolve(opts.dir);
2670
2669
  requireHarness(dir);
2671
- const { loadConfig } = await import("../config-2O6S2YJO.js");
2670
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
2672
2671
  const config = loadConfig(dir);
2673
2672
  const content = generateSystemMd(dir, config.agent.name);
2674
2673
  const { writeFileSync } = await import("fs");
@@ -2678,7 +2677,7 @@ generateCmd.command("system").description("Regenerate SYSTEM.md from actual dire
2678
2677
  `);
2679
2678
  });
2680
2679
  program.command("dashboard").description("Show a unified dashboard of health, costs, sessions, workflows, and storage").option("-d, --dir <path>", "Harness directory", ".").option("--json", "Output raw JSON snapshot", false).option("--watch", "Refresh every N seconds", false).option("--interval <seconds>", "Watch refresh interval in seconds", "5").action(async (opts) => {
2681
- const { collectSnapshot, formatDashboard } = await import("../telemetry-MVDNGJEC.js");
2680
+ const { collectSnapshot, formatDashboard } = await import("../telemetry-RS2JZUZP.js");
2682
2681
  const dir = resolve(opts.dir);
2683
2682
  requireHarness(dir);
2684
2683
  if (opts.json) {
@@ -2719,7 +2718,7 @@ var intelligenceCmd = program.command("intelligence").description("Intelligence
2719
2718
  intelligenceCmd.command("promote").description("Auto-promote instinct candidates that appear 3+ times across journals").option("-d, --dir <dir>", "Harness directory", ".").option("--threshold <n>", "Minimum occurrences to promote", "3").option("--install", "Install promoted instincts as .md files").option("--json", "Output as JSON").action(async (opts) => {
2720
2719
  const dir = resolve(opts.dir);
2721
2720
  loadEnvFromDir(dir);
2722
- const { autoPromoteInstincts } = await import("../intelligence-UW4TCOC7.js");
2721
+ const { autoPromoteInstincts } = await import("../intelligence-XPV3MC5U.js");
2723
2722
  const result = autoPromoteInstincts(dir, {
2724
2723
  threshold: parseInt(opts.threshold, 10),
2725
2724
  install: opts.install ?? false
@@ -2750,8 +2749,8 @@ Promoted: ${result.promoted.join(", ")}`);
2750
2749
  intelligenceCmd.command("dead").description("Detect dead primitives (unreferenced and old)").option("-d, --dir <dir>", "Harness directory", ".").option("--threshold <days>", "Days since modification to consider dead", "30").option("--json", "Output as JSON").action(async (opts) => {
2751
2750
  const dir = resolve(opts.dir);
2752
2751
  loadEnvFromDir(dir);
2753
- const { detectDeadPrimitives } = await import("../intelligence-UW4TCOC7.js");
2754
- const { loadConfig } = await import("../config-2O6S2YJO.js");
2752
+ const { detectDeadPrimitives } = await import("../intelligence-XPV3MC5U.js");
2753
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
2755
2754
  let config;
2756
2755
  try {
2757
2756
  config = loadConfig(dir);
@@ -2780,7 +2779,7 @@ Dead primitives (${result.dead.length}):`);
2780
2779
  intelligenceCmd.command("contradictions").description("Detect contradictions between rules and instincts").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
2781
2780
  const dir = resolve(opts.dir);
2782
2781
  loadEnvFromDir(dir);
2783
- const { detectContradictions } = await import("../intelligence-UW4TCOC7.js");
2782
+ const { detectContradictions } = await import("../intelligence-XPV3MC5U.js");
2784
2783
  const result = detectContradictions(dir);
2785
2784
  if (opts.json) {
2786
2785
  console.log(JSON.stringify(result, null, 2));
@@ -2801,8 +2800,8 @@ Contradictions (${result.contradictions.length}):`);
2801
2800
  intelligenceCmd.command("enrich").description("Enrich sessions with topics, token counts, and related primitives").option("-d, --dir <dir>", "Harness directory", ".").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--json", "Output as JSON").action(async (opts) => {
2802
2801
  const dir = resolve(opts.dir);
2803
2802
  loadEnvFromDir(dir);
2804
- const { enrichSessions } = await import("../intelligence-UW4TCOC7.js");
2805
- const { loadConfig } = await import("../config-2O6S2YJO.js");
2803
+ const { enrichSessions } = await import("../intelligence-XPV3MC5U.js");
2804
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
2806
2805
  let config;
2807
2806
  try {
2808
2807
  config = loadConfig(dir);
@@ -2828,8 +2827,8 @@ intelligenceCmd.command("enrich").description("Enrich sessions with topics, toke
2828
2827
  intelligenceCmd.command("suggest").description("Suggest new skills/playbooks for frequent uncovered topics").option("-d, --dir <dir>", "Harness directory", ".").option("--min-frequency <n>", "Minimum topic frequency", "3").option("--json", "Output as JSON").action(async (opts) => {
2829
2828
  const dir = resolve(opts.dir);
2830
2829
  loadEnvFromDir(dir);
2831
- const { suggestCapabilities } = await import("../intelligence-UW4TCOC7.js");
2832
- const { loadConfig } = await import("../config-2O6S2YJO.js");
2830
+ const { suggestCapabilities } = await import("../intelligence-XPV3MC5U.js");
2831
+ const { loadConfig } = await import("../config-PYSS3QY6.js");
2833
2832
  let config;
2834
2833
  try {
2835
2834
  config = loadConfig(dir);
@@ -2858,7 +2857,7 @@ Suggestions (${result.suggestions.length}):`);
2858
2857
  intelligenceCmd.command("failures").description("Analyze recent failure patterns and suggest recovery strategies").option("-d, --dir <dir>", "Harness directory", ".").option("--days <n>", "Days to look back", "7").option("--json", "Output as JSON").action(async (opts) => {
2859
2858
  const dir = resolve(opts.dir);
2860
2859
  loadEnvFromDir(dir);
2861
- const { analyzeFailures } = await import("../intelligence-UW4TCOC7.js");
2860
+ const { analyzeFailures } = await import("../intelligence-XPV3MC5U.js");
2862
2861
  const result = analyzeFailures(dir, { days: parseInt(opts.days, 10) });
2863
2862
  if (opts.json) {
2864
2863
  console.log(JSON.stringify(result, null, 2));
@@ -2883,7 +2882,7 @@ intelligenceCmd.command("failures").description("Analyze recent failure patterns
2883
2882
  }
2884
2883
  });
2885
2884
  intelligenceCmd.command("classify <error>").description("Classify an error message into a failure mode").action(async (errorMsg) => {
2886
- const { classifyFailure, getRecoveryStrategies, FAILURE_TAXONOMY } = await import("../intelligence-UW4TCOC7.js");
2885
+ const { classifyFailure, getRecoveryStrategies, FAILURE_TAXONOMY } = await import("../intelligence-XPV3MC5U.js");
2887
2886
  const mode = classifyFailure(errorMsg);
2888
2887
  const info = FAILURE_TAXONOMY.modes[mode];
2889
2888
  const strategies = getRecoveryStrategies(mode);
@@ -2900,7 +2899,7 @@ var gateCmd = program.command("gate").description("Run verification gates");
2900
2899
  gateCmd.command("run [name]").description("Run a verification gate (or all gates if no name)").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (name, opts) => {
2901
2900
  const dir = resolve(opts.dir);
2902
2901
  loadEnvFromDir(dir);
2903
- const { runGate, runAllGates } = await import("../intelligence-UW4TCOC7.js");
2902
+ const { runGate, runAllGates } = await import("../intelligence-XPV3MC5U.js");
2904
2903
  if (name) {
2905
2904
  const result = runGate(name, dir);
2906
2905
  if (opts.json) {
@@ -2930,7 +2929,7 @@ gateCmd.command("run [name]").description("Run a verification gate (or all gates
2930
2929
  }
2931
2930
  });
2932
2931
  gateCmd.command("list").description("List available verification gates").action(async () => {
2933
- const { listGates } = await import("../intelligence-UW4TCOC7.js");
2932
+ const { listGates } = await import("../intelligence-XPV3MC5U.js");
2934
2933
  const gates = listGates();
2935
2934
  for (const g of gates) {
2936
2935
  console.log(` ${g.name}: ${g.description}`);
@@ -2939,7 +2938,7 @@ gateCmd.command("list").description("List available verification gates").action(
2939
2938
  program.command("check-rules").description("Check an action against loaded rules").argument("<action>", 'Action to check (e.g., "deploy", "run", "tool_call")').option("-d, --dir <path>", "Harness directory", process.cwd()).option("--description <text>", "Description of the action").option("--tags <tags>", "Comma-separated tags").option("--tool <name>", "Tool name (for tool_call actions)").option("--json", "Output as JSON").action(async (action, opts) => {
2940
2939
  const dir = resolve(opts.dir);
2941
2940
  loadEnvFromDir(dir);
2942
- const { enforceRules } = await import("../rule-engine-I4AFQSSR.js");
2941
+ const { enforceRules } = await import("../rule-engine-DM26S77N.js");
2943
2942
  const tags = opts.tags ? opts.tags.split(",").map((t) => t.trim()) : void 0;
2944
2943
  const result = enforceRules(dir, {
2945
2944
  action,
@@ -2962,7 +2961,7 @@ program.command("check-rules").description("Check an action against loaded rules
2962
2961
  program.command("list-rules").description("List all parsed rules from the harness").option("-d, --dir <path>", "Harness directory", process.cwd()).option("--json", "Output as JSON").action(async (opts) => {
2963
2962
  const dir = resolve(opts.dir);
2964
2963
  loadEnvFromDir(dir);
2965
- const { loadRules } = await import("../rule-engine-I4AFQSSR.js");
2964
+ const { loadRules } = await import("../rule-engine-DM26S77N.js");
2966
2965
  const rules = loadRules(dir);
2967
2966
  if (opts.json) {
2968
2967
  console.log(JSON.stringify(rules, null, 2));
@@ -2982,7 +2981,7 @@ program.command("list-rules").description("List all parsed rules from the harnes
2982
2981
  program.command("playbook-gates").description("Extract and check verification gates from playbooks/workflows").argument("[playbook-id]", "Specific playbook/workflow ID").option("-d, --dir <path>", "Harness directory", process.cwd()).option("--json", "Output as JSON").action(async (playbookId, opts) => {
2983
2982
  const dir = resolve(opts.dir);
2984
2983
  loadEnvFromDir(dir);
2985
- const { loadGates, getGatesForPlaybook } = await import("../verification-gate-ALSJVKSW.js");
2984
+ const { loadGates, getGatesForPlaybook } = await import("../verification-gate-2O6DF2B7.js");
2986
2985
  if (playbookId) {
2987
2986
  const gates = getGatesForPlaybook(dir, playbookId);
2988
2987
  if (opts.json) {
@@ -3019,7 +3018,7 @@ var stateCmd = program.command("state-merge").description("Mixed-ownership state
3019
3018
  stateCmd.command("apply").description("Apply a state change with ownership tracking").option("-d, --dir <dir>", "Harness directory", ".").option("--author <owner>", "Change author: human, agent, infrastructure", "human").option("--mode <mode>", "Set agent mode").option("--goals <goals>", "Set goals (comma-separated)").option("--strategy <strategy>", "Merge strategy: human-wins, agent-wins, latest-wins, union", "human-wins").option("--json", "Output as JSON").action(async (opts) => {
3020
3019
  const dir = resolve(opts.dir);
3021
3020
  loadEnvFromDir(dir);
3022
- const { mergeState } = await import("../state-merge-NKO5FRBA.js");
3021
+ const { mergeState } = await import("../state-merge-E333OEIQ.js");
3023
3022
  const changes = {};
3024
3023
  if (opts.mode) changes.mode = opts.mode;
3025
3024
  if (opts.goals) changes.goals = opts.goals.split(",").map((g) => g.trim());
@@ -3050,7 +3049,7 @@ stateCmd.command("apply").description("Apply a state change with ownership track
3050
3049
  stateCmd.command("ownership").description("Show current state ownership").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
3051
3050
  const dir = resolve(opts.dir);
3052
3051
  loadEnvFromDir(dir);
3053
- const { loadOwnership } = await import("../state-merge-NKO5FRBA.js");
3052
+ const { loadOwnership } = await import("../state-merge-E333OEIQ.js");
3054
3053
  const ownership = loadOwnership(dir);
3055
3054
  if (opts.json) {
3056
3055
  console.log(JSON.stringify(ownership, null, 2));
@@ -3065,7 +3064,7 @@ var emoCmd = program.command("emotional").description("Operational disposition t
3065
3064
  emoCmd.command("status").description("Show current emotional/disposition state").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
3066
3065
  const dir = resolve(opts.dir);
3067
3066
  loadEnvFromDir(dir);
3068
- const { loadEmotionalState, summarizeEmotionalState } = await import("../emotional-state-VQVRA6ED.js");
3067
+ const { loadEmotionalState, summarizeEmotionalState } = await import("../emotional-state-IN4ZUL2Q.js");
3069
3068
  const state = loadEmotionalState(dir);
3070
3069
  if (opts.json) {
3071
3070
  console.log(JSON.stringify(state, null, 2));
@@ -3084,7 +3083,7 @@ ${summarizeEmotionalState(state)}`);
3084
3083
  emoCmd.command("signal").description("Apply an emotional signal").argument("<dimension>", "Dimension: confidence, engagement, frustration, curiosity, urgency").argument("<delta>", "Delta value (positive or negative integer)").option("-d, --dir <dir>", "Harness directory", ".").option("-r, --reason <reason>", "Reason for the signal").option("--json", "Output as JSON").action(async (dimension, delta, opts) => {
3085
3084
  const dir = resolve(opts.dir);
3086
3085
  loadEnvFromDir(dir);
3087
- const { applySignals } = await import("../emotional-state-VQVRA6ED.js");
3086
+ const { applySignals } = await import("../emotional-state-IN4ZUL2Q.js");
3088
3087
  const state = applySignals(dir, [{
3089
3088
  dimension,
3090
3089
  delta: parseInt(delta, 10),
@@ -3100,7 +3099,7 @@ emoCmd.command("signal").description("Apply an emotional signal").argument("<dim
3100
3099
  emoCmd.command("trends").description("Show emotional dimension trends").option("-d, --dir <dir>", "Harness directory", ".").option("--days <days>", "Days to analyze", "7").option("--json", "Output as JSON").action(async (opts) => {
3101
3100
  const dir = resolve(opts.dir);
3102
3101
  loadEnvFromDir(dir);
3103
- const { getEmotionalTrends } = await import("../emotional-state-VQVRA6ED.js");
3102
+ const { getEmotionalTrends } = await import("../emotional-state-IN4ZUL2Q.js");
3104
3103
  const trends = getEmotionalTrends(dir, { days: parseInt(opts.days, 10) });
3105
3104
  if (opts.json) {
3106
3105
  console.log(JSON.stringify(trends, null, 2));
@@ -3116,28 +3115,14 @@ emoCmd.command("trends").description("Show emotional dimension trends").option("
3116
3115
  emoCmd.command("reset").description("Reset emotional state to defaults").option("-d, --dir <dir>", "Harness directory", ".").action(async (opts) => {
3117
3116
  const dir = resolve(opts.dir);
3118
3117
  loadEnvFromDir(dir);
3119
- const { resetEmotionalState } = await import("../emotional-state-VQVRA6ED.js");
3118
+ const { resetEmotionalState } = await import("../emotional-state-IN4ZUL2Q.js");
3120
3119
  resetEmotionalState(dir);
3121
3120
  console.log("Emotional state reset to defaults.");
3122
3121
  });
3123
- program.command("check-action").description("Check if an action is allowed by harness rules (agent-framework guardrails)").argument("<action>", "Action description to check").option("-d, --dir <dir>", "Harness directory", ".").option("--tags <tags>", "Filter by rule tags (comma-separated)").option("--json", "Output as JSON").action(async (action, opts) => {
3124
- const dir = resolve(opts.dir);
3125
- loadEnvFromDir(dir);
3126
- const { checkAction } = await import("../agent-framework-CMFC3VJM.js");
3127
- const tags = opts.tags ? opts.tags.split(",").map((t) => t.trim()) : void 0;
3128
- const result = checkAction(dir, action, { ruleTags: tags });
3129
- if (opts.json) {
3130
- console.log(JSON.stringify(result, null, 2));
3131
- } else if (result.allowed) {
3132
- console.log("[OK] Action allowed.");
3133
- } else {
3134
- console.log(`[BLOCKED] ${result.reason}`);
3135
- }
3136
- });
3137
3122
  program.command("serve").description("Start the harness HTTP API server for webhooks and integrations").option("-d, --dir <dir>", "Harness directory", ".").option("-p, --port <port>", "Port to listen on", "8080").option("--api-key <key>", "API key for LLM provider").option("--webhook-secret <secret>", "Secret for authenticating webhook management API").option("--no-cors", "Disable CORS").action(async (opts) => {
3138
3123
  const dir = resolve(opts.dir);
3139
3124
  loadEnvFromDir(dir);
3140
- const { startServe } = await import("../serve-QFUZWOU3.js");
3125
+ const { startServe } = await import("../serve-MXRTP2HE.js");
3141
3126
  const port = parseInt(opts.port, 10);
3142
3127
  const result = startServe({
3143
3128
  harnessDir: dir,
@@ -3174,7 +3159,7 @@ var sourcesCmd = program.command("sources").description("Manage content sources
3174
3159
  sourcesCmd.command("list").description("List all configured content sources").option("-d, --dir <dir>", "Harness directory", ".").option("--type <type>", "Filter by content type (skills, agents, rules, hooks, mcp, etc.)").option("--json", "Output as JSON").action(async (opts) => {
3175
3160
  const dir = resolve(opts.dir);
3176
3161
  loadEnvFromDir(dir);
3177
- const { loadAllSources, getSourcesForType } = await import("../sources-RW5DT56F.js");
3162
+ const { loadAllSources, getSourcesForType } = await import("../sources-7LDYO5GK.js");
3178
3163
  const sources = opts.type ? getSourcesForType(dir, opts.type) : loadAllSources(dir);
3179
3164
  if (opts.json) {
3180
3165
  console.log(JSON.stringify(sources, null, 2));
@@ -3197,7 +3182,7 @@ sourcesCmd.command("list").description("List all configured content sources").op
3197
3182
  sourcesCmd.command("add").description("Add a new content source").argument("<url>", "Source URL (GitHub repo, registry API, or endpoint)").option("-d, --dir <dir>", "Harness directory", ".").option("-n, --name <name>", "Source display name").option("-t, --type <type>", "Source type: github, registry, api", "github").option("-c, --content <types>", "Content types (comma-separated: skills,agents,rules,hooks,mcp)").option("--description <desc>", "Source description").option("--json", "Output as JSON").action(async (url, opts) => {
3198
3183
  const dir = resolve(opts.dir);
3199
3184
  loadEnvFromDir(dir);
3200
- const { addSource } = await import("../sources-RW5DT56F.js");
3185
+ const { addSource } = await import("../sources-7LDYO5GK.js");
3201
3186
  const name = opts.name ?? url.replace(/https?:\/\//, "").replace(/github\.com\//, "").replace(/\/$/, "");
3202
3187
  const content = opts.content ? opts.content.split(",").map((c) => c.trim()) : ["skills"];
3203
3188
  const result = addSource(dir, {
@@ -3218,7 +3203,7 @@ sourcesCmd.command("add").description("Add a new content source").argument("<url
3218
3203
  sourcesCmd.command("remove").description("Remove a content source").argument("<name>", "Source name to remove").option("-d, --dir <dir>", "Harness directory", ".").action(async (name, opts) => {
3219
3204
  const dir = resolve(opts.dir);
3220
3205
  loadEnvFromDir(dir);
3221
- const { removeSource } = await import("../sources-RW5DT56F.js");
3206
+ const { removeSource } = await import("../sources-7LDYO5GK.js");
3222
3207
  const removed = removeSource(dir, name);
3223
3208
  if (removed) {
3224
3209
  console.log(`Removed source: ${name}`);
@@ -3229,7 +3214,7 @@ sourcesCmd.command("remove").description("Remove a content source").argument("<n
3229
3214
  sourcesCmd.command("summary").description("Show content available by type across all sources").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
3230
3215
  const dir = resolve(opts.dir);
3231
3216
  loadEnvFromDir(dir);
3232
- const { getSourcesSummary } = await import("../sources-RW5DT56F.js");
3217
+ const { getSourcesSummary } = await import("../sources-7LDYO5GK.js");
3233
3218
  const summary = getSourcesSummary(dir);
3234
3219
  if (opts.json) {
3235
3220
  const json = {};
@@ -3255,7 +3240,7 @@ discoverCmd.command("search").description("Search all content sources for skills
3255
3240
  const maxResults = parseInt(opts.max, 10);
3256
3241
  const type = opts.type;
3257
3242
  if (opts.remote) {
3258
- const { discoverRemote } = await import("../sources-RW5DT56F.js");
3243
+ const { discoverRemote } = await import("../sources-7LDYO5GK.js");
3259
3244
  const results = await discoverRemote(dir, query, {
3260
3245
  type,
3261
3246
  maxResults
@@ -3276,7 +3261,7 @@ discoverCmd.command("search").description("Search all content sources for skills
3276
3261
  }
3277
3262
  }
3278
3263
  } else {
3279
- const { discoverSources } = await import("../sources-RW5DT56F.js");
3264
+ const { discoverSources } = await import("../sources-7LDYO5GK.js");
3280
3265
  const results = discoverSources(dir, query, {
3281
3266
  type,
3282
3267
  maxResults
@@ -3301,9 +3286,9 @@ discoverCmd.command("search").description("Search all content sources for skills
3301
3286
  program.command("browse").description("Browse available community content \u2014 starter packs, sources, and installed primitives").option("-d, --dir <dir>", "Harness directory", ".").option("--type <type>", "Filter by content type (packs, sources, installed)").option("--json", "Output as JSON").action(async (opts) => {
3302
3287
  const dir = resolve(opts.dir);
3303
3288
  loadEnvFromDir(dir);
3304
- const { listStarterPacks } = await import("../starter-packs-76YUVHEU.js");
3305
- const { loadAllSources, getSourcesSummary } = await import("../sources-RW5DT56F.js");
3306
- const { listInstalledBundles } = await import("../primitive-registry-HOJMUFBT.js");
3289
+ const { listStarterPacks } = await import("../starter-packs-OR7NI5NA.js");
3290
+ const { loadAllSources, getSourcesSummary } = await import("../sources-7LDYO5GK.js");
3291
+ const { listInstalledBundles } = await import("../primitive-registry-ZMGGXSO5.js");
3307
3292
  const filter = opts.type;
3308
3293
  const sections = [];
3309
3294
  if (!filter || filter === "packs") {
@@ -3400,7 +3385,7 @@ var semanticCmd = program.command("semantic").description("Semantic search over
3400
3385
  semanticCmd.command("index").description("Index all primitives for semantic search (requires an embed function at runtime \u2014 shows stats only from CLI)").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
3401
3386
  const dir = resolve(opts.dir);
3402
3387
  loadEnvFromDir(dir);
3403
- const { getEmbeddingStats } = await import("../semantic-search-G624D6CI.js");
3388
+ const { getEmbeddingStats } = await import("../semantic-search-FN6FZIXI.js");
3404
3389
  const stats = getEmbeddingStats(dir);
3405
3390
  if (opts.json) {
3406
3391
  console.log(JSON.stringify(stats, null, 2));
@@ -3416,7 +3401,7 @@ semanticCmd.command("index").description("Index all primitives for semantic sear
3416
3401
  semanticCmd.command("stats").description("Show embedding store statistics").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
3417
3402
  const dir = resolve(opts.dir);
3418
3403
  loadEnvFromDir(dir);
3419
- const { getEmbeddingStats, detectStalePrimitives, loadEmbeddingStore } = await import("../semantic-search-G624D6CI.js");
3404
+ const { getEmbeddingStats, detectStalePrimitives, loadEmbeddingStore } = await import("../semantic-search-FN6FZIXI.js");
3420
3405
  const stats = getEmbeddingStats(dir);
3421
3406
  const store = loadEmbeddingStore(dir);
3422
3407
  const stale = detectStalePrimitives(dir, store, stats.modelId ?? "");
@@ -3435,7 +3420,7 @@ semanticCmd.command("stats").description("Show embedding store statistics").opti
3435
3420
  program.command("install").description("Install a primitive from any source (file, URL, or name)").argument("<source>", "File path, HTTPS URL, or source name to install").option("-d, --dir <dir>", "Harness directory", ".").option("-t, --type <type>", "Override detected type (skill, rule, agent, playbook, workflow, tool)").option("--id <id>", "Override generated ID").option("--force", "Force install despite validation warnings").option("--skip-fix", "Skip auto-fix (no frontmatter/L0/L1 generation)").option("--tags <tags...>", "Additional tags to add").option("--force-license <spdx>", 'Override license policy for this install (SPDX id, e.g. "MIT")').option("--json", "Output as JSON").action(async (source, opts) => {
3436
3421
  const dir = resolve(opts.dir);
3437
3422
  loadEnvFromDir(dir);
3438
- const { isPackReference, parsePackName, getStarterPack, listStarterPacks } = await import("../starter-packs-76YUVHEU.js");
3423
+ const { isPackReference, parsePackName, getStarterPack, listStarterPacks } = await import("../starter-packs-OR7NI5NA.js");
3439
3424
  if (isPackReference(source)) {
3440
3425
  const packName = parsePackName(source);
3441
3426
  if (packName === "list") {
@@ -3458,7 +3443,7 @@ Available packs: ${available}`);
3458
3443
  process.exitCode = 1;
3459
3444
  return;
3460
3445
  }
3461
- const { installBundle } = await import("../primitive-registry-HOJMUFBT.js");
3446
+ const { installBundle } = await import("../primitive-registry-ZMGGXSO5.js");
3462
3447
  const bundleResult = installBundle(dir, bundle, {
3463
3448
  overwrite: opts.force,
3464
3449
  force: opts.force
@@ -3490,7 +3475,7 @@ Customize the workflows in your workflows/ directory.`);
3490
3475
  }
3491
3476
  return;
3492
3477
  }
3493
- const { universalInstall } = await import("../universal-installer-7MFCJUW7.js");
3478
+ const { universalInstall } = await import("../universal-installer-LCAZHFZR.js");
3494
3479
  const result = await universalInstall(dir, source, {
3495
3480
  type: opts.type,
3496
3481
  id: opts.id,
@@ -3538,7 +3523,7 @@ Customize the workflows in your workflows/ directory.`);
3538
3523
  var versionCmd = program.command("version").description("Git-backed primitive versioning");
3539
3524
  versionCmd.command("init").description("Initialize git versioning for the harness").option("-d, --dir <dir>", "Harness directory", ".").action(async (opts) => {
3540
3525
  const dir = resolve(opts.dir);
3541
- const { initVersioning, isGitRepo } = await import("../versioning-Z3XNE2Q2.js");
3526
+ const { initVersioning, isGitRepo } = await import("../versioning-WEGF6KJG.js");
3542
3527
  if (isGitRepo(dir)) {
3543
3528
  console.log("Versioning already initialized.");
3544
3529
  } else {
@@ -3548,7 +3533,7 @@ versionCmd.command("init").description("Initialize git versioning for the harnes
3548
3533
  });
3549
3534
  versionCmd.command("snapshot").description("Take a versioned snapshot of the current harness state").argument("<message>", "Commit message").option("-d, --dir <dir>", "Harness directory", ".").option("-t, --tag <tag>", "Tag this version").option("--json", "Output as JSON").action(async (message, opts) => {
3550
3535
  const dir = resolve(opts.dir);
3551
- const { snapshot } = await import("../versioning-Z3XNE2Q2.js");
3536
+ const { snapshot } = await import("../versioning-WEGF6KJG.js");
3552
3537
  const result = snapshot(dir, message, { tag: opts.tag });
3553
3538
  if (opts.json) {
3554
3539
  console.log(JSON.stringify(result, null, 2));
@@ -3566,7 +3551,7 @@ versionCmd.command("snapshot").description("Take a versioned snapshot of the cur
3566
3551
  });
3567
3552
  versionCmd.command("log").description("Show version history").option("-d, --dir <dir>", "Harness directory", ".").option("-n, --limit <n>", "Max entries", "20").option("-f, --file <path>", "Filter by file path").option("--json", "Output as JSON").action(async (opts) => {
3568
3553
  const dir = resolve(opts.dir);
3569
- const { getVersionLog } = await import("../versioning-Z3XNE2Q2.js");
3554
+ const { getVersionLog } = await import("../versioning-WEGF6KJG.js");
3570
3555
  const log = getVersionLog(dir, {
3571
3556
  limit: parseInt(opts.limit, 10),
3572
3557
  file: opts.file
@@ -3587,7 +3572,7 @@ versionCmd.command("log").description("Show version history").option("-d, --dir
3587
3572
  });
3588
3573
  versionCmd.command("diff").description("Show changes between versions").argument("<from>", "Source commit hash or tag").argument("[to]", "Target commit hash or tag (default: HEAD)").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (from, to, opts) => {
3589
3574
  const dir = resolve(opts.dir);
3590
- const { getVersionDiff } = await import("../versioning-Z3XNE2Q2.js");
3575
+ const { getVersionDiff } = await import("../versioning-WEGF6KJG.js");
3591
3576
  const diff = getVersionDiff(dir, from, to);
3592
3577
  if (opts.json) {
3593
3578
  console.log(JSON.stringify(diff, null, 2));
@@ -3603,7 +3588,7 @@ versionCmd.command("diff").description("Show changes between versions").argument
3603
3588
  });
3604
3589
  versionCmd.command("rollback").description("Roll back to a previous version (creates new commit preserving history)").argument("<target>", "Commit hash or tag to roll back to").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (target, opts) => {
3605
3590
  const dir = resolve(opts.dir);
3606
- const { rollback } = await import("../versioning-Z3XNE2Q2.js");
3591
+ const { rollback } = await import("../versioning-WEGF6KJG.js");
3607
3592
  const result = rollback(dir, target);
3608
3593
  if (opts.json) {
3609
3594
  console.log(JSON.stringify(result, null, 2));
@@ -3616,13 +3601,13 @@ versionCmd.command("rollback").description("Roll back to a previous version (cre
3616
3601
  });
3617
3602
  versionCmd.command("tag").description("Tag the current version").argument("<name>", "Tag name (e.g., v1.0.0)").option("-d, --dir <dir>", "Harness directory", ".").option("-m, --message <msg>", "Tag message").action(async (name, opts) => {
3618
3603
  const dir = resolve(opts.dir);
3619
- const { tagVersion } = await import("../versioning-Z3XNE2Q2.js");
3604
+ const { tagVersion } = await import("../versioning-WEGF6KJG.js");
3620
3605
  const ok = tagVersion(dir, name, opts.message);
3621
3606
  console.log(ok ? `Tagged: ${name}` : "Failed to create tag.");
3622
3607
  });
3623
3608
  versionCmd.command("tags").description("List all version tags").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
3624
3609
  const dir = resolve(opts.dir);
3625
- const { listTags } = await import("../versioning-Z3XNE2Q2.js");
3610
+ const { listTags } = await import("../versioning-WEGF6KJG.js");
3626
3611
  const tags = listTags(dir);
3627
3612
  if (opts.json) {
3628
3613
  console.log(JSON.stringify(tags, null, 2));
@@ -3636,7 +3621,7 @@ versionCmd.command("tags").description("List all version tags").option("-d, --di
3636
3621
  });
3637
3622
  versionCmd.command("pending").description("Show uncommitted changes").option("-d, --dir <dir>", "Harness directory", ".").option("--json", "Output as JSON").action(async (opts) => {
3638
3623
  const dir = resolve(opts.dir);
3639
- const { getPendingChanges } = await import("../versioning-Z3XNE2Q2.js");
3624
+ const { getPendingChanges } = await import("../versioning-WEGF6KJG.js");
3640
3625
  const changes = getPendingChanges(dir);
3641
3626
  if (opts.json) {
3642
3627
  console.log(JSON.stringify(changes, null, 2));
@@ -3653,7 +3638,7 @@ versionCmd.command("pending").description("Show uncommitted changes").option("-d
3653
3638
  });
3654
3639
  versionCmd.command("show").description("Show file content at a specific version").argument("<file>", "File path relative to harness").argument("<hash>", "Commit hash or tag").option("-d, --dir <dir>", "Harness directory", ".").action(async (file, hash, opts) => {
3655
3640
  const dir = resolve(opts.dir);
3656
- const { getFileAtVersion } = await import("../versioning-Z3XNE2Q2.js");
3641
+ const { getFileAtVersion } = await import("../versioning-WEGF6KJG.js");
3657
3642
  const content = getFileAtVersion(dir, file, hash);
3658
3643
  if (content === null) {
3659
3644
  console.log(`File not found at version ${hash}.`);