anantham-v2 2.0.0-alpha.1 → 2.0.2

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 (466) hide show
  1. package/dist/agents/subagent-handoff-protocol.d.ts +24 -0
  2. package/dist/agents/subagent-handoff-protocol.d.ts.map +1 -0
  3. package/dist/agents/subagent-handoff-protocol.js +48 -0
  4. package/dist/agents/subagent-handoff-protocol.js.map +1 -0
  5. package/dist/api/gateway-route-pipeline.d.ts +27 -0
  6. package/dist/api/gateway-route-pipeline.d.ts.map +1 -0
  7. package/dist/api/gateway-route-pipeline.js +58 -0
  8. package/dist/api/gateway-route-pipeline.js.map +1 -0
  9. package/dist/api/openapi-spec-generator.d.ts +23 -0
  10. package/dist/api/openapi-spec-generator.d.ts.map +1 -0
  11. package/dist/api/openapi-spec-generator.js +77 -0
  12. package/dist/api/openapi-spec-generator.js.map +1 -0
  13. package/dist/api/webhook-dlq-router.d.ts +24 -0
  14. package/dist/api/webhook-dlq-router.d.ts.map +1 -0
  15. package/dist/api/webhook-dlq-router.js +62 -0
  16. package/dist/api/webhook-dlq-router.js.map +1 -0
  17. package/dist/bin/anantham.js +17 -2
  18. package/dist/bin/anantham.js.map +1 -1
  19. package/dist/cli/cli-application.d.ts.map +1 -1
  20. package/dist/cli/cli-application.js +3 -0
  21. package/dist/cli/cli-application.js.map +1 -1
  22. package/dist/cli/command-parser.d.ts +5 -0
  23. package/dist/cli/command-parser.d.ts.map +1 -1
  24. package/dist/cli/command-parser.js +40 -9
  25. package/dist/cli/command-parser.js.map +1 -1
  26. package/dist/cli/command-registry.d.ts.map +1 -1
  27. package/dist/cli/command-registry.js +289 -9
  28. package/dist/cli/command-registry.js.map +1 -1
  29. package/dist/cli/commands/slash-migrate.d.ts +6 -0
  30. package/dist/cli/commands/slash-migrate.d.ts.map +1 -0
  31. package/dist/cli/commands/slash-migrate.js +6 -0
  32. package/dist/cli/commands/slash-migrate.js.map +1 -0
  33. package/dist/cli/error-handler.d.ts.map +1 -1
  34. package/dist/cli/error-handler.js +55 -1
  35. package/dist/cli/error-handler.js.map +1 -1
  36. package/dist/cli/interactive-shell.d.ts +27 -0
  37. package/dist/cli/interactive-shell.d.ts.map +1 -0
  38. package/dist/cli/interactive-shell.js +99 -0
  39. package/dist/cli/interactive-shell.js.map +1 -0
  40. package/dist/cli/keybindings-manager.d.ts +27 -0
  41. package/dist/cli/keybindings-manager.d.ts.map +1 -0
  42. package/dist/cli/keybindings-manager.js +43 -0
  43. package/dist/cli/keybindings-manager.js.map +1 -0
  44. package/dist/cli/notification-manager.d.ts +28 -0
  45. package/dist/cli/notification-manager.d.ts.map +1 -0
  46. package/dist/cli/notification-manager.js +47 -0
  47. package/dist/cli/notification-manager.js.map +1 -0
  48. package/dist/cli/shell-integration-generator.d.ts +13 -0
  49. package/dist/cli/shell-integration-generator.d.ts.map +1 -0
  50. package/dist/cli/shell-integration-generator.js +79 -0
  51. package/dist/cli/shell-integration-generator.js.map +1 -0
  52. package/dist/cli/slash-commands-registry.d.ts +30 -0
  53. package/dist/cli/slash-commands-registry.d.ts.map +1 -0
  54. package/dist/cli/slash-commands-registry.js +130 -0
  55. package/dist/cli/slash-commands-registry.js.map +1 -0
  56. package/dist/cli/slash-migrate.d.ts +28 -0
  57. package/dist/cli/slash-migrate.d.ts.map +1 -0
  58. package/dist/cli/slash-migrate.js +100 -0
  59. package/dist/cli/slash-migrate.js.map +1 -0
  60. package/dist/cli/terminal-theme-renderer.d.ts +27 -0
  61. package/dist/cli/terminal-theme-renderer.d.ts.map +1 -0
  62. package/dist/cli/terminal-theme-renderer.js +93 -0
  63. package/dist/cli/terminal-theme-renderer.js.map +1 -0
  64. package/dist/cli/terminal-title-manager.d.ts +13 -0
  65. package/dist/cli/terminal-title-manager.d.ts.map +1 -0
  66. package/dist/cli/terminal-title-manager.js +37 -0
  67. package/dist/cli/terminal-title-manager.js.map +1 -0
  68. package/dist/code-intel/code-index-engine.d.ts +31 -0
  69. package/dist/code-intel/code-index-engine.d.ts.map +1 -0
  70. package/dist/code-intel/code-index-engine.js +258 -0
  71. package/dist/code-intel/code-index-engine.js.map +1 -0
  72. package/dist/code-intel/code-intel-orchestrator.d.ts +28 -0
  73. package/dist/code-intel/code-intel-orchestrator.d.ts.map +1 -0
  74. package/dist/code-intel/code-intel-orchestrator.js +45 -0
  75. package/dist/code-intel/code-intel-orchestrator.js.map +1 -0
  76. package/dist/code-intel/fault-isolator.d.ts +19 -0
  77. package/dist/code-intel/fault-isolator.d.ts.map +1 -0
  78. package/dist/code-intel/fault-isolator.js +147 -0
  79. package/dist/code-intel/fault-isolator.js.map +1 -0
  80. package/dist/code-intel/file-watcher-sync.d.ts +29 -0
  81. package/dist/code-intel/file-watcher-sync.d.ts.map +1 -0
  82. package/dist/code-intel/file-watcher-sync.js +84 -0
  83. package/dist/code-intel/file-watcher-sync.js.map +1 -0
  84. package/dist/code-intel/incremental-indexer.d.ts +30 -0
  85. package/dist/code-intel/incremental-indexer.d.ts.map +1 -0
  86. package/dist/code-intel/incremental-indexer.js +90 -0
  87. package/dist/code-intel/incremental-indexer.js.map +1 -0
  88. package/dist/code-intel/index.d.ts +13 -0
  89. package/dist/code-intel/index.d.ts.map +1 -0
  90. package/dist/code-intel/index.js +13 -0
  91. package/dist/code-intel/index.js.map +1 -0
  92. package/dist/code-intel/lsp-bridge.d.ts +43 -0
  93. package/dist/code-intel/lsp-bridge.d.ts.map +1 -0
  94. package/dist/code-intel/lsp-bridge.js +103 -0
  95. package/dist/code-intel/lsp-bridge.js.map +1 -0
  96. package/dist/code-intel/parsers/multi-language-ast-parser.d.ts +22 -0
  97. package/dist/code-intel/parsers/multi-language-ast-parser.d.ts.map +1 -0
  98. package/dist/code-intel/parsers/multi-language-ast-parser.js +536 -0
  99. package/dist/code-intel/parsers/multi-language-ast-parser.js.map +1 -0
  100. package/dist/code-intel/project-knowledge-graph.d.ts +36 -0
  101. package/dist/code-intel/project-knowledge-graph.d.ts.map +1 -0
  102. package/dist/code-intel/project-knowledge-graph.js +79 -0
  103. package/dist/code-intel/project-knowledge-graph.js.map +1 -0
  104. package/dist/code-intel/types.d.ts +92 -0
  105. package/dist/code-intel/types.d.ts.map +1 -0
  106. package/dist/code-intel/types.js +6 -0
  107. package/dist/code-intel/types.js.map +1 -0
  108. package/dist/context/compaction-loss-evaluator.d.ts +135 -0
  109. package/dist/context/compaction-loss-evaluator.d.ts.map +1 -0
  110. package/dist/context/compaction-loss-evaluator.js +232 -0
  111. package/dist/context/compaction-loss-evaluator.js.map +1 -0
  112. package/dist/context/index.d.ts +1 -0
  113. package/dist/context/index.d.ts.map +1 -1
  114. package/dist/context/index.js +1 -0
  115. package/dist/context/index.js.map +1 -1
  116. package/dist/evaluation/ab-testing-engine.d.ts +28 -0
  117. package/dist/evaluation/ab-testing-engine.d.ts.map +1 -0
  118. package/dist/evaluation/ab-testing-engine.js +64 -0
  119. package/dist/evaluation/ab-testing-engine.js.map +1 -0
  120. package/dist/evaluation/agent-behavior-regression.d.ts +19 -0
  121. package/dist/evaluation/agent-behavior-regression.d.ts.map +1 -0
  122. package/dist/evaluation/agent-behavior-regression.js +45 -0
  123. package/dist/evaluation/agent-behavior-regression.js.map +1 -0
  124. package/dist/evaluation/anti-contamination-guard.d.ts +19 -0
  125. package/dist/evaluation/anti-contamination-guard.d.ts.map +1 -0
  126. package/dist/evaluation/anti-contamination-guard.js +40 -0
  127. package/dist/evaluation/anti-contamination-guard.js.map +1 -0
  128. package/dist/evaluation/benchmark-report-generator.d.ts +10 -0
  129. package/dist/evaluation/benchmark-report-generator.d.ts.map +1 -0
  130. package/dist/evaluation/benchmark-report-generator.js +57 -0
  131. package/dist/evaluation/benchmark-report-generator.js.map +1 -0
  132. package/dist/evaluation/continuous-eval-pipeline.d.ts +27 -0
  133. package/dist/evaluation/continuous-eval-pipeline.d.ts.map +1 -0
  134. package/dist/evaluation/continuous-eval-pipeline.js +44 -0
  135. package/dist/evaluation/continuous-eval-pipeline.js.map +1 -0
  136. package/dist/evaluation/eval-engine.d.ts +31 -0
  137. package/dist/evaluation/eval-engine.d.ts.map +1 -0
  138. package/dist/evaluation/eval-engine.js +57 -0
  139. package/dist/evaluation/eval-engine.js.map +1 -0
  140. package/dist/evaluation/ground-truth-comparator.d.ts +13 -0
  141. package/dist/evaluation/ground-truth-comparator.d.ts.map +1 -0
  142. package/dist/evaluation/ground-truth-comparator.js +56 -0
  143. package/dist/evaluation/ground-truth-comparator.js.map +1 -0
  144. package/dist/evaluation/hitl-review-dashboard.d.ts +25 -0
  145. package/dist/evaluation/hitl-review-dashboard.d.ts.map +1 -0
  146. package/dist/evaluation/hitl-review-dashboard.js +40 -0
  147. package/dist/evaluation/hitl-review-dashboard.js.map +1 -0
  148. package/dist/evaluation/humaneval-harness.d.ts +21 -0
  149. package/dist/evaluation/humaneval-harness.d.ts.map +1 -0
  150. package/dist/evaluation/humaneval-harness.js +47 -0
  151. package/dist/evaluation/humaneval-harness.js.map +1 -0
  152. package/dist/evaluation/index.d.ts +14 -0
  153. package/dist/evaluation/index.d.ts.map +1 -1
  154. package/dist/evaluation/index.js +14 -0
  155. package/dist/evaluation/index.js.map +1 -1
  156. package/dist/evaluation/model-arena.d.ts +33 -0
  157. package/dist/evaluation/model-arena.d.ts.map +1 -0
  158. package/dist/evaluation/model-arena.js +60 -0
  159. package/dist/evaluation/model-arena.js.map +1 -0
  160. package/dist/evaluation/multi-dimensional-grader.d.ts +22 -0
  161. package/dist/evaluation/multi-dimensional-grader.d.ts.map +1 -0
  162. package/dist/evaluation/multi-dimensional-grader.js +38 -0
  163. package/dist/evaluation/multi-dimensional-grader.js.map +1 -0
  164. package/dist/evaluation/swe-bench-harness.d.ts +25 -0
  165. package/dist/evaluation/swe-bench-harness.d.ts.map +1 -0
  166. package/dist/evaluation/swe-bench-harness.js +55 -0
  167. package/dist/evaluation/swe-bench-harness.js.map +1 -0
  168. package/dist/evaluation/synthetic-case-generator.d.ts +10 -0
  169. package/dist/evaluation/synthetic-case-generator.d.ts.map +1 -0
  170. package/dist/evaluation/synthetic-case-generator.js +49 -0
  171. package/dist/evaluation/synthetic-case-generator.js.map +1 -0
  172. package/dist/evaluation/workflow-profiler.d.ts +30 -0
  173. package/dist/evaluation/workflow-profiler.d.ts.map +1 -0
  174. package/dist/evaluation/workflow-profiler.js +47 -0
  175. package/dist/evaluation/workflow-profiler.js.map +1 -0
  176. package/dist/event-state/delta-snapshot-manager.d.ts +266 -0
  177. package/dist/event-state/delta-snapshot-manager.d.ts.map +1 -0
  178. package/dist/event-state/delta-snapshot-manager.js +446 -0
  179. package/dist/event-state/delta-snapshot-manager.js.map +1 -0
  180. package/dist/event-state/index.d.ts +1 -0
  181. package/dist/event-state/index.d.ts.map +1 -1
  182. package/dist/event-state/index.js +1 -0
  183. package/dist/event-state/index.js.map +1 -1
  184. package/dist/execution/index.d.ts +6 -15
  185. package/dist/execution/index.d.ts.map +1 -1
  186. package/dist/execution/index.js +6 -15
  187. package/dist/execution/index.js.map +1 -1
  188. package/dist/execution/process-bounds-manager.d.ts +24 -0
  189. package/dist/execution/process-bounds-manager.d.ts.map +1 -0
  190. package/dist/execution/process-bounds-manager.js +115 -0
  191. package/dist/execution/process-bounds-manager.js.map +1 -0
  192. package/dist/execution/risk-classifier.d.ts +15 -0
  193. package/dist/execution/risk-classifier.d.ts.map +1 -0
  194. package/dist/execution/risk-classifier.js +104 -0
  195. package/dist/execution/risk-classifier.js.map +1 -0
  196. package/dist/execution/sandbox-manager.d.ts +40 -0
  197. package/dist/execution/sandbox-manager.d.ts.map +1 -0
  198. package/dist/execution/sandbox-manager.js +78 -0
  199. package/dist/execution/sandbox-manager.js.map +1 -0
  200. package/dist/execution/tool-gateway-orchestrator.d.ts +28 -0
  201. package/dist/execution/tool-gateway-orchestrator.d.ts.map +1 -0
  202. package/dist/execution/tool-gateway-orchestrator.js +143 -0
  203. package/dist/execution/tool-gateway-orchestrator.js.map +1 -0
  204. package/dist/execution/types.d.ts +47 -0
  205. package/dist/execution/types.d.ts.map +1 -0
  206. package/dist/execution/types.js +6 -0
  207. package/dist/execution/types.js.map +1 -0
  208. package/dist/governance/air-gapped-policy-enforcer.d.ts +106 -0
  209. package/dist/governance/air-gapped-policy-enforcer.d.ts.map +1 -0
  210. package/dist/governance/air-gapped-policy-enforcer.js +243 -0
  211. package/dist/governance/air-gapped-policy-enforcer.js.map +1 -0
  212. package/dist/governance/data-retention-manager.d.ts +109 -0
  213. package/dist/governance/data-retention-manager.d.ts.map +1 -0
  214. package/dist/governance/data-retention-manager.js +167 -0
  215. package/dist/governance/data-retention-manager.js.map +1 -0
  216. package/dist/governance/index.d.ts +3 -0
  217. package/dist/governance/index.d.ts.map +1 -0
  218. package/dist/governance/index.js +3 -0
  219. package/dist/governance/index.js.map +1 -0
  220. package/dist/index.d.ts +1 -0
  221. package/dist/index.d.ts.map +1 -1
  222. package/dist/index.js.map +1 -1
  223. package/dist/integrations/connector-dlq-router.d.ts +122 -0
  224. package/dist/integrations/connector-dlq-router.d.ts.map +1 -0
  225. package/dist/integrations/connector-dlq-router.js +259 -0
  226. package/dist/integrations/connector-dlq-router.js.map +1 -0
  227. package/dist/integrations/index.d.ts +1 -0
  228. package/dist/integrations/index.d.ts.map +1 -1
  229. package/dist/integrations/index.js +1 -0
  230. package/dist/integrations/index.js.map +1 -1
  231. package/dist/memory/index.d.ts +1 -0
  232. package/dist/memory/index.d.ts.map +1 -1
  233. package/dist/memory/index.js +1 -0
  234. package/dist/memory/index.js.map +1 -1
  235. package/dist/memory/memory-decay-engine.d.ts +103 -0
  236. package/dist/memory/memory-decay-engine.d.ts.map +1 -0
  237. package/dist/memory/memory-decay-engine.js +223 -0
  238. package/dist/memory/memory-decay-engine.js.map +1 -0
  239. package/dist/multimodal/audio-transcription-engine.d.ts +13 -0
  240. package/dist/multimodal/audio-transcription-engine.d.ts.map +1 -0
  241. package/dist/multimodal/audio-transcription-engine.js +32 -0
  242. package/dist/multimodal/audio-transcription-engine.js.map +1 -0
  243. package/dist/multimodal/document-pdf-extractor.d.ts +9 -0
  244. package/dist/multimodal/document-pdf-extractor.d.ts.map +1 -0
  245. package/dist/multimodal/document-pdf-extractor.js +60 -0
  246. package/dist/multimodal/document-pdf-extractor.js.map +1 -0
  247. package/dist/multimodal/image-processor.d.ts +16 -0
  248. package/dist/multimodal/image-processor.d.ts.map +1 -0
  249. package/dist/multimodal/image-processor.js +118 -0
  250. package/dist/multimodal/image-processor.js.map +1 -0
  251. package/dist/multimodal/index.d.ts +13 -0
  252. package/dist/multimodal/index.d.ts.map +1 -0
  253. package/dist/multimodal/index.js +13 -0
  254. package/dist/multimodal/index.js.map +1 -0
  255. package/dist/multimodal/multimodal-context-injector.d.ts +21 -0
  256. package/dist/multimodal/multimodal-context-injector.d.ts.map +1 -0
  257. package/dist/multimodal/multimodal-context-injector.js +73 -0
  258. package/dist/multimodal/multimodal-context-injector.js.map +1 -0
  259. package/dist/multimodal/multimodal-orchestrator.d.ts +29 -0
  260. package/dist/multimodal/multimodal-orchestrator.d.ts.map +1 -0
  261. package/dist/multimodal/multimodal-orchestrator.js +51 -0
  262. package/dist/multimodal/multimodal-orchestrator.js.map +1 -0
  263. package/dist/multimodal/ocr-pipeline.d.ts +18 -0
  264. package/dist/multimodal/ocr-pipeline.d.ts.map +1 -0
  265. package/dist/multimodal/ocr-pipeline.js +43 -0
  266. package/dist/multimodal/ocr-pipeline.js.map +1 -0
  267. package/dist/multimodal/perceptual-hasher.d.ts +24 -0
  268. package/dist/multimodal/perceptual-hasher.d.ts.map +1 -0
  269. package/dist/multimodal/perceptual-hasher.js +75 -0
  270. package/dist/multimodal/perceptual-hasher.js.map +1 -0
  271. package/dist/multimodal/screen-understanding.d.ts +18 -0
  272. package/dist/multimodal/screen-understanding.d.ts.map +1 -0
  273. package/dist/multimodal/screen-understanding.js +48 -0
  274. package/dist/multimodal/screen-understanding.js.map +1 -0
  275. package/dist/multimodal/types.d.ts +73 -0
  276. package/dist/multimodal/types.d.ts.map +1 -0
  277. package/dist/multimodal/types.js +6 -0
  278. package/dist/multimodal/types.js.map +1 -0
  279. package/dist/observability/compliance-audit-logger.d.ts +26 -0
  280. package/dist/observability/compliance-audit-logger.d.ts.map +1 -0
  281. package/dist/observability/compliance-audit-logger.js +52 -0
  282. package/dist/observability/compliance-audit-logger.js.map +1 -0
  283. package/dist/observability/log-streamer-sse.d.ts +28 -0
  284. package/dist/observability/log-streamer-sse.d.ts.map +1 -0
  285. package/dist/observability/log-streamer-sse.js +50 -0
  286. package/dist/observability/log-streamer-sse.js.map +1 -0
  287. package/dist/observability/metric-collector.d.ts +34 -0
  288. package/dist/observability/metric-collector.d.ts.map +1 -0
  289. package/dist/observability/metric-collector.js +60 -0
  290. package/dist/observability/metric-collector.js.map +1 -0
  291. package/dist/observability/otel-trace-exporter.d.ts +49 -0
  292. package/dist/observability/otel-trace-exporter.d.ts.map +1 -0
  293. package/dist/observability/otel-trace-exporter.js +47 -0
  294. package/dist/observability/otel-trace-exporter.js.map +1 -0
  295. package/dist/observability/token-cost-accounting.d.ts +35 -0
  296. package/dist/observability/token-cost-accounting.d.ts.map +1 -0
  297. package/dist/observability/token-cost-accounting.js +74 -0
  298. package/dist/observability/token-cost-accounting.js.map +1 -0
  299. package/dist/persistence/database-backup-manager.d.ts +342 -0
  300. package/dist/persistence/database-backup-manager.d.ts.map +1 -0
  301. package/dist/persistence/database-backup-manager.js +399 -0
  302. package/dist/persistence/database-backup-manager.js.map +1 -0
  303. package/dist/persistence/index.d.ts +3 -0
  304. package/dist/persistence/index.d.ts.map +1 -1
  305. package/dist/persistence/index.js +3 -0
  306. package/dist/persistence/index.js.map +1 -1
  307. package/dist/persistence/migrations/001_initial_core_schema.d.ts.map +1 -1
  308. package/dist/persistence/migrations/001_initial_core_schema.js +2 -0
  309. package/dist/persistence/migrations/001_initial_core_schema.js.map +1 -1
  310. package/dist/persistence/migrations/011_snapshots_and_wal_maintenance.d.ts +8 -0
  311. package/dist/persistence/migrations/011_snapshots_and_wal_maintenance.d.ts.map +1 -0
  312. package/dist/persistence/migrations/011_snapshots_and_wal_maintenance.js +129 -0
  313. package/dist/persistence/migrations/011_snapshots_and_wal_maintenance.js.map +1 -0
  314. package/dist/persistence/repositories/event-repository.d.ts +5 -0
  315. package/dist/persistence/repositories/event-repository.d.ts.map +1 -1
  316. package/dist/persistence/repositories/event-repository.js +21 -0
  317. package/dist/persistence/repositories/event-repository.js.map +1 -1
  318. package/dist/persistence/user-config-manager.d.ts +36 -0
  319. package/dist/persistence/user-config-manager.d.ts.map +1 -0
  320. package/dist/persistence/user-config-manager.js +141 -0
  321. package/dist/persistence/user-config-manager.js.map +1 -0
  322. package/dist/persistence/wal-checkpoint-scheduler.d.ts +51 -0
  323. package/dist/persistence/wal-checkpoint-scheduler.d.ts.map +1 -0
  324. package/dist/persistence/wal-checkpoint-scheduler.js +214 -0
  325. package/dist/persistence/wal-checkpoint-scheduler.js.map +1 -0
  326. package/dist/recovery/browser-zombie-reclaimer.d.ts +156 -0
  327. package/dist/recovery/browser-zombie-reclaimer.d.ts.map +1 -0
  328. package/dist/recovery/browser-zombie-reclaimer.js +225 -0
  329. package/dist/recovery/browser-zombie-reclaimer.js.map +1 -0
  330. package/dist/recovery/index.d.ts +1 -0
  331. package/dist/recovery/index.d.ts.map +1 -1
  332. package/dist/recovery/index.js +1 -0
  333. package/dist/recovery/index.js.map +1 -1
  334. package/dist/resume/external-lease-reconciler.d.ts +154 -0
  335. package/dist/resume/external-lease-reconciler.d.ts.map +1 -0
  336. package/dist/resume/external-lease-reconciler.js +260 -0
  337. package/dist/resume/external-lease-reconciler.js.map +1 -0
  338. package/dist/resume/fork-point-recovery-manager.d.ts +97 -0
  339. package/dist/resume/fork-point-recovery-manager.d.ts.map +1 -0
  340. package/dist/resume/fork-point-recovery-manager.js +275 -0
  341. package/dist/resume/fork-point-recovery-manager.js.map +1 -0
  342. package/dist/resume/index.d.ts +4 -0
  343. package/dist/resume/index.d.ts.map +1 -1
  344. package/dist/resume/index.js +4 -0
  345. package/dist/resume/index.js.map +1 -1
  346. package/dist/resume/model-migration-manager.d.ts +157 -0
  347. package/dist/resume/model-migration-manager.d.ts.map +1 -0
  348. package/dist/resume/model-migration-manager.js +203 -0
  349. package/dist/resume/model-migration-manager.js.map +1 -0
  350. package/dist/resume/process-reconnect-manager.d.ts +148 -0
  351. package/dist/resume/process-reconnect-manager.d.ts.map +1 -0
  352. package/dist/resume/process-reconnect-manager.js +325 -0
  353. package/dist/resume/process-reconnect-manager.js.map +1 -0
  354. package/dist/resume/resume-contract.d.ts +12 -12
  355. package/dist/saas/compliance-report-exporter.d.ts +20 -0
  356. package/dist/saas/compliance-report-exporter.d.ts.map +1 -0
  357. package/dist/saas/compliance-report-exporter.js +46 -0
  358. package/dist/saas/compliance-report-exporter.js.map +1 -0
  359. package/dist/saas/index.d.ts +10 -0
  360. package/dist/saas/index.d.ts.map +1 -0
  361. package/dist/saas/index.js +10 -0
  362. package/dist/saas/index.js.map +1 -0
  363. package/dist/saas/quota-rate-limiter.d.ts +25 -0
  364. package/dist/saas/quota-rate-limiter.d.ts.map +1 -0
  365. package/dist/saas/quota-rate-limiter.js +53 -0
  366. package/dist/saas/quota-rate-limiter.js.map +1 -0
  367. package/dist/saas/rbac-engine.d.ts +16 -0
  368. package/dist/saas/rbac-engine.d.ts.map +1 -0
  369. package/dist/saas/rbac-engine.js +45 -0
  370. package/dist/saas/rbac-engine.js.map +1 -0
  371. package/dist/saas/sso-authenticator.d.ts +22 -0
  372. package/dist/saas/sso-authenticator.d.ts.map +1 -0
  373. package/dist/saas/sso-authenticator.js +60 -0
  374. package/dist/saas/sso-authenticator.js.map +1 -0
  375. package/dist/saas/team-workspace-manager.d.ts +26 -0
  376. package/dist/saas/team-workspace-manager.d.ts.map +1 -0
  377. package/dist/saas/team-workspace-manager.js +44 -0
  378. package/dist/saas/team-workspace-manager.js.map +1 -0
  379. package/dist/saas/tenant-isolation-manager.d.ts +21 -0
  380. package/dist/saas/tenant-isolation-manager.d.ts.map +1 -0
  381. package/dist/saas/tenant-isolation-manager.js +30 -0
  382. package/dist/saas/tenant-isolation-manager.js.map +1 -0
  383. package/dist/search/index.d.ts +2 -0
  384. package/dist/search/index.d.ts.map +1 -0
  385. package/dist/search/index.js +2 -0
  386. package/dist/search/index.js.map +1 -0
  387. package/dist/search/universal-content-search-engine.d.ts +185 -0
  388. package/dist/search/universal-content-search-engine.d.ts.map +1 -0
  389. package/dist/search/universal-content-search-engine.js +243 -0
  390. package/dist/search/universal-content-search-engine.js.map +1 -0
  391. package/dist/security/dangerous-command-heuristics.d.ts +17 -0
  392. package/dist/security/dangerous-command-heuristics.d.ts.map +1 -0
  393. package/dist/security/dangerous-command-heuristics.js +71 -0
  394. package/dist/security/dangerous-command-heuristics.js.map +1 -0
  395. package/dist/security/policy-hierarchy-resolver.d.ts +35 -0
  396. package/dist/security/policy-hierarchy-resolver.d.ts.map +1 -0
  397. package/dist/security/policy-hierarchy-resolver.js +110 -0
  398. package/dist/security/policy-hierarchy-resolver.js.map +1 -0
  399. package/dist/security/windows-boundary-guard.d.ts +16 -0
  400. package/dist/security/windows-boundary-guard.d.ts.map +1 -0
  401. package/dist/security/windows-boundary-guard.js +64 -0
  402. package/dist/security/windows-boundary-guard.js.map +1 -0
  403. package/dist/security/zero-knowledge-enforcer.d.ts +32 -0
  404. package/dist/security/zero-knowledge-enforcer.d.ts.map +1 -0
  405. package/dist/security/zero-knowledge-enforcer.js +72 -0
  406. package/dist/security/zero-knowledge-enforcer.js.map +1 -0
  407. package/dist/tools/smart-git-generator.d.ts +28 -0
  408. package/dist/tools/smart-git-generator.d.ts.map +1 -0
  409. package/dist/tools/smart-git-generator.js +53 -0
  410. package/dist/tools/smart-git-generator.js.map +1 -0
  411. package/dist/tui/session-tree-visualizer.d.ts +16 -0
  412. package/dist/tui/session-tree-visualizer.d.ts.map +1 -0
  413. package/dist/tui/session-tree-visualizer.js +41 -0
  414. package/dist/tui/session-tree-visualizer.js.map +1 -0
  415. package/dist/tui/terminal-layout.d.ts.map +1 -1
  416. package/dist/tui/terminal-layout.js +12 -4
  417. package/dist/tui/terminal-layout.js.map +1 -1
  418. package/dist/tui/tui-application.d.ts +7 -0
  419. package/dist/tui/tui-application.d.ts.map +1 -1
  420. package/dist/tui/tui-application.js +110 -5
  421. package/dist/tui/tui-application.js.map +1 -1
  422. package/dist/tui/tui-controller.d.ts +77 -2
  423. package/dist/tui/tui-controller.d.ts.map +1 -1
  424. package/dist/tui/tui-controller.js +475 -23
  425. package/dist/tui/tui-controller.js.map +1 -1
  426. package/dist/tui/tui-dashboard.d.ts +31 -0
  427. package/dist/tui/tui-dashboard.d.ts.map +1 -0
  428. package/dist/tui/tui-dashboard.js +74 -0
  429. package/dist/tui/tui-dashboard.js.map +1 -0
  430. package/dist/tui/tui-renderer.d.ts +8 -1
  431. package/dist/tui/tui-renderer.d.ts.map +1 -1
  432. package/dist/tui/tui-renderer.js +74 -37
  433. package/dist/tui/tui-renderer.js.map +1 -1
  434. package/dist/workspace/ecosystem-adapters.d.ts +96 -0
  435. package/dist/workspace/ecosystem-adapters.d.ts.map +1 -0
  436. package/dist/workspace/ecosystem-adapters.js +432 -0
  437. package/dist/workspace/ecosystem-adapters.js.map +1 -0
  438. package/dist/workspace/ecosystem-importer.d.ts +6 -0
  439. package/dist/workspace/ecosystem-importer.d.ts.map +1 -0
  440. package/dist/workspace/ecosystem-importer.js +6 -0
  441. package/dist/workspace/ecosystem-importer.js.map +1 -0
  442. package/dist/workspace/index.d.ts +11 -0
  443. package/dist/workspace/index.d.ts.map +1 -0
  444. package/dist/workspace/index.js +11 -0
  445. package/dist/workspace/index.js.map +1 -0
  446. package/dist/workspace/instruction-loader.d.ts +45 -0
  447. package/dist/workspace/instruction-loader.d.ts.map +1 -0
  448. package/dist/workspace/instruction-loader.js +193 -0
  449. package/dist/workspace/instruction-loader.js.map +1 -0
  450. package/dist/workspace/monorepo-discovery.d.ts +31 -0
  451. package/dist/workspace/monorepo-discovery.d.ts.map +1 -0
  452. package/dist/workspace/monorepo-discovery.js +307 -0
  453. package/dist/workspace/monorepo-discovery.js.map +1 -0
  454. package/dist/workspace/multi-root-manager.d.ts +36 -0
  455. package/dist/workspace/multi-root-manager.d.ts.map +1 -0
  456. package/dist/workspace/multi-root-manager.js +91 -0
  457. package/dist/workspace/multi-root-manager.js.map +1 -0
  458. package/dist/workspace/project-deletion-safety.d.ts +26 -0
  459. package/dist/workspace/project-deletion-safety.d.ts.map +1 -0
  460. package/dist/workspace/project-deletion-safety.js +70 -0
  461. package/dist/workspace/project-deletion-safety.js.map +1 -0
  462. package/dist/workspace/tech-stack-discovery.d.ts +56 -0
  463. package/dist/workspace/tech-stack-discovery.d.ts.map +1 -0
  464. package/dist/workspace/tech-stack-discovery.js +489 -0
  465. package/dist/workspace/tech-stack-discovery.js.map +1 -0
  466. package/package.json +1 -1
@@ -0,0 +1,103 @@
1
+ /**
2
+ * LSP Client Bridge Integration
3
+ * PRD-CODE-004: LSP Client Bridge Integration
4
+ */
5
+ export class LspClientBridge {
6
+ isInitialized = false;
7
+ mockHandler;
8
+ rootUri;
9
+ constructor(options = {}) {
10
+ this.mockHandler = options.mockHandler;
11
+ this.rootUri = options.rootUri ?? "file:///";
12
+ }
13
+ async initialize() {
14
+ if (this.mockHandler) {
15
+ await this.mockHandler("initialize", { rootUri: this.rootUri });
16
+ }
17
+ this.isInitialized = true;
18
+ return true;
19
+ }
20
+ async getDefinition(filePath, position) {
21
+ this.ensureInitialized();
22
+ if (this.mockHandler) {
23
+ const res = (await this.mockHandler("textDocument/definition", {
24
+ textDocument: { uri: `file://${filePath}` },
25
+ position: { line: position.line - 1, character: position.character - 1 },
26
+ }));
27
+ return res ?? [];
28
+ }
29
+ return [];
30
+ }
31
+ async getReferences(filePath, position) {
32
+ this.ensureInitialized();
33
+ if (this.mockHandler) {
34
+ const res = (await this.mockHandler("textDocument/references", {
35
+ textDocument: { uri: `file://${filePath}` },
36
+ position: { line: position.line - 1, character: position.character - 1 },
37
+ context: { includeDeclaration: true },
38
+ }));
39
+ return res ?? [];
40
+ }
41
+ return [];
42
+ }
43
+ async getHover(filePath, position) {
44
+ this.ensureInitialized();
45
+ if (this.mockHandler) {
46
+ const res = (await this.mockHandler("textDocument/hover", {
47
+ textDocument: { uri: `file://${filePath}` },
48
+ position: { line: position.line - 1, character: position.character - 1 },
49
+ }));
50
+ return res ?? null;
51
+ }
52
+ return null;
53
+ }
54
+ async getDocumentSymbols(filePath) {
55
+ this.ensureInitialized();
56
+ if (this.mockHandler) {
57
+ const res = (await this.mockHandler("textDocument/documentSymbol", {
58
+ textDocument: { uri: `file://${filePath}` },
59
+ }));
60
+ return res ?? [];
61
+ }
62
+ return [];
63
+ }
64
+ async getWorkspaceSymbols(query) {
65
+ this.ensureInitialized();
66
+ if (this.mockHandler) {
67
+ const res = (await this.mockHandler("workspace/symbol", { query }));
68
+ return res ?? [];
69
+ }
70
+ return [];
71
+ }
72
+ async rename(filePath, position, newName) {
73
+ this.ensureInitialized();
74
+ if (this.mockHandler) {
75
+ const res = (await this.mockHandler("textDocument/rename", {
76
+ textDocument: { uri: `file://${filePath}` },
77
+ position: { line: position.line - 1, character: position.character - 1 },
78
+ newName,
79
+ }));
80
+ return res ?? { changes: {} };
81
+ }
82
+ return { changes: {} };
83
+ }
84
+ async getDiagnostics(filePath) {
85
+ this.ensureInitialized();
86
+ if (this.mockHandler) {
87
+ const res = (await this.mockHandler("textDocument/diagnostics", {
88
+ textDocument: { uri: `file://${filePath}` },
89
+ }));
90
+ return res ?? [];
91
+ }
92
+ return [];
93
+ }
94
+ shutdown() {
95
+ this.isInitialized = false;
96
+ }
97
+ ensureInitialized() {
98
+ if (!this.isInitialized) {
99
+ throw new Error("LspClientBridge must be initialized before making requests.");
100
+ }
101
+ }
102
+ }
103
+ //# sourceMappingURL=lsp-bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lsp-bridge.js","sourceRoot":"","sources":["../../src/code-intel/lsp-bridge.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0BH,MAAM,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,QAAQ;QACb,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC7B,CAAC;IAEO,iBAAiB;QACvB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Multi-Language AST & Grammar Parser
3
+ * PRD-CODE-003: Multi-Language AST & Parser Adapters
4
+ * PRD-INV-001: Strict Code Intelligence Invariants & Fault Isolation
5
+ */
6
+ import type { SupportedLanguage, ParseResult } from "../types.js";
7
+ export declare class MultiLanguageAstParser {
8
+ detectLanguage(filePath: string): SupportedLanguage;
9
+ parse(filePath: string, content: string): ParseResult;
10
+ private isBinary;
11
+ private parseTypeScriptJavaScript;
12
+ private parsePython;
13
+ private parseGo;
14
+ private parseRust;
15
+ private parseJava;
16
+ private parseCAndCpp;
17
+ private parseJson;
18
+ private parseYaml;
19
+ private parseMarkdown;
20
+ private parseGeneric;
21
+ }
22
+ //# sourceMappingURL=multi-language-ast-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multi-language-ast-parser.d.ts","sourceRoot":"","sources":["../../../src/code-intel/parsers/multi-language-ast-parser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EAMZ,MAAM,aAAa,CAAC;AAErB,qBAAa,sBAAsB;IAC1B,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB;IA0CnD,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW;IAiG5D,OAAO,CAAC,QAAQ;IAUhB,OAAO,CAAC,yBAAyB;IAqIjC,OAAO,CAAC,WAAW;IAiEnB,OAAO,CAAC,OAAO;IAwDf,OAAO,CAAC,SAAS;IA+CjB,OAAO,CAAC,SAAS;IAkCjB,OAAO,CAAC,YAAY;IAmCpB,OAAO,CAAC,SAAS;IAyBjB,OAAO,CAAC,SAAS;IAiBjB,OAAO,CAAC,aAAa;IAkBrB,OAAO,CAAC,YAAY;CAgBrB"}
@@ -0,0 +1,536 @@
1
+ /**
2
+ * Multi-Language AST & Grammar Parser
3
+ * PRD-CODE-003: Multi-Language AST & Parser Adapters
4
+ * PRD-INV-001: Strict Code Intelligence Invariants & Fault Isolation
5
+ */
6
+ import { extname } from "node:path";
7
+ export class MultiLanguageAstParser {
8
+ detectLanguage(filePath) {
9
+ const ext = extname(filePath).toLowerCase();
10
+ switch (ext) {
11
+ case ".ts":
12
+ case ".tsx":
13
+ case ".mts":
14
+ case ".cts":
15
+ return "typescript";
16
+ case ".js":
17
+ case ".jsx":
18
+ case ".mjs":
19
+ case ".cjs":
20
+ return "javascript";
21
+ case ".py":
22
+ return "python";
23
+ case ".go":
24
+ return "go";
25
+ case ".rs":
26
+ return "rust";
27
+ case ".java":
28
+ return "java";
29
+ case ".c":
30
+ case ".h":
31
+ return "c";
32
+ case ".cpp":
33
+ case ".hpp":
34
+ case ".cc":
35
+ case ".cxx":
36
+ return "cpp";
37
+ case ".json":
38
+ return "json";
39
+ case ".yaml":
40
+ case ".yml":
41
+ return "yaml";
42
+ case ".md":
43
+ case ".markdown":
44
+ return "markdown";
45
+ default:
46
+ return "unknown";
47
+ }
48
+ }
49
+ parse(filePath, content) {
50
+ const language = this.detectLanguage(filePath);
51
+ const symbols = [];
52
+ const imports = [];
53
+ const exports = [];
54
+ const calls = [];
55
+ const diagnostics = [];
56
+ // Guard against binary or non-text files
57
+ if (this.isBinary(content)) {
58
+ diagnostics.push({
59
+ filePath,
60
+ range: { start: { line: 1, character: 1 }, end: { line: 1, character: 1 } },
61
+ message: "File contains binary content or null bytes; skipping AST extraction",
62
+ severity: "warning",
63
+ });
64
+ return {
65
+ filePath,
66
+ language,
67
+ symbols: [],
68
+ imports: [],
69
+ exports: [],
70
+ calls: [],
71
+ diagnostics,
72
+ isPartial: true,
73
+ };
74
+ }
75
+ try {
76
+ const lines = content.split(/\r?\n/);
77
+ switch (language) {
78
+ case "typescript":
79
+ case "javascript":
80
+ this.parseTypeScriptJavaScript(filePath, lines, language, symbols, imports, exports, calls);
81
+ break;
82
+ case "python":
83
+ this.parsePython(filePath, lines, symbols, imports, calls);
84
+ break;
85
+ case "go":
86
+ this.parseGo(filePath, lines, symbols, imports, exports);
87
+ break;
88
+ case "rust":
89
+ this.parseRust(filePath, lines, symbols, imports);
90
+ break;
91
+ case "java":
92
+ this.parseJava(filePath, lines, symbols, imports);
93
+ break;
94
+ case "c":
95
+ case "cpp":
96
+ this.parseCAndCpp(filePath, lines, language, symbols, imports);
97
+ break;
98
+ case "json":
99
+ this.parseJson(filePath, content, symbols, diagnostics);
100
+ break;
101
+ case "yaml":
102
+ this.parseYaml(filePath, lines, symbols);
103
+ break;
104
+ case "markdown":
105
+ this.parseMarkdown(filePath, lines, symbols);
106
+ break;
107
+ default:
108
+ this.parseGeneric(filePath, lines, symbols);
109
+ break;
110
+ }
111
+ return {
112
+ filePath,
113
+ language,
114
+ symbols,
115
+ imports,
116
+ exports,
117
+ calls,
118
+ diagnostics,
119
+ isPartial: false,
120
+ };
121
+ }
122
+ catch (err) {
123
+ diagnostics.push({
124
+ filePath,
125
+ range: { start: { line: 1, character: 1 }, end: { line: 1, character: 1 } },
126
+ message: err instanceof Error ? err.message : String(err),
127
+ severity: "error",
128
+ });
129
+ return {
130
+ filePath,
131
+ language,
132
+ symbols,
133
+ imports,
134
+ exports,
135
+ calls,
136
+ diagnostics,
137
+ isPartial: true,
138
+ error: err instanceof Error ? err.message : String(err),
139
+ };
140
+ }
141
+ }
142
+ isBinary(content) {
143
+ const checkLength = Math.min(content.length, 4096);
144
+ for (let i = 0; i < checkLength; i++) {
145
+ if (content.charCodeAt(i) === 0) {
146
+ return true;
147
+ }
148
+ }
149
+ return false;
150
+ }
151
+ parseTypeScriptJavaScript(filePath, lines, language, symbols, imports, exports, calls) {
152
+ lines.forEach((line, idx) => {
153
+ const lineNum = idx + 1;
154
+ // Imports
155
+ const importMatch = line.match(/^import\s+(?:\{([^}]+)\}|\*\s+as\s+(\w+)|(\w+))\s+from\s+['"]([^'"]+)['"]/);
156
+ if (importMatch && importMatch[4]) {
157
+ const source = importMatch[4];
158
+ const specifiers = [];
159
+ if (importMatch[1]) {
160
+ importMatch[1].split(",").forEach((s) => {
161
+ const parts = s.trim().split(/\s+as\s+/);
162
+ const name = parts[0];
163
+ if (name)
164
+ specifiers.push({ name, alias: parts[1] });
165
+ });
166
+ }
167
+ else if (importMatch[2]) {
168
+ specifiers.push({ name: importMatch[2], isNamespace: true });
169
+ }
170
+ else if (importMatch[3]) {
171
+ specifiers.push({ name: importMatch[3], isDefault: true });
172
+ }
173
+ imports.push({
174
+ source,
175
+ specifiers,
176
+ range: {
177
+ start: { line: lineNum, character: line.indexOf("import") + 1 },
178
+ end: { line: lineNum, character: line.length + 1 },
179
+ },
180
+ });
181
+ }
182
+ // Exports
183
+ const exportMatch = line.match(/export\s+(?:default\s+)?(?:const|let|var|function|class|interface|type|enum)\s+(\w+)/);
184
+ if (exportMatch && exportMatch[1]) {
185
+ exports.push({
186
+ name: exportMatch[1],
187
+ isDefault: line.includes("export default"),
188
+ range: {
189
+ start: { line: lineNum, character: line.indexOf("export") + 1 },
190
+ end: { line: lineNum, character: line.length + 1 },
191
+ },
192
+ });
193
+ }
194
+ // Classes
195
+ const classMatch = line.match(/(?:export\s+)?class\s+(\w+)/);
196
+ if (classMatch && classMatch[1]) {
197
+ symbols.push({
198
+ id: `${filePath}#${classMatch[1]}:${lineNum}`,
199
+ name: classMatch[1],
200
+ kind: "class",
201
+ language,
202
+ filePath,
203
+ range: {
204
+ start: { line: lineNum, character: line.indexOf(classMatch[1]) + 1 },
205
+ end: { line: lineNum, character: line.length + 1 },
206
+ },
207
+ });
208
+ }
209
+ // Interfaces
210
+ const ifaceMatch = line.match(/(?:export\s+)?interface\s+(\w+)/);
211
+ if (ifaceMatch && ifaceMatch[1]) {
212
+ symbols.push({
213
+ id: `${filePath}#${ifaceMatch[1]}:${lineNum}`,
214
+ name: ifaceMatch[1],
215
+ kind: "interface",
216
+ language,
217
+ filePath,
218
+ range: {
219
+ start: { line: lineNum, character: line.indexOf(ifaceMatch[1]) + 1 },
220
+ end: { line: lineNum, character: line.length + 1 },
221
+ },
222
+ });
223
+ }
224
+ // Functions
225
+ const fnMatch = line.match(/(?:export\s+)?(?:async\s+)?function\s+(\w+)/);
226
+ if (fnMatch && fnMatch[1]) {
227
+ symbols.push({
228
+ id: `${filePath}#${fnMatch[1]}:${lineNum}`,
229
+ name: fnMatch[1],
230
+ kind: "function",
231
+ language,
232
+ filePath,
233
+ range: {
234
+ start: { line: lineNum, character: line.indexOf(fnMatch[1]) + 1 },
235
+ end: { line: lineNum, character: line.length + 1 },
236
+ },
237
+ });
238
+ }
239
+ // Methods
240
+ const methodMatch = line.match(/^\s*(?:public|private|protected)?\s*(?:static)?\s*(?:async)?\s*(\w+)\s*\([^)]*\)\s*[:{]/);
241
+ if (methodMatch && methodMatch[1] && !line.includes("function") && !line.includes("class") && !line.includes("if") && !line.includes("switch")) {
242
+ symbols.push({
243
+ id: `${filePath}#method_${methodMatch[1]}:${lineNum}`,
244
+ name: methodMatch[1],
245
+ kind: "method",
246
+ language,
247
+ filePath,
248
+ range: {
249
+ start: { line: lineNum, character: line.indexOf(methodMatch[1]) + 1 },
250
+ end: { line: lineNum, character: line.length + 1 },
251
+ },
252
+ });
253
+ }
254
+ // Calls
255
+ const callMatches = line.matchAll(/\b([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/g);
256
+ for (const cm of callMatches) {
257
+ const callee = cm[1];
258
+ if (callee && !["if", "for", "while", "switch", "catch", "function"].includes(callee)) {
259
+ calls.push({
260
+ calleeName: callee,
261
+ filePath,
262
+ range: {
263
+ start: { line: lineNum, character: (cm.index ?? 0) + 1 },
264
+ end: { line: lineNum, character: (cm.index ?? 0) + callee.length + 1 },
265
+ },
266
+ });
267
+ }
268
+ }
269
+ });
270
+ }
271
+ parsePython(filePath, lines, symbols, imports, calls) {
272
+ lines.forEach((line, idx) => {
273
+ const lineNum = idx + 1;
274
+ // Imports
275
+ const importMatch = line.match(/^import\s+([\w\s,]+)|^from\s+(\w+)\s+import\s+([\w\s,*]+)/);
276
+ if (importMatch) {
277
+ const source = importMatch[2] || importMatch[1];
278
+ if (source) {
279
+ imports.push({
280
+ source: source.trim(),
281
+ specifiers: [],
282
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
283
+ });
284
+ }
285
+ }
286
+ // Classes
287
+ const classMatch = line.match(/^class\s+(\w+)/);
288
+ if (classMatch && classMatch[1]) {
289
+ symbols.push({
290
+ id: `${filePath}#${classMatch[1]}:${lineNum}`,
291
+ name: classMatch[1],
292
+ kind: "class",
293
+ language: "python",
294
+ filePath,
295
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
296
+ });
297
+ }
298
+ // Functions / Methods
299
+ const defMatch = line.match(/^\s*def\s+(\w+)/);
300
+ if (defMatch && defMatch[1]) {
301
+ const isMethod = line.startsWith(" ") || line.startsWith("\t");
302
+ symbols.push({
303
+ id: `${filePath}#${defMatch[1]}:${lineNum}`,
304
+ name: defMatch[1],
305
+ kind: isMethod ? "method" : "function",
306
+ language: "python",
307
+ filePath,
308
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
309
+ });
310
+ }
311
+ // Calls
312
+ const callMatches = line.matchAll(/\b([a-zA-Z_]\w*)\s*\(/g);
313
+ for (const cm of callMatches) {
314
+ const callee = cm[1];
315
+ if (callee && !["def", "class", "if", "for", "while", "elif"].includes(callee)) {
316
+ calls.push({
317
+ calleeName: callee,
318
+ filePath,
319
+ range: { start: { line: lineNum, character: (cm.index ?? 0) + 1 }, end: { line: lineNum, character: line.length + 1 } },
320
+ });
321
+ }
322
+ }
323
+ });
324
+ }
325
+ parseGo(filePath, lines, symbols, imports, exports) {
326
+ lines.forEach((line, idx) => {
327
+ const lineNum = idx + 1;
328
+ // Imports
329
+ const importMatch = line.match(/^import\s+"([^"]+)"/);
330
+ if (importMatch && importMatch[1]) {
331
+ imports.push({
332
+ source: importMatch[1],
333
+ specifiers: [],
334
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
335
+ });
336
+ }
337
+ // Functions & Methods
338
+ const fnMatch = line.match(/^func\s+(?:\([^)]+\)\s+)?(\w+)/);
339
+ if (fnMatch && fnMatch[1]) {
340
+ const name = fnMatch[1];
341
+ const isExported = name[0] !== undefined && name[0] === name[0].toUpperCase();
342
+ if (isExported) {
343
+ exports.push({
344
+ name,
345
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
346
+ });
347
+ }
348
+ symbols.push({
349
+ id: `${filePath}#${name}:${lineNum}`,
350
+ name,
351
+ kind: line.includes("(") && line.indexOf(")") < line.indexOf(name) ? "method" : "function",
352
+ language: "go",
353
+ filePath,
354
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
355
+ });
356
+ }
357
+ // Types / Structs / Interfaces
358
+ const typeMatch = line.match(/^type\s+(\w+)\s+(struct|interface)/);
359
+ if (typeMatch && typeMatch[1]) {
360
+ symbols.push({
361
+ id: `${filePath}#${typeMatch[1]}:${lineNum}`,
362
+ name: typeMatch[1],
363
+ kind: typeMatch[2] === "interface" ? "interface" : "class",
364
+ language: "go",
365
+ filePath,
366
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
367
+ });
368
+ }
369
+ });
370
+ }
371
+ parseRust(filePath, lines, symbols, imports) {
372
+ lines.forEach((line, idx) => {
373
+ const lineNum = idx + 1;
374
+ // use statement
375
+ const useMatch = line.match(/^use\s+([^;]+);/);
376
+ if (useMatch && useMatch[1]) {
377
+ imports.push({
378
+ source: useMatch[1].trim(),
379
+ specifiers: [],
380
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
381
+ });
382
+ }
383
+ // struct/enum/trait
384
+ const structMatch = line.match(/(?:pub\s+)?(struct|enum|trait)\s+(\w+)/);
385
+ if (structMatch && structMatch[2]) {
386
+ symbols.push({
387
+ id: `${filePath}#${structMatch[2]}:${lineNum}`,
388
+ name: structMatch[2],
389
+ kind: structMatch[1] === "trait" ? "interface" : structMatch[1] === "enum" ? "enum" : "class",
390
+ language: "rust",
391
+ filePath,
392
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
393
+ });
394
+ }
395
+ // fn
396
+ const fnMatch = line.match(/(?:pub\s+)?(?:async\s+)?fn\s+(\w+)/);
397
+ if (fnMatch && fnMatch[1]) {
398
+ symbols.push({
399
+ id: `${filePath}#${fnMatch[1]}:${lineNum}`,
400
+ name: fnMatch[1],
401
+ kind: "function",
402
+ language: "rust",
403
+ filePath,
404
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
405
+ });
406
+ }
407
+ });
408
+ }
409
+ parseJava(filePath, lines, symbols, imports) {
410
+ lines.forEach((line, idx) => {
411
+ const lineNum = idx + 1;
412
+ // Imports
413
+ const importMatch = line.match(/^import\s+([^;]+);/);
414
+ if (importMatch && importMatch[1]) {
415
+ imports.push({
416
+ source: importMatch[1].trim(),
417
+ specifiers: [],
418
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
419
+ });
420
+ }
421
+ // Class / Interface / Enum
422
+ const classMatch = line.match(/(?:public|protected|private)?\s*(?:static)?\s*(class|interface|enum)\s+(\w+)/);
423
+ if (classMatch && classMatch[2]) {
424
+ symbols.push({
425
+ id: `${filePath}#${classMatch[2]}:${lineNum}`,
426
+ name: classMatch[2],
427
+ kind: classMatch[1] === "interface" ? "interface" : classMatch[1] === "enum" ? "enum" : "class",
428
+ language: "java",
429
+ filePath,
430
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
431
+ });
432
+ }
433
+ });
434
+ }
435
+ parseCAndCpp(filePath, lines, language, symbols, imports) {
436
+ lines.forEach((line, idx) => {
437
+ const lineNum = idx + 1;
438
+ // #include
439
+ const incMatch = line.match(/^#include\s+[<"]([^>"]+)[>"]/);
440
+ if (incMatch && incMatch[1]) {
441
+ imports.push({
442
+ source: incMatch[1],
443
+ specifiers: [],
444
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
445
+ });
446
+ }
447
+ // struct / class
448
+ const typeMatch = line.match(/(?:struct|class)\s+(\w+)\s*[{;]/);
449
+ if (typeMatch && typeMatch[1]) {
450
+ symbols.push({
451
+ id: `${filePath}#${typeMatch[1]}:${lineNum}`,
452
+ name: typeMatch[1],
453
+ kind: "class",
454
+ language,
455
+ filePath,
456
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
457
+ });
458
+ }
459
+ });
460
+ }
461
+ parseJson(filePath, content, symbols, diagnostics) {
462
+ try {
463
+ const parsed = JSON.parse(content);
464
+ if (typeof parsed === "object" && parsed !== null) {
465
+ Object.keys(parsed).forEach((key, idx) => {
466
+ symbols.push({
467
+ id: `${filePath}#${key}:${idx + 1}`,
468
+ name: key,
469
+ kind: "key",
470
+ language: "json",
471
+ filePath,
472
+ range: { start: { line: idx + 1, character: 1 }, end: { line: idx + 1, character: key.length + 1 } },
473
+ });
474
+ });
475
+ }
476
+ }
477
+ catch (e) {
478
+ diagnostics.push({
479
+ filePath,
480
+ range: { start: { line: 1, character: 1 }, end: { line: 1, character: 1 } },
481
+ message: e instanceof Error ? e.message : "Malformed JSON",
482
+ severity: "error",
483
+ });
484
+ }
485
+ }
486
+ parseYaml(filePath, lines, symbols) {
487
+ lines.forEach((line, idx) => {
488
+ const lineNum = idx + 1;
489
+ const keyMatch = line.match(/^([a-zA-Z0-9_-]+):/);
490
+ if (keyMatch && keyMatch[1]) {
491
+ symbols.push({
492
+ id: `${filePath}#${keyMatch[1]}:${lineNum}`,
493
+ name: keyMatch[1],
494
+ kind: "key",
495
+ language: "yaml",
496
+ filePath,
497
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
498
+ });
499
+ }
500
+ });
501
+ }
502
+ parseMarkdown(filePath, lines, symbols) {
503
+ lines.forEach((line, idx) => {
504
+ const lineNum = idx + 1;
505
+ const headingMatch = line.match(/^(#{1,6})\s+(.+)$/);
506
+ if (headingMatch && headingMatch[1] && headingMatch[2]) {
507
+ symbols.push({
508
+ id: `${filePath}#heading_${idx}:${lineNum}`,
509
+ name: headingMatch[2].trim(),
510
+ kind: "module",
511
+ language: "markdown",
512
+ filePath,
513
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
514
+ detail: `Level ${headingMatch[1].length}`,
515
+ });
516
+ }
517
+ });
518
+ }
519
+ parseGeneric(filePath, lines, symbols) {
520
+ lines.forEach((line, idx) => {
521
+ const lineNum = idx + 1;
522
+ const idMatch = line.match(/^[a-zA-Z_]\w*\s*=/);
523
+ if (idMatch) {
524
+ symbols.push({
525
+ id: `${filePath}#gen_${idx}:${lineNum}`,
526
+ name: idMatch[0].replace("=", "").trim(),
527
+ kind: "variable",
528
+ language: "unknown",
529
+ filePath,
530
+ range: { start: { line: lineNum, character: 1 }, end: { line: lineNum, character: line.length + 1 } },
531
+ });
532
+ }
533
+ });
534
+ }
535
+ }
536
+ //# sourceMappingURL=multi-language-ast-parser.js.map