@botiverse/oar 0.15.1 → 0.16.0
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/README.md +4 -3
- package/dist/observe/session-view-events.d.ts.map +1 -1
- package/dist/observe/session-view-events.js +2 -0
- package/dist/observe/session-view-events.js.map +1 -1
- package/dist/observe/session-view-fold.js +1 -1
- package/dist/observe/session-view-fold.js.map +1 -1
- package/dist/observe/session-view.d.ts +12 -0
- package/dist/observe/session-view.d.ts.map +1 -1
- package/dist/observe/session-view.js.map +1 -1
- package/dist/observe/tool-activity.d.ts +9 -2
- package/dist/observe/tool-activity.d.ts.map +1 -1
- package/dist/observe/tool-activity.js +34 -9
- package/dist/observe/tool-activity.js.map +1 -1
- package/dist/observe/tool-groups.d.ts.map +1 -1
- package/dist/observe/tool-groups.js +1 -0
- package/dist/observe/tool-groups.js.map +1 -1
- package/dist/runtimes/cursor/index.d.ts +6 -3
- package/dist/runtimes/cursor/index.d.ts.map +1 -1
- package/dist/runtimes/cursor/index.js +6 -3
- package/dist/runtimes/cursor/index.js.map +1 -1
- package/dist/runtimes/cursor/installation.d.ts +7 -6
- package/dist/runtimes/cursor/installation.d.ts.map +1 -1
- package/dist/runtimes/cursor/installation.js +35 -13
- package/dist/runtimes/cursor/installation.js.map +1 -1
- package/dist/runtimes/cursor/list-models.d.ts +7 -8
- package/dist/runtimes/cursor/list-models.d.ts.map +1 -1
- package/dist/runtimes/cursor/list-models.js +50 -82
- package/dist/runtimes/cursor/list-models.js.map +1 -1
- package/dist/runtimes/cursor/model.d.ts +25 -0
- package/dist/runtimes/cursor/model.d.ts.map +1 -0
- package/dist/runtimes/cursor/model.js +98 -0
- package/dist/runtimes/cursor/model.js.map +1 -0
- package/dist/runtimes/cursor/projection.d.ts +40 -0
- package/dist/runtimes/cursor/projection.d.ts.map +1 -0
- package/dist/runtimes/cursor/projection.js +205 -0
- package/dist/runtimes/cursor/projection.js.map +1 -0
- package/dist/runtimes/cursor/run.d.ts +33 -0
- package/dist/runtimes/cursor/run.d.ts.map +1 -0
- package/dist/runtimes/cursor/run.js +68 -0
- package/dist/runtimes/cursor/run.js.map +1 -0
- package/dist/runtimes/cursor/sdk.d.ts +64 -0
- package/dist/runtimes/cursor/sdk.d.ts.map +1 -0
- package/dist/runtimes/cursor/sdk.js +50 -0
- package/dist/runtimes/cursor/sdk.js.map +1 -0
- package/dist/runtimes/cursor/session.d.ts +4 -37
- package/dist/runtimes/cursor/session.d.ts.map +1 -1
- package/dist/runtimes/cursor/session.js +265 -71
- package/dist/runtimes/cursor/session.js.map +1 -1
- package/dist/shared/acp/client-app.d.ts +0 -2
- package/dist/shared/acp/client-app.d.ts.map +1 -1
- package/dist/shared/acp/client-app.js +1 -8
- package/dist/shared/acp/client-app.js.map +1 -1
- package/dist/shared/acp/effort.d.ts +1 -1
- package/dist/shared/acp/effort.js +1 -1
- package/dist/shared/acp/model.d.ts +5 -8
- package/dist/shared/acp/model.d.ts.map +1 -1
- package/dist/shared/acp/model.js +6 -14
- package/dist/shared/acp/model.js.map +1 -1
- package/dist/shared/acp/process.d.ts +0 -2
- package/dist/shared/acp/process.d.ts.map +1 -1
- package/dist/shared/acp/process.js +2 -7
- package/dist/shared/acp/process.js.map +1 -1
- package/dist/shared/acp/profile.d.ts +2 -17
- package/dist/shared/acp/profile.d.ts.map +1 -1
- package/dist/shared/acp/profile.js +1 -5
- package/dist/shared/acp/profile.js.map +1 -1
- package/dist/shared/acp/records.d.ts +1 -3
- package/dist/shared/acp/records.d.ts.map +1 -1
- package/dist/shared/acp/records.js +6 -14
- package/dist/shared/acp/records.js.map +1 -1
- package/dist/shared/acp/session.d.ts.map +1 -1
- package/dist/shared/acp/session.js +1 -6
- package/dist/shared/acp/session.js.map +1 -1
- package/dist/shared/failure-class.js +1 -1
- package/dist/shared/failure-class.js.map +1 -1
- package/dist/shared/update.d.ts +1 -1
- package/dist/shared/update.d.ts.map +1 -1
- package/dist/shared/update.js +3 -4
- package/dist/shared/update.js.map +1 -1
- package/package.json +6 -5
- package/dist/runtimes/cursor/update.d.ts +0 -19
- package/dist/runtimes/cursor/update.d.ts.map +0 -1
- package/dist/runtimes/cursor/update.js +0 -88
- package/dist/runtimes/cursor/update.js.map +0 -1
- package/dist/shared/acp/vendor-updates.d.ts +0 -7
- package/dist/shared/acp/vendor-updates.d.ts.map +0 -1
- package/dist/shared/acp/vendor-updates.js +0 -46
- package/dist/shared/acp/vendor-updates.js.map +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { cursorRunFailedFrame, cursorRunResultFrame } from "./projection.js";
|
|
2
|
+
export function newLaunch() {
|
|
3
|
+
const { promise, resolve } = Promise.withResolvers();
|
|
4
|
+
return { state: "sending", abortRequested: false, current: null, reason: "", decided: promise, decide: resolve };
|
|
5
|
+
}
|
|
6
|
+
export function giveUp(launch, reason) {
|
|
7
|
+
if (launch.state === "sending") {
|
|
8
|
+
launch.state = "given_up";
|
|
9
|
+
launch.reason = reason;
|
|
10
|
+
launch.decide();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A run the SDK returned after its launch was given up: it did start, so it
|
|
15
|
+
* is stopped, and its end still enters the stream.
|
|
16
|
+
*/
|
|
17
|
+
export function stopOrphan(run, record) {
|
|
18
|
+
void (async () => {
|
|
19
|
+
try {
|
|
20
|
+
await run.cancel();
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
// It may have ended on its own.
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
record(cursorRunResultFrame(await run.wait()));
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
record(cursorRunFailedFrame(error instanceof Error ? error.message : String(error)));
|
|
30
|
+
}
|
|
31
|
+
})();
|
|
32
|
+
}
|
|
33
|
+
export async function steerRun(current, input) {
|
|
34
|
+
const steer = current.run.steer?.bind(current.run);
|
|
35
|
+
if (steer === undefined) {
|
|
36
|
+
return { kind: "rejected", code: "unsupported", reason: "not_steerable: this cursor run takes no mid-run input" };
|
|
37
|
+
}
|
|
38
|
+
// `run.steer` settles once the agent took the text ("complete_delivered")
|
|
39
|
+
// or handed it back ("revert_to_followup"); a run that ends first must
|
|
40
|
+
// not leave the request unanswered, and a steer it outran must not reject
|
|
41
|
+
// unobserved.
|
|
42
|
+
const delivery = (async () => {
|
|
43
|
+
try {
|
|
44
|
+
return await steer(input);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
return error instanceof Error ? error : new Error(String(error));
|
|
48
|
+
}
|
|
49
|
+
})();
|
|
50
|
+
const runEnded = (async () => {
|
|
51
|
+
await current.ended;
|
|
52
|
+
return null;
|
|
53
|
+
})();
|
|
54
|
+
const ack = await Promise.race([delivery, runEnded]);
|
|
55
|
+
if (ack instanceof Error) {
|
|
56
|
+
throw ack;
|
|
57
|
+
}
|
|
58
|
+
if (ack === "complete_delivered") {
|
|
59
|
+
return { kind: "accepted", native: { ack } };
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
kind: "rejected",
|
|
63
|
+
code: "runtime_refused",
|
|
64
|
+
reason: ack === null ? "not_steerable: the run ended before cursor took the input" : `not_steerable: cursor handed the input back (${ack})`,
|
|
65
|
+
...(ack === null ? {} : { native: { ack } }),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/runtimes/cursor/run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAoB,MAAM,iBAAiB,CAAC;AA0B/F,MAAM,UAAU,SAAS;IACvB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,aAAa,EAAQ,CAAC;IAC3D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,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
+
export type { ModelListItem, ModelSelection, RunResult, SteerAckOutcome } from "@cursor/sdk";
|
|
3
|
+
export type CursorDeltaListener = (args: {
|
|
4
|
+
readonly update: unknown;
|
|
5
|
+
}) => void;
|
|
6
|
+
/** One send: a run of the agent loop until the agent ends it. */
|
|
7
|
+
export interface CursorRun {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
/** Settles with the run's status once it ends (finished, error or cancelled). */
|
|
10
|
+
wait(): Promise<RunResult>;
|
|
11
|
+
cancel(): Promise<void>;
|
|
12
|
+
/** Present on runs that take mid-run input; settles once the agent took the text or handed it back. */
|
|
13
|
+
steer?(text: string): Promise<SteerAckOutcome>;
|
|
14
|
+
}
|
|
15
|
+
export interface CursorAgent {
|
|
16
|
+
readonly agentId: string;
|
|
17
|
+
readonly model: ModelSelection | undefined;
|
|
18
|
+
/** `local.force` takes the agent over from a run its store still holds as active. */
|
|
19
|
+
send(message: string | SDKUserMessage, options: {
|
|
20
|
+
readonly onDelta: CursorDeltaListener;
|
|
21
|
+
readonly local?: {
|
|
22
|
+
readonly force: boolean;
|
|
23
|
+
};
|
|
24
|
+
}): Promise<CursorRun>;
|
|
25
|
+
close(): void;
|
|
26
|
+
}
|
|
27
|
+
export interface CursorAgentOptions {
|
|
28
|
+
readonly model: ModelSelection;
|
|
29
|
+
readonly local: {
|
|
30
|
+
readonly cwd: string;
|
|
31
|
+
readonly sandboxOptions: {
|
|
32
|
+
readonly enabled: boolean;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface CursorSdk {
|
|
37
|
+
readonly Agent: {
|
|
38
|
+
create(options: CursorAgentOptions): Promise<CursorAgent>;
|
|
39
|
+
resume(agentId: string, options: CursorAgentOptions): Promise<CursorAgent>;
|
|
40
|
+
listRuns(agentId: string, options: {
|
|
41
|
+
readonly runtime: "local";
|
|
42
|
+
readonly cwd: string;
|
|
43
|
+
readonly cursor?: string;
|
|
44
|
+
}): Promise<{
|
|
45
|
+
readonly items: readonly {
|
|
46
|
+
readonly model?: ModelSelection;
|
|
47
|
+
readonly createdAt?: number;
|
|
48
|
+
}[];
|
|
49
|
+
readonly nextCursor?: string;
|
|
50
|
+
}>;
|
|
51
|
+
};
|
|
52
|
+
readonly Cursor: {
|
|
53
|
+
readonly models: {
|
|
54
|
+
list(): Promise<readonly ModelListItem[]>;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The SDK is loaded on first use, not with OAR: it is a large bundle with a
|
|
60
|
+
* native companion package per platform, and a host that never opens cursor
|
|
61
|
+
* should not pay for it.
|
|
62
|
+
*/
|
|
63
|
+
export declare function loadCursorSdk(): Promise<CursorSdk>;
|
|
64
|
+
//# sourceMappingURL=sdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/runtimes/cursor/sdk.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7G,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAS7F,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAE,KAAK,IAAI,CAAC;AAE/E,iEAAiE;AACjE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,IAAI,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAC3B,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,uGAAuG;IACvG,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ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AC;YAC5F,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;SAC9B,CAAC,CAAC;KACJ,CAAC;IACF,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,MAAM,EAAE;YAAE,IAAI,IAAI,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC,CAAA;SAAE,CAAC;KAChE,CAAC;CACH;AAyCD;;;;GAIG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,SAAS,CAAC,CAIxD"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
let loading = null;
|
|
4
|
+
/**
|
|
5
|
+
* The SDK's native companion (`@cursor/sdk-<platform>-<arch>`: ripgrep and
|
|
6
|
+
* the tree-sitter shell parser) is found by walking up from the host's entry
|
|
7
|
+
* script for `node_modules/<package>`, which misses it in any layout that
|
|
8
|
+
* does not hoist it (pnpm's, a bundled host): the agent then warns "tree-sitter
|
|
9
|
+
* natives are unavailable" and searches without its own ripgrep. Resolved
|
|
10
|
+
* from the SDK itself, the package is found wherever it was installed, and
|
|
11
|
+
* the SDK's own variables point at it, unless the host set them.
|
|
12
|
+
*/
|
|
13
|
+
function nativePackageRoot() {
|
|
14
|
+
try {
|
|
15
|
+
const fromSdk = createRequire(import.meta.resolve("@cursor/sdk"));
|
|
16
|
+
return path.dirname(fromSdk.resolve(`@cursor/sdk-${process.platform}-${process.arch}/package.json`));
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function pointSdkAtNativePackage() {
|
|
23
|
+
const root = nativePackageRoot();
|
|
24
|
+
if (root === null) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
process.env.CURSOR_TREE_SITTER_VENDOR_DIR ??= path.join(root, "vendor");
|
|
28
|
+
process.env.CURSOR_RIPGREP_PATH ??= path.join(root, "bin", process.platform === "win32" ? "rg.exe" : "rg");
|
|
29
|
+
}
|
|
30
|
+
async function importSdk() {
|
|
31
|
+
try {
|
|
32
|
+
pointSdkAtNativePackage();
|
|
33
|
+
return await import("@cursor/sdk");
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
loading = null;
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The SDK is loaded on first use, not with OAR: it is a large bundle with a
|
|
42
|
+
* native companion package per platform, and a host that never opens cursor
|
|
43
|
+
* should not pay for it.
|
|
44
|
+
*/
|
|
45
|
+
export async function loadCursorSdk() {
|
|
46
|
+
loading ??= importSdk();
|
|
47
|
+
const sdk = await loading;
|
|
48
|
+
return sdk;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=sdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../src/runtimes/cursor/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAmD7B,IAAI,OAAO,GAA8B,IAAI,CAAC;AAE9C;;;;;;;;GAQG;AACH,SAAS,iBAAiB;IACxB,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC;IACvG,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,uBAAuB;IAC9B,MAAM,IAAI,GAAG,iBAAiB,EAAE,CAAC;IACjC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO;IACT,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,6BAA6B,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxE,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC7G,CAAC;AAED,KAAK,UAAU,SAAS;IACtB,IAAI,CAAC;QACH,uBAAuB,EAAE,CAAC;QAC1B,OAAO,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IACrC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,GAAG,IAAI,CAAC;QACf,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,OAAO,KAAK,SAAS,EAAE,CAAC;IACxB,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC;IAC1B,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,38 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type
|
|
3
|
-
export declare function
|
|
4
|
-
|
|
5
|
-
* Without `parameterizedModelPicker` cursor-agent 2026.09.28 answers in its
|
|
6
|
-
* "variants" picker mode: every model and effort pair is one flat `model`
|
|
7
|
-
* value and no `thought_level` option exists. With it, `model` lists plain
|
|
8
|
-
* model names and each model parameter is its own select option, the
|
|
9
|
-
* reasoning one under category `thought_level`. Without `subagents` a child
|
|
10
|
-
* is visible only as the parent's `task` tool call.
|
|
11
|
-
*/
|
|
12
|
-
export declare function cursorClientCapabilitiesMeta(): JsonRecord;
|
|
13
|
-
/**
|
|
14
|
-
* With the `subagents` opt-in cursor-agent 2026.09.28 announces each child on
|
|
15
|
-
* the parent's own `session/update` (`subagent_spawned`, then
|
|
16
|
-
* `subagent_state_update` with completed, failed, cancelled or disconnected),
|
|
17
|
-
* and the child's standard updates arrive under its own session id.
|
|
18
|
-
*/
|
|
19
|
-
export declare const CURSOR_VENDOR_SESSION_UPDATES: readonly string[];
|
|
20
|
-
/**
|
|
21
|
-
* `--force` (alias `--yolo`) is a root option, so it precedes the hidden
|
|
22
|
-
* `acp` subcommand. It runs commands without asking; a team whose admin
|
|
23
|
-
* controls auto run can still switch it off, and then the agent asks
|
|
24
|
-
* through `session/request_permission`.
|
|
25
|
-
*/
|
|
26
|
-
export declare const cursorAcpArgs: readonly string[];
|
|
27
|
-
/**
|
|
28
|
-
* Requests cursor-agent 2026.09.28 sends its client beyond standard ACP. oar
|
|
29
|
-
* implements none: each is recorded and refused with `-32601`, as an
|
|
30
|
-
* unregistered method would be. On that refusal `cursor/ask_question` asks
|
|
31
|
-
* one `session/request_permission` per single select question (oar picks its
|
|
32
|
-
* first option), `cursor/create_plan` writes the plan to a local file, and
|
|
33
|
-
* the rest were notices the agent does not wait on.
|
|
34
|
-
*/
|
|
35
|
-
export declare const CURSOR_EXTENSION_REQUESTS: readonly string[];
|
|
36
|
-
export declare const cursorAcpProfile: AcpSessionProfile;
|
|
37
|
-
export declare const cursorSession: import("../../contracts/session.js").StartSession;
|
|
1
|
+
import type { StartSession } from "../../contracts/session.js";
|
|
2
|
+
import { type CursorSdk } from "./sdk.js";
|
|
3
|
+
export declare function cursorSessionWith(load: () => Promise<CursorSdk>): StartSession;
|
|
4
|
+
export declare const cursorSession: StartSession;
|
|
38
5
|
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/runtimes/cursor/session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/runtimes/cursor/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAMV,YAAY,EACb,MAAM,4BAA4B,CAAC;AAepC,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAuBnG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,GAAG,YAAY,CAuP9E;AAED,eAAO,MAAM,aAAa,EAAE,YAA+C,CAAC"}
|
|
@@ -1,74 +1,268 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return { parameterizedModelPicker: true, subagents: true };
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* With the `subagents` opt-in cursor-agent 2026.09.28 announces each child on
|
|
24
|
-
* the parent's own `session/update` (`subagent_spawned`, then
|
|
25
|
-
* `subagent_state_update` with completed, failed, cancelled or disconnected),
|
|
26
|
-
* and the child's standard updates arrive under its own session id.
|
|
1
|
+
import { withInputImages } from "../../shared/input-images.js";
|
|
2
|
+
import { sealSession } from "../../shared/seal-session.js";
|
|
3
|
+
import { createSessionKernel } from "../../shared/session-kernel.js";
|
|
4
|
+
import { cursorModelSelection, validateCursorOptions } from "./model.js";
|
|
5
|
+
import { cursorOpenedFrame, cursorRunFailedFrame, cursorRunResultFrame, foldCursorDelta, initialCursorProjection, } from "./projection.js";
|
|
6
|
+
import { giveUp, newLaunch, steerRun, stopOrphan } from "./run.js";
|
|
7
|
+
import { loadCursorSdk } from "./sdk.js";
|
|
8
|
+
/*
|
|
9
|
+
* Cursor through `@cursor/sdk` (1.0.35), in process (settled 2026-10-03,
|
|
10
|
+
* replacing cursor-agent ACP): a session is one local SDK agent, its id the
|
|
11
|
+
* SDK's `agent-<uuid>`; a turn is one `send`, from the run it returns until
|
|
12
|
+
* `run.wait()` answers; steer is `run.steer`; abort is `run.cancel`; the
|
|
13
|
+
* agent takes one run at a time (a second `send` is refused "already has
|
|
14
|
+
* active run"), so queued input is held here and sent when the run ends.
|
|
15
|
+
* The agent's store keeps its last run as active until that run's own
|
|
16
|
+
* agent object ends it, so after a process that died mid-run, or a session
|
|
17
|
+
* closed before its first prompt, a resumed agent refuses every send the
|
|
18
|
+
* same way (probed 2026-10-03); the first send after a resume is `force`d,
|
|
19
|
+
* which takes the agent over. Arbitrating between processes is the host's.
|
|
27
20
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
const message = (error) => (error instanceof Error ? error.message : String(error));
|
|
22
|
+
/** How long dispose waits for a cancelled run to report its own end before releasing the agent. */
|
|
23
|
+
const DISPOSE_SETTLE_MS = 5000;
|
|
24
|
+
/** How long a `send` may take to return its run (a cold start took about 4 s in the probes). */
|
|
25
|
+
const SEND_TIMEOUT_MS = 60_000;
|
|
26
|
+
export function cursorSessionWith(load) {
|
|
27
|
+
return async (installation, options) => {
|
|
28
|
+
if (installation.via !== "bundled") {
|
|
29
|
+
throw new Error("The cursor session adapter needs the bundled @cursor/sdk installation");
|
|
30
|
+
}
|
|
31
|
+
validateCursorOptions(options);
|
|
32
|
+
const sdk = await load();
|
|
33
|
+
// No sandbox, as every OAR session runs by default (contracts/session.ts):
|
|
34
|
+
// without this a `~/.cursor/sandbox.json` would turn one on.
|
|
35
|
+
const agentOptions = {
|
|
36
|
+
model: await cursorModelSelection(sdk, options),
|
|
37
|
+
local: { cwd: options.cwd, sandboxOptions: { enabled: false } },
|
|
38
|
+
};
|
|
39
|
+
const agent = options.resume === undefined
|
|
40
|
+
? await sdk.Agent.create(agentOptions)
|
|
41
|
+
: await sdk.Agent.resume(options.resume, agentOptions);
|
|
42
|
+
const kernel = createSessionKernel(agent.agentId);
|
|
43
|
+
let projection = initialCursorProjection;
|
|
44
|
+
// A turn is running from an accepted prompt (or a drained queue input)
|
|
45
|
+
// until its run's end is recorded. Held in an object so closures always
|
|
46
|
+
// read the live value.
|
|
47
|
+
const gate = { running: false };
|
|
48
|
+
// The send on its way to a run, and the run in flight.
|
|
49
|
+
let launching = null;
|
|
50
|
+
let active = null;
|
|
51
|
+
let forceNext = options.resume !== undefined;
|
|
52
|
+
let disposeRequest = null;
|
|
53
|
+
// Adapter-held queue, drained one input per run end.
|
|
54
|
+
const held = [];
|
|
55
|
+
const record = (frame) => {
|
|
56
|
+
kernel.frame({ type: frame.type, native: frame.native, events: frame.events }, frame.agentPath.length === 0 ? undefined : { agentPath: frame.agentPath });
|
|
57
|
+
};
|
|
58
|
+
const onDelta = ({ update }) => {
|
|
59
|
+
const folded = foldCursorDelta(projection, update);
|
|
60
|
+
projection = folded.state;
|
|
61
|
+
record(folded.frame);
|
|
62
|
+
};
|
|
63
|
+
record(cursorOpenedFrame(agent.agentId, agent.model));
|
|
64
|
+
const finish = (current, frame) => {
|
|
65
|
+
record(frame);
|
|
66
|
+
if (active === current) {
|
|
67
|
+
active = null;
|
|
68
|
+
}
|
|
69
|
+
gate.running = false;
|
|
70
|
+
drainHeld();
|
|
71
|
+
};
|
|
72
|
+
const adopt = (run) => {
|
|
73
|
+
const { promise: ended, resolve: onEnded } = Promise.withResolvers();
|
|
74
|
+
const current = { run, ended };
|
|
75
|
+
active = current;
|
|
76
|
+
void (async () => {
|
|
77
|
+
try {
|
|
78
|
+
finish(current, cursorRunResultFrame(await run.wait()));
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
finish(current, cursorRunFailedFrame(message(error)));
|
|
82
|
+
}
|
|
83
|
+
finally {
|
|
84
|
+
onEnded();
|
|
85
|
+
}
|
|
86
|
+
})();
|
|
87
|
+
return current;
|
|
88
|
+
};
|
|
89
|
+
const launch = (input, images) => {
|
|
90
|
+
const attempt = newLaunch();
|
|
91
|
+
const content = images.length === 0
|
|
92
|
+
? input
|
|
93
|
+
: { text: input, images: images.map((image) => ({ data: image.data, mimeType: image.mediaType })) };
|
|
94
|
+
const force = forceNext;
|
|
95
|
+
void (async () => {
|
|
96
|
+
try {
|
|
97
|
+
const run = await agent.send(content, { onDelta, ...(force ? { local: { force: true } } : {}) });
|
|
98
|
+
forceNext = false;
|
|
99
|
+
if (attempt.state === "given_up") {
|
|
100
|
+
stopOrphan(run, record);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
attempt.state = "sent";
|
|
104
|
+
attempt.current = adopt(run);
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
if (attempt.state === "sending") {
|
|
108
|
+
attempt.state = "failed";
|
|
109
|
+
attempt.reason = message(error);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
finally {
|
|
113
|
+
attempt.decide();
|
|
114
|
+
}
|
|
115
|
+
})();
|
|
116
|
+
return attempt;
|
|
117
|
+
};
|
|
118
|
+
const start = async (input, images) => {
|
|
119
|
+
gate.running = true;
|
|
120
|
+
const attempt = launch(input, images);
|
|
121
|
+
launching = attempt;
|
|
122
|
+
const deadline = setTimeout(() => {
|
|
123
|
+
giveUp(attempt, `cursor did not start the run within ${String(SEND_TIMEOUT_MS / 1000)} s`);
|
|
124
|
+
}, SEND_TIMEOUT_MS);
|
|
125
|
+
deadline.unref();
|
|
126
|
+
await attempt.decided;
|
|
127
|
+
clearTimeout(deadline);
|
|
128
|
+
if (launching === attempt) {
|
|
129
|
+
launching = null;
|
|
130
|
+
}
|
|
131
|
+
const { current } = attempt;
|
|
132
|
+
if (current === null) {
|
|
133
|
+
gate.running = false;
|
|
134
|
+
return { kind: "rejected", code: "runtime_refused", reason: attempt.reason };
|
|
135
|
+
}
|
|
136
|
+
if (attempt.abortRequested) {
|
|
137
|
+
// The abort was accepted before the run existed; its outcome is the
|
|
138
|
+
// run's own end, so a failed cancel leaves the run to finish.
|
|
139
|
+
try {
|
|
140
|
+
await current.run.cancel();
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
// The run may have ended on its own meanwhile.
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return { kind: "accepted", native: { runId: current.run.id } };
|
|
147
|
+
};
|
|
148
|
+
function drainHeld() {
|
|
149
|
+
if (disposeRequest !== null || gate.running) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const next = held.shift();
|
|
153
|
+
if (next === undefined) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
void (async () => {
|
|
157
|
+
const decided = await start(next.input, next.images);
|
|
158
|
+
if (decided.kind === "rejected") {
|
|
159
|
+
// The queue took the input over; the SDK refusing it is not silent.
|
|
160
|
+
kernel.frame({ type: "cursor/send_rejected", native: { message: decided.reason, input: next.input }, events: [] });
|
|
161
|
+
drainHeld();
|
|
162
|
+
}
|
|
163
|
+
})();
|
|
164
|
+
}
|
|
165
|
+
/** The run in flight, waiting out a `send` that has not returned it yet. */
|
|
166
|
+
const inFlight = async () => {
|
|
167
|
+
const pending = launching;
|
|
168
|
+
if (active !== null || pending === null) {
|
|
169
|
+
return active;
|
|
170
|
+
}
|
|
171
|
+
await pending.decided;
|
|
172
|
+
return pending.current;
|
|
173
|
+
};
|
|
174
|
+
const capabilities = { steer: true, queue: { durable: false }, attribution: "attributed", images: true };
|
|
175
|
+
const session = sealSession({
|
|
176
|
+
id: kernel.sessionId,
|
|
177
|
+
capabilities,
|
|
178
|
+
prompt: async (input, inputOptions) => {
|
|
179
|
+
const result = await kernel.control({ kind: "prompt", input, ...inputOptions }, async () => {
|
|
180
|
+
if (gate.running) {
|
|
181
|
+
return { kind: "rejected", code: "busy", reason: "busy" };
|
|
182
|
+
}
|
|
183
|
+
const decided = await withInputImages(capabilities, inputOptions?.images, async (images) => {
|
|
184
|
+
const started = await start(input, images);
|
|
185
|
+
return started;
|
|
186
|
+
});
|
|
187
|
+
return decided;
|
|
188
|
+
});
|
|
189
|
+
return result;
|
|
190
|
+
},
|
|
191
|
+
steer: async (input, inputOptions) => {
|
|
192
|
+
const result = await kernel.control({ kind: "steer", input, ...inputOptions }, async () => {
|
|
193
|
+
const current = gate.running ? await inFlight() : null;
|
|
194
|
+
if (current === null) {
|
|
195
|
+
return { kind: "rejected", code: "no_active_turn", reason: "not_steerable: no active turn" };
|
|
196
|
+
}
|
|
197
|
+
if ((inputOptions?.images ?? []).length > 0) {
|
|
198
|
+
return { kind: "rejected", code: "unsupported", reason: "not_steerable: cursor steers with text only" };
|
|
199
|
+
}
|
|
200
|
+
const decided = await steerRun(current, input);
|
|
201
|
+
return decided;
|
|
202
|
+
});
|
|
203
|
+
return result;
|
|
204
|
+
},
|
|
205
|
+
queue: async (input, inputOptions) => {
|
|
206
|
+
const result = await kernel.control({ kind: "queue", input, ...inputOptions }, () => withInputImages(capabilities, inputOptions?.images, (images) => {
|
|
207
|
+
held.push({ input, images });
|
|
208
|
+
drainHeld();
|
|
209
|
+
return { kind: "accepted" };
|
|
210
|
+
}));
|
|
211
|
+
return result;
|
|
212
|
+
},
|
|
213
|
+
abort: async () => {
|
|
214
|
+
const result = await kernel.control({ kind: "abort" }, async () => {
|
|
215
|
+
if (!gate.running) {
|
|
216
|
+
return { kind: "rejected", code: "no_active_turn", reason: "no active turn" };
|
|
217
|
+
}
|
|
218
|
+
if (active === null) {
|
|
219
|
+
// The run does not exist yet: cancelled as soon as `send` returns it.
|
|
220
|
+
if (launching !== null) {
|
|
221
|
+
launching.abortRequested = true;
|
|
222
|
+
}
|
|
223
|
+
return { kind: "accepted" };
|
|
224
|
+
}
|
|
225
|
+
// Accepted means taken over; the outcome is the run's own `cancelled`.
|
|
226
|
+
await active.run.cancel();
|
|
227
|
+
return { kind: "accepted" };
|
|
228
|
+
});
|
|
229
|
+
return result;
|
|
230
|
+
},
|
|
231
|
+
rawEvents: (observer, cursor) => kernel.rawEvents(observer, cursor),
|
|
232
|
+
records: () => kernel.records(),
|
|
233
|
+
graph: () => kernel.graph(),
|
|
234
|
+
dispose: async () => {
|
|
235
|
+
if (disposeRequest !== null) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
held.splice(0);
|
|
239
|
+
const request = kernel.request("toRuntime", { kind: "dispose" });
|
|
240
|
+
disposeRequest = request;
|
|
241
|
+
if (launching !== null) {
|
|
242
|
+
// A send still on its way: its run, if it comes, is stopped, not adopted.
|
|
243
|
+
giveUp(launching, "the session was disposed before cursor started the run");
|
|
244
|
+
}
|
|
245
|
+
const current = active;
|
|
246
|
+
if (current !== null) {
|
|
247
|
+
// The run's own `cancelled` ends the turn in the stream.
|
|
248
|
+
try {
|
|
249
|
+
await current.run.cancel();
|
|
250
|
+
}
|
|
251
|
+
catch {
|
|
252
|
+
// The run may have ended on its own meanwhile.
|
|
253
|
+
}
|
|
254
|
+
await Promise.race([current.ended, new Promise((resolve) => {
|
|
255
|
+
setTimeout(resolve, DISPOSE_SETTLE_MS).unref();
|
|
256
|
+
})]);
|
|
257
|
+
}
|
|
258
|
+
agent.close();
|
|
259
|
+
// The agent runs in this process: there is no process exit to
|
|
260
|
+
// observe, so the dispose is answered as taken over.
|
|
261
|
+
kernel.respond(request.id, { kind: "accepted" });
|
|
262
|
+
},
|
|
263
|
+
});
|
|
264
|
+
return session;
|
|
265
|
+
};
|
|
33
266
|
}
|
|
34
|
-
|
|
35
|
-
* `--force` (alias `--yolo`) is a root option, so it precedes the hidden
|
|
36
|
-
* `acp` subcommand. It runs commands without asking; a team whose admin
|
|
37
|
-
* controls auto run can still switch it off, and then the agent asks
|
|
38
|
-
* through `session/request_permission`.
|
|
39
|
-
*/
|
|
40
|
-
export const cursorAcpArgs = ["--force", "acp"];
|
|
41
|
-
/**
|
|
42
|
-
* Requests cursor-agent 2026.09.28 sends its client beyond standard ACP. oar
|
|
43
|
-
* implements none: each is recorded and refused with `-32601`, as an
|
|
44
|
-
* unregistered method would be. On that refusal `cursor/ask_question` asks
|
|
45
|
-
* one `session/request_permission` per single select question (oar picks its
|
|
46
|
-
* first option), `cursor/create_plan` writes the plan to a local file, and
|
|
47
|
-
* the rest were notices the agent does not wait on.
|
|
48
|
-
*/
|
|
49
|
-
export const CURSOR_EXTENSION_REQUESTS = [
|
|
50
|
-
"cursor/ask_question",
|
|
51
|
-
"cursor/create_plan",
|
|
52
|
-
"cursor/update_todos",
|
|
53
|
-
"cursor/task",
|
|
54
|
-
"cursor/generate_image",
|
|
55
|
-
];
|
|
56
|
-
export const cursorAcpProfile = {
|
|
57
|
-
args: cursorAcpArgs,
|
|
58
|
-
// Cursor's ACP method set has no steer. Subagents, once opted into, speak
|
|
59
|
-
// under their own session ids (attribution tier #3,
|
|
60
|
-
// docs/spec/attribution.md): recorded under those ids and linked to the
|
|
61
|
-
// parent.
|
|
62
|
-
capabilities: { steer: false, queue: { durable: false }, attribution: "nested" },
|
|
63
|
-
requestTimeoutMs: 30_000,
|
|
64
|
-
selectAuthMethod: selectCursorAuthMethod,
|
|
65
|
-
validateOptions: validateCursorOptions,
|
|
66
|
-
clientCapabilitiesMeta: cursorClientCapabilitiesMeta,
|
|
67
|
-
// `session/set_model` answers `{}` and cursor never pushes
|
|
68
|
-
// `config_option_update`, so only `set_config_option` reports the switch.
|
|
69
|
-
modelViaConfigOption: true,
|
|
70
|
-
extensionRequests: CURSOR_EXTENSION_REQUESTS,
|
|
71
|
-
vendorSessionUpdates: CURSOR_VENDOR_SESSION_UPDATES,
|
|
72
|
-
};
|
|
73
|
-
export const cursorSession = acpSession(cursorAcpProfile);
|
|
267
|
+
export const cursorSession = cursorSessionWith(loadCursorSdk);
|
|
74
268
|
//# sourceMappingURL=session.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/runtimes/cursor/session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/runtimes/cursor/session.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAoB,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EA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AAC;gBACP,CAAC;gBACD,KAAK,CAAC,KAAK,EAAE,CAAC;gBACd,8DAA8D;gBAC9D,qDAAqD;gBACrD,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YACnD,CAAC;SACF,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAiB,iBAAiB,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -15,8 +15,6 @@ export interface AcpClientHooks {
|
|
|
15
15
|
readonly answered: (id: string, reply: unknown) => void;
|
|
16
16
|
readonly extension: (method: string, params: JsonRecord) => void;
|
|
17
17
|
readonly extensionNotifications: readonly string[];
|
|
18
|
-
/** Vendor request methods to record before refusing them as unknown. */
|
|
19
|
-
readonly extensionRequests: readonly string[];
|
|
20
18
|
}
|
|
21
19
|
/** OAR's YOLO answer to a permission request: the broadest allow on offer, else cancel. */
|
|
22
20
|
export declare function allowPermission(request: RequestPermissionRequest): RequestPermissionResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-app.d.ts","sourceRoot":"","sources":["../../../src/shared/acp/client-app.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"client-app.d.ts","sourceRoot":"","sources":["../../../src/shared/acp/client-app.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,SAAS,EAKd,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAGzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC7D,qCAAqC;IACrC,QAAQ,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1E,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;CACpD;AAED,2FAA2F;AAC3F,wBAAgB,eAAe,CAAC,OAAO,EAAE,wBAAwB,GAAG,yBAAyB,CAM5F;AAcD,gFAAgF;AAChF,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,cAAc,GACpB,SAAS,CAkCX"}
|