peaks-loop-mut 0.1.51 → 0.1.53

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.
Files changed (43) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/services/agent/ecc-archive-safety.d.ts +25 -0
  5. package/dist/services/agent/ecc-archive-safety.d.ts.map +1 -0
  6. package/dist/services/agent/ecc-archive-safety.js +131 -0
  7. package/dist/services/agent/ecc-cache-cleanup.d.ts +26 -0
  8. package/dist/services/agent/ecc-cache-cleanup.d.ts.map +1 -0
  9. package/dist/services/agent/ecc-cache-cleanup.js +90 -0
  10. package/dist/services/agent/ecc-cache-config.d.ts +66 -0
  11. package/dist/services/agent/ecc-cache-config.d.ts.map +1 -0
  12. package/dist/services/agent/ecc-cache-config.js +72 -0
  13. package/dist/services/agent/ecc-cache-manifest.d.ts +22 -0
  14. package/dist/services/agent/ecc-cache-manifest.d.ts.map +1 -0
  15. package/dist/services/agent/ecc-cache-manifest.js +136 -0
  16. package/dist/services/agent/ecc-cache-service.d.ts +6 -113
  17. package/dist/services/agent/ecc-cache-service.d.ts.map +1 -1
  18. package/dist/services/agent/ecc-cache-service.js +28 -645
  19. package/dist/services/agent/ecc-fetch.d.ts +31 -0
  20. package/dist/services/agent/ecc-fetch.d.ts.map +1 -0
  21. package/dist/services/agent/ecc-fetch.js +95 -0
  22. package/dist/services/agent/ecc-materialize.d.ts +35 -0
  23. package/dist/services/agent/ecc-materialize.d.ts.map +1 -0
  24. package/dist/services/agent/ecc-materialize.js +110 -0
  25. package/dist/services/agent/ecc-materialized-readers.d.ts +31 -0
  26. package/dist/services/agent/ecc-materialized-readers.d.ts.map +1 -0
  27. package/dist/services/agent/ecc-materialized-readers.js +107 -0
  28. package/dist/services/mut/assert-scanner.d.ts.map +1 -1
  29. package/dist/services/mut/assert-scanner.js +8 -4
  30. package/dist/services/mut/index.d.ts +3 -3
  31. package/dist/services/mut/index.d.ts.map +1 -1
  32. package/dist/services/mut/index.js +2 -2
  33. package/dist/services/mut/mut-runner.js +4 -4
  34. package/dist/services/mut/production-stryker.d.ts.map +1 -1
  35. package/dist/services/mut/production-stryker.js +17 -13
  36. package/dist/services/mut/report-builder.d.ts.map +1 -1
  37. package/dist/services/mut/report-builder.js +6 -6
  38. package/dist/services/mut/report-loader.d.ts.map +1 -1
  39. package/dist/services/mut/report-loader.js +2 -1
  40. package/dist/services/mut/thresholds.js +4 -4
  41. package/dist/services/mut/types.d.ts.map +1 -1
  42. package/dist/services/mut/types.js +14 -10
  43. package/package.json +1 -1
@@ -46,55 +46,7 @@
46
46
  * `.png` assets) but kept as last resort in case a future
47
47
  * release ships the asset again.
48
48
  */
49
- export declare const ECC_REPO_OWNER = "affaan-m";
50
- export declare const ECC_REPO_NAME = "ECC";
51
- export type CacheManifest = {
52
- version: string;
53
- sha: string;
54
- fetchedAt: string;
55
- agents: string[];
56
- };
57
- export type DownloadResult = {
58
- sha: string;
59
- agents: number;
60
- };
61
- /**
62
- * Peaks-owned materialize manifest. Written next to the normalized
63
- * agent copies under `~/.peaks/agents/ecc/`. Unlike the cache manifest
64
- * (which points at a sha dir), this one records the *stable* copy the
65
- * plugin-free dispatch path reads when no ECC Claude Code plugin is
66
- * installed.
67
- */
68
- export type EccMaterializeManifest = {
69
- version: string;
70
- sha: string;
71
- materializedAt: string;
72
- agents: string[];
73
- };
74
- /**
75
- * Cache dir resolution — single source of truth. Tests inject
76
- * via `dirOverride` on the functions that take one.
77
- */
78
- export declare function resolveEccCacheDir(): string;
79
- export declare function resolveManifestPath(dirOverride?: string): string;
80
- export declare function resolveShaDir(sha: string, dirOverride?: string): string;
81
- export declare function resolveAgentsDir(sha: string, dirOverride?: string): string;
82
- /**
83
- * Plugin-free materialize target: `~/.peaks/agents/ecc/`.
84
- *
85
- * Deliberately NOT under `~/.claude/` — peaks-loop must never write into
86
- * the user's Claude Code tree (user direction 2026-09-09). The LLM reads
87
- * `<target>/<agent-name>.md` directly when the ECC Claude Code plugin is
88
- * absent, then dispatches a generic sub-agent with that body.
89
- */
90
- export declare function resolveEccMaterializedDir(): string;
91
- export declare function resolveEccMaterializedManifestPath(dirOverride?: string): string;
92
- /**
93
- * Best-effort chmod 0o700 on POSIX; no-op on Windows (NTFS uses
94
- * ACLs, not POSIX mode bits). Swallows errors with WARN so a
95
- * permissions failure never blocks the CLI.
96
- */
97
- export declare function setCacheDirPermissions(cacheDir: string): void;
49
+ import { type DownloadResult } from './ecc-cache-config.js';
98
50
  /**
99
51
  * Download ECC into `~/.peaks/cache/ecc-<sha>/agents/`. Returns
100
52
  * the resolved SHA + the number of agents extracted.
@@ -105,68 +57,9 @@ export declare function setCacheDirPermissions(cacheDir: string): void;
105
57
  export declare function downloadToCache({ ref }?: {
106
58
  ref?: string;
107
59
  }): Promise<DownloadResult>;
108
- export declare function readCacheManifest(): CacheManifest | null;
109
- export declare function listCachedAgents(): {
110
- name: string;
111
- description: string;
112
- }[];
113
- export declare function readAgentSkill(name: string): string | null;
114
- export declare function readEccMaterializeManifest(dirOverride?: string): EccMaterializeManifest | null;
115
- export declare function listMaterializedAgents(dirOverride?: string): string[];
116
- export declare function hasMaterializedEccAgents(dirOverride?: string): boolean;
117
- /**
118
- * Resolve the materialized ECC agent name for a logical role.
119
- *
120
- * Upstream ECC names its agents `<lang>-reviewer` (`code-reviewer.md`),
121
- * NOT `code-review.md` — so no caller may hardcode a single filename.
122
- * Resolution order (deterministic; `listMaterializedAgents` is sorted):
123
- * 1. the caller's explicit candidates, in declared priority order
124
- * (e.g. `['code-reviewer', 'code-review']` — real upstream name
125
- * first, legacy/forward-compat second);
126
- * 2. a fallback over the materialized list: the exact
127
- * `<stem>-reviewer`, else the first `<stem>-*` whose name contains
128
- * `reviewer`, where `stem` is the candidate minus a `-reviewer`
129
- * suffix (`code-reviewer` -> `code`).
130
- *
131
- * Returns `null` when nothing matches — the caller degrades to inline
132
- * review instead of dispatching a non-existent agent.
133
- */
134
- export declare function resolveMaterializedAgentName(candidates: readonly string[], dirOverride?: string): string | null;
135
- export declare function readMaterializedAgent(name: string, dirOverride?: string): string | null;
136
- /**
137
- * Copy the active cache's `agents/*.md` into a stable, peaks-owned
138
- * directory (`~/.peaks/agents/ecc/` by default) and write a small
139
- * manifest. Fail-soft: an empty/missing cache yields
140
- * `{ sha: null, materialized: [] }` and never throws — `peaks ecc install`
141
- * must not fail because materialization did.
142
- *
143
- * `targetDir` is the ONLY write root (plus `mkdirSync` on it). Nothing in
144
- * this function can reach `~/.claude/`.
145
- */
146
- export declare function materializeEccAgents({ cacheDir, targetDir }?: {
147
- cacheDir?: string;
148
- targetDir?: string;
149
- }): {
150
- targetDir: string;
151
- sha: string | null;
152
- materialized: string[];
153
- };
154
- /**
155
- * 7-day TTL sweep over `ecc-<sha>/` directories.
156
- *
157
- * - Active cache (per manifest `sha`): use `fetchedAt` as the
158
- * age source; remove if older than `retentionDays`.
159
- * - Orphan caches (any other `ecc-<40hex>` directory): use
160
- * directory `mtimeMs` as the age source.
161
- * - If the active cache is removed, invalidate the manifest.
162
- *
163
- * Returns the absolute paths of the removed directories.
164
- */
165
- export declare function cleanupStaleCache({ retentionDays, nowMs, dirOverride, }: {
166
- retentionDays: number;
167
- nowMs: number;
168
- dirOverride?: string;
169
- }): {
170
- removed: string[];
171
- };
60
+ export { ECC_REPO_OWNER, ECC_REPO_NAME, type CacheManifest, type DownloadResult, type EccMaterializeManifest, resolveEccCacheDir, resolveManifestPath, resolveShaDir, resolveAgentsDir, resolveEccMaterializedDir, resolveEccMaterializedManifestPath, setCacheDirPermissions } from './ecc-cache-config.js';
61
+ export { readCacheManifest, listCachedAgents, readAgentSkill } from './ecc-cache-manifest.js';
62
+ export { readEccMaterializeManifest, listMaterializedAgents, hasMaterializedEccAgents, resolveMaterializedAgentName, readMaterializedAgent } from './ecc-materialized-readers.js';
63
+ export { materializeEccAgents } from './ecc-materialize.js';
64
+ export { cleanupStaleCache } from './ecc-cache-cleanup.js';
172
65
  //# sourceMappingURL=ecc-cache-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ecc-cache-service.d.ts","sourceRoot":"","sources":["../../../src/services/agent/ecc-cache-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAgBH,eAAO,MAAM,cAAc,aAAa,CAAC;AAGzC,eAAO,MAAM,aAAa,QAAQ,CAAC;AAOnC,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,wBAAgB,mBAAmB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAElD;AAED,wBAAgB,kCAAkC,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/E;AAED;;;;GAIG;AACH,wBAAgB,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;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,aAAa,EACb,KAAK,EACL,WAAW,GACZ,EAAE;IACD,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAyDxB"}
1
+ {"version":3,"file":"ecc-cache-service.d.ts","sourceRoot":"","sources":["../../../src/services/agent/ecc-cache-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAaH,OAAO,EASL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAK/B;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,EAAE,GAAG,EAAE,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CAkD7F;AAGD,OAAO,EACL,cAAc,EACd,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,yBAAyB,EACzB,kCAAkC,EAClC,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9F,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}