@herjarsa/omo-meta-governor 0.31.0 → 0.31.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 +2 -0
- package/dist/graph-retrieval.d.ts +29 -0
- package/dist/index.js +65 -65
- package/dist/index.js.map +6 -6
- package/dist/lib.js +65 -65
- package/dist/lib.js.map +6 -6
- package/dist/mcp-server.d.ts +29 -0
- package/dist/mcp-server.js +209 -0
- package/dist/mcp-server.js.map +242 -0
- package/dist/mcp-tools.d.ts +35 -0
- package/package.json +49 -49
package/README.md
CHANGED
|
@@ -549,6 +549,8 @@ All configuration lives under the `meta_governor` key in
|
|
|
549
549
|
| `maxInterventionsPerSession` | integer | `3` | v0.10.0: hard cap before auto-disable. |
|
|
550
550
|
| `respectDoneSignal` | boolean | `true` | Stop injecting once terminal signal + Oracle verified. |
|
|
551
551
|
| `phaseAwareDoneSignal` | boolean | `false` | v0.15.0: split per-phase hint from terminal signal. |
|
|
552
|
+
| `compactionLoopGuard.enabled` | boolean | `false` | v0.31.1: opt-in defense against opencode [#27924](https://github.com/anomalyco/opencode/issues/27924) (infinite overflow-compaction loop). |
|
|
553
|
+
| `compactionLoopGuard.maxOverflowRecoveries` | integer | `2` | v0.31.1: consecutive overflow compactions tolerated before the guard trips. |
|
|
552
554
|
|
|
553
555
|
### `protocolEnforcement`
|
|
554
556
|
|
|
@@ -62,6 +62,10 @@ export interface GraphRetrievalConfig {
|
|
|
62
62
|
maxEntriesPerSession?: number;
|
|
63
63
|
/** v0.25.0: explicit codegraph/graphify routing. Default "auto". */
|
|
64
64
|
preferredTool?: GraphToolPreference;
|
|
65
|
+
/** v0.30.0: MCP call timeout in ms. Default: 5000. */
|
|
66
|
+
mcpTimeoutMs?: number;
|
|
67
|
+
/** v0.30.0: prefer a specific MCP server. Default "auto". */
|
|
68
|
+
preferredMcpServer?: "auto" | "codegraph" | "graphify";
|
|
65
69
|
}
|
|
66
70
|
export interface InvokeOptions {
|
|
67
71
|
/** Override codegraph CLI path (default: lookup in PATH). */
|
|
@@ -74,6 +78,10 @@ export interface InvokeOptions {
|
|
|
74
78
|
projectDir?: string;
|
|
75
79
|
/** v0.25.0: per-call routing override. Default: instance preference. */
|
|
76
80
|
preferredTool?: GraphToolPreference;
|
|
81
|
+
/** v0.30.0: per-call MCP server override. Default: instance preference. */
|
|
82
|
+
preferredMcpServer?: "auto" | "codegraph" | "graphify";
|
|
83
|
+
/** v0.30.0: skip MCP and go straight to subprocess. */
|
|
84
|
+
forceSubprocess?: boolean;
|
|
77
85
|
}
|
|
78
86
|
/** Deterministic hash for a query string. Used as cache key suffix. */
|
|
79
87
|
export declare function hashQuery(query: string): string;
|
|
@@ -84,6 +92,10 @@ export declare class GraphRetrieval {
|
|
|
84
92
|
private readonly cache;
|
|
85
93
|
/** v0.25.0: routing preference. Mutable — configureDefaultGraphRetrieval updates it. */
|
|
86
94
|
private preferredTool;
|
|
95
|
+
/** v0.30.0: MCP call timeout. */
|
|
96
|
+
private readonly mcpTimeoutMs;
|
|
97
|
+
/** v0.30.0: preferred MCP server routing. */
|
|
98
|
+
private preferredMcpServer;
|
|
87
99
|
constructor(config?: GraphRetrievalConfig);
|
|
88
100
|
/** v0.25.0: runtime routing update (used by configureDefaultGraphRetrieval). */
|
|
89
101
|
setPreferredTool(preference: GraphToolPreference): void;
|
|
@@ -105,6 +117,23 @@ export declare class GraphRetrieval {
|
|
|
105
117
|
getCachedContext(sessionID: string, query?: string): string | null;
|
|
106
118
|
clear(): void;
|
|
107
119
|
clearSession(sessionID: string): void;
|
|
120
|
+
/** Map MCP server name to GraphToolKind. */
|
|
121
|
+
private kindForServer;
|
|
122
|
+
/** Check if a named MCP server is reachable. */
|
|
123
|
+
isMcpServerAvailable(serverName: string, toolName?: string): Promise<boolean>;
|
|
124
|
+
/** Probe both codegraph and graphify MCP servers in parallel. */
|
|
125
|
+
detectMcpServers(): Promise<{
|
|
126
|
+
codegraph: boolean;
|
|
127
|
+
graphify: boolean;
|
|
128
|
+
}>;
|
|
129
|
+
/**
|
|
130
|
+
* Call an MCP tool via the OpenCode server client. Normalizes the result
|
|
131
|
+
* into a GraphInvocationResult. Never throws on MCP failure.
|
|
132
|
+
*/
|
|
133
|
+
invokeMCP(serverName: string, toolID: string, args: Record<string, unknown>, options: {
|
|
134
|
+
timeoutMs: number;
|
|
135
|
+
queryLabel: string;
|
|
136
|
+
}): Promise<GraphInvocationResult>;
|
|
108
137
|
/**
|
|
109
138
|
* Invoke a graph tool for the given query. Returns structured result.
|
|
110
139
|
* Never throws — all errors are caught and returned as `result: null`.
|