@feltdb/core 0.11.9 → 0.12.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/agent-state.d.ts +489 -0
- package/dist/agent-state.d.ts.map +1 -0
- package/dist/agent-state.js +993 -0
- package/dist/build-identity.json +19 -0
- package/dist/cli/index.js +0 -0
- package/dist/create/build-identity.json +19 -0
- package/dist/create/package-versions.js +1 -1
- package/dist/create/server-source/crates/feltdb/src/lib.rs +11 -0
- package/dist/create/server-source/crates/feltdb/src/query_performance.rs +4 -1
- package/dist/create/server-source/crates/feltdb/src/state_model.rs +854 -155
- package/dist/create/server-source/crates/feltdb/tests/generalized_version_control_substrate_completion.rs +31 -13
- package/dist/create/server-source/crates/feltdb/tests/state_ref_authority.rs +918 -0
- package/dist/create/server-source/crates/feltdb/tests/workload_envelope_contract.rs +15 -2
- package/dist/create/server-source/crates/feltdb-server/Cargo.toml +4 -0
- package/dist/create/server-source/crates/feltdb-server/benches/query_shape_observer.rs +136 -0
- package/dist/create/server-source/crates/feltdb-server/src/app_state.rs +3 -0
- package/dist/create/server-source/crates/feltdb-server/src/lib.rs +1 -0
- package/dist/create/server-source/crates/feltdb-server/src/main.rs +74 -5
- package/dist/create/server-source/crates/feltdb-server/src/query_shape.rs +1137 -0
- package/dist/create/server-source/crates/feltdb-server/tests/fixtures/query-shape-trace.expected.json +300 -0
- package/dist/create/server-source/crates/feltdb-server/tests/fixtures/query-shape-trace.json +25 -0
- package/dist/create/server-source/crates/feltdb-server/tests/query_shape_trace.rs +128 -0
- package/dist/create/server-source/crates/feltdb-wasm/test.db +0 -0
- package/dist/index-core.d.ts +1 -0
- package/dist/index-core.d.ts.map +1 -1
- package/dist/index-core.js +1 -0
- package/dist/studio/app.d.ts.map +1 -1
- package/dist/studio/components/GlobalSearch.d.ts.map +1 -1
- package/dist/studio/components/index.js +1 -1
- package/dist/studio/{components-BHTKlUgT.js → components-Bivm2lX6.js} +2 -1
- package/dist/studio/control-plane/Agents.d.ts.map +1 -1
- package/dist/studio/control-plane/Data.d.ts.map +1 -1
- package/dist/studio/control-plane/Operations.d.ts.map +1 -1
- package/dist/studio/control-plane/Overview.d.ts.map +1 -1
- package/dist/studio/control-plane/Schema.d.ts.map +1 -1
- package/dist/studio/control-plane/State.d.ts +11 -0
- package/dist/studio/control-plane/State.d.ts.map +1 -1
- package/dist/studio/control-plane/index.d.ts +1 -1
- package/dist/studio/control-plane/index.d.ts.map +1 -1
- package/dist/studio/control-plane/index.js +2 -2
- package/dist/studio/control-plane/primitives.d.ts +14 -2
- package/dist/studio/control-plane/primitives.d.ts.map +1 -1
- package/dist/studio/control-plane-CLm69XwX.js +4121 -0
- package/dist/studio/index.js +266 -235
- package/dist/studio/studio.css +1 -1
- package/dist/studio-app/assets/{feltdb_wasm-DGGqm9GK.js → feltdb_wasm-DACcD-zs.js} +1 -1
- package/dist/studio-app/assets/feltdb_wasm_bg-BejThWID.wasm +0 -0
- package/dist/studio-app/assets/index-CiC8VY-a.css +1 -0
- package/dist/studio-app/assets/index-CoZaxnlm.js +30 -0
- package/dist/studio-app/index.html +2 -2
- package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
- package/package.json +2 -2
- package/dist/studio/control-plane-DP8ljTDO.js +0 -3207
- package/dist/studio-app/assets/feltdb_wasm_bg-BYJo87WY.wasm +0 -0
- package/dist/studio-app/assets/index-BrsF-kWL.css +0 -1
- package/dist/studio-app/assets/index-qLeZcPW_.js +0 -30
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable agent state: tasks, checkpoints, scoped memory, and handoffs.
|
|
3
|
+
*
|
|
4
|
+
* Everything here is ordinary FeltDB state in four `_feltdb.Agent*`
|
|
5
|
+
* collections. No new storage, cache, or authority is introduced:
|
|
6
|
+
*
|
|
7
|
+
* - every write is one `db.transaction`, fenced by the authority's own
|
|
8
|
+
* `ifVersion` / `requireAbsent` / `expectedLeaseId` predicates, so a stale
|
|
9
|
+
* or concurrent write is refused by the authority rather than by this module;
|
|
10
|
+
* - every read is `collection.get` by id or a bounded `db.query` on a declared
|
|
11
|
+
* compound index; nothing reads a whole collection;
|
|
12
|
+
* - nothing is held in process memory between calls, so a fresh process (or a
|
|
13
|
+
* different agent, framework, or model provider) resumes from exactly what
|
|
14
|
+
* was committed.
|
|
15
|
+
*
|
|
16
|
+
* createTask ──▶ _feltdb.AgentTask (head: status, owner, checkpoint_version)
|
|
17
|
+
* _feltdb.AgentCheckpoint (immutable, one per version)
|
|
18
|
+
* checkpoint ──▶ task@N → N+1 + checkpoint vN+1 + evidence fences, one commit
|
|
19
|
+
* remember ──▶ _feltdb.AgentMemory (scoped; superseded, never rewritten)
|
|
20
|
+
* handoff ──▶ _feltdb.AgentHandoff (a reference to task@checkpoint)
|
|
21
|
+
* claim ──▶ handoff open → claimed (leased) + task owner, one commit
|
|
22
|
+
*
|
|
23
|
+
* Provider identifiers, token counts, and transcript references are optional
|
|
24
|
+
* `execution` metadata on a checkpoint. They never decide status, ownership,
|
|
25
|
+
* or what a resume returns.
|
|
26
|
+
*
|
|
27
|
+
* Contract and guarantees: docs/reference/agent-state.md.
|
|
28
|
+
*/
|
|
29
|
+
import type { AuthorityQueryPage, AuthorityQueryRequest } from './http-db.js';
|
|
30
|
+
import type { IndexConfig } from './index-types.js';
|
|
31
|
+
import { type AtomicTransactionOptions, type AtomicTransactionResult, type AtomicTransactionScope } from './transaction.js';
|
|
32
|
+
export declare const FELTDB_AGENT_TASK_COLLECTION = "_feltdb.AgentTask";
|
|
33
|
+
export declare const FELTDB_AGENT_CHECKPOINT_COLLECTION = "_feltdb.AgentCheckpoint";
|
|
34
|
+
export declare const FELTDB_AGENT_MEMORY_COLLECTION = "_feltdb.AgentMemory";
|
|
35
|
+
export declare const FELTDB_AGENT_HANDOFF_COLLECTION = "_feltdb.AgentHandoff";
|
|
36
|
+
export declare const AGENT_CONTEXT_FORMAT = "feltdb.agent-context@1";
|
|
37
|
+
/** Compound indexes every agent-state query is planned against. */
|
|
38
|
+
export declare const AGENT_STATE_INDEXES: ReadonlyArray<{
|
|
39
|
+
collection: string;
|
|
40
|
+
index: IndexConfig;
|
|
41
|
+
}>;
|
|
42
|
+
export type AgentTaskStatus = 'ready' | 'running' | 'blocked' | 'completed' | 'cancelled';
|
|
43
|
+
export type AgentStateErrorCode = 'INVALID_REQUEST' | 'NOT_FOUND' | 'VERSION_CONFLICT' | 'INVALID_TRANSITION' | 'OWNERSHIP_CONFLICT' | 'HANDOFF_CLAIMED' | 'HANDOFF_STALE' | 'SCOPE_REQUIRED' | 'BUDGET_EXCEEDED' | 'CONTRACT_UNSUPPORTED';
|
|
44
|
+
/** Every refusal. A refused write committed nothing. */
|
|
45
|
+
export declare class AgentStateError extends Error {
|
|
46
|
+
readonly code: AgentStateErrorCode;
|
|
47
|
+
readonly detail: Record<string, unknown>;
|
|
48
|
+
constructor(code: AgentStateErrorCode, message: string, detail?: Record<string, unknown>);
|
|
49
|
+
}
|
|
50
|
+
/** A task's relevance scope. Not authorization: that is the database's authority scope. */
|
|
51
|
+
export interface AgentTaskScope {
|
|
52
|
+
project?: string;
|
|
53
|
+
workspace?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Evidence a checkpoint cites.
|
|
57
|
+
*
|
|
58
|
+
* A `record` reference names committed FeltDB state; the checkpoint commit
|
|
59
|
+
* requires it to exist (at `version`, when given) inside the same transaction,
|
|
60
|
+
* so it is `verified`. An `external` reference (a file, a CI run, a URL) is
|
|
61
|
+
* kept as given and marked unverified. A claim in `completed` is never
|
|
62
|
+
* evidence by itself.
|
|
63
|
+
*/
|
|
64
|
+
export type AgentEvidenceInput = {
|
|
65
|
+
kind: 'record';
|
|
66
|
+
collection: string;
|
|
67
|
+
id: string;
|
|
68
|
+
version?: number;
|
|
69
|
+
description?: string;
|
|
70
|
+
} | {
|
|
71
|
+
kind: 'external';
|
|
72
|
+
uri: string;
|
|
73
|
+
digest?: string;
|
|
74
|
+
description?: string;
|
|
75
|
+
};
|
|
76
|
+
export type AgentEvidence = {
|
|
77
|
+
kind: 'record';
|
|
78
|
+
collection: string;
|
|
79
|
+
id: string;
|
|
80
|
+
version: number;
|
|
81
|
+
verified: true;
|
|
82
|
+
description?: string;
|
|
83
|
+
checkpoint_version: number;
|
|
84
|
+
} | {
|
|
85
|
+
kind: 'external';
|
|
86
|
+
uri: string;
|
|
87
|
+
digest?: string;
|
|
88
|
+
verified: false;
|
|
89
|
+
description?: string;
|
|
90
|
+
checkpoint_version: number;
|
|
91
|
+
};
|
|
92
|
+
/** Optional, non-authoritative execution metadata. A closed set: no transcripts. */
|
|
93
|
+
export interface AgentExecutionMetadata {
|
|
94
|
+
adapter?: string;
|
|
95
|
+
provider?: string;
|
|
96
|
+
model?: string;
|
|
97
|
+
conversation_id?: string;
|
|
98
|
+
transcript_ref?: string;
|
|
99
|
+
input_tokens?: number;
|
|
100
|
+
output_tokens?: number;
|
|
101
|
+
}
|
|
102
|
+
export interface AgentTask {
|
|
103
|
+
task_id: string;
|
|
104
|
+
objective: string;
|
|
105
|
+
scope: AgentTaskScope;
|
|
106
|
+
status: AgentTaskStatus;
|
|
107
|
+
owner: string;
|
|
108
|
+
checkpoint_version: number;
|
|
109
|
+
pending_work: string[];
|
|
110
|
+
constraints: string[];
|
|
111
|
+
created_at: string;
|
|
112
|
+
created_by: string;
|
|
113
|
+
updated_at: string;
|
|
114
|
+
updated_by: string;
|
|
115
|
+
/** The authority's record version for the task head. Opaque to callers. */
|
|
116
|
+
revision: number;
|
|
117
|
+
}
|
|
118
|
+
export interface AgentCheckpoint {
|
|
119
|
+
checkpoint_id: string;
|
|
120
|
+
task_id: string;
|
|
121
|
+
version: number;
|
|
122
|
+
status: AgentTaskStatus;
|
|
123
|
+
summary: string;
|
|
124
|
+
/** Work completed since the previous checkpoint. */
|
|
125
|
+
completed: string[];
|
|
126
|
+
/** All work completed up to and including this checkpoint. */
|
|
127
|
+
completed_work: string[];
|
|
128
|
+
pending_work: string[];
|
|
129
|
+
constraints: string[];
|
|
130
|
+
decisions: string[];
|
|
131
|
+
/** All evidence cited up to and including this checkpoint. */
|
|
132
|
+
evidence: AgentEvidence[];
|
|
133
|
+
actor: string;
|
|
134
|
+
execution?: AgentExecutionMetadata;
|
|
135
|
+
created_at: string;
|
|
136
|
+
}
|
|
137
|
+
export interface CreateAgentTaskInput {
|
|
138
|
+
taskId?: string;
|
|
139
|
+
objective: string;
|
|
140
|
+
scope?: AgentTaskScope;
|
|
141
|
+
actor: string;
|
|
142
|
+
status?: Extract<AgentTaskStatus, 'ready' | 'running' | 'blocked'>;
|
|
143
|
+
pendingWork?: string[];
|
|
144
|
+
constraints?: string[];
|
|
145
|
+
summary?: string;
|
|
146
|
+
execution?: AgentExecutionMetadata;
|
|
147
|
+
}
|
|
148
|
+
export interface AgentCheckpointInput {
|
|
149
|
+
actor: string;
|
|
150
|
+
/** The checkpoint version this write is based on. A different committed version refuses it. */
|
|
151
|
+
expectedVersion?: number;
|
|
152
|
+
summary: string;
|
|
153
|
+
status?: AgentTaskStatus;
|
|
154
|
+
completed?: string[];
|
|
155
|
+
/** Replaces the pending work. Omitted: carried forward. */
|
|
156
|
+
pendingWork?: string[];
|
|
157
|
+
/** Replaces the constraints. Omitted: carried forward. */
|
|
158
|
+
constraints?: string[];
|
|
159
|
+
/** Appended to the decisions carried forward. */
|
|
160
|
+
decisions?: string[];
|
|
161
|
+
evidence?: AgentEvidenceInput[];
|
|
162
|
+
execution?: AgentExecutionMetadata;
|
|
163
|
+
}
|
|
164
|
+
export type AgentMemoryScope = {
|
|
165
|
+
kind: 'task';
|
|
166
|
+
taskId: string;
|
|
167
|
+
} | {
|
|
168
|
+
kind: 'project';
|
|
169
|
+
project: string;
|
|
170
|
+
} | {
|
|
171
|
+
kind: 'workspace';
|
|
172
|
+
workspace: string;
|
|
173
|
+
};
|
|
174
|
+
export type AgentMemoryStatus = 'active' | 'superseded' | 'invalidated';
|
|
175
|
+
export interface AgentMemorySource {
|
|
176
|
+
actor: string;
|
|
177
|
+
task_id?: string;
|
|
178
|
+
checkpoint_version?: number;
|
|
179
|
+
adapter?: string;
|
|
180
|
+
evidence?: string[];
|
|
181
|
+
}
|
|
182
|
+
export interface AgentMemory {
|
|
183
|
+
memory_id: string;
|
|
184
|
+
scope: AgentMemoryScope;
|
|
185
|
+
scope_key: string;
|
|
186
|
+
kind: string;
|
|
187
|
+
content: unknown;
|
|
188
|
+
source: AgentMemorySource;
|
|
189
|
+
status: AgentMemoryStatus;
|
|
190
|
+
supersedes?: string;
|
|
191
|
+
superseded_by?: string;
|
|
192
|
+
invalidated_reason?: string;
|
|
193
|
+
created_at: string;
|
|
194
|
+
updated_at: string;
|
|
195
|
+
revision: number;
|
|
196
|
+
}
|
|
197
|
+
export interface RememberInput {
|
|
198
|
+
memoryId?: string;
|
|
199
|
+
/** Required unless `taskId` is given, in which case it defaults to that task's scope. */
|
|
200
|
+
scope?: AgentMemoryScope;
|
|
201
|
+
taskId?: string;
|
|
202
|
+
kind?: string;
|
|
203
|
+
content: unknown;
|
|
204
|
+
source: {
|
|
205
|
+
actor: string;
|
|
206
|
+
checkpointVersion?: number;
|
|
207
|
+
adapter?: string;
|
|
208
|
+
evidence?: string[];
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
export interface SupersedeInput {
|
|
212
|
+
memoryId?: string;
|
|
213
|
+
content: unknown;
|
|
214
|
+
kind?: string;
|
|
215
|
+
source: {
|
|
216
|
+
actor: string;
|
|
217
|
+
checkpointVersion?: number;
|
|
218
|
+
adapter?: string;
|
|
219
|
+
evidence?: string[];
|
|
220
|
+
};
|
|
221
|
+
/** The memory revision this supersession is based on. */
|
|
222
|
+
expectedRevision?: number;
|
|
223
|
+
}
|
|
224
|
+
export type AgentHandoffStatus = 'open' | 'claimed' | 'accepted';
|
|
225
|
+
export interface AgentHandoffRecord {
|
|
226
|
+
handoff_id: string;
|
|
227
|
+
task_id: string;
|
|
228
|
+
checkpoint_version: number;
|
|
229
|
+
from: string;
|
|
230
|
+
to?: string;
|
|
231
|
+
note?: string;
|
|
232
|
+
memory_refs: string[];
|
|
233
|
+
evidence_refs: AgentEvidence[];
|
|
234
|
+
artifact_refs: string[];
|
|
235
|
+
status: AgentHandoffStatus;
|
|
236
|
+
claim?: {
|
|
237
|
+
claimant: string;
|
|
238
|
+
claimed_at: string;
|
|
239
|
+
attempt: number;
|
|
240
|
+
};
|
|
241
|
+
lease?: {
|
|
242
|
+
leaseId: string;
|
|
243
|
+
expiresAt: number;
|
|
244
|
+
} | null;
|
|
245
|
+
accepted_by?: string;
|
|
246
|
+
accepted_at?: string;
|
|
247
|
+
created_at: string;
|
|
248
|
+
updated_at: string;
|
|
249
|
+
revision: number;
|
|
250
|
+
}
|
|
251
|
+
/** A handoff resolved against the authoritative task and its referenced checkpoint. */
|
|
252
|
+
export interface AgentHandoff extends AgentHandoffRecord {
|
|
253
|
+
objective: string;
|
|
254
|
+
scope: AgentTaskScope;
|
|
255
|
+
constraints: string[];
|
|
256
|
+
pending_work: string[];
|
|
257
|
+
completed_work: string[];
|
|
258
|
+
summary: string;
|
|
259
|
+
/** The task's committed checkpoint version now; it may be ahead of the handoff's. */
|
|
260
|
+
current_checkpoint_version: number;
|
|
261
|
+
current_owner: string;
|
|
262
|
+
}
|
|
263
|
+
export interface CreateHandoffInput {
|
|
264
|
+
handoffId?: string;
|
|
265
|
+
actor: string;
|
|
266
|
+
to?: string;
|
|
267
|
+
note?: string;
|
|
268
|
+
expectedVersion?: number;
|
|
269
|
+
memoryRefs?: string[];
|
|
270
|
+
/** Defaults to every evidence reference of the referenced checkpoint. */
|
|
271
|
+
evidenceRefs?: AgentEvidence[];
|
|
272
|
+
artifactRefs?: string[];
|
|
273
|
+
}
|
|
274
|
+
export interface ClaimHandoffInput {
|
|
275
|
+
claimant: string;
|
|
276
|
+
/** How long the claim is exclusive before `acceptHandoff`. Default five minutes. */
|
|
277
|
+
leaseMs?: number;
|
|
278
|
+
}
|
|
279
|
+
export interface AgentHandoffClaim {
|
|
280
|
+
handoff: AgentHandoff;
|
|
281
|
+
leaseId: string;
|
|
282
|
+
expiresAt: number;
|
|
283
|
+
}
|
|
284
|
+
export interface AssembleContextOptions {
|
|
285
|
+
/** Upper bound on the UTF-8 byte length of `JSON.stringify(bundle)`. */
|
|
286
|
+
maxBytes: number;
|
|
287
|
+
handoffId?: string;
|
|
288
|
+
/** Per-scope memory page size. Default 20, at most 100. */
|
|
289
|
+
memoryLimit?: number;
|
|
290
|
+
/** Recent checkpoints to summarize. Default 5, at most 50. */
|
|
291
|
+
recentLimit?: number;
|
|
292
|
+
}
|
|
293
|
+
export interface AgentContextBundle {
|
|
294
|
+
format: typeof AGENT_CONTEXT_FORMAT;
|
|
295
|
+
task: {
|
|
296
|
+
task_id: string;
|
|
297
|
+
objective: string;
|
|
298
|
+
scope: AgentTaskScope;
|
|
299
|
+
status: AgentTaskStatus;
|
|
300
|
+
owner: string;
|
|
301
|
+
task_revision: number;
|
|
302
|
+
checkpoint_version: number;
|
|
303
|
+
};
|
|
304
|
+
checkpoint: {
|
|
305
|
+
version: number;
|
|
306
|
+
status: AgentTaskStatus;
|
|
307
|
+
summary: string;
|
|
308
|
+
actor: string;
|
|
309
|
+
created_at: string;
|
|
310
|
+
pending_work: string[];
|
|
311
|
+
constraints: string[];
|
|
312
|
+
/** Newest last. May be shortened by the budget; see `budget.omitted`. */
|
|
313
|
+
completed_work: string[];
|
|
314
|
+
/** Newest last. May be shortened by the budget; see `budget.omitted`. */
|
|
315
|
+
decisions: string[];
|
|
316
|
+
};
|
|
317
|
+
evidence: AgentEvidence[];
|
|
318
|
+
handoff?: {
|
|
319
|
+
handoff_id: string;
|
|
320
|
+
checkpoint_version: number;
|
|
321
|
+
status: AgentHandoffStatus;
|
|
322
|
+
from: string;
|
|
323
|
+
to?: string;
|
|
324
|
+
note?: string;
|
|
325
|
+
memory_refs: string[];
|
|
326
|
+
artifact_refs: string[];
|
|
327
|
+
evidence_refs: AgentEvidence[];
|
|
328
|
+
};
|
|
329
|
+
memories: Array<Pick<AgentMemory, 'memory_id' | 'scope_key' | 'kind' | 'content' | 'source' | 'created_at'>>;
|
|
330
|
+
recent: Array<{
|
|
331
|
+
version: number;
|
|
332
|
+
status: AgentTaskStatus;
|
|
333
|
+
summary: string;
|
|
334
|
+
actor: string;
|
|
335
|
+
created_at: string;
|
|
336
|
+
}>;
|
|
337
|
+
budget: {
|
|
338
|
+
maxBytes: number;
|
|
339
|
+
usedBytes: number;
|
|
340
|
+
unit: 'utf8-bytes';
|
|
341
|
+
omitted: {
|
|
342
|
+
completed_work: number;
|
|
343
|
+
decisions: number;
|
|
344
|
+
memories: number;
|
|
345
|
+
recent: number;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
/** The part of a FeltDB instance agent state needs. Satisfied by `StateFirstDB`. */
|
|
350
|
+
export interface AgentStateDatabase {
|
|
351
|
+
collection<T>(name: string): {
|
|
352
|
+
get(id: string | number): Promise<T | null>;
|
|
353
|
+
createIndex(config: IndexConfig): void;
|
|
354
|
+
listIndexes(): IndexConfig[];
|
|
355
|
+
};
|
|
356
|
+
query<T = Record<string, unknown>>(request: AuthorityQueryRequest): Promise<AuthorityQueryPage<T>>;
|
|
357
|
+
explain?(request: AuthorityQueryRequest): Promise<{
|
|
358
|
+
plan: string;
|
|
359
|
+
index?: string;
|
|
360
|
+
}>;
|
|
361
|
+
transaction(build: (tx: AtomicTransactionScope) => void | Promise<void>, options?: AtomicTransactionOptions): Promise<AtomicTransactionResult>;
|
|
362
|
+
capabilities?: () => {
|
|
363
|
+
transactions: boolean;
|
|
364
|
+
remoteAuthority: boolean;
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
export interface OpenAgentStateOptions {
|
|
368
|
+
/**
|
|
369
|
+
* Declare the compound indexes on an embedded runtime. Default true. A
|
|
370
|
+
* managed authority declares equality indexes in its own configuration.
|
|
371
|
+
*/
|
|
372
|
+
declareIndexes?: boolean;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Open the agent-state contract over a FeltDB database.
|
|
376
|
+
*
|
|
377
|
+
* Refuses a runtime without atomic transactions instead of emulating one.
|
|
378
|
+
*/
|
|
379
|
+
export declare function openAgentState(db: AgentStateDatabase, options?: OpenAgentStateOptions): Promise<AgentStateStore>;
|
|
380
|
+
/** The agent-state contract. Holds no state of its own between calls. */
|
|
381
|
+
export declare class AgentStateStore {
|
|
382
|
+
private readonly db;
|
|
383
|
+
constructor(db: AgentStateDatabase);
|
|
384
|
+
createTask(input: CreateAgentTaskInput): Promise<{
|
|
385
|
+
task: AgentTask;
|
|
386
|
+
checkpoint: AgentCheckpoint;
|
|
387
|
+
}>;
|
|
388
|
+
/** The task head and its latest committed checkpoint, from durable state. */
|
|
389
|
+
getTask(taskId: string): Promise<{
|
|
390
|
+
task: AgentTask;
|
|
391
|
+
checkpoint: AgentCheckpoint;
|
|
392
|
+
} | null>;
|
|
393
|
+
getCheckpoint(taskId: string, checkpointVersion: number): Promise<AgentCheckpoint | null>;
|
|
394
|
+
/**
|
|
395
|
+
* Commit checkpoint N+1 atomically with the task head.
|
|
396
|
+
*
|
|
397
|
+
* Refused, with nothing written, when `expectedVersion` is not the committed
|
|
398
|
+
* version, when another writer commits first, when `actor` does not own the
|
|
399
|
+
* task, when the task is terminal, or when cited record evidence is absent.
|
|
400
|
+
*/
|
|
401
|
+
checkpoint(taskId: string, input: AgentCheckpointInput): Promise<{
|
|
402
|
+
task: AgentTask;
|
|
403
|
+
checkpoint: AgentCheckpoint;
|
|
404
|
+
}>;
|
|
405
|
+
/**
|
|
406
|
+
* Resume a task from durable state alone: verify that `actor` owns it, then
|
|
407
|
+
* assemble its context. Writes nothing; the next `checkpoint` should pass
|
|
408
|
+
* `expectedVersion: bundle.checkpoint.version`.
|
|
409
|
+
*/
|
|
410
|
+
resume(taskId: string, input: {
|
|
411
|
+
actor: string;
|
|
412
|
+
} & AssembleContextOptions): Promise<AgentContextBundle>;
|
|
413
|
+
remember(input: RememberInput): Promise<AgentMemory>;
|
|
414
|
+
getMemory(memoryId: string): Promise<AgentMemory | null>;
|
|
415
|
+
/**
|
|
416
|
+
* One bounded page of a single scope, newest first (ties by id).
|
|
417
|
+
* There is no unscoped recall.
|
|
418
|
+
*/
|
|
419
|
+
recall(input: {
|
|
420
|
+
scope: AgentMemoryScope;
|
|
421
|
+
status?: AgentMemoryStatus;
|
|
422
|
+
limit?: number;
|
|
423
|
+
cursor?: string;
|
|
424
|
+
}): Promise<{
|
|
425
|
+
memories: AgentMemory[];
|
|
426
|
+
nextCursor?: string;
|
|
427
|
+
}>;
|
|
428
|
+
/**
|
|
429
|
+
* Active memories visible to a task: its own scope, then its project, then
|
|
430
|
+
* its workspace. A memory scoped to another task is never returned.
|
|
431
|
+
*/
|
|
432
|
+
recallForTask(taskId: string, input?: {
|
|
433
|
+
limit?: number;
|
|
434
|
+
}): Promise<AgentMemory[]>;
|
|
435
|
+
/** Replace a memory with a new one, atomically. The old record stays, marked superseded. */
|
|
436
|
+
supersede(memoryId: string, input: SupersedeInput): Promise<{
|
|
437
|
+
superseded: AgentMemory;
|
|
438
|
+
memory: AgentMemory;
|
|
439
|
+
}>;
|
|
440
|
+
/** Withdraw a memory without replacing it. */
|
|
441
|
+
invalidate(memoryId: string, input: {
|
|
442
|
+
actor: string;
|
|
443
|
+
reason: string;
|
|
444
|
+
expectedRevision?: number;
|
|
445
|
+
}): Promise<AgentMemory>;
|
|
446
|
+
/**
|
|
447
|
+
* Record that the task's owner offers it, at its committed checkpoint, to
|
|
448
|
+
* another agent. The handoff is fenced on the task head, so it can only
|
|
449
|
+
* reference the checkpoint that is committed when it commits.
|
|
450
|
+
*/
|
|
451
|
+
createHandoff(taskId: string, input: CreateHandoffInput): Promise<AgentHandoff>;
|
|
452
|
+
getHandoff(handoffId: string): Promise<AgentHandoff | null>;
|
|
453
|
+
/**
|
|
454
|
+
* Take exclusive, leased ownership of a handoff and its task.
|
|
455
|
+
*
|
|
456
|
+
* One commit moves the handoff to `claimed` and the task's owner to the
|
|
457
|
+
* claimant, fenced on both records' versions: of concurrent claimants
|
|
458
|
+
* exactly one succeeds. A claim that is not accepted before its lease
|
|
459
|
+
* expires may be taken by another claimant (see the reference for the
|
|
460
|
+
* clock this uses).
|
|
461
|
+
*/
|
|
462
|
+
claimHandoff(handoffId: string, input: ClaimHandoffInput): Promise<AgentHandoffClaim>;
|
|
463
|
+
/**
|
|
464
|
+
* Make a claim final. The authority checks, inside the commit, that the
|
|
465
|
+
* caller's lease is the one recorded and has not expired.
|
|
466
|
+
*/
|
|
467
|
+
acceptHandoff(handoffId: string, input: {
|
|
468
|
+
claimant: string;
|
|
469
|
+
leaseId: string;
|
|
470
|
+
}): Promise<AgentHandoff>;
|
|
471
|
+
/**
|
|
472
|
+
* A provider-neutral, bounded context bundle assembled from committed
|
|
473
|
+
* state only.
|
|
474
|
+
*
|
|
475
|
+
* Required content — the task, the latest checkpoint's status, summary,
|
|
476
|
+
* pending work and constraints, every evidence reference, and the handoff —
|
|
477
|
+
* is never truncated: if it does not fit `maxBytes` the call fails with
|
|
478
|
+
* BUDGET_EXCEEDED. Decisions, memories, completed work and recent
|
|
479
|
+
* checkpoints fill the remainder newest first, and what did not fit is
|
|
480
|
+
* counted in `budget.omitted`.
|
|
481
|
+
*/
|
|
482
|
+
assembleContext(taskId: string, options: AssembleContextOptions): Promise<AgentContextBundle>;
|
|
483
|
+
private taskRow;
|
|
484
|
+
private requireTask;
|
|
485
|
+
private assertOwner;
|
|
486
|
+
private resolveEvidence;
|
|
487
|
+
private resolveRecord;
|
|
488
|
+
}
|
|
489
|
+
//# sourceMappingURL=agent-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-state.d.ts","sourceRoot":"","sources":["../src/agent-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAA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