@standardagents/builder 0.41.21 → 0.41.22
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 +56 -17
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/{ApiKeysView-DJ5e-6IS.js → ApiKeysView-D4g6ZNWG.js} +1 -1
- package/dist/client/{CenteredContentView-DH6ikaTT.js → CenteredContentView-B3WUhJPU.js} +1 -1
- package/dist/client/{CompositionView-C9pK57FR.js → CompositionView-pL0H07yI.js} +1 -1
- package/dist/client/{ConfirmDialog.vue_vue_type_script_setup_true_lang-9-6_KYkD.js → ConfirmDialog.vue_vue_type_script_setup_true_lang-uehuZFVv.js} +1 -1
- package/dist/client/{CopyButton.vue_vue_type_script_setup_true_lang-C5uwr2FJ.js → CopyButton.vue_vue_type_script_setup_true_lang-vwNMv4kh.js} +1 -1
- package/dist/client/{DataTable.vue_vue_type_script_setup_true_lang-n5tnXZVz.js → DataTable.vue_vue_type_script_setup_true_lang-lgIAQ4Oz.js} +1 -1
- package/dist/client/{JsonViewer-CsxlDLYj.js → JsonViewer-BsC-w_01.js} +1 -1
- package/dist/client/LoginView-DriOurmS.js +1 -0
- package/dist/client/{MarketplaceView-CEusJBzY.js → MarketplaceView-7pl01VFg.js} +1 -1
- package/dist/client/{Modal.vue_vue_type_script_setup_true_lang-B_YbDdpO.js → Modal.vue_vue_type_script_setup_true_lang-CQE6ME9a.js} +1 -1
- package/dist/client/{ModelModal.vue_vue_type_script_setup_true_lang-DXwJcbrW.js → ModelModal.vue_vue_type_script_setup_true_lang-Dv-GVzNy.js} +1 -1
- package/dist/client/{ModelsView-Cs7N2v6t.js → ModelsView-BDxyu8pj.js} +1 -1
- package/dist/client/{PromptEditView-B82KeSCI.js → PromptEditView-Brn_lMum.js} +1 -1
- package/dist/client/{PromptModal-B_QwV83W.js → PromptModal-BeqgBmpj.js} +1 -1
- package/dist/client/{PromptsView-B3iCVeqG.js → PromptsView-Dgu1UMES.js} +1 -1
- package/dist/client/{ProvidersView-BUr74f5F.js → ProvidersView-B3SPkaxt.js} +1 -1
- package/dist/client/{ThreadInspectorPane.vue_vue_type_script_setup_true_lang-Bk0yDRsY.js → ThreadInspectorPane.vue_vue_type_script_setup_true_lang-DaArzwIz.js} +1 -1
- package/dist/client/{ThreadsView-DvRb3bRz.js → ThreadsView-D0hT0NXg.js} +1 -1
- package/dist/client/{ToolsView-DtoMgKuf.js → ToolsView-BitH87Mf.js} +1 -1
- package/dist/client/{UsersView-CnBhWD5G.js → UsersView-BArKqDfJ.js} +1 -1
- package/dist/client/{VariablesView-D2Zj2_RJ.js → VariablesView-BJtT_XLQ.js} +1 -1
- package/dist/client/assets/index-Bu6PNXui.css +1 -0
- package/dist/client/{index-DH0i006N.js → index-CAiyJVjz.js} +2 -2
- package/dist/client/index.html +2 -2
- package/dist/index.js +55 -16
- package/dist/index.js.map +1 -1
- package/dist/runtime.js +55 -16
- package/dist/runtime.js.map +1 -1
- package/package.json +5 -5
- package/dist/client/LoginView-BOFP143E.js +0 -1
- package/dist/client/assets/index-yfhU3str.css +0 -1
package/dist/client/index.html
CHANGED
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
27
27
|
<link rel="icon" type="image/svg+xml" href="/agents/assets/img/favicon-9uH1rb2F.svg">
|
|
28
28
|
<title>AgentBuilder Admin</title>
|
|
29
|
-
<script type="module" crossorigin src="/agents/index-
|
|
29
|
+
<script type="module" crossorigin src="/agents/index-CAiyJVjz.js"></script>
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/agents/formkit-Cu5ivce0.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/agents/vendor-c_uwtQ-S.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/agents/syntax-D68HCEYm.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/agents/vue-DrmMqJdu.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/agents/monaco-DI2r3M8m.js">
|
|
35
35
|
<link rel="stylesheet" crossorigin href="/agents/assets/monaco-DbLkoLD4.css">
|
|
36
|
-
<link rel="stylesheet" crossorigin href="/agents/assets/index-
|
|
36
|
+
<link rel="stylesheet" crossorigin href="/agents/assets/index-Bu6PNXui.css">
|
|
37
37
|
</head>
|
|
38
38
|
<body>
|
|
39
39
|
<div id="app"></div>
|
package/dist/index.js
CHANGED
|
@@ -5210,7 +5210,7 @@ Message one with subagent_message(referenceId, message).`
|
|
|
5210
5210
|
parent: childThread.parent ?? state.threadId,
|
|
5211
5211
|
terminated: childThread.terminated ?? null,
|
|
5212
5212
|
created_at: childThread.created_at ?? Math.floor(Date.now() / 1e3)
|
|
5213
|
-
});
|
|
5213
|
+
}, { env: state.env });
|
|
5214
5214
|
await FlowEngine2.runAfterSubagentCreatedHook(state, childState);
|
|
5215
5215
|
} catch (error) {
|
|
5216
5216
|
console.error("[Hooks] \u2717 Error running after_subagent_created hook:", error);
|
|
@@ -29019,8 +29019,8 @@ var init_ThreadStateImpl = __esm({
|
|
|
29019
29019
|
if (!child || child.parent !== this.threadId) {
|
|
29020
29020
|
return null;
|
|
29021
29021
|
}
|
|
29022
|
-
const
|
|
29023
|
-
const childStub =
|
|
29022
|
+
const threads = this._getThreadNamespace();
|
|
29023
|
+
const childStub = threads.get(threads.idFromName(referenceId));
|
|
29024
29024
|
return _ThreadStateImpl.fromThreadInstance(childStub, {
|
|
29025
29025
|
id: child.id,
|
|
29026
29026
|
agent_id: child.agent_name,
|
|
@@ -29032,7 +29032,7 @@ var init_ThreadStateImpl = __esm({
|
|
|
29032
29032
|
parent: child.parent ?? null,
|
|
29033
29033
|
terminated: child.terminated ?? null,
|
|
29034
29034
|
created_at: child.created_at
|
|
29035
|
-
});
|
|
29035
|
+
}, this._relatedRuntimeContext());
|
|
29036
29036
|
}
|
|
29037
29037
|
async getParentThread() {
|
|
29038
29038
|
const agentBuilder = this._getAgentBuilderStub();
|
|
@@ -29045,8 +29045,8 @@ var init_ThreadStateImpl = __esm({
|
|
|
29045
29045
|
if (!parent) {
|
|
29046
29046
|
return null;
|
|
29047
29047
|
}
|
|
29048
|
-
const
|
|
29049
|
-
const parentStub =
|
|
29048
|
+
const threads = this._getThreadNamespace();
|
|
29049
|
+
const parentStub = threads.get(threads.idFromName(parentId));
|
|
29050
29050
|
return _ThreadStateImpl.fromThreadInstance(parentStub, {
|
|
29051
29051
|
id: parent.id,
|
|
29052
29052
|
agent_id: parent.agent_name,
|
|
@@ -29058,7 +29058,7 @@ var init_ThreadStateImpl = __esm({
|
|
|
29058
29058
|
parent: parent.parent ?? null,
|
|
29059
29059
|
terminated: parent.terminated ?? null,
|
|
29060
29060
|
created_at: parent.created_at
|
|
29061
|
-
});
|
|
29061
|
+
}, this._relatedRuntimeContext());
|
|
29062
29062
|
}
|
|
29063
29063
|
// ─────────────────────────────────────────────────────────────────────────
|
|
29064
29064
|
// Tool Invocation
|
|
@@ -29319,14 +29319,14 @@ var init_ThreadStateImpl = __esm({
|
|
|
29319
29319
|
canPark && toolCallId ? { toolCallId, side } : void 0
|
|
29320
29320
|
);
|
|
29321
29321
|
if (local.ok || !this.isNoClient(local)) return local;
|
|
29322
|
-
const
|
|
29323
|
-
if (
|
|
29322
|
+
const threads = this._optionalThreadNamespace();
|
|
29323
|
+
if (threads) {
|
|
29324
29324
|
const seen = /* @__PURE__ */ new Set([this._metadata.id]);
|
|
29325
29325
|
let parentId = await this.resolveParentThreadId(this._metadata.id);
|
|
29326
29326
|
while (parentId && !seen.has(parentId)) {
|
|
29327
29327
|
seen.add(parentId);
|
|
29328
29328
|
try {
|
|
29329
|
-
const stub =
|
|
29329
|
+
const stub = threads.get(threads.idFromName(parentId));
|
|
29330
29330
|
const res = await stub.callClientTool(request);
|
|
29331
29331
|
if (res.ok || !this.isNoClient(res)) return res;
|
|
29332
29332
|
} catch {
|
|
@@ -29474,8 +29474,8 @@ var init_ThreadStateImpl = __esm({
|
|
|
29474
29474
|
if (threadId === this._metadata.id && this._metadata.parent) {
|
|
29475
29475
|
return this._metadata.parent;
|
|
29476
29476
|
}
|
|
29477
|
-
const env = this.
|
|
29478
|
-
if (!env
|
|
29477
|
+
const env = this._optionalRuntimeEnv();
|
|
29478
|
+
if (!env) return null;
|
|
29479
29479
|
for (let attempt = 0; attempt < 3; attempt++) {
|
|
29480
29480
|
try {
|
|
29481
29481
|
const agentBuilder = env.AGENT_BUILDER.get(env.AGENT_BUILDER.idFromName("singleton"));
|
|
@@ -29883,8 +29883,8 @@ var init_ThreadStateImpl = __esm({
|
|
|
29883
29883
|
return null;
|
|
29884
29884
|
}
|
|
29885
29885
|
try {
|
|
29886
|
-
const threadNamespace = this.
|
|
29887
|
-
if (!threadNamespace
|
|
29886
|
+
const threadNamespace = this._optionalThreadNamespace();
|
|
29887
|
+
if (!threadNamespace) {
|
|
29888
29888
|
return null;
|
|
29889
29889
|
}
|
|
29890
29890
|
const durableId = threadNamespace.idFromName(parentThreadId);
|
|
@@ -29896,8 +29896,8 @@ var init_ThreadStateImpl = __esm({
|
|
|
29896
29896
|
}
|
|
29897
29897
|
async _getParentThreadStub() {
|
|
29898
29898
|
const parentThreadId = await this._getParentThreadId();
|
|
29899
|
-
const
|
|
29900
|
-
const parentStub =
|
|
29899
|
+
const threads = this._getThreadNamespace();
|
|
29900
|
+
const parentStub = threads.get(threads.idFromName(parentThreadId));
|
|
29901
29901
|
return { parentThreadId, parentStub };
|
|
29902
29902
|
}
|
|
29903
29903
|
_getAgentBuilderStub() {
|
|
@@ -29923,6 +29923,45 @@ var init_ThreadStateImpl = __esm({
|
|
|
29923
29923
|
}
|
|
29924
29924
|
return instanceEnv;
|
|
29925
29925
|
}
|
|
29926
|
+
/** `_getRuntimeEnv`, or null where this state has no usable environment. */
|
|
29927
|
+
_optionalRuntimeEnv() {
|
|
29928
|
+
if (isThreadStateRuntimeEnvironment(this._runtimeContext.env)) {
|
|
29929
|
+
return this._runtimeContext.env;
|
|
29930
|
+
}
|
|
29931
|
+
const instanceEnv = this._threadInstance.env;
|
|
29932
|
+
return isThreadStateRuntimeEnvironment(instanceEnv) ? instanceEnv : null;
|
|
29933
|
+
}
|
|
29934
|
+
/**
|
|
29935
|
+
* The thread Durable Object namespace, from the runtime env (the recorded
|
|
29936
|
+
* context env first). Never `this._threadInstance.env` directly: on a
|
|
29937
|
+
* stub-backed state that is a pipelined RpcPromise proxy.
|
|
29938
|
+
*/
|
|
29939
|
+
_getThreadNamespace() {
|
|
29940
|
+
const namespace = this._optionalThreadNamespace();
|
|
29941
|
+
if (!namespace) {
|
|
29942
|
+
this._getRuntimeEnv();
|
|
29943
|
+
throw new Error("Thread namespace unavailable: AGENT_BUILDER_THREAD binding is missing.");
|
|
29944
|
+
}
|
|
29945
|
+
return namespace;
|
|
29946
|
+
}
|
|
29947
|
+
_optionalThreadNamespace() {
|
|
29948
|
+
const env = this._optionalRuntimeEnv();
|
|
29949
|
+
const namespace = env?.AGENT_BUILDER_THREAD;
|
|
29950
|
+
return isRuntimeDurableNamespace(namespace) ? namespace : null;
|
|
29951
|
+
}
|
|
29952
|
+
/**
|
|
29953
|
+
* The runtime context for a ThreadState this state hands out for another
|
|
29954
|
+
* thread (its parent, a child). That state is stub-backed, so it carries
|
|
29955
|
+
* this state's environment, and the user-scope reentrancy guard, with it:
|
|
29956
|
+
* without them every env-dependent surface on the handle (`user()`,
|
|
29957
|
+
* `env()`, user values, its own parent/child lookups) throws.
|
|
29958
|
+
*/
|
|
29959
|
+
_relatedRuntimeContext() {
|
|
29960
|
+
return {
|
|
29961
|
+
env: this._getRuntimeEnv(),
|
|
29962
|
+
...this._runtimeContext.inUserScope === true ? { inUserScope: true } : {}
|
|
29963
|
+
};
|
|
29964
|
+
}
|
|
29926
29965
|
/** The per-user hub stub for this thread's user (user-scope surfaces). */
|
|
29927
29966
|
_getUserHubStub(userId) {
|
|
29928
29967
|
const env = this._getRuntimeEnv();
|