@standardagents/builder 0.27.12 → 0.28.0
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 +273 -21
- package/dist/built-in-routes.js.map +1 -1
- package/dist/{index-DReIS8eP.d.ts → index-BzXyIJPA.d.ts} +163 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +909 -38
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +24 -2
- package/dist/plugin.js.map +1 -1
- package/dist/runtime.d.ts +127 -5
- package/dist/runtime.js +855 -36
- package/dist/runtime.js.map +1 -1
- package/dist/test.d.ts +1 -1
- package/package.json +5 -5
package/dist/plugin.js
CHANGED
|
@@ -258,6 +258,7 @@ declare module 'virtual:@standardagents/builder' {
|
|
|
258
258
|
import type { DurableAgentBuilder as BaseDurableAgentBuilder } from '@standardagents/builder/runtime';
|
|
259
259
|
import type { CodeExecutionBridge as BaseCodeExecutionBridge } from '@standardagents/builder/runtime';
|
|
260
260
|
import type { ThreadWatchdog as BaseThreadWatchdog } from '@standardagents/builder/runtime';
|
|
261
|
+
import type { DurableUserHub as BaseDurableUserHub } from '@standardagents/builder/runtime';
|
|
261
262
|
import type { ThreadEnv } from '@standardagents/builder/runtime';
|
|
262
263
|
|
|
263
264
|
// ============================================================
|
|
@@ -742,6 +743,12 @@ declare module 'virtual:@standardagents/builder' {
|
|
|
742
743
|
*/
|
|
743
744
|
export class ThreadWatchdog extends BaseThreadWatchdog {}
|
|
744
745
|
|
|
746
|
+
/**
|
|
747
|
+
* Per-user hub Durable Object (AGENT_BUILDER_USER_HUB binding). Holds the
|
|
748
|
+
* persistent daemon socket, wake signal, and sharded account KV.
|
|
749
|
+
*/
|
|
750
|
+
export class DurableUserHub extends BaseDurableUserHub {}
|
|
751
|
+
|
|
745
752
|
// ============================================================
|
|
746
753
|
// Router Function
|
|
747
754
|
// ============================================================
|
|
@@ -6909,6 +6916,7 @@ import { DurableThread as _BaseDurableThread } from '@standardagents/builder/run
|
|
|
6909
6916
|
import { DurableAgentBuilder as _BaseDurableAgentBuilder } from '@standardagents/builder/runtime';
|
|
6910
6917
|
import { CodeExecutionBridge as _BaseCodeExecutionBridge } from '@standardagents/builder/runtime';
|
|
6911
6918
|
import { ThreadWatchdog as _BaseThreadWatchdog } from '@standardagents/builder/runtime';
|
|
6919
|
+
import { DurableUserHub as _BaseDurableUserHub } from '@standardagents/builder/runtime';
|
|
6912
6920
|
|
|
6913
6921
|
// Import sip WASM module and readiness helper
|
|
6914
6922
|
// Static import allows workerd to pre-compile the WASM at bundle time
|
|
@@ -7034,6 +7042,12 @@ export class CodeExecutionBridge extends _BaseCodeExecutionBridge {}
|
|
|
7034
7042
|
* probes its DurableThread over RPC.
|
|
7035
7043
|
*/
|
|
7036
7044
|
export class ThreadWatchdog extends _BaseThreadWatchdog {}
|
|
7045
|
+
|
|
7046
|
+
/**
|
|
7047
|
+
* Per-user hub companion. Coordination only (persistent daemon socket, wake
|
|
7048
|
+
* signal, sharded account KV); needs no virtual-module registries.
|
|
7049
|
+
*/
|
|
7050
|
+
export class DurableUserHub extends _BaseDurableUserHub {}
|
|
7037
7051
|
`;
|
|
7038
7052
|
}
|
|
7039
7053
|
async function loadRegistryVirtualModule(context) {
|
|
@@ -8009,6 +8023,10 @@ function createAgentBuilderWorkerConfig(options) {
|
|
|
8009
8023
|
{
|
|
8010
8024
|
name: "AGENT_BUILDER_WATCHDOG",
|
|
8011
8025
|
class_name: "ThreadWatchdog"
|
|
8026
|
+
},
|
|
8027
|
+
{
|
|
8028
|
+
name: "AGENT_BUILDER_USER_HUB",
|
|
8029
|
+
class_name: "DurableUserHub"
|
|
8012
8030
|
}
|
|
8013
8031
|
]
|
|
8014
8032
|
},
|
|
@@ -8026,6 +8044,10 @@ function createAgentBuilderWorkerConfig(options) {
|
|
|
8026
8044
|
{
|
|
8027
8045
|
tag: "v3",
|
|
8028
8046
|
new_sqlite_classes: ["ThreadWatchdog"]
|
|
8047
|
+
},
|
|
8048
|
+
{
|
|
8049
|
+
tag: "v4",
|
|
8050
|
+
new_sqlite_classes: ["DurableUserHub"]
|
|
8029
8051
|
}
|
|
8030
8052
|
]
|
|
8031
8053
|
};
|
|
@@ -8113,7 +8135,7 @@ function agentbuilder(options = {}) {
|
|
|
8113
8135
|
function writeGeneratedWorkerEntry() {
|
|
8114
8136
|
const content = `// Generated by @standardagents/builder.
|
|
8115
8137
|
// Future agents: update builder/src/plugin.ts when changing this entrypoint.
|
|
8116
|
-
import { CodeExecutionBridge, DurableAgentBuilder, DurableThread, ThreadWatchdog, router } from "virtual:@standardagents/builder";
|
|
8138
|
+
import { CodeExecutionBridge, DurableAgentBuilder, DurableThread, ThreadWatchdog, DurableUserHub, router } from "virtual:@standardagents/builder";
|
|
8117
8139
|
|
|
8118
8140
|
export default {
|
|
8119
8141
|
async fetch(request: Request, env: Parameters<typeof router>[1]) {
|
|
@@ -8122,7 +8144,7 @@ export default {
|
|
|
8122
8144
|
},
|
|
8123
8145
|
};
|
|
8124
8146
|
|
|
8125
|
-
export { CodeExecutionBridge, DurableAgentBuilder, DurableThread, ThreadWatchdog };
|
|
8147
|
+
export { CodeExecutionBridge, DurableAgentBuilder, DurableThread, ThreadWatchdog, DurableUserHub };
|
|
8126
8148
|
`;
|
|
8127
8149
|
fs8__default.mkdirSync(outputDir, { recursive: true });
|
|
8128
8150
|
if (!fs8__default.existsSync(generatedWorkerEntry) || fs8__default.readFileSync(generatedWorkerEntry, "utf-8") !== content) {
|