@cursor/sdk 1.0.15 → 1.0.17
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 +1 -19
- package/dist/cjs/agent.d.ts +8 -0
- package/dist/cjs/agent.d.ts.map +1 -1
- package/dist/cjs/core-adapter.d.ts +1 -1
- package/dist/cjs/executor-common.d.ts +4 -0
- package/dist/cjs/executor-common.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/local-executor.d.ts +1 -1
- package/dist/cjs/local-executor.d.ts.map +1 -1
- package/dist/cjs/options.d.ts +34 -2
- package/dist/cjs/options.d.ts.map +1 -1
- package/dist/cjs/platform.d.ts +4 -5
- package/dist/cjs/platform.d.ts.map +1 -1
- package/dist/cjs/public-api.d.ts +8 -3
- package/dist/cjs/public-api.d.ts.map +1 -1
- package/dist/cjs/run-event-notifier-api.d.ts +120 -0
- package/dist/cjs/run-event-notifier-api.d.ts.map +1 -0
- package/dist/cjs/run-event-tailer.d.ts +1 -1
- package/dist/cjs/run-store-public-types.d.ts +173 -0
- package/dist/cjs/run-store-public-types.d.ts.map +1 -0
- package/dist/cjs/sdk-config.d.ts +24 -0
- package/dist/cjs/sdk-config.d.ts.map +1 -0
- package/dist/cjs/store/index.d.ts +8 -0
- package/dist/cjs/store/index.d.ts.map +1 -0
- package/dist/cjs/store/jsonl-local-agent-store.d.ts +34 -0
- package/dist/cjs/store/jsonl-local-agent-store.d.ts.map +1 -0
- package/dist/cjs/store/local-agent-record-conversion.d.ts +7 -0
- package/dist/cjs/store/local-agent-record-conversion.d.ts.map +1 -0
- package/dist/cjs/store/local-agent-store.d.ts +288 -0
- package/dist/cjs/store/local-agent-store.d.ts.map +1 -0
- package/dist/cjs/store/sdk-local-defaults.d.ts +15 -0
- package/dist/cjs/store/sdk-local-defaults.d.ts.map +1 -0
- package/dist/cjs/store/sdk-state-root.d.ts +6 -0
- package/dist/cjs/store/sdk-state-root.d.ts.map +1 -0
- package/dist/cjs/store/sqlite-local-agent-store.d.ts +30 -0
- package/dist/cjs/store/sqlite-local-agent-store.d.ts.map +1 -0
- package/dist/cjs/stubs.d.ts +6 -0
- package/dist/cjs/stubs.d.ts.map +1 -1
- package/dist/cjs/subagent-conversion.d.ts +1 -1
- package/dist/cjs/subagent-conversion.d.ts.map +1 -1
- package/dist/cjs/types/conversation-types.d.ts +33 -33
- package/dist/cjs/types/delta-types.d.ts +1 -1
- package/dist/cjs/types/tool-call-types.d.ts +1 -1
- package/dist/cjs/utils/message-schemas.d.ts +1 -1
- package/dist/cjs/vendor/cursor-sdk-shared/core-adapter.d.ts +3 -0
- package/dist/cjs/vendor/cursor-sdk-shared/delta-types.d.ts +19186 -0
- package/dist/cjs/vendor/cursor-sdk-shared/index.d.ts +4 -0
- package/dist/cjs/vendor/cursor-sdk-shared/message-schemas.d.ts +105 -0
- package/dist/cjs/vendor/cursor-sdk-shared/tool-call-types.d.ts +7894 -0
- package/dist/esm/agent.d.ts +8 -0
- package/dist/esm/agent.d.ts.map +1 -1
- package/dist/esm/core-adapter.d.ts +1 -1
- package/dist/esm/executor-common.d.ts +4 -0
- package/dist/esm/executor-common.d.ts.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/local-executor.d.ts +1 -1
- package/dist/esm/local-executor.d.ts.map +1 -1
- package/dist/esm/options.d.ts +34 -2
- package/dist/esm/options.d.ts.map +1 -1
- package/dist/esm/platform.d.ts +4 -5
- package/dist/esm/platform.d.ts.map +1 -1
- package/dist/esm/public-api.d.ts +8 -3
- package/dist/esm/public-api.d.ts.map +1 -1
- package/dist/esm/run-event-notifier-api.d.ts +120 -0
- package/dist/esm/run-event-notifier-api.d.ts.map +1 -0
- package/dist/esm/run-event-tailer.d.ts +1 -1
- package/dist/esm/run-store-public-types.d.ts +173 -0
- package/dist/esm/run-store-public-types.d.ts.map +1 -0
- package/dist/esm/sdk-config.d.ts +24 -0
- package/dist/esm/sdk-config.d.ts.map +1 -0
- package/dist/esm/store/index.d.ts +8 -0
- package/dist/esm/store/index.d.ts.map +1 -0
- package/dist/esm/store/jsonl-local-agent-store.d.ts +34 -0
- package/dist/esm/store/jsonl-local-agent-store.d.ts.map +1 -0
- package/dist/esm/store/local-agent-record-conversion.d.ts +7 -0
- package/dist/esm/store/local-agent-record-conversion.d.ts.map +1 -0
- package/dist/esm/store/local-agent-store.d.ts +288 -0
- package/dist/esm/store/local-agent-store.d.ts.map +1 -0
- package/dist/esm/store/sdk-local-defaults.d.ts +15 -0
- package/dist/esm/store/sdk-local-defaults.d.ts.map +1 -0
- package/dist/esm/store/sdk-state-root.d.ts +6 -0
- package/dist/esm/store/sdk-state-root.d.ts.map +1 -0
- package/dist/esm/store/sqlite-local-agent-store.d.ts +30 -0
- package/dist/esm/store/sqlite-local-agent-store.d.ts.map +1 -0
- package/dist/esm/stubs.d.ts +6 -0
- package/dist/esm/stubs.d.ts.map +1 -1
- package/dist/esm/subagent-conversion.d.ts +1 -1
- package/dist/esm/subagent-conversion.d.ts.map +1 -1
- package/dist/esm/types/conversation-types.d.ts +33 -33
- package/dist/esm/types/delta-types.d.ts +1 -1
- package/dist/esm/types/tool-call-types.d.ts +1 -1
- package/dist/esm/utils/message-schemas.d.ts +1 -1
- package/dist/esm/vendor/cursor-sdk-shared/core-adapter.d.ts +3 -0
- package/dist/esm/vendor/cursor-sdk-shared/delta-types.d.ts +19186 -0
- package/dist/esm/vendor/cursor-sdk-shared/index.d.ts +4 -0
- package/dist/esm/vendor/cursor-sdk-shared/message-schemas.d.ts +105 -0
- package/dist/esm/vendor/cursor-sdk-shared/tool-call-types.d.ts +7894 -0
- package/package.json +8 -6
|
@@ -0,0 +1,288 @@
|
|
|
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 agentId: string;
|
|
13
|
+
readonly turnNumber: number;
|
|
14
|
+
readonly status: LocalAgentRunStatus;
|
|
15
|
+
readonly model?: ModelSelection | null;
|
|
16
|
+
readonly result?: string | null;
|
|
17
|
+
readonly error?: string | null;
|
|
18
|
+
readonly usageRef?: string | null;
|
|
19
|
+
readonly createdAt: number;
|
|
20
|
+
readonly updatedAt: number;
|
|
21
|
+
readonly startedAt?: number | null;
|
|
22
|
+
readonly endedAt?: number | null;
|
|
23
|
+
/** Snapshot at run creation (mirrors `runs.start_checkpoint_ref` in SQLite). */
|
|
24
|
+
readonly startCheckpointRef?: LocalAgentCheckpointRef | null;
|
|
25
|
+
/** Latest checkpoint for this run (mirrors `runs.latest_checkpoint_ref`). */
|
|
26
|
+
readonly latestCheckpointRef?: LocalAgentCheckpointRef | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Agent metadata persisted by a custom local store. Run rows live on
|
|
30
|
+
* {@link LocalAgentStore.runs} separately, or a bundled in-memory layout that
|
|
31
|
+
* co-locates runs per agent while still exposing both substores.
|
|
32
|
+
*/
|
|
33
|
+
export interface LocalAgentDocument {
|
|
34
|
+
readonly agentId: string;
|
|
35
|
+
readonly cwd: string;
|
|
36
|
+
readonly status: LocalAgentStatus;
|
|
37
|
+
readonly activeRunId?: string | null;
|
|
38
|
+
readonly name?: string | null;
|
|
39
|
+
readonly createdAt: number;
|
|
40
|
+
readonly updatedAt: number;
|
|
41
|
+
readonly latestCheckpoint?: LocalAgentCheckpointRef | null;
|
|
42
|
+
/**
|
|
43
|
+
* SDK-owned metadata. Stores should persist and return it unchanged.
|
|
44
|
+
*/
|
|
45
|
+
readonly sdkMetadata?: Record<string, unknown>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Agent delete filter. When `agentIds` is omitted or empty, every agent row
|
|
49
|
+
* matches (use with care on `delete`).
|
|
50
|
+
*/
|
|
51
|
+
export interface LocalAgentAgentFilter {
|
|
52
|
+
readonly agentIds?: readonly string[];
|
|
53
|
+
readonly cwd?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Agent list filter. When `cwd` is omitted, agents from every workspace in the
|
|
57
|
+
* store are listed.
|
|
58
|
+
*/
|
|
59
|
+
export interface LocalAgentListFilter {
|
|
60
|
+
/** Opaque cursor from a previous page's `nextCursor` (id-based, not an offset). */
|
|
61
|
+
readonly cursor?: string;
|
|
62
|
+
readonly limit?: number;
|
|
63
|
+
/** When set, only agents whose persisted `cwd` matches are listed. */
|
|
64
|
+
readonly cwd?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Paged list result for {@link LocalAgentStore.agents},
|
|
68
|
+
* {@link LocalAgentStore.runs}, and {@link LocalAgentStore.checkpoints}.
|
|
69
|
+
* Resume with `filter.cursor` from the previous page's `nextCursor` (opaque,
|
|
70
|
+
* id-based — not a row offset).
|
|
71
|
+
*/
|
|
72
|
+
export interface LocalAgentStoreListResult<T> {
|
|
73
|
+
readonly items: readonly T[];
|
|
74
|
+
readonly nextCursor?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Run list/delete filter. When both `agentIds` and `runIds` are omitted or empty,
|
|
78
|
+
* every run matches (list returns all runs; delete removes all runs — use with care).
|
|
79
|
+
*/
|
|
80
|
+
export interface LocalAgentRunFilter {
|
|
81
|
+
readonly agentIds?: readonly string[];
|
|
82
|
+
readonly runIds?: readonly string[];
|
|
83
|
+
/** Opaque cursor from a previous page's `nextCursor` (id-based, not an offset). */
|
|
84
|
+
readonly cursor?: string;
|
|
85
|
+
readonly limit?: number;
|
|
86
|
+
}
|
|
87
|
+
/** @deprecated Use {@link LocalAgentRunFilter}. */
|
|
88
|
+
export type RunFilter = LocalAgentRunFilter;
|
|
89
|
+
/**
|
|
90
|
+
* Checkpoint blob list/delete filter. When `agentIds` and `blobIds` are both
|
|
91
|
+
* omitted or empty, every blob matches (use with care on `delete`).
|
|
92
|
+
*/
|
|
93
|
+
export interface LocalAgentCheckpointFilter {
|
|
94
|
+
readonly agentIds?: readonly string[];
|
|
95
|
+
readonly blobIds?: readonly string[];
|
|
96
|
+
readonly cursor?: string;
|
|
97
|
+
readonly limit?: number;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Run event delete filter. When `runIds` is omitted or empty, every run event
|
|
101
|
+
* row matches (use with care on `delete`).
|
|
102
|
+
*/
|
|
103
|
+
export interface LocalAgentRunEventFilter {
|
|
104
|
+
readonly runIds?: readonly string[];
|
|
105
|
+
}
|
|
106
|
+
/** Opaque resume token for a run event stream (exclusive `afterOffset` on list). */
|
|
107
|
+
export type LocalAgentRunEventOffset = string;
|
|
108
|
+
export interface LocalAgentRunEventDocument {
|
|
109
|
+
readonly runId: string;
|
|
110
|
+
readonly seq: number;
|
|
111
|
+
readonly offset: LocalAgentRunEventOffset;
|
|
112
|
+
readonly eventType: string;
|
|
113
|
+
readonly payload: unknown;
|
|
114
|
+
readonly payloadRef: string | null;
|
|
115
|
+
readonly idempotencyKey: string | null;
|
|
116
|
+
readonly createdAt: number;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Paged tail of a single run's event stream. Unlike catalog lists, pagination uses
|
|
120
|
+
* {@link LocalAgentRunEventOffset} (`afterOffset` / `nextOffset`) because events are
|
|
121
|
+
* append-only and ordered by sequence, not by sortable row ids.
|
|
122
|
+
*/
|
|
123
|
+
export interface LocalAgentRunEventListResult {
|
|
124
|
+
readonly items: readonly LocalAgentRunEventDocument[];
|
|
125
|
+
readonly nextOffset?: LocalAgentRunEventOffset;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Per-agent checkpoint bytes (content-addressed). Same role as
|
|
129
|
+
* `stateRoot/agents/<hash>/store.db` in the default layout.
|
|
130
|
+
*/
|
|
131
|
+
export interface LocalAgentStoreCheckpoints {
|
|
132
|
+
get(input: {
|
|
133
|
+
readonly agentId: string;
|
|
134
|
+
readonly blobId: string;
|
|
135
|
+
}): Promise<Uint8Array | null>;
|
|
136
|
+
/**
|
|
137
|
+
* Persists bytes for a content-addressed blob. Returns `void` (no row document);
|
|
138
|
+
* callers already know `agentId` and `blobId`.
|
|
139
|
+
*/
|
|
140
|
+
create(input: {
|
|
141
|
+
readonly agentId: string;
|
|
142
|
+
readonly blobId: string;
|
|
143
|
+
readonly data: Uint8Array;
|
|
144
|
+
}): Promise<void>;
|
|
145
|
+
/** Overwrites blob bytes. Returns `void`; use {@link get} to read back. */
|
|
146
|
+
update(input: {
|
|
147
|
+
readonly agentId: string;
|
|
148
|
+
readonly blobId: string;
|
|
149
|
+
readonly data: Uint8Array;
|
|
150
|
+
}): Promise<void>;
|
|
151
|
+
delete(input: {
|
|
152
|
+
readonly filter: LocalAgentCheckpointFilter;
|
|
153
|
+
}): Promise<void>;
|
|
154
|
+
list(input?: {
|
|
155
|
+
readonly filter?: LocalAgentCheckpointFilter;
|
|
156
|
+
}): Promise<LocalAgentStoreListResult<string>>;
|
|
157
|
+
}
|
|
158
|
+
/** Agent rows for a custom {@link LocalAgentStore}. */
|
|
159
|
+
export interface LocalAgentStoreAgents {
|
|
160
|
+
get(input: {
|
|
161
|
+
readonly agentId: string;
|
|
162
|
+
}): Promise<LocalAgentDocument | null>;
|
|
163
|
+
create(input: {
|
|
164
|
+
readonly agent: LocalAgentDocument;
|
|
165
|
+
}): Promise<LocalAgentDocument>;
|
|
166
|
+
update(input: {
|
|
167
|
+
readonly agent: LocalAgentDocument;
|
|
168
|
+
}): Promise<LocalAgentDocument>;
|
|
169
|
+
delete(input: {
|
|
170
|
+
readonly filter: LocalAgentAgentFilter;
|
|
171
|
+
}): Promise<void>;
|
|
172
|
+
list(input?: {
|
|
173
|
+
readonly filter?: LocalAgentListFilter;
|
|
174
|
+
}): Promise<LocalAgentStoreListResult<LocalAgentDocument>>;
|
|
175
|
+
}
|
|
176
|
+
/** Run rows for a custom {@link LocalAgentStore}. */
|
|
177
|
+
export interface LocalAgentStoreRuns {
|
|
178
|
+
get(input: {
|
|
179
|
+
readonly agentId: string;
|
|
180
|
+
readonly runId: string;
|
|
181
|
+
}): Promise<LocalAgentRunDocument | null>;
|
|
182
|
+
create(input: {
|
|
183
|
+
readonly run: LocalAgentRunDocument;
|
|
184
|
+
}): Promise<LocalAgentRunDocument>;
|
|
185
|
+
update(input: {
|
|
186
|
+
readonly run: LocalAgentRunDocument;
|
|
187
|
+
}): Promise<LocalAgentRunDocument>;
|
|
188
|
+
/** Deletes runs matching {@link LocalAgentRunFilter}; an empty filter deletes all runs. */
|
|
189
|
+
delete(input: {
|
|
190
|
+
readonly filter: LocalAgentRunFilter;
|
|
191
|
+
}): Promise<void>;
|
|
192
|
+
list(input?: {
|
|
193
|
+
readonly filter?: LocalAgentRunFilter;
|
|
194
|
+
}): Promise<LocalAgentStoreListResult<LocalAgentRunDocument>>;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Durable run stream log (`run_events` in default SQLite). Append-only: use
|
|
198
|
+
* {@link append}, {@link list} with exclusive `afterOffset`, and {@link delete}
|
|
199
|
+
* for agent/run cleanup.
|
|
200
|
+
*/
|
|
201
|
+
export interface LocalAgentStoreRunEvents {
|
|
202
|
+
append(input: {
|
|
203
|
+
readonly runId: string;
|
|
204
|
+
readonly eventType: string;
|
|
205
|
+
readonly payload?: unknown;
|
|
206
|
+
readonly payloadRef?: string | null;
|
|
207
|
+
readonly idempotencyKey?: string | null;
|
|
208
|
+
}): Promise<LocalAgentRunEventDocument>;
|
|
209
|
+
/**
|
|
210
|
+
* Lists events for one `runId`. Pass `afterOffset` from a prior page's
|
|
211
|
+
* `nextOffset` (exclusive resume), not `filter.cursor`.
|
|
212
|
+
*/
|
|
213
|
+
list(input: {
|
|
214
|
+
readonly runId: string;
|
|
215
|
+
readonly afterOffset?: LocalAgentRunEventOffset | null;
|
|
216
|
+
readonly limit?: number;
|
|
217
|
+
}): Promise<LocalAgentRunEventListResult>;
|
|
218
|
+
delete(input: {
|
|
219
|
+
readonly filter: LocalAgentRunEventFilter;
|
|
220
|
+
}): Promise<void>;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Custom persistence for local SDK agents. Implement this interface (or
|
|
224
|
+
* {@link composeLocalAgentStore}) when you need to own where agent metadata,
|
|
225
|
+
* checkpoint blobs, runs, and run events are stored.
|
|
226
|
+
*
|
|
227
|
+
* When `local.store` / `localStore` is omitted, the SDK opens
|
|
228
|
+
* {@link SqliteLocalAgentStore} (on-disk SQLite under the workspace state root).
|
|
229
|
+
* Implement {@link LocalAgentStore} yourself only when replacing that layout.
|
|
230
|
+
*
|
|
231
|
+
* Table alignment (default SQLite names in parentheses):
|
|
232
|
+
* {@link agents} (`agents`), {@link checkpoints} (`checkpoints` / per-agent blob
|
|
233
|
+
* dirs), {@link runs} (`runs`), {@link runEvents} (`run_events`).
|
|
234
|
+
*
|
|
235
|
+
* Pagination: catalog substores use `filter.cursor` / `nextCursor`; run events
|
|
236
|
+
* use `afterOffset` / `nextOffset` on a single run stream (see
|
|
237
|
+
* {@link LocalAgentStoreRunEvents.list}).
|
|
238
|
+
*
|
|
239
|
+
* Built-in backends (exported from `@cursor/sdk`): default
|
|
240
|
+
* {@link SqliteLocalAgentStore}; portable {@link JsonlLocalAgentStore}.
|
|
241
|
+
*/
|
|
242
|
+
export interface LocalAgentStore {
|
|
243
|
+
readonly agents: LocalAgentStoreAgents;
|
|
244
|
+
readonly checkpoints: LocalAgentStoreCheckpoints;
|
|
245
|
+
readonly runs: LocalAgentStoreRuns;
|
|
246
|
+
readonly runEvents: LocalAgentStoreRunEvents;
|
|
247
|
+
}
|
|
248
|
+
interface LocalAgentStoreAdapters {
|
|
249
|
+
readonly store: AgentRunStore;
|
|
250
|
+
readonly checkpointStore: AgentCheckpointStore;
|
|
251
|
+
readonly eventStore: RunEventStore;
|
|
252
|
+
}
|
|
253
|
+
export declare function createLocalAgentStoreAdapters(options: {
|
|
254
|
+
localStore: LocalAgentStore;
|
|
255
|
+
workspaceRef: string;
|
|
256
|
+
/**
|
|
257
|
+
* When set (caller passed `cwd`), agent reads are limited to rows with that
|
|
258
|
+
* `cwd`. When omitted, reads see every agent in the store.
|
|
259
|
+
*/
|
|
260
|
+
scopedWorkspaceRef?: string;
|
|
261
|
+
}): LocalAgentStoreAdapters;
|
|
262
|
+
/**
|
|
263
|
+
* In-memory store with separate agent and run maps (relational layout).
|
|
264
|
+
*/
|
|
265
|
+
export declare function createInMemoryLocalAgentStore(): LocalAgentStore;
|
|
266
|
+
/** In-memory bundled layout (tests / SDK-internal; not exported from `@cursor/sdk`). */
|
|
267
|
+
export declare function createBundledLocalAgentStore(): LocalAgentStore;
|
|
268
|
+
/** Combine separately implemented substores into one {@link LocalAgentStore}. */
|
|
269
|
+
export declare function composeLocalAgentStore(parts: {
|
|
270
|
+
readonly agents: LocalAgentStoreAgents;
|
|
271
|
+
readonly checkpoints: LocalAgentStoreCheckpoints;
|
|
272
|
+
readonly runs: LocalAgentStoreRuns;
|
|
273
|
+
readonly runEvents: LocalAgentStoreRunEvents;
|
|
274
|
+
}): LocalAgentStore;
|
|
275
|
+
export declare function matchesAgentFilter(agent: LocalAgentDocument, filter?: LocalAgentAgentFilter): boolean;
|
|
276
|
+
export declare function matchesCheckpointFilter(key: {
|
|
277
|
+
agentId: string;
|
|
278
|
+
blobId: string;
|
|
279
|
+
}, filter?: LocalAgentCheckpointFilter): boolean;
|
|
280
|
+
/** Paginate checkpoint blob ids sorted lexicographically. */
|
|
281
|
+
export declare function paginateCheckpointBlobIds(blobIds: readonly string[], options?: Pick<LocalAgentCheckpointFilter, "cursor" | "limit">): LocalAgentStoreListResult<string>;
|
|
282
|
+
export declare function matchesRunFilter(run: LocalAgentRunDocument, filter?: LocalAgentRunFilter): boolean;
|
|
283
|
+
/** Paginate agents sorted by `updatedAt` desc, then `agentId` desc. */
|
|
284
|
+
export declare function paginateAgentDocuments(items: readonly LocalAgentDocument[], filter?: Pick<LocalAgentListFilter, "cursor" | "limit" | "cwd">): LocalAgentStoreListResult<LocalAgentDocument>;
|
|
285
|
+
/** Paginate runs sorted by `turnNumber` asc, then `runId` asc. */
|
|
286
|
+
export declare function paginateRunDocuments(items: readonly LocalAgentRunDocument[], options?: Pick<LocalAgentRunFilter, "cursor" | "limit">): LocalAgentStoreListResult<LocalAgentRunDocument>;
|
|
287
|
+
export {};
|
|
288
|
+
//# sourceMappingURL=local-agent-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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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EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACxC,MAAM,CAAC,EAAE,0BAA0B,GAClC,OAAO,CAWT;AAgCD,6DAA6D;AAC7D,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,IAAI,CAAC,0BAA0B,EAAE,QAAQ,GAAG,OAAO,CAAC,GAC7D,yBAAyB,CAAC,MAAM,CAAC,CAanC;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,qBAAqB,EAC1B,MAAM,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/dist/esm/stubs.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ConfigurationError } from "./errors.js";
|
|
|
4
4
|
import type { SDKMessage } from "./messages.js";
|
|
5
5
|
import type { AgentOptions, SDKUserMessage } from "./options.js";
|
|
6
6
|
import type { Run, RunOperation, RunResult, RunStatus } from "./run.js";
|
|
7
|
+
import { type CursorConfigureOptions } from "./sdk-config.js";
|
|
7
8
|
import type { ConversationTurn } from "./types/conversation-types.js";
|
|
8
9
|
export declare function createUnimplementedError(apiName: string): ConfigurationError;
|
|
9
10
|
export declare class UnimplementedRun implements Run {
|
|
@@ -78,6 +79,11 @@ export declare class Agent {
|
|
|
78
79
|
*/
|
|
79
80
|
export declare class Cursor {
|
|
80
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;
|
|
81
87
|
/**
|
|
82
88
|
* Get metadata about the authenticated user / API key.
|
|
83
89
|
*/
|
package/dist/esm/stubs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../src/agent/stubs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,OAAO,EACP,WAAW,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAgB,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAiBjE,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,CAK5E;AAaD,qBAAa,gBAAiB,YAAW,GAAG;IAC1C,QAAQ,CAAC,EAAE,uBAAuB;IAClC,QAAQ,CAAC,OAAO,yBAAyB;IACzC,QAAQ,CAAC,MAAM,YAAa;IAC5B,QAAQ,CAAC,KAAK,YAAa;IAC3B,QAAQ,CAAC,UAAU,YAAa;IAChC,QAAQ,CAAC,GAAG,YAAa;IAEzB,QAAQ,CAAC,UAA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C,YAAY;uBACX,oBAAoB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;MAK9D;CACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RuntimeCustomSubagentDefinition } from "@anysphere/cursor-sdk-local-runtime";
|
|
2
1
|
import type { V1CustomSubagent } from "./cloud-api-client.js";
|
|
3
2
|
import type { AgentDefinition, ModelSelection } from "./options.js";
|
|
3
|
+
import type { RuntimeCustomSubagentDefinition } from "./run-store-public-types.js";
|
|
4
4
|
export interface SDKCustomSubagentDefinition {
|
|
5
5
|
name: string;
|
|
6
6
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-conversion.d.ts","sourceRoot":"","sources":["../../src/agent/subagent-conversion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE
|
|
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"}
|