@standardagents/builder 0.13.1 → 0.14.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 +44637 -14844
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/assets/index.css +1 -1
- package/dist/client/index.js +29 -29
- package/dist/client/vue.js +1 -1
- package/dist/image-processing.js +34 -13
- package/dist/image-processing.js.map +1 -1
- package/dist/{index-D8PIt3cR.d.ts → index-CGbIvNZQ.d.ts} +20 -18
- package/dist/index.d.ts +4 -16
- package/dist/index.js +641 -293
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +51 -37
- package/dist/plugin.js.map +1 -1
- package/dist/sip.wasm +0 -0
- package/dist/test.d.ts +1 -1
- package/package.json +6 -5
package/dist/image-processing.js
CHANGED
|
@@ -1,25 +1,46 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { transform, collect } from '@standardagents/sip';
|
|
2
2
|
|
|
3
3
|
// src/image-processing/index.ts
|
|
4
4
|
var MAX_SIZE = 1.5 * 1024 * 1024;
|
|
5
5
|
var MAX_DIMENSION = 4096;
|
|
6
6
|
var MAX_INPUT_SIZE = 20 * 1024 * 1024;
|
|
7
|
+
var MIN_QUALITY = 45;
|
|
8
|
+
function clampQuality(quality) {
|
|
9
|
+
return Math.max(1, Math.min(100, Math.round(quality)));
|
|
10
|
+
}
|
|
11
|
+
async function collectTransformedImage(input, width, height, quality) {
|
|
12
|
+
const image = transform(input, { width, height, quality: clampQuality(quality) });
|
|
13
|
+
const { data, info } = await collect(image);
|
|
14
|
+
return {
|
|
15
|
+
data,
|
|
16
|
+
mimeType: "image/jpeg",
|
|
17
|
+
width: info.width,
|
|
18
|
+
height: info.height
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
async function transformToTargetSize(input, maxWidth, maxHeight, maxBytes, quality) {
|
|
22
|
+
let currentQuality = clampQuality(quality);
|
|
23
|
+
let result = await collectTransformedImage(input, maxWidth, maxHeight, currentQuality);
|
|
24
|
+
while (result.data.byteLength > maxBytes && currentQuality > MIN_QUALITY) {
|
|
25
|
+
currentQuality -= 10;
|
|
26
|
+
result = await collectTransformedImage(input, maxWidth, maxHeight, currentQuality);
|
|
27
|
+
}
|
|
28
|
+
while (result.data.byteLength > maxBytes) {
|
|
29
|
+
const scaleFactor = Math.sqrt(maxBytes / result.data.byteLength) * 0.9;
|
|
30
|
+
const nextWidth = Math.max(1, Math.min(result.width - 1, Math.round(result.width * scaleFactor)));
|
|
31
|
+
const nextHeight = Math.max(1, Math.min(result.height - 1, Math.round(result.height * scaleFactor)));
|
|
32
|
+
if (nextWidth >= result.width && nextHeight >= result.height) {
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
result = await collectTransformedImage(input, nextWidth, nextHeight, currentQuality);
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
7
39
|
async function processImage(input, inputMimeType) {
|
|
8
40
|
if (input.byteLength > MAX_INPUT_SIZE) {
|
|
9
41
|
throw new Error(`Image too large: ${input.byteLength} bytes exceeds ${MAX_INPUT_SIZE} byte limit`);
|
|
10
42
|
}
|
|
11
|
-
|
|
12
|
-
maxWidth: MAX_DIMENSION,
|
|
13
|
-
maxHeight: MAX_DIMENSION,
|
|
14
|
-
maxBytes: MAX_SIZE,
|
|
15
|
-
quality: 85
|
|
16
|
-
});
|
|
17
|
-
return {
|
|
18
|
-
data: result.data,
|
|
19
|
-
mimeType: "image/jpeg",
|
|
20
|
-
width: result.width,
|
|
21
|
-
height: result.height
|
|
22
|
-
};
|
|
43
|
+
return await transformToTargetSize(input, MAX_DIMENSION, MAX_DIMENSION, MAX_SIZE, 85);
|
|
23
44
|
}
|
|
24
45
|
function needsProcessing(data, mimeType) {
|
|
25
46
|
const binaryLength = Math.ceil(data.length * 3 / 4);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/image-processing/index.ts"],"names":[],"mappings":";;;AAiBA,IAAM,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AAuCO,SAAS,eAAA,CAAgB,MAAc,QAAA,EAA2B;AAEvE,EAAA,MAAM,eAAe,IAAA,CAAK,IAAA,CAAK,IAAA,CAAK,MAAA,GAAS,IAAI,CAAC,CAAA;AAGlD,EAAA,OACE,YAAA,GAAe,YACf,QAAA,CAAS,QAAA,CAAS,MAAM,CAAA,IACxB,QAAA,CAAS,SAAS,MAAM,CAAA;AAE5B;AAKO,SAAS,oBAAoB,MAAA,EAA6B;AAC/D,EAAA,MAAM,YAAA,GAAe,KAAK,MAAM,CAAA;AAChC,EAAA,MAAM,KAAA,GAAQ,IAAI,UAAA,CAAW,YAAA,CAAa,MAAM,CAAA;AAChD,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,YAAA,CAAa,QAAQ,CAAA,EAAA,EAAK;AAC5C,IAAA,KAAA,CAAM,CAAC,CAAA,GAAI,YAAA,CAAa,UAAA,CAAW,CAAC,CAAA;AAAA,EACtC;AACA,EAAA,OAAO,KAAA,CAAM,MAAA;AACf;AAKO,SAAS,oBAAoB,MAAA,EAA6B;AAC/D,EAAA,MAAM,KAAA,GAAQ,IAAI,UAAA,CAAW,MAAM,CAAA;AACnC,EAAA,IAAI,MAAA,GAAS,EAAA;AACb,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,KAAA,CAAM,QAAQ,CAAA,EAAA,EAAK;AACrC,IAAA,MAAA,IAAU,MAAA,CAAO,YAAA,CAAa,KAAA,CAAM,CAAC,CAAC,CAAA;AAAA,EACxC;AACA,EAAA,OAAO,KAAK,MAAM,CAAA;AACpB","file":"image-processing.js","sourcesContent":["/**\n * Server-side image processing for Cloudflare Workers\n *\n * Uses @standardagents/sip for memory-efficient processing with scanline-based\n * resize and streaming output. All images are converted to JPEG.\n *\n * Features:\n * - Compress/resize images to fit under 1.5MB target\n * - Convert AVIF/WebP/PNG/JPEG to JPEG\n * - Memory-efficient scanline processing\n * - Smart quality optimization: quality first, dimensions last\n */\n\nimport { collect, transform } from \"@standardagents/sip\";\n\n// Target 1.5MB binary → ~2MB base64 for RPC transfer\n// SQLite limit is 2MB per row, but base64 overhead means we need headroom\nconst MAX_SIZE = 1.5 * 1024 * 1024;\n\n// Memory safety limit\nconst MAX_DIMENSION = 4096;\n\n// Reject images that would consume too much memory before decoding\nconst MAX_INPUT_SIZE = 20 * 1024 * 1024; // 20MB\nconst MIN_QUALITY = 45;\n\nexport interface ProcessedImage {\n data: ArrayBuffer;\n mimeType: \"image/jpeg\";\n width: number;\n height: number;\n}\n\nfunction clampQuality(quality: number): number {\n return Math.max(1, Math.min(100, Math.round(quality)));\n}\n\nasync function collectTransformedImage(\n input: ArrayBuffer,\n width: number,\n height: number,\n quality: number\n): Promise<ProcessedImage> {\n const image = transform(input, { width, height, quality: clampQuality(quality) });\n const { data, info } = await collect(image);\n\n return {\n data,\n mimeType: \"image/jpeg\",\n width: info.width,\n height: info.height,\n };\n}\n\nasync function transformToTargetSize(\n input: ArrayBuffer,\n maxWidth: number,\n maxHeight: number,\n maxBytes: number,\n quality: number\n): Promise<ProcessedImage> {\n let currentQuality = clampQuality(quality);\n let result = await collectTransformedImage(input, maxWidth, maxHeight, currentQuality);\n\n while (result.data.byteLength > maxBytes && currentQuality > MIN_QUALITY) {\n currentQuality -= 10;\n result = await collectTransformedImage(input, maxWidth, maxHeight, currentQuality);\n }\n\n while (result.data.byteLength > maxBytes) {\n const scaleFactor = Math.sqrt(maxBytes / result.data.byteLength) * 0.9;\n const nextWidth = Math.max(1, Math.min(result.width - 1, Math.round(result.width * scaleFactor)));\n const nextHeight = Math.max(1, Math.min(result.height - 1, Math.round(result.height * scaleFactor)));\n\n if (nextWidth >= result.width && nextHeight >= result.height) {\n break;\n }\n\n result = await collectTransformedImage(input, nextWidth, nextHeight, currentQuality);\n }\n\n return result;\n}\n\n/**\n * Process an image to ensure it's under 1.5MB and in JPEG format.\n *\n * All images (including transparent PNGs) are converted to JPEG.\n * This trades transparency for reliability - SIP's WASM works correctly\n * in Cloudflare Workers while @jsquash's WASM loading fails.\n *\n * @param input - Raw image data as ArrayBuffer\n * @param inputMimeType - MIME type hint (unused, kept for API compatibility)\n * @returns Processed image data as JPEG with dimensions\n */\nexport async function processImage(\n input: ArrayBuffer,\n inputMimeType: string\n): Promise<ProcessedImage> {\n // Memory safety: reject very large images\n if (input.byteLength > MAX_INPUT_SIZE) {\n throw new Error(`Image too large: ${input.byteLength} bytes exceeds ${MAX_INPUT_SIZE} byte limit`);\n }\n\n return await transformToTargetSize(input, MAX_DIMENSION, MAX_DIMENSION, MAX_SIZE, 85);\n}\n\n/**\n * Detect image format from magic bytes (fallback)\n */\nfunction detectFormat(data: ArrayBuffer, mimeType: string): string {\n const bytes = new Uint8Array(data.slice(0, 12));\n\n if (bytes[4] === 0x66 && bytes[5] === 0x74 && bytes[6] === 0x79 && bytes[7] === 0x70) {\n const brand = String.fromCharCode(...bytes.slice(8, 12));\n if (brand === \"avif\" || brand === \"avis\") return \"avif\";\n }\n\n if (bytes[0] === 0x89 && bytes[1] === 0x50 && bytes[2] === 0x4E && bytes[3] === 0x47) {\n return \"png\";\n }\n\n if (bytes[0] === 0xFF && bytes[1] === 0xD8 && bytes[2] === 0xFF) {\n return \"jpeg\";\n }\n\n if (bytes[0] === 0x52 && bytes[1] === 0x49 && bytes[2] === 0x46 && bytes[3] === 0x46 &&\n bytes[8] === 0x57 && bytes[9] === 0x45 && bytes[10] === 0x42 && bytes[11] === 0x50) {\n return \"webp\";\n }\n\n if (mimeType.includes(\"png\")) return \"png\";\n if (mimeType.includes(\"webp\")) return \"webp\";\n if (mimeType.includes(\"avif\")) return \"avif\";\n return \"jpeg\";\n}\n\n/**\n * Check if an image needs processing based on size and format.\n *\n * @param data - Base64-encoded image data\n * @param mimeType - MIME type of the image\n * @returns true if processing is needed\n */\nexport function needsProcessing(data: string, mimeType: string): boolean {\n // Decode base64 to get actual size\n const binaryLength = Math.ceil(data.length * 3 / 4);\n\n // Process if >2MB or unsupported format\n return (\n binaryLength > MAX_SIZE ||\n mimeType.includes(\"avif\") ||\n mimeType.includes(\"webp\")\n );\n}\n\n/**\n * Convert base64 string to ArrayBuffer\n */\nexport function base64ToArrayBuffer(base64: string): ArrayBuffer {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes.buffer;\n}\n\n/**\n * Convert ArrayBuffer to base64 string\n */\nexport function arrayBufferToBase64(buffer: ArrayBuffer): string {\n const bytes = new Uint8Array(buffer);\n let binary = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n return btoa(binary);\n}\n"]}
|
|
@@ -91,30 +91,30 @@ interface Agent {
|
|
|
91
91
|
side_a_stop_tool: string | null;
|
|
92
92
|
side_a_stop_tool_response_property: string | null;
|
|
93
93
|
side_a_max_steps: number | null;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
side_a_session_stop_tool: string | null;
|
|
95
|
+
side_a_session_stop_message_property: string | null;
|
|
96
|
+
side_a_session_stop_attachments_property: string | null;
|
|
97
|
+
side_a_session_fail_tool: string | null;
|
|
98
|
+
side_a_session_fail_message_property: string | null;
|
|
99
|
+
side_a_session_fail_attachments_property: string | null;
|
|
100
|
+
side_a_session_status_tool: string | null;
|
|
101
|
+
side_a_session_status_message_property: string | null;
|
|
102
|
+
side_a_session_status_attachments_property: string | null;
|
|
103
103
|
side_b_label: string | null;
|
|
104
104
|
side_b_agent_prompt: string | null;
|
|
105
105
|
side_b_stop_on_response: boolean;
|
|
106
106
|
side_b_stop_tool: string | null;
|
|
107
107
|
side_b_stop_tool_response_property: string | null;
|
|
108
108
|
side_b_max_steps: number | null;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
side_b_session_stop_tool: string | null;
|
|
110
|
+
side_b_session_stop_message_property: string | null;
|
|
111
|
+
side_b_session_stop_attachments_property: string | null;
|
|
112
|
+
side_b_session_fail_tool: string | null;
|
|
113
|
+
side_b_session_fail_message_property: string | null;
|
|
114
|
+
side_b_session_fail_attachments_property: string | null;
|
|
115
|
+
side_b_session_status_tool: string | null;
|
|
116
|
+
side_b_session_status_message_property: string | null;
|
|
117
|
+
side_b_session_status_attachments_property: string | null;
|
|
118
118
|
hooks?: string[];
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
@@ -793,6 +793,8 @@ interface LogData {
|
|
|
793
793
|
* User's Env interface should extend this or include these bindings.
|
|
794
794
|
*/
|
|
795
795
|
interface Env extends ThreadEnv {
|
|
796
|
+
CLOUDFLARE_API_TOKEN?: string;
|
|
797
|
+
CLOUDFLARE_ACCOUNT_ID?: string;
|
|
796
798
|
CEREBRAS_API_KEY?: string;
|
|
797
799
|
OPENAI_API_KEY?: string;
|
|
798
800
|
ANTHROPIC_API_KEY?: 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, F as FileRecord, b as FlowState, M as Message, 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, F as FileRecord, b as FlowState, M as Message, c as FileStats, G as GrepResult, A as AttachmentRef, d as MessageContent, E as Env, e as ThreadInstance } from './index-CGbIvNZQ.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-CGbIvNZQ.js';
|
|
4
4
|
import { SubagentRegistryEntry, 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 } from 'cloudflare:workers';
|
|
@@ -593,7 +593,7 @@ declare class DurableThread<Env extends ThreadEnv = ThreadEnv> extends DurableOb
|
|
|
593
593
|
tool_results: string | null;
|
|
594
594
|
is_complete: boolean;
|
|
595
595
|
created_at: number;
|
|
596
|
-
}>;
|
|
596
|
+
} | null>;
|
|
597
597
|
/**
|
|
598
598
|
* Get thread metadata (RPC method)
|
|
599
599
|
*/
|
|
@@ -1650,7 +1650,7 @@ interface SessionToolConfig {
|
|
|
1650
1650
|
* Session lifecycle binding (string shorthand or explicit object form).
|
|
1651
1651
|
*/
|
|
1652
1652
|
type SessionToolBinding = AgentBuilder.Callables | SessionToolConfig;
|
|
1653
|
-
interface SideConfig extends Omit<SideConfig$1, 'prompt' | 'stopTool' | 'sessionStop' | 'sessionFail' | 'sessionStatus'
|
|
1653
|
+
interface SideConfig extends Omit<SideConfig$1, 'prompt' | 'stopTool' | 'sessionStop' | 'sessionFail' | 'sessionStatus'> {
|
|
1654
1654
|
/**
|
|
1655
1655
|
* The prompt to use for this side (type-safe with autocomplete).
|
|
1656
1656
|
* Must reference a prompt defined in agents/prompts/.
|
|
@@ -1677,18 +1677,6 @@ interface SideConfig extends Omit<SideConfig$1, 'prompt' | 'stopTool' | 'session
|
|
|
1677
1677
|
* Supports shorthand string or explicit message/attachment mapping object.
|
|
1678
1678
|
*/
|
|
1679
1679
|
sessionStatus?: SessionToolBinding;
|
|
1680
|
-
/**
|
|
1681
|
-
* @deprecated Use sessionStop instead.
|
|
1682
|
-
*/
|
|
1683
|
-
endSessionTool?: AgentBuilder.Callables;
|
|
1684
|
-
/**
|
|
1685
|
-
* @deprecated Use sessionFail instead.
|
|
1686
|
-
*/
|
|
1687
|
-
failSessionTool?: AgentBuilder.Callables;
|
|
1688
|
-
/**
|
|
1689
|
-
* @deprecated Use sessionStatus instead.
|
|
1690
|
-
*/
|
|
1691
|
-
statusTool?: AgentBuilder.Callables;
|
|
1692
1680
|
/**
|
|
1693
1681
|
* Enable manual stop condition handling via hooks.
|
|
1694
1682
|
* Builder-specific feature for custom stop logic.
|