@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.
Files changed (73) hide show
  1. package/dist/adapters/claude/index.d.mts +1 -1
  2. package/dist/adapters/claude/index.mjs +1 -1
  3. package/dist/adapters/cline/index.mjs +1 -1
  4. package/dist/adapters/codex/index.d.mts +11 -12
  5. package/dist/adapters/codex/index.mjs +3 -3
  6. package/dist/adapters/cursor/index.d.mts +29 -29
  7. package/dist/adapters/cursor/index.mjs +1 -1
  8. package/dist/adapters/gemini/index.mjs +1 -1
  9. package/dist/adapters/hermes/index.d.mts +22 -23
  10. package/dist/adapters/hermes/index.mjs +1 -1
  11. package/dist/adapters/kimi/index.d.mts +54 -46
  12. package/dist/adapters/kimi/index.mjs +2 -2
  13. package/dist/cache/index.d.mts +1 -1
  14. package/dist/{claude-51RSspJ1.mjs → claude-D93HY8dq.mjs} +2 -2
  15. package/dist/cli/bin.d.mts +1 -1
  16. package/dist/cli/bin.mjs +129 -38
  17. package/dist/cli/index.d.mts +3 -3
  18. package/dist/cli/index.mjs +1 -1
  19. package/dist/config/index.d.mts +2 -2
  20. package/dist/config/index.mjs +4 -4
  21. package/dist/detect/index.d.mts +2 -1
  22. package/dist/{doc-helpers-CEKzGg2u.d.mts → doc-helpers-BGCzP9VF.d.mts} +12 -12
  23. package/dist/{dotenv-B26N_uGr.mjs → dotenv-DoqNlALG.mjs} +29 -2
  24. package/dist/{evaluate-ClfbCDiY.mjs → evaluate-B4-MhOy_.mjs} +322 -32
  25. package/dist/freshness/index.d.mts +2 -2
  26. package/dist/{handle-B7YufFz9.mjs → handle-J5r2f_O_.mjs} +637 -159
  27. package/dist/{hermes-rTmVdhUL.mjs → hermes-1PUEoY8q.mjs} +2 -2
  28. package/dist/{home-state-BXf38Zi1.mjs → home-state-oUGFB4ds.mjs} +4 -2
  29. package/dist/index-84heAAm_.d.mts +12 -0
  30. package/dist/index-CaxrMD1A.d.mts +1 -0
  31. package/dist/index-CigBu4K9.d.mts +14 -0
  32. package/dist/{index-DGxNjXW7.d.mts → index-D4C2-IIc.d.mts} +6 -8
  33. package/dist/index-DBgnIZn9.d.mts +756 -0
  34. package/dist/{index-mmRF3KNp.d.mts → index-DEfz82BP.d.mts} +12 -13
  35. package/dist/{index-BUwEmIK-.d.mts → index-DhmV2MPh.d.mts} +31 -31
  36. package/dist/index-oXXPs2xl.d.mts +119 -0
  37. package/dist/index-p9fLrSOD.d.mts +27 -0
  38. package/dist/index.d.mts +11 -11
  39. package/dist/index.mjs +8 -8
  40. package/dist/init/index.d.mts +8 -9
  41. package/dist/init/index.mjs +1 -1
  42. package/dist/{kimi-C7FGprQz.mjs → kimi-ChbcU2uI.mjs} +17 -3
  43. package/dist/{layout-C0jaaCQC.mjs → layout-KWoE_Mqn.mjs} +1 -0
  44. package/dist/limits-DG5pl-5s.mjs +59 -0
  45. package/dist/memory/index.mjs +1 -1
  46. package/dist/policy/index.d.mts +2 -3
  47. package/dist/policy/index.mjs +4 -4
  48. package/dist/prompt/index.d.mts +2 -1
  49. package/dist/refs/index.d.mts +1 -1
  50. package/dist/{registry-CymilZiZ.mjs → registry-IhHk2KlT.mjs} +1 -1
  51. package/dist/{run-3tyTW9Ud.mjs → run-D_WchZ3R.mjs} +1 -1
  52. package/dist/{run-Do2JltgU.mjs → run-TAXNRSpD.mjs} +1 -1
  53. package/dist/runtime/index.d.mts +453 -451
  54. package/dist/runtime/index.mjs +3 -3
  55. package/dist/{session-state-CY4iohn_.d.mts → session-state-D5gLr66m.d.mts} +29 -30
  56. package/dist/{skill-path-CDvR4bbF.mjs → skill-path-DhBGlQe3.mjs} +2 -2
  57. package/dist/{store-nDZ3eLBQ.mjs → store-yr_QFsZY.mjs} +101 -13
  58. package/dist/tracking/index.d.mts +22 -13
  59. package/dist/tracking/index.mjs +2 -2
  60. package/dist/{types-DVbIl9md.d.mts → types-C0-igRKr.d.mts} +8 -8
  61. package/dist/types-DvXTI71X.d.mts +15 -0
  62. package/dist/util/index.d.mts +1 -1
  63. package/dist/{validate-CkmquRDV.mjs → validate-Bf-EsbDh.mjs} +279 -20
  64. package/package.json +163 -163
  65. package/dist/apex-Wdi1nq_w.d.mts +0 -73
  66. package/dist/harness-BQ5_Wnva.d.mts +0 -27
  67. package/dist/index-BEMumjOw.d.mts +0 -27
  68. package/dist/index-BIGVNQB8.d.mts +0 -576
  69. package/dist/index-BKZ67WMa.d.mts +0 -1
  70. package/dist/index-BOBXQ91y.d.mts +0 -12
  71. package/dist/index-BVVgDSdq.d.mts +0 -1
  72. package/dist/index-B_VHbsaJ.d.mts +0 -96
  73. package/dist/limits-CHn8AIL1.mjs +0 -31
package/package.json CHANGED
@@ -1,165 +1,165 @@
1
1
  {
2
- "name": "@fusengine/harness",
3
- "version": "0.1.80",
4
- "description": "Harness-agnostic toolkit for AI coding agents: runtime harness detection (Claude Code, Codex, Cursor, Cline, Gemini, Aider...), pure policy core (env config, project/framework detection, SOLID/file-size limits, APEX freshness, guard patterns, portable prompts), cache, project memory, ref routing, state/locks, statusline, per-harness adapters (Claude/Cursor/Cline/Gemini) and a cli-mode harness-check binary. Bun-native, with a built dist for Node + bundlers.",
5
- "type": "module",
6
- "module": "src/index.ts",
7
- "types": "dist/index.d.mts",
8
- "bin": {
9
- "harness": "./dist/cli/bin.mjs"
10
- },
11
- "exports": {
12
- ".": {
13
- "bun": "./src/index.ts",
14
- "types": "./dist/index.d.mts",
15
- "import": "./dist/index.mjs"
16
- },
17
- "./config": {
18
- "bun": "./src/config/index.ts",
19
- "types": "./dist/config/index.d.mts",
20
- "import": "./dist/config/index.mjs"
21
- },
22
- "./util": {
23
- "bun": "./src/util/index.ts",
24
- "types": "./dist/util/index.d.mts",
25
- "import": "./dist/util/index.mjs"
26
- },
27
- "./detect": {
28
- "bun": "./src/detect/index.ts",
29
- "types": "./dist/detect/index.d.mts",
30
- "import": "./dist/detect/index.mjs"
31
- },
32
- "./policy": {
33
- "bun": "./src/policy/index.ts",
34
- "types": "./dist/policy/index.d.mts",
35
- "import": "./dist/policy/index.mjs"
36
- },
37
- "./prompt": {
38
- "bun": "./src/prompt/index.ts",
39
- "types": "./dist/prompt/index.d.mts",
40
- "import": "./dist/prompt/index.mjs"
41
- },
42
- "./memory": {
43
- "bun": "./src/memory/index.ts",
44
- "types": "./dist/memory/index.d.mts",
45
- "import": "./dist/memory/index.mjs"
46
- },
47
- "./cache": {
48
- "bun": "./src/cache/index.ts",
49
- "types": "./dist/cache/index.d.mts",
50
- "import": "./dist/cache/index.mjs"
51
- },
52
- "./freshness": {
53
- "bun": "./src/freshness/index.ts",
54
- "types": "./dist/freshness/index.d.mts",
55
- "import": "./dist/freshness/index.mjs"
56
- },
57
- "./refs": {
58
- "bun": "./src/refs/index.ts",
59
- "types": "./dist/refs/index.d.mts",
60
- "import": "./dist/refs/index.mjs"
61
- },
62
- "./statusline": {
63
- "bun": "./src/statusline/index.ts",
64
- "types": "./dist/statusline/index.d.mts",
65
- "import": "./dist/statusline/index.mjs"
66
- },
67
- "./cli": {
68
- "bun": "./src/cli/index.ts",
69
- "types": "./dist/cli/index.d.mts",
70
- "import": "./dist/cli/index.mjs"
71
- },
72
- "./init": {
73
- "bun": "./src/init/index.ts",
74
- "types": "./dist/init/index.d.mts",
75
- "import": "./dist/init/index.mjs"
76
- },
77
- "./tracking": {
78
- "bun": "./src/tracking/index.ts",
79
- "types": "./dist/tracking/index.d.mts",
80
- "import": "./dist/tracking/index.mjs"
81
- },
82
- "./runtime": {
83
- "bun": "./src/runtime/index.ts",
84
- "types": "./dist/runtime/index.d.mts",
85
- "import": "./dist/runtime/index.mjs"
86
- },
87
- "./adapters/claude": {
88
- "bun": "./src/adapters/claude/index.ts",
89
- "types": "./dist/adapters/claude/index.d.mts",
90
- "import": "./dist/adapters/claude/index.mjs"
91
- },
92
- "./adapters/codex": {
93
- "bun": "./src/adapters/codex/index.ts",
94
- "types": "./dist/adapters/codex/index.d.mts",
95
- "import": "./dist/adapters/codex/index.mjs"
96
- },
97
- "./adapters/cursor": {
98
- "bun": "./src/adapters/cursor/index.ts",
99
- "types": "./dist/adapters/cursor/index.d.mts",
100
- "import": "./dist/adapters/cursor/index.mjs"
101
- },
102
- "./adapters/cline": {
103
- "bun": "./src/adapters/cline/index.ts",
104
- "types": "./dist/adapters/cline/index.d.mts",
105
- "import": "./dist/adapters/cline/index.mjs"
106
- },
107
- "./adapters/gemini": {
108
- "bun": "./src/adapters/gemini/index.ts",
109
- "types": "./dist/adapters/gemini/index.d.mts",
110
- "import": "./dist/adapters/gemini/index.mjs"
111
- },
112
- "./adapters/hermes": {
113
- "bun": "./src/adapters/hermes/index.ts",
114
- "types": "./dist/adapters/hermes/index.d.mts",
115
- "import": "./dist/adapters/hermes/index.mjs"
116
- },
117
- "./adapters/kimi": {
118
- "bun": "./src/adapters/kimi/index.ts",
119
- "types": "./dist/adapters/kimi/index.d.mts",
120
- "import": "./dist/adapters/kimi/index.mjs"
121
- }
122
- },
123
- "files": [
124
- "dist",
125
- "assets",
126
- "README.md",
127
- "LICENSE"
128
- ],
129
- "license": "MIT",
130
- "repository": {
131
- "type": "git",
132
- "url": "git+https://github.com/fusengine/harness.git"
133
- },
134
- "homepage": "https://github.com/fusengine/harness#readme",
135
- "bugs": "https://github.com/fusengine/harness/issues",
136
- "sideEffects": false,
137
- "scripts": {
138
- "test": "bun test",
139
- "sim": "bun test test/sim/",
140
- "typecheck": "tsc --noEmit",
141
- "docs:api": "typedoc",
142
- "build": "tsdown src/index.ts src/config/index.ts src/util/index.ts src/detect/index.ts src/policy/index.ts src/prompt/index.ts src/memory/index.ts src/cache/index.ts src/freshness/index.ts src/refs/index.ts src/statusline/index.ts src/cli/index.ts src/cli/bin.ts src/init/index.ts src/tracking/index.ts src/runtime/index.ts src/adapters/claude/index.ts src/adapters/codex/index.ts src/adapters/cursor/index.ts src/adapters/cline/index.ts src/adapters/gemini/index.ts src/adapters/hermes/index.ts src/adapters/kimi/index.ts --dts --format esm --clean --out-dir dist",
143
- "prepublishOnly": "bun test && tsc --noEmit && bun run build"
144
- },
145
- "publishConfig": {
146
- "access": "public"
147
- },
148
- "peerDependencies": {
149
- "@vercel/detect-agent": "*"
150
- },
151
- "peerDependenciesMeta": {
152
- "@vercel/detect-agent": {
153
- "optional": true
154
- }
155
- },
156
- "devDependencies": {
157
- "@types/bun": "latest",
158
- "tsdown": "^0.22.3",
159
- "typedoc": "^0.28.19",
160
- "typescript": "^6.0.3"
161
- },
162
- "dependencies": {
163
- "figures": "^6.1.0"
164
- }
2
+ "name": "@fusengine/harness",
3
+ "version": "0.1.81",
4
+ "description": "Harness-agnostic toolkit for AI coding agents: runtime harness detection (Claude Code, Codex, Cursor, Cline, Gemini, Aider...), pure policy core (env config, project/framework detection, SOLID/file-size limits, APEX freshness, guard patterns, portable prompts), cache, project memory, ref routing, state/locks, statusline, per-harness adapters (Claude/Cursor/Cline/Gemini) and a cli-mode harness-check binary. Bun-native, with a built dist for Node + bundlers.",
5
+ "type": "module",
6
+ "module": "src/index.ts",
7
+ "types": "dist/index.d.mts",
8
+ "bin": {
9
+ "harness": "./dist/cli/bin.mjs"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "bun": "./src/index.ts",
14
+ "types": "./dist/index.d.mts",
15
+ "import": "./dist/index.mjs"
16
+ },
17
+ "./config": {
18
+ "bun": "./src/config/index.ts",
19
+ "types": "./dist/config/index.d.mts",
20
+ "import": "./dist/config/index.mjs"
21
+ },
22
+ "./util": {
23
+ "bun": "./src/util/index.ts",
24
+ "types": "./dist/util/index.d.mts",
25
+ "import": "./dist/util/index.mjs"
26
+ },
27
+ "./detect": {
28
+ "bun": "./src/detect/index.ts",
29
+ "types": "./dist/detect/index.d.mts",
30
+ "import": "./dist/detect/index.mjs"
31
+ },
32
+ "./policy": {
33
+ "bun": "./src/policy/index.ts",
34
+ "types": "./dist/policy/index.d.mts",
35
+ "import": "./dist/policy/index.mjs"
36
+ },
37
+ "./prompt": {
38
+ "bun": "./src/prompt/index.ts",
39
+ "types": "./dist/prompt/index.d.mts",
40
+ "import": "./dist/prompt/index.mjs"
41
+ },
42
+ "./memory": {
43
+ "bun": "./src/memory/index.ts",
44
+ "types": "./dist/memory/index.d.mts",
45
+ "import": "./dist/memory/index.mjs"
46
+ },
47
+ "./cache": {
48
+ "bun": "./src/cache/index.ts",
49
+ "types": "./dist/cache/index.d.mts",
50
+ "import": "./dist/cache/index.mjs"
51
+ },
52
+ "./freshness": {
53
+ "bun": "./src/freshness/index.ts",
54
+ "types": "./dist/freshness/index.d.mts",
55
+ "import": "./dist/freshness/index.mjs"
56
+ },
57
+ "./refs": {
58
+ "bun": "./src/refs/index.ts",
59
+ "types": "./dist/refs/index.d.mts",
60
+ "import": "./dist/refs/index.mjs"
61
+ },
62
+ "./statusline": {
63
+ "bun": "./src/statusline/index.ts",
64
+ "types": "./dist/statusline/index.d.mts",
65
+ "import": "./dist/statusline/index.mjs"
66
+ },
67
+ "./cli": {
68
+ "bun": "./src/cli/index.ts",
69
+ "types": "./dist/cli/index.d.mts",
70
+ "import": "./dist/cli/index.mjs"
71
+ },
72
+ "./init": {
73
+ "bun": "./src/init/index.ts",
74
+ "types": "./dist/init/index.d.mts",
75
+ "import": "./dist/init/index.mjs"
76
+ },
77
+ "./tracking": {
78
+ "bun": "./src/tracking/index.ts",
79
+ "types": "./dist/tracking/index.d.mts",
80
+ "import": "./dist/tracking/index.mjs"
81
+ },
82
+ "./runtime": {
83
+ "bun": "./src/runtime/index.ts",
84
+ "types": "./dist/runtime/index.d.mts",
85
+ "import": "./dist/runtime/index.mjs"
86
+ },
87
+ "./adapters/claude": {
88
+ "bun": "./src/adapters/claude/index.ts",
89
+ "types": "./dist/adapters/claude/index.d.mts",
90
+ "import": "./dist/adapters/claude/index.mjs"
91
+ },
92
+ "./adapters/codex": {
93
+ "bun": "./src/adapters/codex/index.ts",
94
+ "types": "./dist/adapters/codex/index.d.mts",
95
+ "import": "./dist/adapters/codex/index.mjs"
96
+ },
97
+ "./adapters/cursor": {
98
+ "bun": "./src/adapters/cursor/index.ts",
99
+ "types": "./dist/adapters/cursor/index.d.mts",
100
+ "import": "./dist/adapters/cursor/index.mjs"
101
+ },
102
+ "./adapters/cline": {
103
+ "bun": "./src/adapters/cline/index.ts",
104
+ "types": "./dist/adapters/cline/index.d.mts",
105
+ "import": "./dist/adapters/cline/index.mjs"
106
+ },
107
+ "./adapters/gemini": {
108
+ "bun": "./src/adapters/gemini/index.ts",
109
+ "types": "./dist/adapters/gemini/index.d.mts",
110
+ "import": "./dist/adapters/gemini/index.mjs"
111
+ },
112
+ "./adapters/hermes": {
113
+ "bun": "./src/adapters/hermes/index.ts",
114
+ "types": "./dist/adapters/hermes/index.d.mts",
115
+ "import": "./dist/adapters/hermes/index.mjs"
116
+ },
117
+ "./adapters/kimi": {
118
+ "bun": "./src/adapters/kimi/index.ts",
119
+ "types": "./dist/adapters/kimi/index.d.mts",
120
+ "import": "./dist/adapters/kimi/index.mjs"
121
+ }
122
+ },
123
+ "files": [
124
+ "dist",
125
+ "assets",
126
+ "README.md",
127
+ "LICENSE"
128
+ ],
129
+ "license": "MIT",
130
+ "repository": {
131
+ "type": "git",
132
+ "url": "git+https://github.com/fusengine/harness.git"
133
+ },
134
+ "homepage": "https://github.com/fusengine/harness#readme",
135
+ "bugs": "https://github.com/fusengine/harness/issues",
136
+ "sideEffects": false,
137
+ "scripts": {
138
+ "test": "bun test",
139
+ "sim": "bun test test/sim/",
140
+ "typecheck": "tsc --noEmit",
141
+ "docs:api": "typedoc",
142
+ "build": "tsdown src/index.ts src/config/index.ts src/util/index.ts src/detect/index.ts src/policy/index.ts src/prompt/index.ts src/memory/index.ts src/cache/index.ts src/freshness/index.ts src/refs/index.ts src/statusline/index.ts src/cli/index.ts src/cli/bin.ts src/init/index.ts src/tracking/index.ts src/runtime/index.ts src/adapters/claude/index.ts src/adapters/codex/index.ts src/adapters/cursor/index.ts src/adapters/cline/index.ts src/adapters/gemini/index.ts src/adapters/hermes/index.ts src/adapters/kimi/index.ts --dts --format esm --clean --out-dir dist",
143
+ "prepublishOnly": "bun test && tsc --noEmit && bun run build"
144
+ },
145
+ "publishConfig": {
146
+ "access": "public"
147
+ },
148
+ "peerDependencies": {
149
+ "@vercel/detect-agent": "*"
150
+ },
151
+ "peerDependenciesMeta": {
152
+ "@vercel/detect-agent": {
153
+ "optional": true
154
+ }
155
+ },
156
+ "devDependencies": {
157
+ "@types/bun": "latest",
158
+ "tsdown": "^0.22.13",
159
+ "typedoc": "^0.28.20",
160
+ "typescript": "^7.0.2"
161
+ },
162
+ "dependencies": {
163
+ "figures": "^6.1.0"
164
+ }
165
165
  }
@@ -1,73 +0,0 @@
1
- import { t as Prompt } from "./types-DVbIl9md.mjs";
2
- import { t as AuthEntry } from "./doc-helpers-CEKzGg2u.mjs";
3
- import { t as RefMeta } from "./types-CY5qT2X1.mjs";
4
-
5
- //#region src/policy/apex-gates.d.ts
6
- /** Gate: the routed SOLID references for this edit must have been read within the TTL. */
7
- declare const solidReadGate: ApexGate;
8
- /** Gate: the required prior agents (explore + research) must have run within the window. */
9
- declare const freshnessGate: ApexGate;
10
- //#endregion
11
- //#region src/policy/apex.d.ts
12
- /**
13
- * Session context for the stateful APEX gates. The harness adapter supplies this
14
- * (the package owns the gate LOGIC; recording the session activity is the
15
- * adapter's tracking layer).
16
- */
17
- interface ApexContext {
18
- sessionId: string;
19
- framework: string;
20
- filePath: string;
21
- content: string;
22
- /** Doc-consultation authorizations from session state (Context7/Exa). */
23
- authorizations?: Record<string, AuthEntry>;
24
- /** Available SOLID references for the framework's skill. */
25
- refs?: RefMeta[];
26
- /** Absolute paths of SOLID refs already read this session. */
27
- refsRead?: string[];
28
- /**
29
- * Epoch-ms read timestamp per `refsRead` path (parity track-solid-reads.py
30
- * `solid_reads[].timestamp`). PARITY: the TTL applies ONLY to solidReadGate —
31
- * Python TTL-izes SOLID reads exclusively (require-solid-read.py); the
32
- * skill-trigger/design/shadcn gates stay session-scoped (no TTL). A path in
33
- * `refsRead` with no stamp here (tracks recorded before this field existed)
34
- * counts as read — backward compat.
35
- */
36
- refsReadAt?: Record<string, number>;
37
- /** Current epoch ms for the SOLID-read TTL check; absent → reads never expire. */
38
- now?: number;
39
- /** Whether the required prior agents (explore + research) ran within the freshness window. */
40
- agentsFresh?: boolean;
41
- /** Names of REQUIRED_AGENTS that have NOT run fresh (subset), for a precise freshnessGate message. Absent → generic wording. */
42
- missingAgents?: string[];
43
- /** Freshness window in ms: labels the block messages' TTL (e.g. "2min") and bounds the SOLID-read TTL in solidReadGate. */
44
- windowMs?: number;
45
- /** Whether brainstorming is required for this edit (creation intent on a new file). */
46
- brainstormRequired?: boolean;
47
- /** Whether the brainstorming agent ran within the window. */
48
- brainstormFresh?: boolean;
49
- }
50
- /** A single APEX gate: returns a blocking {@link Prompt}, or null to pass. */
51
- type ApexGate = (ctx: ApexContext) => Prompt | null;
52
- /** Gate: BOTH Context7 AND Exa (or a web fallback alone) must have been consulted this session. */
53
- declare const docConsultedGate: ApexGate;
54
- /** Gate: brainstorming must precede creating new files when flagged. */
55
- declare const brainstormGate: ApexGate;
56
- /** Gates that run BEFORE Check 1 (harness-specific brainstorm + agent freshness, pre-dating enforce-apex-phases). */
57
- declare const PRE_AUTH_GATES: ReadonlyArray<ApexGate>;
58
- /** Gates that run AFTER Check 1: Check 2 (doc consulted once per session) then the SOLID refs. */
59
- declare const POST_AUTH_GATES: ReadonlyArray<ApexGate>;
60
- /**
61
- * Default APEX gate chain (brainstorm, freshness, docs, SOLID refs). Check 1
62
- * (`apexAuthorizationGate`, policy/apex-authorization.ts) is wired BETWEEN the
63
- * PRE and POST sub-chains by the runtime (gate-apex.ts), which owns its
64
- * target-write side effect — parity enforce-apex-phases.ts Check1 -> Check2.
65
- */
66
- declare const APEX_GATES: ReadonlyArray<ApexGate>;
67
- /**
68
- * Run the APEX gates (chain-of-responsibility): the first failing gate's prompt
69
- * wins; null means every gate passed (allow).
70
- */
71
- declare function evaluateApex(ctx: ApexContext, gates?: ReadonlyArray<ApexGate>): Prompt | null;
72
- //#endregion
73
- export { PRE_AUTH_GATES as a, evaluateApex as c, POST_AUTH_GATES as i, freshnessGate as l, ApexContext as n, brainstormGate as o, ApexGate as r, docConsultedGate as s, APEX_GATES as t, solidReadGate as u };
@@ -1,27 +0,0 @@
1
- //#region src/detect/interfaces/types.d.ts
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" | "hermes" | "kimi" | "unknown";
4
- /** Integration mode: `hook` = native lifecycle hooks; `cli` = run as an external step. */
5
- type HarnessMode = "hook" | "cli";
6
- /** How the harness was identified. */
7
- type HarnessVia = "agent-std" | "ai-agent-std" | "env" | "fallback";
8
- /** Result of {@link detectHarness}. */
9
- interface HarnessInfo {
10
- id: HarnessId;
11
- mode: HarnessMode;
12
- via: HarnessVia;
13
- }
14
- //#endregion
15
- //#region src/detect/harness.d.ts
16
- /** Integration mode for a harness id. */
17
- declare function modeFor(id: HarnessId): HarnessMode;
18
- /**
19
- * Detect the current AI coding harness from environment signals.
20
- * Priority: `AGENT` standard -> `AI_AGENT` standard -> tool-specific vars -> unknown.
21
- * @param env - environment map (defaults to `process.env`)
22
- */
23
- declare function detectHarness(env?: Record<string, string | undefined>): HarnessInfo;
24
- /** Convenience: the integration mode of the current harness. */
25
- declare function detectMode(env?: Record<string, string | undefined>): HarnessMode;
26
- //#endregion
27
- export { HarnessInfo as a, HarnessId as i, detectMode as n, HarnessMode as o, modeFor as r, HarnessVia as s, detectHarness as t };
@@ -1,27 +0,0 @@
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 };