bitfab-cli 0.2.417 → 0.2.418

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 +18 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -29868,10 +29868,10 @@ var semver3 = __toESM(require_semver2(), 1);
29868
29868
 
29869
29869
  // ../bitfab-plugin-lib/dist/bakedSdkVersions.js
29870
29870
  var BAKED_SDK_VERSIONS = {
29871
- typescript: "0.64.3",
29872
- python: "0.64.3",
29873
- ruby: "0.64.3",
29874
- go: "0.64.2"
29871
+ typescript: "0.64.4",
29872
+ python: "0.64.4",
29873
+ ruby: "0.64.4",
29874
+ go: "0.64.3"
29875
29875
  };
29876
29876
 
29877
29877
  // ../bitfab-plugin-lib/dist/installedSdk.js
@@ -30978,6 +30978,16 @@ import { createWriteStream, mkdirSync as mkdirSync4, rmSync as rmSync2 } from "f
30978
30978
  import { dirname as dirname3, resolve as resolve3 } from "path";
30979
30979
  import { createInterface } from "readline";
30980
30980
 
30981
+ // ../bitfab-plugin-lib/dist/replayCloudResult.js
30982
+ var cloudSummarySchema = external_exports.object({
30983
+ cloudSummary: external_exports.literal(true),
30984
+ experimentId: external_exports.string().optional(),
30985
+ experimentUrl: external_exports.string().optional(),
30986
+ testRunId: external_exports.string().optional(),
30987
+ testRunUrl: external_exports.string().optional(),
30988
+ counts: external_exports.record(external_exports.string(), external_exports.number()).optional()
30989
+ }).passthrough();
30990
+
30981
30991
  // ../bitfab-plugin-lib/dist/replayItemWriter.js
30982
30992
  import { existsSync as existsSync2, mkdirSync as mkdirSync3, renameSync, writeFileSync as writeFileSync3 } from "fs";
30983
30993
  import { join as join3 } from "path";
@@ -35415,7 +35425,7 @@ cd <project-dir> && {{command:replayProgress}} --label <pipeline-name> --run-dir
35415
35425
 
35416
35426
  For every item you can judge during the run, key the verdict by its **original trace id** (the \`originalTraceId\` field in each item file, the same \`item.originalTraceId\` on progress rows), the original trace the item was replayed from, which the server resolves to this run's replay trace, no local-to-server id mapping step. You need the run's \`experimentId\` to persist (enriched progress rows may carry \`event.experimentId\`; older scripts may only reveal it in the final \`ReplayResult\`). As soon as a small batch of judged items has its original trace ids and you know the \`experimentId\`, persist that batch with \`{{command:persistReplayLabels}}\`. Keep a set of original trace IDs already persisted so the final reconciliation never double-writes a verdict.
35417
35427
 
35418
- 4. **When the background command finishes, read the final \`type: "complete"\` row from this run's \`events.jsonl\`**. Its \`result\` carries run metadata (\`experimentId\`, \`experimentUrl\`, \`itemCount\`) and its \`items\` array carries item refs. Read each needed \`items[].itemPath\` for the full replay item (trace ID, duration, tokens, model, and full original/new outputs). Read from the **files**, not from the captured command output, which the harness truncates in the middle.
35428
+ 4. **When the background command finishes, read the final \`type: "complete"\` row from this run's \`events.jsonl\`**. Its \`result\` carries run metadata (\`experimentId\`, \`experimentUrl\`, \`itemCount\`) and its \`items\` array carries item refs. Read each needed \`items[].itemPath\` for the full replay item (trace ID, duration, tokens, model, and full original/new outputs). Read from the **files**, not from the captured command output, which the harness truncates in the middle. A \`--cloud\` replay leaves \`items\` empty and sets \`result.cloudSummary: true\`, with the counts and each errored trace in \`result.erroredItems\`: read its items from Bitfab instead, {{tool:listExperimentTraces}} with the \`experimentId\` for each replay trace ID and its original, then \`{{command:readTracesBatched}} <replay and original trace IDs...> --scope full\` for their inputs and outputs.
35419
35429
 
35420
35430
  **Before running: verify the installed replay command returns the full original and new output values AND at least one verdict persist key (\`item.originalTraceId\` or \`item.traceId\`) for every item** (not just lengths, counts, hashes, or truncated previews) so the run's \`items/*.json\` files carry them. Modern items may carry both: prefer lineage persistence by \`item.originalTraceId\` (older SDKs may print it under the deprecated \`sourceTraceId\` alias), and fall back to the server replay \`item.traceId\` only when original lineage is absent. After an item's replay trace is flushed, its \`item.traceId\` is available to lifecycle callbacks and in the final result. The oldest SDKs have no \`item.originalTraceId\` and persist by \`item.traceId\`. If the installed command returns neither, upgrade the SDK first; the Replay Output Contract and registry examples live in the SDK reference at \`https://docs.bitfab.ai/<language>-sdk.md\`. Subagents can't evaluate an improvement from \`5 \u2192 7 (+2)\`, and an item that carries no persist key blocks verdict persistence for that item.
35421
35431
 
@@ -36537,7 +36547,7 @@ If the block prints \`ERROR: Bitfab plugin not installed\`, the user hasn't inst
36537
36547
  inspect: "Diagnose (and offer to fix) your tracing setup: auth, what's instrumented, plugin/SDK freshness, replay coverage, trace arrival.",
36538
36548
  "switch-org": "Switch which Bitfab org the plugin reads and writes (replaces the local API key).",
36539
36549
  replay: "Create or update replay registry modules for instrumented workflows.",
36540
- cloud: "Run your normal replay on your own GitHub Actions by adding --cloud: same options, same output, same exit code. One workflow file in the repository; no Bitfab repository connection or GitHub CLI required.",
36550
+ cloud: "Run your normal replay on your own GitHub Actions by adding --cloud: same options and exit code, with a short summary of the result. One workflow file in the repository; no Bitfab repository connection or GitHub CLI required.",
36541
36551
  "db-snapshot": "Set up per-trace database snapshots so replay runs against the DB state at trace time (TypeScript, Python, Ruby).",
36542
36552
  templates: "Iterate on the span-rendering templates for one trace function.",
36543
36553
  "analyze-repo": "Read-only discovery: scan source, rank the top workflows to instrument, and report recommendations without creating artifacts or changing code."
@@ -36602,7 +36612,7 @@ Never modify existing code on a refactor path without completing this three-step
36602
36612
  kind: "action",
36603
36613
  title: "Inspect the replay environment",
36604
36614
  toolCalls: ["bash", "read", "glob", "grep", "ask"],
36605
- body: `Cloud replay is the user's normal replay plus --cloud: every replay option works the same, the runner replays a snapshot of their working tree (changed files, plus new files git does not ignore) from the same directory, and the command prints the replay's own output and exits with its exit code. The code ships inside the SDK, and the repository keeps one file: .github/workflows/bitfab-replay.yml, which holds only settings.
36615
+ body: `Cloud replay is the user's normal replay plus --cloud: every replay option works the same, the runner replays a snapshot of their working tree (changed files, plus new files git does not ignore) from the same directory, and the command prints the replay's progress and a short summary of its result (experiment ID and URL, replayed, same, changed, and errored counts, and each errored trace with its error), then exits with its exit code. Every trace's input and output are in the experiment in Bitfab, readable through the Bitfab MCP tools; --cloud-full-output prints the whole result instead. The code ships inside the SDK, and the repository keeps one file: .github/workflows/bitfab-replay.yml, which holds only settings.
36606
36616
 
36607
36617
  Run the installed SDK's bitfab-replay --cloud --help; if it does not list --cloud-preview, upgrade the SDK through bitfab:update first. Check that the git origin is github.com and that Python 3.10+ exists (macOS or Linux). GitHub access needs no GitHub CLI: the SDK uses gh when it is logged in, otherwise GH_TOKEN or GITHUB_TOKEN, otherwise the github.com credential git stores. When the repository still has .bitfab/cloud.json from an older SDK, the SDK says to delete it and the old workflow and run --cloud-init again; show the user the old file's settings first.
36608
36618
 
@@ -36636,7 +36646,7 @@ Each replay pushes a temporary bitfab-replay/<UUID> branch. For each push-trigge
36636
36646
 
36637
36647
  Verify with the replay command the user already runs. First add --cloud --cloud-preview, which pushes nothing and lists the changed and new files the snapshot would carry; review them for anything that should not leave the machine, since filename screening is not a secret scanner, and have the user gitignore it. Once the workflow is merged and secrets are set, and remote runs are authorized, run the same command with --cloud --dry-run: a real run that replays nothing but receives the secrets, stops on any empty secret, runs the --check command, and resolves the traces. Then, only when a replay is authorized, run with --cloud alone.
36638
36648
 
36639
- From an agent session always add --cloud-detach, since a replay can run for hours, and follow it with --cloud-watch <UUID> (prints the replay's output and exits with its code), --cloud-status, --cloud-cancel, or --cloud-cleanup. --cloud-timeout <minutes> stops one replay early and keeps finished traces. Report separately whether the workflow is written, secrets are set, the workflow is merged, the preview was reviewed, the dry run passed, and a real replay completed.`,
36649
+ From an agent session always add --cloud-detach, since a replay can run for hours, and follow it with --cloud-watch <UUID> (prints the replay's progress and result summary and exits with its code), --cloud-status, --cloud-cancel, or --cloud-cleanup. --cloud-timeout <minutes> stops one replay early and keeps finished traces. Report separately whether the workflow is written, secrets are set, the workflow is merged, the preview was reviewed, the dry run passed, and a real replay completed.`,
36640
36650
  next: "cleanup/finish"
36641
36651
  }
36642
36652
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.417",
3
+ "version": "0.2.418",
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",