@buildautomaton/cli 0.1.84 → 0.1.85

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.84".length > 0 ? "0.1.84" : "0.0.0-dev";
30465
+ var CLI_VERSION = "0.1.85".length > 0 ? "0.1.85" : "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";
@@ -38468,6 +38468,11 @@ var INSTALLABLE_BRIDGE_AGENTS = [
38468
38468
  { value: "opencode", label: "OpenCode agent", tokenLabel: "Provider API key", tokenEnvVar: "OPENCODE_API_KEY" }
38469
38469
  ];
38470
38470
 
38471
+ // ../types/src/agent-subscriptions.ts
38472
+ var AGENT_SUBSCRIPTION_TYPES = INSTALLABLE_BRIDGE_AGENTS.map(
38473
+ (a) => a.value
38474
+ );
38475
+
38471
38476
  // src/paths/session-layout-paths.ts
38472
38477
  import * as path26 from "node:path";
38473
38478
  function resolveIsolatedSessionParentPathFromCheckouts(worktreePaths) {
@@ -39825,13 +39830,40 @@ function createCursorAcpHandle(options) {
39825
39830
  // src/agents/acp/clients/cursor/cursor-acp-init.ts
39826
39831
  import * as readline from "node:readline";
39827
39832
 
39833
+ // src/agents/acp/clients/cursor/cursor-incoming-cursor-task.ts
39834
+ function buildCursorTaskToolCallUpdate(params) {
39835
+ const toolCallId = params.toolCallId ?? params.tool_call_id;
39836
+ if (typeof toolCallId !== "string" || !toolCallId.trim()) return null;
39837
+ const description = typeof params.description === "string" ? params.description.trim() : "";
39838
+ const prompt = typeof params.prompt === "string" ? params.prompt : void 0;
39839
+ const subagentType = params.subagentType ?? params.subagent_type;
39840
+ const model = typeof params.model === "string" ? params.model : void 0;
39841
+ const agentId = typeof params.agentId === "string" ? params.agentId : typeof params.agent_id === "string" ? params.agent_id : void 0;
39842
+ const durationMs = typeof params.durationMs === "number" ? params.durationMs : typeof params.duration_ms === "number" ? params.duration_ms : void 0;
39843
+ return {
39844
+ sessionUpdate: "tool_call_update",
39845
+ toolCallId,
39846
+ ...description ? { title: description } : {},
39847
+ cursorTask: {
39848
+ ...description ? { description } : {},
39849
+ ...prompt != null ? { prompt } : {},
39850
+ ...subagentType != null ? { subagentType } : {},
39851
+ ...model != null ? { model } : {},
39852
+ ...agentId != null ? { agentId } : {},
39853
+ ...durationMs != null ? { durationMs } : {}
39854
+ }
39855
+ };
39856
+ }
39857
+ function handleCursorIncomingCursorTask(id, msg, deps) {
39858
+ const params = msg.params ?? {};
39859
+ deps.respond(id, {});
39860
+ const update = buildCursorTaskToolCallUpdate(params);
39861
+ if (update) deps.onSessionUpdate?.(update);
39862
+ }
39863
+
39828
39864
  // src/agents/acp/clients/cursor/cursor-incoming-cursor-methods.ts
39829
39865
  var CURSOR_BRIDGE_METHODS = /* @__PURE__ */ new Set(["cursor/create_plan", "cursor/ask_question"]);
39830
- var CURSOR_NOOP_METHODS = /* @__PURE__ */ new Set([
39831
- "cursor/update_todos",
39832
- "cursor/task",
39833
- "cursor/generate_image"
39834
- ]);
39866
+ var CURSOR_NOOP_METHODS = /* @__PURE__ */ new Set(["cursor/update_todos", "cursor/generate_image"]);
39835
39867
  function handleCursorIncomingCursorMethods(method, id, msg, deps) {
39836
39868
  if (CURSOR_BRIDGE_METHODS.has(method)) {
39837
39869
  const params = msg.params ?? {};
@@ -39843,6 +39875,10 @@ function handleCursorIncomingCursorMethods(method, id, msg, deps) {
39843
39875
  });
39844
39876
  return true;
39845
39877
  }
39878
+ if (method === "cursor/task") {
39879
+ handleCursorIncomingCursorTask(id, msg, deps);
39880
+ return true;
39881
+ }
39846
39882
  if (CURSOR_NOOP_METHODS.has(method)) {
39847
39883
  deps.respond(id, {});
39848
39884
  return true;
@@ -40002,6 +40038,7 @@ function createCursorAcpIncomingLineHandler(deps) {
40002
40038
  respond: deps.respond,
40003
40039
  respondJsonRpcError: deps.respondJsonRpcError,
40004
40040
  onRequest: deps.onRequest,
40041
+ onSessionUpdate: deps.onSessionUpdate,
40005
40042
  pendingRequests: deps.pendingRequests
40006
40043
  };
40007
40044
  return {