@fusengine/harness 0.1.47 → 0.1.49
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 +2 -2
- package/dist/adapters/claude/index.mjs +2 -2
- package/dist/adapters/cline/index.mjs +1 -1
- package/dist/adapters/codex/index.d.mts +1 -1
- package/dist/adapters/codex/index.mjs +1 -1
- package/dist/adapters/cursor/index.d.mts +10 -3
- package/dist/adapters/cursor/index.mjs +3 -3
- package/dist/adapters/gemini/index.mjs +1 -1
- package/dist/adapters/hermes/index.d.mts +54 -0
- package/dist/adapters/hermes/index.mjs +2 -0
- package/dist/apex-Wdi1nq_w.d.mts +73 -0
- package/dist/{claude-U1KTaRG4.mjs → claude-BxC9semG.mjs} +30 -9
- package/dist/cli/bin.mjs +5 -5
- package/dist/cli/index.mjs +1 -1
- package/dist/config/index.d.mts +1 -1
- package/dist/config/index.mjs +1 -1
- package/dist/detect/index.d.mts +1 -1
- package/dist/detect/index.mjs +1 -1
- package/dist/{doc-helpers-BNfYWvYv.d.mts → doc-helpers-CEKzGg2u.d.mts} +2 -0
- package/dist/{dotenv-B9nM4cuQ.mjs → dotenv-Jj8aL1FL.mjs} +2 -1
- package/dist/{evaluate-qYC5xClb.mjs → evaluate-CNAzgxnN.mjs} +3 -85
- package/dist/freshness/index.d.mts +1 -1
- package/dist/{handle-DUlUbhyF.mjs → handle-D1hHqHvh.mjs} +422 -62
- package/dist/{harness-C8Nxxyn_.mjs → harness-Cb9xR8dC.mjs} +6 -3
- package/dist/{harness-BPPu5CrN.d.mts → harness-s1Fce_dL.d.mts} +1 -1
- package/dist/hermes-DWXCRFZU.mjs +54 -0
- package/dist/home-state-D0RLWP8J.mjs +134 -0
- package/dist/{index-l9Xvxrx7.d.mts → index-BfMsILmg.d.mts} +2 -52
- package/dist/{index-BxjzFraL.d.mts → index-DZCLmSoO.d.mts} +11 -9
- package/dist/{index-BXPySPxE.d.mts → index-jj_EzZRv.d.mts} +1 -1
- package/dist/index.d.mts +7 -6
- package/dist/index.mjs +6 -5
- package/dist/init/index.d.mts +1 -1
- package/dist/policy/index.d.mts +3 -2
- package/dist/policy/index.mjs +4 -3
- package/dist/prompt/index.d.mts +1 -1
- package/dist/{run-CaqeQFYp.mjs → run-DZvP_9xB.mjs} +1 -1
- package/dist/runtime/index.d.mts +23 -8
- package/dist/runtime/index.mjs +2 -2
- package/dist/session-state-DMpotbRz.d.mts +73 -0
- package/dist/skill-path-DhItkBzk.mjs +95 -0
- package/dist/store-QSSTO3lY.mjs +349 -0
- package/dist/tracking/index.d.mts +2 -2
- package/dist/tracking/index.mjs +2 -2
- package/dist/{types-D56jSgD9.d.mts → types-DVbIl9md.d.mts} +6 -0
- package/dist/{validate-DVV4nRfr.mjs → validate-DCQ8dkdL.mjs} +34 -103
- package/package.json +7 -2
- package/dist/home-state-mKZxP4oZ.mjs +0 -52
- package/dist/session-state-D4F_Dub6.d.mts +0 -35
- package/dist/store-CNjFenWe.mjs +0 -184
|
@@ -14,7 +14,8 @@ const ENV_SIGNALS = [
|
|
|
14
14
|
["AIDER", "aider"],
|
|
15
15
|
["KIRO", "kiro"],
|
|
16
16
|
["GOOSE", "goose"],
|
|
17
|
-
["AMP", "amp"]
|
|
17
|
+
["AMP", "amp"],
|
|
18
|
+
["HERMES_SESSION_ID", "hermes"]
|
|
18
19
|
];
|
|
19
20
|
/** `AGENT=<name>` / `AI_AGENT=<name>` standard value -> harness id. */
|
|
20
21
|
const STD_NAMES = {
|
|
@@ -29,7 +30,8 @@ const STD_NAMES = {
|
|
|
29
30
|
opencode: "opencode",
|
|
30
31
|
gemini: "gemini-cli",
|
|
31
32
|
copilot: "copilot",
|
|
32
|
-
kiro: "kiro"
|
|
33
|
+
kiro: "kiro",
|
|
34
|
+
hermes: "hermes"
|
|
33
35
|
};
|
|
34
36
|
/** Harnesses exposing a native hook system (vs CLI-only integration). */
|
|
35
37
|
const HOOK_CAPABLE = /* @__PURE__ */ new Set([
|
|
@@ -38,7 +40,8 @@ const HOOK_CAPABLE = /* @__PURE__ */ new Set([
|
|
|
38
40
|
"cursor",
|
|
39
41
|
"cline",
|
|
40
42
|
"gemini-cli",
|
|
41
|
-
"opencode"
|
|
43
|
+
"opencode",
|
|
44
|
+
"hermes"
|
|
42
45
|
]);
|
|
43
46
|
/** Integration mode for a harness id. */
|
|
44
47
|
function modeFor(id) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/detect/interfaces/types.d.ts
|
|
2
2
|
/** Known AI coding harnesses detectable at runtime. */
|
|
3
|
-
type HarnessId = "claude-code" | "codex" | "cursor" | "cline" | "gemini-cli" | "opencode" | "windsurf" | "copilot" | "aider" | "kiro" | "goose" | "amp" | "unknown";
|
|
3
|
+
type HarnessId = "claude-code" | "codex" | "cursor" | "cline" | "gemini-cli" | "opencode" | "windsurf" | "copilot" | "aider" | "kiro" | "goose" | "amp" | "hermes" | "unknown";
|
|
4
4
|
/** Integration mode: `hook` = native lifecycle hooks; `cli` = run as an external step. */
|
|
5
5
|
type HarnessMode = "hook" | "cli";
|
|
6
6
|
/** How the harness was identified. */
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { t as evaluate } from "./evaluate-CNAzgxnN.mjs";
|
|
2
|
+
import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
|
|
3
|
+
import { c as readClaudeInput } from "./claude-BxC9semG.mjs";
|
|
4
|
+
//#region src/adapters/hermes/index.ts
|
|
5
|
+
/**
|
|
6
|
+
* Hermes Agent adapter (hook-mode). Nous Research's hermes-agent (2026) pipes a
|
|
7
|
+
* JSON payload to shell hooks on stdin and reads stdout back as JSON — config
|
|
8
|
+
* `~/.hermes/config.yaml` under `hooks:`, event `pre_tool_call`, scripts in
|
|
9
|
+
* `~/.hermes/agent-hooks/`. The INPUT shape matches Claude Code
|
|
10
|
+
* (`hook_event_name`/`tool_name`/`tool_input`/`cwd`), so the Claude reader is
|
|
11
|
+
* reused; the OUTPUT does not: a block is `{ decision: "block", reason }`
|
|
12
|
+
* (no `permissionDecision`, no interactive "ask"), `{}` allows, and
|
|
13
|
+
* `{ context }` injects LLM context. Tool fields verified: `terminal` takes
|
|
14
|
+
* `command`; `write_file` takes `path` + `content`.
|
|
15
|
+
*/
|
|
16
|
+
/** Read & parse the Hermes hook stdin payload (same wire shape as Claude). */
|
|
17
|
+
async function readHermesInput() {
|
|
18
|
+
return await readClaudeInput();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Render a portable {@link Prompt} as a Hermes hook response string:
|
|
22
|
+
* `block` -> `{decision:"block",reason}`; `ask`/`inform` -> non-blocking
|
|
23
|
+
* `{context}` — Hermes has no interactive "ask" state, so both degrade to
|
|
24
|
+
* context injection, mirroring the gemini-cli/cline routing in `respond()`.
|
|
25
|
+
* @param prompt - The portable policy prompt.
|
|
26
|
+
* @returns The native Hermes JSON response string.
|
|
27
|
+
*/
|
|
28
|
+
function toHermesResponse(prompt) {
|
|
29
|
+
const msg = formatPrompt(prompt);
|
|
30
|
+
const res = prompt.kind === "block" ? {
|
|
31
|
+
decision: "block",
|
|
32
|
+
reason: msg
|
|
33
|
+
} : { context: msg };
|
|
34
|
+
return JSON.stringify(res);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Run the bundled policy over a Hermes `pre_tool_call` payload and return the
|
|
38
|
+
* native response string, or null to allow (the hook then prints `{}`).
|
|
39
|
+
* @param input - Parsed `pre_tool_call` stdin payload.
|
|
40
|
+
* @returns Native response JSON, or null when the tool use is allowed.
|
|
41
|
+
*/
|
|
42
|
+
function guard(input) {
|
|
43
|
+
const t = input.tool_input;
|
|
44
|
+
const r = evaluate({
|
|
45
|
+
tool: input.tool_name ?? "write_file",
|
|
46
|
+
filePath: t?.path ?? t?.file_path,
|
|
47
|
+
content: t?.content,
|
|
48
|
+
command: t?.command
|
|
49
|
+
});
|
|
50
|
+
if (r.decision === "allow" || !r.prompt) return null;
|
|
51
|
+
return toHermesResponse(r.prompt);
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { readHermesInput as n, toHermesResponse as r, guard as t };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { i as splitTarget, r as resolveMaxLines } from "./limits-CHn8AIL1.mjs";
|
|
2
|
+
import { t as atomicWrite } from "./json-io-DisYd2fb.mjs";
|
|
3
|
+
import { basename, join } from "node:path";
|
|
4
|
+
import { existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
5
|
+
import { homedir } from "node:os";
|
|
6
|
+
//#region src/policy/file-size.ts
|
|
7
|
+
/**
|
|
8
|
+
* Fixed marketplace plugins root — parity with Python `enforce-file-size.py`'s
|
|
9
|
+
* literal, unexpanded `~/...` string. Exported: reused by
|
|
10
|
+
* `policy/apex.ts::solidReadGate` for its "no reference matched" deny message.
|
|
11
|
+
*/
|
|
12
|
+
const PLUGINS_DIR = "~/.claude/plugins/marketplaces/fusengine-plugins/plugins";
|
|
13
|
+
/**
|
|
14
|
+
* Skill-dir fragment per framework — parity with Python
|
|
15
|
+
* `enforce-file-size.py::get_solid_ref()` (falls back to `generic/`). Exported:
|
|
16
|
+
* reused by `policy/apex.ts::solidReadGate` (see {@link PLUGINS_DIR}).
|
|
17
|
+
*/
|
|
18
|
+
const SOLID_REF = {
|
|
19
|
+
react: "react-expert/skills/solid-react/",
|
|
20
|
+
nextjs: "nextjs-expert/skills/solid-nextjs/",
|
|
21
|
+
laravel: "laravel-expert/skills/solid-php/",
|
|
22
|
+
swift: "swift-apple-expert/skills/solid-swift/"
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Count physical lines — parity with the Python `enforce-file-size.py`
|
|
26
|
+
* (`sum(1 for _ in f)`): every line counts (blanks and comments included), and a
|
|
27
|
+
* single trailing newline does not add a phantom line. The SOLID ceiling is
|
|
28
|
+
* measured on raw file length, not substantive code, to match the upstream plugin.
|
|
29
|
+
*/
|
|
30
|
+
function countLines(content) {
|
|
31
|
+
if (content === "") return 0;
|
|
32
|
+
return content.split("\n").length - (content.endsWith("\n") ? 1 : 0);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Count non-empty, non-comment lines — parity with the Python `count_code_lines`
|
|
36
|
+
* shared by the framework-specific SOLID validators: `_shared/scripts/validate_solid_common.py`
|
|
37
|
+
* (imported by `nextjs-expert/scripts/validate-nextjs-solid.py` and
|
|
38
|
+
* `swift-apple-expert/scripts/validate-swift-solid.py`), duplicated verbatim in
|
|
39
|
+
* `react-expert/scripts/validate-react-solid.py` / `laravel-expert/scripts/validate-laravel-solid.py`.
|
|
40
|
+
* Strips blank lines and lines starting with `//` or `*` — a SINGLE fixed rule
|
|
41
|
+
* for all 4 callers (the Python `comment` param defaults to, and every real
|
|
42
|
+
* call site leaves it at, `"//"` — never per-language despite covering
|
|
43
|
+
* ts/tsx/js/jsx, php and swift).
|
|
44
|
+
*
|
|
45
|
+
* Deliberately distinct from two other "code-only" counters already in this
|
|
46
|
+
* repo, neither of which is a faithful substitute here:
|
|
47
|
+
* - `countLoc` (`runtime/lifecycle/check-file-size.ts`): a genuinely
|
|
48
|
+
* per-language table (PHP additionally strips `#`, Python strips
|
|
49
|
+
* `#`/`"""`/`'''`) — ported from the unrelated `solid/scripts/check-file-size.py`.
|
|
50
|
+
* - `countCodeLines` (`runtime/lifecycle/aipilot/solid-compliance.ts`): also
|
|
51
|
+
* strips `#` — ported from `ai-pilot/scripts/check-solid-compliance.py`.
|
|
52
|
+
* Reusing either would silently strip PHP `#`/Python-style comments that the
|
|
53
|
+
* real react/nextjs/laravel/swift validators do NOT strip.
|
|
54
|
+
* @param content - The file content to measure.
|
|
55
|
+
*/
|
|
56
|
+
function countFrameworkCodeLines(content) {
|
|
57
|
+
let count = 0;
|
|
58
|
+
for (const raw of content.split("\n")) {
|
|
59
|
+
const line = raw.trim();
|
|
60
|
+
if (!line || line.startsWith("//") || line.startsWith("*")) continue;
|
|
61
|
+
count++;
|
|
62
|
+
}
|
|
63
|
+
return count;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Evaluate a file's line count against the SOLID limit.
|
|
67
|
+
* @param lines - the file's line count
|
|
68
|
+
* @param max - the limit (defaults to `resolveMaxLines()`)
|
|
69
|
+
*/
|
|
70
|
+
function evaluateFileSize(lines, max = resolveMaxLines(), filePath = "", framework = "generic", displayLines = lines) {
|
|
71
|
+
if (lines <= max) return {
|
|
72
|
+
ok: true,
|
|
73
|
+
lines,
|
|
74
|
+
max,
|
|
75
|
+
message: null
|
|
76
|
+
};
|
|
77
|
+
const split = splitTarget(max);
|
|
78
|
+
const fname = filePath ? basename(filePath) : "file";
|
|
79
|
+
return {
|
|
80
|
+
ok: false,
|
|
81
|
+
lines,
|
|
82
|
+
max,
|
|
83
|
+
message: `BLOCKED: '${fname}' has ${displayLines} lines (max: ${max}). TO SPLIT: 1) Read SOLID rules: ${PLUGINS_DIR}/${SOLID_REF[framework] ?? "generic/"} 2) Create new module files (<${split} lines each) 3) Use Write to replace '${fname}' with <${max} lines version.`
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/runtime/home-state.ts
|
|
88
|
+
/** Home `~/.claude` dir — per-harness config (CLAUDE.md, logs, plugins). */
|
|
89
|
+
function claudeHome(home = homedir()) {
|
|
90
|
+
return join(home, ".claude");
|
|
91
|
+
}
|
|
92
|
+
/** Neutral, harness-agnostic home for fuse-harness's OWN cache/state: `~/.fuse-harness`. */
|
|
93
|
+
function fuseHarnessHome(home = homedir()) {
|
|
94
|
+
return join(home, ".fuse-harness");
|
|
95
|
+
}
|
|
96
|
+
/** `~/.fuse-harness/cache` base dir for session/cache state (shared across harnesses). */
|
|
97
|
+
function fusengineCache(home = homedir()) {
|
|
98
|
+
return join(fuseHarnessHome(home), "cache");
|
|
99
|
+
}
|
|
100
|
+
/** `~/.fuse-harness/cache/sessions` — per-session JSON state dir. */
|
|
101
|
+
function sessionsDir(home = homedir()) {
|
|
102
|
+
return join(fusengineCache(home), "sessions");
|
|
103
|
+
}
|
|
104
|
+
const SID_RE = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
105
|
+
/** Validate a session id (1-128 url-safe chars); null when invalid. */
|
|
106
|
+
function sanitizeSessionId(sid) {
|
|
107
|
+
const s = String(sid ?? "").trim();
|
|
108
|
+
return SID_RE.test(s) ? s : null;
|
|
109
|
+
}
|
|
110
|
+
/** Unified per-session state file path: `sessions/session-<sid>.json`. */
|
|
111
|
+
function sessionStatePath(sid, home = homedir()) {
|
|
112
|
+
return join(sessionsDir(home), `session-${sid}.json`);
|
|
113
|
+
}
|
|
114
|
+
/** Load a session-state dict, or `{}` when missing/corrupt (mirrors Python). */
|
|
115
|
+
function loadSessionState(sid, home = homedir()) {
|
|
116
|
+
const path = sessionStatePath(sid, home);
|
|
117
|
+
try {
|
|
118
|
+
if (!existsSync(path)) return {};
|
|
119
|
+
const data = JSON.parse(readFileSync(path, "utf-8"));
|
|
120
|
+
return typeof data === "object" && data !== null && !Array.isArray(data) ? data : {};
|
|
121
|
+
} catch {
|
|
122
|
+
return {};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** Atomically persist a session-state dict (0o600 via atomicWrite, indent 2). */
|
|
126
|
+
function saveSessionState(sid, state, home = homedir()) {
|
|
127
|
+
mkdirSync(sessionsDir(home), {
|
|
128
|
+
recursive: true,
|
|
129
|
+
mode: 448
|
|
130
|
+
});
|
|
131
|
+
atomicWrite(sessionStatePath(sid, home), JSON.stringify(state, null, 2));
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
export { sanitizeSessionId as a, sessionsDir as c, countFrameworkCodeLines as d, countLines as f, loadSessionState as i, PLUGINS_DIR as l, fuseHarnessHome as n, saveSessionState as o, evaluateFileSize as p, fusengineCache as r, sessionStatePath as s, claudeHome as t, SOLID_REF as u };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { t as Prompt } from "./types-
|
|
2
|
-
import { t as AuthEntry } from "./doc-helpers-BNfYWvYv.mjs";
|
|
3
|
-
import { t as RefMeta } from "./types-CY5qT2X1.mjs";
|
|
1
|
+
import { t as Prompt } from "./types-DVbIl9md.mjs";
|
|
4
2
|
|
|
5
3
|
//#region src/policy/detect-project.d.ts
|
|
6
4
|
/** Project types detected from filesystem indicators. */
|
|
@@ -155,54 +153,6 @@ interface PolicyResult {
|
|
|
155
153
|
*/
|
|
156
154
|
declare function evaluate(ctx: PolicyContext): PolicyResult;
|
|
157
155
|
//#endregion
|
|
158
|
-
//#region src/policy/apex-gates.d.ts
|
|
159
|
-
/** Gate: the routed SOLID references for this edit must have been read. */
|
|
160
|
-
declare const solidReadGate: ApexGate;
|
|
161
|
-
/** Gate: the required prior agents (explore + research) must have run within the window. */
|
|
162
|
-
declare const freshnessGate: ApexGate;
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region src/policy/apex.d.ts
|
|
165
|
-
/**
|
|
166
|
-
* Session context for the stateful APEX gates. The harness adapter supplies this
|
|
167
|
-
* (the package owns the gate LOGIC; recording the session activity is the
|
|
168
|
-
* adapter's tracking layer).
|
|
169
|
-
*/
|
|
170
|
-
interface ApexContext {
|
|
171
|
-
sessionId: string;
|
|
172
|
-
framework: string;
|
|
173
|
-
filePath: string;
|
|
174
|
-
content: string;
|
|
175
|
-
/** Doc-consultation authorizations from session state (Context7/Exa). */
|
|
176
|
-
authorizations?: Record<string, AuthEntry>;
|
|
177
|
-
/** Available SOLID references for the framework's skill. */
|
|
178
|
-
refs?: RefMeta[];
|
|
179
|
-
/** Absolute paths of SOLID refs already read this session. */
|
|
180
|
-
refsRead?: string[];
|
|
181
|
-
/** Whether the required prior agents (explore + research) ran within the freshness window. */
|
|
182
|
-
agentsFresh?: boolean;
|
|
183
|
-
/** Names of REQUIRED_AGENTS that have NOT run fresh (subset), for a precise freshnessGate message. Absent → generic wording. */
|
|
184
|
-
missingAgents?: string[];
|
|
185
|
-
/** Freshness window in ms, used only to label the block message with its TTL (e.g. "2min"). */
|
|
186
|
-
windowMs?: number;
|
|
187
|
-
/** Whether brainstorming is required for this edit (creation intent on a new file). */
|
|
188
|
-
brainstormRequired?: boolean;
|
|
189
|
-
/** Whether the brainstorming agent ran within the window. */
|
|
190
|
-
brainstormFresh?: boolean;
|
|
191
|
-
}
|
|
192
|
-
/** A single APEX gate: returns a blocking {@link Prompt}, or null to pass. */
|
|
193
|
-
type ApexGate = (ctx: ApexContext) => Prompt | null;
|
|
194
|
-
/** Gate: BOTH Context7 AND Exa (or a web fallback alone) must have been consulted this session. */
|
|
195
|
-
declare const docConsultedGate: ApexGate;
|
|
196
|
-
/** Gate: brainstorming must precede creating new files when flagged. */
|
|
197
|
-
declare const brainstormGate: ApexGate;
|
|
198
|
-
/** Default APEX gate chain (brainstorm, freshness, docs, SOLID refs). */
|
|
199
|
-
declare const APEX_GATES: ReadonlyArray<ApexGate>;
|
|
200
|
-
/**
|
|
201
|
-
* Run the APEX gates (chain-of-responsibility): the first failing gate's prompt
|
|
202
|
-
* wins; null means every gate passed (allow).
|
|
203
|
-
*/
|
|
204
|
-
declare function evaluateApex(ctx: ApexContext, gates?: ReadonlyArray<ApexGate>): Prompt | null;
|
|
205
|
-
//#endregion
|
|
206
156
|
//#region src/policy/guards/context.d.ts
|
|
207
157
|
/** Context handed to every guard in the chain. */
|
|
208
158
|
interface GuardContext {
|
|
@@ -591,4 +541,4 @@ declare function isHtmlLike(path: string): boolean;
|
|
|
591
541
|
*/
|
|
592
542
|
declare function missingSeoElements(html: string): string[];
|
|
593
543
|
//#endregion
|
|
594
|
-
export { ASK_PATTERNS as $, FAIL_CLOSED as A,
|
|
544
|
+
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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Prompt } from "./types-
|
|
1
|
+
import { t as Prompt } from "./types-DVbIl9md.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/adapters/claude/index.d.ts
|
|
4
4
|
/** Subset of the Claude Code hook stdin payload we consume. */
|
|
@@ -18,22 +18,24 @@ declare function readClaudeInput(): Promise<ClaudeHookInput>;
|
|
|
18
18
|
/** A `deny` hook response for a given event. PreToolUse-only field. */
|
|
19
19
|
declare function denyResponse(event: string, reason: string): string;
|
|
20
20
|
/**
|
|
21
|
-
* A PostToolUse (and Stop/UserPromptSubmit) `block` response
|
|
22
|
-
* ignore `
|
|
23
|
-
*
|
|
24
|
-
* to Claude as automated feedback.
|
|
25
|
-
* @param reason - The block feedback shown to Claude.
|
|
26
|
-
* @returns The native `{decision:"block",reason}` response string.
|
|
21
|
+
* A PostToolUse (and Stop/UserPromptSubmit) `block` response: those events
|
|
22
|
+
* ignore `permissionDecision` (PreToolUse-only) and only honor the top-level
|
|
23
|
+
* `decision`/`reason` keys, which feed `reason` back to Claude.
|
|
27
24
|
*/
|
|
28
25
|
declare function blockResponse(reason: string): string;
|
|
29
26
|
/** An `additionalContext` injection response. */
|
|
30
27
|
declare function contextResponse(event: string, text: string): string;
|
|
31
28
|
/** A raw `systemMessage` notice — shown to the user without blocking the tool. Mirrors the shared Python `hook_output.allow_pass`/`post_pass` convention. */
|
|
32
29
|
declare function systemMessage(text: string): string;
|
|
30
|
+
/** An `inform` response with a user-visible notice (Python `allow_pass`/`post_pass` parity): a pure pass reuses {@link systemMessage} alone; with agent-facing `context` both channels merge in one JSON. */
|
|
31
|
+
declare function informResponse(event: string, notice: string, context: string): string;
|
|
32
|
+
/** Attach a user-visible `systemMessage` onto an already-rendered hook stdout JSON ({@link systemMessage} alone when empty/unparseable). */
|
|
33
|
+
declare function attachSystemMessage(stdout: string, notice: string): string;
|
|
33
34
|
/**
|
|
34
35
|
* Render a portable {@link Prompt} as a Claude Code hook response:
|
|
35
36
|
* `block` → `permissionDecision: deny`, `ask` → `permissionDecision: ask`
|
|
36
|
-
* (interactive confirm), `inform` → `additionalContext
|
|
37
|
+
* (interactive confirm), `inform` → `additionalContext` — plus the user-visible
|
|
38
|
+
* `systemMessage` channel when the prompt carries a `userMessage`.
|
|
37
39
|
*/
|
|
38
40
|
declare function toClaudeResponse(event: string, prompt: Prompt): string;
|
|
39
41
|
/**
|
|
@@ -44,4 +46,4 @@ declare function guard(input: ClaudeHookInput): string | null;
|
|
|
44
46
|
/** @deprecated use {@link guard}. Kept for back-compat. */
|
|
45
47
|
declare const fileSizeGuard: typeof guard;
|
|
46
48
|
//#endregion
|
|
47
|
-
export {
|
|
49
|
+
export { denyResponse as a, informResponse as c, toClaudeResponse as d, contextResponse as i, readClaudeInput as l, attachSystemMessage as n, fileSizeGuard as o, blockResponse as r, guard as s, ClaudeHookInput as t, systemMessage as u };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { n as PromptKind, r as formatPrompt, t as Prompt } from "./types-
|
|
1
|
+
import { n as PromptKind, r as formatPrompt, t as Prompt } from "./types-DVbIl9md.mjs";
|
|
2
2
|
import { _ as queryHash, a as cacheLookupSubstringMeta, c as mcpCacheKey, d as extractText, f as IndexSummary, g as jaccardSimilar, h as compactMarkdown, i as cacheLookupSubstring, l as mcpCacheWrite, m as summarizeIndex, n as cacheLookup, o as cachePath, p as loadIndex, r as cacheLookupMeta, s as cacheStore, t as CacheHit, u as webfetchCacheWrite } from "./index-BUwEmIK-.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 HarnessInfo, i as HarnessId, n as detectMode, o as HarnessMode, r as modeFor, s as HarnessVia, t as detectHarness } from "./harness-
|
|
5
|
-
import { a as isDocConsulted, i as formatDocSatisfactionStatus, n as DocSatisfactionStatus, o as resolveSessions, r as formatDocDeny, t as AuthEntry } from "./doc-helpers-
|
|
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-jj_EzZRv.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-s1Fce_dL.mjs";
|
|
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,
|
|
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-BfMsILmg.mjs";
|
|
9
9
|
import { n as RouteResult, r as ScoredRef, t as RefMeta } from "./types-CY5qT2X1.mjs";
|
|
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";
|
|
10
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";
|
|
11
12
|
import { a as globToRe, i as scoreReferences, n as toRefMeta, o as parseFrontmatter, r as routeReferences, t as loadRefs } from "./index-mmRF3KNp.mjs";
|
|
12
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";
|
|
13
|
-
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, 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, 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
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { a as parseEnvInt, i as splitTarget, n as MAX_LINES_ENV_KEY, r as resolveMaxLines, t as DEFAULT_MAX_LINES } from "./limits-CHn8AIL1.mjs";
|
|
2
|
-
import { a as DEFAULT_TTL_SEC, c as ttlLabel, i as parseEnvFile, n as envCandidates, o as TTL_ENV_KEY, r as loadDotenv, s as resolveTtlSec, t as HOME_DIR } from "./dotenv-
|
|
2
|
+
import { a as DEFAULT_TTL_SEC, c as ttlLabel, i as parseEnvFile, n as envCandidates, o as TTL_ENV_KEY, r as loadDotenv, s as resolveTtlSec, t as HOME_DIR } from "./dotenv-Jj8aL1FL.mjs";
|
|
3
3
|
import { n as STATE_ROOT, r as projectLayout, t as STATE_GITIGNORE } from "./layout-C0jaaCQC.mjs";
|
|
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
|
-
import { n as detectMode, r as modeFor, t as detectHarness } from "./harness-
|
|
7
|
-
import { A as
|
|
8
|
-
import {
|
|
6
|
+
import { n as detectMode, r as modeFor, t as detectHarness } from "./harness-Cb9xR8dC.mjs";
|
|
7
|
+
import { A as detectCreationIntent, B as DEV_KEYWORDS, C as SKILL_TRIGGERS, D as MAX_EXA_RESULTS, F as docConsultedGate, H as detectProjectType, 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, U as isApexCommand, V as detectModularArchitecture, W as requiredArchSkill, 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, z as detectFramework } from "./validate-DCQ8dkdL.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";
|
|
9
|
+
import { A as PROJECT_INSTALL, C as PROTECTED_GIT_RE, D as securityGuard, E as CRITICAL_PATTERNS, M as SYSTEM_INSTALL, N as isRalphMode, O as GIT_ASK, P as matchPatterns, 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 } from "./evaluate-CNAzgxnN.mjs";
|
|
9
10
|
import { i as resolveSessions, n as formatDocSatisfactionStatus, r as isDocConsulted, t as formatDocDeny } from "./doc-helpers-CWZegVdR.mjs";
|
|
10
11
|
import { i as parseFrontmatter, n as scoreReferences, r as globToRe, t as routeReferences } from "./router-PKVNBHge.mjs";
|
|
11
12
|
import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
|
|
@@ -14,4 +15,4 @@ import { a as cacheLookupSubstring, c as cacheStore, d as loadIndex, f as summar
|
|
|
14
15
|
import { t as incrementTrivialEditCounter } from "./freshness-BV3PQkDB.mjs";
|
|
15
16
|
import { n as toRefMeta, t as loadRefs } from "./loader-AGz4nK7d.mjs";
|
|
16
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";
|
|
17
|
-
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, 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, 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 };
|
package/dist/init/index.d.mts
CHANGED
package/dist/policy/index.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { $ as ASK_PATTERNS, A as FAIL_CLOSED,
|
|
2
|
-
|
|
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-BfMsILmg.mjs";
|
|
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 };
|
package/dist/policy/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
1
|
+
import { A as detectCreationIntent, B as DEV_KEYWORDS, C as SKILL_TRIGGERS, D as MAX_EXA_RESULTS, F as docConsultedGate, H as detectProjectType, 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, U as isApexCommand, V as detectModularArchitecture, W as requiredArchSkill, 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, z as detectFramework } from "../validate-DCQ8dkdL.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 PROJECT_INSTALL, C as PROTECTED_GIT_RE, D as securityGuard, E as CRITICAL_PATTERNS, M as SYSTEM_INSTALL, N as isRalphMode, O as GIT_ASK, P as matchPatterns, 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 } from "../evaluate-CNAzgxnN.mjs";
|
|
3
4
|
import "../policy-la_KkjCS.mjs";
|
|
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, PLUGINS_DIR, 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, 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 };
|
package/dist/prompt/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PromptKind, r as formatPrompt, t as Prompt } from "../types-
|
|
1
|
+
import { n as PromptKind, r as formatPrompt, t as Prompt } from "../types-DVbIl9md.mjs";
|
|
2
2
|
export { Prompt, PromptKind, formatPrompt };
|
|
@@ -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-CNAzgxnN.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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Prompt } from "../types-
|
|
1
|
+
import { t as Prompt } from "../types-DVbIl9md.mjs";
|
|
2
2
|
import { t as RefMeta } from "../types-CY5qT2X1.mjs";
|
|
3
|
-
import { t as AgentQuality } from "../session-state-
|
|
3
|
+
import { t as AgentQuality } from "../session-state-DMpotbRz.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/paths.d.ts
|
|
6
6
|
/**
|
|
@@ -50,9 +50,11 @@ type Activity = {
|
|
|
50
50
|
framework: string;
|
|
51
51
|
sessionId: string;
|
|
52
52
|
source: string;
|
|
53
|
+
ts?: number;
|
|
53
54
|
} | {
|
|
54
55
|
kind: "ref";
|
|
55
56
|
path: string;
|
|
57
|
+
ts?: number;
|
|
56
58
|
};
|
|
57
59
|
/** Apply an activity to a session's track and persist it (PostToolUse path). */
|
|
58
60
|
declare function recordActivity(file: string, activity: Activity): Promise<void>;
|
|
@@ -173,17 +175,30 @@ declare function normalizeEvent(id: string, payload: Record<string, unknown>): N
|
|
|
173
175
|
* Map a portable {@link Prompt} to a harness's native hook response, honoring
|
|
174
176
|
* all 3 prompt kinds (`block`/`ask`/`inform`) instead of collapsing `ask` and
|
|
175
177
|
* `inform` together. Reuses the Claude adapter's `denyResponse`/
|
|
176
|
-
* `contextResponse` builders for claude-code/codex (same hook
|
|
177
|
-
* duplicating the JSON.
|
|
178
|
+
* `contextResponse`/`informResponse` builders for claude-code/codex (same hook
|
|
179
|
+
* shape) to avoid duplicating the JSON.
|
|
178
180
|
* - claude-code/codex: `block` -> deny, `ask` -> interactive
|
|
179
181
|
* `permissionDecision:"ask"`, `inform` -> non-blocking `additionalContext`.
|
|
180
182
|
* - gemini-cli/cline: their real hook schemas have no interactive "ask"
|
|
181
183
|
* state (deny is the only blocking outcome), so `ask` and `inform` already
|
|
182
184
|
* both resolve to non-blocking context injection — unchanged.
|
|
183
|
-
* - cursor: `ask` keeps its current best-effort `permission:"ask"` shape
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
185
|
+
* - cursor: `ask` keeps its current best-effort `permission:"ask"` shape;
|
|
186
|
+
* only `inform` is fixed to a non-blocking `permission:"allow"` note.
|
|
187
|
+
* - hermes: delegated to the adapter's `toHermesResponse` — `block` ->
|
|
188
|
+
* `{decision:"block",reason}`; `ask`/`inform` degrade to non-blocking
|
|
189
|
+
* `{context}` (Hermes has no interactive "ask" state).
|
|
190
|
+
*
|
|
191
|
+
* User-visible pass notices (`prompt.userMessage`, Python `hook_output.allow_pass`
|
|
192
|
+
* / `post_pass` parity), by harness:
|
|
193
|
+
* - claude-code/codex: top-level `systemMessage` ("warning message shown to the
|
|
194
|
+
* user"); a pure notice (empty `reason`) emits `{systemMessage}` alone. Codex
|
|
195
|
+
* consumes the Claude hook schema, so it rides the same field.
|
|
196
|
+
* - gemini-cli: common `systemMessage` output field ("displayed immediately to
|
|
197
|
+
* the user in the terminal") — the notice rides there.
|
|
198
|
+
* - cursor: `user_message` is its user-visible channel (see case comment).
|
|
199
|
+
* - cline: NO user-visible channel (`cancel`/`contextModification`/
|
|
200
|
+
* `errorMessage`-on-cancel only) — the notice is dropped silently (a pure
|
|
201
|
+
* notice returns "" = plain allow).
|
|
187
202
|
*/
|
|
188
203
|
declare function respond(id: string, prompt: Prompt): string;
|
|
189
204
|
//#endregion
|
package/dist/runtime/index.mjs
CHANGED
|
@@ -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-
|
|
3
|
-
import { $ as saveApexState, A as trackSkillRead, At as securityStateDir, B as writePluginMap, C as seoPostToolUse, Ct as defaultStateDir, D as postTrackingSideEffects, Dt as isoUtc, E as securityAdvisory, Et as normalizeEvent, F as dispatchLessons, G as mergeLines, H as isProject, I as lessonsFileFor, J as listChildren, K as countFiles, L as lessonsStateFileFor, M as dispatchLifecycle, Mt as todayUtc, N as aipilotPostToolUse, O as trackWatchResearch, Ot as loadSecurityState, P as dispatchAipilot, Q as cleanupSession, R as cartoSessionStart, S as postEditContext, St as taskContext, T as dispatchMemory, Tt as trackFile, U as writeTree, V as generateProjectMap, W as loadEnriched, X as trackSessionChanges, Y as postEditTypescript, Z as validateRulesLoaded, _ as preCommitGate, _t as trimLogFile, a as recordActivity, at as validateSolidGate, b as extractSymbols, bt as projectContext, c as MCP_TTL_MS, ct as detectSolidProfile, d as isMcpTool, dt as readRules, et as logToolFailure, f as queryOf, ft as runSessionStartCleanups, g as gate, gt as removeOldFiles, h as TRIVIAL_BUDGET, ht as purgeTtlTree, i as respond, it as validateTailwind, j as trackEnrichment, jt as securityStatePath, k as trackMcpResearch, kt as saveSecurityState, l as WEBFETCH_TTL_MS, lt as solidDetectStart, m as REQUIRED_AGENTS, mt as pruneEmptyDirs, n as activityFor, nt as trackAgentMemory, o as mcpPostStore, ot as checkFileSize, p as DEFAULT_WINDOW_MS, pt as sessionStartCore, q as getFileDesc, r as handlePre, rt as subagentCacheContext, s as mcpPreIntercept, st as countLoc, t as handleHook, tt as validateTeammateOutput, u as cacheQueryOf, ut as injectRules, v as detectDuplication, vt as devContext, w as seoPostToolUseResponse, wt as projectHash, x as lifecycleStdout, xt as promptSubmitContext, y as dryGate, yt as gitContext, z as generateEcosystemMap } from "../handle-
|
|
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 { $ as saveApexState, A as trackSkillRead, At as securityStateDir, B as writePluginMap, C as seoPostToolUse, Ct as defaultStateDir, D as postTrackingSideEffects, Dt as isoUtc, E as securityAdvisory, Et as normalizeEvent, F as dispatchLessons, G as mergeLines, H as isProject, I as lessonsFileFor, J as listChildren, K as countFiles, L as lessonsStateFileFor, M as dispatchLifecycle, Mt as todayUtc, N as aipilotPostToolUse, O as trackWatchResearch, Ot as loadSecurityState, P as dispatchAipilot, Q as cleanupSession, R as cartoSessionStart, S as postEditContext, St as taskContext, T as dispatchMemory, Tt as trackFile, U as writeTree, V as generateProjectMap, W as loadEnriched, X as trackSessionChanges, Y as postEditTypescript, Z as validateRulesLoaded, _ as preCommitGate, _t as trimLogFile, a as recordActivity, at as validateSolidGate, b as extractSymbols, bt as projectContext, c as MCP_TTL_MS, ct as detectSolidProfile, d as isMcpTool, dt as readRules, et as logToolFailure, f as queryOf, ft as runSessionStartCleanups, g as gate, gt as removeOldFiles, h as TRIVIAL_BUDGET, ht as purgeTtlTree, i as respond, it as validateTailwind, j as trackEnrichment, jt as securityStatePath, k as trackMcpResearch, kt as saveSecurityState, l as WEBFETCH_TTL_MS, lt as solidDetectStart, m as REQUIRED_AGENTS, mt as pruneEmptyDirs, n as activityFor, nt as trackAgentMemory, o as mcpPostStore, ot as checkFileSize, p as DEFAULT_WINDOW_MS, pt as sessionStartCore, q as getFileDesc, r as handlePre, rt as subagentCacheContext, s as mcpPreIntercept, st as countLoc, t as handleHook, tt as validateTeammateOutput, u as cacheQueryOf, ut as injectRules, v as detectDuplication, vt as devContext, w as seoPostToolUseResponse, wt as projectHash, x as lifecycleStdout, xt as promptSubmitContext, y as dryGate, yt as gitContext, z as generateEcosystemMap } from "../handle-D1hHqHvh.mjs";
|
|
4
4
|
//#region src/runtime/storage.ts
|
|
5
5
|
/**
|
|
6
6
|
* The project's single state dir (`<root>/.harness`) — neutral + harness-agnostic,
|