@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.
- package/dist/adapters/claude/index.mjs +1 -1
- package/dist/adapters/cline/index.mjs +1 -1
- package/dist/adapters/codex/index.mjs +1 -1
- package/dist/adapters/cursor/index.mjs +1 -1
- package/dist/adapters/gemini/index.mjs +1 -1
- package/dist/cache/index.mjs +2 -2
- package/dist/{cache-BzbX-ztL.mjs → cache-C9z9LclL.mjs} +1 -31
- package/dist/{claude-phC5Uh_W.mjs → claude-B9FYp0Yw.mjs} +1 -1
- package/dist/cli/bin.mjs +14 -4
- package/dist/cli/index.mjs +1 -1
- package/dist/describe-CPtgUzFS.mjs +1038 -0
- package/dist/{evaluate-CFYPF3re.mjs → evaluate-j3gRJ_ng.mjs} +14 -2
- package/dist/freshness/index.mjs +1 -1
- package/dist/{freshness-CezohJHo.mjs → freshness-otdUpuvP.mjs} +1 -1
- package/dist/handle-USWK4NSE.mjs +2300 -0
- package/dist/index-mISsk0ff.d.mts +438 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +7 -8
- package/dist/{json-io-xpTDuvtn.mjs → json-io-CAn72gI4.mjs} +1 -1
- package/dist/policy/index.d.mts +2 -2
- package/dist/policy/index.mjs +4 -4
- package/dist/policy-la_KkjCS.mjs +1 -0
- package/dist/{run-B8n-H5hA.mjs → run-CXsV-wIJ.mjs} +1 -1
- package/dist/runtime/index.d.mts +454 -8
- package/dist/runtime/index.mjs +2 -2
- package/dist/state/index.mjs +1 -1
- package/dist/{state-Cs0Y0MG_.mjs → state-ByhLeKyD.mjs} +1 -1
- package/dist/{store-BnHpq2ZB.mjs → store-D-ge2ZPI.mjs} +1 -1
- package/dist/{store-DeIsfMg5.mjs → store-PrNPm6So.mjs} +30 -1
- package/dist/tracking/index.mjs +1 -1
- package/package.json +10 -3
- package/dist/handle-DnOw05K8.mjs +0 -347
- package/dist/index-DNAzITvw.d.mts +0 -227
- package/dist/policy-EuVJ_5hS.mjs +0 -33
- 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-
|
|
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,2 +1,2 @@
|
|
|
1
|
-
import { a as readClaudeInput, i as guard, n as denyResponse, t as contextResponse } from "../../claude-
|
|
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 };
|
package/dist/cache/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as extractText, i as mcpCacheKey, n as cachePath, r as cacheStore, t as cacheLookup } from "../store-
|
|
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
|
-
|
|
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 };
|
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-
|
|
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-
|
|
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
|
|
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);
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as stagedContent, r as stagedFiles, t as checkStaged } from "../run-
|
|
1
|
+
import { n as stagedContent, r as stagedFiles, t as checkStaged } from "../run-CXsV-wIJ.mjs";
|
|
2
2
|
export { checkStaged, stagedContent, stagedFiles };
|