xtctx 0.3.2 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/CHANGELOG.md +267 -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 +21 -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 +71 -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 +77 -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 +84 -0
  22. package/dist/src/cli/status.js.map +1 -0
  23. package/dist/src/config/disconnect.d.ts +32 -0
  24. package/dist/src/config/disconnect.d.ts.map +1 -0
  25. package/dist/src/config/disconnect.js +304 -0
  26. package/dist/src/config/disconnect.js.map +1 -0
  27. package/dist/src/config/mcp-config.d.ts +91 -0
  28. package/dist/src/config/mcp-config.d.ts.map +1 -0
  29. package/dist/src/config/mcp-config.js +462 -0
  30. package/dist/src/config/mcp-config.js.map +1 -0
  31. package/dist/src/config/setup.d.ts +37 -0
  32. package/dist/src/config/setup.d.ts.map +1 -0
  33. package/dist/src/config/setup.js +338 -0
  34. package/dist/src/config/setup.js.map +1 -0
  35. package/dist/src/config/skills.d.ts +73 -0
  36. package/dist/src/config/skills.d.ts.map +1 -0
  37. package/dist/src/config/skills.js +427 -0
  38. package/dist/src/config/skills.js.map +1 -0
  39. package/dist/src/handoff/embeddings.d.ts +15 -0
  40. package/dist/src/handoff/embeddings.d.ts.map +1 -0
  41. package/dist/src/handoff/embeddings.js +63 -0
  42. package/dist/src/handoff/embeddings.js.map +1 -0
  43. package/dist/src/handoff/sqlite-index.d.ts +43 -0
  44. package/dist/src/handoff/sqlite-index.d.ts.map +1 -0
  45. package/dist/src/handoff/sqlite-index.js +718 -0
  46. package/dist/src/handoff/sqlite-index.js.map +1 -0
  47. package/dist/src/handoff/types.d.ts +57 -0
  48. package/dist/src/handoff/types.d.ts.map +1 -0
  49. package/dist/src/handoff/types.js +2 -0
  50. package/dist/src/handoff/types.js.map +1 -0
  51. package/dist/src/handoff/vector.d.ts +4 -0
  52. package/dist/src/handoff/vector.d.ts.map +1 -0
  53. package/dist/src/handoff/vector.js +31 -0
  54. package/dist/src/handoff/vector.js.map +1 -0
  55. package/dist/src/mcp/server.d.ts +2 -19
  56. package/dist/src/mcp/server.d.ts.map +1 -1
  57. package/dist/src/mcp/server.js +75 -199
  58. package/dist/src/mcp/server.js.map +1 -1
  59. package/dist/src/mcp/tools/continuity.d.ts +3 -0
  60. package/dist/src/mcp/tools/continuity.d.ts.map +1 -0
  61. package/dist/src/mcp/tools/continuity.js +30 -0
  62. package/dist/src/mcp/tools/continuity.js.map +1 -0
  63. package/dist/src/mcp/tools/manifest.d.ts +40 -0
  64. package/dist/src/mcp/tools/manifest.d.ts.map +1 -0
  65. package/dist/src/mcp/tools/manifest.js +96 -0
  66. package/dist/src/mcp/tools/manifest.js.map +1 -0
  67. package/dist/src/mcp/tools/sessions.d.ts +11 -32
  68. package/dist/src/mcp/tools/sessions.d.ts.map +1 -1
  69. package/dist/src/mcp/tools/sessions.js +47 -13
  70. package/dist/src/mcp/tools/sessions.js.map +1 -1
  71. package/dist/src/runtime/services.d.ts +11 -38
  72. package/dist/src/runtime/services.d.ts.map +1 -1
  73. package/dist/src/runtime/services.js +43 -202
  74. package/dist/src/runtime/services.js.map +1 -1
  75. package/dist/src/scrapers/antigravity.d.ts +41 -0
  76. package/dist/src/scrapers/antigravity.d.ts.map +1 -0
  77. package/dist/src/scrapers/antigravity.js +858 -0
  78. package/dist/src/scrapers/antigravity.js.map +1 -0
  79. package/dist/src/scrapers/base.d.ts +53 -1
  80. package/dist/src/scrapers/base.d.ts.map +1 -1
  81. package/dist/src/scrapers/base.js +89 -3
  82. package/dist/src/scrapers/base.js.map +1 -1
  83. package/dist/src/scrapers/claude-code.d.ts +20 -6
  84. package/dist/src/scrapers/claude-code.d.ts.map +1 -1
  85. package/dist/src/scrapers/claude-code.js +144 -26
  86. package/dist/src/scrapers/claude-code.js.map +1 -1
  87. package/dist/src/scrapers/codex.d.ts +36 -6
  88. package/dist/src/scrapers/codex.d.ts.map +1 -1
  89. package/dist/src/scrapers/codex.js +256 -46
  90. package/dist/src/scrapers/codex.js.map +1 -1
  91. package/dist/src/scrapers/copilot-cli.d.ts +33 -0
  92. package/dist/src/scrapers/copilot-cli.d.ts.map +1 -0
  93. package/dist/src/scrapers/copilot-cli.js +257 -0
  94. package/dist/src/scrapers/copilot-cli.js.map +1 -0
  95. package/dist/src/scrapers/copilot.d.ts +41 -8
  96. package/dist/src/scrapers/copilot.d.ts.map +1 -1
  97. package/dist/src/scrapers/copilot.js +256 -118
  98. package/dist/src/scrapers/copilot.js.map +1 -1
  99. package/dist/src/scrapers/cursor.d.ts +24 -9
  100. package/dist/src/scrapers/cursor.d.ts.map +1 -1
  101. package/dist/src/scrapers/cursor.js +247 -151
  102. package/dist/src/scrapers/cursor.js.map +1 -1
  103. package/dist/src/scrapers/index.d.ts +18 -0
  104. package/dist/src/scrapers/index.d.ts.map +1 -0
  105. package/dist/src/scrapers/index.js +17 -0
  106. package/dist/src/scrapers/index.js.map +1 -0
  107. package/dist/src/scrapers/opencode.d.ts +36 -0
  108. package/dist/src/scrapers/opencode.d.ts.map +1 -0
  109. package/dist/src/scrapers/opencode.js +248 -0
  110. package/dist/src/scrapers/opencode.js.map +1 -0
  111. package/dist/src/scrapers/registry.d.ts +1 -0
  112. package/dist/src/scrapers/registry.d.ts.map +1 -1
  113. package/dist/src/scrapers/registry.js +3 -0
  114. package/dist/src/scrapers/registry.js.map +1 -1
  115. package/dist/src/tools/sources.d.ts +28 -0
  116. package/dist/src/tools/sources.d.ts.map +1 -0
  117. package/dist/src/tools/sources.js +149 -0
  118. package/dist/src/tools/sources.js.map +1 -0
  119. package/dist/src/types/config.d.ts +24 -37
  120. package/dist/src/types/config.d.ts.map +1 -1
  121. package/dist/src/types/index.d.ts +0 -2
  122. package/dist/src/types/index.d.ts.map +1 -1
  123. package/dist/src/types/index.js +0 -2
  124. package/dist/src/types/index.js.map +1 -1
  125. package/dist/src/types/scraper.d.ts +34 -5
  126. package/dist/src/types/scraper.d.ts.map +1 -1
  127. package/dist/src/utils/errors.d.ts +2 -0
  128. package/dist/src/utils/errors.d.ts.map +1 -0
  129. package/dist/src/utils/errors.js +7 -0
  130. package/dist/src/utils/errors.js.map +1 -0
  131. package/dist/src/utils/package-info.d.ts +11 -0
  132. package/dist/src/utils/package-info.d.ts.map +1 -0
  133. package/dist/src/utils/package-info.js +30 -0
  134. package/dist/src/utils/package-info.js.map +1 -0
  135. package/dist/src/utils/project-scope.d.ts +3 -0
  136. package/dist/src/utils/project-scope.d.ts.map +1 -0
  137. package/dist/src/utils/project-scope.js +45 -0
  138. package/dist/src/utils/project-scope.js.map +1 -0
  139. package/package.json +70 -66
  140. package/dist/src/api/routes/config.d.ts +0 -4
  141. package/dist/src/api/routes/config.d.ts.map +0 -1
  142. package/dist/src/api/routes/config.js +0 -61
  143. package/dist/src/api/routes/config.js.map +0 -1
  144. package/dist/src/api/routes/knowledge.d.ts +0 -4
  145. package/dist/src/api/routes/knowledge.d.ts.map +0 -1
  146. package/dist/src/api/routes/knowledge.js +0 -40
  147. package/dist/src/api/routes/knowledge.js.map +0 -1
  148. package/dist/src/api/routes/search.d.ts +0 -7
  149. package/dist/src/api/routes/search.d.ts.map +0 -1
  150. package/dist/src/api/routes/search.js +0 -108
  151. package/dist/src/api/routes/search.js.map +0 -1
  152. package/dist/src/api/routes/sources.d.ts +0 -12
  153. package/dist/src/api/routes/sources.d.ts.map +0 -1
  154. package/dist/src/api/routes/sources.js +0 -70
  155. package/dist/src/api/routes/sources.js.map +0 -1
  156. package/dist/src/api/server.d.ts +0 -26
  157. package/dist/src/api/server.d.ts.map +0 -1
  158. package/dist/src/api/server.js +0 -312
  159. package/dist/src/api/server.js.map +0 -1
  160. package/dist/src/cli/ingest.d.ts +0 -6
  161. package/dist/src/cli/ingest.d.ts.map +0 -1
  162. package/dist/src/cli/ingest.js +0 -11
  163. package/dist/src/cli/ingest.js.map +0 -1
  164. package/dist/src/cli/init.d.ts +0 -6
  165. package/dist/src/cli/init.d.ts.map +0 -1
  166. package/dist/src/cli/init.js +0 -105
  167. package/dist/src/cli/init.js.map +0 -1
  168. package/dist/src/cli/serve.d.ts +0 -7
  169. package/dist/src/cli/serve.d.ts.map +0 -1
  170. package/dist/src/cli/serve.js +0 -100
  171. package/dist/src/cli/serve.js.map +0 -1
  172. package/dist/src/cli/sync.d.ts +0 -5
  173. package/dist/src/cli/sync.d.ts.map +0 -1
  174. package/dist/src/cli/sync.js +0 -13
  175. package/dist/src/cli/sync.js.map +0 -1
  176. package/dist/src/compaction/pipeline.d.ts +0 -19
  177. package/dist/src/compaction/pipeline.d.ts.map +0 -1
  178. package/dist/src/compaction/pipeline.js +0 -37
  179. package/dist/src/compaction/pipeline.js.map +0 -1
  180. package/dist/src/compaction/providers/cli.d.ts +0 -13
  181. package/dist/src/compaction/providers/cli.d.ts.map +0 -1
  182. package/dist/src/compaction/providers/cli.js +0 -60
  183. package/dist/src/compaction/providers/cli.js.map +0 -1
  184. package/dist/src/compaction/rule-based.d.ts +0 -8
  185. package/dist/src/compaction/rule-based.d.ts.map +0 -1
  186. package/dist/src/compaction/rule-based.js +0 -120
  187. package/dist/src/compaction/rule-based.js.map +0 -1
  188. package/dist/src/config/loader.d.ts +0 -12
  189. package/dist/src/config/loader.d.ts.map +0 -1
  190. package/dist/src/config/loader.js +0 -76
  191. package/dist/src/config/loader.js.map +0 -1
  192. package/dist/src/config/mappings/claude-code.d.ts +0 -3
  193. package/dist/src/config/mappings/claude-code.d.ts.map +0 -1
  194. package/dist/src/config/mappings/claude-code.js +0 -31
  195. package/dist/src/config/mappings/claude-code.js.map +0 -1
  196. package/dist/src/config/mappings/codex.d.ts +0 -3
  197. package/dist/src/config/mappings/codex.d.ts.map +0 -1
  198. package/dist/src/config/mappings/codex.js +0 -31
  199. package/dist/src/config/mappings/codex.js.map +0 -1
  200. package/dist/src/config/mappings/copilot.d.ts +0 -3
  201. package/dist/src/config/mappings/copilot.d.ts.map +0 -1
  202. package/dist/src/config/mappings/copilot.js +0 -33
  203. package/dist/src/config/mappings/copilot.js.map +0 -1
  204. package/dist/src/config/mappings/cursor.d.ts +0 -3
  205. package/dist/src/config/mappings/cursor.d.ts.map +0 -1
  206. package/dist/src/config/mappings/cursor.js +0 -29
  207. package/dist/src/config/mappings/cursor.js.map +0 -1
  208. package/dist/src/config/sync.d.ts +0 -13
  209. package/dist/src/config/sync.d.ts.map +0 -1
  210. package/dist/src/config/sync.js +0 -96
  211. package/dist/src/config/sync.js.map +0 -1
  212. package/dist/src/ingestion/coordinator.d.ts +0 -37
  213. package/dist/src/ingestion/coordinator.d.ts.map +0 -1
  214. package/dist/src/ingestion/coordinator.js +0 -127
  215. package/dist/src/ingestion/coordinator.js.map +0 -1
  216. package/dist/src/ingestion/daemon.d.ts +0 -17
  217. package/dist/src/ingestion/daemon.d.ts.map +0 -1
  218. package/dist/src/ingestion/daemon.js +0 -35
  219. package/dist/src/ingestion/daemon.js.map +0 -1
  220. package/dist/src/ingestion/watcher.d.ts +0 -19
  221. package/dist/src/ingestion/watcher.d.ts.map +0 -1
  222. package/dist/src/ingestion/watcher.js +0 -70
  223. package/dist/src/ingestion/watcher.js.map +0 -1
  224. package/dist/src/knowledge/autotag.d.ts +0 -3
  225. package/dist/src/knowledge/autotag.d.ts.map +0 -1
  226. package/dist/src/knowledge/autotag.js +0 -24
  227. package/dist/src/knowledge/autotag.js.map +0 -1
  228. package/dist/src/knowledge/dedup.d.ts +0 -7
  229. package/dist/src/knowledge/dedup.d.ts.map +0 -1
  230. package/dist/src/knowledge/dedup.js +0 -15
  231. package/dist/src/knowledge/dedup.js.map +0 -1
  232. package/dist/src/knowledge/repository.d.ts +0 -12
  233. package/dist/src/knowledge/repository.d.ts.map +0 -1
  234. package/dist/src/knowledge/repository.js +0 -74
  235. package/dist/src/knowledge/repository.js.map +0 -1
  236. package/dist/src/mcp/tools/config.d.ts +0 -36
  237. package/dist/src/mcp/tools/config.d.ts.map +0 -1
  238. package/dist/src/mcp/tools/config.js +0 -54
  239. package/dist/src/mcp/tools/config.js.map +0 -1
  240. package/dist/src/mcp/tools/knowledge.d.ts +0 -17
  241. package/dist/src/mcp/tools/knowledge.d.ts.map +0 -1
  242. package/dist/src/mcp/tools/knowledge.js +0 -46
  243. package/dist/src/mcp/tools/knowledge.js.map +0 -1
  244. package/dist/src/mcp/tools/search.d.ts +0 -22
  245. package/dist/src/mcp/tools/search.d.ts.map +0 -1
  246. package/dist/src/mcp/tools/search.js +0 -30
  247. package/dist/src/mcp/tools/search.js.map +0 -1
  248. package/dist/src/mcp/tools/write.d.ts +0 -38
  249. package/dist/src/mcp/tools/write.d.ts.map +0 -1
  250. package/dist/src/mcp/tools/write.js +0 -97
  251. package/dist/src/mcp/tools/write.js.map +0 -1
  252. package/dist/src/runtime/ingestion.d.ts +0 -17
  253. package/dist/src/runtime/ingestion.d.ts.map +0 -1
  254. package/dist/src/runtime/ingestion.js +0 -106
  255. package/dist/src/runtime/ingestion.js.map +0 -1
  256. package/dist/src/scrapers/gemini.d.ts +0 -17
  257. package/dist/src/scrapers/gemini.d.ts.map +0 -1
  258. package/dist/src/scrapers/gemini.js +0 -245
  259. package/dist/src/scrapers/gemini.js.map +0 -1
  260. package/dist/src/store/embeddings.d.ts +0 -9
  261. package/dist/src/store/embeddings.d.ts.map +0 -1
  262. package/dist/src/store/embeddings.js +0 -28
  263. package/dist/src/store/embeddings.js.map +0 -1
  264. package/dist/src/store/lance.d.ts +0 -25
  265. package/dist/src/store/lance.d.ts.map +0 -1
  266. package/dist/src/store/lance.js +0 -74
  267. package/dist/src/store/lance.js.map +0 -1
  268. package/dist/src/store/search.d.ts +0 -18
  269. package/dist/src/store/search.d.ts.map +0 -1
  270. package/dist/src/store/search.js +0 -55
  271. package/dist/src/store/search.js.map +0 -1
  272. package/dist/src/types/compaction.d.ts +0 -29
  273. package/dist/src/types/compaction.d.ts.map +0 -1
  274. package/dist/src/types/compaction.js +0 -2
  275. package/dist/src/types/compaction.js.map +0 -1
  276. package/dist/src/types/context.d.ts +0 -33
  277. package/dist/src/types/context.d.ts.map +0 -1
  278. package/dist/src/types/context.js +0 -18
  279. package/dist/src/types/context.js.map +0 -1
  280. package/dist/src/utils/retry.d.ts +0 -11
  281. package/dist/src/utils/retry.d.ts.map +0 -1
  282. package/dist/src/utils/retry.js +0 -46
  283. package/dist/src/utils/retry.js.map +0 -1
  284. package/dist/src/utils/shutdown.d.ts +0 -25
  285. package/dist/src/utils/shutdown.d.ts.map +0 -1
  286. package/dist/src/utils/shutdown.js +0 -56
  287. package/dist/src/utils/shutdown.js.map +0 -1
  288. package/dist/web/apple-touch-icon.png +0 -0
  289. package/dist/web/assets/index-Nuadr5ox.css +0 -1
  290. package/dist/web/assets/index-aA0u8eXA.js +0 -3504
  291. package/dist/web/assets/primeicons-C6QP2o4f.woff2 +0 -0
  292. package/dist/web/assets/primeicons-DMOk5skT.eot +0 -0
  293. package/dist/web/assets/primeicons-Dr5RGzOO.svg +0 -345
  294. package/dist/web/assets/primeicons-MpK4pl85.ttf +0 -0
  295. package/dist/web/assets/primeicons-WjwUDZjB.woff +0 -0
  296. package/dist/web/favicon.ico +0 -0
  297. package/dist/web/favicon.svg +0 -21
  298. package/dist/web/index.html +0 -21
  299. package/dist/web/site.webmanifest +0 -19
  300. package/dist/web/vite.svg +0 -1
@@ -0,0 +1,338 @@
1
+ import { mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
2
+ import { dirname, join, resolve } from "node:path";
3
+ import { stringify as stringifyYaml } from "yaml";
4
+ import { isGlobalOnlyMcpTool, syncToolMcpConfigs, } from "./mcp-config.js";
5
+ import { renderSyncedSkillsBlock, syncProjectSkills, } from "./skills.js";
6
+ import { SUPPORTED_TOOLS } from "../tools/sources.js";
7
+ const MARKERS = {
8
+ begin: "<!-- xtctx:begin -->",
9
+ end: "<!-- xtctx:end -->",
10
+ };
11
+ export async function runSetup(options = {}) {
12
+ const result = await setupProject(options);
13
+ printSetupResult(result);
14
+ return result;
15
+ }
16
+ export async function setupProject(options = {}) {
17
+ const projectRoot = resolve(options.projectPath ?? process.cwd());
18
+ const xtctxDir = join(projectRoot, ".xtctx");
19
+ const stateDir = join(xtctxDir, "state");
20
+ const configPath = join(xtctxDir, "config.yaml");
21
+ const writes = [];
22
+ const warnings = [];
23
+ if (options.repair) {
24
+ await rm(join(xtctxDir, ".store"), { recursive: true, force: true });
25
+ await rm(stateDir, { recursive: true, force: true });
26
+ await rm(join(xtctxDir, "tool-config"), { recursive: true, force: true });
27
+ }
28
+ await mkdir(stateDir, { recursive: true });
29
+ const skillSync = await syncProjectSkills({
30
+ projectRoot,
31
+ configPath,
32
+ selectedSkillIds: options.selectedSkillIds,
33
+ homeDir: options.homeDir,
34
+ });
35
+ writes.push(...skillSync.writes);
36
+ warnings.push(...skillSync.warnings);
37
+ writes.push({
38
+ path: configPath,
39
+ kind: "config",
40
+ changed: await writeIfChanged(configPath, renderProjectConfig(projectRoot, skillSync.config)),
41
+ });
42
+ const serverDefinition = xtctxServerDefinition();
43
+ const mcpSummary = await syncToolMcpConfigs(projectRoot, [serverDefinition], supportedMcpTools(options.includeGlobalMcp), options.homeDir ? { homeDir: options.homeDir } : {});
44
+ for (const file of mcpSummary.results) {
45
+ writes.push({
46
+ path: file.path,
47
+ kind: `mcp:${file.tool}`,
48
+ changed: file.updated || file.created,
49
+ });
50
+ if (file.warning) {
51
+ warnings.push(file.warning);
52
+ }
53
+ }
54
+ for (const target of memoryTargets(projectRoot)) {
55
+ const block = renderManagedBlock({
56
+ projectRoot,
57
+ tool: target.tool,
58
+ hookMode: target.hookMode,
59
+ serverDefinition,
60
+ skills: skillSync.selected,
61
+ });
62
+ writes.push({
63
+ path: target.path,
64
+ kind: `memory:${target.tool}`,
65
+ changed: await upsertManagedBlock(target.path, block, target.prelude),
66
+ });
67
+ }
68
+ writes.push({
69
+ path: join(projectRoot, ".claude", "hooks.json"),
70
+ kind: "hook:claude-code",
71
+ changed: await installClaudeHook(projectRoot),
72
+ });
73
+ return { projectRoot, configPath, writes, warnings };
74
+ }
75
+ export function describeSetupPlan(projectPath, selectedSkillIds = ["xtctx-handoff"], includeGlobalMcp = false) {
76
+ const projectRoot = resolve(projectPath ?? process.cwd());
77
+ const skillIds = [...new Set(["xtctx-handoff", ...selectedSkillIds])];
78
+ const writes = [
79
+ { path: join(projectRoot, ".xtctx", "config.yaml"), kind: "config" },
80
+ { path: join(projectRoot, ".mcp.json"), kind: "mcp:claude-code" },
81
+ { path: join(projectRoot, ".cursor", "mcp.json"), kind: "mcp:cursor" },
82
+ { path: join(projectRoot, ".vscode", "mcp.json"), kind: "mcp:copilot" },
83
+ { path: join(projectRoot, ".codex", "config.toml"), kind: "mcp:codex" },
84
+ { path: join(projectRoot, "opencode.json"), kind: "mcp:opencode" },
85
+ { path: join(projectRoot, "AGENTS.md"), kind: "memory:codex/opencode" },
86
+ { path: join(projectRoot, "CLAUDE.md"), kind: "memory:claude-code" },
87
+ { path: join(projectRoot, "GEMINI.md"), kind: "memory:antigravity" },
88
+ { path: join(projectRoot, ".cursor", "rules", "xtctx.mdc"), kind: "memory:cursor" },
89
+ { path: join(projectRoot, ".github", "copilot-instructions.md"), kind: "memory:copilot" },
90
+ { path: join(projectRoot, ".claude", "hooks.json"), kind: "hook:claude-code" },
91
+ ];
92
+ for (const skillId of skillIds) {
93
+ writes.push({ path: join(projectRoot, ".xtctx", "skills", skillId, "SKILL.md"), kind: `skill-source:${skillId}` }, { path: join(projectRoot, ".claude", "skills", skillId, "SKILL.md"), kind: `skill:claude-code:${skillId}` }, { path: join(projectRoot, ".cursor", "rules", "xtctx-skills", `${skillId}.mdc`), kind: `skill:cursor:${skillId}` }, {
94
+ path: join(projectRoot, ".github", "instructions", `xtctx-${skillId}.instructions.md`),
95
+ kind: `skill:copilot:${skillId}`,
96
+ });
97
+ }
98
+ const home = process.env.USERPROFILE ?? process.env.HOME;
99
+ if (home) {
100
+ writes.push({
101
+ path: join(home, ".gemini", "antigravity", "mcp_config.json"),
102
+ kind: "mcp:antigravity",
103
+ });
104
+ }
105
+ if (includeGlobalMcp && home) {
106
+ writes.push({ path: join(home, ".copilot", "mcp-config.json"), kind: "mcp:copilot-cli" });
107
+ }
108
+ return { projectRoot, writes };
109
+ }
110
+ function supportedMcpTools(includeGlobalMcp = false) {
111
+ return SUPPORTED_TOOLS
112
+ .filter((tool) => {
113
+ if (!isGlobalOnlyMcpTool(tool.id)) {
114
+ return true;
115
+ }
116
+ // Antigravity only has app-level MCP config; always wire it on setup.
117
+ if (tool.id === "antigravity") {
118
+ return true;
119
+ }
120
+ return includeGlobalMcp;
121
+ })
122
+ .map((tool) => tool.id);
123
+ }
124
+ export async function inspectManagedFile(filePath) {
125
+ const content = await readUtf8IfExists(filePath);
126
+ if (content === null) {
127
+ return { exists: false, blockCount: 0, staleReferences: [] };
128
+ }
129
+ return {
130
+ exists: true,
131
+ blockCount: countManagedBlocks(content),
132
+ staleReferences: findStaleReferences(content),
133
+ };
134
+ }
135
+ export function xtctxServerDefinition() {
136
+ return {
137
+ name: "xtctx",
138
+ command: "npx",
139
+ args: ["-y", "xtctx"],
140
+ transport: "stdio",
141
+ };
142
+ }
143
+ function renderProjectConfig(projectRoot, skills) {
144
+ const config = {
145
+ project: {
146
+ root: projectRoot,
147
+ },
148
+ handoff: {
149
+ mode: "raw-transcript-pointer",
150
+ indexing: "on-demand",
151
+ summaries: false,
152
+ },
153
+ mcp: {
154
+ command: "npx",
155
+ args: ["-y", "xtctx"],
156
+ },
157
+ skills,
158
+ tools: Object.fromEntries(SUPPORTED_TOOLS.map((tool) => [
159
+ tool.id,
160
+ {
161
+ enabled: true,
162
+ storePath: tool.defaultStorePath(),
163
+ hook: tool.hookMode,
164
+ },
165
+ ])),
166
+ };
167
+ return stringifyYaml(config);
168
+ }
169
+ function memoryTargets(projectRoot) {
170
+ return [
171
+ {
172
+ tool: "codex",
173
+ path: join(projectRoot, "AGENTS.md"),
174
+ hookMode: "instruction-only",
175
+ },
176
+ {
177
+ tool: "claude-code",
178
+ path: join(projectRoot, "CLAUDE.md"),
179
+ hookMode: "executable",
180
+ },
181
+ {
182
+ tool: "antigravity",
183
+ path: join(projectRoot, "GEMINI.md"),
184
+ hookMode: "instruction-only",
185
+ },
186
+ {
187
+ tool: "cursor",
188
+ path: join(projectRoot, ".cursor", "rules", "xtctx.mdc"),
189
+ hookMode: "instruction-only",
190
+ prelude: "---\ndescription: xtctx cross-tool handoff\nglobs: \"**/*\"\nalwaysApply: true\n---\n\n",
191
+ },
192
+ {
193
+ tool: "copilot",
194
+ path: join(projectRoot, ".github", "copilot-instructions.md"),
195
+ hookMode: "instruction-only",
196
+ },
197
+ ];
198
+ }
199
+ function renderManagedBlock(input) {
200
+ const command = [input.serverDefinition.command, ...(input.serverDefinition.args ?? [])].join(" ");
201
+ return [
202
+ MARKERS.begin,
203
+ "Generated by xtctx setup. Do not edit inside this block.",
204
+ "",
205
+ "# xtctx Handoff",
206
+ "",
207
+ `Tool: ${input.tool}`,
208
+ `Project root: ${input.projectRoot}`,
209
+ `Integration mode: ${input.hookMode}`,
210
+ "",
211
+ "xtctx is configured for cross-tool handoff in this project.",
212
+ "Do not rely on this block for a generated summary; raw local transcripts are authoritative.",
213
+ "",
214
+ "## Session Retrieval",
215
+ "- Call `xtctx_recent_sessions` to list recent local sessions.",
216
+ "- Call `xtctx_session_detail` with a `session_ref` for the raw transcript messages.",
217
+ "- Call `xtctx_search_sessions` only when you need semantic or keyword search across chronological transcript windows.",
218
+ "- Use `xtctx_continuity_status` for wiring and freshness diagnostics.",
219
+ "- External orchestrators can call `xtctx_handoff_manifest` for stable session references and raw-detail pointers; it does not persist task state.",
220
+ "",
221
+ ...renderSyncedSkillsBlock(input.skills),
222
+ "## MCP",
223
+ `- Command: \`${command}\``,
224
+ "- Transport: stdio",
225
+ "",
226
+ "## Notes",
227
+ "- Indexing is on-demand from MCP recent, detail, and search calls.",
228
+ "- There is no xtctx daemon, API server, dashboard, durable memory, or generated brief.",
229
+ "- Content outside this managed block is preserved.",
230
+ MARKERS.end,
231
+ "",
232
+ ].join("\n");
233
+ }
234
+ async function installClaudeHook(projectRoot) {
235
+ const hooksPath = join(projectRoot, ".claude", "hooks.json");
236
+ const command = `npx -y xtctx --hook session-start --tool claude-code --project "${projectRoot.replace(/"/g, '\\"')}"`;
237
+ const existing = await readJsonIfExists(hooksPath);
238
+ const root = isRecord(existing) ? existing : {};
239
+ const hooks = isRecord(root.hooks) ? root.hooks : {};
240
+ const sessionStart = Array.isArray(hooks.SessionStart) ? hooks.SessionStart : [];
241
+ const alreadyInstalled = sessionStart.some((entry) => isRecord(entry) && typeof entry.command === "string" && entry.command.includes("xtctx --hook session-start"));
242
+ if (alreadyInstalled) {
243
+ return false;
244
+ }
245
+ hooks.SessionStart = [...sessionStart, { type: "command", command }];
246
+ root.hooks = hooks;
247
+ return writeIfChanged(hooksPath, JSON.stringify(root, null, 2) + "\n");
248
+ }
249
+ async function upsertManagedBlock(filePath, block, prelude = "") {
250
+ const existing = await readUtf8IfExists(filePath);
251
+ const repaired = existing ? removeManagedBlocks(existing).trimEnd() : "";
252
+ const prefix = prelude && !repaired.startsWith(prelude.trimEnd()) ? prelude : "";
253
+ const separator = repaired.length > 0 ? "\n\n" : "";
254
+ const content = `${prefix}${repaired}${separator}${block}`;
255
+ return writeIfChanged(filePath, content);
256
+ }
257
+ function removeManagedBlocks(content) {
258
+ const normalized = normalizeNewlines(content);
259
+ const pattern = new RegExp(`${escapeRegExp(MARKERS.begin)}[\\s\\S]*?${escapeRegExp(MARKERS.end)}\\n?`, "g");
260
+ return normalized.replace(pattern, "").replace(/\n{3,}/g, "\n\n");
261
+ }
262
+ function countManagedBlocks(content) {
263
+ const pattern = new RegExp(`${escapeRegExp(MARKERS.begin)}[\\s\\S]*?${escapeRegExp(MARKERS.end)}`, "g");
264
+ return content.match(pattern)?.length ?? 0;
265
+ }
266
+ function findStaleReferences(content) {
267
+ const stale = [
268
+ { label: "xtctx serve", pattern: /\bxtctx\s+serve\b/ },
269
+ { label: "xtctx_search", pattern: /\bxtctx_search\b/ },
270
+ { label: "xtctx_project_knowledge", pattern: /\bxtctx_project_knowledge\b/ },
271
+ { label: "xtctx_save_decision", pattern: /\bxtctx_save_decision\b/ },
272
+ { label: "xtctx_save_error_solution", pattern: /\bxtctx_save_error_solution\b/ },
273
+ { label: "xtctx_save_faq", pattern: /\bxtctx_save_faq\b/ },
274
+ { label: "xtctx_last_session_brief", pattern: /\bxtctx_last_session_brief\b/ },
275
+ ];
276
+ return stale.filter((value) => value.pattern.test(content)).map((value) => value.label);
277
+ }
278
+ async function writeIfChanged(filePath, content) {
279
+ const normalized = normalizeNewlines(content);
280
+ const existing = await readUtf8IfExists(filePath);
281
+ if (existing !== null && normalizeNewlines(existing) === normalized) {
282
+ return false;
283
+ }
284
+ await mkdir(dirname(filePath), { recursive: true });
285
+ await writeFile(filePath, normalized, "utf-8");
286
+ return true;
287
+ }
288
+ async function readUtf8IfExists(filePath) {
289
+ try {
290
+ return await readFile(filePath, "utf-8");
291
+ }
292
+ catch {
293
+ return null;
294
+ }
295
+ }
296
+ async function readJsonIfExists(filePath) {
297
+ const raw = await readUtf8IfExists(filePath);
298
+ if (raw === null) {
299
+ return null;
300
+ }
301
+ try {
302
+ return JSON.parse(raw);
303
+ }
304
+ catch {
305
+ return null;
306
+ }
307
+ }
308
+ function printSetupResult(result) {
309
+ const changed = result.writes.filter((write) => write.changed).length;
310
+ process.stdout.write(`xtctx setup complete (${changed} changed, ${result.writes.length - changed} unchanged)\n`);
311
+ process.stdout.write(`Project: ${result.projectRoot}\n`);
312
+ for (const write of result.writes) {
313
+ const marker = write.changed ? "updated" : "ok";
314
+ process.stdout.write(` ${marker.padEnd(7)} ${write.kind} ${write.path}\n`);
315
+ }
316
+ for (const warning of result.warnings) {
317
+ process.stdout.write(` warning ${warning}\n`);
318
+ }
319
+ }
320
+ function normalizeNewlines(input) {
321
+ return input.replace(/\r\n/g, "\n");
322
+ }
323
+ function escapeRegExp(value) {
324
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
325
+ }
326
+ function isRecord(value) {
327
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
328
+ }
329
+ export async function pathExists(filePath) {
330
+ try {
331
+ await stat(filePath);
332
+ return true;
333
+ }
334
+ catch {
335
+ return false;
336
+ }
337
+ }
338
+ //# sourceMappingURL=setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/config/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,GAEnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAGlB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAiB,MAAM,qBAAqB,CAAC;AAErE,MAAM,OAAO,GAAG;IACd,KAAK,EA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ACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { type SkillSyncMode, type ToolId } from "../tools/sources.js";
2
+ export declare const BUILT_IN_SKILL_ID = "xtctx-handoff";
3
+ export interface DiscoveredSkill {
4
+ id: string;
5
+ name: string;
6
+ description: string;
7
+ path: string;
8
+ source: string;
9
+ content: string;
10
+ }
11
+ export interface SkillSelection {
12
+ id: string;
13
+ hash: string;
14
+ source: string;
15
+ path: string;
16
+ }
17
+ export interface SkillTargetState {
18
+ mode: SkillSyncMode;
19
+ path?: string;
20
+ }
21
+ export interface ProjectSkillConfig {
22
+ sourceDir: string;
23
+ selected: Record<string, {
24
+ hash: string;
25
+ source: string;
26
+ }>;
27
+ targets: Record<string, SkillTargetState>;
28
+ }
29
+ export interface SkillSyncResult {
30
+ config: ProjectSkillConfig;
31
+ selected: SkillSelection[];
32
+ writes: Array<{
33
+ path: string;
34
+ kind: string;
35
+ changed: boolean;
36
+ }>;
37
+ warnings: string[];
38
+ }
39
+ export interface SkillStatus {
40
+ sourceDir: string;
41
+ selected: Array<{
42
+ id: string;
43
+ exists: boolean;
44
+ hash?: string;
45
+ }>;
46
+ targets: Array<{
47
+ tool: ToolId;
48
+ mode: SkillSyncMode;
49
+ skillId?: string;
50
+ path?: string;
51
+ state: "ok" | "missing" | "drift" | "unsupported" | "managed-block";
52
+ }>;
53
+ }
54
+ interface SkillSyncOptions {
55
+ projectRoot: string;
56
+ configPath: string;
57
+ selectedSkillIds?: string[];
58
+ homeDir?: string;
59
+ }
60
+ export declare function syncProjectSkills(options: SkillSyncOptions): Promise<SkillSyncResult>;
61
+ export declare function discoverProjectSkills(options: {
62
+ projectRoot: string;
63
+ homeDir?: string;
64
+ }): Promise<DiscoveredSkill[]>;
65
+ export declare function inspectSkillStatus(projectRoot: string, configPath: string): Promise<SkillStatus>;
66
+ export declare function removeSyncedSkillsForTools(projectRoot: string, tools: ToolId[]): Promise<Array<{
67
+ path: string;
68
+ kind: string;
69
+ changed: boolean;
70
+ }>>;
71
+ export declare function renderSyncedSkillsBlock(selected: SkillSelection[]): string[];
72
+ export {};
73
+ //# sourceMappingURL=skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../../src/config/skills.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAEvF,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO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