bitfab-cli 0.2.333 → 0.2.334
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 +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24231,8 +24231,8 @@ var saveTracePlan = {
|
|
|
24231
24231
|
// how plans arrived with every node unclassified.
|
|
24232
24232
|
tree: external_exports.preprocess(parseJsonString, tracePlanTreeShape).optional().describe("TracePlanTree: { rootId, nodes: { [id]: TraceNode } }. Each TraceNode has id, name, kind ('manual' | 'auto' | 'pure'), file, line, signature, parentId, childIds, plus optional framework, fields, sampleInput, sampleOutput. Every node, including uncaptured context nodes, must carry `analysis` describing WHAT THAT NODE DOES: { classification, sideEffectKind?, readKind?, innerCall?, mockable?, unmockableReason?, inputSerializable?, outputSerializable? }. Set `mockable` mechanically from the node's `kind`: `kind: 'manual'` (a hand-written `withSpan`/`@span`) is mockable, omit `mockable`; `kind: 'auto'` (captured by a framework handler/processor/stream/collector) gets `mockable: false` + `unmockableReason`, the ONE exception being Vercel AI SDK model spans (its `wrapLanguageModel` middleware routes the call through `withSpan`), which are mockable, omit; the root gets omit (never mockable). Rationale: mocking returns a span's recorded output instead of running the call, which only works when the call goes through a `withSpan` wrapper; `auto` framework spans are observed, not wrapped. Key hazard: an `auto` `external_read`/`side_effect` (a framework tool hitting a DB/HTTP) left mockable promises a mock replay can't deliver; its fix is a manual `withSpan` around that call or a db-snapshot, never a mock. Serializability is two raw facts, distinct from `mockable`: set `outputSerializable: false` when the recorded OUTPUT does not round-trip through serialization, and set `inputSerializable: false` when the recorded INPUT does not (its arguments hold a DB client, an open stream, a callback, or a class instance with no JSON form); omit either when it serializes (the default). Two rules follow. (1) Do NOT choose a root whose input is not serializable: replay re-runs the root against its recorded input, so a non-serializable-input root is not replayable, promote the root to a caller that takes a serializable input instead. (2) Do NOT mock a node whose output is not serializable (replay has no recorded value to return); the server enforces this by forcing any `outputSerializable: false` node unmockable, so you don't need to also set `mockable` for that reason. classification is 'pure' (deterministic local compute), 'model_call' (the span that IS the actual LLM/model call; a wrapper/orchestrator whose model call is represented by a child node, e.g. a LangChain chain.invoke or the root, is 'pure', not 'model_call'; never bubble a child's model_call up to its parent), 'external_read' (reads external mutable state: DB SELECT, outbound GET, vector search, cache read; set readKind), or 'side_effect' (mutates external state: DB write, outbound POST/PUT/DELETE, email, queue, payment, filesystem; set sideEffectKind). The server derives the replay disposition (`mockOnReplay`) and the whole validation summary from this classification and mockability, so do NOT send them. Include ~10 surrounding callees below each leaf as `pure` (uncaptured) context nodes so the user can see what's adjacent in the codebase when they edit in the UI. Every node MUST be a descendant of `rootId`: the plan tree renders downward from the root, so a node above the root or on a side branch off one of those ancestors is stored and counted but never drawn. Never send callers above the root."),
|
|
24233
24233
|
capturedNodeIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.string())).optional().describe("CREATE or STRUCTURAL update mode. Absolute captured set for `tree`. Required with `tree`; must reference ids in the tree and form one connected sub-tree."),
|
|
24234
|
-
capture: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.string())).optional().describe("TARGETED update mode. Node ids to add to the existing captured set. Requires `planId`; cannot be combined with `tree` / `capturedNodeIds`."),
|
|
24235
|
-
uncapture: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.string())).optional().describe("TARGETED update mode. Node ids to remove from the existing captured set. Requires `planId`; cannot be combined with `tree` / `capturedNodeIds`."),
|
|
24234
|
+
capture: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.string())).optional().describe("TARGETED update mode. Node ids to add to the existing captured set, each one pulling in every span above it so the captured set stays one connected sub-tree. Requires `planId`; cannot be combined with `tree` / `capturedNodeIds`."),
|
|
24235
|
+
uncapture: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.string())).optional().describe("TARGETED update mode. Node ids to remove from the existing captured set, each one also dropping every span beneath it. Requires `planId`; cannot be combined with `tree` / `capturedNodeIds`."),
|
|
24236
24236
|
mockOnReplayByNodeId: external_exports.preprocess(parseJsonString, external_exports.record(external_exports.string(), external_exports.boolean())).optional().describe("UPDATE mode. Per-node replay/mock overrides. Only listed nodes change. The replay entry point and framework-observed spans cannot be mocked."),
|
|
24237
24237
|
stats: external_exports.preprocess(parseJsonString, external_exports.unknown()).optional().describe("Optional sample-run stats: { durationMs?, tokens?, cost? }"),
|
|
24238
24238
|
traceFunctionKey: external_exports.string().min(1).optional().describe("Trace function key. Recommended when creating; when updating, pass only to rename a key that was wrong or changed."),
|
package/package.json
CHANGED