bitfab-cli 0.2.431 → 0.2.433

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 +33 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -29231,6 +29231,31 @@ var saveSimPlan = {
29231
29231
  })).min(1).max(500)).describe("Nodes to change (1-500). `name` is the span name; `captureContent` false stops recording that span's inputs and outputs and does the same for every node beneath it, true records them again for that node only.")
29232
29232
  }
29233
29233
  };
29234
+ var scenarioTraceIdSchema = external_exports.uuid().describe("ID of the trace the scenario was built from.");
29235
+ var getScenario = {
29236
+ name: "get_scenario",
29237
+ title: "Get Scenario",
29238
+ description: "Read the scenario built from one trace: the situation the trace function's run was in, as the trigger that started the run and the data available when it arrived, with a name and a description. It describes the situation only, never what the run did or should do. Returns the trigger and data summaries, then the name, description, trigger, and data as JSON in exactly the shape save_scenario accepts. Call it before save_scenario so an edit starts from what is saved.",
29239
+ inputSchema: {
29240
+ traceId: scenarioTraceIdSchema
29241
+ }
29242
+ };
29243
+ var saveScenario = {
29244
+ name: "save_scenario",
29245
+ title: "Save Scenario",
29246
+ description: "Update the scenario built from one trace, for example to add history the run had available, record data it was missing, or correct the trigger. name, description, trigger, and data each replace the saved value whole, and fields left out are kept. To add to the data without resending it, use appendData instead of data: its history entries go after the saved ones and its missing items after the saved missing items, in one step that cannot lose another caller's append made at the same time. Send data or appendData, not both. trigger, data, and appendData entries must keep the shape get_scenario returns. A history entry's source names the span on this trace its text came from; set it to null or leave it out when the text is not in the trace, and the entry still counts as data the run had but cannot be cited as evidence when the scenario is turned into assertions. A source naming a span that is not on this trace is refused. The trigger and data summaries are rebuilt from what is saved. It only updates a scenario that already exists; a trace with no scenario is refused. Returns the saved scenario.",
29247
+ inputSchema: {
29248
+ traceId: scenarioTraceIdSchema,
29249
+ name: external_exports.string().min(1).optional().describe("The scenario's name."),
29250
+ description: external_exports.string().min(1).optional().describe("The scenario's description."),
29251
+ trigger: external_exports.preprocess(parseJsonString, external_exports.record(external_exports.string(), external_exports.unknown())).optional().describe("The whole trigger object, in the shape get_scenario returns: what started the run."),
29252
+ data: external_exports.preprocess(parseJsonString, external_exports.record(external_exports.string(), external_exports.unknown())).optional().describe("The whole data object, in the shape get_scenario returns: topic, history (earlier facts in time order, each with its source span), and missing (what the run did not have). Replaces the saved data. Leave it out when sending appendData."),
29253
+ appendData: external_exports.preprocess(parseJsonString, external_exports.object({
29254
+ history: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).optional(),
29255
+ missing: external_exports.array(external_exports.string()).optional()
29256
+ })).optional().describe("Data to add to the saved data: history entries (same shape as data.history, source optional, in time order, after the saved ones) and missing items. At least one of the two must be non-empty. Leave data out when sending this.")
29257
+ }
29258
+ };
29234
29259
  var ALL_TOOL_CONTRACTS = [
29235
29260
  getGraderLabels,
29236
29261
  saveGraderLabels,
@@ -29283,7 +29308,9 @@ var ALL_TOOL_CONTRACTS = [
29283
29308
  getTemplate,
29284
29309
  saveTemplate,
29285
29310
  getSimPlan,
29286
- saveSimPlan
29311
+ saveSimPlan,
29312
+ getScenario,
29313
+ saveScenario
29287
29314
  ];
29288
29315
  var TOOL_NAMES = ALL_TOOL_CONTRACTS.map((contract) => contract.name).sort();
29289
29316
 
@@ -29893,10 +29920,10 @@ var semver3 = __toESM(require_semver2(), 1);
29893
29920
 
29894
29921
  // ../bitfab-plugin-lib/dist/bakedSdkVersions.js
29895
29922
  var BAKED_SDK_VERSIONS = {
29896
- typescript: "0.64.15",
29897
- python: "0.64.15",
29898
- ruby: "0.64.13",
29899
- go: "0.64.14"
29923
+ typescript: "0.64.17",
29924
+ python: "0.64.17",
29925
+ ruby: "0.64.15",
29926
+ go: "0.64.16"
29900
29927
  };
29901
29928
 
29902
29929
  // ../bitfab-plugin-lib/dist/installedSdk.js
@@ -36661,7 +36688,7 @@ State who can start a replay: once GitHub registers the workflow, anyone with wr
36661
36688
 
36662
36689
  Edit the workflow directly for anything detection missed, such as a build step, code generation, a monorepo install filter, or a service, and pin any added action to a commit SHA. When the user normally starts replay through a wrapper that sets environment variables, add them to the replay step's env. Every variable read from a secret stays in that env as a GitHub expression reading secrets.<name>, which is how --cloud-secrets and the runner's empty-secret check find them; a secret stored under another name is mapped directly, such as OPENAI_API_KEY reading secrets.EVAL_OPENAI_API_KEY, and a non-secret value reads vars.<name>. When a setup step needs a credential file, write it under $RUNNER_TEMP with umask 077 and export its path through $GITHUB_ENV; do not use google-github-actions/auth or similar actions that write the key into the checked-out workspace. Do not copy deployment steps or secret values into the workflow.
36663
36690
 
36664
- For BITFAB_API_KEY, have the user create a dedicated key for the runner on the Bitfab dashboard's API keys page, in the organization that holds the registry's traces, named for what it is (such as "GitHub cloud replay"), and set it by hand. For the other secrets, when local environment files define them, ask once whether to copy them, then run bitfab-replay --cloud-secrets --env-file <file> --dry-run, then without --dry-run. It pipes values to gh on standard input, creates a missing Environment, and without the GitHub CLI returns createByHand with the page to create them on; relay that list instead of treating it as a failure. Never hand-extract a value with grep, cut, or a shell variable. Warn before copying a value a runner cannot use, such as a localhost URL. Setting secrets needs the same explicit authorization as any other remote write.
36691
+ For BITFAB_API_KEY, have the user create a dedicated key for the runner on the Bitfab dashboard's API keys page, in the organization that holds the registry's traces, named for what it is (such as "GitHub cloud replay"), and set it by hand. Each replay started with bitfab-replay --cloud normally runs with the Bitfab API key of whoever started it, which the SDK stores through the GitHub CLI as a secret for that replay alone and deletes once the replay starts, so this key is the fallback for runs that cannot pass one, such as a dispatch from another workflow or a machine without the GitHub CLI. Keep the key_id input and the BITFAB_REPLAY_BITFAB_API_KEY line --cloud-init writes. When a workflow already exists, run --cloud-update (the same command as --cloud-init) anyway: it adds whichever of those lines is missing without touching the rest, and lists anything it could not place for you to add by hand. For the other secrets, when local environment files define them, ask once whether to copy them, then run bitfab-replay --cloud-secrets --env-file <file> --dry-run, then without --dry-run. It pipes values to gh on standard input, creates a missing Environment, and without the GitHub CLI returns createByHand with the page to create them on; relay that list instead of treating it as a failure. Never hand-extract a value with grep, cut, or a shell variable. Warn before copying a value a runner cannot use, such as a localhost URL. Setting secrets needs the same explicit authorization as any other remote write.
36665
36692
 
36666
36693
  Each replay pushes a temporary bitfab-replay/<UUID> branch. For each push-triggered workflow or deployment in reviewPushTriggers, offer to exclude those branches: branches-ignore: [bitfab-replay/**] on a push trigger (or a last !bitfab-replay/** entry when it already lists branches), and git.deploymentEnabled {"bitfab-replay/**": false} in vercel.json. Ask before changing existing CI or deployments.`,
36667
36694
  next: "cloud/verify"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.431",
3
+ "version": "0.2.433",
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",