@standardagents/builder 0.37.8 → 0.38.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.
@@ -1,7 +1,7 @@
1
1
  import { DurableObjectStorage } from '@cloudflare/workers-types';
2
2
  import { ZodObject, ZodRawShape } from 'zod';
3
3
  import { N as NamespacedRegistry } from './types-Bpe7IANZ.js';
4
- import { ThreadState, ToolResult as ToolResult$1, VariableDefinition, HookName, HookSignatures, HookMessage, HookToolCall, HookToolResult, CodeExecutionOptions, CodeExecutionResult, InjectMessageInput, QueueMessageInput, SubagentRegistryEntry, ProviderUsagePricing, AgentDefinition, SkillMetadata, SkillFileInput, ControllerContext, Controller, ThreadEndpointHandler } from '@standardagents/spec';
4
+ import { ThreadState, ToolResult as ToolResult$1, VariableDefinition, HookName, HookSignatures, HookMessage, HookToolCall, HookToolResult, CodeExecutionOptions, CodeExecutionResult, InjectMessageInput, QueueMessageInput, SubagentRegistryEntry, ProviderUsagePricing, ThreadUser, AgentDefinition, SkillMetadata, SkillFileInput, ControllerContext, Controller, ThreadEndpointHandler } from '@standardagents/spec';
5
5
 
6
6
  /**
7
7
  * Callback function to execute before stream closes
@@ -1120,6 +1120,7 @@ interface FileStats {
1120
1120
  * - User session token (validated against DurableAgentBuilder)
1121
1121
  * - API key (validated against DurableAgentBuilder)
1122
1122
  */
1123
+
1123
1124
  interface AuthUser {
1124
1125
  id: string;
1125
1126
  username: string;
@@ -1139,6 +1140,13 @@ interface AuthContext {
1139
1140
  user: AuthUser;
1140
1141
  authType: 'super_admin' | 'session' | 'api_key';
1141
1142
  }
1143
+ /**
1144
+ * Project an authenticated request onto the spec's endpoint caller identity
1145
+ * (`ThreadEndpointAuth.caller` / `ControllerContext.caller`). Returns exactly
1146
+ * the spec `ThreadUser` fields — internal extras like `platform_user_id`
1147
+ * never reach endpoint code.
1148
+ */
1149
+ declare function endpointCallerFromAuth(auth: AuthContext | null | undefined): ThreadUser | null;
1142
1150
  /**
1143
1151
  * Authenticate a request using various token types
1144
1152
  */
@@ -1851,4 +1859,4 @@ declare function defineController<Env extends ThreadEnv = ThreadEnv>(controller:
1851
1859
  */
1852
1860
  declare function createThreadEndpointHandler<Env extends ThreadEnv = ThreadEnv>(handler: ThreadEndpointHandler): BuilderController<Env>;
1853
1861
 
1854
- export { type AuthUser as A, type BuilderController as B, CLIENT_STREAM_CHUNK_BYTES as C, type TelemetryEvent as D, type Env as E, type FlowState as F, type FileRecord as G, type AttachmentRef as H, type ImageMetadata as I, type GrepResult as J, type FileStats as K, type LLMResponse as L, type Message as M, type TextContentPart as N, type ImageContentPart as O, type MultimodalContent as P, type MessageContent as Q, type RequestContext as R, type StorageBackend as S, type ToolCall as T, type BuilderControllerContext as a, type ThreadEndpointContext as b, createThreadEndpointHandler as c, defineController as d, type ThreadEnv as e, type BuilderThreadEndpointHandler as f, authenticate as g, requireAdmin as h, type AuthContext as i, callClient as j, callClientStream as k, encodeStreamChunk as l, decodeStreamChunk as m, type ClientToolRequest as n, type ClientToolResponse as o, type ClientStreamRequest as p, type ClientStreamResponse as q, requireAuth as r, supportsClientForwarding as s, type ClientDuplex as t, type ClientForwarding as u, type Agent as v, type ThreadInstance as w, type ThreadMetadata as x, type ToolResult as y, type FlowResult as z };
1862
+ export { type AuthUser as A, type BuilderController as B, CLIENT_STREAM_CHUNK_BYTES as C, type FlowResult as D, type TelemetryEvent as E, type FlowState as F, type Env as G, type FileRecord as H, type ImageMetadata as I, type AttachmentRef as J, type GrepResult as K, type LLMResponse as L, type Message as M, type FileStats as N, type TextContentPart as O, type ImageContentPart as P, type MultimodalContent as Q, type RequestContext as R, type StorageBackend as S, type ToolCall as T, type MessageContent as U, type BuilderControllerContext as a, type ThreadEndpointContext as b, createThreadEndpointHandler as c, defineController as d, type ThreadEnv as e, type BuilderThreadEndpointHandler as f, authenticate as g, requireAdmin as h, endpointCallerFromAuth as i, type AuthContext as j, callClient as k, callClientStream as l, encodeStreamChunk as m, decodeStreamChunk as n, type ClientToolRequest as o, type ClientToolResponse as p, type ClientStreamRequest as q, requireAuth as r, supportsClientForwarding as s, type ClientStreamResponse as t, type ClientDuplex as u, type ClientForwarding as v, type Agent as w, type ThreadInstance as x, type ThreadMetadata as y, type ToolResult as z };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ModelDefinition, AgentDefinition } from './runtime.js';
2
2
  export { AgentBuilderEnv, AgentBuilderEvent, 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, ThreadEventPayload, ThreadRegistryEntry, ThreadWatchdog, ThreadWatchdogState, ToolConfig, UpdateThreadParams, User, WatchdogCheckin, WatchdogProbeResult, 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, isTrustedLocalDevelopmentRequest, linkFile, mkdir, move, optimizeImageContext, parseQualifiedName, qualifyName, queueTool, readFile, readdir, reloadHistory, rename, replaceImagesWithDescriptions, 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 { v as Agent, H as AttachmentRef, i as AuthContext, A as AuthUser, f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, t as ClientDuplex, u as ClientForwarding, p as ClientStreamRequest, q as ClientStreamResponse, n as ClientToolRequest, o as ClientToolResponse, B as Controller, a as ControllerContext, E as Env, G as FileRecord, K as FileStats, z as FlowResult, F as FlowState, J as GrepResult, O as ImageContentPart, I as ImageMetadata, L as LLMResponse, M as Message, Q as MessageContent, P as MultimodalContent, R as RequestContext, S as StorageBackend, D as TelemetryEvent, N as TextContentPart, b as ThreadEndpointContext, e as ThreadEnv, w as ThreadInstance, x as ThreadMetadata, T as ToolCall, y as ToolResult, g as authenticate, j as callClient, k as callClientStream, c as createThreadEndpointHandler, m as decodeStreamChunk, d as defineController, l as encodeStreamChunk, h as requireAdmin, r as requireAuth, s as supportsClientForwarding } from './index-Lfan8QMN.js';
4
+ export { w as Agent, J as AttachmentRef, j as AuthContext, A as AuthUser, f as BuilderThreadEndpointHandler, C as CLIENT_STREAM_CHUNK_BYTES, u as ClientDuplex, v as ClientForwarding, q as ClientStreamRequest, t as ClientStreamResponse, o as ClientToolRequest, p as ClientToolResponse, B as Controller, a as ControllerContext, G as Env, H as FileRecord, N as FileStats, D as FlowResult, F as FlowState, K as GrepResult, P as ImageContentPart, I as ImageMetadata, L as LLMResponse, M as Message, U as MessageContent, Q as MultimodalContent, R as RequestContext, S as StorageBackend, E as TelemetryEvent, O as TextContentPart, b as ThreadEndpointContext, e as ThreadEnv, x as ThreadInstance, y as ThreadMetadata, T as ToolCall, z as ToolResult, 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-BBu-Osn5.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
@@ -21414,10 +21414,6 @@ var PUBLIC_ROUTES = /* @__PURE__ */ new Set([
21414
21414
  function isProviderIconRoute(routePath) {
21415
21415
  return /^\/api\/providers\/[^/]+\/icon$/.test(routePath);
21416
21416
  }
21417
- function isPublicThreadFileRoute(routePath, method) {
21418
- if (method !== "GET" && method !== "HEAD") return false;
21419
- return /^\/api\/threads\/[^/]+\/public\/.+/.test(routePath);
21420
- }
21421
21417
  function isHostedInstance(env) {
21422
21418
  const value = env?.STANDARD_AGENTS_HOSTED;
21423
21419
  if (typeof value === "string") {
@@ -21444,9 +21440,6 @@ function isPublicApiRoute(routePath, request, env) {
21444
21440
  if (isProviderIconRoute(routePath)) {
21445
21441
  return true;
21446
21442
  }
21447
- if (isPublicThreadFileRoute(routePath, request.method.toUpperCase())) {
21448
- return true;
21449
- }
21450
21443
  if (!isTrustedLocalDevelopmentRequest(request, env)) return false;
21451
21444
  return routePath === "/api/threads" || routePath.startsWith("/api/threads/") || routePath === "/api/platform" || routePath.startsWith("/api/platform/") || routePath === "/api/platform-session" || routePath.startsWith("/api/platform-session/") || routePath === "/api/platform-auth" || routePath.startsWith("/api/platform-auth/");
21452
21445
  }
@@ -22200,14 +22193,16 @@ import { prompts, promptNames } from "virtual:@standardagents-prompts";
22200
22193
  import { agents, agentNames } from "virtual:@standardagents-agents";
22201
22194
  import { registry } from "virtual:@standardagents-registry";
22202
22195
  import {
22196
+ authenticate,
22203
22197
  requireAuth,
22204
22198
  createThreadEndpointHandler,
22205
22199
  canAccessThread,
22200
+ endpointCallerFromAuth,
22206
22201
  isHostedInstance,
22207
22202
  isPublicApiRoute,
22208
22203
  isAdminOnlyApiRoute,
22209
22204
  } from "@standardagents/builder/runtime";
22210
- import { isThreadEndpoint } from "@standardagents/spec";
22205
+ import { isThreadEndpoint, getEndpointAccess } from "@standardagents/spec";
22211
22206
 
22212
22207
  function platformEndpoint(env) {
22213
22208
  const configured =
@@ -22350,8 +22345,16 @@ ${packedThreadRouteCode}
22350
22345
  );
22351
22346
 
22352
22347
  if (routeMatch) {
22348
+ let controller = await routeMatch.data();
22349
+
22350
+ // Endpoint-declared access (spec: EndpointAccess). A 'public' declaration
22351
+ // opts that one endpoint out of the router's authentication gate; the
22352
+ // handler still receives the resolved caller identity when the request
22353
+ // presents verifiable credentials.
22354
+ const declaredPublic = getEndpointAccess(controller) === 'public';
22355
+
22353
22356
  // Check if authentication is required for this route
22354
- const publicRoute = isPublicApiRoute(routePath, request, env);
22357
+ const publicRoute = declaredPublic || isPublicApiRoute(routePath, request, env);
22355
22358
  const isApiRoute = routePath.startsWith('/api/');
22356
22359
 
22357
22360
  let authContext = null;
@@ -22394,10 +22397,24 @@ ${packedThreadRouteCode}
22394
22397
  threadAccess = { threadId, thread };
22395
22398
  }
22396
22399
  }
22400
+ } else if (isApiRoute && declaredPublic) {
22401
+ // Optional caller resolution for endpoint-declared public routes:
22402
+ // verifiable credentials attribute the request, anything else stays
22403
+ // anonymous instead of being rejected (spec ThreadEndpointAuth).
22404
+ authContext = await authenticate(request, env);
22405
+ if (authContext && routePath.startsWith('/api/threads/')) {
22406
+ const threadId = routeMatch.params?.threadId || routeMatch.params?.id;
22407
+ if (threadId) {
22408
+ const agentBuilderId = env.AGENT_BUILDER.idFromName('singleton');
22409
+ const agentBuilder = env.AGENT_BUILDER.get(agentBuilderId);
22410
+ const thread = await agentBuilder.getThread(threadId);
22411
+ if (thread && canAccessThread(authContext, thread)) {
22412
+ threadAccess = { threadId, thread };
22413
+ }
22414
+ }
22415
+ }
22397
22416
  }
22398
22417
 
22399
- let controller = await routeMatch.data();
22400
-
22401
22418
  // Check if this is a thread endpoint (marked by defineThreadEndpoint)
22402
22419
  // If so, wrap it with createThreadEndpointHandler to provide ThreadState
22403
22420
  if (isThreadEndpoint(controller)) {
@@ -22412,6 +22429,7 @@ ${packedThreadRouteCode}
22412
22429
  config,
22413
22430
  tools,
22414
22431
  auth: authContext, // Add auth context to controller context
22432
+ caller: endpointCallerFromAuth(authContext), // Spec ControllerContext.caller
22415
22433
  threadAccess, // Router's thread authorization, bound to the exact id
22416
22434
  };
22417
22435
  const result = await controller(context);
@@ -23192,54 +23210,6 @@ var builder = agentbuilder;
23192
23210
 
23193
23211
  // src/router/index.ts
23194
23212
  init_ThreadStateImpl();
23195
- function defineController2(controller) {
23196
- return controller;
23197
- }
23198
- function createThreadEndpointHandler(handler) {
23199
- return (async ({ req, params, env }) => {
23200
- const threadId = params.threadId ?? params.id;
23201
- if (!threadId) {
23202
- return Response.json({ error: "Thread ID required" }, { status: 400 });
23203
- }
23204
- try {
23205
- const agentBuilderId = env.AGENT_BUILDER.idFromName("singleton");
23206
- const agentBuilder = env.AGENT_BUILDER.get(agentBuilderId);
23207
- const metadata = await agentBuilder.getThread(threadId);
23208
- if (!metadata) {
23209
- return Response.json(
23210
- { error: `Thread not found: ${threadId}` },
23211
- { status: 404 }
23212
- );
23213
- }
23214
- const meta = metadata;
23215
- if (!meta.agent_id && meta.agent_name) {
23216
- meta.agent_id = meta.agent_name;
23217
- }
23218
- const durableId = env.AGENT_BUILDER_THREAD.idFromName(threadId);
23219
- const stub = env.AGENT_BUILDER_THREAD.get(durableId);
23220
- const instance = stub;
23221
- const threadState = ThreadStateImpl.fromThreadInstance(instance, metadata, {
23222
- env
23223
- });
23224
- const endpointParams = {};
23225
- for (const [key, value] of Object.entries(params)) {
23226
- if (key === "threadId" || key === "id" && !params.threadId) {
23227
- continue;
23228
- }
23229
- endpointParams[key === "_" ? "*" : key] = value;
23230
- }
23231
- const response = await handler(req, threadState, endpointParams);
23232
- await threadState.flushPendingEventDeliveries();
23233
- return response;
23234
- } catch (error) {
23235
- console.error(`Error in thread endpoint for ${threadId}:`, error);
23236
- return Response.json(
23237
- { error: error.message || "Internal server error" },
23238
- { status: 500 }
23239
- );
23240
- }
23241
- });
23242
- }
23243
23213
 
23244
23214
  // src/utils/auth.ts
23245
23215
  async function hashToken(token) {
@@ -23330,6 +23300,19 @@ var CORS_HEADERS = {
23330
23300
  "Access-Control-Allow-Headers": "Content-Type, Authorization, X-Requested-With",
23331
23301
  "Access-Control-Max-Age": "86400"
23332
23302
  };
23303
+ function endpointCallerFromAuth(auth) {
23304
+ if (!auth) return null;
23305
+ const { id, username, role, permissions, email, display_name, avatar_url } = auth.user;
23306
+ return {
23307
+ id,
23308
+ username,
23309
+ role,
23310
+ permissions: permissions ?? null,
23311
+ email: email ?? null,
23312
+ display_name: display_name ?? null,
23313
+ avatar_url: avatar_url ?? null
23314
+ };
23315
+ }
23333
23316
  function parsePermissions(value) {
23334
23317
  if (Array.isArray(value)) return value.filter((p) => typeof p === "string");
23335
23318
  if (typeof value === "string" && value.trim()) {
@@ -23464,6 +23447,61 @@ async function requireAdmin(request, env) {
23464
23447
  }
23465
23448
  return result;
23466
23449
  }
23450
+ function defineController2(controller) {
23451
+ return controller;
23452
+ }
23453
+ function createThreadEndpointHandler(handler) {
23454
+ return (async (context) => {
23455
+ const { req, params, env } = context;
23456
+ const threadId = params.threadId ?? params.id;
23457
+ if (!threadId) {
23458
+ return Response.json({ error: "Thread ID required" }, { status: 400 });
23459
+ }
23460
+ const endpointAuth = {
23461
+ caller: endpointCallerFromAuth(context.auth),
23462
+ threadAccess: Boolean(
23463
+ context.threadAccess && context.threadAccess.threadId === threadId
23464
+ )
23465
+ };
23466
+ try {
23467
+ const agentBuilderId = env.AGENT_BUILDER.idFromName("singleton");
23468
+ const agentBuilder = env.AGENT_BUILDER.get(agentBuilderId);
23469
+ const metadata = await agentBuilder.getThread(threadId);
23470
+ if (!metadata) {
23471
+ return Response.json(
23472
+ { error: `Thread not found: ${threadId}` },
23473
+ { status: 404 }
23474
+ );
23475
+ }
23476
+ const meta = metadata;
23477
+ if (!meta.agent_id && meta.agent_name) {
23478
+ meta.agent_id = meta.agent_name;
23479
+ }
23480
+ const durableId = env.AGENT_BUILDER_THREAD.idFromName(threadId);
23481
+ const stub = env.AGENT_BUILDER_THREAD.get(durableId);
23482
+ const instance = stub;
23483
+ const threadState = ThreadStateImpl.fromThreadInstance(instance, metadata, {
23484
+ env
23485
+ });
23486
+ const endpointParams = {};
23487
+ for (const [key, value] of Object.entries(params)) {
23488
+ if (key === "threadId" || key === "id" && !params.threadId) {
23489
+ continue;
23490
+ }
23491
+ endpointParams[key === "_" ? "*" : key] = value;
23492
+ }
23493
+ const response = await handler(req, threadState, endpointParams, endpointAuth);
23494
+ await threadState.flushPendingEventDeliveries();
23495
+ return response;
23496
+ } catch (error) {
23497
+ console.error(`Error in thread endpoint for ${threadId}:`, error);
23498
+ return Response.json(
23499
+ { error: error.message || "Internal server error" },
23500
+ { status: 500 }
23501
+ );
23502
+ }
23503
+ });
23504
+ }
23467
23505
 
23468
23506
  // src/utils/permissions.ts
23469
23507
  function canAccessThread(auth, thread) {
@@ -37449,6 +37487,6 @@ init_context();
37449
37487
  init_ProviderRegistry();
37450
37488
  init_types2();
37451
37489
 
37452
- export { CLIENT_STREAM_CHUNK_BYTES, CodeExecutionBridge, DurableAgentBuilder, DurableThread, DurableUserHub, FlowStateSdk, NamespaceResolutionError, PackageDiscoveryService, ProviderRegistry, ThreadWatchdog, agentbuilder, assistantMessageText, authenticate, buildImageDescription, builder, callClient, callClientStream, canAccessThread, cat, createNamespaceContext, createThreadEndpointHandler, decodeStreamChunk, defineController2 as defineController, discoverPackages, emitThreadEvent, encodeStreamChunk, enhanceFlowState, exists, find, forceTurn, generateAgentFile, generateImageDescription, generateModelFile, generatePromptFile, getFileStats, getMessages, getMessagesToSummarize, getShortName, getThumbnail, getUnsummarizedImageAttachments, getVisibleAgentNames, getVisibleModelNames, getVisiblePromptNames, getVisibleToolNames, grep, hasImageAttachments, hasJsonArrayEntries, head, injectMessage, isAdminOnlyApiRoute, isHostedInstance, isPublicApiRoute, isQualifiedName, isTrustedLocalDevelopmentRequest, isVisibleTerminalAssistantMessage, linkFile, messageTimestampSeconds, mkdir, move, optimizeImageContext, parseQualifiedName, qualifyName, queueTool, readFile, readdir, reloadHistory, rename, replaceImagesWithDescriptions, requireAdmin, requireAuth, resolveAgent, resolveHook, resolveModel, resolvePrompt, resolveTool, rmdir, stat, supportsClientForwarding, tail, unlink, updateThread, writeFile, writeImage };
37490
+ export { CLIENT_STREAM_CHUNK_BYTES, CodeExecutionBridge, DurableAgentBuilder, DurableThread, DurableUserHub, FlowStateSdk, NamespaceResolutionError, PackageDiscoveryService, ProviderRegistry, ThreadWatchdog, agentbuilder, assistantMessageText, authenticate, buildImageDescription, builder, callClient, callClientStream, canAccessThread, cat, createNamespaceContext, createThreadEndpointHandler, decodeStreamChunk, defineController2 as defineController, discoverPackages, emitThreadEvent, encodeStreamChunk, endpointCallerFromAuth, enhanceFlowState, exists, find, forceTurn, generateAgentFile, generateImageDescription, generateModelFile, generatePromptFile, getFileStats, getMessages, getMessagesToSummarize, getShortName, getThumbnail, getUnsummarizedImageAttachments, getVisibleAgentNames, getVisibleModelNames, getVisiblePromptNames, getVisibleToolNames, grep, hasImageAttachments, hasJsonArrayEntries, head, injectMessage, isAdminOnlyApiRoute, isHostedInstance, isPublicApiRoute, isQualifiedName, isTrustedLocalDevelopmentRequest, isVisibleTerminalAssistantMessage, linkFile, messageTimestampSeconds, mkdir, move, optimizeImageContext, parseQualifiedName, qualifyName, queueTool, readFile, readdir, reloadHistory, rename, replaceImagesWithDescriptions, requireAdmin, requireAuth, resolveAgent, resolveHook, resolveModel, resolvePrompt, resolveTool, rmdir, stat, supportsClientForwarding, tail, unlink, updateThread, writeFile, writeImage };
37453
37491
  //# sourceMappingURL=index.js.map
37454
37492
  //# sourceMappingURL=index.js.map