xtctx 0.3.2 → 0.11.3

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 (308) hide show
  1. package/CHANGELOG.md +317 -122
  2. package/LICENSE +21 -21
  3. package/README.md +154 -121
  4. package/dist/src/cli/disconnect.d.ts +8 -0
  5. package/dist/src/cli/disconnect.d.ts.map +1 -0
  6. package/dist/src/cli/disconnect.js +42 -0
  7. package/dist/src/cli/disconnect.js.map +1 -0
  8. package/dist/src/cli/hook.d.ts +7 -0
  9. package/dist/src/cli/hook.d.ts.map +1 -0
  10. package/dist/src/cli/hook.js +32 -0
  11. package/dist/src/cli/hook.js.map +1 -0
  12. package/dist/src/cli/index.d.ts.map +1 -1
  13. package/dist/src/cli/index.js +86 -33
  14. package/dist/src/cli/index.js.map +1 -1
  15. package/dist/src/cli/setup.d.ts +8 -0
  16. package/dist/src/cli/setup.d.ts.map +1 -0
  17. package/dist/src/cli/setup.js +76 -0
  18. package/dist/src/cli/setup.js.map +1 -0
  19. package/dist/src/cli/status.d.ts +7 -0
  20. package/dist/src/cli/status.d.ts.map +1 -0
  21. package/dist/src/cli/status.js +133 -0
  22. package/dist/src/cli/status.js.map +1 -0
  23. package/dist/src/config/disconnect.d.ts +34 -0
  24. package/dist/src/config/disconnect.d.ts.map +1 -0
  25. package/dist/src/config/disconnect.js +386 -0
  26. package/dist/src/config/disconnect.js.map +1 -0
  27. package/dist/src/config/managed-block.d.ts +29 -0
  28. package/dist/src/config/managed-block.d.ts.map +1 -0
  29. package/dist/src/config/managed-block.js +67 -0
  30. package/dist/src/config/managed-block.js.map +1 -0
  31. package/dist/src/config/mcp-config.d.ts +93 -0
  32. package/dist/src/config/mcp-config.d.ts.map +1 -0
  33. package/dist/src/config/mcp-config.js +556 -0
  34. package/dist/src/config/mcp-config.js.map +1 -0
  35. package/dist/src/config/setup.d.ts +39 -0
  36. package/dist/src/config/setup.d.ts.map +1 -0
  37. package/dist/src/config/setup.js +379 -0
  38. package/dist/src/config/setup.js.map +1 -0
  39. package/dist/src/config/skills.d.ts +73 -0
  40. package/dist/src/config/skills.d.ts.map +1 -0
  41. package/dist/src/config/skills.js +427 -0
  42. package/dist/src/config/skills.js.map +1 -0
  43. package/dist/src/handoff/embeddings.d.ts +26 -0
  44. package/dist/src/handoff/embeddings.d.ts.map +1 -0
  45. package/dist/src/handoff/embeddings.js +132 -0
  46. package/dist/src/handoff/embeddings.js.map +1 -0
  47. package/dist/src/handoff/sqlite-index.d.ts +52 -0
  48. package/dist/src/handoff/sqlite-index.d.ts.map +1 -0
  49. package/dist/src/handoff/sqlite-index.js +905 -0
  50. package/dist/src/handoff/sqlite-index.js.map +1 -0
  51. package/dist/src/handoff/types.d.ts +63 -0
  52. package/dist/src/handoff/types.d.ts.map +1 -0
  53. package/dist/src/handoff/types.js +2 -0
  54. package/dist/src/handoff/types.js.map +1 -0
  55. package/dist/src/handoff/vector.d.ts +4 -0
  56. package/dist/src/handoff/vector.d.ts.map +1 -0
  57. package/dist/src/handoff/vector.js +31 -0
  58. package/dist/src/handoff/vector.js.map +1 -0
  59. package/dist/src/mcp/server.d.ts +3 -20
  60. package/dist/src/mcp/server.d.ts.map +1 -1
  61. package/dist/src/mcp/server.js +90 -205
  62. package/dist/src/mcp/server.js.map +1 -1
  63. package/dist/src/mcp/tools/continuity.d.ts +21 -0
  64. package/dist/src/mcp/tools/continuity.d.ts.map +1 -0
  65. package/dist/src/mcp/tools/continuity.js +55 -0
  66. package/dist/src/mcp/tools/continuity.js.map +1 -0
  67. package/dist/src/mcp/tools/manifest.d.ts +40 -0
  68. package/dist/src/mcp/tools/manifest.d.ts.map +1 -0
  69. package/dist/src/mcp/tools/manifest.js +105 -0
  70. package/dist/src/mcp/tools/manifest.js.map +1 -0
  71. package/dist/src/mcp/tools/sessions.d.ts +18 -31
  72. package/dist/src/mcp/tools/sessions.d.ts.map +1 -1
  73. package/dist/src/mcp/tools/sessions.js +109 -16
  74. package/dist/src/mcp/tools/sessions.js.map +1 -1
  75. package/dist/src/runtime/services.d.ts +11 -38
  76. package/dist/src/runtime/services.d.ts.map +1 -1
  77. package/dist/src/runtime/services.js +61 -200
  78. package/dist/src/runtime/services.js.map +1 -1
  79. package/dist/src/scrapers/antigravity.d.ts +52 -0
  80. package/dist/src/scrapers/antigravity.d.ts.map +1 -0
  81. package/dist/src/scrapers/antigravity.js +869 -0
  82. package/dist/src/scrapers/antigravity.js.map +1 -0
  83. package/dist/src/scrapers/base.d.ts +53 -1
  84. package/dist/src/scrapers/base.d.ts.map +1 -1
  85. package/dist/src/scrapers/base.js +93 -4
  86. package/dist/src/scrapers/base.js.map +1 -1
  87. package/dist/src/scrapers/claude-code.d.ts +37 -6
  88. package/dist/src/scrapers/claude-code.d.ts.map +1 -1
  89. package/dist/src/scrapers/claude-code.js +214 -40
  90. package/dist/src/scrapers/claude-code.js.map +1 -1
  91. package/dist/src/scrapers/codex.d.ts +36 -6
  92. package/dist/src/scrapers/codex.d.ts.map +1 -1
  93. package/dist/src/scrapers/codex.js +283 -60
  94. package/dist/src/scrapers/codex.js.map +1 -1
  95. package/dist/src/scrapers/copilot-cli.d.ts +34 -0
  96. package/dist/src/scrapers/copilot-cli.d.ts.map +1 -0
  97. package/dist/src/scrapers/copilot-cli.js +342 -0
  98. package/dist/src/scrapers/copilot-cli.js.map +1 -0
  99. package/dist/src/scrapers/copilot.d.ts +41 -8
  100. package/dist/src/scrapers/copilot.d.ts.map +1 -1
  101. package/dist/src/scrapers/copilot.js +256 -118
  102. package/dist/src/scrapers/copilot.js.map +1 -1
  103. package/dist/src/scrapers/cursor.d.ts +24 -9
  104. package/dist/src/scrapers/cursor.d.ts.map +1 -1
  105. package/dist/src/scrapers/cursor.js +259 -152
  106. package/dist/src/scrapers/cursor.js.map +1 -1
  107. package/dist/src/scrapers/index.d.ts +23 -0
  108. package/dist/src/scrapers/index.d.ts.map +1 -0
  109. package/dist/src/scrapers/index.js +22 -0
  110. package/dist/src/scrapers/index.js.map +1 -0
  111. package/dist/src/scrapers/opencode.d.ts +37 -0
  112. package/dist/src/scrapers/opencode.d.ts.map +1 -0
  113. package/dist/src/scrapers/opencode.js +277 -0
  114. package/dist/src/scrapers/opencode.js.map +1 -0
  115. package/dist/src/scrapers/registry.d.ts +1 -0
  116. package/dist/src/scrapers/registry.d.ts.map +1 -1
  117. package/dist/src/scrapers/registry.js +3 -0
  118. package/dist/src/scrapers/registry.js.map +1 -1
  119. package/dist/src/tools/sources.d.ts +28 -0
  120. package/dist/src/tools/sources.d.ts.map +1 -0
  121. package/dist/src/tools/sources.js +149 -0
  122. package/dist/src/tools/sources.js.map +1 -0
  123. package/dist/src/types/config.d.ts +24 -37
  124. package/dist/src/types/config.d.ts.map +1 -1
  125. package/dist/src/types/index.d.ts +0 -2
  126. package/dist/src/types/index.d.ts.map +1 -1
  127. package/dist/src/types/index.js +0 -2
  128. package/dist/src/types/index.js.map +1 -1
  129. package/dist/src/types/scraper.d.ts +34 -5
  130. package/dist/src/types/scraper.d.ts.map +1 -1
  131. package/dist/src/utils/atomic-file.d.ts +8 -0
  132. package/dist/src/utils/atomic-file.d.ts.map +1 -0
  133. package/dist/src/utils/atomic-file.js +15 -0
  134. package/dist/src/utils/atomic-file.js.map +1 -0
  135. package/dist/src/utils/errors.d.ts +7 -0
  136. package/dist/src/utils/errors.d.ts.map +1 -0
  137. package/dist/src/utils/errors.js +16 -0
  138. package/dist/src/utils/errors.js.map +1 -0
  139. package/dist/src/utils/package-info.d.ts +11 -0
  140. package/dist/src/utils/package-info.d.ts.map +1 -0
  141. package/dist/src/utils/package-info.js +30 -0
  142. package/dist/src/utils/package-info.js.map +1 -0
  143. package/dist/src/utils/project-scope.d.ts +19 -0
  144. package/dist/src/utils/project-scope.d.ts.map +1 -0
  145. package/dist/src/utils/project-scope.js +61 -0
  146. package/dist/src/utils/project-scope.js.map +1 -0
  147. package/package.json +70 -66
  148. package/dist/src/api/routes/config.d.ts +0 -4
  149. package/dist/src/api/routes/config.d.ts.map +0 -1
  150. package/dist/src/api/routes/config.js +0 -61
  151. package/dist/src/api/routes/config.js.map +0 -1
  152. package/dist/src/api/routes/knowledge.d.ts +0 -4
  153. package/dist/src/api/routes/knowledge.d.ts.map +0 -1
  154. package/dist/src/api/routes/knowledge.js +0 -40
  155. package/dist/src/api/routes/knowledge.js.map +0 -1
  156. package/dist/src/api/routes/search.d.ts +0 -7
  157. package/dist/src/api/routes/search.d.ts.map +0 -1
  158. package/dist/src/api/routes/search.js +0 -108
  159. package/dist/src/api/routes/search.js.map +0 -1
  160. package/dist/src/api/routes/sources.d.ts +0 -12
  161. package/dist/src/api/routes/sources.d.ts.map +0 -1
  162. package/dist/src/api/routes/sources.js +0 -70
  163. package/dist/src/api/routes/sources.js.map +0 -1
  164. package/dist/src/api/server.d.ts +0 -26
  165. package/dist/src/api/server.d.ts.map +0 -1
  166. package/dist/src/api/server.js +0 -312
  167. package/dist/src/api/server.js.map +0 -1
  168. package/dist/src/cli/ingest.d.ts +0 -6
  169. package/dist/src/cli/ingest.d.ts.map +0 -1
  170. package/dist/src/cli/ingest.js +0 -11
  171. package/dist/src/cli/ingest.js.map +0 -1
  172. package/dist/src/cli/init.d.ts +0 -6
  173. package/dist/src/cli/init.d.ts.map +0 -1
  174. package/dist/src/cli/init.js +0 -105
  175. package/dist/src/cli/init.js.map +0 -1
  176. package/dist/src/cli/serve.d.ts +0 -7
  177. package/dist/src/cli/serve.d.ts.map +0 -1
  178. package/dist/src/cli/serve.js +0 -100
  179. package/dist/src/cli/serve.js.map +0 -1
  180. package/dist/src/cli/sync.d.ts +0 -5
  181. package/dist/src/cli/sync.d.ts.map +0 -1
  182. package/dist/src/cli/sync.js +0 -13
  183. package/dist/src/cli/sync.js.map +0 -1
  184. package/dist/src/compaction/pipeline.d.ts +0 -19
  185. package/dist/src/compaction/pipeline.d.ts.map +0 -1
  186. package/dist/src/compaction/pipeline.js +0 -37
  187. package/dist/src/compaction/pipeline.js.map +0 -1
  188. package/dist/src/compaction/providers/cli.d.ts +0 -13
  189. package/dist/src/compaction/providers/cli.d.ts.map +0 -1
  190. package/dist/src/compaction/providers/cli.js +0 -60
  191. package/dist/src/compaction/providers/cli.js.map +0 -1
  192. package/dist/src/compaction/rule-based.d.ts +0 -8
  193. package/dist/src/compaction/rule-based.d.ts.map +0 -1
  194. package/dist/src/compaction/rule-based.js +0 -120
  195. package/dist/src/compaction/rule-based.js.map +0 -1
  196. package/dist/src/config/loader.d.ts +0 -12
  197. package/dist/src/config/loader.d.ts.map +0 -1
  198. package/dist/src/config/loader.js +0 -76
  199. package/dist/src/config/loader.js.map +0 -1
  200. package/dist/src/config/mappings/claude-code.d.ts +0 -3
  201. package/dist/src/config/mappings/claude-code.d.ts.map +0 -1
  202. package/dist/src/config/mappings/claude-code.js +0 -31
  203. package/dist/src/config/mappings/claude-code.js.map +0 -1
  204. package/dist/src/config/mappings/codex.d.ts +0 -3
  205. package/dist/src/config/mappings/codex.d.ts.map +0 -1
  206. package/dist/src/config/mappings/codex.js +0 -31
  207. package/dist/src/config/mappings/codex.js.map +0 -1
  208. package/dist/src/config/mappings/copilot.d.ts +0 -3
  209. package/dist/src/config/mappings/copilot.d.ts.map +0 -1
  210. package/dist/src/config/mappings/copilot.js +0 -33
  211. package/dist/src/config/mappings/copilot.js.map +0 -1
  212. package/dist/src/config/mappings/cursor.d.ts +0 -3
  213. package/dist/src/config/mappings/cursor.d.ts.map +0 -1
  214. package/dist/src/config/mappings/cursor.js +0 -29
  215. package/dist/src/config/mappings/cursor.js.map +0 -1
  216. package/dist/src/config/sync.d.ts +0 -13
  217. package/dist/src/config/sync.d.ts.map +0 -1
  218. package/dist/src/config/sync.js +0 -96
  219. package/dist/src/config/sync.js.map +0 -1
  220. package/dist/src/ingestion/coordinator.d.ts +0 -37
  221. package/dist/src/ingestion/coordinator.d.ts.map +0 -1
  222. package/dist/src/ingestion/coordinator.js +0 -127
  223. package/dist/src/ingestion/coordinator.js.map +0 -1
  224. package/dist/src/ingestion/daemon.d.ts +0 -17
  225. package/dist/src/ingestion/daemon.d.ts.map +0 -1
  226. package/dist/src/ingestion/daemon.js +0 -35
  227. package/dist/src/ingestion/daemon.js.map +0 -1
  228. package/dist/src/ingestion/watcher.d.ts +0 -19
  229. package/dist/src/ingestion/watcher.d.ts.map +0 -1
  230. package/dist/src/ingestion/watcher.js +0 -70
  231. package/dist/src/ingestion/watcher.js.map +0 -1
  232. package/dist/src/knowledge/autotag.d.ts +0 -3
  233. package/dist/src/knowledge/autotag.d.ts.map +0 -1
  234. package/dist/src/knowledge/autotag.js +0 -24
  235. package/dist/src/knowledge/autotag.js.map +0 -1
  236. package/dist/src/knowledge/dedup.d.ts +0 -7
  237. package/dist/src/knowledge/dedup.d.ts.map +0 -1
  238. package/dist/src/knowledge/dedup.js +0 -15
  239. package/dist/src/knowledge/dedup.js.map +0 -1
  240. package/dist/src/knowledge/repository.d.ts +0 -12
  241. package/dist/src/knowledge/repository.d.ts.map +0 -1
  242. package/dist/src/knowledge/repository.js +0 -74
  243. package/dist/src/knowledge/repository.js.map +0 -1
  244. package/dist/src/mcp/tools/config.d.ts +0 -36
  245. package/dist/src/mcp/tools/config.d.ts.map +0 -1
  246. package/dist/src/mcp/tools/config.js +0 -54
  247. package/dist/src/mcp/tools/config.js.map +0 -1
  248. package/dist/src/mcp/tools/knowledge.d.ts +0 -17
  249. package/dist/src/mcp/tools/knowledge.d.ts.map +0 -1
  250. package/dist/src/mcp/tools/knowledge.js +0 -46
  251. package/dist/src/mcp/tools/knowledge.js.map +0 -1
  252. package/dist/src/mcp/tools/search.d.ts +0 -22
  253. package/dist/src/mcp/tools/search.d.ts.map +0 -1
  254. package/dist/src/mcp/tools/search.js +0 -30
  255. package/dist/src/mcp/tools/search.js.map +0 -1
  256. package/dist/src/mcp/tools/write.d.ts +0 -38
  257. package/dist/src/mcp/tools/write.d.ts.map +0 -1
  258. package/dist/src/mcp/tools/write.js +0 -97
  259. package/dist/src/mcp/tools/write.js.map +0 -1
  260. package/dist/src/runtime/ingestion.d.ts +0 -17
  261. package/dist/src/runtime/ingestion.d.ts.map +0 -1
  262. package/dist/src/runtime/ingestion.js +0 -106
  263. package/dist/src/runtime/ingestion.js.map +0 -1
  264. package/dist/src/scrapers/gemini.d.ts +0 -17
  265. package/dist/src/scrapers/gemini.d.ts.map +0 -1
  266. package/dist/src/scrapers/gemini.js +0 -245
  267. package/dist/src/scrapers/gemini.js.map +0 -1
  268. package/dist/src/store/embeddings.d.ts +0 -9
  269. package/dist/src/store/embeddings.d.ts.map +0 -1
  270. package/dist/src/store/embeddings.js +0 -28
  271. package/dist/src/store/embeddings.js.map +0 -1
  272. package/dist/src/store/lance.d.ts +0 -25
  273. package/dist/src/store/lance.d.ts.map +0 -1
  274. package/dist/src/store/lance.js +0 -74
  275. package/dist/src/store/lance.js.map +0 -1
  276. package/dist/src/store/search.d.ts +0 -18
  277. package/dist/src/store/search.d.ts.map +0 -1
  278. package/dist/src/store/search.js +0 -55
  279. package/dist/src/store/search.js.map +0 -1
  280. package/dist/src/types/compaction.d.ts +0 -29
  281. package/dist/src/types/compaction.d.ts.map +0 -1
  282. package/dist/src/types/compaction.js +0 -2
  283. package/dist/src/types/compaction.js.map +0 -1
  284. package/dist/src/types/context.d.ts +0 -33
  285. package/dist/src/types/context.d.ts.map +0 -1
  286. package/dist/src/types/context.js +0 -18
  287. package/dist/src/types/context.js.map +0 -1
  288. package/dist/src/utils/retry.d.ts +0 -11
  289. package/dist/src/utils/retry.d.ts.map +0 -1
  290. package/dist/src/utils/retry.js +0 -46
  291. package/dist/src/utils/retry.js.map +0 -1
  292. package/dist/src/utils/shutdown.d.ts +0 -25
  293. package/dist/src/utils/shutdown.d.ts.map +0 -1
  294. package/dist/src/utils/shutdown.js +0 -56
  295. package/dist/src/utils/shutdown.js.map +0 -1
  296. package/dist/web/apple-touch-icon.png +0 -0
  297. package/dist/web/assets/index-Nuadr5ox.css +0 -1
  298. package/dist/web/assets/index-aA0u8eXA.js +0 -3504
  299. package/dist/web/assets/primeicons-C6QP2o4f.woff2 +0 -0
  300. package/dist/web/assets/primeicons-DMOk5skT.eot +0 -0
  301. package/dist/web/assets/primeicons-Dr5RGzOO.svg +0 -345
  302. package/dist/web/assets/primeicons-MpK4pl85.ttf +0 -0
  303. package/dist/web/assets/primeicons-WjwUDZjB.woff +0 -0
  304. package/dist/web/favicon.ico +0 -0
  305. package/dist/web/favicon.svg +0 -21
  306. package/dist/web/index.html +0 -21
  307. package/dist/web/site.webmanifest +0 -19
  308. package/dist/web/vite.svg +0 -1
@@ -1,74 +0,0 @@
1
- import * as lancedb from "@lancedb/lancedb";
2
- export class LanceStore {
3
- dbPath;
4
- db = null;
5
- constructor(dbPath) {
6
- this.dbPath = dbPath;
7
- }
8
- async initialize() {
9
- this.db = await lancedb.connect(this.dbPath);
10
- }
11
- async upsert(tableName, records) {
12
- if (records.length === 0) {
13
- return;
14
- }
15
- const db = this.requireDb();
16
- const tableNames = await db.tableNames();
17
- if (tableNames.includes(tableName)) {
18
- const table = await db.openTable(tableName);
19
- await table.add(records);
20
- return;
21
- }
22
- await db.createTable(tableName, records);
23
- }
24
- async vectorSearch(tableName, queryVector, limit) {
25
- const db = this.requireDb();
26
- if (!(await this.tableExists(tableName))) {
27
- return [];
28
- }
29
- const table = await db.openTable(tableName);
30
- const results = await table.vectorSearch(queryVector).limit(limit).toArray();
31
- return results.map((row) => ({
32
- id: row.id,
33
- text: row.text,
34
- metadata: row.metadata,
35
- score: row._distance != null ? 1 / (1 + Number(row._distance)) : 0,
36
- }));
37
- }
38
- async ftsSearch(tableName, query, limit) {
39
- const db = this.requireDb();
40
- if (!(await this.tableExists(tableName))) {
41
- return [];
42
- }
43
- const table = await db.openTable(tableName);
44
- try {
45
- await table.createIndex("text", { config: lancedb.Index.fts() });
46
- }
47
- catch {
48
- // FTS index may already exist.
49
- }
50
- const results = await table.search(query, "fts", "text").limit(limit).toArray();
51
- return results.map((row, index) => ({
52
- id: row.id,
53
- text: row.text,
54
- metadata: row.metadata,
55
- score: 1 / (1 + index),
56
- }));
57
- }
58
- async tableExists(tableName) {
59
- const db = this.requireDb();
60
- const names = await db.tableNames();
61
- return names.includes(tableName);
62
- }
63
- async deleteTable(tableName) {
64
- const db = this.requireDb();
65
- await db.dropTable(tableName);
66
- }
67
- requireDb() {
68
- if (!this.db) {
69
- throw new Error("Store not initialized");
70
- }
71
- return this.db;
72
- }
73
- }
74
- //# sourceMappingURL=lance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lance.js","sourceRoot":"","sources":["../../../src/store/lance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAgB5C,MAAM,OAAO,UAAU;IAGQ;IAFrB,EAAE,GAA8B,IAAI,CAAC;IAE7C,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C,KAAK,CAAC,UAAU;QACd,IAAI,CAAC,EAAE,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,SAAiB,EAAE,OAAuB;QACrD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO;QACT,CAAC;QAED,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC,UAAU,EAAE,CAAC;QAEzC,IAAI,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YACnC,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YAC5C,MAAM,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACzB,OAAO;QACT,CAAC;QAED,MAAM,EAAE,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,SAAiB,EACjB,WAAq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CAAC;YACP,+BAA+B;QACjC,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;QAEhF,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YAClC,EAAE,EAAE,GAAG,CAAC,EAAY;YACpB,IAAI,EAAE,GAAG,CAAC,IAAc;YACxB,QAAQ,EAAE,GAAG,CAAC,QAAkB;YAChC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;SACvB,CAAC,CAAC,CAAC;IACN,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,SAAiB;QACjC,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,UAAU,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,SAAiB;QACjC,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,MAAM,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;IAEO,SAAS;QACf,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;CACF"}
@@ -1,18 +0,0 @@
1
- import type { EmbeddingService } from "./embeddings.js";
2
- import type { LanceStore, SearchResult } from "./lance.js";
3
- export interface RankedResult {
4
- id: string;
5
- score: number;
6
- }
7
- export interface HybridSearchResult extends SearchResult {
8
- fusedScore: number;
9
- }
10
- export type SearchMode = "hybrid" | "semantic" | "keyword";
11
- export declare function fuseResults(vectorResults: RankedResult[], bm25Results: RankedResult[], k?: number): RankedResult[];
12
- export declare class HybridSearch {
13
- private readonly store;
14
- private readonly embeddings;
15
- constructor(store: LanceStore, embeddings: EmbeddingService);
16
- search(tableName: string, query: string, mode: SearchMode, limit: number): Promise<HybridSearchResult[]>;
17
- }
18
- //# sourceMappingURL=search.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/store/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE3D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAE3D,wBAAgB,WAAW,CACzB,aAAa,EAAE,YAAY,EAAE,EAC7B,WAAW,EAAE,YAAY,EAAE,EAC3B,CAAC,SAAK,GACL,YAAY,EAAE,CAchB;AAED,qBAAa,YAAY;IAErB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBADV,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,gBAAgB;IAGzC,MAAM,CACV,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,kBAAkB,EAAE,CAAC;CA2CjC"}
@@ -1,55 +0,0 @@
1
- export function fuseResults(vectorResults, bm25Results, k = 60) {
2
- const scores = new Map();
3
- for (const [rank, result] of vectorResults.entries()) {
4
- scores.set(result.id, (scores.get(result.id) ?? 0) + 1 / (k + rank + 1));
5
- }
6
- for (const [rank, result] of bm25Results.entries()) {
7
- scores.set(result.id, (scores.get(result.id) ?? 0) + 1 / (k + rank + 1));
8
- }
9
- return [...scores.entries()]
10
- .map(([id, score]) => ({ id, score }))
11
- .sort((a, b) => b.score - a.score);
12
- }
13
- export class HybridSearch {
14
- store;
15
- embeddings;
16
- constructor(store, embeddings) {
17
- this.store = store;
18
- this.embeddings = embeddings;
19
- }
20
- async search(tableName, query, mode, limit) {
21
- if (mode === "keyword") {
22
- const results = await this.store.ftsSearch(tableName, query, limit);
23
- return results.map((result) => ({ ...result, fusedScore: result.score }));
24
- }
25
- if (mode === "semantic") {
26
- const vector = await this.embeddings.embed(query);
27
- const results = await this.store.vectorSearch(tableName, vector, limit);
28
- return results.map((result) => ({ ...result, fusedScore: result.score }));
29
- }
30
- const vector = await this.embeddings.embed(query);
31
- const [vectorResults, ftsResults] = await Promise.all([
32
- this.store.vectorSearch(tableName, vector, limit * 2),
33
- this.store.ftsSearch(tableName, query, limit * 2),
34
- ]);
35
- const fused = fuseResults(vectorResults.map((result) => ({ id: result.id, score: result.score })), ftsResults.map((result) => ({ id: result.id, score: result.score })));
36
- const allResults = new Map();
37
- for (const result of [...vectorResults, ...ftsResults]) {
38
- const existing = allResults.get(result.id);
39
- if (!existing || result.score > existing.score) {
40
- allResults.set(result.id, result);
41
- }
42
- }
43
- return fused
44
- .slice(0, limit)
45
- .map((result) => {
46
- const full = allResults.get(result.id);
47
- if (!full) {
48
- return null;
49
- }
50
- return { ...full, fusedScore: result.score };
51
- })
52
- .filter((result) => result !== null);
53
- }
54
- }
55
- //# sourceMappingURL=search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/store/search.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,WAAW,CACzB,aAA6B,EAC7B,WAA2B,EAC3B,CAAC,GAAG,EAAE;IAEN,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEzC,K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C,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CACrE,CAAC;QAEF,MAAM,UAAU,GAAG,IAAI,GAAG,EAAwB,CAAC;QACnD,KAAK,MAAM,MAAM,IAAI,CAAC,GAAG,aAAa,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;YACvD,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAC3C,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;gBAC/C,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;YACpC,CAAC;QACH,CAAC;QAED,OAAO,KAAK;aACT,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;aACf,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACd,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACvC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO,IAAI,CAAC;YACd,CAAC;YAED,OAAO,EAAE,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;QAC/C,CAAC,CAAC;aACD,MAAM,CAAC,CAAC,MAAM,EAAgC,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC;IACvE,CAAC;CACF"}
@@ -1,29 +0,0 @@
1
- export interface CompactedSession {
2
- sessionId: string;
3
- tool: string;
4
- timeRange: {
5
- start: string;
6
- end: string;
7
- };
8
- summary: string;
9
- tasksCompleted: string[];
10
- decisionsIdentified: string[];
11
- filesModified: string[];
12
- openQuestions: string[];
13
- chunkRefs: string[];
14
- chunkCount: number;
15
- estimatedTokens: number;
16
- }
17
- export interface CompactionConfig {
18
- strategy: "rule-based" | "llm-assisted";
19
- sessionBoundaryMinutes: number;
20
- llm?: {
21
- provider: "cli" | "ollama" | "openai";
22
- command?: string;
23
- args?: string[];
24
- model?: string;
25
- endpoint?: string;
26
- apiKeyEnv?: string;
27
- };
28
- }
29
- //# sourceMappingURL=compaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../../src/types/compaction.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,YAAY,GAAG,cAAc,CAAC;IACxC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,GAAG,CAAC,EAAE;QACJ,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;QACtC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=compaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compaction.js","sourceRoot":"","sources":["../../../src/types/compaction.ts"],"names":[],"mappings":""}
@@ -1,33 +0,0 @@
1
- export declare const CONTEXT_TYPES: readonly ["decision", "error_solution", "insight", "convention", "gotcha", "faq"];
2
- export type ContextType = (typeof CONTEXT_TYPES)[number];
3
- export interface ContextRecord {
4
- id: string;
5
- type: ContextType;
6
- created_at: string;
7
- supersedes?: string;
8
- superseded_by?: string;
9
- source_tool: string;
10
- source_session?: string;
11
- referenced_files: string[];
12
- domain_tags: string[];
13
- environment: {
14
- runtime_versions?: Record<string, string>;
15
- dependency_versions?: Record<string, string>;
16
- os?: string;
17
- tool_version?: string;
18
- };
19
- title: string;
20
- body: string;
21
- metadata?: Record<string, unknown>;
22
- }
23
- export type WriteAction = "created" | "superseded" | "duplicate_rejected";
24
- export interface WriteResult {
25
- action: WriteAction;
26
- id: string;
27
- existing?: ContextRecord;
28
- replaced?: string;
29
- message?: string;
30
- }
31
- export declare function createContextRecordId(title: string, body: string, sourceTool: string): string;
32
- export declare function isValidContextType(type: string): type is ContextType;
33
- //# sourceMappingURL=context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/types/context.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,mFAOhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE;QACX,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7C,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,YAAY,GAAG,oBAAoB,CAAC;AAE1E,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB,MAAM,CAIR;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,WAAW,CAEpE"}
@@ -1,18 +0,0 @@
1
- import { createHash } from "node:crypto";
2
- export const CONTEXT_TYPES = [
3
- "decision",
4
- "error_solution",
5
- "insight",
6
- "convention",
7
- "gotcha",
8
- "faq",
9
- ];
10
- export function createContextRecordId(title, body, sourceTool) {
11
- const hash = createHash("sha256");
12
- hash.update(`${title}|${body}|${sourceTool}`);
13
- return hash.digest("hex").slice(0, 16);
14
- }
15
- export function isValidContextType(type) {
16
- return CONTEXT_TYPES.includes(type);
17
- }
18
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/types/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,UAAU;IACV,gBAAgB;IAChB,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,KAAK;CACG,CAAC;AAmCX,MAAM,UAAU,qBAAqB,CACnC,KAAa,EACb,IAAY,EACZ,UAAkB;IAElB,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,IAAI,IAAI,IAAI,UAAU,EAAE,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,aAAa,CAAC,QAAQ,CAAC,IAAmB,CAAC,CAAC;AACrD,CAAC"}
@@ -1,11 +0,0 @@
1
- export interface RetryOptions {
2
- attempts?: number;
3
- minDelayMs?: number;
4
- maxDelayMs?: number;
5
- factor?: number;
6
- jitterMs?: number;
7
- shouldRetry?: (error: unknown, attempt: number) => boolean;
8
- onRetry?: (error: unknown, attempt: number, delayMs: number) => void;
9
- }
10
- export declare function withRetry<T>(operation: () => Promise<T>, options?: RetryOptions): Promise<T>;
11
- //# sourceMappingURL=retry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../src/utils/retry.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACtE;AAYD,wBAAsB,SAAS,CAAC,CAAC,EAC/B,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC3B,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,CAAC,CAAC,CAiCZ"}
@@ -1,46 +0,0 @@
1
- const DEFAULT_OPTIONS = {
2
- attempts: 3,
3
- minDelayMs: 250,
4
- maxDelayMs: 2_000,
5
- factor: 2,
6
- jitterMs: 50,
7
- };
8
- export async function withRetry(operation, options = {}) {
9
- const attempts = Math.max(1, options.attempts ?? DEFAULT_OPTIONS.attempts);
10
- const minDelayMs = Math.max(0, options.minDelayMs ?? DEFAULT_OPTIONS.minDelayMs);
11
- const maxDelayMs = Math.max(minDelayMs, options.maxDelayMs ?? DEFAULT_OPTIONS.maxDelayMs);
12
- const factor = Math.max(1, options.factor ?? DEFAULT_OPTIONS.factor);
13
- const jitterMs = Math.max(0, options.jitterMs ?? DEFAULT_OPTIONS.jitterMs);
14
- let currentDelay = minDelayMs;
15
- let lastError;
16
- for (let attempt = 1; attempt <= attempts; attempt += 1) {
17
- try {
18
- return await operation();
19
- }
20
- catch (error) {
21
- lastError = error;
22
- const shouldRetry = options.shouldRetry ? options.shouldRetry(error, attempt) : true;
23
- const isLastAttempt = attempt >= attempts;
24
- if (!shouldRetry || isLastAttempt) {
25
- throw error;
26
- }
27
- const delayMs = Math.min(maxDelayMs, currentDelay + randomJitter(jitterMs));
28
- options.onRetry?.(error, attempt, delayMs);
29
- await sleep(delayMs);
30
- currentDelay = Math.min(maxDelayMs, Math.floor(currentDelay * factor) || minDelayMs);
31
- }
32
- }
33
- throw lastError;
34
- }
35
- function sleep(ms) {
36
- return new Promise((resolve) => {
37
- setTimeout(resolve, ms);
38
- });
39
- }
40
- function randomJitter(max) {
41
- if (max <= 0) {
42
- return 0;
43
- }
44
- return Math.floor(Math.random() * (max + 1));
45
- }
46
- //# sourceMappingURL=retry.js.map
@@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AAC,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACrF,MAAM,aAAa,GAAG,OAAO,IAAI,QAAQ,CAAC;YAE1C,IAAI,CAAC,WAAW,IAAI,aAAa,EAAE,CAAC;gBAClC,MAAM,KAAK,CAAC;YACd,CAAC;YAED,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CACtB,UAAU,EACV,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC,CACtC,CAAC;YACF,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC3C,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;YACrB,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC,IAAI,UAAU,CAAC,CAAC;QACvF,CAAC;IACH,CAAC;IAED,MAAM,SAAS,CAAC;AAClB,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,YAAY,CAAC,GAAW;IAC/B,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;QACb,OAAO,CAAC,CAAC;IACX,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC"}
@@ -1,25 +0,0 @@
1
- export type ShutdownHook = () => Promise<void> | void;
2
- type SignalName = "SIGINT" | "SIGTERM";
3
- export interface ShutdownError {
4
- name: string;
5
- error: unknown;
6
- }
7
- export interface ShutdownResult {
8
- reason: string;
9
- errors: ShutdownError[];
10
- }
11
- export declare class ShutdownCoordinator {
12
- private readonly hooks;
13
- private shutdownPromise;
14
- private signalHandlers;
15
- register(name: string, hook: ShutdownHook): void;
16
- installSignalHandlers(onSignal: (signal: SignalName) => void): void;
17
- removeSignalHandlers(): void;
18
- run(reason?: string): Promise<ShutdownResult>;
19
- private execute;
20
- }
21
- export declare function closeHttpServer(server: {
22
- close: (cb: (error?: Error | null) => void) => void;
23
- }): Promise<void>;
24
- export {};
25
- //# sourceMappingURL=shutdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["../../../src/utils/shutdown.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACtD,KAAK,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmD;IACzE,OAAO,CAAC,eAAe,CAAwC;IAC/D,OAAO,CAAC,cAAc,CAA+C;IAErE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI;IAIhD,qBAAqB,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI;IAWnE,oBAAoB,IAAI,IAAI;IAYtB,GAAG,CAAC,MAAM,SAAa,GAAG,OAAO,CAAC,cAAc,CAAC;YAQzC,OAAO;CAatB;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE;IAC5C,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,KAAK,IAAI,CAAC;CACrD,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhB"}
@@ -1,56 +0,0 @@
1
- export class ShutdownCoordinator {
2
- hooks = [];
3
- shutdownPromise = null;
4
- signalHandlers = {};
5
- register(name, hook) {
6
- this.hooks.push({ name, hook });
7
- }
8
- installSignalHandlers(onSignal) {
9
- this.removeSignalHandlers();
10
- const sigint = () => onSignal("SIGINT");
11
- const sigterm = () => onSignal("SIGTERM");
12
- this.signalHandlers.SIGINT = sigint;
13
- this.signalHandlers.SIGTERM = sigterm;
14
- process.once("SIGINT", sigint);
15
- process.once("SIGTERM", sigterm);
16
- }
17
- removeSignalHandlers() {
18
- if (this.signalHandlers.SIGINT) {
19
- process.off("SIGINT", this.signalHandlers.SIGINT);
20
- }
21
- if (this.signalHandlers.SIGTERM) {
22
- process.off("SIGTERM", this.signalHandlers.SIGTERM);
23
- }
24
- this.signalHandlers = {};
25
- }
26
- async run(reason = "shutdown") {
27
- if (!this.shutdownPromise) {
28
- this.shutdownPromise = this.execute(reason);
29
- }
30
- return this.shutdownPromise;
31
- }
32
- async execute(reason) {
33
- const errors = [];
34
- for (const { name, hook } of [...this.hooks].reverse()) {
35
- try {
36
- await hook();
37
- }
38
- catch (error) {
39
- errors.push({ name, error });
40
- }
41
- }
42
- return { reason, errors };
43
- }
44
- }
45
- export async function closeHttpServer(server) {
46
- await new Promise((resolve, reject) => {
47
- server.close((error) => {
48
- if (error) {
49
- reject(error);
50
- return;
51
- }
52
- resolve();
53
- });
54
- });
55
- }
56
- //# sourceMappingURL=shutdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shutdown.js","sourceRoot":"","sources":["../../../src/utils/shutdown.ts"],"names":[],"mappings":"AAaA,MAAM,OAAO,mBAAmB;IACb,KAAK,GAAgD,EAAE,CAAC;IACjE,eAAe,GAAmC,IAAI,CAAC;IACvD,cAAc,GAA4C,EAAE,CAAC;IAErE,QAAQ,CAAC,IAAY,EAAE,IAAkB;QACvC,IAAI,CAAC,KAAK,CAAC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EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;YACvD,IAAI,CAAC;gBACH,MAAM,IAAI,EAAE,CAAC;YACf,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC5B,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAErC;IACC,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC1C,MAAM,CAAC,KAAK,CAAC,CAAC,KAAoB,EAAE,EAAE;YACpC,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,CAAC,KAAK,CAAC,CAAC;gBACd,OAAO;YACT,CAAC;YACD,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
Binary file
@@ -1 +0,0 @@
1
- @import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700&display=swap";@font-face{font-family:primeicons;font-display:block;src:url(/assets/primeicons-DMOk5skT.eot);src:url(/assets/primeicons-DMOk5skT.eot?#iefix) format("embedded-opentype"),url(/assets/primeicons-C6QP2o4f.woff2) format("woff2"),url(/assets/primeicons-WjwUDZjB.woff) format("woff"),url(/assets/primeicons-MpK4pl85.ttf) format("truetype"),url(/assets/primeicons-Dr5RGzOO.svg?#primeicons) format("svg");font-weight:400;font-style:normal}.pi{font-family:primeicons;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.pi:before{--webkit-backface-visibility:hidden;backface-visibility:hidden}.pi-fw{width:1.28571429em;text-align:center}.pi-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@media(prefers-reduced-motion:reduce){.pi-spin{-webkit-animation-delay:-1ms;animation-delay:-1ms;-webkit-animation-duration:1ms;animation-duration:1ms;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s}}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.pi-folder-plus:before{content:""}.pi-receipt:before{content:""}.pi-asterisk:before{content:""}.pi-face-smile:before{content:""}.pi-pinterest:before{content:""}.pi-expand:before{content:""}.pi-pen-to-square:before{content:""}.pi-wave-pulse:before{content:""}.pi-turkish-lira:before{content:""}.pi-spinner-dotted:before{content:""}.pi-crown:before{content:""}.pi-pause-circle:before{content:""}.pi-warehouse:before{content:""}.pi-objects-column:before{content:""}.pi-clipboard:before{content:""}.pi-play-circle:before{content:""}.pi-venus:before{content:""}.pi-cart-minus:before{content:""}.pi-file-plus:before{content:""}.pi-microchip:before{content:""}.pi-twitch:before{content:""}.pi-building-columns:before{content:""}.pi-file-check:before{content:""}.pi-microchip-ai:before{content:""}.pi-trophy:before{content:""}.pi-barcode:before{content:""}.pi-file-arrow-up:before{content:""}.pi-mars:before{content:""}.pi-tiktok:before{content:""}.pi-arrow-up-right-and-arrow-down-left-from-center:before{content:""}.pi-ethereum:before{content:""}.pi-list-check:before{content:""}.pi-thumbtack:before{content:""}.pi-arrow-down-left-and-arrow-up-right-to-center:before{content:""}.pi-equals:before{content:""}.pi-lightbulb:before{content:""}.pi-star-half:before{content:""}.pi-address-book:before{content:""}.pi-chart-scatter:before{content:""}.pi-indian-rupee:before{content:""}.pi-star-half-fill:before{content:""}.pi-cart-arrow-down:before{content:""}.pi-calendar-clock:before{content:""}.pi-sort-up-fill:before{content:""}.pi-sparkles:before{content:""}.pi-bullseye:before{content:""}.pi-sort-down-fill:before{content:""}.pi-graduation-cap:before{content:""}.pi-hammer:before{content:""}.pi-bell-slash:before{content:""}.pi-gauge:before{content:""}.pi-shop:before{content:""}.pi-headphones:before{content:""}.pi-eraser:before{content:""}.pi-stopwatch:before{content:""}.pi-verified:before{content:""}.pi-delete-left:before{content:""}.pi-hourglass:before{content:""}.pi-truck:before{content:""}.pi-wrench:before{content:""}.pi-microphone:before{content:""}.pi-megaphone:before{content:""}.pi-arrow-right-arrow-left:before{content:""}.pi-bitcoin:before{content:""}.pi-file-edit:before{content:""}.pi-language:before{content:""}.pi-file-export:before{content:""}.pi-file-import:before{content:""}.pi-file-word:before{content:""}.pi-gift:before{content:""}.pi-cart-plus:before{content:""}.pi-thumbs-down-fill:before{content:""}.pi-thumbs-up-fill:before{content:""}.pi-arrows-alt:before{content:""}.pi-calculator:before{content:""}.pi-sort-alt-slash:before{content:""}.pi-arrows-h:before{content:""}.pi-arrows-v:before{content:""}.pi-pound:before{content:""}.pi-prime:before{content:""}.pi-chart-pie:before{content:""}.pi-reddit:before{content:""}.pi-code:before{content:""}.pi-sync:before{content:""}.pi-shopping-bag:before{content:""}.pi-server:before{content:""}.pi-database:before{content:""}.pi-hashtag:before{content:""}.pi-bookmark-fill:before{content:""}.pi-filter-fill:before{content:""}.pi-heart-fill:before{content:""}.pi-flag-fill:before{content:""}.pi-circle:before{content:""}.pi-circle-fill:before{content:""}.pi-bolt:before{content:""}.pi-history:before{content:""}.pi-box:before{content:""}.pi-at:before{content:""}.pi-arrow-up-right:before{content:""}.pi-arrow-up-left:before{content:""}.pi-arrow-down-left:before{content:""}.pi-arrow-down-right:before{content:""}.pi-telegram:before{content:""}.pi-stop-circle:before{content:""}.pi-stop:before{content:""}.pi-whatsapp:before{content:""}.pi-building:before{content:""}.pi-qrcode:before{content:""}.pi-car:before{content:""}.pi-instagram:before{content:""}.pi-linkedin:before{content:""}.pi-send:before{content:""}.pi-slack:before{content:""}.pi-sun:before{content:""}.pi-moon:before{content:""}.pi-vimeo:before{content:""}.pi-youtube:before{content:""}.pi-flag:before{content:""}.pi-wallet:before{content:""}.pi-map:before{content:""}.pi-link:before{content:""}.pi-credit-card:before{content:""}.pi-discord:before{content:""}.pi-percentage:before{content:""}.pi-euro:before{content:""}.pi-book:before{content:""}.pi-shield:before{content:""}.pi-paypal:before{content:""}.pi-amazon:before{content:""}.pi-phone:before{content:""}.pi-filter-slash:before{content:""}.pi-facebook:before{content:""}.pi-github:before{content:""}.pi-twitter:before{content:""}.pi-step-backward-alt:before{content:""}.pi-step-forward-alt:before{content:""}.pi-forward:before{content:""}.pi-backward:before{content:""}.pi-fast-backward:before{content:""}.pi-fast-forward:before{content:""}.pi-pause:before{content:""}.pi-play:before{content:""}.pi-compass:before{content:""}.pi-id-card:before{content:""}.pi-ticket:before{content:""}.pi-file-o:before{content:""}.pi-reply:before{content:""}.pi-directions-alt:before{content:""}.pi-directions:before{content:""}.pi-thumbs-up:before{content:""}.pi-thumbs-down:before{content:""}.pi-sort-numeric-down-alt:before{content:""}.pi-sort-numeric-up-alt:before{content:""}.pi-sort-alpha-down-alt:before{content:""}.pi-sort-alpha-up-alt:before{content:""}.pi-sort-numeric-down:before{content:""}.pi-sort-numeric-up:before{content:""}.pi-sort-alpha-down:before{content:""}.pi-sort-alpha-up:before{content:""}.pi-sort-alt:before{content:""}.pi-sort-amount-up:before{content:""}.pi-sort-amount-down:before{content:""}.pi-sort-amount-down-alt:before{content:""}.pi-sort-amount-up-alt:before{content:""}.pi-palette:before{content:""}.pi-undo:before{content:""}.pi-desktop:before{content:""}.pi-sliders-v:before{content:""}.pi-sliders-h:before{content:""}.pi-search-plus:before{content:""}.pi-search-minus:before{content:""}.pi-file-excel:before{content:""}.pi-file-pdf:before{content:""}.pi-check-square:before{content:""}.pi-chart-line:before{content:""}.pi-user-edit:before{content:""}.pi-exclamation-circle:before{content:""}.pi-android:before{content:""}.pi-google:before{content:""}.pi-apple:before{content:""}.pi-microsoft:before{content:""}.pi-heart:before{content:""}.pi-mobile:before{content:""}.pi-tablet:before{content:""}.pi-key:before{content:""}.pi-shopping-cart:before{content:""}.pi-comments:before{content:""}.pi-comment:before{content:""}.pi-briefcase:before{content:""}.pi-bell:before{content:""}.pi-paperclip:before{content:""}.pi-share-alt:before{content:""}.pi-envelope:before{content:""}.pi-volume-down:before{content:""}.pi-volume-up:before{content:""}.pi-volume-off:before{content:""}.pi-eject:before{content:""}.pi-money-bill:before{content:""}.pi-images:before{content:""}.pi-image:before{content:""}.pi-sign-in:before{content:""}.pi-sign-out:before{content:""}.pi-wifi:before{content:""}.pi-sitemap:before{content:""}.pi-chart-bar:before{content:""}.pi-camera:before{content:""}.pi-dollar:before{content:""}.pi-lock-open:before{content:""}.pi-table:before{content:""}.pi-map-marker:before{content:""}.pi-list:before{content:""}.pi-eye-slash:before{content:""}.pi-eye:before{content:""}.pi-folder-open:before{content:""}.pi-folder:before{content:""}.pi-video:before{content:""}.pi-inbox:before{content:""}.pi-lock:before{content:""}.pi-unlock:before{content:""}.pi-tags:before{content:""}.pi-tag:before{content:""}.pi-power-off:before{content:""}.pi-save:before{content:""}.pi-question-circle:before{content:""}.pi-question:before{content:""}.pi-copy:before{content:""}.pi-file:before{content:""}.pi-clone:before{content:""}.pi-calendar-times:before{content:""}.pi-calendar-minus:before{content:""}.pi-calendar-plus:before{content:""}.pi-ellipsis-v:before{content:""}.pi-ellipsis-h:before{content:""}.pi-bookmark:before{content:""}.pi-globe:before{content:""}.pi-replay:before{content:""}.pi-filter:before{content:""}.pi-print:before{content:""}.pi-align-right:before{content:""}.pi-align-left:before{content:""}.pi-align-center:before{content:""}.pi-align-justify:before{content:""}.pi-cog:before{content:""}.pi-cloud-download:before{content:""}.pi-cloud-upload:before{content:""}.pi-cloud:before{content:""}.pi-pencil:before{content:""}.pi-users:before{content:""}.pi-clock:before{content:""}.pi-user-minus:before{content:""}.pi-user-plus:before{content:""}.pi-trash:before{content:""}.pi-external-link:before{content:""}.pi-window-maximize:before{content:""}.pi-window-minimize:before{content:""}.pi-refresh:before{content:""}.pi-user:before{content:""}.pi-exclamation-triangle:before{content:""}.pi-calendar:before{content:""}.pi-chevron-circle-left:before{content:""}.pi-chevron-circle-down:before{content:""}.pi-chevron-circle-right:before{content:""}.pi-chevron-circle-up:before{content:""}.pi-angle-double-down:before{content:""}.pi-angle-double-left:before{content:""}.pi-angle-double-right:before{content:""}.pi-angle-double-up:before{content:""}.pi-angle-down:before{content:""}.pi-angle-left:before{content:""}.pi-angle-right:before{content:""}.pi-angle-up:before{content:""}.pi-upload:before{content:""}.pi-download:before{content:""}.pi-ban:before{content:""}.pi-star-fill:before{content:""}.pi-star:before{content:""}.pi-chevron-left:before{content:""}.pi-chevron-right:before{content:""}.pi-chevron-down:before{content:""}.pi-chevron-up:before{content:""}.pi-caret-left:before{content:""}.pi-caret-right:before{content:""}.pi-caret-down:before{content:""}.pi-caret-up:before{content:""}.pi-search:before{content:""}.pi-check:before{content:""}.pi-check-circle:before{content:""}.pi-times:before{content:""}.pi-times-circle:before{content:""}.pi-plus:before{content:""}.pi-plus-circle:before{content:""}.pi-minus:before{content:""}.pi-minus-circle:before{content:""}.pi-circle-on:before{content:""}.pi-circle-off:before{content:""}.pi-sort-down:before{content:""}.pi-sort-up:before{content:""}.pi-sort:before{content:""}.pi-step-backward:before{content:""}.pi-step-forward:before{content:""}.pi-th-large:before{content:""}.pi-arrow-down:before{content:""}.pi-arrow-left:before{content:""}.pi-arrow-right:before{content:""}.pi-arrow-up:before{content:""}.pi-bars:before{content:""}.pi-arrow-circle-down:before{content:""}.pi-arrow-circle-left:before{content:""}.pi-arrow-circle-right:before{content:""}.pi-arrow-circle-up:before{content:""}.pi-info:before{content:""}.pi-info-circle:before{content:""}.pi-home:before{content:""}.pi-spinner:before{content:""}:root{--xt-font-heading: "Outfit", "Segoe UI", sans-serif;--xt-font-body: "Public Sans", "Segoe UI", sans-serif;--xt-font-mono: "IBM Plex Mono", "Consolas", monospace;--xt-radius-xs: 10px;--xt-radius-sm: 14px;--xt-radius-md: 18px;--xt-radius-lg: 24px;--xt-space-1: .25rem;--xt-space-2: .5rem;--xt-space-3: .75rem;--xt-space-4: 1rem;--xt-space-5: 1.5rem;--xt-space-6: 2rem;--xt-space-7: 2.75rem;--xt-shadow-sm: 0 8px 20px rgba(2, 9, 20, .28);--xt-shadow-md: 0 18px 40px rgba(2, 9, 20, .38);--xt-shadow-lg: 0 28px 60px rgba(2, 9, 20, .48);--xt-bg: #040a16;--xt-bg-soft: #091325;--xt-panel: rgba(11, 22, 39, .84);--xt-panel-strong: rgba(13, 26, 46, .95);--xt-card: rgba(15, 30, 52, .86);--xt-card-strong: rgba(18, 36, 62, .96);--xt-line: rgba(72, 107, 170, .4);--xt-line-soft: rgba(72, 107, 170, .25);--xt-text: #e8f1ff;--xt-text-muted: #91a8cf;--xt-text-soft: #b8c7df;--xt-accent: #31d4ab;--xt-accent-strong: #2ca58e;--xt-accent-alt: #4da9ff;--xt-warning: #f0b06f;--xt-danger: #f78091;--xt-focus: rgba(49, 212, 171, .5)}:root.light-mode{--xt-bg: #f3f7ff;--xt-bg-soft: #e6efff;--xt-panel: rgba(255, 255, 255, .87);--xt-panel-strong: rgba(255, 255, 255, .98);--xt-card: rgba(246, 250, 255, .92);--xt-card-strong: rgba(255, 255, 255, .99);--xt-line: rgba(68, 95, 141, .26);--xt-line-soft: rgba(68, 95, 141, .18);--xt-text: #142640;--xt-text-muted: #4e6386;--xt-text-soft: #3b5278;--xt-accent: #148a70;--xt-accent-strong: #106754;--xt-accent-alt: #1f78d9;--xt-warning: #a9642d;--xt-danger: #af4054;--xt-focus: rgba(20, 138, 112, .38);--xt-shadow-sm: 0 8px 20px rgba(16, 27, 51, .12);--xt-shadow-md: 0 16px 36px rgba(16, 27, 51, .16);--xt-shadow-lg: 0 24px 52px rgba(16, 27, 51, .2)}:root{color-scheme:dark;--ui-bg: #0b1220;--ui-bg-accent: #0f1a2d;--ui-surface: #101a2f;--ui-surface-2: #0f172a;--ui-surface-3: #0c1324;--ui-border: #27344d;--ui-border-2: #2f405d;--ui-text: #d8e2f0;--ui-text-muted: #9baac2;--ui-text-dim: #8291aa;--ui-accent: #2dd4bf;--ui-accent-2: #38bdf8;--ui-danger: #f87171;--ui-warning: #f59e0b;--ui-radius: 12px;--ui-radius-sm: 10px;--ui-shadow: 0 10px 24px rgba(3, 10, 20, .26)}:root.light-mode{color-scheme:light;--ui-bg: #f5f8fd;--ui-bg-accent: #edf3fb;--ui-surface: #ffffff;--ui-surface-2: #f8fbff;--ui-surface-3: #eef3fb;--ui-border: #d6e0ef;--ui-border-2: #c7d6ea;--ui-text: #15233a;--ui-text-muted: #4f6486;--ui-text-dim: #6b7d98;--ui-accent: #0f8f7b;--ui-accent-2: #0f6fd4;--ui-danger: #c93d4d;--ui-warning: #b56a16;--ui-shadow: 0 10px 26px rgba(32, 51, 84, .1)}*{box-sizing:border-box}html,body,#app{min-height:100%}body{margin:0;color:var(--ui-text);font-family:"Manrope",var(--xt-font-body);line-height:1.5;background:linear-gradient(180deg,rgba(56,189,248,.08),transparent 28%),linear-gradient(180deg,var(--ui-bg),var(--ui-bg-accent))}body:before{content:"";position:fixed;inset:0;pointer-events:none;background:linear-gradient(rgba(149,166,193,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(149,166,193,.06) 1px,transparent 1px);background-size:34px 34px;opacity:.22}a{color:inherit;text-decoration:none}code,pre{font-family:"JetBrains Mono",var(--xt-font-mono)}.app-shell{position:relative;z-index:1;width:min(1280px,calc(100% - 3rem));margin:1.5rem auto 2.75rem;display:grid;gap:1rem}.shell-panel{border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:var(--ui-surface);box-shadow:var(--ui-shadow)}.shell-topbar{padding:1.25rem 1.5rem;display:grid;gap:.95rem}.topbar-row{display:flex;align-items:center;justify-content:space-between;gap:1rem}.brand-block{display:grid;gap:.35rem}.eyebrow,.page-eyebrow,.context-label{margin:0;color:var(--ui-text-dim);font-family:"JetBrains Mono",var(--xt-font-mono);font-size:.68rem;letter-spacing:.12em;text-transform:uppercase}.brand-block h1{margin:0;font-family:"Sora",var(--xt-font-heading);font-size:clamp(1.6rem,2.2vw,2.15rem);line-height:1.12;letter-spacing:-.02em}.brand-subcopy{margin:0;color:var(--ui-text-muted);font-size:.98rem}.topbar-actions{display:flex;align-items:center;gap:.6rem}.topbar-status{display:flex;flex-wrap:wrap;gap:.5rem}.context-grid{display:grid;gap:.65rem;grid-template-columns:1.4fr 1fr}.context-item{border:1px solid var(--ui-border);border-radius:var(--ui-radius-sm);background:var(--ui-surface-2);padding:.8rem .95rem;display:grid;gap:.35rem}.context-item code{margin:0;font-size:.87rem;line-height:1.35;overflow-wrap:anywhere}.context-actions{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.context-links{display:flex;flex-wrap:wrap;gap:1rem}.context-links a{color:var(--ui-text-muted);font-size:.85rem;text-decoration:underline;text-underline-offset:.16rem}.start-button.p-button{min-width:10.5rem}.workspace-nav{padding:.7rem;display:flex;flex-wrap:wrap;gap:.6rem}.workspace-nav-item{min-height:2.6rem;padding-inline:1rem;border-radius:8px;border:1px solid var(--ui-border);background:var(--ui-surface-2);color:var(--ui-text-muted);display:inline-flex;align-items:center;justify-content:center;gap:.45rem;font-size:.92rem;font-weight:700;transition:background .12s ease}.workspace-nav-item:hover{color:var(--ui-text);background:var(--ui-surface-3)}.workspace-nav-item.active{color:#07151f;border-color:color-mix(in srgb,var(--ui-accent),#ffffff 24%);background:linear-gradient(115deg,color-mix(in srgb,var(--ui-accent),#ffffff 12%),color-mix(in srgb,var(--ui-accent-2),#ffffff 4%))}:root.light-mode .workspace-nav-item.active{color:#fff}.workspace-main{border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:var(--ui-surface);box-shadow:var(--ui-shadow);padding:1.45rem;min-height:calc(100vh - 15rem)}.page-shell{display:grid;gap:1rem}.dashboard-shell{max-width:none}.page-head{display:grid;gap:.4rem}.page-head h2{margin:0;font-family:"Sora",var(--xt-font-heading);font-size:clamp(1.4rem,2.2vw,1.9rem);line-height:1.18;letter-spacing:-.02em}.page-head p{margin:0;color:var(--ui-text-muted);max-width:76ch}.surface-card{border-radius:var(--ui-radius-sm);border:1px solid var(--ui-border);background:var(--ui-surface-2);box-shadow:none}.kpi-grid{display:grid;gap:.85rem;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.kpi-card{min-height:0}.kpi-card .p-card-content{display:grid;gap:.4rem}.kpi-value{margin:0;font-family:"Sora",var(--xt-font-heading);font-size:1.95rem;line-height:1;letter-spacing:-.02em;color:var(--ui-accent)}.kpi-label{margin:0;color:var(--ui-text-muted);font-size:.92rem}.split-grid{display:grid;gap:.85rem;grid-template-columns:repeat(auto-fit,minmax(340px,1fr))}.search-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.7rem}.helper-copy{margin:0;color:var(--ui-text-muted);line-height:1.5}.flow-list{margin:0;padding-left:1.2rem;display:grid;gap:.55rem;line-height:1.55}.detail-list{margin:0;display:grid;gap:.8rem}.detail-list dt{margin:0;color:var(--ui-text-dim);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase}.detail-list dd{margin:.15rem 0 0}.detail-list code{overflow-wrap:anywhere;font-size:.88rem}.query-input{min-width:min(420px,100%);flex:1}.type-select{width:12rem}.chip-row{display:flex;flex-wrap:wrap;gap:.55rem}.chip-row-top{margin-top:.7rem}.result-grid{display:grid;gap:.85rem}.result-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:.65rem}.result-meta{margin:0;color:var(--ui-text-dim);font-size:.85rem;line-height:1.45}.result-body{margin:0;line-height:1.55}.result-footer{margin-top:.7rem;display:flex;flex-wrap:wrap;gap:.45rem}.empty-card{border-style:dashed}.empty-title{margin:0;font-size:1rem;font-weight:700}.table-note{margin:0;color:var(--ui-text-muted);font-size:.86rem;line-height:1.45}.table-note-top{margin-top:.75rem}.code-block{margin:.8rem 0 0;padding:.95rem;border-radius:8px;border:1px solid var(--ui-border);background:#0a1426;color:#c9d8ef;overflow:auto;font-size:.8rem;line-height:1.45}:root.light-mode .code-block{background:#eff4fc;color:#223552}.mb-2{margin-bottom:.75rem}.p-card{background:transparent;box-shadow:none}.p-card .p-card-body{padding:1rem}.p-card .p-card-title{font-family:"Sora",var(--xt-font-heading);font-size:1.04rem;line-height:1.25;letter-spacing:-.01em}.p-card .p-card-subtitle{color:var(--ui-text-dim);font-size:.84rem}.p-card .p-card-content{padding-top:0}.p-button{border-radius:8px;font-weight:700;min-height:2.55rem;padding-inline:.95rem}.p-button:not(.p-button-outlined):not(.p-button-text):not(.p-button-secondary){border:1px solid transparent;color:#07161d;background:linear-gradient(115deg,var(--ui-accent),var(--ui-accent-2));box-shadow:none}:root.light-mode .p-button:not(.p-button-outlined):not(.p-button-text):not(.p-button-secondary){color:#fff}.p-button.p-button-outlined,.p-button.p-button-text{border-color:var(--ui-border-2);color:var(--ui-text-muted)}.p-button.p-button-outlined:hover,.p-button.p-button-text:hover{color:var(--ui-text);background:var(--ui-surface-3)}.p-inputtext,.p-select,.p-selectbutton .p-togglebutton,.p-datatable-wrapper,.p-dropdown{border-radius:8px;min-height:2.55rem}.p-inputtext,.p-select,.p-dropdown{border-color:var(--ui-border-2);background:var(--ui-surface-3);color:var(--ui-text)}.p-selectbutton .p-togglebutton{min-width:5.8rem;border-color:var(--ui-border-2);background:var(--ui-surface-3);color:var(--ui-text-muted)}.p-selectbutton .p-togglebutton.p-togglebutton-checked{background:color-mix(in srgb,var(--ui-accent),#000000 22%);border-color:color-mix(in srgb,var(--ui-accent),#ffffff 6%);color:#e9fffb}.p-datatable{border:1px solid var(--ui-border);border-radius:10px;overflow:hidden;background:var(--ui-surface-3)}.p-datatable .p-datatable-thead>tr>th{background:color-mix(in srgb,var(--ui-surface-2),#000000 12%);color:var(--ui-text-dim);font-size:.78rem;letter-spacing:.07em;text-transform:uppercase}.p-datatable .p-datatable-thead>tr>th,.p-datatable .p-datatable-tbody>tr>td{padding:.72rem .82rem;border-color:var(--ui-border)}.p-message{border-radius:8px}.p-tag{border-radius:7px;font-size:.74rem;font-weight:700}.p-button:focus-visible,a:focus-visible,input:focus-visible,.workspace-nav-item:focus-visible{outline:2px solid var(--xt-focus);outline-offset:2px}@media(max-width:960px){.app-shell{width:calc(100% - 2rem)}.topbar-row{align-items:flex-start;flex-direction:column}.topbar-actions{justify-content:flex-start}.context-grid{grid-template-columns:1fr}.context-actions{align-items:stretch;flex-direction:column}.start-button.p-button{width:100%}.workspace-main{padding:1rem}.split-grid{grid-template-columns:1fr}}@media(max-width:700px){.app-shell{width:calc(100% - 1.25rem);margin-top:.8rem}.shell-topbar{padding:1rem}.workspace-nav{gap:.45rem}.workspace-nav-item{flex:1 1 calc(50% - .3rem)}.p-card .p-card-body{padding:.88rem}.query-input,.type-select{width:100%;min-width:100%}}@media(max-width:460px){.workspace-nav-item{flex:1 1 100%}.brand-block h1{font-size:1.42rem}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}