@standardagents/spec 0.26.1 → 0.27.2
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.d.ts +48 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -464,7 +464,10 @@ interface MessageUpdates {
|
|
|
464
464
|
*
|
|
465
465
|
* Always broadcast (no opt-in). Clients accumulate `chunk`s by `message_id` to
|
|
466
466
|
* render the answer as it generates; the authoritative final content still
|
|
467
|
-
* arrives separately as a persisted message.
|
|
467
|
+
* arrives separately as a persisted message. Clients must not discard an
|
|
468
|
+
* already-painted draft solely because a retry/reconnect exposes another id:
|
|
469
|
+
* retain keyed drafts or treat the id as a reconciliation alias until the
|
|
470
|
+
* terminal message record atomically supersedes it.
|
|
468
471
|
*/
|
|
469
472
|
interface ThreadMessageChunkEvent {
|
|
470
473
|
type: 'message_chunk';
|
|
@@ -1365,6 +1368,50 @@ interface ThreadState {
|
|
|
1365
1368
|
* to delete the key
|
|
1366
1369
|
*/
|
|
1367
1370
|
setValue(key: string, value: unknown): Promise<void>;
|
|
1371
|
+
/**
|
|
1372
|
+
* Read a value from the account-wide durable key-value store of the user
|
|
1373
|
+
* this thread belongs to.
|
|
1374
|
+
*
|
|
1375
|
+
* The user store is the account-scoped sibling of the thread store: values
|
|
1376
|
+
* persist across every thread the user owns on the instance (e.g. a coding
|
|
1377
|
+
* client's registry of registered machines and projects). Returns `null`
|
|
1378
|
+
* when the thread has no associated user or the key has no value.
|
|
1379
|
+
*
|
|
1380
|
+
* @param key - The key to read
|
|
1381
|
+
*/
|
|
1382
|
+
getUserValue<T = unknown>(key: string): Promise<T | null>;
|
|
1383
|
+
/**
|
|
1384
|
+
* Write a value to the account-wide durable key-value store of the user
|
|
1385
|
+
* this thread belongs to.
|
|
1386
|
+
*
|
|
1387
|
+
* Passing `null` or `undefined` deletes the key. Values MUST be
|
|
1388
|
+
* JSON-serializable. Implementations MUST reject the write when the thread
|
|
1389
|
+
* has no associated user.
|
|
1390
|
+
*
|
|
1391
|
+
* @param key - The key to write
|
|
1392
|
+
* @param value - The value to store (JSON-serializable), or `null`/`undefined`
|
|
1393
|
+
* to delete the key
|
|
1394
|
+
*/
|
|
1395
|
+
setUserValue(key: string, value: unknown): Promise<void>;
|
|
1396
|
+
/**
|
|
1397
|
+
* List entries in the account-wide durable key-value store of the user this
|
|
1398
|
+
* thread belongs to, optionally filtered by key prefix. Returns an empty
|
|
1399
|
+
* list when the thread has no associated user.
|
|
1400
|
+
*
|
|
1401
|
+
* @param options - Optional `prefix`, `limit` (default 100), and `offset`
|
|
1402
|
+
*/
|
|
1403
|
+
listUserValues(options?: {
|
|
1404
|
+
prefix?: string | null;
|
|
1405
|
+
limit?: number;
|
|
1406
|
+
offset?: number;
|
|
1407
|
+
}): Promise<{
|
|
1408
|
+
entries: Array<{
|
|
1409
|
+
key: string;
|
|
1410
|
+
value: unknown;
|
|
1411
|
+
updated_at: number;
|
|
1412
|
+
}>;
|
|
1413
|
+
total: number;
|
|
1414
|
+
}>;
|
|
1368
1415
|
/**
|
|
1369
1416
|
* The profile of the user this thread belongs to, or `null` when the thread
|
|
1370
1417
|
* has no associated user (e.g. unauthenticated local development).
|