@vectorize-io/hindsight-coding-agents 0.8.1 → 0.8.3
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/README.md +19 -5
- package/dist/antigravity-hook.js +98 -42
- package/dist/antigravity-statusline.js +6 -6
- package/dist/antigravity-stop-hook.js +135 -51
- package/dist/claude-hook.js +98 -42
- package/dist/claude-sessionstart-hook.js +386 -99
- package/dist/claude-stop-hook.js +135 -51
- package/dist/cline.js +433 -118
- package/dist/codebuddy-hook.js +98 -42
- package/dist/codebuddy-sessionstart-hook.js +386 -99
- package/dist/codebuddy-stop-hook.js +135 -51
- package/dist/codex-hook.js +98 -42
- package/dist/codex-sessionstart-hook.js +386 -99
- package/dist/codex-stop-hook.js +135 -51
- package/dist/copilot-hook.js +98 -42
- package/dist/copilot-sessionstart-hook.js +386 -99
- package/dist/copilot-stop-hook.js +135 -51
- package/dist/cursor-hook.js +98 -42
- package/dist/cursor-sessionstart-hook.js +386 -99
- package/dist/cursor-stop-hook.js +135 -51
- package/dist/daemon-start.js +10 -10
- package/dist/dcode-hook.js +98 -42
- package/dist/dcode-sessionstart-hook.js +386 -99
- package/dist/dcode-stop-hook.js +135 -51
- package/dist/deepen.js +193 -52
- package/dist/devin-hook.js +98 -42
- package/dist/devin-sessionstart-hook.js +386 -99
- package/dist/devin-stop-hook.js +135 -51
- package/dist/droid-hook.js +98 -42
- package/dist/droid-sessionstart-hook.js +386 -99
- package/dist/droid-stop-hook.js +135 -51
- package/dist/dsh.js +452 -125
- package/dist/grok-hook.js +98 -42
- package/dist/grok-sessionstart-hook.js +386 -99
- package/dist/grok-stop-hook.js +135 -51
- package/dist/hindsight-seed.js +6 -6
- package/dist/index.js +457 -137
- package/dist/installer.js +92 -80
- package/dist/kilo.js +457 -137
- package/dist/kimi-hook.js +98 -42
- package/dist/kimi-sessionstart-hook.js +386 -99
- package/dist/kimi-stop-hook.js +135 -51
- package/dist/mcp-server.js +180 -65
- package/dist/opencode2.js +613 -131
- package/dist/pi.js +433 -125
- package/dist/prime-agent.js +433 -125
- package/dist/qwen-hook.js +98 -42
- package/dist/qwen-sessionstart-hook.js +386 -99
- package/dist/qwen-stop-hook.js +135 -51
- package/dist/status.js +76 -18
- package/dist/survey-supervisor.js +73 -9
- package/dist/traecode-hook.js +98 -42
- package/dist/traecode-sessionstart-hook.js +386 -99
- package/dist/traecode-stop-hook.js +135 -51
- package/dist/workbuddy-hook.js +98 -42
- package/dist/workbuddy-sessionstart-hook.js +386 -99
- package/dist/workbuddy-stop-hook.js +135 -51
- package/dist/zcode-hook.js +98 -42
- package/dist/zcode-sessionstart-hook.js +386 -99
- package/dist/zcode-stop-hook.js +135 -51
- package/index.js +4 -1
- package/package.json +6 -4
- package/plugin.json +1 -1
- package/skill/SKILL.md +16 -4
package/dist/deepen.js
CHANGED
|
@@ -188,14 +188,14 @@ function probeGitLayout(directory) {
|
|
|
188
188
|
var PLACEHOLDER = /\{([a-zA-Z_]+)\}/g;
|
|
189
189
|
function applyTemplate(template, resolvers, what) {
|
|
190
190
|
return template.replace(PLACEHOLDER, (_, name) => {
|
|
191
|
-
const
|
|
192
|
-
if (!
|
|
191
|
+
const resolve4 = resolvers[name];
|
|
192
|
+
if (!resolve4) {
|
|
193
193
|
console.error(
|
|
194
194
|
`hindsight: unknown ${what} placeholder "{${name}}" \u2014 valid: ` + Object.keys(resolvers).sort().map((k) => `{${k}}`).join(", ")
|
|
195
195
|
);
|
|
196
196
|
return "unknown";
|
|
197
197
|
}
|
|
198
|
-
return
|
|
198
|
+
return resolve4();
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
|
|
@@ -616,11 +616,11 @@ function codingBankManifest(overrides, mode = DEFAULT_RETAIN_EXTRACTION_MODE, de
|
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
// package.json
|
|
619
|
-
var version = "0.8.
|
|
619
|
+
var version = "0.8.3";
|
|
620
620
|
|
|
621
621
|
// src/core/util.ts
|
|
622
|
-
import { accessSync, constants } from "fs";
|
|
623
|
-
import { delimiter, join as join5 } from "path";
|
|
622
|
+
import { accessSync, constants, statSync as statSync2 } from "fs";
|
|
623
|
+
import { delimiter, extname, isAbsolute as isAbsolute2, join as join5, resolve as resolve2 } from "path";
|
|
624
624
|
var sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
625
625
|
function semverGte(version2, min) {
|
|
626
626
|
const parts = (v) => {
|
|
@@ -889,15 +889,19 @@ var HindsightClient = class {
|
|
|
889
889
|
}
|
|
890
890
|
/**
|
|
891
891
|
* Whether this server honours `operation_id` on an async retain, and can therefore be appended to
|
|
892
|
-
* safely (see MIN_IDEMPOTENT_RETAIN_VERSION). Probed
|
|
892
|
+
* safely (see MIN_IDEMPOTENT_RETAIN_VERSION). Probed via the version endpoint; anything
|
|
893
893
|
* unreachable, unparseable or older answers "no", which costs efficiency, never correctness.
|
|
894
|
+
* Only a "yes" is cached: a long-lived plugin client would otherwise keep replacing for the rest
|
|
895
|
+
* of the process after one probe that hit a restarting server (#5735).
|
|
894
896
|
*/
|
|
895
897
|
async supportsIdempotentRetain() {
|
|
896
|
-
if (this.idempotentRetain
|
|
897
|
-
|
|
898
|
-
|
|
898
|
+
if (this.idempotentRetain) return true;
|
|
899
|
+
const supported = await this.probeIdempotentRetain();
|
|
900
|
+
if (supported || this.idempotentRetain === void 0) {
|
|
901
|
+
this.log(`server retain idempotency: ${supported ? "supported" : "unavailable"}`);
|
|
899
902
|
}
|
|
900
|
-
|
|
903
|
+
this.idempotentRetain = supported;
|
|
904
|
+
return supported;
|
|
901
905
|
}
|
|
902
906
|
/** `/v1/version` first: an ingress that routes only `/v1` to the API (the Helm chart's default)
|
|
903
907
|
* hands a bare `/version` to the control plane, whose HTML 404 or login redirect read as "no",
|
|
@@ -1465,6 +1469,24 @@ var PENDING_MAX_BYTES = 256 * 1024;
|
|
|
1465
1469
|
|
|
1466
1470
|
// src/core/uuid.ts
|
|
1467
1471
|
import { createHash as createHash3 } from "crypto";
|
|
1472
|
+
var HINDSIGHT_NAMESPACE = "e75686a4-e923-4326-a0d1-358f1c6c3eb4";
|
|
1473
|
+
function uuidV5(name, namespace = HINDSIGHT_NAMESPACE) {
|
|
1474
|
+
const ns = Buffer.from(namespace.replace(/-/g, ""), "hex");
|
|
1475
|
+
if (ns.length !== 16) throw new Error(`invalid UUID namespace: ${namespace}`);
|
|
1476
|
+
const bytes = Buffer.from(
|
|
1477
|
+
createHash3("sha1").update(ns).update(Buffer.from(name, "utf8")).digest().subarray(0, 16)
|
|
1478
|
+
);
|
|
1479
|
+
bytes[6] = bytes[6] & 15 | 80;
|
|
1480
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
1481
|
+
const hex = bytes.toString("hex");
|
|
1482
|
+
return [
|
|
1483
|
+
hex.slice(0, 8),
|
|
1484
|
+
hex.slice(8, 12),
|
|
1485
|
+
hex.slice(12, 16),
|
|
1486
|
+
hex.slice(16, 20),
|
|
1487
|
+
hex.slice(20)
|
|
1488
|
+
].join("-");
|
|
1489
|
+
}
|
|
1468
1490
|
|
|
1469
1491
|
// src/core/chat.ts
|
|
1470
1492
|
function withRefId(refId, turns, baseTs) {
|
|
@@ -1929,22 +1951,31 @@ function resolvePartial(cfg2, patch) {
|
|
|
1929
1951
|
|
|
1930
1952
|
// src/core/git.ts
|
|
1931
1953
|
import { execFileSync } from "child_process";
|
|
1932
|
-
import { resolve as
|
|
1954
|
+
import { resolve as resolve3 } from "path";
|
|
1933
1955
|
var US = "";
|
|
1934
1956
|
var RS = "";
|
|
1935
1957
|
var GITLOG_HEAD = "gitlog-head:";
|
|
1936
|
-
|
|
1958
|
+
var GITLOG_FORMAT = `--format=%h${US}%ad${US}%an${US}%s${US}%b${RS}`;
|
|
1959
|
+
var GITLOG_DIVIDER = "\n\n---\n\n";
|
|
1960
|
+
function runGit(repo, args, env) {
|
|
1937
1961
|
return execFileSync("git", ["-C", repo, "-c", "log.showSignature=false", ...args], {
|
|
1938
1962
|
encoding: "utf8",
|
|
1939
1963
|
maxBuffer: 1 << 28,
|
|
1940
1964
|
windowsHide: true,
|
|
1965
|
+
env,
|
|
1941
1966
|
// execFileSync otherwise forwards failed git stderr into the host's TUI,
|
|
1942
1967
|
// even when callers catch the error. Keep diagnostics on the error instead.
|
|
1943
1968
|
stdio: ["ignore", "pipe", "pipe"]
|
|
1944
1969
|
});
|
|
1945
1970
|
}
|
|
1971
|
+
function git(repo, ...args) {
|
|
1972
|
+
return runGit(repo, args);
|
|
1973
|
+
}
|
|
1974
|
+
function gitLocal(repo, ...args) {
|
|
1975
|
+
return runGit(repo, args, { ...process.env, GIT_NO_LAZY_FETCH: "1" });
|
|
1976
|
+
}
|
|
1946
1977
|
function repoNameOf(repo) {
|
|
1947
|
-
return projectNameOf(
|
|
1978
|
+
return projectNameOf(resolve3(repo));
|
|
1948
1979
|
}
|
|
1949
1980
|
function gitHeadSha(dir) {
|
|
1950
1981
|
try {
|
|
@@ -1956,7 +1987,7 @@ function gitHeadSha(dir) {
|
|
|
1956
1987
|
function commitsSince(dir, sinceSha) {
|
|
1957
1988
|
if (!/^[0-9a-f]{40}(?:[0-9a-f]{24})?$/.test(sinceSha)) return null;
|
|
1958
1989
|
try {
|
|
1959
|
-
const n = Number.parseInt(
|
|
1990
|
+
const n = Number.parseInt(gitLocal(dir, "rev-list", "--count", `${sinceSha}..HEAD`).trim(), 10);
|
|
1960
1991
|
return Number.isFinite(n) ? n : null;
|
|
1961
1992
|
} catch {
|
|
1962
1993
|
return null;
|
|
@@ -2019,18 +2050,44 @@ function gitLogText(repo, limit) {
|
|
|
2019
2050
|
"--reverse",
|
|
2020
2051
|
// applied after -n: the newest N, printed oldest first
|
|
2021
2052
|
"--date=short",
|
|
2022
|
-
|
|
2053
|
+
GITLOG_FORMAT
|
|
2023
2054
|
);
|
|
2024
2055
|
} catch {
|
|
2025
2056
|
return "";
|
|
2026
2057
|
}
|
|
2058
|
+
return gitLogRecords(raw).join(GITLOG_DIVIDER);
|
|
2059
|
+
}
|
|
2060
|
+
function gitLogRecords(raw) {
|
|
2027
2061
|
return raw.split(RS).map((rec) => rec.trim()).filter(Boolean).map((rec) => {
|
|
2028
2062
|
const [sha, date, author, subj, body] = rec.split(US);
|
|
2029
2063
|
const header = `${sha} ${date} ${author}`;
|
|
2030
2064
|
const msg = subj + (body?.trim() ? "\n\n" + body.trim() : "");
|
|
2031
2065
|
return `${header}
|
|
2032
2066
|
${msg}`;
|
|
2033
|
-
})
|
|
2067
|
+
});
|
|
2068
|
+
}
|
|
2069
|
+
function gitLogRecordsSince(repo, baseSha, head) {
|
|
2070
|
+
if (!/^[0-9a-f]{40}(?:[0-9a-f]{24})?$/.test(baseSha)) return null;
|
|
2071
|
+
try {
|
|
2072
|
+
gitLocal(repo, "merge-base", "--is-ancestor", baseSha, head);
|
|
2073
|
+
} catch {
|
|
2074
|
+
return null;
|
|
2075
|
+
}
|
|
2076
|
+
try {
|
|
2077
|
+
return gitLogRecords(
|
|
2078
|
+
git(
|
|
2079
|
+
repo,
|
|
2080
|
+
"log",
|
|
2081
|
+
"--no-merges",
|
|
2082
|
+
"--reverse",
|
|
2083
|
+
"--date=short",
|
|
2084
|
+
GITLOG_FORMAT,
|
|
2085
|
+
`${baseSha}..${head}`
|
|
2086
|
+
)
|
|
2087
|
+
);
|
|
2088
|
+
} catch {
|
|
2089
|
+
return null;
|
|
2090
|
+
}
|
|
2034
2091
|
}
|
|
2035
2092
|
function gitLogNewestAuthorDate(repo) {
|
|
2036
2093
|
try {
|
|
@@ -2039,44 +2096,56 @@ function gitLogNewestAuthorDate(repo) {
|
|
|
2039
2096
|
return null;
|
|
2040
2097
|
}
|
|
2041
2098
|
}
|
|
2099
|
+
async function retainGitLog(client, repo, content, opts, head, append) {
|
|
2100
|
+
const repoName = repoNameOf(repo);
|
|
2101
|
+
const stamp = opts.stampFor?.();
|
|
2102
|
+
const tags = [
|
|
2103
|
+
.../* @__PURE__ */ new Set([
|
|
2104
|
+
...stamp?.tags ?? [],
|
|
2105
|
+
"source:git",
|
|
2106
|
+
"source:git-log",
|
|
2107
|
+
...head ? [`${GITLOG_HEAD}${head}`] : []
|
|
2108
|
+
])
|
|
2109
|
+
];
|
|
2110
|
+
await client.retain(
|
|
2111
|
+
content,
|
|
2112
|
+
// No commit count: an append makes the document longer than any count a replace wrote.
|
|
2113
|
+
`git commit-message history for ${repoName}`,
|
|
2114
|
+
`gitlog:${repoName}`,
|
|
2115
|
+
tags,
|
|
2116
|
+
"gitlog",
|
|
2117
|
+
{
|
|
2118
|
+
// Anchor the document in time on the newest commit it contains, so extraction can date the
|
|
2119
|
+
// facts it pulls out of these messages. Previously no timestamp was passed at all: retain
|
|
2120
|
+
// then stamped "now", the extraction prompt got `Event Date: Unknown`, and every fact landed
|
|
2121
|
+
// with a null occurred_start/occurred_end — invisible to temporal search (#3602).
|
|
2122
|
+
timestamp: gitLogNewestAuthorDate(repo) ?? void 0,
|
|
2123
|
+
// `retain` only sets metadata when it is truthy, so an empty stamp sends none.
|
|
2124
|
+
metadata: Object.keys(stamp?.metadata ?? {}).length ? stamp?.metadata : void 0,
|
|
2125
|
+
...append ? { updateMode: "append", operationId: append.operationId } : {}
|
|
2126
|
+
}
|
|
2127
|
+
);
|
|
2128
|
+
}
|
|
2042
2129
|
async function ingestGitLog(client, repo, opts = { limit: 300 }) {
|
|
2043
2130
|
const log3 = opts.log ?? (() => {
|
|
2044
2131
|
});
|
|
2132
|
+
const head = gitHeadSha(repo);
|
|
2045
2133
|
const text = gitLogText(repo, opts.limit);
|
|
2046
2134
|
if (!text) {
|
|
2047
2135
|
log3("[gitlog] no commits found \u2014 skipping");
|
|
2048
2136
|
return 0;
|
|
2049
2137
|
}
|
|
2050
2138
|
const repoName = repoNameOf(repo);
|
|
2051
|
-
const n = text.split(
|
|
2139
|
+
const n = text.split(GITLOG_DIVIDER).length;
|
|
2052
2140
|
log3(`[gitlog] ingesting last ${n} commit messages for ${repoName} as ONE document \u2026`);
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
.../* @__PURE__ */ new Set([
|
|
2058
|
-
...stamp?.tags ?? [],
|
|
2059
|
-
"source:git",
|
|
2060
|
-
"source:git-log",
|
|
2061
|
-
...head ? [`${GITLOG_HEAD}${head}`] : []
|
|
2062
|
-
])
|
|
2063
|
-
];
|
|
2064
|
-
await client.retain(
|
|
2065
|
-
text,
|
|
2066
|
-
`git commit-message history (last ${n}) for ${repoName}`,
|
|
2067
|
-
`gitlog:${repoName}`,
|
|
2068
|
-
tags,
|
|
2069
|
-
"gitlog",
|
|
2070
|
-
{
|
|
2071
|
-
// Anchor the document in time on the newest commit it contains, so extraction can date the
|
|
2072
|
-
// facts it pulls out of these messages. Previously no timestamp was passed at all: retain
|
|
2073
|
-
// then stamped "now", the extraction prompt got `Event Date: Unknown`, and every fact landed
|
|
2074
|
-
// with a null occurred_start/occurred_end — invisible to temporal search (#3602).
|
|
2075
|
-
timestamp: gitLogNewestAuthorDate(repo) ?? void 0,
|
|
2076
|
-
// `retain` only sets metadata when it is truthy, so an empty stamp sends none.
|
|
2077
|
-
metadata: Object.keys(stamp?.metadata ?? {}).length ? stamp?.metadata : void 0
|
|
2078
|
-
}
|
|
2141
|
+
const total = Number(git(repo, "rev-list", "--count", "--no-merges", "HEAD").trim());
|
|
2142
|
+
if (total > n) {
|
|
2143
|
+
log3(
|
|
2144
|
+
`[gitlog] dropping the ${total - n} oldest commit(s): the document holds at most seedLimit (${opts.limit})`
|
|
2079
2145
|
);
|
|
2146
|
+
}
|
|
2147
|
+
try {
|
|
2148
|
+
await retainGitLog(client, repo, text, opts, head);
|
|
2080
2149
|
log3(`[gitlog] done: ${n} commit messages ingested as 1 document under strategy 'gitlog'`);
|
|
2081
2150
|
return 0;
|
|
2082
2151
|
} catch (e) {
|
|
@@ -2084,6 +2153,36 @@ async function ingestGitLog(client, repo, opts = { limit: 300 }) {
|
|
|
2084
2153
|
return 1;
|
|
2085
2154
|
}
|
|
2086
2155
|
}
|
|
2156
|
+
async function appendGitLog(client, repo, opts, head) {
|
|
2157
|
+
const log3 = opts.log ?? (() => {
|
|
2158
|
+
});
|
|
2159
|
+
const canonical2 = `gitlog:${repoNameOf(repo)}`;
|
|
2160
|
+
const tags = await client.documentTags?.(canonical2).catch(() => void 0);
|
|
2161
|
+
const base = tags?.find((t) => t.startsWith(GITLOG_HEAD))?.slice(GITLOG_HEAD.length);
|
|
2162
|
+
if (!base) return null;
|
|
2163
|
+
const records = gitLogRecordsSince(repo, base, head);
|
|
2164
|
+
if (records === null || records.length > opts.limit) return null;
|
|
2165
|
+
if (!records.length) {
|
|
2166
|
+
log3("[gitlog] no new non-merge commits \u2014 skipping");
|
|
2167
|
+
return 0;
|
|
2168
|
+
}
|
|
2169
|
+
const appendable = await client.supportsAppendRetain?.().catch(() => false);
|
|
2170
|
+
if (!appendable) return null;
|
|
2171
|
+
const content = GITLOG_DIVIDER.slice(1) + records.join(GITLOG_DIVIDER);
|
|
2172
|
+
const operationId = uuidV5(`${client.bank}
|
|
2173
|
+
${canonical2}
|
|
2174
|
+
append
|
|
2175
|
+
${base}
|
|
2176
|
+
${content}`);
|
|
2177
|
+
log3(`[gitlog] appending ${records.length} new commit message(s) to ${canonical2} \u2026`);
|
|
2178
|
+
try {
|
|
2179
|
+
await retainGitLog(client, repo, content, opts, head, { operationId });
|
|
2180
|
+
return 0;
|
|
2181
|
+
} catch (e) {
|
|
2182
|
+
log3(` ! gitlog append failed: ${e.message?.slice(0, 120)}`);
|
|
2183
|
+
return 1;
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2087
2186
|
async function gitLogIsCurrent(client, repo, head) {
|
|
2088
2187
|
const canonical2 = `gitlog:${repoNameOf(repo)}`;
|
|
2089
2188
|
if ((await client.listDocumentIds(`${GITLOG_HEAD}${head}`, "all_strict")).has(canonical2))
|
|
@@ -2102,17 +2201,20 @@ async function syncGitLog(client, repo, opts) {
|
|
|
2102
2201
|
log3("[gitlog] current with HEAD \u2014 skipping");
|
|
2103
2202
|
return 0;
|
|
2104
2203
|
}
|
|
2105
|
-
return ingestGitLog(client, repo, opts);
|
|
2204
|
+
return (head ? await appendGitLog(client, repo, opts, head) : null) ?? ingestGitLog(client, repo, opts);
|
|
2106
2205
|
}
|
|
2107
2206
|
|
|
2108
2207
|
// src/core/survey.ts
|
|
2109
2208
|
import { execFileSync as execFileSync2, spawn as realSpawn3 } from "child_process";
|
|
2110
2209
|
import { createHash as createHash4 } from "crypto";
|
|
2111
|
-
import { existsSync as existsSync2 } from "fs";
|
|
2210
|
+
import { existsSync as existsSync2, readFileSync as readFileSync4, writeFileSync as writeFileSync2 } from "fs";
|
|
2112
2211
|
import { homedir as homedir4, tmpdir } from "os";
|
|
2113
2212
|
import { dirname as dirname5, join as join9 } from "path";
|
|
2114
2213
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
2115
2214
|
|
|
2215
|
+
// node_modules/smol-toml/dist/stringify.js
|
|
2216
|
+
var HAS_WELLFORMED = !!"".isWellFormed;
|
|
2217
|
+
|
|
2116
2218
|
// src/core/survey-lease.ts
|
|
2117
2219
|
import { spawn as realSpawn2 } from "child_process";
|
|
2118
2220
|
import { randomUUID } from "crypto";
|
|
@@ -2123,7 +2225,7 @@ import {
|
|
|
2123
2225
|
renameSync as renameSync2,
|
|
2124
2226
|
rmdirSync,
|
|
2125
2227
|
rmSync,
|
|
2126
|
-
statSync as
|
|
2228
|
+
statSync as statSync3,
|
|
2127
2229
|
unlinkSync,
|
|
2128
2230
|
utimesSync,
|
|
2129
2231
|
writeFileSync
|
|
@@ -2169,7 +2271,7 @@ function reclaimIfStale(directory, staleMs) {
|
|
|
2169
2271
|
return true;
|
|
2170
2272
|
}
|
|
2171
2273
|
if (owners.length !== 1) return false;
|
|
2172
|
-
const age = Date.now() -
|
|
2274
|
+
const age = Date.now() - statSync3(join8(directory, owners[0])).mtimeMs;
|
|
2173
2275
|
if (Math.abs(age) <= staleMs) return false;
|
|
2174
2276
|
releaseLease({ directory, owner: owners[0] });
|
|
2175
2277
|
return true;
|
|
@@ -2207,12 +2309,12 @@ import { execFileSync as execFileSync3 } from "child_process";
|
|
|
2207
2309
|
var DEEPEN_DIFF_TARGET = 300;
|
|
2208
2310
|
|
|
2209
2311
|
// src/harness/registry.ts
|
|
2210
|
-
import { readFileSync as
|
|
2312
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
2211
2313
|
var jsonChatReader = (harness) => ({
|
|
2212
2314
|
describe: `${harness} sessions via a normalized JSON export (--conversations file: [{ id, turns:[{role,text,timestamp?}] }])`,
|
|
2213
2315
|
async read(opts) {
|
|
2214
2316
|
if (!opts.conversations) return [];
|
|
2215
|
-
return JSON.parse(
|
|
2317
|
+
return JSON.parse(readFileSync5(opts.conversations, "utf8"));
|
|
2216
2318
|
}
|
|
2217
2319
|
});
|
|
2218
2320
|
var noRuntimeAdapter = (name, hint) => ({
|
|
@@ -2336,12 +2438,12 @@ function buildRetainStamp(cfg2, ctx) {
|
|
|
2336
2438
|
const base = resolversFor(ctx);
|
|
2337
2439
|
const cache = /* @__PURE__ */ new Map();
|
|
2338
2440
|
const resolvers = Object.fromEntries(
|
|
2339
|
-
Object.entries(base).map(([name,
|
|
2441
|
+
Object.entries(base).map(([name, resolve4]) => [
|
|
2340
2442
|
name,
|
|
2341
2443
|
() => {
|
|
2342
2444
|
const hit = cache.get(name);
|
|
2343
2445
|
if (hit !== void 0) return hit;
|
|
2344
|
-
const value =
|
|
2446
|
+
const value = resolve4();
|
|
2345
2447
|
cache.set(name, value);
|
|
2346
2448
|
return value;
|
|
2347
2449
|
}
|
|
@@ -2571,3 +2673,42 @@ main().catch((e) => {
|
|
|
2571
2673
|
if (lease) releaseLease(lease);
|
|
2572
2674
|
process.exit(1);
|
|
2573
2675
|
});
|
|
2676
|
+
/*! Bundled license information:
|
|
2677
|
+
|
|
2678
|
+
smol-toml/dist/error.js:
|
|
2679
|
+
smol-toml/dist/primitive.js:
|
|
2680
|
+
smol-toml/dist/date.js:
|
|
2681
|
+
smol-toml/dist/extract.js:
|
|
2682
|
+
smol-toml/dist/util.js:
|
|
2683
|
+
smol-toml/dist/struct.js:
|
|
2684
|
+
smol-toml/dist/parse.js:
|
|
2685
|
+
smol-toml/dist/stringify.js:
|
|
2686
|
+
smol-toml/dist/index.js:
|
|
2687
|
+
(*!
|
|
2688
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
2689
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2690
|
+
*
|
|
2691
|
+
* Redistribution and use in source and binary forms, with or without
|
|
2692
|
+
* modification, are permitted provided that the following conditions are met:
|
|
2693
|
+
*
|
|
2694
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
2695
|
+
* list of conditions and the following disclaimer.
|
|
2696
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
2697
|
+
* this list of conditions and the following disclaimer in the
|
|
2698
|
+
* documentation and/or other materials provided with the distribution.
|
|
2699
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
2700
|
+
* may be used to endorse or promote products derived from this software without
|
|
2701
|
+
* specific prior written permission.
|
|
2702
|
+
*
|
|
2703
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
2704
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
2705
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
2706
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
2707
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
2708
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
2709
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
2710
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
2711
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
2712
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
2713
|
+
*)
|
|
2714
|
+
*/
|