@fusengine/harness 0.1.80 → 0.1.81
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-J5r2f_O_.mjs} +637 -159
- 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-nDZ3eLBQ.mjs → store-yr_QFsZY.mjs} +101 -13
- package/dist/tracking/index.d.mts +22 -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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { n as RouteResult, r as ScoredRef, t as RefMeta } from "./types-CY5qT2X1.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/refs/frontmatter.d.ts
|
|
4
3
|
/** Extract frontmatter key/value pairs from markdown content (quotes stripped). */
|
|
5
4
|
declare function parseFrontmatter(content: string): Record<string, string>;
|
|
@@ -8,26 +7,26 @@ declare function globToRe(g: string): RegExp;
|
|
|
8
7
|
//#endregion
|
|
9
8
|
//#region src/refs/router.d.ts
|
|
10
9
|
/**
|
|
11
|
-
* Score references against a file edit (pure) — flat scoring, parity with the
|
|
12
|
-
* Python `ref_router._score_ref` (comma-split, single award per category):
|
|
13
|
-
* +10 once if ANY `applies-to` glob matches, +5 once if ANY `trigger-on-edit`
|
|
14
|
-
* fragment (trailing `/` stripped) is a substring of the path, +1 per keyword.
|
|
15
|
-
*/
|
|
10
|
+
* Score references against a file edit (pure) — flat scoring, parity with the
|
|
11
|
+
* Python `ref_router._score_ref` (comma-split, single award per category):
|
|
12
|
+
* +10 once if ANY `applies-to` glob matches, +5 once if ANY `trigger-on-edit`
|
|
13
|
+
* fragment (trailing `/` stripped) is a substring of the path, +1 per keyword.
|
|
14
|
+
*/
|
|
16
15
|
declare function scoreReferences(refs: RefMeta[], filePath: string, content: string): ScoredRef[];
|
|
17
16
|
/**
|
|
18
|
-
* Route references for a file edit: top-2 required + next-2 optional, ensuring a
|
|
19
|
-
* `principle` and a `template` appear in the top 4. Returns null when nothing scores.
|
|
20
|
-
*/
|
|
17
|
+
* Route references for a file edit: top-2 required + next-2 optional, ensuring a
|
|
18
|
+
* `principle` and a `template` appear in the top 4. Returns null when nothing scores.
|
|
19
|
+
*/
|
|
21
20
|
declare function routeReferences(refs: RefMeta[], filePath: string, content: string, skillPath?: string): RouteResult | null;
|
|
22
21
|
//#endregion
|
|
23
22
|
//#region src/refs/loader.d.ts
|
|
24
23
|
/** Build a {@link RefMeta} from parsed frontmatter, tolerant of kebab/camel keys. */
|
|
25
24
|
declare function toRefMeta(fm: Record<string, string>, filePath: string): RefMeta;
|
|
26
25
|
/**
|
|
27
|
-
* Scan a directory recursively for `.md` reference files and parse each into a
|
|
28
|
-
* {@link RefMeta}. The content is entirely the consumer's — point this at any
|
|
29
|
-
* refs dir (`FUSE_HARNESS_REFS`). Returns an empty list when the dir is absent.
|
|
30
|
-
*/
|
|
26
|
+
* Scan a directory recursively for `.md` reference files and parse each into a
|
|
27
|
+
* {@link RefMeta}. The content is entirely the consumer's — point this at any
|
|
28
|
+
* refs dir (`FUSE_HARNESS_REFS`). Returns an empty list when the dir is absent.
|
|
29
|
+
*/
|
|
31
30
|
declare function loadRefs(dirs: string): Promise<RefMeta[]>;
|
|
32
31
|
//#endregion
|
|
33
32
|
export { globToRe as a, scoreReferences as i, toRefMeta as n, parseFrontmatter as o, routeReferences as r, loadRefs as t };
|
|
@@ -21,35 +21,35 @@ declare function summarizeIndex(index: unknown[]): IndexSummary;
|
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/cache/mcp-response.d.ts
|
|
23
23
|
/**
|
|
24
|
-
* Extract usable markdown from an MCP `tool_response`: a string, a list of
|
|
25
|
-
* content blocks (non-text blocks skipped), or any JSON structure (fallback).
|
|
26
|
-
* Recurses up to depth 5 to guard against pathological/cyclic structures.
|
|
27
|
-
*/
|
|
24
|
+
* Extract usable markdown from an MCP `tool_response`: a string, a list of
|
|
25
|
+
* content blocks (non-text blocks skipped), or any JSON structure (fallback).
|
|
26
|
+
* Recurses up to depth 5 to guard against pathological/cyclic structures.
|
|
27
|
+
*/
|
|
28
28
|
declare function extractText(resp: unknown, depth?: number): string;
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/cache/mcp-store.d.ts
|
|
31
31
|
/**
|
|
32
|
-
* Persist an MCP doc result the way `cache-mcp-result.py` does: compact the body,
|
|
33
|
-
* skip Jaccard-duplicate queries, write a front-matter `.md` (exact FNV key, so
|
|
34
|
-
* {@link cacheLookup} still hits) carrying the query for substring lookups, and
|
|
35
|
-
* append the entry to `index.json`. No-op on empty body or duplicate query.
|
|
36
|
-
* @param dir - Cache directory (also holds `index.json`).
|
|
37
|
-
* @param tool - MCP tool id.
|
|
38
|
-
* @param query - Doc query that keys the entry.
|
|
39
|
-
* @param body - Raw response text (compacted before write).
|
|
40
|
-
* @param now - Current epoch ms (timestamp source).
|
|
41
|
-
*/
|
|
32
|
+
* Persist an MCP doc result the way `cache-mcp-result.py` does: compact the body,
|
|
33
|
+
* skip Jaccard-duplicate queries, write a front-matter `.md` (exact FNV key, so
|
|
34
|
+
* {@link cacheLookup} still hits) carrying the query for substring lookups, and
|
|
35
|
+
* append the entry to `index.json`. No-op on empty body or duplicate query.
|
|
36
|
+
* @param dir - Cache directory (also holds `index.json`).
|
|
37
|
+
* @param tool - MCP tool id.
|
|
38
|
+
* @param query - Doc query that keys the entry.
|
|
39
|
+
* @param body - Raw response text (compacted before write).
|
|
40
|
+
* @param now - Current epoch ms (timestamp source).
|
|
41
|
+
*/
|
|
42
42
|
declare function mcpCacheWrite(dir: string, tool: string, query: string, body: string, now: number): void;
|
|
43
43
|
/**
|
|
44
|
-
* Persist a WebFetch result the way `webfetch-cache-store.py` does: compact the
|
|
45
|
-
* body, write a front-matter `.md` keyed by `key` (url + prompt[:500]). No index
|
|
46
|
-
* and no dedup — WebFetch entries are exact-key only. No-op on empty body.
|
|
47
|
-
* @param dir - Cache directory.
|
|
48
|
-
* @param tool - Always `WebFetch`.
|
|
49
|
-
* @param key - The url+prompt cache key string.
|
|
50
|
-
* @param body - Raw response text (compacted before write).
|
|
51
|
-
* @param now - Current epoch ms (timestamp source).
|
|
52
|
-
*/
|
|
44
|
+
* Persist a WebFetch result the way `webfetch-cache-store.py` does: compact the
|
|
45
|
+
* body, write a front-matter `.md` keyed by `key` (url + prompt[:500]). No index
|
|
46
|
+
* and no dedup — WebFetch entries are exact-key only. No-op on empty body.
|
|
47
|
+
* @param dir - Cache directory.
|
|
48
|
+
* @param tool - Always `WebFetch`.
|
|
49
|
+
* @param key - The url+prompt cache key string.
|
|
50
|
+
* @param body - Raw response text (compacted before write).
|
|
51
|
+
* @param now - Current epoch ms (timestamp source).
|
|
52
|
+
*/
|
|
53
53
|
declare function webfetchCacheWrite(dir: string, tool: string, key: string, body: string, now: number): void;
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/cache/store.d.ts
|
|
@@ -67,14 +67,14 @@ declare function cacheLookup(dir: string, tool: string, query: string, ttlMs: nu
|
|
|
67
67
|
/** Like {@link cacheLookup}, but also reports the entry's age (for `CACHE HIT` wrapper text). */
|
|
68
68
|
declare function cacheLookupMeta(dir: string, tool: string, query: string, ttlMs: number, now: number): CacheHit | null;
|
|
69
69
|
/**
|
|
70
|
-
* First fresh cache file whose body contains the (normalized, case-insensitive)
|
|
71
|
-
* query substring, else null. Relaxes the exact-key match to lift the hit-rate —
|
|
72
|
-
* parity with `mcp-cache-lookup.py` (`rg -i -F` over the first 80 query chars).
|
|
73
|
-
* @param dir - Cache directory to scan.
|
|
74
|
-
* @param query - Raw query; newlines folded to spaces, truncated to 80 chars.
|
|
75
|
-
* @param ttlMs - Freshness window (mtime-based).
|
|
76
|
-
* @param now - Current epoch ms.
|
|
77
|
-
*/
|
|
70
|
+
* First fresh cache file whose body contains the (normalized, case-insensitive)
|
|
71
|
+
* query substring, else null. Relaxes the exact-key match to lift the hit-rate —
|
|
72
|
+
* parity with `mcp-cache-lookup.py` (`rg -i -F` over the first 80 query chars).
|
|
73
|
+
* @param dir - Cache directory to scan.
|
|
74
|
+
* @param query - Raw query; newlines folded to spaces, truncated to 80 chars.
|
|
75
|
+
* @param ttlMs - Freshness window (mtime-based).
|
|
76
|
+
* @param now - Current epoch ms.
|
|
77
|
+
*/
|
|
78
78
|
declare function cacheLookupSubstring(dir: string, query: string, ttlMs: number, now: number): string | null;
|
|
79
79
|
/** Like {@link cacheLookupSubstring}, but also reports the matched entry's age. */
|
|
80
80
|
declare function cacheLookupSubstringMeta(dir: string, query: string, ttlMs: number, now: number): CacheHit | null;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { t as HarnessId } from "./types-DvXTI71X.mjs";
|
|
2
|
+
//#region src/config/env.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Robust integer-from-env parser.
|
|
5
|
+
* undefined / empty / whitespace / NaN / float / <= 0 all fall back to `fallback`.
|
|
6
|
+
* `Number("")` is 0, so the empty guard is required before `Number()`.
|
|
7
|
+
*/
|
|
8
|
+
declare function parseEnvInt(raw: string | undefined, fallback: number): number;
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/config/ttl.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* Default enforcement-freshness window, in seconds (2 minutes). Matches the
|
|
13
|
+
* plugin's original `FUSE_ENFORCE_TTL_SEC` default. This is the constant that
|
|
14
|
+
* actually reaches production (via `resolveTtlSec` -> `bin.ts`); `gate.ts`'s
|
|
15
|
+
* `DEFAULT_WINDOW_MS` is only a fallback for direct programmatic callers that
|
|
16
|
+
* omit `windowMs` (e.g. tests) and never applies on the real CLI path.
|
|
17
|
+
*/
|
|
18
|
+
declare const DEFAULT_TTL_SEC = 120;
|
|
19
|
+
/** Default env var name carrying the TTL override. */
|
|
20
|
+
declare const TTL_ENV_KEY = "FUSE_ENFORCE_TTL_SEC";
|
|
21
|
+
/**
|
|
22
|
+
* Resolve the enforcement TTL (seconds) from an env map.
|
|
23
|
+
* @param env - environment map (defaults to `process.env`)
|
|
24
|
+
* @param key - env var name (defaults to `FUSE_ENFORCE_TTL_SEC`)
|
|
25
|
+
*/
|
|
26
|
+
declare function resolveTtlSec(env?: Record<string, string | undefined>, key?: string): number;
|
|
27
|
+
/** Human label for a TTL: 120 -> "2min", 240 -> "4min", 90 -> "90s". */
|
|
28
|
+
declare function ttlLabel(sec: number): string;
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/config/limits.d.ts
|
|
31
|
+
/** Default SOLID max lines per file. */
|
|
32
|
+
declare const DEFAULT_MAX_LINES = 100;
|
|
33
|
+
/** Default env var name carrying the max-lines override. */
|
|
34
|
+
declare const MAX_LINES_ENV_KEY = "FUSE_SOLID_MAX_LINES";
|
|
35
|
+
/**
|
|
36
|
+
* Resolve the SOLID max-lines limit from an env map.
|
|
37
|
+
* @param env - environment map (defaults to `process.env`)
|
|
38
|
+
* @param key - env var name (defaults to `FUSE_SOLID_MAX_LINES`)
|
|
39
|
+
*/
|
|
40
|
+
declare function resolveMaxLines(env?: Record<string, string | undefined>, key?: string): number;
|
|
41
|
+
/** Advisory module-split headroom = `maxLines - 10` (never below 1). */
|
|
42
|
+
declare function splitTarget(maxLines: number): number;
|
|
43
|
+
/**
|
|
44
|
+
* Custom-hook line budget, derived from the global limit (ratio 0.3 — with
|
|
45
|
+
* the default 100 this yields the owner template's 30; one variable,
|
|
46
|
+
* `FUSE_SOLID_MAX_LINES`, drives every budget proportionally).
|
|
47
|
+
* @param maxLines - The global limit (from {@link resolveMaxLines}).
|
|
48
|
+
*/
|
|
49
|
+
declare function hookBudget(maxLines: number): number;
|
|
50
|
+
/**
|
|
51
|
+
* Store line budget, derived from the global limit (ratio 0.4 — 40 at the
|
|
52
|
+
* default 100, per owner rules/07-state-management).
|
|
53
|
+
* @param maxLines - The global limit (from {@link resolveMaxLines}).
|
|
54
|
+
*/
|
|
55
|
+
declare function storeBudget(maxLines: number): number;
|
|
56
|
+
/** Default stdin cap for hook payloads: 16 MiB. */
|
|
57
|
+
declare const DEFAULT_STDIN_MAX_BYTES: number;
|
|
58
|
+
/**
|
|
59
|
+
* Resolve the hook stdin cap (`FUSE_HOOK_STDIN_MAX_BYTES`, default 16 MiB;
|
|
60
|
+
* absent/invalid falls back to the default). The only new env var of the
|
|
61
|
+
* mission — owner-approved exception.
|
|
62
|
+
* @param env - environment map (defaults to `process.env`)
|
|
63
|
+
*/
|
|
64
|
+
declare function resolveStdinMaxBytes(env?: Record<string, string | undefined>): number;
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/config/layout.d.ts
|
|
67
|
+
/** Top-level project state dir — neutral + harness-agnostic (not `.claude/…`). */
|
|
68
|
+
declare const STATE_ROOT = ".harness";
|
|
69
|
+
/**
|
|
70
|
+
* The selective `.gitignore` for `.harness/`: ignore the machine-local session
|
|
71
|
+
* state (track, cache, throttle) but keep the curated `memory/LESSON.md`.
|
|
72
|
+
*/
|
|
73
|
+
declare const STATE_GITIGNORE = "track/\ncache/\nmemory/state.json\n";
|
|
74
|
+
/** Every project-state path the package uses, derived from one project root. */
|
|
75
|
+
interface ProjectLayout {
|
|
76
|
+
root: string;
|
|
77
|
+
/** `<root>/.harness` — the single state dir. */
|
|
78
|
+
stateDir: string;
|
|
79
|
+
/** `<root>/.harness/track` — session track files. */
|
|
80
|
+
trackDir: string;
|
|
81
|
+
/** `<root>/.harness/cache` — MCP/WebFetch cache. */
|
|
82
|
+
cacheDir: string;
|
|
83
|
+
/** `<root>/.harness/memory` — lessons + throttle. */
|
|
84
|
+
memoryDir: string;
|
|
85
|
+
/** `<root>/.harness/memory/LESSON.md` — curated, committable. */
|
|
86
|
+
lessonsFile: string;
|
|
87
|
+
/** `<root>/.harness/memory/state.json` — machine-local throttle. */
|
|
88
|
+
memoryStateFile: string;
|
|
89
|
+
/** `<root>/.harness/track/solid-notice.json` — SubagentStop dedup sidecar. */
|
|
90
|
+
solidNoticeFile: string;
|
|
91
|
+
/** `<root>/.harness/.gitignore`. */
|
|
92
|
+
gitignoreFile: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The single source of truth for where every package file lives under a project
|
|
96
|
+
* root. All modules (runtime storage, memory, init) derive their paths here —
|
|
97
|
+
* nothing hardcodes a directory name elsewhere.
|
|
98
|
+
*/
|
|
99
|
+
declare function projectLayout(root: string): ProjectLayout;
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/config/dotenv.d.ts
|
|
102
|
+
/** Home config dir holding the `.env` for each harness (defaults to `.claude`). */
|
|
103
|
+
declare const HOME_DIR: Partial<Record<HarnessId, string>>;
|
|
104
|
+
/** Parse a `.env` file into a key→value map (`export KEY="v"` or `KEY=v`). */
|
|
105
|
+
declare function parseEnvFile(path: string): Record<string, string>;
|
|
106
|
+
/** The `.env` paths probed for a harness: home `.env` then `<cwd>/.env`. */
|
|
107
|
+
declare function envCandidates(id: HarnessId, home?: string, cwd?: string): string[];
|
|
108
|
+
/**
|
|
109
|
+
* Load `.env` files into `env` without overwriting existing keys. Reads the
|
|
110
|
+
* harness home `.env` then `<cwd>/.env`. Best-effort (missing/unreadable files
|
|
111
|
+
* are skipped) so a hook never fails on env loading.
|
|
112
|
+
* @param id - Detected harness id (selects the home dir).
|
|
113
|
+
* @param env - Target environment (defaults to `process.env`).
|
|
114
|
+
* @param home - Home dir.
|
|
115
|
+
* @param cwd - Project root.
|
|
116
|
+
*/
|
|
117
|
+
declare function loadDotenv(id: HarnessId, env?: NodeJS.ProcessEnv, home?: string, cwd?: string): void;
|
|
118
|
+
//#endregion
|
|
119
|
+
export { DEFAULT_TTL_SEC as _, ProjectLayout as a, ttlLabel as b, projectLayout as c, MAX_LINES_ENV_KEY as d, hookBudget as f, storeBudget as g, splitTarget as h, parseEnvFile as i, DEFAULT_MAX_LINES as l, resolveStdinMaxBytes as m, envCandidates as n, STATE_GITIGNORE as o, resolveMaxLines as p, loadDotenv as r, STATE_ROOT as s, HOME_DIR as t, DEFAULT_STDIN_MAX_BYTES as u, TTL_ENV_KEY as v, parseEnvInt as x, resolveTtlSec as y };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/util/compact-json.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Compact JSON serializer for cache/state files.
|
|
4
|
+
* Top-level keys are indented one per line; nested objects/arrays render inline.
|
|
5
|
+
* Behaviour preserved from the fusengine hooks.
|
|
6
|
+
*/
|
|
7
|
+
declare function compactJson(data: unknown): string;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/util/project-root.d.ts
|
|
10
|
+
/** True for a source-code file outside generated/vendored directories. */
|
|
11
|
+
declare function isCodeFile(p: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Walk up from `dir` to the nearest ancestor directory containing `marker`.
|
|
14
|
+
* @param dir - Starting directory.
|
|
15
|
+
* @param marker - Sibling file/dir name to look for at each level.
|
|
16
|
+
* @returns The ancestor holding `marker`, or `null` at filesystem root.
|
|
17
|
+
*/
|
|
18
|
+
declare function walkUpFor(dir: string, marker: string): string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Resolve the project root, preferring the repo boundary (`.git`) over a
|
|
21
|
+
* nested `package.json` — avoids false roots in monorepos. Null if none found.
|
|
22
|
+
*/
|
|
23
|
+
declare function projectRootOrNull(dir: string): string | null;
|
|
24
|
+
/** Like {@link projectRootOrNull} but falls back to `process.cwd()`. */
|
|
25
|
+
declare function projectRoot(dir: string): string;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { compactJson as a, walkUpFor as i, projectRoot as n, projectRootOrNull as r, isCodeFile as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { n as PromptKind, r as formatPrompt, t as Prompt } from "./types-
|
|
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-
|
|
3
|
-
import { _ as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { n as PromptKind, r as formatPrompt, t as Prompt } from "./types-C0-igRKr.mjs";
|
|
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-DhmV2MPh.mjs";
|
|
3
|
+
import { _ as DEFAULT_TTL_SEC, a as ProjectLayout, b as ttlLabel, c as projectLayout, d as MAX_LINES_ENV_KEY, f as hookBudget, g as storeBudget, h as splitTarget, i as parseEnvFile, l as DEFAULT_MAX_LINES, m as resolveStdinMaxBytes, n as envCandidates, o as STATE_GITIGNORE, p as resolveMaxLines, r as loadDotenv, s as STATE_ROOT, t as HOME_DIR, u as DEFAULT_STDIN_MAX_BYTES, v as TTL_ENV_KEY, x as parseEnvInt, y as resolveTtlSec } from "./index-oXXPs2xl.mjs";
|
|
4
|
+
import { i as HarnessVia, n as HarnessInfo, r as HarnessMode, t as HarnessId } from "./types-DvXTI71X.mjs";
|
|
5
|
+
import { n as detectMode, r as modeFor, t as detectHarness } from "./index-CigBu4K9.mjs";
|
|
6
|
+
import { a as isDocConsulted, i as formatDocSatisfactionStatus, n as DocSatisfactionStatus, o as resolveSessions, r as formatDocDeny, t as AuthEntry } from "./doc-helpers-BGCzP9VF.mjs";
|
|
7
|
+
import { t as incrementTrivialEditCounter } from "./index-84heAAm_.mjs";
|
|
8
|
+
import { a as compactJson, i as walkUpFor, n as projectRoot, r as projectRootOrNull, t as isCodeFile } from "./index-p9fLrSOD.mjs";
|
|
9
|
+
import { $ as detectCreationIntent, $t as countFrameworkCodeLines, A as TreeEntry, At as APEX_GATES, B as loadApexTaskState, Bt as evaluate, C as maskCommentsAndStrings, Ct as protectedPathGuard, D as descFromText, Dt as securityGuard, E as missingSeoElements, Et as LabeledPattern, F as EXCLUDE_DIRS, Ft as brainstormGate, G as detectRequiredSkills, Gt as PROJECT_INSTALL, H as buildApexInstruction, Ht as PolicyResult, I as PROJECT_INDICATORS, It as docConsultedGate, J as SKILL_TRIGGERS, Jt as isRalphMode, K as skillTriggerGate, Kt as RALPH_SAFE, L as ApexTaskState, Lt as evaluateApex, M as parseEntry, Mt as ApexGate, N as parseBodyDesc, Nt as POST_AUTH_GATES, O as firstComment, Ot as Guard, P as parseField, Pt as PRE_AUTH_GATES, Q as capVerbosity, Qt as SOLID_REF, R as buildApexTaskContext, Rt as freshnessGate, S as LexProfile, St as PROTECTED_GIT_RE, T as isHtmlLike, Tt as CRITICAL_PATTERNS, U as buildClaudeMdContext, Ut as GIT_ASK, V as DEV_VERBS, Vt as PolicyContext, W as detectClaudeMdProjectType, Wt as GIT_BLOCKED, X as MAX_EXA_RESULTS, Xt as FileSizeVerdict, Y as frameworkSolidGate, Yt as matchPatterns, Z as MAX_TOKENS, Zt as PLUGINS_DIR, _ as isStoresPath, _t as CODE_REDIRECT, a as countStores, an as ProjectType, at as installGuard, b as langOfPath, bt as SESSION_STATE_FRAGMENT, c as InterfaceDeclLevel, cn as isApexCommand, ct as PHP_DECL_RE, d as interfaceDeclLevel, dt as SWIFT_PROTO_RE, en as countLines, et as FAIL_CLOSED, f as LangFamily, ft as TS_DECL_RE, g as isQueryPath, gt as CODE_MUTATORS, h as isInterfacesPath, ht as ASK_WRITERS, i as StoreLib, in as ModularArchitecture, it as runGuards, j as parseEnrichment, jt as ApexContext, k as firstHeading, kt as GuardContext, l as declaresExportedTypeAlias, ln as requiredArchSkill, lt as PY_MODEL_RE, m as isHooksPath, mt as bashWriteGuard, n as importsTanstackQuery, nn as detectFramework, nt as clearUserGuards, o as declaresStore, on as detectModularArchitecture, ot as GO_DECL_RE, p as isComponentsPath, pt as interfaceSeparationGuard, q as usesTailwindUtilities, qt as SYSTEM_INSTALL, r as queryCapActive, rn as DEV_KEYWORDS, rt as registerGuard, s as declaresCustomHook, sn as detectProjectType, st as JAVA_DECL_RE, t as declaresQueryHook, tn as evaluateFileSize, tt as GUARDS, u as declaresInterface, ut as RUST_DECL_RE, v as isTypesPath, vt as FILE_REDIRECT, w as maskCommentsOnly, wt as ASK_PATTERNS, x as lexProfileOf, xt as PROTECTED_FRAGMENTS, y as isVendorPath, yt as SAFE_PREFIXES, z as buildApexTaskInjection, zt as solidReadGate } from "./index-DBgnIZn9.mjs";
|
|
9
10
|
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";
|
|
11
11
|
import { a as ReminderState, c as readState, d as throttleMs, i as registryFile, l as setStateField, n as addRoot, o as lessonsFileFor, r as readRoots, s as nowStamp, t as ensureMemoryGitignore, u as stateFileFor } from "./index-DLYhervv.mjs";
|
|
12
|
-
import { a as globToRe, i as scoreReferences, n as toRefMeta, o as parseFrontmatter, r as routeReferences, t as loadRefs } from "./index-
|
|
12
|
+
import { a as globToRe, i as scoreReferences, n as toRefMeta, o as parseFrontmatter, r as routeReferences, t as loadRefs } from "./index-DEfz82BP.mjs";
|
|
13
13
|
import { _ as TIME_INTERVALS, a as formatCost, c as formatTokens, d as colors, f as progressiveColor, g as PROGRESS_CHARS, h as PROGRESS_BAR_DEFAULTS, i as formatBasename, l as ColorFn, m as GRADIENT_BLOCKS, n as generateGradientBar, o as formatPath, p as COLOR_THRESHOLDS, r as generateProgressBar, s as formatTimeLeft, t as ProgressBarOptions, u as Palette } from "./index-BWK8slRi.mjs";
|
|
14
|
-
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, ApexTaskState, AuthEntry, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, CacheHit, ColorFn, DEFAULT_MAX_LINES, DEFAULT_TTL_SEC, DEV_KEYWORDS, DEV_VERBS, DocSatisfactionStatus, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, FileSizeVerdict, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, Guard, GuardContext, HOME_DIR, type HarnessId, type HarnessInfo, type HarnessMode, type HarnessVia, IndexSummary, JAVA_DECL_RE, LabeledPattern, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, Palette, type PolicyContext, type PolicyResult, ProgressBarOptions, ProjectLayout, ProjectType, Prompt, PromptKind, RALPH_SAFE, RUST_DECL_RE, RefMeta, ReminderState, RouteResult, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, ScoredRef, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, TreeEntry, addRoot, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cacheLookupMeta, cacheLookupSubstring, cacheLookupSubstringMeta, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, envCandidates, evaluate, evaluateApex, evaluateFileSize, extractText, firstComment, firstHeading, formatBasename, formatCost, formatDocDeny, formatDocSatisfactionStatus, formatPath, formatPrompt, formatTimeLeft, formatTokens, frameworkSolidGate, freshnessGate, generateGradientBar, generateProgressBar, globToRe, incrementTrivialEditCounter, installGuard, interfaceSeparationGuard, isApexCommand, isCodeFile, isDocConsulted, isHtmlLike, isRalphMode, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadDotenv, loadIndex, loadRefs, matchPatterns, mcpCacheKey, mcpCacheWrite, missingSeoElements, modeFor, nowStamp, parseBodyDesc, parseEnrichment, parseEntry, parseEnvFile, parseEnvInt, parseField, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveTtlSec, routeReferences, runGuards, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, summarizeIndex, throttleMs, toRefMeta, ttlLabel, usesTailwindUtilities, walkUpFor, webfetchCacheWrite };
|
|
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_STDIN_MAX_BYTES, 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, InterfaceDeclLevel, JAVA_DECL_RE, LabeledPattern, LangFamily, LexProfile, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, Palette, type PolicyContext, type PolicyResult, ProgressBarOptions, ProjectLayout, ProjectType, Prompt, PromptKind, RALPH_SAFE, RUST_DECL_RE, RefMeta, ReminderState, RouteResult, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, ScoredRef, StoreLib, 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, countStores, declaresCustomHook, declaresExportedTypeAlias, declaresInterface, declaresQueryHook, declaresStore, 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, hookBudget, importsTanstackQuery, incrementTrivialEditCounter, installGuard, interfaceDeclLevel, interfaceSeparationGuard, isApexCommand, isCodeFile, isComponentsPath, isDocConsulted, isHooksPath, isHtmlLike, isInterfacesPath, isQueryPath, isRalphMode, isStoresPath, isTypesPath, isVendorPath, jaccardSimilar, langOfPath, lessonsFileFor, lexProfileOf, loadApexTaskState, loadDotenv, loadIndex, loadRefs, maskCommentsAndStrings, maskCommentsOnly, matchPatterns, mcpCacheKey, mcpCacheWrite, missingSeoElements, modeFor, nowStamp, parseBodyDesc, parseEnrichment, parseEntry, parseEnvFile, parseEnvInt, parseField, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryCapActive, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveStdinMaxBytes, resolveTtlSec, routeReferences, runGuards, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, storeBudget, summarizeIndex, throttleMs, toRefMeta, ttlLabel, usesTailwindUtilities, walkUpFor, webfetchCacheWrite };
|
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { a as
|
|
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-
|
|
3
|
-
import { n as STATE_ROOT, r as projectLayout, t as STATE_GITIGNORE } from "./layout-
|
|
1
|
+
import { a as resolveMaxLines, c as storeBudget, i as hookBudget, l as parseEnvInt, n as DEFAULT_STDIN_MAX_BYTES, o as resolveStdinMaxBytes, r as MAX_LINES_ENV_KEY, s as splitTarget, t as DEFAULT_MAX_LINES } from "./limits-DG5pl-5s.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-DoqNlALG.mjs";
|
|
3
|
+
import { n as STATE_ROOT, r as projectLayout, t as STATE_GITIGNORE } from "./layout-KWoE_Mqn.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
6
|
import { n as detectMode, r as modeFor, t as detectHarness } from "./harness-BMuLJ9lm.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import { d as countFrameworkCodeLines, f as countLines, l as PLUGINS_DIR, p as evaluateFileSize, u as SOLID_REF } from "./home-state-
|
|
7
|
+
import { $ as matchPatterns, B as protectedPathGuard, C as isInterfacesPath, D as isVendorPath, E as isTypesPath, F as FILE_REDIRECT, H as CRITICAL_PATTERNS, I as SAFE_PREFIXES, J as GIT_BLOCKED, L as SESSION_STATE_FRAGMENT, M as ASK_WRITERS, N as CODE_MUTATORS, O as langOfPath, P as CODE_REDIRECT, Q as isRalphMode, R as PROTECTED_FRAGMENTS, S as isHooksPath, T as isStoresPath, U as securityGuard, V as ASK_PATTERNS, X as RALPH_SAFE, Y as PROJECT_INSTALL, Z as SYSTEM_INSTALL, a as registerGuard, at as DEV_KEYWORDS, b as interfaceDeclLevel, c as GO_DECL_RE, ct as isApexCommand, d as PY_MODEL_RE, et as detectFramework, f as RUST_DECL_RE, h as interfaceSeparationGuard, i as clearUserGuards, it as maskCommentsOnly, j as bashWriteGuard, k as lexProfileOf, l as JAVA_DECL_RE, lt as requiredArchSkill, m as TS_DECL_RE, n as FAIL_CLOSED, o as runGuards, ot as detectModularArchitecture, p as SWIFT_PROTO_RE, q as GIT_ASK, r as GUARDS, rt as maskCommentsAndStrings, s as installGuard, st as detectProjectType, t as evaluate, u as PHP_DECL_RE, v as declaresExportedTypeAlias, w as isQueryPath, x as isComponentsPath, y as declaresInterface, z as PROTECTED_GIT_RE } from "./evaluate-B4-MhOy_.mjs";
|
|
8
|
+
import { d as countFrameworkCodeLines, f as countLines, l as PLUGINS_DIR, p as evaluateFileSize, u as SOLID_REF } from "./home-state-oUGFB4ds.mjs";
|
|
9
9
|
import { i as resolveSessions, n as formatDocSatisfactionStatus, r as isDocConsulted, t as formatDocDeny } from "./doc-helpers-CWZegVdR.mjs";
|
|
10
10
|
import { i as parseFrontmatter, n as scoreReferences, r as globToRe, t as routeReferences } from "./router-PKVNBHge.mjs";
|
|
11
|
-
import { A as
|
|
11
|
+
import { A as importsTanstackQuery, B as APEX_GATES, C as detectRequiredSkills, D as frameworkSolidGate, E as SKILL_TRIGGERS, G as evaluateApex, H as PRE_AUTH_GATES, I as MAX_EXA_RESULTS, K as freshnessGate, L as MAX_TOKENS, M as countStores, N as declaresStore, O as declaresCustomHook, R as capVerbosity, S as parseField, T as usesTailwindUtilities, U as brainstormGate, V as POST_AUTH_GATES, W as docConsultedGate, _ as detectClaudeMdProjectType, a as firstHeading, c as EXCLUDE_DIRS, d as buildApexTaskInjection, f as loadApexTaskState, g as buildClaudeMdContext, h as buildApexInstruction, i as firstComment, j as queryCapActive, k as declaresQueryHook, l as PROJECT_INDICATORS, m as DEV_VERBS, n as missingSeoElements, o as parseEnrichment, q as solidReadGate, r as descFromText, s as parseEntry, t as isHtmlLike, u as buildApexTaskContext, w as skillTriggerGate, x as parseBodyDesc, z as detectCreationIntent } from "./validate-Bf-EsbDh.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-
|
|
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-IhHk2KlT.mjs";
|
|
14
14
|
import { a as cacheLookupSubstring, c as cacheStore, d as loadIndex, f as summarizeIndex, h as queryHash, i as cacheLookupMeta, l as mcpCacheKey, m as jaccardSimilar, n as webfetchCacheWrite, o as cacheLookupSubstringMeta, p as compactMarkdown, r as cacheLookup, s as cachePath, t as mcpCacheWrite, u as extractText } from "./mcp-store-BkBDmuxN.mjs";
|
|
15
15
|
import { t as incrementTrivialEditCounter } from "./freshness-BV3PQkDB.mjs";
|
|
16
16
|
import { n as toRefMeta, t as loadRefs } from "./loader-AGz4nK7d.mjs";
|
|
17
17
|
import { a as formatPath, c as colors, d as GRADIENT_BLOCKS, f as PROGRESS_BAR_DEFAULTS, i as formatCost, l as progressiveColor, m as TIME_INTERVALS, n as generateProgressBar, o as formatTimeLeft, p as PROGRESS_CHARS, r as formatBasename, s as formatTokens, t as generateGradientBar, u as COLOR_THRESHOLDS } from "./statusline-D87eUNXl.mjs";
|
|
18
|
-
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, DEFAULT_MAX_LINES, DEFAULT_TTL_SEC, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, HOME_DIR, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, RALPH_SAFE, RUST_DECL_RE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, addRoot, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cacheLookupMeta, cacheLookupSubstring, cacheLookupSubstringMeta, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, envCandidates, evaluate, evaluateApex, evaluateFileSize, extractText, firstComment, firstHeading, formatBasename, formatCost, formatDocDeny, formatDocSatisfactionStatus, formatPath, formatPrompt, formatTimeLeft, formatTokens, frameworkSolidGate, freshnessGate, generateGradientBar, generateProgressBar, globToRe, incrementTrivialEditCounter, installGuard, interfaceSeparationGuard, isApexCommand, isCodeFile, isDocConsulted, isHtmlLike, isRalphMode, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadDotenv, loadIndex, loadRefs, matchPatterns, mcpCacheKey, mcpCacheWrite, missingSeoElements, modeFor, nowStamp, parseBodyDesc, parseEnrichment, parseEntry, parseEnvFile, parseEnvInt, parseField, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveTtlSec, routeReferences, runGuards, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, summarizeIndex, throttleMs, toRefMeta, ttlLabel, usesTailwindUtilities, walkUpFor, webfetchCacheWrite };
|
|
18
|
+
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, DEFAULT_MAX_LINES, DEFAULT_STDIN_MAX_BYTES, DEFAULT_TTL_SEC, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, HOME_DIR, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, RALPH_SAFE, RUST_DECL_RE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, addRoot, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cacheLookupMeta, cacheLookupSubstring, cacheLookupSubstringMeta, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countFrameworkCodeLines, countLines, countStores, declaresCustomHook, declaresExportedTypeAlias, declaresInterface, declaresQueryHook, declaresStore, 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, hookBudget, importsTanstackQuery, incrementTrivialEditCounter, installGuard, interfaceDeclLevel, interfaceSeparationGuard, isApexCommand, isCodeFile, isComponentsPath, isDocConsulted, isHooksPath, isHtmlLike, isInterfacesPath, isQueryPath, isRalphMode, isStoresPath, isTypesPath, isVendorPath, jaccardSimilar, langOfPath, lessonsFileFor, lexProfileOf, loadApexTaskState, loadDotenv, loadIndex, loadRefs, maskCommentsAndStrings, maskCommentsOnly, matchPatterns, mcpCacheKey, mcpCacheWrite, missingSeoElements, modeFor, nowStamp, parseBodyDesc, parseEnrichment, parseEntry, parseEnvFile, parseEnvInt, parseField, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryCapActive, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveStdinMaxBytes, resolveTtlSec, routeReferences, runGuards, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, storeBudget, summarizeIndex, throttleMs, toRefMeta, ttlLabel, usesTailwindUtilities, walkUpFor, webfetchCacheWrite };
|
package/dist/init/index.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as HarnessId } from "../types-DvXTI71X.mjs";
|
|
3
2
|
//#region src/init/templates.d.ts
|
|
4
3
|
/**
|
|
5
|
-
* Wiring file templates per harness, registering `harness hook <id>` for BOTH
|
|
6
|
-
* phases: PRE (gate the edit) and POST (catch-all → `activityFor` filters what
|
|
7
|
-
* to record). Formats verified against each harness's 2026 hook docs.
|
|
8
|
-
*/
|
|
4
|
+
* Wiring file templates per harness, registering `harness hook <id>` for BOTH
|
|
5
|
+
* phases: PRE (gate the edit) and POST (catch-all → `activityFor` filters what
|
|
6
|
+
* to record). Formats verified against each harness's 2026 hook docs.
|
|
7
|
+
*/
|
|
9
8
|
/** A file to write during `harness init`. */
|
|
10
9
|
interface InitFile {
|
|
11
10
|
path: string;
|
|
@@ -25,9 +24,9 @@ declare function clineInit(command: string): InitFile[];
|
|
|
25
24
|
//#endregion
|
|
26
25
|
//#region src/init/run.d.ts
|
|
27
26
|
/**
|
|
28
|
-
* Build the wiring file(s) for a harness, or null when it has no hook
|
|
29
|
-
* integration (cli-mode harnesses use `harness check` in a pre-commit step).
|
|
30
|
-
*/
|
|
27
|
+
* Build the wiring file(s) for a harness, or null when it has no hook
|
|
28
|
+
* integration (cli-mode harnesses use `harness check` in a pre-commit step).
|
|
29
|
+
*/
|
|
31
30
|
declare function initFor(id: HarnessId, command?: string): InitFile[] | null;
|
|
32
31
|
/** Write an {@link InitFile} under `root` (creates dirs; `chmod +x` when executable). */
|
|
33
32
|
declare function writeInitFile(root: string, file: InitFile): string;
|
package/dist/init/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as codexInit, i as clineInit, n as writeInitFile, o as cursorInit, r as claudeInit, s as geminiInit, t as initFor } from "../run-
|
|
1
|
+
import { a as codexInit, i as clineInit, n as writeInitFile, o as cursorInit, r as claudeInit, s as geminiInit, t as initFor } from "../run-TAXNRSpD.mjs";
|
|
2
2
|
export { claudeInit, clineInit, codexInit, cursorInit, geminiInit, initFor, writeInitFile };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as evaluate } from "./evaluate-
|
|
1
|
+
import { t as evaluate } from "./evaluate-B4-MhOy_.mjs";
|
|
2
2
|
import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { _ as commandToString, c as readClaudeInput } from "./claude-D93HY8dq.mjs";
|
|
4
4
|
//#region src/adapters/kimi/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* Kimi Code CLI adapter (hook-mode). Moonshot AI's Kimi Code CLI (v0.27.0,
|
|
@@ -60,6 +60,20 @@ function toKimiResponse(prompt) {
|
|
|
60
60
|
return JSON.stringify(res);
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
+
* Render a raw deny reason as a Kimi hook response — for callers that already
|
|
64
|
+
* hold a fully-formatted message (e.g. the MCP cache-hit notice) rather than a
|
|
65
|
+
* portable {@link Prompt}. Same envelope as {@link toKimiResponse}, minus the
|
|
66
|
+
* `[BLOCKED]` prompt framing and without `hookEventName` (undocumented upstream).
|
|
67
|
+
* @param reason - The fully-formatted deny message.
|
|
68
|
+
* @returns The native Kimi response string.
|
|
69
|
+
*/
|
|
70
|
+
function kimiDenyResponse(reason) {
|
|
71
|
+
return JSON.stringify({ hookSpecificOutput: {
|
|
72
|
+
permissionDecision: "deny",
|
|
73
|
+
permissionDecisionReason: reason
|
|
74
|
+
} });
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
63
77
|
* Run the bundled policy over a Kimi hook payload and return the native
|
|
64
78
|
* response string, or null to allow (the hook then exits 0 with empty stdout).
|
|
65
79
|
* @param input - Parsed hook stdin payload.
|
|
@@ -77,4 +91,4 @@ function guard(input) {
|
|
|
77
91
|
return toKimiResponse(r.prompt);
|
|
78
92
|
}
|
|
79
93
|
//#endregion
|
|
80
|
-
export {
|
|
94
|
+
export { toKimiResponse as i, kimiDenyResponse as n, readKimiInput as r, guard as t };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//#region src/config/env.ts
|
|
2
|
+
/**
|
|
3
|
+
* Robust integer-from-env parser.
|
|
4
|
+
* undefined / empty / whitespace / NaN / float / <= 0 all fall back to `fallback`.
|
|
5
|
+
* `Number("")` is 0, so the empty guard is required before `Number()`.
|
|
6
|
+
*/
|
|
7
|
+
function parseEnvInt(raw, fallback) {
|
|
8
|
+
if (!raw?.trim()) return fallback;
|
|
9
|
+
const n = Number(raw.trim());
|
|
10
|
+
return Number.isInteger(n) && n > 0 ? n : fallback;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/config/limits.ts
|
|
14
|
+
/** Default SOLID max lines per file. */
|
|
15
|
+
const DEFAULT_MAX_LINES = 100;
|
|
16
|
+
/** Default env var name carrying the max-lines override. */
|
|
17
|
+
const MAX_LINES_ENV_KEY = "FUSE_SOLID_MAX_LINES";
|
|
18
|
+
/**
|
|
19
|
+
* Resolve the SOLID max-lines limit from an env map.
|
|
20
|
+
* @param env - environment map (defaults to `process.env`)
|
|
21
|
+
* @param key - env var name (defaults to `FUSE_SOLID_MAX_LINES`)
|
|
22
|
+
*/
|
|
23
|
+
function resolveMaxLines(env = process.env, key = MAX_LINES_ENV_KEY) {
|
|
24
|
+
return parseEnvInt(env[key], 100);
|
|
25
|
+
}
|
|
26
|
+
/** Advisory module-split headroom = `maxLines - 10` (never below 1). */
|
|
27
|
+
function splitTarget(maxLines) {
|
|
28
|
+
return Math.max(maxLines - 10, 1);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Custom-hook line budget, derived from the global limit (ratio 0.3 — with
|
|
32
|
+
* the default 100 this yields the owner template's 30; one variable,
|
|
33
|
+
* `FUSE_SOLID_MAX_LINES`, drives every budget proportionally).
|
|
34
|
+
* @param maxLines - The global limit (from {@link resolveMaxLines}).
|
|
35
|
+
*/
|
|
36
|
+
function hookBudget(maxLines) {
|
|
37
|
+
return Math.max(Math.round(maxLines * .3), 1);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Store line budget, derived from the global limit (ratio 0.4 — 40 at the
|
|
41
|
+
* default 100, per owner rules/07-state-management).
|
|
42
|
+
* @param maxLines - The global limit (from {@link resolveMaxLines}).
|
|
43
|
+
*/
|
|
44
|
+
function storeBudget(maxLines) {
|
|
45
|
+
return Math.max(Math.round(maxLines * .4), 1);
|
|
46
|
+
}
|
|
47
|
+
/** Default stdin cap for hook payloads: 16 MiB. */
|
|
48
|
+
const DEFAULT_STDIN_MAX_BYTES = 16 * 1024 * 1024;
|
|
49
|
+
/**
|
|
50
|
+
* Resolve the hook stdin cap (`FUSE_HOOK_STDIN_MAX_BYTES`, default 16 MiB;
|
|
51
|
+
* absent/invalid falls back to the default). The only new env var of the
|
|
52
|
+
* mission — owner-approved exception.
|
|
53
|
+
* @param env - environment map (defaults to `process.env`)
|
|
54
|
+
*/
|
|
55
|
+
function resolveStdinMaxBytes(env = process.env) {
|
|
56
|
+
return parseEnvInt(env.FUSE_HOOK_STDIN_MAX_BYTES, DEFAULT_STDIN_MAX_BYTES);
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { resolveMaxLines as a, storeBudget as c, hookBudget as i, parseEnvInt as l, DEFAULT_STDIN_MAX_BYTES as n, resolveStdinMaxBytes as o, MAX_LINES_ENV_KEY as r, splitTarget as s, DEFAULT_MAX_LINES as t };
|
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-IhHk2KlT.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,3 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
|
|
3
|
-
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, ApexTaskState, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, FileSizeVerdict, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, Guard, GuardContext, JAVA_DECL_RE, LabeledPattern, MAX_EXA_RESULTS, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, type PolicyContext, type PolicyResult, ProjectType, RALPH_SAFE, RUST_DECL_RE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, TreeEntry, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, isHtmlLike, isRalphMode, loadApexTaskState, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate, usesTailwindUtilities };
|
|
1
|
+
import { $ as detectCreationIntent, $t as countFrameworkCodeLines, A as TreeEntry, At as APEX_GATES, B as loadApexTaskState, Bt as evaluate, C as maskCommentsAndStrings, Ct as protectedPathGuard, D as descFromText, Dt as securityGuard, E as missingSeoElements, Et as LabeledPattern, F as EXCLUDE_DIRS, Ft as brainstormGate, G as detectRequiredSkills, Gt as PROJECT_INSTALL, H as buildApexInstruction, Ht as PolicyResult, I as PROJECT_INDICATORS, It as docConsultedGate, J as SKILL_TRIGGERS, Jt as isRalphMode, K as skillTriggerGate, Kt as RALPH_SAFE, L as ApexTaskState, Lt as evaluateApex, M as parseEntry, Mt as ApexGate, N as parseBodyDesc, Nt as POST_AUTH_GATES, O as firstComment, Ot as Guard, P as parseField, Pt as PRE_AUTH_GATES, Q as capVerbosity, Qt as SOLID_REF, R as buildApexTaskContext, Rt as freshnessGate, S as LexProfile, St as PROTECTED_GIT_RE, T as isHtmlLike, Tt as CRITICAL_PATTERNS, U as buildClaudeMdContext, Ut as GIT_ASK, V as DEV_VERBS, Vt as PolicyContext, W as detectClaudeMdProjectType, Wt as GIT_BLOCKED, X as MAX_EXA_RESULTS, Xt as FileSizeVerdict, Y as frameworkSolidGate, Yt as matchPatterns, Z as MAX_TOKENS, Zt as PLUGINS_DIR, _ as isStoresPath, _t as CODE_REDIRECT, a as countStores, an as ProjectType, at as installGuard, b as langOfPath, bt as SESSION_STATE_FRAGMENT, c as InterfaceDeclLevel, cn as isApexCommand, ct as PHP_DECL_RE, d as interfaceDeclLevel, dt as SWIFT_PROTO_RE, en as countLines, et as FAIL_CLOSED, f as LangFamily, ft as TS_DECL_RE, g as isQueryPath, gt as CODE_MUTATORS, h as isInterfacesPath, ht as ASK_WRITERS, i as StoreLib, in as ModularArchitecture, it as runGuards, j as parseEnrichment, jt as ApexContext, k as firstHeading, kt as GuardContext, l as declaresExportedTypeAlias, ln as requiredArchSkill, lt as PY_MODEL_RE, m as isHooksPath, mt as bashWriteGuard, n as importsTanstackQuery, nn as detectFramework, nt as clearUserGuards, o as declaresStore, on as detectModularArchitecture, ot as GO_DECL_RE, p as isComponentsPath, pt as interfaceSeparationGuard, q as usesTailwindUtilities, qt as SYSTEM_INSTALL, r as queryCapActive, rn as DEV_KEYWORDS, rt as registerGuard, s as declaresCustomHook, sn as detectProjectType, st as JAVA_DECL_RE, t as declaresQueryHook, tn as evaluateFileSize, tt as GUARDS, u as declaresInterface, ut as RUST_DECL_RE, v as isTypesPath, vt as FILE_REDIRECT, w as maskCommentsOnly, wt as ASK_PATTERNS, x as lexProfileOf, xt as PROTECTED_FRAGMENTS, y as isVendorPath, yt as SAFE_PREFIXES, z as buildApexTaskInjection, zt as solidReadGate } from "../index-DBgnIZn9.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, InterfaceDeclLevel, JAVA_DECL_RE, LabeledPattern, LangFamily, LexProfile, MAX_EXA_RESULTS, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, type PolicyContext, type PolicyResult, ProjectType, RALPH_SAFE, RUST_DECL_RE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, SWIFT_PROTO_RE, SYSTEM_INSTALL, StoreLib, TS_DECL_RE, TreeEntry, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countFrameworkCodeLines, countLines, countStores, declaresCustomHook, declaresExportedTypeAlias, declaresInterface, declaresQueryHook, declaresStore, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, importsTanstackQuery, installGuard, interfaceDeclLevel, interfaceSeparationGuard, isApexCommand, isComponentsPath, isHooksPath, isHtmlLike, isInterfacesPath, isQueryPath, isRalphMode, isStoresPath, isTypesPath, isVendorPath, langOfPath, lexProfileOf, loadApexTaskState, maskCommentsAndStrings, maskCommentsOnly, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, queryCapActive, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate, usesTailwindUtilities };
|
package/dist/policy/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as countFrameworkCodeLines, f as countLines, l as PLUGINS_DIR, p as evaluateFileSize, u as SOLID_REF } from "../home-state-
|
|
3
|
-
import { A as
|
|
1
|
+
import { $ as matchPatterns, B as protectedPathGuard, C as isInterfacesPath, D as isVendorPath, E as isTypesPath, F as FILE_REDIRECT, H as CRITICAL_PATTERNS, I as SAFE_PREFIXES, J as GIT_BLOCKED, L as SESSION_STATE_FRAGMENT, M as ASK_WRITERS, N as CODE_MUTATORS, O as langOfPath, P as CODE_REDIRECT, Q as isRalphMode, R as PROTECTED_FRAGMENTS, S as isHooksPath, T as isStoresPath, U as securityGuard, V as ASK_PATTERNS, X as RALPH_SAFE, Y as PROJECT_INSTALL, Z as SYSTEM_INSTALL, a as registerGuard, at as DEV_KEYWORDS, b as interfaceDeclLevel, c as GO_DECL_RE, ct as isApexCommand, d as PY_MODEL_RE, et as detectFramework, f as RUST_DECL_RE, h as interfaceSeparationGuard, i as clearUserGuards, it as maskCommentsOnly, j as bashWriteGuard, k as lexProfileOf, l as JAVA_DECL_RE, lt as requiredArchSkill, m as TS_DECL_RE, n as FAIL_CLOSED, o as runGuards, ot as detectModularArchitecture, p as SWIFT_PROTO_RE, q as GIT_ASK, r as GUARDS, rt as maskCommentsAndStrings, s as installGuard, st as detectProjectType, t as evaluate, u as PHP_DECL_RE, v as declaresExportedTypeAlias, w as isQueryPath, x as isComponentsPath, y as declaresInterface, z as PROTECTED_GIT_RE } from "../evaluate-B4-MhOy_.mjs";
|
|
2
|
+
import { d as countFrameworkCodeLines, f as countLines, l as PLUGINS_DIR, p as evaluateFileSize, u as SOLID_REF } from "../home-state-oUGFB4ds.mjs";
|
|
3
|
+
import { A as importsTanstackQuery, B as APEX_GATES, C as detectRequiredSkills, D as frameworkSolidGate, E as SKILL_TRIGGERS, G as evaluateApex, H as PRE_AUTH_GATES, I as MAX_EXA_RESULTS, K as freshnessGate, L as MAX_TOKENS, M as countStores, N as declaresStore, O as declaresCustomHook, R as capVerbosity, S as parseField, T as usesTailwindUtilities, U as brainstormGate, V as POST_AUTH_GATES, W as docConsultedGate, _ as detectClaudeMdProjectType, a as firstHeading, c as EXCLUDE_DIRS, d as buildApexTaskInjection, f as loadApexTaskState, g as buildClaudeMdContext, h as buildApexInstruction, i as firstComment, j as queryCapActive, k as declaresQueryHook, l as PROJECT_INDICATORS, m as DEV_VERBS, n as missingSeoElements, o as parseEnrichment, q as solidReadGate, r as descFromText, s as parseEntry, t as isHtmlLike, u as buildApexTaskContext, w as skillTriggerGate, x as parseBodyDesc, z as detectCreationIntent } from "../validate-Bf-EsbDh.mjs";
|
|
4
4
|
import "../policy-la_KkjCS.mjs";
|
|
5
|
-
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_TOKENS, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, RALPH_SAFE, RUST_DECL_RE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countFrameworkCodeLines, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, isHtmlLike, isRalphMode, loadApexTaskState, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate, usesTailwindUtilities };
|
|
5
|
+
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FILE_REDIRECT, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_TOKENS, PHP_DECL_RE, PLUGINS_DIR, POST_AUTH_GATES, PRE_AUTH_GATES, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PROTECTED_GIT_RE, PY_MODEL_RE, RALPH_SAFE, RUST_DECL_RE, SAFE_PREFIXES, SESSION_STATE_FRAGMENT, SKILL_TRIGGERS, SOLID_REF, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countFrameworkCodeLines, countLines, countStores, declaresCustomHook, declaresExportedTypeAlias, declaresInterface, declaresQueryHook, declaresStore, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, importsTanstackQuery, installGuard, interfaceDeclLevel, interfaceSeparationGuard, isApexCommand, isComponentsPath, isHooksPath, isHtmlLike, isInterfacesPath, isQueryPath, isRalphMode, isStoresPath, isTypesPath, isVendorPath, langOfPath, lexProfileOf, loadApexTaskState, maskCommentsAndStrings, maskCommentsOnly, matchPatterns, missingSeoElements, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, queryCapActive, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate, usesTailwindUtilities };
|
package/dist/prompt/index.d.mts
CHANGED
package/dist/refs/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as RouteResult, r as ScoredRef, t as RefMeta } from "../types-CY5qT2X1.mjs";
|
|
2
|
-
import { a as globToRe, i as scoreReferences, n as toRefMeta, o as parseFrontmatter, r as routeReferences, t as loadRefs } from "../index-
|
|
2
|
+
import { a as globToRe, i as scoreReferences, n as toRefMeta, o as parseFrontmatter, r as routeReferences, t as loadRefs } from "../index-DEfz82BP.mjs";
|
|
3
3
|
export { RefMeta, RouteResult, ScoredRef, globToRe, loadRefs, parseFrontmatter, routeReferences, scoreReferences, toRefMeta };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as projectLayout } from "./layout-
|
|
1
|
+
import { r as projectLayout } from "./layout-KWoE_Mqn.mjs";
|
|
2
2
|
import { t as atomicWrite } from "./json-io-DisYd2fb.mjs";
|
|
3
3
|
import { dirname } from "node:path";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -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-B4-MhOy_.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
|