@standardagents/builder 0.33.1 → 0.34.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 +20 -11
- package/dist/built-in-routes.js.map +1 -1
- package/dist/{index-CqhPhqAI.d.ts → index-NmFt-OEl.d.ts} +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +19 -10
- package/dist/index.js.map +1 -1
- package/dist/packing.js +2 -2
- package/dist/packing.js.map +1 -1
- package/dist/plugin.js +2 -2
- package/dist/plugin.js.map +1 -1
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +17 -8
- package/dist/runtime.js.map +1 -1
- package/dist/test.d.ts +1 -1
- package/package.json +5 -5
package/dist/runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as ThreadEnv, A as Agent, r as ThreadMetadata, t as ToolResult, M as Message, k as ClientToolRequest, l as ClientToolResponse, m as ClientStreamRequest, n as ClientStreamResponse, w as FileRecord, F as FlowState, y as FileStats, G as GrepResult, x as AttachmentRef, J as MessageContent, E as Env, q as ThreadInstance } from './index-
|
|
2
|
-
export { f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, o as ClientDuplex, p as ClientForwarding, B as Controller, a as ControllerContext, u as FlowResult, D as ImageContentPart, I as ImageMetadata, L as LLMResponse, H as MultimodalContent, R as RequestContext, S as StorageBackend, v as TelemetryEvent, z as TextContentPart, b as ThreadEndpointContext, T as ToolCall, g as callClient, h as callClientStream, c as createThreadEndpointHandler, j as decodeStreamChunk, d as defineController, i as encodeStreamChunk, s as supportsClientForwarding } from './index-
|
|
1
|
+
import { e as ThreadEnv, A as Agent, r as ThreadMetadata, t as ToolResult, M as Message, k as ClientToolRequest, l as ClientToolResponse, m as ClientStreamRequest, n as ClientStreamResponse, w as FileRecord, F as FlowState, y as FileStats, G as GrepResult, x as AttachmentRef, J as MessageContent, E as Env, q as ThreadInstance } from './index-NmFt-OEl.js';
|
|
2
|
+
export { f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, o as ClientDuplex, p as ClientForwarding, B as Controller, a as ControllerContext, u as FlowResult, D as ImageContentPart, I as ImageMetadata, L as LLMResponse, H as MultimodalContent, R as RequestContext, S as StorageBackend, v as TelemetryEvent, z as TextContentPart, b as ThreadEndpointContext, T as ToolCall, g as callClient, h as callClientStream, c as createThreadEndpointHandler, j as decodeStreamChunk, d as defineController, i as encodeStreamChunk, s as supportsClientForwarding } from './index-NmFt-OEl.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';
|
package/dist/runtime.js
CHANGED
|
@@ -8381,22 +8381,29 @@ ${msg.content}` : `${imageDescriptions}${nonImageList}`;
|
|
|
8381
8381
|
messageToAdd.attachments = providerAttachments;
|
|
8382
8382
|
}
|
|
8383
8383
|
}
|
|
8384
|
-
|
|
8384
|
+
const reasoningAuthoredByCurrentPrompt = !msg.prompt || msg.prompt === promptName;
|
|
8385
|
+
if (includeReasoning && reasoningAuthoredByCurrentPrompt) {
|
|
8385
8386
|
const reasoningDetailsArray = [];
|
|
8386
|
-
|
|
8387
|
-
reasoningDetailsArray.push({
|
|
8388
|
-
type: "reasoning.text",
|
|
8389
|
-
text: msg.reasoning_content
|
|
8390
|
-
});
|
|
8391
|
-
}
|
|
8387
|
+
const seenDetailTexts = /* @__PURE__ */ new Set();
|
|
8392
8388
|
if (msg.reasoning_details) {
|
|
8393
8389
|
try {
|
|
8394
8390
|
const parsedDetails = JSON.parse(msg.reasoning_details);
|
|
8395
|
-
|
|
8391
|
+
for (const detail of parsedDetails) {
|
|
8392
|
+
reasoningDetailsArray.push(detail);
|
|
8393
|
+
if (typeof detail?.text === "string") {
|
|
8394
|
+
seenDetailTexts.add(detail.text);
|
|
8395
|
+
}
|
|
8396
|
+
}
|
|
8396
8397
|
} catch (e) {
|
|
8397
8398
|
console.error(`[FlowEngine] Failed to parse reasoning_details for message ${msg.id}:`, e);
|
|
8398
8399
|
}
|
|
8399
8400
|
}
|
|
8401
|
+
if (msg.reasoning_content && !seenDetailTexts.has(msg.reasoning_content)) {
|
|
8402
|
+
reasoningDetailsArray.push({
|
|
8403
|
+
type: "reasoning.text",
|
|
8404
|
+
text: msg.reasoning_content
|
|
8405
|
+
});
|
|
8406
|
+
}
|
|
8400
8407
|
if (reasoningDetailsArray.length > 0) {
|
|
8401
8408
|
messageToAdd.reasoning_details = reasoningDetailsArray;
|
|
8402
8409
|
}
|
|
@@ -10441,6 +10448,7 @@ ${lines.join("\n\n")}`
|
|
|
10441
10448
|
"silent",
|
|
10442
10449
|
"parent_id",
|
|
10443
10450
|
"depth",
|
|
10451
|
+
"prompt",
|
|
10444
10452
|
"reasoning_content",
|
|
10445
10453
|
"reasoning_details"
|
|
10446
10454
|
];
|
|
@@ -10475,6 +10483,7 @@ ${lines.join("\n\n")}`
|
|
|
10475
10483
|
tool_status: row.tool_status,
|
|
10476
10484
|
parent_id: row.parent_id,
|
|
10477
10485
|
depth: row.depth,
|
|
10486
|
+
prompt: row.prompt,
|
|
10478
10487
|
reasoning_content: row.reasoning_content,
|
|
10479
10488
|
reasoning_details: row.reasoning_details
|
|
10480
10489
|
}));
|