@standardagents/builder 0.36.3 → 0.37.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 +1333 -1034
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/{ApiKeysView-CxelZw61.js → ApiKeysView-BhuT3pIF.js} +1 -1
- package/dist/client/{CenteredContentView-CeQNRQH8.js → CenteredContentView-CfgX3Ao3.js} +1 -1
- package/dist/client/{CompositionView-YO0nHsYV.js → CompositionView-B9FfWMHd.js} +1 -1
- package/dist/client/{ConfirmDialog.vue_vue_type_script_setup_true_lang-_Y_F2vcO.js → ConfirmDialog.vue_vue_type_script_setup_true_lang-BqwwsXWJ.js} +1 -1
- package/dist/client/{CopyButton.vue_vue_type_script_setup_true_lang-CtC06f6H.js → CopyButton.vue_vue_type_script_setup_true_lang-Cqm3Vt3E.js} +1 -1
- package/dist/client/{DataTable.vue_vue_type_script_setup_true_lang-CqaWkS63.js → DataTable.vue_vue_type_script_setup_true_lang-CA5qgsty.js} +1 -1
- package/dist/client/{JsonViewer-71rdOpyq.js → JsonViewer-ByQKCShF.js} +1 -1
- package/dist/client/{LoginView-CkDpPh8U.js → LoginView-J4qtHbQK.js} +1 -1
- package/dist/client/{MarketplaceView-UYrMBLon.js → MarketplaceView-CshdWDqp.js} +1 -1
- package/dist/client/{Modal.vue_vue_type_script_setup_true_lang-B1HPGo8o.js → Modal.vue_vue_type_script_setup_true_lang-DKdB9A8Z.js} +1 -1
- package/dist/client/{ModelModal.vue_vue_type_script_setup_true_lang-DejoTM9W.js → ModelModal.vue_vue_type_script_setup_true_lang-BAxaBZsx.js} +1 -1
- package/dist/client/{ModelsView-DKYzp2fJ.js → ModelsView-B_n306yk.js} +1 -1
- package/dist/client/{PromptEditView-BlYHZ0ao.js → PromptEditView-C85qRgsE.js} +1 -1
- package/dist/client/{PromptModal-B1neRzSc.js → PromptModal-PNpoJfqD.js} +1 -1
- package/dist/client/{PromptsView-C0Ez74j0.js → PromptsView-BKnfThIF.js} +1 -1
- package/dist/client/{ProvidersView-CFc4K0IC.js → ProvidersView-Df41VhHD.js} +1 -1
- package/dist/client/ThreadInspectorPane.vue_vue_type_script_setup_true_lang-CtIBWHUR.js +22 -0
- package/dist/client/{ThreadsView-B1hFXL-4.js → ThreadsView-sjo5Rrcm.js} +1 -1
- package/dist/client/{ToolsView-B3KqeOZD.js → ToolsView-C0MH9x3N.js} +1 -1
- package/dist/client/{UsersView-CF1tomjI.js → UsersView--TQiJYP7.js} +1 -1
- package/dist/client/{VariablesView-CP0TDspK.js → VariablesView-BO3UljZu.js} +1 -1
- package/dist/client/assets/{ThreadInspectorPane-2QOWOtet.css → ThreadInspectorPane-D9ZMzSTn.css} +1 -1
- package/dist/client/{index-BTs3PMFs.js → index-BgZnQr8X.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/{index-DUIfQjBW.d.ts → index-DceFbLG9.d.ts} +62 -2
- package/dist/index.d.ts +61 -3
- package/dist/index.js +10804 -10203
- package/dist/index.js.map +1 -1
- package/dist/packing.js +213 -161
- package/dist/packing.js.map +1 -1
- package/dist/plugin.js +537 -504
- package/dist/plugin.js.map +1 -1
- package/dist/runtime.d.ts +176 -39
- package/dist/runtime.js +10280 -9672
- package/dist/runtime.js.map +1 -1
- package/dist/test.d.ts +1 -1
- package/package.json +5 -5
- package/dist/client/ThreadInspectorPane.vue_vue_type_script_setup_true_lang-CXbSQo2-.js +0 -23
package/dist/runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as ThreadEnv,
|
|
2
|
-
export { f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES,
|
|
1
|
+
import { i as AuthContext, e as ThreadEnv, v as Agent, x as ThreadMetadata, y as ToolResult, M as Message, n as ClientToolRequest, o as ClientToolResponse, p as ClientStreamRequest, q as ClientStreamResponse, G as FileRecord, F as FlowState, K as FileStats, J as GrepResult, H as AttachmentRef, Q as MessageContent, E as Env, w as ThreadInstance } from './index-DceFbLG9.js';
|
|
2
|
+
export { A as AuthUser, f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, t as ClientDuplex, u as ClientForwarding, B as Controller, a as ControllerContext, z as FlowResult, O as ImageContentPart, I as ImageMetadata, L as LLMResponse, P as MultimodalContent, R as RequestContext, S as StorageBackend, D as TelemetryEvent, N as TextContentPart, b as ThreadEndpointContext, T as ToolCall, g as authenticate, j as callClient, k as callClientStream, c as createThreadEndpointHandler, m as decodeStreamChunk, d as defineController, l as encodeStreamChunk, h as requireAdmin, r as requireAuth, s as supportsClientForwarding } from './index-DceFbLG9.js';
|
|
3
3
|
import { CodeExecutionOptions, CodeExecutionResult, SubagentRegistryEntry, InjectMessageInput, QueueMessageInput, CredentialGrant, SkillMetadata, SkillFileInput, ModelDefinition as ModelDefinition$1, ToolArgs, PromptTextPart, PromptEnvPart, VariableDefinition, SubpromptConfig as SubpromptConfig$1, PromptToolConfig as PromptToolConfig$1, SubagentToolConfig as SubagentToolConfig$1, ReasoningConfig, SideConfig as SideConfig$1, LLMProviderInterface, ContentPart, TextPart, ImagePart, FilePart, ThreadState, NamespaceContext, DefinitionLoader } from '@standardagents/spec';
|
|
4
4
|
export { AgentType, DefinitionLoader, GlobalNamespaceContext, HookSignatures, ImageContent, ModelCapabilities, ModelProvider, NamespaceContext, PackageSignature, PackedExports, PackedMeta, PackedMetadata, PackedNamespaceContext, PromptInput, PromptTextPart, ProviderAssistantMessage, ProviderError, ProviderErrorCode, ProviderFactory, ProviderFactoryConfig, ProviderFinishReason, ProviderGeneratedImage, ProviderMessage, ProviderMessageContent, ModelCapabilities as ProviderModelCapabilities, ProviderReasoningDetail, ProviderRequest, ProviderResponse, ProviderStreamChunk, ProviderSystemMessage, ProviderTool, ProviderToolCallPart, ProviderToolMessage, ProviderToolResultContent, ProviderUsage, ProviderUserMessage, ReasoningConfig, StructuredPrompt, TextContent, Tool, ToolArgs, ToolArgsNode, ToolArgsRawShape, ToolContent, belongsToPackage, defineAgent, defineHook, defineModel, definePrompt, defineTool, isPacked, isVisibleInNamespace, mapReasoningLevel } from '@standardagents/spec';
|
|
5
5
|
import { DurableObject, WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -94,46 +94,39 @@ declare global {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* Permissions utility for role-based access control
|
|
98
98
|
*
|
|
99
|
-
*
|
|
100
|
-
* -
|
|
101
|
-
* -
|
|
102
|
-
*
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
username: string;
|
|
107
|
-
/** 'admin' | 'user' | 'api' (API-only: normal API access, no UI, no logs). */
|
|
108
|
-
role: string;
|
|
109
|
-
/**
|
|
110
|
-
* Explicit permission grants (e.g. 'logs'). `null`/absent = legacy row with
|
|
111
|
-
* no explicit set — see {@link hasPermission} for the fallback rules.
|
|
112
|
-
*/
|
|
113
|
-
permissions?: string[] | null;
|
|
114
|
-
platform_user_id?: string | null;
|
|
115
|
-
email?: string | null;
|
|
116
|
-
display_name?: string | null;
|
|
117
|
-
avatar_url?: string | null;
|
|
118
|
-
}
|
|
119
|
-
interface AuthContext {
|
|
120
|
-
user: AuthUser;
|
|
121
|
-
authType: 'super_admin' | 'session' | 'api_key';
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Authenticate a request using various token types
|
|
99
|
+
* Current behavior:
|
|
100
|
+
* - Admin role can do everything (early return true)
|
|
101
|
+
* - Other roles only get baseline access (own threads)
|
|
102
|
+
*
|
|
103
|
+
* The `can()` function checks arbitrary permission strings.
|
|
104
|
+
* Currently, non-admin users have no explicit permissions,
|
|
105
|
+
* meaning they rely on ownership checks for access.
|
|
125
106
|
*/
|
|
126
|
-
|
|
107
|
+
|
|
127
108
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
109
|
+
* Check if a user can access a specific thread
|
|
110
|
+
*
|
|
111
|
+
* @param auth - The authenticated user context
|
|
112
|
+
* @param thread - The thread to check access for (must have user_id)
|
|
113
|
+
* @returns true if the user can access the thread
|
|
130
114
|
*/
|
|
131
|
-
declare function
|
|
115
|
+
declare function canAccessThread(auth: AuthContext, thread: {
|
|
116
|
+
user_id: string | null;
|
|
117
|
+
}): boolean;
|
|
118
|
+
|
|
119
|
+
/** Central API exposure policy shared by the generated Worker router and tests. */
|
|
120
|
+
declare function isHostedInstance(env: Record<string, unknown> | undefined): boolean;
|
|
132
121
|
/**
|
|
133
|
-
*
|
|
134
|
-
*
|
|
122
|
+
* Local-only conveniences are enabled by the request destination, not merely
|
|
123
|
+
* by the absence of a deployment flag. This makes an incorrectly configured
|
|
124
|
+
* internet-facing Worker fail closed while preserving localhost and OrbStack.
|
|
135
125
|
*/
|
|
136
|
-
declare function
|
|
126
|
+
declare function isTrustedLocalDevelopmentRequest(request: Request, env: Record<string, unknown> | undefined): boolean;
|
|
127
|
+
declare function isPublicApiRoute(routePath: string, request: Request, env: Record<string, unknown> | undefined): boolean;
|
|
128
|
+
/** Instance-global authoring and package-management surfaces are admin-only. */
|
|
129
|
+
declare function isAdminOnlyApiRoute(routePath: string, method?: string): boolean;
|
|
137
130
|
|
|
138
131
|
type AlarmQueueStatus = "pending" | "processing" | "completed" | "failed" | "agent_canceled" | "user_canceled";
|
|
139
132
|
type EffectCancelSource = "agent" | "user";
|
|
@@ -168,6 +161,24 @@ interface EffectRunActionResult {
|
|
|
168
161
|
replayedId?: string;
|
|
169
162
|
}
|
|
170
163
|
|
|
164
|
+
interface RuntimeSafetyStatus {
|
|
165
|
+
state: 'active' | 'quarantined';
|
|
166
|
+
reason: string | null;
|
|
167
|
+
source: string | null;
|
|
168
|
+
trippedAt: number | null;
|
|
169
|
+
resumedAt: number | null;
|
|
170
|
+
forensicHold: boolean;
|
|
171
|
+
lastActionId: string | null;
|
|
172
|
+
observed: Record<string, number>;
|
|
173
|
+
}
|
|
174
|
+
interface RuntimeQuarantineInput {
|
|
175
|
+
actionId: string;
|
|
176
|
+
reason: string;
|
|
177
|
+
source?: string;
|
|
178
|
+
forensicHold?: boolean;
|
|
179
|
+
observed?: Record<string, number>;
|
|
180
|
+
}
|
|
181
|
+
|
|
171
182
|
interface CodeExecutionBridgeRegistration {
|
|
172
183
|
call(functionId: string, encodedArgs: unknown[]): Promise<unknown>;
|
|
173
184
|
}
|
|
@@ -209,6 +220,7 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
209
220
|
private pendingClientCalls;
|
|
210
221
|
private clientStreams;
|
|
211
222
|
private alarmQueue;
|
|
223
|
+
private runtimeSafety;
|
|
212
224
|
private alarmQueueRearmed;
|
|
213
225
|
private currentAbortController;
|
|
214
226
|
private isExecuting;
|
|
@@ -644,7 +656,7 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
644
656
|
* "Working" spinner. Used by the FlowEngine's terminal catch and the parked
|
|
645
657
|
* forwarded-call TTL.
|
|
646
658
|
*/
|
|
647
|
-
settleTerminalFailure(errorMessage: string): Promise<void>;
|
|
659
|
+
settleTerminalFailure(errorMessage: string, threadId?: string): Promise<void>;
|
|
648
660
|
stop(): Promise<Response>;
|
|
649
661
|
/**
|
|
650
662
|
* Continue execution from where it stopped (RPC method)
|
|
@@ -1140,6 +1152,18 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
1140
1152
|
* historical accept-anything delivery for old CLIs.
|
|
1141
1153
|
*/
|
|
1142
1154
|
private sendClientToolRequest;
|
|
1155
|
+
/**
|
|
1156
|
+
* The delivered result of a parked forwarded call, if the client has
|
|
1157
|
+
* already resolved it — lets the approval-park path grace-wait briefly and
|
|
1158
|
+
* return the REAL result inline instead of a "⏳ Awaiting your approval…"
|
|
1159
|
+
* placeholder. Instant auto-accepts (the common case: the client's saved
|
|
1160
|
+
* permission level covers the call) otherwise race the placeholder into
|
|
1161
|
+
* stored history, leaving the model blind to its own tool outcomes.
|
|
1162
|
+
*/
|
|
1163
|
+
getDeliveredClientToolResult(toolCallId: string): Promise<{
|
|
1164
|
+
content: string;
|
|
1165
|
+
toolStatus: string | null;
|
|
1166
|
+
} | null>;
|
|
1143
1167
|
/** Still-pending durable forwarded calls (for re-sending after a reconnect). */
|
|
1144
1168
|
getPendingClientCalls(): Promise<Array<{
|
|
1145
1169
|
toolCallId: string;
|
|
@@ -1228,6 +1252,17 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
1228
1252
|
* Filters silent messages based on each socket's includeSilent preference
|
|
1229
1253
|
*/
|
|
1230
1254
|
private broadcastMessage;
|
|
1255
|
+
/**
|
|
1256
|
+
* The FlowEngine's message emit path: broadcast the record, and stamp
|
|
1257
|
+
* message recency when it is the thread's visible terminal assistant reply.
|
|
1258
|
+
*
|
|
1259
|
+
* This is the frame a client's reducer consumes to retire its provisional
|
|
1260
|
+
* draft, so it is the one place where "the user has something new to read"
|
|
1261
|
+
* is known. The stamp deliberately does NOT carry a preview: previews are
|
|
1262
|
+
* row labels and stay keyed to the user's own message, while recency has to
|
|
1263
|
+
* follow the agent's reply.
|
|
1264
|
+
*/
|
|
1265
|
+
private emitFlowMessage;
|
|
1231
1266
|
private broadcastMessageWithSubagentProjection;
|
|
1232
1267
|
/**
|
|
1233
1268
|
* Broadcast a content chunk for real-time streaming
|
|
@@ -1277,6 +1312,16 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
1277
1312
|
* the alarm chain. All errors are caught and logged.
|
|
1278
1313
|
*/
|
|
1279
1314
|
alarm(): Promise<void>;
|
|
1315
|
+
/** Persist a reversible emergency stop without scanning or deleting thread data. */
|
|
1316
|
+
emergencyQuarantine(input: RuntimeQuarantineInput): Promise<RuntimeSafetyStatus>;
|
|
1317
|
+
/** Return the low-cost quarantine status used by Brolly and diagnostics. */
|
|
1318
|
+
getRuntimeSafetyStatus(): Promise<RuntimeSafetyStatus>;
|
|
1319
|
+
/** Resume only through an explicit idempotent action; forensic holds need release. */
|
|
1320
|
+
emergencyResume(input: {
|
|
1321
|
+
actionId: string;
|
|
1322
|
+
reason: string;
|
|
1323
|
+
releaseForensicHold?: boolean;
|
|
1324
|
+
}): Promise<RuntimeSafetyStatus>;
|
|
1280
1325
|
/** Heartbeat: called by LLMRequest on each attempt and streamed chunk. */
|
|
1281
1326
|
noteExecutionProgress(): void;
|
|
1282
1327
|
/**
|
|
@@ -1344,6 +1389,7 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
1344
1389
|
watchdogStrikes: number;
|
|
1345
1390
|
watchdogCeilingMs: number;
|
|
1346
1391
|
stopped: boolean;
|
|
1392
|
+
runtimeSafety: RuntimeSafetyStatus;
|
|
1347
1393
|
incompleteLogs: Array<{
|
|
1348
1394
|
id: string;
|
|
1349
1395
|
model: string | null;
|
|
@@ -1873,7 +1919,24 @@ interface ThreadRegistryEntry {
|
|
|
1873
1919
|
executing?: boolean;
|
|
1874
1920
|
/** Short excerpt of the most recent user message, for thread-list rows. */
|
|
1875
1921
|
last_message_preview?: string | null;
|
|
1922
|
+
/**
|
|
1923
|
+
* Unix seconds of the newest VISIBLE MESSAGE on this thread — the one field
|
|
1924
|
+
* clients key unread indicators on. It moves when a non-empty user (or
|
|
1925
|
+
* operator assistant-role) message arrives, and when a visible terminal
|
|
1926
|
+
* assistant record lands (`isVisibleTerminalAssistantMessage`): terminal
|
|
1927
|
+
* answers, attachment-only replies, and failed rows with visible text — but
|
|
1928
|
+
* never mid-turn tool-calling steps, silent rows, sub-prompt records, or
|
|
1929
|
+
* background execution activity (which move only `last_activity_at`).
|
|
1930
|
+
* Monotonic per thread and never propagated to ancestors.
|
|
1931
|
+
*/
|
|
1932
|
+
last_message_at?: number | null;
|
|
1876
1933
|
}
|
|
1934
|
+
/**
|
|
1935
|
+
* Safe registry projection carried by system events. Thread env and arbitrary
|
|
1936
|
+
* properties are intentionally excluded: the stream is an invalidation/list
|
|
1937
|
+
* surface, not a second transport for thread configuration or secrets.
|
|
1938
|
+
*/
|
|
1939
|
+
type ThreadEventPayload = Pick<ThreadRegistryEntry, 'id' | 'agent_name' | 'origin_agent_name' | 'user_id' | 'tags' | 'parent' | 'terminated' | 'created_at' | 'last_activity_at' | 'executing' | 'last_message_preview' | 'last_message_at'>;
|
|
1877
1940
|
interface PendingSubagentAttachmentRef {
|
|
1878
1941
|
path: string;
|
|
1879
1942
|
name?: string;
|
|
@@ -1981,6 +2044,77 @@ interface Provider$1 {
|
|
|
1981
2044
|
sdk: string;
|
|
1982
2045
|
api_key: string;
|
|
1983
2046
|
}
|
|
2047
|
+
/**
|
|
2048
|
+
* Lightweight agent metadata included with real-time thread events.
|
|
2049
|
+
*/
|
|
2050
|
+
interface ThreadEventAgent {
|
|
2051
|
+
name: string;
|
|
2052
|
+
title: string;
|
|
2053
|
+
type: string;
|
|
2054
|
+
description?: string;
|
|
2055
|
+
icon?: string;
|
|
2056
|
+
}
|
|
2057
|
+
/**
|
|
2058
|
+
* DurableAgentBuilder - The root Durable Object for AgentBuilder.
|
|
2059
|
+
*
|
|
2060
|
+
* This is a singleton DO that stores:
|
|
2061
|
+
* - Thread registry (maps thread IDs to agent names)
|
|
2062
|
+
* - User authentication data
|
|
2063
|
+
* - Provider credentials (API keys for LLM providers)
|
|
2064
|
+
* - Edit lock state for coordinated edits
|
|
2065
|
+
*
|
|
2066
|
+
* ## Usage
|
|
2067
|
+
*
|
|
2068
|
+
* Users must extend this class to provide virtual module access:
|
|
2069
|
+
*
|
|
2070
|
+
* ```typescript
|
|
2071
|
+
* import { DurableAgentBuilder } from '@standardagents/builder/runtime';
|
|
2072
|
+
* import { models } from 'virtual:@standardagents-models';
|
|
2073
|
+
* import { prompts } from 'virtual:@standardagents-prompts';
|
|
2074
|
+
* import { agents } from 'virtual:@standardagents-agents';
|
|
2075
|
+
*
|
|
2076
|
+
* export class AgentBuilder extends DurableAgentBuilder {
|
|
2077
|
+
* models() { return models; }
|
|
2078
|
+
* prompts() { return prompts; }
|
|
2079
|
+
* agents() { return agents; }
|
|
2080
|
+
* }
|
|
2081
|
+
* ```
|
|
2082
|
+
*/
|
|
2083
|
+
/**
|
|
2084
|
+
* Event types that can be emitted via WebSocket
|
|
2085
|
+
*/
|
|
2086
|
+
type AgentBuilderEvent = {
|
|
2087
|
+
type: 'thread_created';
|
|
2088
|
+
thread: ThreadEventPayload & {
|
|
2089
|
+
agent?: ThreadEventAgent;
|
|
2090
|
+
};
|
|
2091
|
+
} | {
|
|
2092
|
+
type: 'thread_updated';
|
|
2093
|
+
thread: ThreadEventPayload & {
|
|
2094
|
+
agent?: ThreadEventAgent;
|
|
2095
|
+
};
|
|
2096
|
+
} | {
|
|
2097
|
+
type: 'thread_deleted';
|
|
2098
|
+
threadId: string;
|
|
2099
|
+
}
|
|
2100
|
+
/**
|
|
2101
|
+
* Lightweight activity signal. Kept separate from `thread_updated` because it
|
|
2102
|
+
* fires on every execution start/stop: re-broadcasting the whole registry
|
|
2103
|
+
* entry would decrypt thread env on each transition for data that never
|
|
2104
|
+
* changed.
|
|
2105
|
+
*/
|
|
2106
|
+
| {
|
|
2107
|
+
type: 'thread_activity';
|
|
2108
|
+
threadId: string;
|
|
2109
|
+
/** Present only when this event actually wrote the field: a message-only
|
|
2110
|
+
* recency stamp omits last_activity_at, and `executing` rides only on a
|
|
2111
|
+
* real transition — clients must leave their current value alone for
|
|
2112
|
+
* absent fields. */
|
|
2113
|
+
last_activity_at?: number;
|
|
2114
|
+
executing?: boolean;
|
|
2115
|
+
last_message_preview?: string | null;
|
|
2116
|
+
last_message_at?: number | null;
|
|
2117
|
+
};
|
|
1984
2118
|
/** Sort orders supported by `listThreads`. */
|
|
1985
2119
|
type ThreadListSort = 'activity' | 'created' | 'oldest';
|
|
1986
2120
|
declare class DurableAgentBuilder<Env extends AgentBuilderEnv = AgentBuilderEnv> extends DurableObject<Env> {
|
|
@@ -2131,6 +2265,7 @@ declare class DurableAgentBuilder<Env extends AgentBuilderEnv = AgentBuilderEnv>
|
|
|
2131
2265
|
recordThreadActivity(threadId: string, options?: {
|
|
2132
2266
|
executing?: boolean;
|
|
2133
2267
|
messagePreview?: string | null;
|
|
2268
|
+
messageAt?: number;
|
|
2134
2269
|
}): Promise<void>;
|
|
2135
2270
|
/**
|
|
2136
2271
|
* Fill in previews for threads that predate preview tracking. Callers read
|
|
@@ -2503,9 +2638,11 @@ declare class DurableAgentBuilder<Env extends AgentBuilderEnv = AgentBuilderEnv>
|
|
|
2503
2638
|
*/
|
|
2504
2639
|
broadcastThreadUpdated(threadId: string): Promise<void>;
|
|
2505
2640
|
/**
|
|
2506
|
-
* Broadcast an event to
|
|
2641
|
+
* Broadcast an event only to its owner or an explicitly all-scoped admin.
|
|
2507
2642
|
*/
|
|
2508
2643
|
private broadcastEvent;
|
|
2644
|
+
/** Resolve a thread owner without decrypting its env or loading the row. */
|
|
2645
|
+
private getThreadOwnerId;
|
|
2509
2646
|
/**
|
|
2510
2647
|
* WebSocket Hibernation API handler for incoming messages
|
|
2511
2648
|
* Called when a message is received on a hibernated WebSocket
|
|
@@ -4126,4 +4263,4 @@ declare function createNamespaceContext(agentDef: {
|
|
|
4126
4263
|
*/
|
|
4127
4264
|
declare function isQualifiedName(name: string): boolean;
|
|
4128
4265
|
|
|
4129
|
-
export { Agent, type AgentBuilderEnv, type AgentDefinition, AttachmentRef,
|
|
4266
|
+
export { Agent, type AgentBuilderEnv, type AgentBuilderEvent, type AgentDefinition, AttachmentRef, AuthContext, type BroadcastOptions, ClientStreamRequest, ClientStreamResponse, ClientToolRequest, ClientToolResponse, CodeExecutionBridge, DurableAgentBuilder, DurableThread, DurableUserHub, Env, FileRecord, FileStats, FlowState, FlowStateSdk, type FlowStateWithSdk, GrepResult, type HubClientInfo, type ImageContextConfig, type InjectMessageOptions$1 as InjectMessageOptions, type Provider as LLMProviderInterface, Message, MessageContent, type ModelDefinition, NamespaceResolutionError, NamespacedRegistry, type PromptContent, type PromptDefinition, type PromptIncludePart, type PromptPart, type PromptToolConfig, type Provider$1 as Provider, type ProviderContentPart, type ProviderFilePart, type ProviderImagePart, ProviderRegistry, type ProviderTextPart, type SessionToolBinding, type SessionToolConfig, type SideConfig, type SubagentToolConfig, type SubpromptConfig, ThreadEnv, type ThreadEventPayload, ThreadInstance, ThreadMetadata, type ThreadRegistryEntry, ThreadWatchdog, type ThreadWatchdogState, type ToolConfig, ToolResult, type UpdateThreadParams, type User, type WatchdogCheckin, type WatchdogProbeResult, buildImageDescription, canAccessThread, cat, createNamespaceContext, emitThreadEvent, enhanceFlowState, exists, find, forceTurn, generateImageDescription, getFileStats, getMessages, getMessagesToSummarize, getShortName, getThumbnail, getUnsummarizedImageAttachments, getVisibleAgentNames, getVisibleModelNames, getVisiblePromptNames, getVisibleToolNames, grep, hasImageAttachments, head, injectMessage, isAdminOnlyApiRoute, isHostedInstance, isPublicApiRoute, isQualifiedName, isTrustedLocalDevelopmentRequest, linkFile, mkdir, move, optimizeImageContext, parseQualifiedName, qualifyName, queueTool, readFile, readdir, reloadHistory, rename, replaceImagesWithDescriptions, resolveAgent, resolveHook, resolveModel, resolvePrompt, resolveTool, rmdir, stat, tail, unlink, updateThread, writeFile, writeImage };
|