@aroman22/codegraph-vba 1.5.2 → 1.6.0
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 +1 -1
- package/dist/bin/codegraph.d.ts +1 -1
- package/dist/bin/command-supervision.d.ts +38 -1
- package/dist/db/index.d.ts +84 -5
- package/dist/db/migrations.d.ts +1 -1
- package/dist/db/queries.d.ts +116 -4
- package/dist/db/wal-valve.d.ts +106 -0
- package/dist/directory.d.ts +9 -5
- package/dist/extraction/cfml-extractor.d.ts +107 -0
- package/dist/extraction/grammars.d.ts +25 -1
- package/dist/extraction/index.d.ts +47 -2
- package/dist/extraction/languages/arkts.d.ts +3 -0
- package/dist/extraction/languages/c-cpp.d.ts +98 -0
- package/dist/extraction/languages/cfquery.d.ts +12 -0
- package/dist/extraction/languages/cfscript.d.ts +3 -0
- package/dist/extraction/languages/cobol.d.ts +33 -0
- package/dist/extraction/languages/erlang.d.ts +3 -0
- package/dist/extraction/languages/nix.d.ts +3 -0
- package/dist/extraction/languages/solidity.d.ts +3 -0
- package/dist/extraction/languages/terraform.d.ts +3 -0
- package/dist/extraction/languages/vbnet.d.ts +11 -0
- package/dist/extraction/mybatis-extractor.d.ts +30 -10
- package/dist/extraction/parse-pool.d.ts +28 -1
- package/dist/extraction/tree-sitter-types.d.ts +20 -1
- package/dist/extraction/tree-sitter.d.ts +60 -1
- package/dist/extraction/vba/call-sweep.d.ts +3 -0
- package/dist/extraction/vba/calls.d.ts +55 -0
- package/dist/extraction/vba/constants.d.ts +42 -0
- package/dist/extraction/vba/context.d.ts +175 -0
- package/dist/extraction/vba/controls.d.ts +24 -0
- package/dist/extraction/vba/declarations.d.ts +3 -0
- package/dist/extraction/vba/dims.d.ts +3 -0
- package/dist/extraction/vba/docmd.d.ts +16 -0
- package/dist/extraction/vba/enums-consts.d.ts +15 -0
- package/dist/extraction/vba/implements.d.ts +3 -0
- package/dist/extraction/vba/procedures.d.ts +3 -0
- package/dist/extraction/vba/sql-wrapper.d.ts +17 -0
- package/dist/extraction/vba/tempvars.d.ts +10 -0
- package/dist/extraction/vba/text-utils.d.ts +73 -0
- package/dist/extraction/vba-extractor.d.ts +3 -951
- package/dist/extraction/vba-preprocess.d.ts +1 -1
- package/dist/index.d.ts +81 -1
- package/dist/installer/index.d.ts +42 -0
- package/dist/mcp/daemon.d.ts +35 -3
- package/dist/mcp/early-ppid.d.ts +26 -0
- package/dist/mcp/liveness-watchdog.d.ts +18 -1
- package/dist/mcp/query-pool.d.ts +14 -0
- package/dist/mcp/session.d.ts +14 -0
- package/dist/mcp/startup-handshake.d.ts +44 -0
- package/dist/mcp/tools.d.ts +22 -0
- package/dist/project-config.d.ts +44 -0
- package/dist/resolution/c-fnptr-synthesizer.d.ts +2 -1
- package/dist/resolution/callback-synthesizer.d.ts +1 -1
- package/dist/resolution/cooperative-yield.d.ts +32 -0
- package/dist/resolution/frameworks/cics.d.ts +20 -0
- package/dist/resolution/frameworks/terraform.d.ts +38 -0
- package/dist/resolution/goframe-synthesizer.d.ts +2 -1
- package/dist/resolution/import-resolver.d.ts +7 -0
- package/dist/resolution/index.d.ts +64 -2
- package/dist/resolution/name-matcher.d.ts +22 -3
- package/dist/resolution/strip-comments.d.ts +1 -1
- package/dist/resolution/types.d.ts +29 -0
- package/dist/resolution/workspace-packages.d.ts +10 -0
- package/dist/search/identifier-segments.d.ts +60 -0
- package/dist/sync/watcher.d.ts +10 -5
- package/dist/sync/worktree.d.ts +9 -0
- package/dist/types.d.ts +25 -2
- package/dist/upgrade/index.d.ts +32 -0
- package/dist/upgrade/remove-binary.d.ts +87 -0
- package/dist/upgrade/update-check.d.ts +92 -0
- package/npm-shim.js +32 -3
- package/package.json +7 -7
- package/dist/reasoning/config.d.ts +0 -45
- package/dist/reasoning/credentials.d.ts +0 -5
- package/dist/reasoning/login.d.ts +0 -21
- package/dist/reasoning/reasoner.d.ts +0 -43
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { UnresolvedReference, Edge } from '../types';
|
|
7
7
|
import { QueryBuilder } from '../db/queries';
|
|
8
8
|
import { UnresolvedRef, ResolvedRef, ResolutionResult } from './types';
|
|
9
|
+
import { type MaybeYield } from './cooperative-yield';
|
|
9
10
|
export * from './types';
|
|
10
11
|
/**
|
|
11
12
|
* Reference Resolver
|
|
@@ -27,6 +28,9 @@ export declare class ReferenceResolver {
|
|
|
27
28
|
private nameCache;
|
|
28
29
|
private lowerNameCache;
|
|
29
30
|
private qualifiedNameCache;
|
|
31
|
+
private fileLinesCache;
|
|
32
|
+
private methodMatchCache;
|
|
33
|
+
private nodesByKindCache;
|
|
30
34
|
private knownNames;
|
|
31
35
|
private knownFiles;
|
|
32
36
|
private cachesWarmed;
|
|
@@ -54,10 +58,21 @@ export declare class ReferenceResolver {
|
|
|
54
58
|
* We cache the set of known symbol names for fast pre-filtering.
|
|
55
59
|
*/
|
|
56
60
|
warmCaches(): void;
|
|
61
|
+
/**
|
|
62
|
+
* warmCaches for the async resolution entry points: streams the distinct
|
|
63
|
+
* name set with periodic yields instead of one synchronous `.all()`. On a
|
|
64
|
+
* multi-million-node index the DISTINCT scan is a solid multi-second block
|
|
65
|
+
* (measured up to 28s inside `codegraph sync` on the Linux kernel index),
|
|
66
|
+
* long enough to matter to the #850 watchdog on slower hardware. Same
|
|
67
|
+
* result, same memory — only the event loop keeps turning.
|
|
68
|
+
*/
|
|
69
|
+
warmCachesYielding(onYield: MaybeYield): Promise<void>;
|
|
57
70
|
/**
|
|
58
71
|
* Clear internal caches
|
|
59
72
|
*/
|
|
60
73
|
clearCaches(): void;
|
|
74
|
+
/** `readFile` through the LRU content cache (null = read failed, also cached). */
|
|
75
|
+
private readFileCached;
|
|
61
76
|
/**
|
|
62
77
|
* Create the resolution context
|
|
63
78
|
*/
|
|
@@ -90,6 +105,16 @@ export declare class ReferenceResolver {
|
|
|
90
105
|
* Resolve and persist edges to database
|
|
91
106
|
*/
|
|
92
107
|
resolveAndPersist(unresolvedRefs: UnresolvedReference[], onProgress?: (current: number, total: number) => void): ResolutionResult;
|
|
108
|
+
/**
|
|
109
|
+
* Yielding counterpart of {@link resolveAndPersist} for a caller-supplied
|
|
110
|
+
* ref list — used by sync's failed-ref retry pass (#1240). Same persistence
|
|
111
|
+
* semantics: resolved refs become edges and their rows are deleted;
|
|
112
|
+
* still-unresolvable refs are (re-)marked failed (a no-op for rows already
|
|
113
|
+
* in that status). Yields per-ref because sync can run on the daemon's
|
|
114
|
+
* liveness-watchdog thread (#850/#1091) and a retry set is unbounded when
|
|
115
|
+
* a large edit lands many popular symbol names at once.
|
|
116
|
+
*/
|
|
117
|
+
resolveAndPersistListYielding(refs: UnresolvedReference[]): Promise<ResolutionResult>;
|
|
93
118
|
/**
|
|
94
119
|
* Second resolution pass for chained static-factory / fluent calls whose
|
|
95
120
|
* chained method is defined on a SUPERTYPE the receiver's type conforms to —
|
|
@@ -103,7 +128,21 @@ export declare class ReferenceResolver {
|
|
|
103
128
|
* (re-resolving an already-resolved ref is a no-op since it's been deleted).
|
|
104
129
|
* Returns the number of newly-created edges.
|
|
105
130
|
*/
|
|
106
|
-
resolveChainedCallsViaConformance(): number
|
|
131
|
+
resolveChainedCallsViaConformance(): Promise<number>;
|
|
132
|
+
/**
|
|
133
|
+
* Resolve one batch with a yield checkpoint between EVERY ref so the #850
|
|
134
|
+
* liveness heartbeat can fire on a slow/dense batch (#1091). The checkpoint
|
|
135
|
+
* granularity is per-ref — not per-N-refs — because per-ref cost is unbounded
|
|
136
|
+
* in the worst case (a collision-heavy method name whose candidate set misses
|
|
137
|
+
* the LRU re-fetches tens of thousands of rows): any fixed N multiplies that
|
|
138
|
+
* worst case into the watchdog window, which is how v1.2.0 still got killed
|
|
139
|
+
* at "Resolving refs" on large Java monorepos (#1122). `maybeYield()` is a
|
|
140
|
+
* ~ns time check when under budget, so per-ref checkpoints cost nothing.
|
|
141
|
+
* Behaviourally identical to `resolveAll(batch)`: `warmCaches()` is
|
|
142
|
+
* idempotent (guarded) and `resolveOne` is independent per ref, so yielding
|
|
143
|
+
* between refs changes only timing, never which edges get created.
|
|
144
|
+
*/
|
|
145
|
+
private resolveBatchYielding;
|
|
107
146
|
/**
|
|
108
147
|
* Resolve and persist in batches to keep memory bounded.
|
|
109
148
|
* Processes unresolved references in chunks, persisting edges and cleaning
|
|
@@ -152,6 +191,29 @@ export declare class ReferenceResolver {
|
|
|
152
191
|
* through to name-matching).
|
|
153
192
|
*/
|
|
154
193
|
private resolveRazorUsing;
|
|
194
|
+
/**
|
|
195
|
+
* Resolve a CFML inheritance reference written as a component path (#1152).
|
|
196
|
+
* Two forms exist in real code:
|
|
197
|
+
*
|
|
198
|
+
* - Dotted: `extends="coldbox.system.web.Controller"` — dots are directory
|
|
199
|
+
* separators from the webroot or a CFML mapping. Mappings live in server
|
|
200
|
+
* config / Application.cfc, so the leading segments may not exist in the
|
|
201
|
+
* repo at all (in the coldbox repo itself the path is `system/web/
|
|
202
|
+
* Controller.cfc` — the `coldbox.` root IS the repo). Matched by final
|
|
203
|
+
* segment (the class), corroborated right-to-left against the candidate's
|
|
204
|
+
* parent directories.
|
|
205
|
+
* - Relative: `extends="../base"` / `extends="./base"` (the FW/1 style) —
|
|
206
|
+
* resolved against the referencing file's own directory.
|
|
207
|
+
*
|
|
208
|
+
* Conservative by design: a candidate needs at least one corroborating
|
|
209
|
+
* directory segment (a dotted path whose only same-named class sits in an
|
|
210
|
+
* unrelated directory is almost always an out-of-repo library supertype —
|
|
211
|
+
* mxunit/testbox/coldbox-as-dependency), and a corroboration tie yields no
|
|
212
|
+
* edge. Directory comparison is case-insensitive (CFML path resolution is);
|
|
213
|
+
* the class segment itself is matched exactly, which real code satisfies —
|
|
214
|
+
* dotted paths are written to match the on-disk file name.
|
|
215
|
+
*/
|
|
216
|
+
private resolveCfmlComponentPath;
|
|
155
217
|
/**
|
|
156
218
|
* Resolve a `this.<member>` function-as-value reference (#756/#808) to the
|
|
157
219
|
* ENCLOSING CLASS's own member — never a same-named symbol elsewhere. The
|
|
@@ -172,7 +234,7 @@ export declare class ReferenceResolver {
|
|
|
172
234
|
* Mirrors resolveChainedCallsViaConformance's lifecycle. Returns the number
|
|
173
235
|
* of newly-created edges.
|
|
174
236
|
*/
|
|
175
|
-
resolveDeferredThisMemberRefs(): number
|
|
237
|
+
resolveDeferredThisMemberRefs(): Promise<number>;
|
|
176
238
|
/**
|
|
177
239
|
* VBA #12b — post-extraction resolver pass (vba-graph-connectivity-fixes,
|
|
178
240
|
* issue #12). Repoints qualified call-stub `calls` edges (tagged
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Handles symbol name matching for reference resolution.
|
|
5
5
|
*/
|
|
6
|
+
import { Node } from '../types';
|
|
6
7
|
import { UnresolvedRef, ResolvedRef, ResolutionContext } from './types';
|
|
7
8
|
/**
|
|
8
9
|
* Try to resolve a path-like reference (e.g., "snippets/drawer-menu.liquid")
|
|
@@ -47,6 +48,27 @@ export declare function matchByExactName(ref: UnresolvedRef, context: Resolution
|
|
|
47
48
|
* Try to resolve by qualified name
|
|
48
49
|
*/
|
|
49
50
|
export declare function matchByQualifiedName(ref: UnresolvedRef, context: ResolutionContext): ResolvedRef | null;
|
|
51
|
+
/**
|
|
52
|
+
* When a symbol name is ambiguous across files, prefer the candidate(s) declared
|
|
53
|
+
* in the call site's own file, keeping the rest in their original order (#1079).
|
|
54
|
+
* A same-file definition is the strongest language-agnostic signal for which of
|
|
55
|
+
* several same-named symbols a call means; without it, resolution collapses onto
|
|
56
|
+
* whichever was indexed first, so a call in `b/svc` wrongly targets `a/svc`.
|
|
57
|
+
* No-op when there are <2 candidates or none share the call site's file.
|
|
58
|
+
*/
|
|
59
|
+
export declare function preferCallSiteFile(nodes: Node[], callSiteFile: string): Node[];
|
|
60
|
+
export declare function resolveMethodOnType(typeName: string, methodName: string, ref: UnresolvedRef, context: ResolutionContext, confidence: number, resolvedBy: ResolvedRef['resolvedBy'],
|
|
61
|
+
/**
|
|
62
|
+
* Optional FQN that identifies WHICH class declaration `typeName`
|
|
63
|
+
* refers to in the caller's file. When multiple candidates share
|
|
64
|
+
* the same qualifiedName (`FooConverter::convert` in both
|
|
65
|
+
* `dao/converter/` and `service/converter/`), the FQN's
|
|
66
|
+
* file-path-suffix picks the right one — the disambiguation
|
|
67
|
+
* signal Java imports carry but the call site doesn't (#314).
|
|
68
|
+
*/
|
|
69
|
+
preferredFqn?: string,
|
|
70
|
+
/** Recursion guard for the supertype/conformance walk. */
|
|
71
|
+
depth?: number): ResolvedRef | null;
|
|
50
72
|
/**
|
|
51
73
|
* Resolve a C++ chained call whose receiver is itself a call — encoded by the
|
|
52
74
|
* extractor as `<innerCallee>().<method>` (#645). The receiver's type is what
|
|
@@ -86,8 +108,5 @@ export declare function matchMethodCall(ref: UnresolvedRef, context: ResolutionC
|
|
|
86
108
|
* Fuzzy match - last resort with lower confidence
|
|
87
109
|
*/
|
|
88
110
|
export declare function matchFuzzy(ref: UnresolvedRef, context: ResolutionContext): ResolvedRef | null;
|
|
89
|
-
/**
|
|
90
|
-
* Match all strategies in order of confidence
|
|
91
|
-
*/
|
|
92
111
|
export declare function matchReference(ref: UnresolvedRef, context: ResolutionContext): ResolvedRef | null;
|
|
93
112
|
//# sourceMappingURL=name-matcher.d.ts.map
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
* `path(...)`, `Route::get(...)`, `app.get(...)` style patterns that
|
|
23
23
|
* framework extractors scan for.
|
|
24
24
|
*/
|
|
25
|
-
export type CommentLang = 'python' | 'javascript' | 'typescript' | 'php' | 'ruby' | 'java' | 'csharp' | 'swift' | 'go' | 'rust' | 'c' | 'cpp';
|
|
25
|
+
export type CommentLang = 'python' | 'javascript' | 'typescript' | 'php' | 'ruby' | 'java' | 'csharp' | 'swift' | 'go' | 'rust' | 'c' | 'cpp' | 'erlang';
|
|
26
26
|
export declare function stripCommentsForRegex(content: string, lang: CommentLang): string;
|
|
27
27
|
//# sourceMappingURL=strip-comments.d.ts.map
|
|
@@ -66,10 +66,39 @@ export interface ResolutionContext {
|
|
|
66
66
|
getNodesByQualifiedName(qualifiedName: string): Node[];
|
|
67
67
|
/** Get all nodes of a kind */
|
|
68
68
|
getNodesByKind(kind: Node['kind']): Node[];
|
|
69
|
+
/**
|
|
70
|
+
* Stream nodes of a kind one at a time instead of materializing (and, unlike
|
|
71
|
+
* `getNodesByKind`, without populating the resolver's per-kind array cache).
|
|
72
|
+
* For unbounded kinds (`function`, `method`, `struct`) on a symbol-dense
|
|
73
|
+
* project the full array is gigabytes — the dynamic-edge synthesizers must
|
|
74
|
+
* use this so their memory stays O(1) in node count (#610, #1212). Optional
|
|
75
|
+
* so minimal test contexts compile; callers fall back to getNodesByKind.
|
|
76
|
+
*/
|
|
77
|
+
iterateNodesByKind?(kind: Node['kind']): IterableIterator<Node>;
|
|
69
78
|
/** Check if a file exists */
|
|
70
79
|
fileExists(filePath: string): boolean;
|
|
71
80
|
/** Read file content */
|
|
72
81
|
readFile(filePath: string): string | null;
|
|
82
|
+
/**
|
|
83
|
+
* `readFile(filePath)` split into lines, LRU-cached per file. Receiver-type
|
|
84
|
+
* inference scans source lines for EVERY `receiver.method()` ref; splitting
|
|
85
|
+
* the whole file per ref made that O(refs-in-file × file-size) — ~20% of
|
|
86
|
+
* total index CPU on a Java-heavy repo and a driver of the #1122 watchdog
|
|
87
|
+
* kill on large ones. Optional so external/test contexts compile without it;
|
|
88
|
+
* callers fall back to splitting `readFile` themselves.
|
|
89
|
+
*/
|
|
90
|
+
getFileLines?(filePath: string): string[] | null;
|
|
91
|
+
/**
|
|
92
|
+
* The method-definition nodes matching `typeName::methodName` in `language` —
|
|
93
|
+
* exactly `resolveMethodOnType`'s kind/language/qualifiedName-suffix filter,
|
|
94
|
+
* LRU-cached per (language, type, method). The uncached path re-fetches every
|
|
95
|
+
* node sharing the METHOD name (unbounded — tens of thousands on a collision-
|
|
96
|
+
* heavy Java repo) and re-scans it per ref, the dominant term in the #1122
|
|
97
|
+
* watchdog kill. Cached entries hold only the small filtered result; per-ref
|
|
98
|
+
* disambiguation (import FQN, call-site file) stays in the caller so a cached
|
|
99
|
+
* entry is valid from any call site. Optional for external/test contexts.
|
|
100
|
+
*/
|
|
101
|
+
getMethodMatches?(typeName: string, methodName: string, language: Language): Node[];
|
|
73
102
|
/** Get project root */
|
|
74
103
|
getProjectRoot(): string;
|
|
75
104
|
/** Get all files */
|
|
@@ -26,6 +26,16 @@
|
|
|
26
26
|
export interface WorkspacePackages {
|
|
27
27
|
/** Member package `name` → directory relative to projectRoot (posix). */
|
|
28
28
|
byName: Map<string, string>;
|
|
29
|
+
/**
|
|
30
|
+
* Member package `name` → its declared ENTRY FILE relative to projectRoot
|
|
31
|
+
* (posix), when the member's manifest names one (ohpm's oh-package.json5
|
|
32
|
+
* `"main": "Index.ets"`). Lets a bare `import { X } from "data"` resolve to
|
|
33
|
+
* the member's real barrel even when it doesn't follow an index-file
|
|
34
|
+
* convention — and independent of the CONSUMER's language (a `.ts` file
|
|
35
|
+
* importing an `.ets` barrel resolves without `.ets` in the TS candidate
|
|
36
|
+
* list). Absent for npm/pnpm members (their index conventions cover it).
|
|
37
|
+
*/
|
|
38
|
+
entryByName?: Map<string, string>;
|
|
29
39
|
}
|
|
30
40
|
/**
|
|
31
41
|
* Load workspace member packages for `projectRoot`. Returns `null` when
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifier-segment utilities for the prompt hook's graph-derived gate
|
|
3
|
+
* (name_segment_vocab): symbol names split into the words a human would use
|
|
4
|
+
* for them in prose, and prompt prose normalized into candidate words to look
|
|
5
|
+
* those segments up with.
|
|
6
|
+
*
|
|
7
|
+
* "OrderStateMachine" → order / state / machine — so the French prompt
|
|
8
|
+
* "comment marche la state machine des commandes ?" (or any language's prose
|
|
9
|
+
* naming the concept in Latin script) can be verified against the graph
|
|
10
|
+
* without a keyword list ever knowing the words. The FTS index can't serve
|
|
11
|
+
* this — its tokenizer keeps camelCase names as single tokens — which is why
|
|
12
|
+
* segments are materialized at index time instead (see schema.sql,
|
|
13
|
+
* name_segment_vocab).
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Split a symbol or file name into lowercase word segments.
|
|
17
|
+
*
|
|
18
|
+
* Handles camelCase / PascalCase (inner lower→Upper), acronym runs
|
|
19
|
+
* ("HTMLParser" → html/parser), snake_case / kebab-case / dotted file names
|
|
20
|
+
* (non-alphanumerics separate), and keeps digits glued to their word
|
|
21
|
+
* ("base64Encode" → base64/encode). Digit-only fragments are dropped.
|
|
22
|
+
*/
|
|
23
|
+
export declare function splitIdentifierSegments(name: string): string[];
|
|
24
|
+
/**
|
|
25
|
+
* Normalize a prose word for segment lookup: lowercase + strip diacritics
|
|
26
|
+
* (NFD, drop combining marks), so "références" matches the segment
|
|
27
|
+
* "references" and "résolution" matches "resolution". Identifier segments are
|
|
28
|
+
* overwhelmingly ASCII, so this is what buys Latin-script languages their
|
|
29
|
+
* cross-lingual reach on loanwords.
|
|
30
|
+
*/
|
|
31
|
+
export declare function normalizeProseWord(word: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Candidate words from a prompt for segment-vocabulary lookup, in order of
|
|
34
|
+
* appearance: Unicode letter/digit runs, normalized via
|
|
35
|
+
* {@link normalizeProseWord}, length-bounded, digit-only dropped,
|
|
36
|
+
* {@link ENGLISH_PROSE_STOPWORDS} dropped, deduped, capped. Everything that
|
|
37
|
+
* survives is judged per-repo by the rarity and co-occurrence rules in
|
|
38
|
+
* CodeGraph.getSegmentMatches — there is no domain-word list.
|
|
39
|
+
*/
|
|
40
|
+
export declare function extractProseCandidates(prompt: string): string[];
|
|
41
|
+
/**
|
|
42
|
+
* Lookup variants for a prose word: the word itself plus light plural folding
|
|
43
|
+
* ("services" → service, "dependencies" → dependencie/dependency is NOT
|
|
44
|
+
* attempted — only a trailing s/es strip), so common plurals still hit their
|
|
45
|
+
* singular segment. Returned variants map back to the same original word.
|
|
46
|
+
*
|
|
47
|
+
* The strips are keyed on English plural spelling (#1145), in three classes:
|
|
48
|
+
* - UNAMBIGUOUS `-es` (after x/sh/ss/zz: boxes, hashes, classes, quizzes) —
|
|
49
|
+
* strip 2 only. Stripping 1 minted a bogus sibling ("classes" → classe).
|
|
50
|
+
* - AMBIGUOUS endings (`-ches`/`-ses`/`-zes`/`-oes`): spelling alone can't
|
|
51
|
+
* split patches(+es) from caches(+s), lenses from databases, heroes from
|
|
52
|
+
* shoes — emit BOTH candidate keys and let the vocab lookup decide; a miss
|
|
53
|
+
* is an ignored key, a wrong exclusive guess would LOSE the real match.
|
|
54
|
+
* - Everything else ending in `-s` — a bare `-s` plural (services, machines,
|
|
55
|
+
* cookies): strip 1 only. Stripping 2 minted "services" → servic.
|
|
56
|
+
* A trailing `-ss` is a singular (class, process), not a plural: no strip —
|
|
57
|
+
* that used to mint "class" → clas.
|
|
58
|
+
*/
|
|
59
|
+
export declare function segmentLookupVariants(word: string): string[];
|
|
60
|
+
//# sourceMappingURL=identifier-segments.d.ts.map
|
package/dist/sync/watcher.d.ts
CHANGED
|
@@ -63,8 +63,9 @@ export interface WatchOptions {
|
|
|
63
63
|
onSyncError?: (error: Error) => void;
|
|
64
64
|
/**
|
|
65
65
|
* Callback fired ONCE when live watching degrades permanently and auto-sync
|
|
66
|
-
* is disabled — OS watch-resource exhaustion (EMFILE/ENFILE),
|
|
67
|
-
* held past the retry budget
|
|
66
|
+
* is disabled — OS watch-resource exhaustion (EMFILE/ENFILE), a write lock
|
|
67
|
+
* held past the retry budget, or a generic sync failure that persists past
|
|
68
|
+
* the retry budget (#1127). The string is an actionable, human-readable
|
|
68
69
|
* reason. Lets a host (MCP server, daemon, CLI) tell the user that the index
|
|
69
70
|
* will no longer auto-update instead of silently serving stale results.
|
|
70
71
|
*/
|
|
@@ -139,12 +140,15 @@ export declare class FileWatcher {
|
|
|
139
140
|
private inotifyLimitWarned;
|
|
140
141
|
/**
|
|
141
142
|
* One-way latch: the reason live watching was permanently disabled at runtime
|
|
142
|
-
* (watch-resource exhaustion,
|
|
143
|
-
*
|
|
143
|
+
* (watch-resource exhaustion, lock contention past the retry budget, or a
|
|
144
|
+
* persistent generic sync failure past the retry budget), or null while
|
|
145
|
+
* healthy. Set by {@link degrade}; cleared only by a fresh start().
|
|
144
146
|
*/
|
|
145
147
|
private degradedReason;
|
|
146
148
|
/** Consecutive lock-contention retries for watcher-triggered syncs. */
|
|
147
149
|
private lockRetryCount;
|
|
150
|
+
/** Consecutive generic (non-lock) sync failures; reset only by a clean sync. */
|
|
151
|
+
private syncFailureRetryCount;
|
|
148
152
|
/** Test-only inert mode: started, but with no OS watcher installed. */
|
|
149
153
|
private inert;
|
|
150
154
|
private debounceTimer;
|
|
@@ -256,7 +260,8 @@ export declare class FileWatcher {
|
|
|
256
260
|
private shouldIgnoreDir;
|
|
257
261
|
/**
|
|
258
262
|
* Permanently disable live watching after a terminal runtime failure
|
|
259
|
-
* (watch-resource exhaustion,
|
|
263
|
+
* (watch-resource exhaustion, lock contention past the retry budget, or a
|
|
264
|
+
* persistent generic sync failure past the retry budget).
|
|
260
265
|
* Idempotent: logs one actionable warning, fires {@link WatchOptions.onDegraded}
|
|
261
266
|
* once, and stops the watcher. A subsequent start() clears the latch.
|
|
262
267
|
*/
|
package/dist/sync/worktree.d.ts
CHANGED
|
@@ -25,6 +25,15 @@
|
|
|
25
25
|
* is exactly the distinction this module relies on.
|
|
26
26
|
*/
|
|
27
27
|
export declare function gitWorktreeRoot(dir: string): string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Absolute, symlink-resolved git **common** directory for `dir` — the shared
|
|
30
|
+
* `.git` that all worktrees of one repository point at. Linked worktrees of the
|
|
31
|
+
* same repo report the SAME common dir; a submodule or an embedded clone is a
|
|
32
|
+
* DIFFERENT repository and reports its own (`…/.git/modules/<name>` or its own
|
|
33
|
+
* `.git`). That distinction is what separates a genuine "borrowed worktree"
|
|
34
|
+
* from a nested repo the parent index already covers. Null when not a repo.
|
|
35
|
+
*/
|
|
36
|
+
export declare function gitCommonDir(dir: string): string | null;
|
|
28
37
|
export interface WorktreeIndexMismatch {
|
|
29
38
|
/** The git working tree the command was run from. */
|
|
30
39
|
worktreeRoot: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type EdgeKind = 'contains' | 'calls' | 'imports' | 'exports' | 'extends'
|
|
|
20
20
|
* Supported programming languages. See NODE_KINDS for why this is a
|
|
21
21
|
* runtime-iterable const array.
|
|
22
22
|
*/
|
|
23
|
-
export declare const LANGUAGES: readonly ["typescript", "javascript", "tsx", "jsx", "python", "go", "rust", "java", "c", "cpp", "csharp", "razor", "php", "ruby", "swift", "kotlin", "dart", "svelte", "vue", "astro", "liquid", "pascal", "scala", "lua", "luau", "objc", "r", "vba", "sql", "yaml", "twig", "xml", "properties", "unknown"];
|
|
23
|
+
export declare const LANGUAGES: readonly ["typescript", "javascript", "tsx", "jsx", "arkts", "python", "go", "rust", "java", "c", "cpp", "csharp", "razor", "php", "ruby", "swift", "kotlin", "dart", "svelte", "vue", "astro", "liquid", "pascal", "scala", "lua", "luau", "objc", "r", "vba", "sql", "solidity", "nix", "yaml", "twig", "xml", "properties", "cfml", "cfscript", "cfquery", "cobol", "vbnet", "erlang", "terraform", "unknown"];
|
|
24
24
|
export type Language = (typeof LANGUAGES)[number];
|
|
25
25
|
/**
|
|
26
26
|
* A node in the knowledge graph representing a code symbol
|
|
@@ -261,11 +261,34 @@ export interface SearchOptions {
|
|
|
261
261
|
export interface SearchResult {
|
|
262
262
|
/** Matching node */
|
|
263
263
|
node: Node;
|
|
264
|
-
/**
|
|
264
|
+
/**
|
|
265
|
+
* Relevance score for relative ranking only — higher is more relevant.
|
|
266
|
+
* NOT normalized and NOT a 0-1 fraction: the FTS path returns an unbounded
|
|
267
|
+
* BM25 magnitude (often in the tens or hundreds), while the fuzzy/exact
|
|
268
|
+
* paths return ~0-1. Use it to order results, not as an absolute percentage.
|
|
269
|
+
*/
|
|
265
270
|
score: number;
|
|
266
271
|
/** Matched text snippets for highlighting */
|
|
267
272
|
highlights?: string[];
|
|
268
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* A symbol whose name-segments match prose words from a prompt — the
|
|
276
|
+
* graph-derived signal behind the front-load hook's medium tier
|
|
277
|
+
* (CodeGraph.getSegmentMatches). Always verified to exist in `nodes` at the
|
|
278
|
+
* time it is returned.
|
|
279
|
+
*/
|
|
280
|
+
export interface SegmentMatch {
|
|
281
|
+
/** Symbol name as indexed (e.g. `OrderStateMachine`). */
|
|
282
|
+
name: string;
|
|
283
|
+
/** Kind of the representative definition. */
|
|
284
|
+
kind: NodeKind;
|
|
285
|
+
/** File of the representative definition. */
|
|
286
|
+
filePath: string;
|
|
287
|
+
/** 1-based start line of the representative definition. */
|
|
288
|
+
startLine: number;
|
|
289
|
+
/** The prompt words (normalized) that matched this name's segments. */
|
|
290
|
+
matchedWords: string[];
|
|
291
|
+
}
|
|
269
292
|
/**
|
|
270
293
|
* Context information for code understanding
|
|
271
294
|
*/
|
package/dist/upgrade/index.d.ts
CHANGED
|
@@ -106,6 +106,11 @@ export interface UpgradeDeps {
|
|
|
106
106
|
resolveLatest: (pin?: string) => Promise<string>;
|
|
107
107
|
/** Run a command inheriting stdio; returns its exit code (-1 = spawn failed). */
|
|
108
108
|
run: (cmd: string, args: string[], env?: NodeJS.ProcessEnv) => number;
|
|
109
|
+
/** Run a command capturing stdout (nothing reaches the terminal); null = spawn failed. */
|
|
110
|
+
capture: (cmd: string, args: string[]) => {
|
|
111
|
+
code: number;
|
|
112
|
+
stdout: string;
|
|
113
|
+
} | null;
|
|
109
114
|
hasCommand: (cmd: string) => boolean;
|
|
110
115
|
log: (msg: string) => void;
|
|
111
116
|
warn: (msg: string) => void;
|
|
@@ -118,8 +123,30 @@ export declare function reindexAdvisory(): string;
|
|
|
118
123
|
* Returns the process exit code (0 = success / nothing to do, 1 = failure).
|
|
119
124
|
*/
|
|
120
125
|
export declare function runUpgrade(opts: UpgradeOptions, deps: UpgradeDeps): Promise<number>;
|
|
126
|
+
type VersionProbe = 'match' | 'mismatch' | 'inconclusive';
|
|
127
|
+
/**
|
|
128
|
+
* Prove the upgrade actually took: spawn the `codegraph` this terminal's PATH
|
|
129
|
+
* resolves and compare its reported version to the target. Catches the silent
|
|
130
|
+
* failure mode where ANOTHER install shadows the one we just upgraded (issue
|
|
131
|
+
* #1071 — e.g. a stale `npm i -g` copy earlier on PATH than the bundle
|
|
132
|
+
* launcher): the upgrade "succeeds" but `codegraph -v` — in this terminal and
|
|
133
|
+
* every future one — keeps serving the old version. Exported for unit tests.
|
|
134
|
+
*/
|
|
135
|
+
export declare function verifyResolvedVersion(latest: string, deps: UpgradeDeps): VersionProbe;
|
|
121
136
|
/** Build the in-place Windows upgrade script (exported for unit-testing). */
|
|
122
137
|
export declare function buildWindowsUpgradeScript(bundleRoot: string, version: string, arch: string): string;
|
|
138
|
+
/**
|
|
139
|
+
* How to invoke npm. On Windows npm is a .cmd batch file, which Node refuses
|
|
140
|
+
* to spawn without a shell (EINVAL since the CVE-2024-27980 hardening) — a
|
|
141
|
+
* direct `npm.cmd` spawn fails on every current Node, so route it through
|
|
142
|
+
* cmd.exe, the same way the surface-refresh step invokes the .cmd launcher.
|
|
143
|
+
* (Verified live on the Windows VM: `spawnSync('npm.cmd')` → EINVAL;
|
|
144
|
+
* `cmd.exe /d /s /c npm …` → works.)
|
|
145
|
+
*/
|
|
146
|
+
export declare function npmInvocation(platform: NodeJS.Platform, npmArgs: string[]): {
|
|
147
|
+
cmd: string;
|
|
148
|
+
args: string[];
|
|
149
|
+
};
|
|
123
150
|
/**
|
|
124
151
|
* True if `cmd` resolves to an executable on PATH. A pure-Node PATH scan — NOT
|
|
125
152
|
* a spawned `command -v`/`which`: `command` is a shell builtin (no standalone
|
|
@@ -129,4 +156,9 @@ export declare function buildWindowsUpgradeScript(bundleRoot: string, version: s
|
|
|
129
156
|
*/
|
|
130
157
|
export declare function hasCommand(cmd: string): boolean;
|
|
131
158
|
export declare function defaultRun(cmd: string, args: string[], env?: NodeJS.ProcessEnv): number;
|
|
159
|
+
export declare function defaultCapture(cmd: string, args: string[]): {
|
|
160
|
+
code: number;
|
|
161
|
+
stdout: string;
|
|
162
|
+
} | null;
|
|
163
|
+
export {};
|
|
132
164
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI binary removal for `codegraph uninstall` (the #1071 shadow, uninstall
|
|
3
|
+
* edition).
|
|
4
|
+
*
|
|
5
|
+
* Before this module, three disconnected paths each removed PART of an
|
|
6
|
+
* installation and none removed it all: `codegraph uninstall` swept agent
|
|
7
|
+
* configs only, `install.sh --uninstall` deleted the bundle only, and npm's
|
|
8
|
+
* `preuninstall` hook cleaned configs when npm removed its own package. A
|
|
9
|
+
* user with more than one install method (the common drift: npm first, the
|
|
10
|
+
* bundle later — or vice versa) ran `codegraph uninstall` and still had a
|
|
11
|
+
* working `codegraph` on PATH.
|
|
12
|
+
*
|
|
13
|
+
* This module makes `codegraph uninstall` complete: PLAN every binary
|
|
14
|
+
* install present on the machine (bundle layout(s), the npm global package,
|
|
15
|
+
* the bin-dir shim), then EXECUTE the removals. Split planner/executor with
|
|
16
|
+
* injected side effects, same convention as the upgrade orchestrator.
|
|
17
|
+
*
|
|
18
|
+
* Safety rules:
|
|
19
|
+
* - A source checkout is REPORTED, never deleted — a git repo is the
|
|
20
|
+
* user's working tree, not an "install".
|
|
21
|
+
* - A project-local npm install is left alone — the project's
|
|
22
|
+
* package.json owns it, not the machine-level uninstaller.
|
|
23
|
+
* - On unix the default install dir (`~/.codegraph`) doubles as the
|
|
24
|
+
* machine-level state dir (telemetry choice, daemon records, the
|
|
25
|
+
* update-check cache) — only the install ARTIFACTS (`versions/`,
|
|
26
|
+
* `current`) are removed there, never the whole dir. A dedicated
|
|
27
|
+
* install dir (Windows `%LOCALAPPDATA%\codegraph`, or a custom
|
|
28
|
+
* `CODEGRAPH_INSTALL_DIR`) is removed wholesale.
|
|
29
|
+
* - The bin-dir shim is removed only when it verifiably points into a
|
|
30
|
+
* detected install dir — a user's unrelated `codegraph` file survives.
|
|
31
|
+
* - Windows cannot DELETE a running exe but CAN rename it (the same
|
|
32
|
+
* trick the in-place upgrade uses): a locked `node.exe` is renamed
|
|
33
|
+
* aside and reported as a leftover for the user to delete after the
|
|
34
|
+
* window closes, instead of failing the whole removal.
|
|
35
|
+
*/
|
|
36
|
+
export interface RemoveBinaryProbes {
|
|
37
|
+
/** `__filename` of the running CLI entry (dist/bin/codegraph.js). */
|
|
38
|
+
filename: string;
|
|
39
|
+
platform: NodeJS.Platform;
|
|
40
|
+
cwd: string;
|
|
41
|
+
env: NodeJS.ProcessEnv;
|
|
42
|
+
homedir: string;
|
|
43
|
+
exists: (p: string) => boolean;
|
|
44
|
+
/** Symlink target (raw link text), or null when not a symlink / unreadable. */
|
|
45
|
+
readlink: (p: string) => string | null;
|
|
46
|
+
/** Run a command capturing stdout; null = spawn failed. */
|
|
47
|
+
capture: (cmd: string, args: string[]) => {
|
|
48
|
+
code: number;
|
|
49
|
+
stdout: string;
|
|
50
|
+
} | null;
|
|
51
|
+
}
|
|
52
|
+
export interface BinaryRemovalPlan {
|
|
53
|
+
/** Filesystem paths to delete (bundle dirs / artifacts, shim links). */
|
|
54
|
+
paths: string[];
|
|
55
|
+
/** The npm global package is installed and should be `npm uninstall -g`ed. */
|
|
56
|
+
npmGlobal: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* npm's global node_modules root (for the Windows locked-exe dance — the
|
|
59
|
+
* vendored node.exe lives in the SIBLING per-platform package, so the
|
|
60
|
+
* whole root is the lock surface, not just the meta package's dir).
|
|
61
|
+
*/
|
|
62
|
+
npmRoot: string | null;
|
|
63
|
+
/** Running from a git checkout — surfaced to the user, never deleted. */
|
|
64
|
+
sourceRoot: string | null;
|
|
65
|
+
/** One human line per planned removal, for the confirm prompt. */
|
|
66
|
+
summary: string[];
|
|
67
|
+
}
|
|
68
|
+
export declare function defaultProbes(filename: string): RemoveBinaryProbes;
|
|
69
|
+
export declare function planBinaryRemoval(p: RemoveBinaryProbes): BinaryRemovalPlan;
|
|
70
|
+
export interface RemoveBinaryDeps {
|
|
71
|
+
platform: NodeJS.Platform;
|
|
72
|
+
/** The running node binary — the file Windows will hold a lock on. */
|
|
73
|
+
execPath: string;
|
|
74
|
+
rm: (p: string) => void;
|
|
75
|
+
rename: (from: string, to: string) => void;
|
|
76
|
+
/** Run a command inheriting stdio; returns exit code (-1 = spawn failed). */
|
|
77
|
+
run: (cmd: string, args: string[]) => number;
|
|
78
|
+
}
|
|
79
|
+
export interface BinaryRemovalResult {
|
|
80
|
+
removed: string[];
|
|
81
|
+
/** Paths that could not be (fully) removed — surfaced with manual steps. */
|
|
82
|
+
leftovers: string[];
|
|
83
|
+
npm: 'removed' | 'failed' | 'skipped';
|
|
84
|
+
}
|
|
85
|
+
export declare function defaultRemoveDeps(): RemoveBinaryDeps;
|
|
86
|
+
export declare function executeBinaryRemoval(plan: BinaryRemovalPlan, deps?: RemoveBinaryDeps): BinaryRemovalResult;
|
|
87
|
+
//# sourceMappingURL=remove-binary.d.ts.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Background update-availability check for long-lived servers (#1243).
|
|
3
|
+
*
|
|
4
|
+
* The recommended MCP config launches the LOCAL `codegraph` binary, so the
|
|
5
|
+
* server (and the prompt hook alongside it) silently stays on whatever version
|
|
6
|
+
* was last manually upgraded — users discover the drift only when something
|
|
7
|
+
* breaks. This module gives the running server *visibility* without changing
|
|
8
|
+
* behavior: a non-blocking check against the latest GitHub release, surfaced
|
|
9
|
+
* as a one-line notice (stderr log, MCP initialize instructions, and
|
|
10
|
+
* `codegraph_status`) telling the user to run `codegraph upgrade`.
|
|
11
|
+
*
|
|
12
|
+
* Invariants (mirrors the telemetry module's contract):
|
|
13
|
+
* - Never stdout — stdio is the MCP protocol channel.
|
|
14
|
+
* - Never blocking: the network refresh is fire-and-forget; every reader
|
|
15
|
+
* (`getUpdateNotice`) is a cheap synchronous cache read, so the #172
|
|
16
|
+
* respond-fast handshake contract holds.
|
|
17
|
+
* - Fail silent: offline / rate-limited / disk-full all degrade to "no
|
|
18
|
+
* notice", never an error, never a retry loop.
|
|
19
|
+
* - Off is off: `CODEGRAPH_NO_UPDATE_CHECK` (dedicated) or `DO_NOT_TRACK`
|
|
20
|
+
* (broad don't-phone-home convention — set by e.g. the Pro container's
|
|
21
|
+
* data plane) suppresses the network call AND the notice entirely.
|
|
22
|
+
*
|
|
23
|
+
* The check itself reuses `resolveLatestVersion` — the GitHub release-redirect
|
|
24
|
+
* trick with the API fallback — so version resolution can't drift from what
|
|
25
|
+
* `codegraph upgrade` installs. Results are cached in `~/.codegraph/` (the
|
|
26
|
+
* same global state dir telemetry and the daemon registry use) with a 24h TTL
|
|
27
|
+
* on success and a 1h backoff after failure, shared across every proxy /
|
|
28
|
+
* daemon process on the machine.
|
|
29
|
+
*/
|
|
30
|
+
/** Re-check the release feed after this long (successful checks). */
|
|
31
|
+
export declare const UPDATE_CHECK_TTL_MS: number;
|
|
32
|
+
/** Back off this long after a failed check (offline, rate-limited). */
|
|
33
|
+
export declare const UPDATE_CHECK_FAILURE_BACKOFF_MS: number;
|
|
34
|
+
export interface UpdateCheckCacheFile {
|
|
35
|
+
/** Last time a network check was attempted (ms epoch). */
|
|
36
|
+
lastAttemptAt: number;
|
|
37
|
+
/** Last time a network check succeeded (ms epoch). */
|
|
38
|
+
lastSuccessAt?: number;
|
|
39
|
+
/** Latest release tag from the last successful check (e.g. `v1.4.1`). */
|
|
40
|
+
latest?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface UpdateCheckDeps {
|
|
43
|
+
/** Global state dir; defaults to ~/.codegraph. Tests inject a temp dir. */
|
|
44
|
+
dir?: string;
|
|
45
|
+
env?: NodeJS.ProcessEnv;
|
|
46
|
+
now?: () => number;
|
|
47
|
+
resolveLatest?: () => Promise<string>;
|
|
48
|
+
currentVersion?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* True when the update check must not run at all — no network call, no
|
|
52
|
+
* notice. `DO_NOT_TRACK` uses the same truthiness the telemetry opt-out does.
|
|
53
|
+
*/
|
|
54
|
+
export declare function updateCheckDisabled(env?: NodeJS.ProcessEnv): boolean;
|
|
55
|
+
export declare function updateCheckCachePath(dir: string): string;
|
|
56
|
+
export declare function readUpdateCheckCache(dir: string): UpdateCheckCacheFile | null;
|
|
57
|
+
/**
|
|
58
|
+
* Rebuild a canonical `vX.Y.Z[-pre]` tag from the PARSED semver fields, or
|
|
59
|
+
* null when the input isn't version-shaped. The notice ends up inside the MCP
|
|
60
|
+
* initialize instructions — agent-visible, system-prompt-adjacent text — and
|
|
61
|
+
* the `latest` value arrives from a network redirect via an on-disk cache, so
|
|
62
|
+
* only a reconstructed canonical string may ever be interpolated, never the
|
|
63
|
+
* raw value. (`parseSemver`'s regex is not end-anchored: a value like
|
|
64
|
+
* `1.2.3-x <arbitrary text>` parses "valid" while the raw string would carry
|
|
65
|
+
* the trailing text straight into every session's instructions.)
|
|
66
|
+
*/
|
|
67
|
+
export declare function canonicalVersionTag(v: string): string | null;
|
|
68
|
+
/** One user-facing sentence; every surface (stderr, instructions, status) shows this. */
|
|
69
|
+
export declare function formatUpdateNotice(current: string, latest: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Ensure the on-disk cache is fresh (hitting the network only past the TTL /
|
|
72
|
+
* backoff) and return the current notice, or null. Never throws.
|
|
73
|
+
*/
|
|
74
|
+
export declare function refreshUpdateCheck(deps?: UpdateCheckDeps): Promise<string | null>;
|
|
75
|
+
/**
|
|
76
|
+
* The current update notice from the on-disk cache — synchronous and cheap
|
|
77
|
+
* (memoized disk read), safe on the initialize respond-fast path. When the
|
|
78
|
+
* cache has gone stale (e.g. a daemon that has been up for weeks), kicks a
|
|
79
|
+
* background refresh so the NEXT reader sees a current answer; this call
|
|
80
|
+
* still returns immediately from the stale cache.
|
|
81
|
+
*/
|
|
82
|
+
export declare function getUpdateNotice(deps?: UpdateCheckDeps): string | null;
|
|
83
|
+
/** Test hook: clear the per-process memo. */
|
|
84
|
+
export declare function resetUpdateNoticeMemo(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Fire-and-forget entry point for server startup: refresh the cache in the
|
|
87
|
+
* background and, if an update is available, emit ONE stderr line (stderr is
|
|
88
|
+
* the MCP-safe channel; hosts surface it in their server logs). Never throws,
|
|
89
|
+
* never blocks, never writes stdout.
|
|
90
|
+
*/
|
|
91
|
+
export declare function checkForUpdateInBackground(deps?: UpdateCheckDeps, log?: (line: string) => void): void;
|
|
92
|
+
//# sourceMappingURL=update-check.d.ts.map
|