bitfab-cli 0.2.377 → 0.2.379

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 +10 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24906,10 +24906,10 @@ var semver3 = __toESM(require_semver2(), 1);
24906
24906
 
24907
24907
  // ../bitfab-plugin-lib/dist/bakedSdkVersions.js
24908
24908
  var BAKED_SDK_VERSIONS = {
24909
- typescript: "0.58.3",
24910
- python: "0.58.4",
24911
- ruby: "0.58.3",
24912
- go: "0.58.3"
24909
+ typescript: "0.58.5",
24910
+ python: "0.58.5",
24911
+ ruby: "0.58.4",
24912
+ go: "0.58.4"
24913
24913
  };
24914
24914
 
24915
24915
  // ../bitfab-plugin-lib/dist/installedSdk.js
@@ -32324,6 +32324,8 @@ Mark each key as \u2705 traces arriving (with most recent timestamp), \u26A0\uFE
32324
32324
  - **Bare trace-processor keys** ({{traceProcessorNames}} over plain \`run()\`): the processor captures the run but its root span records an empty input, so a processor-only key without the run wrapper {{traceProcessorRootWrappers}} or an application root is NOT replayable. Flag it \u26A0\uFE0F root not replayable and recommend adding a \`withTrace\`/\`trace\` root that takes the run input in supported subtree runtimes, or routing through the run wrapper. Recommend a manual \`withSpan\`/\`@span\` root only when opt-out is technically unavailable. When an application root exists, check its signature like any decorated key (next bullet).
32325
32325
  - **Decorated/wrapped keys**: read the root function signature and confirm it's replayable per Instrument's trace-boundary serializability requirement (serializable inputs). Flag any key whose root takes unserializable inputs (live SDK/DB clients, HTTP \`Request\`/\`Response\`, stream writers, sockets, opaque request contexts) as \u26A0\uFE0F root not replayable, reasoning from the signature, not the function name. This is independent of the replay-registry coverage in sub-step 3 above: a non-replayable root is \u26A0\uFE0F whether or not a registry exists for it (a key can be \u274C no replay registry module AND \u26A0\uFE0F root not replayable at once), so never roll a non-replayable root up into \u2705 just because it has no registry entry.
32326
32326
 
32327
+ 5. **Subtree capture wiring**: an opt-out \`trace\`/\`withTrace\` root records the root and nothing beneath it unless the runtime support is actually there, which looks like healthy tracing until someone opens a trace and finds one node. Only check this when step {{step:inspect/gather-functions}} found an opt-out root; a repo whose roots are all \`withSpan\`/\`span\` needs none of it. **TypeScript** needs two things, both required: (a) \`@bitfab/transform\` in that workspace's manifest, and (b) an adapter wired into the build that produces the server entrypoint. Grep the build configuration and start scripts for \`@bitfab/transform/\`: \`next.config.*\`, \`vite.config.*\`, \`webpack.config.*\`, \`rspack.config.*\`, \`rsbuild.config.*\`, \`rollup.config.*\`, \`tsup.config.*\`, \`babel.config.*\`, Nest's \`webpackConfigPath\` target, or \`--import @bitfab/transform/register\` on the real start command. Mark \u2705 package present and adapter wired, \u26A0\uFE0F package installed but no adapter in the real build path, or \u274C package missing. **Python** needs 3.12+ instead; read the project's declared version and flag anything below it. The application's own log corroborates a \u274C or \u26A0\uFE0F finding: both SDKs log one \`[bitfab]\` warning when an opt-out root runs without its runtime support.
32328
+
32327
32329
  Hold these results for the report. (If nothing is instrumented, no trace function keys AND no trace-processor registrations, skip both the **replay** and the **replayability** checks, they are per-workflow, so there's nothing to evaluate; report both as \`n/a (nothing instrumented)\`, never \u2705. Still run the **plugin** and **SDK** checks: the SDK may be installed and stale, or on the legacy \`bitfab\` package needing the \`@bitfab/sdk\` rename, independent of whether any trace functions exist in this repo yet.)`,
32328
32330
  next: "inspect/report"
32329
32331
  },
@@ -32338,11 +32340,13 @@ Hold these results for the report. (If nothing is instrumented, no trace functio
32338
32340
  - **Instrumented here**: the list of keys with \u2705 / \u26A0\uFE0F / \u2753 markers from step {{step:inspect/check-traces}}.
32339
32341
  - **Replay**: \u2705 covers all keys / \u26A0\uFE0F missing keys / \u274C none (from the replay-registry check in step {{step:inspect/check-freshness}}).
32340
32342
  - **Replayable**: \u2705 all roots replayable / \u26A0\uFE0F \`<key>\` root not replayable / \`n/a (nothing instrumented)\` (from the per-root replayability check in step {{step:inspect/check-freshness}}; flagged whether or not a replay registry module exists for the key; never \u2705 when nothing is instrumented).
32343
+ - **Subtree capture**: \u2705 wired / \u26A0\uFE0F \`@bitfab/transform\` installed but no adapter in the real build path / \u274C \`@bitfab/transform\` missing / \u274C Python below 3.12 / \`n/a (no opt-out roots)\` (from the subtree-capture check in step {{step:inspect/check-freshness}}).
32341
32344
 
32342
32345
  Then, for anything not healthy, name the most likely cause and the fix:
32343
32346
  - **Plugin or SDK out of date, or on the legacy \`bitfab\` package**: apply via the fix prompt below (upgrades the version and/or switches \`bitfab\` \u2192 \`@bitfab/sdk\`; same effect as \`{{cmd}}update\`).
32344
32347
  - **Replay missing or incomplete**: refresh via \`{{cmd}}setup replay\` (non-interactive; creates or extends registry entries to cover every key).
32345
32348
  - **Root not replayable**, two failure modes, with the fix matched to each: **(a) the root takes unserializable inputs** (live SDK/DB clients, HTTP req/res, streams, opaque contexts), with or without a replay registry module: move the trace boundary inward to a serializable-input function or refactor to introduce one; **(b) a bare trace-processor-only key** ({{traceProcessorNames}}) whose root is the processor's empty-input span: add a \`withTrace\`/\`trace\` root that wraps the run and takes its input in a supported subtree runtime, or route the run through the run wrapper ({{traceProcessorRootWrappers}}). Use a manual \`withSpan\`/\`@span\` root only when opt-out is technically unavailable. Either way, re-instrument via \`{{cmd}}setup modify\` (or \`{{cmd}}setup instrument\` for a fresh boundary). This is a code change, recommended here, not applied blanket.
32349
+ - **Opt-out roots without subtree capture**: every trace is the root alone, so tracing looks healthy and the traces are useless for per-step diagnosis, replay mocking, and prompt iteration. For TypeScript, install \`@bitfab/transform\` in that workspace and wire the matching adapter into the build behind the server entrypoint, preserving existing config wrappers such as Sentry. For Python, this is a runtime upgrade to 3.12+; report it rather than attempting it.
32346
32350
  - **Instrumented but no traces**: the app hasn't run with tracing enabled, or \`BITFAB_API_KEY\` isn't set in the run environment. Run the app with the key loaded.
32347
32351
  - **Key set but traces aren't visible in the browser**: the API key is bound to a different Clerk org/tenant than the browser session. A key resolves \`API key \u2192 organization_id \u2192 clerk_organization_id \u2192 Clerk tenant\` at creation time; browser visibility requires both to be the same tenant.
32348
32352
  - **Nothing instrumented**: run \`{{cmd}}setup instrument\`.
@@ -32356,7 +32360,7 @@ Then continue to the fix prompt. Inspect does not open Bitfab.`,
32356
32360
  kind: "branch",
32357
32361
  toolCalls: ["ask"],
32358
32362
  title: "Offer to apply the available fixes",
32359
- body: `If the report surfaced anything stale or missing (plugin behind, SDK out of date or on the legacy \`bitfab\` package, or replay registry modules missing/incomplete), {{askVerb}} whether to apply them, each fix is then confirmed individually in the next step (nothing is changed blanket). If everything is healthy, skip the question and go straight to cleanup.
32363
+ body: `If the report surfaced anything stale or missing (plugin behind, SDK out of date or on the legacy \`bitfab\` package, replay registry modules missing/incomplete, or TypeScript subtree capture not wired), {{askVerb}} whether to apply them, each fix is then confirmed individually in the next step (nothing is changed blanket). If everything is healthy, skip the question and go straight to cleanup.
32360
32364
 
32361
32365
  {{branches}}`,
32362
32366
  branches: [
@@ -32395,6 +32399,7 @@ Then continue to the fix prompt. Inspect does not open Bitfab.`,
32395
32399
  - **SDK out of date** (\`updateAvailable: true\`, \`renameFrom\` null), name the workspace and the \`current \u2192 latest\` jump, then {{askVerb}} to upgrade; if yes, run the package manager's upgrade from that workspace directory (the same commands \`{{cmd}}update\` uses): npm / pnpm / yarn / bun \`add @bitfab/sdk@latest\`; uv / poetry / pip \`bitfab-py@latest\`; \`bundle update bitfab\`; \`go get github.com/Project-White-Rabbit/bitfab-go@latest && go mod tidy\`. Read the manifest afterward to confirm the new version. Each workspace is its own decision.
32396
32400
  - **On the legacy \`bitfab\` package** (\`renameFrom\` non-null), this rewrites import sites, so **preview before touching code**: list every \`from "bitfab"\` / \`require("bitfab")\` site you would change, then {{askVerb}} to proceed. If yes, remove the old package and add the new one in one step (e.g. \`pnpm remove bitfab && pnpm add @bitfab/sdk@latest\`, or the npm / yarn / bun equivalent) and rewrite those imports to \`@bitfab/sdk\`. Do this even when \`current\` already equals \`latest\`, the rename is the fix. (TypeScript-only; Python / Ruby / Go package names don't change.)
32397
32401
  - **Replay missing or incomplete**: {{askVerb}} to refresh; if yes, run \`{{cmd}}setup replay\` to create or extend the scripts so every trace function key is covered (it is non-interactive).
32402
+ - **Subtree capture not wired** (TypeScript), this edits a build file, so **preview before touching code**: name the workspace, the adapter you would use, and the exact config file or start script you would change, then {{askVerb}} to proceed. If yes, add \`@bitfab/transform\` as a development dependency in that workspace and wire the matching adapter: \`@bitfab/transform/next\` wrapping the existing \`next.config\`, the \`/vite\`, \`/rollup\`, \`/rolldown\`, \`/esbuild\`, \`/bun\`, \`/webpack\`, \`/rspack\`, \`/rsbuild\`, \`/babel\`, \`/nest\`, or \`/typescript\` entry in the existing build config, or \`--import @bitfab/transform/register\` on the real start command. Preserve every existing wrapper; never replace or bypass one. Python below 3.12 is a runtime upgrade, report it and do not attempt it.
32398
32403
 
32399
32404
  For unusual monorepos or private registries, defer to \`{{cmd}}update\`. Report what was applied and what the user declined. Do not open Bitfab.`,
32400
32405
  next: "cleanup/finish"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.377",
3
+ "version": "0.2.379",
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",