@fusengine/harness 0.1.80 → 0.1.83
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/dist/adapters/claude/index.d.mts +1 -1
- package/dist/adapters/claude/index.mjs +1 -1
- package/dist/adapters/cline/index.mjs +1 -1
- package/dist/adapters/codex/index.d.mts +11 -12
- package/dist/adapters/codex/index.mjs +3 -3
- package/dist/adapters/cursor/index.d.mts +29 -29
- package/dist/adapters/cursor/index.mjs +1 -1
- package/dist/adapters/gemini/index.mjs +1 -1
- package/dist/adapters/hermes/index.d.mts +22 -23
- package/dist/adapters/hermes/index.mjs +1 -1
- package/dist/adapters/kimi/index.d.mts +54 -46
- package/dist/adapters/kimi/index.mjs +2 -2
- package/dist/cache/index.d.mts +1 -1
- package/dist/{claude-51RSspJ1.mjs → claude-D93HY8dq.mjs} +2 -2
- package/dist/cli/bin.d.mts +1 -1
- package/dist/cli/bin.mjs +129 -38
- package/dist/cli/index.d.mts +3 -3
- package/dist/cli/index.mjs +1 -1
- package/dist/config/index.d.mts +2 -2
- package/dist/config/index.mjs +4 -4
- package/dist/detect/index.d.mts +2 -1
- package/dist/{doc-helpers-CEKzGg2u.d.mts → doc-helpers-BGCzP9VF.d.mts} +12 -12
- package/dist/{dotenv-B26N_uGr.mjs → dotenv-DoqNlALG.mjs} +29 -2
- package/dist/{evaluate-ClfbCDiY.mjs → evaluate-B4-MhOy_.mjs} +322 -32
- package/dist/freshness/index.d.mts +2 -2
- package/dist/{handle-B7YufFz9.mjs → handle-F35Gx-QS.mjs} +596 -174
- package/dist/{hermes-rTmVdhUL.mjs → hermes-1PUEoY8q.mjs} +2 -2
- package/dist/{home-state-BXf38Zi1.mjs → home-state-oUGFB4ds.mjs} +4 -2
- package/dist/index-84heAAm_.d.mts +12 -0
- package/dist/index-CaxrMD1A.d.mts +1 -0
- package/dist/index-CigBu4K9.d.mts +14 -0
- package/dist/{index-DGxNjXW7.d.mts → index-D4C2-IIc.d.mts} +6 -8
- package/dist/index-DBgnIZn9.d.mts +756 -0
- package/dist/{index-mmRF3KNp.d.mts → index-DEfz82BP.d.mts} +12 -13
- package/dist/{index-BUwEmIK-.d.mts → index-DhmV2MPh.d.mts} +31 -31
- package/dist/index-oXXPs2xl.d.mts +119 -0
- package/dist/index-p9fLrSOD.d.mts +27 -0
- package/dist/index.d.mts +11 -11
- package/dist/index.mjs +8 -8
- package/dist/init/index.d.mts +8 -9
- package/dist/init/index.mjs +1 -1
- package/dist/{kimi-C7FGprQz.mjs → kimi-ChbcU2uI.mjs} +17 -3
- package/dist/{layout-C0jaaCQC.mjs → layout-KWoE_Mqn.mjs} +1 -0
- package/dist/limits-DG5pl-5s.mjs +59 -0
- package/dist/memory/index.mjs +1 -1
- package/dist/policy/index.d.mts +2 -3
- package/dist/policy/index.mjs +4 -4
- package/dist/prompt/index.d.mts +2 -1
- package/dist/refs/index.d.mts +1 -1
- package/dist/{registry-CymilZiZ.mjs → registry-IhHk2KlT.mjs} +1 -1
- package/dist/{run-3tyTW9Ud.mjs → run-D_WchZ3R.mjs} +1 -1
- package/dist/{run-Do2JltgU.mjs → run-TAXNRSpD.mjs} +1 -1
- package/dist/runtime/index.d.mts +453 -451
- package/dist/runtime/index.mjs +3 -3
- package/dist/{session-state-CY4iohn_.d.mts → session-state-D5gLr66m.d.mts} +29 -30
- package/dist/{skill-path-CDvR4bbF.mjs → skill-path-DhBGlQe3.mjs} +2 -2
- package/dist/store-Dw08Amqh.mjs +845 -0
- package/dist/tracking/index.d.mts +23 -13
- package/dist/tracking/index.mjs +2 -2
- package/dist/{types-DVbIl9md.d.mts → types-C0-igRKr.d.mts} +8 -8
- package/dist/types-DvXTI71X.d.mts +15 -0
- package/dist/util/index.d.mts +1 -1
- package/dist/{validate-CkmquRDV.mjs → validate-Bf-EsbDh.mjs} +279 -20
- package/package.json +163 -163
- package/dist/apex-Wdi1nq_w.d.mts +0 -73
- package/dist/harness-BQ5_Wnva.d.mts +0 -27
- package/dist/index-BEMumjOw.d.mts +0 -27
- package/dist/index-BIGVNQB8.d.mts +0 -576
- package/dist/index-BKZ67WMa.d.mts +0 -1
- package/dist/index-BOBXQ91y.d.mts +0 -12
- package/dist/index-BVVgDSdq.d.mts +0 -1
- package/dist/index-B_VHbsaJ.d.mts +0 -96
- package/dist/limits-CHn8AIL1.mjs +0 -31
- package/dist/store-nDZ3eLBQ.mjs +0 -349
package/dist/runtime/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as projectLayout } from "../layout-
|
|
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-
|
|
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-
|
|
1
|
+
import { r as projectLayout } from "../layout-KWoE_Mqn.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-oUGFB4ds.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-F35Gx-QS.mjs";
|
|
4
4
|
//#region src/runtime/storage.ts
|
|
5
5
|
/**
|
|
6
6
|
* The project's single state dir (`<root>/.harness`) — neutral + harness-agnostic,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as AuthEntry } from "./doc-helpers-
|
|
2
|
-
|
|
1
|
+
import { t as AuthEntry } from "./doc-helpers-BGCzP9VF.mjs";
|
|
3
2
|
//#region src/policy/apex-authorization.d.ts
|
|
4
3
|
/** Pending doc-credit target written on a Check-1 deny (parity enforce-apex-phases.ts:80 `state.target`). */
|
|
5
4
|
interface SessionTarget {
|
|
@@ -11,11 +10,11 @@ interface SessionTarget {
|
|
|
11
10
|
//#endregion
|
|
12
11
|
//#region src/tracking/receipts.d.ts
|
|
13
12
|
/**
|
|
14
|
-
* A verification receipt captured at PostToolUse from a Bash verification
|
|
15
|
-
* command. Feeds the TaskCompleted receipt gate: a "done" over modified code
|
|
16
|
-
* files is refused unless a fresh, passing receipt (`exitCode === 0`, `fail === 0`)
|
|
17
|
-
* exists. `pass`/`fail` are parsed only for test runs; `tsc` carries the code alone.
|
|
18
|
-
*/
|
|
13
|
+
* A verification receipt captured at PostToolUse from a Bash verification
|
|
14
|
+
* command. Feeds the TaskCompleted receipt gate: a "done" over modified code
|
|
15
|
+
* files is refused unless a fresh, passing receipt (`exitCode === 0`, `fail === 0`)
|
|
16
|
+
* exists. `pass`/`fail` are parsed only for test runs; `tsc` carries the code alone.
|
|
17
|
+
*/
|
|
19
18
|
interface Receipt {
|
|
20
19
|
kind: "tsc" | "test";
|
|
21
20
|
exitCode: number;
|
|
@@ -32,13 +31,13 @@ interface SessionTrack {
|
|
|
32
31
|
authorizations: Record<string, AuthEntry>;
|
|
33
32
|
refsRead: string[];
|
|
34
33
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
* Epoch-ms timestamp of each reference read, keyed by `refsRead` path (parity
|
|
35
|
+
* track-solid-reads.py `solid_reads[].timestamp`). Optional: tracks persisted
|
|
36
|
+
* before this field existed only carry `refsRead`, and such paths count as
|
|
37
|
+
* read (backward compat). PARITY: only the SOLID-read gate TTL-checks these —
|
|
38
|
+
* Python TTL-izes SOLID reads exclusively (require-solid-read.py); the other
|
|
39
|
+
* refsRead consumers (skill-trigger/shadcn/tailwind/design) stay session-scoped.
|
|
40
|
+
*/
|
|
42
41
|
refsReadAt?: Record<string, number>;
|
|
43
42
|
/** Framework awaiting doc credit after a Check-1 deny. PERSISTS — {@link recordDoc} cross-credits it on EVERY consultation, never clears it; only the next deny replaces it via {@link recordTarget} (parity track-doc-consultation.py:62). */
|
|
44
43
|
target?: SessionTarget;
|
|
@@ -55,26 +54,26 @@ interface SessionTrack {
|
|
|
55
54
|
/** A fresh, empty track. */
|
|
56
55
|
declare function emptyTrack(): SessionTrack;
|
|
57
56
|
/**
|
|
58
|
-
* Record a doc consultation (Context7/Exa/web) for a framework in this session:
|
|
59
|
-
* the Check-2 credit (`doc_sessions` + `sources`) plus the Check-1 stamp
|
|
60
|
-
* (`sessions` + `doc_consulted` = ISO of `now`). PARITY track-doc-consultation.py
|
|
61
|
-
* :62-70 — a `target` left by a Check-1 deny (enforce-apex-phases.ts:80) is
|
|
62
|
-
* cross-credited on EVERY consultation, with NO TTL on `target.set_at`, and the
|
|
63
|
-
* target PERSISTS (only the next deny replaces it via {@link recordTarget});
|
|
64
|
-
* single-shot clearing or TTL-gating the target re-opened the deny loop when a
|
|
65
|
-
* consultation landed > TTL after the deny. Immutable.
|
|
66
|
-
*/
|
|
57
|
+
* Record a doc consultation (Context7/Exa/web) for a framework in this session:
|
|
58
|
+
* the Check-2 credit (`doc_sessions` + `sources`) plus the Check-1 stamp
|
|
59
|
+
* (`sessions` + `doc_consulted` = ISO of `now`). PARITY track-doc-consultation.py
|
|
60
|
+
* :62-70 — a `target` left by a Check-1 deny (enforce-apex-phases.ts:80) is
|
|
61
|
+
* cross-credited on EVERY consultation, with NO TTL on `target.set_at`, and the
|
|
62
|
+
* target PERSISTS (only the next deny replaces it via {@link recordTarget});
|
|
63
|
+
* single-shot clearing or TTL-gating the target re-opened the deny loop when a
|
|
64
|
+
* consultation landed > TTL after the deny. Immutable.
|
|
65
|
+
*/
|
|
67
66
|
declare function recordDoc(track: SessionTrack, framework: string, sessionId: string, source: string, now?: number): SessionTrack;
|
|
68
67
|
/** Set the pending doc-credit target (written by the runtime on a Check-1 deny). Immutable. */
|
|
69
68
|
declare function recordTarget(track: SessionTrack, target: SessionTarget): SessionTrack;
|
|
70
69
|
/**
|
|
71
|
-
* Record that a SOLID reference file was read (deduped). Immutable. When `now`
|
|
72
|
-
* (epoch ms — the tool event's own timestamp, never a fresh `Date.now()`) is
|
|
73
|
-
* supplied, the read is stamped in `refsReadAt`, refreshed on re-reads so the
|
|
74
|
-
* LATEST read drives the SOLID TTL (parity track-solid-reads.py, which appends
|
|
75
|
-
* a timestamped entry per read; require-solid-read.py checks the most recent).
|
|
76
|
-
* Callers that omit `now` keep the legacy untimestamped behavior.
|
|
77
|
-
*/
|
|
70
|
+
* Record that a SOLID reference file was read (deduped). Immutable. When `now`
|
|
71
|
+
* (epoch ms — the tool event's own timestamp, never a fresh `Date.now()`) is
|
|
72
|
+
* supplied, the read is stamped in `refsReadAt`, refreshed on re-reads so the
|
|
73
|
+
* LATEST read drives the SOLID TTL (parity track-solid-reads.py, which appends
|
|
74
|
+
* a timestamped entry per read; require-solid-read.py checks the most recent).
|
|
75
|
+
* Callers that omit `now` keep the legacy untimestamped behavior.
|
|
76
|
+
*/
|
|
78
77
|
declare function recordRefRead(track: SessionTrack, path: string, now?: number): SessionTrack;
|
|
79
78
|
/** Record an agent/tool call with a timestamp + optional quality. Immutable. */
|
|
80
79
|
declare function recordAgent(track: SessionTrack, name: string, ts: number, quality?: AgentQuality): SessionTrack;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as HOME_DIR } from "./dotenv-
|
|
1
|
+
import { t as HOME_DIR } from "./dotenv-DoqNlALG.mjs";
|
|
2
2
|
import { t as detectHarness } from "./harness-BMuLJ9lm.mjs";
|
|
3
|
-
import { l as PLUGINS_DIR } from "./home-state-
|
|
3
|
+
import { l as PLUGINS_DIR } from "./home-state-oUGFB4ds.mjs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
6
6
|
import { homedir } from "node:os";
|