@herjarsa/omo-meta-governor 0.26.3 → 0.27.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/dist/config.d.ts CHANGED
@@ -100,6 +100,10 @@ export interface MetaGovernorPluginConfig {
100
100
  * 'graphify-reextract-triggered' diagnostic code if the schema changed.
101
101
  * Default true. */
102
102
  checkGraphifyNeedsUpdate?: boolean;
103
+ /** v0.27.0: when true, register the project graph in the global graphify
104
+ * registry after initial install (so 'graphify global list' surfaces it).
105
+ * Default false (opt-in — multi-project users want explicit control). */
106
+ addToGlobalGraph?: boolean;
103
107
  };
104
108
  /** Skill priming config (v0.20.0): proactive skill-selection nudge. */
105
109
  skillPriming?: {
@@ -115,6 +119,13 @@ export interface MetaGovernorPluginConfig {
115
119
  */
116
120
  graphRetrieval?: {
117
121
  preferredTool?: "auto" | "codegraph" | "graphify" | "alternate";
122
+ /** v0.27.0: when true, prefer the locally-installed codegraph binary
123
+ * (node_modules/.bin/codegraph) over the npx-resolved one. Default false. */
124
+ preferLocalCodegraph?: boolean;
125
+ /** v0.27.0: route omo_search queries to codegraph `context` instead of
126
+ * `explore`. Default false. context returns a focused code window; explore
127
+ * returns a conceptual explanation. */
128
+ contextRouting?: boolean;
118
129
  };
119
130
  }
120
131
  /**
@@ -288,4 +288,157 @@ export declare function buildOmoNodeTool(deps: OmoNodeDeps): {
288
288
  symbol: string;
289
289
  }, context: ToolContext): Promise<ToolResult>;
290
290
  };
291
+ export interface OmoGraphToolDeps {
292
+ graphRetrieval?: GraphRetrieval;
293
+ cwd: string;
294
+ }
295
+ /** `codegraph context <task>` — task-focused code context window. */
296
+ export declare function buildOmoContextTool(deps: OmoGraphToolDeps): {
297
+ description: string;
298
+ args: {
299
+ task: import("zod").ZodString;
300
+ };
301
+ execute(args: {
302
+ task: string;
303
+ }, context: ToolContext): Promise<ToolResult>;
304
+ };
305
+ /** `codegraph affected <files>` — files affected by changes in the given files. */
306
+ export declare function buildOmoAffectedCgTool(deps: OmoGraphToolDeps): {
307
+ description: string;
308
+ args: {
309
+ files: import("zod").ZodArray<import("zod").ZodString>;
310
+ };
311
+ execute(args: {
312
+ files: string[];
313
+ }, context: ToolContext): Promise<ToolResult>;
314
+ };
315
+ /** `codegraph status` — codegraph health (node count, version, last update). */
316
+ export declare function buildOmoStatusTool(deps: OmoGraphToolDeps): {
317
+ description: string;
318
+ args: {};
319
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
320
+ };
321
+ /** `codegraph unlock` — remove stale lock file. */
322
+ export declare function buildOmoUnlockTool(deps: OmoGraphToolDeps): {
323
+ description: string;
324
+ args: {};
325
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
326
+ };
327
+ /** `codegraph mark-dirty` — mark the graph as needing a re-sync. */
328
+ export declare function buildOmoMarkDirtyTool(deps: OmoGraphToolDeps): {
329
+ description: string;
330
+ args: {};
331
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
332
+ };
333
+ /** `codegraph sync-if-dirty` — sync only if the graph was marked dirty. */
334
+ export declare function buildOmoSyncIfDirtyTool(deps: OmoGraphToolDeps): {
335
+ description: string;
336
+ args: {};
337
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
338
+ };
339
+ /** `codegraph index` — manual full index trigger. */
340
+ export declare function buildOmoIndexTool(deps: OmoGraphToolDeps): {
341
+ description: string;
342
+ args: {};
343
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
344
+ };
345
+ /** `codegraph visualize` — generate visualization HTML. */
346
+ export declare function buildOmoVisualizeTool(deps: OmoGraphToolDeps): {
347
+ description: string;
348
+ args: {};
349
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
350
+ };
351
+ /** `codegraph serve --port <n>` — start the codegraph server. */
352
+ export declare function buildOmoServeTool(deps: OmoGraphToolDeps): {
353
+ description: string;
354
+ args: {
355
+ port: import("zod").ZodNumber;
356
+ };
357
+ execute(args: {
358
+ port: number;
359
+ }, context: ToolContext): Promise<ToolResult>;
360
+ };
361
+ /** `codegraph uninit` — remove the codegraph index from disk. */
362
+ export declare function buildOmoUninitTool(deps: OmoGraphToolDeps): {
363
+ description: string;
364
+ args: {};
365
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
366
+ };
367
+ /** `graphify diagnose` — find multigraph warnings and inconsistencies. */
368
+ export declare function buildOmoDiagnoseTool(deps: OmoGraphToolDeps): {
369
+ description: string;
370
+ args: {};
371
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
372
+ };
373
+ /** `graphify merge-driver` — 3-way merge of conflicting graph segments. */
374
+ export declare function buildOmoMergeGraphsTool(deps: OmoGraphToolDeps): {
375
+ description: string;
376
+ args: {};
377
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
378
+ };
379
+ /** `graphify save-result` — persist the last query result. */
380
+ export declare function buildOmoSaveResultTool(deps: OmoGraphToolDeps): {
381
+ description: string;
382
+ args: {};
383
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
384
+ };
385
+ /** `graphify extract` — re-run semantic extraction over the source tree. */
386
+ export declare function buildOmoExtractTool(deps: OmoGraphToolDeps): {
387
+ description: string;
388
+ args: {};
389
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
390
+ };
391
+ /** `graphify cluster-only` — re-run clustering only. */
392
+ export declare function buildOmoClusterOnlyTool(deps: OmoGraphToolDeps): {
393
+ description: string;
394
+ args: {};
395
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
396
+ };
397
+ /** `graphify label <node>` — apply a label to a node. */
398
+ export declare function buildOmoLabelTool(deps: OmoGraphToolDeps): {
399
+ description: string;
400
+ args: {
401
+ node: import("zod").ZodString;
402
+ };
403
+ execute(args: {
404
+ node: string;
405
+ }, context: ToolContext): Promise<ToolResult>;
406
+ };
407
+ /** `graphify tree` — emit a tree visualization. */
408
+ export declare function buildOmoTreeTool(deps: OmoGraphToolDeps): {
409
+ description: string;
410
+ args: {};
411
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
412
+ };
413
+ /** `graphify clone` — clone the graph to a new path. */
414
+ export declare function buildOmoCloneTool(deps: OmoGraphToolDeps): {
415
+ description: string;
416
+ args: {};
417
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
418
+ };
419
+ /** `graphify add <files>` — add specific files to the graph. */
420
+ export declare function buildOmoAddTool(deps: OmoGraphToolDeps): {
421
+ description: string;
422
+ args: {
423
+ files: import("zod").ZodString;
424
+ };
425
+ execute(args: {
426
+ files: string;
427
+ }, context: ToolContext): Promise<ToolResult>;
428
+ };
429
+ /** `graphify check-update` — check if schema or extractors changed. */
430
+ export declare function buildOmoCheckUpdateTool(deps: OmoGraphToolDeps): {
431
+ description: string;
432
+ args: {};
433
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
434
+ };
435
+ export interface OmoHookStatusDeps {
436
+ cwd: string;
437
+ }
438
+ /** `graphify hook status` — check whether the graphify post-commit hook is installed. */
439
+ export declare function buildOmoHookStatusTool(deps: OmoHookStatusDeps): {
440
+ description: string;
441
+ args: {};
442
+ execute(args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
443
+ };
291
444
  export {};
@@ -138,6 +138,26 @@ export declare class GraphRetrieval {
138
138
  * Runs `codegraph files --project-path <cwd>`.
139
139
  */
140
140
  invokeFiles(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
141
+ /** `codegraph context <task>` — task-focused context window. */
142
+ invokeContext(task: string, projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
143
+ /** `codegraph affected <file...>` — files affected by changes in the given files. */
144
+ invokeAffected(files: string[], projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
145
+ /** `codegraph status` — codegraph health (node count, version, last update). */
146
+ invokeStatus(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
147
+ /** `codegraph unlock` — remove stale lock file. */
148
+ invokeUnlock(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
149
+ /** `codegraph mark-dirty` — mark the graph dirty. */
150
+ invokeMarkDirty(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
151
+ /** `codegraph sync-if-dirty` — sync if the graph was marked dirty. */
152
+ invokeSyncIfDirty(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
153
+ /** `codegraph index` — manual full index trigger. */
154
+ invokeIndex(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
155
+ /** `codegraph visualize` — generate visualization HTML. */
156
+ invokeVisualize(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
157
+ /** `codegraph serve --port <n>` — start the codegraph server. */
158
+ invokeServe(port: number, projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
159
+ /** `codegraph uninit` — remove the codegraph index from disk. */
160
+ invokeUninit(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
141
161
  /**
142
162
  * Run a codegraph sub-command and return the result.
143
163
  * Returns null result if codegraph is not available.
@@ -156,6 +176,26 @@ export declare class GraphRetrieval {
156
176
  */
157
177
  invokeExplain(concept: string, projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
158
178
  private invokeGraphifySubcommand;
179
+ /** `graphify diagnose` — find multigraph warnings and inconsistencies. */
180
+ invokeDiagnose(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
181
+ /** `graphify merge-driver` — 3-way merge of conflicting graph segments. */
182
+ invokeMergeDriver(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
183
+ /** `graphify save-result` — persist the last query result. */
184
+ invokeSaveResult(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
185
+ /** `graphify extract` — re-run semantic extraction over the source tree. */
186
+ invokeExtract(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
187
+ /** `graphify cluster-only` — re-run clustering only (skip extraction). */
188
+ invokeClusterOnly(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
189
+ /** `graphify label <node>` — apply a label to a node. */
190
+ invokeLabel(node: string, projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
191
+ /** `graphify tree` — emit a tree visualization. */
192
+ invokeTree(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
193
+ /** `graphify clone` — clone the graph to a new path. */
194
+ invokeClone(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
195
+ /** `graphify add <files>` — add specific files to the graph. */
196
+ invokeAdd(files: string, projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
197
+ /** `graphify check-update` — check if schema or extractors changed. */
198
+ invokeCheckUpdate(projectDir: string, options?: InvokeOptions): Promise<GraphInvocationResult>;
159
199
  }
160
200
  /** Returns the process-wide singleton, creating it on first use. */
161
201
  export declare function getDefaultGraphRetrieval(): GraphRetrieval;
@@ -40,6 +40,9 @@ export interface GraphSyncConfig {
40
40
  upgradeCachePath?: string;
41
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
42
  checkGraphifyNeedsUpdate?: boolean;
43
+ /** v0.27.0: opt-in. Register the project graph in the global graphify
44
+ * registry after initial install so 'graphify global list' surfaces it. */
45
+ addToGlobalGraph?: boolean;
43
46
  /** v0.21.0: test-only DI seam — replaces execSync so availability probes
44
47
  * never spawn real npx/pip/graphify in hermetic tests (CI Windows: the
45
48
  * npx download + 4 fallbacks exceeded the 30s test timeout). */
@@ -131,7 +134,7 @@ export interface GraphSyncResult {
131
134
  /** Whether this project was already initialized this session */
132
135
  alreadyInitialized: boolean;
133
136
  }
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";
137
+ 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" | "graphify-added-to-global" | "graphify-global-add-failed";
135
138
  /**
136
139
  * Run the graphSync pipeline. Best-effort, never throws.
137
140
  */