@buildautomaton/cli 0.1.87 → 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/index.js CHANGED
@@ -32863,6 +32863,19 @@ var AGENT_SUBSCRIPTION_TYPES = INSTALLABLE_BRIDGE_AGENTS.map(
32863
32863
  (a) => a.value
32864
32864
  );
32865
32865
 
32866
+ // ../types/src/role-payment-model.ts
32867
+ var PerSessionUsdMaxObjectSchema = external_exports.object({
32868
+ type: external_exports.literal("per_session_usd_max"),
32869
+ maxUsd: external_exports.number().int().min(1).max(200)
32870
+ });
32871
+ var RolePaymentModelSchema = external_exports.discriminatedUnion("type", [
32872
+ PerSessionUsdMaxObjectSchema
32873
+ ]);
32874
+ var RolePaymentModelWireSchema = external_exports.object({
32875
+ type: external_exports.literal("per_session_usd_max"),
32876
+ max_usd: external_exports.number().int().min(1).max(200)
32877
+ });
32878
+
32866
32879
  // src/agents/acp/safe-fs-path.ts
32867
32880
  import * as path2 from "node:path";
32868
32881
  function resolveSafePathUnderCwd(cwd, filePath) {
@@ -35195,7 +35208,7 @@ function createPendingAuthOnMessage(params) {
35195
35208
  }
35196
35209
 
35197
35210
  // src/cli-version.ts
35198
- var CLI_VERSION = "0.1.87".length > 0 ? "0.1.87" : "0.0.0-dev";
35211
+ var CLI_VERSION = "0.1.88".length > 0 ? "0.1.88" : "0.0.0-dev";
35199
35212
 
35200
35213
  // src/auth/pending/pending-auth-on-open.ts
35201
35214
  function createPendingAuthOnOpen(params) {
@@ -37075,6 +37088,11 @@ function writeCreatePlanFile(params) {
37075
37088
  function asRecord2(v) {
37076
37089
  return v != null && typeof v === "object" && !Array.isArray(v) ? v : null;
37077
37090
  }
37091
+ function resolveAcceptedPlanMarkdown(outcome, pendingParams) {
37092
+ if (typeof outcome.plan === "string" && outcome.plan.trim()) return outcome.plan;
37093
+ if (typeof pendingParams.plan === "string") return pendingParams.plan;
37094
+ return "";
37095
+ }
37078
37096
  function enrichCreatePlanRpcResult(result, pendingParams, cloudSessionId) {
37079
37097
  const root = asRecord2(result);
37080
37098
  const outcome = asRecord2(root?.outcome);
@@ -37084,7 +37102,7 @@ function enrichCreatePlanRpcResult(result, pendingParams, cloudSessionId) {
37084
37102
  const { plan: _drop, ...rest } = outcome;
37085
37103
  return { ...root, outcome: rest };
37086
37104
  }
37087
- const planMarkdown = typeof outcome.plan === "string" ? outcome.plan : "";
37105
+ const planMarkdown = resolveAcceptedPlanMarkdown(outcome, pendingParams);
37088
37106
  const toolCallIdRaw = pendingParams.toolCallId ?? pendingParams.tool_call_id;
37089
37107
  const toolCallId = typeof toolCallIdRaw === "string" ? toolCallIdRaw.trim() : "";
37090
37108
  const sessionId = cloudSessionId?.trim() ?? "";