@herjarsa/omo-meta-governor 0.35.0 → 0.35.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.
@@ -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
  */
@@ -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,