@chozzz/vargos 2.0.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/.templates/vargos/agent/extensions/anthropic-custom-payload.patch.json +34 -0
- package/.templates/vargos/agent/extensions/anthropic-custom-payload.ts +74 -0
- package/.templates/vargos/agent/mcp.json +9 -0
- package/.templates/vargos/agent/skills/skill-creator/SKILL.md +77 -0
- package/.templates/vargos/agent/skills/token-capture/SKILL.md +33 -0
- package/.templates/vargos/agent/skills/token-capture/scripts/capture-bearer-token.sh +139 -0
- package/.templates/vargos/agents/README +5 -0
- package/.templates/vargos/agents/default.md +7 -0
- package/.templates/vargos/config.json +1 -0
- package/.templates/vargos/cron/heartbeat.md +11 -0
- package/.templates/vargos/workspace/AGENTS.md +70 -0
- package/.templates/vargos/workspace/HEARTBEAT.md +26 -0
- package/.templates/vargos/workspace/MEMORY.md +15 -0
- package/.templates/vargos/workspace/SOUL.md +51 -0
- package/.templates/vargos/workspace/TOOLS.md +36 -0
- package/CHANGELOG.md +23 -0
- package/CODE_OF_CONDUCT.md +47 -0
- package/CONTRIBUTING.md +65 -0
- package/LICENSE +191 -0
- package/README.md +117 -0
- package/SECURITY.md +30 -0
- package/dist/.templates/vargos/agent/extensions/anthropic-custom-payload.patch.json +34 -0
- package/dist/.templates/vargos/agent/extensions/anthropic-custom-payload.ts +74 -0
- package/dist/.templates/vargos/agent/mcp.json +9 -0
- package/dist/.templates/vargos/agent/skills/skill-creator/SKILL.md +77 -0
- package/dist/.templates/vargos/agent/skills/token-capture/SKILL.md +33 -0
- package/dist/.templates/vargos/agent/skills/token-capture/scripts/capture-bearer-token.sh +139 -0
- package/dist/.templates/vargos/agents/README +5 -0
- package/dist/.templates/vargos/agents/default.md +7 -0
- package/dist/.templates/vargos/config.json +1 -0
- package/dist/.templates/vargos/cron/heartbeat.md +11 -0
- package/dist/.templates/vargos/workspace/AGENTS.md +70 -0
- package/dist/.templates/vargos/workspace/HEARTBEAT.md +26 -0
- package/dist/.templates/vargos/workspace/MEMORY.md +15 -0
- package/dist/.templates/vargos/workspace/SOUL.md +51 -0
- package/dist/.templates/vargos/workspace/TOOLS.md +36 -0
- package/dist/cli/onboard.d.ts +10 -0
- package/dist/cli/onboard.d.ts.map +1 -0
- package/dist/cli/onboard.js +207 -0
- package/dist/cli/onboard.js.map +1 -0
- package/dist/cli.d.ts +13 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +118 -0
- package/dist/cli.js.map +1 -0
- package/dist/edge/mcp/index.d.ts +33 -0
- package/dist/edge/mcp/index.d.ts.map +1 -0
- package/dist/edge/mcp/index.js +217 -0
- package/dist/edge/mcp/index.js.map +1 -0
- package/dist/edge/webhooks/index.d.ts +33 -0
- package/dist/edge/webhooks/index.d.ts.map +1 -0
- package/dist/edge/webhooks/index.js +231 -0
- package/dist/edge/webhooks/index.js.map +1 -0
- package/dist/edge/webhooks/transform.d.ts +8 -0
- package/dist/edge/webhooks/transform.d.ts.map +1 -0
- package/dist/edge/webhooks/transform.js +29 -0
- package/dist/edge/webhooks/transform.js.map +1 -0
- package/dist/gateway/bus.d.ts +48 -0
- package/dist/gateway/bus.d.ts.map +1 -0
- package/dist/gateway/bus.js +2 -0
- package/dist/gateway/bus.js.map +1 -0
- package/dist/gateway/decorators.d.ts +40 -0
- package/dist/gateway/decorators.d.ts.map +1 -0
- package/dist/gateway/decorators.js +43 -0
- package/dist/gateway/decorators.js.map +1 -0
- package/dist/gateway/emitter.d.ts +42 -0
- package/dist/gateway/emitter.d.ts.map +1 -0
- package/dist/gateway/emitter.js +259 -0
- package/dist/gateway/emitter.js.map +1 -0
- package/dist/gateway/events.d.ts +343 -0
- package/dist/gateway/events.d.ts.map +1 -0
- package/dist/gateway/events.js +7 -0
- package/dist/gateway/events.js.map +1 -0
- package/dist/gateway/tcp-server.d.ts +7 -0
- package/dist/gateway/tcp-server.d.ts.map +1 -0
- package/dist/gateway/tcp-server.js +115 -0
- package/dist/gateway/tcp-server.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +74 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/async-handlers.d.ts +13 -0
- package/dist/lib/async-handlers.d.ts.map +1 -0
- package/dist/lib/async-handlers.js +6 -0
- package/dist/lib/async-handlers.js.map +1 -0
- package/dist/lib/error-store.d.ts +19 -0
- package/dist/lib/error-store.d.ts.map +1 -0
- package/dist/lib/error-store.js +19 -0
- package/dist/lib/error-store.js.map +1 -0
- package/dist/lib/error.d.ts +11 -0
- package/dist/lib/error.d.ts.map +1 -0
- package/dist/lib/error.js +41 -0
- package/dist/lib/error.js.map +1 -0
- package/dist/lib/frontmatter.d.ts +23 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +136 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/glob.d.ts +14 -0
- package/dist/lib/glob.d.ts.map +1 -0
- package/dist/lib/glob.js +22 -0
- package/dist/lib/glob.js.map +1 -0
- package/dist/lib/heartbeat.d.ts +23 -0
- package/dist/lib/heartbeat.d.ts.map +1 -0
- package/dist/lib/heartbeat.js +62 -0
- package/dist/lib/heartbeat.js.map +1 -0
- package/dist/lib/html.d.ts +8 -0
- package/dist/lib/html.d.ts.map +1 -0
- package/dist/lib/html.js +28 -0
- package/dist/lib/html.js.map +1 -0
- package/dist/lib/http-validate.d.ts +12 -0
- package/dist/lib/http-validate.d.ts.map +1 -0
- package/dist/lib/http-validate.js +11 -0
- package/dist/lib/http-validate.js.map +1 -0
- package/dist/lib/id.d.ts +3 -0
- package/dist/lib/id.d.ts.map +1 -0
- package/dist/lib/id.js +5 -0
- package/dist/lib/id.js.map +1 -0
- package/dist/lib/logger.d.ts +12 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +28 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/media-transcribe.d.ts +57 -0
- package/dist/lib/media-transcribe.d.ts.map +1 -0
- package/dist/lib/media-transcribe.js +98 -0
- package/dist/lib/media-transcribe.js.map +1 -0
- package/dist/lib/media.d.ts +7 -0
- package/dist/lib/media.d.ts.map +1 -0
- package/dist/lib/media.js +18 -0
- package/dist/lib/media.js.map +1 -0
- package/dist/lib/mime.d.ts +6 -0
- package/dist/lib/mime.d.ts.map +1 -0
- package/dist/lib/mime.js +71 -0
- package/dist/lib/mime.js.map +1 -0
- package/dist/lib/paginate.d.ts +3 -0
- package/dist/lib/paginate.d.ts.map +1 -0
- package/dist/lib/paginate.js +5 -0
- package/dist/lib/paginate.js.map +1 -0
- package/dist/lib/paths.d.ts +14 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/paths.js +29 -0
- package/dist/lib/paths.js.map +1 -0
- package/dist/lib/provider-loader.d.ts +10 -0
- package/dist/lib/provider-loader.d.ts.map +1 -0
- package/dist/lib/provider-loader.js +24 -0
- package/dist/lib/provider-loader.js.map +1 -0
- package/dist/lib/retry.d.ts +20 -0
- package/dist/lib/retry.d.ts.map +1 -0
- package/dist/lib/retry.js +40 -0
- package/dist/lib/retry.js.map +1 -0
- package/dist/lib/safe-async.d.ts +27 -0
- package/dist/lib/safe-async.d.ts.map +1 -0
- package/dist/lib/safe-async.js +38 -0
- package/dist/lib/safe-async.js.map +1 -0
- package/dist/lib/skills.d.ts +9 -0
- package/dist/lib/skills.d.ts.map +1 -0
- package/dist/lib/skills.js +15 -0
- package/dist/lib/skills.js.map +1 -0
- package/dist/lib/sleep.d.ts +6 -0
- package/dist/lib/sleep.d.ts.map +1 -0
- package/dist/lib/sleep.js +22 -0
- package/dist/lib/sleep.js.map +1 -0
- package/dist/lib/strip-markdown.d.ts +7 -0
- package/dist/lib/strip-markdown.d.ts.map +1 -0
- package/dist/lib/strip-markdown.js +32 -0
- package/dist/lib/strip-markdown.js.map +1 -0
- package/dist/lib/subagent.d.ts +14 -0
- package/dist/lib/subagent.d.ts.map +1 -0
- package/dist/lib/subagent.js +25 -0
- package/dist/lib/subagent.js.map +1 -0
- package/dist/lib/templates.d.ts +8 -0
- package/dist/lib/templates.d.ts.map +1 -0
- package/dist/lib/templates.js +39 -0
- package/dist/lib/templates.js.map +1 -0
- package/dist/lib/timeout.d.ts +6 -0
- package/dist/lib/timeout.d.ts.map +1 -0
- package/dist/lib/timeout.js +11 -0
- package/dist/lib/timeout.js.map +1 -0
- package/dist/lib/truncate.d.ts +11 -0
- package/dist/lib/truncate.d.ts.map +1 -0
- package/dist/lib/truncate.js +17 -0
- package/dist/lib/truncate.js.map +1 -0
- package/dist/lib/url-expand.d.ts +22 -0
- package/dist/lib/url-expand.d.ts.map +1 -0
- package/dist/lib/url-expand.js +74 -0
- package/dist/lib/url-expand.js.map +1 -0
- package/dist/scripts/migrate-cron-sessions.d.ts +10 -0
- package/dist/scripts/migrate-cron-sessions.d.ts.map +1 -0
- package/dist/scripts/migrate-cron-sessions.js +139 -0
- package/dist/scripts/migrate-cron-sessions.js.map +1 -0
- package/dist/scripts/seed.d.ts +2 -0
- package/dist/scripts/seed.d.ts.map +1 -0
- package/dist/scripts/seed.js +4 -0
- package/dist/scripts/seed.js.map +1 -0
- package/dist/services/agent/directives.d.ts +14 -0
- package/dist/services/agent/directives.d.ts.map +1 -0
- package/dist/services/agent/directives.js +32 -0
- package/dist/services/agent/directives.js.map +1 -0
- package/dist/services/agent/index.d.ts +104 -0
- package/dist/services/agent/index.d.ts.map +1 -0
- package/dist/services/agent/index.js +534 -0
- package/dist/services/agent/index.js.map +1 -0
- package/dist/services/agent/persona.d.ts +15 -0
- package/dist/services/agent/persona.d.ts.map +1 -0
- package/dist/services/agent/persona.js +63 -0
- package/dist/services/agent/persona.js.map +1 -0
- package/dist/services/agent/prompt-interpolate.d.ts +41 -0
- package/dist/services/agent/prompt-interpolate.d.ts.map +1 -0
- package/dist/services/agent/prompt-interpolate.js +102 -0
- package/dist/services/agent/prompt-interpolate.js.map +1 -0
- package/dist/services/agent/schema.d.ts +10 -0
- package/dist/services/agent/schema.d.ts.map +1 -0
- package/dist/services/agent/schema.js +5 -0
- package/dist/services/agent/schema.js.map +1 -0
- package/dist/services/agent/tools.d.ts +26 -0
- package/dist/services/agent/tools.d.ts.map +1 -0
- package/dist/services/agent/tools.js +85 -0
- package/dist/services/agent/tools.js.map +1 -0
- package/dist/services/channels/base-adapter.d.ts +61 -0
- package/dist/services/channels/base-adapter.d.ts.map +1 -0
- package/dist/services/channels/base-adapter.js +181 -0
- package/dist/services/channels/base-adapter.js.map +1 -0
- package/dist/services/channels/contracts.d.ts +75 -0
- package/dist/services/channels/contracts.d.ts.map +1 -0
- package/dist/services/channels/contracts.js +6 -0
- package/dist/services/channels/contracts.js.map +1 -0
- package/dist/services/channels/debounce.d.ts +22 -0
- package/dist/services/channels/debounce.d.ts.map +1 -0
- package/dist/services/channels/debounce.js +53 -0
- package/dist/services/channels/debounce.js.map +1 -0
- package/dist/services/channels/dedupe.d.ts +19 -0
- package/dist/services/channels/dedupe.d.ts.map +1 -0
- package/dist/services/channels/dedupe.js +52 -0
- package/dist/services/channels/dedupe.js.map +1 -0
- package/dist/services/channels/delivery.d.ts +12 -0
- package/dist/services/channels/delivery.d.ts.map +1 -0
- package/dist/services/channels/delivery.js +53 -0
- package/dist/services/channels/delivery.js.map +1 -0
- package/dist/services/channels/index.d.ts +53 -0
- package/dist/services/channels/index.d.ts.map +1 -0
- package/dist/services/channels/index.js +405 -0
- package/dist/services/channels/index.js.map +1 -0
- package/dist/services/channels/link-expand.d.ts +8 -0
- package/dist/services/channels/link-expand.d.ts.map +1 -0
- package/dist/services/channels/link-expand.js +28 -0
- package/dist/services/channels/link-expand.js.map +1 -0
- package/dist/services/channels/media-extract.d.ts +7 -0
- package/dist/services/channels/media-extract.d.ts.map +1 -0
- package/dist/services/channels/media-extract.js +31 -0
- package/dist/services/channels/media-extract.js.map +1 -0
- package/dist/services/channels/pipeline.d.ts +29 -0
- package/dist/services/channels/pipeline.d.ts.map +1 -0
- package/dist/services/channels/pipeline.js +120 -0
- package/dist/services/channels/pipeline.js.map +1 -0
- package/dist/services/channels/provider-loader.d.ts +7 -0
- package/dist/services/channels/provider-loader.d.ts.map +1 -0
- package/dist/services/channels/provider-loader.js +13 -0
- package/dist/services/channels/provider-loader.js.map +1 -0
- package/dist/services/channels/providers/telegram/adapter.d.ts +34 -0
- package/dist/services/channels/providers/telegram/adapter.d.ts.map +1 -0
- package/dist/services/channels/providers/telegram/adapter.js +278 -0
- package/dist/services/channels/providers/telegram/adapter.js.map +1 -0
- package/dist/services/channels/providers/telegram/index.d.ts +11 -0
- package/dist/services/channels/providers/telegram/index.d.ts.map +1 -0
- package/dist/services/channels/providers/telegram/index.js +11 -0
- package/dist/services/channels/providers/telegram/index.js.map +1 -0
- package/dist/services/channels/providers/telegram/normalizer.d.ts +12 -0
- package/dist/services/channels/providers/telegram/normalizer.d.ts.map +1 -0
- package/dist/services/channels/providers/telegram/normalizer.js +50 -0
- package/dist/services/channels/providers/telegram/normalizer.js.map +1 -0
- package/dist/services/channels/providers/telegram/types.d.ts +72 -0
- package/dist/services/channels/providers/telegram/types.d.ts.map +1 -0
- package/dist/services/channels/providers/telegram/types.js +3 -0
- package/dist/services/channels/providers/telegram/types.js.map +1 -0
- package/dist/services/channels/providers/whatsapp/adapter.d.ts +36 -0
- package/dist/services/channels/providers/whatsapp/adapter.d.ts.map +1 -0
- package/dist/services/channels/providers/whatsapp/adapter.js +261 -0
- package/dist/services/channels/providers/whatsapp/adapter.js.map +1 -0
- package/dist/services/channels/providers/whatsapp/index.d.ts +11 -0
- package/dist/services/channels/providers/whatsapp/index.d.ts.map +1 -0
- package/dist/services/channels/providers/whatsapp/index.js +11 -0
- package/dist/services/channels/providers/whatsapp/index.js.map +1 -0
- package/dist/services/channels/providers/whatsapp/normalizer.d.ts +11 -0
- package/dist/services/channels/providers/whatsapp/normalizer.d.ts.map +1 -0
- package/dist/services/channels/providers/whatsapp/normalizer.js +47 -0
- package/dist/services/channels/providers/whatsapp/normalizer.js.map +1 -0
- package/dist/services/channels/providers/whatsapp/session.d.ts +9 -0
- package/dist/services/channels/providers/whatsapp/session.d.ts.map +1 -0
- package/dist/services/channels/providers/whatsapp/session.js +118 -0
- package/dist/services/channels/providers/whatsapp/session.js.map +1 -0
- package/dist/services/channels/providers/whatsapp/types.d.ts +23 -0
- package/dist/services/channels/providers/whatsapp/types.d.ts.map +1 -0
- package/dist/services/channels/providers/whatsapp/types.js +3 -0
- package/dist/services/channels/providers/whatsapp/types.js.map +1 -0
- package/dist/services/channels/reconnect.d.ts +23 -0
- package/dist/services/channels/reconnect.d.ts.map +1 -0
- package/dist/services/channels/reconnect.js +32 -0
- package/dist/services/channels/reconnect.js.map +1 -0
- package/dist/services/channels/status-reactions.d.ts +27 -0
- package/dist/services/channels/status-reactions.d.ts.map +1 -0
- package/dist/services/channels/status-reactions.js +63 -0
- package/dist/services/channels/status-reactions.js.map +1 -0
- package/dist/services/channels/types.d.ts +16 -0
- package/dist/services/channels/types.d.ts.map +1 -0
- package/dist/services/channels/types.js +2 -0
- package/dist/services/channels/types.js.map +1 -0
- package/dist/services/channels/typing-state.d.ts +22 -0
- package/dist/services/channels/typing-state.d.ts.map +1 -0
- package/dist/services/channels/typing-state.js +88 -0
- package/dist/services/channels/typing-state.js.map +1 -0
- package/dist/services/config/index.d.ts +2426 -0
- package/dist/services/config/index.d.ts.map +1 -0
- package/dist/services/config/index.js +232 -0
- package/dist/services/config/index.js.map +1 -0
- package/dist/services/config/schemas/agent.d.ts +720 -0
- package/dist/services/config/schemas/agent.d.ts.map +1 -0
- package/dist/services/config/schemas/agent.js +86 -0
- package/dist/services/config/schemas/agent.js.map +1 -0
- package/dist/services/config/schemas/auth.d.ts +60 -0
- package/dist/services/config/schemas/auth.d.ts.map +1 -0
- package/dist/services/config/schemas/auth.js +18 -0
- package/dist/services/config/schemas/auth.js.map +1 -0
- package/dist/services/config/schemas/channels.d.ts +117 -0
- package/dist/services/config/schemas/channels.d.ts.map +1 -0
- package/dist/services/config/schemas/channels.js +22 -0
- package/dist/services/config/schemas/channels.js.map +1 -0
- package/dist/services/config/schemas/cron.d.ts +97 -0
- package/dist/services/config/schemas/cron.d.ts.map +1 -0
- package/dist/services/config/schemas/cron.js +18 -0
- package/dist/services/config/schemas/cron.js.map +1 -0
- package/dist/services/config/schemas/features.d.ts +43 -0
- package/dist/services/config/schemas/features.d.ts.map +1 -0
- package/dist/services/config/schemas/features.js +20 -0
- package/dist/services/config/schemas/features.js.map +1 -0
- package/dist/services/config/schemas/index.d.ts +24 -0
- package/dist/services/config/schemas/index.d.ts.map +1 -0
- package/dist/services/config/schemas/index.js +24 -0
- package/dist/services/config/schemas/index.js.map +1 -0
- package/dist/services/config/schemas/mcp.d.ts +31 -0
- package/dist/services/config/schemas/mcp.d.ts.map +1 -0
- package/dist/services/config/schemas/mcp.js +39 -0
- package/dist/services/config/schemas/mcp.js.map +1 -0
- package/dist/services/config/schemas/primitives.d.ts +13 -0
- package/dist/services/config/schemas/primitives.d.ts.map +1 -0
- package/dist/services/config/schemas/primitives.js +17 -0
- package/dist/services/config/schemas/primitives.js.map +1 -0
- package/dist/services/config/schemas/providers.d.ts +335 -0
- package/dist/services/config/schemas/providers.d.ts.map +1 -0
- package/dist/services/config/schemas/providers.js +27 -0
- package/dist/services/config/schemas/providers.js.map +1 -0
- package/dist/services/config/schemas/storage.d.ts +16 -0
- package/dist/services/config/schemas/storage.d.ts.map +1 -0
- package/dist/services/config/schemas/storage.js +9 -0
- package/dist/services/config/schemas/storage.js.map +1 -0
- package/dist/services/config/schemas/webhooks.d.ts +25 -0
- package/dist/services/config/schemas/webhooks.d.ts.map +1 -0
- package/dist/services/config/schemas/webhooks.js +12 -0
- package/dist/services/config/schemas/webhooks.js.map +1 -0
- package/dist/services/cron/index.d.ts +50 -0
- package/dist/services/cron/index.d.ts.map +1 -0
- package/dist/services/cron/index.js +460 -0
- package/dist/services/cron/index.js.map +1 -0
- package/dist/services/log/index.d.ts +14 -0
- package/dist/services/log/index.d.ts.map +1 -0
- package/dist/services/log/index.js +137 -0
- package/dist/services/log/index.js.map +1 -0
- package/dist/services/mcp-client/index.d.ts +37 -0
- package/dist/services/mcp-client/index.d.ts.map +1 -0
- package/dist/services/mcp-client/index.js +258 -0
- package/dist/services/mcp-client/index.js.map +1 -0
- package/dist/services/media/extract-document.d.ts +8 -0
- package/dist/services/media/extract-document.d.ts.map +1 -0
- package/dist/services/media/extract-document.js +85 -0
- package/dist/services/media/extract-document.js.map +1 -0
- package/dist/services/media/index.d.ts +21 -0
- package/dist/services/media/index.d.ts.map +1 -0
- package/dist/services/media/index.js +116 -0
- package/dist/services/media/index.js.map +1 -0
- package/dist/services/media/providers/anthropic.d.ts +6 -0
- package/dist/services/media/providers/anthropic.d.ts.map +1 -0
- package/dist/services/media/providers/anthropic.js +38 -0
- package/dist/services/media/providers/anthropic.js.map +1 -0
- package/dist/services/media/providers/index.d.ts +6 -0
- package/dist/services/media/providers/index.d.ts.map +1 -0
- package/dist/services/media/providers/index.js +15 -0
- package/dist/services/media/providers/index.js.map +1 -0
- package/dist/services/media/providers/openai.d.ts +6 -0
- package/dist/services/media/providers/openai.d.ts.map +1 -0
- package/dist/services/media/providers/openai.js +48 -0
- package/dist/services/media/providers/openai.js.map +1 -0
- package/dist/services/media/providers/provider.d.ts +5 -0
- package/dist/services/media/providers/provider.d.ts.map +1 -0
- package/dist/services/media/providers/provider.js +2 -0
- package/dist/services/media/providers/provider.js.map +1 -0
- package/dist/services/memory/chunker.d.ts +7 -0
- package/dist/services/memory/chunker.d.ts.map +1 -0
- package/dist/services/memory/chunker.js +46 -0
- package/dist/services/memory/chunker.js.map +1 -0
- package/dist/services/memory/context.d.ts +68 -0
- package/dist/services/memory/context.d.ts.map +1 -0
- package/dist/services/memory/context.js +223 -0
- package/dist/services/memory/context.js.map +1 -0
- package/dist/services/memory/embedding.d.ts +9 -0
- package/dist/services/memory/embedding.d.ts.map +1 -0
- package/dist/services/memory/embedding.js +49 -0
- package/dist/services/memory/embedding.js.map +1 -0
- package/dist/services/memory/index.d.ts +24 -0
- package/dist/services/memory/index.d.ts.map +1 -0
- package/dist/services/memory/index.js +140 -0
- package/dist/services/memory/index.js.map +1 -0
- package/dist/services/memory/session-indexer.d.ts +5 -0
- package/dist/services/memory/session-indexer.d.ts.map +1 -0
- package/dist/services/memory/session-indexer.js +62 -0
- package/dist/services/memory/session-indexer.js.map +1 -0
- package/dist/services/memory/sqlite-storage.d.ts +23 -0
- package/dist/services/memory/sqlite-storage.d.ts.map +1 -0
- package/dist/services/memory/sqlite-storage.js +75 -0
- package/dist/services/memory/sqlite-storage.js.map +1 -0
- package/dist/services/memory/types.d.ts +31 -0
- package/dist/services/memory/types.d.ts.map +1 -0
- package/dist/services/memory/types.js +2 -0
- package/dist/services/memory/types.js.map +1 -0
- package/dist/services/web/index.d.ts +9 -0
- package/dist/services/web/index.d.ts.map +1 -0
- package/dist/services/web/index.js +101 -0
- package/dist/services/web/index.js.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/vitest.config.js +9 -0
- package/dist/vitest.config.js.map +1 -0
- package/package.json +102 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Contributing to Vargos
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in Vargos.
|
|
4
|
+
|
|
5
|
+
## Issues First
|
|
6
|
+
|
|
7
|
+
Before opening a PR, start with an issue:
|
|
8
|
+
|
|
9
|
+
- **Bug reports** — what happened, what you expected, steps to reproduce
|
|
10
|
+
- **Feature requests** — describe the use case, not just the solution
|
|
11
|
+
- **Questions** — anything unclear about the project
|
|
12
|
+
|
|
13
|
+
[Open an issue](https://github.com/chozzz/vargos/issues)
|
|
14
|
+
|
|
15
|
+
## Branch Workflow
|
|
16
|
+
|
|
17
|
+
- Develop on `dev` or feature branches. **Never commit to `main`.** A pre-push hook blocks `git push origin main`.
|
|
18
|
+
- Open a PR from your branch into `dev` first; the maintainer merges `dev` → `main`.
|
|
19
|
+
- Squash-merge only into `main`. The ruleset rejects merge commits.
|
|
20
|
+
- Required status checks on `main`: `lint-and-typecheck`, `test`, `codeql`.
|
|
21
|
+
- **Do not include `Co-Authored-By` in commit messages** — the commit-msg hook rejects them.
|
|
22
|
+
|
|
23
|
+
## Pull Requests
|
|
24
|
+
|
|
25
|
+
1. **Open an issue first** — propose your idea or bugfix before writing code
|
|
26
|
+
2. **Wait for feedback** — we'll discuss scope and approach
|
|
27
|
+
3. **Keep it focused** — small, single-purpose PRs are easier to review
|
|
28
|
+
4. **Test your changes** — run `pnpm run test:run` and `pnpm run typecheck`
|
|
29
|
+
|
|
30
|
+
## Code Style
|
|
31
|
+
|
|
32
|
+
- TypeScript with ESM (`.js` extensions on imports)
|
|
33
|
+
- Fewer lines is better — delete before extending
|
|
34
|
+
- Test at service boundaries, not implementation details
|
|
35
|
+
- Follow existing patterns before introducing new ones
|
|
36
|
+
- No `console.log` — use `createLogger('service-name')` which emits to `log.onLog`
|
|
37
|
+
- **Domain boundaries** are enforced by ESLint (`no-restricted-imports`). Services communicate only via `bus.call()` / `bus.emit()` — no direct cross-domain imports.
|
|
38
|
+
- Bootstrap files (`AGENTS.md`, `SOUL.md`, `TOOLS.md`) are head/tail-truncated to 6K chars each — design prompts to survive that.
|
|
39
|
+
|
|
40
|
+
## Running Tests
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pnpm test # Watch mode
|
|
44
|
+
pnpm run test:run # Single run
|
|
45
|
+
pnpm run typecheck # TypeScript check
|
|
46
|
+
pnpm lint # ESLint + typecheck
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## More Details
|
|
50
|
+
|
|
51
|
+
For deeper understanding of the project:
|
|
52
|
+
|
|
53
|
+
- [Architecture Deep Dive](./docs/architecture/bus-design.md) — Event bus design, service patterns
|
|
54
|
+
- [Channels Design](./docs/architecture/channels-design.md) — Channel provider architecture
|
|
55
|
+
- [API Reference](./docs/api-reference.md) — Complete bus RPC reference
|
|
56
|
+
- [Debugging](./docs/debugging.md) — Debug modes and logging
|
|
57
|
+
|
|
58
|
+
## Project Status
|
|
59
|
+
|
|
60
|
+
- [FEATURES.md](./FEATURES.md) — feature inventory + known limitations
|
|
61
|
+
- [docs/ROADMAP.md](./docs/ROADMAP.md) — planned work
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
By contributing, you agree that your contributions will be licensed under the [Apache-2.0 License](./LICENSE).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2025 Vadi Taslim
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Vargos
|
|
2
|
+
|
|
3
|
+
**Self-hosted agent OS.** Give any LLM persistent memory, multi-channel presence, tools, scheduling, and sub-agent orchestration — all on your hardware.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
- **Any LLM** — Anthropic, OpenAI, Google, OpenRouter, Ollama, LM Studio, Groq, Together, DeepSeek, Mistral, Fireworks, Perplexity
|
|
8
|
+
- **Multi-channel presence** — connect WhatsApp and Telegram bots, route messages to the agent
|
|
9
|
+
- **Automatic tool discovery** — every service feature becomes available as an agent tool
|
|
10
|
+
- **MCP integration** — expose your agent's tools to other applications, connect external tool servers
|
|
11
|
+
- **Persistent memory** — vector + keyword search across workspace files and conversation history
|
|
12
|
+
- **Scheduled tasks** — run agent tasks on a schedule, send results to channels
|
|
13
|
+
- **Webhooks** — trigger agent tasks from external systems (GitHub, monitoring, etc.)
|
|
14
|
+
- **Subagent delegation** — agents can spawn child agents for parallel or hierarchical work
|
|
15
|
+
- **Media intelligence** — images and audio handled automatically (vision, transcription)
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# npx (no install)
|
|
21
|
+
npx @chozzz/vargos
|
|
22
|
+
|
|
23
|
+
# or clone + run
|
|
24
|
+
git clone https://github.com/chozzz/vargos.git
|
|
25
|
+
cd vargos
|
|
26
|
+
pnpm install
|
|
27
|
+
pnpm start
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
First run launches an interactive setup wizard (provider, model, API key). Config is saved to `~/.vargos/`.
|
|
31
|
+
|
|
32
|
+
After setup: `vargos start` boots the server, `vargos onboard` re-runs the wizard, `vargos config` shows current settings.
|
|
33
|
+
|
|
34
|
+
## Architecture
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
┌──────────────────────────────────────┐
|
|
38
|
+
│ Gateway (EventEmitterBus + TCP) │
|
|
39
|
+
└────────────┬─────────────────────────┘
|
|
40
|
+
│
|
|
41
|
+
┌───────────────────────┼────────────────────────┐
|
|
42
|
+
│ │ │
|
|
43
|
+
↓ ↓ ↓
|
|
44
|
+
┌─────────┐ ┌──────────┐ ┌────────────┐
|
|
45
|
+
│ Config │ │ Agent │ │ CLI │
|
|
46
|
+
│ Log │ │ Channels │ │ External │
|
|
47
|
+
│ Memory │ │ Cron │ │ Clients │
|
|
48
|
+
└─────────┘ └──────────┘ └────────────┘
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Services are isolated — no shared state, communication only through internal APIs. This makes Vargos reliable and easy to extend.
|
|
52
|
+
|
|
53
|
+
## Key Concepts
|
|
54
|
+
|
|
55
|
+
- **Agent** — An AI system that reads instructions, sees available tools, and decides what to do to help you
|
|
56
|
+
- **Channel** — A messaging platform (WhatsApp, Telegram) where users can talk to the agent
|
|
57
|
+
- **System prompt** — Instructions that tell the agent how to behave (merged from `AGENTS.md`, `SOUL.md`, `TOOLS.md` in your workspace + per-channel persona files)
|
|
58
|
+
- **Session** — A conversation thread with one user; Vargos remembers previous messages
|
|
59
|
+
- **Tool** — A capability the agent can use (read a file, run code, fetch a URL, send a message)
|
|
60
|
+
- **Workspace** — Your project folder where Vargos stores instructions, skills, and conversation history
|
|
61
|
+
|
|
62
|
+
### Message Handling
|
|
63
|
+
|
|
64
|
+
Messages go through a simple pipeline: **receive → process → execute → respond**. The agent has access to all Vargos tools and your workspace context. See [Channels](./docs/usage/channels.md) for details.
|
|
65
|
+
|
|
66
|
+
## Documentation
|
|
67
|
+
|
|
68
|
+
| Doc | Description |
|
|
69
|
+
|-----|-------------|
|
|
70
|
+
| [Getting Started](./docs/getting-started.md) | Install, first run, config wizard |
|
|
71
|
+
| [Configuration](./docs/configuration.md) | Full config reference |
|
|
72
|
+
| [Channels](./docs/usage/channels.md) | WhatsApp and Telegram setup |
|
|
73
|
+
| [MCP](./docs/usage/mcp.md) | MCP server and client integration |
|
|
74
|
+
| [Sessions](./docs/usage/sessions.md) | Session types and lifecycle |
|
|
75
|
+
| [Runtime](./docs/usage/runtime.md) | How agents execute |
|
|
76
|
+
| [Workspace Files](./docs/usage/workspace-files.md) | AGENTS.md, SOUL.md, TOOLS.md reference |
|
|
77
|
+
| [Troubleshooting](./docs/usage/troubleshooting.md) | Common issues and fixes |
|
|
78
|
+
| [Roadmap](./docs/ROADMAP.md) | Planned features |
|
|
79
|
+
|
|
80
|
+
### Examples
|
|
81
|
+
|
|
82
|
+
- [MCP Integration](./docs/examples/mcp-integration.md) — Connect external tool servers
|
|
83
|
+
- [Scheduled Research](./docs/examples/scheduled-research.md) — Daily reports via cron
|
|
84
|
+
- [Multi-Channel Presence](./docs/examples/multi-channel-presence.md) — WhatsApp + Telegram + CLI
|
|
85
|
+
- [Architecture Deep Dive](./docs/architecture/bus-design.md) — Event bus patterns
|
|
86
|
+
- [Extending](./docs/extending/) — Tools, skills, providers
|
|
87
|
+
|
|
88
|
+
## Usage
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
vargos # First-run wizard or help
|
|
92
|
+
vargos start # Boot the server (gateway + all services)
|
|
93
|
+
vargos onboard # Re-run setup wizard
|
|
94
|
+
vargos config # Show current configuration
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Development
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pnpm install # Install deps
|
|
101
|
+
pnpm start # Start gateway + all services (alias: vargos start)
|
|
102
|
+
pnpm chat # Pi SDK interactive REPL bound to ~/.vargos/agent
|
|
103
|
+
pnpm seed # Re-seed .templates/vargos/ → ~/.vargos/ (idempotent)
|
|
104
|
+
pnpm cli # Run the CLI entrypoint directly (tsx cli.ts)
|
|
105
|
+
pnpm test # Tests (watch mode)
|
|
106
|
+
pnpm run test:run # Tests (single run)
|
|
107
|
+
pnpm run typecheck # TypeScript check
|
|
108
|
+
pnpm lint # ESLint + typecheck
|
|
109
|
+
pnpm build # Clean + compile + copy templates → dist/
|
|
110
|
+
|
|
111
|
+
## Contributing
|
|
112
|
+
|
|
113
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for architecture details, event reference, and development guidelines.
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
[Apache-2.0](./LICENSE)
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Only the latest release receives security updates.
|
|
6
|
+
|
|
7
|
+
## Reporting a Vulnerability
|
|
8
|
+
|
|
9
|
+
Vargos handles API keys, auth tokens, and personal data. If you discover a security issue, please report it responsibly:
|
|
10
|
+
|
|
11
|
+
1. **Do not** open a public issue.
|
|
12
|
+
2. Use [GitHub Security Advisories](https://github.com/chozzz/vargos/security/advisories/new) to file a private report.
|
|
13
|
+
3. Include steps to reproduce if possible.
|
|
14
|
+
4. We will respond within 48 hours.
|
|
15
|
+
|
|
16
|
+
## What We Consider Security Issues
|
|
17
|
+
|
|
18
|
+
- API key leakage in logs or error messages
|
|
19
|
+
- Authentication bypass in gateway or channels
|
|
20
|
+
- Path traversal in file operations
|
|
21
|
+
- Remote code execution via webhooks or MCP
|
|
22
|
+
- Credential exposure in config or sessions
|
|
23
|
+
- Whitelist (`channel.allowFrom`) bypass — sending agent commands as a non-allowed user
|
|
24
|
+
- Persona file (`~/.vargos/agents/<id>.md`) injection that bypasses configured `allowedTools`
|
|
25
|
+
|
|
26
|
+
## What Is Not a Security Issue
|
|
27
|
+
|
|
28
|
+
- Dependency vulnerabilities (open a regular issue instead)
|
|
29
|
+
- Denial of service via rate limiting (this is expected behavior)
|
|
30
|
+
- Social engineering attacks against the user
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$delete": [],
|
|
3
|
+
"system": [
|
|
4
|
+
{
|
|
5
|
+
"type": "text",
|
|
6
|
+
"text": "x-anthropic-billing-header: cc_version=2.1.128.f9a; cc_entrypoint=cli; cch=d7aea;"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"type": "text",
|
|
10
|
+
"text": "You are Claude Code, Anthropic's official CLI for Claude."
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"metadata": {
|
|
14
|
+
"user_id": "{\"device_id\":\"ad2cf8e99a031135d1807fdb302047d8ffbfe4175ed57233c353f1954319645b\",\"account_uuid\":\"c128bcc0-fda2-4388-8210-16e9d5bca3ee\",\"session_id\":\"44ddb21a-2d78-4d07-a0ef-f2e1ed8d00c0\"}"
|
|
15
|
+
},
|
|
16
|
+
"max_tokens": 64000,
|
|
17
|
+
"thinking": {
|
|
18
|
+
"type": "adaptive"
|
|
19
|
+
},
|
|
20
|
+
"context_management": {
|
|
21
|
+
"edits": [
|
|
22
|
+
{
|
|
23
|
+
"type": "clear_thinking_20251015",
|
|
24
|
+
"keep": "all"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"output_config": {
|
|
29
|
+
"effort": "xhigh"
|
|
30
|
+
},
|
|
31
|
+
"diagnostics": {
|
|
32
|
+
"previous_message_id": null
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
7
|
+
|
|
8
|
+
type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue };
|
|
9
|
+
type JsonObject = { [key: string]: JsonValue };
|
|
10
|
+
|
|
11
|
+
function isObject(value: unknown): value is JsonObject {
|
|
12
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function deepMerge(base: JsonValue, patch: JsonValue): JsonValue {
|
|
16
|
+
if (!isObject(base) || !isObject(patch)) return patch;
|
|
17
|
+
const merged: JsonObject = { ...base };
|
|
18
|
+
for (const [key, patchValue] of Object.entries(patch)) {
|
|
19
|
+
const baseValue = merged[key];
|
|
20
|
+
if (isObject(baseValue) && isObject(patchValue)) {
|
|
21
|
+
merged[key] = deepMerge(baseValue, patchValue);
|
|
22
|
+
} else {
|
|
23
|
+
merged[key] = patchValue;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return merged;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function loadPatch(patchPath: string): JsonObject | undefined {
|
|
30
|
+
if (!existsSync(patchPath)) return undefined;
|
|
31
|
+
try {
|
|
32
|
+
const raw = readFileSync(patchPath, "utf8");
|
|
33
|
+
const parsed = JSON.parse(raw) as unknown;
|
|
34
|
+
if (!isObject(parsed)) return undefined;
|
|
35
|
+
return parsed;
|
|
36
|
+
} catch {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default function anthropicCustomPayloadPatch(pi: ExtensionAPI) {
|
|
42
|
+
const patchPath = join(process.env.HOME ?? "", ".vargos", "agent", "extensions", "anthropic-custom-payload.patch.json");
|
|
43
|
+
|
|
44
|
+
pi.on("before_provider_request", (event, ctx) => {
|
|
45
|
+
if (!isObject(event.payload)) return;
|
|
46
|
+
const provider = event.payload["provider"];
|
|
47
|
+
const modelInPayload = event.payload["model"];
|
|
48
|
+
const modelProvider = ctx.model?.provider;
|
|
49
|
+
|
|
50
|
+
// Prefer ctx.model (authoritative). Payload may omit provider.
|
|
51
|
+
const isAnthropicRequest =
|
|
52
|
+
modelProvider === "anthropic-custom" ||
|
|
53
|
+
(typeof provider === "string" && provider === "anthropic-custom") ||
|
|
54
|
+
(typeof modelInPayload === "string" && modelInPayload.toLowerCase().includes("claude"));
|
|
55
|
+
if (!isAnthropicRequest) return;
|
|
56
|
+
|
|
57
|
+
const patch = loadPatch(patchPath);
|
|
58
|
+
if (!patch) return;
|
|
59
|
+
|
|
60
|
+
const patchDeletes = Array.isArray(patch["$delete"])
|
|
61
|
+
? patch["$delete"].filter((k): k is string => typeof k === "string")
|
|
62
|
+
: [];
|
|
63
|
+
|
|
64
|
+
const { $delete: _delete, ...patchWithoutDelete } = patch;
|
|
65
|
+
const merged = deepMerge(event.payload, patchWithoutDelete);
|
|
66
|
+
if (!isObject(merged)) return merged;
|
|
67
|
+
|
|
68
|
+
for (const key of patchDeletes) {
|
|
69
|
+
delete merged[key];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return merged;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vargos-skill-creator
|
|
3
|
+
description: Use when the user wants to create or update a skill — a SKILL.md plus optional scripts/references/assets that extends the agent with procedural knowledge for a specific domain.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# VARGOS Skill Creator
|
|
7
|
+
|
|
8
|
+
Skills give the agent procedural knowledge keyed to conversational triggers — so repeated tasks finish faster with less back-and-forth. A skill can be a lone SKILL.md prompt, a single script, a wrapped open-source repo, or the full tree below; pick the smallest form that does the job.
|
|
9
|
+
|
|
10
|
+
They live in `~/.vargos/agent/skills/<name>/` and auto-load into VARGOS; other orchestrators can discover the same directory.
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
- **Concise.** The agent is already smart. Add only what it doesn't know. Every line must earn its tokens.
|
|
15
|
+
- **Progressive disclosure.** Frontmatter (`name` + `description`) is always loaded; body loads on trigger; bundled files load on demand.
|
|
16
|
+
- **Imperative body.** No "When to use" section — that's the description's job.
|
|
17
|
+
- **Match freedom to fragility.** Prose for open-ended work, parameterised scripts for repeatable patterns, exact scripts for fragile sequences.
|
|
18
|
+
|
|
19
|
+
## Layout
|
|
20
|
+
|
|
21
|
+
Maximal form — drop anything you don't need:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
<skill-name>/
|
|
25
|
+
├── SKILL.md required
|
|
26
|
+
├── scripts/ optional — executable, deterministic
|
|
27
|
+
├── references/ optional — loaded on demand (TOC if >100 lines)
|
|
28
|
+
└── assets/ optional — copied into output (templates, boilerplate)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Skip `README.md`, `CHANGELOG.md`, etc. Skills are agent-facing.
|
|
32
|
+
|
|
33
|
+
## Frontmatter
|
|
34
|
+
|
|
35
|
+
Only `name` and `description`. The description is the trigger — state what + when.
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
---
|
|
39
|
+
name: pdf-editor
|
|
40
|
+
description: Edit, rotate, merge, split PDFs. Use when the user asks to modify PDF content or rearrange pages.
|
|
41
|
+
---
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Scripts
|
|
45
|
+
|
|
46
|
+
Shebang, `set -euo pipefail` (bash), header with purpose/inputs/outputs, idempotent, <80 lines.
|
|
47
|
+
|
|
48
|
+
## Workflow
|
|
49
|
+
|
|
50
|
+
1. Get 3–5 concrete user requests the skill must handle.
|
|
51
|
+
2. Identify shared scripts/references/assets across them.
|
|
52
|
+
3. `mkdir -p <root>/skills/<name>` plus only the subdirs you'll use.
|
|
53
|
+
4. Write SKILL.md — frontmatter, then imperative body, reference bundled files by relative path.
|
|
54
|
+
5. Test scripts by running them. Iterate from real use.
|
|
55
|
+
|
|
56
|
+
## Naming
|
|
57
|
+
|
|
58
|
+
Lowercase kebab-case. Directory name == `name` field. Singular noun (domain) or verb (action).
|
|
59
|
+
|
|
60
|
+
## Minimal example
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
git-tidy/
|
|
64
|
+
├── SKILL.md
|
|
65
|
+
└── scripts/prune-merged.sh
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
---
|
|
70
|
+
name: git-tidy
|
|
71
|
+
description: Clean up merged local git branches. Use when the user asks to prune stale branches.
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
# git-tidy
|
|
75
|
+
|
|
76
|
+
Run `scripts/prune-merged.sh` from the repo root. Pass `--squashed` (with user confirmation) for branches whose PRs were squash-merged.
|
|
77
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: token-capture
|
|
3
|
+
description: Capture and print the bearer token used by Claude API calls. Use when the user wants to automate extracting the Authorization token from requests to /v1/messages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Claude Bearer Token
|
|
7
|
+
|
|
8
|
+
Run `scripts/capture-bearer-token.sh` to perform the full flow:
|
|
9
|
+
|
|
10
|
+
1. Start a local mitm proxy on port `9121` by default (override with `-p` or `PORT`).
|
|
11
|
+
2. Run `claude -p "<prompt>"` with `HTTP_PROXY/HTTPS_PROXY` and `NODE_TLS_REJECT_UNAUTHORIZED=0`.
|
|
12
|
+
3. Capture the `Authorization` header from `/v1/messages`.
|
|
13
|
+
4. Print only the bearer token value.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
~/.vargos/agent/skills/token-capture/scripts/capture-bearer-token.sh "hello"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
~/.vargos/agent/skills/token-capture/scripts/capture-bearer-token.sh -v -p 9121 "hello"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Options:
|
|
26
|
+
|
|
27
|
+
- `-v` verbose logs (stderr)
|
|
28
|
+
- `-p <port>` proxy port (default: `9121`)
|
|
29
|
+
|
|
30
|
+
Optional env vars:
|
|
31
|
+
|
|
32
|
+
- `PORT` (default: `9121`)
|
|
33
|
+
- `TIMEOUT_SECONDS` (default: `30`)
|