bitfab-cli 0.2.320 → 0.2.321

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/index.js +30 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -26987,8 +26987,8 @@ var semver3 = __toESM(require_semver2(), 1);
26987
26987
 
26988
26988
  // ../bitfab-plugin-lib/dist/bakedSdkVersions.js
26989
26989
  var BAKED_SDK_VERSIONS = {
26990
- typescript: "0.52.3",
26991
- python: "0.52.3",
26990
+ typescript: "0.52.4",
26991
+ python: "0.52.4",
26992
26992
  ruby: "0.51.1",
26993
26993
  go: "0.51.0"
26994
26994
  };
@@ -33651,7 +33651,7 @@ Then route by the approved plan, **without asking the user** (they already confi
33651
33651
  emit: "Setting up replay",
33652
33652
  body: `**Both sub-steps run without user interaction. No questions, just execute.**
33653
33653
 
33654
- **1. Read the trace (and resolve the function key).** Call {{tool:getTraces}} with the trace ID argument and \`scope: "full"\`. Hold the trace's label, annotation, inputs, and output in context, these are the acceptance criteria for the verdict. **If the user gave only a trace ID and no function key** (common with free-form requests like "did my fix work on \`<id>\`"), take the trace function key from the trace itself, don't ask the user for it.
33654
+ **1. Read the trace (and resolve the function key).** Call {{tool:getTraces}} with the trace ID argument and \`scope: "full"\`. Hold the trace's label, annotation, inputs, and output in context, these are the acceptance criteria for the verdict. **If the user gave only a trace ID and no function key** (common with free-form requests like "did my fix work on \`<id>\`"), take the trace function key from the trace itself, don't ask the user for it. **Decide whether this is a re-seed rather than a replay:** the user said re-seed, or asked for the trace to be run again for real, or the trace errored (\`hasError\` / an error on its root span) and the user wants a good recording of it. A re-seed is not a replay: it runs the function once on the trace's recorded inputs and records the result under the same trace id, with nothing mocked and no experiment. It takes the \`reseed\` step instead of \`run\`.
33655
33655
 
33656
33656
  **2. Find the replay script.** Search for files matching \`scripts/replay.*\`, \`scripts/*replay*\`, or any file importing \`bitfab.replay\` / \`client.replay\`, and confirm it covers that trace function key. (You don't need to grep for capability flags here, this minimal path doesn't use code-change payloads or experiment groups. It does persist the verdict in the \`verdict\` step, straight from the replay output's server trace id, with no extra script capability required.)
33657
33657
 
@@ -33659,6 +33659,11 @@ ${REPLAY_SAFETY_CHECK}
33659
33659
 
33660
33660
  {{whens}}`,
33661
33661
  branches: [
33662
+ {
33663
+ when: "the user asked for a re-seed, or the trace errored and wants a real run recorded",
33664
+ description: "re-seed the trace in place instead of replaying it; a re-seed runs unsafe actions on purpose, so the safety check's findings are carried into that step for an explicit go-ahead rather than stopping here",
33665
+ next: "quick-replay/reseed"
33666
+ },
33662
33667
  {
33663
33668
  when: "the replay safety check finds any uncovered or unmockable unsafe action",
33664
33669
  description: "report the exact call and why replay interception cannot cover it, then stop without executing replay",
@@ -33786,6 +33791,28 @@ Then compare the new output against the original trace's assertions, label, and
33786
33791
  title: "Make another change",
33787
33792
  body: `**Make another change before re-replaying.** {{#ask-user-question}}Use \`AskUserQuestion\` to ask{{/ask-user-question}}{{^ask-user-question}}Ask{{/ask-user-question}} what to change, or let the user describe the fix. Edit the code, then loop back to run the replay again. If the user says they'll make the change themselves, wait for their message, then proceed.`,
33788
33793
  next: "quick-replay/run"
33794
+ },
33795
+ {
33796
+ id: "reseed",
33797
+ kind: "action",
33798
+ toolCalls: ["bash", "grep"],
33799
+ title: "Re-seed the trace in place",
33800
+ emit: "Re-seeding",
33801
+ body: `**Run the trace again for real and record the result under the same id.** A re-seed is a seed, not a replay: nothing is mocked, no test run or experiment is created, and the trace keeps its id, labels, assertions, dataset membership, name, and metadata. The previous run is kept as its own trace, linked back to this one, so nothing is deleted.
33802
+
33803
+ **It runs the function exactly as production does, side effects included.** If the safety check in \`setup\` found any unsafe action (an email, a payment, a write to a live system), say exactly which call would run for real and get an explicit go-ahead before continuing; a re-seed has no mocking to hide behind.
33804
+
33805
+ Find the registry the replay script hands to \`--registry\` (a \`bitfab-replay --registry <path>\` line in the script, \`package.json\`, or \`pyproject.toml\`) and the pipeline name in it that covers the function key. Then run the SDK's seed command through that registry, with no other flags:
33806
+
33807
+ \`\`\`bash
33808
+ # TypeScript: cd <project-dir> && npx bitfab-seed --registry <registry-path> <pipeline> --from-trace <trace-id>
33809
+ # Python: cd <project-dir> && bitfab-seed --registry <registry-path> <pipeline> --from-trace <trace-id> (or uv run / poetry run)
33810
+ \`\`\`
33811
+
33812
+ The Ruby SDK has no seed command yet; tell the user so and stop. If the command is missing or rejects \`--from-trace\`, the SDK predates re-seeding: ask the user to upgrade it, and do not fall back to a replay, which would record an experiment rather than refresh the trace.
33813
+
33814
+ Read the JSON result. \`reseeded[0].traceId\` is the trace the user gave, now holding the fresh run, and \`reseeded[0].previousRunTraceId\` is where the old run went. Report one line: "Re-seeded \`<trace id, 8 chars>\`: it now holds a fresh run of the same inputs; the previous run is kept as \`<previous id, 8 chars>\`. Its graders re-run on the next pass." If the function threw, the trace is untouched: report the error the run produced and stop, since a re-seed only adopts a run that completed.`,
33815
+ next: "cleanup/close-studio"
33789
33816
  }
33790
33817
  ]
33791
33818
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.320",
3
+ "version": "0.2.321",
4
4
  "description": "Install and configure the Bitfab plugin in Claude Code, Codex, or Cursor, or the Bitfab skill pack in Amp (Alpha).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",