@nanonets/graft 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -15
- package/dist/ask/ask.js +1 -1
- package/dist/ask/ask.js.map +1 -1
- package/dist/claude/format.d.ts +40 -13
- package/dist/claude/format.d.ts.map +1 -1
- package/dist/claude/format.js +54 -15
- package/dist/claude/format.js.map +1 -1
- package/dist/claude/hooks.d.ts +15 -0
- package/dist/claude/hooks.d.ts.map +1 -1
- package/dist/claude/hooks.js +52 -3
- package/dist/claude/hooks.js.map +1 -1
- package/dist/claude/init.d.ts +17 -0
- package/dist/claude/init.d.ts.map +1 -1
- package/dist/claude/init.js +47 -21
- package/dist/claude/init.js.map +1 -1
- package/dist/claude/settings-merge.d.ts.map +1 -1
- package/dist/claude/settings-merge.js +19 -2
- package/dist/claude/settings-merge.js.map +1 -1
- package/dist/claude/skill-template.d.ts.map +1 -1
- package/dist/claude/skill-template.js +13 -5
- package/dist/claude/skill-template.js.map +1 -1
- package/dist/claude/state.d.ts +5 -20
- package/dist/claude/state.d.ts.map +1 -1
- package/dist/claude/state.js +10 -73
- package/dist/claude/state.js.map +1 -1
- package/dist/cli-picker.d.ts +60 -0
- package/dist/cli-picker.d.ts.map +1 -0
- package/dist/cli-picker.js +268 -0
- package/dist/cli-picker.js.map +1 -0
- package/dist/cli.js +101 -12
- package/dist/cli.js.map +1 -1
- package/dist/context/node-file.d.ts +21 -0
- package/dist/context/node-file.d.ts.map +1 -1
- package/dist/context/node-file.js +63 -1
- package/dist/context/node-file.js.map +1 -1
- package/dist/engine.d.ts +2 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +1 -0
- package/dist/engine.js.map +1 -1
- package/dist/graph/build.d.ts +13 -2
- package/dist/graph/build.d.ts.map +1 -1
- package/dist/graph/build.js +98 -20
- package/dist/graph/build.js.map +1 -1
- package/dist/graph/cards.d.ts.map +1 -1
- package/dist/graph/cards.js +8 -0
- package/dist/graph/cards.js.map +1 -1
- package/dist/graph/extract-cache.d.ts +96 -0
- package/dist/graph/extract-cache.d.ts.map +1 -0
- package/dist/graph/extract-cache.js +199 -0
- package/dist/graph/extract-cache.js.map +1 -0
- package/dist/graph/fingerprint.d.ts +70 -0
- package/dist/graph/fingerprint.d.ts.map +1 -0
- package/dist/graph/fingerprint.js +147 -0
- package/dist/graph/fingerprint.js.map +1 -0
- package/dist/graph/load.d.ts +11 -0
- package/dist/graph/load.d.ts.map +1 -1
- package/dist/graph/load.js +14 -0
- package/dist/graph/load.js.map +1 -1
- package/dist/graph/refresh.d.ts +49 -0
- package/dist/graph/refresh.d.ts.map +1 -0
- package/dist/graph/refresh.js +202 -0
- package/dist/graph/refresh.js.map +1 -0
- package/dist/graph/source-files.d.ts +18 -0
- package/dist/graph/source-files.d.ts.map +1 -0
- package/dist/graph/source-files.js +36 -0
- package/dist/graph/source-files.js.map +1 -0
- package/dist/graph/traverse-cli.d.ts +1 -1
- package/dist/graph/traverse-cli.js +2 -2
- package/dist/graph/traverse.d.ts +2 -2
- package/dist/graph/traverse.js +1 -1
- package/dist/hosts/codex-hooks.d.ts +8 -0
- package/dist/hosts/codex-hooks.d.ts.map +1 -1
- package/dist/hosts/codex-hooks.js +27 -4
- package/dist/hosts/codex-hooks.js.map +1 -1
- package/dist/hosts/init.d.ts +2 -0
- package/dist/hosts/init.d.ts.map +1 -1
- package/dist/hosts/init.js +5 -2
- package/dist/hosts/init.js.map +1 -1
- package/dist/hosts/mcp-config.d.ts +29 -1
- package/dist/hosts/mcp-config.d.ts.map +1 -1
- package/dist/hosts/mcp-config.js +77 -10
- package/dist/hosts/mcp-config.js.map +1 -1
- package/dist/hosts/plan.d.ts +32 -0
- package/dist/hosts/plan.d.ts.map +1 -0
- package/dist/hosts/plan.js +67 -0
- package/dist/hosts/plan.js.map +1 -0
- package/dist/hosts/registry.d.ts.map +1 -1
- package/dist/hosts/registry.js +9 -0
- package/dist/hosts/registry.js.map +1 -1
- package/dist/mcp/instructions.d.ts +29 -0
- package/dist/mcp/instructions.d.ts.map +1 -0
- package/dist/mcp/instructions.js +55 -0
- package/dist/mcp/instructions.js.map +1 -0
- package/dist/mcp/server.d.ts +6 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +15 -4
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools.d.ts +4 -2
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +144 -104
- package/dist/mcp/tools.js.map +1 -1
- package/dist/search/grep-cli.js +1 -1
- package/dist/search/grep.js +1 -1
- package/dist/util/state.d.ts +45 -0
- package/dist/util/state.d.ts.map +1 -0
- package/dist/util/state.js +121 -0
- package/dist/util/state.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ensureFreshGraph` — the pre-query gate that keeps retrieval honest.
|
|
3
|
+
*
|
|
4
|
+
* Freshness used to be someone else's job: the Claude Code `Stop` hook spawned a
|
|
5
|
+
* background `graft build` *after* the turn ended, so every query an agent made
|
|
6
|
+
* between its first edit and the end of the turn answered from a graph that no
|
|
7
|
+
* longer matched the file it had just changed. Worse, an edit made outside the
|
|
8
|
+
* agent (your editor, a branch switch, a stash) set no `dirty` flag at all, so
|
|
9
|
+
* nothing ever triggered a resync.
|
|
10
|
+
*
|
|
11
|
+
* So freshness moves into the query path: every retrieval call probes the working
|
|
12
|
+
* tree (`fingerprint.ts`, ~3ms) and, when something moved, rebuilds the structural
|
|
13
|
+
* graph before answering. Properties worth keeping:
|
|
14
|
+
*
|
|
15
|
+
* - **$0 and offline.** Tier-1 only — never a summarizer, never `--deep`. Same
|
|
16
|
+
* money guard `claude/sync-run.ts` carries: auto-anything must not spend money.
|
|
17
|
+
* - **Never fatal.** A failed refresh degrades to answering from the graph on
|
|
18
|
+
* disk. A query that works today must not start failing because a rebuild did.
|
|
19
|
+
* - **Never a stampede.** It takes the same `graft/.cache/.sync.lock` the
|
|
20
|
+
* background sync uses, so concurrent MCP calls and the Stop hook can't pile up
|
|
21
|
+
* rebuilds on top of each other.
|
|
22
|
+
* - **Writes only what a query reads** (`graphOnly`): the graph, the `ask` sidecar,
|
|
23
|
+
* the freshness record. Not the markdown cards, not `INDEX.md`, not `.gitignore`.
|
|
24
|
+
* Those belong to an explicit `graft build` — which the `Stop` hook already runs
|
|
25
|
+
* at the end of a turn — so retrieval stays cheap and a read stays a read. It
|
|
26
|
+
* also leaves `stats.json` alone, so that same `Stop` hook still sees `dirty` and
|
|
27
|
+
* still rebuilds the passive surface.
|
|
28
|
+
*/
|
|
29
|
+
import { existsSync } from "node:fs";
|
|
30
|
+
import { join, resolve } from "node:path";
|
|
31
|
+
import { contextDirFor } from "../context/node-file.js";
|
|
32
|
+
import { acquireLockIn, releaseLockIn } from "../util/state.js";
|
|
33
|
+
import { CACHE_DIR } from "../context/node-file.js";
|
|
34
|
+
import { buildGraph } from "./build.js";
|
|
35
|
+
import { driftCount, isClean, probeDrift } from "./fingerprint.js";
|
|
36
|
+
import { invalidateGraphCaches } from "./load.js";
|
|
37
|
+
import { wiringPath } from "./write.js";
|
|
38
|
+
/** How long to wait for another process's in-flight rebuild before giving up and
|
|
39
|
+
* answering from the current graph. Long enough to ride out a small repo's build,
|
|
40
|
+
* short enough that a tool call never feels hung. */
|
|
41
|
+
const LOCK_WAIT_MS = 2000;
|
|
42
|
+
const LOCK_POLL_MS = 50;
|
|
43
|
+
const CLEAN = { refreshed: false };
|
|
44
|
+
/** Env kill switch, for CI or anyone who wants queries to never write. */
|
|
45
|
+
function envDisabled() {
|
|
46
|
+
const v = process.env.GRAFT_NO_REFRESH;
|
|
47
|
+
return v !== undefined && v !== "" && v !== "0" && v !== "false";
|
|
48
|
+
}
|
|
49
|
+
function sleep(ms) {
|
|
50
|
+
return new Promise((r) => setTimeout(r, ms));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Release the lock if this process is asked to die while holding it. Returns the
|
|
54
|
+
* un-hook.
|
|
55
|
+
*
|
|
56
|
+
* Not hypothetical: the Claude Code prompt hook runs `graft ask` with a timeout, and
|
|
57
|
+
* `execFileSync` enforces it with SIGTERM. Node's default disposition for SIGTERM is
|
|
58
|
+
* to exit without unwinding, so the `finally` below never runs and the lock outlives
|
|
59
|
+
* the process — after which the background sync is blocked and every query waits and
|
|
60
|
+
* then answers stale until the lock ages out. Ctrl-C on a CLI query is the same story
|
|
61
|
+
* with SIGINT.
|
|
62
|
+
*
|
|
63
|
+
* Adding a listener replaces that default disposition, so re-raise it explicitly
|
|
64
|
+
* afterwards: remove ourselves, then `process.kill(process.pid, sig)`, so the exit
|
|
65
|
+
* status still says "terminated by signal" for whoever is waiting on us.
|
|
66
|
+
*/
|
|
67
|
+
export function releaseOnSignal(cache) {
|
|
68
|
+
const signals = ["SIGTERM", "SIGINT"];
|
|
69
|
+
const onSignal = (sig) => {
|
|
70
|
+
releaseLockIn(cache);
|
|
71
|
+
for (const s of signals)
|
|
72
|
+
process.removeListener(s, onSignal);
|
|
73
|
+
process.kill(process.pid, sig);
|
|
74
|
+
};
|
|
75
|
+
for (const s of signals)
|
|
76
|
+
process.once(s, onSignal);
|
|
77
|
+
return () => {
|
|
78
|
+
for (const s of signals)
|
|
79
|
+
process.removeListener(s, onSignal);
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/** Wait out someone else's rebuild, then take the lock. False when we couldn't. */
|
|
83
|
+
async function waitForLock(cache) {
|
|
84
|
+
const deadline = Date.now() + LOCK_WAIT_MS;
|
|
85
|
+
for (;;) {
|
|
86
|
+
if (acquireLockIn(cache))
|
|
87
|
+
return true;
|
|
88
|
+
if (Date.now() >= deadline)
|
|
89
|
+
return false;
|
|
90
|
+
await sleep(LOCK_POLL_MS);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Rebuild `root`'s structural graph if the working tree has moved since the last
|
|
95
|
+
* build. Cheap and side-effect-free when nothing changed, which is the usual case.
|
|
96
|
+
*
|
|
97
|
+
* `root` is the repository root (the same value the query itself is given), not
|
|
98
|
+
* the context dir.
|
|
99
|
+
*/
|
|
100
|
+
export async function ensureFreshGraph(root, opts = {}) {
|
|
101
|
+
if (opts.disabled || envDisabled())
|
|
102
|
+
return CLEAN;
|
|
103
|
+
try {
|
|
104
|
+
const dir = resolve(root);
|
|
105
|
+
const outDir = contextDirFor(dir, opts.contextDir);
|
|
106
|
+
// Nothing built yet: the caller's own "no graph — run graft build" message is
|
|
107
|
+
// the right answer. Auto-building a whole repo under a query is a surprise,
|
|
108
|
+
// and it's the one case where the user hasn't opted into graft at all yet.
|
|
109
|
+
if (!existsSync(wiringPath(outDir)))
|
|
110
|
+
return CLEAN;
|
|
111
|
+
// null = no fingerprint at all: a graph built before this mechanism existed,
|
|
112
|
+
// or by a different extractor build. Rebuild once — that lays the fingerprint
|
|
113
|
+
// down, so it costs exactly one build, not one per query.
|
|
114
|
+
const drift = probeDrift(dir, outDir);
|
|
115
|
+
if (drift && isClean(drift))
|
|
116
|
+
return CLEAN;
|
|
117
|
+
// On the default layout this is `<root>/graft/.cache/.sync.lock`, the very file
|
|
118
|
+
// the Claude Code hooks lock — so this refresh and the background sync can
|
|
119
|
+
// never rebuild at the same time.
|
|
120
|
+
const lockCache = join(outDir, CACHE_DIR);
|
|
121
|
+
if (!(await waitForLock(lockCache))) {
|
|
122
|
+
return {
|
|
123
|
+
refreshed: false,
|
|
124
|
+
drift: drift ?? undefined,
|
|
125
|
+
note: "a graph rebuild is already in flight — answering from the current graph",
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
const unhook = releaseOnSignal(lockCache);
|
|
129
|
+
try {
|
|
130
|
+
// We may have queued behind another process's rebuild for up to LOCK_WAIT_MS,
|
|
131
|
+
// and that rebuild very likely fixed the same drift we saw. Re-probe rather
|
|
132
|
+
// than rebuild on the strength of a stale observation: without this, four
|
|
133
|
+
// parallel MCP tool calls on one edited file produce four full rebuilds, three
|
|
134
|
+
// of them pure waste, and the last tool call pays for all of it. A null drift
|
|
135
|
+
// means "no fingerprint" and still has to build.
|
|
136
|
+
const now = drift ? probeDrift(dir, outDir) : null;
|
|
137
|
+
if (now && isClean(now)) {
|
|
138
|
+
invalidateGraphCaches(outDir);
|
|
139
|
+
return CLEAN;
|
|
140
|
+
}
|
|
141
|
+
// Tier-1 only: no summarizer, so no LLM call and no network, ever. And
|
|
142
|
+
// `graphOnly`: write the graph, the ask sidecar and the fingerprint, nothing
|
|
143
|
+
// else. The markdown projections under `graft/` stay the `Stop` hook's job —
|
|
144
|
+
// a query has no business rewriting the repo's `.gitignore` or churning every
|
|
145
|
+
// card's mtime, and skipping them is most of what keeps this cheap.
|
|
146
|
+
await buildGraph(dir, { contextDir: opts.contextDir, graphOnly: true });
|
|
147
|
+
invalidateGraphCaches(outDir);
|
|
148
|
+
return { refreshed: true, drift: drift ?? undefined };
|
|
149
|
+
}
|
|
150
|
+
finally {
|
|
151
|
+
unhook();
|
|
152
|
+
releaseLockIn(lockCache);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
catch (err) {
|
|
156
|
+
// Answering from a slightly stale graph beats failing the query.
|
|
157
|
+
return { refreshed: false, note: `graph refresh skipped: ${err instanceof Error ? err.message : String(err)}` };
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Workspace variant: refresh each child repo's own graph (a workspace parent holds
|
|
162
|
+
* an index, never nodes). Children are independent, but they're refreshed in
|
|
163
|
+
* sequence — a fan-out of concurrent tree-sitter builds would spike CPU on the
|
|
164
|
+
* very path that's supposed to feel free.
|
|
165
|
+
*/
|
|
166
|
+
export async function ensureFreshChildren(root, children, opts = {}) {
|
|
167
|
+
if (opts.disabled || envDisabled())
|
|
168
|
+
return CLEAN;
|
|
169
|
+
const refreshedIn = [];
|
|
170
|
+
let files = 0;
|
|
171
|
+
for (const child of children) {
|
|
172
|
+
// Deliberately NOT `opts`: `contextDirFor` returns an override verbatim and
|
|
173
|
+
// ignores the root it's handed, so forwarding the parent's `--dir` would point
|
|
174
|
+
// every child at the *parent's* context dir — which holds a workspace index and
|
|
175
|
+
// no wiring.json, so every child would silently be skipped. (And if it did hold
|
|
176
|
+
// one, each child would build into that single shared dir in turn, the last
|
|
177
|
+
// clobbering the rest.) A child's graph always lives in its own `<child>/graft`,
|
|
178
|
+
// which is exactly how `loadWorkspaceGraphs` reads them back.
|
|
179
|
+
const r = await ensureFreshGraph(resolve(root, child), { disabled: opts.disabled });
|
|
180
|
+
if (!r.refreshed)
|
|
181
|
+
continue;
|
|
182
|
+
refreshedIn.push(child);
|
|
183
|
+
files += r.drift ? driftCount(r.drift) : 0;
|
|
184
|
+
}
|
|
185
|
+
if (!refreshedIn.length)
|
|
186
|
+
return CLEAN;
|
|
187
|
+
return {
|
|
188
|
+
refreshed: true,
|
|
189
|
+
note: `refreshed ${refreshedIn.join(", ")} (${files || "?"} file${files === 1 ? "" : "s"} changed) before answering`,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
/** The one-line note a CLI/MCP surface prints when a refresh actually happened.
|
|
193
|
+
* Null when there's nothing to say (the overwhelmingly common case). */
|
|
194
|
+
export function refreshNote(r) {
|
|
195
|
+
if (r.note)
|
|
196
|
+
return `[graft] ${r.note}`;
|
|
197
|
+
if (!r.refreshed)
|
|
198
|
+
return null;
|
|
199
|
+
const n = r.drift ? driftCount(r.drift) : 0;
|
|
200
|
+
return `[graft] refreshed the graph (${n || "?"} file${n === 1 ? "" : "s"} changed) before answering`;
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=refresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh.js","sourceRoot":"","sources":["../../src/graph/refresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,OAAO,EAA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AC,CAAC,CAAC,GAAG,4BAA4B;KACrH,CAAC;AACJ,CAAC;AAED;wEACwE;AACxE,MAAM,UAAU,WAAW,CAAC,CAAgB;IAC1C,IAAI,CAAC,CAAC,IAAI;QAAE,OAAO,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;IACvC,IAAI,CAAC,CAAC,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAC9B,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,OAAO,gCAAgC,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,4BAA4B,CAAC;AACxG,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** The source files a graph build parses: supported languages, minus the output dir. */
|
|
2
|
+
export declare function listSourceFiles(root: string, outDir: string): string[];
|
|
3
|
+
export interface SourceStat {
|
|
4
|
+
/** Absolute path. */
|
|
5
|
+
abs: string;
|
|
6
|
+
/** `relative(root, abs)` — exactly the form `buildGraph` uses for node ids and
|
|
7
|
+
* `checkGraph` diffs against, so cache keys and ids can never disagree. */
|
|
8
|
+
rel: string;
|
|
9
|
+
size: number;
|
|
10
|
+
mtimeMs: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* {@link listSourceFiles} plus each file's `(size, mtimeMs)` — the currency of
|
|
14
|
+
* both the freshness probe and the extraction cache. Files that vanish between
|
|
15
|
+
* the walk and the stat are dropped (same fail-soft posture as `walkDir`).
|
|
16
|
+
*/
|
|
17
|
+
export declare function listSourceStats(root: string, outDir: string): SourceStat[];
|
|
18
|
+
//# sourceMappingURL=source-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-files.d.ts","sourceRoot":"","sources":["../../src/graph/source-files.ts"],"names":[],"mappings":"AAaA,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAEtE;AAED,MAAM,WAAW,UAAU;IACzB,qBAAqB;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ;+EAC2E;IAC3E,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,CAY1E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The file set a graph build parses, and its stat metadata.
|
|
3
|
+
*
|
|
4
|
+
* Split out of `build.ts` so the freshness probe (`fingerprint.ts`) can enumerate
|
|
5
|
+
* exactly the same files without importing the builder (which would be an import
|
|
6
|
+
* cycle: build → fingerprint → build). `build.ts` re-exports
|
|
7
|
+
* {@link listSourceFiles} so its existing importers are unaffected.
|
|
8
|
+
*/
|
|
9
|
+
import { statSync } from "node:fs";
|
|
10
|
+
import { relative } from "node:path";
|
|
11
|
+
import { walkDir } from "../ingest/fs.js";
|
|
12
|
+
import { languageOf } from "./extract.js";
|
|
13
|
+
/** The source files a graph build parses: supported languages, minus the output dir. */
|
|
14
|
+
export function listSourceFiles(root, outDir) {
|
|
15
|
+
return walkDir(root).filter((f) => !f.startsWith(outDir) && languageOf(f) !== null);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* {@link listSourceFiles} plus each file's `(size, mtimeMs)` — the currency of
|
|
19
|
+
* both the freshness probe and the extraction cache. Files that vanish between
|
|
20
|
+
* the walk and the stat are dropped (same fail-soft posture as `walkDir`).
|
|
21
|
+
*/
|
|
22
|
+
export function listSourceStats(root, outDir) {
|
|
23
|
+
const out = [];
|
|
24
|
+
for (const abs of listSourceFiles(root, outDir)) {
|
|
25
|
+
let s;
|
|
26
|
+
try {
|
|
27
|
+
s = statSync(abs);
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
out.push({ abs, rel: relative(root, abs), size: s.size, mtimeMs: s.mtimeMs });
|
|
33
|
+
}
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=source-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-files.js","sourceRoot":"","sources":["../../src/graph/source-files.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,wFAAwF;AACxF,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,MAAc;IAC1D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;AACtF,CAAC;AAYD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,MAAc;IAC1D,MAAM,GAAG,GAAiB,EAAE,CAAC;IAC7B,KAAK,MAAM,GAAG,IAAI,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;QAChD,IAAI,CAAoC,CAAC;QACzC,IAAI,CAAC;YACH,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -11,7 +11,7 @@ export interface CallersCliOptions {
|
|
|
11
11
|
/** the top-level `--dir` override, so this command respects it like every other. */
|
|
12
12
|
globalDir?: string;
|
|
13
13
|
}
|
|
14
|
-
/** Exported so the MCP `
|
|
14
|
+
/** Exported so the MCP `graft_trace_calls` tool (`src/mcp/tools.ts`) can render the
|
|
15
15
|
* same human report format as the CLI, rather than re-implementing it — both
|
|
16
16
|
* surfaces walk the same edges via the same `resolveSymbol` / `edgeWalk` core. */
|
|
17
17
|
export declare function headerOf(n: NodeV1): string;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* unit-testable without shelling out to the CLI on every case.
|
|
9
9
|
*
|
|
10
10
|
* `--direction out` subsumes the old `graft callees`; `--depth N` subsumes the
|
|
11
|
-
* old `graft impact`. Exported formatters are reused by the MCP `
|
|
11
|
+
* old `graft impact`. Exported formatters are reused by the MCP `graft_trace_calls`
|
|
12
12
|
* tool (`src/mcp/tools.ts`), so both surfaces render identical reports.
|
|
13
13
|
*/
|
|
14
14
|
import { resolve } from "node:path";
|
|
@@ -18,7 +18,7 @@ import { loadGraphCached } from "./load.js";
|
|
|
18
18
|
import { resolveSymbol, edgeWalk } from "./traverse.js";
|
|
19
19
|
const ARROW = { in: "←", out: "→" };
|
|
20
20
|
const DEFAULT_DEPTH = 1;
|
|
21
|
-
/** Exported so the MCP `
|
|
21
|
+
/** Exported so the MCP `graft_trace_calls` tool (`src/mcp/tools.ts`) can render the
|
|
22
22
|
* same human report format as the CLI, rather than re-implementing it — both
|
|
23
23
|
* surfaces walk the same edges via the same `resolveSymbol` / `edgeWalk` core. */
|
|
24
24
|
export function headerOf(n) {
|
package/dist/graph/traverse.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pure graph-traversal core shared by `graft callers` (its `--direction`/
|
|
3
|
-
* `--depth` flags), the MCP `
|
|
3
|
+
* `--depth` flags), the MCP `graft_trace_calls` tool, and `ask`'s structural
|
|
4
4
|
* intent path.
|
|
5
5
|
*
|
|
6
6
|
* Centralizes the symbol-resolution contract (bare name, qualified id-suffix,
|
|
@@ -94,7 +94,7 @@ export declare function impactOfMany(graph: GraphV1, seeds: NodeV1[], maxDepth?:
|
|
|
94
94
|
*/
|
|
95
95
|
export declare function impactOfFile(graph: GraphV1, fileNode: NodeV1, maxDepth?: number, direction?: Direction): EdgeHit[];
|
|
96
96
|
/**
|
|
97
|
-
* The single entry point behind `graft callers` and the MCP `
|
|
97
|
+
* The single entry point behind `graft callers` and the MCP `graft_trace_calls`
|
|
98
98
|
* tool, covering all of what were once three commands:
|
|
99
99
|
* - `direction:in, depth:1` → callers (who calls/references this)
|
|
100
100
|
* - `direction:out, depth:1` → callees (what this calls/references)
|
package/dist/graph/traverse.js
CHANGED
|
@@ -151,7 +151,7 @@ export function impactOfFile(graph, fileNode, maxDepth = 2, direction = "in") {
|
|
|
151
151
|
return impactOfMany(graph, [fileNode, ...symbolsInFile(graph, fileNode)], maxDepth, direction);
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
|
-
* The single entry point behind `graft callers` and the MCP `
|
|
154
|
+
* The single entry point behind `graft callers` and the MCP `graft_trace_calls`
|
|
155
155
|
* tool, covering all of what were once three commands:
|
|
156
156
|
* - `direction:in, depth:1` → callers (who calls/references this)
|
|
157
157
|
* - `direction:out, depth:1` → callees (what this calls/references)
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import type { PlannedWrite } from './plan.js';
|
|
1
2
|
export interface HookWrite {
|
|
2
3
|
id: string;
|
|
3
4
|
path: string;
|
|
4
5
|
action: 'created' | 'updated' | 'unchanged' | 'skipped-unparseable';
|
|
5
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* The files installing the Codex hook would touch — pure, no writes. Both live
|
|
9
|
+
* under `~/.codex`, so both are scoped 'global': the PostToolUse entry fires on
|
|
10
|
+
* every edit in every repo opened with Codex, not just this one. Empty when the
|
|
11
|
+
* CLI isn't installed, mirroring `installCodexHooks`' early return.
|
|
12
|
+
*/
|
|
13
|
+
export declare function hookTargets(home: string): PlannedWrite[];
|
|
6
14
|
export declare function installCodexHooks(home: string): HookWrite[];
|
|
7
15
|
//# sourceMappingURL=codex-hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-hooks.d.ts","sourceRoot":"","sources":["../../src/hosts/codex-hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"codex-hooks.d.ts","sourceRoot":"","sources":["../../src/hosts/codex-hooks.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,qBAAqB,CAAC;CACrE;AAMD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,CAexD;AAkBD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAqC3D"}
|
|
@@ -15,6 +15,29 @@ function dirExists(p) {
|
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* The files installing the Codex hook would touch — pure, no writes. Both live
|
|
20
|
+
* under `~/.codex`, so both are scoped 'global': the PostToolUse entry fires on
|
|
21
|
+
* every edit in every repo opened with Codex, not just this one. Empty when the
|
|
22
|
+
* CLI isn't installed, mirroring `installCodexHooks`' early return.
|
|
23
|
+
*/
|
|
24
|
+
export function hookTargets(home) {
|
|
25
|
+
const base = join(home, '.codex');
|
|
26
|
+
if (!dirExists(base))
|
|
27
|
+
return [];
|
|
28
|
+
return [
|
|
29
|
+
{
|
|
30
|
+
hostId: 'agents', id: 'codex-hook-shim',
|
|
31
|
+
path: join(base, 'hooks', 'graft', 'graft-hooks.cjs'),
|
|
32
|
+
scope: 'global', kind: 'hook', what: 'post-edit hook shim',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
hostId: 'agents', id: 'codex-hooks',
|
|
36
|
+
path: join(base, 'hooks.json'),
|
|
37
|
+
scope: 'global', kind: 'hook', what: 'PostToolUse: Write|Edit|MultiEdit',
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
}
|
|
18
41
|
function writeOwned(id, path, content, mode) {
|
|
19
42
|
const existed = existsSync(path);
|
|
20
43
|
if (existed && readFileSync(path, 'utf8') === content) {
|
|
@@ -32,12 +55,12 @@ function isGraftEntry(entry) {
|
|
|
32
55
|
return JSON.stringify(entry).includes('graft-hooks.cjs');
|
|
33
56
|
}
|
|
34
57
|
export function installCodexHooks(home) {
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
58
|
+
const targets = hookTargets(home);
|
|
59
|
+
if (targets.length === 0)
|
|
37
60
|
return [];
|
|
38
|
-
const shimPath =
|
|
61
|
+
const shimPath = targets[0].path;
|
|
39
62
|
const shimWrite = writeOwned('codex-hook-shim', shimPath, hooksShim(claudeDistDir()), 0o755);
|
|
40
|
-
const cfgPath =
|
|
63
|
+
const cfgPath = targets[1].path;
|
|
41
64
|
let root = {};
|
|
42
65
|
const existed = existsSync(cfgPath);
|
|
43
66
|
if (existed) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-hooks.js","sourceRoot":"","sources":["../../src/hosts/codex-hooks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,E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
|
@@ -17,5 +17,7 @@ export declare function runHostsInit(repo: string, opts?: {
|
|
|
17
17
|
home?: string;
|
|
18
18
|
mcp?: boolean;
|
|
19
19
|
hooks?: boolean;
|
|
20
|
+
/** false → skip every write outside the repo (the ~/.codex/ targets). */
|
|
21
|
+
global?: boolean;
|
|
20
22
|
}): HostsInitResult;
|
|
21
23
|
//# sourceMappingURL=init.d.ts.map
|
package/dist/hosts/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/hosts/init.ts"],"names":[],"mappings":"AAUA,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAErE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,EAAE,QAAQ,EAAE,CAAC;IAChB,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAiBD,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/hosts/init.ts"],"names":[],"mappings":"AAUA,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAErE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,EAAE,QAAQ,EAAE,CAAC;IAChB,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAiBD,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;IACJ,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yEAAyE;IACzE,MAAM,CAAC,EAAE,OAAO,CAAC;CACb,GACL,eAAe,CAoCjB"}
|
package/dist/hosts/init.js
CHANGED
|
@@ -54,8 +54,11 @@ export function runHostsInit(repo, opts = {}) {
|
|
|
54
54
|
written.push({ id: host.id, path, action });
|
|
55
55
|
}
|
|
56
56
|
const skipped = HOSTS.filter((h) => !selected.includes(h)).map((h) => h.id);
|
|
57
|
-
const mcp = opts.mcp === false
|
|
58
|
-
|
|
57
|
+
const mcp = opts.mcp === false
|
|
58
|
+
? []
|
|
59
|
+
: registerMcpConfigs(repo, selected.map((h) => h.id), { home, global: opts.global });
|
|
60
|
+
// Every hook target is user-level, so --no-global suppresses the lot.
|
|
61
|
+
const hooks = opts.hooks === false || opts.global === false || !selected.some((h) => h.id === 'agents')
|
|
59
62
|
? []
|
|
60
63
|
: installCodexHooks(home);
|
|
61
64
|
return { written, skipped, unknown, mcp, hooks };
|
package/dist/hosts/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/hosts/init.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAA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AI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9C,CAAC;IACD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC5E,MAAM,GAAG,GACP,IAAI,CAAC,GAAG,KAAK,KAAK;QAChB,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACzF,sEAAsE;IACtE,MAAM,KAAK,GACT,IAAI,CAAC,KAAK,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC;QACvF,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -1,14 +1,42 @@
|
|
|
1
|
+
import type { PlannedWrite } from './plan.js';
|
|
1
2
|
export interface McpWrite {
|
|
2
3
|
id: string;
|
|
3
4
|
path: string;
|
|
4
5
|
action: 'created' | 'updated' | 'unchanged' | 'skipped-unparseable';
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
+
/** A planned MCP write, plus the detail needed to actually perform it. */
|
|
8
|
+
export interface McpTarget extends PlannedWrite {
|
|
9
|
+
format: 'json' | 'toml';
|
|
10
|
+
/** JSON only: the top-level key holding the server map. */
|
|
11
|
+
topKey?: string;
|
|
12
|
+
/** JSON only: the server entry to merge in under `graft`. */
|
|
13
|
+
entry?: object;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* JSON hosts: `{ command, args }`.
|
|
17
|
+
*
|
|
18
|
+
* `GRAFT_MCP_NPX=1` forces the `npx` form — the escape hatch for a machine whose
|
|
19
|
+
* global install is stale or shadowed, and what the tests set so their expectations
|
|
20
|
+
* don't depend on whether the machine running them happens to have graft installed.
|
|
21
|
+
* `opts.onPath` is the same override for direct unit tests of both branches.
|
|
22
|
+
*/
|
|
23
|
+
export declare function serverEntry(opts?: {
|
|
24
|
+
onPath?: boolean;
|
|
25
|
+
}): {
|
|
7
26
|
command: string;
|
|
8
27
|
args: string[];
|
|
9
28
|
};
|
|
10
29
|
export declare function mergeJsonKey(id: string, path: string, topKey: string, entry: object): McpWrite;
|
|
30
|
+
/**
|
|
31
|
+
* The MCP config files selecting these hosts would touch — pure, no writes.
|
|
32
|
+
* Codex's target is the user-level `~/.codex/config.toml`, so it is scoped
|
|
33
|
+
* 'global': registering there affects every project on the machine.
|
|
34
|
+
*/
|
|
35
|
+
export declare function mcpTargets(repo: string, ids: string[], opts?: {
|
|
36
|
+
home?: string;
|
|
37
|
+
}): McpTarget[];
|
|
11
38
|
export declare function registerMcpConfigs(repo: string, ids: string[], opts?: {
|
|
12
39
|
home?: string;
|
|
40
|
+
global?: boolean;
|
|
13
41
|
}): McpWrite[];
|
|
14
42
|
//# sourceMappingURL=mcp-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-config.d.ts","sourceRoot":"","sources":["../../src/hosts/mcp-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcp-config.d.ts","sourceRoot":"","sources":["../../src/hosts/mcp-config.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,WA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