@opperai/agents 0.2.0 → 0.3.0-beta.1

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/index.d.cts CHANGED
@@ -1013,6 +1013,28 @@ declare abstract class BaseAgent<TInput = unknown, TOutput = unknown> {
1013
1013
  * Opper client configuration
1014
1014
  */
1015
1015
  protected readonly opperConfig: OpperClientConfig;
1016
+ /**
1017
+ * Creates a new BaseAgent instance
1018
+ *
1019
+ * @param config - Agent configuration object
1020
+ * @param config.name - Unique name identifying this agent (required)
1021
+ * @param config.description - Human-readable description of the agent's purpose
1022
+ * @param config.instructions - System instructions guiding agent behavior
1023
+ * @param config.tools - Array of tools or tool providers available to the agent
1024
+ * @param config.maxIterations - Maximum iterations before terminating the agent loop (default: 25)
1025
+ * @param config.model - Model identifier(s). Single model or array for fallback (default: "gcp/gemini-flash-latest")
1026
+ * @param config.inputSchema - Zod schema for input validation
1027
+ * @param config.outputSchema - Zod schema for output validation
1028
+ * @param config.enableStreaming - Enable Opper streaming APIs for LLM calls (default: false)
1029
+ * @param config.enableMemory - Enable memory subsystem (default: false)
1030
+ * @param config.memory - Custom memory implementation (defaults to InMemoryStore if enableMemory is true)
1031
+ * @param config.metadata - Additional metadata for the agent
1032
+ * @param config.opperConfig - Opper API configuration containing apiKey and baseUrl
1033
+ * @param config.onStreamStart - Handler invoked when a streaming call starts
1034
+ * @param config.onStreamChunk - Handler invoked for each streaming chunk
1035
+ * @param config.onStreamEnd - Handler invoked when a streaming call ends
1036
+ * @param config.onStreamError - Handler invoked when streaming encounters an error
1037
+ */
1016
1038
  constructor(config: BaseAgentConfig<TInput, TOutput>);
1017
1039
  /**
1018
1040
  * Initialize memory subsystem with graceful degradation
@@ -1290,6 +1312,7 @@ interface CreateSpanOptions {
1290
1312
  name: string;
1291
1313
  input?: unknown;
1292
1314
  parentSpanId?: string;
1315
+ type?: string;
1293
1316
  }
1294
1317
  /**
1295
1318
  * Retry configuration
@@ -1344,6 +1367,10 @@ declare class OpperClient {
1344
1367
  */
1345
1368
  updateSpan(spanId: string, output: unknown, options?: {
1346
1369
  error?: string;
1370
+ startTime?: Date;
1371
+ endTime?: Date;
1372
+ meta?: Record<string, unknown>;
1373
+ name?: string;
1347
1374
  }): Promise<void>;
1348
1375
  /**
1349
1376
  * Get the underlying Opper client
@@ -1375,7 +1402,33 @@ declare function createOpperClient(apiKey?: string, options?: {
1375
1402
  }): OpperClient;
1376
1403
 
1377
1404
  /**
1378
- * Configuration for the core Agent
1405
+ * Configuration for the core Agent.
1406
+ *
1407
+ * Extends {@link BaseAgentConfig} with additional options for Opper client, logging, and verbosity.
1408
+ *
1409
+ * @template TInput - The expected input type for the agent
1410
+ * @template TOutput - The expected output type from the agent
1411
+ *
1412
+ * @property {string} name - Unique name identifying this agent (required)
1413
+ * @property {string} [description] - Human-readable description of the agent's purpose
1414
+ * @property {string} [instructions] - System instructions guiding agent behavior
1415
+ * @property {Array<Tool<any, any> | ToolProvider>} [tools] - Tools available to the agent
1416
+ * @property {number} [maxIterations=25] - Maximum iterations before terminating
1417
+ * @property {string | readonly string[]} [model='gcp/gemini-flash-latest'] - Model identifier(s)
1418
+ * @property {ZodType<TInput>} [inputSchema] - Zod schema for input validation
1419
+ * @property {ZodType<TOutput>} [outputSchema] - Zod schema for output validation
1420
+ * @property {boolean} [enableStreaming=false] - Enable streaming for LLM calls
1421
+ * @property {boolean} [enableMemory=false] - Enable memory subsystem
1422
+ * @property {Memory} [memory] - Custom memory implementation
1423
+ * @property {Record<string, unknown>} [metadata] - Additional metadata
1424
+ * @property {OpperClientConfig} [opperConfig] - Opper API configuration (apiKey, baseUrl)
1425
+ * @property {OpperClient} [opperClient] - Custom Opper client instance
1426
+ * @property {AgentLogger} [logger] - Logger instance for debugging
1427
+ * @property {boolean} [verbose=false] - Enable verbose logging
1428
+ * @property {Function} [onStreamStart] - Handler invoked when streaming starts
1429
+ * @property {Function} [onStreamChunk] - Handler invoked for each streaming chunk
1430
+ * @property {Function} [onStreamEnd] - Handler invoked when streaming ends
1431
+ * @property {Function} [onStreamError] - Handler invoked on streaming errors
1379
1432
  */
1380
1433
  interface AgentConfig<TInput, TOutput> extends BaseAgentConfig<TInput, TOutput> {
1381
1434
  /**
@@ -1383,22 +1436,86 @@ interface AgentConfig<TInput, TOutput> extends BaseAgentConfig<TInput, TOutput>
1383
1436
  */
1384
1437
  opperClient?: OpperClient;
1385
1438
  /**
1386
- * Logger instance
1439
+ * Logger instance for debugging and monitoring
1387
1440
  */
1388
1441
  logger?: AgentLogger;
1389
1442
  /**
1390
- * Verbose logging
1443
+ * Enable verbose logging (default: false)
1391
1444
  */
1392
1445
  verbose?: boolean;
1393
1446
  }
1394
1447
  /**
1395
1448
  * Core Agent implementation with "while tools > 0" loop.
1396
1449
  * Implements think → tool execution → memory handling cycle.
1450
+ *
1451
+ * @template TInput - The expected input type for the agent
1452
+ * @template TOutput - The expected output type from the agent
1453
+ *
1454
+ * @example
1455
+ * ```typescript
1456
+ * import { Agent } from 'opperai-agent-sdk-node';
1457
+ *
1458
+ * const agent = new Agent({
1459
+ * name: 'my-agent',
1460
+ * instructions: 'You are a helpful assistant',
1461
+ * model: 'gpt-4',
1462
+ * tools: [myTool],
1463
+ * maxIterations: 10,
1464
+ * enableMemory: true,
1465
+ * });
1466
+ *
1467
+ * const result = await agent.process('Hello!');
1468
+ * ```
1469
+ *
1470
+ * @example
1471
+ * ```typescript
1472
+ * // With typed input/output and schemas
1473
+ * import { Agent } from 'opperai-agent-sdk-node';
1474
+ * import { z } from 'zod';
1475
+ *
1476
+ * const inputSchema = z.object({ query: z.string() });
1477
+ * const outputSchema = z.object({ answer: z.string(), confidence: z.number() });
1478
+ *
1479
+ * const agent = new Agent<
1480
+ * z.infer<typeof inputSchema>,
1481
+ * z.infer<typeof outputSchema>
1482
+ * >({
1483
+ * name: 'typed-agent',
1484
+ * instructions: 'Answer questions with confidence scores',
1485
+ * inputSchema,
1486
+ * outputSchema,
1487
+ * });
1488
+ * ```
1397
1489
  */
1398
1490
  declare class Agent<TInput = unknown, TOutput = unknown> extends BaseAgent<TInput, TOutput> {
1399
1491
  private readonly opperClient;
1400
1492
  private readonly logger;
1401
1493
  private readonly verbose;
1494
+ /**
1495
+ * Creates a new Agent instance
1496
+ *
1497
+ * @param config - Agent configuration object
1498
+ * @param config.name - Unique name identifying this agent (required)
1499
+ * @param config.description - Human-readable description of the agent's purpose
1500
+ * @param config.instructions - System instructions guiding agent behavior
1501
+ * @param config.tools - Array of tools or tool providers available to the agent
1502
+ * @param config.maxIterations - Maximum iterations before terminating (default: 25)
1503
+ * @param config.model - Model identifier(s) as string or array for fallback (default: "gcp/gemini-flash-latest")
1504
+ * @param config.inputSchema - Zod schema for input validation
1505
+ * @param config.outputSchema - Zod schema for output validation
1506
+ * @param config.enableStreaming - Enable streaming for LLM calls (default: false)
1507
+ * @param config.enableMemory - Enable memory subsystem (default: false)
1508
+ * @param config.memory - Custom memory implementation (defaults to InMemoryStore if enableMemory is true)
1509
+ * @param config.metadata - Additional metadata for the agent
1510
+ * @param config.opperConfig - Opper API configuration (apiKey, baseUrl)
1511
+ * @param config.opperClient - Custom Opper client instance (for testing or custom configuration)
1512
+ * @param config.logger - Logger instance for debugging
1513
+ * @param config.verbose - Enable verbose logging (default: false)
1514
+ * @param config.onStreamStart - Handler invoked when streaming starts
1515
+ * @param config.onStreamChunk - Handler invoked for each streaming chunk
1516
+ * @param config.onStreamEnd - Handler invoked when streaming ends
1517
+ * @param config.onStreamError - Handler invoked on streaming errors
1518
+ */
1402
1519
  constructor(config: AgentConfig<TInput, TOutput>);
1403
1520
  /**
1404
1521
  * Serialize input for passing to LLM or spans
@@ -1459,7 +1576,7 @@ declare const ThoughtSchema: z.ZodObject<{
1459
1576
  */
1460
1577
  confidence: z.ZodOptional<z.ZodNumber>;
1461
1578
  /**
1462
- * Additional metadata
1579
+ * Additional metadata (key-value pairs)
1463
1580
  */
1464
1581
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1465
1582
  }, "strip", z.ZodTypeAny, {
@@ -1534,6 +1651,10 @@ declare const AgentDecisionSchema: z.ZodObject<{
1534
1651
  * Agent's internal reasoning
1535
1652
  */
1536
1653
  reasoning: z.ZodString;
1654
+ /**
1655
+ * Status message for the user (e.g., "Searching for information...", "Processing results...")
1656
+ */
1657
+ userMessage: z.ZodDefault<z.ZodString>;
1537
1658
  /**
1538
1659
  * Tool calls to execute (if any)
1539
1660
  * Empty array signals task completion
@@ -1589,6 +1710,16 @@ declare const AgentDecisionSchema: z.ZodObject<{
1589
1710
  metadata?: Record<string, unknown> | undefined;
1590
1711
  description?: string | undefined;
1591
1712
  }>>>;
1713
+ /**
1714
+ * Whether the task is complete and finalResult is available
1715
+ * (single LLM call pattern)
1716
+ */
1717
+ isComplete: z.ZodDefault<z.ZodBoolean>;
1718
+ /**
1719
+ * The final result when isComplete=true
1720
+ * Should match outputSchema if specified
1721
+ */
1722
+ finalResult: z.ZodOptional<z.ZodUnknown>;
1592
1723
  }, "strip", z.ZodTypeAny, {
1593
1724
  toolCalls: {
1594
1725
  id: string;
@@ -1596,12 +1727,15 @@ declare const AgentDecisionSchema: z.ZodObject<{
1596
1727
  arguments?: unknown;
1597
1728
  }[];
1598
1729
  reasoning: string;
1730
+ userMessage: string;
1599
1731
  memoryReads: string[];
1600
1732
  memoryUpdates: Record<string, {
1601
1733
  value?: unknown;
1602
1734
  metadata?: Record<string, unknown> | undefined;
1603
1735
  description?: string | undefined;
1604
1736
  }>;
1737
+ isComplete: boolean;
1738
+ finalResult?: unknown;
1605
1739
  }, {
1606
1740
  reasoning: string;
1607
1741
  toolCalls?: {
@@ -1609,14 +1743,28 @@ declare const AgentDecisionSchema: z.ZodObject<{
1609
1743
  toolName: string;
1610
1744
  arguments?: unknown;
1611
1745
  }[] | undefined;
1746
+ userMessage?: string | undefined;
1612
1747
  memoryReads?: string[] | undefined;
1613
1748
  memoryUpdates?: Record<string, {
1614
1749
  value?: unknown;
1615
1750
  metadata?: Record<string, unknown> | undefined;
1616
1751
  description?: string | undefined;
1617
1752
  }> | undefined;
1753
+ isComplete?: boolean | undefined;
1754
+ finalResult?: unknown;
1618
1755
  }>;
1619
1756
  type AgentDecision = z.infer<typeof AgentDecisionSchema>;
1757
+ /**
1758
+ * Create an AgentDecision schema with typed finalResult field.
1759
+ *
1760
+ * When outputSchema is provided, the finalResult field will be typed
1761
+ * to that schema, allowing Opper to enforce the correct structure.
1762
+ * When finalResult is undefined/null, it passes through without validation.
1763
+ *
1764
+ * @param outputSchema - Optional Zod schema for the final result
1765
+ * @returns AgentDecision schema (original or dynamically created variant)
1766
+ */
1767
+ declare function createAgentDecisionWithOutputSchema<T>(outputSchema?: z.ZodType<T>): z.ZodObject<z.ZodRawShape>;
1620
1768
  /**
1621
1769
  * Schema for tool execution result summary
1622
1770
  */
@@ -1693,15 +1841,15 @@ declare const MCPConfigVariants: z.ZodDiscriminatedUnion<"transport", [z.ZodObje
1693
1841
  }, "strip", z.ZodTypeAny, {
1694
1842
  metadata: Record<string, unknown>;
1695
1843
  name: string;
1844
+ url: string;
1696
1845
  method: "GET" | "POST";
1697
1846
  headers: Record<string, string>;
1698
1847
  timeout: number;
1699
1848
  transport: "http-sse";
1700
- url: string;
1701
1849
  }, {
1702
1850
  name: string;
1703
- transport: "http-sse";
1704
1851
  url: string;
1852
+ transport: "http-sse";
1705
1853
  metadata?: Record<string, unknown> | undefined;
1706
1854
  method?: "GET" | "POST" | undefined;
1707
1855
  headers?: Record<string, string> | undefined;
@@ -1718,15 +1866,15 @@ declare const MCPConfigVariants: z.ZodDiscriminatedUnion<"transport", [z.ZodObje
1718
1866
  }, "strip", z.ZodTypeAny, {
1719
1867
  metadata: Record<string, unknown>;
1720
1868
  name: string;
1869
+ url: string;
1721
1870
  headers: Record<string, string>;
1722
1871
  timeout: number;
1723
1872
  transport: "streamable-http";
1724
- url: string;
1725
1873
  sessionId?: string | undefined;
1726
1874
  }, {
1727
1875
  name: string;
1728
- transport: "streamable-http";
1729
1876
  url: string;
1877
+ transport: "streamable-http";
1730
1878
  metadata?: Record<string, unknown> | undefined;
1731
1879
  headers?: Record<string, string> | undefined;
1732
1880
  timeout?: number | undefined;
@@ -1777,15 +1925,15 @@ declare const MCPServerConfigSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"trans
1777
1925
  }, "strip", z.ZodTypeAny, {
1778
1926
  metadata: Record<string, unknown>;
1779
1927
  name: string;
1928
+ url: string;
1780
1929
  method: "GET" | "POST";
1781
1930
  headers: Record<string, string>;
1782
1931
  timeout: number;
1783
1932
  transport: "http-sse";
1784
- url: string;
1785
1933
  }, {
1786
1934
  name: string;
1787
- transport: "http-sse";
1788
1935
  url: string;
1936
+ transport: "http-sse";
1789
1937
  metadata?: Record<string, unknown> | undefined;
1790
1938
  method?: "GET" | "POST" | undefined;
1791
1939
  headers?: Record<string, string> | undefined;
@@ -1802,15 +1950,15 @@ declare const MCPServerConfigSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"trans
1802
1950
  }, "strip", z.ZodTypeAny, {
1803
1951
  metadata: Record<string, unknown>;
1804
1952
  name: string;
1953
+ url: string;
1805
1954
  headers: Record<string, string>;
1806
1955
  timeout: number;
1807
1956
  transport: "streamable-http";
1808
- url: string;
1809
1957
  sessionId?: string | undefined;
1810
1958
  }, {
1811
1959
  name: string;
1812
- transport: "streamable-http";
1813
1960
  url: string;
1961
+ transport: "streamable-http";
1814
1962
  metadata?: Record<string, unknown> | undefined;
1815
1963
  headers?: Record<string, string> | undefined;
1816
1964
  timeout?: number | undefined;
@@ -1828,18 +1976,18 @@ declare const MCPServerConfigSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"trans
1828
1976
  } | {
1829
1977
  metadata: Record<string, unknown>;
1830
1978
  name: string;
1979
+ url: string;
1831
1980
  method: "GET" | "POST";
1832
1981
  headers: Record<string, string>;
1833
1982
  timeout: number;
1834
1983
  transport: "http-sse";
1835
- url: string;
1836
1984
  } | {
1837
1985
  metadata: Record<string, unknown>;
1838
1986
  name: string;
1987
+ url: string;
1839
1988
  headers: Record<string, string>;
1840
1989
  timeout: number;
1841
1990
  transport: "streamable-http";
1842
- url: string;
1843
1991
  sessionId?: string | undefined;
1844
1992
  }, {
1845
1993
  name: string;
@@ -1853,16 +2001,16 @@ declare const MCPServerConfigSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"trans
1853
2001
  stderr?: "inherit" | "pipe" | "ignore" | undefined;
1854
2002
  } | {
1855
2003
  name: string;
1856
- transport: "http-sse";
1857
2004
  url: string;
2005
+ transport: "http-sse";
1858
2006
  metadata?: Record<string, unknown> | undefined;
1859
2007
  method?: "GET" | "POST" | undefined;
1860
2008
  headers?: Record<string, string> | undefined;
1861
2009
  timeout?: number | undefined;
1862
2010
  } | {
1863
2011
  name: string;
1864
- transport: "streamable-http";
1865
2012
  url: string;
2013
+ transport: "streamable-http";
1866
2014
  metadata?: Record<string, unknown> | undefined;
1867
2015
  headers?: Record<string, string> | undefined;
1868
2016
  timeout?: number | undefined;
@@ -1922,6 +2070,12 @@ declare class MCPToolProvider implements ToolProvider {
1922
2070
  }
1923
2071
  declare const mcp: (...configs: ReadonlyArray<MCPServerConfig | MCPServerConfigInput>) => MCPToolProvider;
1924
2072
 
2073
+ /**
2074
+ * Convert a Zod schema to JSON Schema, compatible with both Zod 3 and Zod 4.
2075
+ * Uses native toJSONSchema for Zod 4, falls back to zod-to-json-schema for Zod 3.
2076
+ * Note: Zod 4's toJSONSchema has a bug with single-arg z.record(), so we fall back on error.
2077
+ */
2078
+ declare function zodSchemaToJsonSchema(schema: ZodTypeAny): Record<string, unknown>;
1925
2079
  declare class SchemaValidationError extends Error {
1926
2080
  readonly issues: ZodIssue[];
1927
2081
  constructor(message: string, issues: ZodIssue[]);
@@ -2156,4 +2310,4 @@ declare class ToolRunner {
2156
2310
  };
2157
2311
  }
2158
2312
 
2159
- export { Agent, type AgentConfig, AgentContext, type AgentContextOptions, type AgentContextSnapshot, type AgentDecision, AgentDecisionSchema, AgentEventEmitter, type AgentEventListener, type AgentEventName, type AgentEventPayload, type AgentEventPayloadMap, AgentEvents, type AgentLogger, BaseAgent, type BaseAgentConfig, ConsoleLogger, type CreateSpanOptions, DEFAULT_MODEL, DEFAULT_RETRY_CONFIG, type ExecutionCycle, ExecutionCycleSchema, type Failure, type HookEventName, HookEvents, type HookHandler, HookManager, type HookPayload, type HookPayloadMap, type HookRegistration, InMemoryStore, type IterationSummary, type JsonSchemaOptions, LogLevel, MCPClient, type MCPClientOptions, type MCPServerConfig, type MCPServerConfigInput, MCPServerConfigSchema, type MCPTool, MCPToolProvider, type MCPToolProviderOptions, MCPconfig, type MaybePromise, type Memory, type MemoryCatalogEntry, type MemoryEntry, type MemoryEntryMetadata, MemoryEntryMetadataSchema, MemoryEntrySchema, type MemoryUpdate, MemoryUpdateSchema, type OpperCallOptions, type OpperCallResponse, OpperClient, type OpperClientConfig, type OpperSpan, type OpperStreamChunk, type OpperStreamEvent, type OpperStreamResponse, Result, type RetryConfig, STREAM_ROOT_PATH, type Schema, SchemaValidationError, type SchemaValidationOptions, SilentLogger, StreamAssembler, type StreamAssemblerOptions, type StreamFeedResult, type StreamFinalizeResult, type Success, type Thought, ThoughtSchema, type Tool, type ToolCall, type ToolCallRecord, ToolCallRecordSchema, ToolCallSchema, type ToolDefinition, type ToolExecutionContext, type ToolExecutionSummary, ToolExecutionSummarySchema, type ToolFailure, type ToolFunction, ToolMetadataSchema, type ToolOptions, type ToolProvider, type ToolResult, type ToolResultData, ToolResultFactory, ToolResultFailureSchema, type ToolResultInit, ToolResultSchema, ToolResultSuccessSchema, type ToolRunOptions, ToolRunner, type ToolSuccess, type UnregisterHook, type Usage, UsageSchema, type VisualizationOptions, coerceToolDefinition, createFunctionTool, createHookManager, createInMemoryStore, createMCPServerConfig, createOpperClient, createStreamAssembler, createToolCallRecord, err, extractTools, generateAgentFlowDiagram, getDefaultLogger, getSchemaDefault, isSchemaValid, isToolProvider, mcp, mergeSchemaDefaults, normalizeToolEntries, ok, schemaToJson, setDefaultLogger, tool, validateSchema, validateToolInput };
2313
+ export { Agent, type AgentConfig, AgentContext, type AgentContextOptions, type AgentContextSnapshot, type AgentDecision, AgentDecisionSchema, AgentEventEmitter, type AgentEventListener, type AgentEventName, type AgentEventPayload, type AgentEventPayloadMap, AgentEvents, type AgentLogger, BaseAgent, type BaseAgentConfig, ConsoleLogger, type CreateSpanOptions, DEFAULT_MODEL, DEFAULT_RETRY_CONFIG, type ExecutionCycle, ExecutionCycleSchema, type Failure, type HookEventName, HookEvents, type HookHandler, HookManager, type HookPayload, type HookPayloadMap, type HookRegistration, InMemoryStore, type IterationSummary, type JsonSchemaOptions, LogLevel, MCPClient, type MCPClientOptions, type MCPServerConfig, type MCPServerConfigInput, MCPServerConfigSchema, type MCPTool, MCPToolProvider, type MCPToolProviderOptions, MCPconfig, type MaybePromise, type Memory, type MemoryCatalogEntry, type MemoryEntry, type MemoryEntryMetadata, MemoryEntryMetadataSchema, MemoryEntrySchema, type MemoryUpdate, MemoryUpdateSchema, type OpperCallOptions, type OpperCallResponse, OpperClient, type OpperClientConfig, type OpperSpan, type OpperStreamChunk, type OpperStreamEvent, type OpperStreamResponse, Result, type RetryConfig, STREAM_ROOT_PATH, type Schema, SchemaValidationError, type SchemaValidationOptions, SilentLogger, StreamAssembler, type StreamAssemblerOptions, type StreamFeedResult, type StreamFinalizeResult, type Success, type Thought, ThoughtSchema, type Tool, type ToolCall, type ToolCallRecord, ToolCallRecordSchema, ToolCallSchema, type ToolDefinition, type ToolExecutionContext, type ToolExecutionSummary, ToolExecutionSummarySchema, type ToolFailure, type ToolFunction, ToolMetadataSchema, type ToolOptions, type ToolProvider, type ToolResult, type ToolResultData, ToolResultFactory, ToolResultFailureSchema, type ToolResultInit, ToolResultSchema, ToolResultSuccessSchema, type ToolRunOptions, ToolRunner, type ToolSuccess, type UnregisterHook, type Usage, UsageSchema, type VisualizationOptions, coerceToolDefinition, createAgentDecisionWithOutputSchema, createFunctionTool, createHookManager, createInMemoryStore, createMCPServerConfig, createOpperClient, createStreamAssembler, createToolCallRecord, err, extractTools, generateAgentFlowDiagram, getDefaultLogger, getSchemaDefault, isSchemaValid, isToolProvider, mcp, mergeSchemaDefaults, normalizeToolEntries, ok, schemaToJson, setDefaultLogger, tool, validateSchema, validateToolInput, zodSchemaToJsonSchema };