@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 +43 -6
- package/dist/cli.js.map +3 -3
- package/dist/index.js +43 -6
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32858,6 +32858,11 @@ var INSTALLABLE_BRIDGE_AGENTS = [
|
|
|
32858
32858
|
{ value: "opencode", label: "OpenCode agent", tokenLabel: "Provider API key", tokenEnvVar: "OPENCODE_API_KEY" }
|
|
32859
32859
|
];
|
|
32860
32860
|
|
|
32861
|
+
// ../types/src/agent-subscriptions.ts
|
|
32862
|
+
var AGENT_SUBSCRIPTION_TYPES = INSTALLABLE_BRIDGE_AGENTS.map(
|
|
32863
|
+
(a) => a.value
|
|
32864
|
+
);
|
|
32865
|
+
|
|
32861
32866
|
// src/agents/acp/safe-fs-path.ts
|
|
32862
32867
|
import * as path2 from "node:path";
|
|
32863
32868
|
function resolveSafePathUnderCwd(cwd, filePath) {
|
|
@@ -35190,7 +35195,7 @@ function createPendingAuthOnMessage(params) {
|
|
|
35190
35195
|
}
|
|
35191
35196
|
|
|
35192
35197
|
// src/cli-version.ts
|
|
35193
|
-
var CLI_VERSION = "0.1.
|
|
35198
|
+
var CLI_VERSION = "0.1.85".length > 0 ? "0.1.85" : "0.0.0-dev";
|
|
35194
35199
|
|
|
35195
35200
|
// src/auth/pending/pending-auth-on-open.ts
|
|
35196
35201
|
function createPendingAuthOnOpen(params) {
|
|
@@ -36844,13 +36849,40 @@ function createCursorAcpHandle(options) {
|
|
|
36844
36849
|
// src/agents/acp/clients/cursor/cursor-acp-init.ts
|
|
36845
36850
|
import * as readline from "node:readline";
|
|
36846
36851
|
|
|
36852
|
+
// src/agents/acp/clients/cursor/cursor-incoming-cursor-task.ts
|
|
36853
|
+
function buildCursorTaskToolCallUpdate(params) {
|
|
36854
|
+
const toolCallId = params.toolCallId ?? params.tool_call_id;
|
|
36855
|
+
if (typeof toolCallId !== "string" || !toolCallId.trim()) return null;
|
|
36856
|
+
const description = typeof params.description === "string" ? params.description.trim() : "";
|
|
36857
|
+
const prompt = typeof params.prompt === "string" ? params.prompt : void 0;
|
|
36858
|
+
const subagentType = params.subagentType ?? params.subagent_type;
|
|
36859
|
+
const model = typeof params.model === "string" ? params.model : void 0;
|
|
36860
|
+
const agentId = typeof params.agentId === "string" ? params.agentId : typeof params.agent_id === "string" ? params.agent_id : void 0;
|
|
36861
|
+
const durationMs = typeof params.durationMs === "number" ? params.durationMs : typeof params.duration_ms === "number" ? params.duration_ms : void 0;
|
|
36862
|
+
return {
|
|
36863
|
+
sessionUpdate: "tool_call_update",
|
|
36864
|
+
toolCallId,
|
|
36865
|
+
...description ? { title: description } : {},
|
|
36866
|
+
cursorTask: {
|
|
36867
|
+
...description ? { description } : {},
|
|
36868
|
+
...prompt != null ? { prompt } : {},
|
|
36869
|
+
...subagentType != null ? { subagentType } : {},
|
|
36870
|
+
...model != null ? { model } : {},
|
|
36871
|
+
...agentId != null ? { agentId } : {},
|
|
36872
|
+
...durationMs != null ? { durationMs } : {}
|
|
36873
|
+
}
|
|
36874
|
+
};
|
|
36875
|
+
}
|
|
36876
|
+
function handleCursorIncomingCursorTask(id, msg, deps) {
|
|
36877
|
+
const params = msg.params ?? {};
|
|
36878
|
+
deps.respond(id, {});
|
|
36879
|
+
const update = buildCursorTaskToolCallUpdate(params);
|
|
36880
|
+
if (update) deps.onSessionUpdate?.(update);
|
|
36881
|
+
}
|
|
36882
|
+
|
|
36847
36883
|
// src/agents/acp/clients/cursor/cursor-incoming-cursor-methods.ts
|
|
36848
36884
|
var CURSOR_BRIDGE_METHODS = /* @__PURE__ */ new Set(["cursor/create_plan", "cursor/ask_question"]);
|
|
36849
|
-
var CURSOR_NOOP_METHODS = /* @__PURE__ */ new Set([
|
|
36850
|
-
"cursor/update_todos",
|
|
36851
|
-
"cursor/task",
|
|
36852
|
-
"cursor/generate_image"
|
|
36853
|
-
]);
|
|
36885
|
+
var CURSOR_NOOP_METHODS = /* @__PURE__ */ new Set(["cursor/update_todos", "cursor/generate_image"]);
|
|
36854
36886
|
function handleCursorIncomingCursorMethods(method, id, msg, deps) {
|
|
36855
36887
|
if (CURSOR_BRIDGE_METHODS.has(method)) {
|
|
36856
36888
|
const params = msg.params ?? {};
|
|
@@ -36862,6 +36894,10 @@ function handleCursorIncomingCursorMethods(method, id, msg, deps) {
|
|
|
36862
36894
|
});
|
|
36863
36895
|
return true;
|
|
36864
36896
|
}
|
|
36897
|
+
if (method === "cursor/task") {
|
|
36898
|
+
handleCursorIncomingCursorTask(id, msg, deps);
|
|
36899
|
+
return true;
|
|
36900
|
+
}
|
|
36865
36901
|
if (CURSOR_NOOP_METHODS.has(method)) {
|
|
36866
36902
|
deps.respond(id, {});
|
|
36867
36903
|
return true;
|
|
@@ -37021,6 +37057,7 @@ function createCursorAcpIncomingLineHandler(deps) {
|
|
|
37021
37057
|
respond: deps.respond,
|
|
37022
37058
|
respondJsonRpcError: deps.respondJsonRpcError,
|
|
37023
37059
|
onRequest: deps.onRequest,
|
|
37060
|
+
onSessionUpdate: deps.onSessionUpdate,
|
|
37024
37061
|
pendingRequests: deps.pendingRequests
|
|
37025
37062
|
};
|
|
37026
37063
|
return {
|