@standardagents/builder 0.15.0 → 0.15.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 +1650 -502
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/ApiKeysView.js +1 -1
- package/dist/client/CenteredContentView.js +1 -1
- package/dist/client/CompositionView.js +5 -5
- package/dist/client/ConfirmDialog.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/client/CopyButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/client/DataTable.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/client/JsonViewer.js +1 -1
- package/dist/client/LoginView.js +1 -1
- package/dist/client/Modal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/client/ModelModal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/client/ModelsView.js +1 -1
- package/dist/client/PromptEditView.js +1 -1
- package/dist/client/PromptModal.js +1 -1
- package/dist/client/PromptsView.js +1 -1
- package/dist/client/ProvidersView.js +2 -2
- package/dist/client/ThreadInspectorPane.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/client/ToolsView.js +1 -1
- package/dist/client/UsersView.js +1 -1
- package/dist/client/VariablesView.js +1 -0
- package/dist/client/assets/CompositionView.css +1 -1
- package/dist/client/assets/ThreadInspectorPane.css +1 -1
- package/dist/client/assets/VariablesView.css +1 -0
- package/dist/client/assets/index.css +1 -1
- package/dist/client/index.js +6 -6
- package/dist/{index-D6_KjpVv.d.ts → index-BwqQtJ4r.d.ts} +47 -0
- package/dist/index.d.ts +116 -4
- package/dist/index.js +1547 -706
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +548 -372
- package/dist/plugin.js.map +1 -1
- package/dist/test.d.ts +1 -1
- package/package.json +5 -5
|
@@ -795,6 +795,7 @@ interface LogData {
|
|
|
795
795
|
tools_called?: string;
|
|
796
796
|
queued_tools?: string;
|
|
797
797
|
actual_provider?: string | null;
|
|
798
|
+
standard_agents_router_used?: boolean;
|
|
798
799
|
parent_log_id?: string | null;
|
|
799
800
|
tools_schema?: string | null;
|
|
800
801
|
message_history?: string | null;
|
|
@@ -933,6 +934,8 @@ interface LogEntry {
|
|
|
933
934
|
id: string;
|
|
934
935
|
message_id: string;
|
|
935
936
|
provider: string;
|
|
937
|
+
actual_provider: string | null;
|
|
938
|
+
standard_agents_router_used: boolean;
|
|
936
939
|
model: string;
|
|
937
940
|
model_name: string | null;
|
|
938
941
|
prompt_name: string | null;
|
|
@@ -965,6 +968,7 @@ interface LogDetails {
|
|
|
965
968
|
message_id: string;
|
|
966
969
|
provider: string;
|
|
967
970
|
actual_provider: string | null;
|
|
971
|
+
standard_agents_router_used: boolean;
|
|
968
972
|
model: string;
|
|
969
973
|
model_name: string | null;
|
|
970
974
|
endpoint: string | null;
|
|
@@ -1029,6 +1033,11 @@ interface DurableThreadRpc {
|
|
|
1029
1033
|
total: number;
|
|
1030
1034
|
hasMore: boolean;
|
|
1031
1035
|
}>;
|
|
1036
|
+
getMessagesByIds?(ids: string[], includeSilent?: boolean, maxDepth?: number, includeWorkblocks?: boolean): Promise<{
|
|
1037
|
+
messages: unknown[];
|
|
1038
|
+
total: number;
|
|
1039
|
+
hasMore: boolean;
|
|
1040
|
+
}>;
|
|
1032
1041
|
deleteMessage(messageId: string): Promise<{
|
|
1033
1042
|
success: boolean;
|
|
1034
1043
|
error?: string;
|
|
@@ -1042,6 +1051,16 @@ interface DurableThreadRpc {
|
|
|
1042
1051
|
total: number;
|
|
1043
1052
|
hasMore: boolean;
|
|
1044
1053
|
}>;
|
|
1054
|
+
getLogsByIds?(ids: string[], includeDescendants?: boolean, order?: "ASC" | "DESC"): Promise<{
|
|
1055
|
+
logs: LogEntry[];
|
|
1056
|
+
total: number;
|
|
1057
|
+
hasMore: boolean;
|
|
1058
|
+
}>;
|
|
1059
|
+
getLogsByMessageIds?(messageIds: string[], includeWorkblocks?: boolean, includeDescendants?: boolean, order?: "ASC" | "DESC"): Promise<{
|
|
1060
|
+
logs: LogEntry[];
|
|
1061
|
+
total: number;
|
|
1062
|
+
hasMore: boolean;
|
|
1063
|
+
}>;
|
|
1045
1064
|
getLogDetails(logId: string): Promise<LogDetails | null>;
|
|
1046
1065
|
getThreadMeta(threadId: string): Promise<ThreadMetaResponse | null>;
|
|
1047
1066
|
deleteThread(): Promise<void>;
|
|
@@ -1114,6 +1133,34 @@ interface DurableAgentBuilderRpc {
|
|
|
1114
1133
|
property: string;
|
|
1115
1134
|
promptName?: string;
|
|
1116
1135
|
}): Promise<'text' | 'secret'>;
|
|
1136
|
+
getInstanceEnv?(): Promise<Record<string, string>>;
|
|
1137
|
+
getInstanceEnvTypes?(): Promise<Record<string, 'text' | 'secret'>>;
|
|
1138
|
+
getInstanceEnvEntries?(): Promise<Array<{
|
|
1139
|
+
name: string;
|
|
1140
|
+
value: string;
|
|
1141
|
+
type: 'text' | 'secret';
|
|
1142
|
+
created_at: number;
|
|
1143
|
+
updated_at: number;
|
|
1144
|
+
}>>;
|
|
1145
|
+
patchInstanceEnv?(params: {
|
|
1146
|
+
env_patch?: Record<string, unknown> | null;
|
|
1147
|
+
env_type_patch?: Record<string, unknown> | null;
|
|
1148
|
+
env_delete?: string[] | null;
|
|
1149
|
+
}): Promise<void>;
|
|
1150
|
+
getUserEnv?(userId: string): Promise<Record<string, string>>;
|
|
1151
|
+
getUserEnvTypes?(userId: string): Promise<Record<string, 'text' | 'secret'>>;
|
|
1152
|
+
getUserEnvEntries?(userId: string): Promise<Array<{
|
|
1153
|
+
name: string;
|
|
1154
|
+
value: string;
|
|
1155
|
+
type: 'text' | 'secret';
|
|
1156
|
+
created_at: number;
|
|
1157
|
+
updated_at: number;
|
|
1158
|
+
}>>;
|
|
1159
|
+
patchUserEnv?(userId: string, params: {
|
|
1160
|
+
env_patch?: Record<string, unknown> | null;
|
|
1161
|
+
env_type_patch?: Record<string, unknown> | null;
|
|
1162
|
+
env_delete?: string[] | null;
|
|
1163
|
+
}): Promise<void>;
|
|
1117
1164
|
getMissingRequiredScopedSubagentEnv?(params: {
|
|
1118
1165
|
parent_thread_id: string;
|
|
1119
1166
|
agent_name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { AgentPluginOptions, agentbuilder } from './plugin.js';
|
|
2
|
-
import { T as ThreadEnv, a as ThreadMetadata, M as Message, F as FileRecord, b as FlowState, c as FileStats, G as GrepResult, A as AttachmentRef, d as MessageContent, E as Env, e as ThreadInstance } from './index-
|
|
3
|
-
export { k as Agent, j as BuilderThreadEndpointHandler, B as Controller, h as ControllerContext, n as FlowResult, q as ImageContentPart, I as ImageMetadata, L as LLMResponse, r as MultimodalContent, R as RequestContext, S as StorageBackend, o as TelemetryEvent, p as TextContentPart, i as ThreadEndpointContext, l as ToolCall, m as ToolResult, g as createThreadEndpointHandler, f as defineController } from './index-
|
|
2
|
+
import { T as ThreadEnv, a as ThreadMetadata, M as Message, F as FileRecord, b as FlowState, c as FileStats, G as GrepResult, A as AttachmentRef, d as MessageContent, E as Env, e as ThreadInstance } from './index-BwqQtJ4r.js';
|
|
3
|
+
export { k as Agent, j as BuilderThreadEndpointHandler, B as Controller, h as ControllerContext, n as FlowResult, q as ImageContentPart, I as ImageMetadata, L as LLMResponse, r as MultimodalContent, R as RequestContext, S as StorageBackend, o as TelemetryEvent, p as TextContentPart, i as ThreadEndpointContext, l as ToolCall, m as ToolResult, g as createThreadEndpointHandler, f as defineController } from './index-BwqQtJ4r.js';
|
|
4
4
|
import { CodeExecutionOptions, CodeExecutionResult, SubagentRegistryEntry, InjectMessageInput, QueueMessageInput, 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, NamespaceContext, DefinitionLoader } from '@standardagents/spec';
|
|
5
5
|
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';
|
|
6
6
|
import { DurableObject, WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -494,6 +494,10 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
494
494
|
private getLatestTopLevelMessage;
|
|
495
495
|
private getTerminalSessionToolNames;
|
|
496
496
|
private parseAttachmentRefsJson;
|
|
497
|
+
private deleteAttachmentRefsFromJson;
|
|
498
|
+
private cancelQueuedMessage;
|
|
499
|
+
private parseMessageMetadata;
|
|
500
|
+
private extractSubagentIdFromMetadata;
|
|
497
501
|
private getLatestTerminalSessionMessageAfter;
|
|
498
502
|
private inferMimeTypeFromPath;
|
|
499
503
|
private extensionForMimeType;
|
|
@@ -566,6 +570,34 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
566
570
|
total: number;
|
|
567
571
|
hasMore: boolean;
|
|
568
572
|
}>;
|
|
573
|
+
/**
|
|
574
|
+
* Get specific messages, optionally expanding any requested tool-call message
|
|
575
|
+
* to the full contiguous workblock it belongs to.
|
|
576
|
+
*/
|
|
577
|
+
getMessagesByIds(ids: string[], includeSilent?: boolean, maxDepth?: number, includeWorkblocks?: boolean): Promise<{
|
|
578
|
+
messages: {
|
|
579
|
+
id: string;
|
|
580
|
+
role: string;
|
|
581
|
+
content: string | null;
|
|
582
|
+
name: string | null;
|
|
583
|
+
tool_calls: string | null;
|
|
584
|
+
tool_call_id: string | null;
|
|
585
|
+
tool_status: "success" | "error" | null;
|
|
586
|
+
log_id: string | null;
|
|
587
|
+
created_at: number;
|
|
588
|
+
silent: boolean;
|
|
589
|
+
parent_id: string | null;
|
|
590
|
+
depth: number;
|
|
591
|
+
status: "pending" | "completed" | "failed" | null;
|
|
592
|
+
reasoning_content: string | null;
|
|
593
|
+
reasoning_details: string | null;
|
|
594
|
+
attachments: any;
|
|
595
|
+
metadata: Record<string, unknown> | undefined;
|
|
596
|
+
subagent_id: string | null;
|
|
597
|
+
}[];
|
|
598
|
+
total: number;
|
|
599
|
+
hasMore: boolean;
|
|
600
|
+
}>;
|
|
569
601
|
/**
|
|
570
602
|
* Delete a message (RPC method)
|
|
571
603
|
* Also cleans up any attachment files stored on the thread filesystem
|
|
@@ -633,6 +665,60 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
633
665
|
* Get logs (RPC method)
|
|
634
666
|
*/
|
|
635
667
|
getLogs(limit?: number, offset?: number, order?: "ASC" | "DESC"): Promise<{
|
|
668
|
+
logs: {
|
|
669
|
+
id: string;
|
|
670
|
+
message_id: string;
|
|
671
|
+
provider: string;
|
|
672
|
+
actual_provider: string | null;
|
|
673
|
+
standard_agents_router_used: boolean;
|
|
674
|
+
model: string;
|
|
675
|
+
model_name: string | null;
|
|
676
|
+
prompt_name: string | null;
|
|
677
|
+
tools_called: string | null;
|
|
678
|
+
queued_tools: string | null;
|
|
679
|
+
provider_tools: string | null;
|
|
680
|
+
parent_log_id: string | null;
|
|
681
|
+
retry_of_log_id: string | null;
|
|
682
|
+
error: string | null;
|
|
683
|
+
cost_total: number | null;
|
|
684
|
+
is_complete: boolean;
|
|
685
|
+
created_at: number;
|
|
686
|
+
request_body: string | null;
|
|
687
|
+
}[];
|
|
688
|
+
total: number;
|
|
689
|
+
hasMore: boolean;
|
|
690
|
+
}>;
|
|
691
|
+
/**
|
|
692
|
+
* Get specific logs, optionally including all descendant logs.
|
|
693
|
+
*/
|
|
694
|
+
getLogsByIds(ids: string[], includeDescendants?: boolean, order?: "ASC" | "DESC"): Promise<{
|
|
695
|
+
logs: {
|
|
696
|
+
id: string;
|
|
697
|
+
message_id: string;
|
|
698
|
+
provider: string;
|
|
699
|
+
actual_provider: string | null;
|
|
700
|
+
model: string;
|
|
701
|
+
model_name: string | null;
|
|
702
|
+
prompt_name: string | null;
|
|
703
|
+
tools_called: string | null;
|
|
704
|
+
queued_tools: string | null;
|
|
705
|
+
provider_tools: string | null;
|
|
706
|
+
parent_log_id: string | null;
|
|
707
|
+
retry_of_log_id: string | null;
|
|
708
|
+
error: string | null;
|
|
709
|
+
cost_total: number | null;
|
|
710
|
+
is_complete: boolean;
|
|
711
|
+
created_at: number;
|
|
712
|
+
request_body: string | null;
|
|
713
|
+
}[];
|
|
714
|
+
total: number;
|
|
715
|
+
hasMore: boolean;
|
|
716
|
+
}>;
|
|
717
|
+
/**
|
|
718
|
+
* Get logs for specific messages, optionally expanding requested messages to
|
|
719
|
+
* the full contiguous workblock they belong to and including descendant logs.
|
|
720
|
+
*/
|
|
721
|
+
getLogsByMessageIds(messageIds: string[], includeWorkblocks?: boolean, includeDescendants?: boolean, order?: "ASC" | "DESC"): Promise<{
|
|
636
722
|
logs: {
|
|
637
723
|
id: string;
|
|
638
724
|
message_id: string;
|
|
@@ -664,6 +750,7 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
664
750
|
message_id: string;
|
|
665
751
|
provider: string;
|
|
666
752
|
actual_provider: string | null;
|
|
753
|
+
standard_agents_router_used: boolean;
|
|
667
754
|
model: string;
|
|
668
755
|
model_name: string | null;
|
|
669
756
|
endpoint: string | null;
|
|
@@ -1236,6 +1323,13 @@ interface User {
|
|
|
1236
1323
|
created_at: number;
|
|
1237
1324
|
updated_at: number;
|
|
1238
1325
|
}
|
|
1326
|
+
interface ScopedEnvEntry {
|
|
1327
|
+
name: string;
|
|
1328
|
+
value: string;
|
|
1329
|
+
type: EnvValueType;
|
|
1330
|
+
created_at: number;
|
|
1331
|
+
updated_at: number;
|
|
1332
|
+
}
|
|
1239
1333
|
/**
|
|
1240
1334
|
* Provider credentials.
|
|
1241
1335
|
*/
|
|
@@ -1367,11 +1461,28 @@ declare class DurableAgentBuilder<Env extends AgentBuilderEnv = AgentBuilderEnv>
|
|
|
1367
1461
|
private encryptEnvValue;
|
|
1368
1462
|
private decryptEnvValue;
|
|
1369
1463
|
private listScopedEnv;
|
|
1464
|
+
private listScopedEnvEntries;
|
|
1465
|
+
private getScopedEnvTypeRecord;
|
|
1370
1466
|
private replaceScopedEnv;
|
|
1467
|
+
private patchScopedEnv;
|
|
1371
1468
|
getInstanceEnv(): Promise<Record<string, string>>;
|
|
1372
|
-
|
|
1469
|
+
getInstanceEnvTypes(): Promise<Record<string, EnvValueType>>;
|
|
1470
|
+
getInstanceEnvEntries(): Promise<ScopedEnvEntry[]>;
|
|
1471
|
+
setInstanceEnv(env: Record<string, string>, envTypes?: Record<string, EnvValueType> | null): Promise<void>;
|
|
1472
|
+
patchInstanceEnv(params: {
|
|
1473
|
+
env_patch?: Record<string, unknown> | null;
|
|
1474
|
+
env_type_patch?: Record<string, unknown> | null;
|
|
1475
|
+
env_delete?: string[] | null;
|
|
1476
|
+
}): Promise<void>;
|
|
1373
1477
|
getUserEnv(userId: string): Promise<Record<string, string>>;
|
|
1374
|
-
|
|
1478
|
+
getUserEnvTypes(userId: string): Promise<Record<string, EnvValueType>>;
|
|
1479
|
+
getUserEnvEntries(userId: string): Promise<ScopedEnvEntry[]>;
|
|
1480
|
+
setUserEnv(userId: string, env: Record<string, string>, envTypes?: Record<string, EnvValueType> | null): Promise<void>;
|
|
1481
|
+
patchUserEnv(userId: string, params: {
|
|
1482
|
+
env_patch?: Record<string, unknown> | null;
|
|
1483
|
+
env_type_patch?: Record<string, unknown> | null;
|
|
1484
|
+
env_delete?: string[] | null;
|
|
1485
|
+
}): Promise<void>;
|
|
1375
1486
|
getMissingRequiredScopedSubagentEnv(params: {
|
|
1376
1487
|
parent_thread_id: string;
|
|
1377
1488
|
agent_name: string;
|
|
@@ -3151,6 +3262,7 @@ type ProviderOverrideFn = (modelName: string, modelDef: ModelDefinition$1<string
|
|
|
3151
3262
|
declare class ProviderRegistryImpl {
|
|
3152
3263
|
private providerCache;
|
|
3153
3264
|
private providerOverrideFn;
|
|
3265
|
+
private providerOverrideRevision;
|
|
3154
3266
|
setProviderOverride(fn: ProviderOverrideFn | null): void;
|
|
3155
3267
|
/**
|
|
3156
3268
|
* Get provider for a model.
|