@standardagents/builder 0.21.0 → 0.21.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/built-in-routes.js +51 -0
- package/dist/built-in-routes.js.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +1 -0
- package/dist/plugin.js.map +1 -1
- package/dist/runtime.d.ts +9 -0
- package/dist/runtime.js +18 -0
- package/dist/runtime.js.map +1 -1
- package/package.json +4 -4
package/dist/runtime.d.ts
CHANGED
|
@@ -1514,6 +1514,15 @@ declare class DurableAgentBuilder<Env extends AgentBuilderEnv = AgentBuilderEnv>
|
|
|
1514
1514
|
* Delete a thread from the registry.
|
|
1515
1515
|
*/
|
|
1516
1516
|
deleteThread(id: string): Promise<boolean>;
|
|
1517
|
+
/**
|
|
1518
|
+
* Delete all singleton AgentBuilder storage for platform-owned teardown.
|
|
1519
|
+
* Used when the hosting platform expires a preview branch deployment after
|
|
1520
|
+
* all thread Durable Objects have already been wiped.
|
|
1521
|
+
*/
|
|
1522
|
+
deleteAllStorage(): Promise<{
|
|
1523
|
+
success: boolean;
|
|
1524
|
+
message: string;
|
|
1525
|
+
}>;
|
|
1517
1526
|
/**
|
|
1518
1527
|
* Get a thread tree (root + all descendants) in child-first order.
|
|
1519
1528
|
*
|
package/dist/runtime.js
CHANGED
|
@@ -20424,6 +20424,24 @@ ${result ?? error ?? "No result content."}${attachmentSummary}`;
|
|
|
20424
20424
|
this.broadcastEvent({ type: "thread_deleted", threadId: id });
|
|
20425
20425
|
return true;
|
|
20426
20426
|
}
|
|
20427
|
+
/**
|
|
20428
|
+
* Delete all singleton AgentBuilder storage for platform-owned teardown.
|
|
20429
|
+
* Used when the hosting platform expires a preview branch deployment after
|
|
20430
|
+
* all thread Durable Objects have already been wiped.
|
|
20431
|
+
*/
|
|
20432
|
+
async deleteAllStorage() {
|
|
20433
|
+
for (const ws of Array.from(this.eventSockets)) {
|
|
20434
|
+
try {
|
|
20435
|
+
ws.close(1e3, "Instance deleted");
|
|
20436
|
+
} catch {
|
|
20437
|
+
}
|
|
20438
|
+
}
|
|
20439
|
+
this.eventSockets.clear();
|
|
20440
|
+
await this.ctx.storage.deleteAlarm();
|
|
20441
|
+
await this.ctx.storage.deleteAll();
|
|
20442
|
+
this.migratedToVersion = null;
|
|
20443
|
+
return { success: true, message: "AgentBuilder storage completely deleted" };
|
|
20444
|
+
}
|
|
20427
20445
|
/**
|
|
20428
20446
|
* Get a thread tree (root + all descendants) in child-first order.
|
|
20429
20447
|
*
|