@herjarsa/omo-meta-governor 0.31.2 → 0.31.4
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 -2
- package/dist/config.d.ts +10 -0
- package/dist/health.d.ts +31 -0
- package/dist/index.js +120 -73
- package/dist/index.js.map +10 -9
- package/dist/lib.js +122 -75
- package/dist/lib.js.map +11 -10
- package/dist/mcp-server.js +89 -42
- package/dist/mcp-server.js.map +8 -7
- package/dist/plugin.d.ts +14 -8
- package/dist/sqlite-backend.d.ts +46 -0
- package/dist/sqlite-driver.d.ts +52 -0
- package/dist/types.d.ts +37 -0
- package/dist/vectors.d.ts +36 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -549,8 +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 | `
|
|
553
|
-
| `compactionLoopGuard.maxOverflowRecoveries` | integer | `
|
|
552
|
+
| `compactionLoopGuard.enabled` | boolean | `true` | v0.31.2: defense against opencode [#27924](https://github.com/anomalyco/opencode/issues/27924) (infinite overflow-compaction loop). |
|
|
553
|
+
| `compactionLoopGuard.maxOverflowRecoveries` | integer | `1` | v0.31.2: consecutive overflow compactions tolerated before the guard trips. |
|
|
554
554
|
|
|
555
555
|
### `protocolEnforcement`
|
|
556
556
|
|
package/dist/config.d.ts
CHANGED
|
@@ -69,6 +69,16 @@ export interface MetaGovernorPluginConfig {
|
|
|
69
69
|
phaseAwareDoneSignal?: boolean;
|
|
70
70
|
/** v0.19.0: persist intervention messages to the session (TUI-visible). */
|
|
71
71
|
persistToSession?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* v0.31.1: overflow compaction loop guard. Defends against opencode
|
|
74
|
+
* bug #27924 (recursive overflow-only compactions). When the guard
|
|
75
|
+
* trips, the plugin flips opencode's autocontinue to disabled so the
|
|
76
|
+
* model can resume its pending tasks.
|
|
77
|
+
*/
|
|
78
|
+
compactionLoopGuard?: {
|
|
79
|
+
enabled?: boolean;
|
|
80
|
+
maxOverflowRecoveries?: number;
|
|
81
|
+
};
|
|
72
82
|
};
|
|
73
83
|
/** Sisyphus protocol enforcement config. */
|
|
74
84
|
protocolEnforcement?: {
|
package/dist/health.d.ts
CHANGED
|
@@ -101,3 +101,34 @@ export declare function describeLogFile(logPath: string): {
|
|
|
101
101
|
sizeBytes: number;
|
|
102
102
|
rotatedFiles: number;
|
|
103
103
|
};
|
|
104
|
+
/** Structural subset of MetricsCollector.getMetrics() the composer needs. */
|
|
105
|
+
export interface MetricsSnapshotLike {
|
|
106
|
+
startedAtISO: string;
|
|
107
|
+
uptimeMs: number;
|
|
108
|
+
counters: Record<string, {
|
|
109
|
+
count?: number;
|
|
110
|
+
lastOccurrenceISO?: string | null;
|
|
111
|
+
} | undefined>;
|
|
112
|
+
}
|
|
113
|
+
export interface BuildPluginHealthInput {
|
|
114
|
+
version: string;
|
|
115
|
+
enabled: boolean;
|
|
116
|
+
sessionID: string;
|
|
117
|
+
snapshot: MetricsSnapshotLike;
|
|
118
|
+
logFilePath: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Compose a PluginHealth snapshot from a metrics snapshot. Single source
|
|
122
|
+
* of truth for BOTH omo_health and the plugin-side periodic writer, so
|
|
123
|
+
* the on-disk schema can never drift between the two paths.
|
|
124
|
+
*/
|
|
125
|
+
export declare function buildPluginHealth(input: BuildPluginHealthInput): PluginHealth;
|
|
126
|
+
/**
|
|
127
|
+
* Rate-limited health writer. The first write always passes through;
|
|
128
|
+
* writes inside `minIntervalMs` of the previous accepted write are
|
|
129
|
+
* dropped, so audit-hook callers can invoke it on every event without
|
|
130
|
+
* hammering the disk.
|
|
131
|
+
*/
|
|
132
|
+
export declare function createThrottledHealthWriter(write: (health: PluginHealth) => void, minIntervalMs: number, now?: () => number): {
|
|
133
|
+
write: (health: PluginHealth) => void;
|
|
134
|
+
};
|