@standardagents/builder 0.35.4 → 0.35.5
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 +36 -26
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/{ApiKeysView-CnybtFho.js → ApiKeysView-1dDvAxVS.js} +1 -1
- package/dist/client/CenteredContentView-DpneLOEW.js +1 -0
- package/dist/client/{CompositionView-Ctlbn0vj.js → CompositionView-DvzI90K5.js} +1 -1
- package/dist/client/{ConfirmDialog.vue_vue_type_script_setup_true_lang-CqwPyg0f.js → ConfirmDialog.vue_vue_type_script_setup_true_lang-DiI1fhCg.js} +1 -1
- package/dist/client/{CopyButton.vue_vue_type_script_setup_true_lang-CyfjQKbm.js → CopyButton.vue_vue_type_script_setup_true_lang-C_mtx_IO.js} +1 -1
- package/dist/client/{DataTable.vue_vue_type_script_setup_true_lang-ns-DYcKW.js → DataTable.vue_vue_type_script_setup_true_lang-xHY6L65e.js} +1 -1
- package/dist/client/{JsonViewer-w11hvBiv.js → JsonViewer-DZk1hmoU.js} +1 -1
- package/dist/client/{LoginView-BhkGzCFE.js → LoginView-Jpd6CNht.js} +1 -1
- package/dist/client/{MarketplaceView-yZXHH-T4.js → MarketplaceView-CxyxQ3eT.js} +1 -1
- package/dist/client/{Modal.vue_vue_type_script_setup_true_lang-B6K3Zkh6.js → Modal.vue_vue_type_script_setup_true_lang-Be5qsOZI.js} +1 -1
- package/dist/client/{ModelModal.vue_vue_type_script_setup_true_lang-DebPdGdQ.js → ModelModal.vue_vue_type_script_setup_true_lang-eYizTKcZ.js} +1 -1
- package/dist/client/{ModelsView-C4xTc0Ut.js → ModelsView-BU1zF5Zw.js} +1 -1
- package/dist/client/{PromptEditView-B1TvKsvK.js → PromptEditView-BhvxR_WM.js} +1 -1
- package/dist/client/{PromptModal-C3CMojNY.js → PromptModal-D6H1VYyD.js} +1 -1
- package/dist/client/{PromptsView-cnbYo7GZ.js → PromptsView-DgdRXffo.js} +1 -1
- package/dist/client/{ProvidersView-01sjKjFL.js → ProvidersView-QcOzG7y7.js} +1 -1
- package/dist/client/ThreadInspectorPane.vue_vue_type_script_setup_true_lang-roXBQlRw.js +23 -0
- package/dist/client/{ThreadsView-BLmcRVRx.js → ThreadsView-DmsDuS1X.js} +1 -1
- package/dist/client/{ToolsView-HCxNKC5q.js → ToolsView-Bcr6QafS.js} +1 -1
- package/dist/client/{UiCodeBlock.vue_vue_type_script_setup_true_lang-QytRm7Ql.js → UiCodeBlock.vue_vue_type_script_setup_true_lang-DjDQOYjB.js} +1 -1
- package/dist/client/{UsersView-BDAOlNJQ.js → UsersView-Du7GQtro.js} +1 -1
- package/dist/client/{VariablesView-Co_hp_tq.js → VariablesView-DIdSMYXb.js} +1 -1
- package/dist/client/assets/{ThreadInspectorPane-G2muXE6J.css → ThreadInspectorPane-2QOWOtet.css} +1 -1
- package/dist/client/{check-pGlck8qX.js → check-DeHZQcv4.js} +1 -1
- package/dist/client/{chevron-right-FpPE1Obh.js → chevron-right-C8Mb0B59.js} +1 -1
- package/dist/client/{copy-Dt1FLh3s.js → copy-BxJsl-KZ.js} +1 -1
- package/dist/client/{formkit-DcZQH9-p.js → formkit-0eyyCEP_.js} +1 -1
- package/dist/client/{index-CU9i-w9T.js → index-7UIZEBvt.js} +3 -3
- package/dist/client/index.html +3 -3
- package/dist/client/{package-DSNwOrcN.js → package-B9czwyIu.js} +1 -1
- package/dist/client/{plus-D0GkkdA7.js → plus-DqtuqJFm.js} +1 -1
- package/dist/client/timeAgo-CDt-vAhI.js +1 -0
- package/dist/client/{useActionFeedback-Dxh_Xp0q.js → useActionFeedback-B6UfBJ7l.js} +1 -1
- package/dist/client/{vue-KXHVRwln.js → vue-Dw7WLX4c.js} +1 -1
- package/dist/{index-DP9GxPHu.d.ts → index-BIVhZqwM.d.ts} +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +160 -2
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.ts +26 -2
- package/dist/runtime.js +160 -2
- package/dist/runtime.js.map +1 -1
- package/dist/test.d.ts +1 -1
- package/package.json +5 -5
- package/dist/client/CenteredContentView-Ch18yAzL.js +0 -1
- package/dist/client/ThreadInspectorPane.vue_vue_type_script_setup_true_lang-BiimzVFD.js +0 -22
- package/dist/client/timeAgo-X3Xeq5Kz.js +0 -1
|
@@ -1162,6 +1162,8 @@ interface LogEntry {
|
|
|
1162
1162
|
parent_log_id: string | null;
|
|
1163
1163
|
retry_of_log_id: string | null;
|
|
1164
1164
|
error: string | null;
|
|
1165
|
+
/** Machine error classification ('user_interrupted' = stop, not failure). */
|
|
1166
|
+
error_type?: string | null;
|
|
1165
1167
|
cost_total: number | null;
|
|
1166
1168
|
is_complete: number;
|
|
1167
1169
|
created_at: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelDefinition, AgentDefinition } from './runtime.js';
|
|
2
2
|
export { AgentBuilderEnv, AuthContext, AuthUser, BroadcastOptions, CodeExecutionBridge, DurableAgentBuilder, DurableThread, DurableUserHub, FlowStateSdk, FlowStateWithSdk, HubClientInfo, ImageContextConfig, InjectMessageOptions, LLMProviderInterface, NamespaceResolutionError, PromptContent, PromptDefinition, PromptIncludePart, PromptPart, PromptToolConfig, Provider, ProviderContentPart, ProviderFilePart, ProviderImagePart, ProviderRegistry, ProviderTextPart, SessionToolBinding, SessionToolConfig, SideConfig, SubagentToolConfig, SubpromptConfig, ThreadRegistryEntry, ThreadWatchdog, ThreadWatchdogState, ToolConfig, UpdateThreadParams, User, WatchdogCheckin, WatchdogProbeResult, authenticate, buildImageDescription, cat, createNamespaceContext, emitThreadEvent, enhanceFlowState, exists, find, forceTurn, generateImageDescription, getFileStats, getMessages, getMessagesToSummarize, getShortName, getThumbnail, getUnsummarizedImageAttachments, getVisibleAgentNames, getVisibleModelNames, getVisiblePromptNames, getVisibleToolNames, grep, hasImageAttachments, head, injectMessage, isQualifiedName, linkFile, mkdir, move, optimizeImageContext, parseQualifiedName, qualifyName, queueTool, readFile, readdir, reloadHistory, rename, replaceImagesWithDescriptions, requireAdmin, requireAuth, resolveAgent, resolveHook, resolveModel, resolvePrompt, resolveTool, rmdir, stat, tail, unlink, updateThread, writeFile, writeImage } from './runtime.js';
|
|
3
3
|
export { AgentPluginOptions, agentbuilder, builder } from './plugin.js';
|
|
4
|
-
export { A as Agent, x as AttachmentRef, f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, o as ClientDuplex, p as ClientForwarding, m as ClientStreamRequest, n as ClientStreamResponse, k as ClientToolRequest, l as ClientToolResponse, B as Controller, a as ControllerContext, E as Env, w as FileRecord, y as FileStats, u as FlowResult, F as FlowState, G as GrepResult, D as ImageContentPart, I as ImageMetadata, L as LLMResponse, M as Message, J as MessageContent, H as MultimodalContent, R as RequestContext, S as StorageBackend, v as TelemetryEvent, z as TextContentPart, b as ThreadEndpointContext, e as ThreadEnv, q as ThreadInstance, r as ThreadMetadata, T as ToolCall, t as ToolResult, g as callClient, h as callClientStream, c as createThreadEndpointHandler, j as decodeStreamChunk, d as defineController, i as encodeStreamChunk, s as supportsClientForwarding } from './index-
|
|
4
|
+
export { A as Agent, x as AttachmentRef, f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, o as ClientDuplex, p as ClientForwarding, m as ClientStreamRequest, n as ClientStreamResponse, k as ClientToolRequest, l as ClientToolResponse, B as Controller, a as ControllerContext, E as Env, w as FileRecord, y as FileStats, u as FlowResult, F as FlowState, G as GrepResult, D as ImageContentPart, I as ImageMetadata, L as LLMResponse, M as Message, J as MessageContent, H as MultimodalContent, R as RequestContext, S as StorageBackend, v as TelemetryEvent, z as TextContentPart, b as ThreadEndpointContext, e as ThreadEnv, q as ThreadInstance, r as ThreadMetadata, T as ToolCall, t as ToolResult, g as callClient, h as callClientStream, c as createThreadEndpointHandler, j as decodeStreamChunk, d as defineController, i as encodeStreamChunk, s as supportsClientForwarding } from './index-BIVhZqwM.js';
|
|
5
5
|
export { AgentType, DefinitionLoader, GlobalNamespaceContext, HookSignatures, ImageContent, ModelCapabilities, ModelProvider, NamespaceContext, PackageSignature, PackedExports, PackedMeta, PackedMetadata, PackedNamespaceContext, PromptInput, PromptTextPart, ProviderAssistantMessage, ProviderConfigSlot, ProviderConfigSlots, ProviderConfigValueSource, ProviderDefinition, ProviderError, ProviderErrorCode, ProviderFactory, ProviderFactoryConfig, ProviderFinishReason, ProviderGeneratedImage, ProviderMessage, ProviderMessageContent, ProviderMethodOverrides, ModelCapabilities as ProviderModelCapabilities, ProviderOverride, ProviderOverrideContext, ProviderReasoningDetail, ProviderRequest, ProviderResponse, ProviderStreamChunk, ProviderSyncOverride, ProviderSystemMessage, ProviderTool, ProviderToolCallPart, ProviderToolMessage, ProviderToolResultContent, ProviderUsage, ProviderUserMessage, ReasoningConfig, StructuredPrompt, TextContent, Tool, ToolArgs, ToolArgsNode, ToolArgsRawShape, ToolContent, belongsToPackage, defineAgent, defineHook, defineModel, definePrompt, defineProvider, defineTool, isPacked, isVisibleInNamespace, mapReasoningLevel, providerConst, providerEnv, providerValue } from '@standardagents/spec';
|
|
6
6
|
export { C as ConstituentItem, D as DiscoveredPackage, N as NamespacedRegistry, P as PackingAnalysis, a as PackingOptions, b as PackingResult, c as UnpackOptions, d as UnpackResult } from './types-Bpe7IANZ.js';
|
|
7
7
|
export { D as DiscoveryConfig, P as PackageDiscoveryService, d as discoverPackages } from './discovery-DiMJWisl.js';
|
package/dist/index.js
CHANGED
|
@@ -1833,6 +1833,9 @@ var init_LLMRequest = __esm({
|
|
|
1833
1833
|
try {
|
|
1834
1834
|
return await this.tryModel(context, state, context.model, startTime, void 0);
|
|
1835
1835
|
} catch (primaryError) {
|
|
1836
|
+
if (primaryError?._userStop) {
|
|
1837
|
+
throw primaryError;
|
|
1838
|
+
}
|
|
1836
1839
|
console.error(`Primary model ${context.model} failed:`, primaryError);
|
|
1837
1840
|
lastFailedLogId = primaryError?._lastLogId;
|
|
1838
1841
|
state.emitTelemetry?.({
|
|
@@ -1859,6 +1862,9 @@ var init_LLMRequest = __esm({
|
|
|
1859
1862
|
lastFailedLogId
|
|
1860
1863
|
);
|
|
1861
1864
|
} catch (fallbackError) {
|
|
1865
|
+
if (fallbackError?._userStop) {
|
|
1866
|
+
throw fallbackError;
|
|
1867
|
+
}
|
|
1862
1868
|
console.error(
|
|
1863
1869
|
`Fallback model ${fallback.fallback_model_id} failed:`,
|
|
1864
1870
|
fallbackError
|
|
@@ -1948,6 +1954,20 @@ var init_LLMRequest = __esm({
|
|
|
1948
1954
|
this.fireAsyncMetadataFetch(response, state, logId);
|
|
1949
1955
|
return { response, logId };
|
|
1950
1956
|
} catch (error2) {
|
|
1957
|
+
if (state.abortController?.signal?.aborted) {
|
|
1958
|
+
await this.logError(
|
|
1959
|
+
state,
|
|
1960
|
+
new Error("Interrupted by user"),
|
|
1961
|
+
"user_interrupted",
|
|
1962
|
+
actualModelId,
|
|
1963
|
+
startTime,
|
|
1964
|
+
logId
|
|
1965
|
+
);
|
|
1966
|
+
const stopError = new Error("aborted");
|
|
1967
|
+
stopError._lastLogId = logId;
|
|
1968
|
+
stopError._userStop = true;
|
|
1969
|
+
throw stopError;
|
|
1970
|
+
}
|
|
1951
1971
|
console.error(`Error calling ${actualModelId} (attempt ${attempts}):`, error2);
|
|
1952
1972
|
await this.logError(state, error2, "api_error", actualModelId, startTime, logId);
|
|
1953
1973
|
if (attempts < MAX_RETRIES_PER_MODEL) {
|
|
@@ -23995,6 +24015,25 @@ var migration34 = {
|
|
|
23995
24015
|
var migrations = [migration, migration2, migration3, migration4, migration5, migration6, migration7, migration8, migration9, migration10, migration11, migration12, migration13, migration14, migration15, migration16, migration17, migration18, migration19, migration20, migration21, migration22, migration23, migration24, migration25, migration26, migration27, migration28, migration29, migration30, migration31, migration32, migration33, migration34];
|
|
23996
24016
|
var LATEST_SCHEMA_VERSION = migrations.length;
|
|
23997
24017
|
|
|
24018
|
+
// src/durable-objects/subagent-reconcile.ts
|
|
24019
|
+
var CHILD_STALE_AFTER_MS = 5 * 6e4;
|
|
24020
|
+
var CHILD_AUDIT_MIN_INTERVAL_MS = 6e4;
|
|
24021
|
+
var CHILD_AUDIT_MAX_PER_SWEEP = 4;
|
|
24022
|
+
var SETTLED_STATUSES = /* @__PURE__ */ new Set(["idle", "terminated"]);
|
|
24023
|
+
function isAuditCandidate(entry, nowMs) {
|
|
24024
|
+
if (SETTLED_STATUSES.has(entry.status)) return false;
|
|
24025
|
+
const createdMs = (entry.createdAt ?? 0) / 1e3;
|
|
24026
|
+
return nowMs - createdMs >= CHILD_STALE_AFTER_MS;
|
|
24027
|
+
}
|
|
24028
|
+
function resolveStaleChildStatus(entry, child, nowMs) {
|
|
24029
|
+
if (SETTLED_STATUSES.has(entry.status)) return null;
|
|
24030
|
+
if (!child) return "terminated";
|
|
24031
|
+
if (child.terminated) return "terminated";
|
|
24032
|
+
if (child.executing) return null;
|
|
24033
|
+
if (nowMs - child.lastActivityMs < CHILD_STALE_AFTER_MS) return null;
|
|
24034
|
+
return entry.resumable ? "idle" : "terminated";
|
|
24035
|
+
}
|
|
24036
|
+
|
|
23998
24037
|
// src/durable-objects/DurableThread.ts
|
|
23999
24038
|
init_types();
|
|
24000
24039
|
|
|
@@ -25797,12 +25836,103 @@ var DurableThread = class _DurableThread extends DurableObject {
|
|
|
25797
25836
|
);
|
|
25798
25837
|
const rows = cursor.toArray();
|
|
25799
25838
|
const raw = rows[0]?.value ?? "[]";
|
|
25839
|
+
let entries;
|
|
25800
25840
|
try {
|
|
25801
25841
|
const parsed = JSON.parse(raw);
|
|
25802
|
-
|
|
25842
|
+
entries = Array.isArray(parsed) ? parsed : [];
|
|
25803
25843
|
} catch {
|
|
25804
25844
|
return [];
|
|
25805
25845
|
}
|
|
25846
|
+
return this.reconcileStaleChildren(entries);
|
|
25847
|
+
}
|
|
25848
|
+
/** In-memory throttle/reentrancy guards for the stale-child reconciler. */
|
|
25849
|
+
lastChildAuditAt = 0;
|
|
25850
|
+
childAuditInFlight = false;
|
|
25851
|
+
/**
|
|
25852
|
+
* Lazily heal registry entries stranded at a "working" status. The normal
|
|
25853
|
+
* settlement chain lives only in the parent's `waitUntil`; a parent
|
|
25854
|
+
* eviction/deploy/kill during a child's run leaves the entry at `running`
|
|
25855
|
+
* forever and clients render an eternal spinner. On registry reads, audit
|
|
25856
|
+
* old unsettled entries against the child thread's ACTUAL state and settle
|
|
25857
|
+
* them — conservatively (see subagent-reconcile.ts): resumable children
|
|
25858
|
+
* are never deterministically terminated.
|
|
25859
|
+
*/
|
|
25860
|
+
async reconcileStaleChildren(entries) {
|
|
25861
|
+
const nowMs = Date.now();
|
|
25862
|
+
if (this.childAuditInFlight) return entries;
|
|
25863
|
+
if (nowMs - this.lastChildAuditAt < CHILD_AUDIT_MIN_INTERVAL_MS) return entries;
|
|
25864
|
+
const candidates = entries.filter((entry) => isAuditCandidate(entry, nowMs));
|
|
25865
|
+
if (candidates.length === 0) return entries;
|
|
25866
|
+
this.childAuditInFlight = true;
|
|
25867
|
+
this.lastChildAuditAt = nowMs;
|
|
25868
|
+
try {
|
|
25869
|
+
const agentBuilderId = this.env.AGENT_BUILDER.idFromName("singleton");
|
|
25870
|
+
const agentBuilder = this.env.AGENT_BUILDER.get(agentBuilderId);
|
|
25871
|
+
const changed = [];
|
|
25872
|
+
for (const entry of candidates.slice(0, CHILD_AUDIT_MAX_PER_SWEEP)) {
|
|
25873
|
+
let facts = null;
|
|
25874
|
+
try {
|
|
25875
|
+
const child = await agentBuilder.getThread(entry.reference);
|
|
25876
|
+
facts = child ? {
|
|
25877
|
+
terminated: child.terminated ?? null,
|
|
25878
|
+
executing: child.executing === true,
|
|
25879
|
+
lastActivityMs: Number(child.last_activity_at ?? child.created_at ?? 0) * 1e3
|
|
25880
|
+
} : null;
|
|
25881
|
+
} catch {
|
|
25882
|
+
continue;
|
|
25883
|
+
}
|
|
25884
|
+
const resolution = resolveStaleChildStatus(entry, facts, nowMs);
|
|
25885
|
+
if (resolution) {
|
|
25886
|
+
changed.push({
|
|
25887
|
+
reference: entry.reference,
|
|
25888
|
+
status: resolution,
|
|
25889
|
+
// Settling a live one-shot child to terminated also terminates
|
|
25890
|
+
// the thread itself so registry and reality agree.
|
|
25891
|
+
terminateChild: resolution === "terminated" && facts !== null && !facts.terminated
|
|
25892
|
+
});
|
|
25893
|
+
}
|
|
25894
|
+
}
|
|
25895
|
+
if (changed.length === 0) return entries;
|
|
25896
|
+
const byRef = new Map(changed.map((c) => [c.reference, c]));
|
|
25897
|
+
const healed = entries.map(
|
|
25898
|
+
(entry) => byRef.has(entry.reference) ? { ...entry, status: byRef.get(entry.reference).status } : entry
|
|
25899
|
+
);
|
|
25900
|
+
await this.setChildrenRegistry(healed);
|
|
25901
|
+
for (const c of changed) {
|
|
25902
|
+
if (c.terminateChild) {
|
|
25903
|
+
try {
|
|
25904
|
+
const childId = this.env.AGENT_BUILDER_THREAD.idFromName(c.reference);
|
|
25905
|
+
const childStub = this.env.AGENT_BUILDER_THREAD.get(childId);
|
|
25906
|
+
await childStub.terminateThread?.(c.reference);
|
|
25907
|
+
} catch (error) {
|
|
25908
|
+
console.error("[DurableThread] Stale-child terminate failed (non-fatal):", error);
|
|
25909
|
+
}
|
|
25910
|
+
}
|
|
25911
|
+
await this.broadcastChildStatusChanged(c.reference);
|
|
25912
|
+
}
|
|
25913
|
+
console.log(
|
|
25914
|
+
`[DurableThread] Reconciled ${changed.length} stale subagent entr${changed.length === 1 ? "y" : "ies"}:`,
|
|
25915
|
+
changed.map((c) => `${c.reference.slice(0, 8)}\u2192${c.status}`).join(", ")
|
|
25916
|
+
);
|
|
25917
|
+
return healed;
|
|
25918
|
+
} finally {
|
|
25919
|
+
this.childAuditInFlight = false;
|
|
25920
|
+
}
|
|
25921
|
+
}
|
|
25922
|
+
/**
|
|
25923
|
+
* Child-side registry settlement: called from the CHILD's own DO whenever
|
|
25924
|
+
* a run ends, so the spinner clears even when the parent-held completion
|
|
25925
|
+
* chain died with the parent. Only downgrades a live "working" status to
|
|
25926
|
+
* idle — never clobbers terminated.
|
|
25927
|
+
*/
|
|
25928
|
+
async settleChildRegistryIdle(_threadId, reference) {
|
|
25929
|
+
const entries = await this.getChildrenRegistry("");
|
|
25930
|
+
const entry = entries.find((e) => e.reference === reference);
|
|
25931
|
+
if (!entry || entry.status === "terminated" || entry.status === "idle") return;
|
|
25932
|
+
await this.setChildrenRegistry(
|
|
25933
|
+
entries.map((e) => e.reference === reference ? { ...e, status: "idle" } : e)
|
|
25934
|
+
);
|
|
25935
|
+
await this.broadcastChildStatusChanged(reference);
|
|
25806
25936
|
}
|
|
25807
25937
|
async setChildrenRegistry(entries) {
|
|
25808
25938
|
await this.ctx.storage.sql.exec(
|
|
@@ -26384,6 +26514,33 @@ var DurableThread = class _DurableThread extends DurableObject {
|
|
|
26384
26514
|
* Used by blocking subagent tool calls.
|
|
26385
26515
|
*/
|
|
26386
26516
|
async executeBlocking(threadId, agentId, initial_messages, data) {
|
|
26517
|
+
try {
|
|
26518
|
+
return await this.executeBlockingImpl(threadId, agentId, initial_messages, data);
|
|
26519
|
+
} finally {
|
|
26520
|
+
this.ctx.waitUntil?.(this.settleOwnRegistryEntry(threadId));
|
|
26521
|
+
}
|
|
26522
|
+
}
|
|
26523
|
+
/** Best-effort: mark this child's entry idle in its parent's registry. */
|
|
26524
|
+
async settleOwnRegistryEntry(threadId) {
|
|
26525
|
+
try {
|
|
26526
|
+
const terminatedCursor = await this.ctx.storage.sql.exec(
|
|
26527
|
+
`SELECT value FROM execution_state WHERE key = 'terminated' LIMIT 1`
|
|
26528
|
+
);
|
|
26529
|
+
const terminated = terminatedCursor.toArray()[0]?.value;
|
|
26530
|
+
if (terminated && terminated !== "" && terminated !== "null") return;
|
|
26531
|
+
const agentBuilderId = this.env.AGENT_BUILDER.idFromName("singleton");
|
|
26532
|
+
const agentBuilder = this.env.AGENT_BUILDER.get(agentBuilderId);
|
|
26533
|
+
const meta = await agentBuilder.getThread(threadId);
|
|
26534
|
+
const parent = meta?.parent;
|
|
26535
|
+
if (!parent) return;
|
|
26536
|
+
const parentId = this.env.AGENT_BUILDER_THREAD.idFromName(parent);
|
|
26537
|
+
const parentStub = this.env.AGENT_BUILDER_THREAD.get(parentId);
|
|
26538
|
+
await parentStub.settleChildRegistryIdle?.(parent, threadId);
|
|
26539
|
+
} catch (error) {
|
|
26540
|
+
console.error("[DurableThread] Child-side registry settlement failed (non-fatal):", error);
|
|
26541
|
+
}
|
|
26542
|
+
}
|
|
26543
|
+
async executeBlockingImpl(threadId, agentId, initial_messages, data) {
|
|
26387
26544
|
await this.ensureMigrated();
|
|
26388
26545
|
await this.assertNotTerminated();
|
|
26389
26546
|
let parentThreadId = null;
|
|
@@ -27760,7 +27917,7 @@ ${resultContent}${attachmentSummary}`;
|
|
|
27760
27917
|
`
|
|
27761
27918
|
SELECT
|
|
27762
27919
|
id, message_id, provider, actual_provider, standard_agents_router_used, model, model_name, prompt_name,
|
|
27763
|
-
tools_called, queued_tools, provider_tools, parent_log_id, retry_of_log_id, error, cost_total,
|
|
27920
|
+
tools_called, queued_tools, provider_tools, parent_log_id, retry_of_log_id, error, error_type, cost_total,
|
|
27764
27921
|
input_tokens, cached_tokens, output_tokens, total_tokens,
|
|
27765
27922
|
is_complete, created_at
|
|
27766
27923
|
FROM logs
|
|
@@ -27785,6 +27942,7 @@ ${resultContent}${attachmentSummary}`;
|
|
|
27785
27942
|
parent_log_id: row.parent_log_id,
|
|
27786
27943
|
retry_of_log_id: row.retry_of_log_id,
|
|
27787
27944
|
error: row.error,
|
|
27945
|
+
error_type: row.error_type,
|
|
27788
27946
|
cost_total: row.cost_total,
|
|
27789
27947
|
input_tokens: row.input_tokens,
|
|
27790
27948
|
cached_tokens: row.cached_tokens,
|