@herjarsa/omo-meta-governor 0.24.7 → 0.26.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.
@@ -237,4 +237,55 @@ export declare function buildOmoExplainTool(deps: OmoExplainDeps): {
237
237
  concept: string;
238
238
  }, context: ToolContext): Promise<ToolResult>;
239
239
  };
240
+ export interface OmoFilesDeps {
241
+ /** Optional pre-configured GraphRetrieval. Defaults to getDefaultGraphRetrieval(). */
242
+ graphRetrieval?: GraphRetrieval;
243
+ cwd: string;
244
+ }
245
+ /**
246
+ * Build the `omo_files` tool. Lists files indexed by codegraph or graphify.
247
+ * Uses `codegraph files --project-path <cwd>` (falls back to graphify's
248
+ * graphify-out/wiki/index.md when codegraph is unavailable).
249
+ */
250
+ export declare function buildOmoFilesTool(deps: OmoFilesDeps): {
251
+ description: string;
252
+ args: {};
253
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
254
+ };
255
+ export interface OmoCallersDeps {
256
+ graphRetrieval?: GraphRetrieval;
257
+ cwd: string;
258
+ }
259
+ /**
260
+ * Build the `omo_callers` tool. Lists all call sites of a symbol.
261
+ * Uses `codegraph callers <symbol> --project-path <cwd>`. Returns null
262
+ * when codegraph is unavailable (codegraph-specific subcommand).
263
+ */
264
+ export declare function buildOmoCallersTool(deps: OmoCallersDeps): {
265
+ description: string;
266
+ args: {
267
+ symbol: import("zod").ZodString;
268
+ };
269
+ execute(args: {
270
+ symbol: string;
271
+ }, context: ToolContext): Promise<ToolResult>;
272
+ };
273
+ export interface OmoNodeDeps {
274
+ graphRetrieval?: GraphRetrieval;
275
+ cwd: string;
276
+ }
277
+ /**
278
+ * Build the `omo_node` tool. Returns the source code of a symbol and its
279
+ * direct callers. Uses `codegraph node <symbol> --project-path <cwd>`.
280
+ * Returns null when codegraph is unavailable.
281
+ */
282
+ export declare function buildOmoNodeTool(deps: OmoNodeDeps): {
283
+ description: string;
284
+ args: {
285
+ symbol: import("zod").ZodString;
286
+ };
287
+ execute(args: {
288
+ symbol: string;
289
+ }, context: ToolContext): Promise<ToolResult>;
290
+ };
240
291
  export {};
@@ -36,9 +36,13 @@ export interface GraphSyncConfig {
36
36
  autoUpgrade?: boolean;
37
37
  /** v0.12.0: Min ms between registry queries for version check. Default 24h. */
38
38
  upgradeCheckTtlMs?: number;
39
+ /** v0.26.0: Override the upgrade cache file path (default ~/.config/opencode/omo-meta-governor-upgrade-check.json). Tests use this. */
40
+ upgradeCachePath?: string;
41
+ /** v0.26.0: also call `graphify check-update` on plugin load and trigger re-extraction when the semantic-update flag is set. Default true. */
42
+ checkGraphifyNeedsUpdate?: boolean;
39
43
  /** v0.21.0: test-only DI seam — replaces execSync so availability probes
40
- * never spawn real npx/pip/graphify in hermetic tests (CI Windows: the
41
- * npx download + 4 fallbacks exceeded the 30s test timeout). */
44
+ * never spawn real npx/pip/graphify in hermetic tests (CI Windows: the
45
+ * npx download + 4 fallbacks exceeded the 30s test timeout). */
42
46
  runner?: typeof execSync;
43
47
  /** v0.22.0: when true, graph-sync init sweeps orphaned graphify/codegraph
44
48
  * processes left by previous crashed runs. Default true. */
@@ -49,13 +53,13 @@ export type InstallCode = "codegraph-installed" | "codegraph-install-failed" | "
49
53
  * Install codegraph via `npm i -D @colbymchenry/codegraph`.
50
54
  * Best-effort, never throws.
51
55
  */
52
- export declare function installCodegraph(projectDir: string, timeoutMs?: number): Promise<InstallCode>;
56
+ export declare function installCodegraph(projectDir: string, timeoutMs?: number, runner?: typeof execSync): Promise<InstallCode>;
53
57
  /**
54
58
  * Install graphify via `pip install graphifyy --break-system-packages`.
55
59
  * Falls back to `uv tool install graphifyy`.
56
60
  * Best-effort, never throws.
57
61
  */
58
- export declare function installGraphify(timeoutMs?: number): Promise<InstallCode>;
62
+ export declare function installGraphify(timeoutMs?: number, runner?: typeof execSync): Promise<InstallCode>;
59
63
  export declare function resetInitializedProjects(): void;
60
64
  /**
61
65
  * Track a new session for a project. Increments reference count.
@@ -127,7 +131,7 @@ export interface GraphSyncResult {
127
131
  /** Whether this project was already initialized this session */
128
132
  alreadyInitialized: boolean;
129
133
  }
130
- export type GraphSyncCode = "codegraph-initialized" | "codegraph-init-failed" | "codegraph-already-exists" | "codegraph-unavailable" | "codegraph-install-failed" | "codegraph-install-skipped" | "graphify-initialized" | "graphify-init-failed" | "graphify-already-exists" | "graphify-unavailable" | "graphify-install-failed" | "graphify-install-skipped" | "watch-started-codegraph" | "watch-started-graphify" | "disabled" | "error" | "graphify-hook-installed" | "codegraph-upgraded" | "graphify-upgraded" | "upgrade-check-skipped";
134
+ export type GraphSyncCode = "codegraph-initialized" | "codegraph-init-failed" | "codegraph-already-exists" | "codegraph-unavailable" | "codegraph-install-failed" | "codegraph-install-skipped" | "graphify-initialized" | "graphify-init-failed" | "graphify-already-exists" | "graphify-unavailable" | "graphify-install-failed" | "graphify-install-skipped" | "watch-started-codegraph" | "watch-started-graphify" | "disabled" | "error" | "graphify-hook-installed" | "codegraph-upgraded" | "graphify-upgraded" | "upgrade-check-skipped" | "codegraph-upgrade-broken" | "graphify-reextract-triggered" | "upgrade-cache-written";
131
135
  /**
132
136
  * Run the graphSync pipeline. Best-effort, never throws.
133
137
  */
@@ -218,12 +222,12 @@ export declare function fetchGraphifyLatestVersion(runner?: typeof execSync): Pr
218
222
  * v0.12.0: get the installed version of codegraph by running its CLI.
219
223
  * Returns null on failure.
220
224
  */
221
- export declare function getInstalledCodegraphVersion(): Promise<string | null>;
225
+ export declare function getInstalledCodegraphVersion(runner?: typeof execSync): Promise<string | null>;
222
226
  /**
223
227
  * v0.12.0: get the installed version of graphify via pip show.
224
228
  * Returns null on failure.
225
229
  */
226
- export declare function getInstalledGraphifyVersion(): Promise<string | null>;
230
+ export declare function getInstalledGraphifyVersion(runner?: typeof execSync): Promise<string | null>;
227
231
  /**
228
232
  * v0.25.1: count commits the local HEAD is behind origin/&lt;branch&gt;.
229
233
  * Best-effort, never throws — returns 0 on any failure (no git, offline, no remote).