xerxes-agent 0.2.0__py3-none-any.whl
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.
- xerxes/__init__.py +210 -0
- xerxes/__main__.py +188 -0
- xerxes/_compat_shims.py +38 -0
- xerxes/acp/__init__.py +39 -0
- xerxes/acp/events.py +123 -0
- xerxes/acp/permissions.py +124 -0
- xerxes/acp/registry.py +69 -0
- xerxes/acp/server.py +221 -0
- xerxes/acp/session.py +107 -0
- xerxes/agents/__init__.py +59 -0
- xerxes/agents/_coder_agent.py +57 -0
- xerxes/agents/_data_analyst_agent.py +60 -0
- xerxes/agents/_planner_agent.py +59 -0
- xerxes/agents/_researcher_agent.py +62 -0
- xerxes/agents/agentspec.py +399 -0
- xerxes/agents/auto_compact_agent.py +119 -0
- xerxes/agents/compaction_agent.py +180 -0
- xerxes/agents/default/agent.yaml +33 -0
- xerxes/agents/default/coder.yaml +28 -0
- xerxes/agents/default/planner.yaml +34 -0
- xerxes/agents/default/researcher.yaml +29 -0
- xerxes/agents/default/system.md +63 -0
- xerxes/agents/definitions.py +470 -0
- xerxes/agents/profile_agent.py +218 -0
- xerxes/agents/subagent_manager.py +737 -0
- xerxes/api_server/__init__.py +29 -0
- xerxes/api_server/completion_service.py +204 -0
- xerxes/api_server/converters.py +50 -0
- xerxes/api_server/cortex_completion_service.py +465 -0
- xerxes/api_server/models.py +61 -0
- xerxes/api_server/routers.py +275 -0
- xerxes/api_server/server.py +225 -0
- xerxes/audit/__init__.py +80 -0
- xerxes/audit/collector.py +145 -0
- xerxes/audit/emitter.py +443 -0
- xerxes/audit/events.py +323 -0
- xerxes/audit/otel_exporter.py +233 -0
- xerxes/auth/__init__.py +34 -0
- xerxes/auth/oauth.py +133 -0
- xerxes/auth/storage.py +119 -0
- xerxes/bridge/__init__.py +22 -0
- xerxes/bridge/__main__.py +21 -0
- xerxes/bridge/commands.py +202 -0
- xerxes/bridge/profiles.py +253 -0
- xerxes/bridge/server.py +2702 -0
- xerxes/channels/__init__.py +46 -0
- xerxes/channels/_helpers.py +259 -0
- xerxes/channels/adapters/__init__.py +50 -0
- xerxes/channels/adapters/bluebubbles.py +102 -0
- xerxes/channels/adapters/dingtalk.py +89 -0
- xerxes/channels/adapters/discord.py +96 -0
- xerxes/channels/adapters/email_imap.py +142 -0
- xerxes/channels/adapters/feishu.py +138 -0
- xerxes/channels/adapters/home_assistant.py +112 -0
- xerxes/channels/adapters/matrix.py +107 -0
- xerxes/channels/adapters/mattermost.py +96 -0
- xerxes/channels/adapters/signal.py +104 -0
- xerxes/channels/adapters/slack.py +230 -0
- xerxes/channels/adapters/sms.py +112 -0
- xerxes/channels/adapters/telegram.py +156 -0
- xerxes/channels/adapters/wecom.py +124 -0
- xerxes/channels/adapters/whatsapp.py +114 -0
- xerxes/channels/base.py +71 -0
- xerxes/channels/identity.py +259 -0
- xerxes/channels/identity_hashing.py +78 -0
- xerxes/channels/oauth.py +452 -0
- xerxes/channels/registry.py +215 -0
- xerxes/channels/session_reset.py +103 -0
- xerxes/channels/sticker_cache.py +162 -0
- xerxes/channels/telegram_gateway.py +951 -0
- xerxes/channels/types.py +86 -0
- xerxes/channels/webhooks.py +105 -0
- xerxes/channels/workspace.py +228 -0
- xerxes/channels/workspace_import.py +147 -0
- xerxes/context/__init__.py +77 -0
- xerxes/context/advanced_compressor.py +375 -0
- xerxes/context/compaction_strategies.py +538 -0
- xerxes/context/compressor.py +279 -0
- xerxes/context/token_counter.py +210 -0
- xerxes/context/tool_result_pruner.py +137 -0
- xerxes/context/tool_result_storage.py +172 -0
- xerxes/core/__init__.py +99 -0
- xerxes/core/basics.py +81 -0
- xerxes/core/config.py +338 -0
- xerxes/core/errors.py +141 -0
- xerxes/core/multimodal.py +97 -0
- xerxes/core/paths.py +43 -0
- xerxes/core/prompt_template.py +77 -0
- xerxes/core/streamer_buffer.py +123 -0
- xerxes/core/utils.py +254 -0
- xerxes/cortex/__init__.py +54 -0
- xerxes/cortex/agents/__init__.py +30 -0
- xerxes/cortex/agents/agent.py +1422 -0
- xerxes/cortex/agents/memory_integration.py +282 -0
- xerxes/cortex/agents/universal_agent.py +300 -0
- xerxes/cortex/core/__init__.py +33 -0
- xerxes/cortex/core/enums.py +48 -0
- xerxes/cortex/core/string_utils.py +115 -0
- xerxes/cortex/core/templates.py +423 -0
- xerxes/cortex/core/tool.py +95 -0
- xerxes/cortex/orchestration/__init__.py +43 -0
- xerxes/cortex/orchestration/cortex.py +1325 -0
- xerxes/cortex/orchestration/dynamic.py +361 -0
- xerxes/cortex/orchestration/planner.py +546 -0
- xerxes/cortex/orchestration/task.py +924 -0
- xerxes/cortex/orchestration/task_creator.py +518 -0
- xerxes/cron/__init__.py +36 -0
- xerxes/cron/delivery.py +84 -0
- xerxes/cron/jobs.py +246 -0
- xerxes/cron/scheduler.py +149 -0
- xerxes/daemon/__init__.py +21 -0
- xerxes/daemon/__main__.py +21 -0
- xerxes/daemon/channels.py +289 -0
- xerxes/daemon/config.py +262 -0
- xerxes/daemon/gateway.py +254 -0
- xerxes/daemon/log.py +89 -0
- xerxes/daemon/runtime.py +970 -0
- xerxes/daemon/server.py +1173 -0
- xerxes/daemon/service.py +199 -0
- xerxes/daemon/socket_channel.py +131 -0
- xerxes/executors.py +1326 -0
- xerxes/extensions/__init__.py +41 -0
- xerxes/extensions/dependency.py +257 -0
- xerxes/extensions/hooks.py +165 -0
- xerxes/extensions/plugins.py +441 -0
- xerxes/extensions/skill_authoring/__init__.py +65 -0
- xerxes/extensions/skill_authoring/drafter.py +208 -0
- xerxes/extensions/skill_authoring/improver.py +152 -0
- xerxes/extensions/skill_authoring/lifecycle.py +231 -0
- xerxes/extensions/skill_authoring/matcher.py +153 -0
- xerxes/extensions/skill_authoring/pipeline.py +179 -0
- xerxes/extensions/skill_authoring/telemetry.py +201 -0
- xerxes/extensions/skill_authoring/tracker.py +219 -0
- xerxes/extensions/skill_authoring/triggers.py +144 -0
- xerxes/extensions/skill_authoring/verifier.py +153 -0
- xerxes/extensions/skill_sources/__init__.py +30 -0
- xerxes/extensions/skill_sources/agentskills_io.py +37 -0
- xerxes/extensions/skill_sources/base.py +71 -0
- xerxes/extensions/skill_sources/github.py +89 -0
- xerxes/extensions/skill_sources/local.py +91 -0
- xerxes/extensions/skill_sources/official.py +77 -0
- xerxes/extensions/skills.py +446 -0
- xerxes/extensions/skills_guard.py +200 -0
- xerxes/extensions/skills_hub.py +453 -0
- xerxes/extensions/skills_sync.py +121 -0
- xerxes/extensions/slash_plugins.py +167 -0
- xerxes/llms/__init__.py +189 -0
- xerxes/llms/anthropic.py +433 -0
- xerxes/llms/base.py +312 -0
- xerxes/llms/compat.py +228 -0
- xerxes/llms/gemini.py +391 -0
- xerxes/llms/ollama.py +378 -0
- xerxes/llms/openai.py +655 -0
- xerxes/llms/registry.py +395 -0
- xerxes/logging/__init__.py +55 -0
- xerxes/logging/console.py +605 -0
- xerxes/logging/structured.py +539 -0
- xerxes/mcp/__init__.py +34 -0
- xerxes/mcp/client.py +548 -0
- xerxes/mcp/integration.py +168 -0
- xerxes/mcp/manager.py +153 -0
- xerxes/mcp/oauth.py +195 -0
- xerxes/mcp/osv.py +183 -0
- xerxes/mcp/reconnect.py +103 -0
- xerxes/mcp/server.py +364 -0
- xerxes/mcp/types.py +122 -0
- xerxes/memory/__init__.py +77 -0
- xerxes/memory/base.py +262 -0
- xerxes/memory/compat.py +377 -0
- xerxes/memory/context_fencing.py +58 -0
- xerxes/memory/contextual_memory.py +287 -0
- xerxes/memory/embedders.py +317 -0
- xerxes/memory/entity_memory.py +345 -0
- xerxes/memory/long_term_memory.py +430 -0
- xerxes/memory/plugins/__init__.py +58 -0
- xerxes/memory/plugins/_base.py +209 -0
- xerxes/memory/plugins/byterover.py +65 -0
- xerxes/memory/plugins/hindsight.py +69 -0
- xerxes/memory/plugins/holographic.py +104 -0
- xerxes/memory/plugins/honcho.py +58 -0
- xerxes/memory/plugins/mem0.py +75 -0
- xerxes/memory/plugins/openviking.py +62 -0
- xerxes/memory/plugins/retaindb.py +98 -0
- xerxes/memory/plugins/supermemory.py +64 -0
- xerxes/memory/provider.py +192 -0
- xerxes/memory/retrieval.py +208 -0
- xerxes/memory/short_term_memory.py +264 -0
- xerxes/memory/storage.py +646 -0
- xerxes/memory/turn_indexer.py +159 -0
- xerxes/memory/user_memory.py +176 -0
- xerxes/memory/user_profile.py +404 -0
- xerxes/memory/vector_storage.py +199 -0
- xerxes/operators/__init__.py +58 -0
- xerxes/operators/browser.py +235 -0
- xerxes/operators/browser_providers/__init__.py +107 -0
- xerxes/operators/browser_providers/browser_use.py +60 -0
- xerxes/operators/browser_providers/browserbase.py +65 -0
- xerxes/operators/browser_providers/camofox.py +60 -0
- xerxes/operators/browser_providers/firecrawl.py +49 -0
- xerxes/operators/browser_providers/local.py +50 -0
- xerxes/operators/config.py +102 -0
- xerxes/operators/helpers.py +58 -0
- xerxes/operators/plans.py +60 -0
- xerxes/operators/pty.py +250 -0
- xerxes/operators/state.py +797 -0
- xerxes/operators/subagents.py +337 -0
- xerxes/operators/types.py +199 -0
- xerxes/operators/user_prompt.py +174 -0
- xerxes/py.typed +0 -0
- xerxes/runtime/__init__.py +88 -0
- xerxes/runtime/agent_memory.py +597 -0
- xerxes/runtime/auxiliary_client.py +191 -0
- xerxes/runtime/background_sessions.py +208 -0
- xerxes/runtime/bootstrap.py +377 -0
- xerxes/runtime/bridge.py +484 -0
- xerxes/runtime/circuit_breaker.py +216 -0
- xerxes/runtime/config_context.py +104 -0
- xerxes/runtime/context.py +684 -0
- xerxes/runtime/cost_tracker.py +241 -0
- xerxes/runtime/distribution.py +188 -0
- xerxes/runtime/doctor.py +219 -0
- xerxes/runtime/error_classifier.py +208 -0
- xerxes/runtime/execution_registry.py +417 -0
- xerxes/runtime/fallback.py +234 -0
- xerxes/runtime/features.py +471 -0
- xerxes/runtime/history.py +146 -0
- xerxes/runtime/insights.py +135 -0
- xerxes/runtime/interrupt.py +120 -0
- xerxes/runtime/iteration_budget.py +115 -0
- xerxes/runtime/loop_detection.py +266 -0
- xerxes/runtime/nudges.py +184 -0
- xerxes/runtime/parity_audit.py +231 -0
- xerxes/runtime/pricing.py +156 -0
- xerxes/runtime/process_registry.py +209 -0
- xerxes/runtime/profiles.py +138 -0
- xerxes/runtime/query_engine.py +389 -0
- xerxes/runtime/rate_limit_tracker.py +199 -0
- xerxes/runtime/resilience.py +230 -0
- xerxes/runtime/session.py +286 -0
- xerxes/runtime/setup_wizard.py +153 -0
- xerxes/runtime/tool_pool.py +152 -0
- xerxes/runtime/transcript.py +171 -0
- xerxes/runtime/update.py +223 -0
- xerxes/security/__init__.py +47 -0
- xerxes/security/approvals.py +150 -0
- xerxes/security/path_security.py +62 -0
- xerxes/security/policy.py +154 -0
- xerxes/security/prompt_scanner.py +122 -0
- xerxes/security/redact.py +139 -0
- xerxes/security/sandbox.py +207 -0
- xerxes/security/sandbox_backends/__init__.py +80 -0
- xerxes/security/sandbox_backends/credential_files.py +86 -0
- xerxes/security/sandbox_backends/daytona_backend.py +76 -0
- xerxes/security/sandbox_backends/docker_backend.py +160 -0
- xerxes/security/sandbox_backends/file_sync.py +91 -0
- xerxes/security/sandbox_backends/modal_backend.py +99 -0
- xerxes/security/sandbox_backends/singularity_backend.py +82 -0
- xerxes/security/sandbox_backends/ssh_backend.py +111 -0
- xerxes/security/sandbox_backends/subprocess_backend.py +139 -0
- xerxes/security/url_safety.py +102 -0
- xerxes/session/__init__.py +66 -0
- xerxes/session/branching.py +84 -0
- xerxes/session/fts_index.py +171 -0
- xerxes/session/index.py +366 -0
- xerxes/session/migrations/__init__.py +88 -0
- xerxes/session/models.py +271 -0
- xerxes/session/replay.py +217 -0
- xerxes/session/snapshot_diff.py +91 -0
- xerxes/session/snapshots.py +192 -0
- xerxes/session/store.py +418 -0
- xerxes/session/summarizer.py +215 -0
- xerxes/session/workspace.py +126 -0
- xerxes/skills/ai-voiceover-with-typed-text-visuals/SKILL.md +25 -0
- xerxes/skills/apple-notes/SKILL.md +90 -0
- xerxes/skills/apple-reminders/SKILL.md +98 -0
- xerxes/skills/architecture-diagram/SKILL.md +129 -0
- xerxes/skills/architecture-diagram/templates/template.html +319 -0
- xerxes/skills/ascii-art/SKILL.md +321 -0
- xerxes/skills/ascii-video/README.md +290 -0
- xerxes/skills/ascii-video/SKILL.md +232 -0
- xerxes/skills/ascii-video/references/architecture.md +802 -0
- xerxes/skills/ascii-video/references/composition.md +892 -0
- xerxes/skills/ascii-video/references/effects.md +1865 -0
- xerxes/skills/ascii-video/references/inputs.md +685 -0
- xerxes/skills/ascii-video/references/optimization.md +688 -0
- xerxes/skills/ascii-video/references/scenes.md +1011 -0
- xerxes/skills/ascii-video/references/shaders.md +1385 -0
- xerxes/skills/ascii-video/references/troubleshooting.md +367 -0
- xerxes/skills/autoresearch/SKILL.md +730 -0
- xerxes/skills/autoresearch/references/autonomous-loop-protocol.md +890 -0
- xerxes/skills/autoresearch/references/core-principles.md +207 -0
- xerxes/skills/autoresearch/references/debug-workflow.md +469 -0
- xerxes/skills/autoresearch/references/fix-workflow.md +682 -0
- xerxes/skills/autoresearch/references/learn-workflow.md +480 -0
- xerxes/skills/autoresearch/references/plan-workflow.md +308 -0
- xerxes/skills/autoresearch/references/predict-workflow.md +751 -0
- xerxes/skills/autoresearch/references/reason-workflow.md +618 -0
- xerxes/skills/autoresearch/references/results-logging.md +171 -0
- xerxes/skills/autoresearch/references/scenario-workflow.md +353 -0
- xerxes/skills/autoresearch/references/security-workflow.md +1000 -0
- xerxes/skills/autoresearch/references/ship-workflow.md +412 -0
- xerxes/skills/claude-code/SKILL.md +744 -0
- xerxes/skills/cloud/modal/SKILL.md +344 -0
- xerxes/skills/cloud/modal/references/advanced-usage.md +503 -0
- xerxes/skills/cloud/modal/references/troubleshooting.md +494 -0
- xerxes/skills/codex/SKILL.md +113 -0
- xerxes/skills/creative-ideation/SKILL.md +147 -0
- xerxes/skills/creative-ideation/references/full-prompt-library.md +110 -0
- xerxes/skills/deepscan/SKILL.md +183 -0
- xerxes/skills/evaluation/lm-evaluation-harness/SKILL.md +493 -0
- xerxes/skills/evaluation/lm-evaluation-harness/references/api-evaluation.md +490 -0
- xerxes/skills/evaluation/lm-evaluation-harness/references/benchmark-guide.md +488 -0
- xerxes/skills/evaluation/lm-evaluation-harness/references/custom-tasks.md +602 -0
- xerxes/skills/evaluation/lm-evaluation-harness/references/distributed-eval.md +519 -0
- xerxes/skills/evaluation/weights-and-biases/SKILL.md +593 -0
- xerxes/skills/evaluation/weights-and-biases/references/artifacts.md +584 -0
- xerxes/skills/evaluation/weights-and-biases/references/integrations.md +700 -0
- xerxes/skills/evaluation/weights-and-biases/references/sweeps.md +847 -0
- xerxes/skills/excalidraw/SKILL.md +194 -0
- xerxes/skills/excalidraw/references/colors.md +44 -0
- xerxes/skills/excalidraw/references/dark-mode.md +68 -0
- xerxes/skills/excalidraw/references/examples.md +141 -0
- xerxes/skills/excalidraw/scripts/upload.py +112 -0
- xerxes/skills/execute-the-ascii-video-skill-now/SKILL.md +49 -0
- xerxes/skills/execute-the-deepscan-skill-now/SKILL.md +42 -0
- xerxes/skills/execute-the-news-read-skill-now/SKILL.md +48 -0
- xerxes/skills/find-nearby/SKILL.md +69 -0
- xerxes/skills/find-nearby/scripts/find_nearby.py +178 -0
- xerxes/skills/findmy/SKILL.md +131 -0
- xerxes/skills/github/codebase-inspection/SKILL.md +115 -0
- xerxes/skills/github/github-auth/SKILL.md +246 -0
- xerxes/skills/github/github-auth/scripts/gh-env.sh +79 -0
- xerxes/skills/github/github-code-review/SKILL.md +480 -0
- xerxes/skills/github/github-code-review/references/review-output-template.md +74 -0
- xerxes/skills/github/github-issues/SKILL.md +369 -0
- xerxes/skills/github/github-issues/templates/bug-report.md +35 -0
- xerxes/skills/github/github-issues/templates/feature-request.md +31 -0
- xerxes/skills/github/github-pr-workflow/SKILL.md +366 -0
- xerxes/skills/github/github-pr-workflow/references/ci-troubleshooting.md +183 -0
- xerxes/skills/github/github-pr-workflow/references/conventional-commits.md +71 -0
- xerxes/skills/github/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
- xerxes/skills/github/github-pr-workflow/templates/pr-body-feature.md +33 -0
- xerxes/skills/github/github-repo-management/SKILL.md +515 -0
- xerxes/skills/github/github-repo-management/references/github-api-cheatsheet.md +161 -0
- xerxes/skills/go-to-documents-projects-spectrax/SKILL.md +29 -0
- xerxes/skills/godmode/SKILL.md +403 -0
- xerxes/skills/godmode/references/jailbreak-templates.md +128 -0
- xerxes/skills/godmode/references/refusal-detection.md +142 -0
- xerxes/skills/godmode/scripts/auto_jailbreak.py +733 -0
- xerxes/skills/godmode/scripts/godmode_race.py +557 -0
- xerxes/skills/godmode/scripts/load_godmode.py +63 -0
- xerxes/skills/godmode/scripts/parseltongue.py +789 -0
- xerxes/skills/himalaya/SKILL.md +278 -0
- xerxes/skills/himalaya/references/configuration.md +184 -0
- xerxes/skills/himalaya/references/message-composition.md +199 -0
- xerxes/skills/huggingface-hub/SKILL.md +80 -0
- xerxes/skills/imessage/SKILL.md +102 -0
- xerxes/skills/inference/gguf/SKILL.md +430 -0
- xerxes/skills/inference/gguf/references/advanced-usage.md +504 -0
- xerxes/skills/inference/gguf/references/troubleshooting.md +442 -0
- xerxes/skills/inference/guidance/SKILL.md +575 -0
- xerxes/skills/inference/guidance/references/backends.md +554 -0
- xerxes/skills/inference/guidance/references/constraints.md +674 -0
- xerxes/skills/inference/guidance/references/examples.md +767 -0
- xerxes/skills/inference/llama-cpp/SKILL.md +261 -0
- xerxes/skills/inference/llama-cpp/references/optimization.md +89 -0
- xerxes/skills/inference/llama-cpp/references/quantization.md +213 -0
- xerxes/skills/inference/llama-cpp/references/server.md +125 -0
- xerxes/skills/inference/obliteratus/SKILL.md +330 -0
- xerxes/skills/inference/obliteratus/references/analysis-modules.md +166 -0
- xerxes/skills/inference/obliteratus/references/methods-guide.md +141 -0
- xerxes/skills/inference/obliteratus/templates/abliteration-config.yaml +33 -0
- xerxes/skills/inference/obliteratus/templates/analysis-study.yaml +40 -0
- xerxes/skills/inference/obliteratus/templates/batch-abliteration.yaml +41 -0
- xerxes/skills/inference/outlines/SKILL.md +655 -0
- xerxes/skills/inference/outlines/references/backends.md +615 -0
- xerxes/skills/inference/outlines/references/examples.md +773 -0
- xerxes/skills/inference/outlines/references/json_generation.md +652 -0
- xerxes/skills/inference/vllm/SKILL.md +367 -0
- xerxes/skills/inference/vllm/references/optimization.md +226 -0
- xerxes/skills/inference/vllm/references/quantization.md +284 -0
- xerxes/skills/inference/vllm/references/server-deployment.md +255 -0
- xerxes/skills/inference/vllm/references/troubleshooting.md +447 -0
- xerxes/skills/jupyter-live-kernel/SKILL.md +171 -0
- xerxes/skills/manim-video/README.md +23 -0
- xerxes/skills/manim-video/SKILL.md +264 -0
- xerxes/skills/manim-video/references/animation-design-thinking.md +161 -0
- xerxes/skills/manim-video/references/animations.md +282 -0
- xerxes/skills/manim-video/references/camera-and-3d.md +135 -0
- xerxes/skills/manim-video/references/decorations.md +202 -0
- xerxes/skills/manim-video/references/equations.md +216 -0
- xerxes/skills/manim-video/references/graphs-and-data.md +163 -0
- xerxes/skills/manim-video/references/mobjects.md +333 -0
- xerxes/skills/manim-video/references/paper-explainer.md +255 -0
- xerxes/skills/manim-video/references/production-quality.md +190 -0
- xerxes/skills/manim-video/references/rendering.md +185 -0
- xerxes/skills/manim-video/references/scene-planning.md +118 -0
- xerxes/skills/manim-video/references/troubleshooting.md +135 -0
- xerxes/skills/manim-video/references/updaters-and-trackers.md +260 -0
- xerxes/skills/manim-video/references/visual-design.md +124 -0
- xerxes/skills/manim-video/scripts/setup.sh +27 -0
- xerxes/skills/mcporter/SKILL.md +122 -0
- xerxes/skills/media/gif-search/SKILL.md +86 -0
- xerxes/skills/media/heartmula/SKILL.md +170 -0
- xerxes/skills/media/songsee/SKILL.md +82 -0
- xerxes/skills/media/youtube-content/SKILL.md +72 -0
- xerxes/skills/media/youtube-content/references/output-formats.md +56 -0
- xerxes/skills/media/youtube-content/scripts/fetch_transcript.py +120 -0
- xerxes/skills/minecraft-modpack-server/SKILL.md +186 -0
- xerxes/skills/models/audiocraft/SKILL.md +567 -0
- xerxes/skills/models/audiocraft/references/advanced-usage.md +666 -0
- xerxes/skills/models/audiocraft/references/troubleshooting.md +504 -0
- xerxes/skills/models/clip/SKILL.md +256 -0
- xerxes/skills/models/clip/references/applications.md +207 -0
- xerxes/skills/models/segment-anything/SKILL.md +503 -0
- xerxes/skills/models/segment-anything/references/advanced-usage.md +589 -0
- xerxes/skills/models/segment-anything/references/troubleshooting.md +484 -0
- xerxes/skills/models/stable-diffusion/SKILL.md +522 -0
- xerxes/skills/models/stable-diffusion/references/advanced-usage.md +716 -0
- xerxes/skills/models/stable-diffusion/references/troubleshooting.md +555 -0
- xerxes/skills/models/whisper/SKILL.md +320 -0
- xerxes/skills/models/whisper/references/languages.md +189 -0
- xerxes/skills/native-mcp/SKILL.md +356 -0
- xerxes/skills/note-taking/obsidian/SKILL.md +66 -0
- xerxes/skills/opencode/SKILL.md +218 -0
- xerxes/skills/openhue/SKILL.md +108 -0
- xerxes/skills/p5js/README.md +64 -0
- xerxes/skills/p5js/SKILL.md +547 -0
- xerxes/skills/p5js/references/animation.md +439 -0
- xerxes/skills/p5js/references/color-systems.md +352 -0
- xerxes/skills/p5js/references/core-api.md +410 -0
- xerxes/skills/p5js/references/export-pipeline.md +566 -0
- xerxes/skills/p5js/references/interaction.md +398 -0
- xerxes/skills/p5js/references/shapes-and-geometry.md +300 -0
- xerxes/skills/p5js/references/troubleshooting.md +532 -0
- xerxes/skills/p5js/references/typography.md +302 -0
- xerxes/skills/p5js/references/visual-effects.md +895 -0
- xerxes/skills/p5js/references/webgl-and-3d.md +423 -0
- xerxes/skills/p5js/scripts/export-frames.js +179 -0
- xerxes/skills/p5js/scripts/render.sh +102 -0
- xerxes/skills/p5js/scripts/serve.sh +30 -0
- xerxes/skills/p5js/scripts/setup.sh +97 -0
- xerxes/skills/p5js/templates/viewer.html +395 -0
- xerxes/skills/plan/SKILL.md +57 -0
- xerxes/skills/pokemon-player/SKILL.md +215 -0
- xerxes/skills/popular-web-designs/SKILL.md +207 -0
- xerxes/skills/popular-web-designs/templates/airbnb.md +259 -0
- xerxes/skills/popular-web-designs/templates/airtable.md +102 -0
- xerxes/skills/popular-web-designs/templates/apple.md +326 -0
- xerxes/skills/popular-web-designs/templates/bmw.md +193 -0
- xerxes/skills/popular-web-designs/templates/cal.md +272 -0
- xerxes/skills/popular-web-designs/templates/claude.md +325 -0
- xerxes/skills/popular-web-designs/templates/clay.md +317 -0
- xerxes/skills/popular-web-designs/templates/clickhouse.md +294 -0
- xerxes/skills/popular-web-designs/templates/cohere.md +279 -0
- xerxes/skills/popular-web-designs/templates/coinbase.md +142 -0
- xerxes/skills/popular-web-designs/templates/composio.md +320 -0
- xerxes/skills/popular-web-designs/templates/cursor.md +322 -0
- xerxes/skills/popular-web-designs/templates/elevenlabs.md +278 -0
- xerxes/skills/popular-web-designs/templates/expo.md +294 -0
- xerxes/skills/popular-web-designs/templates/figma.md +233 -0
- xerxes/skills/popular-web-designs/templates/framer.md +259 -0
- xerxes/skills/popular-web-designs/templates/hashicorp.md +291 -0
- xerxes/skills/popular-web-designs/templates/ibm.md +345 -0
- xerxes/skills/popular-web-designs/templates/intercom.md +159 -0
- xerxes/skills/popular-web-designs/templates/kraken.md +138 -0
- xerxes/skills/popular-web-designs/templates/linear.app.md +380 -0
- xerxes/skills/popular-web-designs/templates/lovable.md +311 -0
- xerxes/skills/popular-web-designs/templates/minimax.md +270 -0
- xerxes/skills/popular-web-designs/templates/mintlify.md +339 -0
- xerxes/skills/popular-web-designs/templates/miro.md +121 -0
- xerxes/skills/popular-web-designs/templates/mistral.ai.md +274 -0
- xerxes/skills/popular-web-designs/templates/mongodb.md +279 -0
- xerxes/skills/popular-web-designs/templates/notion.md +322 -0
- xerxes/skills/popular-web-designs/templates/nvidia.md +306 -0
- xerxes/skills/popular-web-designs/templates/ollama.md +280 -0
- xerxes/skills/popular-web-designs/templates/opencode.ai.md +294 -0
- xerxes/skills/popular-web-designs/templates/pinterest.md +243 -0
- xerxes/skills/popular-web-designs/templates/posthog.md +269 -0
- xerxes/skills/popular-web-designs/templates/raycast.md +281 -0
- xerxes/skills/popular-web-designs/templates/replicate.md +274 -0
- xerxes/skills/popular-web-designs/templates/resend.md +316 -0
- xerxes/skills/popular-web-designs/templates/revolut.md +198 -0
- xerxes/skills/popular-web-designs/templates/runwayml.md +257 -0
- xerxes/skills/popular-web-designs/templates/sanity.md +370 -0
- xerxes/skills/popular-web-designs/templates/sentry.md +275 -0
- xerxes/skills/popular-web-designs/templates/spacex.md +207 -0
- xerxes/skills/popular-web-designs/templates/spotify.md +259 -0
- xerxes/skills/popular-web-designs/templates/stripe.md +335 -0
- xerxes/skills/popular-web-designs/templates/supabase.md +268 -0
- xerxes/skills/popular-web-designs/templates/superhuman.md +265 -0
- xerxes/skills/popular-web-designs/templates/together.ai.md +276 -0
- xerxes/skills/popular-web-designs/templates/uber.md +308 -0
- xerxes/skills/popular-web-designs/templates/vercel.md +323 -0
- xerxes/skills/popular-web-designs/templates/voltagent.md +336 -0
- xerxes/skills/popular-web-designs/templates/warp.md +266 -0
- xerxes/skills/popular-web-designs/templates/webflow.md +105 -0
- xerxes/skills/popular-web-designs/templates/wise.md +186 -0
- xerxes/skills/popular-web-designs/templates/x.ai.md +270 -0
- xerxes/skills/popular-web-designs/templates/zapier.md +341 -0
- xerxes/skills/productivity/google-workspace/SKILL.md +279 -0
- xerxes/skills/productivity/google-workspace/references/gmail-search-syntax.md +63 -0
- xerxes/skills/productivity/google-workspace/scripts/google_api.py +905 -0
- xerxes/skills/productivity/google-workspace/scripts/gws_bridge.py +106 -0
- xerxes/skills/productivity/google-workspace/scripts/setup.py +395 -0
- xerxes/skills/productivity/linear/SKILL.md +297 -0
- xerxes/skills/productivity/nano-pdf/SKILL.md +51 -0
- xerxes/skills/productivity/notion/SKILL.md +171 -0
- xerxes/skills/productivity/notion/references/block-types.md +112 -0
- xerxes/skills/productivity/ocr-and-documents/SKILL.md +171 -0
- xerxes/skills/productivity/ocr-and-documents/scripts/extract_marker.py +105 -0
- xerxes/skills/productivity/ocr-and-documents/scripts/extract_pymupdf.py +128 -0
- xerxes/skills/productivity/powerpoint/LICENSE.txt +30 -0
- xerxes/skills/productivity/powerpoint/SKILL.md +232 -0
- xerxes/skills/productivity/powerpoint/editing.md +205 -0
- xerxes/skills/productivity/powerpoint/pptxgenjs.md +420 -0
- xerxes/skills/productivity/powerpoint/scripts/__init__.py +14 -0
- xerxes/skills/productivity/powerpoint/scripts/add_slide.py +196 -0
- xerxes/skills/productivity/powerpoint/scripts/clean.py +294 -0
- xerxes/skills/productivity/powerpoint/scripts/office/helpers/__init__.py +14 -0
- xerxes/skills/productivity/powerpoint/scripts/office/helpers/merge_runs.py +214 -0
- xerxes/skills/productivity/powerpoint/scripts/office/helpers/simplify_redlines.py +210 -0
- xerxes/skills/productivity/powerpoint/scripts/office/pack.py +170 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-contentTypes.xsd +42 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-coreProperties.xsd +50 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-digSig.xsd +49 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-relationships.xsd +33 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/mce/mc.xsd +75 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- xerxes/skills/research/arxiv/SKILL.md +281 -0
- xerxes/skills/research/arxiv/scripts/search_arxiv.py +134 -0
- xerxes/skills/research/blogwatcher/SKILL.md +136 -0
- xerxes/skills/research/dspy/SKILL.md +593 -0
- xerxes/skills/research/dspy/references/examples.md +663 -0
- xerxes/skills/research/dspy/references/modules.md +475 -0
- xerxes/skills/research/dspy/references/optimizers.md +566 -0
- xerxes/skills/research/llm-wiki/SKILL.md +460 -0
- xerxes/skills/research/polymarket/SKILL.md +76 -0
- xerxes/skills/research/polymarket/references/api-endpoints.md +220 -0
- xerxes/skills/research/polymarket/scripts/polymarket.py +300 -0
- xerxes/skills/research/research-paper-writing/SKILL.md +2375 -0
- xerxes/skills/research/research-paper-writing/references/autoreason-methodology.md +394 -0
- xerxes/skills/research/research-paper-writing/references/checklists.md +434 -0
- xerxes/skills/research/research-paper-writing/references/citation-workflow.md +564 -0
- xerxes/skills/research/research-paper-writing/references/experiment-patterns.md +728 -0
- xerxes/skills/research/research-paper-writing/references/human-evaluation.md +476 -0
- xerxes/skills/research/research-paper-writing/references/paper-types.md +481 -0
- xerxes/skills/research/research-paper-writing/references/reviewer-guidelines.md +433 -0
- xerxes/skills/research/research-paper-writing/references/sources.md +191 -0
- xerxes/skills/research/research-paper-writing/references/writing-guide.md +474 -0
- xerxes/skills/research/research-paper-writing/templates/README.md +251 -0
- xerxes/skills/research/research-paper-writing/templates/aaai2026/README.md +534 -0
- xerxes/skills/research/research-paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
- xerxes/skills/research/research-paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
- xerxes/skills/research/research-paper-writing/templates/aaai2026/aaai2026.bib +111 -0
- xerxes/skills/research/research-paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
- xerxes/skills/research/research-paper-writing/templates/aaai2026/aaai2026.sty +315 -0
- xerxes/skills/research/research-paper-writing/templates/acl/README.md +50 -0
- xerxes/skills/research/research-paper-writing/templates/acl/acl.sty +312 -0
- xerxes/skills/research/research-paper-writing/templates/acl/acl_latex.tex +377 -0
- xerxes/skills/research/research-paper-writing/templates/acl/acl_lualatex.tex +101 -0
- xerxes/skills/research/research-paper-writing/templates/acl/acl_natbib.bst +1940 -0
- xerxes/skills/research/research-paper-writing/templates/acl/anthology.bib.txt +26 -0
- xerxes/skills/research/research-paper-writing/templates/acl/custom.bib +70 -0
- xerxes/skills/research/research-paper-writing/templates/acl/formatting.md +326 -0
- xerxes/skills/research/research-paper-writing/templates/colm2025/README.md +3 -0
- xerxes/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
- xerxes/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
- xerxes/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
- xerxes/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
- xerxes/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
- xerxes/skills/research/research-paper-writing/templates/colm2025/fancyhdr.sty +485 -0
- xerxes/skills/research/research-paper-writing/templates/colm2025/math_commands.tex +508 -0
- xerxes/skills/research/research-paper-writing/templates/colm2025/natbib.sty +1246 -0
- xerxes/skills/research/research-paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
- xerxes/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
- xerxes/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
- xerxes/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
- xerxes/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
- xerxes/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
- xerxes/skills/research/research-paper-writing/templates/iclr2026/math_commands.tex +508 -0
- xerxes/skills/research/research-paper-writing/templates/iclr2026/natbib.sty +1246 -0
- xerxes/skills/research/research-paper-writing/templates/icml2026/algorithm.sty +79 -0
- xerxes/skills/research/research-paper-writing/templates/icml2026/algorithmic.sty +201 -0
- xerxes/skills/research/research-paper-writing/templates/icml2026/example_paper.bib +75 -0
- xerxes/skills/research/research-paper-writing/templates/icml2026/example_paper.pdf +0 -0
- xerxes/skills/research/research-paper-writing/templates/icml2026/example_paper.tex +662 -0
- xerxes/skills/research/research-paper-writing/templates/icml2026/fancyhdr.sty +864 -0
- xerxes/skills/research/research-paper-writing/templates/icml2026/icml2026.bst +1443 -0
- xerxes/skills/research/research-paper-writing/templates/icml2026/icml2026.sty +767 -0
- xerxes/skills/research/research-paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
- xerxes/skills/research/research-paper-writing/templates/neurips2025/Makefile +36 -0
- xerxes/skills/research/research-paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
- xerxes/skills/research/research-paper-writing/templates/neurips2025/main.tex +38 -0
- xerxes/skills/research/research-paper-writing/templates/neurips2025/neurips.sty +382 -0
- xerxes/skills/software-development/plan/SKILL.md +57 -0
- xerxes/skills/software-development/requesting-code-review/SKILL.md +282 -0
- xerxes/skills/software-development/subagent-driven-development/SKILL.md +342 -0
- xerxes/skills/software-development/systematic-debugging/SKILL.md +366 -0
- xerxes/skills/software-development/test-driven-development/SKILL.md +342 -0
- xerxes/skills/software-development/writing-plans/SKILL.md +304 -0
- xerxes/skills/songwriting-and-ai-music/SKILL.md +289 -0
- xerxes/skills/systematic-debugging/SKILL.md +358 -0
- xerxes/skills/training/axolotl/SKILL.md +161 -0
- xerxes/skills/training/axolotl/references/api.md +5548 -0
- xerxes/skills/training/axolotl/references/dataset-formats.md +1029 -0
- xerxes/skills/training/axolotl/references/index.md +15 -0
- xerxes/skills/training/axolotl/references/other.md +3563 -0
- xerxes/skills/training/grpo-rl-training/README.md +97 -0
- xerxes/skills/training/grpo-rl-training/SKILL.md +575 -0
- xerxes/skills/training/grpo-rl-training/templates/basic_grpo_training.py +195 -0
- xerxes/skills/training/peft/SKILL.md +434 -0
- xerxes/skills/training/peft/references/advanced-usage.md +514 -0
- xerxes/skills/training/peft/references/troubleshooting.md +480 -0
- xerxes/skills/training/pytorch-fsdp/SKILL.md +129 -0
- xerxes/skills/training/pytorch-fsdp/references/index.md +7 -0
- xerxes/skills/training/pytorch-fsdp/references/other.md +4261 -0
- xerxes/skills/training/trl-fine-tuning/SKILL.md +458 -0
- xerxes/skills/training/trl-fine-tuning/references/dpo-variants.md +227 -0
- xerxes/skills/training/trl-fine-tuning/references/online-rl.md +82 -0
- xerxes/skills/training/trl-fine-tuning/references/reward-modeling.md +122 -0
- xerxes/skills/training/trl-fine-tuning/references/sft-training.md +168 -0
- xerxes/skills/training/unsloth/SKILL.md +83 -0
- xerxes/skills/training/unsloth/references/index.md +7 -0
- xerxes/skills/training/unsloth/references/llms-full.md +16799 -0
- xerxes/skills/training/unsloth/references/llms-txt.md +12044 -0
- xerxes/skills/training/unsloth/references/llms.md +82 -0
- xerxes/skills/webhook-subscriptions/SKILL.md +180 -0
- xerxes/skills/xerxes-agent/SKILL.md +284 -0
- xerxes/streaming/__init__.py +120 -0
- xerxes/streaming/events.py +208 -0
- xerxes/streaming/loop.py +900 -0
- xerxes/streaming/loop_debug.py +741 -0
- xerxes/streaming/messages.py +284 -0
- xerxes/streaming/parsers/__init__.py +135 -0
- xerxes/streaming/parsers/common.py +103 -0
- xerxes/streaming/parsers/deepseek.py +55 -0
- xerxes/streaming/parsers/glm.py +39 -0
- xerxes/streaming/parsers/kimi.py +29 -0
- xerxes/streaming/parsers/longcat.py +29 -0
- xerxes/streaming/parsers/mistral.py +56 -0
- xerxes/streaming/parsers/qwen.py +39 -0
- xerxes/streaming/permissions.py +224 -0
- xerxes/streaming/prompt_caching.py +98 -0
- xerxes/streaming/responses_api.py +117 -0
- xerxes/streaming/sse.py +142 -0
- xerxes/streaming/tool_call_ids.py +59 -0
- xerxes/streaming/wire_events.py +1006 -0
- xerxes/tools/__init__.py +538 -0
- xerxes/tools/agent_memory_tool.py +145 -0
- xerxes/tools/agent_meta_tools.py +460 -0
- xerxes/tools/ai_tools.py +870 -0
- xerxes/tools/browser_tools.py +809 -0
- xerxes/tools/clarify_tool.py +129 -0
- xerxes/tools/claude_tools.py +1660 -0
- xerxes/tools/coding_tools.py +918 -0
- xerxes/tools/data_tools.py +668 -0
- xerxes/tools/duckduckgo_engine.py +499 -0
- xerxes/tools/google_search.py +451 -0
- xerxes/tools/history_tool.py +130 -0
- xerxes/tools/home_assistant_tools.py +433 -0
- xerxes/tools/image_generation_tool.py +116 -0
- xerxes/tools/math_tools.py +822 -0
- xerxes/tools/media_tools.py +366 -0
- xerxes/tools/memory_crud.py +136 -0
- xerxes/tools/memory_tool.py +593 -0
- xerxes/tools/rl_tools.py +681 -0
- xerxes/tools/send_message_tool.py +101 -0
- xerxes/tools/skill_manage_tool.py +151 -0
- xerxes/tools/standalone.py +316 -0
- xerxes/tools/system_tools.py +672 -0
- xerxes/tools/transcription_tool.py +121 -0
- xerxes/tools/tts_tool.py +190 -0
- xerxes/tools/vision_tool.py +138 -0
- xerxes/tools/voice_mode.py +212 -0
- xerxes/tools/web_tools.py +437 -0
- xerxes/tools/workspace_tools.py +178 -0
- xerxes/training/__init__.py +30 -0
- xerxes/training/batch_runner.py +212 -0
- xerxes/training/rl/__init__.py +42 -0
- xerxes/training/rl/envs.py +108 -0
- xerxes/training/rl/status.py +79 -0
- xerxes/training/rl/tinker_client.py +157 -0
- xerxes/training/rl/wandb_hook.py +70 -0
- xerxes/training/trajectory_compressor.py +172 -0
- xerxes/tui/__init__.py +23 -0
- xerxes/tui/app.py +1146 -0
- xerxes/tui/at_mentions.py +315 -0
- xerxes/tui/banner.py +120 -0
- xerxes/tui/blocks.py +663 -0
- xerxes/tui/clipboard.py +139 -0
- xerxes/tui/clipboard_attach.py +129 -0
- xerxes/tui/console.py +361 -0
- xerxes/tui/context_bar.py +70 -0
- xerxes/tui/engine.py +545 -0
- xerxes/tui/input_buffer.py +138 -0
- xerxes/tui/panel_state.py +194 -0
- xerxes/tui/prompt.py +1107 -0
- xerxes/tui/reasoning_filter.py +141 -0
- xerxes/tui/skin_engine.py +239 -0
- xerxes/tui/status_bar.py +136 -0
- xerxes/tui/tips.py +199 -0
- xerxes/tui/voice_keys.py +160 -0
- xerxes/types/__init__.py +121 -0
- xerxes/types/agent_types.py +387 -0
- xerxes/types/converters.py +162 -0
- xerxes/types/function_execution_types.py +480 -0
- xerxes/types/messages.py +690 -0
- xerxes/types/oai_protocols.py +510 -0
- xerxes/types/tool_calls.py +175 -0
- xerxes/xerxes.py +2297 -0
- xerxes_agent-0.2.0.dist-info/METADATA +593 -0
- xerxes_agent-0.2.0.dist-info/RECORD +749 -0
- xerxes_agent-0.2.0.dist-info/WHEEL +4 -0
- xerxes_agent-0.2.0.dist-info/entry_points.txt +2 -0
- xerxes_agent-0.2.0.dist-info/licenses/LICENSE +201 -0
xerxes/__init__.py
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Copyright 2026 The Xerxes-Agents Author @erfanzar (Erfan Zare Chavoshi).
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""Public surface of the Xerxes-Agents package.
|
|
15
|
+
|
|
16
|
+
Re-exports the core API used by external code and integrators: the
|
|
17
|
+
``Xerxes`` facade, agent orchestration (``Cortex`` and friends), LLM
|
|
18
|
+
provider classes and helpers, MCP integration, memory store types,
|
|
19
|
+
streaming primitives, runtime configuration, and the message/agent
|
|
20
|
+
type system. The ``__all__`` tuple is the authoritative list of names
|
|
21
|
+
considered part of the stable public API.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
from .core import PromptTemplate
|
|
25
|
+
from .core.streamer_buffer import StreamerBuffer
|
|
26
|
+
from .cortex import (
|
|
27
|
+
ChainLink,
|
|
28
|
+
ChainType,
|
|
29
|
+
Cortex,
|
|
30
|
+
CortexAgent,
|
|
31
|
+
CortexMemory,
|
|
32
|
+
CortexOutput,
|
|
33
|
+
CortexTask,
|
|
34
|
+
CortexTaskOutput,
|
|
35
|
+
CortexTool,
|
|
36
|
+
ProcessType,
|
|
37
|
+
)
|
|
38
|
+
from .executors import AgentOrchestrator
|
|
39
|
+
from .llms import (
|
|
40
|
+
COSTS,
|
|
41
|
+
PROVIDERS,
|
|
42
|
+
AnthropicLLM,
|
|
43
|
+
BaseLLM,
|
|
44
|
+
CustomLLM,
|
|
45
|
+
DeepSeekLLM,
|
|
46
|
+
GeminiLLM,
|
|
47
|
+
KimiLLM,
|
|
48
|
+
LLMConfig,
|
|
49
|
+
LMStudioLLM,
|
|
50
|
+
LocalLLM,
|
|
51
|
+
OllamaLLM,
|
|
52
|
+
OpenAICompatLLM,
|
|
53
|
+
OpenAILLM,
|
|
54
|
+
ProviderConfig,
|
|
55
|
+
QwenLLM,
|
|
56
|
+
ZhipuLLM,
|
|
57
|
+
calc_cost,
|
|
58
|
+
create_llm,
|
|
59
|
+
detect_provider,
|
|
60
|
+
get_context_limit,
|
|
61
|
+
list_all_models,
|
|
62
|
+
)
|
|
63
|
+
from .mcp import MCPClient, MCPManager, MCPResource, MCPServerConfig, MCPTool
|
|
64
|
+
from .memory import MemoryEntry, MemoryStore, MemoryType
|
|
65
|
+
from .operators.config import OperatorRuntimeConfig
|
|
66
|
+
from .runtime.features import AgentRuntimeOverrides, RuntimeFeaturesConfig
|
|
67
|
+
from .runtime.profiles import PromptProfile, PromptProfileConfig
|
|
68
|
+
from .streaming import (
|
|
69
|
+
AgentState,
|
|
70
|
+
NeutralMessage,
|
|
71
|
+
PermissionMode,
|
|
72
|
+
PermissionRequest,
|
|
73
|
+
StreamEvent,
|
|
74
|
+
TextChunk,
|
|
75
|
+
ThinkingChunk,
|
|
76
|
+
ToolEnd,
|
|
77
|
+
ToolStart,
|
|
78
|
+
TurnDone,
|
|
79
|
+
check_permission,
|
|
80
|
+
messages_to_anthropic,
|
|
81
|
+
messages_to_openai,
|
|
82
|
+
run_agent_loop,
|
|
83
|
+
)
|
|
84
|
+
from .types import (
|
|
85
|
+
Agent,
|
|
86
|
+
AgentCapability,
|
|
87
|
+
AgentFunction,
|
|
88
|
+
AgentSwitch,
|
|
89
|
+
AgentSwitchTrigger,
|
|
90
|
+
AssistantMessage,
|
|
91
|
+
AssistantMessageType,
|
|
92
|
+
ChatMessageType,
|
|
93
|
+
Completion,
|
|
94
|
+
ExecutionResult,
|
|
95
|
+
ExecutionStatus,
|
|
96
|
+
FunctionCallInfo,
|
|
97
|
+
FunctionCallsExtracted,
|
|
98
|
+
FunctionCallStrategy,
|
|
99
|
+
FunctionDetection,
|
|
100
|
+
FunctionExecutionComplete,
|
|
101
|
+
FunctionExecutionStart,
|
|
102
|
+
MessagesHistory,
|
|
103
|
+
RequestFunctionCall,
|
|
104
|
+
Roles,
|
|
105
|
+
StreamChunk,
|
|
106
|
+
SwitchContext,
|
|
107
|
+
SystemMessage,
|
|
108
|
+
SystemMessageType,
|
|
109
|
+
ToolMessage,
|
|
110
|
+
ToolMessageType,
|
|
111
|
+
UserMessage,
|
|
112
|
+
UserMessageType,
|
|
113
|
+
)
|
|
114
|
+
from .xerxes import Xerxes
|
|
115
|
+
|
|
116
|
+
__all__ = (
|
|
117
|
+
"COSTS",
|
|
118
|
+
"PROVIDERS",
|
|
119
|
+
"Agent",
|
|
120
|
+
"AgentCapability",
|
|
121
|
+
"AgentFunction",
|
|
122
|
+
"AgentOrchestrator",
|
|
123
|
+
"AgentRuntimeOverrides",
|
|
124
|
+
"AgentState",
|
|
125
|
+
"AgentSwitch",
|
|
126
|
+
"AgentSwitchTrigger",
|
|
127
|
+
"AnthropicLLM",
|
|
128
|
+
"AssistantMessage",
|
|
129
|
+
"AssistantMessageType",
|
|
130
|
+
"BaseLLM",
|
|
131
|
+
"ChainLink",
|
|
132
|
+
"ChainType",
|
|
133
|
+
"ChatMessageType",
|
|
134
|
+
"Completion",
|
|
135
|
+
"Cortex",
|
|
136
|
+
"CortexAgent",
|
|
137
|
+
"CortexMemory",
|
|
138
|
+
"CortexOutput",
|
|
139
|
+
"CortexTask",
|
|
140
|
+
"CortexTaskOutput",
|
|
141
|
+
"CortexTool",
|
|
142
|
+
"CustomLLM",
|
|
143
|
+
"DeepSeekLLM",
|
|
144
|
+
"ExecutionResult",
|
|
145
|
+
"ExecutionStatus",
|
|
146
|
+
"FunctionCallInfo",
|
|
147
|
+
"FunctionCallStrategy",
|
|
148
|
+
"FunctionCallsExtracted",
|
|
149
|
+
"FunctionDetection",
|
|
150
|
+
"FunctionExecutionComplete",
|
|
151
|
+
"FunctionExecutionStart",
|
|
152
|
+
"GeminiLLM",
|
|
153
|
+
"KimiLLM",
|
|
154
|
+
"LLMConfig",
|
|
155
|
+
"LMStudioLLM",
|
|
156
|
+
"LocalLLM",
|
|
157
|
+
"MCPClient",
|
|
158
|
+
"MCPManager",
|
|
159
|
+
"MCPResource",
|
|
160
|
+
"MCPServerConfig",
|
|
161
|
+
"MCPTool",
|
|
162
|
+
"MemoryEntry",
|
|
163
|
+
"MemoryStore",
|
|
164
|
+
"MemoryType",
|
|
165
|
+
"MessagesHistory",
|
|
166
|
+
"NeutralMessage",
|
|
167
|
+
"OllamaLLM",
|
|
168
|
+
"OpenAICompatLLM",
|
|
169
|
+
"OpenAILLM",
|
|
170
|
+
"OperatorRuntimeConfig",
|
|
171
|
+
"PermissionMode",
|
|
172
|
+
"PermissionRequest",
|
|
173
|
+
"ProcessType",
|
|
174
|
+
"PromptProfile",
|
|
175
|
+
"PromptProfileConfig",
|
|
176
|
+
"PromptTemplate",
|
|
177
|
+
"ProviderConfig",
|
|
178
|
+
"QwenLLM",
|
|
179
|
+
"RequestFunctionCall",
|
|
180
|
+
"Roles",
|
|
181
|
+
"RuntimeFeaturesConfig",
|
|
182
|
+
"StreamChunk",
|
|
183
|
+
"StreamEvent",
|
|
184
|
+
"StreamerBuffer",
|
|
185
|
+
"SwitchContext",
|
|
186
|
+
"SystemMessage",
|
|
187
|
+
"SystemMessageType",
|
|
188
|
+
"TextChunk",
|
|
189
|
+
"ThinkingChunk",
|
|
190
|
+
"ToolEnd",
|
|
191
|
+
"ToolMessage",
|
|
192
|
+
"ToolMessageType",
|
|
193
|
+
"ToolStart",
|
|
194
|
+
"TurnDone",
|
|
195
|
+
"UserMessage",
|
|
196
|
+
"UserMessageType",
|
|
197
|
+
"Xerxes",
|
|
198
|
+
"ZhipuLLM",
|
|
199
|
+
"calc_cost",
|
|
200
|
+
"check_permission",
|
|
201
|
+
"create_llm",
|
|
202
|
+
"detect_provider",
|
|
203
|
+
"get_context_limit",
|
|
204
|
+
"list_all_models",
|
|
205
|
+
"messages_to_anthropic",
|
|
206
|
+
"messages_to_openai",
|
|
207
|
+
"run_agent_loop",
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
__version__ = "0.2.0"
|
xerxes/__main__.py
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# Copyright 2026 The Xerxes-Agents Author @erfanzar (Erfan Zare Chavoshi).
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""CLI entry point for the ``xerxes`` command.
|
|
15
|
+
|
|
16
|
+
Dispatches between three modes:
|
|
17
|
+
|
|
18
|
+
* ``xerxes telegram ...`` — start the daemon with the Telegram gateway
|
|
19
|
+
enabled (token via flag or ``TELEGRAM_BOT_TOKEN`` env var).
|
|
20
|
+
* One-shot — a prompt provided as positional args or piped on stdin;
|
|
21
|
+
streams assistant text to stdout and exits.
|
|
22
|
+
* Interactive — no prompt and stdin is a tty; launches ``XerxesTUI``.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
from __future__ import annotations
|
|
26
|
+
|
|
27
|
+
import argparse
|
|
28
|
+
import asyncio
|
|
29
|
+
import os
|
|
30
|
+
import sys
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _resolve_one_shot_prompt(
|
|
34
|
+
prompt_parts: list[str],
|
|
35
|
+
*,
|
|
36
|
+
stdin_is_tty: bool,
|
|
37
|
+
stdin_text: str | None = None,
|
|
38
|
+
) -> tuple[str, bool]:
|
|
39
|
+
"""Decide whether to run one-shot and produce the prompt text.
|
|
40
|
+
|
|
41
|
+
Positional CLI args take precedence; if absent, non-tty stdin is
|
|
42
|
+
consumed. Returns ``(prompt, True)`` when the CLI should run
|
|
43
|
+
non-interactively, ``("", False)`` to open the TUI.
|
|
44
|
+
"""
|
|
45
|
+
parts = list(prompt_parts)
|
|
46
|
+
if parts and parts[0] == "--":
|
|
47
|
+
parts = parts[1:]
|
|
48
|
+
if parts:
|
|
49
|
+
return " ".join(parts).strip(), True
|
|
50
|
+
if not stdin_is_tty:
|
|
51
|
+
text = sys.stdin.read() if stdin_text is None else stdin_text
|
|
52
|
+
return text.strip(), True
|
|
53
|
+
return "", False
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
async def _run_one_shot(prompt: str, *, resume_session_id: str = "", mode: str = "code") -> None:
|
|
57
|
+
"""Run one prompt against a spawned daemon and stream text to stdout.
|
|
58
|
+
|
|
59
|
+
Auto-rejects approval requests (no interactive UI) and surfaces
|
|
60
|
+
error notifications on stderr. Returns when ``TurnEnd`` is seen.
|
|
61
|
+
"""
|
|
62
|
+
from .streaming.wire_events import ApprovalRequest, Notification, TextPart, TurnEnd
|
|
63
|
+
from .tui.engine import BridgeClient
|
|
64
|
+
|
|
65
|
+
client = BridgeClient()
|
|
66
|
+
wrote_text = False
|
|
67
|
+
try:
|
|
68
|
+
client.spawn()
|
|
69
|
+
await client.initialize(
|
|
70
|
+
permission_mode="accept-all",
|
|
71
|
+
resume_session_id=resume_session_id,
|
|
72
|
+
)
|
|
73
|
+
await client.query(prompt, plan_mode=mode == "plan", mode=mode)
|
|
74
|
+
async for event in client.events():
|
|
75
|
+
if isinstance(event, TextPart):
|
|
76
|
+
sys.stdout.write(event.text)
|
|
77
|
+
sys.stdout.flush()
|
|
78
|
+
wrote_text = True
|
|
79
|
+
elif isinstance(event, ApprovalRequest):
|
|
80
|
+
await client.permission_response(event.id, "reject")
|
|
81
|
+
print(
|
|
82
|
+
f"Rejected permission request for {event.action}: non-interactive CLI has no approval UI.",
|
|
83
|
+
file=sys.stderr,
|
|
84
|
+
)
|
|
85
|
+
elif isinstance(event, Notification) and event.severity == "error":
|
|
86
|
+
body = event.body or event.title
|
|
87
|
+
if body:
|
|
88
|
+
print(body, file=sys.stderr)
|
|
89
|
+
elif isinstance(event, TurnEnd):
|
|
90
|
+
break
|
|
91
|
+
if wrote_text:
|
|
92
|
+
sys.stdout.write("\n")
|
|
93
|
+
sys.stdout.flush()
|
|
94
|
+
finally:
|
|
95
|
+
client.close()
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def main(argv: list[str] | None = None) -> None:
|
|
99
|
+
"""Parse ``argv`` and dispatch to telegram, one-shot, or TUI mode.
|
|
100
|
+
|
|
101
|
+
Imports the TUI lazily so that ``xerxes telegram`` and one-shot
|
|
102
|
+
paths avoid the heavy ``prompt_toolkit`` startup. Honours
|
|
103
|
+
``KeyboardInterrupt`` quietly.
|
|
104
|
+
"""
|
|
105
|
+
argv = list(sys.argv[1:] if argv is None else argv)
|
|
106
|
+
if argv and argv[0] == "telegram":
|
|
107
|
+
telegram_parser = argparse.ArgumentParser(
|
|
108
|
+
prog="xerxes telegram", description="Start the daemon with Telegram enabled."
|
|
109
|
+
)
|
|
110
|
+
telegram_parser.add_argument("--token", default=os.environ.get("TELEGRAM_BOT_TOKEN", ""))
|
|
111
|
+
telegram_parser.add_argument("--project-dir", default="")
|
|
112
|
+
telegram_parser.add_argument("--host", default="")
|
|
113
|
+
telegram_parser.add_argument("--port", type=int, default=0)
|
|
114
|
+
telegram_args = telegram_parser.parse_args(argv[1:])
|
|
115
|
+
if telegram_args.token:
|
|
116
|
+
os.environ["TELEGRAM_BOT_TOKEN"] = telegram_args.token
|
|
117
|
+
os.environ["XERXES_DAEMON_ENABLE_TELEGRAM"] = "1"
|
|
118
|
+
|
|
119
|
+
from .daemon.config import load_config
|
|
120
|
+
from .daemon.server import DaemonServer
|
|
121
|
+
|
|
122
|
+
config = load_config(project_dir=telegram_args.project_dir)
|
|
123
|
+
if telegram_args.host:
|
|
124
|
+
config.ws_host = telegram_args.host
|
|
125
|
+
if telegram_args.port:
|
|
126
|
+
config.ws_port = telegram_args.port
|
|
127
|
+
asyncio.run(DaemonServer(config).run())
|
|
128
|
+
return
|
|
129
|
+
|
|
130
|
+
from .tui import XerxesTUI
|
|
131
|
+
|
|
132
|
+
parser = argparse.ArgumentParser(
|
|
133
|
+
prog="xerxes",
|
|
134
|
+
description="Xerxes — interactive AI agent in your terminal.",
|
|
135
|
+
)
|
|
136
|
+
parser.add_argument(
|
|
137
|
+
"-r",
|
|
138
|
+
"--resume",
|
|
139
|
+
metavar="SESSION_ID",
|
|
140
|
+
default="",
|
|
141
|
+
help="Resume a previous session by id (saved under ~/.xerxes/sessions).",
|
|
142
|
+
)
|
|
143
|
+
parser.add_argument(
|
|
144
|
+
"--mode",
|
|
145
|
+
choices=("code", "researcher", "research", "plan"),
|
|
146
|
+
default="code",
|
|
147
|
+
help="Mode for one-shot prompts.",
|
|
148
|
+
)
|
|
149
|
+
parser.add_argument(
|
|
150
|
+
"--yolo",
|
|
151
|
+
action="store_true",
|
|
152
|
+
help="Ignored for one-shot prompts; they always use accept-all permissions.",
|
|
153
|
+
)
|
|
154
|
+
parser.add_argument(
|
|
155
|
+
"prompt",
|
|
156
|
+
nargs=argparse.REMAINDER,
|
|
157
|
+
help="Run a one-shot prompt instead of opening the TUI.",
|
|
158
|
+
)
|
|
159
|
+
args = parser.parse_args(argv)
|
|
160
|
+
prompt, one_shot = _resolve_one_shot_prompt(
|
|
161
|
+
args.prompt,
|
|
162
|
+
stdin_is_tty=sys.stdin.isatty(),
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
if one_shot:
|
|
166
|
+
if not prompt:
|
|
167
|
+
parser.error("empty prompt")
|
|
168
|
+
mode = "researcher" if args.mode == "research" else args.mode
|
|
169
|
+
try:
|
|
170
|
+
asyncio.run(_run_one_shot(prompt, resume_session_id=args.resume, mode=mode))
|
|
171
|
+
except KeyboardInterrupt:
|
|
172
|
+
pass
|
|
173
|
+
return
|
|
174
|
+
|
|
175
|
+
async def _run() -> None:
|
|
176
|
+
"""Open the interactive TUI and await its lifecycle."""
|
|
177
|
+
tui = XerxesTUI(resume_session_id=args.resume)
|
|
178
|
+
async with tui:
|
|
179
|
+
await tui.wait_until_done()
|
|
180
|
+
|
|
181
|
+
try:
|
|
182
|
+
asyncio.run(_run())
|
|
183
|
+
except KeyboardInterrupt:
|
|
184
|
+
pass
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
if __name__ == "__main__":
|
|
188
|
+
main()
|
xerxes/_compat_shims.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Copyright 2026 The Xerxes-Agents Author @erfanzar (Erfan Zare Chavoshi).
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""Lightweight path helpers that avoid importing ``xerxes.core.paths``.
|
|
15
|
+
|
|
16
|
+
Used by modules that participate in circular imports with the core
|
|
17
|
+
paths module, or by plugin entry points where pulling the full path
|
|
18
|
+
machinery would be too heavy. Mirrors the subset of behaviour needed
|
|
19
|
+
by callers without the full configuration surface.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from __future__ import annotations
|
|
23
|
+
|
|
24
|
+
import os
|
|
25
|
+
from pathlib import Path
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def xerxes_subdir_safe(*parts: str) -> Path:
|
|
29
|
+
"""Resolve a path under ``$XERXES_HOME`` (default ``~/.xerxes``).
|
|
30
|
+
|
|
31
|
+
Does not create the directory or read any other configuration; the
|
|
32
|
+
caller is responsible for ``mkdir`` if persistence is required.
|
|
33
|
+
"""
|
|
34
|
+
base = os.environ.get("XERXES_HOME") or str(Path.home() / ".xerxes")
|
|
35
|
+
return Path(base, *parts)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
__all__ = ["xerxes_subdir_safe"]
|
xerxes/acp/__init__.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Copyright 2026 The Xerxes-Agents Author @erfanzar (Erfan Zare Chavoshi).
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""Agent Client Protocol (ACP) adapter package.
|
|
15
|
+
|
|
16
|
+
Maps Xerxes's streaming/loop surface to the ACP interface that IDE
|
|
17
|
+
clients (Claude Code, Cursor, Cline) speak. ACP is a young
|
|
18
|
+
standard; the registry metadata + session adapter live here so the
|
|
19
|
+
``xerxes-acp`` entry point can register Xerxes as an ACP server."""
|
|
20
|
+
|
|
21
|
+
from .events import AcpEvent, AcpEventKind, to_acp_event
|
|
22
|
+
from .permissions import AcpPermissionRequest, route_permission
|
|
23
|
+
from .registry import REGISTRY_METADATA, write_registry_file
|
|
24
|
+
from .server import AcpServer, ServerCapabilities
|
|
25
|
+
from .session import AcpSession, AcpSessionStore
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"REGISTRY_METADATA",
|
|
29
|
+
"AcpEvent",
|
|
30
|
+
"AcpEventKind",
|
|
31
|
+
"AcpPermissionRequest",
|
|
32
|
+
"AcpServer",
|
|
33
|
+
"AcpSession",
|
|
34
|
+
"AcpSessionStore",
|
|
35
|
+
"ServerCapabilities",
|
|
36
|
+
"route_permission",
|
|
37
|
+
"to_acp_event",
|
|
38
|
+
"write_registry_file",
|
|
39
|
+
]
|
xerxes/acp/events.py
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Copyright 2026 The Xerxes-Agents Author @erfanzar (Erfan Zare Chavoshi).
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""ACP wire-event shape and conversion from internal ``StreamEvent``.
|
|
15
|
+
|
|
16
|
+
Internal types live in ``xerxes.streaming.events`` and are sync
|
|
17
|
+
Python dataclasses. ACP clients expect a tagged-union with ``kind``
|
|
18
|
+
discriminator. Use ``to_acp_event(stream_event)`` to convert."""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
from dataclasses import dataclass, field
|
|
23
|
+
from enum import StrEnum
|
|
24
|
+
from typing import Any
|
|
25
|
+
|
|
26
|
+
from ..streaming.events import (
|
|
27
|
+
PermissionRequest,
|
|
28
|
+
SkillSuggestion,
|
|
29
|
+
StreamEvent,
|
|
30
|
+
TextChunk,
|
|
31
|
+
ThinkingChunk,
|
|
32
|
+
ToolEnd,
|
|
33
|
+
ToolStart,
|
|
34
|
+
TurnDone,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class AcpEventKind(StrEnum):
|
|
39
|
+
"""ACP wire event kinds Xerxes can emit."""
|
|
40
|
+
|
|
41
|
+
TEXT_DELTA = "text_delta"
|
|
42
|
+
THINKING_DELTA = "thinking_delta"
|
|
43
|
+
TOOL_CALL_START = "tool_call_start"
|
|
44
|
+
TOOL_CALL_END = "tool_call_end"
|
|
45
|
+
PERMISSION_REQUEST = "permission_request"
|
|
46
|
+
TURN_END = "turn_end"
|
|
47
|
+
SKILL_SUGGESTION = "skill_suggestion"
|
|
48
|
+
UNKNOWN = "unknown"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@dataclass
|
|
52
|
+
class AcpEvent:
|
|
53
|
+
"""Single event delivered over ACP.
|
|
54
|
+
|
|
55
|
+
Attributes:
|
|
56
|
+
kind: discriminator tagging the payload shape.
|
|
57
|
+
payload: kind-specific JSON-shaped fields (text, tool info, etc.).
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
kind: AcpEventKind
|
|
61
|
+
payload: dict[str, Any] = field(default_factory=dict)
|
|
62
|
+
|
|
63
|
+
def to_wire(self) -> dict[str, Any]:
|
|
64
|
+
"""Render as the flat JSON-RPC dict expected on the wire."""
|
|
65
|
+
return {"kind": self.kind.value, **self.payload}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def to_acp_event(event: StreamEvent) -> AcpEvent:
|
|
69
|
+
"""Convert an internal stream event to an ACP event.
|
|
70
|
+
|
|
71
|
+
Unknown event types degrade to ``AcpEventKind.UNKNOWN`` with the
|
|
72
|
+
raw repr so the client can at least log them."""
|
|
73
|
+
|
|
74
|
+
if isinstance(event, TextChunk):
|
|
75
|
+
return AcpEvent(AcpEventKind.TEXT_DELTA, {"text": event.text})
|
|
76
|
+
if isinstance(event, ThinkingChunk):
|
|
77
|
+
return AcpEvent(AcpEventKind.THINKING_DELTA, {"text": event.text})
|
|
78
|
+
if isinstance(event, ToolStart):
|
|
79
|
+
return AcpEvent(
|
|
80
|
+
AcpEventKind.TOOL_CALL_START,
|
|
81
|
+
{"name": event.name, "inputs": event.inputs, "tool_call_id": event.tool_call_id},
|
|
82
|
+
)
|
|
83
|
+
if isinstance(event, ToolEnd):
|
|
84
|
+
return AcpEvent(
|
|
85
|
+
AcpEventKind.TOOL_CALL_END,
|
|
86
|
+
{
|
|
87
|
+
"name": event.name,
|
|
88
|
+
"result": event.result,
|
|
89
|
+
"permitted": event.permitted,
|
|
90
|
+
"tool_call_id": event.tool_call_id,
|
|
91
|
+
"duration_ms": event.duration_ms,
|
|
92
|
+
},
|
|
93
|
+
)
|
|
94
|
+
if isinstance(event, PermissionRequest):
|
|
95
|
+
return AcpEvent(
|
|
96
|
+
AcpEventKind.PERMISSION_REQUEST,
|
|
97
|
+
{
|
|
98
|
+
"tool_name": event.tool_name,
|
|
99
|
+
"description": event.description,
|
|
100
|
+
"inputs": event.inputs,
|
|
101
|
+
},
|
|
102
|
+
)
|
|
103
|
+
if isinstance(event, TurnDone):
|
|
104
|
+
return AcpEvent(
|
|
105
|
+
AcpEventKind.TURN_END,
|
|
106
|
+
{
|
|
107
|
+
"input_tokens": event.input_tokens,
|
|
108
|
+
"output_tokens": event.output_tokens,
|
|
109
|
+
"tool_calls_count": event.tool_calls_count,
|
|
110
|
+
"model": event.model,
|
|
111
|
+
"cache_read_tokens": getattr(event, "cache_read_tokens", 0),
|
|
112
|
+
"cache_creation_tokens": getattr(event, "cache_creation_tokens", 0),
|
|
113
|
+
},
|
|
114
|
+
)
|
|
115
|
+
if isinstance(event, SkillSuggestion):
|
|
116
|
+
return AcpEvent(
|
|
117
|
+
AcpEventKind.SKILL_SUGGESTION,
|
|
118
|
+
{"skill_name": event.skill_name, "description": event.description},
|
|
119
|
+
)
|
|
120
|
+
return AcpEvent(AcpEventKind.UNKNOWN, {"repr": repr(event)})
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
__all__ = ["AcpEvent", "AcpEventKind", "to_acp_event"]
|