@aaronsb/kg-cli 0.6.1

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 (266) hide show
  1. package/README.md +112 -0
  2. package/dist/api/client.d.ts +867 -0
  3. package/dist/api/client.d.ts.map +1 -0
  4. package/dist/api/client.js +1362 -0
  5. package/dist/api/client.js.map +1 -0
  6. package/dist/cli/admin/backup.d.ts +9 -0
  7. package/dist/cli/admin/backup.d.ts.map +1 -0
  8. package/dist/cli/admin/backup.js +363 -0
  9. package/dist/cli/admin/backup.js.map +1 -0
  10. package/dist/cli/admin/index.d.ts +7 -0
  11. package/dist/cli/admin/index.d.ts.map +1 -0
  12. package/dist/cli/admin/index.js +52 -0
  13. package/dist/cli/admin/index.js.map +1 -0
  14. package/dist/cli/admin/scheduler.d.ts +7 -0
  15. package/dist/cli/admin/scheduler.d.ts.map +1 -0
  16. package/dist/cli/admin/scheduler.js +125 -0
  17. package/dist/cli/admin/scheduler.js.map +1 -0
  18. package/dist/cli/admin/status.d.ts +7 -0
  19. package/dist/cli/admin/status.d.ts.map +1 -0
  20. package/dist/cli/admin/status.js +134 -0
  21. package/dist/cli/admin/status.js.map +1 -0
  22. package/dist/cli/admin/utils.d.ts +34 -0
  23. package/dist/cli/admin/utils.d.ts.map +1 -0
  24. package/dist/cli/admin/utils.js +441 -0
  25. package/dist/cli/admin/utils.js.map +1 -0
  26. package/dist/cli/ai-config/embedding.d.ts +11 -0
  27. package/dist/cli/ai-config/embedding.d.ts.map +1 -0
  28. package/dist/cli/ai-config/embedding.js +598 -0
  29. package/dist/cli/ai-config/embedding.js.map +1 -0
  30. package/dist/cli/ai-config/extraction.d.ts +11 -0
  31. package/dist/cli/ai-config/extraction.d.ts.map +1 -0
  32. package/dist/cli/ai-config/extraction.js +206 -0
  33. package/dist/cli/ai-config/extraction.js.map +1 -0
  34. package/dist/cli/ai-config/index.d.ts +21 -0
  35. package/dist/cli/ai-config/index.d.ts.map +1 -0
  36. package/dist/cli/ai-config/index.js +27 -0
  37. package/dist/cli/ai-config/index.js.map +1 -0
  38. package/dist/cli/ai-config/keys.d.ts +11 -0
  39. package/dist/cli/ai-config/keys.d.ts.map +1 -0
  40. package/dist/cli/ai-config/keys.js +182 -0
  41. package/dist/cli/ai-config/keys.js.map +1 -0
  42. package/dist/cli/ai-config/utils.d.ts +13 -0
  43. package/dist/cli/ai-config/utils.d.ts.map +1 -0
  44. package/dist/cli/ai-config/utils.js +84 -0
  45. package/dist/cli/ai-config/utils.js.map +1 -0
  46. package/dist/cli/artifact.d.ts +8 -0
  47. package/dist/cli/artifact.d.ts.map +1 -0
  48. package/dist/cli/artifact.js +296 -0
  49. package/dist/cli/artifact.js.map +1 -0
  50. package/dist/cli/auth-admin.d.ts +11 -0
  51. package/dist/cli/auth-admin.d.ts.map +1 -0
  52. package/dist/cli/auth-admin.js +415 -0
  53. package/dist/cli/auth-admin.js.map +1 -0
  54. package/dist/cli/colors.d.ts +105 -0
  55. package/dist/cli/colors.d.ts.map +1 -0
  56. package/dist/cli/colors.js +164 -0
  57. package/dist/cli/colors.js.map +1 -0
  58. package/dist/cli/commands.d.ts +6 -0
  59. package/dist/cli/commands.d.ts.map +1 -0
  60. package/dist/cli/commands.js +164 -0
  61. package/dist/cli/commands.js.map +1 -0
  62. package/dist/cli/config.d.ts +6 -0
  63. package/dist/cli/config.d.ts.map +1 -0
  64. package/dist/cli/config.js +694 -0
  65. package/dist/cli/config.js.map +1 -0
  66. package/dist/cli/curve-viz.d.ts +89 -0
  67. package/dist/cli/curve-viz.d.ts.map +1 -0
  68. package/dist/cli/curve-viz.js +228 -0
  69. package/dist/cli/curve-viz.js.map +1 -0
  70. package/dist/cli/database.d.ts +6 -0
  71. package/dist/cli/database.d.ts.map +1 -0
  72. package/dist/cli/database.js +324 -0
  73. package/dist/cli/database.js.map +1 -0
  74. package/dist/cli/document.d.ts +6 -0
  75. package/dist/cli/document.d.ts.map +1 -0
  76. package/dist/cli/document.js +458 -0
  77. package/dist/cli/document.js.map +1 -0
  78. package/dist/cli/group.d.ts +8 -0
  79. package/dist/cli/group.d.ts.map +1 -0
  80. package/dist/cli/group.js +174 -0
  81. package/dist/cli/group.js.map +1 -0
  82. package/dist/cli/health.d.ts +6 -0
  83. package/dist/cli/health.d.ts.map +1 -0
  84. package/dist/cli/health.js +34 -0
  85. package/dist/cli/health.js.map +1 -0
  86. package/dist/cli/help-formatter.d.ts +16 -0
  87. package/dist/cli/help-formatter.d.ts.map +1 -0
  88. package/dist/cli/help-formatter.js +248 -0
  89. package/dist/cli/help-formatter.js.map +1 -0
  90. package/dist/cli/help.d.ts +9 -0
  91. package/dist/cli/help.d.ts.map +1 -0
  92. package/dist/cli/help.js +227 -0
  93. package/dist/cli/help.js.map +1 -0
  94. package/dist/cli/ingest.d.ts +6 -0
  95. package/dist/cli/ingest.d.ts.map +1 -0
  96. package/dist/cli/ingest.js +722 -0
  97. package/dist/cli/ingest.js.map +1 -0
  98. package/dist/cli/jobs.d.ts +6 -0
  99. package/dist/cli/jobs.d.ts.map +1 -0
  100. package/dist/cli/jobs.js +663 -0
  101. package/dist/cli/jobs.js.map +1 -0
  102. package/dist/cli/login.d.ts +21 -0
  103. package/dist/cli/login.d.ts.map +1 -0
  104. package/dist/cli/login.js +221 -0
  105. package/dist/cli/login.js.map +1 -0
  106. package/dist/cli/logout.d.ts +16 -0
  107. package/dist/cli/logout.d.ts.map +1 -0
  108. package/dist/cli/logout.js +141 -0
  109. package/dist/cli/logout.js.map +1 -0
  110. package/dist/cli/mcp-config.d.ts +10 -0
  111. package/dist/cli/mcp-config.d.ts.map +1 -0
  112. package/dist/cli/mcp-config.js +358 -0
  113. package/dist/cli/mcp-config.js.map +1 -0
  114. package/dist/cli/oauth.d.ts +15 -0
  115. package/dist/cli/oauth.d.ts.map +1 -0
  116. package/dist/cli/oauth.js +296 -0
  117. package/dist/cli/oauth.js.map +1 -0
  118. package/dist/cli/ontology.d.ts +6 -0
  119. package/dist/cli/ontology.d.ts.map +1 -0
  120. package/dist/cli/ontology.js +231 -0
  121. package/dist/cli/ontology.js.map +1 -0
  122. package/dist/cli/polarity.d.ts +6 -0
  123. package/dist/cli/polarity.d.ts.map +1 -0
  124. package/dist/cli/polarity.js +295 -0
  125. package/dist/cli/polarity.js.map +1 -0
  126. package/dist/cli/projection.d.ts +8 -0
  127. package/dist/cli/projection.d.ts.map +1 -0
  128. package/dist/cli/projection.js +297 -0
  129. package/dist/cli/projection.js.map +1 -0
  130. package/dist/cli/query-def.d.ts +8 -0
  131. package/dist/cli/query-def.d.ts.map +1 -0
  132. package/dist/cli/query-def.js +163 -0
  133. package/dist/cli/query-def.js.map +1 -0
  134. package/dist/cli/rbac.d.ts +12 -0
  135. package/dist/cli/rbac.d.ts.map +1 -0
  136. package/dist/cli/rbac.js +615 -0
  137. package/dist/cli/rbac.js.map +1 -0
  138. package/dist/cli/search.d.ts +6 -0
  139. package/dist/cli/search.d.ts.map +1 -0
  140. package/dist/cli/search.js +829 -0
  141. package/dist/cli/search.js.map +1 -0
  142. package/dist/cli/source.d.ts +6 -0
  143. package/dist/cli/source.d.ts.map +1 -0
  144. package/dist/cli/source.js +202 -0
  145. package/dist/cli/source.js.map +1 -0
  146. package/dist/cli/verb-router.d.ts +25 -0
  147. package/dist/cli/verb-router.d.ts.map +1 -0
  148. package/dist/cli/verb-router.js +415 -0
  149. package/dist/cli/verb-router.js.map +1 -0
  150. package/dist/cli/vocabulary/config.d.ts +7 -0
  151. package/dist/cli/vocabulary/config.d.ts.map +1 -0
  152. package/dist/cli/vocabulary/config.js +201 -0
  153. package/dist/cli/vocabulary/config.js.map +1 -0
  154. package/dist/cli/vocabulary/consolidate.d.ts +8 -0
  155. package/dist/cli/vocabulary/consolidate.d.ts.map +1 -0
  156. package/dist/cli/vocabulary/consolidate.js +192 -0
  157. package/dist/cli/vocabulary/consolidate.js.map +1 -0
  158. package/dist/cli/vocabulary/embeddings.d.ts +9 -0
  159. package/dist/cli/vocabulary/embeddings.d.ts.map +1 -0
  160. package/dist/cli/vocabulary/embeddings.js +205 -0
  161. package/dist/cli/vocabulary/embeddings.js.map +1 -0
  162. package/dist/cli/vocabulary/epistemic.d.ts +7 -0
  163. package/dist/cli/vocabulary/epistemic.d.ts.map +1 -0
  164. package/dist/cli/vocabulary/epistemic.js +315 -0
  165. package/dist/cli/vocabulary/epistemic.js.map +1 -0
  166. package/dist/cli/vocabulary/index.d.ts +7 -0
  167. package/dist/cli/vocabulary/index.d.ts.map +1 -0
  168. package/dist/cli/vocabulary/index.js +45 -0
  169. package/dist/cli/vocabulary/index.js.map +1 -0
  170. package/dist/cli/vocabulary/profiles.d.ts +7 -0
  171. package/dist/cli/vocabulary/profiles.d.ts.map +1 -0
  172. package/dist/cli/vocabulary/profiles.js +171 -0
  173. package/dist/cli/vocabulary/profiles.js.map +1 -0
  174. package/dist/cli/vocabulary/similarity.d.ts +9 -0
  175. package/dist/cli/vocabulary/similarity.d.ts.map +1 -0
  176. package/dist/cli/vocabulary/similarity.js +199 -0
  177. package/dist/cli/vocabulary/similarity.js.map +1 -0
  178. package/dist/cli/vocabulary/status.d.ts +8 -0
  179. package/dist/cli/vocabulary/status.d.ts.map +1 -0
  180. package/dist/cli/vocabulary/status.js +280 -0
  181. package/dist/cli/vocabulary/status.js.map +1 -0
  182. package/dist/cli/vocabulary/sync.d.ts +7 -0
  183. package/dist/cli/vocabulary/sync.d.ts.map +1 -0
  184. package/dist/cli/vocabulary/sync.js +111 -0
  185. package/dist/cli/vocabulary/sync.js.map +1 -0
  186. package/dist/index.d.ts +9 -0
  187. package/dist/index.d.ts.map +1 -0
  188. package/dist/index.js +16 -0
  189. package/dist/index.js.map +1 -0
  190. package/dist/lib/auth/auth-client.d.ts +247 -0
  191. package/dist/lib/auth/auth-client.d.ts.map +1 -0
  192. package/dist/lib/auth/auth-client.js +305 -0
  193. package/dist/lib/auth/auth-client.js.map +1 -0
  194. package/dist/lib/auth/challenge.d.ts +39 -0
  195. package/dist/lib/auth/challenge.d.ts.map +1 -0
  196. package/dist/lib/auth/challenge.js +125 -0
  197. package/dist/lib/auth/challenge.js.map +1 -0
  198. package/dist/lib/auth/client-credentials-flow.d.ts +58 -0
  199. package/dist/lib/auth/client-credentials-flow.d.ts.map +1 -0
  200. package/dist/lib/auth/client-credentials-flow.js +118 -0
  201. package/dist/lib/auth/client-credentials-flow.js.map +1 -0
  202. package/dist/lib/auth/device-flow.d.ts +75 -0
  203. package/dist/lib/auth/device-flow.d.ts.map +1 -0
  204. package/dist/lib/auth/device-flow.js +177 -0
  205. package/dist/lib/auth/device-flow.js.map +1 -0
  206. package/dist/lib/auth/index.d.ts +14 -0
  207. package/dist/lib/auth/index.d.ts.map +1 -0
  208. package/dist/lib/auth/index.js +34 -0
  209. package/dist/lib/auth/index.js.map +1 -0
  210. package/dist/lib/auth/oauth-types.d.ts +69 -0
  211. package/dist/lib/auth/oauth-types.d.ts.map +1 -0
  212. package/dist/lib/auth/oauth-types.js +10 -0
  213. package/dist/lib/auth/oauth-types.js.map +1 -0
  214. package/dist/lib/auth/oauth-utils.d.ts +51 -0
  215. package/dist/lib/auth/oauth-utils.d.ts.map +1 -0
  216. package/dist/lib/auth/oauth-utils.js +110 -0
  217. package/dist/lib/auth/oauth-utils.js.map +1 -0
  218. package/dist/lib/auth/token-manager.d.ts +87 -0
  219. package/dist/lib/auth/token-manager.d.ts.map +1 -0
  220. package/dist/lib/auth/token-manager.js +139 -0
  221. package/dist/lib/auth/token-manager.js.map +1 -0
  222. package/dist/lib/auth/token-refresh.d.ts +63 -0
  223. package/dist/lib/auth/token-refresh.d.ts.map +1 -0
  224. package/dist/lib/auth/token-refresh.js +141 -0
  225. package/dist/lib/auth/token-refresh.js.map +1 -0
  226. package/dist/lib/config.d.ts +286 -0
  227. package/dist/lib/config.d.ts.map +1 -0
  228. package/dist/lib/config.js +537 -0
  229. package/dist/lib/config.js.map +1 -0
  230. package/dist/lib/job-stream.d.ts +53 -0
  231. package/dist/lib/job-stream.d.ts.map +1 -0
  232. package/dist/lib/job-stream.js +153 -0
  233. package/dist/lib/job-stream.js.map +1 -0
  234. package/dist/lib/mcp-allowlist.d.ts +101 -0
  235. package/dist/lib/mcp-allowlist.d.ts.map +1 -0
  236. package/dist/lib/mcp-allowlist.js +340 -0
  237. package/dist/lib/mcp-allowlist.js.map +1 -0
  238. package/dist/lib/table-example.d.ts +7 -0
  239. package/dist/lib/table-example.d.ts.map +1 -0
  240. package/dist/lib/table-example.js +105 -0
  241. package/dist/lib/table-example.js.map +1 -0
  242. package/dist/lib/table.d.ts +95 -0
  243. package/dist/lib/table.d.ts.map +1 -0
  244. package/dist/lib/table.js +263 -0
  245. package/dist/lib/table.js.map +1 -0
  246. package/dist/lib/terminal-images.d.ts +66 -0
  247. package/dist/lib/terminal-images.d.ts.map +1 -0
  248. package/dist/lib/terminal-images.js +268 -0
  249. package/dist/lib/terminal-images.js.map +1 -0
  250. package/dist/mcp/formatters.d.ts +100 -0
  251. package/dist/mcp/formatters.d.ts.map +1 -0
  252. package/dist/mcp/formatters.js +1411 -0
  253. package/dist/mcp/formatters.js.map +1 -0
  254. package/dist/mcp-server.d.ts +9 -0
  255. package/dist/mcp-server.d.ts.map +1 -0
  256. package/dist/mcp-server.js +1810 -0
  257. package/dist/mcp-server.js.map +1 -0
  258. package/dist/types/index.d.ts +742 -0
  259. package/dist/types/index.d.ts.map +1 -0
  260. package/dist/types/index.js +6 -0
  261. package/dist/types/index.js.map +1 -0
  262. package/dist/version.d.ts +10 -0
  263. package/dist/version.d.ts.map +1 -0
  264. package/dist/version.js +13 -0
  265. package/dist/version.js.map +1 -0
  266. package/package.json +84 -0
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Vocabulary Consolidation Commands
3
+ * AI-assisted consolidation and manual merge (ADR-032)
4
+ */
5
+ import { Command } from 'commander';
6
+ export declare function createConsolidateCommand(): Command;
7
+ export declare function createMergeCommand(): Command;
8
+ //# sourceMappingURL=consolidate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consolidate.d.ts","sourceRoot":"","sources":["../../../src/cli/vocabulary/consolidate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,wBAAwB,IAAI,OAAO,CAkHlD;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAuC5C"}
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ /**
3
+ * Vocabulary Consolidation Commands
4
+ * AI-assisted consolidation and manual merge (ADR-032)
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.createConsolidateCommand = createConsolidateCommand;
41
+ exports.createMergeCommand = createMergeCommand;
42
+ const commander_1 = require("commander");
43
+ const client_1 = require("../../api/client");
44
+ const colors = __importStar(require("../colors"));
45
+ const colors_1 = require("../colors");
46
+ function createConsolidateCommand() {
47
+ return new commander_1.Command('consolidate')
48
+ .description('AI-assisted vocabulary consolidation workflow (AITL - AI-in-the-loop, ADR-032). Analyzes vocabulary via embeddings, identifies similar pairs above threshold, presents merge recommendations.')
49
+ .option('-t, --target <size>', 'Target vocabulary size', '90')
50
+ .option('--threshold <value>', 'Auto-execute threshold (0.0-1.0)', '0.90')
51
+ .option('--dry-run', 'Evaluate candidates without executing merges')
52
+ .option('--auto', 'Auto-execute high confidence merges (AITL mode)')
53
+ .option('--no-prune-unused', 'Skip pruning vocabulary types with 0 uses')
54
+ .action(async (options) => {
55
+ try {
56
+ const client = (0, client_1.createClientFromEnv)();
57
+ const targetSize = parseInt(options.target);
58
+ const threshold = parseFloat(options.threshold);
59
+ const dryRun = options.dryRun || false;
60
+ const autoMode = options.auto || false;
61
+ const pruneUnused = options.pruneUnused !== false;
62
+ // Validate inputs
63
+ if (isNaN(targetSize) || targetSize < 30 || targetSize > 200) {
64
+ console.error(colors.status.error('✗ Target size must be between 30 and 200'));
65
+ process.exit(1);
66
+ }
67
+ if (isNaN(threshold) || threshold < 0 || threshold > 1) {
68
+ console.error(colors.status.error('✗ Threshold must be between 0.0 and 1.0'));
69
+ process.exit(1);
70
+ }
71
+ // Show mode
72
+ console.log('\n' + (0, colors_1.separator)());
73
+ console.log(colors.ui.title('🔄 Vocabulary Consolidation'));
74
+ console.log((0, colors_1.separator)());
75
+ if (dryRun) {
76
+ console.log(`\n${colors.ui.key('Mode:')} ${colors.status.dim('DRY RUN')} (validation only)`);
77
+ }
78
+ else if (autoMode) {
79
+ console.log(`\n${colors.ui.key('Mode:')} ${colors.status.warning('AUTO')} (AITL - auto-execute)`);
80
+ }
81
+ else {
82
+ console.log(`\n${colors.ui.key('Mode:')} ${colors.ui.value('DEFAULT')} (dry-run validation)`);
83
+ }
84
+ console.log(`${colors.ui.key('Target Size:')} ${(0, colors_1.coloredCount)(targetSize)}`);
85
+ console.log(`${colors.ui.key('Auto-Execute Threshold:')} ${colors.ui.value((threshold * 100).toFixed(0) + '%')}`);
86
+ console.log(`${colors.ui.key('Prune Unused:')} ${pruneUnused ? colors.status.success('Enabled') : colors.status.dim('Disabled')}`);
87
+ // Run consolidation
88
+ console.log('\n' + colors.status.dim('Running LLM-based consolidation workflow...'));
89
+ console.log(colors.status.dim('This may take a few minutes depending on vocabulary size.\n'));
90
+ const result = await client.consolidateVocabulary({
91
+ target_size: targetSize,
92
+ batch_size: 1,
93
+ auto_execute_threshold: threshold,
94
+ dry_run: dryRun || !autoMode,
95
+ prune_unused: pruneUnused
96
+ });
97
+ // Display results
98
+ console.log('\n' + (0, colors_1.separator)());
99
+ console.log(colors.ui.title('📊 Consolidation Results'));
100
+ console.log((0, colors_1.separator)());
101
+ console.log('\n' + colors.stats.section('Summary'));
102
+ console.log(` ${colors.stats.label('Initial Size:')} ${(0, colors_1.coloredCount)(result.initial_size)}`);
103
+ console.log(` ${colors.stats.label('Final Size:')} ${(0, colors_1.coloredCount)(result.final_size)}`);
104
+ if (result.size_reduction > 0) {
105
+ console.log(` ${colors.stats.label('Reduction:')} ${colors.status.success('-' + result.size_reduction)}`);
106
+ }
107
+ else {
108
+ console.log(` ${colors.stats.label('Reduction:')} ${colors.status.dim('0')}`);
109
+ }
110
+ console.log(` ${colors.stats.label('Merged:')} ${(0, colors_1.coloredCount)(result.auto_executed.length)}`);
111
+ console.log(` ${colors.stats.label('Rejected:')} ${(0, colors_1.coloredCount)(result.rejected.length)}`);
112
+ if (result.pruned_count !== undefined && result.pruned_count > 0) {
113
+ console.log(` ${colors.stats.label('Pruned:')} ${colors.status.success(result.pruned_count.toString())}`);
114
+ }
115
+ // Auto-executed merges
116
+ if (result.auto_executed.length > 0) {
117
+ console.log('\n' + colors.stats.section('Auto-Executed Merges'));
118
+ console.log((0, colors_1.separator)(80, '─'));
119
+ result.auto_executed.forEach((merge) => {
120
+ const status = merge.error ? '✗' : '✓';
121
+ const statusColor = merge.error ? colors.status.error : colors.status.success;
122
+ console.log(`\n${statusColor(status)} ${merge.deprecated} → ${merge.target}`);
123
+ console.log(` ${colors.ui.key('Similarity:')} ${colors.ui.value((merge.similarity * 100).toFixed(1) + '%')}`);
124
+ console.log(` ${colors.ui.key('Reasoning:')} ${colors.status.dim(merge.reasoning)}`);
125
+ if (merge.edges_updated !== undefined) {
126
+ console.log(` ${colors.ui.key('Edges Updated:')} ${(0, colors_1.coloredCount)(merge.edges_updated)}`);
127
+ }
128
+ if (merge.error) {
129
+ console.log(` ${colors.status.error('ERROR:')} ${merge.error}`);
130
+ }
131
+ });
132
+ }
133
+ // Rejected
134
+ if (result.rejected.length > 0) {
135
+ console.log('\n' + colors.stats.section(`Rejected Merges (showing first 10 of ${result.rejected.length})`));
136
+ console.log((0, colors_1.separator)(80, '─'));
137
+ result.rejected.slice(0, 10).forEach((reject) => {
138
+ console.log(`\n✗ ${reject.type1} + ${reject.type2}`);
139
+ console.log(` ${colors.ui.key('Reasoning:')} ${colors.status.dim(reject.reasoning)}`);
140
+ });
141
+ }
142
+ console.log('\n' + (0, colors_1.separator)());
143
+ console.log(colors.status.success('✓ ' + result.message));
144
+ console.log((0, colors_1.separator)());
145
+ }
146
+ catch (error) {
147
+ console.error(colors.status.error('✗ Failed to consolidate vocabulary'));
148
+ console.error(colors.status.error(error.response?.data?.detail || error.message));
149
+ process.exit(1);
150
+ }
151
+ });
152
+ }
153
+ function createMergeCommand() {
154
+ return new commander_1.Command('merge')
155
+ .description('Manually merge one edge type into another. Redirects all edges from deprecated type to target type.')
156
+ .argument('<deprecated-type>', 'Edge type to deprecate (becomes inactive)')
157
+ .argument('<target-type>', 'Target edge type to merge into (receives all edges)')
158
+ .option('-r, --reason <text>', 'Reason for merge (audit trail)')
159
+ .option('-u, --user <email>', 'User performing the merge', 'cli-user')
160
+ .action(async (deprecatedType, targetType, options) => {
161
+ try {
162
+ const client = (0, client_1.createClientFromEnv)();
163
+ console.log('\n' + colors.status.warning('⚠️ Merging edge types...'));
164
+ console.log(` ${colors.ui.key('Deprecated:')} ${colors.getRelationshipColor(deprecatedType)(deprecatedType)}`);
165
+ console.log(` ${colors.ui.key('Target:')} ${colors.getRelationshipColor(targetType)(targetType)}`);
166
+ if (options.reason) {
167
+ console.log(` ${colors.ui.key('Reason:')} ${colors.status.dim(options.reason)}`);
168
+ }
169
+ const result = await client.mergeEdgeTypes({
170
+ deprecated_type: deprecatedType,
171
+ target_type: targetType,
172
+ performed_by: options.user,
173
+ reason: options.reason
174
+ });
175
+ if (result.success) {
176
+ console.log('\n' + colors.status.success('✓ Merge completed successfully'));
177
+ console.log(` ${colors.stats.label('Edges Updated:')} ${(0, colors_1.coloredCount)(result.edges_updated)}`);
178
+ console.log(` ${colors.stats.label('Vocabulary Updated:')} ${(0, colors_1.coloredCount)(result.vocab_updated)}`);
179
+ console.log(`\n ${colors.status.dim(result.message)}`);
180
+ }
181
+ else {
182
+ console.error(colors.status.error('✗ Merge failed'));
183
+ }
184
+ }
185
+ catch (error) {
186
+ console.error(colors.status.error('✗ Failed to merge edge types'));
187
+ console.error(colors.status.error(error.response?.data?.detail || error.message));
188
+ process.exit(1);
189
+ }
190
+ });
191
+ }
192
+ //# sourceMappingURL=consolidate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consolidate.js","sourceRoot":"","sources":["../../../src/cli/vocabulary/consolidate.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOH,4DAkHC;AAED,gDAuCC;AAhKD,yCAAoC;AACpC,6CAAuD;AACvD,kDAAoC;AACpC,sCAAoD;AAEpD,SAAgB,wBAAwB;IACtC,OAAO,IAAI,mBAAO,CAAC,aAAa,CAAC;SAC9B,WAAW,CAAC,+LAA+L,CAAC;SAC5M,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,EA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KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YAClF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Vocabulary Embedding Commands
3
+ * Generate embeddings and manage category assignments (ADR-047)
4
+ */
5
+ import { Command } from 'commander';
6
+ export declare function createGenerateEmbeddingsCommand(): Command;
7
+ export declare function createCategoryScoresCommand(): Command;
8
+ export declare function createRefreshCategoriesCommand(): Command;
9
+ //# sourceMappingURL=embeddings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../../../src/cli/vocabulary/embeddings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,+BAA+B,IAAI,OAAO,CA4DzD;AAED,wBAAgB,2BAA2B,IAAI,OAAO,CA6DrD;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAuDxD"}
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ /**
3
+ * Vocabulary Embedding Commands
4
+ * Generate embeddings and manage category assignments (ADR-047)
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.createGenerateEmbeddingsCommand = createGenerateEmbeddingsCommand;
41
+ exports.createCategoryScoresCommand = createCategoryScoresCommand;
42
+ exports.createRefreshCategoriesCommand = createRefreshCategoriesCommand;
43
+ const commander_1 = require("commander");
44
+ const client_1 = require("../../api/client");
45
+ const colors = __importStar(require("../colors"));
46
+ const colors_1 = require("../colors");
47
+ function createGenerateEmbeddingsCommand() {
48
+ return new commander_1.Command('generate-embeddings')
49
+ .description('Generate vector embeddings for vocabulary types (required for consolidation and categorization).')
50
+ .option('--force', 'Regenerate ALL embeddings regardless of existing state')
51
+ .option('--all', 'Process all active types (not just missing)')
52
+ .action(async (options) => {
53
+ try {
54
+ const client = (0, client_1.createClientFromEnv)();
55
+ const forceRegenerate = options.force || false;
56
+ const onlyMissing = !options.all;
57
+ let modeDescription = '';
58
+ if (forceRegenerate) {
59
+ modeDescription = colors.status.warning('ALL vocabulary types (force regenerate)');
60
+ }
61
+ else if (onlyMissing) {
62
+ modeDescription = colors.ui.value('vocabulary types WITHOUT embeddings (default)');
63
+ }
64
+ else {
65
+ modeDescription = colors.ui.value('all active vocabulary types');
66
+ }
67
+ console.log('\n' + (0, colors_1.separator)());
68
+ console.log(colors.ui.title('🔄 Generating Vocabulary Embeddings'));
69
+ console.log((0, colors_1.separator)());
70
+ console.log(`\n ${colors.ui.key('Mode:')} ${modeDescription}`);
71
+ // Fetch active embedding config to show correct provider
72
+ const embeddingConfig = await client.getEmbeddingConfig();
73
+ const providerName = embeddingConfig.provider === 'openai' ? 'OpenAI' :
74
+ embeddingConfig.provider === 'local' ? 'local embeddings' :
75
+ embeddingConfig.provider;
76
+ const modelInfo = embeddingConfig.model ? ` (${embeddingConfig.model})` : '';
77
+ console.log('\n' + colors.status.dim(` Generating embeddings via ${providerName}${modelInfo}...`));
78
+ const result = await client.generateVocabularyEmbeddings(forceRegenerate, onlyMissing);
79
+ console.log('\n' + (0, colors_1.separator)());
80
+ if (result.success) {
81
+ console.log(colors.status.success('✓ Embedding generation completed successfully'));
82
+ }
83
+ else {
84
+ console.log(colors.status.warning('⚠️ Embedding generation completed with failures'));
85
+ }
86
+ console.log(` ${colors.stats.label('Generated:')} ${(0, colors_1.coloredCount)(result.generated)}`);
87
+ console.log(` ${colors.stats.label('Skipped:')} ${(0, colors_1.coloredCount)(result.skipped)}`);
88
+ if (result.failed > 0) {
89
+ console.log(` ${colors.stats.label('Failed:')} ${colors.status.error(result.failed.toString())}`);
90
+ }
91
+ else {
92
+ console.log(` ${colors.stats.label('Failed:')} ${(0, colors_1.coloredCount)(result.failed)}`);
93
+ }
94
+ console.log('\n' + (0, colors_1.separator)());
95
+ }
96
+ catch (error) {
97
+ console.error(colors.status.error('✗ Failed to generate embeddings'));
98
+ console.error(colors.status.error(error.response?.data?.detail || error.message));
99
+ process.exit(1);
100
+ }
101
+ });
102
+ }
103
+ function createCategoryScoresCommand() {
104
+ return new commander_1.Command('category-scores')
105
+ .description('Show category similarity scores for a specific relationship type (ADR-047).')
106
+ .argument('<type>', 'Relationship type to analyze (e.g., CAUSES, ENABLES)')
107
+ .action(async (relationshipType) => {
108
+ try {
109
+ const client = (0, client_1.createClientFromEnv)();
110
+ const result = await client.getCategoryScores(relationshipType);
111
+ console.log('\n' + (0, colors_1.separator)());
112
+ console.log(colors.ui.title(`📊 Category Scores: ${colors.getRelationshipColor(relationshipType)(relationshipType)}`));
113
+ console.log((0, colors_1.separator)());
114
+ console.log(`\n${colors.stats.section('Assignment')}`);
115
+ console.log(` ${colors.stats.label('Category:')} ${colors.ui.value(result.category)}`);
116
+ const confPercent = (result.confidence * 100).toFixed(0);
117
+ let confColor = colors.status.dim;
118
+ if (result.confidence >= 0.70)
119
+ confColor = colors.status.success;
120
+ else if (result.confidence >= 0.50)
121
+ confColor = colors.status.warning;
122
+ else
123
+ confColor = colors.status.error;
124
+ console.log(` ${colors.stats.label('Confidence:')} ${confColor(confPercent + '%')}`);
125
+ console.log(` ${colors.stats.label('Ambiguous:')} ${result.ambiguous ? colors.status.warning('Yes') : colors.status.success('No')}`);
126
+ if (result.ambiguous && result.runner_up_category) {
127
+ const runnerUpPercent = (result.runner_up_score * 100).toFixed(0);
128
+ console.log(` ${colors.stats.label('Runner-up:')} ${colors.ui.value(result.runner_up_category)} (${runnerUpPercent}%)`);
129
+ }
130
+ console.log(`\n${colors.stats.section('Similarity to Category Seeds')}`);
131
+ const sortedScores = Object.entries(result.scores)
132
+ .sort((a, b) => b[1] - a[1]);
133
+ for (const [category, score] of sortedScores) {
134
+ const scoreNum = score;
135
+ const percent = (scoreNum * 100).toFixed(0).padStart(3);
136
+ const barLength = Math.round(scoreNum * 20);
137
+ const bar = '█'.repeat(barLength);
138
+ const catDisplay = category === result.category
139
+ ? colors.status.success(category.padEnd(15))
140
+ : colors.ui.value(category.padEnd(15));
141
+ console.log(` ${catDisplay} ${percent}% ${bar}`);
142
+ }
143
+ console.log('\n' + (0, colors_1.separator)());
144
+ }
145
+ catch (error) {
146
+ if (error.response?.status === 404) {
147
+ console.error(colors.status.error(`✗ Relationship type not found: ${relationshipType}`));
148
+ console.error(colors.status.dim(' Make sure the type exists and has an embedding'));
149
+ }
150
+ else {
151
+ console.error(colors.status.error('✗ Failed to get category scores'));
152
+ console.error(colors.status.error(error.response?.data?.detail || error.message));
153
+ }
154
+ process.exit(1);
155
+ }
156
+ });
157
+ }
158
+ function createRefreshCategoriesCommand() {
159
+ return new commander_1.Command('refresh-categories')
160
+ .description('Refresh category assignments for vocabulary types using latest embeddings (ADR-047, ADR-053).')
161
+ .option('--computed-only', 'Refresh only types with category_source=computed')
162
+ .action(async (options) => {
163
+ try {
164
+ const client = (0, client_1.createClientFromEnv)();
165
+ const onlyComputed = options.computedOnly || false;
166
+ console.log('\n' + (0, colors_1.separator)());
167
+ console.log(colors.ui.title('🔄 Refreshing Category Assignments'));
168
+ console.log((0, colors_1.separator)());
169
+ const modeDesc = onlyComputed
170
+ ? 'computed categories only (category_source=computed)'
171
+ : 'all active types (default)';
172
+ console.log(`\n ${colors.ui.key('Mode:')} ${colors.ui.value(modeDesc)}`);
173
+ console.log(colors.status.dim('\n Computing category scores via embedding similarity...'));
174
+ const result = await client.refreshCategories(onlyComputed);
175
+ console.log('\n' + (0, colors_1.separator)());
176
+ console.log(colors.status.success('✓ Category refresh completed'));
177
+ console.log(` ${colors.stats.label('Refreshed:')} ${(0, colors_1.coloredCount)(result.refreshed_count)}`);
178
+ console.log(` ${colors.stats.label('Skipped:')} ${(0, colors_1.coloredCount)(result.skipped_count)}`);
179
+ if (result.failed_count > 0) {
180
+ console.log(` ${colors.stats.label('Failed:')} ${colors.status.error(result.failed_count.toString())}`);
181
+ }
182
+ else {
183
+ console.log(` ${colors.stats.label('Failed:')} ${(0, colors_1.coloredCount)(result.failed_count)}`);
184
+ }
185
+ if (result.assignments && result.assignments.length > 0) {
186
+ const sampleSize = Math.min(5, result.assignments.length);
187
+ console.log(`\n${colors.stats.section(`Sample Results (${sampleSize} of ${result.assignments.length})`)}`);
188
+ for (let i = 0; i < sampleSize; i++) {
189
+ const assignment = result.assignments[i];
190
+ const confPercent = (assignment.confidence * 100).toFixed(0);
191
+ const ambiguous = assignment.ambiguous ? colors.status.warning(' ⚠') : '';
192
+ console.log(` ${colors.getRelationshipColor(assignment.relationship_type)(assignment.relationship_type.padEnd(25))} → ` +
193
+ `${colors.ui.value(assignment.category.padEnd(12))} (${confPercent}%)${ambiguous}`);
194
+ }
195
+ }
196
+ console.log('\n' + (0, colors_1.separator)());
197
+ }
198
+ catch (error) {
199
+ console.error(colors.status.error('✗ Failed to refresh categories'));
200
+ console.error(colors.status.error(error.response?.data?.detail || error.message));
201
+ process.exit(1);
202
+ }
203
+ });
204
+ }
205
+ //# sourceMappingURL=embeddings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embeddings.js","sourceRoot":"","sources":["../../../src/cli/vocabulary/embeddings.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOH,0EA4DC;AAED,kEA6DC;AAED,wEAuDC;AAzLD,yCAAoC;AACpC,6CAAuD;AACvD,kDAAoC;AACpC,sCAAoD;AAEpD,SAAgB,+BAA+B;IAC7C,OAAO,IAAI,mBAAO,CAAC,qBAAqB,CAAC;SACtC,WAAW,CAAC,kGAAkG,CAAC;SAC/G,MAAM,CAAC,SAAS,EAAE,wDAAwD,CAAC;SAC3E,MAAM,CAAC,OAAO,EAAE,6CAA6C,CAAC;SAC9D,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACxB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAA,4BAAmB,GAAE,CAAC;YAErC,MAAM,eAAe,GAAG,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC;YAC/C,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC;YAEjC,IAAI,eAAe,GAAG,EAAE,CAAC;YACzB,IAAI,eAAe,EAAE,CAAC;gBACpB,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,yCAAyC,CAAC,CAAC;YACrF,CAAC;iBAAM,IAAI,WAAW,EAAE,CAAC;gBACvB,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;YACrF,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I,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Vocabulary Epistemic Status Commands
3
+ * Knowledge validation state based on grounding patterns (ADR-065)
4
+ */
5
+ import { Command } from 'commander';
6
+ export declare function createEpistemicStatusCommand(): Command;
7
+ //# sourceMappingURL=epistemic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"epistemic.d.ts","sourceRoot":"","sources":["../../../src/cli/vocabulary/epistemic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,4BAA4B,IAAI,OAAO,CAgUtD"}