@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/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelDefinition, AgentDefinition } from './runtime.js';
|
|
2
2
|
export { AgentBuilderEnv, AuthContext, AuthUser, BroadcastOptions, CodeExecutionBridge, DurableAgentBuilder, DurableThread, DurableUserHub, FlowStateSdk, FlowStateWithSdk, HubClientInfo, ImageContextConfig, InjectMessageOptions, LLMProviderInterface, NamespaceResolutionError, PromptContent, PromptDefinition, PromptIncludePart, PromptPart, PromptToolConfig, Provider, ProviderContentPart, ProviderFilePart, ProviderImagePart, ProviderRegistry, ProviderTextPart, SessionToolBinding, SessionToolConfig, SideConfig, SubagentToolConfig, SubpromptConfig, ThreadRegistryEntry, ThreadWatchdog, ThreadWatchdogState, ToolConfig, UpdateThreadParams, User, WatchdogCheckin, WatchdogProbeResult, authenticate, buildImageDescription, cat, createNamespaceContext, emitThreadEvent, enhanceFlowState, exists, find, forceTurn, generateImageDescription, getFileStats, getMessages, getMessagesToSummarize, getShortName, getThumbnail, getUnsummarizedImageAttachments, getVisibleAgentNames, getVisibleModelNames, getVisiblePromptNames, getVisibleToolNames, grep, hasImageAttachments, head, injectMessage, isQualifiedName, linkFile, mkdir, move, optimizeImageContext, parseQualifiedName, qualifyName, queueTool, readFile, readdir, reloadHistory, rename, replaceImagesWithDescriptions, requireAdmin, requireAuth, resolveAgent, resolveHook, resolveModel, resolvePrompt, resolveTool, rmdir, stat, tail, unlink, updateThread, writeFile, writeImage } from './runtime.js';
|
|
3
3
|
export { AgentPluginOptions, agentbuilder, builder } from './plugin.js';
|
|
4
|
-
export { A as Agent, x as AttachmentRef, f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, o as ClientDuplex, p as ClientForwarding, m as ClientStreamRequest, n as ClientStreamResponse, k as ClientToolRequest, l as ClientToolResponse, B as Controller, a as ControllerContext, E as Env, w as FileRecord, y as FileStats, u as FlowResult, F as FlowState, G as GrepResult, D as ImageContentPart, I as ImageMetadata, L as LLMResponse, M as Message, J as MessageContent, H as MultimodalContent, R as RequestContext, S as StorageBackend, v as TelemetryEvent, z as TextContentPart, b as ThreadEndpointContext, e as ThreadEnv, q as ThreadInstance, r as ThreadMetadata, T as ToolCall, t as ToolResult, g as callClient, h as callClientStream, c as createThreadEndpointHandler, j as decodeStreamChunk, d as defineController, i as encodeStreamChunk, s as supportsClientForwarding } from './index-
|
|
4
|
+
export { A as Agent, x as AttachmentRef, f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, o as ClientDuplex, p as ClientForwarding, m as ClientStreamRequest, n as ClientStreamResponse, k as ClientToolRequest, l as ClientToolResponse, B as Controller, a as ControllerContext, E as Env, w as FileRecord, y as FileStats, u as FlowResult, F as FlowState, G as GrepResult, D as ImageContentPart, I as ImageMetadata, L as LLMResponse, M as Message, J as MessageContent, H as MultimodalContent, R as RequestContext, S as StorageBackend, v as TelemetryEvent, z as TextContentPart, b as ThreadEndpointContext, e as ThreadEnv, q as ThreadInstance, r as ThreadMetadata, T as ToolCall, t as ToolResult, 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';
|
|
5
5
|
export { AgentType, DefinitionLoader, GlobalNamespaceContext, HookSignatures, ImageContent, ModelCapabilities, ModelProvider, NamespaceContext, PackageSignature, PackedExports, PackedMeta, PackedMetadata, PackedNamespaceContext, PromptInput, PromptTextPart, ProviderAssistantMessage, ProviderConfigSlot, ProviderConfigSlots, ProviderConfigValueSource, ProviderDefinition, ProviderError, ProviderErrorCode, ProviderFactory, ProviderFactoryConfig, ProviderFinishReason, ProviderGeneratedImage, ProviderMessage, ProviderMessageContent, ProviderMethodOverrides, ModelCapabilities as ProviderModelCapabilities, ProviderOverride, ProviderOverrideContext, ProviderReasoningDetail, ProviderRequest, ProviderResponse, ProviderStreamChunk, ProviderSyncOverride, ProviderSystemMessage, ProviderTool, ProviderToolCallPart, ProviderToolMessage, ProviderToolResultContent, ProviderUsage, ProviderUserMessage, ReasoningConfig, StructuredPrompt, TextContent, Tool, ToolArgs, ToolArgsNode, ToolArgsRawShape, ToolContent, belongsToPackage, defineAgent, defineHook, defineModel, definePrompt, defineProvider, defineTool, isPacked, isVisibleInNamespace, mapReasoningLevel, providerConst, providerEnv, providerValue } from '@standardagents/spec';
|
|
6
6
|
export { C as ConstituentItem, D as DiscoveredPackage, N as NamespacedRegistry, P as PackingAnalysis, a as PackingOptions, b as PackingResult, c as UnpackOptions, d as UnpackResult } from './types-Bpe7IANZ.js';
|
|
7
7
|
export { D as DiscoveryConfig, P as PackageDiscoveryService, d as discoverPackages } from './discovery-DiMJWisl.js';
|
package/dist/index.js
CHANGED
|
@@ -8390,22 +8390,29 @@ ${msg.content}` : `${imageDescriptions}${nonImageList}`;
|
|
|
8390
8390
|
messageToAdd.attachments = providerAttachments;
|
|
8391
8391
|
}
|
|
8392
8392
|
}
|
|
8393
|
-
|
|
8393
|
+
const reasoningAuthoredByCurrentPrompt = !msg.prompt || msg.prompt === promptName;
|
|
8394
|
+
if (includeReasoning && reasoningAuthoredByCurrentPrompt) {
|
|
8394
8395
|
const reasoningDetailsArray = [];
|
|
8395
|
-
|
|
8396
|
-
reasoningDetailsArray.push({
|
|
8397
|
-
type: "reasoning.text",
|
|
8398
|
-
text: msg.reasoning_content
|
|
8399
|
-
});
|
|
8400
|
-
}
|
|
8396
|
+
const seenDetailTexts = /* @__PURE__ */ new Set();
|
|
8401
8397
|
if (msg.reasoning_details) {
|
|
8402
8398
|
try {
|
|
8403
8399
|
const parsedDetails = JSON.parse(msg.reasoning_details);
|
|
8404
|
-
|
|
8400
|
+
for (const detail of parsedDetails) {
|
|
8401
|
+
reasoningDetailsArray.push(detail);
|
|
8402
|
+
if (typeof detail?.text === "string") {
|
|
8403
|
+
seenDetailTexts.add(detail.text);
|
|
8404
|
+
}
|
|
8405
|
+
}
|
|
8405
8406
|
} catch (e) {
|
|
8406
8407
|
console.error(`[FlowEngine] Failed to parse reasoning_details for message ${msg.id}:`, e);
|
|
8407
8408
|
}
|
|
8408
8409
|
}
|
|
8410
|
+
if (msg.reasoning_content && !seenDetailTexts.has(msg.reasoning_content)) {
|
|
8411
|
+
reasoningDetailsArray.push({
|
|
8412
|
+
type: "reasoning.text",
|
|
8413
|
+
text: msg.reasoning_content
|
|
8414
|
+
});
|
|
8415
|
+
}
|
|
8409
8416
|
if (reasoningDetailsArray.length > 0) {
|
|
8410
8417
|
messageToAdd.reasoning_details = reasoningDetailsArray;
|
|
8411
8418
|
}
|
|
@@ -10450,6 +10457,7 @@ ${lines.join("\n\n")}`
|
|
|
10450
10457
|
"silent",
|
|
10451
10458
|
"parent_id",
|
|
10452
10459
|
"depth",
|
|
10460
|
+
"prompt",
|
|
10453
10461
|
"reasoning_content",
|
|
10454
10462
|
"reasoning_details"
|
|
10455
10463
|
];
|
|
@@ -10484,6 +10492,7 @@ ${lines.join("\n\n")}`
|
|
|
10484
10492
|
tool_status: row.tool_status,
|
|
10485
10493
|
parent_id: row.parent_id,
|
|
10486
10494
|
depth: row.depth,
|
|
10495
|
+
prompt: row.prompt,
|
|
10487
10496
|
reasoning_content: row.reasoning_content,
|
|
10488
10497
|
reasoning_details: row.reasoning_details
|
|
10489
10498
|
}));
|
|
@@ -18323,10 +18332,10 @@ async function extractPromptIncludes(sourceCode) {
|
|
|
18323
18332
|
let includeName = null;
|
|
18324
18333
|
for (const prop of element.properties) {
|
|
18325
18334
|
if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)) {
|
|
18326
|
-
if (prop.name.text === "type" && ts.isStringLiteral(prop.initializer) && prop.initializer.text === "include") {
|
|
18335
|
+
if (prop.name.text === "type" && ts.isStringLiteral(prop.initializer) && (prop.initializer.text === "include" || prop.initializer.text === "prompt")) {
|
|
18327
18336
|
hasIncludeType = true;
|
|
18328
18337
|
}
|
|
18329
|
-
if (prop.name.text === "name" && ts.isStringLiteral(prop.initializer)) {
|
|
18338
|
+
if ((prop.name.text === "prompt" || prop.name.text === "name" || prop.name.text === "id") && ts.isStringLiteral(prop.initializer)) {
|
|
18330
18339
|
includeName = prop.initializer.text;
|
|
18331
18340
|
}
|
|
18332
18341
|
}
|