@fusengine/harness 0.1.79 → 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 (76) hide show
  1. package/README.md +14 -1
  2. package/dist/adapters/claude/index.d.mts +1 -1
  3. package/dist/adapters/claude/index.mjs +1 -1
  4. package/dist/adapters/cline/index.mjs +1 -1
  5. package/dist/adapters/codex/index.d.mts +11 -12
  6. package/dist/adapters/codex/index.mjs +3 -3
  7. package/dist/adapters/cursor/index.d.mts +29 -29
  8. package/dist/adapters/cursor/index.mjs +1 -1
  9. package/dist/adapters/gemini/index.mjs +1 -1
  10. package/dist/adapters/hermes/index.d.mts +22 -23
  11. package/dist/adapters/hermes/index.mjs +1 -1
  12. package/dist/adapters/kimi/index.d.mts +87 -0
  13. package/dist/adapters/kimi/index.mjs +2 -0
  14. package/dist/cache/index.d.mts +1 -1
  15. package/dist/{claude-51RSspJ1.mjs → claude-D93HY8dq.mjs} +2 -2
  16. package/dist/cli/bin.d.mts +1 -1
  17. package/dist/cli/bin.mjs +130 -39
  18. package/dist/cli/index.d.mts +3 -3
  19. package/dist/cli/index.mjs +1 -1
  20. package/dist/config/index.d.mts +2 -2
  21. package/dist/config/index.mjs +4 -4
  22. package/dist/detect/index.d.mts +2 -1
  23. package/dist/detect/index.mjs +1 -1
  24. package/dist/{doc-helpers-CEKzGg2u.d.mts → doc-helpers-BGCzP9VF.d.mts} +12 -12
  25. package/dist/{dotenv-Jj8aL1FL.mjs → dotenv-DoqNlALG.mjs} +31 -3
  26. package/dist/{evaluate-ClfbCDiY.mjs → evaluate-B4-MhOy_.mjs} +322 -32
  27. package/dist/freshness/index.d.mts +2 -2
  28. package/dist/{handle-Dthtlp7Z.mjs → handle-J5r2f_O_.mjs} +665 -164
  29. package/dist/{harness-Cb9xR8dC.mjs → harness-BMuLJ9lm.mjs} +4 -2
  30. package/dist/{hermes-rTmVdhUL.mjs → hermes-1PUEoY8q.mjs} +2 -2
  31. package/dist/{home-state-BXf38Zi1.mjs → home-state-oUGFB4ds.mjs} +4 -2
  32. package/dist/index-84heAAm_.d.mts +12 -0
  33. package/dist/index-CaxrMD1A.d.mts +1 -0
  34. package/dist/index-CigBu4K9.d.mts +14 -0
  35. package/dist/{index-DGxNjXW7.d.mts → index-D4C2-IIc.d.mts} +6 -8
  36. package/dist/index-DBgnIZn9.d.mts +756 -0
  37. package/dist/{index-mmRF3KNp.d.mts → index-DEfz82BP.d.mts} +12 -13
  38. package/dist/{index-BUwEmIK-.d.mts → index-DhmV2MPh.d.mts} +31 -31
  39. package/dist/index-oXXPs2xl.d.mts +119 -0
  40. package/dist/index-p9fLrSOD.d.mts +27 -0
  41. package/dist/index.d.mts +11 -11
  42. package/dist/index.mjs +9 -9
  43. package/dist/init/index.d.mts +8 -9
  44. package/dist/init/index.mjs +1 -1
  45. package/dist/kimi-ChbcU2uI.mjs +94 -0
  46. package/dist/{layout-C0jaaCQC.mjs → layout-KWoE_Mqn.mjs} +1 -0
  47. package/dist/limits-DG5pl-5s.mjs +59 -0
  48. package/dist/memory/index.mjs +1 -1
  49. package/dist/policy/index.d.mts +2 -3
  50. package/dist/policy/index.mjs +4 -4
  51. package/dist/prompt/index.d.mts +2 -1
  52. package/dist/refs/index.d.mts +1 -1
  53. package/dist/{registry-CymilZiZ.mjs → registry-IhHk2KlT.mjs} +1 -1
  54. package/dist/{run-3tyTW9Ud.mjs → run-D_WchZ3R.mjs} +1 -1
  55. package/dist/{run-Do2JltgU.mjs → run-TAXNRSpD.mjs} +1 -1
  56. package/dist/runtime/index.d.mts +455 -446
  57. package/dist/runtime/index.mjs +3 -3
  58. package/dist/{session-state-CY4iohn_.d.mts → session-state-D5gLr66m.d.mts} +29 -30
  59. package/dist/{skill-path-BO2N0XvB.mjs → skill-path-DhBGlQe3.mjs} +3 -3
  60. package/dist/{store-Bcn08y9m.mjs → store-yr_QFsZY.mjs} +101 -13
  61. package/dist/tracking/index.d.mts +22 -13
  62. package/dist/tracking/index.mjs +2 -2
  63. package/dist/{types-DVbIl9md.d.mts → types-C0-igRKr.d.mts} +8 -8
  64. package/dist/types-DvXTI71X.d.mts +15 -0
  65. package/dist/util/index.d.mts +1 -1
  66. package/dist/{validate-DhOX5hDK.mjs → validate-Bf-EsbDh.mjs} +348 -32
  67. package/package.json +163 -158
  68. package/dist/apex-Wdi1nq_w.d.mts +0 -73
  69. package/dist/harness-s1Fce_dL.d.mts +0 -27
  70. package/dist/index-BEMumjOw.d.mts +0 -27
  71. package/dist/index-BIGVNQB8.d.mts +0 -576
  72. package/dist/index-BKZ67WMa.d.mts +0 -1
  73. package/dist/index-BOBXQ91y.d.mts +0 -12
  74. package/dist/index-BVVgDSdq.d.mts +0 -1
  75. package/dist/index-jj_EzZRv.d.mts +0 -96
  76. package/dist/limits-CHn8AIL1.mjs +0 -31
@@ -31,7 +31,8 @@ const STD_NAMES = {
31
31
  gemini: "gemini-cli",
32
32
  copilot: "copilot",
33
33
  kiro: "kiro",
34
- hermes: "hermes"
34
+ hermes: "hermes",
35
+ kimi: "kimi"
35
36
  };
36
37
  /** Harnesses exposing a native hook system (vs CLI-only integration). */
37
38
  const HOOK_CAPABLE = /* @__PURE__ */ new Set([
@@ -41,7 +42,8 @@ const HOOK_CAPABLE = /* @__PURE__ */ new Set([
41
42
  "cline",
42
43
  "gemini-cli",
43
44
  "opencode",
44
- "hermes"
45
+ "hermes",
46
+ "kimi"
45
47
  ]);
46
48
  /** Integration mode for a harness id. */
47
49
  function modeFor(id) {
@@ -1,6 +1,6 @@
1
- import { t as evaluate } from "./evaluate-ClfbCDiY.mjs";
1
+ import { t as evaluate } from "./evaluate-B4-MhOy_.mjs";
2
2
  import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
3
- import { c as readClaudeInput, v as commandToString } from "./claude-51RSspJ1.mjs";
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 { i as splitTarget, r as resolveMaxLines } from "./limits-CHn8AIL1.mjs";
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}/${SOLID_REF[framework] ?? "generic/"} 2) Create new module files (<${split} lines each) 3) Use Write to replace '${fname}' with <${max} lines version.`
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-DVbIl9md.mjs";
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;