@herjarsa/omo-meta-governor 0.34.2 → 0.35.1

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 CHANGED
@@ -225,6 +225,16 @@ cost: the directive forbids enumerating the full catalog.
225
225
  }
226
226
  }
227
227
  ```
228
+ ### Skills system: 3-tier resolution
229
+ The plugin resolves skills from three tiers, in this precedence:
230
+ 1. **Chore (global)** — bundled skills shipped with the plugin, extracted to
231
+ `~/.agents/skills/` on first run. Read-only from the plugin's perspective.
232
+ 2. **Hub (lazy)** — on-demand from `skills-library.com` / `skills.sh`. Materialized
233
+ to `<cwd>/.agents/skills/<slug>/SKILL.md` when the agent calls `omo_skill_get`.
234
+ 3. **Custom (project-local)** — written by the agent via the `writing-skills`
235
+ chore skill when no hub match exists.
236
+ The plugin recommends skills to the agent; it never injects skill content into
237
+ prompts. The agent decides which skill to use per task.
228
238
 
229
239
  ### Multi-phase plans
230
240
 
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Hermetic test helper: wraps `createMetaGovernorPlugin` with every DI seam
3
+ * stubbed so tests never spawn real npx/pip/graphify/cli-hub subprocesses.
4
+ *
5
+ * v0.35.0 (P0 audit fix F0): prior to this helper, 25+ tests across
6
+ * compaction-loop-guard.test.ts, plugin.test.ts, intervention-fix.test.ts,
7
+ * persist-retry.test.ts leaked Windows children and stalled bun's test runner
8
+ * with 5000ms timeouts. The helper centralises the seam injection so future
9
+ * tests just call `createHermeticPlugin()` and stay hermetic.
10
+ */
11
+ import { createMetaGovernorPlugin, type MetaGovernorPluginDeps } from "../plugin";
12
+ import type { MetaGovernorPluginConfig } from "../config";
13
+ export declare function noopRunner(_cmd: string): number;
14
+ /**
15
+ * Returns a Plugin function equivalent to `createMetaGovernorPlugin(config)`
16
+ * but with every DI seam replaced by no-ops. Disables `graphSync` and
17
+ * `cliAnything` defaults to prevent subprocess spawns in tests.
18
+ */
19
+ export declare function createHermeticPlugin(config?: MetaGovernorPluginConfig, extraDeps?: Partial<MetaGovernorPluginDeps>): ReturnType<typeof createMetaGovernorPlugin>;
@@ -27,7 +27,7 @@ export declare function stripJsoncComments(jsonc: string): string;
27
27
  * Parse a JSONC string into a JavaScript object.
28
28
  * Returns undefined on parse failure.
29
29
  */
30
- export declare function parseJsonc<T = Record<string, unknown>>(jsonc: string): T | undefined;
30
+ export declare function parseJsonc<T = Record<string, unknown>>(jsonc: string, filePath?: string): T | undefined;
31
31
  /**
32
32
  * Get the user-level config file path.
33
33
  */
package/dist/config.d.ts CHANGED
@@ -152,6 +152,9 @@ export interface MetaGovernorPluginConfig {
152
152
  minInstalls?: number;
153
153
  filterDuplicates?: boolean;
154
154
  depsCheck?: boolean;
155
+ choreDir?: string;
156
+ /** v0.35.0: write fetched hub skills to <cwd>/.agents/skills/<slug>/SKILL.md. */
157
+ autoMaterialize?: boolean;
155
158
  };
156
159
  /** Post-wave workflow gate (v0.21.0): landing directives after Oracle-approved waves. */
157
160
  postWave?: PostWaveConfig;
@@ -174,8 +174,8 @@ export declare function isGraphifyHookInstalled(projectDir: string): Promise<boo
174
174
  * Best-effort: never throws, returns a structured result.
175
175
  */
176
176
  export declare function triggerCodegraphSync(projectDir: string, runner?: typeof execSync): Promise<GraphSyncResult>;
177
- import type { LogLevel } from "./file-logger";
178
- export declare function logToFile(level: LogLevel, msg: string): Promise<void>;
177
+ import { logToFile as _logToFile } from "./file-logger";
178
+ export declare const logToFile: typeof _logToFile;
179
179
  /**
180
180
  * Compare two semver strings. Returns true if `latest` is strictly greater
181
181
  * than `installed`. Handles X.Y.Z with optional pre-release suffix (-rc.1,
package/dist/health.d.ts CHANGED
@@ -23,6 +23,15 @@ export interface PluginHealth {
23
23
  interventionsDelivered: number;
24
24
  orchestratorRuns: number;
25
25
  orchestratorErrors: number;
26
+ /** v0.35.0 (Tier 2 materialization): count of materializeSkill() calls
27
+ * that returned reason='denied' (filesystem write failure). */
28
+ materializationFailures: number;
29
+ /** v0.35.0 (Tier 3 advisory): count of writing-skills reminders emitted
30
+ * on zero-result queries. Rate-limited to 1 per query, 3 per session. */
31
+ tier3RemindersSent: number;
32
+ /** v0.35.0 (Tier 3 watcher): count of new SKILL.md files detected under
33
+ * cwd/.agents/skills/. Increments per create/write event from chokidar. */
34
+ tier3SkillsCreated: number;
26
35
  lastDecisionISO: string | null;
27
36
  lastInterventionISO: string | null;
28
37
  };