runwork 0.13.1 → 0.13.3
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/agents/__tests__/intro-skill.test.js +2 -2
- package/dist/agents/intro-skill.d.ts +1 -1
- package/dist/commands/__tests__/setup-persona.test.js +2 -2
- package/dist/commands/resume.js +27 -3
- package/dist/commands/setup.js +2 -2
- package/dist/generated/bundled-types.js +33 -33
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -166,8 +166,8 @@ describe('generateInstructionHint', () => {
|
|
|
166
166
|
const hint = generateInstructionHint({ ...baseCtx, persona: { level: 3, label: 'engineer' } });
|
|
167
167
|
expect(hint).not.toContain('Communicating with this user');
|
|
168
168
|
});
|
|
169
|
-
it('adds
|
|
170
|
-
const hint = generateInstructionHint({ ...baseCtx, persona: { level: 1, label: '
|
|
169
|
+
it('adds an everyday persona block (level 1) telling agents to avoid dev tooling', () => {
|
|
170
|
+
const hint = generateInstructionHint({ ...baseCtx, persona: { level: 1, label: 'everyday' } });
|
|
171
171
|
expect(hint).toContain('Communicating with this user');
|
|
172
172
|
expect(hint).toContain('not a software developer');
|
|
173
173
|
expect(hint).toContain('npm, bun, node');
|
|
@@ -29,7 +29,7 @@ export interface InstructionHintContext {
|
|
|
29
29
|
*/
|
|
30
30
|
persona?: {
|
|
31
31
|
level: 1 | 2 | 3;
|
|
32
|
-
label: '
|
|
32
|
+
label: 'everyday' | 'curious' | 'engineer';
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
export declare function buildAppSkillDescription(appName: string, registries: WorkspaceAllData | null): string;
|
|
@@ -7,7 +7,7 @@ import { resolvePersona } from '../setup.js';
|
|
|
7
7
|
*/
|
|
8
8
|
describe('resolvePersona', () => {
|
|
9
9
|
it('maps a valid --persona flag to level and label', () => {
|
|
10
|
-
expect(resolvePersona('1', undefined)).toEqual({ level: 1, label: '
|
|
10
|
+
expect(resolvePersona('1', undefined)).toEqual({ level: 1, label: 'everyday' });
|
|
11
11
|
expect(resolvePersona('2', undefined)).toEqual({ level: 2, label: 'curious' });
|
|
12
12
|
expect(resolvePersona('3', undefined)).toEqual({ level: 3, label: 'engineer' });
|
|
13
13
|
});
|
|
@@ -25,7 +25,7 @@ describe('resolvePersona', () => {
|
|
|
25
25
|
expect(resolvePersona(undefined, undefined)).toBeUndefined();
|
|
26
26
|
});
|
|
27
27
|
it('prefers the flag over an existing on-disk persona', () => {
|
|
28
|
-
const existing = { level: 1, label: '
|
|
28
|
+
const existing = { level: 1, label: 'everyday' };
|
|
29
29
|
expect(resolvePersona('3', existing)).toEqual({ level: 3, label: 'engineer' });
|
|
30
30
|
});
|
|
31
31
|
});
|
package/dist/commands/resume.js
CHANGED
|
@@ -222,7 +222,20 @@ export const resumeCommand = new Command('resume')
|
|
|
222
222
|
// Substitute {uuid} in the resume command template with the original
|
|
223
223
|
// session UUID we extracted from the bundle content.
|
|
224
224
|
const cmd = (cap.cliResumeCommand ?? '').replace(/\{uuid\}/g, nativeUuid);
|
|
225
|
-
|
|
225
|
+
// If we're running inside the SAME agent we'd resume into (very common
|
|
226
|
+
// when an LLM in claude-code invokes `runwork resume` to pick up a
|
|
227
|
+
// saved claude-code conversation), exec'ing `claude --resume <uuid>`
|
|
228
|
+
// from inside that session is broken: the child claude process can't
|
|
229
|
+
// attach to the parent's TTY and the resume hits agent-specific edge
|
|
230
|
+
// cases ("No deferred tool marker found in the resumed session..."
|
|
231
|
+
// for Claude Code). Detect this and degrade to print-the-command mode
|
|
232
|
+
// so the user can copy/paste into a fresh terminal -- AND tell the
|
|
233
|
+
// caller agent that the in-session continuation path is via the
|
|
234
|
+
// `get_shared_conversation` MCP tool, which inlines the transcript.
|
|
235
|
+
const detected = detectCurrentAgent();
|
|
236
|
+
const insideSameAgent = detected && detected.slug === target.slug;
|
|
237
|
+
const shouldPrintOnly = opts.dryRun || insideSameAgent;
|
|
238
|
+
if (shouldPrintOnly) {
|
|
226
239
|
const fullCmd = placement.runFromCwd
|
|
227
240
|
? `cd "${placement.runFromCwd}" && ${cmd}`
|
|
228
241
|
: cmd;
|
|
@@ -231,16 +244,27 @@ export const resumeCommand = new Command('resume')
|
|
|
231
244
|
agent: target.slug,
|
|
232
245
|
placedAt: placement.placedAt,
|
|
233
246
|
command: fullCmd,
|
|
247
|
+
insideSameAgent: !!insideSameAgent,
|
|
234
248
|
};
|
|
235
249
|
if (useJson) {
|
|
236
250
|
jsonOut(result);
|
|
237
251
|
return;
|
|
238
252
|
}
|
|
239
253
|
console.log(`\nBundle placed at: ${placement.placedAt}`);
|
|
240
|
-
|
|
254
|
+
if (insideSameAgent) {
|
|
255
|
+
console.log(`\nYou are already inside ${target.name}, so I can't auto-launch a new session in this terminal.`);
|
|
256
|
+
console.log(`To resume natively, exit this session and run in a fresh terminal:`);
|
|
257
|
+
console.log(` ${fullCmd}`);
|
|
258
|
+
console.log(`\nOr ask the assistant to continue the conversation in THIS session by ` +
|
|
259
|
+
`fetching the transcript via the Runwork MCP \`get_shared_conversation\` tool ` +
|
|
260
|
+
`(share ID: ${shareId}).`);
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
console.log(`Run: ${fullCmd}\n`);
|
|
264
|
+
}
|
|
241
265
|
return;
|
|
242
266
|
}
|
|
243
|
-
// Exec the resume command
|
|
267
|
+
// Exec the resume command (fresh-shell case)
|
|
244
268
|
const parts = cmd.split(' ');
|
|
245
269
|
const child = spawn(parts[0], parts.slice(1), {
|
|
246
270
|
cwd: placement.runFromCwd ?? recipientCwd,
|
package/dist/commands/setup.js
CHANGED
|
@@ -10,7 +10,7 @@ import { detectAgents, printNoAgentsMessage } from '../agents/detect.js';
|
|
|
10
10
|
import { syncFromState } from './sync.js';
|
|
11
11
|
import { loadSetupState } from '../utils/setup-state.js';
|
|
12
12
|
const PERSONA_LABELS = {
|
|
13
|
-
1: '
|
|
13
|
+
1: 'everyday',
|
|
14
14
|
2: 'curious',
|
|
15
15
|
3: 'engineer',
|
|
16
16
|
};
|
|
@@ -69,7 +69,7 @@ export const setupCommand = new Command('setup')
|
|
|
69
69
|
.option('--agent <slug>', 'Only configure a specific agent (e.g. claude-code, cursor)')
|
|
70
70
|
.option('--dry-run', 'Show what would be configured without writing files')
|
|
71
71
|
.option('-y, --yes', 'Skip all prompts, configure all detected agents with user scope')
|
|
72
|
-
.option('--persona <level>', 'Technical-level persona for agent instructions (1=
|
|
72
|
+
.option('--persona <level>', 'Technical-level persona for agent instructions (1=everyday, 2=curious, 3=engineer)')
|
|
73
73
|
.action(async (opts) => {
|
|
74
74
|
const credentials = requireAuth();
|
|
75
75
|
const client = new ApiClient(credentials);
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
// Auto-generated by scripts/embed-types.ts -- do not edit
|
|
2
2
|
export const BUNDLED_TYPES = {
|
|
3
|
-
"core-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"core-workflow-instance.d.ts": "/**\n * WorkflowInstance Durable Object - Native Workflow Engine\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * One instance per workflow execution. Uses alarm-based execution\n * to bypass the 30-second CPU limit and provide durability.\n */\nimport { DurableObject } from 'cloudflare:workers';\nimport type { NativeWorkflowInstance, NativeWorkflowConfig } from './core-workflow-types';\nimport type { StepOptions, WaitEventOptions } from './core-workflows';\nimport { type Env } from './core-utils';\n/**\n * WorkflowInstance Durable Object\n *\n * Manages the execution of a single workflow instance.\n * Uses alarm chaining for step execution to bypass CPU limits.\n */\nexport declare class WorkflowInstanceDO extends DurableObject<Env> {\n private instance;\n private definition;\n private stepCounter;\n /**\n * Create and start a new workflow instance\n */\n create(workflowName: string, input: unknown, instanceId: string, config?: Partial<NativeWorkflowConfig>, metadata?: Record<string, unknown>): Promise<void>;\n /**\n * Get current workflow status\n */\n getStatus(): Promise<NativeWorkflowInstance | null>;\n /**\n * Signal the workflow with an event (for waitForEvent steps)\n */\n signal(eventType: string, payload: unknown): Promise<void>;\n /**\n * Pause the workflow\n */\n pause(): Promise<void>;\n /**\n * Resume a paused workflow\n */\n resume(): Promise<void>;\n /**\n * Cancel the workflow\n */\n cancel(): Promise<void>;\n /**\n * Alarm handler - main execution loop\n */\n alarm(): Promise<void>;\n /**\n * Execute the workflow handler\n */\n private executeWorkflow;\n /**\n * Execute or retrieve cached result for a step\n */\n executeStep<T>(name: string, options: StepOptions | undefined, fn: () => Promise<T>): Promise<T>;\n /**\n * Sleep for a duration\n */\n executeSleep(name: string, duration: string): Promise<void>;\n /**\n * Sleep until a specific timestamp\n */\n executeSleepUntil(name: string, timestamp: Date): Promise<void>;\n /**\n * Wait for an external event\n */\n executeWaitForEvent<T>(name: string, options?: WaitEventOptions): Promise<T>;\n private ensureLoaded;\n private persist;\n private isTerminal;\n private isTimedOut;\n private getCurrentStep;\n private transitionTo;\n private notifyCoordinator;\n private generateStepId;\n private parseDuration;\n private calculateBackoff;\n private executeWithTimeout;\n private normalizeError;\n}\n",
|
|
4
|
+
"core-agent.d.ts": "/**\n * Core Agent Types and Utilities\n * DO NOT MODIFY THIS FILE - You may break the agent functionality\n *\n * This module provides types and utilities for AI agents.\n * The actual agent implementation is in core-base-agent.ts.\n *\n * @example\n * ```typescript\n * // In agents.ts\n * import type { AgentDefinition } from './core-agent';\n *\n * const supportAgent: AgentDefinition = {\n * name: 'support-assistant',\n * description: 'Helps users with common questions',\n * systemPrompt: 'You are a helpful support assistant...',\n * integrations: ['slack', 'github'],\n * entities: ['ticket', 'user'],\n * };\n *\n * export const APP_AGENTS: AgentDefinition[] = [supportAgent];\n * ```\n */\nimport { z } from 'zod';\nimport type { Env } from './core-utils';\nimport type { IntegrationClient } from './core-integrations';\nimport type { ExecutionLimits } from './task-delegation/types';\n/**\n * Agent state persisted across conversations\n */\nexport interface AgentState {\n /** Conversation history */\n messages: AgentMessage[];\n /** Custom memory data */\n memory: Record<string, unknown>;\n /** Session metadata */\n sessionId: string;\n /** User identifier for per-user memory */\n userId?: string;\n /** Last activity timestamp */\n lastActivityAt: number;\n}\n/**\n * Message in agent conversation\n */\nexport interface AgentMessage {\n id: string;\n role: 'user' | 'assistant' | 'system' | 'tool';\n content: string;\n timestamp: number;\n toolCalls?: Array<{\n id: string;\n name: string;\n arguments: Record<string, unknown>;\n }>;\n toolResults?: Array<{\n id: string;\n result: unknown;\n }>;\n}\n/**\n * Memory strategy for agents\n * - session: Memory resets when conversation ends\n * - user: Memory persists per user across conversations\n * - shared: Memory is shared across all users\n */\nexport type MemoryStrategy = 'session' | 'user' | 'shared';\n/**\n * Agent definition schema\n */\nexport interface AgentDefinition {\n /** Unique agent name (kebab-case, e.g., 'support-assistant') */\n name: string;\n /** Human-readable description */\n description: string;\n /** System prompt defining agent behavior */\n systemPrompt: string;\n /** Agent type for UI hints */\n type?: 'conversational' | 'task';\n /** Integration IDs the agent can access */\n integrations?: string[];\n /** Entity names the agent can read/write */\n entities?: string[];\n /** Memory strategy */\n memoryStrategy?: MemoryStrategy;\n /** Custom tools for this agent */\n customTools?: AgentToolDefinition[];\n /** Default task instruction for task agents. Can be overridden per execution. */\n prompt?: string;\n /** Cost/time limits for task agent sandbox execution. Optional overrides. */\n executionLimits?: ExecutionLimits;\n}\n/**\n * Custom tool definition for agents\n */\nexport interface AgentToolDefinition {\n name: string;\n description: string;\n parameters: z.ZodObject<z.ZodRawShape>;\n execute: (args: Record<string, unknown>, context: AgentToolContext) => Promise<unknown>;\n}\n/**\n * Context passed to tool execution\n */\nexport interface AgentToolContext {\n env: Env;\n agentName: string;\n integrationClient: IntegrationClient;\n state: AgentState;\n}\n/**\n * Initial state for new agent instances\n */\nexport declare const INITIAL_AGENT_STATE: AgentState;\n/**\n * Agent registry - maps agent names to their definitions\n */\nexport type AgentRegistry = Record<string, AgentDefinition>;\n/**\n * Create an agent registry from an array of definitions.\n *\n * NOTE: This function is defensive against undefined/null inputs because it's called\n * at module-level in core-base-agent.ts. During Vite HMR, when files are being rewritten,\n * there's a race condition where APP_AGENTS may be undefined momentarily. Without\n * this guard, the worker crashes with \"definitions is not iterable\", which triggers\n * cascading HMR failures and eventually causes \"@cloudflare/vite-plugin\" to lose its\n * miniflare instance (\"Expected `miniflare` to be defined\" error).\n */\nexport declare function createAgentRegistry(definitions?: AgentDefinition[] | null): AgentRegistry;\n/**\n * Workspace agent registration request\n */\nexport interface RegisterAgentRequest {\n appId: string;\n appName: string;\n agentName: string;\n description: string;\n type: 'conversational' | 'task';\n integrations: string[];\n entities: string[];\n tools?: AgentToolMeta[];\n systemPrompt?: string;\n prompt?: string;\n executionLimits?: ExecutionLimits;\n}\n/**\n * Tool metadata for API responses (JSON-serializable, no Zod)\n */\nexport interface AgentToolMeta {\n name: string;\n description: string;\n source: 'entity' | 'integration' | 'custom';\n sourceId?: string;\n parameters: {\n type: 'object';\n properties: Record<string, {\n type: string;\n description?: string;\n }>;\n required?: string[];\n };\n}\n/**\n * Tool definition with Zod schema (for buildTools)\n */\nexport interface AgentToolDef {\n name: string;\n description: string;\n source: 'entity' | 'integration' | 'custom';\n sourceId?: string;\n parameters: z.ZodObject<z.ZodRawShape>;\n}\n/** Zod schema for entity list tool */\nexport declare const entityListSchema: z.ZodObject<{\n limit: z.ZodOptional<z.ZodNumber>;\n cursor: z.ZodOptional<z.ZodString>;\n}, \"strip\", z.ZodTypeAny, {\n cursor?: string | undefined;\n limit?: number | undefined;\n}, {\n cursor?: string | undefined;\n limit?: number | undefined;\n}>;\n/** Zod schema for entity get tool */\nexport declare const entityGetSchema: z.ZodObject<{\n id: z.ZodString;\n}, \"strip\", z.ZodTypeAny, {\n id: string;\n}, {\n id: string;\n}>;\n/**\n * Get tool definitions for entity access\n */\nexport declare function getEntityToolDefs(entities: string[]): AgentToolDef[];\n/** Zod schema for integration API tool */\nexport declare const integrationApiSchema: z.ZodObject<{\n method: z.ZodDefault<z.ZodEnum<[\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\"]>>;\n endpoint: z.ZodString;\n data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;\n}, \"strip\", z.ZodTypeAny, {\n method: \"POST\" | \"GET\" | \"PUT\" | \"PATCH\" | \"DELETE\";\n endpoint: string;\n data?: Record<string, unknown> | undefined;\n}, {\n endpoint: string;\n data?: Record<string, unknown> | undefined;\n method?: \"POST\" | \"GET\" | \"PUT\" | \"PATCH\" | \"DELETE\" | undefined;\n}>;\n/**\n * Get tool definitions for integration access\n */\nexport declare function getIntegrationToolDefs(integrations: string[]): AgentToolDef[];\n/**\n * Get tool definitions from custom tools (extracts metadata from AgentToolDefinition)\n */\nexport declare function getCustomToolDefs(customTools: AgentToolDefinition[]): AgentToolDef[];\n/**\n * Get all tool definitions for an agent\n */\nexport declare function getAgentToolDefs(agent: AgentDefinition): AgentToolDef[];\n/**\n * Convert tool definition to JSON-serializable metadata\n */\nexport declare function toolDefToMeta(def: AgentToolDef): AgentToolMeta;\n/**\n * Get all tool metadata for an agent (JSON-serializable)\n * Use this for API responses and workspace registration\n */\nexport declare function getAgentToolMeta(agent: AgentDefinition): AgentToolMeta[];\n/**\n * Tool availability status at runtime\n */\nexport interface AgentToolStatus {\n name: string;\n source: 'entity' | 'integration' | 'custom';\n sourceId?: string;\n available: boolean;\n reason?: string;\n}\n/**\n * Integration connection status\n */\nexport interface IntegrationStatus {\n id: string;\n connected: boolean;\n reason?: string;\n}\n/**\n * Agent runtime status - actual availability of capabilities\n */\nexport interface AgentRuntimeStatus {\n /** Agent name */\n name: string;\n /** Whether agent definition was found */\n initialized: boolean;\n /** Integration connection status */\n integrations: IntegrationStatus[];\n /** Tool availability status */\n tools: AgentToolStatus[];\n /** AI proxy configured */\n aiProxyConfigured: boolean;\n /** Timestamp of status check */\n checkedAt: number;\n}\nimport type { Hono } from 'hono';\n/**\n * Mount agent routes on the Hono app\n * Provides REST API for AI agent interactions\n */\nexport declare function agentRoutes(app: Hono<{\n Bindings: Env;\n}>): void;\n",
|
|
5
|
+
"core-base-agent.d.ts": "/**\n * Base Agent - Durable Object for AI Agents\n * DO NOT MODIFY THIS FILE - You may break the agent functionality\n *\n * This is the Durable Object class for AI agents built on Cloudflare's Agents SDK.\n * It extends AIChatAgent which provides:\n * - WebSocket connection handling\n * - Message persistence (SQLite)\n * - Streaming response resumption\n * - State management\n *\n * LLM calls go through runwork's AI proxy, which:\n * - Handles API keys securely (no keys in vibe-app)\n * - Provides analytics, caching, and rate limiting via AI Gateway\n * - Supports multiple providers (OpenAI, Anthropic, etc.)\n *\n * Agent definitions are loaded from the APP_AGENTS registry based on\n * the agent name stored in the DO's storage.\n */\nimport { AIChatAgent } from 'agents/ai-chat-agent';\nimport { type StreamTextOnFinishCallback, type ToolSet } from 'ai';\nimport { type Env } from './core-utils';\nimport { type AgentDefinition, type AgentRuntimeStatus } from './core-agent';\n/**\n * BaseAgent - The Durable Object for all agents\n *\n * This class extends AIChatAgent directly, which means:\n * - The class itself IS the Durable Object (not wrapped in another DO)\n * - AIChatAgent handles WebSocket connections, message persistence, and streaming\n * - We implement onChatMessage() to process incoming messages using the AI SDK\n *\n * Agent instances are identified by DO ID format: \"{agentName}:{sessionId}\"\n */\nexport declare class BaseAgent extends AIChatAgent<Env> {\n private definition;\n private integrationClient;\n private agentName;\n /**\n * Called when the agent starts (on first request or after hibernation)\n * Load the agent definition from storage\n */\n onStart(): Promise<void>;\n /**\n * Set the agent name and load its definition\n * Called when initializing a new agent instance\n */\n setAgentName(name: string): Promise<void>;\n /**\n * Handle incoming chat messages using AI SDK\n * This is the main entry point called by AIChatAgent when a message arrives\n */\n onChatMessage(onFinish: StreamTextOnFinishCallback<ToolSet>): Promise<Response>;\n /**\n * Build tools from agent definition using AI SDK tool() helper\n */\n private buildTools;\n /**\n * Build tools for accessing integrations using AI SDK tool() helper\n * Uses shared definitions from core-agent.ts, wraps with executors\n * @param integrations - List of integration IDs to build tools for\n */\n private buildIntegrationTools;\n /**\n * Build tools for accessing entities using AI SDK tool() helper\n * Uses entity classes directly with EntityContext\n */\n private buildEntityTools;\n /**\n * Build tools for running complex tasks via a sandboxed AI sub-agent\n */\n private buildCodeExecutionTools;\n /**\n * Get integration client (lazy-loaded)\n */\n private getIntegrationClient;\n /**\n * Get tool execution context\n */\n private getToolContext;\n /**\n * Get the agent's name\n */\n getAgentName(): string | null;\n /**\n * Get the agent's definition\n */\n getDefinition(): AgentDefinition | null;\n /**\n * Get runtime status - actual availability of tools and integrations\n * This checks real connectivity, not just declared capabilities\n */\n getStatus(): Promise<AgentRuntimeStatus>;\n}\n",
|
|
6
6
|
"core-events.d.ts": "/**\n * Core Events\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides:\n * - emitEvent(): Fire-and-forget event emission to the workspace event stream\n * - flog(): Structured logging that outputs JSON to sandbox stdout\n *\n * Events appear in the workspace activity feed and channel views.\n * When running outside a workspace (standalone mode), calls are silently skipped.\n */\nexport interface EmitEventParams {\n type: string;\n entityType?: string;\n entityId?: string;\n summary: string;\n metadata?: Record<string, unknown>;\n}\ninterface EventEnv {\n WORKSPACE_API_URL?: string;\n WORKSPACE_API_KEY?: string;\n WORKSPACE_ID?: string;\n APP_ID?: string;\n APP_NAME?: string;\n DEPLOYMENT_MODE?: 'preview' | 'production';\n WorkspaceObject?: DurableObjectNamespace;\n}\n/**\n * Any context that supports waitUntil - compatible with both\n * ExecutionContext (Hono route handlers) and DurableObjectState (DOs).\n */\ntype WaitUntilContext = Pick<ExecutionContext, 'waitUntil'>;\n/**\n * Convert an app name to a kebab-case channel name.\n * \"My Cool App\" -> \"my-cool-app\"\n */\nexport declare function toChannelName(appName: string): string;\n/**\n * Structured log entry for sandbox stdout.\n * Outputs JSON with a consistent schema so the platform can parse and display\n * these entries in the observability timeline.\n */\nexport declare function flog(level: 'info' | 'warn' | 'error', system: string, message: string, data?: Record<string, unknown>): void;\n/**\n * Emit an event to the workspace unified event stream.\n * Fire-and-forget: uses ctx.waitUntil so it doesn't block the response.\n * Silently skips if workspace env vars are not configured (standalone mode).\n *\n * Automatically routes events to a channel derived from APP_NAME when available.\n */\nexport declare function emitEvent(ctx: WaitUntilContext, env: EventEnv, event: EmitEventParams): void;\nexport {};\n",
|
|
7
|
-
"
|
|
8
|
-
"core-
|
|
9
|
-
"
|
|
7
|
+
"agents.d.ts": "export { INITIAL_AGENT_STATE, createAgentRegistry, getEntityToolDefs, getIntegrationToolDefs, getCustomToolDefs, getAgentToolDefs, toolDefToMeta, getAgentToolMeta, agentRoutes, entityListSchema, entityGetSchema, integrationApiSchema, } from './core-agent';\nexport type { AgentState, AgentMessage, MemoryStrategy, AgentDefinition, AgentToolDefinition, AgentToolContext, AgentRegistry, RegisterAgentRequest, AgentToolMeta, AgentToolDef, AgentToolStatus, IntegrationStatus, AgentRuntimeStatus, } from './core-agent';\nexport { BaseAgent } from './core-base-agent';\n",
|
|
8
|
+
"core-components.d.ts": "/**\n * Core Component Routes\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides:\n * 1. Component manifest API at /api/components/manifest.json\n * 2. Auto-mounting of backend Hono handlers from worker/components/\n *\n * Frontend component pages live in src/pages/components/ and are served\n * by the SPA via React Router (no Worker routing needed).\n */\nimport type { Hono } from 'hono';\nimport type { Env } from './core-utils';\n/**\n * Mount component routes on the Hono app.\n * - Serves manifest at /api/components/manifest.json\n * - Auto-mounts backend handlers at /api/components/{path}/*\n */\nexport declare function componentRoutes(app: Hono<{\n Bindings: Env;\n}>): void;\n",
|
|
9
|
+
"types.d.ts": "export type { ApiResponse, NangoActionResponse, NangoProxyOptions, FileMetadata, UploadOptions, DownloadOptions, ListFilesOptions, ListFilesResult, PresignedUrlRequest, PresignedUrlResponse, } from './shared/core-types';\n",
|
|
10
|
+
"channels.d.ts": "export { postToChannel } from './core-channels';\nexport type { PostToChannelParams } from './core-channels';\n",
|
|
11
|
+
"task-delegation.d.ts": "export { agentTaskToolSchema, runAgentTask, getAgentTaskStatus } from './task-delegation/index';\nexport type { AgentTaskResult, AgentTaskInputFile, AgentTaskOutputFile, AgentTaskUsage, ExecutionLimits, AgentTaskExecution, RunAgentTaskOptions, } from './task-delegation/types';\n",
|
|
10
12
|
"app-registry.d.ts": "/**\n * App Registry - Global registration point for user-defined application code.\n *\n * Framework core files call the getRegistered*() functions to access user code\n * instead of importing directly from user files. This enables the framework\n * to be distributed as an npm package while still accessing user-defined\n * agents, entities, routes, etc.\n *\n * Users register their code via createApp() which calls setAppConfig() internally.\n */\nimport type { AgentDefinition } from './core-agent';\nimport type { EntityClass } from './core-entities';\nimport type { ScheduledJob } from './core-scheduler';\nimport type { WorkflowDefinition } from './core-workflow-types';\nimport type { EndpointDefinition } from './core-endpoints';\nimport type { IntegrationRequirement } from './core-integrations';\nimport type { Hono } from 'hono';\nimport type { Env } from './core-utils';\n/** Component metadata for workspace registration */\nexport interface ComponentMetadata {\n tag: string;\n description?: string;\n attributes?: Record<string, string>;\n}\n/** Component definition for registerable UI components */\nexport interface ComponentDefinition {\n name: string;\n title: string;\n description?: string;\n chatId?: string;\n frontend: boolean;\n backend: boolean;\n metadata: ComponentMetadata;\n}\n/** A user-defined route function or an EndpointDefinition */\nexport type AppRoute = (app: Hono<{\n Bindings: Env;\n}>) => void;\nexport type RouteEntry = AppRoute | EndpointDefinition;\n/**\n * Configuration for all registerable application features.\n */\nexport interface AppConfig {\n agents: AgentDefinition[];\n entities: Array<EntityClass<{\n id: string;\n }>>;\n routes: RouteEntry[];\n endpoints: EndpointDefinition[];\n workflows: WorkflowDefinition[];\n schedules: ScheduledJob[];\n integrationRequirements: IntegrationRequirement[];\n components: ComponentDefinition[];\n}\n/**\n * Store the app configuration. Called internally by createApp().\n * Should not be called directly by user code.\n */\nexport declare function setAppConfig(config: AppConfig): void;\n/**\n * Retrieve the full app configuration.\n * Throws if createApp() has not been called yet.\n */\nexport declare function getAppConfig(): AppConfig;\nexport declare function getRegisteredAgents(): AgentDefinition[];\nexport declare function getRegisteredEntities(): Array<EntityClass<{\n id: string;\n}>>;\nexport declare function getRegisteredRoutes(): RouteEntry[];\nexport declare function getRegisteredEndpoints(): EndpointDefinition[];\nexport declare function getRegisteredWorkflows(): WorkflowDefinition[];\nexport declare function getRegisteredSchedules(): ScheduledJob[];\nexport declare function getRegisteredIntegrationRequirements(): IntegrationRequirement[];\nexport declare function getRegisteredComponents(): ComponentDefinition[];\n",
|
|
11
|
-
"core-agent.d.ts": "/**\n * Core Agent Types and Utilities\n * DO NOT MODIFY THIS FILE - You may break the agent functionality\n *\n * This module provides types and utilities for AI agents.\n * The actual agent implementation is in core-base-agent.ts.\n *\n * @example\n * ```typescript\n * // In agents.ts\n * import type { AgentDefinition } from './core-agent';\n *\n * const supportAgent: AgentDefinition = {\n * name: 'support-assistant',\n * description: 'Helps users with common questions',\n * systemPrompt: 'You are a helpful support assistant...',\n * integrations: ['slack', 'github'],\n * entities: ['ticket', 'user'],\n * };\n *\n * export const APP_AGENTS: AgentDefinition[] = [supportAgent];\n * ```\n */\nimport { z } from 'zod';\nimport type { Env } from './core-utils';\nimport type { IntegrationClient } from './core-integrations';\nimport type { ExecutionLimits } from './task-delegation/types';\n/**\n * Agent state persisted across conversations\n */\nexport interface AgentState {\n /** Conversation history */\n messages: AgentMessage[];\n /** Custom memory data */\n memory: Record<string, unknown>;\n /** Session metadata */\n sessionId: string;\n /** User identifier for per-user memory */\n userId?: string;\n /** Last activity timestamp */\n lastActivityAt: number;\n}\n/**\n * Message in agent conversation\n */\nexport interface AgentMessage {\n id: string;\n role: 'user' | 'assistant' | 'system' | 'tool';\n content: string;\n timestamp: number;\n toolCalls?: Array<{\n id: string;\n name: string;\n arguments: Record<string, unknown>;\n }>;\n toolResults?: Array<{\n id: string;\n result: unknown;\n }>;\n}\n/**\n * Memory strategy for agents\n * - session: Memory resets when conversation ends\n * - user: Memory persists per user across conversations\n * - shared: Memory is shared across all users\n */\nexport type MemoryStrategy = 'session' | 'user' | 'shared';\n/**\n * Agent definition schema\n */\nexport interface AgentDefinition {\n /** Unique agent name (kebab-case, e.g., 'support-assistant') */\n name: string;\n /** Human-readable description */\n description: string;\n /** System prompt defining agent behavior */\n systemPrompt: string;\n /** Agent type for UI hints */\n type?: 'conversational' | 'task';\n /** Integration IDs the agent can access */\n integrations?: string[];\n /** Entity names the agent can read/write */\n entities?: string[];\n /** Memory strategy */\n memoryStrategy?: MemoryStrategy;\n /** Custom tools for this agent */\n customTools?: AgentToolDefinition[];\n /** Default task instruction for task agents. Can be overridden per execution. */\n prompt?: string;\n /** Cost/time limits for task agent sandbox execution. Optional overrides. */\n executionLimits?: ExecutionLimits;\n}\n/**\n * Custom tool definition for agents\n */\nexport interface AgentToolDefinition {\n name: string;\n description: string;\n parameters: z.ZodObject<z.ZodRawShape>;\n execute: (args: Record<string, unknown>, context: AgentToolContext) => Promise<unknown>;\n}\n/**\n * Context passed to tool execution\n */\nexport interface AgentToolContext {\n env: Env;\n agentName: string;\n integrationClient: IntegrationClient;\n state: AgentState;\n}\n/**\n * Initial state for new agent instances\n */\nexport declare const INITIAL_AGENT_STATE: AgentState;\n/**\n * Agent registry - maps agent names to their definitions\n */\nexport type AgentRegistry = Record<string, AgentDefinition>;\n/**\n * Create an agent registry from an array of definitions.\n *\n * NOTE: This function is defensive against undefined/null inputs because it's called\n * at module-level in core-base-agent.ts. During Vite HMR, when files are being rewritten,\n * there's a race condition where APP_AGENTS may be undefined momentarily. Without\n * this guard, the worker crashes with \"definitions is not iterable\", which triggers\n * cascading HMR failures and eventually causes \"@cloudflare/vite-plugin\" to lose its\n * miniflare instance (\"Expected `miniflare` to be defined\" error).\n */\nexport declare function createAgentRegistry(definitions?: AgentDefinition[] | null): AgentRegistry;\n/**\n * Workspace agent registration request\n */\nexport interface RegisterAgentRequest {\n appId: string;\n appName: string;\n agentName: string;\n description: string;\n type: 'conversational' | 'task';\n integrations: string[];\n entities: string[];\n tools?: AgentToolMeta[];\n systemPrompt?: string;\n prompt?: string;\n executionLimits?: ExecutionLimits;\n}\n/**\n * Tool metadata for API responses (JSON-serializable, no Zod)\n */\nexport interface AgentToolMeta {\n name: string;\n description: string;\n source: 'entity' | 'integration' | 'custom';\n sourceId?: string;\n parameters: {\n type: 'object';\n properties: Record<string, {\n type: string;\n description?: string;\n }>;\n required?: string[];\n };\n}\n/**\n * Tool definition with Zod schema (for buildTools)\n */\nexport interface AgentToolDef {\n name: string;\n description: string;\n source: 'entity' | 'integration' | 'custom';\n sourceId?: string;\n parameters: z.ZodObject<z.ZodRawShape>;\n}\n/** Zod schema for entity list tool */\nexport declare const entityListSchema: z.ZodObject<{\n limit: z.ZodOptional<z.ZodNumber>;\n cursor: z.ZodOptional<z.ZodString>;\n}, \"strip\", z.ZodTypeAny, {\n cursor?: string | undefined;\n limit?: number | undefined;\n}, {\n cursor?: string | undefined;\n limit?: number | undefined;\n}>;\n/** Zod schema for entity get tool */\nexport declare const entityGetSchema: z.ZodObject<{\n id: z.ZodString;\n}, \"strip\", z.ZodTypeAny, {\n id: string;\n}, {\n id: string;\n}>;\n/**\n * Get tool definitions for entity access\n */\nexport declare function getEntityToolDefs(entities: string[]): AgentToolDef[];\n/** Zod schema for integration API tool */\nexport declare const integrationApiSchema: z.ZodObject<{\n method: z.ZodDefault<z.ZodEnum<[\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\"]>>;\n endpoint: z.ZodString;\n data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;\n}, \"strip\", z.ZodTypeAny, {\n method: \"POST\" | \"GET\" | \"PUT\" | \"PATCH\" | \"DELETE\";\n endpoint: string;\n data?: Record<string, unknown> | undefined;\n}, {\n endpoint: string;\n data?: Record<string, unknown> | undefined;\n method?: \"POST\" | \"GET\" | \"PUT\" | \"PATCH\" | \"DELETE\" | undefined;\n}>;\n/**\n * Get tool definitions for integration access\n */\nexport declare function getIntegrationToolDefs(integrations: string[]): AgentToolDef[];\n/**\n * Get tool definitions from custom tools (extracts metadata from AgentToolDefinition)\n */\nexport declare function getCustomToolDefs(customTools: AgentToolDefinition[]): AgentToolDef[];\n/**\n * Get all tool definitions for an agent\n */\nexport declare function getAgentToolDefs(agent: AgentDefinition): AgentToolDef[];\n/**\n * Convert tool definition to JSON-serializable metadata\n */\nexport declare function toolDefToMeta(def: AgentToolDef): AgentToolMeta;\n/**\n * Get all tool metadata for an agent (JSON-serializable)\n * Use this for API responses and workspace registration\n */\nexport declare function getAgentToolMeta(agent: AgentDefinition): AgentToolMeta[];\n/**\n * Tool availability status at runtime\n */\nexport interface AgentToolStatus {\n name: string;\n source: 'entity' | 'integration' | 'custom';\n sourceId?: string;\n available: boolean;\n reason?: string;\n}\n/**\n * Integration connection status\n */\nexport interface IntegrationStatus {\n id: string;\n connected: boolean;\n reason?: string;\n}\n/**\n * Agent runtime status - actual availability of capabilities\n */\nexport interface AgentRuntimeStatus {\n /** Agent name */\n name: string;\n /** Whether agent definition was found */\n initialized: boolean;\n /** Integration connection status */\n integrations: IntegrationStatus[];\n /** Tool availability status */\n tools: AgentToolStatus[];\n /** AI proxy configured */\n aiProxyConfigured: boolean;\n /** Timestamp of status check */\n checkedAt: number;\n}\nimport type { Hono } from 'hono';\n/**\n * Mount agent routes on the Hono app\n * Provides REST API for AI agent interactions\n */\nexport declare function agentRoutes(app: Hono<{\n Bindings: Env;\n}>): void;\n",
|
|
12
|
-
"core-channels.d.ts": "/**\n * Core Channels\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides:\n * - postToChannel(): Post rich markdown messages to workspace channels\n *\n * Channels are auto-created if they don't exist, with automatic app event filtering.\n * When running outside a workspace (standalone mode), calls are silently skipped.\n */\nexport interface PostToChannelParams {\n /** Channel name (e.g., \"#inventory-alerts\" or \"inventory-alerts\"). Auto-normalized: # stripped, lowercased, trimmed. */\n channel: string;\n /** Markdown message content */\n content: string;\n /** Optional structured metadata attached to the message */\n metadata?: Record<string, unknown>;\n}\ninterface ChannelEnv {\n WORKSPACE_API_URL?: string;\n WORKSPACE_API_KEY?: string;\n WORKSPACE_ID?: string;\n APP_ID?: string;\n APP_NAME?: string;\n DEPLOYMENT_MODE?: 'preview' | 'production';\n WorkspaceObject?: DurableObjectNamespace;\n}\n/**\n * Any context that supports waitUntil - compatible with both\n * ExecutionContext (Hono route handlers) and DurableObjectState (DOs).\n */\ntype WaitUntilContext = Pick<ExecutionContext, 'waitUntil'>;\n/**\n * Post a rich markdown message to a workspace channel.\n * Fire-and-forget: uses ctx.waitUntil so it doesn't block the response.\n * Silently skips if workspace env vars are not configured (standalone mode).\n *\n * Channels are auto-created on first use. The channel will automatically\n * include this app's system events via filter projection.\n */\nexport declare function postToChannel(ctx: WaitUntilContext, env: ChannelEnv, params: PostToChannelParams): void;\nexport {};\n",
|
|
13
13
|
"components.d.ts": "export { componentRoutes } from './core-components';\n",
|
|
14
|
-
"
|
|
15
|
-
"workspace.d.ts": "export { WorkspaceContext, getWorkspaceContext, listWorkspaceEntity, getWorkspaceEntity, createWorkspaceEntity, updateWorkspaceEntity, deleteWorkspaceEntity, initializeWorkspace, } from './core-workspace';\nexport type { WorkspaceUser, ListUsersOptions, ListUsersResponse, NotifyUserParams, NotifyUserResult, ListEntityRequest, ListEntityResponse, GetEntityRequest, CreateEntityRequest, UpdateEntityRequest, DeleteEntityRequest, RegisterEntityRequest, RegisterAppRequest, RegisterComponentRequest, RegisterScheduleRequest, RegisterWorkflowRequest, RegisterEndpointRequest, RegisterIntegrationRequest, RegisterAgentRequest as WorkspaceRegisterAgentRequest, } from './core-workspace';\n",
|
|
16
|
-
"entities.d.ts": "export { entityRegistry, registerEntity, registerEntities, EntityBase, Entity, entityRoutes, } from './core-entities';\nexport type { EntityDOStub, EntityContext, ListOptions, PaginatedResult, EntityClass, Doc, EntityStatics, } from './core-entities';\nexport { EntityDO, SAFE_FIELD_NAME, QUERY_LIMITS, validateFieldName, escapeLikePattern } from './core-entity-do';\nexport { IntegrationEntity, isIntegrationEntity } from './core-integration-entities';\nexport type { OperationConfig, IntegrationEntityConfig, IntegrationEntityClass, } from './core-integration-entities';\n",
|
|
17
|
-
"agents.d.ts": "export { INITIAL_AGENT_STATE, createAgentRegistry, getEntityToolDefs, getIntegrationToolDefs, getCustomToolDefs, getAgentToolDefs, toolDefToMeta, getAgentToolMeta, agentRoutes, entityListSchema, entityGetSchema, integrationApiSchema, } from './core-agent';\nexport type { AgentState, AgentMessage, MemoryStrategy, AgentDefinition, AgentToolDefinition, AgentToolContext, AgentRegistry, RegisterAgentRequest, AgentToolMeta, AgentToolDef, AgentToolStatus, IntegrationStatus, AgentRuntimeStatus, } from './core-agent';\nexport { BaseAgent } from './core-base-agent';\n",
|
|
18
|
-
"core-workflow-cloudflare.d.ts": "/**\n * Cloudflare Workflows Implementation\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * @deprecated This module is DEPRECATED and kept for reference only.\n * Cloudflare Workflows do not support Workers for Platforms, so this code path\n * is no longer used. The native DO-based workflow engine is used instead.\n *\n * For active workflow implementation, see:\n * - core-workflow-instance.ts (WorkflowInstance DO)\n * - core-workflow-coordinator.ts (WorkflowCoordinator DO)\n * - core-workflows.ts (public API)\n */\nimport { WorkflowEntrypoint, WorkflowStep, WorkflowEvent } from 'cloudflare:workers';\nimport type { Env } from './core-utils';\nimport type { WorkflowResult, WorkflowStatus, WorkflowInstanceInfo, WorkflowDefinition, WorkflowLogger, WorkflowStatusResponse } from './core-workflow-types';\ntype WorkflowParams = {\n workflowName: string;\n params: Record<string, unknown>;\n};\n/**\n * WorkflowRunner - Single entrypoint for all user-defined workflows\n *\n * This class extends Cloudflare's WorkflowEntrypoint and dispatches to\n * the appropriate workflow handler based on the workflowName parameter.\n */\nexport declare class WorkflowRunner extends WorkflowEntrypoint<Env, WorkflowParams> {\n run(event: WorkflowEvent<WorkflowParams>, step: WorkflowStep): Promise<WorkflowResult>;\n}\n/**\n * WorkflowManager - Manages workflow state within a Durable Object\n *\n * Note: Actual workflow execution is handled by Cloudflare Workflows.\n * This manager tracks metadata and provides status APIs.\n */\nexport declare class WorkflowManager {\n private ctx;\n private env;\n private initialized;\n constructor(ctx: DurableObjectState, env: Env);\n /**\n * Initialize the workflow manager with workflow definitions\n */\n initialize(workflows: WorkflowDefinition[]): Promise<void>;\n /**\n * Record a workflow instance creation\n */\n recordInstanceCreated(instanceId: string, workflowName: string, params: Record<string, unknown>): Promise<void>;\n /**\n * Update instance status\n */\n updateInstanceStatus(instanceId: string, status: WorkflowStatus, result?: WorkflowResult, error?: string): Promise<void>;\n /**\n * Get instance info\n */\n getInstance(instanceId: string): Promise<WorkflowInstanceInfo | null>;\n /**\n * List instances with optional filters\n */\n listInstances(options?: {\n workflowName?: string;\n status?: WorkflowStatus;\n limit?: number;\n }): Promise<WorkflowInstanceInfo[]>;\n /**\n * Get status of all workflows\n */\n getStatus(): Promise<WorkflowStatusResponse>;\n /**\n * Send an event to a workflow instance.\n * Note: This stores the event for the workflow to pick up. The actual\n * event delivery depends on how the workflow binding is configured.\n */\n sendEvent(instanceId: string, eventType: string, payload: Record<string, unknown>): Promise<void>;\n}\n/**\n * Get the workflow manager instance for a DO\n * Used internally by workflow Durable Objects\n */\nexport declare function getWorkflowManager(ctx: DurableObjectState, env: Env): WorkflowManager;\n/**\n * Create a workflow logger instance\n */\nexport declare function createWorkflowLogger(workflowName: string, instanceId: string): WorkflowLogger;\nexport {};\n",
|
|
19
|
-
"core-workflows.d.ts": "/**\n * Core Workflow Framework - Public API\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides the public API for workflow operations.\n * Uses native DO-based engine (WorkflowCoordinator/WorkflowInstance).\n *\n * Implementation details:\n * - Types are defined in core-workflow-types.ts\n * - Native DO-based implementation is in core-workflow-instance.ts and core-workflow-coordinator.ts\n */\nimport type { Env } from './core-utils';\nexport type { WorkflowResult, WorkflowStatus, WorkflowInstanceInfo, WorkflowDefinition, WorkflowContext, WorkflowStepUtilities, StepOptions, WaitEventOptions, WorkflowLogger, WorkflowState, WorkflowStatusResponse, } from './core-workflow-types';\nimport type { WorkflowInstanceInfo } from './core-workflow-types';\n/**\n * Trigger a workflow by name with the given parameters.\n * This is a convenience function that creates a new workflow instance.\n *\n * @param env - The environment bindings\n * @param workflowName - The name of the workflow to trigger (must be defined in workflows.ts)\n * @param params - Parameters to pass to the workflow\n * @returns The instance ID of the created workflow\n *\n * @example\n * ```ts\n * const instanceId = await triggerWorkflow(ctx.env, 'order-fulfillment', {\n * orderId: '12345',\n * customerId: 'cust-001',\n * });\n * ```\n */\nexport declare function triggerWorkflow(env: Env, workflowName: string, params?: Record<string, unknown>): Promise<string>;\n/**\n * Send an event to a running workflow instance.\n * Use this to trigger workflows waiting on `step.waitForEvent()`.\n *\n * @param env - The environment bindings\n * @param instanceId - The workflow instance ID to send event to\n * @param eventType - The event type name (must match the name in waitForEvent)\n * @param payload - Data to send with the event\n *\n * @example\n * ```ts\n * // In an API endpoint handler\n * await sendWorkflowEvent(c.env, instanceId, 'approval-response', {\n * approved: true,\n * approvedBy: 'user123',\n * });\n * ```\n */\nexport declare function sendWorkflowEvent(env: Env, instanceId: string, eventType: string, payload?: Record<string, unknown>): Promise<void>;\n/**\n * Get the current status of a workflow instance.\n *\n * @param env - The environment bindings\n * @param instanceId - The workflow instance ID\n * @returns The workflow instance info or null if not found\n *\n * @example\n * ```ts\n * const status = await getWorkflowStatus(c.env, instanceId);\n * if (status?.status === 'completed') {\n * console.log('Workflow completed:', status.result);\n * }\n * ```\n */\nexport declare function getWorkflowStatus(env: Env, instanceId: string): Promise<WorkflowInstanceInfo | null>;\nimport type { Hono } from 'hono';\n/**\n * Mount workflow routes on the Hono app\n * Provides internal API for workflow management\n */\nexport declare function workflowRoutes(app: Hono<{\n Bindings: Env;\n}>): void;\n",
|
|
20
|
-
"integrations.d.ts": "export { IntegrationClient, createIntegrationClient, } from './core-integrations';\nexport type { IntegrationRequirement, NangoActionResponse, NangoProxyOptions, } from './core-integrations';\n",
|
|
14
|
+
"endpoints.d.ts": "export { isEndpointDefinition, jsonResponse, errorResponse, zodToJsonSchema, EndpointRouter, mountEndpointAsHonoRoute, handleEndpointRequest, EndpointError, endpointToRegistration, } from './core-endpoints';\nexport type { EndpointAuthType, EndpointMethod, EndpointSchema, EndpointContext, EndpointAuthInfo, EndpointLogger, EndpointMeta, EndpointDefinition, EndpointHandler, ParsedEndpointRequest, } from './core-endpoints';\n",
|
|
21
15
|
"core-ai.d.ts": "/**\n * Core AI Utilities\n *\n * Simple LLM helpers for vibe-apps. Provides generateText(), streamText(), and generateObject()\n * functions that work with the platform's AI proxy - no API keys needed.\n *\n * Uses the same AI proxy infrastructure as agents, but without the agent overhead.\n * Ideal for simple completion tasks, text analysis, and structured output generation.\n *\n * @example\n * ```typescript\n * import { generateText, streamText, generateObject } from './core-ai';\n *\n * // Simple completion\n * const result = await generateText(env, {\n * prompt: 'Summarize this: ...',\n * });\n * console.log(result.text);\n *\n * // Streaming\n * const stream = await streamText(env, {\n * prompt: 'Write a story about...',\n * });\n * for await (const chunk of stream.textStream) {\n * console.log(chunk);\n * }\n *\n * // Structured output\n * import { z } from 'zod';\n * const result = await generateObject(env, {\n * prompt: 'Extract entities from: ...',\n * schema: z.object({\n * people: z.array(z.string()),\n * places: z.array(z.string()),\n * }),\n * });\n * console.log(result.object);\n * ```\n */\nimport { type ModelMessage, type UserContent, type ToolSet, type ToolChoice } from 'ai';\nimport type { Hono } from 'hono';\nimport type { z } from 'zod';\nimport { type Env } from './core-utils';\nexport { tool, type ModelMessage, type ModelMessage as CoreMessage, type Tool, type ToolSet, type ToolChoice, type TextPart, type ImagePart, type FilePart, type UserContent, type DataContent, } from 'ai';\n/**\n * Message format for chat-style completions\n */\nexport interface ChatMessage {\n role: 'user' | 'assistant' | 'system';\n content: string;\n}\n/**\n * Call settings for LLM requests\n */\nexport interface AICallSettings {\n maxOutputTokens?: number;\n temperature?: number;\n topP?: number;\n topK?: number;\n presencePenalty?: number;\n frequencyPenalty?: number;\n stopSequences?: string[];\n seed?: number;\n maxRetries?: number;\n abortSignal?: AbortSignal;\n}\n/**\n * Options for text generation\n */\nexport interface GenerateTextOptions extends AICallSettings {\n /** Text prompt string, or content parts array for multimodal input (images, files) */\n prompt?: UserContent;\n /** Chat-style messages (alternative to prompt) - use for multi-turn or complex multimodal */\n messages?: Array<ChatMessage | ModelMessage>;\n /** System prompt for context/behavior */\n system?: string;\n /** Tools for function calling */\n tools?: ToolSet;\n /** How the model should choose which tool to use */\n toolChoice?: ToolChoice<ToolSet>;\n /** Maximum number of tool-use steps */\n maxSteps?: number;\n}\n/**\n * Options for streaming text generation (same parameters as GenerateTextOptions)\n */\nexport type StreamTextOptions = GenerateTextOptions;\n/**\n * Options for structured object generation\n */\nexport interface GenerateObjectOptions<T> extends Omit<AICallSettings, 'stopSequences'> {\n /** Text prompt string, or content parts array for multimodal input (images, files) */\n prompt?: UserContent;\n /** Chat-style messages (alternative to prompt) - use for multi-turn or complex multimodal */\n messages?: Array<ChatMessage | ModelMessage>;\n /** System prompt for context/behavior */\n system?: string;\n /** Zod schema for structured output */\n schema: z.ZodType<T>;\n}\n/**\n * Generate text completion using the AI proxy.\n *\n * @param env - Worker environment bindings\n * @param options - Generation options (prompt, messages, system)\n * @returns AI SDK result with text, usage stats, etc.\n *\n * @example\n * ```typescript\n * const result = await generateText(env, {\n * prompt: 'Explain quantum computing in simple terms',\n * });\n * console.log(result.text);\n * ```\n */\nexport declare function generateText(env: Env, options: GenerateTextOptions): Promise<import(\"ai\").GenerateTextResult<ToolSet, never>>;\n/**\n * Stream text generation using the AI proxy.\n *\n * @param env - Worker environment bindings\n * @param options - Generation options (prompt, messages, system)\n * @returns AI SDK streaming result with textStream, fullStream, etc.\n *\n * @example\n * ```typescript\n * const result = await streamText(env, {\n * prompt: 'Write a poem about the ocean',\n * });\n *\n * // Option 1: Iterate over text chunks\n * for await (const chunk of result.textStream) {\n * process.stdout.write(chunk);\n * }\n *\n * // Option 2: Return as HTTP streaming response\n * return result.toTextStreamResponse();\n * ```\n */\nexport declare function streamText(env: Env, options: StreamTextOptions): Promise<import(\"ai\").StreamTextResult<ToolSet, never>>;\n/**\n * Generate structured output (JSON) using the AI proxy.\n * Uses Zod schema for type-safe structured generation.\n *\n * @param env - Worker environment bindings\n * @param options - Generation options including Zod schema\n * @returns AI SDK result with typed object, usage stats, etc.\n *\n * @example\n * ```typescript\n * import { z } from 'zod';\n *\n * const result = await generateObject(env, {\n * prompt: 'Extract contact info from: John Smith, john@example.com, 555-1234',\n * schema: z.object({\n * name: z.string(),\n * email: z.string().email(),\n * phone: z.string().optional(),\n * }),\n * });\n * console.log(result.object); // { name: 'John Smith', email: 'john@example.com', phone: '555-1234' }\n * ```\n */\nexport declare function generateObject<T>(env: Env, options: GenerateObjectOptions<T>): Promise<import(\"ai\").GenerateObjectResult<(T extends string ? \"enum\" : \"object\") extends infer T_1 ? T_1 extends (T extends string ? \"enum\" : \"object\") ? T_1 extends \"array\" ? T[] : T : never : never>>;\n/**\n * Mount AI routes on the Hono app.\n * Provides /api/ai/generate and /api/ai/stream endpoints.\n */\nexport declare function aiRoutes(app: Hono<{\n Bindings: Env;\n}>): void;\n",
|
|
22
|
-
"core-workflow-types.d.ts": "/**\n * Workflow Types - Shared types for native workflow engine\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n */\nimport type { Env } from './core-utils';\nimport type { IntegrationClient } from './core-integrations';\nexport type NativeWorkflowStatus = 'pending' | 'running' | 'sleeping' | 'waiting' | 'paused' | 'completed' | 'failed' | 'cancelled' | 'timedOut';\nexport type NativeStepStatus = 'pending' | 'running' | 'completed' | 'failed' | 'skipped';\nexport type NativeStepType = 'do' | 'sleep' | 'sleepUntil' | 'waitEvent';\nexport interface NativeWorkflowError {\n code: string;\n message: string;\n stack?: string;\n retryable: boolean;\n}\nexport interface NativeStepAttempt {\n attemptNumber: number;\n startedAt: number;\n completedAt?: number;\n error?: NativeWorkflowError;\n}\nexport interface NativeStepExecution {\n id: string;\n name: string;\n type: NativeStepType;\n status: NativeStepStatus;\n input?: unknown;\n output?: unknown;\n error?: NativeWorkflowError;\n attempts: NativeStepAttempt[];\n maxRetries: number;\n startedAt?: number;\n completedAt?: number;\n timeoutMs?: number;\n sleepUntil?: number;\n eventType?: string;\n eventTimeoutAt?: number;\n}\nexport interface NativeWorkflowInstance {\n id: string;\n workflowName: string;\n status: NativeWorkflowStatus;\n input: unknown;\n output?: unknown;\n error?: NativeWorkflowError;\n createdAt: number;\n startedAt?: number;\n completedAt?: number;\n steps: NativeStepExecution[];\n currentStepId?: string;\n config: NativeWorkflowConfig;\n metadata?: Record<string, unknown>;\n}\nexport interface NativeWorkflowConfig {\n maxRetries: number;\n retryBackoffMs: number;\n stepTimeoutMs: number;\n workflowTimeoutMs: number;\n}\nexport declare const DEFAULT_WORKFLOW_CONFIG: NativeWorkflowConfig;\nexport interface NativeStepContext {\n /** Unique instance ID for this workflow execution */\n instanceId: string;\n /** Input passed when workflow was started */\n workflowInput: unknown;\n /** Results from previous steps */\n previousSteps: Record<string, {\n output: unknown;\n status: NativeStepStatus;\n }>;\n}\nexport interface WorkflowIndexEntry {\n instanceId: string;\n workflowName: string;\n status: NativeWorkflowStatus;\n createdAt: number;\n completedAt?: number;\n}\nexport interface ListWorkflowsOptions {\n workflowName?: string;\n status?: NativeWorkflowStatus;\n limit?: number;\n offset?: number;\n}\nexport interface ExecuteStepRequest {\n instanceId: string;\n stepId: string;\n stepName: string;\n workflowName: string;\n workflowInput: unknown;\n previousSteps: Record<string, {\n output: unknown;\n status: NativeStepStatus;\n }>;\n}\nexport interface ExecuteStepResponse {\n success: boolean;\n output?: unknown;\n error?: NativeWorkflowError;\n}\nexport interface PendingEvent {\n instanceId: string;\n stepId: string;\n eventType: string;\n waitingSince: number;\n timeoutAt?: number;\n}\nexport interface ReceivedEvent {\n type: string;\n payload: unknown;\n timestamp: number;\n}\n/**\n * Result returned by a workflow execution\n */\nexport interface WorkflowResult {\n success: boolean;\n [key: string]: unknown;\n}\n/**\n * Possible states of a workflow instance\n */\nexport type WorkflowStatus = 'queued' | 'running' | 'paused' | 'errored' | 'terminated' | 'complete' | 'waiting';\n/**\n * Information about a workflow instance\n */\nexport interface WorkflowInstanceInfo {\n id: string;\n workflowName: string;\n status: WorkflowStatus;\n params?: Record<string, unknown>;\n createdAt: number;\n startedAt?: number;\n completedAt?: number;\n error?: string;\n result?: WorkflowResult;\n}\n/**\n * Interface for WorkflowInstance DO stub methods\n * Used to type the DurableObjectStub without importing the class\n */\nexport interface WorkflowInstanceStub {\n create(workflowName: string, params: Record<string, unknown>, instanceId: string, config?: Partial<NativeWorkflowConfig>, metadata?: Record<string, unknown>): Promise<void>;\n getStatus(): Promise<NativeWorkflowInstance | null>;\n signal(eventType: string, payload: unknown): Promise<void>;\n pause(): Promise<void>;\n resume(): Promise<void>;\n cancel(): Promise<void>;\n}\n/**\n * Interface for WorkflowCoordinator DO stub methods\n * Used to type the DurableObjectStub without importing the class\n */\nexport interface WorkflowCoordinatorStub {\n create(workflowName: string, params: Record<string, unknown>, config?: Partial<NativeWorkflowConfig>, metadata?: Record<string, unknown>): Promise<string>;\n signal(instanceId: string, eventType: string, payload: unknown): Promise<void>;\n getInstanceInfo(instanceId: string): Promise<WorkflowInstanceInfo | null>;\n listInstances(options?: ListWorkflowsOptions): Promise<WorkflowInstanceInfo[]>;\n updateIndex(instanceId: string, workflowName: string, status: NativeWorkflowStatus): Promise<void>;\n pause(instanceId: string): Promise<void>;\n resume(instanceId: string): Promise<void>;\n cancel(instanceId: string): Promise<void>;\n}\n/**\n * Definition for a workflow handler\n */\nexport interface WorkflowDefinition<TParams = unknown, TResult = unknown> {\n /** Unique name for this workflow (kebab-case, e.g., \"order-fulfillment\") */\n name: string;\n /** Human-readable description of what this workflow does */\n description?: string;\n /** The workflow handler function */\n handler: (ctx: WorkflowContext<TParams>) => Promise<TResult>;\n /** Whether the workflow is enabled (default: true) */\n enabled?: boolean;\n}\n/**\n * Context passed to workflow handlers\n */\nexport interface WorkflowContext<TParams = unknown> {\n /** Environment bindings */\n env: Env;\n /** Unique instance ID for this workflow execution */\n instanceId: string;\n /** Parameters passed when workflow was started */\n params: TParams;\n /** Step utilities for durable execution */\n step: WorkflowStepUtilities;\n /** Integration client for external service calls */\n integrations: IntegrationClient;\n /** Logger for structured workflow logging */\n logger: WorkflowLogger;\n}\n/**\n * Step utilities for durable workflow execution\n */\nexport interface WorkflowStepUtilities {\n /** Execute a step with automatic retry and persistence */\n do<T>(name: string, fn: () => Promise<T>): Promise<T>;\n do<T>(name: string, options: StepOptions, fn: () => Promise<T>): Promise<T>;\n /** Sleep for a duration (e.g., '5 minutes', '1 hour', '24 hours') */\n sleep(name: string, duration: string): Promise<void>;\n /** Sleep until a specific timestamp */\n sleepUntil(name: string, timestamp: Date): Promise<void>;\n /** Wait for an external event */\n waitForEvent<T = unknown>(name: string, options?: WaitEventOptions): Promise<T>;\n}\n/**\n * Options for step execution\n */\nexport interface StepOptions {\n retries?: {\n limit: number;\n delay: string;\n backoff?: 'constant' | 'linear' | 'exponential';\n };\n timeout?: string;\n}\n/**\n * Options for waitForEvent\n */\nexport interface WaitEventOptions {\n type?: string;\n timeout?: string;\n}\n/**\n * Logger interface for workflow execution\n */\nexport interface WorkflowLogger {\n info(message: string, data?: Record<string, unknown>): void;\n warn(message: string, data?: Record<string, unknown>): void;\n error(message: string, data?: Record<string, unknown>): void;\n}\n/**\n * State of a registered workflow\n */\nexport interface WorkflowState {\n name: string;\n description?: string;\n enabled: boolean;\n activeInstances: number;\n totalRuns: number;\n lastRun: number | null;\n lastError?: string;\n}\n/**\n * Response from workflow status API\n */\nexport interface WorkflowStatusResponse {\n workflows: WorkflowState[];\n}\n",
|
|
23
16
|
"core-entities.d.ts": "/**\n * Core Entity System\n * DO NOT MODIFY THIS FILE - You may break the entity functionality\n *\n * This module provides:\n * - EntityContext: Unified context for all entity operations\n * - EntityClass: Interface that all entity types implement\n * - EntityBase: Base class with instance methods for state management\n * - Entity: Local storage-backed entity class (replaces IndexedEntity)\n */\nimport type { IntegrationClient } from './core-integrations';\nexport interface EntityDOStub {\n getDoc<T>(key: string): Promise<{\n v: number;\n data: T;\n } | null>;\n casPut<T>(key: string, expectedV: number, data: T): Promise<{\n ok: boolean;\n v: number;\n }>;\n del(key: string): Promise<boolean>;\n has(key: string): Promise<boolean>;\n bulkCreate(items: Array<{\n key: string;\n data: unknown;\n }>): Promise<Array<{\n key: string;\n v: number;\n data: unknown;\n }>>;\n bulkUpdate(updates: Array<{\n key: string;\n data: Record<string, unknown>;\n }>): Promise<Array<{\n key: string;\n ok: boolean;\n v: number;\n data: unknown;\n }>>;\n bulkDelete(keys: string[]): Promise<number>;\n queryEntities(options?: {\n limit?: number;\n offset?: number;\n cursor?: string | null;\n filters?: Record<string, unknown>;\n search?: {\n query: string;\n fields: string[];\n };\n sort?: {\n field: string;\n order: 'asc' | 'desc';\n };\n }): Promise<{\n items: Array<{\n key: string;\n v: number;\n data: unknown;\n }>;\n total: number;\n hasMore: boolean;\n next: string | null;\n }>;\n countEntities(filters?: Record<string, unknown>): Promise<number>;\n exportAll(): Promise<Array<{\n key: string;\n v: number;\n data: unknown;\n }>>;\n importAll(items: Array<{\n key: string;\n v: number;\n data: unknown;\n }>): Promise<{\n imported: number;\n }>;\n}\nimport type { Env } from './core-utils';\n/**\n * EntityContext - Unified context for all entity operations\n * Both Entity and IntegrationEntity use this same context type\n */\nexport interface EntityContext {\n env: Env;\n client?: IntegrationClient;\n}\n/**\n * Options for list operations\n */\nexport interface ListOptions {\n limit?: number;\n offset?: number;\n cursor?: string | null;\n filters?: Record<string, unknown>;\n search?: {\n query: string;\n fields: string[];\n };\n sort?: {\n field: string;\n order: 'asc' | 'desc';\n };\n}\n/**\n * Paginated result from list operations\n */\nexport interface PaginatedResult<T> {\n items: T[];\n total: number;\n next: string | null;\n hasMore: boolean;\n}\n/**\n * EntityClass - Unified interface for ALL entity types\n *\n * Both Entity (local storage) and IntegrationEntity (external API) implement this.\n * All static CRUD methods take ctx as the first parameter for consistency.\n */\nexport interface EntityClass<T extends {\n id: string;\n}> {\n readonly entityName: string;\n readonly schema?: Record<string, unknown>;\n list(ctx: EntityContext, options?: ListOptions): Promise<PaginatedResult<T>>;\n get(ctx: EntityContext, id: string): Promise<T | null>;\n create(ctx: EntityContext, data: Partial<T>): Promise<T>;\n update(ctx: EntityContext, id: string, data: Partial<T>): Promise<T>;\n delete(ctx: EntityContext, id: string): Promise<void>;\n}\n/**\n * Type-safe entity registry\n * Maps entity names to their class implementations\n */\nexport declare const entityRegistry: Map<string, EntityClass<{\n id: string;\n}>>;\n/**\n * Register an entity class with the registry\n */\nexport declare function registerEntity<T extends {\n id: string;\n}>(entityClass: EntityClass<T>): void;\n/**\n * Register multiple entity classes at once\n */\nexport declare function registerEntities(classes: readonly EntityClass<{\n id: string;\n}>[]): void;\nexport type Doc<T> = {\n v: number;\n data: T;\n};\nexport interface EntityStatics<S, T extends EntityBase<S>> {\n new (env: Env, id: string): T;\n readonly entityName: string;\n readonly initialState: S;\n}\n/**\n * EntityBase - Internal base class with instance methods for state management\n *\n * Provides CAS-based (Compare-And-Swap) state mutations for optimistic concurrency.\n * Extended by Entity class which adds static CRUD methods.\n */\nexport declare abstract class EntityBase<State> {\n protected _state: State;\n protected _version: number;\n protected readonly stub: EntityDOStub;\n protected readonly _id: string;\n protected readonly entityName: string;\n protected readonly env: Env;\n constructor(env: Env, id: string);\n get id(): string;\n get state(): State;\n protected key(): string;\n save(next: State): Promise<void>;\n protected ensureState(): Promise<State>;\n mutate(updater: (current: State) => State): Promise<State>;\n getState(): Promise<State>;\n patch(p: Partial<State>): Promise<void>;\n exists(): Promise<boolean>;\n delete(): Promise<boolean>;\n}\ntype EntityState<T> = T extends new (env: Env, id: string) => Entity<infer S> ? S : never;\ntype EntityCtor = new (env: Env, id: string) => Entity<{\n id: string;\n}>;\ntype EntityCtorStatic<TCtor> = TCtor & {\n entityName: string;\n keyOf(state: EntityState<TCtor>): string;\n seedData?: ReadonlyArray<EntityState<TCtor>>;\n};\n/**\n * Entity - Local storage-backed entity class\n *\n * Implements the unified EntityClass interface for local DO-backed storage.\n * All methods take EntityContext as the first parameter.\n *\n * @example\n * ```typescript\n * export class TodoEntity extends Entity<Todo> {\n * static readonly entityName = 'Todo';\n * static readonly initialState: Todo = { id: '', title: '', completed: false };\n * }\n *\n * // Usage:\n * const ctx = { env };\n * const todos = await TodoEntity.list(ctx, { limit: 50 });\n * const todo = await TodoEntity.get(ctx, 'todo-123');\n * await TodoEntity.create(ctx, { title: 'New task' });\n * ```\n */\nexport declare abstract class Entity<S extends {\n id: string;\n}> extends EntityBase<S> {\n static readonly entityName: string;\n static readonly schema?: Record<string, unknown>;\n static keyOf<U extends {\n id: string;\n }>(state: U): string;\n /**\n * List entities with server-side filtering, search, sort, and pagination.\n * All query operations run in SQL via EntityDO.queryEntities().\n */\n static list<TCtor extends EntityCtor>(this: EntityCtorStatic<TCtor>, ctx: EntityContext, options?: ListOptions): Promise<PaginatedResult<EntityState<TCtor>>>;\n /**\n * Get a single entity by ID\n */\n static get<TCtor extends EntityCtor>(this: EntityCtorStatic<TCtor>, ctx: EntityContext, id: string): Promise<EntityState<TCtor> | null>;\n /**\n * Count entities with optional filters\n */\n static count<TCtor extends EntityCtor>(this: EntityCtorStatic<TCtor>, ctx: EntityContext, filters?: Record<string, unknown>): Promise<number>;\n /**\n * Create a new entity\n */\n static create<TCtor extends EntityCtor>(this: EntityCtorStatic<TCtor>, ctx: EntityContext, data: Partial<EntityState<TCtor>>): Promise<EntityState<TCtor>>;\n /**\n * Update an existing entity (throws if missing)\n */\n static update<TCtor extends EntityCtor>(this: EntityCtorStatic<TCtor>, ctx: EntityContext, id: string, data: Partial<EntityState<TCtor>>): Promise<EntityState<TCtor>>;\n /**\n * Delete an entity\n */\n static delete<TCtor extends EntityCtor>(this: EntityCtorStatic<TCtor>, ctx: EntityContext, id: string): Promise<void>;\n /**\n * Ensure seed data exists (for initial data population)\n */\n static ensureSeed<TCtor extends EntityCtor>(this: EntityCtorStatic<TCtor>, ctx: EntityContext): Promise<void>;\n /**\n * Create multiple entities in a single RPC call to the DO.\n * Generates UUIDs for items without an id. Returns all created items.\n */\n static createMany<TCtor extends EntityCtor>(this: EntityCtorStatic<TCtor>, ctx: EntityContext, dataArray: Partial<EntityState<TCtor>>[]): Promise<EntityState<TCtor>[]>;\n /**\n * Update multiple entities in a single RPC call to the DO.\n * Each update must include an id. Throws if any items are not found.\n */\n static updateMany<TCtor extends EntityCtor>(this: EntityCtorStatic<TCtor>, ctx: EntityContext, updates: (Partial<EntityState<TCtor>> & {\n id: string;\n })[]): Promise<EntityState<TCtor>[]>;\n /**\n * Delete multiple entities in a single RPC call to the DO.\n * Returns the count of items that actually existed and were deleted.\n */\n static deleteMany<TCtor extends EntityCtor>(this: EntityCtorStatic<TCtor>, ctx: EntityContext, ids: string[]): Promise<number>;\n protected ensureState(): Promise<S>;\n}\nimport type { Hono } from 'hono';\n/**\n * Mount entity routes on the Hono app\n * Provides internal API for entity CRUD from workspace (cross-app operations)\n */\nexport declare function entityRoutes(app: Hono<{\n Bindings: Env;\n}>): void;\nexport {};\n",
|
|
24
|
-
"
|
|
25
|
-
"core-
|
|
17
|
+
"test-entry.d.ts": "/**\n * Test Entry Point\n *\n * Minimal entry point for vitest-pool-workers that exports only\n * the DOs needed for testing, avoiding dependencies that don't work in\n * the miniflare test environment (agents, ai SDK, MCP, etc.)\n */\nexport { EntityDO } from './core-entity-do';\nexport { SchedulerDO } from './core-scheduler';\nexport declare class BaseAgent {\n state: DurableObjectState;\n env: unknown;\n constructor(state: DurableObjectState, env: unknown);\n fetch(_request: Request): Promise<Response>;\n}\nexport { WorkflowInstanceDO } from './core-workflow-instance';\nexport { WorkflowCoordinator } from './core-workflow-coordinator';\ndeclare const _default: {\n fetch(_request: Request): Promise<Response>;\n};\nexport default _default;\n",
|
|
18
|
+
"core-routes.d.ts": "/**\n * Core Platform Routes\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module orchestrates core API routes for platform features.\n * Each feature exposes its own routes in its respective core-* file.\n * These routes are mounted before user-defined routes in index.ts.\n */\nimport { type Env } from './core-utils';\nimport { Hono } from 'hono';\nexport interface ClientErrorReport {\n message: string;\n url: string;\n userAgent?: string;\n timestamp: string;\n stack?: string;\n componentStack?: string;\n errorBoundary?: boolean;\n errorBoundaryProps?: Record<string, unknown>;\n source?: string;\n lineno?: number;\n colno?: number;\n error?: unknown;\n level?: 'error' | 'warning' | 'info';\n category?: string;\n}\n/**\n * Mount all core platform routes on the Hono app\n * Called from index.ts before user-defined routes\n */\nexport declare function setupRoutes(): Hono<{\n Bindings: Env;\n}, import(\"hono/types\").BlankSchema, \"/\">;\n",
|
|
19
|
+
"scheduler.d.ts": "export { parseCronExpression, calculateNextRun, SchedulerDO, initializeScheduler, schedulerRoutes, } from './core-scheduler';\nexport type { ScheduledJob, JobContext, JobResult, JobLogger, JobRunRecord, ScheduleState, SchedulerRegistry, ScheduleStatusResponse, } from './core-scheduler';\n",
|
|
20
|
+
"core-workflow-config.d.ts": "/**\n * Workflow Configuration\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This platform uses native DO-based workflows exclusively.\n * Cloudflare Workflows mode was removed because CF Workflows\n * do not support Workers for Platforms.\n *\n * For workflow implementation, see:\n * - core-workflow-instance.ts (WorkflowInstance DO)\n * - core-workflow-coordinator.ts (WorkflowCoordinator DO)\n * - core-workflows.ts (public API)\n */\n/**\n * Workflow infrastructure mode - always 'native'.\n * Kept for backward compatibility.\n */\nexport declare const WORKFLOW_INFRA_MODE: \"native\";\n",
|
|
21
|
+
"core-scheduler.d.ts": "/**\n * Core Scheduled Jobs Framework\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides the infrastructure for scheduled background jobs\n * using a dedicated Cloudflare Durable Object (SchedulerDO).\n *\n * SchedulerDO is a standalone Durable Object that:\n * - Owns its own storage for job metadata and history\n * - Handles alarm-based job scheduling\n * - Provides job management (pause, resume, trigger)\n *\n * Job handlers receive JobContext which includes env for entity access.\n */\nimport { DurableObject } from 'cloudflare:workers';\nimport { type Env } from './core-utils';\nexport interface ScheduledJob {\n /** Unique name for this job (kebab-case, e.g., \"daily-cleanup\") */\n name: string;\n /** Cron expression (e.g., \"0 0 * * *\" for daily at midnight UTC) */\n schedule: string;\n /** Human-readable description of what this job does */\n description?: string;\n /** The handler function to execute */\n handler: (ctx: JobContext) => Promise<JobResult>;\n /** Whether the job is enabled (default: true) */\n enabled?: boolean;\n}\nexport interface JobContext {\n /** Environment bindings */\n env: Env;\n /** Name of the job being executed */\n jobName: string;\n /** Unique ID for this execution run */\n runId: string;\n /** When this job was scheduled to run */\n scheduledAt: Date;\n /** Logger for structured job logging */\n logger: JobLogger;\n}\nexport interface JobResult {\n /** Whether the job completed successfully */\n success: boolean;\n /** Additional result data (varies by job) */\n [key: string]: unknown;\n}\nexport interface JobLogger {\n info(message: string, data?: Record<string, unknown>): void;\n warn(message: string, data?: Record<string, unknown>): void;\n error(message: string, data?: Record<string, unknown>): void;\n}\nexport interface JobRunRecord {\n id: string;\n jobName: string;\n status: 'running' | 'completed' | 'failed';\n scheduledAt: number;\n startedAt: number;\n completedAt?: number;\n result?: JobResult;\n error?: string;\n}\nexport interface ScheduleState {\n name: string;\n schedule: string;\n description?: string;\n enabled: boolean;\n lastRun: number | null;\n nextRun: number;\n lastError?: string;\n}\nexport interface SchedulerRegistry {\n schedules: Record<string, ScheduleState>;\n initialized: boolean;\n}\nexport interface ScheduleStatusResponse {\n schedules: Array<{\n name: string;\n schedule: string;\n description?: string;\n enabled: boolean;\n lastRun: number | null;\n nextRun: number;\n status: 'active' | 'paused' | 'error';\n lastError?: string;\n }>;\n}\ninterface CronParts {\n minute: number[];\n hour: number[];\n dayOfMonth: number[];\n month: number[];\n dayOfWeek: number[];\n}\n/**\n * Parse a cron expression into its component parts\n * Supports standard 5-field cron: minute hour day-of-month month day-of-week\n */\nexport declare function parseCronExpression(expr: string): CronParts;\n/**\n * Calculate the next run time for a cron expression after the given date\n */\nexport declare function calculateNextRun(cronExpression: string, after?: Date): Date;\n/**\n * SchedulerDO - Standalone Durable Object for job scheduling\n *\n * This is the actual Durable Object class that handles all scheduling.\n * It owns its own storage for job metadata and execution history.\n *\n * Job handlers receive env so they can access entities and other services.\n */\nexport declare class SchedulerDO extends DurableObject<Env> {\n private jobs;\n private initialized;\n constructor(ctx: DurableObjectState, env: Env);\n /**\n * Ensure the scheduler is initialized (lazy initialization for DO recovery)\n * This is needed because DOs can be evicted and recreated, losing in-memory state.\n * Also handles HMR: if getRegisteredSchedules() has changed since last init, re-sync.\n */\n private ensureInitialized;\n /**\n * Alarm handler - processes scheduled jobs\n * Called by Cloudflare when an alarm fires\n */\n alarm(): Promise<void>;\n /**\n * Initialize the job scheduler with job definitions.\n * Can be called again after HMR to sync new/changed job definitions.\n */\n initializeJobScheduler(jobs: ScheduledJob[]): Promise<void>;\n /**\n * Handle alarm - execute due jobs\n */\n private handleAlarm;\n /**\n * Execute a single job\n */\n private executeJob;\n /**\n * Store a job execution record in history\n */\n private storeHistoryRecord;\n /**\n * Schedule the next alarm for the earliest due job\n */\n private scheduleNextAlarm;\n /**\n * Get status of all schedules\n */\n getScheduleStatus(): Promise<ScheduleStatusResponse>;\n /**\n * Get job execution history\n */\n getJobHistory(jobName?: string, limit?: number): Promise<JobRunRecord[]>;\n /**\n * Manually trigger a job (for testing/debugging)\n */\n triggerJob(jobName: string): Promise<JobResult>;\n /**\n * Pause a scheduled job\n */\n pauseJob(jobName: string): Promise<void>;\n /**\n * Resume a paused job\n */\n resumeJob(jobName: string): Promise<void>;\n}\n/**\n * Initialize the job scheduler with the given jobs.\n */\nexport declare function initializeScheduler(env: Env, jobs: ScheduledJob[]): Promise<void>;\nimport type { Hono } from 'hono';\n/**\n * Mount scheduler routes on the Hono app\n * Provides internal API for schedule management\n */\nexport declare function schedulerRoutes(app: Hono<{\n Bindings: Env;\n}>): void;\nexport {};\n",
|
|
22
|
+
"create-app.d.ts": "/**\n * Application entry point for Runwork apps.\n *\n * Users call createApp() in their worker entry file to register their\n * application code (agents, entities, routes, etc.) and get back\n * a Cloudflare Workers ExportedHandler.\n *\n * @example\n * ```typescript\n * // worker/index.ts\n * import { createApp } from '@runworkai/framework';\n * import { APP_AGENTS } from './agents';\n * import { APP_ENTITIES } from './entities';\n * import { APP_ROUTES } from './routes';\n *\n * export default createApp({\n * agents: APP_AGENTS,\n * entities: APP_ENTITIES,\n * routes: APP_ROUTES,\n * });\n * ```\n */\nimport { type ComponentDefinition, type RouteEntry } from './app-registry';\nimport type { AgentDefinition } from './core-agent';\nimport type { EntityClass } from './core-entities';\nimport type { EndpointDefinition } from './core-endpoints';\nimport type { IntegrationRequirement } from './core-integrations';\nimport type { ScheduledJob } from './core-scheduler';\nimport type { Env } from './core-utils';\nimport type { WorkflowDefinition } from './core-workflow-types';\n/**\n * Options for createApp(). All fields are optional -- omitted fields\n * default to empty arrays.\n */\nexport interface CreateAppOptions {\n agents?: AgentDefinition[];\n entities?: Array<EntityClass<{\n id: string;\n }>>;\n routes?: RouteEntry[];\n endpoints?: EndpointDefinition[];\n workflows?: WorkflowDefinition[];\n schedules?: ScheduledJob[];\n integrationRequirements?: IntegrationRequirement[];\n components?: ComponentDefinition[];\n}\n/**\n * Initialize a Runwork application with the given feature registrations.\n *\n * Registers user-defined agents, entities, routes, and other features\n * into the global app registry so framework core files can access them\n * without direct imports.\n *\n * Returns an ExportedHandler suitable for use as the default export\n * of a Cloudflare Worker entry point.\n */\nexport declare function createApp(options?: CreateAppOptions): ExportedHandler<Env>;\n",
|
|
23
|
+
"core-workflows.d.ts": "/**\n * Core Workflow Framework - Public API\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides the public API for workflow operations.\n * Uses native DO-based engine (WorkflowCoordinator/WorkflowInstance).\n *\n * Implementation details:\n * - Types are defined in core-workflow-types.ts\n * - Native DO-based implementation is in core-workflow-instance.ts and core-workflow-coordinator.ts\n */\nimport type { Env } from './core-utils';\nexport type { WorkflowResult, WorkflowStatus, WorkflowInstanceInfo, WorkflowDefinition, WorkflowContext, WorkflowStepUtilities, StepOptions, WaitEventOptions, WorkflowLogger, WorkflowState, WorkflowStatusResponse, } from './core-workflow-types';\nimport type { WorkflowInstanceInfo } from './core-workflow-types';\n/**\n * Trigger a workflow by name with the given parameters.\n * This is a convenience function that creates a new workflow instance.\n *\n * @param env - The environment bindings\n * @param workflowName - The name of the workflow to trigger (must be defined in workflows.ts)\n * @param params - Parameters to pass to the workflow\n * @returns The instance ID of the created workflow\n *\n * @example\n * ```ts\n * const instanceId = await triggerWorkflow(ctx.env, 'order-fulfillment', {\n * orderId: '12345',\n * customerId: 'cust-001',\n * });\n * ```\n */\nexport declare function triggerWorkflow(env: Env, workflowName: string, params?: Record<string, unknown>): Promise<string>;\n/**\n * Send an event to a running workflow instance.\n * Use this to trigger workflows waiting on `step.waitForEvent()`.\n *\n * @param env - The environment bindings\n * @param instanceId - The workflow instance ID to send event to\n * @param eventType - The event type name (must match the name in waitForEvent)\n * @param payload - Data to send with the event\n *\n * @example\n * ```ts\n * // In an API endpoint handler\n * await sendWorkflowEvent(c.env, instanceId, 'approval-response', {\n * approved: true,\n * approvedBy: 'user123',\n * });\n * ```\n */\nexport declare function sendWorkflowEvent(env: Env, instanceId: string, eventType: string, payload?: Record<string, unknown>): Promise<void>;\n/**\n * Get the current status of a workflow instance.\n *\n * @param env - The environment bindings\n * @param instanceId - The workflow instance ID\n * @returns The workflow instance info or null if not found\n *\n * @example\n * ```ts\n * const status = await getWorkflowStatus(c.env, instanceId);\n * if (status?.status === 'completed') {\n * console.log('Workflow completed:', status.result);\n * }\n * ```\n */\nexport declare function getWorkflowStatus(env: Env, instanceId: string): Promise<WorkflowInstanceInfo | null>;\nimport type { Hono } from 'hono';\n/**\n * Mount workflow routes on the Hono app\n * Provides internal API for workflow management\n */\nexport declare function workflowRoutes(app: Hono<{\n Bindings: Env;\n}>): void;\n",
|
|
24
|
+
"ai.d.ts": "export { tool, generateText, streamText, generateObject, aiRoutes, } from './core-ai';\nexport type { ModelMessage, ModelMessage as CoreMessage, Tool, ToolSet, ToolChoice, TextPart, ImagePart, FilePart, UserContent, DataContent, ChatMessage, AICallSettings, GenerateTextOptions, StreamTextOptions, GenerateObjectOptions, } from './core-ai';\n",
|
|
26
25
|
"core-workflow-coordinator.d.ts": "/**\n * WorkflowCoordinator Durable Object - Native Workflow Engine\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * Singleton coordinator that manages workflow instances.\n * - Creates WorkflowInstance DOs\n * - Maintains an index for querying workflows\n * - Routes signals to correct instances\n */\nimport { DurableObject } from 'cloudflare:workers';\nimport type { NativeWorkflowStatus, NativeWorkflowConfig, ListWorkflowsOptions, WorkflowInstanceInfo, WorkflowInstanceStub } from './core-workflow-types';\nimport { type Env } from './core-utils';\n/**\n * WorkflowCoordinator Durable Object\n *\n * Acts as the central point for workflow management in native mode.\n * Similar to WorkflowManager but creates actual DO instances instead\n * of relying on Cloudflare Workflows.\n */\nexport declare class WorkflowCoordinator extends DurableObject<Env> {\n private index;\n /**\n * Create a new workflow instance\n */\n create(workflowName: string, params: Record<string, unknown>, config?: Partial<NativeWorkflowConfig>, metadata?: Record<string, unknown>): Promise<string>;\n /**\n * Get a workflow instance stub\n */\n getInstance(instanceId: string): WorkflowInstanceStub;\n /**\n * Get workflow instance info (combines index with instance state)\n */\n getInstanceInfo(instanceId: string): Promise<WorkflowInstanceInfo | null>;\n /**\n * List workflow instances with optional filters\n */\n listInstances(options?: ListWorkflowsOptions): Promise<WorkflowInstanceInfo[]>;\n /**\n * Send a signal/event to a workflow instance\n */\n signal(instanceId: string, eventType: string, payload: unknown): Promise<void>;\n /**\n * Pause a workflow instance\n */\n pause(instanceId: string): Promise<void>;\n /**\n * Resume a paused workflow instance\n */\n resume(instanceId: string): Promise<void>;\n /**\n * Cancel a workflow instance\n */\n cancel(instanceId: string): Promise<void>;\n /**\n * Update the index when a workflow instance changes status\n * Called by WorkflowInstance DOs\n */\n updateIndex(instanceId: string, workflowName: string, status: NativeWorkflowStatus): Promise<void>;\n /**\n * Get workflow statistics\n */\n getStats(): Promise<{\n total: number;\n byStatus: Record<string, number>;\n byWorkflow: Record<string, number>;\n }>;\n /**\n * Clean up completed/old workflow entries\n * Should be called periodically to prevent index bloat\n */\n cleanup(options?: {\n olderThanMs?: number;\n keepCompleted?: boolean;\n maxEntries?: number;\n }): Promise<number>;\n private ensureIndexLoaded;\n private persistIndex;\n}\n",
|
|
27
|
-
"
|
|
26
|
+
"index.d.ts": "export { createApp } from './create-app';\nexport type { CreateAppOptions } from './create-app';\nexport type { AppConfig } from './app-registry';\nexport { ok, bad, notFound, isStr, safeClone, platformFetch, workspaceApiFetch } from './core-utils';\nexport type { Env } from './core-utils';\nexport type { ApiResponse } from './shared/core-types';\nexport * from './entities';\nexport * from './routes';\nexport * from './agents';\nexport * from './ai';\nexport * from './workflows';\nexport * from './scheduler';\nexport * from './endpoints';\nexport * from './storage';\nexport * from './integrations';\nexport * from './channels';\nexport * from './workspace';\nexport * from './events';\nexport * from './components';\nexport { runAgentTask, getAgentTaskStatus } from './task-delegation';\nexport type { AgentTaskExecution, RunAgentTaskOptions } from './task-delegation';\n",
|
|
28
27
|
"core-workspace.d.ts": "/**\n * Core Workspace Context\n * DO NOT MODIFY THIS FILE - You may break the workspace functionality\n *\n * This module provides cross-app data sharing and workspace registration.\n * Apps in the same workspace can query each other's entities and register\n * their capabilities (entities, components, endpoints, etc.).\n */\nimport type { Env } from './core-utils';\nimport type { ExecutionLimits } from './task-delegation/types';\n/**\n * WorkspaceUser - Represents a member of the workspace\n * Read-only data provided by the platform\n */\nexport interface WorkspaceUser {\n id: string;\n email: string;\n name: string;\n role: 'owner' | 'admin' | 'editor' | 'viewer';\n avatarUrl: string | null;\n joinedAt: number;\n}\nexport interface ListUsersOptions {\n limit?: number;\n cursor?: string | null;\n}\nexport interface ListUsersResponse {\n items: WorkspaceUser[];\n next: string | null;\n}\n/**\n * Parameters for sending a notification to a workspace user\n * The platform wraps your content in a standard notification template\n */\nexport interface NotifyUserParams {\n /** User ID of the recipient (must be a workspace member) */\n userId: string;\n /** Notification title/subject */\n title: string;\n /** Plain text content (required) */\n content: string;\n /** Optional HTML content for rich formatting */\n html?: string;\n}\n/**\n * Result of sending a notification\n */\nexport interface NotifyUserResult {\n success: boolean;\n notificationId?: string;\n error?: string;\n}\nexport interface ListEntityRequest extends Record<string, unknown> {\n entityName: string;\n filters?: Record<string, unknown>;\n limit?: number;\n cursor?: string | null;\n deploymentMode?: 'preview' | 'production';\n}\nexport interface ListEntityResponse<T = unknown> {\n items: T[];\n next: string | null;\n}\nexport interface GetEntityRequest extends Record<string, unknown> {\n entityName: string;\n id: string;\n deploymentMode?: 'preview' | 'production';\n}\nexport interface CreateEntityRequest extends Record<string, unknown> {\n entityName: string;\n data: Record<string, unknown>;\n deploymentMode?: 'preview' | 'production';\n}\nexport interface UpdateEntityRequest extends Record<string, unknown> {\n entityName: string;\n id: string;\n data: Record<string, unknown>;\n deploymentMode?: 'preview' | 'production';\n}\nexport interface DeleteEntityRequest extends Record<string, unknown> {\n entityName: string;\n id: string;\n deploymentMode?: 'preview' | 'production';\n}\nexport interface RegisterEntityRequest extends Record<string, unknown> {\n appId: string;\n appName: string;\n entityName: string;\n schema?: Record<string, unknown>;\n deploymentMode?: 'preview' | 'production';\n}\nexport interface RegisterAppRequest extends Record<string, unknown> {\n appId: string;\n appName: string;\n}\nexport interface RegisterComponentRequest extends Record<string, unknown> {\n appId: string;\n appName: string;\n componentName: string;\n metadata?: {\n tag: string;\n description?: string;\n attributes?: Record<string, string>;\n };\n deploymentMode?: 'preview' | 'production';\n}\nexport interface RegisterScheduleRequest extends Record<string, unknown> {\n appId: string;\n appName: string;\n scheduleName: string;\n schedule: string;\n description?: string;\n deploymentMode?: 'preview' | 'production';\n}\nexport interface RegisterWorkflowRequest extends Record<string, unknown> {\n appId: string;\n appName: string;\n workflowName: string;\n description?: string;\n enabled?: boolean;\n deploymentMode?: 'preview' | 'production';\n}\nexport interface RegisterEndpointRequest extends Record<string, unknown> {\n appId: string;\n appName: string;\n path: string;\n method: string;\n authType: 'apiKey' | 'public';\n name?: string;\n description?: string;\n tags?: string[];\n schema?: {\n query?: Record<string, unknown>;\n body?: Record<string, unknown>;\n response?: Record<string, unknown>;\n };\n version?: string;\n deploymentMode?: 'preview' | 'production';\n}\nexport interface RegisterIntegrationRequest extends Record<string, unknown> {\n appId: string;\n appName: string;\n integrationId: string;\n reason: string;\n required: boolean;\n deploymentMode?: 'preview' | 'production';\n}\nexport interface RegisterAgentRequest extends Record<string, unknown> {\n appId: string;\n appName: string;\n agentName: string;\n description: string;\n type: 'conversational' | 'task';\n integrations: string[];\n entities: string[];\n deploymentMode?: 'preview' | 'production';\n systemPrompt?: string;\n prompt?: string;\n executionLimits?: ExecutionLimits;\n}\n/**\n * WorkspaceContext - Helper for cross-app data queries\n * Provides methods to query entities from other apps in the same workspace\n */\nexport declare class WorkspaceContext {\n private env;\n private workspaceId;\n private appId;\n private appName;\n private deploymentMode;\n constructor(env: Env, workspaceId: string, appId: string, appName: string);\n private canUseHttpFallback;\n private getWorkspaceStub;\n private fetchViaDurableObject;\n private fetchViaHttp;\n private workspaceFetch;\n /**\n * List entities from another app in the workspace with optional filters\n */\n list<T = unknown>(entityName: string, options?: {\n filters?: Record<string, unknown>;\n limit?: number;\n cursor?: string | null;\n }): Promise<ListEntityResponse<T>>;\n /**\n * Get a single entity by ID from another app in the workspace\n */\n get<T = unknown>(entityName: string, id: string): Promise<T | null>;\n /**\n * Create an entity in another app in the workspace\n */\n create<T = unknown>(entityName: string, data: Partial<T>): Promise<T>;\n /**\n * Update an entity in another app in the workspace\n */\n update<T = unknown>(entityName: string, id: string, data: Partial<T>): Promise<T>;\n /**\n * Delete an entity in another app in the workspace\n */\n deleteEntity(entityName: string, id: string): Promise<void>;\n /**\n * Register an entity with the workspace so other apps can query it\n */\n registerEntity(entityName: string, schema?: Record<string, unknown>): Promise<void>;\n /**\n * Register this app with the workspace (safe to call multiple times)\n */\n registerApp(): Promise<void>;\n /**\n * Register a component with the workspace so it can be discovered by other apps\n */\n registerComponent(componentName: string, metadata?: {\n tag: string;\n description?: string;\n attributes?: Record<string, string>;\n }): Promise<void>;\n /**\n * Register a scheduled job with the workspace for visibility\n */\n registerSchedule(scheduleName: string, config: {\n schedule: string;\n description?: string;\n }): Promise<void>;\n /**\n * Register a workflow with the workspace for visibility and provisioning\n */\n registerWorkflow(workflowName: string, config: {\n description?: string;\n enabled?: boolean;\n }): Promise<void>;\n /**\n * Register a public endpoint with the workspace for external access\n */\n registerEndpoint(path: string, config: {\n method: string;\n authType: 'apiKey' | 'public';\n name?: string;\n description?: string;\n tags?: string[];\n schema?: {\n query?: Record<string, unknown>;\n body?: Record<string, unknown>;\n response?: Record<string, unknown>;\n };\n version?: string;\n }): Promise<void>;\n /**\n * Register an integration requirement with the workspace\n */\n registerIntegration(integrationId: string, config: {\n reason?: string;\n required?: boolean;\n }): Promise<void>;\n /**\n * Register an AI agent with the workspace for visibility\n */\n registerAgent(agentName: string, config: {\n description: string;\n type: 'conversational' | 'task';\n integrations: string[];\n entities: string[];\n systemPrompt?: string;\n prompt?: string;\n executionLimits?: ExecutionLimits;\n }): Promise<void>;\n /**\n * Register all scheduled jobs, removing any stale entries not in the list.\n * This ensures schedules deleted from code are removed from the registry.\n */\n registerAllSchedules(schedules: Array<{\n name: string;\n schedule: string;\n description?: string;\n }>): Promise<void>;\n /**\n * Register all workflows, removing any stale entries not in the list.\n * This ensures workflows deleted from code are removed from the registry.\n */\n registerAllWorkflows(workflows: Array<{\n name: string;\n description?: string;\n enabled?: boolean;\n }>): Promise<void>;\n /**\n * Register all endpoints, removing any stale entries not in the list.\n * This ensures endpoints deleted from code are removed from the registry.\n */\n registerAllEndpoints(endpoints: Array<{\n path: string;\n method: string;\n auth: 'apiKey' | 'public';\n description?: string;\n tags?: string[];\n schema?: {\n query?: Record<string, unknown>;\n body?: Record<string, unknown>;\n response?: Record<string, unknown>;\n };\n }>): Promise<void>;\n /**\n * Register all integration requirements, removing any stale entries not in the list.\n * This ensures integrations deleted from code are removed from the registry.\n */\n registerAllIntegrations(integrations: Array<{\n integrationId: string;\n reason: string;\n required: boolean;\n }>): Promise<void>;\n /**\n * Register all AI agents, removing any stale entries not in the list.\n * This ensures agents deleted from code are removed from the registry.\n */\n registerAllAgents(agents: Array<{\n name: string;\n description: string;\n type: 'conversational' | 'task';\n integrations?: string[];\n entities?: string[];\n systemPrompt?: string;\n prompt?: string;\n executionLimits?: ExecutionLimits;\n }>): Promise<void>;\n /**\n * Register all components, removing any stale entries not in the list.\n * This ensures components deleted from code are removed from the registry.\n */\n registerAllComponents(components: Array<{\n name: string;\n metadata?: {\n tag: string;\n description?: string;\n attributes?: Record<string, string>;\n };\n }>): Promise<void>;\n /**\n * Connect object storage (R2 bucket) to signal the bucket is \"alive\"\n */\n connectObjectStorage(): Promise<void>;\n /**\n * Check if this app has an R2 bucket configured\n */\n hasBucket(): boolean;\n get id(): string;\n /**\n * List all users in this workspace\n * Returns paginated list of workspace members\n *\n * @example\n * ```typescript\n * const workspace = getWorkspaceContext(env);\n * const { items: users, next } = await workspace.listUsers();\n * // users: WorkspaceUser[]\n * ```\n */\n listUsers(options?: ListUsersOptions): Promise<ListUsersResponse>;\n /**\n * Get a specific user by ID\n * Returns null if user is not found or not a workspace member\n *\n * @example\n * ```typescript\n * const workspace = getWorkspaceContext(env);\n * const user = await workspace.getUser(userId);\n * if (user) {\n * console.log(user.name, user.email);\n * }\n * ```\n */\n getUser(userId: string): Promise<WorkspaceUser | null>;\n /**\n * Send a notification to a workspace user\n * Can only send to verified workspace members\n * The platform wraps your content in a standard notification template\n * (e.g., \"You have a new notification from [App Name]\")\n *\n * @example\n * ```typescript\n * const workspace = getWorkspaceContext(env);\n * const result = await workspace.notifyUser({\n * userId: assigneeId,\n * title: 'Task assigned to you',\n * content: 'You have been assigned a new task.',\n * html: '<p>You have been assigned a new task.</p>',\n * });\n * if (!result.success) {\n * console.error('Failed to send notification:', result.error);\n * }\n * ```\n */\n notifyUser(params: NotifyUserParams): Promise<NotifyUserResult>;\n}\n/**\n * Get workspace context for cross-app queries\n * Returns null if app is not part of a workspace\n */\nexport declare function getWorkspaceContext(env: Env): WorkspaceContext | null;\n/**\n * List entities from ANOTHER app in the workspace (cross-app queries ONLY)\n *\n * CRITICAL: This function is for cross-app data access ONLY. Use it to query entities\n * that are defined in OTHER apps in the same workspace.\n *\n * DO NOT use this for local entities owned by this app. For local entities, use the\n * Entity class methods directly (e.g., TodoEntity.list(ctx), UserEntity.list(ctx)).\n *\n * Filters are applied as equality matching on entity fields.\n *\n * @example\n * // CORRECT: List contacts from a separate CRM app in the workspace\n * const contacts = await listWorkspaceEntity<Contact>(env, 'Contact', {\n * filters: { isActive: true },\n * limit: 50\n * });\n *\n * @example\n * // WRONG: Don't use this for local entities!\n * // const todos = await listWorkspaceEntity<Todo>(env, 'Todo', { limit: 50 });\n * // CORRECT: Use Entity class for local data\n * // const ctx = { env };\n * // const todos = await TodoEntity.list(ctx, { limit: 50 });\n */\nexport declare function listWorkspaceEntity<T = unknown>(env: Env, entityName: string, options?: {\n filters?: Record<string, unknown>;\n limit?: number;\n cursor?: string | null;\n}): Promise<ListEntityResponse<T>>;\n/**\n * Get a single entity by ID from ANOTHER app in the workspace (cross-app ONLY)\n *\n * @example\n * const contact = await getWorkspaceEntity<Contact>(env, 'Contact', 'contact-123');\n */\nexport declare function getWorkspaceEntity<T = unknown>(env: Env, entityName: string, id: string): Promise<T | null>;\n/**\n * Create an entity in ANOTHER app in the workspace (cross-app ONLY)\n *\n * @example\n * const newContact = await createWorkspaceEntity<Contact>(env, 'Contact', {\n * name: 'John Doe',\n * email: 'john@example.com'\n * });\n */\nexport declare function createWorkspaceEntity<T = unknown>(env: Env, entityName: string, data: Partial<T>): Promise<T>;\n/**\n * Update an entity in ANOTHER app in the workspace (cross-app ONLY)\n *\n * @example\n * const updated = await updateWorkspaceEntity<Contact>(env, 'Contact', 'contact-123', {\n * status: 'inactive'\n * });\n */\nexport declare function updateWorkspaceEntity<T = unknown>(env: Env, entityName: string, id: string, data: Partial<T>): Promise<T>;\n/**\n * Delete an entity in ANOTHER app in the workspace (cross-app ONLY)\n *\n * @example\n * await deleteWorkspaceEntity(env, 'Contact', 'contact-123');\n */\nexport declare function deleteWorkspaceEntity(env: Env, entityName: string, id: string): Promise<void>;\n/**\n * Register all entities, components, and schedules with the workspace\n * Called once when the worker starts\n */\nexport declare function initializeWorkspace(env: Env): Promise<void>;\n",
|
|
29
|
-
"
|
|
28
|
+
"events.d.ts": "export { emitEvent, toChannelName, flog } from './core-events';\nexport type { EmitEventParams } from './core-events';\n",
|
|
30
29
|
"routes.d.ts": "export { setupRoutes } from './core-routes';\nexport type { ClientErrorReport } from './core-routes';\n",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
30
|
+
"core-workflow-cloudflare.d.ts": "/**\n * Cloudflare Workflows Implementation\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * @deprecated This module is DEPRECATED and kept for reference only.\n * Cloudflare Workflows do not support Workers for Platforms, so this code path\n * is no longer used. The native DO-based workflow engine is used instead.\n *\n * For active workflow implementation, see:\n * - core-workflow-instance.ts (WorkflowInstance DO)\n * - core-workflow-coordinator.ts (WorkflowCoordinator DO)\n * - core-workflows.ts (public API)\n */\nimport { WorkflowEntrypoint, WorkflowStep, WorkflowEvent } from 'cloudflare:workers';\nimport type { Env } from './core-utils';\nimport type { WorkflowResult, WorkflowStatus, WorkflowInstanceInfo, WorkflowDefinition, WorkflowLogger, WorkflowStatusResponse } from './core-workflow-types';\ntype WorkflowParams = {\n workflowName: string;\n params: Record<string, unknown>;\n};\n/**\n * WorkflowRunner - Single entrypoint for all user-defined workflows\n *\n * This class extends Cloudflare's WorkflowEntrypoint and dispatches to\n * the appropriate workflow handler based on the workflowName parameter.\n */\nexport declare class WorkflowRunner extends WorkflowEntrypoint<Env, WorkflowParams> {\n run(event: WorkflowEvent<WorkflowParams>, step: WorkflowStep): Promise<WorkflowResult>;\n}\n/**\n * WorkflowManager - Manages workflow state within a Durable Object\n *\n * Note: Actual workflow execution is handled by Cloudflare Workflows.\n * This manager tracks metadata and provides status APIs.\n */\nexport declare class WorkflowManager {\n private ctx;\n private env;\n private initialized;\n constructor(ctx: DurableObjectState, env: Env);\n /**\n * Initialize the workflow manager with workflow definitions\n */\n initialize(workflows: WorkflowDefinition[]): Promise<void>;\n /**\n * Record a workflow instance creation\n */\n recordInstanceCreated(instanceId: string, workflowName: string, params: Record<string, unknown>): Promise<void>;\n /**\n * Update instance status\n */\n updateInstanceStatus(instanceId: string, status: WorkflowStatus, result?: WorkflowResult, error?: string): Promise<void>;\n /**\n * Get instance info\n */\n getInstance(instanceId: string): Promise<WorkflowInstanceInfo | null>;\n /**\n * List instances with optional filters\n */\n listInstances(options?: {\n workflowName?: string;\n status?: WorkflowStatus;\n limit?: number;\n }): Promise<WorkflowInstanceInfo[]>;\n /**\n * Get status of all workflows\n */\n getStatus(): Promise<WorkflowStatusResponse>;\n /**\n * Send an event to a workflow instance.\n * Note: This stores the event for the workflow to pick up. The actual\n * event delivery depends on how the workflow binding is configured.\n */\n sendEvent(instanceId: string, eventType: string, payload: Record<string, unknown>): Promise<void>;\n}\n/**\n * Get the workflow manager instance for a DO\n * Used internally by workflow Durable Objects\n */\nexport declare function getWorkflowManager(ctx: DurableObjectState, env: Env): WorkflowManager;\n/**\n * Create a workflow logger instance\n */\nexport declare function createWorkflowLogger(workflowName: string, instanceId: string): WorkflowLogger;\nexport {};\n",
|
|
31
|
+
"core-file-storage.d.ts": "/**\n * Core File Storage Utilities for R2\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides the FileStorageClient class for R2 bucket operations.\n * Use the FileStorageClient to upload, download, delete, and list files.\n * Presigned URLs are generated via the platform API (vibe-apps don't have R2 credentials).\n */\nimport { type Env } from './core-utils';\nimport type { FileMetadata, UploadOptions, DownloadOptions, ListFilesOptions, ListFilesResult, PresignedUrlRequest, PresignedUrlResponse } from './shared/core-types';\nexport type { FileMetadata, UploadOptions, DownloadOptions, ListFilesOptions, ListFilesResult, PresignedUrlRequest, PresignedUrlResponse, };\n/**\n * FileStorageClient - Wrapper for R2 bucket operations\n *\n * Use this client to:\n * - Upload files directly to R2 (for smaller files via worker)\n * - Download files directly from R2\n * - List and manage files in the bucket\n * - Get presigned URLs for direct R2 access (via platform API)\n *\n * @example\n * ```typescript\n * const storage = createFileStorageClient(env);\n *\n * // Upload a file\n * const metadata = await storage.upload(fileData, {\n * name: 'document.pdf',\n * contentType: 'application/pdf'\n * });\n *\n * // Get presigned URL for large file download\n * const { url } = await storage.getPresignedDownloadUrl('path/to/file.pdf');\n *\n * // List files\n * const { files, cursor } = await storage.list({ prefix: 'uploads/' });\n * ```\n */\nexport declare class FileStorageClient {\n private env;\n private readonly bucket;\n private readonly platformBaseUrl;\n private readonly workspaceApiKey;\n private readonly appId;\n constructor(env: Env);\n private extractOrigin;\n /**\n * Check if file storage is configured (R2 bucket bound)\n */\n isConfigured(): boolean;\n /**\n * Check if presigned URL generation is available (platform API configured)\n */\n canGeneratePresignedUrls(): boolean;\n /**\n * Generate a unique key for file storage\n */\n private generateKey;\n /**\n * Upload a file to R2\n * For smaller files that can be processed through the worker.\n * For large files, use getPresignedUploadUrl() for direct R2 upload.\n *\n * @example\n * ```typescript\n * const metadata = await storage.upload(fileBuffer, {\n * name: 'report.pdf',\n * contentType: 'application/pdf',\n * customMetadata: { department: 'sales' }\n * });\n * console.log('Uploaded:', metadata.key);\n * ```\n */\n upload(data: ReadableStream | ArrayBuffer | string | Blob, options?: UploadOptions): Promise<FileMetadata>;\n /**\n * Download a file from R2\n * Returns the R2ObjectBody which includes the body stream and metadata.\n *\n * @example\n * ```typescript\n * const object = await storage.download('path/to/file.pdf');\n * if (object) {\n * return new Response(object.body, {\n * headers: { 'Content-Type': object.httpMetadata?.contentType || 'application/octet-stream' }\n * });\n * }\n * ```\n */\n download(key: string, options?: DownloadOptions): Promise<R2ObjectBody | null>;\n /**\n * Delete a file from R2\n * Returns true if the file existed, false otherwise.\n *\n * @example\n * ```typescript\n * const deleted = await storage.delete('path/to/file.pdf');\n * console.log(deleted ? 'File deleted' : 'File did not exist');\n * ```\n */\n delete(key: string): Promise<boolean>;\n /**\n * Delete multiple files from R2\n *\n * @example\n * ```typescript\n * await storage.deleteMany(['file1.pdf', 'file2.pdf', 'file3.pdf']);\n * ```\n */\n deleteMany(keys: string[]): Promise<void>;\n /**\n * List files in R2 with optional prefix and pagination\n *\n * @example\n * ```typescript\n * // List all files in uploads/ folder\n * const { files, cursor, truncated } = await storage.list({\n * prefix: 'uploads/',\n * limit: 100\n * });\n *\n * // Paginate through results\n * if (truncated && cursor) {\n * const nextPage = await storage.list({ prefix: 'uploads/', cursor });\n * }\n * ```\n */\n list(options?: ListFilesOptions): Promise<ListFilesResult>;\n /**\n * Get file metadata without downloading the file content\n *\n * @example\n * ```typescript\n * const metadata = await storage.getMetadata('path/to/file.pdf');\n * if (metadata) {\n * console.log(`File size: ${metadata.size} bytes`);\n * }\n * ```\n */\n getMetadata(key: string): Promise<FileMetadata | null>;\n /**\n * Check if a file exists in R2\n *\n * @example\n * ```typescript\n * if (await storage.exists('path/to/file.pdf')) {\n * console.log('File exists');\n * }\n * ```\n */\n exists(key: string): Promise<boolean>;\n /**\n * Get a presigned URL for uploading a file directly to R2\n * The URL is generated by the platform API (vibe-apps don't have R2 credentials).\n * Use this for large file uploads to avoid worker memory/CPU limits.\n *\n * @example\n * ```typescript\n * const { url, expiresAt } = await storage.getPresignedUploadUrl('uploads/large-video.mp4', {\n * contentType: 'video/mp4',\n * expiresIn: 3600 // 1 hour\n * });\n *\n * // Client can now PUT directly to this URL\n * await fetch(url, { method: 'PUT', body: fileData });\n * ```\n */\n getPresignedUploadUrl(key: string, options?: {\n contentType?: string;\n expiresIn?: number;\n }): Promise<PresignedUrlResponse>;\n /**\n * Get a presigned URL for downloading a file directly from R2\n * The URL is generated by the platform API (vibe-apps don't have R2 credentials).\n * Use this for large file downloads to avoid worker memory/CPU limits.\n *\n * @example\n * ```typescript\n * const { url, expiresAt } = await storage.getPresignedDownloadUrl('path/to/large-file.zip');\n *\n * // Redirect user to presigned URL or return it to client\n * return Response.redirect(url, 302);\n * ```\n */\n getPresignedDownloadUrl(key: string, options?: {\n expiresIn?: number;\n }): Promise<PresignedUrlResponse>;\n}\n/**\n * Create a FileStorageClient instance\n *\n * @example\n * ```typescript\n * import { createFileStorageClient } from './core-file-storage';\n *\n * app.post('/api/files/upload', async (c) => {\n * const storage = createFileStorageClient(c.env);\n * const formData = await c.req.formData();\n * const file = formData.get('file') as File;\n *\n * const metadata = await storage.upload(file.stream(), {\n * name: file.name,\n * contentType: file.type\n * });\n *\n * return c.json({ success: true, data: metadata });\n * });\n * ```\n */\nexport declare function createFileStorageClient(env: Env): FileStorageClient;\nimport type { Hono } from 'hono';\n/**\n * Mount file storage routes on the Hono app\n * Provides REST API for R2 bucket operations\n */\nexport declare function fileStorageRoutes(app: Hono<{\n Bindings: Env;\n}>): void;\n",
|
|
32
|
+
"workspace.d.ts": "export { WorkspaceContext, getWorkspaceContext, listWorkspaceEntity, getWorkspaceEntity, createWorkspaceEntity, updateWorkspaceEntity, deleteWorkspaceEntity, initializeWorkspace, } from './core-workspace';\nexport type { WorkspaceUser, ListUsersOptions, ListUsersResponse, NotifyUserParams, NotifyUserResult, ListEntityRequest, ListEntityResponse, GetEntityRequest, CreateEntityRequest, UpdateEntityRequest, DeleteEntityRequest, RegisterEntityRequest, RegisterAppRequest, RegisterComponentRequest, RegisterScheduleRequest, RegisterWorkflowRequest, RegisterEndpointRequest, RegisterIntegrationRequest, RegisterAgentRequest as WorkspaceRegisterAgentRequest, } from './core-workspace';\n",
|
|
33
|
+
"core-integrations.d.ts": "/**\n * Core Integration Utilities\n * DO NOT MODIFY THIS FILE - You may break the integration functionality\n *\n * This module provides utilities for making API calls to third-party services\n * through the platform's multi-provider integration system.\n *\n * Supported providers:\n * - Nango: Self-hosted OAuth for 200+ APIs\n * - Pipedream: Managed OAuth clients for business apps\n * - AyrShare: Social media (Instagram, TikTok, Facebook, Twitter, etc.)\n *\n * Provider routing is automatic - the code is provider-agnostic.\n * Use the IntegrationClient class to interact with connected third-party services.\n */\nimport { type Env } from './core-utils';\nimport type { NangoActionResponse, NangoProxyOptions } from './shared/core-types';\nexport type { NangoActionResponse, NangoProxyOptions, };\n/**\n * Integration requirement definition\n * Used in integration-requirements.ts to declare which integrations your app needs\n */\nexport interface IntegrationRequirement {\n /** Integration provider ID (e.g., 'github', 'slack', 'hubspot') */\n integrationId: string;\n /** Why this integration is needed */\n reason: string;\n /** Whether the app cannot function without this integration */\n required: boolean;\n}\n/**\n * IntegrationClient - Wrapper for making API calls through Nango proxy\n *\n * Nango handles OAuth authentication and proxies requests to external APIs.\n *\n * For structured data access, prefer IntegrationEntity classes from './core-integration-entities'.\n *\n * @example\n * ```typescript\n * const client = new IntegrationClient(env);\n *\n * // GET request to HubSpot API\n * const contacts = await client.proxy<{ results: Contact[] }>({\n * method: 'GET',\n * endpoint: '/crm/v3/objects/contacts',\n * providerConfigKey: 'hubspot'\n * });\n *\n * // POST request to create a GitHub issue\n * const issue = await client.proxy({\n * method: 'POST',\n * endpoint: '/repos/owner/repo/issues',\n * providerConfigKey: 'github',\n * data: { title: 'New Issue', body: 'Issue description' }\n * });\n * ```\n */\nexport declare class IntegrationClient {\n private env;\n private readonly proxyUrl;\n private readonly proxyToken;\n constructor(env: Env);\n /**\n * Fire-and-forget event emission for integration activity.\n * Does not require waitUntil context - errors are silently swallowed.\n */\n private fireEvent;\n /**\n * Check if integrations are configured\n */\n isConfigured(): boolean;\n /**\n * Check if a specific integration has a connection configured.\n * The proxy resolves connections dynamically, so this returns true\n * when the proxy is configured even without explicit env vars.\n */\n hasConnection(provider: string): boolean;\n /**\n * Normalize integration ID to canonical form for env var lookup.\n * MUST be identical to platform's normalizeIntegrationId() in provider-config.ts.\n *\n * Strips provider prefixes (pd_, nango_, ayrshare_), common suffixes (-demo, _v1),\n * and removes all separators for consistent cross-provider matching.\n *\n * Examples:\n * - \"pd_sendgrid\" -> \"sendgrid\"\n * - \"google-drive\" -> \"googledrive\"\n * - \"pd_google_drive\" -> \"googledrive\"\n * - \"hubspot-demo\" -> \"hubspot\"\n */\n private normalizeIntegrationId;\n private getWorkspaceIntegrationId;\n private getLegacyConnectionId;\n /**\n * Make a request to external API via platform proxy.\n * Uses platformFetch which routes through WorkspaceObject DO in production\n * to avoid 522 timeouts from WfP workers.\n */\n private makeRequest;\n /**\n * Make a proxy request to an external API through the integration proxy.\n * Use this for all API calls to connected third-party services.\n * Supports multiple providers (Nango, Pipedream, AyrShare) - routing is automatic.\n *\n * @example\n * ```typescript\n * // GET request\n * const result = await client.proxy<{ results: Contact[] }>({\n * method: 'GET',\n * endpoint: '/crm/v3/objects/contacts',\n * providerConfigKey: 'hubspot'\n * });\n *\n * // POST request with data\n * const result = await client.proxy({\n * method: 'POST',\n * endpoint: '/repos/owner/repo/issues',\n * providerConfigKey: 'github',\n * data: { title: 'Bug Report', body: 'Description' }\n * });\n * ```\n */\n proxy<T = unknown>(options: NangoProxyOptions): Promise<NangoActionResponse<T>>;\n}\n/**\n * Create an integration client instance\n *\n * @example\n * ```typescript\n * import { createIntegrationClient } from './core-integrations';\n *\n * app.get('/api/hubspot/contacts', async (c) => {\n * const client = createIntegrationClient(c.env);\n * const result = await client.proxy<{ results: Contact[] }>({\n * method: 'GET',\n * endpoint: '/crm/v3/objects/contacts',\n * providerConfigKey: 'hubspot'\n * });\n * return c.json(result);\n * });\n * ```\n */\nexport declare function createIntegrationClient(env: Env): IntegrationClient;\n",
|
|
34
|
+
"integrations.d.ts": "export { IntegrationClient, createIntegrationClient, } from './core-integrations';\nexport type { IntegrationRequirement, NangoActionResponse, NangoProxyOptions, } from './core-integrations';\n",
|
|
35
|
+
"entities.d.ts": "export { entityRegistry, registerEntity, registerEntities, EntityBase, Entity, entityRoutes, } from './core-entities';\nexport type { EntityDOStub, EntityContext, ListOptions, PaginatedResult, EntityClass, Doc, EntityStatics, } from './core-entities';\nexport { EntityDO, SAFE_FIELD_NAME, QUERY_LIMITS, validateFieldName, escapeLikePattern } from './core-entity-do';\nexport { IntegrationEntity, isIntegrationEntity } from './core-integration-entities';\nexport type { OperationConfig, IntegrationEntityConfig, IntegrationEntityClass, } from './core-integration-entities';\n",
|
|
36
|
+
"core-integration-entities.d.ts": "/**\n * Core Integration Entity Utilities\n * DO NOT MODIFY THIS FILE - You may break the integration entity functionality\n *\n * This module provides the IntegrationEntity base class for entities that are backed\n * by external integrations (HubSpot, GitHub, Salesforce, etc.) instead of local storage.\n *\n * IntegrationEntity implements the unified EntityClass interface with EntityContext.\n * All CRUD operations take ctx as the first parameter, matching the Entity class pattern.\n */\nimport type { EntityContext, ListOptions, PaginatedResult, EntityClass } from './core-entities';\nimport type { Env } from './core-utils';\nexport interface OperationConfig {\n /** API endpoint path (use :id for ID placeholder) */\n endpoint: string;\n}\nexport interface IntegrationEntityConfig {\n /** Integration identifier: \"hubspot\", \"github\", \"salesforce\", etc. */\n integrationId: string;\n /** Nango provider config key: \"hubspot\", \"github\", etc. */\n providerConfigKey: string;\n operations: {\n list?: OperationConfig;\n get?: OperationConfig;\n create?: OperationConfig;\n update?: OperationConfig;\n delete?: OperationConfig;\n };\n}\n/**\n * Extract the entity data type from an IntegrationEntity constructor.\n * e.g., IntegrationEntityData<typeof ContactEntity> = HubSpotContact\n */\ntype IntegrationEntityData<T> = T extends abstract new (...args: unknown[]) => IntegrationEntity<infer D> ? D : never;\n/**\n * Base constructor type for IntegrationEntity subclasses\n */\ntype IntegrationEntityCtor = abstract new (...args: unknown[]) => IntegrationEntity<{\n id: string;\n}>;\n/**\n * Constructor with required static properties.\n * This ensures the calling class has entityName, config, etc.\n */\ntype IntegrationEntityCtorWithConfig<TCtor> = TCtor & {\n entityName: string;\n config: IntegrationEntityConfig;\n schema?: Record<string, unknown>;\n getConnectionId(env: Env | Record<string, unknown>): string | undefined;\n};\n/**\n * IntegrationEntityClass type - for type checking integration entity classes\n */\nexport interface IntegrationEntityClass<T extends {\n id: string;\n} = {\n id: string;\n}> extends EntityClass<T> {\n config: IntegrationEntityConfig;\n}\n/**\n * IntegrationEntity - Base class for entities backed by external integrations\n *\n * Implements the unified EntityClass interface with EntityContext as first parameter.\n * This makes IntegrationEntity and Entity have identical CRUD interfaces.\n *\n * Extend this class to define entities that proxy CRUD operations to external services\n * like HubSpot, GitHub, Salesforce, etc. via the IntegrationClient.\n *\n * @example\n * ```typescript\n * import { IntegrationEntity, IntegrationEntityConfig } from './core-integration-entities';\n *\n * interface HubSpotContact {\n * id: string;\n * properties: { email: string; firstname: string; lastname: string };\n * }\n *\n * export class ContactEntity extends IntegrationEntity<HubSpotContact> {\n * static readonly entityName = 'hubspot_contact';\n * static readonly config: IntegrationEntityConfig = {\n * integrationId: 'hubspot',\n * providerConfigKey: 'hubspot',\n * operations: {\n * list: { endpoint: '/crm/v3/objects/contacts' },\n * get: { endpoint: '/crm/v3/objects/contacts/:id' },\n * create: { endpoint: '/crm/v3/objects/contacts' },\n * update: { endpoint: '/crm/v3/objects/contacts/:id' },\n * delete: { endpoint: '/crm/v3/objects/contacts/:id' },\n * },\n * };\n * static readonly schema = { fields: ['id', 'email', 'firstname', 'lastname'] };\n * }\n *\n * // Usage (same pattern as Entity):\n * const ctx = { env, client };\n * const contacts = await ContactEntity.list(ctx, { limit: 50 });\n * // contacts is PaginatedResult<HubSpotContact> - properly typed!\n * const contact = await ContactEntity.get(ctx, 'contact-123');\n * // contact is HubSpotContact | null - properly typed!\n * ```\n */\nexport declare abstract class IntegrationEntity<T extends {\n id: string;\n}> {\n static readonly entityName: string;\n static readonly config: IntegrationEntityConfig;\n static readonly schema?: Record<string, unknown>;\n /**\n * Get connection ID from env var if explicitly set.\n * Returns undefined when not set -- the proxy resolves connections\n * dynamically via workspaceId + provider, so this is optional.\n */\n static getConnectionId(env: Env | Record<string, unknown>): string | undefined;\n /**\n * Get the IntegrationClient from context\n * Throws if client is not available\n */\n private static getClient;\n /**\n * List entities from the integration with optional filters\n * Filters are passed through as query parameters to the external API\n * Note: Entities needing POST-based filtering should override this method\n */\n static list<TCtor extends IntegrationEntityCtor>(this: IntegrationEntityCtorWithConfig<TCtor>, ctx: EntityContext, options?: ListOptions): Promise<PaginatedResult<IntegrationEntityData<TCtor>>>;\n /**\n * Get a single entity by ID from the integration\n */\n static get<TCtor extends IntegrationEntityCtor>(this: IntegrationEntityCtorWithConfig<TCtor>, ctx: EntityContext, id: string): Promise<IntegrationEntityData<TCtor> | null>;\n /**\n * Create a new entity in the integration\n */\n static create<TCtor extends IntegrationEntityCtor>(this: IntegrationEntityCtorWithConfig<TCtor>, ctx: EntityContext, data: Partial<IntegrationEntityData<TCtor>>): Promise<IntegrationEntityData<TCtor>>;\n /**\n * Update an entity in the integration\n */\n static update<TCtor extends IntegrationEntityCtor>(this: IntegrationEntityCtorWithConfig<TCtor>, ctx: EntityContext, id: string, data: Partial<IntegrationEntityData<TCtor>>): Promise<IntegrationEntityData<TCtor>>;\n /**\n * Delete an entity from the integration\n */\n static delete<TCtor extends IntegrationEntityCtor>(this: IntegrationEntityCtorWithConfig<TCtor>, ctx: EntityContext, id: string): Promise<void>;\n}\n/**\n * Type guard to check if a class is an IntegrationEntity\n */\nexport declare function isIntegrationEntity(cls: unknown): cls is IntegrationEntityClass;\nexport {};\n",
|
|
37
|
+
"core-types.d.ts": "/**\n * This file defines default types provided by the platform.\n * DO NOT EDIT THIS FILE. You can define your own types in `shared/types.ts` file.\n */\nexport interface ApiResponse<T = unknown> {\n success: boolean;\n data?: T;\n error?: string;\n}\n/**\n * Response from a Nango action or sync trigger\n */\nexport interface NangoActionResponse<T = unknown> {\n success: boolean;\n data?: T;\n error?: string;\n /** True if error is due to missing integration connection (user hasn't connected yet) */\n isConnectionError?: boolean;\n /** True if error is due to insufficient permissions/scopes (401/403 from external API) */\n isPermissionError?: boolean;\n /** HTTP status code from the external API (if available) */\n statusCode?: number;\n}\n/**\n * Nango proxy request options - used for direct API calls through Nango\n */\nexport interface NangoProxyOptions {\n method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\n endpoint: string;\n providerConfigKey: string;\n data?: Record<string, unknown>;\n headers?: Record<string, string>;\n params?: Record<string, string>;\n retries?: number;\n}\n/**\n * Metadata for a stored file\n */\nexport interface FileMetadata {\n id: string;\n key: string;\n name: string;\n size: number;\n contentType: string;\n uploadedAt: number;\n uploadedBy?: string;\n customMetadata?: Record<string, string>;\n}\n/**\n * Options for uploading a file\n */\nexport interface UploadOptions {\n key?: string;\n name?: string;\n contentType?: string;\n uploadedBy?: string;\n customMetadata?: Record<string, string>;\n}\n/**\n * Options for downloading a file\n */\nexport interface DownloadOptions {\n range?: {\n offset?: number;\n length?: number;\n };\n}\n/**\n * Options for listing files\n */\nexport interface ListFilesOptions {\n prefix?: string;\n limit?: number;\n cursor?: string;\n delimiter?: string;\n}\n/**\n * Result of listing files\n */\nexport interface ListFilesResult {\n files: FileMetadata[];\n cursor?: string;\n truncated: boolean;\n}\n/**\n * Request for generating a presigned URL\n */\nexport interface PresignedUrlRequest {\n appId: string;\n key: string;\n action: 'read' | 'write';\n contentType?: string;\n expiresIn?: number;\n}\n/**\n * Response containing a presigned URL\n */\nexport interface PresignedUrlResponse {\n url: string;\n expiresAt: number;\n}\n",
|
|
38
|
+
"core-workflow-types.d.ts": "/**\n * Workflow Types - Shared types for native workflow engine\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n */\nimport type { Env } from './core-utils';\nimport type { IntegrationClient } from './core-integrations';\nexport type NativeWorkflowStatus = 'pending' | 'running' | 'sleeping' | 'waiting' | 'paused' | 'completed' | 'failed' | 'cancelled' | 'timedOut';\nexport type NativeStepStatus = 'pending' | 'running' | 'completed' | 'failed' | 'skipped';\nexport type NativeStepType = 'do' | 'sleep' | 'sleepUntil' | 'waitEvent';\nexport interface NativeWorkflowError {\n code: string;\n message: string;\n stack?: string;\n retryable: boolean;\n}\nexport interface NativeStepAttempt {\n attemptNumber: number;\n startedAt: number;\n completedAt?: number;\n error?: NativeWorkflowError;\n}\nexport interface NativeStepExecution {\n id: string;\n name: string;\n type: NativeStepType;\n status: NativeStepStatus;\n input?: unknown;\n output?: unknown;\n error?: NativeWorkflowError;\n attempts: NativeStepAttempt[];\n maxRetries: number;\n startedAt?: number;\n completedAt?: number;\n timeoutMs?: number;\n sleepUntil?: number;\n eventType?: string;\n eventTimeoutAt?: number;\n}\nexport interface NativeWorkflowInstance {\n id: string;\n workflowName: string;\n status: NativeWorkflowStatus;\n input: unknown;\n output?: unknown;\n error?: NativeWorkflowError;\n createdAt: number;\n startedAt?: number;\n completedAt?: number;\n steps: NativeStepExecution[];\n currentStepId?: string;\n config: NativeWorkflowConfig;\n metadata?: Record<string, unknown>;\n}\nexport interface NativeWorkflowConfig {\n maxRetries: number;\n retryBackoffMs: number;\n stepTimeoutMs: number;\n workflowTimeoutMs: number;\n}\nexport declare const DEFAULT_WORKFLOW_CONFIG: NativeWorkflowConfig;\nexport interface NativeStepContext {\n /** Unique instance ID for this workflow execution */\n instanceId: string;\n /** Input passed when workflow was started */\n workflowInput: unknown;\n /** Results from previous steps */\n previousSteps: Record<string, {\n output: unknown;\n status: NativeStepStatus;\n }>;\n}\nexport interface WorkflowIndexEntry {\n instanceId: string;\n workflowName: string;\n status: NativeWorkflowStatus;\n createdAt: number;\n completedAt?: number;\n}\nexport interface ListWorkflowsOptions {\n workflowName?: string;\n status?: NativeWorkflowStatus;\n limit?: number;\n offset?: number;\n}\nexport interface ExecuteStepRequest {\n instanceId: string;\n stepId: string;\n stepName: string;\n workflowName: string;\n workflowInput: unknown;\n previousSteps: Record<string, {\n output: unknown;\n status: NativeStepStatus;\n }>;\n}\nexport interface ExecuteStepResponse {\n success: boolean;\n output?: unknown;\n error?: NativeWorkflowError;\n}\nexport interface PendingEvent {\n instanceId: string;\n stepId: string;\n eventType: string;\n waitingSince: number;\n timeoutAt?: number;\n}\nexport interface ReceivedEvent {\n type: string;\n payload: unknown;\n timestamp: number;\n}\n/**\n * Result returned by a workflow execution\n */\nexport interface WorkflowResult {\n success: boolean;\n [key: string]: unknown;\n}\n/**\n * Possible states of a workflow instance\n */\nexport type WorkflowStatus = 'queued' | 'running' | 'paused' | 'errored' | 'terminated' | 'complete' | 'waiting';\n/**\n * Information about a workflow instance\n */\nexport interface WorkflowInstanceInfo {\n id: string;\n workflowName: string;\n status: WorkflowStatus;\n params?: Record<string, unknown>;\n createdAt: number;\n startedAt?: number;\n completedAt?: number;\n error?: string;\n result?: WorkflowResult;\n}\n/**\n * Interface for WorkflowInstance DO stub methods\n * Used to type the DurableObjectStub without importing the class\n */\nexport interface WorkflowInstanceStub {\n create(workflowName: string, params: Record<string, unknown>, instanceId: string, config?: Partial<NativeWorkflowConfig>, metadata?: Record<string, unknown>): Promise<void>;\n getStatus(): Promise<NativeWorkflowInstance | null>;\n signal(eventType: string, payload: unknown): Promise<void>;\n pause(): Promise<void>;\n resume(): Promise<void>;\n cancel(): Promise<void>;\n}\n/**\n * Interface for WorkflowCoordinator DO stub methods\n * Used to type the DurableObjectStub without importing the class\n */\nexport interface WorkflowCoordinatorStub {\n create(workflowName: string, params: Record<string, unknown>, config?: Partial<NativeWorkflowConfig>, metadata?: Record<string, unknown>): Promise<string>;\n signal(instanceId: string, eventType: string, payload: unknown): Promise<void>;\n getInstanceInfo(instanceId: string): Promise<WorkflowInstanceInfo | null>;\n listInstances(options?: ListWorkflowsOptions): Promise<WorkflowInstanceInfo[]>;\n updateIndex(instanceId: string, workflowName: string, status: NativeWorkflowStatus): Promise<void>;\n pause(instanceId: string): Promise<void>;\n resume(instanceId: string): Promise<void>;\n cancel(instanceId: string): Promise<void>;\n}\n/**\n * Definition for a workflow handler\n */\nexport interface WorkflowDefinition<TParams = unknown, TResult = unknown> {\n /** Unique name for this workflow (kebab-case, e.g., \"order-fulfillment\") */\n name: string;\n /** Human-readable description of what this workflow does */\n description?: string;\n /** The workflow handler function */\n handler: (ctx: WorkflowContext<TParams>) => Promise<TResult>;\n /** Whether the workflow is enabled (default: true) */\n enabled?: boolean;\n}\n/**\n * Context passed to workflow handlers\n */\nexport interface WorkflowContext<TParams = unknown> {\n /** Environment bindings */\n env: Env;\n /** Unique instance ID for this workflow execution */\n instanceId: string;\n /** Parameters passed when workflow was started */\n params: TParams;\n /** Step utilities for durable execution */\n step: WorkflowStepUtilities;\n /** Integration client for external service calls */\n integrations: IntegrationClient;\n /** Logger for structured workflow logging */\n logger: WorkflowLogger;\n}\n/**\n * Step utilities for durable workflow execution\n */\nexport interface WorkflowStepUtilities {\n /** Execute a step with automatic retry and persistence */\n do<T>(name: string, fn: () => Promise<T>): Promise<T>;\n do<T>(name: string, options: StepOptions, fn: () => Promise<T>): Promise<T>;\n /** Sleep for a duration (e.g., '5 minutes', '1 hour', '24 hours') */\n sleep(name: string, duration: string): Promise<void>;\n /** Sleep until a specific timestamp */\n sleepUntil(name: string, timestamp: Date): Promise<void>;\n /** Wait for an external event */\n waitForEvent<T = unknown>(name: string, options?: WaitEventOptions): Promise<T>;\n}\n/**\n * Options for step execution\n */\nexport interface StepOptions {\n retries?: {\n limit: number;\n delay: string;\n backoff?: 'constant' | 'linear' | 'exponential';\n };\n timeout?: string;\n}\n/**\n * Options for waitForEvent\n */\nexport interface WaitEventOptions {\n type?: string;\n timeout?: string;\n}\n/**\n * Logger interface for workflow execution\n */\nexport interface WorkflowLogger {\n info(message: string, data?: Record<string, unknown>): void;\n warn(message: string, data?: Record<string, unknown>): void;\n error(message: string, data?: Record<string, unknown>): void;\n}\n/**\n * State of a registered workflow\n */\nexport interface WorkflowState {\n name: string;\n description?: string;\n enabled: boolean;\n activeInstances: number;\n totalRuns: number;\n lastRun: number | null;\n lastError?: string;\n}\n/**\n * Response from workflow status API\n */\nexport interface WorkflowStatusResponse {\n workflows: WorkflowState[];\n}\n",
|
|
39
|
+
"workflows.d.ts": "import type { WorkflowDefinition } from './core-workflow-types';\n/**\n * APP_WORKFLOWS - runtime accessor for registered workflow definitions.\n * Used by internal dynamic imports in core-workflow-cloudflare and core-workflow-instance.\n * This is a getter-backed constant so it always reflects the current registry state.\n */\nexport declare const APP_WORKFLOWS: WorkflowDefinition[];\nexport { triggerWorkflow, sendWorkflowEvent, getWorkflowStatus, workflowRoutes, } from './core-workflows';\nexport type { WorkflowResult, WorkflowStatus, WorkflowInstanceInfo, WorkflowDefinition, WorkflowContext, WorkflowStepUtilities, StepOptions, WaitEventOptions, WorkflowLogger, WorkflowState, WorkflowStatusResponse, } from './core-workflows';\nexport type { NativeWorkflowStatus, NativeStepStatus, NativeStepType, NativeWorkflowError, NativeStepAttempt, NativeStepExecution, NativeWorkflowInstance, NativeWorkflowConfig, NativeStepContext, WorkflowIndexEntry, ListWorkflowsOptions, ExecuteStepRequest, ExecuteStepResponse, PendingEvent, ReceivedEvent, WorkflowInstanceStub, WorkflowCoordinatorStub, } from './core-workflow-types';\nexport { DEFAULT_WORKFLOW_CONFIG } from './core-workflow-types';\nexport { WORKFLOW_INFRA_MODE } from './core-workflow-config';\nexport { WorkflowInstanceDO } from './core-workflow-instance';\nexport { WorkflowCoordinator } from './core-workflow-coordinator';\n",
|
|
40
|
+
"core-endpoints.d.ts": "/**\n * Core Public Endpoints Framework\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides the infrastructure for exposing public API endpoints\n * that external systems can consume with API key authentication or public access.\n */\nimport { type Env } from './core-utils';\nimport { z } from 'zod';\nimport type { Hono } from 'hono';\ntype ZodSchema = z.ZodType<any, any, any>;\n/**\n * Authentication type for public endpoints\n */\nexport type EndpointAuthType = 'apiKey' | 'public';\n/**\n * HTTP methods supported by endpoints\n */\nexport type EndpointMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\n/**\n * Schema definition for endpoint validation\n */\nexport interface EndpointSchema<TQuery = unknown, TBody = unknown, TResponse = unknown> {\n /** Query parameters schema */\n query?: ZodSchema;\n /** Request body schema (for POST/PUT/PATCH) */\n body?: ZodSchema;\n /** Response schema for documentation */\n response?: ZodSchema;\n}\n/**\n * Context provided to endpoint handlers\n */\nexport interface EndpointContext<TQuery = Record<string, unknown>, TBody = unknown> {\n /** Environment bindings */\n env: Env;\n /** Original request object */\n request: Request;\n /** Validated query parameters */\n query: TQuery;\n /** Validated request body (null for GET/DELETE) */\n body: TBody | null;\n /** Path parameters extracted from URL */\n params: Record<string, string>;\n /** Authentication information */\n auth: EndpointAuthInfo;\n /** Request headers */\n headers: Headers;\n /** Logger for endpoint operations */\n logger: EndpointLogger;\n}\n/**\n * Authentication information passed to handlers\n */\nexport interface EndpointAuthInfo {\n /** Authentication type used */\n type: EndpointAuthType;\n /** API key ID (if authenticated with API key) */\n apiKeyId?: string;\n /** Scopes granted to the API key */\n scopes?: string[];\n /** Whether request is authenticated */\n authenticated: boolean;\n}\n/**\n * Logger for endpoint operations\n */\nexport interface EndpointLogger {\n info(message: string, data?: Record<string, unknown>): void;\n warn(message: string, data?: Record<string, unknown>): void;\n error(message: string, data?: Record<string, unknown>): void;\n}\n/**\n * Metadata for endpoint documentation\n */\nexport interface EndpointMeta {\n /** Human-readable description */\n description?: string;\n /** Tags for grouping in documentation */\n tags?: string[];\n /** Deprecated flag */\n deprecated?: boolean;\n /** Deprecation message */\n deprecationMessage?: string;\n}\n/**\n * Public endpoint definition\n */\nexport interface EndpointDefinition<TQuery = Record<string, unknown>, TBody = unknown, TResponse = unknown> {\n /** URL path (e.g., '/v1/todos', '/users/:id') */\n path: string;\n /** HTTP method */\n method: EndpointMethod;\n /** Authentication requirement */\n auth: EndpointAuthType;\n /** Validation schemas */\n schema?: EndpointSchema<TQuery, TBody, TResponse>;\n /** Request handler */\n handler: EndpointHandler<TQuery, TBody, TResponse>;\n /** Endpoint metadata for documentation */\n meta?: EndpointMeta;\n}\n/**\n * Endpoint handler function type\n */\nexport type EndpointHandler<TQuery = Record<string, unknown>, TBody = unknown, TResponse = unknown> = (ctx: EndpointContext<TQuery, TBody>) => Promise<TResponse>;\n/** Type guard to distinguish EndpointDefinition from function-based route registrars */\nexport declare function isEndpointDefinition(entry: unknown): entry is EndpointDefinition;\n/**\n * Internal: Parsed endpoint info from request headers\n */\nexport interface ParsedEndpointRequest {\n endpointId: string;\n appId: string;\n authType: EndpointAuthType;\n apiKeyId?: string;\n scopes?: string[];\n}\n/**\n * Create a JSON response\n */\nexport declare function jsonResponse<T>(data: T, status?: number): Response;\n/**\n * Create an error response\n */\nexport declare function errorResponse(message: string, status?: number, code?: string): Response;\n/**\n * Convert Zod schema to JSON Schema for documentation\n * This is a simplified conversion that handles common cases\n */\nexport declare function zodToJsonSchema(schema: ZodSchema | undefined): Record<string, unknown> | undefined;\n/**\n * Endpoint router that matches requests to handlers\n */\nexport declare class EndpointRouter {\n private endpoints;\n /**\n * Register endpoints\n */\n register(endpoints: EndpointDefinition<unknown, unknown, unknown>[]): void;\n /**\n * Find endpoint matching the request\n */\n findEndpoint(method: string, path: string): {\n endpoint: EndpointDefinition<unknown, unknown, unknown>;\n params: Record<string, string>;\n } | null;\n /**\n * Get all registered endpoints for documentation\n */\n getAllEndpoints(): EndpointDefinition<unknown, unknown, unknown>[];\n}\n/**\n * Mount an EndpointDefinition as a native Hono route.\n *\n * Registers the endpoint at its natural path using the correct HTTP method,\n * with Zod validation for query/body schemas and full EndpointContext support.\n * This allows EndpointDefinition entries in APP_ROUTES to work as first-class\n * Hono routes with middleware, streaming, and WebSocket support intact.\n */\nexport declare function mountEndpointAsHonoRoute(app: Hono<{\n Bindings: Env;\n}>, endpoint: EndpointDefinition): void;\n/**\n * Handle an incoming public endpoint request.\n * Called by the platform when routing requests to the app.\n */\nexport declare function handleEndpointRequest<TQuery = unknown, TBody = unknown, TResponse = unknown>(request: Request, env: Env, endpoints: EndpointDefinition<TQuery, TBody, TResponse>[]): Promise<Response>;\n/**\n * Custom error for endpoint handlers\n * Use this to return specific HTTP status codes\n */\nexport declare class EndpointError extends Error {\n status: number;\n code?: string | undefined;\n constructor(message: string, status?: number, code?: string | undefined);\n static badRequest(message: string): EndpointError;\n static unauthorized(message?: string): EndpointError;\n static forbidden(message?: string): EndpointError;\n static notFound(message?: string): EndpointError;\n static conflict(message: string): EndpointError;\n}\n/**\n * Convert endpoint definition to registration data for workspace\n */\nexport declare function endpointToRegistration<TQuery = unknown, TBody = unknown, TResponse = unknown>(endpoint: EndpointDefinition<TQuery, TBody, TResponse>): {\n path: string;\n method: EndpointMethod;\n auth: EndpointAuthType;\n description?: string;\n tags?: string[];\n schema?: {\n query?: Record<string, unknown>;\n body?: Record<string, unknown>;\n response?: Record<string, unknown>;\n };\n};\nexport {};\n",
|
|
41
|
+
"core-utils.d.ts": "/**\n * Core Utilities\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides:\n * - Env type: Environment bindings for Cloudflare Workers\n * - API helpers: Response utilities for Hono routes\n *\n * Entity System: See core-entities.ts\n * Workspace Context: See core-workspace.ts\n * Scheduler: See core-scheduler.ts\n */\nimport type { Context } from 'hono';\nimport type { EntityDO } from './core-entity-do';\nimport type { SchedulerDO } from './core-scheduler';\nimport type { BaseAgent } from './core-base-agent';\n/**\n * Environment bindings for Cloudflare Workers\n */\nexport interface Env {\n EntityDO: DurableObjectNamespace<EntityDO>;\n SchedulerDO: DurableObjectNamespace<SchedulerDO>;\n BaseAgent?: DurableObjectNamespace<BaseAgent>;\n WorkspaceObject?: DurableObjectNamespace;\n WorkflowInstance: DurableObjectNamespace;\n WorkflowCoordinator: DurableObjectNamespace;\n BUCKET?: R2Bucket;\n WORKSPACE_ID?: string;\n APP_ID?: string;\n APP_NAME?: string;\n WORKSPACE_API_URL?: string;\n WORKSPACE_API_BASE_URL?: string;\n WORKSPACE_API_KEY?: string;\n DEPLOYMENT_MODE?: 'preview' | 'production';\n VITE_DEPLOYMENT_MODE?: 'preview' | 'production';\n RUNWORK_AI_PROXY_URL?: string;\n RUNWORK_PROXY_TOKEN?: string;\n INTEGRATIONS_PROXY_URL?: string;\n ALLOWED_ORIGINS?: string;\n}\n/**\n * Return a successful JSON response.\n * Returns the data directly as the response body with 200 status.\n */\nexport declare const ok: <T>(c: Context, data: T) => Response & import(\"hono\").TypedResponse<{\n [x: string]: import(\"hono/utils/types\").JSONValue;\n}, import(\"hono/utils/http-status\").ContentfulStatusCode, \"json\">;\n/**\n * Return a 400 Bad Request response\n * Automatically logs the error for debugging in production logs\n */\nexport declare const bad: (c: Context, error: string) => Response & import(\"hono\").TypedResponse<{\n error: string;\n}, 400, \"json\">;\n/**\n * Return a 404 Not Found response\n * Automatically logs the error for debugging in production logs\n */\nexport declare const notFound: (c: Context, error?: string) => Response & import(\"hono\").TypedResponse<{\n error: string;\n}, 404, \"json\">;\n/**\n * Type guard for non-empty strings\n */\nexport declare const isStr: (s: unknown) => s is string;\n/**\n * Safely clone a value for Durable Object storage.\n * Strips non-serializable references (R2Bucket, D1Database, DO stubs, etc.)\n * that would cause structured clone to fail in ctx.storage.put().\n */\nexport declare function safeClone<T>(value: T, fallback?: T): T;\nexport declare function platformFetch(env: Env, url: string | URL, init?: RequestInit): Promise<Response>;\n/**\n * Workspace API fetch - routes workspace service requests through WorkspaceObject DO\n * for production WfP workers, avoiding 522 recursive invocation errors.\n *\n * Workers for Platforms workers cannot HTTP-fetch back to their dispatcher domain.\n * This routes through the WorkspaceObject DO binding in production, and falls back\n * to standard HTTP with x-workspace-key auth header in preview/sandbox.\n *\n * @param env - Environment with workspace bindings\n * @param path - Workspace API sub-path (e.g., '/ingest-event')\n * @param init - Standard fetch options\n */\nexport declare function workspaceApiFetch(env: Pick<Env, 'WORKSPACE_API_URL' | 'WORKSPACE_API_KEY' | 'WORKSPACE_ID' | 'DEPLOYMENT_MODE' | 'WorkspaceObject'>, path: string, init?: RequestInit): Promise<Response>;\n",
|
|
35
42
|
"vite.d.ts": "import { defineConfig, type Plugin } from \"vite\";\nexport interface RunworkPluginOptions {\n /**\n * Override the detected mode. By default, the plugin detects sandbox mode\n * when DEPLOYMENT_MODE or WORKSPACE_ID environment variables are present.\n */\n mode?: \"sandbox\" | \"local\";\n /**\n * Root directory of the project. Defaults to process.cwd().\n */\n root?: string;\n /**\n * Path aliases to configure. Defaults to { \"@\": \"./src\", \"@shared\": \"./shared\" }.\n */\n aliases?: Record<string, string>;\n /**\n * Whether to use JSON logging (pino) in sandbox mode.\n * Defaults to true when VITE_LOGGER_TYPE=json.\n */\n jsonLogger?: boolean;\n}\nexport declare function runwork(options?: RunworkPluginOptions): ReturnType<typeof defineConfig>;\nexport type { Plugin };\n",
|
|
43
|
+
"core-channels.d.ts": "/**\n * Core Channels\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides:\n * - postToChannel(): Post rich markdown messages to workspace channels\n *\n * Channels are auto-created if they don't exist, with automatic app event filtering.\n * When running outside a workspace (standalone mode), calls are silently skipped.\n */\nexport interface PostToChannelParams {\n /** Channel name (e.g., \"#inventory-alerts\" or \"inventory-alerts\"). Auto-normalized: # stripped, lowercased, trimmed. */\n channel: string;\n /** Markdown message content */\n content: string;\n /** Optional structured metadata attached to the message */\n metadata?: Record<string, unknown>;\n}\ninterface ChannelEnv {\n WORKSPACE_API_URL?: string;\n WORKSPACE_API_KEY?: string;\n WORKSPACE_ID?: string;\n APP_ID?: string;\n APP_NAME?: string;\n DEPLOYMENT_MODE?: 'preview' | 'production';\n WorkspaceObject?: DurableObjectNamespace;\n}\n/**\n * Any context that supports waitUntil - compatible with both\n * ExecutionContext (Hono route handlers) and DurableObjectState (DOs).\n */\ntype WaitUntilContext = Pick<ExecutionContext, 'waitUntil'>;\n/**\n * Post a rich markdown message to a workspace channel.\n * Fire-and-forget: uses ctx.waitUntil so it doesn't block the response.\n * Silently skips if workspace env vars are not configured (standalone mode).\n *\n * Channels are auto-created on first use. The channel will automatically\n * include this app's system events via filter projection.\n */\nexport declare function postToChannel(ctx: WaitUntilContext, env: ChannelEnv, params: PostToChannelParams): void;\nexport {};\n",
|
|
36
44
|
"core-entity-do.d.ts": "/**\n * Core Entity Durable Object - SQL Storage\n * DO NOT MODIFY THIS FILE - You may break the entity functionality\n *\n * EntityDO is the per-app entity storage system backed by native SQLite.\n * All entities of the same type share one DO instance, keyed by entity ID.\n *\n * Features:\n * - SQL-backed document storage with versioning (CAS operations)\n * - Server-side query, search, sort, count via json_extract()\n * - Security: field name validation, LIKE escaping, input limits\n * - Auto-migration from legacy KV storage\n *\n * NO SCHEDULING - Use SchedulerDO for scheduled jobs\n */\nimport { DurableObject } from 'cloudflare:workers';\nimport type { Env } from './core-utils';\nexport declare const SAFE_FIELD_NAME: RegExp;\nexport declare function validateFieldName(field: string): string;\nexport declare function escapeLikePattern(input: string): string;\nexport declare const QUERY_LIMITS: {\n MAX_SEARCH_LENGTH: number;\n MAX_FILTER_COUNT: number;\n MAX_SEARCH_FIELDS: number;\n MAX_LIMIT: number;\n MAX_DATA_SIZE: number;\n};\ninterface QueryOptions {\n limit?: number;\n offset?: number;\n cursor?: string | null;\n filters?: Record<string, unknown>;\n search?: {\n query: string;\n fields: string[];\n };\n sort?: {\n field: string;\n order: 'asc' | 'desc';\n };\n}\ninterface QueryResult {\n items: Array<{\n key: string;\n v: number;\n data: unknown;\n }>;\n total: number;\n hasMore: boolean;\n next: string | null;\n}\n/**\n * Versioned document type for entity storage\n */\nexport type Doc<T> = {\n v: number;\n data: T;\n};\n/**\n * EntityDO - Per-app entity storage with SQL queries\n *\n * This Durable Object provides:\n * - Document storage with optimistic concurrency (CAS) via SQLite\n * - Query with search, sort, filter, pagination via json_extract()\n * - Count with optional filters\n * - Security validation on all field names\n */\nexport declare class EntityDO extends DurableObject<Env> {\n ctx: DurableObjectState;\n env: Env;\n private _tableReady;\n private _migrationDone;\n constructor(ctx: DurableObjectState, env: Env);\n private ensureTable;\n private migrateFromKV;\n getDoc(key: string): {\n v: number;\n data: unknown;\n } | null;\n casPut(key: string, expectedV: number, data: unknown): {\n ok: boolean;\n v: number;\n };\n del(key: string): boolean;\n has(key: string): boolean;\n queryEntities(options?: QueryOptions): QueryResult;\n countEntities(filters?: Record<string, unknown>): number;\n bulkCreate(items: Array<{\n key: string;\n data: unknown;\n }>): Array<{\n key: string;\n v: number;\n data: unknown;\n }>;\n bulkUpdate(updates: Array<{\n key: string;\n data: Record<string, unknown>;\n }>): Array<{\n key: string;\n ok: boolean;\n v: number;\n data: unknown;\n }>;\n bulkDelete(keys: string[]): number;\n exportAll(): Array<{\n key: string;\n v: number;\n data: unknown;\n }>;\n importAll(items: Array<{\n key: string;\n v: number;\n data: unknown;\n }>): {\n imported: number;\n };\n}\nexport {};\n",
|
|
37
|
-
"
|
|
38
|
-
"core-workflow-config.d.ts": "/**\n * Workflow Configuration\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This platform uses native DO-based workflows exclusively.\n * Cloudflare Workflows mode was removed because CF Workflows\n * do not support Workers for Platforms.\n *\n * For workflow implementation, see:\n * - core-workflow-instance.ts (WorkflowInstance DO)\n * - core-workflow-coordinator.ts (WorkflowCoordinator DO)\n * - core-workflows.ts (public API)\n */\n/**\n * Workflow infrastructure mode - always 'native'.\n * Kept for backward compatibility.\n */\nexport declare const WORKFLOW_INFRA_MODE: \"native\";\n",
|
|
39
|
-
"endpoints.d.ts": "export { isEndpointDefinition, jsonResponse, errorResponse, zodToJsonSchema, EndpointRouter, mountEndpointAsHonoRoute, handleEndpointRequest, EndpointError, endpointToRegistration, } from './core-endpoints';\nexport type { EndpointAuthType, EndpointMethod, EndpointSchema, EndpointContext, EndpointAuthInfo, EndpointLogger, EndpointMeta, EndpointDefinition, EndpointHandler, ParsedEndpointRequest, } from './core-endpoints';\n",
|
|
40
|
-
"scheduler.d.ts": "export { parseCronExpression, calculateNextRun, SchedulerDO, initializeScheduler, schedulerRoutes, } from './core-scheduler';\nexport type { ScheduledJob, JobContext, JobResult, JobLogger, JobRunRecord, ScheduleState, SchedulerRegistry, ScheduleStatusResponse, } from './core-scheduler';\n",
|
|
41
|
-
"core-integrations.d.ts": "/**\n * Core Integration Utilities\n * DO NOT MODIFY THIS FILE - You may break the integration functionality\n *\n * This module provides utilities for making API calls to third-party services\n * through the platform's multi-provider integration system.\n *\n * Supported providers:\n * - Nango: Self-hosted OAuth for 200+ APIs\n * - Pipedream: Managed OAuth clients for business apps\n * - AyrShare: Social media (Instagram, TikTok, Facebook, Twitter, etc.)\n *\n * Provider routing is automatic - the code is provider-agnostic.\n * Use the IntegrationClient class to interact with connected third-party services.\n */\nimport { type Env } from './core-utils';\nimport type { NangoActionResponse, NangoProxyOptions } from './shared/core-types';\nexport type { NangoActionResponse, NangoProxyOptions, };\n/**\n * Integration requirement definition\n * Used in integration-requirements.ts to declare which integrations your app needs\n */\nexport interface IntegrationRequirement {\n /** Integration provider ID (e.g., 'github', 'slack', 'hubspot') */\n integrationId: string;\n /** Why this integration is needed */\n reason: string;\n /** Whether the app cannot function without this integration */\n required: boolean;\n}\n/**\n * IntegrationClient - Wrapper for making API calls through Nango proxy\n *\n * Nango handles OAuth authentication and proxies requests to external APIs.\n *\n * For structured data access, prefer IntegrationEntity classes from './core-integration-entities'.\n *\n * @example\n * ```typescript\n * const client = new IntegrationClient(env);\n *\n * // GET request to HubSpot API\n * const contacts = await client.proxy<{ results: Contact[] }>({\n * method: 'GET',\n * endpoint: '/crm/v3/objects/contacts',\n * providerConfigKey: 'hubspot'\n * });\n *\n * // POST request to create a GitHub issue\n * const issue = await client.proxy({\n * method: 'POST',\n * endpoint: '/repos/owner/repo/issues',\n * providerConfigKey: 'github',\n * data: { title: 'New Issue', body: 'Issue description' }\n * });\n * ```\n */\nexport declare class IntegrationClient {\n private env;\n private readonly proxyUrl;\n private readonly proxyToken;\n constructor(env: Env);\n /**\n * Fire-and-forget event emission for integration activity.\n * Does not require waitUntil context - errors are silently swallowed.\n */\n private fireEvent;\n /**\n * Check if integrations are configured\n */\n isConfigured(): boolean;\n /**\n * Check if a specific integration has a connection configured.\n * The proxy resolves connections dynamically, so this returns true\n * when the proxy is configured even without explicit env vars.\n */\n hasConnection(provider: string): boolean;\n /**\n * Normalize integration ID to canonical form for env var lookup.\n * MUST be identical to platform's normalizeIntegrationId() in provider-config.ts.\n *\n * Strips provider prefixes (pd_, nango_, ayrshare_), common suffixes (-demo, _v1),\n * and removes all separators for consistent cross-provider matching.\n *\n * Examples:\n * - \"pd_sendgrid\" -> \"sendgrid\"\n * - \"google-drive\" -> \"googledrive\"\n * - \"pd_google_drive\" -> \"googledrive\"\n * - \"hubspot-demo\" -> \"hubspot\"\n */\n private normalizeIntegrationId;\n private getWorkspaceIntegrationId;\n private getLegacyConnectionId;\n /**\n * Make a request to external API via platform proxy.\n * Uses platformFetch which routes through WorkspaceObject DO in production\n * to avoid 522 timeouts from WfP workers.\n */\n private makeRequest;\n /**\n * Make a proxy request to an external API through the integration proxy.\n * Use this for all API calls to connected third-party services.\n * Supports multiple providers (Nango, Pipedream, AyrShare) - routing is automatic.\n *\n * @example\n * ```typescript\n * // GET request\n * const result = await client.proxy<{ results: Contact[] }>({\n * method: 'GET',\n * endpoint: '/crm/v3/objects/contacts',\n * providerConfigKey: 'hubspot'\n * });\n *\n * // POST request with data\n * const result = await client.proxy({\n * method: 'POST',\n * endpoint: '/repos/owner/repo/issues',\n * providerConfigKey: 'github',\n * data: { title: 'Bug Report', body: 'Description' }\n * });\n * ```\n */\n proxy<T = unknown>(options: NangoProxyOptions): Promise<NangoActionResponse<T>>;\n}\n/**\n * Create an integration client instance\n *\n * @example\n * ```typescript\n * import { createIntegrationClient } from './core-integrations';\n *\n * app.get('/api/hubspot/contacts', async (c) => {\n * const client = createIntegrationClient(c.env);\n * const result = await client.proxy<{ results: Contact[] }>({\n * method: 'GET',\n * endpoint: '/crm/v3/objects/contacts',\n * providerConfigKey: 'hubspot'\n * });\n * return c.json(result);\n * });\n * ```\n */\nexport declare function createIntegrationClient(env: Env): IntegrationClient;\n",
|
|
42
|
-
"types.d.ts": "export type { ApiResponse, NangoActionResponse, NangoProxyOptions, FileMetadata, UploadOptions, DownloadOptions, ListFilesOptions, ListFilesResult, PresignedUrlRequest, PresignedUrlResponse, } from './shared/core-types';\n",
|
|
43
|
-
"task-delegation.d.ts": "export { agentTaskToolSchema, runAgentTask, getAgentTaskStatus } from './task-delegation/index';\nexport type { AgentTaskResult, AgentTaskInputFile, AgentTaskOutputFile, AgentTaskUsage, ExecutionLimits, AgentTaskExecution, RunAgentTaskOptions, } from './task-delegation/types';\n",
|
|
44
|
-
"core-workflow-instance.d.ts": "/**\n * WorkflowInstance Durable Object - Native Workflow Engine\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * One instance per workflow execution. Uses alarm-based execution\n * to bypass the 30-second CPU limit and provide durability.\n */\nimport { DurableObject } from 'cloudflare:workers';\nimport type { NativeWorkflowInstance, NativeWorkflowConfig } from './core-workflow-types';\nimport type { StepOptions, WaitEventOptions } from './core-workflows';\nimport { type Env } from './core-utils';\n/**\n * WorkflowInstance Durable Object\n *\n * Manages the execution of a single workflow instance.\n * Uses alarm chaining for step execution to bypass CPU limits.\n */\nexport declare class WorkflowInstanceDO extends DurableObject<Env> {\n private instance;\n private definition;\n private stepCounter;\n /**\n * Create and start a new workflow instance\n */\n create(workflowName: string, input: unknown, instanceId: string, config?: Partial<NativeWorkflowConfig>, metadata?: Record<string, unknown>): Promise<void>;\n /**\n * Get current workflow status\n */\n getStatus(): Promise<NativeWorkflowInstance | null>;\n /**\n * Signal the workflow with an event (for waitForEvent steps)\n */\n signal(eventType: string, payload: unknown): Promise<void>;\n /**\n * Pause the workflow\n */\n pause(): Promise<void>;\n /**\n * Resume a paused workflow\n */\n resume(): Promise<void>;\n /**\n * Cancel the workflow\n */\n cancel(): Promise<void>;\n /**\n * Alarm handler - main execution loop\n */\n alarm(): Promise<void>;\n /**\n * Execute the workflow handler\n */\n private executeWorkflow;\n /**\n * Execute or retrieve cached result for a step\n */\n executeStep<T>(name: string, options: StepOptions | undefined, fn: () => Promise<T>): Promise<T>;\n /**\n * Sleep for a duration\n */\n executeSleep(name: string, duration: string): Promise<void>;\n /**\n * Sleep until a specific timestamp\n */\n executeSleepUntil(name: string, timestamp: Date): Promise<void>;\n /**\n * Wait for an external event\n */\n executeWaitForEvent<T>(name: string, options?: WaitEventOptions): Promise<T>;\n private ensureLoaded;\n private persist;\n private isTerminal;\n private isTimedOut;\n private getCurrentStep;\n private transitionTo;\n private notifyCoordinator;\n private generateStepId;\n private parseDuration;\n private calculateBackoff;\n private executeWithTimeout;\n private normalizeError;\n}\n",
|
|
45
|
-
"core-file-storage.d.ts": "/**\n * Core File Storage Utilities for R2\n * DO NOT MODIFY THIS FILE - You may break the project functionality\n *\n * This module provides the FileStorageClient class for R2 bucket operations.\n * Use the FileStorageClient to upload, download, delete, and list files.\n * Presigned URLs are generated via the platform API (vibe-apps don't have R2 credentials).\n */\nimport { type Env } from './core-utils';\nimport type { FileMetadata, UploadOptions, DownloadOptions, ListFilesOptions, ListFilesResult, PresignedUrlRequest, PresignedUrlResponse } from './shared/core-types';\nexport type { FileMetadata, UploadOptions, DownloadOptions, ListFilesOptions, ListFilesResult, PresignedUrlRequest, PresignedUrlResponse, };\n/**\n * FileStorageClient - Wrapper for R2 bucket operations\n *\n * Use this client to:\n * - Upload files directly to R2 (for smaller files via worker)\n * - Download files directly from R2\n * - List and manage files in the bucket\n * - Get presigned URLs for direct R2 access (via platform API)\n *\n * @example\n * ```typescript\n * const storage = createFileStorageClient(env);\n *\n * // Upload a file\n * const metadata = await storage.upload(fileData, {\n * name: 'document.pdf',\n * contentType: 'application/pdf'\n * });\n *\n * // Get presigned URL for large file download\n * const { url } = await storage.getPresignedDownloadUrl('path/to/file.pdf');\n *\n * // List files\n * const { files, cursor } = await storage.list({ prefix: 'uploads/' });\n * ```\n */\nexport declare class FileStorageClient {\n private env;\n private readonly bucket;\n private readonly platformBaseUrl;\n private readonly workspaceApiKey;\n private readonly appId;\n constructor(env: Env);\n private extractOrigin;\n /**\n * Check if file storage is configured (R2 bucket bound)\n */\n isConfigured(): boolean;\n /**\n * Check if presigned URL generation is available (platform API configured)\n */\n canGeneratePresignedUrls(): boolean;\n /**\n * Generate a unique key for file storage\n */\n private generateKey;\n /**\n * Upload a file to R2\n * For smaller files that can be processed through the worker.\n * For large files, use getPresignedUploadUrl() for direct R2 upload.\n *\n * @example\n * ```typescript\n * const metadata = await storage.upload(fileBuffer, {\n * name: 'report.pdf',\n * contentType: 'application/pdf',\n * customMetadata: { department: 'sales' }\n * });\n * console.log('Uploaded:', metadata.key);\n * ```\n */\n upload(data: ReadableStream | ArrayBuffer | string | Blob, options?: UploadOptions): Promise<FileMetadata>;\n /**\n * Download a file from R2\n * Returns the R2ObjectBody which includes the body stream and metadata.\n *\n * @example\n * ```typescript\n * const object = await storage.download('path/to/file.pdf');\n * if (object) {\n * return new Response(object.body, {\n * headers: { 'Content-Type': object.httpMetadata?.contentType || 'application/octet-stream' }\n * });\n * }\n * ```\n */\n download(key: string, options?: DownloadOptions): Promise<R2ObjectBody | null>;\n /**\n * Delete a file from R2\n * Returns true if the file existed, false otherwise.\n *\n * @example\n * ```typescript\n * const deleted = await storage.delete('path/to/file.pdf');\n * console.log(deleted ? 'File deleted' : 'File did not exist');\n * ```\n */\n delete(key: string): Promise<boolean>;\n /**\n * Delete multiple files from R2\n *\n * @example\n * ```typescript\n * await storage.deleteMany(['file1.pdf', 'file2.pdf', 'file3.pdf']);\n * ```\n */\n deleteMany(keys: string[]): Promise<void>;\n /**\n * List files in R2 with optional prefix and pagination\n *\n * @example\n * ```typescript\n * // List all files in uploads/ folder\n * const { files, cursor, truncated } = await storage.list({\n * prefix: 'uploads/',\n * limit: 100\n * });\n *\n * // Paginate through results\n * if (truncated && cursor) {\n * const nextPage = await storage.list({ prefix: 'uploads/', cursor });\n * }\n * ```\n */\n list(options?: ListFilesOptions): Promise<ListFilesResult>;\n /**\n * Get file metadata without downloading the file content\n *\n * @example\n * ```typescript\n * const metadata = await storage.getMetadata('path/to/file.pdf');\n * if (metadata) {\n * console.log(`File size: ${metadata.size} bytes`);\n * }\n * ```\n */\n getMetadata(key: string): Promise<FileMetadata | null>;\n /**\n * Check if a file exists in R2\n *\n * @example\n * ```typescript\n * if (await storage.exists('path/to/file.pdf')) {\n * console.log('File exists');\n * }\n * ```\n */\n exists(key: string): Promise<boolean>;\n /**\n * Get a presigned URL for uploading a file directly to R2\n * The URL is generated by the platform API (vibe-apps don't have R2 credentials).\n * Use this for large file uploads to avoid worker memory/CPU limits.\n *\n * @example\n * ```typescript\n * const { url, expiresAt } = await storage.getPresignedUploadUrl('uploads/large-video.mp4', {\n * contentType: 'video/mp4',\n * expiresIn: 3600 // 1 hour\n * });\n *\n * // Client can now PUT directly to this URL\n * await fetch(url, { method: 'PUT', body: fileData });\n * ```\n */\n getPresignedUploadUrl(key: string, options?: {\n contentType?: string;\n expiresIn?: number;\n }): Promise<PresignedUrlResponse>;\n /**\n * Get a presigned URL for downloading a file directly from R2\n * The URL is generated by the platform API (vibe-apps don't have R2 credentials).\n * Use this for large file downloads to avoid worker memory/CPU limits.\n *\n * @example\n * ```typescript\n * const { url, expiresAt } = await storage.getPresignedDownloadUrl('path/to/large-file.zip');\n *\n * // Redirect user to presigned URL or return it to client\n * return Response.redirect(url, 302);\n * ```\n */\n getPresignedDownloadUrl(key: string, options?: {\n expiresIn?: number;\n }): Promise<PresignedUrlResponse>;\n}\n/**\n * Create a FileStorageClient instance\n *\n * @example\n * ```typescript\n * import { createFileStorageClient } from './core-file-storage';\n *\n * app.post('/api/files/upload', async (c) => {\n * const storage = createFileStorageClient(c.env);\n * const formData = await c.req.formData();\n * const file = formData.get('file') as File;\n *\n * const metadata = await storage.upload(file.stream(), {\n * name: file.name,\n * contentType: file.type\n * });\n *\n * return c.json({ success: true, data: metadata });\n * });\n * ```\n */\nexport declare function createFileStorageClient(env: Env): FileStorageClient;\nimport type { Hono } from 'hono';\n/**\n * Mount file storage routes on the Hono app\n * Provides REST API for R2 bucket operations\n */\nexport declare function fileStorageRoutes(app: Hono<{\n Bindings: Env;\n}>): void;\n"
|
|
45
|
+
"storage.d.ts": "export { FileStorageClient, createFileStorageClient, fileStorageRoutes, } from './core-file-storage';\nexport type { FileMetadata, UploadOptions, DownloadOptions, ListFilesOptions, ListFilesResult, PresignedUrlRequest, PresignedUrlResponse, } from './core-file-storage';\n"
|
|
46
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.13.
|
|
1
|
+
export declare const VERSION = "0.13.3";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Auto-generated by scripts/embed-types.ts -- do not edit
|
|
2
|
-
export const VERSION = "0.13.
|
|
2
|
+
export const VERSION = "0.13.3";
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED