chatroom-cli 1.56.0 → 1.56.1
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 +264 -3709
- package/dist/index.js.map +21 -35
- package/dist/node-launch.js +21 -0
- package/dist/node-launch.js.map +10 -0
- package/package.json +6 -4
- package/node_modules/@cursor/sdk/LICENSE.md +0 -3
- package/node_modules/@cursor/sdk/README.md +0 -5
- package/node_modules/@cursor/sdk/dist/cjs/429.index.js +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/642.index.js +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/745.index.js +0 -8
- package/node_modules/@cursor/sdk/dist/cjs/745.index.js.LICENSE.txt +0 -30
- package/node_modules/@cursor/sdk/dist/cjs/agent.d.ts +0 -172
- package/node_modules/@cursor/sdk/dist/cjs/agent.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/analytics.d.ts +0 -104
- package/node_modules/@cursor/sdk/dist/cjs/analytics.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/artifacts.d.ts +0 -6
- package/node_modules/@cursor/sdk/dist/cjs/artifacts.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/cloud-agent.d.ts +0 -47
- package/node_modules/@cursor/sdk/dist/cjs/cloud-agent.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/cloud-api-client.d.ts +0 -200
- package/node_modules/@cursor/sdk/dist/cjs/cloud-api-client.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/cloud-executor.d.ts +0 -14
- package/node_modules/@cursor/sdk/dist/cjs/cloud-executor.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/cloud-mcp-utils.d.ts +0 -4
- package/node_modules/@cursor/sdk/dist/cjs/cloud-mcp-utils.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/core-adapter.d.ts +0 -2
- package/node_modules/@cursor/sdk/dist/cjs/core-adapter.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/custom-tools.d.ts +0 -29
- package/node_modules/@cursor/sdk/dist/cjs/custom-tools.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/errors.d.ts +0 -145
- package/node_modules/@cursor/sdk/dist/cjs/errors.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/executor-common.d.ts +0 -20
- package/node_modules/@cursor/sdk/dist/cjs/executor-common.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/executor-types.d.ts +0 -67
- package/node_modules/@cursor/sdk/dist/cjs/executor-types.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/index.d.ts +0 -18
- package/node_modules/@cursor/sdk/dist/cjs/index.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/index.js +0 -2
- package/node_modules/@cursor/sdk/dist/cjs/index.js.LICENSE.txt +0 -254
- package/node_modules/@cursor/sdk/dist/cjs/local-executor.d.ts +0 -20
- package/node_modules/@cursor/sdk/dist/cjs/local-executor.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/local-model-validation.d.ts +0 -6
- package/node_modules/@cursor/sdk/dist/cjs/local-model-validation.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/messages.d.ts +0 -110
- package/node_modules/@cursor/sdk/dist/cjs/messages.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/options.d.ts +0 -236
- package/node_modules/@cursor/sdk/dist/cjs/options.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/package.json +0 -3
- package/node_modules/@cursor/sdk/dist/cjs/platform.d.ts +0 -72
- package/node_modules/@cursor/sdk/dist/cjs/platform.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/prefetched-blobs.d.ts +0 -13
- package/node_modules/@cursor/sdk/dist/cjs/prefetched-blobs.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/public-api.d.ts +0 -17
- package/node_modules/@cursor/sdk/dist/cjs/public-api.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/run-event-notifier-api.d.ts +0 -120
- package/node_modules/@cursor/sdk/dist/cjs/run-event-notifier-api.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/run-event-tailer.d.ts +0 -33
- package/node_modules/@cursor/sdk/dist/cjs/run-event-tailer.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/run-interaction-accumulator.d.ts +0 -33
- package/node_modules/@cursor/sdk/dist/cjs/run-interaction-accumulator.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/run-store-public-types.d.ts +0 -178
- package/node_modules/@cursor/sdk/dist/cjs/run-store-public-types.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/run.d.ts +0 -46
- package/node_modules/@cursor/sdk/dist/cjs/run.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/sdk-config.d.ts +0 -24
- package/node_modules/@cursor/sdk/dist/cjs/sdk-config.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/sdk-statsig.d.ts +0 -14
- package/node_modules/@cursor/sdk/dist/cjs/sdk-statsig.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/store/index.d.ts +0 -8
- package/node_modules/@cursor/sdk/dist/cjs/store/index.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/store/jsonl-local-agent-store.d.ts +0 -34
- package/node_modules/@cursor/sdk/dist/cjs/store/jsonl-local-agent-store.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/store/local-agent-record-conversion.d.ts +0 -7
- package/node_modules/@cursor/sdk/dist/cjs/store/local-agent-record-conversion.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/store/local-agent-store.d.ts +0 -289
- package/node_modules/@cursor/sdk/dist/cjs/store/local-agent-store.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/store/sdk-local-defaults.d.ts +0 -15
- package/node_modules/@cursor/sdk/dist/cjs/store/sdk-local-defaults.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/store/sdk-state-root.d.ts +0 -6
- package/node_modules/@cursor/sdk/dist/cjs/store/sdk-state-root.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/store/sqlite-local-agent-store.d.ts +0 -30
- package/node_modules/@cursor/sdk/dist/cjs/store/sqlite-local-agent-store.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/stubs.d.ts +0 -104
- package/node_modules/@cursor/sdk/dist/cjs/stubs.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/subagent-conversion.d.ts +0 -22
- package/node_modules/@cursor/sdk/dist/cjs/subagent-conversion.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/tool-call-utils.d.ts +0 -7
- package/node_modules/@cursor/sdk/dist/cjs/tool-call-utils.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/types/conversation-types.d.ts +0 -12062
- package/node_modules/@cursor/sdk/dist/cjs/types/conversation-types.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/types/delta-types.d.ts +0 -2
- package/node_modules/@cursor/sdk/dist/cjs/types/delta-types.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/types/tool-call-types.d.ts +0 -2
- package/node_modules/@cursor/sdk/dist/cjs/types/tool-call-types.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/utils/conversation-utils.d.ts +0 -3
- package/node_modules/@cursor/sdk/dist/cjs/utils/conversation-utils.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/utils/logger.d.ts +0 -12
- package/node_modules/@cursor/sdk/dist/cjs/utils/logger.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/utils/message-schemas.d.ts +0 -2
- package/node_modules/@cursor/sdk/dist/cjs/utils/message-schemas.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/cjs/vendor/cursor-sdk-shared/core-adapter.d.ts +0 -3
- package/node_modules/@cursor/sdk/dist/cjs/vendor/cursor-sdk-shared/delta-types.d.ts +0 -19186
- package/node_modules/@cursor/sdk/dist/cjs/vendor/cursor-sdk-shared/index.d.ts +0 -4
- package/node_modules/@cursor/sdk/dist/cjs/vendor/cursor-sdk-shared/message-schemas.d.ts +0 -105
- package/node_modules/@cursor/sdk/dist/cjs/vendor/cursor-sdk-shared/tool-call-types.d.ts +0 -7894
- package/node_modules/@cursor/sdk/dist/esm/429.index.js +0 -1
- package/node_modules/@cursor/sdk/dist/esm/642.index.js +0 -1
- package/node_modules/@cursor/sdk/dist/esm/745.index.js +0 -8
- package/node_modules/@cursor/sdk/dist/esm/745.index.js.LICENSE.txt +0 -30
- package/node_modules/@cursor/sdk/dist/esm/agent.d.ts +0 -172
- package/node_modules/@cursor/sdk/dist/esm/agent.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/analytics.d.ts +0 -104
- package/node_modules/@cursor/sdk/dist/esm/analytics.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/artifacts.d.ts +0 -6
- package/node_modules/@cursor/sdk/dist/esm/artifacts.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/cloud-agent.d.ts +0 -47
- package/node_modules/@cursor/sdk/dist/esm/cloud-agent.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/cloud-api-client.d.ts +0 -200
- package/node_modules/@cursor/sdk/dist/esm/cloud-api-client.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/cloud-executor.d.ts +0 -14
- package/node_modules/@cursor/sdk/dist/esm/cloud-executor.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/cloud-mcp-utils.d.ts +0 -4
- package/node_modules/@cursor/sdk/dist/esm/cloud-mcp-utils.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/core-adapter.d.ts +0 -2
- package/node_modules/@cursor/sdk/dist/esm/core-adapter.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/custom-tools.d.ts +0 -29
- package/node_modules/@cursor/sdk/dist/esm/custom-tools.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/errors.d.ts +0 -145
- package/node_modules/@cursor/sdk/dist/esm/errors.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/executor-common.d.ts +0 -20
- package/node_modules/@cursor/sdk/dist/esm/executor-common.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/executor-types.d.ts +0 -67
- package/node_modules/@cursor/sdk/dist/esm/executor-types.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/index.d.ts +0 -18
- package/node_modules/@cursor/sdk/dist/esm/index.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/index.js +0 -2
- package/node_modules/@cursor/sdk/dist/esm/index.js.LICENSE.txt +0 -254
- package/node_modules/@cursor/sdk/dist/esm/local-executor.d.ts +0 -20
- package/node_modules/@cursor/sdk/dist/esm/local-executor.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/local-model-validation.d.ts +0 -6
- package/node_modules/@cursor/sdk/dist/esm/local-model-validation.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/messages.d.ts +0 -110
- package/node_modules/@cursor/sdk/dist/esm/messages.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/options.d.ts +0 -236
- package/node_modules/@cursor/sdk/dist/esm/options.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/platform.d.ts +0 -72
- package/node_modules/@cursor/sdk/dist/esm/platform.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/prefetched-blobs.d.ts +0 -13
- package/node_modules/@cursor/sdk/dist/esm/prefetched-blobs.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/public-api.d.ts +0 -17
- package/node_modules/@cursor/sdk/dist/esm/public-api.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/run-event-notifier-api.d.ts +0 -120
- package/node_modules/@cursor/sdk/dist/esm/run-event-notifier-api.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/run-event-tailer.d.ts +0 -33
- package/node_modules/@cursor/sdk/dist/esm/run-event-tailer.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/run-interaction-accumulator.d.ts +0 -33
- package/node_modules/@cursor/sdk/dist/esm/run-interaction-accumulator.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/run-store-public-types.d.ts +0 -178
- package/node_modules/@cursor/sdk/dist/esm/run-store-public-types.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/run.d.ts +0 -46
- package/node_modules/@cursor/sdk/dist/esm/run.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/sdk-config.d.ts +0 -24
- package/node_modules/@cursor/sdk/dist/esm/sdk-config.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/sdk-statsig.d.ts +0 -14
- package/node_modules/@cursor/sdk/dist/esm/sdk-statsig.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/store/index.d.ts +0 -8
- package/node_modules/@cursor/sdk/dist/esm/store/index.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/store/jsonl-local-agent-store.d.ts +0 -34
- package/node_modules/@cursor/sdk/dist/esm/store/jsonl-local-agent-store.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/store/local-agent-record-conversion.d.ts +0 -7
- package/node_modules/@cursor/sdk/dist/esm/store/local-agent-record-conversion.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/store/local-agent-store.d.ts +0 -289
- package/node_modules/@cursor/sdk/dist/esm/store/local-agent-store.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/store/sdk-local-defaults.d.ts +0 -15
- package/node_modules/@cursor/sdk/dist/esm/store/sdk-local-defaults.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/store/sdk-state-root.d.ts +0 -6
- package/node_modules/@cursor/sdk/dist/esm/store/sdk-state-root.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/store/sqlite-local-agent-store.d.ts +0 -30
- package/node_modules/@cursor/sdk/dist/esm/store/sqlite-local-agent-store.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/stubs.d.ts +0 -104
- package/node_modules/@cursor/sdk/dist/esm/stubs.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/subagent-conversion.d.ts +0 -22
- package/node_modules/@cursor/sdk/dist/esm/subagent-conversion.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/tool-call-utils.d.ts +0 -7
- package/node_modules/@cursor/sdk/dist/esm/tool-call-utils.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/types/conversation-types.d.ts +0 -12062
- package/node_modules/@cursor/sdk/dist/esm/types/conversation-types.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/types/delta-types.d.ts +0 -2
- package/node_modules/@cursor/sdk/dist/esm/types/delta-types.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/types/tool-call-types.d.ts +0 -2
- package/node_modules/@cursor/sdk/dist/esm/types/tool-call-types.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/utils/conversation-utils.d.ts +0 -3
- package/node_modules/@cursor/sdk/dist/esm/utils/conversation-utils.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/utils/logger.d.ts +0 -12
- package/node_modules/@cursor/sdk/dist/esm/utils/logger.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/utils/message-schemas.d.ts +0 -2
- package/node_modules/@cursor/sdk/dist/esm/utils/message-schemas.d.ts.map +0 -1
- package/node_modules/@cursor/sdk/dist/esm/vendor/cursor-sdk-shared/core-adapter.d.ts +0 -3
- package/node_modules/@cursor/sdk/dist/esm/vendor/cursor-sdk-shared/delta-types.d.ts +0 -19186
- package/node_modules/@cursor/sdk/dist/esm/vendor/cursor-sdk-shared/index.d.ts +0 -4
- package/node_modules/@cursor/sdk/dist/esm/vendor/cursor-sdk-shared/message-schemas.d.ts +0 -105
- package/node_modules/@cursor/sdk/dist/esm/vendor/cursor-sdk-shared/tool-call-types.d.ts +0 -7894
- package/node_modules/@cursor/sdk/package.json +0 -109
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { LocalAgentStore, LocalAgentStoreAgents, LocalAgentStoreCheckpoints, LocalAgentStoreRunEvents, LocalAgentStoreRuns } from "./local-agent-store.js";
|
|
2
|
-
/** JSONL filenames under the directory passed to {@link JsonlLocalAgentStore}. */
|
|
3
|
-
export declare const JSONL_LOCAL_AGENT_STORE_FILES: {
|
|
4
|
-
readonly agents: "agents.ndjson";
|
|
5
|
-
readonly runs: "runs.ndjson";
|
|
6
|
-
readonly runEvents: "run_events.ndjson";
|
|
7
|
-
readonly checkpoints: "checkpoints.ndjson";
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* File-backed {@link LocalAgentStore} using newline-delimited JSON (JSONL / NDJSON).
|
|
11
|
-
*
|
|
12
|
-
* Under `rootDir` the store reads and writes four files:
|
|
13
|
-
* {@link JSONL_LOCAL_AGENT_STORE_FILES}. Writes are serialized process-wide so
|
|
14
|
-
* concurrent SDK callbacks do not interleave partial lines. Listing rewrites whole
|
|
15
|
-
* files on delete/update (simple, portable; not optimized for huge catalogs).
|
|
16
|
-
*
|
|
17
|
-
* Pass the same instance (or the same `Cursor.configure` default) on
|
|
18
|
-
* `Agent.create`, `Agent.resume`, and local list/get APIs.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```typescript
|
|
22
|
-
* const store = new JsonlLocalAgentStore("/path/to/store");
|
|
23
|
-
* Cursor.configure({ local: { store } });
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export declare class JsonlLocalAgentStore implements LocalAgentStore {
|
|
27
|
-
private readonly rootDir;
|
|
28
|
-
readonly agents: LocalAgentStoreAgents;
|
|
29
|
-
readonly checkpoints: LocalAgentStoreCheckpoints;
|
|
30
|
-
readonly runs: LocalAgentStoreRuns;
|
|
31
|
-
readonly runEvents: LocalAgentStoreRunEvents;
|
|
32
|
-
constructor(rootDir: string);
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=jsonl-local-agent-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jsonl-local-agent-store.d.ts","sourceRoot":"","sources":["../../../src/agent/store/jsonl-local-agent-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAWV,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAYhC,kFAAkF;AAClF,eAAO,MAAM,6BAA6B;;;;;CAKhC,CAAC;AA0BX;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IAM9C,OAAO,CAAC,QAAQ,CAAC,OAAO;IALpC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;IACjD,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC;gBAEhB,OAAO,EAAE,MAAM;CAM7C"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AgentRecord, RunRecord } from "../run-store-public-types.js";
|
|
2
|
-
import type { LocalAgentDocument, LocalAgentRunDocument } from "./local-agent-store.js";
|
|
3
|
-
export declare function localAgentDocumentFromAgentRecord(record: AgentRecord): LocalAgentDocument;
|
|
4
|
-
export declare function localAgentRunDocumentFromRunRecord(record: RunRecord): LocalAgentRunDocument;
|
|
5
|
-
export declare function agentRecordFromLocalAgentDocument(document: LocalAgentDocument): AgentRecord;
|
|
6
|
-
export declare function runRecordFromLocalAgentRunDocument(run: LocalAgentRunDocument): RunRecord;
|
|
7
|
-
//# sourceMappingURL=local-agent-record-conversion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local-agent-record-conversion.d.ts","sourceRoot":"","sources":["../../../src/agent/store/local-agent-record-conversion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAGX,SAAS,EACV,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAEV,kBAAkB,EAClB,qBAAqB,EAGtB,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,WAAW,GAClB,kBAAkB,CAcpB;AAED,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,SAAS,GAChB,qBAAqB,CA2BvB;AAED,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,kBAAkB,GAC3B,WAAW,CAcb;AAED,wBAAgB,kCAAkC,CAChD,GAAG,EAAE,qBAAqB,GACzB,SAAS,CA0BX"}
|
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import type { ModelSelection } from "../options.js";
|
|
2
|
-
import type { AgentCheckpointStore, AgentRunStore, RunEventStore } from "../run-store-public-types.js";
|
|
3
|
-
export type LocalAgentStatus = "idle" | "running" | "error" | "archived";
|
|
4
|
-
export type LocalAgentRunStatus = "queued" | "running" | "finished" | "error" | "cancelled" | "expired";
|
|
5
|
-
/** Pointer to the latest conversation checkpoint for an agent. */
|
|
6
|
-
export interface LocalAgentCheckpointRef {
|
|
7
|
-
readonly schemaVersion: 1;
|
|
8
|
-
readonly rootBlobId: string;
|
|
9
|
-
}
|
|
10
|
-
export interface LocalAgentRunDocument {
|
|
11
|
-
readonly runId: string;
|
|
12
|
-
readonly requestId?: string | null;
|
|
13
|
-
readonly agentId: string;
|
|
14
|
-
readonly turnNumber: number;
|
|
15
|
-
readonly status: LocalAgentRunStatus;
|
|
16
|
-
readonly model?: ModelSelection | null;
|
|
17
|
-
readonly result?: string | null;
|
|
18
|
-
readonly error?: string | null;
|
|
19
|
-
readonly usageRef?: string | null;
|
|
20
|
-
readonly createdAt: number;
|
|
21
|
-
readonly updatedAt: number;
|
|
22
|
-
readonly startedAt?: number | null;
|
|
23
|
-
readonly endedAt?: number | null;
|
|
24
|
-
/** Snapshot at run creation (mirrors `runs.start_checkpoint_ref` in SQLite). */
|
|
25
|
-
readonly startCheckpointRef?: LocalAgentCheckpointRef | null;
|
|
26
|
-
/** Latest checkpoint for this run (mirrors `runs.latest_checkpoint_ref`). */
|
|
27
|
-
readonly latestCheckpointRef?: LocalAgentCheckpointRef | null;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Agent metadata persisted by a custom local store. Run rows live on
|
|
31
|
-
* {@link LocalAgentStore.runs} separately, or a bundled in-memory layout that
|
|
32
|
-
* co-locates runs per agent while still exposing both substores.
|
|
33
|
-
*/
|
|
34
|
-
export interface LocalAgentDocument {
|
|
35
|
-
readonly agentId: string;
|
|
36
|
-
readonly cwd: string;
|
|
37
|
-
readonly status: LocalAgentStatus;
|
|
38
|
-
readonly activeRunId?: string | null;
|
|
39
|
-
readonly name?: string | null;
|
|
40
|
-
readonly createdAt: number;
|
|
41
|
-
readonly updatedAt: number;
|
|
42
|
-
readonly latestCheckpoint?: LocalAgentCheckpointRef | null;
|
|
43
|
-
/**
|
|
44
|
-
* SDK-owned metadata. Stores should persist and return it unchanged.
|
|
45
|
-
*/
|
|
46
|
-
readonly sdkMetadata?: Record<string, unknown>;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Agent delete filter. When `agentIds` is omitted or empty, every agent row
|
|
50
|
-
* matches (use with care on `delete`).
|
|
51
|
-
*/
|
|
52
|
-
export interface LocalAgentAgentFilter {
|
|
53
|
-
readonly agentIds?: readonly string[];
|
|
54
|
-
readonly cwd?: string;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Agent list filter. When `cwd` is omitted, agents from every workspace in the
|
|
58
|
-
* store are listed.
|
|
59
|
-
*/
|
|
60
|
-
export interface LocalAgentListFilter {
|
|
61
|
-
/** Opaque cursor from a previous page's `nextCursor` (id-based, not an offset). */
|
|
62
|
-
readonly cursor?: string;
|
|
63
|
-
readonly limit?: number;
|
|
64
|
-
/** When set, only agents whose persisted `cwd` matches are listed. */
|
|
65
|
-
readonly cwd?: string;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Paged list result for {@link LocalAgentStore.agents},
|
|
69
|
-
* {@link LocalAgentStore.runs}, and {@link LocalAgentStore.checkpoints}.
|
|
70
|
-
* Resume with `filter.cursor` from the previous page's `nextCursor` (opaque,
|
|
71
|
-
* id-based — not a row offset).
|
|
72
|
-
*/
|
|
73
|
-
export interface LocalAgentStoreListResult<T> {
|
|
74
|
-
readonly items: readonly T[];
|
|
75
|
-
readonly nextCursor?: string;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Run list/delete filter. When both `agentIds` and `runIds` are omitted or empty,
|
|
79
|
-
* every run matches (list returns all runs; delete removes all runs — use with care).
|
|
80
|
-
*/
|
|
81
|
-
export interface LocalAgentRunFilter {
|
|
82
|
-
readonly agentIds?: readonly string[];
|
|
83
|
-
readonly runIds?: readonly string[];
|
|
84
|
-
/** Opaque cursor from a previous page's `nextCursor` (id-based, not an offset). */
|
|
85
|
-
readonly cursor?: string;
|
|
86
|
-
readonly limit?: number;
|
|
87
|
-
}
|
|
88
|
-
/** @deprecated Use {@link LocalAgentRunFilter}. */
|
|
89
|
-
export type RunFilter = LocalAgentRunFilter;
|
|
90
|
-
/**
|
|
91
|
-
* Checkpoint blob list/delete filter. When `agentIds` and `blobIds` are both
|
|
92
|
-
* omitted or empty, every blob matches (use with care on `delete`).
|
|
93
|
-
*/
|
|
94
|
-
export interface LocalAgentCheckpointFilter {
|
|
95
|
-
readonly agentIds?: readonly string[];
|
|
96
|
-
readonly blobIds?: readonly string[];
|
|
97
|
-
readonly cursor?: string;
|
|
98
|
-
readonly limit?: number;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Run event delete filter. When `runIds` is omitted or empty, every run event
|
|
102
|
-
* row matches (use with care on `delete`).
|
|
103
|
-
*/
|
|
104
|
-
export interface LocalAgentRunEventFilter {
|
|
105
|
-
readonly runIds?: readonly string[];
|
|
106
|
-
}
|
|
107
|
-
/** Opaque resume token for a run event stream (exclusive `afterOffset` on list). */
|
|
108
|
-
export type LocalAgentRunEventOffset = string;
|
|
109
|
-
export interface LocalAgentRunEventDocument {
|
|
110
|
-
readonly runId: string;
|
|
111
|
-
readonly seq: number;
|
|
112
|
-
readonly offset: LocalAgentRunEventOffset;
|
|
113
|
-
readonly eventType: string;
|
|
114
|
-
readonly payload: unknown;
|
|
115
|
-
readonly payloadRef: string | null;
|
|
116
|
-
readonly idempotencyKey: string | null;
|
|
117
|
-
readonly createdAt: number;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Paged tail of a single run's event stream. Unlike catalog lists, pagination uses
|
|
121
|
-
* {@link LocalAgentRunEventOffset} (`afterOffset` / `nextOffset`) because events are
|
|
122
|
-
* append-only and ordered by sequence, not by sortable row ids.
|
|
123
|
-
*/
|
|
124
|
-
export interface LocalAgentRunEventListResult {
|
|
125
|
-
readonly items: readonly LocalAgentRunEventDocument[];
|
|
126
|
-
readonly nextOffset?: LocalAgentRunEventOffset;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Per-agent checkpoint bytes (content-addressed). Same role as
|
|
130
|
-
* `stateRoot/agents/<hash>/store.db` in the default layout.
|
|
131
|
-
*/
|
|
132
|
-
export interface LocalAgentStoreCheckpoints {
|
|
133
|
-
get(input: {
|
|
134
|
-
readonly agentId: string;
|
|
135
|
-
readonly blobId: string;
|
|
136
|
-
}): Promise<Uint8Array | null>;
|
|
137
|
-
/**
|
|
138
|
-
* Persists bytes for a content-addressed blob. Returns `void` (no row document);
|
|
139
|
-
* callers already know `agentId` and `blobId`.
|
|
140
|
-
*/
|
|
141
|
-
create(input: {
|
|
142
|
-
readonly agentId: string;
|
|
143
|
-
readonly blobId: string;
|
|
144
|
-
readonly data: Uint8Array;
|
|
145
|
-
}): Promise<void>;
|
|
146
|
-
/** Overwrites blob bytes. Returns `void`; use {@link get} to read back. */
|
|
147
|
-
update(input: {
|
|
148
|
-
readonly agentId: string;
|
|
149
|
-
readonly blobId: string;
|
|
150
|
-
readonly data: Uint8Array;
|
|
151
|
-
}): Promise<void>;
|
|
152
|
-
delete(input: {
|
|
153
|
-
readonly filter: LocalAgentCheckpointFilter;
|
|
154
|
-
}): Promise<void>;
|
|
155
|
-
list(input?: {
|
|
156
|
-
readonly filter?: LocalAgentCheckpointFilter;
|
|
157
|
-
}): Promise<LocalAgentStoreListResult<string>>;
|
|
158
|
-
}
|
|
159
|
-
/** Agent rows for a custom {@link LocalAgentStore}. */
|
|
160
|
-
export interface LocalAgentStoreAgents {
|
|
161
|
-
get(input: {
|
|
162
|
-
readonly agentId: string;
|
|
163
|
-
}): Promise<LocalAgentDocument | null>;
|
|
164
|
-
create(input: {
|
|
165
|
-
readonly agent: LocalAgentDocument;
|
|
166
|
-
}): Promise<LocalAgentDocument>;
|
|
167
|
-
update(input: {
|
|
168
|
-
readonly agent: LocalAgentDocument;
|
|
169
|
-
}): Promise<LocalAgentDocument>;
|
|
170
|
-
delete(input: {
|
|
171
|
-
readonly filter: LocalAgentAgentFilter;
|
|
172
|
-
}): Promise<void>;
|
|
173
|
-
list(input?: {
|
|
174
|
-
readonly filter?: LocalAgentListFilter;
|
|
175
|
-
}): Promise<LocalAgentStoreListResult<LocalAgentDocument>>;
|
|
176
|
-
}
|
|
177
|
-
/** Run rows for a custom {@link LocalAgentStore}. */
|
|
178
|
-
export interface LocalAgentStoreRuns {
|
|
179
|
-
get(input: {
|
|
180
|
-
readonly agentId: string;
|
|
181
|
-
readonly runId: string;
|
|
182
|
-
}): Promise<LocalAgentRunDocument | null>;
|
|
183
|
-
create(input: {
|
|
184
|
-
readonly run: LocalAgentRunDocument;
|
|
185
|
-
}): Promise<LocalAgentRunDocument>;
|
|
186
|
-
update(input: {
|
|
187
|
-
readonly run: LocalAgentRunDocument;
|
|
188
|
-
}): Promise<LocalAgentRunDocument>;
|
|
189
|
-
/** Deletes runs matching {@link LocalAgentRunFilter}; an empty filter deletes all runs. */
|
|
190
|
-
delete(input: {
|
|
191
|
-
readonly filter: LocalAgentRunFilter;
|
|
192
|
-
}): Promise<void>;
|
|
193
|
-
list(input?: {
|
|
194
|
-
readonly filter?: LocalAgentRunFilter;
|
|
195
|
-
}): Promise<LocalAgentStoreListResult<LocalAgentRunDocument>>;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Durable run stream log (`run_events` in default SQLite). Append-only: use
|
|
199
|
-
* {@link append}, {@link list} with exclusive `afterOffset`, and {@link delete}
|
|
200
|
-
* for agent/run cleanup.
|
|
201
|
-
*/
|
|
202
|
-
export interface LocalAgentStoreRunEvents {
|
|
203
|
-
append(input: {
|
|
204
|
-
readonly runId: string;
|
|
205
|
-
readonly eventType: string;
|
|
206
|
-
readonly payload?: unknown;
|
|
207
|
-
readonly payloadRef?: string | null;
|
|
208
|
-
readonly idempotencyKey?: string | null;
|
|
209
|
-
}): Promise<LocalAgentRunEventDocument>;
|
|
210
|
-
/**
|
|
211
|
-
* Lists events for one `runId`. Pass `afterOffset` from a prior page's
|
|
212
|
-
* `nextOffset` (exclusive resume), not `filter.cursor`.
|
|
213
|
-
*/
|
|
214
|
-
list(input: {
|
|
215
|
-
readonly runId: string;
|
|
216
|
-
readonly afterOffset?: LocalAgentRunEventOffset | null;
|
|
217
|
-
readonly limit?: number;
|
|
218
|
-
}): Promise<LocalAgentRunEventListResult>;
|
|
219
|
-
delete(input: {
|
|
220
|
-
readonly filter: LocalAgentRunEventFilter;
|
|
221
|
-
}): Promise<void>;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Custom persistence for local SDK agents. Implement this interface (or
|
|
225
|
-
* {@link composeLocalAgentStore}) when you need to own where agent metadata,
|
|
226
|
-
* checkpoint blobs, runs, and run events are stored.
|
|
227
|
-
*
|
|
228
|
-
* When `local.store` / `localStore` is omitted, the SDK opens
|
|
229
|
-
* {@link SqliteLocalAgentStore} (on-disk SQLite under the workspace state root).
|
|
230
|
-
* Implement {@link LocalAgentStore} yourself only when replacing that layout.
|
|
231
|
-
*
|
|
232
|
-
* Table alignment (default SQLite names in parentheses):
|
|
233
|
-
* {@link agents} (`agents`), {@link checkpoints} (`checkpoints` / per-agent blob
|
|
234
|
-
* dirs), {@link runs} (`runs`), {@link runEvents} (`run_events`).
|
|
235
|
-
*
|
|
236
|
-
* Pagination: catalog substores use `filter.cursor` / `nextCursor`; run events
|
|
237
|
-
* use `afterOffset` / `nextOffset` on a single run stream (see
|
|
238
|
-
* {@link LocalAgentStoreRunEvents.list}).
|
|
239
|
-
*
|
|
240
|
-
* Built-in backends (exported from `@cursor/sdk`): default
|
|
241
|
-
* {@link SqliteLocalAgentStore}; portable {@link JsonlLocalAgentStore}.
|
|
242
|
-
*/
|
|
243
|
-
export interface LocalAgentStore {
|
|
244
|
-
readonly agents: LocalAgentStoreAgents;
|
|
245
|
-
readonly checkpoints: LocalAgentStoreCheckpoints;
|
|
246
|
-
readonly runs: LocalAgentStoreRuns;
|
|
247
|
-
readonly runEvents: LocalAgentStoreRunEvents;
|
|
248
|
-
}
|
|
249
|
-
interface LocalAgentStoreAdapters {
|
|
250
|
-
readonly store: AgentRunStore;
|
|
251
|
-
readonly checkpointStore: AgentCheckpointStore;
|
|
252
|
-
readonly eventStore: RunEventStore;
|
|
253
|
-
}
|
|
254
|
-
export declare function createLocalAgentStoreAdapters(options: {
|
|
255
|
-
localStore: LocalAgentStore;
|
|
256
|
-
workspaceRef: string;
|
|
257
|
-
/**
|
|
258
|
-
* When set (caller passed `cwd`), agent reads are limited to rows with that
|
|
259
|
-
* `cwd`. When omitted, reads see every agent in the store.
|
|
260
|
-
*/
|
|
261
|
-
scopedWorkspaceRef?: string;
|
|
262
|
-
}): LocalAgentStoreAdapters;
|
|
263
|
-
/**
|
|
264
|
-
* In-memory store with separate agent and run maps (relational layout).
|
|
265
|
-
*/
|
|
266
|
-
export declare function createInMemoryLocalAgentStore(): LocalAgentStore;
|
|
267
|
-
/** In-memory bundled layout (tests / SDK-internal; not exported from `@cursor/sdk`). */
|
|
268
|
-
export declare function createBundledLocalAgentStore(): LocalAgentStore;
|
|
269
|
-
/** Combine separately implemented substores into one {@link LocalAgentStore}. */
|
|
270
|
-
export declare function composeLocalAgentStore(parts: {
|
|
271
|
-
readonly agents: LocalAgentStoreAgents;
|
|
272
|
-
readonly checkpoints: LocalAgentStoreCheckpoints;
|
|
273
|
-
readonly runs: LocalAgentStoreRuns;
|
|
274
|
-
readonly runEvents: LocalAgentStoreRunEvents;
|
|
275
|
-
}): LocalAgentStore;
|
|
276
|
-
export declare function matchesAgentFilter(agent: LocalAgentDocument, filter?: LocalAgentAgentFilter): boolean;
|
|
277
|
-
export declare function matchesCheckpointFilter(key: {
|
|
278
|
-
agentId: string;
|
|
279
|
-
blobId: string;
|
|
280
|
-
}, filter?: LocalAgentCheckpointFilter): boolean;
|
|
281
|
-
/** Paginate checkpoint blob ids sorted lexicographically. */
|
|
282
|
-
export declare function paginateCheckpointBlobIds(blobIds: readonly string[], options?: Pick<LocalAgentCheckpointFilter, "cursor" | "limit">): LocalAgentStoreListResult<string>;
|
|
283
|
-
export declare function matchesRunFilter(run: LocalAgentRunDocument, filter?: LocalAgentRunFilter): boolean;
|
|
284
|
-
/** Paginate agents sorted by `updatedAt` desc, then `agentId` desc. */
|
|
285
|
-
export declare function paginateAgentDocuments(items: readonly LocalAgentDocument[], filter?: Pick<LocalAgentListFilter, "cursor" | "limit" | "cwd">): LocalAgentStoreListResult<LocalAgentDocument>;
|
|
286
|
-
/** Paginate runs sorted by `turnNumber` asc, then `runId` asc. */
|
|
287
|
-
export declare function paginateRunDocuments(items: readonly LocalAgentRunDocument[], options?: Pick<LocalAgentRunFilter, "cursor" | "limit">): LocalAgentStoreListResult<LocalAgentRunDocument>;
|
|
288
|
-
export {};
|
|
289
|
-
//# sourceMappingURL=local-agent-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local-agent-store.d.ts","sourceRoot":"","sources":["../../../src/agent/store/local-agent-store.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EACV,oBAAoB,EAGpB,aAAa,EAUb,aAAa,EAId,MAAM,8BAA8B,CAAC;AAMtC,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAEzE,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,SAAS,GACT,UAAU,GACV,OAAO,GACP,WAAW,GACX,SAAS,CAAC;AAEd,kEAAkE;AAClE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IA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AM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAWT;AAmBD,uEAAuE;AACvE,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,kBAAkB,EAAE,EACpC,MAAM,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC,GAC9D,yBAAyB,CAAC,kBAAkB,CAAC,CAyB/C;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,SAAS,qBAAqB,EAAE,EACvC,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,OAAO,CAAC,GACtD,yBAAyB,CAAC,qBAAqB,CAAC,CAqBlD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { LocalAgentStore } from "./local-agent-store.js";
|
|
2
|
-
export interface SdkLocalDefaultsSource {
|
|
3
|
-
readonly local?: {
|
|
4
|
-
readonly store?: LocalAgentStore;
|
|
5
|
-
};
|
|
6
|
-
readonly store?: LocalAgentStore;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Module-level default `LocalAgentStore` for static `Agent.*` local routes.
|
|
10
|
-
* Per-call `store` / `local.store` overrides this value.
|
|
11
|
-
*/
|
|
12
|
-
export declare function resolveLocalAgentStore(options?: SdkLocalDefaultsSource): LocalAgentStore | undefined;
|
|
13
|
-
export declare function setDefaultLocalAgentStore(store: LocalAgentStore | undefined): void;
|
|
14
|
-
export declare function __clearDefaultLocalAgentStoreForTests(): void;
|
|
15
|
-
//# sourceMappingURL=sdk-local-defaults.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-local-defaults.d.ts","sourceRoot":"","sources":["../../../src/agent/store/sdk-local-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE;QACf,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;KAClC,CAAC;IACF,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,eAAe,GAAG,SAAS,CAE7B;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,eAAe,GAAG,SAAS,GACjC,IAAI,CAEN;AAED,wBAAgB,qCAAqC,IAAI,IAAI,CAE5D"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default on-disk state root for local SDK agents for a workspace.
|
|
3
|
-
* Layout: `{root}/index.db`, `{root}/agents/agent-{sha256}/store.db`, etc.
|
|
4
|
-
*/
|
|
5
|
-
export declare function getDefaultSdkStateRoot(workspaceRef: string): string;
|
|
6
|
-
//# sourceMappingURL=sdk-state-root.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-state-root.d.ts","sourceRoot":"","sources":["../../../src/agent/store/sdk-state-root.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAOnE"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { LocalAgentStore, LocalAgentStoreAgents, LocalAgentStoreCheckpoints, LocalAgentStoreRunEvents, LocalAgentStoreRuns } from "./local-agent-store.js";
|
|
2
|
-
export interface SqliteLocalAgentStoreOptions {
|
|
3
|
-
/** Workspace path used for default state root and agent `cwd` scoping. */
|
|
4
|
-
readonly workspaceRef: string;
|
|
5
|
-
/**
|
|
6
|
-
* Root directory for `index.db`, per-agent checkpoint dirs, etc.
|
|
7
|
-
* Defaults to {@link getDefaultSdkStateRoot} for `workspaceRef`.
|
|
8
|
-
*/
|
|
9
|
-
readonly stateRoot?: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* On-disk {@link LocalAgentStore} backed by the SDK's default SQLite layout
|
|
13
|
-
* (`index.db`, per-agent checkpoint blob stores, `run_events` table).
|
|
14
|
-
*
|
|
15
|
-
* This is the persistence surface used when no custom `local.store` is passed.
|
|
16
|
-
* Open once per workspace/state root and reuse across `Agent.create` / `resume`.
|
|
17
|
-
*/
|
|
18
|
-
export declare class SqliteLocalAgentStore implements LocalAgentStore {
|
|
19
|
-
readonly stateRoot: string;
|
|
20
|
-
readonly workspaceRef: string;
|
|
21
|
-
readonly agents: LocalAgentStoreAgents;
|
|
22
|
-
readonly checkpoints: LocalAgentStoreCheckpoints;
|
|
23
|
-
readonly runs: LocalAgentStoreRuns;
|
|
24
|
-
readonly runEvents: LocalAgentStoreRunEvents;
|
|
25
|
-
private readonly deps;
|
|
26
|
-
static open(options: SqliteLocalAgentStoreOptions): Promise<SqliteLocalAgentStore>;
|
|
27
|
-
private constructor();
|
|
28
|
-
dispose(): Promise<void>;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=sqlite-local-agent-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-local-agent-store.d.ts","sourceRoot":"","sources":["../../../src/agent/store/sqlite-local-agent-store.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAGV,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAWhC,MAAM,WAAW,4BAA4B;IAC3C,0EAA0E;IAC1E,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAgTD;;;;;;GAMG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IAC3D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;IACjD,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC;IAE7C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA4B;WAEpC,IAAI,CACf,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,qBAAqB,CAAC;IAoBjC,OAAO;IAoBD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAO/B"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import type { AgentMessage, AgentOperationOptions, CursorRequestOptions, GetAgentMessagesOptions, GetAgentOptions, GetRunOptions, ListAgentsOptions, ListResult, ListRunsOptions, SDKAgent, SDKAgentInfo, SDKModel, SDKRepository, SDKUser, SendOptions } from "./agent.js";
|
|
2
|
-
import type { SDKArtifact } from "./artifacts.js";
|
|
3
|
-
import { ConfigurationError } from "./errors.js";
|
|
4
|
-
import type { SDKMessage } from "./messages.js";
|
|
5
|
-
import type { AgentOptions, SDKUserMessage } from "./options.js";
|
|
6
|
-
import type { Run, RunOperation, RunResult, RunStatus } from "./run.js";
|
|
7
|
-
import { type CursorConfigureOptions } from "./sdk-config.js";
|
|
8
|
-
import type { ConversationTurn } from "./types/conversation-types.js";
|
|
9
|
-
export declare function createUnimplementedError(apiName: string): ConfigurationError;
|
|
10
|
-
export declare class UnimplementedRun implements Run {
|
|
11
|
-
readonly id = "unimplemented-run";
|
|
12
|
-
readonly agentId = "unimplemented-agent";
|
|
13
|
-
readonly result: undefined;
|
|
14
|
-
readonly model: undefined;
|
|
15
|
-
readonly durationMs: undefined;
|
|
16
|
-
readonly git: undefined;
|
|
17
|
-
supports(_operation: RunOperation): boolean;
|
|
18
|
-
unsupportedReason(operation: RunOperation): string | undefined;
|
|
19
|
-
stream(): AsyncGenerator<SDKMessage, void>;
|
|
20
|
-
conversation(): Promise<ConversationTurn[]>;
|
|
21
|
-
wait(): Promise<RunResult>;
|
|
22
|
-
cancel(): Promise<void>;
|
|
23
|
-
get status(): RunStatus;
|
|
24
|
-
onDidChangeStatus(_listener: (status: RunStatus) => void): () => void;
|
|
25
|
-
}
|
|
26
|
-
export declare class UnimplementedAgent implements SDKAgent {
|
|
27
|
-
readonly agentId = "unimplemented-agent";
|
|
28
|
-
readonly model: undefined;
|
|
29
|
-
send(_message: string | SDKUserMessage, _options?: SendOptions): Promise<Run>;
|
|
30
|
-
close(): void;
|
|
31
|
-
reload(): Promise<void>;
|
|
32
|
-
[Symbol.asyncDispose](): Promise<void>;
|
|
33
|
-
listArtifacts(): Promise<SDKArtifact[]>;
|
|
34
|
-
downloadArtifact(_path: string): Promise<Buffer>;
|
|
35
|
-
}
|
|
36
|
-
export declare class Agent {
|
|
37
|
-
private constructor();
|
|
38
|
-
/**
|
|
39
|
-
* Create an agent instance.
|
|
40
|
-
*/
|
|
41
|
-
static create(options: AgentOptions): Promise<SDKAgent>;
|
|
42
|
-
/**
|
|
43
|
-
* Resume an existing agent by ID.
|
|
44
|
-
*/
|
|
45
|
-
static resume(agentId: string, options?: Partial<AgentOptions>): Promise<SDKAgent>;
|
|
46
|
-
/**
|
|
47
|
-
* Convenience API to create an agent, run one prompt, and close.
|
|
48
|
-
*/
|
|
49
|
-
static prompt(message: string, options?: AgentOptions): Promise<RunResult>;
|
|
50
|
-
static list(options?: ListAgentsOptions): Promise<ListResult<SDKAgentInfo>>;
|
|
51
|
-
static listRuns(agentId: string, options?: ListRunsOptions): Promise<ListResult<Run>>;
|
|
52
|
-
static getRun(runId: string, options?: GetRunOptions): Promise<Run>;
|
|
53
|
-
static cancelRun(runId: string, options?: GetRunOptions): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Fetch a single agent's metadata by ID. Cloud-only — local agent lookup
|
|
56
|
-
* is a post-launch followup.
|
|
57
|
-
*/
|
|
58
|
-
static get(agentId: string, options?: GetAgentOptions): Promise<SDKAgentInfo>;
|
|
59
|
-
/**
|
|
60
|
-
* Archive an agent. Cloud-only.
|
|
61
|
-
*/
|
|
62
|
-
static archive(agentId: string, options?: AgentOperationOptions): Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Unarchive a previously archived agent. Cloud-only.
|
|
65
|
-
*/
|
|
66
|
-
static unarchive(agentId: string, options?: AgentOperationOptions): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Delete an agent. Cloud-only and irreversible.
|
|
69
|
-
*/
|
|
70
|
-
static delete(agentId: string, options?: AgentOperationOptions): Promise<void>;
|
|
71
|
-
static readonly messages: {
|
|
72
|
-
list(agentId: string, options?: GetAgentMessagesOptions): Promise<AgentMessage[]>;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Account and platform-level operations. Namespaced separately from `Agent`
|
|
77
|
-
* because these concerns (the calling user, available models, connected
|
|
78
|
-
* repositories) aren't scoped to a specific agent.
|
|
79
|
-
*/
|
|
80
|
-
export declare class Cursor {
|
|
81
|
-
private constructor();
|
|
82
|
-
/**
|
|
83
|
-
* Set module-level defaults for SDK local operations. Per-call options on
|
|
84
|
-
* `Agent.create`, `Agent.list`, and related APIs override these values.
|
|
85
|
-
*/
|
|
86
|
-
static configure(options: CursorConfigureOptions): void;
|
|
87
|
-
/**
|
|
88
|
-
* Get metadata about the authenticated user / API key.
|
|
89
|
-
*/
|
|
90
|
-
static me(options?: CursorRequestOptions): Promise<SDKUser>;
|
|
91
|
-
/**
|
|
92
|
-
* List models available to the authenticated user.
|
|
93
|
-
*/
|
|
94
|
-
static readonly models: {
|
|
95
|
-
list(options?: CursorRequestOptions): Promise<SDKModel[]>;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* List GitHub repositories the authenticated user has connected to Cursor.
|
|
99
|
-
*/
|
|
100
|
-
static readonly repositories: {
|
|
101
|
-
list(options?: CursorRequestOptions): Promise<SDKRepository[]>;
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-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,OAAO,CAAC,aAAa,EAAE,CAAC;MAK9D;CACH"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { V1CustomSubagent } from "./cloud-api-client.js";
|
|
2
|
-
import type { AgentDefinition, ModelSelection } from "./options.js";
|
|
3
|
-
import type { RuntimeCustomSubagentDefinition } from "./run-store-public-types.js";
|
|
4
|
-
export interface SDKCustomSubagentDefinition {
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
prompt: string;
|
|
8
|
-
model: ModelSelection | "inherit";
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Convert SDK `AgentOptions.agents` to a plain, serializable custom subagent
|
|
12
|
-
* shape. Inline `McpServerConfig` entries on a subagent are rejected; SDK
|
|
13
|
-
* custom subagents inherit the parent agent's MCP config.
|
|
14
|
-
*/
|
|
15
|
-
export declare function convertAgentDefinitionsToCustomSubagents(agents: Record<string, AgentDefinition> | undefined): SDKCustomSubagentDefinition[] | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Convert SDK `AgentOptions.agents` to the `V1CustomSubagent[]` shape the
|
|
18
|
-
* cloud API expects.
|
|
19
|
-
*/
|
|
20
|
-
export declare function convertAgentDefinitionsToV1CustomSubagents(agents: Record<string, AgentDefinition> | undefined): V1CustomSubagent[] | undefined;
|
|
21
|
-
export declare function convertAgentDefinitionsToRuntimeCustomSubagents(agents: Record<string, AgentDefinition> | undefined): RuntimeCustomSubagentDefinition[] | undefined;
|
|
22
|
-
//# sourceMappingURL=subagent-conversion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-conversion.d.ts","sourceRoot":"","sources":["../../src/agent/subagent-conversion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAEnF,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,cAAc,GAAG,SAAS,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,GAClD,2BAA2B,EAAE,GAAG,SAAS,CAqC3C;AAED;;;GAGG;AACH,wBAAgB,0CAA0C,CACxD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,GAClD,gBAAgB,EAAE,GAAG,SAAS,CAEhC;AAED,wBAAgB,+CAA+C,CAC7D,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,GAClD,+BAA+B,EAAE,GAAG,SAAS,CAY/C"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type ToolPayloadTruncated = {
|
|
2
|
-
args?: boolean;
|
|
3
|
-
result?: boolean;
|
|
4
|
-
};
|
|
5
|
-
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
6
|
-
export declare function isToolPayloadTruncated(value: unknown): value is ToolPayloadTruncated;
|
|
7
|
-
//# sourceMappingURL=tool-call-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-call-utils.d.ts","sourceRoot":"","sources":["../../src/agent/tool-call-utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,oBAAoB,CAQ/B"}
|