@herjarsa/omo-meta-governor 0.38.2 → 0.38.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/dist/config.d.ts CHANGED
@@ -44,6 +44,12 @@ export interface MetaGovernorPluginConfig {
44
44
  paralysisThreshold?: number;
45
45
  /** v0.18.0: was silently dropped by loadOrchestratorConfig */
46
46
  defaultEscalationTarget?: "oracle" | "user";
47
+ /**
48
+ * v0.38.4 Option D: Oracle invocation frequency. Derived from
49
+ * `oracle.frequency` (canonical) — exposed here only as a fallback.
50
+ * Users should set `oracle.frequency` in opencode.jsonc, not this field.
51
+ */
52
+ oracleFrequency?: "per-stop" | "final-only" | "off";
47
53
  };
48
54
  /** Closed-loop learning (PR 3) */
49
55
  closedLoop?: {
@@ -55,6 +61,27 @@ export interface MetaGovernorPluginConfig {
55
61
  };
56
62
  /** Model override for MetaGovernor internal LLM usage. */
57
63
  modelOverride?: ModelOverrideConfig;
64
+ /**
65
+ * v0.38.4: Oracle invocation frequency. Controls when the plugin invokes
66
+ * Oracle for verification — reduces noisy mid-work escalations.
67
+ *
68
+ * - `"per-stop"` (default, Option D): Oracle is invoked ONLY at the
69
+ * final-gate (`<promise>DONE</promise>`) AND when score crosses the
70
+ * stop threshold (`≤ -stopThreshold`). warn/escalate decisions log
71
+ * but do NOT inject an Oracle prompt mid-work. Best balance: silent
72
+ * on normal work, brake on emergencies, mandatory at done.
73
+ *
74
+ * - `"final-only"` (Option A): Oracle is invoked ONLY at the final-gate.
75
+ * Even stop-level decisions log without injecting an Oracle prompt.
76
+ * Use when you want zero mid-work interruptions.
77
+ *
78
+ * - `"off"`: Oracle is never invoked. The post-wave gate still requires
79
+ * `oracleVerified` — set it manually via `omo_recall` if you need it.
80
+ */
81
+ oracle?: {
82
+ /** @default "per-stop" */
83
+ frequency?: "per-stop" | "final-only" | "off";
84
+ };
58
85
  /** Intervention config for visible decision injection. */
59
86
  intervention?: {
60
87
  /** @default "silent" */
@@ -21,8 +21,26 @@
21
21
  export declare const ENFORCEMENT_RESOURCE_URIS: readonly ["meta-governor://rules/oracle", "meta-governor://rules/agentmemory", "meta-governor://rules/skill-priming", "meta-governor://rules/protocol"];
22
22
  export type EnforcementResourceUri = (typeof ENFORCEMENT_RESOURCE_URIS)[number];
23
23
  /**
24
- * Build the Oracle gate rule (v0.29.0 post-task Oracle verification).
25
- * Same text as `protocol-enforcer.ts:71-78` but standalone and exposed via MCP resource.
24
+ * Build the Oracle gate rule (v0.38.4 Option D — Oracle frequency).
25
+ *
26
+ * v0.38.4 REWRITE: Oracle is no longer auto-invoked mid-work for every
27
+ * multi-file change. Instead, the `oracle.frequency` config controls when
28
+ * Oracle fires:
29
+ * - `"per-stop"` (default): Oracle invoked at the final-gate
30
+ * (<promise>DONE</promise>) AND when the scoring engine reaches the
31
+ * stop band (action === "stop"). warn/escalate log but do NOT
32
+ * invoke Oracle mid-work.
33
+ * - `"final-only"`: Oracle invoked ONLY at the final-gate. Even
34
+ * stop-level decisions log without invoking Oracle mid-work.
35
+ * - `"off"`: Oracle is NEVER invoked automatically. The agent must
36
+ * set `oracleVerified` manually (e.g. via omo_recall).
37
+ *
38
+ * The DONE final-gate is ALWAYS Oracle-verified regardless of frequency.
39
+ *
40
+ * Same MCP resource contract as before — `meta-governor://rules/oracle`
41
+ * still returns this text. The previous "INVOKE triggers per multi-file
42
+ * change" was the source of the noise — now mid-work Oracle is
43
+ * gated by score band, not file count.
26
44
  */
27
45
  export declare function buildOracleRule(): string;
28
46
  /**