xindex 1.0.15 → 1.0.17

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.
package/.xindex.json CHANGED
@@ -100,7 +100,8 @@
100
100
  "*.otf",
101
101
  ".gitkeep",
102
102
  "package-lock.json",
103
- "yarn.lock"
103
+ "yarn.lock",
104
+ "*.mp4"
104
105
  ],
105
106
  "maxLines": 30,
106
107
  "maxFileBytes": 100000,
package/README.md CHANGED
@@ -104,12 +104,12 @@ name: ask-xi
104
104
  description: Discovers relevant files via xindex semantic search — preps queries, auto-indexes on empty, returns file links with keywords. Triggered by @xi.
105
105
  argument-hint: "[question]"
106
106
  ---
107
- Surface-level codebase discovery via xindex. Tool: `xindex_search` (natural-language, meaning-based).
107
+ Surface-level codebase discovery via xindex. Tool: `xindex_search` (natural-language, meaning-based). Must trigger search when a session starts, a new task starts, or any codebase lookup is needed.
108
108
 
109
109
  **Steps:**
110
- 1. Draft 3–7 queries from $ARGUMENTS (entry points, routing, config, tests, patterns); run `xindex_search` in parallel.
110
+ 1. Draft 3–5 queries from $ARGUMENTS (entry points, routing, config, tests, patterns); run `xindex_search` in parallel.
111
111
  2. If empty/sparse/stale → scoped `xindex_index` on relevant root folders (one path per call, e.g. `src`, `skills`, `agents`), then re-search. Prefer scoped over full-repo.
112
- 3. Run 3–7 narrower follow-ups in parallel based on round-1 hits.
112
+ 3. Think, then run 3+ narrower follow-ups in parallel based on round-1 hits.
113
113
  4. Return file paths + brief keywords showing why each matched.
114
114
 
115
115
  Output = file links + keywords, not analysis. **Escalate to `/ask-cursor` by default** (cheap codebase reasoning); only go to `/ask-claude` for multi-file/pattern analysis or `/ask-claude-opus` for trade-offs. For reset or full re-index, delegate to `/xindex` (owns safety rules).
package/apps/mcpApp.ts CHANGED
@@ -34,16 +34,19 @@ export function McpApp({
34
34
  config: IXindexConfig,
35
35
  }): IMcpApp {
36
36
  return async function mcpApp() {
37
- const server = new McpServer({name: "xindex", version: "0.1.0"});
37
+ const server = new McpServer({name: "xindex", version: "1.0.0"}, {
38
+ instructions: "@xi must trigger search when a session starts, a new task starts, or any codebase lookup is needed. Run `xindex_search`: 3–5 parallel queries, then think, then 3+ narrowed follow-ups. If results are sparse, run scoped `xindex_index` (one path per call) and re-search.",
39
+ });
38
40
 
39
41
  // --- search ---
40
42
 
41
43
  server.registerTool("xindex_search", {
42
44
  title: "Search codebase (semantic)",
43
- description: "Semantic codebase search — finds files by meaning, not substring. " +
44
- "For discovery, run 3–7 parallel queries then narrower follow-ups. " +
45
- "Returns ranked file paths + matched keywords (links, not analysis). " +
46
- "If sparse, run `xindex_index` on relevant roots first (scoped, one path per call).",
45
+ description: "Semantic codebase discovery by meaning. " +
46
+ "Must trigger when a session starts, a new task starts, or any codebase lookup is needed. " +
47
+ "Start with 3–5 parallel queries, then 3+ narrowed follow-ups. " +
48
+ "Return ranked file paths + keywords (links, not analysis). " +
49
+ "If sparse, run scoped `xindex_index` first (one path per call).",
47
50
  inputSchema: z.object({
48
51
  query: z.string()
49
52
  .describe("Natural language search query"),
@@ -68,9 +71,9 @@ export function McpApp({
68
71
 
69
72
  server.registerTool("xindex_index", {
70
73
  title: "Index files or directories",
71
- description: "Index files/directories for semantic search; recursive, respects .gitignore. " +
72
- "Prefer scoped paths (one per call, e.g. `src`, `apps`) over full-repo `['.']` " +
73
- "reserve the latter for first-time setup or cross-cutting discovery.",
74
+ description: "Index paths recursively; respects .gitignore. " +
75
+ "Prefer scoped (`src`, `apps`) over `['.']` (reserve for first-time/cross-cutting). " +
76
+ "Stale results `xindex_reset` `xindex_index`.",
74
77
  inputSchema: z.object({
75
78
  inputs: z.array(z.string()).min(1)
76
79
  .describe("File or directory paths to index (one path per call preferred; scoped over full-repo)"),
@@ -94,8 +97,8 @@ export function McpApp({
94
97
 
95
98
  server.registerTool("xindex_reset", {
96
99
  title: "Reset index (destructive)",
97
- description: "Wipe and recreate the semantic index. **Destructive** — MUST get explicit user confirmation; " +
98
- "if ambiguous, don't run. Recovery / reindex flow: confirm → `xindex_reset` → `xindex_index(['.'])` → `xindex_search`.",
100
+ description: "Wipe the semantic index. **Destructive** — require explicit confirmation; " +
101
+ "if ambiguous, don't run. After: `xindex_index(['.'])`.",
99
102
  inputSchema: z.object({}),
100
103
  annotations: {destructiveHint: true},
101
104
  }, async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xindex",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Local semantic code search — index codebase, search by meaning or keywords",
5
5
  "type": "module",
6
6
  "main": "xindex.ts",
@@ -22,7 +22,8 @@
22
22
  "watch": "tsx apps/run.watch.ts",
23
23
  "test.functional": "bash test/functional.sh",
24
24
  "test.compilation": "npx -y tsc --ignoreConfig --noEmit --target ES2022 --module ESNext --moduleResolution bundler --esModuleInterop --skipLibCheck --strict false $(git ls-files '*.ts')",
25
- "test.npx": "docker run --rm -it -w /tmp node:22 bash -c 'npm i -g xindex && xindex-index tsx-0 && xindex-search streamx map | grep \"await mapper\" && which xindex | grep bin/xindex' "
25
+ "test.npx": "docker run --rm -it -w /tmp node:22 bash -c 'npm i -g xindex && xindex-index tsx-0 && xindex-search streamx map | grep \"await mapper\" && which xindex | grep bin/xindex' ",
26
+ "console": "docker run --rm -it -v \"$PWD:/app\" -w /app node:22 bash"
26
27
  },
27
28
  "private": false,
28
29
  "engines": {