@fusengine/harness 0.1.28 → 0.1.30

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 (35) hide show
  1. package/dist/adapters/claude/index.mjs +1 -1
  2. package/dist/adapters/cline/index.mjs +1 -1
  3. package/dist/adapters/codex/index.mjs +1 -1
  4. package/dist/adapters/cursor/index.mjs +1 -1
  5. package/dist/adapters/gemini/index.mjs +1 -1
  6. package/dist/cache/index.mjs +2 -2
  7. package/dist/{cache-BzbX-ztL.mjs → cache-C9z9LclL.mjs} +1 -31
  8. package/dist/{claude-phC5Uh_W.mjs → claude-B9FYp0Yw.mjs} +1 -1
  9. package/dist/cli/bin.mjs +14 -4
  10. package/dist/cli/index.mjs +1 -1
  11. package/dist/describe-CPtgUzFS.mjs +1038 -0
  12. package/dist/{evaluate-CFYPF3re.mjs → evaluate-j3gRJ_ng.mjs} +14 -2
  13. package/dist/freshness/index.mjs +1 -1
  14. package/dist/{freshness-CezohJHo.mjs → freshness-otdUpuvP.mjs} +1 -1
  15. package/dist/handle-USWK4NSE.mjs +2300 -0
  16. package/dist/index-mISsk0ff.d.mts +438 -0
  17. package/dist/index.d.mts +2 -2
  18. package/dist/index.mjs +7 -8
  19. package/dist/{json-io-xpTDuvtn.mjs → json-io-CAn72gI4.mjs} +1 -1
  20. package/dist/policy/index.d.mts +2 -2
  21. package/dist/policy/index.mjs +4 -4
  22. package/dist/policy-la_KkjCS.mjs +1 -0
  23. package/dist/{run-B8n-H5hA.mjs → run-CXsV-wIJ.mjs} +1 -1
  24. package/dist/runtime/index.d.mts +454 -8
  25. package/dist/runtime/index.mjs +2 -2
  26. package/dist/state/index.mjs +1 -1
  27. package/dist/{state-Cs0Y0MG_.mjs → state-ByhLeKyD.mjs} +1 -1
  28. package/dist/{store-BnHpq2ZB.mjs → store-D-ge2ZPI.mjs} +1 -1
  29. package/dist/{store-DeIsfMg5.mjs → store-PrNPm6So.mjs} +30 -1
  30. package/dist/tracking/index.mjs +1 -1
  31. package/package.json +10 -3
  32. package/dist/handle-DnOw05K8.mjs +0 -347
  33. package/dist/index-DNAzITvw.d.mts +0 -227
  34. package/dist/policy-EuVJ_5hS.mjs +0 -33
  35. package/dist/verbosity-CXpf3aQQ.mjs +0 -98
@@ -1,2 +1,2 @@
1
- import { a as readClaudeInput, i as guard, n as denyResponse, o as toClaudeResponse, r as fileSizeGuard, t as contextResponse } from "../../claude-phC5Uh_W.mjs";
1
+ import { a as readClaudeInput, i as guard, n as denyResponse, o as toClaudeResponse, r as fileSizeGuard, t as contextResponse } from "../../claude-B9FYp0Yw.mjs";
2
2
  export { contextResponse, denyResponse, fileSizeGuard, guard, readClaudeInput, toClaudeResponse };
@@ -1,4 +1,4 @@
1
- import { t as evaluate } from "../../evaluate-CFYPF3re.mjs";
1
+ import { t as evaluate } from "../../evaluate-j3gRJ_ng.mjs";
2
2
  import { t as formatPrompt } from "../../types-ernB1Dy3.mjs";
3
3
  //#region src/adapters/cline/index.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { a as readClaudeInput, i as guard, n as denyResponse, t as contextResponse } from "../../claude-phC5Uh_W.mjs";
1
+ import { a as readClaudeInput, i as guard, n as denyResponse, t as contextResponse } from "../../claude-B9FYp0Yw.mjs";
2
2
  export { contextResponse, denyResponse, guard, readClaudeInput as readCodexInput };
@@ -1,4 +1,4 @@
1
- import { t as evaluate } from "../../evaluate-CFYPF3re.mjs";
1
+ import { t as evaluate } from "../../evaluate-j3gRJ_ng.mjs";
2
2
  import { t as formatPrompt } from "../../types-ernB1Dy3.mjs";
3
3
  //#region src/adapters/cursor/index.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as evaluate } from "../../evaluate-CFYPF3re.mjs";
1
+ import { t as evaluate } from "../../evaluate-j3gRJ_ng.mjs";
2
2
  import { t as formatPrompt } from "../../types-ernB1Dy3.mjs";
3
3
  //#region src/adapters/gemini/index.ts
4
4
  /**
@@ -1,3 +1,3 @@
1
- import { a as queryHash, i as jaccardSimilar, n as summarizeIndex, r as compactMarkdown, t as loadIndex } from "../cache-BzbX-ztL.mjs";
2
- import { a as extractText, i as mcpCacheKey, n as cachePath, r as cacheStore, t as cacheLookup } from "../store-DeIsfMg5.mjs";
1
+ import { n as jaccardSimilar, r as queryHash, t as compactMarkdown } from "../cache-C9z9LclL.mjs";
2
+ import { a as extractText, i as mcpCacheKey, n as cachePath, o as loadIndex, r as cacheStore, s as summarizeIndex, t as cacheLookup } from "../store-PrNPm6So.mjs";
3
3
  export { cacheLookup, cachePath, cacheStore, compactMarkdown, extractText, jaccardSimilar, loadIndex, mcpCacheKey, queryHash, summarizeIndex };
@@ -1,4 +1,3 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
1
  import { createHash } from "node:crypto";
3
2
  //#region src/cache/compact.ts
4
3
  const HTML_ENTITIES = {
@@ -54,33 +53,4 @@ function jaccardSimilar(a, b, threshold = .8) {
54
53
  return inter / union > threshold;
55
54
  }
56
55
  //#endregion
57
- //#region src/cache/io.ts
58
- /** Read a JSON array from `path`; [] on missing/corrupt/non-array. */
59
- function loadIndex(path) {
60
- try {
61
- if (!existsSync(path)) return [];
62
- const data = JSON.parse(readFileSync(path, "utf8"));
63
- return Array.isArray(data) ? data : [];
64
- } catch {
65
- return [];
66
- }
67
- }
68
- /** Summarize an index of `{ tool?, ts? }` entries. */
69
- function summarizeIndex(index) {
70
- const byTool = {};
71
- const timestamps = [];
72
- for (const entry of index) {
73
- if (typeof entry !== "object" || entry === null) continue;
74
- const e = entry;
75
- if (typeof e.tool === "string") byTool[e.tool] = (byTool[e.tool] ?? 0) + 1;
76
- if (typeof e.ts === "string") timestamps.push(e.ts);
77
- }
78
- return {
79
- total: index.length,
80
- byTool,
81
- oldestTs: timestamps.length ? timestamps.reduce((a, b) => a < b ? a : b) : null,
82
- newestTs: timestamps.length ? timestamps.reduce((a, b) => a > b ? a : b) : null
83
- };
84
- }
85
- //#endregion
86
- export { queryHash as a, jaccardSimilar as i, summarizeIndex as n, compactMarkdown as r, loadIndex as t };
56
+ export { jaccardSimilar as n, queryHash as r, compactMarkdown as t };
@@ -1,4 +1,4 @@
1
- import { t as evaluate } from "./evaluate-CFYPF3re.mjs";
1
+ import { t as evaluate } from "./evaluate-j3gRJ_ng.mjs";
2
2
  import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
3
3
  //#region src/adapters/claude/index.ts
4
4
  /**
package/dist/cli/bin.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { r as resolveTtlSec } from "../ttl-BG55s6HZ.mjs";
3
3
  import { t as detectHarness } from "../harness-C8Nxxyn_.mjs";
4
- import { n as stagedContent, r as stagedFiles, t as checkStaged } from "../run-B8n-H5hA.mjs";
4
+ import { n as stagedContent, r as stagedFiles, t as checkStaged } from "../run-CXsV-wIJ.mjs";
5
5
  import { n as writeInitFile, t as initFor } from "../run-D91N4ul1.mjs";
6
- import { t as handleHook } from "../handle-DnOw05K8.mjs";
6
+ import { t as handleHook } from "../handle-USWK4NSE.mjs";
7
7
  //#region src/cli/bin.ts
8
8
  /**
9
9
  * harness — CLI for @fusengine/harness.
@@ -25,11 +25,21 @@ async function readStdin() {
25
25
  }
26
26
  const cmd = process.argv[2];
27
27
  if (cmd === "hook") {
28
- const outcome = await handleHook(process.argv[3] ?? detectHarness().id, await readStdin(), {
28
+ const id = process.argv[3] ?? detectHarness().id;
29
+ const scopeArg = process.argv[4];
30
+ const scope = scopeArg !== void 0 && (/* @__PURE__ */ new Set([
31
+ "solid",
32
+ "rules",
33
+ "carto",
34
+ "security",
35
+ "changelog"
36
+ ])).has(scopeArg) ? scopeArg : "core";
37
+ const outcome = await handleHook(id, await readStdin(), {
29
38
  now: Date.now(),
30
39
  cwd: process.cwd(),
31
40
  refsDir: process.env.FUSE_HARNESS_REFS,
32
- windowMs: resolveTtlSec(process.env) * 1e3
41
+ windowMs: resolveTtlSec(process.env) * 1e3,
42
+ scope
33
43
  });
34
44
  if (outcome.stdout) process.stdout.write(outcome.stdout);
35
45
  process.exit(outcome.exit);
@@ -1,2 +1,2 @@
1
- import { n as stagedContent, r as stagedFiles, t as checkStaged } from "../run-B8n-H5hA.mjs";
1
+ import { n as stagedContent, r as stagedFiles, t as checkStaged } from "../run-CXsV-wIJ.mjs";
2
2
  export { checkStaged, stagedContent, stagedFiles };