wunderland 0.72.2 → 0.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -8
- package/dist/agents/builder/AgentManifest.d.ts +1 -1
- package/dist/agents/builder/AgentManifest.d.ts.map +1 -1
- package/dist/agents/builder/NaturalLanguageAgentBuilder.d.ts +2 -2
- package/dist/agents/builder/NaturalLanguageAgentBuilder.d.ts.map +1 -1
- package/dist/agents/builder/WunderlandSeed.d.ts +3 -3
- package/dist/agents/builder/WunderlandSeed.d.ts.map +1 -1
- package/dist/agents/builder/WunderlandSeed.js +1 -1
- package/dist/agents/builder/WunderlandSeed.js.map +1 -1
- package/dist/agents/builder/validation.d.ts +2 -2
- package/dist/agents/builder/validation.d.ts.map +1 -1
- package/dist/agents/builder/validation.js +1 -1
- package/dist/agents/builder/validation.js.map +1 -1
- package/dist/agents/lifecycle/AgentBootstrap.d.ts +8 -8
- package/dist/agents/lifecycle/AgentBootstrap.d.ts.map +1 -1
- package/dist/agents/lifecycle/AgentBootstrap.js +21 -21
- package/dist/agents/lifecycle/AgentBootstrap.js.map +1 -1
- package/dist/agents/lifecycle/SeedNetworkManager.d.ts +1 -1
- package/dist/agents/lifecycle/SeedNetworkManager.d.ts.map +1 -1
- package/dist/agents/presets/PresetLoader.d.ts +1 -1
- package/dist/agents/presets/PresetLoader.d.ts.map +1 -1
- package/dist/agents/presets/resolve-skill-context.d.ts +23 -0
- package/dist/agents/presets/resolve-skill-context.d.ts.map +1 -0
- package/dist/agents/presets/resolve-skill-context.js +165 -0
- package/dist/agents/presets/resolve-skill-context.js.map +1 -0
- package/dist/agents/prompts/PromptBuilder.d.ts +1 -1
- package/dist/agents/prompts/PromptBuilder.d.ts.map +1 -1
- package/dist/autonomy/jobs/JobEvaluator.d.ts +1 -1
- package/dist/autonomy/jobs/JobEvaluator.d.ts.map +1 -1
- package/dist/autonomy/jobs/JobMemoryService.d.ts +1 -1
- package/dist/autonomy/jobs/JobMemoryService.d.ts.map +1 -1
- package/dist/autonomy/orchestration/mission-tools.d.ts +10 -0
- package/dist/autonomy/orchestration/mission-tools.d.ts.map +1 -0
- package/dist/autonomy/orchestration/mission-tools.js +32 -0
- package/dist/autonomy/orchestration/mission-tools.js.map +1 -0
- package/dist/autonomy/orchestration/yaml-compiler.d.ts +1 -0
- package/dist/autonomy/orchestration/yaml-compiler.d.ts.map +1 -1
- package/dist/autonomy/orchestration/yaml-compiler.js +3 -0
- package/dist/autonomy/orchestration/yaml-compiler.js.map +1 -1
- package/dist/autonomy/scheduling/CronScheduler.d.ts +27 -2
- package/dist/autonomy/scheduling/CronScheduler.d.ts.map +1 -1
- package/dist/autonomy/scheduling/CronScheduler.js +95 -27
- package/dist/autonomy/scheduling/CronScheduler.js.map +1 -1
- package/dist/autonomy/social/BrowsingEngine.d.ts +1 -1
- package/dist/autonomy/social/BrowsingEngine.d.ts.map +1 -1
- package/dist/autonomy/social/DynamicVoiceProfile.d.ts +1 -1
- package/dist/autonomy/social/DynamicVoiceProfile.d.ts.map +1 -1
- package/dist/autonomy/social/InputManifest.d.ts +2 -2
- package/dist/autonomy/social/InputManifest.d.ts.map +1 -1
- package/dist/autonomy/social/InputManifest.js +1 -1
- package/dist/autonomy/social/InputManifest.js.map +1 -1
- package/dist/autonomy/social/MoodEngine.d.ts +1 -1
- package/dist/autonomy/social/MoodEngine.d.ts.map +1 -1
- package/dist/autonomy/social/NewsroomAgency.d.ts +1 -1
- package/dist/autonomy/social/NewsroomAgency.d.ts.map +1 -1
- package/dist/autonomy/social/NewsroomAgency.js +2 -2
- package/dist/autonomy/social/NewsroomAgency.js.map +1 -1
- package/dist/autonomy/social/PostDecisionEngine.d.ts +1 -1
- package/dist/autonomy/social/PostDecisionEngine.d.ts.map +1 -1
- package/dist/autonomy/social/ToolAccessProfiles.d.ts +2 -2
- package/dist/autonomy/social/ToolAccessProfiles.d.ts.map +1 -1
- package/dist/autonomy/social/ToolAccessProfiles.js +13 -4
- package/dist/autonomy/social/ToolAccessProfiles.js.map +1 -1
- package/dist/autonomy/social/TraitEvolution.d.ts +1 -1
- package/dist/autonomy/social/TraitEvolution.d.ts.map +1 -1
- package/dist/autonomy/social/TrustEngine.d.ts +1 -1
- package/dist/autonomy/social/TrustEngine.d.ts.map +1 -1
- package/dist/autonomy/social/WonderlandNetwork.js +1 -1
- package/dist/autonomy/social/WonderlandNetwork.js.map +1 -1
- package/dist/autonomy/social/types.d.ts +1 -1
- package/dist/autonomy/social/types.d.ts.map +1 -1
- package/dist/bootstrap/index.d.ts +4 -4
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +4 -4
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/channels/api/api-index.d.ts.map +1 -0
- package/dist/channels/api/api-index.js.map +1 -0
- package/dist/channels/api/chat-runtime.d.ts +68 -0
- package/dist/channels/api/chat-runtime.d.ts.map +1 -0
- package/dist/channels/api/chat-runtime.js +123 -0
- package/dist/channels/api/chat-runtime.js.map +1 -0
- package/dist/channels/api/index.d.ts.map +1 -0
- package/dist/channels/api/index.js.map +1 -0
- package/dist/channels/api/rate-limiter.d.ts.map +1 -0
- package/dist/channels/api/rate-limiter.js.map +1 -0
- package/dist/channels/api/routes/agents.d.ts.map +1 -0
- package/dist/channels/api/routes/agents.js.map +1 -0
- package/dist/channels/api/routes/chat.d.ts.map +1 -0
- package/dist/channels/api/routes/chat.js +287 -0
- package/dist/channels/api/routes/chat.js.map +1 -0
- package/dist/channels/api/routes/config.d.ts.map +1 -0
- package/dist/channels/api/routes/config.js.map +1 -0
- package/dist/channels/api/routes/health.d.ts.map +1 -0
- package/dist/channels/api/routes/health.js.map +1 -0
- package/dist/channels/api/routes/index.d.ts.map +1 -0
- package/dist/channels/api/routes/index.js.map +1 -0
- package/dist/channels/api/routes/social.d.ts.map +1 -0
- package/dist/channels/api/routes/social.js.map +1 -0
- package/dist/channels/api/routes/types.d.ts +85 -0
- package/dist/channels/api/routes/types.d.ts.map +1 -0
- package/dist/channels/api/routes/types.js.map +1 -0
- package/dist/channels/api/server-helpers.d.ts +32 -0
- package/dist/channels/api/server-helpers.d.ts.map +1 -0
- package/dist/channels/api/server-helpers.js.map +1 -0
- package/dist/channels/api/server.d.ts +97 -0
- package/dist/channels/api/server.d.ts.map +1 -0
- package/dist/channels/api/server.js +1065 -0
- package/dist/channels/api/server.js.map +1 -0
- package/dist/channels/api/types.d.ts +527 -0
- package/dist/channels/api/types.d.ts.map +1 -0
- package/dist/channels/api/types.js.map +1 -0
- package/dist/channels/browser/BrowserClient.d.ts.map +1 -0
- package/dist/channels/browser/BrowserClient.js.map +1 -0
- package/dist/channels/browser/BrowserInteractions.d.ts.map +1 -0
- package/dist/channels/browser/BrowserInteractions.js.map +1 -0
- package/dist/channels/browser/BrowserSession.d.ts.map +1 -0
- package/dist/channels/browser/BrowserSession.js.map +1 -0
- package/dist/channels/browser/browser-index.d.ts.map +1 -0
- package/dist/channels/browser/browser-index.js.map +1 -0
- package/dist/channels/browser/index.d.ts.map +1 -0
- package/dist/channels/browser/index.js.map +1 -0
- package/dist/channels/browser/types.d.ts.map +1 -0
- package/dist/channels/browser/types.js.map +1 -0
- package/dist/channels/chat/ChatTaskResponder.d.ts +22 -0
- package/dist/channels/chat/ChatTaskResponder.d.ts.map +1 -1
- package/dist/channels/chat/ChatTaskResponder.js +37 -5
- package/dist/channels/chat/ChatTaskResponder.js.map +1 -1
- package/dist/channels/chat/types.d.ts +10 -0
- package/dist/channels/chat/types.d.ts.map +1 -1
- package/dist/channels/voice/call-client.d.ts.map +1 -0
- package/dist/channels/voice/call-client.js.map +1 -0
- package/dist/channels/voice/index.d.ts.map +1 -0
- package/dist/channels/voice/index.js.map +1 -0
- package/dist/channels/voice/speech-catalog.d.ts.map +1 -0
- package/dist/channels/voice/speech-catalog.js.map +1 -0
- package/dist/channels/voice/streaming-pipeline.d.ts.map +1 -0
- package/dist/channels/voice/streaming-pipeline.js +305 -0
- package/dist/channels/voice/streaming-pipeline.js.map +1 -0
- package/dist/channels/voice/telephony-webhook-server.d.ts.map +1 -0
- package/dist/channels/voice/telephony-webhook-server.js.map +1 -0
- package/dist/channels/voice/voice-index.d.ts.map +1 -0
- package/dist/channels/voice/voice-index.js.map +1 -0
- package/dist/channels/voice/ws-server.d.ts.map +1 -0
- package/dist/channels/voice/ws-server.js +187 -0
- package/dist/channels/voice/ws-server.js.map +1 -0
- package/dist/cli/commands/ChatREPL.d.ts +1 -1
- package/dist/cli/commands/ChatREPL.d.ts.map +1 -1
- package/dist/cli/commands/ChatREPL.js +1 -1
- package/dist/cli/commands/ChatREPL.js.map +1 -1
- package/dist/cli/commands/ChatStreamRenderer.d.ts +1 -1
- package/dist/cli/commands/ChatStreamRenderer.d.ts.map +1 -1
- package/dist/cli/commands/ChatStreamRenderer.js +1 -1
- package/dist/cli/commands/ChatStreamRenderer.js.map +1 -1
- package/dist/cli/commands/agency.js +1 -1
- package/dist/cli/commands/agency.js.map +1 -1
- package/dist/cli/commands/agent/serve.js +1 -1
- package/dist/cli/commands/agent/serve.js.map +1 -1
- package/dist/cli/commands/ai/audio.js +2 -2
- package/dist/cli/commands/ai/audio.js.map +1 -1
- package/dist/cli/commands/ai/image.js +1 -1
- package/dist/cli/commands/ai/image.js.map +1 -1
- package/dist/cli/commands/ai/structured.js +1 -1
- package/dist/cli/commands/ai/structured.js.map +1 -1
- package/dist/cli/commands/ai/video.js +1 -1
- package/dist/cli/commands/ai/video.js.map +1 -1
- package/dist/cli/commands/batch-create.js +1 -1
- package/dist/cli/commands/batch-create.js.map +1 -1
- package/dist/cli/commands/chat-ui.d.ts +1 -1
- package/dist/cli/commands/chat-ui.d.ts.map +1 -1
- package/dist/cli/commands/chat.js +23 -23
- package/dist/cli/commands/chat.js.map +1 -1
- package/dist/cli/commands/create.js +1 -1
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/cron.d.ts.map +1 -1
- package/dist/cli/commands/cron.js +5 -4
- package/dist/cli/commands/cron.js.map +1 -1
- package/dist/cli/commands/dashboard/routes/index.js +1 -1
- package/dist/cli/commands/dashboard/routes/index.js.map +1 -1
- package/dist/cli/commands/export-session.js +2 -2
- package/dist/cli/commands/export-session.js.map +1 -1
- package/dist/cli/commands/list-personas.js +1 -1
- package/dist/cli/commands/list-personas.js.map +1 -1
- package/dist/cli/commands/mission-model-flags.d.ts +52 -0
- package/dist/cli/commands/mission-model-flags.d.ts.map +1 -0
- package/dist/cli/commands/mission-model-flags.js +90 -0
- package/dist/cli/commands/mission-model-flags.js.map +1 -0
- package/dist/cli/commands/mission.d.ts.map +1 -1
- package/dist/cli/commands/mission.js +38 -16
- package/dist/cli/commands/mission.js.map +1 -1
- package/dist/cli/commands/new.js +1 -1
- package/dist/cli/commands/new.js.map +1 -1
- package/dist/cli/commands/provenance.js +1 -1
- package/dist/cli/commands/provenance.js.map +1 -1
- package/dist/cli/commands/rag.js +2 -2
- package/dist/cli/commands/rag.js.map +1 -1
- package/dist/cli/commands/spawn.js +1 -1
- package/dist/cli/commands/spawn.js.map +1 -1
- package/dist/cli/commands/start/adaptive-runtime-init.js +2 -2
- package/dist/cli/commands/start/adaptive-runtime-init.js.map +1 -1
- package/dist/cli/commands/start/agent-turn.d.ts +38 -0
- package/dist/cli/commands/start/agent-turn.d.ts.map +1 -0
- package/dist/cli/commands/start/agent-turn.js +110 -0
- package/dist/cli/commands/start/agent-turn.js.map +1 -0
- package/dist/cli/commands/start/channel-handler.d.ts +1 -1
- package/dist/cli/commands/start/channel-handler.d.ts.map +1 -1
- package/dist/cli/commands/start/channel-handler.js +5 -5
- package/dist/cli/commands/start/channel-handler.js.map +1 -1
- package/dist/cli/commands/start/config-loader.js +1 -1
- package/dist/cli/commands/start/config-loader.js.map +1 -1
- package/dist/cli/commands/start/extension-loader.js +8 -8
- package/dist/cli/commands/start/extension-loader.js.map +1 -1
- package/dist/cli/commands/start/http-server.js +1 -1
- package/dist/cli/commands/start/http-server.js.map +1 -1
- package/dist/cli/commands/start/llm-provider-setup.js +2 -2
- package/dist/cli/commands/start/llm-provider-setup.js.map +1 -1
- package/dist/cli/commands/start/local-memory-tool.d.ts +1 -1
- package/dist/cli/commands/start/local-memory-tool.d.ts.map +1 -1
- package/dist/cli/commands/start/local-memory-tool.js +2 -2
- package/dist/cli/commands/start/local-memory-tool.js.map +1 -1
- package/dist/cli/commands/start/routes/chat.js +4 -4
- package/dist/cli/commands/start/routes/chat.js.map +1 -1
- package/dist/cli/commands/start/routes/index.d.ts +2 -0
- package/dist/cli/commands/start/routes/index.d.ts.map +1 -1
- package/dist/cli/commands/start/routes/index.js +30 -0
- package/dist/cli/commands/start/routes/index.js.map +1 -1
- package/dist/cli/commands/start/routes/types.d.ts +1 -1
- package/dist/cli/commands/start/routes/types.d.ts.map +1 -1
- package/dist/cli/commands/start/routes/webhooks.d.ts +44 -0
- package/dist/cli/commands/start/routes/webhooks.d.ts.map +1 -0
- package/dist/cli/commands/start/routes/webhooks.js +106 -0
- package/dist/cli/commands/start/routes/webhooks.js.map +1 -0
- package/dist/cli/commands/start/seed-initializer.js +4 -4
- package/dist/cli/commands/start/seed-initializer.js.map +1 -1
- package/dist/cli/commands/start/skills-discovery-setup.js +2 -2
- package/dist/cli/commands/start/skills-discovery-setup.js.map +1 -1
- package/dist/cli/commands/start/storage-init.js +1 -1
- package/dist/cli/commands/start/storage-init.js.map +1 -1
- package/dist/cli/commands/status.js +2 -2
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/voice.js +1 -1
- package/dist/cli/commands/voice.js.map +1 -1
- package/dist/cli/commands/workflows.d.ts +1 -1
- package/dist/cli/commands/workflows.d.ts.map +1 -1
- package/dist/cli/commands/workflows.js +3 -3
- package/dist/cli/commands/workflows.js.map +1 -1
- package/dist/cli/constants.d.ts +1 -1
- package/dist/cli/constants.js +1 -1
- package/dist/cli/constants.js.map +1 -1
- package/dist/cli/daemon/daemon-state.js +1 -1
- package/dist/cli/daemon/daemon-state.js.map +1 -1
- package/dist/cli/export/report-export.d.ts +47 -0
- package/dist/cli/export/report-export.d.ts.map +1 -0
- package/dist/cli/export/report-export.js +120 -0
- package/dist/cli/export/report-export.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +13 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tui/views/discovery-view.js +1 -1
- package/dist/cli/tui/views/discovery-view.js.map +1 -1
- package/dist/cli/tui/views/rag-view.js +1 -1
- package/dist/cli/tui/views/rag-view.js.map +1 -1
- package/dist/cli/tui/views/status-view.js +3 -3
- package/dist/cli/tui/views/status-view.js.map +1 -1
- package/dist/cli/tui/views/voice-view.js +1 -1
- package/dist/cli/tui/views/voice-view.js.map +1 -1
- package/dist/cli/wizards/setup-wizard.js +1 -1
- package/dist/cli/wizards/setup-wizard.js.map +1 -1
- package/dist/cli/wizards/voice-wizard.js +1 -1
- package/dist/cli/wizards/voice-wizard.js.map +1 -1
- package/dist/core/index.d.ts +6 -18
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +6 -35
- package/dist/core/index.js.map +1 -1
- package/dist/memory/auto-ingest/MemoryAutoIngestPipeline.d.ts +68 -0
- package/dist/memory/auto-ingest/MemoryAutoIngestPipeline.d.ts.map +1 -0
- package/dist/memory/auto-ingest/MemoryAutoIngestPipeline.js.map +1 -0
- package/dist/memory/auto-ingest/index.d.ts.map +1 -0
- package/dist/memory/auto-ingest/index.js.map +1 -0
- package/dist/memory/index.d.ts +5 -3
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +5 -3
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/initialization/CognitiveMemoryInitializer.d.ts.map +1 -0
- package/dist/memory/initialization/CognitiveMemoryInitializer.js +98 -0
- package/dist/memory/initialization/CognitiveMemoryInitializer.js.map +1 -0
- package/dist/memory/initialization/MemorySystemInitializer.d.ts.map +1 -0
- package/dist/memory/initialization/MemorySystemInitializer.js.map +1 -0
- package/dist/memory/initialization/index.d.ts.map +1 -0
- package/dist/memory/initialization/index.js.map +1 -0
- package/dist/memory/rag/QueryExpander.d.ts.map +1 -0
- package/dist/memory/rag/QueryExpander.js.map +1 -0
- package/dist/memory/rag/RAGAuditPersistence.d.ts.map +1 -0
- package/dist/memory/rag/RAGAuditPersistence.js.map +1 -0
- package/dist/memory/rag/http-proxy.d.ts +16 -0
- package/dist/memory/rag/http-proxy.d.ts.map +1 -0
- package/dist/memory/rag/http-proxy.js.map +1 -0
- package/dist/memory/rag/hyde-integration.d.ts +41 -0
- package/dist/memory/rag/hyde-integration.d.ts.map +1 -0
- package/dist/memory/rag/hyde-integration.js +87 -0
- package/dist/memory/rag/hyde-integration.js.map +1 -0
- package/dist/memory/rag/index.d.ts.map +1 -0
- package/dist/memory/rag/index.js.map +1 -0
- package/dist/memory/rag/rag-client.d.ts.map +1 -0
- package/dist/memory/rag/rag-client.js.map +1 -0
- package/dist/memory/rag/rag-index.d.ts.map +1 -0
- package/dist/memory/rag/rag-index.js.map +1 -0
- package/dist/memory/rag/runtime-tools.d.ts +4 -0
- package/dist/memory/rag/runtime-tools.d.ts.map +1 -0
- package/dist/memory/rag/runtime-tools.js +115 -0
- package/dist/memory/rag/runtime-tools.js.map +1 -0
- package/dist/memory/retrieval/TurnMemoryRetriever.d.ts +21 -0
- package/dist/memory/retrieval/TurnMemoryRetriever.d.ts.map +1 -0
- package/dist/memory/retrieval/TurnMemoryRetriever.js.map +1 -0
- package/dist/memory/retrieval/index.d.ts.map +1 -0
- package/dist/memory/retrieval/index.js.map +1 -0
- package/dist/memory/storage/AgentMemoryAdapter.d.ts.map +1 -0
- package/dist/memory/storage/AgentMemoryAdapter.js.map +1 -0
- package/dist/memory/storage/AgentStateStore.d.ts.map +1 -0
- package/dist/memory/storage/AgentStateStore.js.map +1 -0
- package/dist/memory/storage/AgentStorageManager.d.ts.map +1 -0
- package/dist/memory/storage/AgentStorageManager.js.map +1 -0
- package/dist/memory/storage/PersonalityMemoryConfig.d.ts.map +1 -0
- package/dist/memory/storage/PersonalityMemoryConfig.js.map +1 -0
- package/dist/memory/storage/index.d.ts.map +1 -0
- package/dist/memory/storage/index.js.map +1 -0
- package/dist/memory/storage/storage-index.d.ts +13 -0
- package/dist/memory/storage/storage-index.d.ts.map +1 -0
- package/dist/memory/storage/storage-index.js +11 -0
- package/dist/memory/storage/storage-index.js.map +1 -0
- package/dist/memory/storage/types.d.ts.map +1 -0
- package/dist/memory/storage/types.js.map +1 -0
- package/dist/platform/config/config-index.d.ts.map +1 -0
- package/dist/platform/config/config-index.js.map +1 -0
- package/dist/platform/config/effective-agent-config.d.ts +24 -0
- package/dist/platform/config/effective-agent-config.d.ts.map +1 -0
- package/dist/platform/config/effective-agent-config.js +272 -0
- package/dist/platform/config/effective-agent-config.js.map +1 -0
- package/dist/platform/config/errors.d.ts.map +1 -0
- package/dist/platform/config/errors.js.map +1 -0
- package/dist/platform/config/index.d.ts.map +1 -0
- package/dist/platform/config/index.js.map +1 -0
- package/dist/platform/config/load.d.ts +32 -0
- package/dist/platform/config/load.d.ts.map +1 -0
- package/dist/platform/config/load.js.map +1 -0
- package/dist/platform/config/persona-registry.d.ts +48 -0
- package/dist/platform/config/persona-registry.d.ts.map +1 -0
- package/dist/platform/config/persona-registry.js.map +1 -0
- package/dist/platform/config/provider-defaults.d.ts +54 -0
- package/dist/platform/config/provider-defaults.d.ts.map +1 -0
- package/dist/platform/config/provider-defaults.js.map +1 -0
- package/dist/platform/config/schema.d.ts +7 -0
- package/dist/platform/config/schema.d.ts.map +1 -0
- package/dist/platform/config/schema.js.map +1 -0
- package/dist/platform/config/wallet-types.d.ts.map +1 -0
- package/dist/platform/config/wallet-types.js.map +1 -0
- package/dist/platform/discovery/WunderlandDiscoveryManager.d.ts +129 -0
- package/dist/platform/discovery/WunderlandDiscoveryManager.d.ts.map +1 -0
- package/dist/platform/discovery/WunderlandDiscoveryManager.js +357 -0
- package/dist/platform/discovery/WunderlandDiscoveryManager.js.map +1 -0
- package/dist/platform/discovery/discovery-index.d.ts.map +1 -0
- package/dist/platform/discovery/discovery-index.js.map +1 -0
- package/dist/platform/discovery/index.d.ts.map +1 -0
- package/dist/platform/discovery/index.js.map +1 -0
- package/dist/platform/discovery/preset-co-occurrence.d.ts.map +1 -0
- package/dist/platform/discovery/preset-co-occurrence.js +36 -0
- package/dist/platform/discovery/preset-co-occurrence.js.map +1 -0
- package/dist/platform/observability/TokenUsageTracker.d.ts +115 -0
- package/dist/platform/observability/TokenUsageTracker.d.ts.map +1 -0
- package/dist/platform/observability/TokenUsageTracker.js +219 -0
- package/dist/platform/observability/TokenUsageTracker.js.map +1 -0
- package/dist/platform/observability/session-text-log.d.ts +1 -1
- package/dist/platform/observability/session-text-log.d.ts.map +1 -1
- package/dist/platform/observability/session-text-log.js +1 -1
- package/dist/platform/observability/session-text-log.js.map +1 -1
- package/dist/platform/observability/token-usage.d.ts +2 -2
- package/dist/platform/observability/token-usage.d.ts.map +1 -1
- package/dist/platform/observability/token-usage.js +1 -1
- package/dist/platform/observability/token-usage.js.map +1 -1
- package/dist/platform/observability/usage-ledger.d.ts +1 -1
- package/dist/platform/observability/usage-ledger.d.ts.map +1 -1
- package/dist/platform/observability/usage-ledger.js +3 -3
- package/dist/platform/observability/usage-ledger.js.map +1 -1
- package/dist/public/index.d.ts +3 -3
- package/dist/public/index.d.ts.map +1 -1
- package/dist/public/index.js +21 -21
- package/dist/public/index.js.map +1 -1
- package/dist/public/types.d.ts +7 -7
- package/dist/public/types.d.ts.map +1 -1
- package/dist/runtime/agentos-bridge/agentos-runtime.d.ts.map +1 -0
- package/dist/runtime/agentos-bridge/agentos-runtime.js.map +1 -0
- package/dist/runtime/agentos-bridge/index.d.ts.map +1 -0
- package/dist/runtime/agentos-bridge/index.js.map +1 -0
- package/dist/runtime/agentos-bridge/query-router-init.d.ts +165 -0
- package/dist/runtime/agentos-bridge/query-router-init.d.ts.map +1 -0
- package/dist/runtime/agentos-bridge/query-router-init.js.map +1 -0
- package/dist/runtime/agentos-bridge/rag-state-persistence.d.ts.map +1 -0
- package/dist/runtime/agentos-bridge/rag-state-persistence.js.map +1 -0
- package/dist/runtime/agentos-bridge/research-classifier.d.ts.map +1 -0
- package/dist/runtime/agentos-bridge/research-classifier.js.map +1 -0
- package/dist/runtime/agentos-bridge/unified-retriever-builder.d.ts +189 -0
- package/dist/runtime/agentos-bridge/unified-retriever-builder.d.ts.map +1 -0
- package/dist/runtime/agentos-bridge/unified-retriever-builder.js +335 -0
- package/dist/runtime/agentos-bridge/unified-retriever-builder.js.map +1 -0
- package/dist/runtime/compaction/CompactionManager.d.ts.map +1 -0
- package/dist/runtime/compaction/CompactionManager.js.map +1 -0
- package/dist/runtime/compaction/index.d.ts.map +1 -0
- package/dist/runtime/compaction/index.js.map +1 -0
- package/dist/runtime/execution/adaptive-execution.d.ts +102 -0
- package/dist/runtime/execution/adaptive-execution.d.ts.map +1 -0
- package/dist/runtime/execution/adaptive-execution.js.map +1 -0
- package/dist/runtime/execution/empty-output-fallback.d.ts.map +1 -0
- package/dist/runtime/execution/empty-output-fallback.js.map +1 -0
- package/dist/runtime/execution/graph-runner.d.ts +58 -0
- package/dist/runtime/execution/graph-runner.d.ts.map +1 -0
- package/dist/runtime/execution/graph-runner.js +411 -0
- package/dist/runtime/execution/graph-runner.js.map +1 -0
- package/dist/runtime/execution/index.d.ts.map +1 -0
- package/dist/runtime/execution/index.js.map +1 -0
- package/dist/runtime/execution/keyed-mutex.d.ts +27 -0
- package/dist/runtime/execution/keyed-mutex.d.ts.map +1 -0
- package/dist/runtime/execution/keyed-mutex.js +52 -0
- package/dist/runtime/execution/keyed-mutex.js.map +1 -0
- package/dist/runtime/execution/llm-stream-adapter.d.ts.map +1 -0
- package/dist/runtime/execution/llm-stream-adapter.js.map +1 -0
- package/dist/runtime/execution/request-persona.d.ts +38 -0
- package/dist/runtime/execution/request-persona.d.ts.map +1 -0
- package/dist/runtime/execution/request-persona.js +117 -0
- package/dist/runtime/execution/request-persona.js.map +1 -0
- package/dist/runtime/execution/schema-on-demand.d.ts +45 -0
- package/dist/runtime/execution/schema-on-demand.d.ts.map +1 -0
- package/dist/runtime/execution/schema-on-demand.js +348 -0
- package/dist/runtime/execution/schema-on-demand.js.map +1 -0
- package/dist/runtime/execution/system-prompt-builder.d.ts +36 -0
- package/dist/runtime/execution/system-prompt-builder.d.ts.map +1 -0
- package/dist/runtime/execution/system-prompt-builder.js.map +1 -0
- package/dist/runtime/identity/agent-identity.d.ts.map +1 -0
- package/dist/runtime/identity/agent-identity.js.map +1 -0
- package/dist/runtime/identity/api-key-resolver.d.ts.map +1 -0
- package/dist/runtime/identity/api-key-resolver.js.map +1 -0
- package/dist/runtime/identity/index.d.ts.map +1 -0
- package/dist/runtime/identity/index.js.map +1 -0
- package/dist/runtime/inference/HierarchicalInferenceRouter.d.ts +102 -0
- package/dist/runtime/inference/HierarchicalInferenceRouter.d.ts.map +1 -0
- package/dist/runtime/inference/HierarchicalInferenceRouter.js +407 -0
- package/dist/runtime/inference/HierarchicalInferenceRouter.js.map +1 -0
- package/dist/runtime/inference/SmallModelResolver.d.ts.map +1 -0
- package/dist/runtime/inference/SmallModelResolver.js +137 -0
- package/dist/runtime/inference/SmallModelResolver.js.map +1 -0
- package/dist/runtime/inference/index.d.ts.map +1 -0
- package/dist/runtime/inference/index.js.map +1 -0
- package/dist/runtime/inference/inference-index.d.ts.map +1 -0
- package/dist/runtime/inference/inference-index.js.map +1 -0
- package/dist/runtime/inference/types.d.ts +116 -0
- package/dist/runtime/inference/types.d.ts.map +1 -0
- package/dist/runtime/inference/types.js.map +1 -0
- package/dist/runtime/tools/CronTool.d.ts +16 -0
- package/dist/runtime/tools/CronTool.d.ts.map +1 -0
- package/dist/runtime/tools/CronTool.js +281 -0
- package/dist/runtime/tools/CronTool.js.map +1 -0
- package/dist/runtime/tools/ElevenLabsTool.d.ts.map +1 -0
- package/dist/runtime/tools/ElevenLabsTool.js.map +1 -0
- package/dist/runtime/tools/FeedSearchTool.d.ts.map +1 -0
- package/dist/runtime/tools/FeedSearchTool.js.map +1 -0
- package/dist/runtime/tools/GiphyTool.d.ts.map +1 -0
- package/dist/runtime/tools/GiphyTool.js.map +1 -0
- package/dist/runtime/tools/LlmsTxtDiscovery.d.ts.map +1 -0
- package/dist/runtime/tools/LlmsTxtDiscovery.js.map +1 -0
- package/dist/runtime/tools/MediaSearchTool.d.ts.map +1 -0
- package/dist/runtime/tools/MediaSearchTool.js.map +1 -0
- package/dist/runtime/tools/MemoryReadTool.d.ts.map +1 -0
- package/dist/runtime/tools/MemoryReadTool.js.map +1 -0
- package/dist/runtime/tools/NewsSearchTool.d.ts.map +1 -0
- package/dist/runtime/tools/NewsSearchTool.js.map +1 -0
- package/dist/runtime/tools/RAGTool.d.ts.map +1 -0
- package/dist/runtime/tools/RAGTool.js +132 -0
- package/dist/runtime/tools/RAGTool.js.map +1 -0
- package/dist/runtime/tools/RequestFolderAccessTool.d.ts +28 -0
- package/dist/runtime/tools/RequestFolderAccessTool.d.ts.map +1 -0
- package/dist/runtime/tools/RequestFolderAccessTool.js +124 -0
- package/dist/runtime/tools/RequestFolderAccessTool.js.map +1 -0
- package/dist/runtime/tools/SerperSearchTool.d.ts.map +1 -0
- package/dist/runtime/tools/SerperSearchTool.js.map +1 -0
- package/dist/runtime/tools/SocialPostTool.d.ts +76 -0
- package/dist/runtime/tools/SocialPostTool.d.ts.map +1 -0
- package/dist/runtime/tools/SocialPostTool.js +116 -0
- package/dist/runtime/tools/SocialPostTool.js.map +1 -0
- package/dist/runtime/tools/ToolApprovalHandler.d.ts +152 -0
- package/dist/runtime/tools/ToolApprovalHandler.d.ts.map +1 -0
- package/dist/runtime/tools/ToolApprovalHandler.js +269 -0
- package/dist/runtime/tools/ToolApprovalHandler.js.map +1 -0
- package/dist/runtime/tools/ToolRegistry.d.ts.map +1 -0
- package/dist/runtime/tools/ToolRegistry.js.map +1 -0
- package/dist/runtime/tools/ToolStreamProcessor.d.ts +200 -0
- package/dist/runtime/tools/ToolStreamProcessor.d.ts.map +1 -0
- package/dist/runtime/tools/ToolStreamProcessor.js +410 -0
- package/dist/runtime/tools/ToolStreamProcessor.js.map +1 -0
- package/dist/runtime/tools/index.d.ts.map +1 -0
- package/dist/runtime/tools/index.js.map +1 -0
- package/dist/runtime/tools/ollama-options.d.ts.map +1 -0
- package/dist/runtime/tools/ollama-options.js.map +1 -0
- package/dist/runtime/tools/policy.d.ts +98 -0
- package/dist/runtime/tools/policy.d.ts.map +1 -0
- package/dist/runtime/tools/policy.js +253 -0
- package/dist/runtime/tools/policy.js.map +1 -0
- package/dist/runtime/tools/tool-calling.d.ts +111 -0
- package/dist/runtime/tools/tool-calling.d.ts.map +1 -0
- package/dist/runtime/tools/tool-calling.js +713 -0
- package/dist/runtime/tools/tool-calling.js.map +1 -0
- package/dist/runtime/tools/tool-failure-learner.d.ts +57 -0
- package/dist/runtime/tools/tool-failure-learner.d.ts.map +1 -0
- package/dist/runtime/tools/tool-failure-learner.js.map +1 -0
- package/dist/runtime/tools/tool-function-names.d.ts.map +1 -0
- package/dist/runtime/tools/tool-function-names.js.map +1 -0
- package/dist/runtime/tools/tool-helpers.d.ts +355 -0
- package/dist/runtime/tools/tool-helpers.d.ts.map +1 -0
- package/dist/runtime/tools/tool-helpers.js +1022 -0
- package/dist/runtime/tools/tool-helpers.js.map +1 -0
- package/dist/runtime/tools/tools-index.d.ts.map +1 -0
- package/dist/runtime/tools/tools-index.js.map +1 -0
- package/dist/runtime/tools/turn-tool-selection.d.ts +16 -0
- package/dist/runtime/tools/turn-tool-selection.d.ts.map +1 -0
- package/dist/runtime/tools/turn-tool-selection.js +94 -0
- package/dist/runtime/tools/turn-tool-selection.js.map +1 -0
- package/dist/runtime/tools/workspace.d.ts.map +1 -0
- package/dist/runtime/tools/workspace.js.map +1 -0
- package/dist/security/SecurityTiers.d.ts +1 -1
- package/dist/security/SecurityTiers.d.ts.map +1 -1
- package/dist/security/SecurityTiers.js +1 -1
- package/dist/security/SecurityTiers.js.map +1 -1
- package/dist/security/SignedOutputVerifier.d.ts +1 -1
- package/dist/security/SignedOutputVerifier.d.ts.map +1 -1
- package/dist/security/SignedOutputVerifier.js +1 -1
- package/dist/security/SignedOutputVerifier.js.map +1 -1
- package/dist/security/StepUpAuthorizationManager.d.ts +1 -1
- package/dist/security/StepUpAuthorizationManager.d.ts.map +1 -1
- package/dist/security/StepUpAuthorizationManager.js +1 -1
- package/dist/security/StepUpAuthorizationManager.js.map +1 -1
- package/dist/security/WunderlandSecurityPipeline.d.ts +1 -1
- package/dist/security/WunderlandSecurityPipeline.d.ts.map +1 -1
- package/dist/security/authorization-types.d.ts +1 -1
- package/dist/security/authorization-types.d.ts.map +1 -1
- package/dist/security/safe-merge.d.ts.map +1 -0
- package/dist/security/safe-merge.js.map +1 -0
- package/dist/security/ssrf-guard.d.ts +96 -0
- package/dist/security/ssrf-guard.d.ts.map +1 -0
- package/dist/security/ssrf-guard.js +293 -0
- package/dist/security/ssrf-guard.js.map +1 -0
- package/dist/security/types.d.ts +2 -2
- package/dist/security/types.d.ts.map +1 -1
- package/dist/skills/index.d.ts +4 -6
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +4 -7
- package/dist/skills/index.js.map +1 -1
- package/dist/types/core-types.d.ts +359 -0
- package/dist/types/core-types.d.ts.map +1 -0
- package/dist/types/core-types.js +224 -0
- package/dist/types/core-types.js.map +1 -0
- package/package.json +16 -66
- package/dist/advanced/agency.d.ts +0 -8
- package/dist/advanced/agency.d.ts.map +0 -1
- package/dist/advanced/agency.js +0 -8
- package/dist/advanced/agency.js.map +0 -1
- package/dist/advanced/authorization.d.ts +0 -3
- package/dist/advanced/authorization.d.ts.map +0 -1
- package/dist/advanced/authorization.js +0 -4
- package/dist/advanced/authorization.js.map +0 -1
- package/dist/advanced/browser.d.ts +0 -2
- package/dist/advanced/browser.d.ts.map +0 -1
- package/dist/advanced/browser.js +0 -3
- package/dist/advanced/browser.js.map +0 -1
- package/dist/advanced/core.d.ts +0 -2
- package/dist/advanced/core.d.ts.map +0 -1
- package/dist/advanced/core.js +0 -3
- package/dist/advanced/core.js.map +0 -1
- package/dist/advanced/evaluation.d.ts +0 -8
- package/dist/advanced/evaluation.d.ts.map +0 -1
- package/dist/advanced/evaluation.js +0 -8
- package/dist/advanced/evaluation.js.map +0 -1
- package/dist/advanced/guardrails.d.ts +0 -2
- package/dist/advanced/guardrails.d.ts.map +0 -1
- package/dist/advanced/guardrails.js +0 -3
- package/dist/advanced/guardrails.js.map +0 -1
- package/dist/advanced/index.d.ts +0 -61
- package/dist/advanced/index.d.ts.map +0 -1
- package/dist/advanced/index.js +0 -93
- package/dist/advanced/index.js.map +0 -1
- package/dist/advanced/inference.d.ts +0 -2
- package/dist/advanced/inference.d.ts.map +0 -1
- package/dist/advanced/inference.js +0 -3
- package/dist/advanced/inference.js.map +0 -1
- package/dist/advanced/jobs.d.ts +0 -2
- package/dist/advanced/jobs.d.ts.map +0 -1
- package/dist/advanced/jobs.js +0 -3
- package/dist/advanced/jobs.js.map +0 -1
- package/dist/advanced/knowledge.d.ts +0 -8
- package/dist/advanced/knowledge.d.ts.map +0 -1
- package/dist/advanced/knowledge.js +0 -8
- package/dist/advanced/knowledge.js.map +0 -1
- package/dist/advanced/marketplace.d.ts +0 -8
- package/dist/advanced/marketplace.d.ts.map +0 -1
- package/dist/advanced/marketplace.js +0 -8
- package/dist/advanced/marketplace.js.map +0 -1
- package/dist/advanced/pairing.d.ts +0 -2
- package/dist/advanced/pairing.d.ts.map +0 -1
- package/dist/advanced/pairing.js +0 -3
- package/dist/advanced/pairing.js.map +0 -1
- package/dist/advanced/planning.d.ts +0 -8
- package/dist/advanced/planning.d.ts.map +0 -1
- package/dist/advanced/planning.js +0 -8
- package/dist/advanced/planning.js.map +0 -1
- package/dist/advanced/provenance.d.ts +0 -8
- package/dist/advanced/provenance.d.ts.map +0 -1
- package/dist/advanced/provenance.js +0 -8
- package/dist/advanced/provenance.js.map +0 -1
- package/dist/advanced/rag.d.ts +0 -2
- package/dist/advanced/rag.d.ts.map +0 -1
- package/dist/advanced/rag.js +0 -3
- package/dist/advanced/rag.js.map +0 -1
- package/dist/advanced/scheduling.d.ts +0 -2
- package/dist/advanced/scheduling.d.ts.map +0 -1
- package/dist/advanced/scheduling.js +0 -3
- package/dist/advanced/scheduling.js.map +0 -1
- package/dist/advanced/security.d.ts +0 -2
- package/dist/advanced/security.d.ts.map +0 -1
- package/dist/advanced/security.js +0 -3
- package/dist/advanced/security.js.map +0 -1
- package/dist/advanced/skills.d.ts +0 -2
- package/dist/advanced/skills.d.ts.map +0 -1
- package/dist/advanced/skills.js +0 -3
- package/dist/advanced/skills.js.map +0 -1
- package/dist/advanced/social.d.ts +0 -2
- package/dist/advanced/social.d.ts.map +0 -1
- package/dist/advanced/social.js +0 -3
- package/dist/advanced/social.js.map +0 -1
- package/dist/advanced/structured.d.ts +0 -8
- package/dist/advanced/structured.d.ts.map +0 -1
- package/dist/advanced/structured.js +0 -8
- package/dist/advanced/structured.js.map +0 -1
- package/dist/advanced/voice.d.ts +0 -2
- package/dist/advanced/voice.d.ts.map +0 -1
- package/dist/advanced/voice.js +0 -3
- package/dist/advanced/voice.js.map +0 -1
- package/dist/advanced/workflows.d.ts +0 -15
- package/dist/advanced/workflows.d.ts.map +0 -1
- package/dist/advanced/workflows.js +0 -15
- package/dist/advanced/workflows.js.map +0 -1
- package/dist/api/index.d.ts +0 -2
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +0 -1
- package/dist/browser/index.d.ts +0 -2
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -2
- package/dist/browser/index.js.map +0 -1
- package/dist/channels/api-new/api-index.d.ts.map +0 -1
- package/dist/channels/api-new/api-index.js.map +0 -1
- package/dist/channels/api-new/chat-runtime.d.ts +0 -68
- package/dist/channels/api-new/chat-runtime.d.ts.map +0 -1
- package/dist/channels/api-new/chat-runtime.js +0 -123
- package/dist/channels/api-new/chat-runtime.js.map +0 -1
- package/dist/channels/api-new/index.d.ts.map +0 -1
- package/dist/channels/api-new/index.js.map +0 -1
- package/dist/channels/api-new/rate-limiter.d.ts.map +0 -1
- package/dist/channels/api-new/rate-limiter.js.map +0 -1
- package/dist/channels/api-new/routes/agents.d.ts.map +0 -1
- package/dist/channels/api-new/routes/agents.js.map +0 -1
- package/dist/channels/api-new/routes/chat.d.ts.map +0 -1
- package/dist/channels/api-new/routes/chat.js +0 -287
- package/dist/channels/api-new/routes/chat.js.map +0 -1
- package/dist/channels/api-new/routes/config.d.ts.map +0 -1
- package/dist/channels/api-new/routes/config.js.map +0 -1
- package/dist/channels/api-new/routes/health.d.ts.map +0 -1
- package/dist/channels/api-new/routes/health.js.map +0 -1
- package/dist/channels/api-new/routes/index.d.ts.map +0 -1
- package/dist/channels/api-new/routes/index.js.map +0 -1
- package/dist/channels/api-new/routes/social.d.ts.map +0 -1
- package/dist/channels/api-new/routes/social.js.map +0 -1
- package/dist/channels/api-new/routes/types.d.ts +0 -85
- package/dist/channels/api-new/routes/types.d.ts.map +0 -1
- package/dist/channels/api-new/routes/types.js.map +0 -1
- package/dist/channels/api-new/server-helpers.d.ts +0 -32
- package/dist/channels/api-new/server-helpers.d.ts.map +0 -1
- package/dist/channels/api-new/server-helpers.js.map +0 -1
- package/dist/channels/api-new/server.d.ts +0 -97
- package/dist/channels/api-new/server.d.ts.map +0 -1
- package/dist/channels/api-new/server.js +0 -1065
- package/dist/channels/api-new/server.js.map +0 -1
- package/dist/channels/api-new/types.d.ts +0 -527
- package/dist/channels/api-new/types.d.ts.map +0 -1
- package/dist/channels/api-new/types.js.map +0 -1
- package/dist/channels/browser-new/BrowserClient.d.ts.map +0 -1
- package/dist/channels/browser-new/BrowserClient.js.map +0 -1
- package/dist/channels/browser-new/BrowserInteractions.d.ts.map +0 -1
- package/dist/channels/browser-new/BrowserInteractions.js.map +0 -1
- package/dist/channels/browser-new/BrowserSession.d.ts.map +0 -1
- package/dist/channels/browser-new/BrowserSession.js.map +0 -1
- package/dist/channels/browser-new/browser-index.d.ts.map +0 -1
- package/dist/channels/browser-new/browser-index.js.map +0 -1
- package/dist/channels/browser-new/index.d.ts.map +0 -1
- package/dist/channels/browser-new/index.js.map +0 -1
- package/dist/channels/browser-new/types.d.ts.map +0 -1
- package/dist/channels/browser-new/types.js.map +0 -1
- package/dist/channels/voice-new/call-client.d.ts.map +0 -1
- package/dist/channels/voice-new/call-client.js.map +0 -1
- package/dist/channels/voice-new/index.d.ts.map +0 -1
- package/dist/channels/voice-new/index.js.map +0 -1
- package/dist/channels/voice-new/speech-catalog.d.ts.map +0 -1
- package/dist/channels/voice-new/speech-catalog.js.map +0 -1
- package/dist/channels/voice-new/streaming-pipeline.d.ts.map +0 -1
- package/dist/channels/voice-new/streaming-pipeline.js +0 -305
- package/dist/channels/voice-new/streaming-pipeline.js.map +0 -1
- package/dist/channels/voice-new/telephony-webhook-server.d.ts.map +0 -1
- package/dist/channels/voice-new/telephony-webhook-server.js.map +0 -1
- package/dist/channels/voice-new/voice-index.d.ts.map +0 -1
- package/dist/channels/voice-new/voice-index.js.map +0 -1
- package/dist/channels/voice-new/ws-server.d.ts.map +0 -1
- package/dist/channels/voice-new/ws-server.js +0 -187
- package/dist/channels/voice-new/ws-server.js.map +0 -1
- package/dist/config/index.d.ts +0 -2
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -2
- package/dist/config/index.js.map +0 -1
- package/dist/core/TokenUsageTracker.d.ts +0 -115
- package/dist/core/TokenUsageTracker.d.ts.map +0 -1
- package/dist/core/TokenUsageTracker.js +0 -219
- package/dist/core/TokenUsageTracker.js.map +0 -1
- package/dist/core/resolve-skill-context.d.ts +0 -23
- package/dist/core/resolve-skill-context.d.ts.map +0 -1
- package/dist/core/resolve-skill-context.js +0 -165
- package/dist/core/resolve-skill-context.js.map +0 -1
- package/dist/core/safe-merge.d.ts.map +0 -1
- package/dist/core/safe-merge.js.map +0 -1
- package/dist/core/ssrf-guard.d.ts +0 -67
- package/dist/core/ssrf-guard.d.ts.map +0 -1
- package/dist/core/ssrf-guard.js +0 -242
- package/dist/core/ssrf-guard.js.map +0 -1
- package/dist/core/types.d.ts +0 -359
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js +0 -224
- package/dist/core/types.js.map +0 -1
- package/dist/discovery/index.d.ts +0 -2
- package/dist/discovery/index.d.ts.map +0 -1
- package/dist/discovery/index.js +0 -2
- package/dist/discovery/index.js.map +0 -1
- package/dist/memory-new/auto-ingest/MemoryAutoIngestPipeline.d.ts +0 -68
- package/dist/memory-new/auto-ingest/MemoryAutoIngestPipeline.d.ts.map +0 -1
- package/dist/memory-new/auto-ingest/MemoryAutoIngestPipeline.js.map +0 -1
- package/dist/memory-new/auto-ingest/index.d.ts.map +0 -1
- package/dist/memory-new/auto-ingest/index.js.map +0 -1
- package/dist/memory-new/initialization/CognitiveMemoryInitializer.d.ts.map +0 -1
- package/dist/memory-new/initialization/CognitiveMemoryInitializer.js +0 -98
- package/dist/memory-new/initialization/CognitiveMemoryInitializer.js.map +0 -1
- package/dist/memory-new/initialization/MemorySystemInitializer.d.ts.map +0 -1
- package/dist/memory-new/initialization/MemorySystemInitializer.js.map +0 -1
- package/dist/memory-new/initialization/index.d.ts.map +0 -1
- package/dist/memory-new/initialization/index.js.map +0 -1
- package/dist/memory-new/rag/QueryExpander.d.ts.map +0 -1
- package/dist/memory-new/rag/QueryExpander.js.map +0 -1
- package/dist/memory-new/rag/RAGAuditPersistence.d.ts.map +0 -1
- package/dist/memory-new/rag/RAGAuditPersistence.js.map +0 -1
- package/dist/memory-new/rag/http-proxy.d.ts +0 -16
- package/dist/memory-new/rag/http-proxy.d.ts.map +0 -1
- package/dist/memory-new/rag/http-proxy.js.map +0 -1
- package/dist/memory-new/rag/hyde-integration.d.ts +0 -41
- package/dist/memory-new/rag/hyde-integration.d.ts.map +0 -1
- package/dist/memory-new/rag/hyde-integration.js +0 -87
- package/dist/memory-new/rag/hyde-integration.js.map +0 -1
- package/dist/memory-new/rag/index.d.ts.map +0 -1
- package/dist/memory-new/rag/index.js.map +0 -1
- package/dist/memory-new/rag/rag-client.d.ts.map +0 -1
- package/dist/memory-new/rag/rag-client.js.map +0 -1
- package/dist/memory-new/rag/rag-index.d.ts.map +0 -1
- package/dist/memory-new/rag/rag-index.js.map +0 -1
- package/dist/memory-new/rag/runtime-tools.d.ts +0 -4
- package/dist/memory-new/rag/runtime-tools.d.ts.map +0 -1
- package/dist/memory-new/rag/runtime-tools.js +0 -115
- package/dist/memory-new/rag/runtime-tools.js.map +0 -1
- package/dist/memory-new/retrieval/TurnMemoryRetriever.d.ts +0 -21
- package/dist/memory-new/retrieval/TurnMemoryRetriever.d.ts.map +0 -1
- package/dist/memory-new/retrieval/TurnMemoryRetriever.js.map +0 -1
- package/dist/memory-new/retrieval/index.d.ts.map +0 -1
- package/dist/memory-new/retrieval/index.js.map +0 -1
- package/dist/memory-new/storage/AgentMemoryAdapter.d.ts.map +0 -1
- package/dist/memory-new/storage/AgentMemoryAdapter.js.map +0 -1
- package/dist/memory-new/storage/AgentStateStore.d.ts.map +0 -1
- package/dist/memory-new/storage/AgentStateStore.js.map +0 -1
- package/dist/memory-new/storage/AgentStorageManager.d.ts.map +0 -1
- package/dist/memory-new/storage/AgentStorageManager.js.map +0 -1
- package/dist/memory-new/storage/PersonalityMemoryConfig.d.ts.map +0 -1
- package/dist/memory-new/storage/PersonalityMemoryConfig.js.map +0 -1
- package/dist/memory-new/storage/index.d.ts.map +0 -1
- package/dist/memory-new/storage/index.js.map +0 -1
- package/dist/memory-new/storage/storage-index.d.ts +0 -13
- package/dist/memory-new/storage/storage-index.d.ts.map +0 -1
- package/dist/memory-new/storage/storage-index.js +0 -11
- package/dist/memory-new/storage/storage-index.js.map +0 -1
- package/dist/memory-new/storage/types.d.ts.map +0 -1
- package/dist/memory-new/storage/types.js.map +0 -1
- package/dist/platform/config-new/config-index.d.ts.map +0 -1
- package/dist/platform/config-new/config-index.js.map +0 -1
- package/dist/platform/config-new/effective-agent-config.d.ts +0 -24
- package/dist/platform/config-new/effective-agent-config.d.ts.map +0 -1
- package/dist/platform/config-new/effective-agent-config.js +0 -272
- package/dist/platform/config-new/effective-agent-config.js.map +0 -1
- package/dist/platform/config-new/errors.d.ts.map +0 -1
- package/dist/platform/config-new/errors.js.map +0 -1
- package/dist/platform/config-new/index.d.ts.map +0 -1
- package/dist/platform/config-new/index.js.map +0 -1
- package/dist/platform/config-new/load.d.ts +0 -32
- package/dist/platform/config-new/load.d.ts.map +0 -1
- package/dist/platform/config-new/load.js.map +0 -1
- package/dist/platform/config-new/persona-registry.d.ts +0 -48
- package/dist/platform/config-new/persona-registry.d.ts.map +0 -1
- package/dist/platform/config-new/persona-registry.js.map +0 -1
- package/dist/platform/config-new/provider-defaults.d.ts +0 -54
- package/dist/platform/config-new/provider-defaults.d.ts.map +0 -1
- package/dist/platform/config-new/provider-defaults.js.map +0 -1
- package/dist/platform/config-new/schema.d.ts +0 -7
- package/dist/platform/config-new/schema.d.ts.map +0 -1
- package/dist/platform/config-new/schema.js.map +0 -1
- package/dist/platform/config-new/wallet-types.d.ts.map +0 -1
- package/dist/platform/config-new/wallet-types.js.map +0 -1
- package/dist/platform/discovery-new/WunderlandDiscoveryManager.d.ts +0 -129
- package/dist/platform/discovery-new/WunderlandDiscoveryManager.d.ts.map +0 -1
- package/dist/platform/discovery-new/WunderlandDiscoveryManager.js +0 -357
- package/dist/platform/discovery-new/WunderlandDiscoveryManager.js.map +0 -1
- package/dist/platform/discovery-new/discovery-index.d.ts.map +0 -1
- package/dist/platform/discovery-new/discovery-index.js.map +0 -1
- package/dist/platform/discovery-new/index.d.ts.map +0 -1
- package/dist/platform/discovery-new/index.js.map +0 -1
- package/dist/platform/discovery-new/preset-co-occurrence.d.ts.map +0 -1
- package/dist/platform/discovery-new/preset-co-occurrence.js +0 -36
- package/dist/platform/discovery-new/preset-co-occurrence.js.map +0 -1
- package/dist/rag/index.d.ts +0 -2
- package/dist/rag/index.d.ts.map +0 -1
- package/dist/rag/index.js +0 -2
- package/dist/rag/index.js.map +0 -1
- package/dist/runtime/index.d.ts +0 -22
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js +0 -23
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime-new/agentos-bridge/agentos-runtime.d.ts.map +0 -1
- package/dist/runtime-new/agentos-bridge/agentos-runtime.js.map +0 -1
- package/dist/runtime-new/agentos-bridge/index.d.ts.map +0 -1
- package/dist/runtime-new/agentos-bridge/index.js.map +0 -1
- package/dist/runtime-new/agentos-bridge/query-router-init.d.ts +0 -165
- package/dist/runtime-new/agentos-bridge/query-router-init.d.ts.map +0 -1
- package/dist/runtime-new/agentos-bridge/query-router-init.js.map +0 -1
- package/dist/runtime-new/agentos-bridge/rag-state-persistence.d.ts.map +0 -1
- package/dist/runtime-new/agentos-bridge/rag-state-persistence.js.map +0 -1
- package/dist/runtime-new/agentos-bridge/research-classifier.d.ts.map +0 -1
- package/dist/runtime-new/agentos-bridge/research-classifier.js.map +0 -1
- package/dist/runtime-new/agentos-bridge/unified-retriever-builder.d.ts +0 -189
- package/dist/runtime-new/agentos-bridge/unified-retriever-builder.d.ts.map +0 -1
- package/dist/runtime-new/agentos-bridge/unified-retriever-builder.js +0 -335
- package/dist/runtime-new/agentos-bridge/unified-retriever-builder.js.map +0 -1
- package/dist/runtime-new/compaction/CompactionManager.d.ts.map +0 -1
- package/dist/runtime-new/compaction/CompactionManager.js.map +0 -1
- package/dist/runtime-new/compaction/index.d.ts.map +0 -1
- package/dist/runtime-new/compaction/index.js.map +0 -1
- package/dist/runtime-new/execution/adaptive-execution.d.ts +0 -102
- package/dist/runtime-new/execution/adaptive-execution.d.ts.map +0 -1
- package/dist/runtime-new/execution/adaptive-execution.js.map +0 -1
- package/dist/runtime-new/execution/empty-output-fallback.d.ts.map +0 -1
- package/dist/runtime-new/execution/empty-output-fallback.js.map +0 -1
- package/dist/runtime-new/execution/graph-runner.d.ts +0 -58
- package/dist/runtime-new/execution/graph-runner.d.ts.map +0 -1
- package/dist/runtime-new/execution/graph-runner.js +0 -411
- package/dist/runtime-new/execution/graph-runner.js.map +0 -1
- package/dist/runtime-new/execution/index.d.ts.map +0 -1
- package/dist/runtime-new/execution/index.js.map +0 -1
- package/dist/runtime-new/execution/llm-stream-adapter.d.ts.map +0 -1
- package/dist/runtime-new/execution/llm-stream-adapter.js.map +0 -1
- package/dist/runtime-new/execution/request-persona.d.ts +0 -38
- package/dist/runtime-new/execution/request-persona.d.ts.map +0 -1
- package/dist/runtime-new/execution/request-persona.js +0 -117
- package/dist/runtime-new/execution/request-persona.js.map +0 -1
- package/dist/runtime-new/execution/schema-on-demand.d.ts +0 -45
- package/dist/runtime-new/execution/schema-on-demand.d.ts.map +0 -1
- package/dist/runtime-new/execution/schema-on-demand.js +0 -348
- package/dist/runtime-new/execution/schema-on-demand.js.map +0 -1
- package/dist/runtime-new/execution/system-prompt-builder.d.ts +0 -36
- package/dist/runtime-new/execution/system-prompt-builder.d.ts.map +0 -1
- package/dist/runtime-new/execution/system-prompt-builder.js.map +0 -1
- package/dist/runtime-new/identity/agent-identity.d.ts.map +0 -1
- package/dist/runtime-new/identity/agent-identity.js.map +0 -1
- package/dist/runtime-new/identity/api-key-resolver.d.ts.map +0 -1
- package/dist/runtime-new/identity/api-key-resolver.js.map +0 -1
- package/dist/runtime-new/identity/index.d.ts.map +0 -1
- package/dist/runtime-new/identity/index.js.map +0 -1
- package/dist/runtime-new/inference/HierarchicalInferenceRouter.d.ts +0 -102
- package/dist/runtime-new/inference/HierarchicalInferenceRouter.d.ts.map +0 -1
- package/dist/runtime-new/inference/HierarchicalInferenceRouter.js +0 -407
- package/dist/runtime-new/inference/HierarchicalInferenceRouter.js.map +0 -1
- package/dist/runtime-new/inference/SmallModelResolver.d.ts.map +0 -1
- package/dist/runtime-new/inference/SmallModelResolver.js +0 -137
- package/dist/runtime-new/inference/SmallModelResolver.js.map +0 -1
- package/dist/runtime-new/inference/index.d.ts.map +0 -1
- package/dist/runtime-new/inference/index.js.map +0 -1
- package/dist/runtime-new/inference/inference-index.d.ts.map +0 -1
- package/dist/runtime-new/inference/inference-index.js.map +0 -1
- package/dist/runtime-new/inference/types.d.ts +0 -116
- package/dist/runtime-new/inference/types.d.ts.map +0 -1
- package/dist/runtime-new/inference/types.js.map +0 -1
- package/dist/runtime-new/tools/CronTool.d.ts +0 -16
- package/dist/runtime-new/tools/CronTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/CronTool.js +0 -281
- package/dist/runtime-new/tools/CronTool.js.map +0 -1
- package/dist/runtime-new/tools/ElevenLabsTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/ElevenLabsTool.js.map +0 -1
- package/dist/runtime-new/tools/FeedSearchTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/FeedSearchTool.js.map +0 -1
- package/dist/runtime-new/tools/GiphyTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/GiphyTool.js.map +0 -1
- package/dist/runtime-new/tools/LlmsTxtDiscovery.d.ts.map +0 -1
- package/dist/runtime-new/tools/LlmsTxtDiscovery.js.map +0 -1
- package/dist/runtime-new/tools/MediaSearchTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/MediaSearchTool.js.map +0 -1
- package/dist/runtime-new/tools/MemoryReadTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/MemoryReadTool.js.map +0 -1
- package/dist/runtime-new/tools/NewsSearchTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/NewsSearchTool.js.map +0 -1
- package/dist/runtime-new/tools/RAGTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/RAGTool.js +0 -132
- package/dist/runtime-new/tools/RAGTool.js.map +0 -1
- package/dist/runtime-new/tools/RequestFolderAccessTool.d.ts +0 -28
- package/dist/runtime-new/tools/RequestFolderAccessTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/RequestFolderAccessTool.js +0 -124
- package/dist/runtime-new/tools/RequestFolderAccessTool.js.map +0 -1
- package/dist/runtime-new/tools/SerperSearchTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/SerperSearchTool.js.map +0 -1
- package/dist/runtime-new/tools/SocialPostTool.d.ts +0 -76
- package/dist/runtime-new/tools/SocialPostTool.d.ts.map +0 -1
- package/dist/runtime-new/tools/SocialPostTool.js +0 -116
- package/dist/runtime-new/tools/SocialPostTool.js.map +0 -1
- package/dist/runtime-new/tools/ToolApprovalHandler.d.ts +0 -152
- package/dist/runtime-new/tools/ToolApprovalHandler.d.ts.map +0 -1
- package/dist/runtime-new/tools/ToolApprovalHandler.js +0 -269
- package/dist/runtime-new/tools/ToolApprovalHandler.js.map +0 -1
- package/dist/runtime-new/tools/ToolRegistry.d.ts.map +0 -1
- package/dist/runtime-new/tools/ToolRegistry.js.map +0 -1
- package/dist/runtime-new/tools/ToolStreamProcessor.d.ts +0 -200
- package/dist/runtime-new/tools/ToolStreamProcessor.d.ts.map +0 -1
- package/dist/runtime-new/tools/ToolStreamProcessor.js +0 -410
- package/dist/runtime-new/tools/ToolStreamProcessor.js.map +0 -1
- package/dist/runtime-new/tools/index.d.ts.map +0 -1
- package/dist/runtime-new/tools/index.js.map +0 -1
- package/dist/runtime-new/tools/ollama-options.d.ts.map +0 -1
- package/dist/runtime-new/tools/ollama-options.js.map +0 -1
- package/dist/runtime-new/tools/policy.d.ts +0 -98
- package/dist/runtime-new/tools/policy.d.ts.map +0 -1
- package/dist/runtime-new/tools/policy.js +0 -251
- package/dist/runtime-new/tools/policy.js.map +0 -1
- package/dist/runtime-new/tools/tool-calling.d.ts +0 -111
- package/dist/runtime-new/tools/tool-calling.d.ts.map +0 -1
- package/dist/runtime-new/tools/tool-calling.js +0 -713
- package/dist/runtime-new/tools/tool-calling.js.map +0 -1
- package/dist/runtime-new/tools/tool-failure-learner.d.ts +0 -57
- package/dist/runtime-new/tools/tool-failure-learner.d.ts.map +0 -1
- package/dist/runtime-new/tools/tool-failure-learner.js.map +0 -1
- package/dist/runtime-new/tools/tool-function-names.d.ts.map +0 -1
- package/dist/runtime-new/tools/tool-function-names.js.map +0 -1
- package/dist/runtime-new/tools/tool-helpers.d.ts +0 -355
- package/dist/runtime-new/tools/tool-helpers.d.ts.map +0 -1
- package/dist/runtime-new/tools/tool-helpers.js +0 -1022
- package/dist/runtime-new/tools/tool-helpers.js.map +0 -1
- package/dist/runtime-new/tools/tools-index.d.ts.map +0 -1
- package/dist/runtime-new/tools/tools-index.js.map +0 -1
- package/dist/runtime-new/tools/turn-tool-selection.d.ts +0 -16
- package/dist/runtime-new/tools/turn-tool-selection.d.ts.map +0 -1
- package/dist/runtime-new/tools/turn-tool-selection.js +0 -94
- package/dist/runtime-new/tools/turn-tool-selection.js.map +0 -1
- package/dist/runtime-new/tools/workspace.d.ts.map +0 -1
- package/dist/runtime-new/tools/workspace.js.map +0 -1
- package/dist/storage/index.d.ts +0 -2
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js +0 -2
- package/dist/storage/index.js.map +0 -1
- package/dist/tools/index.d.ts +0 -2
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -2
- package/dist/tools/index.js.map +0 -1
- package/dist/voice/index.d.ts +0 -2
- package/dist/voice/index.d.ts.map +0 -1
- package/dist/voice/index.js +0 -2
- package/dist/voice/index.js.map +0 -1
- /package/dist/channels/{api-new → api}/api-index.d.ts +0 -0
- /package/dist/channels/{api-new → api}/api-index.js +0 -0
- /package/dist/channels/{api-new → api}/index.d.ts +0 -0
- /package/dist/channels/{api-new → api}/index.js +0 -0
- /package/dist/channels/{api-new → api}/rate-limiter.d.ts +0 -0
- /package/dist/channels/{api-new → api}/rate-limiter.js +0 -0
- /package/dist/channels/{api-new → api}/routes/agents.d.ts +0 -0
- /package/dist/channels/{api-new → api}/routes/agents.js +0 -0
- /package/dist/channels/{api-new → api}/routes/chat.d.ts +0 -0
- /package/dist/channels/{api-new → api}/routes/config.d.ts +0 -0
- /package/dist/channels/{api-new → api}/routes/config.js +0 -0
- /package/dist/channels/{api-new → api}/routes/health.d.ts +0 -0
- /package/dist/channels/{api-new → api}/routes/health.js +0 -0
- /package/dist/channels/{api-new → api}/routes/index.d.ts +0 -0
- /package/dist/channels/{api-new → api}/routes/index.js +0 -0
- /package/dist/channels/{api-new → api}/routes/social.d.ts +0 -0
- /package/dist/channels/{api-new → api}/routes/social.js +0 -0
- /package/dist/channels/{api-new → api}/routes/types.js +0 -0
- /package/dist/channels/{api-new → api}/server-helpers.js +0 -0
- /package/dist/channels/{api-new → api}/types.js +0 -0
- /package/dist/channels/{browser-new → browser}/BrowserClient.d.ts +0 -0
- /package/dist/channels/{browser-new → browser}/BrowserClient.js +0 -0
- /package/dist/channels/{browser-new → browser}/BrowserInteractions.d.ts +0 -0
- /package/dist/channels/{browser-new → browser}/BrowserInteractions.js +0 -0
- /package/dist/channels/{browser-new → browser}/BrowserSession.d.ts +0 -0
- /package/dist/channels/{browser-new → browser}/BrowserSession.js +0 -0
- /package/dist/channels/{browser-new → browser}/browser-index.d.ts +0 -0
- /package/dist/channels/{browser-new → browser}/browser-index.js +0 -0
- /package/dist/channels/{browser-new → browser}/index.d.ts +0 -0
- /package/dist/channels/{browser-new → browser}/index.js +0 -0
- /package/dist/channels/{browser-new → browser}/types.d.ts +0 -0
- /package/dist/channels/{browser-new → browser}/types.js +0 -0
- /package/dist/channels/{voice-new → voice}/call-client.d.ts +0 -0
- /package/dist/channels/{voice-new → voice}/call-client.js +0 -0
- /package/dist/channels/{voice-new → voice}/index.d.ts +0 -0
- /package/dist/channels/{voice-new → voice}/index.js +0 -0
- /package/dist/channels/{voice-new → voice}/speech-catalog.d.ts +0 -0
- /package/dist/channels/{voice-new → voice}/speech-catalog.js +0 -0
- /package/dist/channels/{voice-new → voice}/streaming-pipeline.d.ts +0 -0
- /package/dist/channels/{voice-new → voice}/telephony-webhook-server.d.ts +0 -0
- /package/dist/channels/{voice-new → voice}/telephony-webhook-server.js +0 -0
- /package/dist/channels/{voice-new → voice}/voice-index.d.ts +0 -0
- /package/dist/channels/{voice-new → voice}/voice-index.js +0 -0
- /package/dist/channels/{voice-new → voice}/ws-server.d.ts +0 -0
- /package/dist/{memory-new → memory}/auto-ingest/MemoryAutoIngestPipeline.js +0 -0
- /package/dist/{memory-new → memory}/auto-ingest/index.d.ts +0 -0
- /package/dist/{memory-new → memory}/auto-ingest/index.js +0 -0
- /package/dist/{memory-new → memory}/initialization/CognitiveMemoryInitializer.d.ts +0 -0
- /package/dist/{memory-new → memory}/initialization/MemorySystemInitializer.d.ts +0 -0
- /package/dist/{memory-new → memory}/initialization/MemorySystemInitializer.js +0 -0
- /package/dist/{memory-new → memory}/initialization/index.d.ts +0 -0
- /package/dist/{memory-new → memory}/initialization/index.js +0 -0
- /package/dist/{memory-new → memory}/rag/QueryExpander.d.ts +0 -0
- /package/dist/{memory-new → memory}/rag/QueryExpander.js +0 -0
- /package/dist/{memory-new → memory}/rag/RAGAuditPersistence.d.ts +0 -0
- /package/dist/{memory-new → memory}/rag/RAGAuditPersistence.js +0 -0
- /package/dist/{memory-new → memory}/rag/http-proxy.js +0 -0
- /package/dist/{memory-new → memory}/rag/index.d.ts +0 -0
- /package/dist/{memory-new → memory}/rag/index.js +0 -0
- /package/dist/{memory-new → memory}/rag/rag-client.d.ts +0 -0
- /package/dist/{memory-new → memory}/rag/rag-client.js +0 -0
- /package/dist/{memory-new → memory}/rag/rag-index.d.ts +0 -0
- /package/dist/{memory-new → memory}/rag/rag-index.js +0 -0
- /package/dist/{memory-new → memory}/retrieval/TurnMemoryRetriever.js +0 -0
- /package/dist/{memory-new → memory}/retrieval/index.d.ts +0 -0
- /package/dist/{memory-new → memory}/retrieval/index.js +0 -0
- /package/dist/{memory-new → memory}/storage/AgentMemoryAdapter.d.ts +0 -0
- /package/dist/{memory-new → memory}/storage/AgentMemoryAdapter.js +0 -0
- /package/dist/{memory-new → memory}/storage/AgentStateStore.d.ts +0 -0
- /package/dist/{memory-new → memory}/storage/AgentStateStore.js +0 -0
- /package/dist/{memory-new → memory}/storage/AgentStorageManager.d.ts +0 -0
- /package/dist/{memory-new → memory}/storage/AgentStorageManager.js +0 -0
- /package/dist/{memory-new → memory}/storage/PersonalityMemoryConfig.d.ts +0 -0
- /package/dist/{memory-new → memory}/storage/PersonalityMemoryConfig.js +0 -0
- /package/dist/{memory-new → memory}/storage/index.d.ts +0 -0
- /package/dist/{memory-new → memory}/storage/index.js +0 -0
- /package/dist/{memory-new → memory}/storage/types.d.ts +0 -0
- /package/dist/{memory-new → memory}/storage/types.js +0 -0
- /package/dist/platform/{config-new → config}/config-index.d.ts +0 -0
- /package/dist/platform/{config-new → config}/config-index.js +0 -0
- /package/dist/platform/{config-new → config}/errors.d.ts +0 -0
- /package/dist/platform/{config-new → config}/errors.js +0 -0
- /package/dist/platform/{config-new → config}/index.d.ts +0 -0
- /package/dist/platform/{config-new → config}/index.js +0 -0
- /package/dist/platform/{config-new → config}/load.js +0 -0
- /package/dist/platform/{config-new → config}/persona-registry.js +0 -0
- /package/dist/platform/{config-new → config}/provider-defaults.js +0 -0
- /package/dist/platform/{config-new → config}/schema.js +0 -0
- /package/dist/platform/{config-new → config}/wallet-types.d.ts +0 -0
- /package/dist/platform/{config-new → config}/wallet-types.js +0 -0
- /package/dist/platform/{discovery-new → discovery}/discovery-index.d.ts +0 -0
- /package/dist/platform/{discovery-new → discovery}/discovery-index.js +0 -0
- /package/dist/platform/{discovery-new → discovery}/index.d.ts +0 -0
- /package/dist/platform/{discovery-new → discovery}/index.js +0 -0
- /package/dist/platform/{discovery-new → discovery}/preset-co-occurrence.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/agentos-bridge/agentos-runtime.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/agentos-bridge/agentos-runtime.js +0 -0
- /package/dist/{runtime-new → runtime}/agentos-bridge/index.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/agentos-bridge/index.js +0 -0
- /package/dist/{runtime-new → runtime}/agentos-bridge/query-router-init.js +0 -0
- /package/dist/{runtime-new → runtime}/agentos-bridge/rag-state-persistence.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/agentos-bridge/rag-state-persistence.js +0 -0
- /package/dist/{runtime-new → runtime}/agentos-bridge/research-classifier.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/agentos-bridge/research-classifier.js +0 -0
- /package/dist/{runtime-new → runtime}/compaction/CompactionManager.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/compaction/CompactionManager.js +0 -0
- /package/dist/{runtime-new → runtime}/compaction/index.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/compaction/index.js +0 -0
- /package/dist/{runtime-new → runtime}/execution/adaptive-execution.js +0 -0
- /package/dist/{runtime-new → runtime}/execution/empty-output-fallback.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/execution/empty-output-fallback.js +0 -0
- /package/dist/{runtime-new → runtime}/execution/index.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/execution/index.js +0 -0
- /package/dist/{runtime-new → runtime}/execution/llm-stream-adapter.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/execution/llm-stream-adapter.js +0 -0
- /package/dist/{runtime-new → runtime}/execution/system-prompt-builder.js +0 -0
- /package/dist/{runtime-new → runtime}/identity/agent-identity.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/identity/agent-identity.js +0 -0
- /package/dist/{runtime-new → runtime}/identity/api-key-resolver.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/identity/api-key-resolver.js +0 -0
- /package/dist/{runtime-new → runtime}/identity/index.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/identity/index.js +0 -0
- /package/dist/{runtime-new → runtime}/inference/SmallModelResolver.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/inference/index.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/inference/index.js +0 -0
- /package/dist/{runtime-new → runtime}/inference/inference-index.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/inference/inference-index.js +0 -0
- /package/dist/{runtime-new → runtime}/inference/types.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/ElevenLabsTool.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/ElevenLabsTool.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/FeedSearchTool.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/FeedSearchTool.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/GiphyTool.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/GiphyTool.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/LlmsTxtDiscovery.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/LlmsTxtDiscovery.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/MediaSearchTool.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/MediaSearchTool.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/MemoryReadTool.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/MemoryReadTool.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/NewsSearchTool.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/NewsSearchTool.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/RAGTool.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/SerperSearchTool.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/SerperSearchTool.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/ToolRegistry.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/ToolRegistry.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/index.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/index.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/ollama-options.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/ollama-options.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/tool-failure-learner.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/tool-function-names.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/tool-function-names.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/tools-index.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/tools-index.js +0 -0
- /package/dist/{runtime-new → runtime}/tools/workspace.d.ts +0 -0
- /package/dist/{runtime-new → runtime}/tools/workspace.js +0 -0
- /package/dist/{core → security}/safe-merge.d.ts +0 -0
- /package/dist/{core → security}/safe-merge.js +0 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview HITL approval flow, security tier permission checks,
|
|
3
|
+
* step-up authorization, guardrails validation, and tool allowlist/denylist
|
|
4
|
+
* checking.
|
|
5
|
+
*
|
|
6
|
+
* Extracted from `tool-calling.ts` to isolate the authorization and
|
|
7
|
+
* guardrails layer from the LLM loop and streaming logic. Both the
|
|
8
|
+
* non-streaming {@link runToolCallingTurn} and streaming
|
|
9
|
+
* {@link streamToolCallingTurn} delegate tool authorization to the
|
|
10
|
+
* functions exported here.
|
|
11
|
+
*
|
|
12
|
+
* @module wunderland/runtime/ToolApprovalHandler
|
|
13
|
+
*/
|
|
14
|
+
import type { StepUpAuthorizationManager } from '../../security/StepUpAuthorizationManager.js';
|
|
15
|
+
import type { ToolInstance } from './tool-helpers.js';
|
|
16
|
+
export { TOOL_FALLBACK_MAP } from './tool-helpers.js';
|
|
17
|
+
/**
|
|
18
|
+
* Options for {@link authorizeToolCall}.
|
|
19
|
+
*
|
|
20
|
+
* Contains everything needed to decide whether a tool call should be
|
|
21
|
+
* executed, denied, or escalated to the user for HITL approval.
|
|
22
|
+
*/
|
|
23
|
+
export interface ToolAuthorizationOpts {
|
|
24
|
+
/** The resolved tool instance. */
|
|
25
|
+
tool: ToolInstance;
|
|
26
|
+
/** The canonical tool name (after any rewriting). */
|
|
27
|
+
toolName: string;
|
|
28
|
+
/** The tool call arguments from the LLM. */
|
|
29
|
+
args: Record<string, unknown>;
|
|
30
|
+
/** The tool call ID for message correlation. */
|
|
31
|
+
callId: string;
|
|
32
|
+
/** The authorization manager instance. */
|
|
33
|
+
authManager: StepUpAuthorizationManager;
|
|
34
|
+
/** Shared context passed to tool execution. */
|
|
35
|
+
toolContext: Record<string, unknown>;
|
|
36
|
+
/** Whether to skip all permission checks. */
|
|
37
|
+
dangerouslySkipPermissions: boolean;
|
|
38
|
+
/** Interactive permission callback for HITL approval. */
|
|
39
|
+
askPermission: (tool: ToolInstance, args: Record<string, unknown>) => Promise<boolean>;
|
|
40
|
+
/** Whether to wrap tool output for the LLM. */
|
|
41
|
+
shouldWrapToolOutputs: boolean;
|
|
42
|
+
/** Whether to abort on any tool failure. */
|
|
43
|
+
failClosedOnToolFailure: boolean;
|
|
44
|
+
/** Mutable message array for pushing denial messages. */
|
|
45
|
+
messages: Array<Record<string, unknown>>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Result of a tool authorization check.
|
|
49
|
+
*/
|
|
50
|
+
export interface ToolAuthorizationResult {
|
|
51
|
+
/** Whether the tool call is authorized to proceed. */
|
|
52
|
+
authorized: boolean;
|
|
53
|
+
/** Whether the user explicitly approved this call via HITL. */
|
|
54
|
+
hitlApproved: boolean;
|
|
55
|
+
/** If authorization failed and fail_closed is active, the reply to return. */
|
|
56
|
+
earlyReturn?: string;
|
|
57
|
+
/** If authorization failed, the denial reason. */
|
|
58
|
+
error?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Options for {@link executeWithGuardrails}.
|
|
62
|
+
*
|
|
63
|
+
* Encapsulates the guardrails validation, folder escalation, and
|
|
64
|
+
* tool execution within a single instrumented span.
|
|
65
|
+
*/
|
|
66
|
+
export interface GuardrailExecutionOpts {
|
|
67
|
+
/** The resolved tool instance. */
|
|
68
|
+
tool: ToolInstance;
|
|
69
|
+
/** The canonical tool name. */
|
|
70
|
+
toolName: string;
|
|
71
|
+
/** The resolved tool key from the tool map. */
|
|
72
|
+
resolvedToolKey: string;
|
|
73
|
+
/** The tool call arguments. */
|
|
74
|
+
args: Record<string, unknown>;
|
|
75
|
+
/** The tool call ID. */
|
|
76
|
+
callId: string;
|
|
77
|
+
/** Shared context passed to tool execution. */
|
|
78
|
+
toolContext: Record<string, unknown>;
|
|
79
|
+
/** Per-call tool context (may include onToolProgress). */
|
|
80
|
+
callToolContext: Record<string, unknown>;
|
|
81
|
+
/** Whether the user already HITL-approved this call (skip re-prompting). */
|
|
82
|
+
hitlApproved: boolean;
|
|
83
|
+
/** Whether to skip all permission checks. */
|
|
84
|
+
dangerouslySkipPermissions: boolean;
|
|
85
|
+
/** Interactive permission callback for folder escalation. */
|
|
86
|
+
askPermission: (tool: ToolInstance, args: Record<string, unknown>) => Promise<boolean>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Perform step-up authorization for a tool call.
|
|
90
|
+
*
|
|
91
|
+
* Evaluates the tool against the {@link StepUpAuthorizationManager}'s
|
|
92
|
+
* tier configuration:
|
|
93
|
+
*
|
|
94
|
+
* - **Tier 1 (Autonomous)**: Auto-approved, no prompt.
|
|
95
|
+
* - **Tier 2 (Async Review)**: Auto-approved, queued for review.
|
|
96
|
+
* - **Tier 3 (Sync HITL)**: Prompts the user via `askPermission`.
|
|
97
|
+
*
|
|
98
|
+
* When `dangerouslySkipPermissions` is `true`, all tiers are auto-approved.
|
|
99
|
+
*
|
|
100
|
+
* @param opts - Authorization options.
|
|
101
|
+
* @returns Authorization result indicating whether to proceed.
|
|
102
|
+
*/
|
|
103
|
+
export declare function authorizeToolCall(opts: ToolAuthorizationOpts): Promise<ToolAuthorizationResult>;
|
|
104
|
+
/**
|
|
105
|
+
* Execute a tool with guardrails validation and folder escalation.
|
|
106
|
+
*
|
|
107
|
+
* Wraps tool execution inside an OTel span and performs:
|
|
108
|
+
*
|
|
109
|
+
* 1. **Pre-check**: `file_read` on directories fails fast with a helpful message.
|
|
110
|
+
* 2. **Guardrails validation**: Checks folder access rules, sandbox boundaries.
|
|
111
|
+
* 3. **Folder escalation**: If denied paths are escalatable, prompts the user
|
|
112
|
+
* (or auto-grants if HITL already approved this call) and adds folder rules.
|
|
113
|
+
* 4. **Execution**: Calls `tool.execute(args, callToolContext)`.
|
|
114
|
+
*
|
|
115
|
+
* @param opts - Execution options.
|
|
116
|
+
* @returns The tool execution result.
|
|
117
|
+
*/
|
|
118
|
+
export declare function executeWithGuardrails(opts: GuardrailExecutionOpts): Promise<{
|
|
119
|
+
success: boolean;
|
|
120
|
+
output?: unknown;
|
|
121
|
+
error?: string;
|
|
122
|
+
}>;
|
|
123
|
+
/**
|
|
124
|
+
* Build the tool result message payload, including fallback suggestions
|
|
125
|
+
* for failed or empty-result tools.
|
|
126
|
+
*
|
|
127
|
+
* @param result - The tool execution result.
|
|
128
|
+
* @param toolName - The canonical tool name.
|
|
129
|
+
* @param callId - The tool call ID.
|
|
130
|
+
* @param toolMap - The current tool map (to check fallback availability).
|
|
131
|
+
* @param shouldWrapToolOutputs - Whether to wrap output for the LLM.
|
|
132
|
+
* @param debugMode - Whether to log debug output.
|
|
133
|
+
* @returns The message content string to push into the conversation.
|
|
134
|
+
*/
|
|
135
|
+
export declare function buildToolResultPayload(result: {
|
|
136
|
+
success: boolean;
|
|
137
|
+
output?: unknown;
|
|
138
|
+
error?: string;
|
|
139
|
+
}, toolName: string, callId: string, toolMap: Map<string, ToolInstance>, shouldWrapToolOutputs: boolean, debugMode: boolean): Promise<string>;
|
|
140
|
+
/**
|
|
141
|
+
* Build the error payload for a tool that threw an exception.
|
|
142
|
+
*
|
|
143
|
+
* Includes API key guidance hints and suggested fallback tools when
|
|
144
|
+
* available in the tool map.
|
|
145
|
+
*
|
|
146
|
+
* @param errMsg - The error message from the thrown exception.
|
|
147
|
+
* @param toolName - The canonical tool name.
|
|
148
|
+
* @param toolMap - The current tool map.
|
|
149
|
+
* @returns The JSON-serialized error payload.
|
|
150
|
+
*/
|
|
151
|
+
export declare function buildToolErrorPayload(errMsg: string, toolName: string, toolMap: Map<string, ToolInstance>): Promise<string>;
|
|
152
|
+
//# sourceMappingURL=ToolApprovalHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolApprovalHandler.d.ts","s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C9D,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAClC,qBAAqB,EAAE,OAAO,EAC9B,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,MAAM,CAAC,CAqCjB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,GACjC,OAAO,CAAC,MAAM,CAAC,CAcjB"}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview HITL approval flow, security tier permission checks,
|
|
4
|
+
* step-up authorization, guardrails validation, and tool allowlist/denylist
|
|
5
|
+
* checking.
|
|
6
|
+
*
|
|
7
|
+
* Extracted from `tool-calling.ts` to isolate the authorization and
|
|
8
|
+
* guardrails layer from the LLM loop and streaming logic. Both the
|
|
9
|
+
* non-streaming {@link runToolCallingTurn} and streaming
|
|
10
|
+
* {@link streamToolCallingTurn} delegate tool authorization to the
|
|
11
|
+
* functions exported here.
|
|
12
|
+
*
|
|
13
|
+
* @module wunderland/runtime/ToolApprovalHandler
|
|
14
|
+
*/
|
|
15
|
+
import * as path from 'node:path';
|
|
16
|
+
import { ToolRiskTier, } from '../../types/core-types.js';
|
|
17
|
+
import { getGuardrails, toAuthorizableTool, wrapUntrustedToolOutput, getAgentIdForGuardrails, getAgentWorkspaceDirFromContext, withSpan, redactToolOutputForLLM, safeJsonStringify, isEmptySearchResult, TOOL_FALLBACK_MAP, } from './tool-helpers.js';
|
|
18
|
+
// Re-export TOOL_FALLBACK_MAP for consumers that import from this module.
|
|
19
|
+
export { TOOL_FALLBACK_MAP } from './tool-helpers.js';
|
|
20
|
+
// ── Functions ──────────────────────────────────────────────────────────────
|
|
21
|
+
/**
|
|
22
|
+
* Perform step-up authorization for a tool call.
|
|
23
|
+
*
|
|
24
|
+
* Evaluates the tool against the {@link StepUpAuthorizationManager}'s
|
|
25
|
+
* tier configuration:
|
|
26
|
+
*
|
|
27
|
+
* - **Tier 1 (Autonomous)**: Auto-approved, no prompt.
|
|
28
|
+
* - **Tier 2 (Async Review)**: Auto-approved, queued for review.
|
|
29
|
+
* - **Tier 3 (Sync HITL)**: Prompts the user via `askPermission`.
|
|
30
|
+
*
|
|
31
|
+
* When `dangerouslySkipPermissions` is `true`, all tiers are auto-approved.
|
|
32
|
+
*
|
|
33
|
+
* @param opts - Authorization options.
|
|
34
|
+
* @returns Authorization result indicating whether to proceed.
|
|
35
|
+
*/
|
|
36
|
+
export async function authorizeToolCall(opts) {
|
|
37
|
+
const { tool, toolName, args, callId, authManager, toolContext, dangerouslySkipPermissions, askPermission, shouldWrapToolOutputs, failClosedOnToolFailure, messages } = opts;
|
|
38
|
+
const authResult = await authManager.authorize({
|
|
39
|
+
tool: toAuthorizableTool(tool),
|
|
40
|
+
args,
|
|
41
|
+
context: {
|
|
42
|
+
userId: String(toolContext?.['userContext'] && typeof toolContext['userContext'] === 'object'
|
|
43
|
+
? toolContext['userContext']?.['userId'] ?? 'cli-user'
|
|
44
|
+
: 'cli-user'),
|
|
45
|
+
sessionId: String(toolContext?.['gmiId'] ?? 'cli'),
|
|
46
|
+
gmiId: String(toolContext?.['personaId'] ?? 'cli'),
|
|
47
|
+
},
|
|
48
|
+
timestamp: new Date(),
|
|
49
|
+
});
|
|
50
|
+
if (!authResult.authorized) {
|
|
51
|
+
if (authResult.tier === ToolRiskTier.TIER_3_SYNC_HITL && !dangerouslySkipPermissions) {
|
|
52
|
+
const ok = await askPermission(tool, args);
|
|
53
|
+
if (!ok) {
|
|
54
|
+
const denial = JSON.stringify({ error: `Permission denied for tool: ${toolName}` });
|
|
55
|
+
messages.push({
|
|
56
|
+
role: 'tool',
|
|
57
|
+
tool_call_id: callId,
|
|
58
|
+
content: shouldWrapToolOutputs
|
|
59
|
+
? wrapUntrustedToolOutput(denial, { toolName, toolCallId: callId, includeWarning: false })
|
|
60
|
+
: denial,
|
|
61
|
+
});
|
|
62
|
+
const earlyReturn = failClosedOnToolFailure
|
|
63
|
+
? `[tool_failure_mode=fail_closed] Permission denied for tool: ${toolName}.`
|
|
64
|
+
: undefined;
|
|
65
|
+
if (earlyReturn) {
|
|
66
|
+
messages.push({ role: 'assistant', content: earlyReturn });
|
|
67
|
+
}
|
|
68
|
+
return { authorized: false, hitlApproved: false, earlyReturn, error: `Permission denied for tool: ${toolName}` };
|
|
69
|
+
}
|
|
70
|
+
return { authorized: true, hitlApproved: true };
|
|
71
|
+
}
|
|
72
|
+
else if (!dangerouslySkipPermissions) {
|
|
73
|
+
const denial = JSON.stringify({ error: `Permission denied for tool: ${toolName}` });
|
|
74
|
+
messages.push({
|
|
75
|
+
role: 'tool',
|
|
76
|
+
tool_call_id: callId,
|
|
77
|
+
content: shouldWrapToolOutputs
|
|
78
|
+
? wrapUntrustedToolOutput(denial, { toolName, toolCallId: callId, includeWarning: false })
|
|
79
|
+
: denial,
|
|
80
|
+
});
|
|
81
|
+
const earlyReturn = failClosedOnToolFailure
|
|
82
|
+
? `[tool_failure_mode=fail_closed] Permission denied for tool: ${toolName}.`
|
|
83
|
+
: undefined;
|
|
84
|
+
if (earlyReturn) {
|
|
85
|
+
messages.push({ role: 'assistant', content: earlyReturn });
|
|
86
|
+
}
|
|
87
|
+
return { authorized: false, hitlApproved: false, earlyReturn, error: `Permission denied for tool: ${toolName}` };
|
|
88
|
+
}
|
|
89
|
+
// dangerouslySkipPermissions — fall through to authorized
|
|
90
|
+
}
|
|
91
|
+
return { authorized: true, hitlApproved: false };
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Execute a tool with guardrails validation and folder escalation.
|
|
95
|
+
*
|
|
96
|
+
* Wraps tool execution inside an OTel span and performs:
|
|
97
|
+
*
|
|
98
|
+
* 1. **Pre-check**: `file_read` on directories fails fast with a helpful message.
|
|
99
|
+
* 2. **Guardrails validation**: Checks folder access rules, sandbox boundaries.
|
|
100
|
+
* 3. **Folder escalation**: If denied paths are escalatable, prompts the user
|
|
101
|
+
* (or auto-grants if HITL already approved this call) and adds folder rules.
|
|
102
|
+
* 4. **Execution**: Calls `tool.execute(args, callToolContext)`.
|
|
103
|
+
*
|
|
104
|
+
* @param opts - Execution options.
|
|
105
|
+
* @returns The tool execution result.
|
|
106
|
+
*/
|
|
107
|
+
export async function executeWithGuardrails(opts) {
|
|
108
|
+
return await withSpan('wunderland.tool.execute', {
|
|
109
|
+
tool_name: opts.toolName,
|
|
110
|
+
tool_category: opts.tool.category ?? '',
|
|
111
|
+
tool_has_side_effects: opts.tool.hasSideEffects === true,
|
|
112
|
+
authorized: true,
|
|
113
|
+
}, async () => {
|
|
114
|
+
// Pre-check: file_read on directories should fail-fast
|
|
115
|
+
if (opts.tool.name === 'file_read') {
|
|
116
|
+
const readPath = opts.args.path || opts.args.file_path || opts.args.filePath;
|
|
117
|
+
if (typeof readPath === 'string') {
|
|
118
|
+
try {
|
|
119
|
+
const fsp = await import('node:fs/promises');
|
|
120
|
+
const s = await fsp.stat(path.resolve(readPath));
|
|
121
|
+
if (s.isDirectory()) {
|
|
122
|
+
return {
|
|
123
|
+
success: false,
|
|
124
|
+
error: `"${readPath}" is a directory, not a file. Use list_directory to view directory contents.`,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch { /* path doesn't exist — let normal flow handle */ }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// Guardrails validation
|
|
132
|
+
const guardrails = getGuardrails();
|
|
133
|
+
const agentId = getAgentIdForGuardrails(opts.toolContext);
|
|
134
|
+
const guardrailsCheck = await guardrails.validateBeforeExecution({
|
|
135
|
+
toolId: opts.resolvedToolKey || opts.tool.name,
|
|
136
|
+
toolName: opts.tool.name,
|
|
137
|
+
args: opts.args,
|
|
138
|
+
agentId,
|
|
139
|
+
userId: opts.toolContext.userContext?.userId,
|
|
140
|
+
sessionId: opts.toolContext.sessionId,
|
|
141
|
+
workingDirectory: getAgentWorkspaceDirFromContext(opts.toolContext, agentId),
|
|
142
|
+
tool: opts.tool,
|
|
143
|
+
});
|
|
144
|
+
if (!guardrailsCheck.allowed) {
|
|
145
|
+
// Attempt automatic permission escalation via HITL
|
|
146
|
+
const deniedPaths = (guardrailsCheck.violations || [])
|
|
147
|
+
.map(v => v.attemptedPath)
|
|
148
|
+
.filter((p) => !!p);
|
|
149
|
+
const allEscalatable = deniedPaths.length > 0 && deniedPaths.every(p => guardrails.isEscalatable(p));
|
|
150
|
+
if (allEscalatable) {
|
|
151
|
+
const operation = deniedPaths.length > 0 ? (guardrailsCheck.violations?.[0]?.operation || opts.tool.name) : opts.tool.name;
|
|
152
|
+
const isWrite = operation.includes('write') || operation.includes('delete') || operation.includes('append');
|
|
153
|
+
const autoGrant = opts.hitlApproved || opts.dangerouslySkipPermissions;
|
|
154
|
+
const approved = autoGrant || (opts.askPermission
|
|
155
|
+
? await opts.askPermission({ ...opts.tool, name: `folder_access:${opts.tool.name}`, description: `Grant ${isWrite ? 'write' : 'read'} access to: ${deniedPaths.join(', ')}` }, { paths: deniedPaths, operation: isWrite ? 'write' : 'read', originalTool: opts.tool.name })
|
|
156
|
+
: false);
|
|
157
|
+
if (approved) {
|
|
158
|
+
for (const p of deniedPaths) {
|
|
159
|
+
const dir = p.endsWith('/') ? p : path.dirname(p);
|
|
160
|
+
guardrails.addFolderRule(agentId, {
|
|
161
|
+
pattern: `${dir}/**`,
|
|
162
|
+
read: true,
|
|
163
|
+
write: isWrite,
|
|
164
|
+
description: `Granted at runtime for ${opts.tool.name}`,
|
|
165
|
+
});
|
|
166
|
+
const shellSvc = opts.tool.shellService;
|
|
167
|
+
if (shellSvc && typeof shellSvc.addReadRoot === 'function') {
|
|
168
|
+
shellSvc.addReadRoot(dir);
|
|
169
|
+
if (isWrite) {
|
|
170
|
+
shellSvc.addWriteRoot(dir);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return await opts.tool.execute(opts.args, opts.callToolContext);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
success: false,
|
|
179
|
+
error: guardrailsCheck.reason,
|
|
180
|
+
output: {
|
|
181
|
+
violations: guardrailsCheck.violations,
|
|
182
|
+
canRequestAccess: allEscalatable,
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
return await opts.tool.execute(opts.args, opts.callToolContext);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Build the tool result message payload, including fallback suggestions
|
|
191
|
+
* for failed or empty-result tools.
|
|
192
|
+
*
|
|
193
|
+
* @param result - The tool execution result.
|
|
194
|
+
* @param toolName - The canonical tool name.
|
|
195
|
+
* @param callId - The tool call ID.
|
|
196
|
+
* @param toolMap - The current tool map (to check fallback availability).
|
|
197
|
+
* @param shouldWrapToolOutputs - Whether to wrap output for the LLM.
|
|
198
|
+
* @param debugMode - Whether to log debug output.
|
|
199
|
+
* @returns The message content string to push into the conversation.
|
|
200
|
+
*/
|
|
201
|
+
export async function buildToolResultPayload(result, toolName, callId, toolMap, shouldWrapToolOutputs, debugMode) {
|
|
202
|
+
let payload;
|
|
203
|
+
if (result?.success) {
|
|
204
|
+
payload = redactToolOutputForLLM(result.output);
|
|
205
|
+
const emptyFallbacks = TOOL_FALLBACK_MAP[toolName];
|
|
206
|
+
const availableEmptyFallbacks = emptyFallbacks?.filter(f => toolMap?.has(f));
|
|
207
|
+
if (availableEmptyFallbacks?.length && isEmptySearchResult(result.output)) {
|
|
208
|
+
payload = {
|
|
209
|
+
...((typeof payload === 'object' && payload) || { output: payload }),
|
|
210
|
+
suggestedFallbacks: availableEmptyFallbacks,
|
|
211
|
+
hint: 'Search returned 0 results. Try the suggested fallback tools.',
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
const errorMsg = result?.error || 'Tool failed';
|
|
217
|
+
let apiKeyHint;
|
|
218
|
+
try {
|
|
219
|
+
const registry = await import('@framers/agentos-extensions-registry');
|
|
220
|
+
const getApiKeyGuidance = registry.getApiKeyGuidance;
|
|
221
|
+
if (typeof getApiKeyGuidance === 'function')
|
|
222
|
+
apiKeyHint = getApiKeyGuidance(errorMsg, toolName) ?? undefined;
|
|
223
|
+
}
|
|
224
|
+
catch { /* best-effort */ }
|
|
225
|
+
const fallbacksOnFail = TOOL_FALLBACK_MAP[toolName];
|
|
226
|
+
const availableFallbacksOnFail = fallbacksOnFail?.filter(f => toolMap?.has(f));
|
|
227
|
+
payload = {
|
|
228
|
+
error: errorMsg,
|
|
229
|
+
...(apiKeyHint ? { apiKeyGuidance: apiKeyHint } : null),
|
|
230
|
+
...(availableFallbacksOnFail?.length ? { suggestedFallbacks: availableFallbacksOnFail } : null),
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
const json = safeJsonStringify(payload, 20000);
|
|
234
|
+
if (debugMode) {
|
|
235
|
+
console.log(`[tool-calling] Tool ${toolName} result: success=${result?.success}, output=${json.slice(0, 300)}`);
|
|
236
|
+
}
|
|
237
|
+
return shouldWrapToolOutputs
|
|
238
|
+
? wrapUntrustedToolOutput(json, { toolName, toolCallId: callId, includeWarning: true })
|
|
239
|
+
: json;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Build the error payload for a tool that threw an exception.
|
|
243
|
+
*
|
|
244
|
+
* Includes API key guidance hints and suggested fallback tools when
|
|
245
|
+
* available in the tool map.
|
|
246
|
+
*
|
|
247
|
+
* @param errMsg - The error message from the thrown exception.
|
|
248
|
+
* @param toolName - The canonical tool name.
|
|
249
|
+
* @param toolMap - The current tool map.
|
|
250
|
+
* @returns The JSON-serialized error payload.
|
|
251
|
+
*/
|
|
252
|
+
export async function buildToolErrorPayload(errMsg, toolName, toolMap) {
|
|
253
|
+
let apiKeyGuidance;
|
|
254
|
+
try {
|
|
255
|
+
const registry = await import('@framers/agentos-extensions-registry');
|
|
256
|
+
const getApiKeyGuidance = registry.getApiKeyGuidance;
|
|
257
|
+
if (typeof getApiKeyGuidance === 'function')
|
|
258
|
+
apiKeyGuidance = getApiKeyGuidance(errMsg, toolName) ?? undefined;
|
|
259
|
+
}
|
|
260
|
+
catch { /* best-effort */ }
|
|
261
|
+
const fallbacks = TOOL_FALLBACK_MAP[toolName];
|
|
262
|
+
const availableFallbacks = fallbacks?.filter(f => toolMap?.has(f));
|
|
263
|
+
return JSON.stringify({
|
|
264
|
+
error: `Tool threw: ${errMsg}`,
|
|
265
|
+
...(apiKeyGuidance ? { apiKeyGuidance } : null),
|
|
266
|
+
...(availableFallbacks?.length ? { suggestedFallbacks: availableFallbacks } : null),
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=ToolApprovalHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolApprovalHandler.js","sourceRoot":"","sources":["../../../src/runtime/tools/ToolApprovalHandler.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,YAAY,GACb,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,+BAA+B,EAC/B,QAAQ,EACR,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAE3B,0EAA0E;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AA8EtD,8EAA8E;AAE9E;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAA2B;IAE3B,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAA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uBAAuB;SAC5B;QACD,CAAC,mBAAmB,CAAC,cAAc,CAAC,EAAE;YACpC,SAAS,EAAE,cAAc;YACzB,MAAM,EAAE,cAAc;gBACpB,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,yFAAyF;SAC9F;QACD,CAAC,mBAAmB,CAAC,cAAc,CAAC,EAAE;YACpC,SAAS,EAAE,cAAc;YACzB,MAAM,EAAE,cAAc;gBACpB,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,8FAA8F;SACnG;KACF,CAAC;AACJ,CAAC;AAED,iFAAiF;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Streaming tool-call parsing and SSE chunk assembly.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `tool-calling.ts` to isolate the streaming-specific
|
|
5
|
+
* logic (SSE line iteration, token yielding, multi-round streaming loop)
|
|
6
|
+
* from the non-streaming tool-calling loop and the shared authorization
|
|
7
|
+
* layer.
|
|
8
|
+
*
|
|
9
|
+
* The main export is {@link streamToolCallingTurn}, an async generator
|
|
10
|
+
* that yields individual text tokens as they arrive from the LLM streaming
|
|
11
|
+
* API, enabling real-time TTS playback.
|
|
12
|
+
*
|
|
13
|
+
* @module wunderland/runtime/ToolStreamProcessor
|
|
14
|
+
*/
|
|
15
|
+
import type { StepUpAuthorizationConfig } from '../../types/core-types.js';
|
|
16
|
+
import type { StepUpAuthorizationManager } from '../../security/StepUpAuthorizationManager.js';
|
|
17
|
+
import type { ToolInstance, LLMProviderConfig } from './tool-helpers.js';
|
|
18
|
+
/**
|
|
19
|
+
* Options for {@link streamToolCallingTurn}.
|
|
20
|
+
*
|
|
21
|
+
* Mirrors `runToolCallingTurn` options with the addition of an `AbortSignal`
|
|
22
|
+
* that enables external cancellation of the in-flight streaming LLM request.
|
|
23
|
+
* This is critical for the voice pipeline's barge-in flow: when the user
|
|
24
|
+
* starts speaking while the agent is mid-response, the pipeline aborts the
|
|
25
|
+
* signal to immediately stop token generation at the provider, saving both
|
|
26
|
+
* latency and tokens.
|
|
27
|
+
*
|
|
28
|
+
* @see {@link streamToolCallingTurn}
|
|
29
|
+
*/
|
|
30
|
+
export interface StreamToolCallingTurnOpts {
|
|
31
|
+
/** LLM provider identifier (e.g. `'openai'`, `'openrouter'`, `'ollama'`). */
|
|
32
|
+
providerId?: string;
|
|
33
|
+
/** API key (or promise resolving to one) for the LLM provider. */
|
|
34
|
+
apiKey: string | Promise<string>;
|
|
35
|
+
/** Model name/ID (e.g. `'gpt-4o-mini'`, `'llama3'`). */
|
|
36
|
+
model: string;
|
|
37
|
+
/**
|
|
38
|
+
* Mutable conversation history. The streaming function appends assistant
|
|
39
|
+
* and tool messages to this array as the conversation progresses.
|
|
40
|
+
*/
|
|
41
|
+
messages: Array<Record<string, unknown>>;
|
|
42
|
+
/** Map of tool name -> tool instance for tool execution. */
|
|
43
|
+
toolMap: Map<string, ToolInstance>;
|
|
44
|
+
/** Pre-built tool definitions (overrides auto-generation from toolMap). */
|
|
45
|
+
toolDefs?: Array<Record<string, unknown>>;
|
|
46
|
+
/** Lazy tool definition supplier (called per round; overrides toolDefs). */
|
|
47
|
+
getToolDefs?: () => Array<Record<string, unknown>>;
|
|
48
|
+
/** Shared context object passed to every tool `execute()` call. */
|
|
49
|
+
toolContext: Record<string, unknown>;
|
|
50
|
+
/** Maximum number of LLM round-trips before forcibly stopping. */
|
|
51
|
+
maxRounds: number;
|
|
52
|
+
/** When `true`, bypasses all step-up authorization checks. */
|
|
53
|
+
dangerouslySkipPermissions: boolean;
|
|
54
|
+
/** Custom step-up authorization tier configuration. */
|
|
55
|
+
stepUpAuthConfig?: StepUpAuthorizationConfig;
|
|
56
|
+
/** Interactive permission callback for Tier 3 (sync HITL) tools. */
|
|
57
|
+
askPermission: (tool: ToolInstance, args: Record<string, unknown>) => Promise<boolean>;
|
|
58
|
+
/** Optional checkpoint callback invoked before executing a batch of tool calls. */
|
|
59
|
+
askCheckpoint?: (info: {
|
|
60
|
+
round: number;
|
|
61
|
+
toolCalls: Array<{
|
|
62
|
+
toolName: string;
|
|
63
|
+
hasSideEffects: boolean;
|
|
64
|
+
args: Record<string, unknown>;
|
|
65
|
+
}>;
|
|
66
|
+
}) => Promise<boolean>;
|
|
67
|
+
/** Notification callback fired when a tool call is about to execute. */
|
|
68
|
+
onToolCall?: (tool: ToolInstance, args: Record<string, unknown>) => void;
|
|
69
|
+
/** Notification callback fired after each tool call completes. */
|
|
70
|
+
onToolResult?: (info: {
|
|
71
|
+
toolName: string;
|
|
72
|
+
args: Record<string, unknown>;
|
|
73
|
+
success: boolean;
|
|
74
|
+
error?: string;
|
|
75
|
+
output?: unknown;
|
|
76
|
+
durationMs: number;
|
|
77
|
+
}) => void;
|
|
78
|
+
/** Pre-configured authorization manager (skips internal creation). */
|
|
79
|
+
authorizationManager?: StepUpAuthorizationManager;
|
|
80
|
+
/** Custom base URL for the LLM API endpoint. */
|
|
81
|
+
baseUrl?: string;
|
|
82
|
+
/** Fallback LLM provider config for automatic retry on transient errors. */
|
|
83
|
+
fallback?: LLMProviderConfig;
|
|
84
|
+
/** Callback fired when the primary provider fails and we fall back. */
|
|
85
|
+
onFallback?: (primaryError: Error, fallbackProvider: string) => void;
|
|
86
|
+
/** Lazy API key supplier (alternative to static `apiKey`). */
|
|
87
|
+
getApiKey?: () => string | Promise<string>;
|
|
88
|
+
/** Ollama-specific runtime options (e.g. num_ctx, num_gpu). */
|
|
89
|
+
ollamaOptions?: Record<string, unknown>;
|
|
90
|
+
/**
|
|
91
|
+
* Behavior when a tool execution fails.
|
|
92
|
+
* - `'fail_open'` — report the error to the LLM and let it continue.
|
|
93
|
+
* - `'fail_closed'` — immediately abort the turn.
|
|
94
|
+
*/
|
|
95
|
+
toolFailureMode?: 'fail_open' | 'fail_closed';
|
|
96
|
+
/** When `true`, tool names that require sanitization cause an error instead. */
|
|
97
|
+
strictToolNames?: boolean;
|
|
98
|
+
/** Enable verbose debug logging for the streaming loop. */
|
|
99
|
+
debug?: boolean;
|
|
100
|
+
/** Progress callback for long-running tool executions. */
|
|
101
|
+
onToolProgress?: (info: {
|
|
102
|
+
toolName: string;
|
|
103
|
+
phase: string;
|
|
104
|
+
message: string;
|
|
105
|
+
progress?: number;
|
|
106
|
+
}) => void;
|
|
107
|
+
/**
|
|
108
|
+
* External abort signal for cancelling the in-flight streaming LLM request.
|
|
109
|
+
*
|
|
110
|
+
* When aborted, the HTTP stream is terminated immediately via the
|
|
111
|
+
* `AbortController` wired into `fetch()`. This is the primary mechanism
|
|
112
|
+
* for voice pipeline barge-in: the orchestrator calls `abort()` on the
|
|
113
|
+
* agent session, which triggers this signal, stopping token generation
|
|
114
|
+
* at the provider.
|
|
115
|
+
*
|
|
116
|
+
* @see {@link StreamingPipelineAgentSession.abort}
|
|
117
|
+
*/
|
|
118
|
+
signal?: AbortSignal;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Streaming variant of `runToolCallingTurn`.
|
|
122
|
+
*
|
|
123
|
+
* Yields individual text tokens as they arrive from the LLM streaming API,
|
|
124
|
+
* enabling real-time TTS playback (~500ms first-token latency instead of
|
|
125
|
+
* waiting for the full LLM response). Tool-call rounds are handled
|
|
126
|
+
* identically to the non-streaming variant: tool execution blocks, then
|
|
127
|
+
* the next LLM round resumes streaming.
|
|
128
|
+
*
|
|
129
|
+
* ## Multi-round streaming + blocking tool execution
|
|
130
|
+
*
|
|
131
|
+
* The outer loop runs up to `opts.maxRounds` LLM round-trips:
|
|
132
|
+
*
|
|
133
|
+
* 1. **Stream phase** -- Send the conversation to the LLM with
|
|
134
|
+
* `stream: true` and yield text tokens as they arrive via SSE. Tool-call
|
|
135
|
+
* fragments are accumulated silently by `wrapStreamingLLMAsGenerator`.
|
|
136
|
+
* 2. **Tool phase** (blocking) -- If the model's `finish_reason` is
|
|
137
|
+
* `'tool_calls'`, execute each requested tool synchronously. Tool
|
|
138
|
+
* results are appended to `opts.messages` as `role: 'tool'` messages.
|
|
139
|
+
* 3. **Next round** -- Loop back to step 1 with the updated conversation
|
|
140
|
+
* history, allowing the model to incorporate tool results and stream
|
|
141
|
+
* more text or request additional tools.
|
|
142
|
+
*
|
|
143
|
+
* The generator terminates when the model finishes with text only
|
|
144
|
+
* (`finish_reason: 'stop'`), the abort signal fires, or the round limit
|
|
145
|
+
* is reached.
|
|
146
|
+
*
|
|
147
|
+
* ## AbortSignal integration
|
|
148
|
+
*
|
|
149
|
+
* The optional `opts.signal` is wired through three layers:
|
|
150
|
+
* - **Outer loop**: checked at the start of each round and after tool execution.
|
|
151
|
+
* - **SSE fetch**: passed to `fetch()` so the HTTP connection is torn down
|
|
152
|
+
* immediately on abort, stopping token generation at the provider.
|
|
153
|
+
* - **Token iteration**: checked between each yielded token so the generator
|
|
154
|
+
* exits promptly after abort.
|
|
155
|
+
*
|
|
156
|
+
* This triple-layer cancellation ensures that voice pipeline barge-in stops
|
|
157
|
+
* the LLM within one event-loop tick of the abort signal.
|
|
158
|
+
*
|
|
159
|
+
* ## Provider fallback
|
|
160
|
+
*
|
|
161
|
+
* For providers that do not support SSE streaming (Ollama, Anthropic via
|
|
162
|
+
* the Messages API), this automatically falls back to the non-streaming
|
|
163
|
+
* `runToolCallingTurn` and post-splits the complete response into
|
|
164
|
+
* word-boundary chunks so the caller still receives an incremental token
|
|
165
|
+
* stream.
|
|
166
|
+
*
|
|
167
|
+
* @param opts - Configuration for the streaming tool-calling turn.
|
|
168
|
+
* @yields Individual text token strings (typically 1-4 words each).
|
|
169
|
+
* @returns The full accumulated reply text after all rounds complete.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```ts
|
|
173
|
+
* const controller = new AbortController();
|
|
174
|
+
* const gen = streamToolCallingTurn({
|
|
175
|
+
* providerId: 'openai',
|
|
176
|
+
* apiKey: process.env.OPENAI_API_KEY!,
|
|
177
|
+
* model: 'gpt-4o-mini',
|
|
178
|
+
* messages: [{ role: 'user', content: 'Hello' }],
|
|
179
|
+
* toolMap: myToolMap,
|
|
180
|
+
* toolContext: {},
|
|
181
|
+
* maxRounds: 8,
|
|
182
|
+
* dangerouslySkipPermissions: true,
|
|
183
|
+
* askPermission: async () => true,
|
|
184
|
+
* signal: controller.signal,
|
|
185
|
+
* });
|
|
186
|
+
*
|
|
187
|
+
* let result = await gen.next();
|
|
188
|
+
* while (!result.done) {
|
|
189
|
+
* ttsEngine.feed(result.value); // stream to TTS immediately
|
|
190
|
+
* result = await gen.next();
|
|
191
|
+
* }
|
|
192
|
+
* const fullReply = result.value;
|
|
193
|
+
* ```
|
|
194
|
+
*
|
|
195
|
+
* @see {@link runToolCallingTurn} for the non-streaming variant.
|
|
196
|
+
* @see {@link wrapStreamingLLMAsGenerator} for the SSE-to-generator adapter.
|
|
197
|
+
* @see {@link streamingOpenaiChatWithTools} for the HTTP streaming layer.
|
|
198
|
+
*/
|
|
199
|
+
export declare function streamToolCallingTurn(opts: StreamToolCallingTurnOpts): AsyncGenerator<string, string, undefined>;
|
|
200
|
+
//# sourceMappingURL=ToolStreamProcessor.d.ts.map
|