haansi 0.1.119 → 0.1.121
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/haansi.js +34 -10
- package/package.json +1 -1
package/dist/haansi.js
CHANGED
|
@@ -95,7 +95,7 @@ var require_package = __commonJS({
|
|
|
95
95
|
"package.json"(exports2, module2) {
|
|
96
96
|
module2.exports = {
|
|
97
97
|
name: "haansi",
|
|
98
|
-
version: "0.1.
|
|
98
|
+
version: "0.1.121",
|
|
99
99
|
description: "Haansi CLI - Session collector and MCP server for Claude Code & OpenAI Codex",
|
|
100
100
|
bin: {
|
|
101
101
|
haansi: "./dist/haansi.js"
|
|
@@ -87252,6 +87252,13 @@ function alreadyMeasured(measured, arm, agent, model, configFingerprint) {
|
|
|
87252
87252
|
(m) => m.arm === arm && (m.agent ?? null) === (agent ?? null) && (m.model ?? null) === (model ?? null) && m.configFingerprint === configFingerprint
|
|
87253
87253
|
);
|
|
87254
87254
|
}
|
|
87255
|
+
function replayedBefore(measured, arms, agent, model) {
|
|
87256
|
+
return arms.every(
|
|
87257
|
+
(arm) => (measured ?? []).some(
|
|
87258
|
+
(m) => m.arm === arm && (m.agent ?? null) === (agent ?? null) && (m.model ?? null) === (model ?? null)
|
|
87259
|
+
)
|
|
87260
|
+
);
|
|
87261
|
+
}
|
|
87255
87262
|
function pastDeadline(startedAt, now, maxHours) {
|
|
87256
87263
|
return maxHours !== null && now - startedAt >= maxHours * 36e5;
|
|
87257
87264
|
}
|
|
@@ -88710,8 +88717,8 @@ var init_replay_lang_js = __esm({
|
|
|
88710
88717
|
"src/commands/replay-lang-js.ts"() {
|
|
88711
88718
|
"use strict";
|
|
88712
88719
|
import_node_path16 = require("node:path");
|
|
88713
|
-
MAX_SIGNATURE_LINES =
|
|
88714
|
-
MAX_SIGNATURE_CHARS =
|
|
88720
|
+
MAX_SIGNATURE_LINES = 60;
|
|
88721
|
+
MAX_SIGNATURE_CHARS = 4e3;
|
|
88715
88722
|
JS_SOURCE = /\.[cm]?[jt]sx?$/;
|
|
88716
88723
|
JS_TEST_FILE = /\.(?:test|spec)\.[cm]?[jt]sx?$/;
|
|
88717
88724
|
EXTENSIONS = [".ts", ".tsx", ".js", ".jsx", ".mts", ".cts", ".mjs"];
|
|
@@ -89411,8 +89418,8 @@ var init_replay_interface = __esm({
|
|
|
89411
89418
|
"src/commands/replay-interface.ts"() {
|
|
89412
89419
|
"use strict";
|
|
89413
89420
|
init_replay_lang();
|
|
89414
|
-
MAX_INTERFACE_MODULES =
|
|
89415
|
-
MAX_INTERFACE_NAMES =
|
|
89421
|
+
MAX_INTERFACE_MODULES = 30;
|
|
89422
|
+
MAX_INTERFACE_NAMES = 120;
|
|
89416
89423
|
}
|
|
89417
89424
|
});
|
|
89418
89425
|
|
|
@@ -89682,7 +89689,7 @@ var init_replay_spec = __esm({
|
|
|
89682
89689
|
MAX_TITLES = 40;
|
|
89683
89690
|
MAX_TITLE_CHARS = 4e3;
|
|
89684
89691
|
MAX_FAILING_PATHS = 12;
|
|
89685
|
-
MAX_TYPE_DECLARATIONS =
|
|
89692
|
+
MAX_TYPE_DECLARATIONS = 40;
|
|
89686
89693
|
MAX_HOP_MODULES = 24;
|
|
89687
89694
|
norm = (s) => s.replace(/\s+/g, " ").trim();
|
|
89688
89695
|
}
|
|
@@ -90230,7 +90237,7 @@ function haansiSection(tools, hint = null) {
|
|
|
90230
90237
|
"- Repository conventions: get_conventions with the files you changed: the repository's approved conventions (rules this codebase follows) that apply to them.",
|
|
90231
90238
|
"- Past fixes: search_solutions with a sentence about the problem (its error line in error, failing tests in failing_tests, the files you expect to change in files, identifiers in names), then get_solution to read the matching results in full.",
|
|
90232
90239
|
"- Team procedures: match_playbook with the task, and search_skills; get_skill loads one.",
|
|
90233
|
-
"- Earlier attempts at the same code: get_prior_attempts with the files you changed.",
|
|
90240
|
+
"- Earlier attempts at the same code: get_prior_attempts with the files you changed; get_attempt_story reads one it marks with a story id (its diff, failing tests and fix).",
|
|
90234
90241
|
"- Incidents like this one: search_prior_incidents.",
|
|
90235
90242
|
"- Recent work, conventions and shared answers: search_digests, search_guides and search_exchange.",
|
|
90236
90243
|
"",
|
|
@@ -90373,7 +90380,7 @@ function configFingerprintOf(c) {
|
|
|
90373
90380
|
}
|
|
90374
90381
|
async function runStoredReplays(options, deps) {
|
|
90375
90382
|
const repository = await repositoryOf(deps);
|
|
90376
|
-
|
|
90383
|
+
let set2 = await deps.getReplaySet(repository);
|
|
90377
90384
|
const repo = options.repoCommands ? set2.repoCommands : null;
|
|
90378
90385
|
const setupCmd = options.setupCmd ?? repo?.setupCommand ?? null;
|
|
90379
90386
|
const testCmd = options.testCmd || repo?.testCommand || "";
|
|
@@ -90402,6 +90409,21 @@ async function runStoredReplays(options, deps) {
|
|
|
90402
90409
|
);
|
|
90403
90410
|
return { results: [], notValid: 0, recorded: null };
|
|
90404
90411
|
}
|
|
90412
|
+
if (options.newOnly) {
|
|
90413
|
+
const fresh = set2.tasks.filter(
|
|
90414
|
+
(t) => !replayedBefore(
|
|
90415
|
+
t.measured,
|
|
90416
|
+
options.arms,
|
|
90417
|
+
options.agentName ?? null,
|
|
90418
|
+
options.model ?? null
|
|
90419
|
+
)
|
|
90420
|
+
);
|
|
90421
|
+
deps.log(
|
|
90422
|
+
`--new-only: ${set2.tasks.length - fresh.length} task(s) replayed before with this agent and model left out; ${fresh.length} new.`
|
|
90423
|
+
);
|
|
90424
|
+
set2 = { ...set2, tasks: fresh };
|
|
90425
|
+
if (fresh.length === 0) return { results: [], notValid: 0, recorded: null };
|
|
90426
|
+
}
|
|
90405
90427
|
let mine;
|
|
90406
90428
|
if (options.fromChecks) {
|
|
90407
90429
|
const picked = fromChecks(set2.tasks, options.limit, options.shard ?? null);
|
|
@@ -90962,6 +90984,7 @@ function parseReplayArgs(argv) {
|
|
|
90962
90984
|
else if (a === "--repo-commands") options.repoCommands = true;
|
|
90963
90985
|
else if (takeScaleArg(a, next, scale, errors)) continue;
|
|
90964
90986
|
else if (a === "--force") options.force = true;
|
|
90987
|
+
else if (a === "--new-only") options.newOnly = true;
|
|
90965
90988
|
else if (a === "--any-context") options.anyContext = true;
|
|
90966
90989
|
else if (a === "--inject-context") options.injectContext = true;
|
|
90967
90990
|
else if (a === "--check-only") options.checkOnly = true;
|
|
@@ -91566,7 +91589,7 @@ var init_replay = __esm({
|
|
|
91566
91589
|
[--timeout-min 20] [--agent-name <name>] [--model <name>]
|
|
91567
91590
|
[--judge-cmd "<cmd>"]
|
|
91568
91591
|
[--run-ref <url>] [--dry-run] [--repo-commands] [--no-diffs]
|
|
91569
|
-
[--shard i/n] [--concurrency k] [--force] [--max-hours h] [--any-context]
|
|
91592
|
+
[--shard i/n] [--concurrency k] [--force] [--new-only] [--max-hours h] [--any-context]
|
|
91570
91593
|
[--check-only | --from-checks]
|
|
91571
91594
|
[--setup-cache <files> --setup-cache-path <paths> [--setup-cache-dir <dir>]]
|
|
91572
91595
|
[--container <image> [--container-setup "<cmd>"] [--container-env NAME]...]
|
|
@@ -91586,7 +91609,8 @@ test output on this machine and reports only how far they match.
|
|
|
91586
91609
|
At scale: --shard i/n takes this job's share of the tasks (a CI matrix of n
|
|
91587
91610
|
jobs); --concurrency k replays k tasks at once here; an arm already measured
|
|
91588
91611
|
on the same card with the same agent and model is skipped (--force runs it
|
|
91589
|
-
again); --
|
|
91612
|
+
again); --new-only leaves out every task replayed before on all its arms with
|
|
91613
|
+
the same agent and model, in any version, before --limit picks; --max-hours stops starting arms after h hours. --setup-cache
|
|
91590
91614
|
package-lock.json --setup-cache-path '**/node_modules' keeps the setup's output
|
|
91591
91615
|
(every workspace's node_modules) per lockfile (in ~/.cache/haansi-replay, or --setup-cache-dir) and restores
|
|
91592
91616
|
it instead of running the setup again; not with --container.
|