@buildautomaton/cli 0.1.92 → 0.1.93

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
@@ -24922,7 +24922,6 @@ function withCodeNavCacheSqliteWorkLock(fn) {
24922
24922
  var chain, workLockDepth;
24923
24923
  var init_code_nav_cache_sqlite_work_lock = __esm({
24924
24924
  "../bridge/src/sqlite/code-nav-cache/code-nav-cache-sqlite-work-lock.ts"() {
24925
- "use strict";
24926
24925
  init_code_nav_cache_paths();
24927
24926
  chain = Promise.resolve();
24928
24927
  workLockDepth = 0;
@@ -30448,7 +30447,7 @@ var {
30448
30447
  } = import_index.default;
30449
30448
 
30450
30449
  // src/cli-version.ts
30451
- var CLI_VERSION = "0.1.92".length > 0 ? "0.1.92" : "0.0.0-dev";
30450
+ var CLI_VERSION = "0.1.93".length > 0 ? "0.1.93" : "0.0.0-dev";
30452
30451
 
30453
30452
  // src/cli/defaults.ts
30454
30453
  var DEFAULT_API_URL = process.env.BUILDAUTOMATON_API_URL ?? "https://api.buildautomaton.com";
@@ -30734,7 +30733,7 @@ function formatSpawnError(err, command) {
30734
30733
  }
30735
30734
 
30736
30735
  // ../bridge/src/agents/acp/clients/kill-process-tree.ts
30737
- var import_tree_kill = __toESM(require_tree_kill(), 1);
30736
+ var import_tree_kill = __toESM(require_tree_kill());
30738
30737
  import { promisify } from "node:util";
30739
30738
  var treeKillAsync = promisify(import_tree_kill.default);
30740
30739
  var ACP_PROCESS_TREE_KILL_GRACE_MS = 2500;
@@ -35947,6 +35946,24 @@ var RoleLengthWireSchema = external_exports.discriminatedUnion("type", [
35947
35946
  external_exports.object({ type: external_exports.literal("session_count"), max_sessions: MaxSessionsSchema })
35948
35947
  ]);
35949
35948
 
35949
+ // ../types/src/role-access-restrictions.ts
35950
+ var EMPTY_ROLE_ACCESS_RESTRICTIONS = {
35951
+ sessionsOwnAndExplicitOnly: false,
35952
+ bridgesOwnAndExplicitOnly: false,
35953
+ sessionsReadOnlyExceptOwn: false,
35954
+ codeChangesAgentModifiedOnly: false,
35955
+ codeChangesHidden: false
35956
+ };
35957
+ function roleAccessRestrictionsToWire(restrictions) {
35958
+ return {
35959
+ sessions_own_and_explicit_only: restrictions.sessionsOwnAndExplicitOnly,
35960
+ bridges_own_and_explicit_only: restrictions.bridgesOwnAndExplicitOnly,
35961
+ sessions_read_only_except_own: restrictions.sessionsReadOnlyExceptOwn,
35962
+ code_changes_agent_modified_only: restrictions.codeChangesAgentModifiedOnly,
35963
+ code_changes_hidden: restrictions.codeChangesHidden
35964
+ };
35965
+ }
35966
+
35950
35967
  // ../types/src/role-details.ts
35951
35968
  var InitialPeriodDaysSchema = external_exports.number().int().min(ROLE_PERIOD_MIN_DAYS).max(ROLE_PERIOD_MAX_DAYS);
35952
35969
  var AgentSubscriptionIdsSchema = external_exports.array(external_exports.string().min(1)).default([]);
@@ -35956,15 +35973,33 @@ var RoleDetailsSchema = external_exports.object({
35956
35973
  length: RoleLengthSchema.nullable(),
35957
35974
  agentSubscriptionIds: AgentSubscriptionIdsSchema,
35958
35975
  sessionsOwnAndExplicitOnly: BoolFalseSchema,
35959
- bridgesOwnAndExplicitOnly: BoolFalseSchema
35976
+ bridgesOwnAndExplicitOnly: BoolFalseSchema,
35977
+ sessionsReadOnlyExceptOwn: BoolFalseSchema,
35978
+ codeChangesAgentModifiedOnly: BoolFalseSchema,
35979
+ codeChangesHidden: BoolFalseSchema
35960
35980
  });
35961
35981
  var RoleDetailsWireSchema = external_exports.object({
35962
35982
  payment: RolePaymentModelWireSchema.nullable(),
35963
35983
  length: RoleLengthWireSchema.nullable(),
35964
35984
  agent_subscription_ids: AgentSubscriptionIdsSchema,
35965
35985
  sessions_own_and_explicit_only: BoolFalseSchema,
35966
- bridges_own_and_explicit_only: BoolFalseSchema
35967
- });
35986
+ bridges_own_and_explicit_only: BoolFalseSchema,
35987
+ sessions_read_only_except_own: BoolFalseSchema,
35988
+ code_changes_agent_modified_only: BoolFalseSchema,
35989
+ code_changes_hidden: BoolFalseSchema
35990
+ });
35991
+ var EMPTY_ROLE_DETAILS = {
35992
+ payment: null,
35993
+ length: null,
35994
+ agentSubscriptionIds: [],
35995
+ ...EMPTY_ROLE_ACCESS_RESTRICTIONS
35996
+ };
35997
+ var EMPTY_ROLE_DETAILS_WIRE = {
35998
+ payment: null,
35999
+ length: null,
36000
+ agent_subscription_ids: [],
36001
+ ...roleAccessRestrictionsToWire(EMPTY_ROLE_ACCESS_RESTRICTIONS)
36002
+ };
35968
36003
 
35969
36004
  // ../bridge/src/agents/acp/safe-fs-path.ts
35970
36005
  import * as path2 from "node:path";
@@ -38818,15 +38853,31 @@ function queueCursorCreatePlanRequest(method, id, msg, deps) {
38818
38853
  }
38819
38854
 
38820
38855
  // ../bridge/src/agents/providers/cursor/cursor-incoming-cursor-task.ts
38821
- function buildCursorTaskToolCallUpdate(params) {
38856
+ function asRecord2(v) {
38857
+ return v != null && typeof v === "object" && !Array.isArray(v) ? v : null;
38858
+ }
38859
+ function flattenCursorTaskParams(params) {
38860
+ const nested = asRecord2(params.task) ?? asRecord2(params.data) ?? asRecord2(params.payload) ?? asRecord2(params.cursorTask);
38861
+ return nested ? { ...nested, ...params } : params;
38862
+ }
38863
+ function stringField(params, ...keys) {
38864
+ for (const key of keys) {
38865
+ const v = params[key];
38866
+ if (typeof v === "string" && v.trim()) return v.trim();
38867
+ }
38868
+ return void 0;
38869
+ }
38870
+ function buildCursorTaskToolCallUpdate(rawParams) {
38871
+ const params = flattenCursorTaskParams(rawParams);
38822
38872
  const toolCallId = params.toolCallId ?? params.tool_call_id;
38823
38873
  if (typeof toolCallId !== "string" || !toolCallId.trim()) return null;
38824
- const description = typeof params.description === "string" ? params.description.trim() : "";
38874
+ const description = stringField(params, "description");
38825
38875
  const prompt = typeof params.prompt === "string" ? params.prompt : void 0;
38826
38876
  const subagentType = params.subagentType ?? params.subagent_type;
38827
38877
  const model = typeof params.model === "string" ? params.model : void 0;
38828
- const agentId = typeof params.agentId === "string" ? params.agentId : typeof params.agent_id === "string" ? params.agent_id : void 0;
38829
- const durationMs = typeof params.durationMs === "number" ? params.durationMs : typeof params.duration_ms === "number" ? params.duration_ms : void 0;
38878
+ const agentId = stringField(params, "agentId", "agent_id");
38879
+ const rawDuration = params.durationMs ?? params.duration_ms;
38880
+ const durationMs = typeof rawDuration === "number" && Number.isFinite(rawDuration) && rawDuration > 0 ? rawDuration : void 0;
38830
38881
  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;
38831
38882
  return {
38832
38883
  sessionUpdate: "tool_call_update",
@@ -38995,7 +39046,7 @@ function writeCreatePlanFile(params) {
38995
39046
  }
38996
39047
 
38997
39048
  // ../bridge/src/agents/providers/cursor/enrich-create-plan-rpc-result.ts
38998
- function asRecord2(v) {
39049
+ function asRecord3(v) {
38999
39050
  return v != null && typeof v === "object" && !Array.isArray(v) ? v : null;
39000
39051
  }
39001
39052
  function resolveAcceptedPlanMarkdown(outcome, pendingParams) {
@@ -39004,8 +39055,8 @@ function resolveAcceptedPlanMarkdown(outcome, pendingParams) {
39004
39055
  return "";
39005
39056
  }
39006
39057
  function enrichCreatePlanRpcResult(result, pendingParams, cloudSessionId) {
39007
- const root = asRecord2(result);
39008
- const outcome = asRecord2(root?.outcome);
39058
+ const root = asRecord3(result);
39059
+ const outcome = asRecord3(root?.outcome);
39009
39060
  if (!outcome) return result;
39010
39061
  const kind = typeof outcome.outcome === "string" ? outcome.outcome : "";
39011
39062
  if (kind !== "accepted") {
@@ -43744,7 +43795,7 @@ function createBridgeHeartbeatController(params) {
43744
43795
  }
43745
43796
 
43746
43797
  // ../bridge/src/cli/cli-version.ts
43747
- var CLI_VERSION2 = "0.1.92".length > 0 ? "0.1.92" : "0.0.0-dev";
43798
+ var CLI_VERSION2 = "0.1.93".length > 0 ? "0.1.93" : "0.0.0-dev";
43748
43799
 
43749
43800
  // ../bridge/src/connection/identify/send-bridge-identify.ts
43750
43801
  function sendBridgeIdentify(ws, params) {