haansi 0.1.120 → 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.
Files changed (2) hide show
  1. package/dist/haansi.js +28 -4
  2. 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.120",
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
  }
@@ -90373,7 +90380,7 @@ function configFingerprintOf(c) {
90373
90380
  }
90374
90381
  async function runStoredReplays(options, deps) {
90375
90382
  const repository = await repositoryOf(deps);
90376
- const set2 = await deps.getReplaySet(repository);
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); --max-hours stops starting arms after h hours. --setup-cache
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "haansi",
3
- "version": "0.1.120",
3
+ "version": "0.1.121",
4
4
  "description": "Haansi CLI - Session collector and MCP server for Claude Code & OpenAI Codex",
5
5
  "bin": {
6
6
  "haansi": "./dist/haansi.js"