@fusengine/harness 0.1.41 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/dist/adapters/claude/index.mjs +1 -1
- package/dist/adapters/cline/index.mjs +1 -1
- package/dist/adapters/codex/index.mjs +1 -1
- package/dist/adapters/cursor/index.d.mts +4 -2
- package/dist/adapters/cursor/index.mjs +1 -1
- package/dist/adapters/gemini/index.mjs +1 -1
- package/dist/cache/index.mjs +1 -1
- package/dist/{claude-BnFrSfMo.mjs → claude-CeRYMOaG.mjs} +1 -1
- package/dist/cli/bin.mjs +95 -4
- package/dist/cli/index.mjs +1 -1
- package/dist/config/index.d.mts +1 -1
- package/dist/detect/index.d.mts +2 -2
- package/dist/{evaluate-B1n1ti0N.mjs → evaluate-CeivW6G0.mjs} +4 -4
- package/dist/freshness/index.mjs +1 -1
- package/dist/{freshness-43gxYpiX.mjs → freshness-BV3PQkDB.mjs} +1 -1
- package/dist/{handle-VhWQxvyN.mjs → handle-BTHcKWQ5.mjs} +1007 -1012
- package/dist/{harness-DwJskkz_.d.mts → harness-BPPu5CrN.d.mts} +4 -8
- package/dist/{index-DTrjSNmI.d.mts → index-DN4cZDbU.d.mts} +7 -5
- package/dist/{index-COBvvc3L.d.mts → index-DXQfL1u8.d.mts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +6 -6
- package/dist/init/index.d.mts +1 -1
- package/dist/{mcp-store-CDUVqtJ0.mjs → mcp-store-CnsW9oFj.mjs} +1 -1
- package/dist/memory/index.mjs +1 -1
- package/dist/policy/index.d.mts +2 -2
- package/dist/policy/index.mjs +2 -2
- package/dist/{registry-BkoEbdec.mjs → registry-CymilZiZ.mjs} +3 -2
- package/dist/{run-D-Ydrw3D.mjs → run-jgivVDv6.mjs} +1 -1
- package/dist/runtime/index.d.mts +13 -12
- package/dist/runtime/index.mjs +3 -2
- package/dist/state/index.mjs +1 -1
- package/dist/{state-BthKK4Jj.mjs → state-9lWvvWk8.mjs} +1 -1
- package/dist/{store-3WBr37Xz.mjs → store-CdWOQ9zD.mjs} +50 -3
- package/dist/tracking/index.mjs +1 -1
- package/dist/{validate-B3wkqEoN.mjs → validate-xi-zc-22.mjs} +1 -1
- package/package.json +1 -1
- package/dist/{json-io-CvSumjtz.mjs → json-io-DisYd2fb.mjs} +1 -1
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
//#region src/detect/
|
|
2
|
-
/**
|
|
3
|
-
* Runtime detection of the AI coding harness, and its integration mode.
|
|
4
|
-
* Env-signal names verified 2026 (agentx, agents.md#136, @vercel/detect-agent,
|
|
5
|
-
* official Claude Code / Cursor / Gemini / Codex docs). Presence-based: the
|
|
6
|
-
* value is ignored except for the `AGENT` / `AI_AGENT` standards.
|
|
7
|
-
*/
|
|
1
|
+
//#region src/detect/interfaces/types.d.ts
|
|
8
2
|
/** Known AI coding harnesses detectable at runtime. */
|
|
9
3
|
type HarnessId = "claude-code" | "codex" | "cursor" | "cline" | "gemini-cli" | "opencode" | "windsurf" | "copilot" | "aider" | "kiro" | "goose" | "amp" | "unknown";
|
|
10
4
|
/** Integration mode: `hook` = native lifecycle hooks; `cli` = run as an external step. */
|
|
@@ -17,6 +11,8 @@ interface HarnessInfo {
|
|
|
17
11
|
mode: HarnessMode;
|
|
18
12
|
via: HarnessVia;
|
|
19
13
|
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/detect/harness.d.ts
|
|
20
16
|
/** Integration mode for a harness id. */
|
|
21
17
|
declare function modeFor(id: HarnessId): HarnessMode;
|
|
22
18
|
/**
|
|
@@ -28,4 +24,4 @@ declare function detectHarness(env?: Record<string, string | undefined>): Harnes
|
|
|
28
24
|
/** Convenience: the integration mode of the current harness. */
|
|
29
25
|
declare function detectMode(env?: Record<string, string | undefined>): HarnessMode;
|
|
30
26
|
//#endregion
|
|
31
|
-
export {
|
|
27
|
+
export { HarnessInfo as a, HarnessId as i, detectMode as n, HarnessMode as o, modeFor as r, HarnessVia as s, detectHarness as t };
|
|
@@ -79,7 +79,7 @@ declare const PROJECT_INSTALL: ReadonlyArray<RegExp>;
|
|
|
79
79
|
/** True when `cmd` matches any pattern in `patterns`. */
|
|
80
80
|
declare function matchPatterns(cmd: string, patterns: ReadonlyArray<RegExp>): boolean;
|
|
81
81
|
//#endregion
|
|
82
|
-
//#region src/policy/
|
|
82
|
+
//#region src/policy/interfaces/types.d.ts
|
|
83
83
|
/** Harness-agnostic input to {@link evaluate}. */
|
|
84
84
|
interface PolicyContext {
|
|
85
85
|
/** Tool name (e.g. "Write", "Edit", "Bash"). */
|
|
@@ -101,6 +101,8 @@ interface PolicyResult {
|
|
|
101
101
|
prompt?: Prompt;
|
|
102
102
|
meta?: Record<string, unknown>;
|
|
103
103
|
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/policy/evaluate.d.ts
|
|
104
106
|
/**
|
|
105
107
|
* Evaluate a single tool-use against the bundled policies, returning a pure
|
|
106
108
|
* decision plus a portable {@link Prompt}. Adapters translate the prompt into
|
|
@@ -173,9 +175,9 @@ declare function securityGuard(ctx: GuardContext): Prompt | null;
|
|
|
173
175
|
/**
|
|
174
176
|
* Path fragments that mark a location as internal/generated state.
|
|
175
177
|
*
|
|
176
|
-
* Parity with safe_paths.py: `~/.
|
|
177
|
-
* the harness owns (lessons, MCP cache, per-type state) — only the
|
|
178
|
-
* `
|
|
178
|
+
* Parity with safe_paths.py: `~/.fuse-harness/cache` is a *writable*
|
|
179
|
+
* cache the harness owns (lessons, MCP cache, per-type state) — only the
|
|
180
|
+
* `cache/sessions` subtree is protected, not the whole cache.
|
|
179
181
|
*/
|
|
180
182
|
declare const PROTECTED_FRAGMENTS: readonly string[];
|
|
181
183
|
/**
|
|
@@ -481,4 +483,4 @@ declare function isHtmlLike(path: string): boolean;
|
|
|
481
483
|
*/
|
|
482
484
|
declare function missingSeoElements(html: string): string[];
|
|
483
485
|
//#endregion
|
|
484
|
-
export { Guard as $, GUARDS as A, TS_DECL_RE as B, SKILL_TRIGGERS as C, ProjectType as Ct, capVerbosity as D, requiredArchSkill as Dt, MAX_TOKENS as E, isApexCommand as Et, GO_DECL_RE as F, FILE_REDIRECT as G, ASK_WRITERS as H, JAVA_DECL_RE as I, PROTECTED_GIT_RE as J, bashWriteGuard as K, PHP_DECL_RE as L, registerGuard as M, runGuards as N, detectCreationIntent as O, installGuard as P, securityGuard as Q, PY_MODEL_RE as R, skillTriggerGate as S, ModularArchitecture as St, MAX_EXA_RESULTS as T, detectProjectType as Tt, CODE_MUTATORS as U, interfaceSeparationGuard as V, CODE_REDIRECT as W, ASK_PATTERNS as X, protectedPathGuard as Y, CRITICAL_PATTERNS as Z, DEV_VERBS as _, FileSizeVerdict as _t, firstHeading as a, docConsultedGate as at, detectClaudeMdProjectType as b, detectFramework as bt, parseEntry as c, solidReadGate as ct, EXCLUDE_DIRS as d,
|
|
486
|
+
export { Guard as $, GUARDS as A, TS_DECL_RE as B, SKILL_TRIGGERS as C, ProjectType as Ct, capVerbosity as D, requiredArchSkill as Dt, MAX_TOKENS as E, isApexCommand as Et, GO_DECL_RE as F, FILE_REDIRECT as G, ASK_WRITERS as H, JAVA_DECL_RE as I, PROTECTED_GIT_RE as J, bashWriteGuard as K, PHP_DECL_RE as L, registerGuard as M, runGuards as N, detectCreationIntent as O, installGuard as P, securityGuard as Q, PY_MODEL_RE as R, skillTriggerGate as S, ModularArchitecture as St, MAX_EXA_RESULTS as T, detectProjectType as Tt, CODE_MUTATORS as U, interfaceSeparationGuard as V, CODE_REDIRECT as W, ASK_PATTERNS as X, protectedPathGuard as Y, CRITICAL_PATTERNS as Z, DEV_VERBS as _, FileSizeVerdict as _t, firstHeading as a, docConsultedGate as at, detectClaudeMdProjectType as b, detectFramework as bt, parseEntry as c, solidReadGate as ct, EXCLUDE_DIRS as d, PolicyResult as dt, GuardContext as et, PROJECT_INDICATORS as f, GIT_ASK as ft, loadApexTaskState as g, matchPatterns as gt, buildApexTaskInjection as h, SYSTEM_INSTALL as ht, firstComment as i, brainstormGate as it, clearUserGuards as j, FAIL_CLOSED as k, parseBodyDesc as l, evaluate as lt, buildApexTaskContext as m, PROJECT_INSTALL as mt, missingSeoElements as n, ApexContext as nt, TreeEntry as o, evaluateApex as ot, ApexTaskState as p, GIT_BLOCKED as pt, PROTECTED_FRAGMENTS as q, descFromText as r, ApexGate as rt, parseEnrichment as s, freshnessGate as st, isHtmlLike as t, APEX_GATES as tt, parseField as u, PolicyContext as ut, buildApexInstruction as v, countLines as vt, frameworkSolidGate as w, detectModularArchitecture as wt, detectRequiredSkills as x, DEV_KEYWORDS as xt, buildClaudeMdContext as y, evaluateFileSize as yt, SWIFT_PROTO_RE as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { n as PromptKind, r as formatPrompt, t as Prompt } from "./types-D56jSgD9.mjs";
|
|
2
2
|
import { a as mcpCacheKey, c as extractText, d as summarizeIndex, f as compactMarkdown, i as cacheStore, l as IndexSummary, m as queryHash, n as cacheLookupSubstring, o as mcpCacheWrite, p as jaccardSimilar, r as cachePath, s as webfetchCacheWrite, t as cacheLookup, u as loadIndex } from "./index-BX-xcvhY.mjs";
|
|
3
|
-
import { _ as parseEnvInt, a as ProjectLayout, c as projectLayout, d as resolveMaxLines, f as splitTarget, g as ttlLabel, h as resolveTtlSec, i as parseEnvFile, l as DEFAULT_MAX_LINES, m as TTL_ENV_KEY, n as envCandidates, o as STATE_GITIGNORE, p as DEFAULT_TTL_SEC, r as loadDotenv, s as STATE_ROOT, t as HOME_DIR, u as MAX_LINES_ENV_KEY } from "./index-
|
|
4
|
-
import { a as
|
|
3
|
+
import { _ as parseEnvInt, a as ProjectLayout, c as projectLayout, d as resolveMaxLines, f as splitTarget, g as ttlLabel, h as resolveTtlSec, i as parseEnvFile, l as DEFAULT_MAX_LINES, m as TTL_ENV_KEY, n as envCandidates, o as STATE_GITIGNORE, p as DEFAULT_TTL_SEC, r as loadDotenv, s as STATE_ROOT, t as HOME_DIR, u as MAX_LINES_ENV_KEY } from "./index-DXQfL1u8.mjs";
|
|
4
|
+
import { a as HarnessInfo, i as HarnessId, n as detectMode, o as HarnessMode, r as modeFor, s as HarnessVia, t as detectHarness } from "./harness-BPPu5CrN.mjs";
|
|
5
5
|
import { a as isDocConsulted, i as formatDocSatisfactionStatus, n as DocSatisfactionStatus, o as resolveSessions, r as formatDocDeny, t as AuthEntry } from "./doc-helpers-D14nkD5D.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 Guard, A as GUARDS, B as TS_DECL_RE, C as SKILL_TRIGGERS, Ct as ProjectType, D as capVerbosity, Dt as requiredArchSkill, E as MAX_TOKENS, Et as isApexCommand, F as GO_DECL_RE, G as FILE_REDIRECT, H as ASK_WRITERS, I as JAVA_DECL_RE, J as PROTECTED_GIT_RE, K as bashWriteGuard, L as PHP_DECL_RE, M as registerGuard, N as runGuards, O as detectCreationIntent, P as installGuard, Q as securityGuard, R as PY_MODEL_RE, S as skillTriggerGate, St as ModularArchitecture, T as MAX_EXA_RESULTS, Tt as detectProjectType, U as CODE_MUTATORS, V as interfaceSeparationGuard, W as CODE_REDIRECT, X as ASK_PATTERNS, Y as protectedPathGuard, Z as CRITICAL_PATTERNS, _ as DEV_VERBS, _t as FileSizeVerdict, a as firstHeading, at as docConsultedGate, b as detectClaudeMdProjectType, bt as detectFramework, c as parseEntry, ct as solidReadGate, d as EXCLUDE_DIRS, dt as
|
|
8
|
+
import { $ as Guard, A as GUARDS, B as TS_DECL_RE, C as SKILL_TRIGGERS, Ct as ProjectType, D as capVerbosity, Dt as requiredArchSkill, E as MAX_TOKENS, Et as isApexCommand, F as GO_DECL_RE, G as FILE_REDIRECT, H as ASK_WRITERS, I as JAVA_DECL_RE, J as PROTECTED_GIT_RE, K as bashWriteGuard, L as PHP_DECL_RE, M as registerGuard, N as runGuards, O as detectCreationIntent, P as installGuard, Q as securityGuard, R as PY_MODEL_RE, S as skillTriggerGate, St as ModularArchitecture, T as MAX_EXA_RESULTS, Tt as detectProjectType, U as CODE_MUTATORS, V as interfaceSeparationGuard, W as CODE_REDIRECT, X as ASK_PATTERNS, Y as protectedPathGuard, Z as CRITICAL_PATTERNS, _ as DEV_VERBS, _t as FileSizeVerdict, a as firstHeading, at as docConsultedGate, b as detectClaudeMdProjectType, bt as detectFramework, c as parseEntry, ct as solidReadGate, d as EXCLUDE_DIRS, dt as PolicyResult, et as GuardContext, f as PROJECT_INDICATORS, ft as GIT_ASK, g as loadApexTaskState, gt as matchPatterns, h as buildApexTaskInjection, ht as SYSTEM_INSTALL, i as firstComment, it as brainstormGate, j as clearUserGuards, k as FAIL_CLOSED, l as parseBodyDesc, lt as evaluate, m as buildApexTaskContext, mt as PROJECT_INSTALL, n as missingSeoElements, nt as ApexContext, o as TreeEntry, ot as evaluateApex, p as ApexTaskState, pt as GIT_BLOCKED, q as PROTECTED_FRAGMENTS, r as descFromText, rt as ApexGate, s as parseEnrichment, st as freshnessGate, t as isHtmlLike, tt as APEX_GATES, u as parseField, ut as PolicyContext, v as buildApexInstruction, vt as countLines, w as frameworkSolidGate, wt as detectModularArchitecture, x as detectRequiredSkills, xt as DEV_KEYWORDS, y as buildClaudeMdContext, yt as evaluateFileSize, z as SWIFT_PROTO_RE } from "./index-DN4cZDbU.mjs";
|
|
9
9
|
import { n as RouteResult, r as ScoredRef, t as RefMeta } from "./types-CY5qT2X1.mjs";
|
|
10
10
|
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";
|
|
11
11
|
import { a as globToRe, i as scoreReferences, n as toRefMeta, o as parseFrontmatter, r as routeReferences, t as loadRefs } from "./index-mmRF3KNp.mjs";
|
|
12
12
|
import { a as taskStart, c as ensureStateDir, d as stateFilePath, f as acquireLock, i as taskCreate, l as loadState, n as ApexTaskFile, o as ApexState, r as taskComplete, s as apexStateDir, t as ApexTask, u as saveState } from "./index-D7GpOmkl.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, ApexState, ApexTask, ApexTaskFile, ApexTaskState, AuthEntry, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, 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, HarnessId, HarnessInfo, HarnessMode, HarnessVia, IndexSummary, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, Palette, PolicyContext, PolicyResult, ProgressBarOptions, ProjectLayout, ProjectType, Prompt, PromptKind, RefMeta, ReminderState, RouteResult, SKILL_TRIGGERS, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, ScoredRef, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, TreeEntry, acquireLock, addRoot, apexStateDir, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cacheLookupSubstring, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, ensureStateDir, 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, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadDotenv, loadIndex, loadRefs, loadState, 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, saveState, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, stateFilePath, summarizeIndex, taskComplete, taskCreate, taskStart, throttleMs, toRefMeta, ttlLabel, walkUpFor, webfetchCacheWrite };
|
|
14
|
+
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, ApexState, ApexTask, ApexTaskFile, ApexTaskState, AuthEntry, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, 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, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, 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, RefMeta, ReminderState, RouteResult, SKILL_TRIGGERS, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, ScoredRef, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, TreeEntry, acquireLock, addRoot, apexStateDir, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cacheLookupSubstring, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, ensureStateDir, 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, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadDotenv, loadIndex, loadRefs, loadState, 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, saveState, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, stateFilePath, summarizeIndex, taskComplete, taskCreate, taskStart, throttleMs, toRefMeta, ttlLabel, walkUpFor, webfetchCacheWrite };
|
package/dist/index.mjs
CHANGED
|
@@ -5,15 +5,15 @@ import { i as parseEnvFile, n as envCandidates, r as loadDotenv, t as HOME_DIR }
|
|
|
5
5
|
import { t as compactJson } from "./compact-json-DK2nX-MK.mjs";
|
|
6
6
|
import { i as walkUpFor, n as projectRoot, r as projectRootOrNull, t as isCodeFile } from "./project-root-3kk7gCOp.mjs";
|
|
7
7
|
import { n as detectMode, r as modeFor, t as detectHarness } from "./harness-C8Nxxyn_.mjs";
|
|
8
|
-
import { A as evaluateApex, C as MAX_EXA_RESULTS, D as APEX_GATES, E as detectCreationIntent, F as detectProjectType, I as isApexCommand, L as requiredArchSkill, M as solidReadGate, N as DEV_KEYWORDS, O as brainstormGate, P as detectModularArchitecture, S as frameworkSolidGate, T as capVerbosity, _ as buildClaudeMdContext, a as firstHeading, b as skillTriggerGate, c as parseBodyDesc, d as PROJECT_INDICATORS, f as buildApexTaskContext, g as buildApexInstruction, h as DEV_VERBS, i as firstComment, j as freshnessGate, k as docConsultedGate, l as parseField, m as loadApexTaskState, n as missingSeoElements, o as parseEnrichment, p as buildApexTaskInjection, r as descFromText, s as parseEntry, t as isHtmlLike, u as EXCLUDE_DIRS, v as detectClaudeMdProjectType, w as MAX_TOKENS, x as SKILL_TRIGGERS, y as detectRequiredSkills } from "./validate-
|
|
9
|
-
import { A as matchPatterns, C as ASK_PATTERNS, D as GIT_BLOCKED, E as GIT_ASK, M as evaluateFileSize, N as detectFramework, O as PROJECT_INSTALL, S as protectedPathGuard, T as securityGuard, _ as CODE_REDIRECT, a as registerGuard, b as PROTECTED_FRAGMENTS, c as GO_DECL_RE, d as PY_MODEL_RE, f as SWIFT_PROTO_RE, g as CODE_MUTATORS, h as ASK_WRITERS, i as clearUserGuards, j as countLines, k as SYSTEM_INSTALL, 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 FILE_REDIRECT, w as CRITICAL_PATTERNS, x as PROTECTED_GIT_RE, y as bashWriteGuard } from "./evaluate-
|
|
8
|
+
import { A as evaluateApex, C as MAX_EXA_RESULTS, D as APEX_GATES, E as detectCreationIntent, F as detectProjectType, I as isApexCommand, L as requiredArchSkill, M as solidReadGate, N as DEV_KEYWORDS, O as brainstormGate, P as detectModularArchitecture, S as frameworkSolidGate, T as capVerbosity, _ as buildClaudeMdContext, a as firstHeading, b as skillTriggerGate, c as parseBodyDesc, d as PROJECT_INDICATORS, f as buildApexTaskContext, g as buildApexInstruction, h as DEV_VERBS, i as firstComment, j as freshnessGate, k as docConsultedGate, l as parseField, m as loadApexTaskState, n as missingSeoElements, o as parseEnrichment, p as buildApexTaskInjection, r as descFromText, s as parseEntry, t as isHtmlLike, u as EXCLUDE_DIRS, v as detectClaudeMdProjectType, w as MAX_TOKENS, x as SKILL_TRIGGERS, y as detectRequiredSkills } from "./validate-xi-zc-22.mjs";
|
|
9
|
+
import { A as matchPatterns, C as ASK_PATTERNS, D as GIT_BLOCKED, E as GIT_ASK, M as evaluateFileSize, N as detectFramework, O as PROJECT_INSTALL, S as protectedPathGuard, T as securityGuard, _ as CODE_REDIRECT, a as registerGuard, b as PROTECTED_FRAGMENTS, c as GO_DECL_RE, d as PY_MODEL_RE, f as SWIFT_PROTO_RE, g as CODE_MUTATORS, h as ASK_WRITERS, i as clearUserGuards, j as countLines, k as SYSTEM_INSTALL, 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 FILE_REDIRECT, w as CRITICAL_PATTERNS, x as PROTECTED_GIT_RE, y as bashWriteGuard } from "./evaluate-CeivW6G0.mjs";
|
|
10
10
|
import { i as resolveSessions, n as formatDocSatisfactionStatus, r as isDocConsulted, t as formatDocDeny } from "./doc-helpers-BhzDmJ18.mjs";
|
|
11
11
|
import { i as parseFrontmatter, n as scoreReferences, r as globToRe, t as routeReferences } from "./router-BfX0hJg8.mjs";
|
|
12
12
|
import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
|
|
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-
|
|
14
|
-
import { a as cachePath, c as extractText, d as compactMarkdown, f as jaccardSimilar, i as cacheLookupSubstring, l as loadIndex, n as webfetchCacheWrite, o as cacheStore, p as queryHash, r as cacheLookup, s as mcpCacheKey, t as mcpCacheWrite, u as summarizeIndex } from "./mcp-store-
|
|
15
|
-
import { t as incrementTrivialEditCounter } from "./freshness-
|
|
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
|
+
import { a as cachePath, c as extractText, d as compactMarkdown, f as jaccardSimilar, i as cacheLookupSubstring, l as loadIndex, n as webfetchCacheWrite, o as cacheStore, p as queryHash, r as cacheLookup, s as mcpCacheKey, t as mcpCacheWrite, u as summarizeIndex } from "./mcp-store-CnsW9oFj.mjs";
|
|
15
|
+
import { t as incrementTrivialEditCounter } from "./freshness-BV3PQkDB.mjs";
|
|
16
16
|
import { n as toRefMeta, t as loadRefs } from "./loader-Bn-DbZmt.mjs";
|
|
17
|
-
import { a as ensureStateDir, c as stateFilePath, i as apexStateDir, l as acquireLock, n as taskCreate, o as loadState, r as taskStart, s as saveState, t as taskComplete } from "./state-
|
|
17
|
+
import { a as ensureStateDir, c as stateFilePath, i as apexStateDir, l as acquireLock, n as taskCreate, o as loadState, r as taskStart, s as saveState, t as taskComplete } from "./state-9lWvvWk8.mjs";
|
|
18
18
|
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";
|
|
19
19
|
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, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, SKILL_TRIGGERS, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, acquireLock, addRoot, apexStateDir, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cacheLookupSubstring, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, ensureStateDir, 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, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadDotenv, loadIndex, loadRefs, loadState, 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, saveState, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, stateFilePath, summarizeIndex, taskComplete, taskCreate, taskStart, throttleMs, toRefMeta, ttlLabel, walkUpFor, webfetchCacheWrite };
|
package/dist/init/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as atomicWrite } from "./json-io-
|
|
1
|
+
import { t as atomicWrite } from "./json-io-DisYd2fb.mjs";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { createHash } from "node:crypto";
|
package/dist/memory/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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";
|
|
2
2
|
import "../memory-la_KkjCS.mjs";
|
|
3
3
|
export { addRoot, ensureMemoryGitignore, lessonsFileFor, nowStamp, readRoots, readState, registryFile, setStateField, stateFileFor, throttleMs };
|
package/dist/policy/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as Guard, A as GUARDS, B as TS_DECL_RE, C as SKILL_TRIGGERS, Ct as ProjectType, D as capVerbosity, Dt as requiredArchSkill, E as MAX_TOKENS, Et as isApexCommand, F as GO_DECL_RE, G as FILE_REDIRECT, H as ASK_WRITERS, I as JAVA_DECL_RE, J as PROTECTED_GIT_RE, K as bashWriteGuard, L as PHP_DECL_RE, M as registerGuard, N as runGuards, O as detectCreationIntent, P as installGuard, Q as securityGuard, R as PY_MODEL_RE, S as skillTriggerGate, St as ModularArchitecture, T as MAX_EXA_RESULTS, Tt as detectProjectType, U as CODE_MUTATORS, V as interfaceSeparationGuard, W as CODE_REDIRECT, X as ASK_PATTERNS, Y as protectedPathGuard, Z as CRITICAL_PATTERNS, _ as DEV_VERBS, _t as FileSizeVerdict, a as firstHeading, at as docConsultedGate, b as detectClaudeMdProjectType, bt as detectFramework, c as parseEntry, ct as solidReadGate, d as EXCLUDE_DIRS, dt as
|
|
2
|
-
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, MAX_EXA_RESULTS, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, PolicyContext, PolicyResult, ProjectType, SKILL_TRIGGERS, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, TreeEntry, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, isHtmlLike, loadApexTaskState, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate };
|
|
1
|
+
import { $ as Guard, A as GUARDS, B as TS_DECL_RE, C as SKILL_TRIGGERS, Ct as ProjectType, D as capVerbosity, Dt as requiredArchSkill, E as MAX_TOKENS, Et as isApexCommand, F as GO_DECL_RE, G as FILE_REDIRECT, H as ASK_WRITERS, I as JAVA_DECL_RE, J as PROTECTED_GIT_RE, K as bashWriteGuard, L as PHP_DECL_RE, M as registerGuard, N as runGuards, O as detectCreationIntent, P as installGuard, Q as securityGuard, R as PY_MODEL_RE, S as skillTriggerGate, St as ModularArchitecture, T as MAX_EXA_RESULTS, Tt as detectProjectType, U as CODE_MUTATORS, V as interfaceSeparationGuard, W as CODE_REDIRECT, X as ASK_PATTERNS, Y as protectedPathGuard, Z as CRITICAL_PATTERNS, _ as DEV_VERBS, _t as FileSizeVerdict, a as firstHeading, at as docConsultedGate, b as detectClaudeMdProjectType, bt as detectFramework, c as parseEntry, ct as solidReadGate, d as EXCLUDE_DIRS, dt as PolicyResult, et as GuardContext, f as PROJECT_INDICATORS, ft as GIT_ASK, g as loadApexTaskState, gt as matchPatterns, h as buildApexTaskInjection, ht as SYSTEM_INSTALL, i as firstComment, it as brainstormGate, j as clearUserGuards, k as FAIL_CLOSED, l as parseBodyDesc, lt as evaluate, m as buildApexTaskContext, mt as PROJECT_INSTALL, n as missingSeoElements, nt as ApexContext, o as TreeEntry, ot as evaluateApex, p as ApexTaskState, pt as GIT_BLOCKED, q as PROTECTED_FRAGMENTS, r as descFromText, rt as ApexGate, s as parseEnrichment, st as freshnessGate, t as isHtmlLike, tt as APEX_GATES, u as parseField, ut as PolicyContext, v as buildApexInstruction, vt as countLines, w as frameworkSolidGate, wt as detectModularArchitecture, x as detectRequiredSkills, xt as DEV_KEYWORDS, y as buildClaudeMdContext, yt as evaluateFileSize, z as SWIFT_PROTO_RE } from "../index-DN4cZDbU.mjs";
|
|
2
|
+
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, MAX_EXA_RESULTS, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, type PolicyContext, type PolicyResult, ProjectType, SKILL_TRIGGERS, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, TreeEntry, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, isHtmlLike, loadApexTaskState, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate };
|
package/dist/policy/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as evaluateApex, C as MAX_EXA_RESULTS, D as APEX_GATES, E as detectCreationIntent, F as detectProjectType, I as isApexCommand, L as requiredArchSkill, M as solidReadGate, N as DEV_KEYWORDS, O as brainstormGate, P as detectModularArchitecture, S as frameworkSolidGate, T as capVerbosity, _ as buildClaudeMdContext, a as firstHeading, b as skillTriggerGate, c as parseBodyDesc, d as PROJECT_INDICATORS, f as buildApexTaskContext, g as buildApexInstruction, h as DEV_VERBS, i as firstComment, j as freshnessGate, k as docConsultedGate, l as parseField, m as loadApexTaskState, n as missingSeoElements, o as parseEnrichment, p as buildApexTaskInjection, r as descFromText, s as parseEntry, t as isHtmlLike, u as EXCLUDE_DIRS, v as detectClaudeMdProjectType, w as MAX_TOKENS, x as SKILL_TRIGGERS, y as detectRequiredSkills } from "../validate-
|
|
2
|
-
import { A as matchPatterns, C as ASK_PATTERNS, D as GIT_BLOCKED, E as GIT_ASK, M as evaluateFileSize, N as detectFramework, O as PROJECT_INSTALL, S as protectedPathGuard, T as securityGuard, _ as CODE_REDIRECT, a as registerGuard, b as PROTECTED_FRAGMENTS, c as GO_DECL_RE, d as PY_MODEL_RE, f as SWIFT_PROTO_RE, g as CODE_MUTATORS, h as ASK_WRITERS, i as clearUserGuards, j as countLines, k as SYSTEM_INSTALL, 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 FILE_REDIRECT, w as CRITICAL_PATTERNS, x as PROTECTED_GIT_RE, y as bashWriteGuard } from "../evaluate-
|
|
1
|
+
import { A as evaluateApex, C as MAX_EXA_RESULTS, D as APEX_GATES, E as detectCreationIntent, F as detectProjectType, I as isApexCommand, L as requiredArchSkill, M as solidReadGate, N as DEV_KEYWORDS, O as brainstormGate, P as detectModularArchitecture, S as frameworkSolidGate, T as capVerbosity, _ as buildClaudeMdContext, a as firstHeading, b as skillTriggerGate, c as parseBodyDesc, d as PROJECT_INDICATORS, f as buildApexTaskContext, g as buildApexInstruction, h as DEV_VERBS, i as firstComment, j as freshnessGate, k as docConsultedGate, l as parseField, m as loadApexTaskState, n as missingSeoElements, o as parseEnrichment, p as buildApexTaskInjection, r as descFromText, s as parseEntry, t as isHtmlLike, u as EXCLUDE_DIRS, v as detectClaudeMdProjectType, w as MAX_TOKENS, x as SKILL_TRIGGERS, y as detectRequiredSkills } from "../validate-xi-zc-22.mjs";
|
|
2
|
+
import { A as matchPatterns, C as ASK_PATTERNS, D as GIT_BLOCKED, E as GIT_ASK, M as evaluateFileSize, N as detectFramework, O as PROJECT_INSTALL, S as protectedPathGuard, T as securityGuard, _ as CODE_REDIRECT, a as registerGuard, b as PROTECTED_FRAGMENTS, c as GO_DECL_RE, d as PY_MODEL_RE, f as SWIFT_PROTO_RE, g as CODE_MUTATORS, h as ASK_WRITERS, i as clearUserGuards, j as countLines, k as SYSTEM_INSTALL, 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 FILE_REDIRECT, w as CRITICAL_PATTERNS, x as PROTECTED_GIT_RE, y as bashWriteGuard } from "../evaluate-CeivW6G0.mjs";
|
|
3
3
|
import "../policy-la_KkjCS.mjs";
|
|
4
4
|
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, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, SKILL_TRIGGERS, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, isHtmlLike, loadApexTaskState, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as projectLayout } from "./layout-C0jaaCQC.mjs";
|
|
2
|
+
import { t as atomicWrite } from "./json-io-DisYd2fb.mjs";
|
|
2
3
|
import { dirname } from "node:path";
|
|
3
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
5
|
//#region src/memory/gitignore.ts
|
|
@@ -48,7 +49,7 @@ function setStateField(file, key, value) {
|
|
|
48
49
|
const dir = dirname(file);
|
|
49
50
|
mkdirSync(dir, { recursive: true });
|
|
50
51
|
ensureMemoryGitignore(dir);
|
|
51
|
-
|
|
52
|
+
atomicWrite(file, JSON.stringify(next));
|
|
52
53
|
}
|
|
53
54
|
/** Local wall-clock timestamp for a lesson bullet: `YYYY-MM-DD HH:MM`. */
|
|
54
55
|
function nowStamp() {
|
|
@@ -65,7 +66,7 @@ function throttleMs(env = process.env) {
|
|
|
65
66
|
//#endregion
|
|
66
67
|
//#region src/memory/registry.ts
|
|
67
68
|
/** Registry path relative to the home dir. */
|
|
68
|
-
const SUBPATH = ".
|
|
69
|
+
const SUBPATH = ".fuse-harness/cache/lessons/roots.json";
|
|
69
70
|
/** Absolute path of the global roots registry, or null when home is unusable. */
|
|
70
71
|
function registryFile(home = process.env.HOME) {
|
|
71
72
|
const h = home?.trim();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as isCodeFile } from "./project-root-3kk7gCOp.mjs";
|
|
2
|
-
import { t as evaluate } from "./evaluate-
|
|
2
|
+
import { t as evaluate } from "./evaluate-CeivW6G0.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
|
package/dist/runtime/index.d.mts
CHANGED
|
@@ -13,7 +13,7 @@ import { t as AgentQuality } from "../session-state-Dzq6yrw7.mjs";
|
|
|
13
13
|
declare function projectHash(projectDir?: string): string;
|
|
14
14
|
/**
|
|
15
15
|
* Canonical base directory for per-project harness state.
|
|
16
|
-
* Resolves to: ~/.
|
|
16
|
+
* Resolves to: ~/.fuse-harness/state/<projectHash>/
|
|
17
17
|
*
|
|
18
18
|
* @param projectDir - Optional override for hashing; defaults to CLAUDE_PROJECT_DIR/cwd.
|
|
19
19
|
* @returns Absolute directory path (not yet created on disk).
|
|
@@ -27,7 +27,7 @@ declare function defaultStateDir(projectDir?: string): string;
|
|
|
27
27
|
* @param sessionId - Claude session identifier (raw value accepted; sanitised internally).
|
|
28
28
|
* @param baseDir - Override the base directory. Omit in production; pass an explicit
|
|
29
29
|
* temp path in unit tests to avoid touching $HOME.
|
|
30
|
-
* @returns Absolute path, e.g. ~/.
|
|
30
|
+
* @returns Absolute path, e.g. ~/.fuse-harness/state/a1b2c3d4/track-abc123.json
|
|
31
31
|
*/
|
|
32
32
|
declare function trackFile(sessionId: string, baseDir?: string): string;
|
|
33
33
|
//#endregion
|
|
@@ -165,11 +165,10 @@ declare function normalizeEvent(id: string, payload: Record<string, unknown>): N
|
|
|
165
165
|
declare function respond(id: string, prompt: Prompt): string;
|
|
166
166
|
//#endregion
|
|
167
167
|
//#region src/runtime/mcp-key.d.ts
|
|
168
|
-
/**
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
declare const WEBFETCH_TTL_MS = 864e5;
|
|
168
|
+
/** Cached-MCP freshness (ms) from `FUSE_MCP_TTL_SEC` (default 48h). */
|
|
169
|
+
declare const MCP_TTL_MS: number;
|
|
170
|
+
/** WebFetch freshness (ms) from `FUSE_WEBFETCH_TTL_SEC` (default 24h; pages stale faster than docs). */
|
|
171
|
+
declare const WEBFETCH_TTL_MS: number;
|
|
173
172
|
/** MCP doc tools + WebFetch whose calls are cached / verbosity-capped. */
|
|
174
173
|
declare function isMcpTool(tool: string): boolean;
|
|
175
174
|
/** The query/url that keys the cache. */
|
|
@@ -219,11 +218,13 @@ declare function promptSubmitContext(prompt: string, cwd: string): string;
|
|
|
219
218
|
declare function taskContext(cwd: string): string;
|
|
220
219
|
//#endregion
|
|
221
220
|
//#region src/runtime/home-state.d.ts
|
|
222
|
-
/** Home `~/.claude` dir
|
|
221
|
+
/** Home `~/.claude` dir — per-harness config (CLAUDE.md, logs, plugins). */
|
|
223
222
|
declare function claudeHome(home?: string): string;
|
|
224
|
-
/**
|
|
223
|
+
/** Neutral, harness-agnostic home for fuse-harness's OWN cache/state: `~/.fuse-harness`. */
|
|
224
|
+
declare function fuseHarnessHome(home?: string): string;
|
|
225
|
+
/** `~/.fuse-harness/cache` base dir for session/cache state (shared across harnesses). */
|
|
225
226
|
declare function fusengineCache(home?: string): string;
|
|
226
|
-
/** `~/.
|
|
227
|
+
/** `~/.fuse-harness/cache/sessions` — per-session JSON state dir. */
|
|
227
228
|
declare function sessionsDir(home?: string): string;
|
|
228
229
|
/** Validate a session id (1-128 url-safe chars); null when invalid. */
|
|
229
230
|
declare function sanitizeSessionId(sid: unknown): string | null;
|
|
@@ -362,7 +363,7 @@ declare function saveApexState(cwd: string, now?: number): string;
|
|
|
362
363
|
/**
|
|
363
364
|
* Handle SessionEnd: remove stale `*.tmp` (>1h) under `session-tmp/` and stale
|
|
364
365
|
* legacy `claude_solid_reads_*` / `claude_session_changes_*` files (>2h) under
|
|
365
|
-
* `
|
|
366
|
+
* `cache`. Ports `session-end/cleanup-session.py`. No stdout.
|
|
366
367
|
* @param home - Home dir (defaults to `~`).
|
|
367
368
|
* @param now - Clock (defaults to `Date.now()`).
|
|
368
369
|
*/
|
|
@@ -736,4 +737,4 @@ interface PreContext {
|
|
|
736
737
|
*/
|
|
737
738
|
declare function handlePre(ctx: PreContext): Promise<HandleOutcome>;
|
|
738
739
|
//#endregion
|
|
739
|
-
export { Activity, DEFAULT_WINDOW_MS, DuplicationVerdict, type GateInput, HandleOptions, HandleOutcome, LifecycleInput, MCP_TTL_MS, McpIntercept, NormalizedEvent, PluginScope, PreContext, REQUIRED_AGENTS, SolidProfile, TRIVIAL_BUDGET, ToolEvent, WEBFETCH_TTL_MS, activityFor, aipilotPostToolUse, cacheQueryOf, cartoSessionStart, claudeHome, cleanupSession, countFiles, defaultStateDir, detectDuplication, detectSolidProfile, devContext, dispatchAipilot, dispatchLessons, dispatchLifecycle, dispatchMemory, dryGate, extractSymbols, fusengineCache, gate, generateEcosystemMap, generateProjectMap, getFileDesc, gitContext, handleHook, handlePre, harnessStateDir, injectRules, isMcpTool, isProject, isoUtc, lessonsFileFor, lessonsStateFileFor, lifecycleStdout, listChildren, loadEnriched, loadSecurityState, loadSessionState, logToolFailure, mcpPostStore, mcpPreIntercept, mergeLines, normalizeEvent, postEditContext, postEditTypescript, postTrackingSideEffects, preCommitGate, projectContext, projectHash, promptSubmitContext, pruneEmptyDirs, purgeTtlTree, queryOf, readRules, recordActivity, removeOldFiles, respond, runSessionStartCleanups, sanitizeSessionId, saveApexState, saveSecurityState, saveSessionState, securityAdvisory, securityStateDir, securityStatePath, seoPostToolUse, seoPostToolUseResponse, sessionStartCore, sessionStatePath, sessionsDir, solidDetectStart, subagentCacheContext, taskContext, todayUtc, trackAgentMemory, trackEnrichment, trackFile, trackMcpResearch, trackSessionChanges, trackSkillRead, trackWatchResearch, trimLogFile, validateRulesLoaded, validateTeammateOutput, writePluginMap, writeTree };
|
|
740
|
+
export { Activity, DEFAULT_WINDOW_MS, DuplicationVerdict, type GateInput, HandleOptions, HandleOutcome, LifecycleInput, MCP_TTL_MS, McpIntercept, NormalizedEvent, PluginScope, PreContext, REQUIRED_AGENTS, SolidProfile, TRIVIAL_BUDGET, ToolEvent, WEBFETCH_TTL_MS, activityFor, aipilotPostToolUse, cacheQueryOf, cartoSessionStart, claudeHome, cleanupSession, countFiles, defaultStateDir, detectDuplication, detectSolidProfile, devContext, dispatchAipilot, dispatchLessons, dispatchLifecycle, dispatchMemory, dryGate, extractSymbols, fuseHarnessHome, fusengineCache, gate, generateEcosystemMap, generateProjectMap, getFileDesc, gitContext, handleHook, handlePre, harnessStateDir, injectRules, isMcpTool, isProject, isoUtc, lessonsFileFor, lessonsStateFileFor, lifecycleStdout, listChildren, loadEnriched, loadSecurityState, loadSessionState, logToolFailure, mcpPostStore, mcpPreIntercept, mergeLines, normalizeEvent, postEditContext, postEditTypescript, postTrackingSideEffects, preCommitGate, projectContext, projectHash, promptSubmitContext, pruneEmptyDirs, purgeTtlTree, queryOf, readRules, recordActivity, removeOldFiles, respond, runSessionStartCleanups, sanitizeSessionId, saveApexState, saveSecurityState, saveSessionState, securityAdvisory, securityStateDir, securityStatePath, seoPostToolUse, seoPostToolUseResponse, sessionStartCore, sessionStatePath, sessionsDir, solidDetectStart, subagentCacheContext, taskContext, todayUtc, trackAgentMemory, trackEnrichment, trackFile, trackMcpResearch, trackSessionChanges, trackSkillRead, trackWatchResearch, trimLogFile, validateRulesLoaded, validateTeammateOutput, writePluginMap, writeTree };
|
package/dist/runtime/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { r as projectLayout } from "../layout-C0jaaCQC.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as saveSessionState, f as claudeHome, g as sanitizeSessionId, h as loadSessionState, m as fusengineCache, p as fuseHarnessHome, v as sessionStatePath, y as sessionsDir } from "../store-CdWOQ9zD.mjs";
|
|
3
|
+
import { $ as saveApexState, A as trackSkillRead, B as writePluginMap, C as seoPostToolUse, Ct as isoUtc, D as postTrackingSideEffects, Dt as securityStatePath, E as securityAdvisory, Et as securityStateDir, F as dispatchLessons, G as mergeLines, H as isProject, I as lessonsFileFor, J as listChildren, K as countFiles, L as lessonsStateFileFor, M as dispatchLifecycle, N as aipilotPostToolUse, O as trackWatchResearch, Ot as todayUtc, P as dispatchAipilot, Q as cleanupSession, R as cartoSessionStart, S as postEditContext, St as normalizeEvent, T as dispatchMemory, Tt as saveSecurityState, U as writeTree, V as generateProjectMap, W as loadEnriched, X as trackSessionChanges, Y as postEditTypescript, Z as validateRulesLoaded, _ as preCommitGate, _t as promptSubmitContext, a as recordActivity, at as solidDetectStart, b as extractSymbols, bt as projectHash, c as MCP_TTL_MS, ct as runSessionStartCleanups, d as isMcpTool, dt as purgeTtlTree, et as logToolFailure, f as queryOf, ft as removeOldFiles, g as gate, gt as projectContext, h as TRIVIAL_BUDGET, ht as gitContext, i as respond, it as detectSolidProfile, j as trackEnrichment, k as trackMcpResearch, l as WEBFETCH_TTL_MS, lt as sessionStartCore, m as REQUIRED_AGENTS, mt as devContext, n as activityFor, nt as trackAgentMemory, o as mcpPostStore, ot as injectRules, p as DEFAULT_WINDOW_MS, pt as trimLogFile, q as getFileDesc, r as handlePre, rt as subagentCacheContext, s as mcpPreIntercept, st as readRules, t as handleHook, tt as validateTeammateOutput, u as cacheQueryOf, ut as pruneEmptyDirs, v as detectDuplication, vt as taskContext, w as seoPostToolUseResponse, wt as loadSecurityState, x as lifecycleStdout, xt as trackFile, y as dryGate, yt as defaultStateDir, z as generateEcosystemMap } from "../handle-BTHcKWQ5.mjs";
|
|
3
4
|
//#region src/runtime/storage.ts
|
|
4
5
|
/**
|
|
5
6
|
* The project's single state dir (`<root>/.harness`) — neutral + harness-agnostic,
|
|
@@ -9,4 +10,4 @@ function harnessStateDir(root) {
|
|
|
9
10
|
return projectLayout(root).stateDir;
|
|
10
11
|
}
|
|
11
12
|
//#endregion
|
|
12
|
-
export { DEFAULT_WINDOW_MS, MCP_TTL_MS, REQUIRED_AGENTS, TRIVIAL_BUDGET, WEBFETCH_TTL_MS, activityFor, aipilotPostToolUse, cacheQueryOf, cartoSessionStart, claudeHome, cleanupSession, countFiles, defaultStateDir, detectDuplication, detectSolidProfile, devContext, dispatchAipilot, dispatchLessons, dispatchLifecycle, dispatchMemory, dryGate, extractSymbols, fusengineCache, gate, generateEcosystemMap, generateProjectMap, getFileDesc, gitContext, handleHook, handlePre, harnessStateDir, injectRules, isMcpTool, isProject, isoUtc, lessonsFileFor, lessonsStateFileFor, lifecycleStdout, listChildren, loadEnriched, loadSecurityState, loadSessionState, logToolFailure, mcpPostStore, mcpPreIntercept, mergeLines, normalizeEvent, postEditContext, postEditTypescript, postTrackingSideEffects, preCommitGate, projectContext, projectHash, promptSubmitContext, pruneEmptyDirs, purgeTtlTree, queryOf, readRules, recordActivity, removeOldFiles, respond, runSessionStartCleanups, sanitizeSessionId, saveApexState, saveSecurityState, saveSessionState, securityAdvisory, securityStateDir, securityStatePath, seoPostToolUse, seoPostToolUseResponse, sessionStartCore, sessionStatePath, sessionsDir, solidDetectStart, subagentCacheContext, taskContext, todayUtc, trackAgentMemory, trackEnrichment, trackFile, trackMcpResearch, trackSessionChanges, trackSkillRead, trackWatchResearch, trimLogFile, validateRulesLoaded, validateTeammateOutput, writePluginMap, writeTree };
|
|
13
|
+
export { DEFAULT_WINDOW_MS, MCP_TTL_MS, REQUIRED_AGENTS, TRIVIAL_BUDGET, WEBFETCH_TTL_MS, activityFor, aipilotPostToolUse, cacheQueryOf, cartoSessionStart, claudeHome, cleanupSession, countFiles, defaultStateDir, detectDuplication, detectSolidProfile, devContext, dispatchAipilot, dispatchLessons, dispatchLifecycle, dispatchMemory, dryGate, extractSymbols, fuseHarnessHome, fusengineCache, gate, generateEcosystemMap, generateProjectMap, getFileDesc, gitContext, handleHook, handlePre, harnessStateDir, injectRules, isMcpTool, isProject, isoUtc, lessonsFileFor, lessonsStateFileFor, lifecycleStdout, listChildren, loadEnriched, loadSecurityState, loadSessionState, logToolFailure, mcpPostStore, mcpPreIntercept, mergeLines, normalizeEvent, postEditContext, postEditTypescript, postTrackingSideEffects, preCommitGate, projectContext, projectHash, promptSubmitContext, pruneEmptyDirs, purgeTtlTree, queryOf, readRules, recordActivity, removeOldFiles, respond, runSessionStartCleanups, sanitizeSessionId, saveApexState, saveSecurityState, saveSessionState, securityAdvisory, securityStateDir, securityStatePath, seoPostToolUse, seoPostToolUseResponse, sessionStartCore, sessionStatePath, sessionsDir, solidDetectStart, subagentCacheContext, taskContext, todayUtc, trackAgentMemory, trackEnrichment, trackFile, trackMcpResearch, trackSessionChanges, trackSkillRead, trackWatchResearch, trimLogFile, validateRulesLoaded, validateTeammateOutput, writePluginMap, writeTree };
|
package/dist/state/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ensureStateDir, c as stateFilePath, i as apexStateDir, l as acquireLock, n as taskCreate, o as loadState, r as taskStart, s as saveState, t as taskComplete } from "../state-
|
|
1
|
+
import { a as ensureStateDir, c as stateFilePath, i as apexStateDir, l as acquireLock, n as taskCreate, o as loadState, r as taskStart, s as saveState, t as taskComplete } from "../state-9lWvvWk8.mjs";
|
|
2
2
|
export { acquireLock, apexStateDir, ensureStateDir, loadState, saveState, stateFilePath, taskComplete, taskCreate, taskStart };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as writeJsonFile, i as readJsonFile, n as ensureDir } from "./json-io-
|
|
1
|
+
import { a as writeJsonFile, i as readJsonFile, n as ensureDir } from "./json-io-DisYd2fb.mjs";
|
|
2
2
|
import { mkdir, rmdir } from "node:fs/promises";
|
|
3
3
|
//#region src/state/lock.ts
|
|
4
4
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
@@ -1,8 +1,55 @@
|
|
|
1
|
-
import { a as writeJsonFile, i as readJsonFile } from "./json-io-
|
|
1
|
+
import { a as writeJsonFile, i as readJsonFile, t as atomicWrite } from "./json-io-DisYd2fb.mjs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { createHmac, randomBytes } from "node:crypto";
|
|
6
|
+
//#region src/runtime/home-state.ts
|
|
7
|
+
/** Home `~/.claude` dir — per-harness config (CLAUDE.md, logs, plugins). */
|
|
8
|
+
function claudeHome(home = homedir()) {
|
|
9
|
+
return join(home, ".claude");
|
|
10
|
+
}
|
|
11
|
+
/** Neutral, harness-agnostic home for fuse-harness's OWN cache/state: `~/.fuse-harness`. */
|
|
12
|
+
function fuseHarnessHome(home = homedir()) {
|
|
13
|
+
return join(home, ".fuse-harness");
|
|
14
|
+
}
|
|
15
|
+
/** `~/.fuse-harness/cache` base dir for session/cache state (shared across harnesses). */
|
|
16
|
+
function fusengineCache(home = homedir()) {
|
|
17
|
+
return join(fuseHarnessHome(home), "cache");
|
|
18
|
+
}
|
|
19
|
+
/** `~/.fuse-harness/cache/sessions` — per-session JSON state dir. */
|
|
20
|
+
function sessionsDir(home = homedir()) {
|
|
21
|
+
return join(fusengineCache(home), "sessions");
|
|
22
|
+
}
|
|
23
|
+
const SID_RE = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
24
|
+
/** Validate a session id (1-128 url-safe chars); null when invalid. */
|
|
25
|
+
function sanitizeSessionId(sid) {
|
|
26
|
+
const s = String(sid ?? "").trim();
|
|
27
|
+
return SID_RE.test(s) ? s : null;
|
|
28
|
+
}
|
|
29
|
+
/** Unified per-session state file path: `sessions/session-<sid>.json`. */
|
|
30
|
+
function sessionStatePath(sid, home = homedir()) {
|
|
31
|
+
return join(sessionsDir(home), `session-${sid}.json`);
|
|
32
|
+
}
|
|
33
|
+
/** Load a session-state dict, or `{}` when missing/corrupt (mirrors Python). */
|
|
34
|
+
function loadSessionState(sid, home = homedir()) {
|
|
35
|
+
const path = sessionStatePath(sid, home);
|
|
36
|
+
try {
|
|
37
|
+
if (!existsSync(path)) return {};
|
|
38
|
+
const data = JSON.parse(readFileSync(path, "utf-8"));
|
|
39
|
+
return typeof data === "object" && data !== null && !Array.isArray(data) ? data : {};
|
|
40
|
+
} catch {
|
|
41
|
+
return {};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** Atomically persist a session-state dict (0o600 via atomicWrite, indent 2). */
|
|
45
|
+
function saveSessionState(sid, state, home = homedir()) {
|
|
46
|
+
mkdirSync(sessionsDir(home), {
|
|
47
|
+
recursive: true,
|
|
48
|
+
mode: 448
|
|
49
|
+
});
|
|
50
|
+
atomicWrite(sessionStatePath(sid, home), JSON.stringify(state, null, 2));
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
6
53
|
//#region src/tracking/session-state.ts
|
|
7
54
|
/** A fresh, empty track. */
|
|
8
55
|
function emptyTrack() {
|
|
@@ -97,7 +144,7 @@ function recordBrainstormRequired(track, required) {
|
|
|
97
144
|
* freshness) is the primary guarantee.
|
|
98
145
|
* @packageDocumentation
|
|
99
146
|
*/
|
|
100
|
-
const HARNESS_DIR =
|
|
147
|
+
const HARNESS_DIR = fuseHarnessHome();
|
|
101
148
|
const KEY_PATH = join(HARNESS_DIR, ".key");
|
|
102
149
|
const NONCE_PATH = join(HARNESS_DIR, ".nonce");
|
|
103
150
|
/** Load (or create on first use) the per-machine HMAC key stored at mode 0600. */
|
|
@@ -181,4 +228,4 @@ async function saveTrack(file, track) {
|
|
|
181
228
|
writeLastNonce(envelope.nonce);
|
|
182
229
|
}
|
|
183
230
|
//#endregion
|
|
184
|
-
export { emptyTrack as a, recordDoc as c, trivialCount as d, agentsFresh as i, recordRefRead as l, saveTrack as n, recordAgent as o, verifyTrack as r, recordBrainstormRequired as s, loadTrack as t, recordTrivialEdit as u };
|
|
231
|
+
export { saveSessionState as _, emptyTrack as a, recordDoc as c, trivialCount as d, claudeHome as f, sanitizeSessionId as g, loadSessionState as h, agentsFresh as i, recordRefRead as l, fusengineCache as m, saveTrack as n, recordAgent as o, fuseHarnessHome as p, verifyTrack as r, recordBrainstormRequired as s, loadTrack as t, recordTrivialEdit as u, sessionStatePath as v, sessionsDir as y };
|
package/dist/tracking/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as emptyTrack, c as recordDoc, d as trivialCount, i as agentsFresh, l as recordRefRead, n as saveTrack, o as recordAgent, s as recordBrainstormRequired, t as loadTrack, u as recordTrivialEdit } from "../store-
|
|
1
|
+
import { a as emptyTrack, c as recordDoc, d as trivialCount, i as agentsFresh, l as recordRefRead, n as saveTrack, o as recordAgent, s as recordBrainstormRequired, t as loadTrack, u as recordTrivialEdit } from "../store-CdWOQ9zD.mjs";
|
|
2
2
|
export { agentsFresh, emptyTrack, loadTrack, recordAgent, recordBrainstormRequired, recordDoc, recordRefRead, recordTrivialEdit, saveTrack, trivialCount };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as resolveMaxLines } from "./limits-CHn8AIL1.mjs";
|
|
2
|
-
import { j as countLines } from "./evaluate-
|
|
2
|
+
import { j as countLines } from "./evaluate-CeivW6G0.mjs";
|
|
3
3
|
import { r as isDocConsulted, t as formatDocDeny } from "./doc-helpers-BhzDmJ18.mjs";
|
|
4
4
|
import { t as routeReferences } from "./router-BfX0hJg8.mjs";
|
|
5
5
|
import { join } from "node:path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusengine/harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.42",
|
|
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",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as compactJson } from "./compact-json-DK2nX-MK.mjs";
|
|
2
2
|
import { dirname } from "node:path";
|
|
3
3
|
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
4
|
-
import { createHash, randomUUID } from "node:crypto";
|
|
5
4
|
import { mkdir } from "node:fs/promises";
|
|
5
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
6
6
|
//#region src/util/json-io.ts
|
|
7
7
|
/** Atomically write `data` to `path` (temp + rename, 0o600). Cross-FS safe on macOS/Linux. */
|
|
8
8
|
function atomicWrite(path, data) {
|