opc-agent 4.1.2 → 4.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/index.d.ts.map +1 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/channels/dingtalk.d.ts.map +1 -0
- package/dist/channels/dingtalk.js.map +1 -0
- package/dist/channels/discord.d.ts.map +1 -0
- package/dist/channels/discord.js.map +1 -0
- package/dist/channels/email.d.ts.map +1 -0
- package/dist/channels/email.js.map +1 -0
- package/dist/channels/feishu.d.ts.map +1 -0
- package/dist/channels/feishu.js.map +1 -0
- package/dist/channels/googlechat.d.ts.map +1 -0
- package/dist/channels/googlechat.js.map +1 -0
- package/dist/channels/imessage.d.ts.map +1 -0
- package/dist/channels/imessage.js.map +1 -0
- package/dist/channels/index.d.ts.map +1 -0
- package/dist/channels/index.js.map +1 -0
- package/dist/channels/irc.d.ts.map +1 -0
- package/dist/channels/irc.js.map +1 -0
- package/dist/channels/line.d.ts.map +1 -0
- package/dist/channels/line.js.map +1 -0
- package/dist/channels/matrix.d.ts.map +1 -0
- package/dist/channels/matrix.js.map +1 -0
- package/dist/channels/mattermost.d.ts.map +1 -0
- package/dist/channels/mattermost.js.map +1 -0
- package/dist/channels/msteams.d.ts.map +1 -0
- package/dist/channels/msteams.js.map +1 -0
- package/dist/channels/nostr.d.ts.map +1 -0
- package/dist/channels/nostr.js.map +1 -0
- package/dist/channels/qq.d.ts.map +1 -0
- package/dist/channels/qq.js.map +1 -0
- package/dist/channels/signal.d.ts.map +1 -0
- package/dist/channels/signal.js.map +1 -0
- package/dist/channels/slack.d.ts.map +1 -0
- package/dist/channels/slack.js.map +1 -0
- package/dist/channels/sms.d.ts.map +1 -0
- package/dist/channels/sms.js.map +1 -0
- package/dist/channels/telegram.d.ts.map +1 -0
- package/dist/channels/telegram.js.map +1 -0
- package/dist/channels/twitch.d.ts.map +1 -0
- package/dist/channels/twitch.js.map +1 -0
- package/dist/channels/voice-call.d.ts.map +1 -0
- package/dist/channels/voice-call.js.map +1 -0
- package/dist/channels/voice.d.ts.map +1 -0
- package/dist/channels/voice.js.map +1 -0
- package/dist/channels/web.d.ts.map +1 -0
- package/dist/channels/web.js.map +1 -0
- package/dist/channels/webhook.d.ts.map +1 -0
- package/dist/channels/webhook.js.map +1 -0
- package/dist/channels/websocket.d.ts.map +1 -0
- package/dist/channels/websocket.js.map +1 -0
- package/dist/channels/wechat.d.ts.map +1 -0
- package/dist/channels/wechat.js.map +1 -0
- package/dist/channels/whatsapp.d.ts.map +1 -0
- package/dist/channels/whatsapp.js.map +1 -0
- package/dist/cli/chat.d.ts.map +1 -0
- package/dist/cli/chat.js.map +1 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +72 -11
- package/dist/cli.js.map +1 -0
- package/dist/core/a2a.d.ts.map +1 -0
- package/dist/core/a2a.js.map +1 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/agent.js.map +1 -0
- package/dist/core/analytics-engine.d.ts.map +1 -0
- package/dist/core/analytics-engine.js.map +1 -0
- package/dist/core/api-server.d.ts.map +1 -0
- package/dist/core/api-server.js.map +1 -0
- package/dist/core/audio.d.ts.map +1 -0
- package/dist/core/audio.js.map +1 -0
- package/dist/core/auth.d.ts.map +1 -0
- package/dist/core/auth.js.map +1 -0
- package/dist/core/cache.d.ts.map +1 -0
- package/dist/core/cache.js.map +1 -0
- package/dist/core/collaboration.d.ts.map +1 -0
- package/dist/core/collaboration.js.map +1 -0
- package/dist/core/compose.d.ts.map +1 -0
- package/dist/core/compose.js.map +1 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/context-discovery.d.ts.map +1 -0
- package/dist/core/context-discovery.js.map +1 -0
- package/dist/core/context-refs.d.ts.map +1 -0
- package/dist/core/context-refs.js.map +1 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/gateway.d.ts.map +1 -0
- package/dist/core/gateway.js.map +1 -0
- package/dist/core/heartbeat.d.ts.map +1 -0
- package/dist/core/heartbeat.js.map +1 -0
- package/dist/core/hitl.d.ts.map +1 -0
- package/dist/core/hitl.js.map +1 -0
- package/dist/core/hooks.d.ts.map +1 -0
- package/dist/core/hooks.js.map +1 -0
- package/dist/core/ide-bridge.d.ts.map +1 -0
- package/dist/core/ide-bridge.js.map +1 -0
- package/dist/core/knowledge.d.ts.map +1 -0
- package/dist/core/knowledge.js.map +1 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/node-network.d.ts.map +1 -0
- package/dist/core/node-network.js.map +1 -0
- package/dist/core/orchestrator.d.ts.map +1 -0
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/core/performance.d.ts.map +1 -0
- package/dist/core/performance.js.map +1 -0
- package/dist/core/profiles.d.ts.map +1 -0
- package/dist/core/profiles.js.map +1 -0
- package/dist/core/rate-limiter.d.ts.map +1 -0
- package/dist/core/rate-limiter.js.map +1 -0
- package/dist/core/room.d.ts.map +1 -0
- package/dist/core/room.js.map +1 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/sandbox.d.ts.map +1 -0
- package/dist/core/sandbox.js.map +1 -0
- package/dist/core/scheduler.d.ts.map +1 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/core/security.d.ts.map +1 -0
- package/dist/core/security.js.map +1 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/streaming.d.ts.map +1 -0
- package/dist/core/streaming.js.map +1 -0
- package/dist/core/subagent.d.ts.map +1 -0
- package/dist/core/subagent.js.map +1 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/versioning.d.ts.map +1 -0
- package/dist/core/versioning.js.map +1 -0
- package/dist/core/vision.d.ts.map +1 -0
- package/dist/core/vision.js.map +1 -0
- package/dist/core/watch.d.ts.map +1 -0
- package/dist/core/watch.js.map +1 -0
- package/dist/core/workflow-graph.d.ts.map +1 -0
- package/dist/core/workflow-graph.js.map +1 -0
- package/dist/core/workflow.d.ts.map +1 -0
- package/dist/core/workflow.js.map +1 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js.map +1 -0
- package/dist/deploy/hermes.d.ts.map +1 -0
- package/dist/deploy/hermes.js.map +1 -0
- package/dist/deploy/index.d.ts.map +1 -0
- package/dist/deploy/index.js.map +1 -0
- package/dist/deploy/openclaw.d.ts.map +1 -0
- package/dist/deploy/openclaw.js.map +1 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js.map +1 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js.map +1 -0
- package/dist/hub/brain-seed.d.ts.map +1 -0
- package/dist/hub/brain-seed.js.map +1 -0
- package/dist/hub/client.d.ts.map +1 -0
- package/dist/hub/client.js.map +1 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/servers/calculator-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/calculator-mcp.js.map +1 -0
- package/dist/mcp/servers/crypto-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/crypto-mcp.js.map +1 -0
- package/dist/mcp/servers/database-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/database-mcp.js.map +1 -0
- package/dist/mcp/servers/datetime-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/datetime-mcp.js.map +1 -0
- package/dist/mcp/servers/filesystem.d.ts.map +1 -0
- package/dist/mcp/servers/filesystem.js.map +1 -0
- package/dist/mcp/servers/github-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/github-mcp.js.map +1 -0
- package/dist/mcp/servers/index.d.ts.map +1 -0
- package/dist/mcp/servers/index.js.map +1 -0
- package/dist/mcp/servers/json-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/json-mcp.js.map +1 -0
- package/dist/mcp/servers/memory-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/memory-mcp.js.map +1 -0
- package/dist/mcp/servers/regex-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/regex-mcp.js.map +1 -0
- package/dist/mcp/servers/web-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/web-mcp.js.map +1 -0
- package/dist/memory/context-compressor.d.ts.map +1 -0
- package/dist/memory/context-compressor.js.map +1 -0
- package/dist/memory/deepbrain.d.ts.map +1 -0
- package/dist/memory/deepbrain.js.map +1 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/seed-loader.d.ts.map +1 -0
- package/dist/memory/seed-loader.js.map +1 -0
- package/dist/memory/user-profiler.d.ts.map +1 -0
- package/dist/memory/user-profiler.js.map +1 -0
- package/dist/plugins/content-filter.d.ts.map +1 -0
- package/dist/plugins/content-filter.js.map +1 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/logger.d.ts.map +1 -0
- package/dist/plugins/logger.js.map +1 -0
- package/dist/plugins/rate-limiter.d.ts.map +1 -0
- package/dist/plugins/rate-limiter.js.map +1 -0
- package/dist/protocols/a2a/client.d.ts.map +1 -0
- package/dist/protocols/a2a/client.js.map +1 -0
- package/dist/protocols/a2a/index.d.ts.map +1 -0
- package/dist/protocols/a2a/index.js.map +1 -0
- package/dist/protocols/a2a/server.d.ts.map +1 -0
- package/dist/protocols/a2a/server.js.map +1 -0
- package/dist/protocols/a2a/types.d.ts.map +1 -0
- package/dist/protocols/a2a/types.js.map +1 -0
- package/dist/protocols/a2a/utils.d.ts.map +1 -0
- package/dist/protocols/a2a/utils.js.map +1 -0
- package/dist/protocols/agui/client.d.ts.map +1 -0
- package/dist/protocols/agui/client.js.map +1 -0
- package/dist/protocols/agui/index.d.ts.map +1 -0
- package/dist/protocols/agui/index.js.map +1 -0
- package/dist/protocols/agui/server.d.ts.map +1 -0
- package/dist/protocols/agui/server.js.map +1 -0
- package/dist/protocols/agui/types.d.ts.map +1 -0
- package/dist/protocols/agui/types.js.map +1 -0
- package/dist/protocols/index.d.ts.map +1 -0
- package/dist/protocols/index.js.map +1 -0
- package/dist/protocols/mcp/agent-tools.d.ts.map +1 -0
- package/dist/protocols/mcp/agent-tools.js.map +1 -0
- package/dist/protocols/mcp/index.d.ts.map +1 -0
- package/dist/protocols/mcp/index.js.map +1 -0
- package/dist/protocols/mcp/server.d.ts.map +1 -0
- package/dist/protocols/mcp/server.js.map +1 -0
- package/dist/protocols/mcp/types.d.ts.map +1 -0
- package/dist/protocols/mcp/types.js.map +1 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/publish/index.d.ts.map +1 -0
- package/dist/publish/index.js.map +1 -0
- package/dist/scheduler/cron-engine.d.ts.map +1 -0
- package/dist/scheduler/cron-engine.js.map +1 -0
- package/dist/scheduler/index.d.ts.map +1 -0
- package/dist/scheduler/index.js.map +1 -0
- package/dist/schema/oad.d.ts.map +1 -0
- package/dist/schema/oad.js.map +1 -0
- package/dist/security/approval.d.ts.map +1 -0
- package/dist/security/approval.js.map +1 -0
- package/dist/security/approvals.d.ts.map +1 -0
- package/dist/security/approvals.js.map +1 -0
- package/dist/security/elevated.d.ts.map +1 -0
- package/dist/security/elevated.js.map +1 -0
- package/dist/security/guardrails.d.ts.map +1 -0
- package/dist/security/guardrails.js.map +1 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/keys.d.ts.map +1 -0
- package/dist/security/keys.js.map +1 -0
- package/dist/security/secrets.d.ts.map +1 -0
- package/dist/security/secrets.js.map +1 -0
- package/dist/skills/auto-learn.d.ts.map +1 -0
- package/dist/skills/auto-learn.js.map +1 -0
- package/dist/skills/base.d.ts.map +1 -0
- package/dist/skills/base.js.map +1 -0
- package/dist/skills/builtin/index.d.ts.map +1 -0
- package/dist/skills/builtin/index.js.map +1 -0
- package/dist/skills/document.d.ts.map +1 -0
- package/dist/skills/document.js.map +1 -0
- package/dist/skills/http.d.ts.map +1 -0
- package/dist/skills/http.js.map +1 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/marketplace.d.ts.map +1 -0
- package/dist/skills/marketplace.js.map +1 -0
- package/dist/skills/scheduler.d.ts.map +1 -0
- package/dist/skills/scheduler.js.map +1 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/types.js.map +1 -0
- package/dist/skills/webhook-trigger.d.ts.map +1 -0
- package/dist/skills/webhook-trigger.js.map +1 -0
- package/dist/studio/server.d.ts.map +1 -0
- package/dist/studio/server.js.map +1 -0
- package/dist/studio/templates-data.d.ts.map +1 -0
- package/dist/studio/templates-data.js.map +1 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/templates/code-reviewer.d.ts.map +1 -0
- package/dist/templates/code-reviewer.js.map +1 -0
- package/dist/templates/content-writer.d.ts.map +1 -0
- package/dist/templates/content-writer.js.map +1 -0
- package/dist/templates/customer-service.d.ts.map +1 -0
- package/dist/templates/customer-service.js.map +1 -0
- package/dist/templates/data-analyst.d.ts.map +1 -0
- package/dist/templates/data-analyst.js.map +1 -0
- package/dist/templates/executive-assistant.d.ts.map +1 -0
- package/dist/templates/executive-assistant.js.map +1 -0
- package/dist/templates/financial-advisor.d.ts.map +1 -0
- package/dist/templates/financial-advisor.js.map +1 -0
- package/dist/templates/hr-recruiter.d.ts.map +1 -0
- package/dist/templates/hr-recruiter.js.map +1 -0
- package/dist/templates/knowledge-base.d.ts.map +1 -0
- package/dist/templates/knowledge-base.js.map +1 -0
- package/dist/templates/legal-assistant.d.ts.map +1 -0
- package/dist/templates/legal-assistant.js.map +1 -0
- package/dist/templates/project-manager.d.ts.map +1 -0
- package/dist/templates/project-manager.js.map +1 -0
- package/dist/templates/sales-assistant.d.ts.map +1 -0
- package/dist/templates/sales-assistant.js.map +1 -0
- package/dist/templates/teacher.d.ts.map +1 -0
- package/dist/templates/teacher.js.map +1 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/tools/builtin/browser.d.ts.map +1 -0
- package/dist/tools/builtin/browser.js.map +1 -0
- package/dist/tools/builtin/datetime.d.ts.map +1 -0
- package/dist/tools/builtin/datetime.js.map +1 -0
- package/dist/tools/builtin/file.d.ts.map +1 -0
- package/dist/tools/builtin/file.js.map +1 -0
- package/dist/tools/builtin/home-assistant.d.ts.map +1 -0
- package/dist/tools/builtin/home-assistant.js.map +1 -0
- package/dist/tools/builtin/index.d.ts.map +1 -0
- package/dist/tools/builtin/index.js.map +1 -0
- package/dist/tools/builtin/rl-tools.d.ts.map +1 -0
- package/dist/tools/builtin/rl-tools.js.map +1 -0
- package/dist/tools/builtin/shell.d.ts.map +1 -0
- package/dist/tools/builtin/shell.js.map +1 -0
- package/dist/tools/builtin/vision.d.ts.map +1 -0
- package/dist/tools/builtin/vision.js.map +1 -0
- package/dist/tools/builtin/web-search.d.ts.map +1 -0
- package/dist/tools/builtin/web-search.js.map +1 -0
- package/dist/tools/builtin/web.d.ts.map +1 -0
- package/dist/tools/builtin/web.js.map +1 -0
- package/dist/tools/calculator.d.ts.map +1 -0
- package/dist/tools/calculator.js.map +1 -0
- package/dist/tools/datetime.d.ts.map +1 -0
- package/dist/tools/datetime.js.map +1 -0
- package/dist/tools/document-processor.d.ts.map +1 -0
- package/dist/tools/document-processor.js.map +1 -0
- package/dist/tools/gateway.d.ts.map +1 -0
- package/dist/tools/gateway.js.map +1 -0
- package/dist/tools/image-generator.d.ts.map +1 -0
- package/dist/tools/image-generator.js.map +1 -0
- package/dist/tools/integrations/calendar.d.ts.map +1 -0
- package/dist/tools/integrations/calendar.js.map +1 -0
- package/dist/tools/integrations/code-exec.d.ts.map +1 -0
- package/dist/tools/integrations/code-exec.js.map +1 -0
- package/dist/tools/integrations/csv-analyzer.d.ts.map +1 -0
- package/dist/tools/integrations/csv-analyzer.js.map +1 -0
- package/dist/tools/integrations/database.d.ts.map +1 -0
- package/dist/tools/integrations/database.js.map +1 -0
- package/dist/tools/integrations/email-send.d.ts.map +1 -0
- package/dist/tools/integrations/email-send.js.map +1 -0
- package/dist/tools/integrations/git-tool.d.ts.map +1 -0
- package/dist/tools/integrations/git-tool.js.map +1 -0
- package/dist/tools/integrations/github-tool.d.ts.map +1 -0
- package/dist/tools/integrations/github-tool.js.map +1 -0
- package/dist/tools/integrations/image-gen.d.ts.map +1 -0
- package/dist/tools/integrations/image-gen.js.map +1 -0
- package/dist/tools/integrations/index.d.ts.map +1 -0
- package/dist/tools/integrations/index.js.map +1 -0
- package/dist/tools/integrations/jira.d.ts.map +1 -0
- package/dist/tools/integrations/jira.js.map +1 -0
- package/dist/tools/integrations/notion.d.ts.map +1 -0
- package/dist/tools/integrations/notion.js.map +1 -0
- package/dist/tools/integrations/npm-tool.d.ts.map +1 -0
- package/dist/tools/integrations/npm-tool.js.map +1 -0
- package/dist/tools/integrations/pdf-reader.d.ts.map +1 -0
- package/dist/tools/integrations/pdf-reader.js.map +1 -0
- package/dist/tools/integrations/slack.d.ts.map +1 -0
- package/dist/tools/integrations/slack.js.map +1 -0
- package/dist/tools/integrations/summarizer.d.ts.map +1 -0
- package/dist/tools/integrations/summarizer.js.map +1 -0
- package/dist/tools/integrations/translator.d.ts.map +1 -0
- package/dist/tools/integrations/translator.js.map +1 -0
- package/dist/tools/integrations/trello.d.ts.map +1 -0
- package/dist/tools/integrations/trello.js.map +1 -0
- package/dist/tools/integrations/vector-search.d.ts.map +1 -0
- package/dist/tools/integrations/vector-search.js.map +1 -0
- package/dist/tools/integrations/web-scraper.d.ts.map +1 -0
- package/dist/tools/integrations/web-scraper.js.map +1 -0
- package/dist/tools/integrations/web-search.d.ts.map +1 -0
- package/dist/tools/integrations/web-search.js.map +1 -0
- package/dist/tools/integrations/webhook.d.ts.map +1 -0
- package/dist/tools/integrations/webhook.js.map +1 -0
- package/dist/tools/json-transform.d.ts.map +1 -0
- package/dist/tools/json-transform.js.map +1 -0
- package/dist/tools/mcp-client.d.ts.map +1 -0
- package/dist/tools/mcp-client.js.map +1 -0
- package/dist/tools/mcp.d.ts.map +1 -0
- package/dist/tools/mcp.js.map +1 -0
- package/dist/tools/text-analysis.d.ts.map +1 -0
- package/dist/tools/text-analysis.js.map +1 -0
- package/dist/tools/web-scraper.d.ts.map +1 -0
- package/dist/tools/web-scraper.js.map +1 -0
- package/dist/tools/web-search.d.ts.map +1 -0
- package/dist/tools/web-search.js.map +1 -0
- package/dist/traces/index.d.ts.map +1 -0
- package/dist/traces/index.js.map +1 -0
- package/dist/ui/components.d.ts.map +1 -0
- package/dist/ui/components.js.map +1 -0
- package/package.json +1 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -20
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -14
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -13
- package/.github/workflows/ci.yml +0 -24
- package/USABILITY-ISSUES.md +0 -73
- package/docs/.vitepress/config.ts +0 -103
- package/docs/api/cli.md +0 -48
- package/docs/api/oad-schema.md +0 -64
- package/docs/api/sdk.md +0 -80
- package/docs/guide/concepts.md +0 -51
- package/docs/guide/configuration.md +0 -79
- package/docs/guide/deployment.md +0 -42
- package/docs/guide/getting-started.md +0 -44
- package/docs/guide/templates.md +0 -28
- package/docs/guide/testing.md +0 -84
- package/docs/index.md +0 -27
- package/docs/zh/api/cli.md +0 -54
- package/docs/zh/api/oad-schema.md +0 -87
- package/docs/zh/api/sdk.md +0 -102
- package/docs/zh/guide/concepts.md +0 -104
- package/docs/zh/guide/configuration.md +0 -135
- package/docs/zh/guide/deployment.md +0 -81
- package/docs/zh/guide/getting-started.md +0 -82
- package/docs/zh/guide/templates.md +0 -84
- package/docs/zh/guide/testing.md +0 -88
- package/docs/zh/index.md +0 -27
- package/fix-sidebar.mjs +0 -188
- package/serve-studio.js +0 -13
- package/serve-test.js +0 -25
- package/src/analytics/index.ts +0 -66
- package/src/channels/dingtalk.ts +0 -46
- package/src/channels/discord.ts +0 -192
- package/src/channels/email.ts +0 -351
- package/src/channels/feishu.ts +0 -349
- package/src/channels/googlechat.ts +0 -42
- package/src/channels/imessage.ts +0 -32
- package/src/channels/index.ts +0 -15
- package/src/channels/irc.ts +0 -82
- package/src/channels/line.ts +0 -33
- package/src/channels/matrix.ts +0 -34
- package/src/channels/mattermost.ts +0 -57
- package/src/channels/msteams.ts +0 -33
- package/src/channels/nostr.ts +0 -33
- package/src/channels/qq.ts +0 -34
- package/src/channels/signal.ts +0 -33
- package/src/channels/slack.ts +0 -217
- package/src/channels/sms.ts +0 -34
- package/src/channels/telegram.ts +0 -616
- package/src/channels/twitch.ts +0 -65
- package/src/channels/voice-call.ts +0 -100
- package/src/channels/voice.ts +0 -471
- package/src/channels/web.ts +0 -638
- package/src/channels/webhook.ts +0 -199
- package/src/channels/websocket.ts +0 -399
- package/src/channels/wechat.ts +0 -329
- package/src/channels/whatsapp.ts +0 -33
- package/src/cli/chat.ts +0 -99
- package/src/cli/setup.ts +0 -314
- package/src/cli.ts +0 -2826
- package/src/core/a2a.ts +0 -203
- package/src/core/agent.ts +0 -476
- package/src/core/analytics-engine.ts +0 -186
- package/src/core/api-server.ts +0 -277
- package/src/core/audio.ts +0 -98
- package/src/core/auth.ts +0 -57
- package/src/core/cache.ts +0 -141
- package/src/core/collaboration.ts +0 -275
- package/src/core/compose.ts +0 -77
- package/src/core/config.ts +0 -14
- package/src/core/context-discovery.ts +0 -85
- package/src/core/context-refs.ts +0 -140
- package/src/core/errors.ts +0 -148
- package/src/core/gateway.ts +0 -106
- package/src/core/heartbeat.ts +0 -51
- package/src/core/hitl.ts +0 -138
- package/src/core/hooks.ts +0 -105
- package/src/core/ide-bridge.ts +0 -133
- package/src/core/knowledge.ts +0 -255
- package/src/core/logger.ts +0 -57
- package/src/core/node-network.ts +0 -86
- package/src/core/orchestrator.ts +0 -215
- package/src/core/performance.ts +0 -187
- package/src/core/profiles.ts +0 -122
- package/src/core/rate-limiter.ts +0 -128
- package/src/core/room.ts +0 -109
- package/src/core/runtime.ts +0 -435
- package/src/core/sandbox.ts +0 -344
- package/src/core/scheduler.ts +0 -187
- package/src/core/security.ts +0 -171
- package/src/core/session-manager.ts +0 -137
- package/src/core/streaming.ts +0 -195
- package/src/core/subagent.ts +0 -98
- package/src/core/types.ts +0 -68
- package/src/core/versioning.ts +0 -106
- package/src/core/vision.ts +0 -180
- package/src/core/watch.ts +0 -178
- package/src/core/workflow-graph.ts +0 -365
- package/src/core/workflow.ts +0 -235
- package/src/daemon.ts +0 -96
- package/src/deploy/hermes.ts +0 -156
- package/src/deploy/index.ts +0 -255
- package/src/deploy/openclaw.ts +0 -190
- package/src/doctor.ts +0 -243
- package/src/eval/index.ts +0 -211
- package/src/eval/suites/basic.json +0 -16
- package/src/eval/suites/memory.json +0 -12
- package/src/eval/suites/safety.json +0 -14
- package/src/hub/brain-seed.ts +0 -54
- package/src/hub/client.ts +0 -60
- package/src/i18n/index.ts +0 -216
- package/src/index.ts +0 -283
- package/src/mcp/servers/calculator-mcp.ts +0 -65
- package/src/mcp/servers/crypto-mcp.ts +0 -73
- package/src/mcp/servers/database-mcp.ts +0 -72
- package/src/mcp/servers/datetime-mcp.ts +0 -69
- package/src/mcp/servers/filesystem.ts +0 -66
- package/src/mcp/servers/github-mcp.ts +0 -58
- package/src/mcp/servers/index.ts +0 -63
- package/src/mcp/servers/json-mcp.ts +0 -102
- package/src/mcp/servers/memory-mcp.ts +0 -56
- package/src/mcp/servers/regex-mcp.ts +0 -53
- package/src/mcp/servers/web-mcp.ts +0 -49
- package/src/memory/context-compressor.ts +0 -189
- package/src/memory/deepbrain.ts +0 -202
- package/src/memory/index.ts +0 -41
- package/src/memory/seed-loader.ts +0 -212
- package/src/memory/user-profiler.ts +0 -215
- package/src/plugins/content-filter.ts +0 -23
- package/src/plugins/index.ts +0 -339
- package/src/plugins/logger.ts +0 -18
- package/src/plugins/rate-limiter.ts +0 -38
- package/src/protocols/a2a/client.ts +0 -132
- package/src/protocols/a2a/index.ts +0 -8
- package/src/protocols/a2a/server.ts +0 -333
- package/src/protocols/a2a/types.ts +0 -88
- package/src/protocols/a2a/utils.ts +0 -50
- package/src/protocols/agui/client.ts +0 -83
- package/src/protocols/agui/index.ts +0 -4
- package/src/protocols/agui/server.ts +0 -218
- package/src/protocols/agui/types.ts +0 -153
- package/src/protocols/index.ts +0 -2
- package/src/protocols/mcp/agent-tools.ts +0 -134
- package/src/protocols/mcp/index.ts +0 -8
- package/src/protocols/mcp/server.ts +0 -262
- package/src/protocols/mcp/types.ts +0 -69
- package/src/providers/index.ts +0 -632
- package/src/publish/index.ts +0 -376
- package/src/scheduler/cron-engine.ts +0 -191
- package/src/scheduler/index.ts +0 -2
- package/src/schema/oad.ts +0 -217
- package/src/security/approval.ts +0 -131
- package/src/security/approvals.ts +0 -143
- package/src/security/elevated.ts +0 -105
- package/src/security/guardrails.ts +0 -248
- package/src/security/index.ts +0 -9
- package/src/security/keys.ts +0 -87
- package/src/security/secrets.ts +0 -129
- package/src/skills/auto-learn.ts +0 -262
- package/src/skills/base.ts +0 -16
- package/src/skills/builtin/index.ts +0 -408
- package/src/skills/document.ts +0 -100
- package/src/skills/http.ts +0 -35
- package/src/skills/index.ts +0 -27
- package/src/skills/marketplace.ts +0 -113
- package/src/skills/scheduler.ts +0 -80
- package/src/skills/types.ts +0 -42
- package/src/skills/webhook-trigger.ts +0 -59
- package/src/studio/server.ts +0 -1791
- package/src/studio/templates-data.ts +0 -178
- package/src/studio-ui/index.html +0 -3076
- package/src/telemetry/index.ts +0 -324
- package/src/templates/code-reviewer.ts +0 -30
- package/src/templates/content-writer.ts +0 -58
- package/src/templates/customer-service.ts +0 -76
- package/src/templates/data-analyst.ts +0 -66
- package/src/templates/executive-assistant.ts +0 -71
- package/src/templates/financial-advisor.ts +0 -60
- package/src/templates/hr-recruiter.ts +0 -58
- package/src/templates/knowledge-base.ts +0 -27
- package/src/templates/legal-assistant.ts +0 -71
- package/src/templates/project-manager.ts +0 -58
- package/src/templates/sales-assistant.ts +0 -75
- package/src/templates/teacher.ts +0 -75
- package/src/testing/index.ts +0 -181
- package/src/tools/builtin/browser.ts +0 -299
- package/src/tools/builtin/datetime.ts +0 -41
- package/src/tools/builtin/file.ts +0 -107
- package/src/tools/builtin/home-assistant.ts +0 -116
- package/src/tools/builtin/index.ts +0 -37
- package/src/tools/builtin/rl-tools.ts +0 -243
- package/src/tools/builtin/shell.ts +0 -43
- package/src/tools/builtin/vision.ts +0 -64
- package/src/tools/builtin/web-search.ts +0 -126
- package/src/tools/builtin/web.ts +0 -35
- package/src/tools/calculator.ts +0 -73
- package/src/tools/datetime.ts +0 -149
- package/src/tools/document-processor.ts +0 -213
- package/src/tools/gateway.ts +0 -220
- package/src/tools/image-generator.ts +0 -150
- package/src/tools/integrations/calendar.ts +0 -73
- package/src/tools/integrations/code-exec.ts +0 -39
- package/src/tools/integrations/csv-analyzer.ts +0 -92
- package/src/tools/integrations/database.ts +0 -44
- package/src/tools/integrations/email-send.ts +0 -76
- package/src/tools/integrations/git-tool.ts +0 -42
- package/src/tools/integrations/github-tool.ts +0 -76
- package/src/tools/integrations/image-gen.ts +0 -56
- package/src/tools/integrations/index.ts +0 -92
- package/src/tools/integrations/jira.ts +0 -83
- package/src/tools/integrations/notion.ts +0 -71
- package/src/tools/integrations/npm-tool.ts +0 -48
- package/src/tools/integrations/pdf-reader.ts +0 -58
- package/src/tools/integrations/slack.ts +0 -65
- package/src/tools/integrations/summarizer.ts +0 -49
- package/src/tools/integrations/translator.ts +0 -48
- package/src/tools/integrations/trello.ts +0 -60
- package/src/tools/integrations/vector-search.ts +0 -42
- package/src/tools/integrations/web-scraper.ts +0 -47
- package/src/tools/integrations/web-search.ts +0 -58
- package/src/tools/integrations/webhook.ts +0 -38
- package/src/tools/json-transform.ts +0 -187
- package/src/tools/mcp-client.ts +0 -131
- package/src/tools/mcp.ts +0 -76
- package/src/tools/text-analysis.ts +0 -116
- package/src/tools/web-scraper.ts +0 -179
- package/src/tools/web-search.ts +0 -180
- package/src/traces/index.ts +0 -132
- package/src/types/agent-workstation.d.ts +0 -2
- package/src/ui/components.ts +0 -127
- package/srv-err.txt +0 -0
- package/srv-out.txt +0 -1
- package/test-agent/Dockerfile +0 -9
- package/test-agent/README.md +0 -50
- package/test-agent/agent.yaml +0 -23
- package/test-agent/docker-compose.yml +0 -11
- package/test-agent/oad.yaml +0 -31
- package/test-agent/package-lock.json +0 -1492
- package/test-agent/package.json +0 -18
- package/test-agent/src/index.ts +0 -24
- package/test-agent/src/skills/echo.ts +0 -15
- package/test-agent/tsconfig.json +0 -25
- package/test-full.js +0 -43
- package/test-sidebar.js +0 -22
- package/test-studio3.js +0 -75
- package/test-studio4.js +0 -41
- package/tests/a2a-protocol.test.ts +0 -285
- package/tests/a2a.test.ts +0 -66
- package/tests/agent.test.ts +0 -72
- package/tests/agui-protocol.test.ts +0 -246
- package/tests/analytics.test.ts +0 -50
- package/tests/api-server.test.ts +0 -148
- package/tests/approvals.test.ts +0 -89
- package/tests/audio.test.ts +0 -40
- package/tests/auto-learn.test.ts +0 -105
- package/tests/brain-seed-extended.test.ts +0 -490
- package/tests/brain-seed.test.ts +0 -239
- package/tests/browser.test.ts +0 -179
- package/tests/builtin-tools.test.ts +0 -83
- package/tests/channel.test.ts +0 -39
- package/tests/channels/discord.test.ts +0 -79
- package/tests/channels/email.test.ts +0 -148
- package/tests/channels/feishu.test.ts +0 -123
- package/tests/channels/telegram.test.ts +0 -129
- package/tests/channels/websocket.test.ts +0 -53
- package/tests/channels/wechat.test.ts +0 -170
- package/tests/channels-extra.test.ts +0 -45
- package/tests/chat-cli.test.ts +0 -160
- package/tests/cli.test.ts +0 -46
- package/tests/collaboration.test.ts +0 -319
- package/tests/context-compressor.test.ts +0 -172
- package/tests/context-refs.test.ts +0 -121
- package/tests/cron-engine.test.ts +0 -101
- package/tests/daemon.test.ts +0 -135
- package/tests/deepbrain-wire.test.ts +0 -234
- package/tests/deploy-and-dag.test.ts +0 -196
- package/tests/doctor.test.ts +0 -38
- package/tests/document-processor.test.ts +0 -69
- package/tests/e2e-nocode.test.ts +0 -442
- package/tests/e2e.test.ts +0 -134
- package/tests/elevated.test.ts +0 -69
- package/tests/errors.test.ts +0 -83
- package/tests/eval.test.ts +0 -173
- package/tests/gateway.test.ts +0 -63
- package/tests/guardrails.test.ts +0 -177
- package/tests/hitl.test.ts +0 -71
- package/tests/home-assistant.test.ts +0 -40
- package/tests/hooks.test.ts +0 -79
- package/tests/i18n.test.ts +0 -41
- package/tests/ide-bridge.test.ts +0 -38
- package/tests/image-generator.test.ts +0 -84
- package/tests/init-role.test.ts +0 -124
- package/tests/integrations.test.ts +0 -249
- package/tests/mcp-client.test.ts +0 -92
- package/tests/mcp-server.test.ts +0 -178
- package/tests/mcp-servers.test.ts +0 -260
- package/tests/mcp.test.ts +0 -54
- package/tests/node-network.test.ts +0 -74
- package/tests/oad.test.ts +0 -68
- package/tests/performance.test.ts +0 -115
- package/tests/plugin-a2a-enhanced.test.ts +0 -230
- package/tests/plugin.test.ts +0 -74
- package/tests/profiles.test.ts +0 -61
- package/tests/publish.test.ts +0 -231
- package/tests/rl-tools.test.ts +0 -93
- package/tests/room.test.ts +0 -106
- package/tests/runtime.test.ts +0 -42
- package/tests/sandbox-manager.test.ts +0 -46
- package/tests/sandbox.test.ts +0 -46
- package/tests/scheduler.test.ts +0 -200
- package/tests/secrets.test.ts +0 -107
- package/tests/security-enhanced.test.ts +0 -233
- package/tests/security.test.ts +0 -60
- package/tests/settings-api.test.ts +0 -148
- package/tests/setup.test.ts +0 -73
- package/tests/skill-learner.test.ts +0 -161
- package/tests/streaming.test.ts +0 -109
- package/tests/studio.test.ts +0 -402
- package/tests/subagent.test.ts +0 -193
- package/tests/telegram-discord.test.ts +0 -60
- package/tests/telemetry.test.ts +0 -186
- package/tests/templates.test.ts +0 -77
- package/tests/tools/builtin-extended.test.ts +0 -138
- package/tests/user-profiler.test.ts +0 -169
- package/tests/v070.test.ts +0 -76
- package/tests/v090-features.test.ts +0 -254
- package/tests/versioning.test.ts +0 -75
- package/tests/vision.test.ts +0 -61
- package/tests/voice-call.test.ts +0 -47
- package/tests/voice-enhanced.test.ts +0 -169
- package/tests/voice-interaction.test.ts +0 -38
- package/tests/voice.test.ts +0 -61
- package/tests/web-search.test.ts +0 -155
- package/tests/webhook.test.ts +0 -29
- package/tests/workflow-graph.test.ts +0 -279
- package/tests/workflow.test.ts +0 -143
- package/tmp-js-test.js +0 -1532
- package/tmp-sc.js +0 -1716
- package/tutorial/customer-service-agent/README.md +0 -612
- package/tutorial/customer-service-agent/SOUL.md +0 -26
- package/tutorial/customer-service-agent/agent.yaml +0 -63
- package/tutorial/customer-service-agent/package.json +0 -19
- package/tutorial/customer-service-agent/src/index.ts +0 -69
- package/tutorial/customer-service-agent/src/skills/faq.ts +0 -27
- package/tutorial/customer-service-agent/src/skills/ticket.ts +0 -22
- package/tutorial/customer-service-agent/tsconfig.json +0 -14
- package/vitest.config.ts +0 -9
package/src/telemetry/index.ts
DELETED
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OPC Agent Telemetry — Lightweight OTel-compatible tracing & metrics.
|
|
3
|
-
* Zero external dependencies. Produces OTLP-compatible JSON.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import * as fs from 'fs';
|
|
7
|
-
import * as crypto from 'crypto';
|
|
8
|
-
|
|
9
|
-
// ─── Types ───────────────────────────────────────────────────
|
|
10
|
-
|
|
11
|
-
export interface Span {
|
|
12
|
-
traceId: string;
|
|
13
|
-
spanId: string;
|
|
14
|
-
parentSpanId?: string;
|
|
15
|
-
name: string;
|
|
16
|
-
kind: 'internal' | 'client' | 'server';
|
|
17
|
-
startTime: number; // epoch ms
|
|
18
|
-
endTime?: number;
|
|
19
|
-
status: 'ok' | 'error' | 'unset';
|
|
20
|
-
attributes: Record<string, string | number | boolean>;
|
|
21
|
-
events: SpanEvent[];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface SpanEvent {
|
|
25
|
-
name: string;
|
|
26
|
-
timestamp: number;
|
|
27
|
-
attributes?: Record<string, string | number | boolean>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface Metric {
|
|
31
|
-
name: string;
|
|
32
|
-
type: 'counter' | 'gauge' | 'histogram';
|
|
33
|
-
value: number;
|
|
34
|
-
timestamp: number;
|
|
35
|
-
labels: Record<string, string>;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface TraceExporter {
|
|
39
|
-
export(spans: Span[]): Promise<void>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// ─── ID Generation ───────────────────────────────────────────
|
|
43
|
-
|
|
44
|
-
export function generateTraceId(): string {
|
|
45
|
-
return crypto.randomBytes(16).toString('hex'); // 32 hex chars
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function generateSpanId(): string {
|
|
49
|
-
return crypto.randomBytes(8).toString('hex'); // 16 hex chars
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// ─── Tracer ──────────────────────────────────────────────────
|
|
53
|
-
|
|
54
|
-
export class Tracer {
|
|
55
|
-
private spans: Span[] = [];
|
|
56
|
-
private metrics: Metric[] = [];
|
|
57
|
-
private maxSpans: number;
|
|
58
|
-
private maxMetrics: number;
|
|
59
|
-
private exporters: TraceExporter[] = [];
|
|
60
|
-
|
|
61
|
-
constructor(options?: { maxSpans?: number; maxMetrics?: number }) {
|
|
62
|
-
this.maxSpans = options?.maxSpans || 10000;
|
|
63
|
-
this.maxMetrics = options?.maxMetrics || 50000;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
startSpan(name: string, options?: {
|
|
67
|
-
parent?: Span;
|
|
68
|
-
attributes?: Record<string, string | number | boolean>;
|
|
69
|
-
kind?: Span['kind'];
|
|
70
|
-
}): Span {
|
|
71
|
-
const span: Span = {
|
|
72
|
-
traceId: options?.parent?.traceId || generateTraceId(),
|
|
73
|
-
spanId: generateSpanId(),
|
|
74
|
-
parentSpanId: options?.parent?.spanId,
|
|
75
|
-
name,
|
|
76
|
-
kind: options?.kind || 'internal',
|
|
77
|
-
startTime: Date.now(),
|
|
78
|
-
status: 'unset',
|
|
79
|
-
attributes: options?.attributes ? { ...options.attributes } : {},
|
|
80
|
-
events: [],
|
|
81
|
-
};
|
|
82
|
-
this.spans.push(span);
|
|
83
|
-
|
|
84
|
-
// Evict oldest spans if over limit
|
|
85
|
-
if (this.spans.length > this.maxSpans) {
|
|
86
|
-
const excess = this.spans.length - this.maxSpans;
|
|
87
|
-
this.spans.splice(0, excess);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return span;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
endSpan(span: Span, status?: Span['status']): void {
|
|
94
|
-
span.endTime = Date.now();
|
|
95
|
-
span.status = status || 'ok';
|
|
96
|
-
|
|
97
|
-
// Notify exporters
|
|
98
|
-
for (const exporter of this.exporters) {
|
|
99
|
-
exporter.export([span]).catch(() => {});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
addEvent(span: Span, name: string, attributes?: Record<string, string | number | boolean>): void {
|
|
104
|
-
span.events.push({ name, timestamp: Date.now(), attributes });
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// ─── Metrics ─────────────────────────────────────────────
|
|
108
|
-
|
|
109
|
-
increment(name: string, value: number = 1, labels: Record<string, string> = {}): void {
|
|
110
|
-
this.addMetric(name, 'counter', value, labels);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
gauge(name: string, value: number, labels: Record<string, string> = {}): void {
|
|
114
|
-
this.addMetric(name, 'gauge', value, labels);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
histogram(name: string, value: number, labels: Record<string, string> = {}): void {
|
|
118
|
-
this.addMetric(name, 'histogram', value, labels);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
private addMetric(name: string, type: Metric['type'], value: number, labels: Record<string, string>): void {
|
|
122
|
-
this.metrics.push({ name, type, value, timestamp: Date.now(), labels });
|
|
123
|
-
if (this.metrics.length > this.maxMetrics) {
|
|
124
|
-
this.metrics.splice(0, this.metrics.length - this.maxMetrics);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// ─── Query ───────────────────────────────────────────────
|
|
129
|
-
|
|
130
|
-
getSpans(options?: { limit?: number; traceId?: string; name?: string; since?: number }): Span[] {
|
|
131
|
-
let result = [...this.spans];
|
|
132
|
-
|
|
133
|
-
if (options?.traceId) result = result.filter(s => s.traceId === options.traceId);
|
|
134
|
-
if (options?.name) result = result.filter(s => s.name === options.name);
|
|
135
|
-
if (options?.since) result = result.filter(s => s.startTime >= options.since!);
|
|
136
|
-
|
|
137
|
-
// Most recent first
|
|
138
|
-
result.sort((a, b) => b.startTime - a.startTime);
|
|
139
|
-
|
|
140
|
-
if (options?.limit) result = result.slice(0, options.limit);
|
|
141
|
-
return result;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
getMetrics(options?: { name?: string; since?: number }): Metric[] {
|
|
145
|
-
let result = [...this.metrics];
|
|
146
|
-
if (options?.name) result = result.filter(m => m.name === options.name);
|
|
147
|
-
if (options?.since) result = result.filter(m => m.timestamp >= options.since!);
|
|
148
|
-
return result;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
getTrace(traceId: string): Span[] {
|
|
152
|
-
return this.spans.filter(s => s.traceId === traceId).sort((a, b) => a.startTime - b.startTime);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// ─── Export (OTLP-compatible) ────────────────────────────
|
|
156
|
-
|
|
157
|
-
addExporter(exporter: TraceExporter): void {
|
|
158
|
-
this.exporters.push(exporter);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
exportOTLP(): object {
|
|
162
|
-
// OTLP JSON format: https://opentelemetry.io/docs/specs/otlp/
|
|
163
|
-
const spansByResource = this.spans.filter(s => s.endTime != null);
|
|
164
|
-
|
|
165
|
-
return {
|
|
166
|
-
resourceSpans: [{
|
|
167
|
-
resource: {
|
|
168
|
-
attributes: [
|
|
169
|
-
{ key: 'service.name', value: { stringValue: 'opc-agent' } },
|
|
170
|
-
],
|
|
171
|
-
},
|
|
172
|
-
scopeSpans: [{
|
|
173
|
-
scope: { name: 'opc-telemetry', version: '1.0.0' },
|
|
174
|
-
spans: spansByResource.map(s => ({
|
|
175
|
-
traceId: s.traceId,
|
|
176
|
-
spanId: s.spanId,
|
|
177
|
-
parentSpanId: s.parentSpanId || '',
|
|
178
|
-
name: s.name,
|
|
179
|
-
kind: s.kind === 'server' ? 2 : s.kind === 'client' ? 3 : 1,
|
|
180
|
-
startTimeUnixNano: String(s.startTime * 1_000_000),
|
|
181
|
-
endTimeUnixNano: String((s.endTime || s.startTime) * 1_000_000),
|
|
182
|
-
attributes: Object.entries(s.attributes).map(([key, value]) => ({
|
|
183
|
-
key,
|
|
184
|
-
value: typeof value === 'string' ? { stringValue: value }
|
|
185
|
-
: typeof value === 'number' ? (Number.isInteger(value) ? { intValue: String(value) } : { doubleValue: value })
|
|
186
|
-
: { boolValue: value },
|
|
187
|
-
})),
|
|
188
|
-
events: s.events.map(e => ({
|
|
189
|
-
timeUnixNano: String(e.timestamp * 1_000_000),
|
|
190
|
-
name: e.name,
|
|
191
|
-
attributes: e.attributes ? Object.entries(e.attributes).map(([key, value]) => ({
|
|
192
|
-
key,
|
|
193
|
-
value: typeof value === 'string' ? { stringValue: value }
|
|
194
|
-
: typeof value === 'number' ? { intValue: String(value) }
|
|
195
|
-
: { boolValue: value },
|
|
196
|
-
})) : [],
|
|
197
|
-
})),
|
|
198
|
-
status: {
|
|
199
|
-
code: s.status === 'ok' ? 1 : s.status === 'error' ? 2 : 0,
|
|
200
|
-
},
|
|
201
|
-
})),
|
|
202
|
-
}],
|
|
203
|
-
}],
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// ─── Stats ───────────────────────────────────────────────
|
|
208
|
-
|
|
209
|
-
getStats(): {
|
|
210
|
-
totalSpans: number;
|
|
211
|
-
totalTraces: number;
|
|
212
|
-
avgDuration: number;
|
|
213
|
-
errorRate: number;
|
|
214
|
-
spansByName: Record<string, number>;
|
|
215
|
-
p50Latency: number;
|
|
216
|
-
p95Latency: number;
|
|
217
|
-
p99Latency: number;
|
|
218
|
-
} {
|
|
219
|
-
const completed = this.spans.filter(s => s.endTime != null);
|
|
220
|
-
const durations = completed.map(s => s.endTime! - s.startTime).sort((a, b) => a - b);
|
|
221
|
-
const traceIds = new Set(this.spans.map(s => s.traceId));
|
|
222
|
-
const errors = completed.filter(s => s.status === 'error').length;
|
|
223
|
-
|
|
224
|
-
const spansByName: Record<string, number> = {};
|
|
225
|
-
for (const s of this.spans) {
|
|
226
|
-
spansByName[s.name] = (spansByName[s.name] || 0) + 1;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
const percentile = (arr: number[], p: number): number => {
|
|
230
|
-
if (arr.length === 0) return 0;
|
|
231
|
-
const idx = Math.ceil(arr.length * p / 100) - 1;
|
|
232
|
-
return arr[Math.max(0, idx)];
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
return {
|
|
236
|
-
totalSpans: this.spans.length,
|
|
237
|
-
totalTraces: traceIds.size,
|
|
238
|
-
avgDuration: durations.length > 0 ? durations.reduce((a, b) => a + b, 0) / durations.length : 0,
|
|
239
|
-
errorRate: completed.length > 0 ? errors / completed.length : 0,
|
|
240
|
-
spansByName,
|
|
241
|
-
p50Latency: percentile(durations, 50),
|
|
242
|
-
p95Latency: percentile(durations, 95),
|
|
243
|
-
p99Latency: percentile(durations, 99),
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
clear(): void {
|
|
248
|
-
this.spans = [];
|
|
249
|
-
this.metrics = [];
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
// ─── Exporters ───────────────────────────────────────────────
|
|
254
|
-
|
|
255
|
-
export class ConsoleExporter implements TraceExporter {
|
|
256
|
-
async export(spans: Span[]): Promise<void> {
|
|
257
|
-
for (const span of spans) {
|
|
258
|
-
const duration = span.endTime ? `${span.endTime - span.startTime}ms` : 'ongoing';
|
|
259
|
-
console.log(`[TRACE] ${span.name} (${duration}) [${span.status}] trace=${span.traceId.slice(0, 8)}`);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
export class FileExporter implements TraceExporter {
|
|
265
|
-
private filePath: string;
|
|
266
|
-
|
|
267
|
-
constructor(filePath: string) {
|
|
268
|
-
this.filePath = filePath;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
async export(spans: Span[]): Promise<void> {
|
|
272
|
-
const lines = spans.map(s => JSON.stringify(s)).join('\n') + '\n';
|
|
273
|
-
fs.appendFileSync(this.filePath, lines);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
export class OTLPHttpExporter implements TraceExporter {
|
|
278
|
-
private endpoint: string;
|
|
279
|
-
|
|
280
|
-
constructor(endpoint: string) {
|
|
281
|
-
this.endpoint = endpoint.replace(/\/$/, '');
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
async export(spans: Span[]): Promise<void> {
|
|
285
|
-
const body = {
|
|
286
|
-
resourceSpans: [{
|
|
287
|
-
resource: {
|
|
288
|
-
attributes: [
|
|
289
|
-
{ key: 'service.name', value: { stringValue: 'opc-agent' } },
|
|
290
|
-
],
|
|
291
|
-
},
|
|
292
|
-
scopeSpans: [{
|
|
293
|
-
scope: { name: 'opc-telemetry', version: '1.0.0' },
|
|
294
|
-
spans: spans.filter(s => s.endTime).map(s => ({
|
|
295
|
-
traceId: s.traceId,
|
|
296
|
-
spanId: s.spanId,
|
|
297
|
-
parentSpanId: s.parentSpanId || '',
|
|
298
|
-
name: s.name,
|
|
299
|
-
kind: s.kind === 'server' ? 2 : s.kind === 'client' ? 3 : 1,
|
|
300
|
-
startTimeUnixNano: String(s.startTime * 1_000_000),
|
|
301
|
-
endTimeUnixNano: String((s.endTime || s.startTime) * 1_000_000),
|
|
302
|
-
attributes: Object.entries(s.attributes).map(([key, value]) => ({
|
|
303
|
-
key,
|
|
304
|
-
value: typeof value === 'string' ? { stringValue: value }
|
|
305
|
-
: typeof value === 'number' ? { intValue: String(value) }
|
|
306
|
-
: { boolValue: value },
|
|
307
|
-
})),
|
|
308
|
-
status: { code: s.status === 'ok' ? 1 : s.status === 'error' ? 2 : 0 },
|
|
309
|
-
})),
|
|
310
|
-
}],
|
|
311
|
-
}],
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
try {
|
|
315
|
-
await fetch(`${this.endpoint}/v1/traces`, {
|
|
316
|
-
method: 'POST',
|
|
317
|
-
headers: { 'Content-Type': 'application/json' },
|
|
318
|
-
body: JSON.stringify(body),
|
|
319
|
-
});
|
|
320
|
-
} catch {
|
|
321
|
-
// Best effort
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export const CODE_REVIEWER_SYSTEM_PROMPT = `You are an expert code reviewer. When given code:
|
|
2
|
-
1. Check for bugs, security issues, and performance problems
|
|
3
|
-
2. Suggest improvements for readability and maintainability
|
|
4
|
-
3. Follow language-specific best practices
|
|
5
|
-
4. Be constructive and explain your reasoning
|
|
6
|
-
Rate severity: 🔴 Critical | 🟡 Warning | 🔵 Info`;
|
|
7
|
-
|
|
8
|
-
export function createCodeReviewerConfig() {
|
|
9
|
-
return {
|
|
10
|
-
apiVersion: 'opc/v1' as const,
|
|
11
|
-
kind: 'Agent' as const,
|
|
12
|
-
metadata: {
|
|
13
|
-
name: 'code-reviewer',
|
|
14
|
-
version: '1.0.0',
|
|
15
|
-
description: 'AI code reviewer that reviews code and suggests improvements',
|
|
16
|
-
author: 'OPC Agent',
|
|
17
|
-
license: 'Apache-2.0',
|
|
18
|
-
},
|
|
19
|
-
spec: {
|
|
20
|
-
provider: { default: 'deepseek', allowed: ['openai', 'deepseek', 'qwen'] },
|
|
21
|
-
model: 'deepseek-chat',
|
|
22
|
-
systemPrompt: CODE_REVIEWER_SYSTEM_PROMPT,
|
|
23
|
-
skills: [
|
|
24
|
-
{ name: 'code-analysis', description: 'Analyze code for bugs' },
|
|
25
|
-
],
|
|
26
|
-
channels: [{ type: 'web' as const, port: 3000 }],
|
|
27
|
-
memory: { shortTerm: true, longTerm: false },
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { BaseSkill } from '../skills/base';
|
|
2
|
-
import type { AgentContext, Message, SkillResult } from '../core/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export class BlogWriterSkill extends BaseSkill {
|
|
6
|
-
name = 'blog-writer';
|
|
7
|
-
description = 'Help write blog posts with SEO optimization';
|
|
8
|
-
|
|
9
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
10
|
-
const lower = message.content.toLowerCase();
|
|
11
|
-
if (lower.includes('blog') || lower.includes('article') || lower.includes('post')) {
|
|
12
|
-
return this.match(
|
|
13
|
-
'I can help write blog posts! Please share the topic, target audience, and any keywords you\'d like to include for SEO.',
|
|
14
|
-
0.8,
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
return this.noMatch();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export class SocialMediaSkill extends BaseSkill {
|
|
22
|
-
name = 'social-media';
|
|
23
|
-
description = 'Create social media content';
|
|
24
|
-
|
|
25
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
26
|
-
const lower = message.content.toLowerCase();
|
|
27
|
-
if (lower.includes('social') || lower.includes('tweet') || lower.includes('linkedin')) {
|
|
28
|
-
return this.match(
|
|
29
|
-
'I can create social media content! Tell me the platform (Twitter/LinkedIn/etc.), topic, and tone you prefer.',
|
|
30
|
-
0.8,
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
return this.noMatch();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function createContentWriterConfig() {
|
|
38
|
-
return {
|
|
39
|
-
apiVersion: 'opc/v1',
|
|
40
|
-
kind: 'Agent',
|
|
41
|
-
metadata: {
|
|
42
|
-
name: 'content-writer',
|
|
43
|
-
version: '1.0.0',
|
|
44
|
-
description: 'Content Writer — blog posts, social media, SEO optimization',
|
|
45
|
-
author: 'Deepleaper',
|
|
46
|
-
license: 'Apache-2.0',
|
|
47
|
-
},
|
|
48
|
-
spec: {
|
|
49
|
-
model: 'deepseek-chat',
|
|
50
|
-
systemPrompt: 'You are a content writing assistant. Help create blog posts, social media content, and optimize for SEO. Be creative, engaging, and audience-aware.',
|
|
51
|
-
skills: [
|
|
52
|
-
{ name: 'blog-writer', description: 'Write blog posts' },
|
|
53
|
-
{ name: 'social-media', description: 'Create social media content' },
|
|
54
|
-
],
|
|
55
|
-
channels: [{ type: 'web', port: 3000 }],
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { BaseSkill } from '../skills/base';
|
|
2
|
-
import type { AgentContext, Message, SkillResult } from '../core/types';
|
|
3
|
-
|
|
4
|
-
const DEFAULT_FAQ: Record<string, string> = {
|
|
5
|
-
'hours': 'Our business hours are Monday-Friday, 9am-6pm.',
|
|
6
|
-
'return': 'You can return items within 30 days of purchase.',
|
|
7
|
-
'shipping': 'Standard shipping takes 3-5 business days.',
|
|
8
|
-
'contact': 'You can reach us at support@example.com.',
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export class FAQSkill extends BaseSkill {
|
|
12
|
-
name = 'faq-lookup';
|
|
13
|
-
description = 'Look up FAQ answers';
|
|
14
|
-
private faq: Record<string, string>;
|
|
15
|
-
|
|
16
|
-
constructor(faq?: Record<string, string>) {
|
|
17
|
-
super();
|
|
18
|
-
this.faq = faq ?? DEFAULT_FAQ;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
22
|
-
const lower = message.content.toLowerCase();
|
|
23
|
-
for (const [key, answer] of Object.entries(this.faq)) {
|
|
24
|
-
if (lower.includes(key)) {
|
|
25
|
-
return this.match(answer, 0.9);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return this.noMatch();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export class HandoffSkill extends BaseSkill {
|
|
33
|
-
name = 'human-handoff';
|
|
34
|
-
description = 'Hand off to a human agent when confidence is low';
|
|
35
|
-
private keywords = ['speak to human', 'talk to agent', 'real person', 'human agent'];
|
|
36
|
-
|
|
37
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
38
|
-
const lower = message.content.toLowerCase();
|
|
39
|
-
if (this.keywords.some((kw) => lower.includes(kw))) {
|
|
40
|
-
return this.match(
|
|
41
|
-
'I understand you\'d like to speak with a human agent. Let me connect you now. Please hold.',
|
|
42
|
-
1.0
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
return this.noMatch();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const CUSTOMER_SERVICE_SYSTEM_PROMPT = `You are a friendly and professional customer service agent.
|
|
50
|
-
You help customers with their questions about products, orders, shipping, and returns.
|
|
51
|
-
Be concise, helpful, and empathetic. If you're unsure, offer to connect them with a human agent.`;
|
|
52
|
-
|
|
53
|
-
export function createCustomerServiceConfig() {
|
|
54
|
-
return {
|
|
55
|
-
apiVersion: 'opc/v1' as const,
|
|
56
|
-
kind: 'Agent' as const,
|
|
57
|
-
metadata: {
|
|
58
|
-
name: 'customer-service',
|
|
59
|
-
version: '1.0.0',
|
|
60
|
-
description: 'Customer service agent with FAQ and human handoff',
|
|
61
|
-
author: 'OPC Agent',
|
|
62
|
-
license: 'Apache-2.0',
|
|
63
|
-
},
|
|
64
|
-
spec: {
|
|
65
|
-
provider: { default: 'deepseek', allowed: ['openai', 'deepseek', 'qwen'] },
|
|
66
|
-
model: 'deepseek-chat',
|
|
67
|
-
systemPrompt: CUSTOMER_SERVICE_SYSTEM_PROMPT,
|
|
68
|
-
skills: [
|
|
69
|
-
{ name: 'faq-lookup', description: 'Look up FAQ answers' },
|
|
70
|
-
{ name: 'human-handoff', description: 'Hand off to human agent' },
|
|
71
|
-
],
|
|
72
|
-
channels: [{ type: 'web' as const, port: 3000 }],
|
|
73
|
-
memory: { shortTerm: true, longTerm: false },
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { BaseSkill } from '../skills/base';
|
|
2
|
-
import type { AgentContext, Message, SkillResult } from '../core/types';
|
|
3
|
-
|
|
4
|
-
export class DataQuerySkill extends BaseSkill {
|
|
5
|
-
name = 'data-query';
|
|
6
|
-
description = 'Help users query and analyze data';
|
|
7
|
-
|
|
8
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
9
|
-
const lower = message.content.toLowerCase();
|
|
10
|
-
if (lower.includes('average') || lower.includes('mean') || lower.includes('sum') || lower.includes('count')) {
|
|
11
|
-
return this.match('I can help with that calculation. Could you share the dataset or describe the data source?', 0.8);
|
|
12
|
-
}
|
|
13
|
-
if (lower.includes('chart') || lower.includes('graph') || lower.includes('visualize') || lower.includes('plot')) {
|
|
14
|
-
return this.match('I can help create visualizations. What type of chart would you like? (bar, line, pie, scatter)', 0.85);
|
|
15
|
-
}
|
|
16
|
-
if (lower.includes('csv') || lower.includes('excel') || lower.includes('spreadsheet')) {
|
|
17
|
-
return this.match('I can analyze CSV/Excel data. Please share the file or paste the data.', 0.8);
|
|
18
|
-
}
|
|
19
|
-
return this.noMatch();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export class InsightSkill extends BaseSkill {
|
|
24
|
-
name = 'insight-generator';
|
|
25
|
-
description = 'Generate insights from data patterns';
|
|
26
|
-
|
|
27
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
28
|
-
const lower = message.content.toLowerCase();
|
|
29
|
-
if (lower.includes('trend') || lower.includes('pattern') || lower.includes('insight') || lower.includes('anomaly')) {
|
|
30
|
-
return this.match('I\'ll analyze the data for trends and anomalies. Please provide the dataset or describe what you\'re looking for.', 0.8);
|
|
31
|
-
}
|
|
32
|
-
return this.noMatch();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export const DATA_ANALYST_SYSTEM_PROMPT = `You are a professional data analyst assistant. Your goals:
|
|
37
|
-
1. Help users query, transform, and analyze data
|
|
38
|
-
2. Create clear visualizations and summaries
|
|
39
|
-
3. Identify trends, patterns, and anomalies
|
|
40
|
-
4. Explain findings in plain language
|
|
41
|
-
Be precise with numbers, always cite your data source, and suggest next steps for deeper analysis.`;
|
|
42
|
-
|
|
43
|
-
export function createDataAnalystConfig() {
|
|
44
|
-
return {
|
|
45
|
-
apiVersion: 'opc/v1' as const,
|
|
46
|
-
kind: 'Agent' as const,
|
|
47
|
-
metadata: {
|
|
48
|
-
name: 'data-analyst',
|
|
49
|
-
version: '1.0.0',
|
|
50
|
-
description: 'AI data analyst with data querying, visualization, and insight generation',
|
|
51
|
-
author: 'OPC Agent',
|
|
52
|
-
license: 'Apache-2.0',
|
|
53
|
-
},
|
|
54
|
-
spec: {
|
|
55
|
-
provider: { default: 'openai', allowed: ['openai', 'deepseek', 'qwen'] },
|
|
56
|
-
model: 'gpt-4o-mini',
|
|
57
|
-
systemPrompt: DATA_ANALYST_SYSTEM_PROMPT,
|
|
58
|
-
skills: [
|
|
59
|
-
{ name: 'data-query', description: 'Query and transform data' },
|
|
60
|
-
{ name: 'insight-generator', description: 'Generate data insights' },
|
|
61
|
-
],
|
|
62
|
-
channels: [{ type: 'web' as const, port: 3000 }],
|
|
63
|
-
memory: { shortTerm: true, longTerm: true },
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { BaseSkill } from '../skills/base';
|
|
2
|
-
import type { AgentContext, Message, SkillResult } from '../core/types';
|
|
3
|
-
import type { OADDocument } from '../schema/oad';
|
|
4
|
-
|
|
5
|
-
export class CalendarSkill extends BaseSkill {
|
|
6
|
-
name = 'calendar-management';
|
|
7
|
-
description = 'Manage calendar and scheduling';
|
|
8
|
-
|
|
9
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
10
|
-
const lower = message.content.toLowerCase();
|
|
11
|
-
if (lower.includes('schedule') || lower.includes('meeting') || lower.includes('calendar')) {
|
|
12
|
-
return this.match('I can help manage your calendar. I can schedule meetings, check availability, send invites, and set reminders. What would you like to do?', 0.8);
|
|
13
|
-
}
|
|
14
|
-
if (lower.includes('remind') || lower.includes('reminder')) {
|
|
15
|
-
return this.match('I\'ll set a reminder for you. Please provide the date, time, and what you\'d like to be reminded about.', 0.75);
|
|
16
|
-
}
|
|
17
|
-
return this.noMatch();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export class EmailDraftSkill extends BaseSkill {
|
|
22
|
-
name = 'email-drafting';
|
|
23
|
-
description = 'Draft professional emails';
|
|
24
|
-
|
|
25
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
26
|
-
const lower = message.content.toLowerCase();
|
|
27
|
-
if (lower.includes('email') || lower.includes('draft') || lower.includes('write')) {
|
|
28
|
-
return this.match('I can draft emails for you. Please provide: the recipient, subject, key points to cover, and desired tone (formal/casual/friendly).', 0.8);
|
|
29
|
-
}
|
|
30
|
-
return this.noMatch();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export class MeetingPrepSkill extends BaseSkill {
|
|
35
|
-
name = 'meeting-prep';
|
|
36
|
-
description = 'Prepare for meetings with agendas and notes';
|
|
37
|
-
|
|
38
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
39
|
-
const lower = message.content.toLowerCase();
|
|
40
|
-
if (lower.includes('agenda') || lower.includes('prep') || lower.includes('prepare')) {
|
|
41
|
-
return this.match('I can prepare meeting materials including: agenda creation, attendee briefings, talking points, action item tracking, and follow-up summaries.', 0.8);
|
|
42
|
-
}
|
|
43
|
-
return this.noMatch();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function createExecutiveAssistantConfig(): OADDocument {
|
|
48
|
-
return {
|
|
49
|
-
apiVersion: 'opc/v1',
|
|
50
|
-
kind: 'Agent',
|
|
51
|
-
metadata: {
|
|
52
|
-
name: 'executive-assistant',
|
|
53
|
-
version: '1.0.0',
|
|
54
|
-
description: 'AI Executive Assistant - calendar management, email drafting, meeting prep',
|
|
55
|
-
author: 'OPC',
|
|
56
|
-
license: 'Apache-2.0',
|
|
57
|
-
},
|
|
58
|
-
spec: {
|
|
59
|
-
model: 'deepseek-chat',
|
|
60
|
-
systemPrompt: 'You are an executive assistant AI. Help users manage their calendar, draft emails, and prepare for meetings. Be professional, concise, and proactive.',
|
|
61
|
-
skills: [
|
|
62
|
-
{ name: 'calendar-management', description: 'Manage calendar and scheduling' },
|
|
63
|
-
{ name: 'email-drafting', description: 'Draft professional emails' },
|
|
64
|
-
{ name: 'meeting-prep', description: 'Prepare meeting materials' },
|
|
65
|
-
],
|
|
66
|
-
channels: [{ type: 'web', port: 3000 }],
|
|
67
|
-
memory: { shortTerm: true, longTerm: false },
|
|
68
|
-
streaming: false,
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { BaseSkill } from '../skills/base';
|
|
2
|
-
import type { AgentContext, Message, SkillResult } from '../core/types';
|
|
3
|
-
import type { OADDocument } from '../schema/oad';
|
|
4
|
-
|
|
5
|
-
export class BudgetAnalysisSkill extends BaseSkill {
|
|
6
|
-
name = 'budget-analysis';
|
|
7
|
-
description = 'Analyze budgets and expenses';
|
|
8
|
-
|
|
9
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
10
|
-
const lower = message.content.toLowerCase();
|
|
11
|
-
if (lower.includes('budget') || lower.includes('expense') || lower.includes('cost')) {
|
|
12
|
-
return this.match('I can help analyze your budget. Please share your income and expense categories, and I\'ll provide insights on spending patterns and savings opportunities.', 0.8);
|
|
13
|
-
}
|
|
14
|
-
if (lower.includes('save') || lower.includes('saving')) {
|
|
15
|
-
return this.match('Common savings strategies: 50/30/20 rule (needs/wants/savings), automate transfers, review subscriptions, negotiate bills, and track daily spending.', 0.75);
|
|
16
|
-
}
|
|
17
|
-
return this.noMatch();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export class FinancialPlanningSkill extends BaseSkill {
|
|
22
|
-
name = 'financial-planning';
|
|
23
|
-
description = 'Help with financial planning and advice';
|
|
24
|
-
|
|
25
|
-
async execute(_context: AgentContext, message: Message): Promise<SkillResult> {
|
|
26
|
-
const lower = message.content.toLowerCase();
|
|
27
|
-
if (lower.includes('invest') || lower.includes('portfolio')) {
|
|
28
|
-
return this.match('For investment planning, consider: risk tolerance, time horizon, diversification, asset allocation, and regular rebalancing. This is general guidance — consult a certified financial advisor for personalized advice.', 0.8);
|
|
29
|
-
}
|
|
30
|
-
if (lower.includes('retire') || lower.includes('pension')) {
|
|
31
|
-
return this.match('Retirement planning essentials: estimate target savings (25x annual expenses), maximize employer matching, consider tax-advantaged accounts, and start early for compound growth.', 0.8);
|
|
32
|
-
}
|
|
33
|
-
return this.noMatch();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function createFinancialAdvisorConfig(): OADDocument {
|
|
38
|
-
return {
|
|
39
|
-
apiVersion: 'opc/v1',
|
|
40
|
-
kind: 'Agent',
|
|
41
|
-
metadata: {
|
|
42
|
-
name: 'financial-advisor',
|
|
43
|
-
version: '1.0.0',
|
|
44
|
-
description: 'AI Financial Advisor - budget analysis, expense tracking, financial planning',
|
|
45
|
-
author: 'OPC',
|
|
46
|
-
license: 'Apache-2.0',
|
|
47
|
-
},
|
|
48
|
-
spec: {
|
|
49
|
-
model: 'deepseek-chat',
|
|
50
|
-
systemPrompt: 'You are a financial advisor AI. Help users with budget analysis, expense tracking, and financial planning. Always recommend consulting a certified financial advisor for binding decisions.',
|
|
51
|
-
skills: [
|
|
52
|
-
{ name: 'budget-analysis', description: 'Analyze budgets and expenses' },
|
|
53
|
-
{ name: 'financial-planning', description: 'Financial planning advice' },
|
|
54
|
-
],
|
|
55
|
-
channels: [{ type: 'web', port: 3000 }],
|
|
56
|
-
memory: { shortTerm: true, longTerm: false },
|
|
57
|
-
streaming: false,
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
}
|