bitfab-cli 0.2.386 → 0.2.387

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 +57 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24962,10 +24962,10 @@ var semver3 = __toESM(require_semver2(), 1);
24962
24962
 
24963
24963
  // ../bitfab-plugin-lib/dist/bakedSdkVersions.js
24964
24964
  var BAKED_SDK_VERSIONS = {
24965
- typescript: "0.60.1",
24966
- python: "0.60.2",
24967
- ruby: "0.60.1",
24968
- go: "0.60.1"
24965
+ typescript: "0.61.0",
24966
+ python: "0.61.0",
24967
+ ruby: "0.61.0",
24968
+ go: "0.61.0"
24969
24969
  };
24970
24970
 
24971
24971
  // ../bitfab-plugin-lib/dist/installedSdk.js
@@ -31449,10 +31449,10 @@ var setupFlow = Flow.parse({
31449
31449
  id: "setup",
31450
31450
  title: "Bitfab Setup",
31451
31451
  frontmatter: {
31452
- description: "Set up and maintain Bitfab tracing for AI features. TRIGGER when: user wants to set up Bitfab, instrument code, add tracing/observability for LLM or agent calls, observe AI calls, add evaluation, trace LLM functions, trace a new workflow, change what an existing trace captures, re-instrument an existing traced function (move a database read or other side effect in or out of a span, change what a span records as its input/output), inspect or debug their tracing setup (what's instrumented, why traces aren't showing up), or understand what Bitfab is; or says anything like 'instrument', 'add tracing', 'trace my code', 'set up observability', 'hook up Bitfab', 'start tracking my AI workflow', 'trace a new workflow', 'update my tracing setup', 're-instrument', 're-instrument <function>', 'move the database read out of the span', 'make this trace replayable without a database', 'change what this span records as input', 'why aren't my traces showing up', 'what is Bitfab', 'set up database snapshots', 'replay against my database state at trace time', 'analyze the repo for what to instrument', 'analyze-repo', 'instrument the second/next/other one', 'instrument another function'. This trigger applies even mid-conversation and after setup already ran: every additional function to instrument must re-enter this skill. SKIP when: user is (a) improving the QUALITY of a traced function's outputs, fixing failures, pass rates, labeling, running experiments (use bitfab:assistant); or (b) upgrading the plugin/SDK to a newer *version* (use bitfab:update)",
31452
+ description: "Set up and maintain Bitfab tracing, replay registries, and cloud replay. Use for instrumenting AI/LLM code, adding observability or evaluation, tracing another workflow, changing captured inputs/outputs, re-instrumenting a function, moving side effects across trace boundaries, inspecting missing traces, explaining Bitfab, login, organization switching, session-log consent, database snapshots, templates, or read-only repo instrumentation recommendations (analyze-repo). Also use for 'setup cloud', 'set up cloud replay', or 'replay on GitHub'. Re-enter this skill for each additional function to instrument, even after earlier setup. Do not use for improving output quality, pass rates, labeling, or experiments (use bitfab:assistant), or upgrading SDK/plugin versions (use bitfab:update)",
31453
31453
  argumentHint: {
31454
31454
  deriveFromModes: true,
31455
- suffix: "[<what to do>]"
31455
+ suffix: "[what to do]"
31456
31456
  }
31457
31457
  },
31458
31458
  commands: BITFAB_PLUGIN_COMMANDS.defineCommands({
@@ -31520,9 +31520,9 @@ var setupFlow = Flow.parse({
31520
31520
  - Keep prose between tool calls to one line or none. Save fuller explanation for decision points and the workflow summaries the user acts on.
31521
31521
  - Surfacing a risk, ambiguity, or unexpected finding is never the narration to suppress: raise it immediately, even mid-probe (e.g. unserializable inputs, a shim with lazy init, an ambiguous project root).
31522
31522
 
31523
- This skill has eleven phases: **explain**, **login**, **session-logs**, **instrument**, **modify**, **inspect**, **switch-org**, **replay**, **db-snapshot**, **templates**, and **analyze-repo**. Run individually or through setup (\`wizard\` runs login \u2192 instrument; \`explain\` is a standalone read-only overview that requires no login; \`session-logs\` is standalone and does not require login; \`modify\` is only invoked explicitly or as a branch from Instrument's existing-SDK-usage menu; \`inspect\` is a standalone diagnostic (with optional one-shot fixes) invoked explicitly; \`switch-org\` is a standalone account action (requires auth) invoked explicitly; \`db-snapshot\` is only invoked explicitly; \`templates\` is only invoked explicitly; \`analyze-repo\` is a standalone, **non-interactive** batch action (requires auth) invoked explicitly: it scans, picks the top few candidates, and reports source locations and replay dependencies, asking nothing and editing no code).
31523
+ This skill has twelve phases: **explain**, **login**, **session-logs**, **instrument**, **modify**, **inspect**, **switch-org**, **replay**, **db-snapshot**, **templates**, **analyze-repo**, and **cloud**. The \`cloud\` mode configures direct GitHub Actions replay without Bitfab login or a repository connection. Run individually or through setup (\`wizard\` runs login \u2192 instrument; \`explain\` is a standalone read-only overview that requires no login; \`session-logs\` is standalone and does not require login; \`modify\` is only invoked explicitly or as a branch from Instrument's existing-SDK-usage menu; \`inspect\` is a standalone diagnostic (with optional one-shot fixes) invoked explicitly; \`switch-org\` is a standalone account action (requires auth) invoked explicitly; \`db-snapshot\` is only invoked explicitly; \`templates\` is only invoked explicitly; \`analyze-repo\` is a standalone, **non-interactive** batch action (requires auth) invoked explicitly: it scans, picks the top few candidates, and reports source locations and replay dependencies, asking nothing and editing no code).
31524
31524
 
31525
- **Natural-language aliases:** "explain Bitfab" \u2192 \`explain\`; "trace a new workflow" / "instrument another function" \u2192 \`instrument\`; "adjust what is captured" / "re-instrument" \u2192 \`modify\`; "why are my traces missing" \u2192 \`inspect\`; "switch org" \u2192 \`switch-org\`; "set up database snapshots" \u2192 \`db-snapshot\`; "analyze the repo" \u2192 \`analyze-repo\` (read-only source recommendations).
31525
+ **Natural-language aliases:** "set up cloud replay" / "replay on GitHub" \u2192 \`cloud\`; "explain Bitfab" \u2192 \`explain\`; "trace a new workflow" / "instrument another function" \u2192 \`instrument\`; "adjust what is captured" / "re-instrument" \u2192 \`modify\`; "why are my traces missing" \u2192 \`inspect\`; "switch org" \u2192 \`switch-org\`; "set up database snapshots" \u2192 \`db-snapshot\`; "analyze the repo" \u2192 \`analyze-repo\` (read-only source recommendations).
31526
31526
 
31527
31527
  When instrumenting a workflow, **its instrumentation and replay pipeline are written together in the same cycle** after the workflow is selected (see Instrument's write-instrumentation step). The standalone \`replay\` mode remains available for coverage-verification and backfill.
31528
31528
 
@@ -31555,6 +31555,7 @@ If the block prints \`ERROR: Bitfab plugin not installed\`, the user hasn't inst
31555
31555
  inspect: "inspect/status-check",
31556
31556
  "switch-org": "switch-org/status-check",
31557
31557
  replay: "replay/gather-keys",
31558
+ cloud: "cloud/inspect",
31558
31559
  "db-snapshot": "db-snapshot/preflight",
31559
31560
  templates: "templates/pick-function",
31560
31561
  "analyze-repo": "analyze-repo/preflight"
@@ -31570,6 +31571,7 @@ If the block prints \`ERROR: Bitfab plugin not installed\`, the user hasn't inst
31570
31571
  inspect: "Diagnose (and offer to fix) your tracing setup: auth, what's instrumented, plugin/SDK freshness, replay coverage, trace arrival.",
31571
31572
  "switch-org": "Switch which Bitfab org the plugin reads and writes (replaces the local API key).",
31572
31573
  replay: "Create or update replay registry modules for instrumented workflows.",
31574
+ cloud: "Set up replay in your own GitHub Actions using local gh authentication. No Bitfab repository connection required.",
31573
31575
  "db-snapshot": "Set up per-trace database snapshots so replay runs against the DB state at trace time (TypeScript, Python, Ruby).",
31574
31576
  templates: "Iterate on the span-rendering templates for one trace function.",
31575
31577
  "analyze-repo": "Read-only discovery: scan source, rank the top workflows to instrument, and report recommendations without creating artifacts or changing code."
@@ -31622,6 +31624,50 @@ Never modify existing code on a refactor path without completing this three-step
31622
31624
  }
31623
31625
  ],
31624
31626
  phases: [
31627
+ {
31628
+ id: "cloud",
31629
+ title: "Cloud replay",
31630
+ stepStyle: "list",
31631
+ intro: "Run replay in the customer's GitHub Actions. Use this standalone mode for 'setup cloud', 'set up cloud replay', or 'replay on GitHub'. Do not enter login or connect a repository to Bitfab. Normal replay still uses a Bitfab API key on the runner.",
31632
+ steps: [
31633
+ {
31634
+ id: "inspect",
31635
+ kind: "action",
31636
+ title: "Inspect the replay environment",
31637
+ toolCalls: ["bash", "read", "glob", "grep", "ask"],
31638
+ body: `Read the existing GitHub Actions, runtime manifests, lockfiles, replay registry, gitignore, and environment-variable NAMES. Never read or print secret values. Check git origin, Python 3.10+, and gh authentication. Local dispatch supports macOS/Linux and github.com. Inspect all push-triggered workflows and deployment integrations. Temporary branches use bitfab-replay/** and can trigger those systems. Ask before changing existing CI or deployment behavior. Do not set pushTriggersReviewed until these triggers have been reviewed with the user.
31639
+
31640
+ Choose one existing replay pipeline and reproduce its runtime, dependency installation, build steps, working directory, caches, and required services from CI. Use the installed SDK's cloud-capable CLI. TypeScript/Python/Ruby registry imports happen on the runner only. Go must dispatch cloud flags before building its registry or initializing the application. A private database needs runner network access or a replay-safe service fixture. Do not silently give replay production side effects. Submodules/gitlinks and credential-like tracked files are rejected by the snapshot helper. Surface blockers instead of claiming the environment is ready.
31641
+
31642
+ Present the proposed workflow, fixed replay command, required secret/variable names, and any required CI trigger exclusions. Ask only about unresolved project choices. Never ask for secret values in chat.`,
31643
+ next: "cloud/install"
31644
+ },
31645
+ {
31646
+ id: "install",
31647
+ kind: "action",
31648
+ title: "Install the repository-owned runner",
31649
+ toolCalls: ["bash", "read", "write", "edit"],
31650
+ body: `Create a reviewed JSON setup specification containing version: 1, provider: "github", workflow: "bitfab-replay.yml", workingDirectory (repository-relative), registry (repository-relative path or null for Go), pipeline, command (a JSON argv array without the pipeline argument or cloud flags), pushTriggersReviewed: true, setupSteps (GitHub Actions step objects), secrets (names including BITFAB_API_KEY), and variables (names only). Optional runsOn, services, and environment match the existing CI. Prefer a GitHub Environment with required reviewers when replay code receives sensitive credentials. Pin third-party actions to reviewed commit SHAs. Ensure Python 3.10+ exists on the runner. Commands run in workingDirectory. Registry in the command must be relative to that directory. Set step working-directory explicitly where needed. Do not copy deployment steps, local env values, or API keys into the specification.
31651
+
31652
+ Run python3 "{{pluginRoot}}/scripts/cloudReplay.py" init --config <specification-path>. This creates .bitfab/cloud.json, .bitfab/cloudReplay.py, and .github/workflows/bitfab-replay.yml. The generated workflow is JSON, which is valid YAML. Existing files are never overwritten. For an existing setup, review the diff and edit project configuration deliberately. Remove only your temporary specification after successful installation. If .bitfab is ignored, propose a narrow gitignore exception for these two files. Never force-add secrets or arbitrary ignored files.
31653
+
31654
+ Tell the user which repository or Environment secrets to create in GitHub Settings \u2192 Secrets and variables \u2192 Actions. BITFAB_API_KEY belongs to their intended Bitfab organization. Other names come from their application, such as OPENAI_API_KEY. BITFAB_SERVICE_URL is optional. Do not override the SDK's default with an empty GitHub variable. Runtime secrets belong on the replay step. Any install-time credentials need explicit references on the relevant setup step. Local gh authentication is separate from these runner secrets. Do not create a Bitfab cloud target, install a GitHub App, or request a repository connection.`,
31655
+ next: "cloud/verify"
31656
+ },
31657
+ {
31658
+ id: "verify",
31659
+ kind: "action",
31660
+ title: "Verify and hand off",
31661
+ toolCalls: ["bash", "read", "ask"],
31662
+ body: `Validate workflow syntax (actionlint when available) and run the installed SDK CLI with --cloud --help. The workflow must land on the default branch once before workflow_dispatch can run it on temporary branches. Explain the required commit/merge. Do not push, merge, change repository permissions, or set secrets without authorization.
31663
+
31664
+ After the setup files are tracked, run bitfab-replay --cloud <pipeline> --trace-ids <real-trace-uuid> --cloud-dry-run using the selected SDK command. It reports changed tracked files and omitted new files. Include new source files explicitly with repeated --cloud-include <repository-relative-file>. Review the entire snapshot for credentials. Filename screening is not a secret scanner. Then, only when remote replay is authorized, run without --cloud-dry-run. The helper creates a commit through an isolated index, pushes bitfab-replay/<UUID>, dispatches that branch, waits, retrieves the test-run identity, and deletes the branch with an exact-SHA lease. HEAD, staged changes, and working files stay untouched. Never reset or undo the user's work.
31665
+
31666
+ Use --cloud-detach to return immediately. Explain --cloud-status, --cloud-watch, --cloud-cancel, and --cloud-cleanup with the printed execution UUID. Records live under this worktree's Git directory. Interrupted/lost-response submissions must be recovered, not blindly dispatched again. Cancel requests do not imply the job stopped. Watch/status confirms completion before deleting the branch. Detached jobs do not automatically clean themselves without a later local lifecycle command. Report separately whether files are generated, secrets configured, workflow merged, dry-run verified, and an actual remote replay completed. Never call a mock smoke run a real replay.`,
31667
+ next: "cleanup/finish"
31668
+ }
31669
+ ]
31670
+ },
31625
31671
  {
31626
31672
  id: "login",
31627
31673
  title: "Login",
@@ -31718,6 +31764,7 @@ Save the answer (replace \`CONSENT\` with \`true\` or \`false\`):
31718
31764
  inspect: "cleanup/finish",
31719
31765
  "switch-org": "cleanup/finish",
31720
31766
  replay: "cleanup/finish",
31767
+ cloud: "cleanup/finish",
31721
31768
  "db-snapshot": "cleanup/finish",
31722
31769
  templates: "cleanup/finish",
31723
31770
  "analyze-repo": "cleanup/finish"
@@ -31786,6 +31833,7 @@ then close with one line: to start tracing, run \`{{cmd}}setup\`; to debug an ex
31786
31833
  next: {
31787
31834
  byMode: {
31788
31835
  wizard: "approach/choose-driver",
31836
+ cloud: "cleanup/finish",
31789
31837
  explain: "cleanup/finish",
31790
31838
  login: "cleanup/finish",
31791
31839
  "session-logs": "cleanup/finish",
@@ -31985,6 +32033,7 @@ Confirm the change to the user.`,
31985
32033
  inspect: "cleanup/finish",
31986
32034
  "switch-org": "cleanup/finish",
31987
32035
  replay: "cleanup/finish",
32036
+ cloud: "cleanup/finish",
31988
32037
  "db-snapshot": "cleanup/finish",
31989
32038
  templates: "cleanup/finish",
31990
32039
  "analyze-repo": "cleanup/finish"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.386",
3
+ "version": "0.2.387",
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",