@fusengine/harness 0.1.74 → 0.1.75

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.
@@ -1,2 +1,2 @@
1
- import { a as fileSizeGuard, c as readClaudeInput, i as denyResponse, l as systemMessage, n as blockResponse, o as guard, r as contextResponse, s as informResponse, t as attachSystemMessage, u as toClaudeResponse } from "../../claude-Z0pN-dqc.mjs";
1
+ import { a as fileSizeGuard, c as readClaudeInput, i as denyResponse, l as systemMessage, n as blockResponse, o as guard, r as contextResponse, s as informResponse, t as attachSystemMessage, u as toClaudeResponse } from "../../claude-BxQwhdZB.mjs";
2
2
  export { attachSystemMessage, blockResponse, contextResponse, denyResponse, fileSizeGuard, guard, informResponse, readClaudeInput, systemMessage, toClaudeResponse };
@@ -1,4 +1,4 @@
1
- import { t as evaluate } from "../../evaluate-DlM9ckLB.mjs";
1
+ import { t as evaluate } from "../../evaluate-ClfbCDiY.mjs";
2
2
  import { t as formatPrompt } from "../../types-ernB1Dy3.mjs";
3
3
  //#region src/adapters/cline/index.ts
4
4
  /**
@@ -1,8 +1,8 @@
1
- import { t as evaluate } from "../../evaluate-DlM9ckLB.mjs";
2
- import { f as countLines } from "../../home-state-D0RLWP8J.mjs";
1
+ import { t as evaluate } from "../../evaluate-ClfbCDiY.mjs";
2
+ import { f as countLines } from "../../home-state-BXf38Zi1.mjs";
3
3
  import { t as formatPrompt } from "../../types-ernB1Dy3.mjs";
4
4
  import { n as parseApplyPatch, t as isBypassPermissions } from "../../permission-mode-BN3MNgbm.mjs";
5
- import { c as readClaudeInput, i as denyResponse, r as contextResponse, s as informResponse, v as commandToString } from "../../claude-Z0pN-dqc.mjs";
5
+ import { c as readClaudeInput, i as denyResponse, r as contextResponse, s as informResponse, v as commandToString } from "../../claude-BxQwhdZB.mjs";
6
6
  //#region src/adapters/codex/index.ts
7
7
  /**
8
8
  * OpenAI Codex CLI adapter (hook-mode). Codex's `PreToolUse` hook (since 2026)
@@ -1,4 +1,4 @@
1
- import { t as evaluate } from "../../evaluate-DlM9ckLB.mjs";
1
+ import { t as evaluate } from "../../evaluate-ClfbCDiY.mjs";
2
2
  import { t as formatPrompt } from "../../types-ernB1Dy3.mjs";
3
3
  //#region src/adapters/cursor/index.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as evaluate } from "../../evaluate-DlM9ckLB.mjs";
1
+ import { t as evaluate } from "../../evaluate-ClfbCDiY.mjs";
2
2
  import { t as formatPrompt } from "../../types-ernB1Dy3.mjs";
3
3
  //#region src/adapters/gemini/index.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { n as readHermesInput, r as toHermesResponse, t as guard } from "../../hermes-B8QmMtSK.mjs";
1
+ import { n as readHermesInput, r as toHermesResponse, t as guard } from "../../hermes-OVoZtUzT.mjs";
2
2
  export { guard, readHermesInput, toHermesResponse };
@@ -1,4 +1,4 @@
1
- import { t as evaluate } from "./evaluate-DlM9ckLB.mjs";
1
+ import { t as evaluate } from "./evaluate-ClfbCDiY.mjs";
2
2
  import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
3
3
  import { dirname, join } from "node:path";
4
4
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
package/dist/cli/bin.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { r as loadDotenv, s as resolveTtlSec } from "../dotenv-Jj8aL1FL.mjs";
3
3
  import { t as detectHarness } from "../harness-Cb9xR8dC.mjs";
4
- import { t as claudeHome } from "../home-state-D0RLWP8J.mjs";
5
- import { n as stagedContent, r as stagedFiles, t as checkStaged } from "../run-B4BqxlXH.mjs";
4
+ import { t as claudeHome } from "../home-state-BXf38Zi1.mjs";
5
+ import { n as stagedContent, r as stagedFiles, t as checkStaged } from "../run-3tyTW9Ud.mjs";
6
6
  import { n as writeInitFile, t as initFor } from "../run-Do2JltgU.mjs";
7
- import { $ as runningVersion, Q as runDoctor, Z as notify, et as versionBanner, t as handleHook, zt as todayUtc } from "../handle-C6tIKeGU.mjs";
8
- import { p as readStdin$1 } from "../claude-Z0pN-dqc.mjs";
7
+ import { $ as runningVersion, Q as runDoctor, Z as notify, et as versionBanner, t as handleHook, zt as todayUtc } from "../handle-Cn6v5UpD.mjs";
8
+ import { p as readStdin$1 } from "../claude-BxQwhdZB.mjs";
9
9
  import { delimiter, join } from "node:path";
10
10
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
11
11
  import { homedir } from "node:os";
@@ -1,2 +1,2 @@
1
- import { n as stagedContent, r as stagedFiles, t as checkStaged } from "../run-B4BqxlXH.mjs";
1
+ import { n as stagedContent, r as stagedFiles, t as checkStaged } from "../run-3tyTW9Ud.mjs";
2
2
  export { checkStaged, stagedContent, stagedFiles };
@@ -1,5 +1,5 @@
1
1
  import { r as resolveMaxLines } from "./limits-CHn8AIL1.mjs";
2
- import { f as countLines, p as evaluateFileSize, r as fusengineCache, t as claudeHome } from "./home-state-D0RLWP8J.mjs";
2
+ import { f as countLines, p as evaluateFileSize, r as fusengineCache, t as claudeHome } from "./home-state-BXf38Zi1.mjs";
3
3
  import { dirname, join, normalize, resolve } from "node:path";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
  import { homedir } from "node:os";
@@ -856,6 +856,36 @@ function bashWriteGuard(ctx) {
856
856
  return null;
857
857
  }
858
858
  //#endregion
859
+ //#region src/policy/module-layout.ts
860
+ /**
861
+ * Module-aware suggestion helper, shared by every framework SOLID gate
862
+ * (react/next/laravel/swift/go/rust). Detection is purely path-based — no
863
+ * filesystem access — so it works identically for both Write (full content,
864
+ * real path) and Edit (snippet, real path).
865
+ */
866
+ /** Matches a `modules/<name>/` path segment anywhere in the file path. */
867
+ const MODULE_SEGMENT_RE = /(?:^|\/)modules\/([^/]+)\//;
868
+ /**
869
+ * Extract the module name from a `modules/<name>/…` path segment.
870
+ * @param filePath - path of the file under validation
871
+ * @returns the module name, or `undefined` when the file isn't inside `modules/<name>/`
872
+ */
873
+ function moduleName(filePath) {
874
+ return MODULE_SEGMENT_RE.exec(filePath)?.[1];
875
+ }
876
+ /**
877
+ * Build a module-aware destination suggestion. When `filePath` sits inside a
878
+ * `modules/<name>/` directory, nests `subpath` under that module; otherwise
879
+ * falls back to the language's own default convention.
880
+ * @param filePath - path of the file under validation
881
+ * @param subpath - subpath to nest inside `modules/<name>/` when a module is detected
882
+ * @param fallback - suggestion to use when no module is detected
883
+ */
884
+ function moduleAwarePath(filePath, subpath, fallback) {
885
+ const name = moduleName(filePath);
886
+ return name ? `modules/${name}/${subpath}` : fallback;
887
+ }
888
+ //#endregion
859
889
  //#region src/policy/guards/interface-separation.ts
860
890
  /** TS/JS component files: top-level `interface`/`type Foo`. */
861
891
  const TS_DECL_RE = /^\s*(export\s+)?(interface|type)\s+[A-Z]/m;
@@ -873,6 +903,8 @@ const SWIFT_PROTO_RE = /^\s*protocol\s+[A-Z]/m;
873
903
  const GO_DECL_RE = /^\s*type\s+[A-Z]\w*\s+interface\b/m;
874
904
  /** Java/Kotlin controllers/handlers: top-level `interface`/`record`. */
875
905
  const JAVA_DECL_RE = /^\s*(?:public\s+|private\s+|protected\s+|internal\s+)?(?:interface|record)\s+[A-Z]/m;
906
+ /** Rust: top-level `trait Foo` declaration (captures the name for impl co-location). */
907
+ const RUST_DECL_RE = /^\s*(?:pub(?:\(\w+\))?\s+)?trait\s+([A-Z]\w*)/m;
876
908
  /**
877
909
  * Blocks top-level interface/type/protocol declarations in component, view or
878
910
  * controller files (Interface Segregation). Fires only when BOTH the path
@@ -907,6 +939,13 @@ function interfaceSeparationGuard(ctx) {
907
939
  if (/\.(java|kt)$/.test(path) && inAny("controller/", "controllers/", "handler/", "handlers/") && JAVA_DECL_RE.test(content)) return blockWith("Interface in controller file. Move to interfaces/ package", "Move the interface to the interfaces/ package");
908
940
  if (/\.php$/.test(path) && inAny("Controller/", "Controllers/", "Handler/", "Handlers/") && PHP_DECL_RE.test(content)) return blockWith("Interface in controller file. Move to app/Contracts/", "Move the interface to app/Contracts/");
909
941
  if (/\.swift$/.test(path) && inAny("View/", "Views/", "Component/", "Components/") && SWIFT_PROTO_RE.test(content)) return blockWith("Protocol in view file. Move to Sources/Interfaces/", "Move the protocol to Sources/Interfaces/");
942
+ if (/\.rs$/.test(path) && !inAny("traits/", "interfaces/") && !path.endsWith("traits.rs")) {
943
+ const name = RUST_DECL_RE.exec(content)?.[1];
944
+ if (name && new RegExp(`impl\\s+${name}\\s+for\\s+\\w+`).test(content)) {
945
+ const dest = moduleAwarePath(path, "traits.rs", "a dedicated traits.rs / interfaces module");
946
+ return blockWith(`Trait declared alongside its implementation. Move the trait to ${dest}`, `Move the trait to ${dest}`);
947
+ }
948
+ }
910
949
  return null;
911
950
  }
912
951
  //#endregion
@@ -1157,4 +1196,4 @@ function evaluate(ctx) {
1157
1196
  };
1158
1197
  }
1159
1198
  //#endregion
1160
- export { PROJECT_INSTALL as A, requiredArchSkill as B, PROTECTED_GIT_RE as C, securityGuard as D, CRITICAL_PATTERNS as E, detectFramework as F, DEV_KEYWORDS as I, detectModularArchitecture as L, SYSTEM_INSTALL as M, isRalphMode as N, GIT_ASK as O, matchPatterns as P, detectProjectType as R, PROTECTED_FRAGMENTS as S, ASK_PATTERNS as T, CODE_MUTATORS as _, registerGuard as a, SAFE_PREFIXES as b, GO_DECL_RE as c, PY_MODEL_RE as d, SWIFT_PROTO_RE as f, ASK_WRITERS as g, bashWriteGuard as h, clearUserGuards as i, RALPH_SAFE as j, GIT_BLOCKED as k, JAVA_DECL_RE as l, interfaceSeparationGuard as m, FAIL_CLOSED as n, runGuards as o, TS_DECL_RE as p, GUARDS as r, installGuard as s, evaluate as t, PHP_DECL_RE as u, CODE_REDIRECT as v, protectedPathGuard as w, SESSION_STATE_FRAGMENT as x, FILE_REDIRECT as y, isApexCommand as z };
1199
+ export { GIT_ASK as A, detectProjectType as B, SESSION_STATE_FRAGMENT as C, ASK_PATTERNS as D, protectedPathGuard as E, isRalphMode as F, requiredArchSkill as H, matchPatterns as I, detectFramework as L, PROJECT_INSTALL as M, RALPH_SAFE as N, CRITICAL_PATTERNS as O, SYSTEM_INSTALL as P, DEV_KEYWORDS as R, SAFE_PREFIXES as S, PROTECTED_GIT_RE as T, isApexCommand as V, bashWriteGuard as _, registerGuard as a, CODE_REDIRECT as b, GO_DECL_RE as c, PY_MODEL_RE as d, RUST_DECL_RE as f, moduleAwarePath as g, interfaceSeparationGuard as h, clearUserGuards as i, GIT_BLOCKED as j, securityGuard as k, JAVA_DECL_RE as l, TS_DECL_RE as m, FAIL_CLOSED as n, runGuards as o, SWIFT_PROTO_RE as p, GUARDS as r, installGuard as s, evaluate as t, PHP_DECL_RE as u, ASK_WRITERS as v, PROTECTED_FRAGMENTS as w, FILE_REDIRECT as x, CODE_MUTATORS as y, detectModularArchitecture as z };
@@ -2,20 +2,20 @@ import { a as parseEnvInt, i as splitTarget, r as resolveMaxLines } from "./limi
2
2
  import { s as resolveTtlSec } from "./dotenv-Jj8aL1FL.mjs";
3
3
  import { r as projectLayout } from "./layout-C0jaaCQC.mjs";
4
4
  import { i as walkUpFor, n as projectRoot, r as projectRootOrNull, t as isCodeFile } from "./project-root-3kk7gCOp.mjs";
5
- import { B as requiredArchSkill, F as detectFramework, L as detectModularArchitecture, R as detectProjectType$1, n as FAIL_CLOSED, t as evaluate } from "./evaluate-DlM9ckLB.mjs";
6
- import { a as sanitizeSessionId, c as sessionsDir, d as countFrameworkCodeLines, f as countLines, i as loadSessionState, l as PLUGINS_DIR, n as fuseHarnessHome, o as saveSessionState, r as fusengineCache, t as claudeHome } from "./home-state-D0RLWP8J.mjs";
5
+ import { B as detectProjectType$1, H as requiredArchSkill, L as detectFramework, n as FAIL_CLOSED, t as evaluate, z as detectModularArchitecture } from "./evaluate-ClfbCDiY.mjs";
6
+ import { a as sanitizeSessionId, c as sessionsDir, d as countFrameworkCodeLines, f as countLines, i as loadSessionState, l as PLUGINS_DIR, n as fuseHarnessHome, o as saveSessionState, r as fusengineCache, t as claudeHome } from "./home-state-BXf38Zi1.mjs";
7
7
  import { a as writeJsonFile, i as readJsonFile, r as hashText, t as atomicWrite } from "./json-io-DisYd2fb.mjs";
8
8
  import { r as isDocConsulted } from "./doc-helpers-CWZegVdR.mjs";
9
- import { A as detectCreationIntent, E as isExcludedSwiftPath, F as docConsultedGate, I as evaluateApex, M as POST_AUTH_GATES, N as PRE_AUTH_GATES, S as usesTailwindUtilities, T as isExcludedJsPath, _ as scanPlugin, c as EXCLUDE_DIRS$1, d as buildApexTaskInjection, h as buildClaudeMdContext, k as capVerbosity, l as PROJECT_INDICATORS, n as missingSeoElements, o as parseEnrichment, r as descFromText, s as parseEntry, t as isHtmlLike, w as frameworkSolidGate, x as skillTriggerGate, y as parseField } from "./validate-RzxKWIFC.mjs";
10
- import { n as findMarketplacePlugins, r as readPluginMeta, t as resolveSkillPath } from "./skill-path-DhItkBzk.mjs";
9
+ import { A as detectCreationIntent, E as isExcludedSwiftPath, F as docConsultedGate, I as evaluateApex, M as POST_AUTH_GATES, N as PRE_AUTH_GATES, S as usesTailwindUtilities, T as isExcludedJsPath, _ as scanPlugin, c as EXCLUDE_DIRS$1, d as buildApexTaskInjection, h as buildClaudeMdContext, k as capVerbosity, l as PROJECT_INDICATORS, n as missingSeoElements, o as parseEnrichment, r as descFromText, s as parseEntry, t as isHtmlLike, w as frameworkSolidGate, x as skillTriggerGate, y as parseField } from "./validate-DnLU4IHy.mjs";
10
+ import { n as findMarketplacePlugins, r as readPluginMeta, t as resolveSkillPath } from "./skill-path-BO2N0XvB.mjs";
11
11
  import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
12
12
  import { a as nowStamp, l as throttleMs, n as readRoots, o as readState, s as setStateField, t as addRoot } from "./registry-CymilZiZ.mjs";
13
13
  import { d as loadIndex, i as cacheLookupMeta, n as webfetchCacheWrite, o as cacheLookupSubstringMeta, t as mcpCacheWrite, u as extractText } from "./mcp-store-BkBDmuxN.mjs";
14
14
  import { t as loadRefs } from "./loader-AGz4nK7d.mjs";
15
- import { a as writeLastNonce, c as recordAgent, d as recordRefRead, f as recordTarget, h as apexAuthorizationGate, i as verifyTrack, l as recordBrainstormRequired, m as trivialCount, n as saveTrack, o as agentsFresh, p as recordTrivialEdit, r as signTrack, s as emptyTrack, t as loadTrack, u as recordDoc } from "./store-CQ4roWrU.mjs";
15
+ import { a as writeLastNonce, c as recordAgent, d as recordRefRead, f as recordTarget, h as apexAuthorizationGate, i as verifyTrack, l as recordBrainstormRequired, m as trivialCount, n as saveTrack, o as agentsFresh, p as recordTrivialEdit, r as signTrack, s as emptyTrack, t as loadTrack, u as recordDoc } from "./store-Bcn08y9m.mjs";
16
16
  import { n as parseApplyPatch, t as isBypassPermissions } from "./permission-mode-BN3MNgbm.mjs";
17
- import { _ as writeText, d as collectFiles, f as pathExists, g as spawnCapture, h as sleep, i as denyResponse, l as systemMessage, m as readText, n as blockResponse, r as contextResponse, s as informResponse, t as attachSystemMessage, v as commandToString } from "./claude-Z0pN-dqc.mjs";
18
- import { r as toHermesResponse } from "./hermes-B8QmMtSK.mjs";
17
+ import { _ as writeText, d as collectFiles, f as pathExists, g as spawnCapture, h as sleep, i as denyResponse, l as systemMessage, m as readText, n as blockResponse, r as contextResponse, s as informResponse, t as attachSystemMessage, v as commandToString } from "./claude-BxQwhdZB.mjs";
18
+ import { r as toHermesResponse } from "./hermes-OVoZtUzT.mjs";
19
19
  import { basename, dirname, extname, join, relative, resolve, sep } from "node:path";
20
20
  import { appendFileSync, copyFileSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, renameSync, rmSync, rmdirSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
21
21
  import { homedir } from "node:os";
@@ -1,6 +1,6 @@
1
- import { t as evaluate } from "./evaluate-DlM9ckLB.mjs";
1
+ import { t as evaluate } from "./evaluate-ClfbCDiY.mjs";
2
2
  import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
3
- import { c as readClaudeInput, v as commandToString } from "./claude-Z0pN-dqc.mjs";
3
+ import { c as readClaudeInput, v as commandToString } from "./claude-BxQwhdZB.mjs";
4
4
  //#region src/adapters/hermes/index.ts
5
5
  /**
6
6
  * Hermes Agent adapter (hook-mode). Nous Research's hermes-agent (2026) pipes a
@@ -19,7 +19,9 @@ const SOLID_REF = {
19
19
  react: "react-expert/skills/solid-react/",
20
20
  nextjs: "nextjs-expert/skills/solid-nextjs/",
21
21
  laravel: "laravel-expert/skills/solid-php/",
22
- swift: "swift-apple-expert/skills/solid-swift/"
22
+ swift: "swift-apple-expert/skills/solid-swift/",
23
+ go: "solid/skills/solid-go/",
24
+ rust: "solid/skills/solid-rust/"
23
25
  };
24
26
  /**
25
27
  * Count physical lines — parity with the Python `enforce-file-size.py`
@@ -291,6 +291,8 @@ declare const SWIFT_PROTO_RE: RegExp;
291
291
  declare const GO_DECL_RE: RegExp;
292
292
  /** Java/Kotlin controllers/handlers: top-level `interface`/`record`. */
293
293
  declare const JAVA_DECL_RE: RegExp;
294
+ /** Rust: top-level `trait Foo` declaration (captures the name for impl co-location). */
295
+ declare const RUST_DECL_RE: RegExp;
294
296
  /**
295
297
  * Blocks top-level interface/type/protocol declarations in component, view or
296
298
  * controller files (Interface Segregation). Fires only when BOTH the path
@@ -356,10 +358,11 @@ declare function capVerbosity(tool: string, input: Record<string, unknown>): Rec
356
358
  //#region src/policy/framework-solid.d.ts
357
359
  /**
358
360
  * Framework-specific SOLID gate. Dispatches by extension/path to the matching
359
- * validator (React, Next.js, Laravel, Swift) and returns a blocking
361
+ * validator (React, Next.js, Laravel, Swift, Go, Rust) and returns a blocking
360
362
  * {@link Prompt} when any BLOCKING rule fires, or `null` when clean. Excluded
361
363
  * build/dependency paths (node_modules, dist, build, .next, vendor, .build,
362
- * DerivedData, Pods) early-return `null` to avoid false positives.
364
+ * DerivedData, Pods) early-return `null` to avoid false positives. Go and Rust
365
+ * have no exclusion list yet (no vendor/target FPs reported) — additive only.
363
366
  * @param filePath - absolute path of the file being written/edited
364
367
  * @param content - the file (or new) content under validation
365
368
  * @param fileLines - full on-disk line count (set on Edit so a partial
@@ -562,4 +565,4 @@ declare function isHtmlLike(path: string): boolean;
562
565
  */
563
566
  declare function missingSeoElements(html: string): string[];
564
567
  //#endregion
565
- export { ASK_PATTERNS as $, FAIL_CLOSED as A, SWIFT_PROTO_RE as B, usesTailwindUtilities as C, ModularArchitecture as Ct, MAX_TOKENS as D, isApexCommand as Dt, MAX_EXA_RESULTS as E, detectProjectType as Et, installGuard as F, CODE_MUTATORS as G, interfaceSeparationGuard as H, GO_DECL_RE as I, SAFE_PREFIXES as J, CODE_REDIRECT as K, JAVA_DECL_RE as L, clearUserGuards as M, registerGuard as N, capVerbosity as O, requiredArchSkill as Ot, runGuards as P, protectedPathGuard as Q, PHP_DECL_RE as R, skillTriggerGate as S, DEV_KEYWORDS as St, frameworkSolidGate as T, detectModularArchitecture as Tt, bashWriteGuard as U, TS_DECL_RE as V, ASK_WRITERS as W, PROTECTED_FRAGMENTS as X, SESSION_STATE_FRAGMENT as Y, PROTECTED_GIT_RE as Z, DEV_VERBS as _, SOLID_REF as _t, firstHeading as a, evaluate as at, detectClaudeMdProjectType as b, evaluateFileSize as bt, parseEntry as c, GIT_ASK as ct, EXCLUDE_DIRS as d, RALPH_SAFE as dt, CRITICAL_PATTERNS as et, PROJECT_INDICATORS as f, SYSTEM_INSTALL as ft, loadApexTaskState as g, PLUGINS_DIR as gt, buildApexTaskInjection as h, FileSizeVerdict as ht, firstComment as i, GuardContext as it, GUARDS as j, detectCreationIntent as k, parseBodyDesc as l, GIT_BLOCKED as lt, buildApexTaskContext as m, matchPatterns as mt, missingSeoElements as n, securityGuard as nt, TreeEntry as o, PolicyContext as ot, ApexTaskState as p, isRalphMode as pt, FILE_REDIRECT as q, descFromText as r, Guard as rt, parseEnrichment as s, PolicyResult as st, isHtmlLike as t, LabeledPattern as tt, parseField as u, PROJECT_INSTALL as ut, buildApexInstruction as v, countFrameworkCodeLines as vt, SKILL_TRIGGERS as w, ProjectType as wt, detectRequiredSkills as x, detectFramework as xt, buildClaudeMdContext as y, countLines as yt, PY_MODEL_RE as z };
568
+ export { protectedPathGuard as $, FAIL_CLOSED as A, RUST_DECL_RE as B, usesTailwindUtilities as C, DEV_KEYWORDS as Ct, MAX_TOKENS as D, detectProjectType as Dt, MAX_EXA_RESULTS as E, detectModularArchitecture as Et, installGuard as F, ASK_WRITERS as G, TS_DECL_RE as H, GO_DECL_RE as I, FILE_REDIRECT as J, CODE_MUTATORS as K, JAVA_DECL_RE as L, clearUserGuards as M, registerGuard as N, capVerbosity as O, isApexCommand as Ot, runGuards as P, PROTECTED_GIT_RE as Q, PHP_DECL_RE as R, skillTriggerGate as S, detectFramework as St, frameworkSolidGate as T, ProjectType as Tt, interfaceSeparationGuard as U, SWIFT_PROTO_RE as V, bashWriteGuard as W, SESSION_STATE_FRAGMENT as X, SAFE_PREFIXES as Y, PROTECTED_FRAGMENTS as Z, DEV_VERBS as _, PLUGINS_DIR as _t, firstHeading as a, GuardContext as at, detectClaudeMdProjectType as b, countLines as bt, parseEntry as c, PolicyResult as ct, EXCLUDE_DIRS as d, PROJECT_INSTALL as dt, ASK_PATTERNS as et, PROJECT_INDICATORS as f, RALPH_SAFE as ft, loadApexTaskState as g, FileSizeVerdict as gt, buildApexTaskInjection as h, matchPatterns as ht, firstComment as i, Guard as it, GUARDS as j, detectCreationIntent as k, requiredArchSkill as kt, parseBodyDesc as l, GIT_ASK as lt, buildApexTaskContext as m, isRalphMode as mt, missingSeoElements as n, LabeledPattern as nt, TreeEntry as o, evaluate as ot, ApexTaskState as p, SYSTEM_INSTALL as pt, CODE_REDIRECT as q, descFromText as r, securityGuard as rt, parseEnrichment as s, PolicyContext as st, isHtmlLike as t, CRITICAL_PATTERNS as tt, parseField as u, GIT_BLOCKED as ut, buildApexInstruction as v, SOLID_REF as vt, SKILL_TRIGGERS as w, ModularArchitecture as wt, detectRequiredSkills as x, evaluateFileSize as xt, buildClaudeMdContext as y, countFrameworkCodeLines as yt, PY_MODEL_RE as z };
package/dist/index.d.mts CHANGED
@@ -5,10 +5,10 @@ import { a as HarnessInfo, i as HarnessId, n as detectMode, o as HarnessMode, r
5
5
  import { a as isDocConsulted, i as formatDocSatisfactionStatus, n as DocSatisfactionStatus, o as resolveSessions, r as formatDocDeny, t as AuthEntry } from "./doc-helpers-CEKzGg2u.mjs";
6
6
  import { t as incrementTrivialEditCounter } from "./index-BOBXQ91y.mjs";
7
7
  import { a as compactJson, i as walkUpFor, n as projectRoot, r as projectRootOrNull, t as isCodeFile } from "./index-BEMumjOw.mjs";
8
- import { $ as ASK_PATTERNS, A as FAIL_CLOSED, B as SWIFT_PROTO_RE, C as usesTailwindUtilities, Ct as ModularArchitecture, D as MAX_TOKENS, Dt as isApexCommand, E as MAX_EXA_RESULTS, Et as detectProjectType, F as installGuard, G as CODE_MUTATORS, H as interfaceSeparationGuard, I as GO_DECL_RE, J as SAFE_PREFIXES, K as CODE_REDIRECT, L as JAVA_DECL_RE, M as clearUserGuards, N as registerGuard, O as capVerbosity, Ot as requiredArchSkill, P as runGuards, Q as protectedPathGuard, R as PHP_DECL_RE, S as skillTriggerGate, St as DEV_KEYWORDS, T as frameworkSolidGate, Tt as detectModularArchitecture, U as bashWriteGuard, V as TS_DECL_RE, W as ASK_WRITERS, X as PROTECTED_FRAGMENTS, Y as SESSION_STATE_FRAGMENT, Z as PROTECTED_GIT_RE, _ as DEV_VERBS, _t as SOLID_REF, a as firstHeading, at as evaluate, b as detectClaudeMdProjectType, bt as evaluateFileSize, c as parseEntry, ct as GIT_ASK, d as EXCLUDE_DIRS, dt as RALPH_SAFE, et as CRITICAL_PATTERNS, f as PROJECT_INDICATORS, ft as SYSTEM_INSTALL, g as loadApexTaskState, gt as PLUGINS_DIR, h as buildApexTaskInjection, ht as FileSizeVerdict, i as firstComment, it as GuardContext, j as GUARDS, k as detectCreationIntent, l as parseBodyDesc, lt as GIT_BLOCKED, m as buildApexTaskContext, mt as matchPatterns, n as missingSeoElements, nt as securityGuard, o as TreeEntry, ot as PolicyContext, p as ApexTaskState, pt as isRalphMode, q as FILE_REDIRECT, r as descFromText, rt as Guard, s as parseEnrichment, st as PolicyResult, t as isHtmlLike, tt as LabeledPattern, u as parseField, ut as PROJECT_INSTALL, v as buildApexInstruction, vt as countFrameworkCodeLines, w as SKILL_TRIGGERS, wt as ProjectType, x as detectRequiredSkills, xt as detectFramework, y as buildClaudeMdContext, yt as countLines, z as PY_MODEL_RE } from "./index-eNTFpuby.mjs";
8
+ import { $ as protectedPathGuard, A as FAIL_CLOSED, B as RUST_DECL_RE, C as usesTailwindUtilities, Ct as DEV_KEYWORDS, D as MAX_TOKENS, Dt as detectProjectType, E as MAX_EXA_RESULTS, Et as detectModularArchitecture, F as installGuard, G as ASK_WRITERS, H as TS_DECL_RE, I as GO_DECL_RE, J as FILE_REDIRECT, K as CODE_MUTATORS, L as JAVA_DECL_RE, M as clearUserGuards, N as registerGuard, O as capVerbosity, Ot as isApexCommand, P as runGuards, Q as PROTECTED_GIT_RE, R as PHP_DECL_RE, S as skillTriggerGate, St as detectFramework, T as frameworkSolidGate, Tt as ProjectType, U as interfaceSeparationGuard, V as SWIFT_PROTO_RE, W as bashWriteGuard, X as SESSION_STATE_FRAGMENT, Y as SAFE_PREFIXES, Z as PROTECTED_FRAGMENTS, _ as DEV_VERBS, _t as PLUGINS_DIR, a as firstHeading, at as GuardContext, b as detectClaudeMdProjectType, bt as countLines, c as parseEntry, ct as PolicyResult, d as EXCLUDE_DIRS, dt as PROJECT_INSTALL, et as ASK_PATTERNS, f as PROJECT_INDICATORS, ft as RALPH_SAFE, g as loadApexTaskState, gt as FileSizeVerdict, h as buildApexTaskInjection, ht as matchPatterns, i as firstComment, it as Guard, j as GUARDS, k as detectCreationIntent, kt as requiredArchSkill, l as parseBodyDesc, lt as GIT_ASK, m as buildApexTaskContext, mt as isRalphMode, n as missingSeoElements, nt as LabeledPattern, o as TreeEntry, ot as evaluate, p as ApexTaskState, pt as SYSTEM_INSTALL, q as CODE_REDIRECT, r as descFromText, rt as securityGuard, s as parseEnrichment, st as PolicyContext, t as isHtmlLike, tt as CRITICAL_PATTERNS, u as parseField, ut as GIT_BLOCKED, v as buildApexInstruction, vt as SOLID_REF, w as SKILL_TRIGGERS, wt as ModularArchitecture, x as detectRequiredSkills, xt as evaluateFileSize, y as buildClaudeMdContext, yt as countFrameworkCodeLines, z as PY_MODEL_RE } from "./index-DJw1OGwE.mjs";
9
9
  import { n as RouteResult, r as ScoredRef, t as RefMeta } from "./types-CY5qT2X1.mjs";
10
10
  import { a as PRE_AUTH_GATES, c as evaluateApex, i as POST_AUTH_GATES, l as freshnessGate, n as ApexContext, o as brainstormGate, r as ApexGate, s as docConsultedGate, t as APEX_GATES, u as solidReadGate } from "./apex-Wdi1nq_w.mjs";
11
11
  import { a as ReminderState, c as readState, d as throttleMs, i as registryFile, l as setStateField, n as addRoot, o as lessonsFileFor, r as readRoots, s as nowStamp, t as ensureMemoryGitignore, u as stateFileFor } from "./index-DLYhervv.mjs";
12
12
  import { a as globToRe, i as scoreReferences, n as toRefMeta, o as parseFrontmatter, r as routeReferences, t as loadRefs } from "./index-mmRF3KNp.mjs";
13
13
  import { _ as TIME_INTERVALS, a as formatCost, c as formatTokens, d as colors, f as progressiveColor, g as PROGRESS_CHARS, h as PROGRESS_BAR_DEFAULTS, i as formatBasename, l as ColorFn, m as GRADIENT_BLOCKS, n as generateGradientBar, o as formatPath, p as COLOR_THRESHOLDS, r as generateProgressBar, s as formatTimeLeft, t as ProgressBarOptions, u as Palette } from "./index-BWK8slRi.mjs";
14
- export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, ApexTaskState, AuthEntry, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, CacheHit, ColorFn, DEFAULT_MAX_LINES, DEFAULT_TTL_SEC, DEV_KEYWORDS, DEV_VERBS, DocSatisfactionStatus, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, FileSizeVerdict, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, Guard, GuardContext, HOME_DIR, type HarnessId, type HarnessInfo, type HarnessMode, type HarnessVia, IndexSummary, JAVA_DECL_RE, LabeledPattern, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, Palette, type PolicyContext, type PolicyResult, ProgressBarOptions, ProjectLayout, ProjectType, Prompt, PromptKind, RALPH_SAFE, RefMeta, ReminderState, RouteResult, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, ScoredRef, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, TreeEntry, addRoot, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cacheLookupMeta, cacheLookupSubstring, cacheLookupSubstringMeta, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, envCandidates, evaluate, evaluateApex, evaluateFileSize, extractText, firstComment, firstHeading, formatBasename, formatCost, formatDocDeny, formatDocSatisfactionStatus, formatPath, formatPrompt, formatTimeLeft, formatTokens, frameworkSolidGate, freshnessGate, generateGradientBar, generateProgressBar, globToRe, incrementTrivialEditCounter, installGuard, interfaceSeparationGuard, isApexCommand, isCodeFile, isDocConsulted, isHtmlLike, isRalphMode, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadDotenv, loadIndex, loadRefs, matchPatterns, mcpCacheKey, mcpCacheWrite, missingSeoElements, modeFor, nowStamp, parseBodyDesc, parseEnrichment, parseEntry, parseEnvFile, parseEnvInt, parseField, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveTtlSec, routeReferences, runGuards, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, summarizeIndex, throttleMs, toRefMeta, ttlLabel, usesTailwindUtilities, walkUpFor, webfetchCacheWrite };
14
+ export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, ApexTaskState, AuthEntry, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, CacheHit, ColorFn, DEFAULT_MAX_LINES, DEFAULT_TTL_SEC, DEV_KEYWORDS, DEV_VERBS, DocSatisfactionStatus, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, FileSizeVerdict, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, Guard, GuardContext, HOME_DIR, type HarnessId, type HarnessInfo, type HarnessMode, type HarnessVia, IndexSummary, JAVA_DECL_RE, LabeledPattern, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, Palette, type PolicyContext, type PolicyResult, ProgressBarOptions, ProjectLayout, ProjectType, Prompt, PromptKind, RALPH_SAFE, RUST_DECL_RE, RefMeta, ReminderState, RouteResult, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, ScoredRef, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, TreeEntry, addRoot, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cacheLookupMeta, cacheLookupSubstring, cacheLookupSubstringMeta, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, envCandidates, evaluate, evaluateApex, evaluateFileSize, extractText, firstComment, firstHeading, formatBasename, formatCost, formatDocDeny, formatDocSatisfactionStatus, formatPath, formatPrompt, formatTimeLeft, formatTokens, frameworkSolidGate, freshnessGate, generateGradientBar, generateProgressBar, globToRe, incrementTrivialEditCounter, installGuard, interfaceSeparationGuard, isApexCommand, isCodeFile, isDocConsulted, isHtmlLike, isRalphMode, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadDotenv, loadIndex, loadRefs, matchPatterns, mcpCacheKey, mcpCacheWrite, missingSeoElements, modeFor, nowStamp, parseBodyDesc, parseEnrichment, parseEntry, parseEnvFile, parseEnvInt, parseField, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveTtlSec, routeReferences, runGuards, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, summarizeIndex, throttleMs, toRefMeta, ttlLabel, usesTailwindUtilities, walkUpFor, webfetchCacheWrite };
package/dist/index.mjs CHANGED
@@ -4,15 +4,15 @@ import { n as STATE_ROOT, r as projectLayout, t as STATE_GITIGNORE } from "./lay
4
4
  import { t as compactJson } from "./compact-json-DK2nX-MK.mjs";
5
5
  import { i as walkUpFor, n as projectRoot, r as projectRootOrNull, t as isCodeFile } from "./project-root-3kk7gCOp.mjs";
6
6
  import { n as detectMode, r as modeFor, t as detectHarness } from "./harness-Cb9xR8dC.mjs";
7
- import { A as PROJECT_INSTALL, B as requiredArchSkill, C as PROTECTED_GIT_RE, D as securityGuard, E as CRITICAL_PATTERNS, F as detectFramework, I as DEV_KEYWORDS, L as detectModularArchitecture, M as SYSTEM_INSTALL, N as isRalphMode, O as GIT_ASK, P as matchPatterns, R as detectProjectType, S as PROTECTED_FRAGMENTS, T as ASK_PATTERNS, _ as CODE_MUTATORS, a as registerGuard, b as SAFE_PREFIXES, c as GO_DECL_RE, d as PY_MODEL_RE, f as SWIFT_PROTO_RE, g as ASK_WRITERS, h as bashWriteGuard, i as clearUserGuards, j as RALPH_SAFE, k as GIT_BLOCKED, l as JAVA_DECL_RE, m as interfaceSeparationGuard, n as FAIL_CLOSED, o as runGuards, p as TS_DECL_RE, r as GUARDS, s as installGuard, t as evaluate, u as PHP_DECL_RE, v as CODE_REDIRECT, w as protectedPathGuard, x as SESSION_STATE_FRAGMENT, y as FILE_REDIRECT, z as isApexCommand } from "./evaluate-DlM9ckLB.mjs";
8
- import { d as countFrameworkCodeLines, f as countLines, l as PLUGINS_DIR, p as evaluateFileSize, u as SOLID_REF } from "./home-state-D0RLWP8J.mjs";
7
+ import { A as GIT_ASK, B as detectProjectType, C as SESSION_STATE_FRAGMENT, D as ASK_PATTERNS, E as protectedPathGuard, F as isRalphMode, H as requiredArchSkill, I as matchPatterns, L as detectFramework, M as PROJECT_INSTALL, N as RALPH_SAFE, O as CRITICAL_PATTERNS, P as SYSTEM_INSTALL, R as DEV_KEYWORDS, S as SAFE_PREFIXES, T as PROTECTED_GIT_RE, V as isApexCommand, _ as bashWriteGuard, a as registerGuard, b as CODE_REDIRECT, c as GO_DECL_RE, d as PY_MODEL_RE, f as RUST_DECL_RE, h as interfaceSeparationGuard, i as clearUserGuards, j as GIT_BLOCKED, k as securityGuard, l as JAVA_DECL_RE, m as TS_DECL_RE, n as FAIL_CLOSED, o as runGuards, p as SWIFT_PROTO_RE, r as GUARDS, s as installGuard, t as evaluate, u as PHP_DECL_RE, v as ASK_WRITERS, w as PROTECTED_FRAGMENTS, x as FILE_REDIRECT, y as CODE_MUTATORS, z as detectModularArchitecture } from "./evaluate-ClfbCDiY.mjs";
8
+ import { d as countFrameworkCodeLines, f as countLines, l as PLUGINS_DIR, p as evaluateFileSize, u as SOLID_REF } from "./home-state-BXf38Zi1.mjs";
9
9
  import { i as resolveSessions, n as formatDocSatisfactionStatus, r as isDocConsulted, t as formatDocDeny } from "./doc-helpers-CWZegVdR.mjs";
10
10
  import { i as parseFrontmatter, n as scoreReferences, r as globToRe, t as routeReferences } from "./router-PKVNBHge.mjs";
11
- import { A as detectCreationIntent, C as SKILL_TRIGGERS, D as MAX_EXA_RESULTS, F as docConsultedGate, I as evaluateApex, L as freshnessGate, M as POST_AUTH_GATES, N as PRE_AUTH_GATES, O as MAX_TOKENS, P as brainstormGate, R as solidReadGate, S as usesTailwindUtilities, a as firstHeading, b as detectRequiredSkills, c as EXCLUDE_DIRS, d as buildApexTaskInjection, f as loadApexTaskState, g as detectClaudeMdProjectType, h as buildClaudeMdContext, i as firstComment, j as APEX_GATES, k as capVerbosity, l as PROJECT_INDICATORS, m as buildApexInstruction, n as missingSeoElements, o as parseEnrichment, p as DEV_VERBS, r as descFromText, s as parseEntry, t as isHtmlLike, u as buildApexTaskContext, v as parseBodyDesc, w as frameworkSolidGate, x as skillTriggerGate, y as parseField } from "./validate-RzxKWIFC.mjs";
11
+ import { A as detectCreationIntent, C as SKILL_TRIGGERS, D as MAX_EXA_RESULTS, F as docConsultedGate, I as evaluateApex, L as freshnessGate, M as POST_AUTH_GATES, N as PRE_AUTH_GATES, O as MAX_TOKENS, P as brainstormGate, R as solidReadGate, S as usesTailwindUtilities, a as firstHeading, b as detectRequiredSkills, c as EXCLUDE_DIRS, d as buildApexTaskInjection, f as loadApexTaskState, g as detectClaudeMdProjectType, h as buildClaudeMdContext, i as firstComment, j as APEX_GATES, k as capVerbosity, l as PROJECT_INDICATORS, m as buildApexInstruction, n as missingSeoElements, o as parseEnrichment, p as DEV_VERBS, r as descFromText, s as parseEntry, t as isHtmlLike, u as buildApexTaskContext, v as parseBodyDesc, w as frameworkSolidGate, x as skillTriggerGate, y as parseField } from "./validate-DnLU4IHy.mjs";
12
12
  import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
13
13
  import { a as nowStamp, c as stateFileFor, i as lessonsFileFor, l as throttleMs, n as readRoots, o as readState, r as registryFile, s as setStateField, t as addRoot, u as ensureMemoryGitignore } from "./registry-CymilZiZ.mjs";
14
14
  import { a as cacheLookupSubstring, c as cacheStore, d as loadIndex, f as summarizeIndex, h as queryHash, i as cacheLookupMeta, l as mcpCacheKey, m as jaccardSimilar, n as webfetchCacheWrite, o as cacheLookupSubstringMeta, p as compactMarkdown, r as cacheLookup, s as cachePath, t as mcpCacheWrite, u as extractText } from "./mcp-store-BkBDmuxN.mjs";
15
15
  import { t as incrementTrivialEditCounter } from "./freshness-BV3PQkDB.mjs";
16
16
  import { n as toRefMeta, t as loadRefs } from "./loader-AGz4nK7d.mjs";
17
17
  import { a as formatPath, c as colors, d as GRADIENT_BLOCKS, f as PROGRESS_BAR_DEFAULTS, i as formatCost, l as progressiveColor, m as TIME_INTERVALS, n as generateProgressBar, o as formatTimeLeft, p as PROGRESS_CHARS, r as formatBasename, s as formatTokens, t as generateGradientBar, u as COLOR_THRESHOLDS } from "./statusline-D87eUNXl.mjs";
18
- export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, DEFAULT_MAX_LINES, DEFAULT_TTL_SEC, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, HOME_DIR, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, RALPH_SAFE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, addRoot, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cacheLookupMeta, cacheLookupSubstring, cacheLookupSubstringMeta, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, envCandidates, evaluate, evaluateApex, evaluateFileSize, extractText, firstComment, firstHeading, formatBasename, formatCost, formatDocDeny, formatDocSatisfactionStatus, formatPath, formatPrompt, formatTimeLeft, formatTokens, frameworkSolidGate, freshnessGate, generateGradientBar, generateProgressBar, globToRe, incrementTrivialEditCounter, installGuard, interfaceSeparationGuard, isApexCommand, isCodeFile, isDocConsulted, isHtmlLike, isRalphMode, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadDotenv, loadIndex, loadRefs, matchPatterns, mcpCacheKey, mcpCacheWrite, missingSeoElements, modeFor, nowStamp, parseBodyDesc, parseEnrichment, parseEntry, parseEnvFile, parseEnvInt, parseField, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveTtlSec, routeReferences, runGuards, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, summarizeIndex, throttleMs, toRefMeta, ttlLabel, usesTailwindUtilities, walkUpFor, webfetchCacheWrite };
18
+ export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, DEFAULT_MAX_LINES, DEFAULT_TTL_SEC, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, HOME_DIR, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, RALPH_SAFE, RUST_DECL_RE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, addRoot, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cacheLookupMeta, cacheLookupSubstring, cacheLookupSubstringMeta, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, envCandidates, evaluate, evaluateApex, evaluateFileSize, extractText, firstComment, firstHeading, formatBasename, formatCost, formatDocDeny, formatDocSatisfactionStatus, formatPath, formatPrompt, formatTimeLeft, formatTokens, frameworkSolidGate, freshnessGate, generateGradientBar, generateProgressBar, globToRe, incrementTrivialEditCounter, installGuard, interfaceSeparationGuard, isApexCommand, isCodeFile, isDocConsulted, isHtmlLike, isRalphMode, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadDotenv, loadIndex, loadRefs, matchPatterns, mcpCacheKey, mcpCacheWrite, missingSeoElements, modeFor, nowStamp, parseBodyDesc, parseEnrichment, parseEntry, parseEnvFile, parseEnvInt, parseField, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveTtlSec, routeReferences, runGuards, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, summarizeIndex, throttleMs, toRefMeta, ttlLabel, usesTailwindUtilities, walkUpFor, webfetchCacheWrite };
@@ -1,3 +1,3 @@
1
- import { $ as ASK_PATTERNS, A as FAIL_CLOSED, B as SWIFT_PROTO_RE, C as usesTailwindUtilities, Ct as ModularArchitecture, D as MAX_TOKENS, Dt as isApexCommand, E as MAX_EXA_RESULTS, Et as detectProjectType, F as installGuard, G as CODE_MUTATORS, H as interfaceSeparationGuard, I as GO_DECL_RE, J as SAFE_PREFIXES, K as CODE_REDIRECT, L as JAVA_DECL_RE, M as clearUserGuards, N as registerGuard, O as capVerbosity, Ot as requiredArchSkill, P as runGuards, Q as protectedPathGuard, R as PHP_DECL_RE, S as skillTriggerGate, St as DEV_KEYWORDS, T as frameworkSolidGate, Tt as detectModularArchitecture, U as bashWriteGuard, V as TS_DECL_RE, W as ASK_WRITERS, X as PROTECTED_FRAGMENTS, Y as SESSION_STATE_FRAGMENT, Z as PROTECTED_GIT_RE, _ as DEV_VERBS, _t as SOLID_REF, a as firstHeading, at as evaluate, b as detectClaudeMdProjectType, bt as evaluateFileSize, c as parseEntry, ct as GIT_ASK, d as EXCLUDE_DIRS, dt as RALPH_SAFE, et as CRITICAL_PATTERNS, f as PROJECT_INDICATORS, ft as SYSTEM_INSTALL, g as loadApexTaskState, gt as PLUGINS_DIR, h as buildApexTaskInjection, ht as FileSizeVerdict, i as firstComment, it as GuardContext, j as GUARDS, k as detectCreationIntent, l as parseBodyDesc, lt as GIT_BLOCKED, m as buildApexTaskContext, mt as matchPatterns, n as missingSeoElements, nt as securityGuard, o as TreeEntry, ot as PolicyContext, p as ApexTaskState, pt as isRalphMode, q as FILE_REDIRECT, r as descFromText, rt as Guard, s as parseEnrichment, st as PolicyResult, t as isHtmlLike, tt as LabeledPattern, u as parseField, ut as PROJECT_INSTALL, v as buildApexInstruction, vt as countFrameworkCodeLines, w as SKILL_TRIGGERS, wt as ProjectType, x as detectRequiredSkills, xt as detectFramework, y as buildClaudeMdContext, yt as countLines, z as PY_MODEL_RE } from "../index-eNTFpuby.mjs";
1
+ import { $ as protectedPathGuard, A as FAIL_CLOSED, B as RUST_DECL_RE, C as usesTailwindUtilities, Ct as DEV_KEYWORDS, D as MAX_TOKENS, Dt as detectProjectType, E as MAX_EXA_RESULTS, Et as detectModularArchitecture, F as installGuard, G as ASK_WRITERS, H as TS_DECL_RE, I as GO_DECL_RE, J as FILE_REDIRECT, K as CODE_MUTATORS, L as JAVA_DECL_RE, M as clearUserGuards, N as registerGuard, O as capVerbosity, Ot as isApexCommand, P as runGuards, Q as PROTECTED_GIT_RE, R as PHP_DECL_RE, S as skillTriggerGate, St as detectFramework, T as frameworkSolidGate, Tt as ProjectType, U as interfaceSeparationGuard, V as SWIFT_PROTO_RE, W as bashWriteGuard, X as SESSION_STATE_FRAGMENT, Y as SAFE_PREFIXES, Z as PROTECTED_FRAGMENTS, _ as DEV_VERBS, _t as PLUGINS_DIR, a as firstHeading, at as GuardContext, b as detectClaudeMdProjectType, bt as countLines, c as parseEntry, ct as PolicyResult, d as EXCLUDE_DIRS, dt as PROJECT_INSTALL, et as ASK_PATTERNS, f as PROJECT_INDICATORS, ft as RALPH_SAFE, g as loadApexTaskState, gt as FileSizeVerdict, h as buildApexTaskInjection, ht as matchPatterns, i as firstComment, it as Guard, j as GUARDS, k as detectCreationIntent, kt as requiredArchSkill, l as parseBodyDesc, lt as GIT_ASK, m as buildApexTaskContext, mt as isRalphMode, n as missingSeoElements, nt as LabeledPattern, o as TreeEntry, ot as evaluate, p as ApexTaskState, pt as SYSTEM_INSTALL, q as CODE_REDIRECT, r as descFromText, rt as securityGuard, s as parseEnrichment, st as PolicyContext, t as isHtmlLike, tt as CRITICAL_PATTERNS, u as parseField, ut as GIT_BLOCKED, v as buildApexInstruction, vt as SOLID_REF, w as SKILL_TRIGGERS, wt as ModularArchitecture, x as detectRequiredSkills, xt as evaluateFileSize, y as buildClaudeMdContext, yt as countFrameworkCodeLines, z as PY_MODEL_RE } from "../index-DJw1OGwE.mjs";
2
2
  import { a as PRE_AUTH_GATES, c as evaluateApex, i as POST_AUTH_GATES, l as freshnessGate, n as ApexContext, o as brainstormGate, r as ApexGate, s as docConsultedGate, t as APEX_GATES, u as solidReadGate } from "../apex-Wdi1nq_w.mjs";
3
- export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, ApexTaskState, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, FileSizeVerdict, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, Guard, GuardContext, JAVA_DECL_RE, LabeledPattern, MAX_EXA_RESULTS, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, type PolicyContext, type PolicyResult, ProjectType, RALPH_SAFE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, TreeEntry, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, isHtmlLike, isRalphMode, loadApexTaskState, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate, usesTailwindUtilities };
3
+ export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, ApexTaskState, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, FileSizeVerdict, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, Guard, GuardContext, JAVA_DECL_RE, LabeledPattern, MAX_EXA_RESULTS, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, type PolicyContext, type PolicyResult, ProjectType, RALPH_SAFE, RUST_DECL_RE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, TreeEntry, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, isHtmlLike, isRalphMode, loadApexTaskState, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate, usesTailwindUtilities };
@@ -1,5 +1,5 @@
1
- import { A as PROJECT_INSTALL, B as requiredArchSkill, C as PROTECTED_GIT_RE, D as securityGuard, E as CRITICAL_PATTERNS, F as detectFramework, I as DEV_KEYWORDS, L as detectModularArchitecture, M as SYSTEM_INSTALL, N as isRalphMode, O as GIT_ASK, P as matchPatterns, R as detectProjectType, S as PROTECTED_FRAGMENTS, T as ASK_PATTERNS, _ as CODE_MUTATORS, a as registerGuard, b as SAFE_PREFIXES, c as GO_DECL_RE, d as PY_MODEL_RE, f as SWIFT_PROTO_RE, g as ASK_WRITERS, h as bashWriteGuard, i as clearUserGuards, j as RALPH_SAFE, k as GIT_BLOCKED, l as JAVA_DECL_RE, m as interfaceSeparationGuard, n as FAIL_CLOSED, o as runGuards, p as TS_DECL_RE, r as GUARDS, s as installGuard, t as evaluate, u as PHP_DECL_RE, v as CODE_REDIRECT, w as protectedPathGuard, x as SESSION_STATE_FRAGMENT, y as FILE_REDIRECT, z as isApexCommand } from "../evaluate-DlM9ckLB.mjs";
2
- import { d as countFrameworkCodeLines, f as countLines, l as PLUGINS_DIR, p as evaluateFileSize, u as SOLID_REF } from "../home-state-D0RLWP8J.mjs";
3
- import { A as detectCreationIntent, C as SKILL_TRIGGERS, D as MAX_EXA_RESULTS, F as docConsultedGate, I as evaluateApex, L as freshnessGate, M as POST_AUTH_GATES, N as PRE_AUTH_GATES, O as MAX_TOKENS, P as brainstormGate, R as solidReadGate, S as usesTailwindUtilities, a as firstHeading, b as detectRequiredSkills, c as EXCLUDE_DIRS, d as buildApexTaskInjection, f as loadApexTaskState, g as detectClaudeMdProjectType, h as buildClaudeMdContext, i as firstComment, j as APEX_GATES, k as capVerbosity, l as PROJECT_INDICATORS, m as buildApexInstruction, n as missingSeoElements, o as parseEnrichment, p as DEV_VERBS, r as descFromText, s as parseEntry, t as isHtmlLike, u as buildApexTaskContext, v as parseBodyDesc, w as frameworkSolidGate, x as skillTriggerGate, y as parseField } from "../validate-RzxKWIFC.mjs";
1
+ import { A as GIT_ASK, B as detectProjectType, C as SESSION_STATE_FRAGMENT, D as ASK_PATTERNS, E as protectedPathGuard, F as isRalphMode, H as requiredArchSkill, I as matchPatterns, L as detectFramework, M as PROJECT_INSTALL, N as RALPH_SAFE, O as CRITICAL_PATTERNS, P as SYSTEM_INSTALL, R as DEV_KEYWORDS, S as SAFE_PREFIXES, T as PROTECTED_GIT_RE, V as isApexCommand, _ as bashWriteGuard, a as registerGuard, b as CODE_REDIRECT, c as GO_DECL_RE, d as PY_MODEL_RE, f as RUST_DECL_RE, h as interfaceSeparationGuard, i as clearUserGuards, j as GIT_BLOCKED, k as securityGuard, l as JAVA_DECL_RE, m as TS_DECL_RE, n as FAIL_CLOSED, o as runGuards, p as SWIFT_PROTO_RE, r as GUARDS, s as installGuard, t as evaluate, u as PHP_DECL_RE, v as ASK_WRITERS, w as PROTECTED_FRAGMENTS, x as FILE_REDIRECT, y as CODE_MUTATORS, z as detectModularArchitecture } from "../evaluate-ClfbCDiY.mjs";
2
+ import { d as countFrameworkCodeLines, f as countLines, l as PLUGINS_DIR, p as evaluateFileSize, u as SOLID_REF } from "../home-state-BXf38Zi1.mjs";
3
+ import { A as detectCreationIntent, C as SKILL_TRIGGERS, D as MAX_EXA_RESULTS, F as docConsultedGate, I as evaluateApex, L as freshnessGate, M as POST_AUTH_GATES, N as PRE_AUTH_GATES, O as MAX_TOKENS, P as brainstormGate, R as solidReadGate, S as usesTailwindUtilities, a as firstHeading, b as detectRequiredSkills, c as EXCLUDE_DIRS, d as buildApexTaskInjection, f as loadApexTaskState, g as detectClaudeMdProjectType, h as buildClaudeMdContext, i as firstComment, j as APEX_GATES, k as capVerbosity, l as PROJECT_INDICATORS, m as buildApexInstruction, n as missingSeoElements, o as parseEnrichment, p as DEV_VERBS, r as descFromText, s as parseEntry, t as isHtmlLike, u as buildApexTaskContext, v as parseBodyDesc, w as frameworkSolidGate, x as skillTriggerGate, y as parseField } from "../validate-DnLU4IHy.mjs";
4
4
  import "../policy-la_KkjCS.mjs";
5
- export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_TOKENS, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, RALPH_SAFE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, isHtmlLike, isRalphMode, loadApexTaskState, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate, usesTailwindUtilities };
5
+ export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_TOKENS, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, RALPH_SAFE, RUST_DECL_RE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, isHtmlLike, isRalphMode, loadApexTaskState, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate, usesTailwindUtilities };
@@ -1,5 +1,5 @@
1
1
  import { t as isCodeFile } from "./project-root-3kk7gCOp.mjs";
2
- import { t as evaluate } from "./evaluate-DlM9ckLB.mjs";
2
+ import { t as evaluate } from "./evaluate-ClfbCDiY.mjs";
3
3
  import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
4
4
  import { execSync } from "node:child_process";
5
5
  //#region src/cli/run.ts
@@ -1,6 +1,6 @@
1
1
  import { r as projectLayout } from "../layout-C0jaaCQC.mjs";
2
- import { a as sanitizeSessionId, c as sessionsDir, i as loadSessionState, n as fuseHarnessHome, o as saveSessionState, r as fusengineCache, s as sessionStatePath, t as claudeHome } from "../home-state-D0RLWP8J.mjs";
3
- import { A as trackMcpResearch, At as defaultStateDir, B as generateProjectMap, C as seoPostToolUse, Ct as trimLogFile, D as securityAdvisoryForPatch, Dt as claudeMdKey, E as securityAdvisory, Et as projectContext, F as dispatchAipilot, Ft as loadSecurityState, G as countFiles, H as writeTree, I as dispatchLessons, It as saveSecurityState, J as lessonsArchiveFileFor, K as getFileDesc, L as cartoSessionStart, Lt as securityStateDir, M as trackEnrichment, Mt as trackFile, N as dispatchLifecycle, Nt as normalizeEvent, O as postTrackingSideEffects, Ot as promptSubmitContext, P as aipilotPostToolUse, Pt as isoUtc, R as generateEcosystemMap, Rt as securityStatePath, S as postEditContext, St as removeOldFiles, T as dispatchMemory, Tt as gitContext, U as loadEnriched, V as isProject, W as mergeLines, X as lessonsStateFileFor, Y as lessonsFileFor, _ as preCommitGate, _t as readRules, a as recordActivity, at as saveApexState, b as extractSymbols, bt as pruneEmptyDirs, c as MCP_TTL_MS, ct as trackAgentMemory, d as isMcpTool, dt as validateSolidGate, f as queryOf, ft as checkFileSize, g as gate, gt as injectRules, h as TRIVIAL_BUDGET, ht as solidDetectStart, i as respond, it as cleanupSession, j as trackSkillRead, jt as projectHash, k as trackWatchResearch, kt as taskContext, l as WEBFETCH_TTL_MS, lt as subagentCacheContext, m as REQUIRED_AGENTS, mt as detectSolidProfile, n as activityFor, nt as trackSessionChanges, o as mcpPostStore, ot as logToolFailure, p as DEFAULT_WINDOW_MS, pt as countLoc, q as listChildren, r as handlePre, rt as validateRulesLoaded, s as mcpPreIntercept, st as validateTeammateOutput, t as handleHook, tt as postEditTypescript, u as cacheQueryOf, ut as validateTailwind, v as detectDuplication, vt as runSessionStartCleanups, w as seoPostToolUseResponse, wt as devContext, x as lifecycleStdout, xt as purgeTtlTree, y as dryGate, yt as sessionStartCore, z as writePluginMap, zt as todayUtc } from "../handle-C6tIKeGU.mjs";
2
+ import { a as sanitizeSessionId, c as sessionsDir, i as loadSessionState, n as fuseHarnessHome, o as saveSessionState, r as fusengineCache, s as sessionStatePath, t as claudeHome } from "../home-state-BXf38Zi1.mjs";
3
+ import { A as trackMcpResearch, At as defaultStateDir, B as generateProjectMap, C as seoPostToolUse, Ct as trimLogFile, D as securityAdvisoryForPatch, Dt as claudeMdKey, E as securityAdvisory, Et as projectContext, F as dispatchAipilot, Ft as loadSecurityState, G as countFiles, H as writeTree, I as dispatchLessons, It as saveSecurityState, J as lessonsArchiveFileFor, K as getFileDesc, L as cartoSessionStart, Lt as securityStateDir, M as trackEnrichment, Mt as trackFile, N as dispatchLifecycle, Nt as normalizeEvent, O as postTrackingSideEffects, Ot as promptSubmitContext, P as aipilotPostToolUse, Pt as isoUtc, R as generateEcosystemMap, Rt as securityStatePath, S as postEditContext, St as removeOldFiles, T as dispatchMemory, Tt as gitContext, U as loadEnriched, V as isProject, W as mergeLines, X as lessonsStateFileFor, Y as lessonsFileFor, _ as preCommitGate, _t as readRules, a as recordActivity, at as saveApexState, b as extractSymbols, bt as pruneEmptyDirs, c as MCP_TTL_MS, ct as trackAgentMemory, d as isMcpTool, dt as validateSolidGate, f as queryOf, ft as checkFileSize, g as gate, gt as injectRules, h as TRIVIAL_BUDGET, ht as solidDetectStart, i as respond, it as cleanupSession, j as trackSkillRead, jt as projectHash, k as trackWatchResearch, kt as taskContext, l as WEBFETCH_TTL_MS, lt as subagentCacheContext, m as REQUIRED_AGENTS, mt as detectSolidProfile, n as activityFor, nt as trackSessionChanges, o as mcpPostStore, ot as logToolFailure, p as DEFAULT_WINDOW_MS, pt as countLoc, q as listChildren, r as handlePre, rt as validateRulesLoaded, s as mcpPreIntercept, st as validateTeammateOutput, t as handleHook, tt as postEditTypescript, u as cacheQueryOf, ut as validateTailwind, v as detectDuplication, vt as runSessionStartCleanups, w as seoPostToolUseResponse, wt as devContext, x as lifecycleStdout, xt as purgeTtlTree, y as dryGate, yt as sessionStartCore, z as writePluginMap, zt as todayUtc } from "../handle-Cn6v5UpD.mjs";
4
4
  //#region src/runtime/storage.ts
5
5
  /**
6
6
  * The project's single state dir (`<root>/.harness`) — neutral + harness-agnostic,
@@ -1,6 +1,6 @@
1
1
  import { t as HOME_DIR } from "./dotenv-Jj8aL1FL.mjs";
2
2
  import { t as detectHarness } from "./harness-Cb9xR8dC.mjs";
3
- import { l as PLUGINS_DIR } from "./home-state-D0RLWP8J.mjs";
3
+ import { l as PLUGINS_DIR } from "./home-state-BXf38Zi1.mjs";
4
4
  import { join } from "node:path";
5
5
  import { existsSync, readFileSync, readdirSync } from "node:fs";
6
6
  import { homedir } from "node:os";
@@ -1,9 +1,9 @@
1
1
  import { c as ttlLabel } from "./dotenv-Jj8aL1FL.mjs";
2
- import { n as fuseHarnessHome } from "./home-state-D0RLWP8J.mjs";
2
+ import { n as fuseHarnessHome } from "./home-state-BXf38Zi1.mjs";
3
3
  import { a as writeJsonFile, i as readJsonFile } from "./json-io-DisYd2fb.mjs";
4
4
  import { i as resolveSessions } from "./doc-helpers-CWZegVdR.mjs";
5
5
  import { t as routeReferences } from "./router-PKVNBHge.mjs";
6
- import { t as resolveSkillPath } from "./skill-path-DhItkBzk.mjs";
6
+ import { t as resolveSkillPath } from "./skill-path-BO2N0XvB.mjs";
7
7
  import { join } from "node:path";
8
8
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
9
9
  import { createHmac, randomBytes } from "node:crypto";
@@ -1,2 +1,2 @@
1
- import { c as recordAgent, d as recordRefRead, f as recordTarget, l as recordBrainstormRequired, m as trivialCount, n as saveTrack, o as agentsFresh, p as recordTrivialEdit, s as emptyTrack, t as loadTrack, u as recordDoc } from "../store-CQ4roWrU.mjs";
1
+ import { c as recordAgent, d as recordRefRead, f as recordTarget, l as recordBrainstormRequired, m as trivialCount, n as saveTrack, o as agentsFresh, p as recordTrivialEdit, s as emptyTrack, t as loadTrack, u as recordDoc } from "../store-Bcn08y9m.mjs";
2
2
  export { agentsFresh, emptyTrack, loadTrack, recordAgent, recordBrainstormRequired, recordDoc, recordRefRead, recordTarget, recordTrivialEdit, saveTrack, trivialCount };
@@ -1,10 +1,10 @@
1
1
  import { r as resolveMaxLines } from "./limits-CHn8AIL1.mjs";
2
2
  import { c as ttlLabel } from "./dotenv-Jj8aL1FL.mjs";
3
- import { I as DEV_KEYWORDS } from "./evaluate-DlM9ckLB.mjs";
4
- import { d as countFrameworkCodeLines, l as PLUGINS_DIR, u as SOLID_REF } from "./home-state-D0RLWP8J.mjs";
3
+ import { R as DEV_KEYWORDS, g as moduleAwarePath } from "./evaluate-ClfbCDiY.mjs";
4
+ import { d as countFrameworkCodeLines, l as PLUGINS_DIR, u as SOLID_REF } from "./home-state-BXf38Zi1.mjs";
5
5
  import { r as isDocConsulted, t as formatDocDeny } from "./doc-helpers-CWZegVdR.mjs";
6
6
  import { t as routeReferences } from "./router-PKVNBHge.mjs";
7
- import { n as findMarketplacePlugins, r as readPluginMeta, t as resolveSkillPath } from "./skill-path-DhItkBzk.mjs";
7
+ import { n as findMarketplacePlugins, r as readPluginMeta, t as resolveSkillPath } from "./skill-path-BO2N0XvB.mjs";
8
8
  import { extname, join } from "node:path";
9
9
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
10
10
  import { homedir } from "node:os";
@@ -226,6 +226,24 @@ function isExcludedPhpPath(filePath) {
226
226
  function isExcludedSwiftPath(filePath) {
227
227
  return SWIFT_EXCLUDE_RE.test(filePath);
228
228
  }
229
+ /**
230
+ * This harness's own gate-detection source files. They hold the React/Next
231
+ * detection literals as regex source text (client-directive string, hook/
232
+ * event names) — scanning them as JS/TS would self-match the very heuristics
233
+ * they define. Exempt by exact filename, not by directory, so a genuine SOLID
234
+ * violation elsewhere in src/policy/ stays gated by the framework-agnostic
235
+ * line-size check in policy/evaluate.ts, untouched by this exemption.
236
+ */
237
+ const SELF_GATE_EXCLUDE_RE = /(^|\/)src\/policy\/framework-solid-gates(-systems)?\.ts$/;
238
+ /**
239
+ * Whether a JS/TS file path is this harness's own gate-detection source —
240
+ * exempt from the pattern heuristics (not the line-size ceiling) to avoid
241
+ * self-blocking on regex literals that look like the code they detect.
242
+ * @param filePath - absolute path of the file under validation
243
+ */
244
+ function isSelfGateSourcePath(filePath) {
245
+ return SELF_GATE_EXCLUDE_RE.test(filePath);
246
+ }
229
247
  //#endregion
230
248
  //#region src/policy/framework-solid-gates.ts
231
249
  /** Custom hook export (React): `export function/const use[A-Z]`. */
@@ -246,7 +264,10 @@ function reactGate(filePath, content, fileLines) {
246
264
  const max = resolveMaxLines();
247
265
  const lines = fileLines ?? countFrameworkCodeLines(content);
248
266
  if (lines > max) v.push(`File has ${lines} lines (limit: ${max}). Split to hooks/, components/, or utils/.`);
249
- if (filePath.includes("/components/") && TS_DECL_RE.test(content)) v.push("Interface/type in component. Move to src/interfaces/ or src/types/.");
267
+ if (filePath.includes("/components/") && TS_DECL_RE.test(content)) {
268
+ const dest = moduleAwarePath(filePath, "src/interfaces/", "src/interfaces/ or src/types/");
269
+ v.push(`Interface/type in component. Move to ${dest}.`);
270
+ }
250
271
  if (HOOK_RE.test(content) && !filePath.includes("/hooks/")) v.push("Custom hook defined outside hooks/ directory. Move to hooks/.");
251
272
  return v;
252
273
  }
@@ -256,7 +277,10 @@ function nextGate(filePath, content, fileLines) {
256
277
  const max = /(page|layout|loading|error|not-found)\.(tsx|ts)$/.test(filePath) ? 150 : 100;
257
278
  const lines = fileLines ?? countFrameworkCodeLines(content);
258
279
  if (lines > max) v.push(`File has ${lines} lines (limit: ${max}). Split to lib/, hooks/, or components/.`);
259
- if (/\/(app|components|modules)\//.test(filePath) && !filePath.includes("/interfaces/") && TS_DECL_RE.test(content)) v.push("Interface/type in component. Move to modules/[feature]/src/interfaces/.");
280
+ if (/\/(app|components|modules)\//.test(filePath) && !filePath.includes("/interfaces/") && TS_DECL_RE.test(content)) {
281
+ const dest = moduleAwarePath(filePath, "src/interfaces/", "src/interfaces/");
282
+ v.push(`Interface/type in component. Move to ${dest}.`);
283
+ }
260
284
  if (CLIENT_HOOK_RE.test(content)) {
261
285
  const head = content.split("\n").slice(0, 5).join("\n");
262
286
  if (!head.includes("'use client'") && !head.includes("\"use client\"")) v.push("Client hooks detected but 'use client' directive missing at top.");
@@ -269,7 +293,10 @@ function laravelGate(filePath, content, fileLines) {
269
293
  const lines = fileLines ?? countFrameworkCodeLines(content);
270
294
  const max = resolveMaxLines();
271
295
  if (lines > max) v.push(`File has ${lines} lines (limit: ${max}). Split using Services, Actions, or Traits.`);
272
- if (PHP_INTERFACE_RE.test(content) && !filePath.includes("/Contracts/")) v.push("Interface defined outside Contracts/. Move to app/Contracts/ or FuseCore/{Module}/App/Contracts/.");
296
+ if (PHP_INTERFACE_RE.test(content) && !filePath.includes("/Contracts/")) {
297
+ const dest = moduleAwarePath(filePath, "Contracts/", "app/Contracts/ or FuseCore/{Module}/App/Contracts/");
298
+ v.push(`Interface defined outside Contracts/. Move to ${dest}.`);
299
+ }
273
300
  if (filePath.includes("/Controllers/") && lines > 80) v.push(`Fat controller (${lines} lines). Extract logic to Services or Actions.`);
274
301
  return v;
275
302
  }
@@ -279,12 +306,99 @@ function swiftGate(filePath, content, fileLines) {
279
306
  const max = /(View|Screen)\.swift$/.test(filePath) ? 150 : 100;
280
307
  const lines = fileLines ?? countFrameworkCodeLines(content);
281
308
  if (lines > max) v.push(`File has ${lines} lines (limit: ${max}). Extract to ViewModels, Services, or subviews.`);
282
- if (SWIFT_PROTOCOL_RE.test(content) && !filePath.includes("/Protocols/")) v.push("Protocol defined outside Protocols/ directory.");
309
+ if (SWIFT_PROTOCOL_RE.test(content) && !filePath.includes("/Protocols/")) {
310
+ const dest = moduleAwarePath(filePath, "Protocols/", "Protocols/ directory");
311
+ v.push(`Protocol defined outside Protocols/ directory. Move to ${dest}.`);
312
+ }
283
313
  if (filePath.endsWith("ViewModel.swift") && !content.includes("@MainActor")) v.push("ViewModel missing @MainActor annotation.");
284
314
  if (SWIFT_TYPE_RE.test(content) && content.includes("async ") && !content.includes("Sendable")) v.push("Type uses async but doesn't conform to Sendable.");
285
315
  return v;
286
316
  }
287
317
  //#endregion
318
+ //#region src/policy/framework-solid-gates-systems.ts
319
+ /**
320
+ * Systems-language SOLID gates (Go, Rust). Split out of `framework-solid-gates.ts`
321
+ * to stay under the SOLID line ceiling — the JS/framework gates already sit
322
+ * near it, and Go/Rust share no logic with React/Next/Laravel/Swift beyond the
323
+ * `moduleAwarePath` helper.
324
+ */
325
+ /** Go top-level `type Foo interface` declaration. */
326
+ const GO_INTERFACE_DECL_RE = /^type\s+[A-Z]\w*\s+interface\b/m;
327
+ /** Go method with a (pointer) receiver: `func (r *Foo) Bar(...)` — receiver type may be unexported (`repo`), unlike the interface it implements. */
328
+ const GO_METHOD_RE = /^func\s*\(\s*\w+\s+\*?[A-Za-z]\w*\)\s+\w+/m;
329
+ /** Rust top-level `trait Foo` declaration (captures the name for impl co-location). */
330
+ const RUST_TRAIT_DECL_RE = /^(pub(\(\w+\))?\s+)?trait\s+([A-Z]\w*)/m;
331
+ /** Rust top-level `struct`/`enum`/`trait` declaration. */
332
+ const RUST_TYPE_DECL_RE = /^(pub\s+)?(struct|enum|trait)\s+[A-Z]/m;
333
+ /** Rust top-level `impl` block. */
334
+ const RUST_IMPL_RE = /^(pub\s+)?impl\b/m;
335
+ /** Rust `unsafe fn/impl/trait/{` usage. */
336
+ const RUST_UNSAFE_RE = /\bunsafe\s*(fn|impl|trait|\{)/;
337
+ /** `// SAFETY:` justification comment (case-insensitive). */
338
+ const RUST_SAFETY_COMMENT_RE = /\/\/\s*SAFETY:/i;
339
+ /** Rust entry-point file: `main.rs`. */
340
+ const RUST_MAIN_RE = /(^|\/)main\.rs$/;
341
+ /** Rust `src/bin/*.rs` binary target. */
342
+ const RUST_BIN_RE = /\/bin\/[^/]+\.rs$/;
343
+ /** A single top-level `struct`/`enum` declaration (used for the clap-Args exemption). */
344
+ const RUST_STRUCT_ENUM_RE = /^(pub\s+)?(struct|enum)\s+[A-Z]\w*/gm;
345
+ /** clap `#[derive(...Parser...)]` attribute. */
346
+ const RUST_DERIVE_PARSER_RE = /#\[derive\([^)]*Parser[^)]*\)\]/;
347
+ /** Go: line limit, interface co-located with its (pointer-receiver) implementation. */
348
+ function goGate(filePath, content, fileLines) {
349
+ const v = [];
350
+ const max = resolveMaxLines();
351
+ const lines = fileLines ?? countFrameworkCodeLines(content);
352
+ if (lines > max) {
353
+ const dest = moduleAwarePath(filePath, "{services,handlers}.go", "an internal/ package by responsibility");
354
+ v.push(`File has ${lines} lines (limit: ${max}). Split into ${dest}.`);
355
+ }
356
+ if (!(filePath.endsWith("_test.go") || /\/mocks?\//.test(filePath) || /\/interfaces\//.test(filePath)) && GO_INTERFACE_DECL_RE.test(content) && GO_METHOD_RE.test(content)) {
357
+ const dest = moduleAwarePath(filePath, "interfaces/", "internal/interfaces/ (consumer-side, Go idiom)");
358
+ v.push(`Interface declared alongside its implementation. Move the interface to ${dest}.`);
359
+ }
360
+ return v;
361
+ }
362
+ /**
363
+ * Whether `content`'s only top-level `struct`/`enum` is a clap `#[derive(...Parser...)]`
364
+ * args struct — the god-main.rs check's sole exemption (a CLI entry point wiring
365
+ * its own arg struct is not "business logic").
366
+ */
367
+ function isClapArgsOnly(content) {
368
+ const matches = [...content.matchAll(RUST_STRUCT_ENUM_RE)];
369
+ if (matches.length !== 1) return false;
370
+ const idx = matches[0]?.index;
371
+ if (idx === void 0) return false;
372
+ const before = content.slice(0, idx).split("\n");
373
+ for (let i = before.length - 1, checked = 0; i >= 0 && checked < 3; i--) {
374
+ const line = (before[i] ?? "").trim();
375
+ if (!line) continue;
376
+ checked++;
377
+ return RUST_DERIVE_PARSER_RE.test(line);
378
+ }
379
+ return false;
380
+ }
381
+ /** Rust: line limit, trait co-location, god-main.rs, unsafe without `// SAFETY:`. */
382
+ function rustGate(filePath, content, fileLines) {
383
+ const v = [];
384
+ const max = resolveMaxLines();
385
+ const lines = fileLines ?? countFrameworkCodeLines(content);
386
+ if (lines > max) {
387
+ const dest = moduleAwarePath(filePath, "{...}.rs", "mod.rs + submodules");
388
+ v.push(`File has ${lines} lines (limit: ${max}). Split into ${dest}.`);
389
+ }
390
+ if (!/\/(traits|interfaces)\//.test(filePath) && !filePath.endsWith("traits.rs")) {
391
+ const name = RUST_TRAIT_DECL_RE.exec(content)?.[3];
392
+ if (name && new RegExp(`impl\\s+${name}\\s+for\\s+\\w+`).test(content)) {
393
+ const dest = moduleAwarePath(filePath, "traits.rs", "a dedicated traits.rs / interfaces module");
394
+ v.push(`Trait declared alongside its implementation. Move the trait to ${dest}.`);
395
+ }
396
+ }
397
+ if ((RUST_MAIN_RE.test(filePath) || RUST_BIN_RE.test(filePath)) && (RUST_TYPE_DECL_RE.test(content) || RUST_IMPL_RE.test(content)) && !isClapArgsOnly(content)) v.push("Entry point contains business logic — keep main.rs to wiring only (parse args, init, call lib.rs/app::run()).");
398
+ if (RUST_UNSAFE_RE.test(content) && !RUST_SAFETY_COMMENT_RE.test(content)) v.push("unsafe without a // SAFETY: comment. Justify the invariant above each unsafe block.");
399
+ return v;
400
+ }
401
+ //#endregion
288
402
  //#region src/policy/framework-solid.ts
289
403
  /** Next.js detection: directive, runtime types, or a `next` import. */
290
404
  const NEXT_RE = /(use client|use server|NextRequest|NextResponse|from ['"]next)/;
@@ -299,15 +413,16 @@ function block(filePath, violations) {
299
413
  }
300
414
  /** Run the JS/TS gate (React or Next.js), honoring build-artifact exclusions. */
301
415
  function jsViolations(filePath, content, fileLines) {
302
- if (isExcludedJsPath(filePath)) return [];
416
+ if (isExcludedJsPath(filePath) || isSelfGateSourcePath(filePath)) return [];
303
417
  return NEXT_RE.test(content) ? nextGate(filePath, content, fileLines) : reactGate(filePath, content, fileLines);
304
418
  }
305
419
  /**
306
420
  * Framework-specific SOLID gate. Dispatches by extension/path to the matching
307
- * validator (React, Next.js, Laravel, Swift) and returns a blocking
421
+ * validator (React, Next.js, Laravel, Swift, Go, Rust) and returns a blocking
308
422
  * {@link Prompt} when any BLOCKING rule fires, or `null` when clean. Excluded
309
423
  * build/dependency paths (node_modules, dist, build, .next, vendor, .build,
310
- * DerivedData, Pods) early-return `null` to avoid false positives.
424
+ * DerivedData, Pods) early-return `null` to avoid false positives. Go and Rust
425
+ * have no exclusion list yet (no vendor/target FPs reported) — additive only.
311
426
  * @param filePath - absolute path of the file being written/edited
312
427
  * @param content - the file (or new) content under validation
313
428
  * @param fileLines - full on-disk line count (set on Edit so a partial
@@ -324,6 +439,8 @@ function frameworkSolidGate(filePath, content, fileLines) {
324
439
  if (isExcludedSwiftPath(filePath)) return null;
325
440
  violations = swiftGate(filePath, content, fileLines);
326
441
  } else if (/\.(tsx|ts|jsx|js)$/.test(filePath)) violations = jsViolations(filePath, content, fileLines);
442
+ else if (filePath.endsWith(".go")) violations = goGate(filePath, content, fileLines);
443
+ else if (filePath.endsWith(".rs")) violations = rustGate(filePath, content, fileLines);
327
444
  return violations.length ? block(filePath, violations) : null;
328
445
  }
329
446
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusengine/harness",
3
- "version": "0.1.74",
3
+ "version": "0.1.75",
4
4
  "description": "Harness-agnostic toolkit for AI coding agents: runtime harness detection (Claude Code, Codex, Cursor, Cline, Gemini, Aider...), pure policy core (env config, project/framework detection, SOLID/file-size limits, APEX freshness, guard patterns, portable prompts), cache, project memory, ref routing, state/locks, statusline, per-harness adapters (Claude/Cursor/Cline/Gemini) and a cli-mode harness-check binary. Bun-native, with a built dist for Node + bundlers.",
5
5
  "type": "module",
6
6
  "module": "src/index.ts",