@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,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/hermes/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* Hermes Agent adapter (hook-mode). Nous Research's hermes-agent (2026) pipes a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as resolveMaxLines, s as splitTarget } from "./limits-DG5pl-5s.mjs";
|
|
2
2
|
import { t as atomicWrite } from "./json-io-DisYd2fb.mjs";
|
|
3
3
|
import { basename, join } from "node:path";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
@@ -18,6 +18,7 @@ const PLUGINS_DIR = "~/.claude/plugins/marketplaces/fusengine-plugins/plugins";
|
|
|
18
18
|
const SOLID_REF = {
|
|
19
19
|
react: "react-expert/skills/solid-react/",
|
|
20
20
|
nextjs: "nextjs-expert/skills/solid-nextjs/",
|
|
21
|
+
"tanstack-start": "tanstack-start-expert/skills/solid-tanstack-start/",
|
|
21
22
|
laravel: "laravel-expert/skills/solid-php/",
|
|
22
23
|
swift: "swift-apple-expert/skills/solid-swift/",
|
|
23
24
|
go: "solid/skills/solid-go/",
|
|
@@ -78,11 +79,12 @@ function evaluateFileSize(lines, max = resolveMaxLines(), filePath = "", framewo
|
|
|
78
79
|
};
|
|
79
80
|
const split = splitTarget(max);
|
|
80
81
|
const fname = filePath ? basename(filePath) : "file";
|
|
82
|
+
const ref = SOLID_REF[framework] ?? "generic/";
|
|
81
83
|
return {
|
|
82
84
|
ok: false,
|
|
83
85
|
lines,
|
|
84
86
|
max,
|
|
85
|
-
message: `BLOCKED: '${fname}' has ${displayLines} lines (max: ${max}). TO SPLIT: 1) Read SOLID rules: ${PLUGINS_DIR}/${
|
|
87
|
+
message: `BLOCKED: '${fname}' has ${displayLines} lines (max: ${max}). TO SPLIT: 1) Read SOLID rules: ${PLUGINS_DIR}/${ref} 2) Create new module files (<${split} lines each) 3) Use Write to replace '${fname}' with <${max} lines version.`
|
|
86
88
|
};
|
|
87
89
|
}
|
|
88
90
|
//#endregion
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/freshness/trivial-edit-counter.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Increment a session's trivial-edit counter, evicting timestamps older than
|
|
4
|
+
* `windowMs`. Decoupled + injectable `now` for testability.
|
|
5
|
+
* @param filePath - session state file path
|
|
6
|
+
* @param windowMs - sliding window in ms
|
|
7
|
+
* @param now - current epoch ms (defaults to `Date.now()`)
|
|
8
|
+
* @returns number of trivial edits within the window (including this one)
|
|
9
|
+
*/
|
|
10
|
+
declare function incrementTrivialEditCounter(filePath: string, windowMs: number, now?: number): Promise<number>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { incrementTrivialEditCounter as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { n as HarnessInfo, r as HarnessMode, t as HarnessId } from "./types-DvXTI71X.mjs";
|
|
2
|
+
//#region src/detect/harness.d.ts
|
|
3
|
+
/** Integration mode for a harness id. */
|
|
4
|
+
declare function modeFor(id: HarnessId): HarnessMode;
|
|
5
|
+
/**
|
|
6
|
+
* Detect the current AI coding harness from environment signals.
|
|
7
|
+
* Priority: `AGENT` standard -> `AI_AGENT` standard -> tool-specific vars -> unknown.
|
|
8
|
+
* @param env - environment map (defaults to `process.env`)
|
|
9
|
+
*/
|
|
10
|
+
declare function detectHarness(env?: Record<string, string | undefined>): HarnessInfo;
|
|
11
|
+
/** Convenience: the integration mode of the current harness. */
|
|
12
|
+
declare function detectMode(env?: Record<string, string | undefined>): HarnessMode;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { detectMode as n, modeFor as r, detectHarness as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as Prompt } from "./types-
|
|
2
|
-
|
|
1
|
+
import { t as Prompt } from "./types-C0-igRKr.mjs";
|
|
3
2
|
//#region src/adapters/claude/index.d.ts
|
|
4
3
|
/** Subset of the Claude Code hook stdin payload we consume. */
|
|
5
4
|
interface ClaudeHookInput {
|
|
@@ -12,18 +11,17 @@ interface ClaudeHookInput {
|
|
|
12
11
|
command?: string | string[];
|
|
13
12
|
};
|
|
14
13
|
cwd?: string;
|
|
15
|
-
/** Shared Claude/Codex hook field — Codex maps approval_policy=never to "bypassPermissions" (adapters/codex/permission-mode.ts). */
|
|
16
|
-
permission_mode?: string;
|
|
14
|
+
/** Shared Claude/Codex hook field — Codex maps approval_policy=never to "bypassPermissions" (adapters/codex/permission-mode.ts). */ permission_mode?: string;
|
|
17
15
|
}
|
|
18
16
|
/** Read & parse the Claude hook payload from stdin (empty object on bad input). */
|
|
19
17
|
declare function readClaudeInput(): Promise<ClaudeHookInput>;
|
|
20
18
|
/** A `deny` hook response for a given event. PreToolUse-only field. */
|
|
21
19
|
declare function denyResponse(event: string, reason: string): string;
|
|
22
20
|
/**
|
|
23
|
-
* A PostToolUse (and Stop/UserPromptSubmit) `block` response: those events
|
|
24
|
-
* ignore `permissionDecision` (PreToolUse-only) and only honor the top-level
|
|
25
|
-
* `decision`/`reason` keys, which feed `reason` back to Claude.
|
|
26
|
-
*/
|
|
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.
|
|
24
|
+
*/
|
|
27
25
|
declare function blockResponse(reason: string): string;
|
|
28
26
|
/** An `additionalContext` injection response. */
|
|
29
27
|
declare function contextResponse(event: string, text: string): string;
|