@buildautomaton/cli 0.1.86 → 0.1.88

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/cli.js CHANGED
@@ -30462,7 +30462,7 @@ var {
30462
30462
  } = import_index.default;
30463
30463
 
30464
30464
  // src/cli-version.ts
30465
- var CLI_VERSION = "0.1.86".length > 0 ? "0.1.86" : "0.0.0-dev";
30465
+ var CLI_VERSION = "0.1.88".length > 0 ? "0.1.88" : "0.0.0-dev";
30466
30466
 
30467
30467
  // src/cli/defaults.ts
30468
30468
  var DEFAULT_API_URL = process.env.BUILDAUTOMATON_API_URL ?? "https://api.buildautomaton.com";
@@ -38473,6 +38473,19 @@ var AGENT_SUBSCRIPTION_TYPES = INSTALLABLE_BRIDGE_AGENTS.map(
38473
38473
  (a) => a.value
38474
38474
  );
38475
38475
 
38476
+ // ../types/src/role-payment-model.ts
38477
+ var PerSessionUsdMaxObjectSchema = external_exports.object({
38478
+ type: external_exports.literal("per_session_usd_max"),
38479
+ maxUsd: external_exports.number().int().min(1).max(200)
38480
+ });
38481
+ var RolePaymentModelSchema = external_exports.discriminatedUnion("type", [
38482
+ PerSessionUsdMaxObjectSchema
38483
+ ]);
38484
+ var RolePaymentModelWireSchema = external_exports.object({
38485
+ type: external_exports.literal("per_session_usd_max"),
38486
+ max_usd: external_exports.number().int().min(1).max(200)
38487
+ });
38488
+
38476
38489
  // src/paths/session-layout-paths.ts
38477
38490
  import * as path26 from "node:path";
38478
38491
  function resolveIsolatedSessionParentPathFromCheckouts(worktreePaths) {
@@ -39876,6 +39889,7 @@ function buildCursorTaskToolCallUpdate(params) {
39876
39889
  const model = typeof params.model === "string" ? params.model : void 0;
39877
39890
  const agentId = typeof params.agentId === "string" ? params.agentId : typeof params.agent_id === "string" ? params.agent_id : void 0;
39878
39891
  const durationMs = typeof params.durationMs === "number" ? params.durationMs : typeof params.duration_ms === "number" ? params.duration_ms : void 0;
39892
+ const isBackground = typeof params.isBackground === "boolean" ? params.isBackground : typeof params.is_background === "boolean" ? params.is_background : typeof params.runInBackground === "boolean" ? params.runInBackground : typeof params.run_in_background === "boolean" ? params.run_in_background : void 0;
39879
39893
  return {
39880
39894
  sessionUpdate: "tool_call_update",
39881
39895
  toolCallId,
@@ -39886,7 +39900,8 @@ function buildCursorTaskToolCallUpdate(params) {
39886
39900
  ...subagentType != null ? { subagentType } : {},
39887
39901
  ...model != null ? { model } : {},
39888
39902
  ...agentId != null ? { agentId } : {},
39889
- ...durationMs != null ? { durationMs } : {}
39903
+ ...durationMs != null ? { durationMs } : {},
39904
+ ...isBackground != null ? { isBackground } : {}
39890
39905
  }
39891
39906
  };
39892
39907
  }
@@ -40054,6 +40069,11 @@ function writeCreatePlanFile(params) {
40054
40069
  function asRecord2(v) {
40055
40070
  return v != null && typeof v === "object" && !Array.isArray(v) ? v : null;
40056
40071
  }
40072
+ function resolveAcceptedPlanMarkdown(outcome, pendingParams) {
40073
+ if (typeof outcome.plan === "string" && outcome.plan.trim()) return outcome.plan;
40074
+ if (typeof pendingParams.plan === "string") return pendingParams.plan;
40075
+ return "";
40076
+ }
40057
40077
  function enrichCreatePlanRpcResult(result, pendingParams, cloudSessionId) {
40058
40078
  const root = asRecord2(result);
40059
40079
  const outcome = asRecord2(root?.outcome);
@@ -40063,7 +40083,7 @@ function enrichCreatePlanRpcResult(result, pendingParams, cloudSessionId) {
40063
40083
  const { plan: _drop, ...rest } = outcome;
40064
40084
  return { ...root, outcome: rest };
40065
40085
  }
40066
- const planMarkdown = typeof outcome.plan === "string" ? outcome.plan : "";
40086
+ const planMarkdown = resolveAcceptedPlanMarkdown(outcome, pendingParams);
40067
40087
  const toolCallIdRaw = pendingParams.toolCallId ?? pendingParams.tool_call_id;
40068
40088
  const toolCallId = typeof toolCallIdRaw === "string" ? toolCallIdRaw.trim() : "";
40069
40089
  const sessionId = cloudSessionId?.trim() ?? "";