@herjarsa/omo-meta-governor 0.53.0 → 0.54.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.
@@ -37,6 +37,17 @@ export declare function lessonConfidenceForDecision(decision: Decision): number;
37
37
  export declare function isNeutralContinueDecision(decision: Decision): boolean;
38
38
  /** Severity ordering for threshold comparison. */
39
39
  declare const SEVERITY_ORDER: Record<string, number>;
40
+ /**
41
+ * Extract concepts from deviations for the lesson. Optionally include file
42
+ * basenames from the broader filePaths list so FTS indexing covers all
43
+ * recently changed files (Gap Q completeness, v0.17.2).
44
+ *
45
+ * v0.53.1 (conscience-content fix): exported for reuse by the auto-remember
46
+ * path so concepts derive from REAL rule deviations (categories + basenames)
47
+ * instead of the generic ['conscience','media'] pair. Generic concepts
48
+ * pollute FTS recall with noise; real categories keep recall precise.
49
+ */
50
+ export declare function extractConcepts(deviations: readonly Deviation[], filesChanged?: readonly string[]): string[];
40
51
  /**
41
52
  * Core learning function. Decides whether to save a lesson and/or decision
42
53
  * to agentmemory based on the outcome of a repair/action cycle.
@@ -78,19 +89,62 @@ export interface ConscienceDedupeKeyInput {
78
89
  readonly deviationCategories: readonly string[];
79
90
  }
80
91
  export declare function conscienceDedupeKey(input: ConscienceDedupeKeyInput): string;
92
+ /**
93
+ * Basename for FTS indexing — handles POSIX and Windows separators.
94
+ * Keeps whereToGo/concepts as real PLACES (file names) instead of
95
+ * meta-instructions about which tool to call.
96
+ */
97
+ export declare function basenameOf(filePath: string): string;
98
+ /**
99
+ * Derive the conscience `mistake` from REAL rule deviations — never the raw
100
+ * scoring reasoning. A raw dump like 'Stop (score: -0.552): primary concern:
101
+ * Iteration ratio...' describes the JUDGE ('the session is long'), not a
102
+ * learnable rule violation. The learnable unit is `${category}: ${detail}`
103
+ * from the first non-conscience deviation; when several exist they are joined
104
+ * with '; ' and truncated to ~300 chars so the saved lesson stays scannable.
105
+ */
106
+ export declare function conscienceMistakeFromDeviations(deviations: readonly Deviation[]): string;
107
+ /**
108
+ * Derive conscience `whereToGo` as a PLACE — basenames of changed files —
109
+ * never meta-instructions. The old value ('Persist via omo_remember; recall
110
+ * via omo_recall...') told the agent WHERE in tool-space, not where in the
111
+ * repo the rule applies. When no files exist, `session:<id>` scopes the
112
+ * lesson to the session instead of inventing a location.
113
+ */
114
+ export declare function conscienceWhereToGo(files: readonly string[], sessionID: string): string;
81
115
  /**
82
116
  * Structured conscience memory content (D4/D6). Built via buildLessonContent
83
117
  * + extractConcepts — never a raw dump. Delivery route is always the
84
118
  * Zod-validated omo_remember tool.
119
+ *
120
+ * v0.53.1 (conscience-content fix): content is pure lesson — no `ToolRoute:`
121
+ * self-reference. The agent already knows the tool from the preamble
122
+ * ('Conscience lesson — persist it via omo_remember'); persisting the route
123
+ * inside the lesson pollutes recall with meta-instructions. `toolRoute` is
124
+ * kept as an optional deprecated passthrough so old callers still compile,
125
+ * but it is NEVER rendered. Concepts derive from REAL deviations via
126
+ * extractConcepts, not the generic ['conscience','media'] pair.
85
127
  */
86
128
  export interface BuildConscienceMemoryContentInput {
87
129
  readonly action: "escalate" | "stop";
88
130
  readonly mistake: string;
89
131
  readonly whatToDo: string;
90
132
  readonly whereToGo: string;
91
- readonly toolRoute: "omo_remember";
133
+ /**
134
+ * Deprecated self-reference — accepted for compat but never rendered.
135
+ * The preamble already names omo_remember; the saved CONTENT must be
136
+ * pure lesson (mistake/whatToDo/whereToGo) without tool routing noise.
137
+ */
138
+ readonly toolRoute?: "omo_remember";
92
139
  readonly score: number;
93
140
  readonly files: readonly string[];
141
+ /**
142
+ * Real rule deviations (category !== 'conscience'). Used for the lesson
143
+ * base + concepts so recall indexes violated rules, not the synthetic
144
+ * conscience wrapper. When omitted, falls back to the legacy synthetic
145
+ * single-deviation for backward compat with direct unit callers.
146
+ */
147
+ readonly deviations?: readonly Deviation[];
94
148
  }
95
149
  export interface ConscienceMemoryContent {
96
150
  readonly content: string;
package/dist/health.d.ts CHANGED
@@ -32,6 +32,7 @@ export interface PluginHealth {
32
32
  /** v0.35.0 (Tier 3 watcher): count of new SKILL.md files detected under
33
33
  * cwd/.agents/skills/. Increments per create/write event from chokidar. */
34
34
  tier3SkillsCreated: number;
35
+ directivesIgnored: number;
35
36
  lastDecisionISO: string | null;
36
37
  lastInterventionISO: string | null;
37
38
  };