@standardagents/builder 0.39.0 → 0.40.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 +671 -144
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/{ApiKeysView-AH5i-H6j.js → ApiKeysView-DoYvZZ7e.js} +1 -1
- package/dist/client/{CenteredContentView-DaBp0K-A.js → CenteredContentView-53PY0cqY.js} +1 -1
- package/dist/client/{CompositionView-yY1Q4M23.js → CompositionView-fp-0YnPt.js} +1 -1
- package/dist/client/{ConfirmDialog.vue_vue_type_script_setup_true_lang-Bwo5CJzF.js → ConfirmDialog.vue_vue_type_script_setup_true_lang-Cvcagja2.js} +1 -1
- package/dist/client/{CopyButton.vue_vue_type_script_setup_true_lang-D0WYwWyA.js → CopyButton.vue_vue_type_script_setup_true_lang-jYvO2v1K.js} +1 -1
- package/dist/client/{DataTable.vue_vue_type_script_setup_true_lang-1wwPn2aY.js → DataTable.vue_vue_type_script_setup_true_lang-DQ3Ufa7y.js} +1 -1
- package/dist/client/{JsonViewer-Bi8Zdmir.js → JsonViewer-6aaGzutE.js} +1 -1
- package/dist/client/{LoginView-BIKahEU6.js → LoginView-DwpCmNw9.js} +1 -1
- package/dist/client/{MarketplaceView-DPDPVH68.js → MarketplaceView-Da02L0J5.js} +1 -1
- package/dist/client/{Modal.vue_vue_type_script_setup_true_lang-D1_rfOsy.js → Modal.vue_vue_type_script_setup_true_lang-Bi8OjiBf.js} +1 -1
- package/dist/client/{ModelModal.vue_vue_type_script_setup_true_lang-DSLeOdxr.js → ModelModal.vue_vue_type_script_setup_true_lang-cYZLOYY7.js} +1 -1
- package/dist/client/{ModelsView-Q2WXu1Gw.js → ModelsView-BLlHO9Ud.js} +1 -1
- package/dist/client/{PromptEditView-BzA-3n1w.js → PromptEditView-EeNwTDtT.js} +1 -1
- package/dist/client/{PromptModal-CJWh_cru.js → PromptModal-BkwrKJ2d.js} +1 -1
- package/dist/client/{PromptsView-BezNl-Et.js → PromptsView-D1r7tsLu.js} +1 -1
- package/dist/client/{ProvidersView-BuzSKxuT.js → ProvidersView-CmUDl5nM.js} +1 -1
- package/dist/client/{ThreadInspectorPane.vue_vue_type_script_setup_true_lang-DOxNp_3C.js → ThreadInspectorPane.vue_vue_type_script_setup_true_lang-cRs3tApQ.js} +1 -1
- package/dist/client/{ThreadsView-DPCpZA4J.js → ThreadsView-Bl5fSIO1.js} +1 -1
- package/dist/client/{ToolsView-DMjFMAhH.js → ToolsView-DlVEF8-7.js} +1 -1
- package/dist/client/{UsersView-B7jXLNQs.js → UsersView-CGlA7a7R.js} +1 -1
- package/dist/client/{VariablesView-CF7x0G8g.js → VariablesView-BpYmJL4V.js} +1 -1
- package/dist/client/index-CKtIkI0N.js +6 -0
- package/dist/client/index.html +1 -1
- package/dist/{discovery-DiMJWisl.d.ts → discovery-DZ7fv-b4.d.ts} +3 -2
- package/dist/{index-yIcqf7DC.d.ts → index-9MaIifn3.d.ts} +7 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1170 -563
- package/dist/index.js.map +1 -1
- package/dist/packing.d.ts +5 -3
- package/dist/packing.js +180 -5
- package/dist/packing.js.map +1 -1
- package/dist/plugin.js +252 -17
- package/dist/plugin.js.map +1 -1
- package/dist/runtime.d.ts +25 -38
- package/dist/runtime.js +1328 -958
- package/dist/runtime.js.map +1 -1
- package/dist/test.d.ts +2 -2
- package/dist/{types-Bpe7IANZ.d.ts → types-BMnBYNwn.d.ts} +3 -1
- package/package.json +5 -5
- package/dist/client/index-eGECJFYe.js +0 -6
package/dist/runtime.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as AuthContext, e as ThreadEnv, w as Agent, y as ThreadMetadata, z as ToolResult, M as Message, o as ClientToolRequest, p as ClientToolResponse, q as ClientStreamRequest, t as ClientStreamResponse, H as FileRecord, V as SkillStorageScope, F as FlowState, N as FileStats, K as GrepResult, J as AttachmentRef, U as MessageContent, G as Env, x as ThreadInstance } from './index-
|
|
2
|
-
export { A as AuthUser, f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, u as ClientDuplex, v as ClientForwarding, B as Controller, a as ControllerContext, D as FlowResult, P as ImageContentPart, I as ImageMetadata, L as LLMResponse, Q as MultimodalContent, R as RequestContext, S as StorageBackend, E as TelemetryEvent, O as TextContentPart, b as ThreadEndpointContext, T as ToolCall, g as authenticate, k as callClient, l as callClientStream, c as createThreadEndpointHandler, n as decodeStreamChunk, d as defineController, m as encodeStreamChunk, i as endpointCallerFromAuth, h as requireAdmin, r as requireAuth, s as supportsClientForwarding } from './index-
|
|
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
|
-
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';
|
|
1
|
+
import { j as AuthContext, e as ThreadEnv, w as Agent, y as ThreadMetadata, z as ToolResult, M as Message, o as ClientToolRequest, p as ClientToolResponse, q as ClientStreamRequest, t as ClientStreamResponse, H as FileRecord, V as SkillStorageScope, F as FlowState, N as FileStats, K as GrepResult, J as AttachmentRef, U as MessageContent, G as Env, x as ThreadInstance } from './index-9MaIifn3.js';
|
|
2
|
+
export { A as AuthUser, f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, u as ClientDuplex, v as ClientForwarding, B as Controller, a as ControllerContext, D as FlowResult, P as ImageContentPart, I as ImageMetadata, L as LLMResponse, Q as MultimodalContent, R as RequestContext, S as StorageBackend, E as TelemetryEvent, O as TextContentPart, b as ThreadEndpointContext, T as ToolCall, g as authenticate, k as callClient, l as callClientStream, c as createThreadEndpointHandler, n as decodeStreamChunk, d as defineController, m as encodeStreamChunk, i as endpointCallerFromAuth, h as requireAdmin, r as requireAuth, s as supportsClientForwarding } from './index-9MaIifn3.js';
|
|
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, ParentHookRequirement, LLMProviderInterface, ContentPart, TextPart, ImagePart, FilePart, ThreadState, NamespaceContext, DefinitionLoader } from '@standardagents/spec';
|
|
4
|
+
export { AgentType, DefinitionLoader, GlobalNamespaceContext, 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, defineHook, defineModel, definePrompt, defineTool, isPacked, isVisibleInNamespace, mapReasoningLevel } from '@standardagents/spec';
|
|
5
5
|
import { DurableObject, WorkerEntrypoint } from 'cloudflare:workers';
|
|
6
|
-
import { N as NamespacedRegistry } from './types-
|
|
6
|
+
import { N as NamespacedRegistry } from './types-BMnBYNwn.js';
|
|
7
7
|
import '@cloudflare/workers-types';
|
|
8
8
|
import 'zod';
|
|
9
9
|
|
|
@@ -512,6 +512,11 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
512
512
|
private getThreadNameFromTags;
|
|
513
513
|
private toSubagentProjection;
|
|
514
514
|
private resolveSubagentMessageProjections;
|
|
515
|
+
/**
|
|
516
|
+
* Build hook resolution context and a genuine at-rest ThreadState.
|
|
517
|
+
* Resolution failures abort insertion so lifecycle hooks cannot be bypassed.
|
|
518
|
+
*/
|
|
519
|
+
private buildAtRestHookState;
|
|
515
520
|
/**
|
|
516
521
|
* Inject a top-level message without starting a new execution.
|
|
517
522
|
*
|
|
@@ -3150,6 +3155,11 @@ interface AgentDefinition<N extends string = string> {
|
|
|
3150
3155
|
primary?: boolean;
|
|
3151
3156
|
/** Description shown when agent is used as a tool. */
|
|
3152
3157
|
toolDescription?: string;
|
|
3158
|
+
/**
|
|
3159
|
+
* Thread-scoped hooks this child requires on every direct parent that adds
|
|
3160
|
+
* it as an enabled tool. Only exposed `dual_ai` agents may declare these.
|
|
3161
|
+
*/
|
|
3162
|
+
parentHooks?: ParentHookRequirement[];
|
|
3153
3163
|
/**
|
|
3154
3164
|
* Environment values provided by this agent.
|
|
3155
3165
|
*/
|
|
@@ -3187,7 +3197,7 @@ interface AgentDefinition<N extends string = string> {
|
|
|
3187
3197
|
/**
|
|
3188
3198
|
* Options for injecting a message
|
|
3189
3199
|
*/
|
|
3190
|
-
interface InjectMessageOptions
|
|
3200
|
+
interface InjectMessageOptions {
|
|
3191
3201
|
/** The message content */
|
|
3192
3202
|
content: string;
|
|
3193
3203
|
/** The message role */
|
|
@@ -3200,7 +3210,7 @@ interface InjectMessageOptions$1 {
|
|
|
3200
3210
|
toolCallId?: string;
|
|
3201
3211
|
/** Optional name field */
|
|
3202
3212
|
name?: string;
|
|
3203
|
-
/** Whether this message is silent (
|
|
3213
|
+
/** Whether this message is silent (not shown in UI). Default: false */
|
|
3204
3214
|
silent?: boolean;
|
|
3205
3215
|
/** Optional structured metadata */
|
|
3206
3216
|
metadata?: Record<string, unknown>;
|
|
@@ -3268,7 +3278,7 @@ declare function queueTool(flow: FlowState, toolName: string, args?: Record<stri
|
|
|
3268
3278
|
* });
|
|
3269
3279
|
* ```
|
|
3270
3280
|
*/
|
|
3271
|
-
declare function injectMessage(flow: FlowState, options: InjectMessageOptions
|
|
3281
|
+
declare function injectMessage(flow: FlowState, options: InjectMessageOptions): Promise<Message>;
|
|
3272
3282
|
/**
|
|
3273
3283
|
* Get messages from the thread history
|
|
3274
3284
|
*
|
|
@@ -3299,9 +3309,9 @@ declare function getMessages(flow: FlowState, limit?: number, offset?: number, o
|
|
|
3299
3309
|
/**
|
|
3300
3310
|
* Reload message history from storage
|
|
3301
3311
|
*
|
|
3302
|
-
* Re-loads the complete message history from the thread's SQLite storage
|
|
3303
|
-
*
|
|
3304
|
-
*
|
|
3312
|
+
* Re-loads the complete message history from the thread's SQLite storage.
|
|
3313
|
+
* This is useful when you need to refresh the message history after making
|
|
3314
|
+
* changes (e.g., injecting messages).
|
|
3305
3315
|
*
|
|
3306
3316
|
* @param flow - The current FlowState
|
|
3307
3317
|
* @returns Array of messages (reloaded from storage)
|
|
@@ -3811,29 +3821,6 @@ declare function find(flow: FlowState, pattern: string, options?: {
|
|
|
3811
3821
|
limit?: number;
|
|
3812
3822
|
}): Promise<FileRecord[]>;
|
|
3813
3823
|
|
|
3814
|
-
/**
|
|
3815
|
-
* Options for injecting a message
|
|
3816
|
-
*/
|
|
3817
|
-
interface InjectMessageOptions {
|
|
3818
|
-
/** The message content */
|
|
3819
|
-
content: string;
|
|
3820
|
-
/** The message role */
|
|
3821
|
-
role: "system" | "user" | "assistant" | "tool";
|
|
3822
|
-
/** Optional message ID. If not provided, a UUID will be generated */
|
|
3823
|
-
id?: string;
|
|
3824
|
-
/** Optional message to insert before. If not provided, message is appended to the end */
|
|
3825
|
-
beforeMessageId?: string;
|
|
3826
|
-
/** Optional tool call ID (for role="tool" only) */
|
|
3827
|
-
toolCallId?: string;
|
|
3828
|
-
/** Optional name field */
|
|
3829
|
-
name?: string;
|
|
3830
|
-
/** Whether this message is silent (hidden from LLM, visible in UI only). Default: false */
|
|
3831
|
-
silent?: boolean;
|
|
3832
|
-
/** Force message to be top-level (depth 0) even when called from sub-prompts. Default: false */
|
|
3833
|
-
forceTopLevel?: boolean;
|
|
3834
|
-
/** Force a specific side to play the next turn after injecting the message */
|
|
3835
|
-
forceTurn?: "side_a" | "side_b";
|
|
3836
|
-
}
|
|
3837
3824
|
/**
|
|
3838
3825
|
* Options for broadcasting custom data
|
|
3839
3826
|
*/
|
|
@@ -3933,9 +3920,9 @@ declare class FlowStateSdk {
|
|
|
3933
3920
|
/**
|
|
3934
3921
|
* Reload message history from storage
|
|
3935
3922
|
*
|
|
3936
|
-
* Re-loads the complete message history from the thread's SQLite storage
|
|
3937
|
-
*
|
|
3938
|
-
*
|
|
3923
|
+
* Re-loads the complete message history from the thread's SQLite storage.
|
|
3924
|
+
* This is useful when you need to refresh the message history after making
|
|
3925
|
+
* changes (e.g., injecting messages).
|
|
3939
3926
|
*
|
|
3940
3927
|
* @param flow - The current FlowState
|
|
3941
3928
|
* @returns Array of messages (reloaded from storage)
|
|
@@ -4360,4 +4347,4 @@ declare function createNamespaceContext(agentDef: {
|
|
|
4360
4347
|
*/
|
|
4361
4348
|
declare function isQualifiedName(name: string): boolean;
|
|
4362
4349
|
|
|
4363
|
-
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
|
|
4350
|
+
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, 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, applyRuntimeCors, 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, isSameOriginBrowserRequest, isTrustedLocalDevelopmentRequest, linkFile, mkdir, move, optimizeImageContext, parseQualifiedName, qualifyName, queueTool, readFile, readdir, reloadHistory, rename, replaceImagesWithDescriptions, resolveAgent, resolveHook, resolveModel, resolvePrompt, resolveTool, rmdir, runtimeCorsHeaders, runtimePreflightResponse, stat, tail, unlink, updateThread, writeFile, writeImage };
|