@standardagents/builder 0.41.10 → 0.41.11
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 +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/{resolver-kvVdxct2.d.ts → resolver-Db4EfjkK.d.ts} +5 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +12 -2
- package/dist/runtime.js.map +1 -1
- package/package.json +5 -5
|
@@ -1943,6 +1943,11 @@ declare class DurableUserHub extends DurableObject<DurableUserHubEnv> {
|
|
|
1943
1943
|
private limitsFor;
|
|
1944
1944
|
/** Load the project's room definition from the users registry, once. */
|
|
1945
1945
|
private loadRoom;
|
|
1946
|
+
/**
|
|
1947
|
+
* How a room execution presents itself to grant policies: as the endpoint
|
|
1948
|
+
* it declares it fronts, otherwise as a room named by its registry key.
|
|
1949
|
+
*/
|
|
1950
|
+
private roomCaller;
|
|
1946
1951
|
/** Whether `key` is room-owned state, exempt from `user_value_changed`. */
|
|
1947
1952
|
private roomOwnsKey;
|
|
1948
1953
|
/**
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { m as AgentBuilderEnv, n as AgentBuilderEvent, A as AgentDefinition, ah as BroadcastOptions, C as CodeExecutionBridge, h as DurableAgentBuilder, D as DurableThread, l as DurableUserHub, af as FlowStateSdk, ai as FlowStateWithSdk, G as HandlerSide, H as HubClientInfo, E as HumanSide, aq as ImageContextConfig, ae as InjectMessageOptions, as as LLMProviderInterface, M as ModelDefinition, aL as NamespaceResolutionError, w as PromptContent, s as PromptDefinition, y as PromptIncludePart, x as PromptPart, F as PromptSide, t as PromptToolConfig, P as Provider, at as ProviderContentPart, aw as ProviderFilePart, av as ProviderImagePart, ar as ProviderRegistry, au as ProviderTextPart, B as SessionToolBinding, z as SessionToolConfig, I as SideConfig, J as SubagentRelationship, u as SubagentToolConfig, S as SubpromptConfig, o as ThreadEventPayload, p as ThreadRegistryEntry, T as ThreadWatchdog, j as ThreadWatchdogState, v as ToolConfig, U as UpdateThreadParams, q as User, k as WatchdogCheckin, W as WatchdogProbeResult, f as applyRuntimeCors, am as buildImageDescription, c as canAccessThread, a9 as cat, aJ as createNamespaceContext, Q as emitThreadEvent, ag as enhanceFlowState, a0 as exists, ad as find, R as forceTurn, ap as generateImageDescription, a7 as getFileStats, N as getMessages, al as getMessagesToSummarize, az as getShortName, a8 as getThumbnail, ak as getUnsummarizedImageAttachments, aG as getVisibleAgentNames, aI as getVisibleModelNames, aH as getVisiblePromptNames, aF as getVisibleToolNames, ac as grep, aj as hasImageAttachments, aa as head, L as injectMessage, d as isAdminOnlyApiRoute, i as isHostedInstance, b as isPublicApiRoute, aK as isQualifiedName, e as isSameOriginBrowserRequest, a as isTrustedLocalDevelopmentRequest, Z as linkFile, a2 as mkdir, a5 as move, ao as optimizeImageContext, ax as parseQualifiedName, ay as qualifyName, K as queueTool, _ as readFile, a3 as readdir, O as reloadHistory, a6 as rename, an as replaceImagesWithDescriptions, aD as resolveAgent, aE as resolveHook, aC as resolveModel, aB as resolvePrompt, aA as resolveTool, a4 as rmdir, r as runtimeCorsHeaders, g as runtimePreflightResponse, $ as stat, ab as tail, a1 as unlink, V as updateThread, X as writeFile, Y as writeImage } from './resolver-
|
|
1
|
+
export { m as AgentBuilderEnv, n as AgentBuilderEvent, A as AgentDefinition, ah as BroadcastOptions, C as CodeExecutionBridge, h as DurableAgentBuilder, D as DurableThread, l as DurableUserHub, af as FlowStateSdk, ai as FlowStateWithSdk, G as HandlerSide, H as HubClientInfo, E as HumanSide, aq as ImageContextConfig, ae as InjectMessageOptions, as as LLMProviderInterface, M as ModelDefinition, aL as NamespaceResolutionError, w as PromptContent, s as PromptDefinition, y as PromptIncludePart, x as PromptPart, F as PromptSide, t as PromptToolConfig, P as Provider, at as ProviderContentPart, aw as ProviderFilePart, av as ProviderImagePart, ar as ProviderRegistry, au as ProviderTextPart, B as SessionToolBinding, z as SessionToolConfig, I as SideConfig, J as SubagentRelationship, u as SubagentToolConfig, S as SubpromptConfig, o as ThreadEventPayload, p as ThreadRegistryEntry, T as ThreadWatchdog, j as ThreadWatchdogState, v as ToolConfig, U as UpdateThreadParams, q as User, k as WatchdogCheckin, W as WatchdogProbeResult, f as applyRuntimeCors, am as buildImageDescription, c as canAccessThread, a9 as cat, aJ as createNamespaceContext, Q as emitThreadEvent, ag as enhanceFlowState, a0 as exists, ad as find, R as forceTurn, ap as generateImageDescription, a7 as getFileStats, N as getMessages, al as getMessagesToSummarize, az as getShortName, a8 as getThumbnail, ak as getUnsummarizedImageAttachments, aG as getVisibleAgentNames, aI as getVisibleModelNames, aH as getVisiblePromptNames, aF as getVisibleToolNames, ac as grep, aj as hasImageAttachments, aa as head, L as injectMessage, d as isAdminOnlyApiRoute, i as isHostedInstance, b as isPublicApiRoute, aK as isQualifiedName, e as isSameOriginBrowserRequest, a as isTrustedLocalDevelopmentRequest, Z as linkFile, a2 as mkdir, a5 as move, ao as optimizeImageContext, ax as parseQualifiedName, ay as qualifyName, K as queueTool, _ as readFile, a3 as readdir, O as reloadHistory, a6 as rename, an as replaceImagesWithDescriptions, aD as resolveAgent, aE as resolveHook, aC as resolveModel, aB as resolvePrompt, aA as resolveTool, a4 as rmdir, r as runtimeCorsHeaders, g as runtimePreflightResponse, $ as stat, ab as tail, a1 as unlink, V as updateThread, X as writeFile, Y as writeImage } from './resolver-Db4EfjkK.js';
|
|
2
2
|
export { v as Agent, J as AttachmentRef, i as AuthContext, A as AuthUser, e as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, t as ClientDuplex, u as ClientForwarding, p as ClientStreamRequest, q as ClientStreamResponse, n as ClientToolRequest, o as ClientToolResponse, B as Controller, a as ControllerContext, G as Env, H as FileRecord, N as FileStats, D as FlowResult, F as FlowState, K as GrepResult, P as ImageContentPart, I as ImageMetadata, L as LLMResponse, M as Message, U as MessageContent, Q as MultimodalContent, R as RequestContext, S as StorageBackend, E as TelemetryEvent, O as TextContentPart, T as ThreadEndpointContext, b as ThreadEnv, w as ThreadInstance, x as ThreadMetadata, y as ToolCall, z as ToolResult, f as authenticate, j as callClient, k as callClientStream, c as createThreadEndpointHandler, m as decodeStreamChunk, d as defineController, l as encodeStreamChunk, h as endpointCallerFromAuth, g as requireAdmin, r as requireAuth, s as supportsClientForwarding } from './index-ChHAVogf.js';
|
|
3
3
|
export { AgentType, DefineHandlerOptions, DefinitionLoader, GlobalNamespaceContext, HANDLER_SYMBOL, HandlerDefinition, HookExecutionContext, HookExecutionSource, HookSignatures, ImageContent, ModelCapabilities, ModelProvider, NamespaceContext, PackageSignature, PackedExports, PackedMeta, PackedMetadata, PackedNamespaceContext, ParentHookRequirement, ParentHookStage, 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, ThreadHookName, Tool, ToolArgs, ToolArgsNode, ToolArgsRawShape, ToolContent, belongsToPackage, defineAgent, defineHandler, defineHook, defineModel, definePrompt, defineProvider, defineTool, isHandler, isPacked, isVisibleInNamespace, mapReasoningLevel, providerConst, providerEnv, providerValue } from '@standardagents/spec';
|
|
4
4
|
export { N as NamespacedRegistry } from './types-Dhd0M369.js';
|
package/dist/runtime.js
CHANGED
|
@@ -31055,6 +31055,16 @@ var DurableUserHub = class extends DurableObject {
|
|
|
31055
31055
|
}
|
|
31056
31056
|
return this.roomDefinition;
|
|
31057
31057
|
}
|
|
31058
|
+
/**
|
|
31059
|
+
* How a room execution presents itself to grant policies: as the endpoint
|
|
31060
|
+
* it declares it fronts, otherwise as a room named by its registry key.
|
|
31061
|
+
*/
|
|
31062
|
+
roomCaller(room) {
|
|
31063
|
+
if (typeof room.endpoint === "string" && room.endpoint.length > 0) {
|
|
31064
|
+
return { kind: "userEndpoint", name: room.endpoint };
|
|
31065
|
+
}
|
|
31066
|
+
return { kind: "userRoom", name: this.roomKey ?? "room" };
|
|
31067
|
+
}
|
|
31058
31068
|
/** Whether `key` is room-owned state, exempt from `user_value_changed`. */
|
|
31059
31069
|
async roomOwnsKey(key) {
|
|
31060
31070
|
const room = await this.loadRoom();
|
|
@@ -31092,7 +31102,7 @@ var DurableUserHub = class extends DurableObject {
|
|
|
31092
31102
|
const run = this.executionChain.run(async () => {
|
|
31093
31103
|
const room = await this.loadRoom();
|
|
31094
31104
|
if (!room?.onPresence) return;
|
|
31095
|
-
const user = new UserStateImpl(this.roomUserId(), this.scopeHost(),
|
|
31105
|
+
const user = new UserStateImpl(this.roomUserId(), this.scopeHost(), this.roomCaller(room));
|
|
31096
31106
|
try {
|
|
31097
31107
|
await room.onPresence(user, event);
|
|
31098
31108
|
} catch (error) {
|
|
@@ -31114,7 +31124,7 @@ var DurableUserHub = class extends DurableObject {
|
|
|
31114
31124
|
this.sendRoomFrame(ws, JSON.stringify({ type: "room", id: frame.id, error: "no_room" }));
|
|
31115
31125
|
return;
|
|
31116
31126
|
}
|
|
31117
|
-
const user = new UserStateImpl(this.roomUserId(), this.scopeHost(),
|
|
31127
|
+
const user = new UserStateImpl(this.roomUserId(), this.scopeHost(), this.roomCaller(room));
|
|
31118
31128
|
try {
|
|
31119
31129
|
await room.onFrame(user, connection, frame);
|
|
31120
31130
|
} catch (error) {
|