bitfab-cli 0.2.430 → 0.2.432
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.
- package/dist/index.js +34 -7
- 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.
|
|
29897
|
-
python: "0.64.
|
|
29898
|
-
ruby: "0.64.
|
|
29899
|
-
go: "0.64.
|
|
29923
|
+
typescript: "0.64.16",
|
|
29924
|
+
python: "0.64.16",
|
|
29925
|
+
ruby: "0.64.14",
|
|
29926
|
+
go: "0.64.15"
|
|
29900
29927
|
};
|
|
29901
29928
|
|
|
29902
29929
|
// ../bitfab-plugin-lib/dist/installedSdk.js
|
|
@@ -36641,7 +36668,7 @@ Never modify existing code on a refactor path without completing this three-step
|
|
|
36641
36668
|
kind: "action",
|
|
36642
36669
|
title: "Inspect the replay environment",
|
|
36643
36670
|
toolCalls: ["bash", "read", "glob", "grep", "ask"],
|
|
36644
|
-
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
|
|
36671
|
+
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; read them through the Bitfab MCP tools, as after a local replay. --cloud-full-output prints the whole result instead, and is refused on a public repository. The code ships inside the SDK, and the repository keeps one file: .github/workflows/bitfab-replay.yml, which holds only settings.
|
|
36645
36672
|
|
|
36646
36673
|
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.
|
|
36647
36674
|
|
|
@@ -36675,7 +36702,7 @@ Each replay pushes a temporary bitfab-replay/<UUID> branch. For each push-trigge
|
|
|
36675
36702
|
|
|
36676
36703
|
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.
|
|
36677
36704
|
|
|
36678
|
-
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. --cloud-env NAME=VALUE (repeatable) sets a non-secret environment variable for one replay; secrets go in the workflow's env and --cloud-secrets. 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.`,
|
|
36705
|
+
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. --cloud-env NAME=VALUE (repeatable) sets a non-secret environment variable for one replay; secrets go in the workflow's env and --cloud-secrets. When the snapshot refuses a credential-like file the user confirms is safe to upload, such as a test certificate, --cloud-allow-file <path> (repeatable, private repositories only) lets it in. 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.`,
|
|
36679
36706
|
next: "cleanup/finish"
|
|
36680
36707
|
}
|
|
36681
36708
|
]
|
package/package.json
CHANGED