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.
Files changed (749) hide show
  1. xerxes/__init__.py +210 -0
  2. xerxes/__main__.py +188 -0
  3. xerxes/_compat_shims.py +38 -0
  4. xerxes/acp/__init__.py +39 -0
  5. xerxes/acp/events.py +123 -0
  6. xerxes/acp/permissions.py +124 -0
  7. xerxes/acp/registry.py +69 -0
  8. xerxes/acp/server.py +221 -0
  9. xerxes/acp/session.py +107 -0
  10. xerxes/agents/__init__.py +59 -0
  11. xerxes/agents/_coder_agent.py +57 -0
  12. xerxes/agents/_data_analyst_agent.py +60 -0
  13. xerxes/agents/_planner_agent.py +59 -0
  14. xerxes/agents/_researcher_agent.py +62 -0
  15. xerxes/agents/agentspec.py +399 -0
  16. xerxes/agents/auto_compact_agent.py +119 -0
  17. xerxes/agents/compaction_agent.py +180 -0
  18. xerxes/agents/default/agent.yaml +33 -0
  19. xerxes/agents/default/coder.yaml +28 -0
  20. xerxes/agents/default/planner.yaml +34 -0
  21. xerxes/agents/default/researcher.yaml +29 -0
  22. xerxes/agents/default/system.md +63 -0
  23. xerxes/agents/definitions.py +470 -0
  24. xerxes/agents/profile_agent.py +218 -0
  25. xerxes/agents/subagent_manager.py +737 -0
  26. xerxes/api_server/__init__.py +29 -0
  27. xerxes/api_server/completion_service.py +204 -0
  28. xerxes/api_server/converters.py +50 -0
  29. xerxes/api_server/cortex_completion_service.py +465 -0
  30. xerxes/api_server/models.py +61 -0
  31. xerxes/api_server/routers.py +275 -0
  32. xerxes/api_server/server.py +225 -0
  33. xerxes/audit/__init__.py +80 -0
  34. xerxes/audit/collector.py +145 -0
  35. xerxes/audit/emitter.py +443 -0
  36. xerxes/audit/events.py +323 -0
  37. xerxes/audit/otel_exporter.py +233 -0
  38. xerxes/auth/__init__.py +34 -0
  39. xerxes/auth/oauth.py +133 -0
  40. xerxes/auth/storage.py +119 -0
  41. xerxes/bridge/__init__.py +22 -0
  42. xerxes/bridge/__main__.py +21 -0
  43. xerxes/bridge/commands.py +202 -0
  44. xerxes/bridge/profiles.py +253 -0
  45. xerxes/bridge/server.py +2702 -0
  46. xerxes/channels/__init__.py +46 -0
  47. xerxes/channels/_helpers.py +259 -0
  48. xerxes/channels/adapters/__init__.py +50 -0
  49. xerxes/channels/adapters/bluebubbles.py +102 -0
  50. xerxes/channels/adapters/dingtalk.py +89 -0
  51. xerxes/channels/adapters/discord.py +96 -0
  52. xerxes/channels/adapters/email_imap.py +142 -0
  53. xerxes/channels/adapters/feishu.py +138 -0
  54. xerxes/channels/adapters/home_assistant.py +112 -0
  55. xerxes/channels/adapters/matrix.py +107 -0
  56. xerxes/channels/adapters/mattermost.py +96 -0
  57. xerxes/channels/adapters/signal.py +104 -0
  58. xerxes/channels/adapters/slack.py +230 -0
  59. xerxes/channels/adapters/sms.py +112 -0
  60. xerxes/channels/adapters/telegram.py +156 -0
  61. xerxes/channels/adapters/wecom.py +124 -0
  62. xerxes/channels/adapters/whatsapp.py +114 -0
  63. xerxes/channels/base.py +71 -0
  64. xerxes/channels/identity.py +259 -0
  65. xerxes/channels/identity_hashing.py +78 -0
  66. xerxes/channels/oauth.py +452 -0
  67. xerxes/channels/registry.py +215 -0
  68. xerxes/channels/session_reset.py +103 -0
  69. xerxes/channels/sticker_cache.py +162 -0
  70. xerxes/channels/telegram_gateway.py +951 -0
  71. xerxes/channels/types.py +86 -0
  72. xerxes/channels/webhooks.py +105 -0
  73. xerxes/channels/workspace.py +228 -0
  74. xerxes/channels/workspace_import.py +147 -0
  75. xerxes/context/__init__.py +77 -0
  76. xerxes/context/advanced_compressor.py +375 -0
  77. xerxes/context/compaction_strategies.py +538 -0
  78. xerxes/context/compressor.py +279 -0
  79. xerxes/context/token_counter.py +210 -0
  80. xerxes/context/tool_result_pruner.py +137 -0
  81. xerxes/context/tool_result_storage.py +172 -0
  82. xerxes/core/__init__.py +99 -0
  83. xerxes/core/basics.py +81 -0
  84. xerxes/core/config.py +338 -0
  85. xerxes/core/errors.py +141 -0
  86. xerxes/core/multimodal.py +97 -0
  87. xerxes/core/paths.py +43 -0
  88. xerxes/core/prompt_template.py +77 -0
  89. xerxes/core/streamer_buffer.py +123 -0
  90. xerxes/core/utils.py +254 -0
  91. xerxes/cortex/__init__.py +54 -0
  92. xerxes/cortex/agents/__init__.py +30 -0
  93. xerxes/cortex/agents/agent.py +1422 -0
  94. xerxes/cortex/agents/memory_integration.py +282 -0
  95. xerxes/cortex/agents/universal_agent.py +300 -0
  96. xerxes/cortex/core/__init__.py +33 -0
  97. xerxes/cortex/core/enums.py +48 -0
  98. xerxes/cortex/core/string_utils.py +115 -0
  99. xerxes/cortex/core/templates.py +423 -0
  100. xerxes/cortex/core/tool.py +95 -0
  101. xerxes/cortex/orchestration/__init__.py +43 -0
  102. xerxes/cortex/orchestration/cortex.py +1325 -0
  103. xerxes/cortex/orchestration/dynamic.py +361 -0
  104. xerxes/cortex/orchestration/planner.py +546 -0
  105. xerxes/cortex/orchestration/task.py +924 -0
  106. xerxes/cortex/orchestration/task_creator.py +518 -0
  107. xerxes/cron/__init__.py +36 -0
  108. xerxes/cron/delivery.py +84 -0
  109. xerxes/cron/jobs.py +246 -0
  110. xerxes/cron/scheduler.py +149 -0
  111. xerxes/daemon/__init__.py +21 -0
  112. xerxes/daemon/__main__.py +21 -0
  113. xerxes/daemon/channels.py +289 -0
  114. xerxes/daemon/config.py +262 -0
  115. xerxes/daemon/gateway.py +254 -0
  116. xerxes/daemon/log.py +89 -0
  117. xerxes/daemon/runtime.py +970 -0
  118. xerxes/daemon/server.py +1173 -0
  119. xerxes/daemon/service.py +199 -0
  120. xerxes/daemon/socket_channel.py +131 -0
  121. xerxes/executors.py +1326 -0
  122. xerxes/extensions/__init__.py +41 -0
  123. xerxes/extensions/dependency.py +257 -0
  124. xerxes/extensions/hooks.py +165 -0
  125. xerxes/extensions/plugins.py +441 -0
  126. xerxes/extensions/skill_authoring/__init__.py +65 -0
  127. xerxes/extensions/skill_authoring/drafter.py +208 -0
  128. xerxes/extensions/skill_authoring/improver.py +152 -0
  129. xerxes/extensions/skill_authoring/lifecycle.py +231 -0
  130. xerxes/extensions/skill_authoring/matcher.py +153 -0
  131. xerxes/extensions/skill_authoring/pipeline.py +179 -0
  132. xerxes/extensions/skill_authoring/telemetry.py +201 -0
  133. xerxes/extensions/skill_authoring/tracker.py +219 -0
  134. xerxes/extensions/skill_authoring/triggers.py +144 -0
  135. xerxes/extensions/skill_authoring/verifier.py +153 -0
  136. xerxes/extensions/skill_sources/__init__.py +30 -0
  137. xerxes/extensions/skill_sources/agentskills_io.py +37 -0
  138. xerxes/extensions/skill_sources/base.py +71 -0
  139. xerxes/extensions/skill_sources/github.py +89 -0
  140. xerxes/extensions/skill_sources/local.py +91 -0
  141. xerxes/extensions/skill_sources/official.py +77 -0
  142. xerxes/extensions/skills.py +446 -0
  143. xerxes/extensions/skills_guard.py +200 -0
  144. xerxes/extensions/skills_hub.py +453 -0
  145. xerxes/extensions/skills_sync.py +121 -0
  146. xerxes/extensions/slash_plugins.py +167 -0
  147. xerxes/llms/__init__.py +189 -0
  148. xerxes/llms/anthropic.py +433 -0
  149. xerxes/llms/base.py +312 -0
  150. xerxes/llms/compat.py +228 -0
  151. xerxes/llms/gemini.py +391 -0
  152. xerxes/llms/ollama.py +378 -0
  153. xerxes/llms/openai.py +655 -0
  154. xerxes/llms/registry.py +395 -0
  155. xerxes/logging/__init__.py +55 -0
  156. xerxes/logging/console.py +605 -0
  157. xerxes/logging/structured.py +539 -0
  158. xerxes/mcp/__init__.py +34 -0
  159. xerxes/mcp/client.py +548 -0
  160. xerxes/mcp/integration.py +168 -0
  161. xerxes/mcp/manager.py +153 -0
  162. xerxes/mcp/oauth.py +195 -0
  163. xerxes/mcp/osv.py +183 -0
  164. xerxes/mcp/reconnect.py +103 -0
  165. xerxes/mcp/server.py +364 -0
  166. xerxes/mcp/types.py +122 -0
  167. xerxes/memory/__init__.py +77 -0
  168. xerxes/memory/base.py +262 -0
  169. xerxes/memory/compat.py +377 -0
  170. xerxes/memory/context_fencing.py +58 -0
  171. xerxes/memory/contextual_memory.py +287 -0
  172. xerxes/memory/embedders.py +317 -0
  173. xerxes/memory/entity_memory.py +345 -0
  174. xerxes/memory/long_term_memory.py +430 -0
  175. xerxes/memory/plugins/__init__.py +58 -0
  176. xerxes/memory/plugins/_base.py +209 -0
  177. xerxes/memory/plugins/byterover.py +65 -0
  178. xerxes/memory/plugins/hindsight.py +69 -0
  179. xerxes/memory/plugins/holographic.py +104 -0
  180. xerxes/memory/plugins/honcho.py +58 -0
  181. xerxes/memory/plugins/mem0.py +75 -0
  182. xerxes/memory/plugins/openviking.py +62 -0
  183. xerxes/memory/plugins/retaindb.py +98 -0
  184. xerxes/memory/plugins/supermemory.py +64 -0
  185. xerxes/memory/provider.py +192 -0
  186. xerxes/memory/retrieval.py +208 -0
  187. xerxes/memory/short_term_memory.py +264 -0
  188. xerxes/memory/storage.py +646 -0
  189. xerxes/memory/turn_indexer.py +159 -0
  190. xerxes/memory/user_memory.py +176 -0
  191. xerxes/memory/user_profile.py +404 -0
  192. xerxes/memory/vector_storage.py +199 -0
  193. xerxes/operators/__init__.py +58 -0
  194. xerxes/operators/browser.py +235 -0
  195. xerxes/operators/browser_providers/__init__.py +107 -0
  196. xerxes/operators/browser_providers/browser_use.py +60 -0
  197. xerxes/operators/browser_providers/browserbase.py +65 -0
  198. xerxes/operators/browser_providers/camofox.py +60 -0
  199. xerxes/operators/browser_providers/firecrawl.py +49 -0
  200. xerxes/operators/browser_providers/local.py +50 -0
  201. xerxes/operators/config.py +102 -0
  202. xerxes/operators/helpers.py +58 -0
  203. xerxes/operators/plans.py +60 -0
  204. xerxes/operators/pty.py +250 -0
  205. xerxes/operators/state.py +797 -0
  206. xerxes/operators/subagents.py +337 -0
  207. xerxes/operators/types.py +199 -0
  208. xerxes/operators/user_prompt.py +174 -0
  209. xerxes/py.typed +0 -0
  210. xerxes/runtime/__init__.py +88 -0
  211. xerxes/runtime/agent_memory.py +597 -0
  212. xerxes/runtime/auxiliary_client.py +191 -0
  213. xerxes/runtime/background_sessions.py +208 -0
  214. xerxes/runtime/bootstrap.py +377 -0
  215. xerxes/runtime/bridge.py +484 -0
  216. xerxes/runtime/circuit_breaker.py +216 -0
  217. xerxes/runtime/config_context.py +104 -0
  218. xerxes/runtime/context.py +684 -0
  219. xerxes/runtime/cost_tracker.py +241 -0
  220. xerxes/runtime/distribution.py +188 -0
  221. xerxes/runtime/doctor.py +219 -0
  222. xerxes/runtime/error_classifier.py +208 -0
  223. xerxes/runtime/execution_registry.py +417 -0
  224. xerxes/runtime/fallback.py +234 -0
  225. xerxes/runtime/features.py +471 -0
  226. xerxes/runtime/history.py +146 -0
  227. xerxes/runtime/insights.py +135 -0
  228. xerxes/runtime/interrupt.py +120 -0
  229. xerxes/runtime/iteration_budget.py +115 -0
  230. xerxes/runtime/loop_detection.py +266 -0
  231. xerxes/runtime/nudges.py +184 -0
  232. xerxes/runtime/parity_audit.py +231 -0
  233. xerxes/runtime/pricing.py +156 -0
  234. xerxes/runtime/process_registry.py +209 -0
  235. xerxes/runtime/profiles.py +138 -0
  236. xerxes/runtime/query_engine.py +389 -0
  237. xerxes/runtime/rate_limit_tracker.py +199 -0
  238. xerxes/runtime/resilience.py +230 -0
  239. xerxes/runtime/session.py +286 -0
  240. xerxes/runtime/setup_wizard.py +153 -0
  241. xerxes/runtime/tool_pool.py +152 -0
  242. xerxes/runtime/transcript.py +171 -0
  243. xerxes/runtime/update.py +223 -0
  244. xerxes/security/__init__.py +47 -0
  245. xerxes/security/approvals.py +150 -0
  246. xerxes/security/path_security.py +62 -0
  247. xerxes/security/policy.py +154 -0
  248. xerxes/security/prompt_scanner.py +122 -0
  249. xerxes/security/redact.py +139 -0
  250. xerxes/security/sandbox.py +207 -0
  251. xerxes/security/sandbox_backends/__init__.py +80 -0
  252. xerxes/security/sandbox_backends/credential_files.py +86 -0
  253. xerxes/security/sandbox_backends/daytona_backend.py +76 -0
  254. xerxes/security/sandbox_backends/docker_backend.py +160 -0
  255. xerxes/security/sandbox_backends/file_sync.py +91 -0
  256. xerxes/security/sandbox_backends/modal_backend.py +99 -0
  257. xerxes/security/sandbox_backends/singularity_backend.py +82 -0
  258. xerxes/security/sandbox_backends/ssh_backend.py +111 -0
  259. xerxes/security/sandbox_backends/subprocess_backend.py +139 -0
  260. xerxes/security/url_safety.py +102 -0
  261. xerxes/session/__init__.py +66 -0
  262. xerxes/session/branching.py +84 -0
  263. xerxes/session/fts_index.py +171 -0
  264. xerxes/session/index.py +366 -0
  265. xerxes/session/migrations/__init__.py +88 -0
  266. xerxes/session/models.py +271 -0
  267. xerxes/session/replay.py +217 -0
  268. xerxes/session/snapshot_diff.py +91 -0
  269. xerxes/session/snapshots.py +192 -0
  270. xerxes/session/store.py +418 -0
  271. xerxes/session/summarizer.py +215 -0
  272. xerxes/session/workspace.py +126 -0
  273. xerxes/skills/ai-voiceover-with-typed-text-visuals/SKILL.md +25 -0
  274. xerxes/skills/apple-notes/SKILL.md +90 -0
  275. xerxes/skills/apple-reminders/SKILL.md +98 -0
  276. xerxes/skills/architecture-diagram/SKILL.md +129 -0
  277. xerxes/skills/architecture-diagram/templates/template.html +319 -0
  278. xerxes/skills/ascii-art/SKILL.md +321 -0
  279. xerxes/skills/ascii-video/README.md +290 -0
  280. xerxes/skills/ascii-video/SKILL.md +232 -0
  281. xerxes/skills/ascii-video/references/architecture.md +802 -0
  282. xerxes/skills/ascii-video/references/composition.md +892 -0
  283. xerxes/skills/ascii-video/references/effects.md +1865 -0
  284. xerxes/skills/ascii-video/references/inputs.md +685 -0
  285. xerxes/skills/ascii-video/references/optimization.md +688 -0
  286. xerxes/skills/ascii-video/references/scenes.md +1011 -0
  287. xerxes/skills/ascii-video/references/shaders.md +1385 -0
  288. xerxes/skills/ascii-video/references/troubleshooting.md +367 -0
  289. xerxes/skills/autoresearch/SKILL.md +730 -0
  290. xerxes/skills/autoresearch/references/autonomous-loop-protocol.md +890 -0
  291. xerxes/skills/autoresearch/references/core-principles.md +207 -0
  292. xerxes/skills/autoresearch/references/debug-workflow.md +469 -0
  293. xerxes/skills/autoresearch/references/fix-workflow.md +682 -0
  294. xerxes/skills/autoresearch/references/learn-workflow.md +480 -0
  295. xerxes/skills/autoresearch/references/plan-workflow.md +308 -0
  296. xerxes/skills/autoresearch/references/predict-workflow.md +751 -0
  297. xerxes/skills/autoresearch/references/reason-workflow.md +618 -0
  298. xerxes/skills/autoresearch/references/results-logging.md +171 -0
  299. xerxes/skills/autoresearch/references/scenario-workflow.md +353 -0
  300. xerxes/skills/autoresearch/references/security-workflow.md +1000 -0
  301. xerxes/skills/autoresearch/references/ship-workflow.md +412 -0
  302. xerxes/skills/claude-code/SKILL.md +744 -0
  303. xerxes/skills/cloud/modal/SKILL.md +344 -0
  304. xerxes/skills/cloud/modal/references/advanced-usage.md +503 -0
  305. xerxes/skills/cloud/modal/references/troubleshooting.md +494 -0
  306. xerxes/skills/codex/SKILL.md +113 -0
  307. xerxes/skills/creative-ideation/SKILL.md +147 -0
  308. xerxes/skills/creative-ideation/references/full-prompt-library.md +110 -0
  309. xerxes/skills/deepscan/SKILL.md +183 -0
  310. xerxes/skills/evaluation/lm-evaluation-harness/SKILL.md +493 -0
  311. xerxes/skills/evaluation/lm-evaluation-harness/references/api-evaluation.md +490 -0
  312. xerxes/skills/evaluation/lm-evaluation-harness/references/benchmark-guide.md +488 -0
  313. xerxes/skills/evaluation/lm-evaluation-harness/references/custom-tasks.md +602 -0
  314. xerxes/skills/evaluation/lm-evaluation-harness/references/distributed-eval.md +519 -0
  315. xerxes/skills/evaluation/weights-and-biases/SKILL.md +593 -0
  316. xerxes/skills/evaluation/weights-and-biases/references/artifacts.md +584 -0
  317. xerxes/skills/evaluation/weights-and-biases/references/integrations.md +700 -0
  318. xerxes/skills/evaluation/weights-and-biases/references/sweeps.md +847 -0
  319. xerxes/skills/excalidraw/SKILL.md +194 -0
  320. xerxes/skills/excalidraw/references/colors.md +44 -0
  321. xerxes/skills/excalidraw/references/dark-mode.md +68 -0
  322. xerxes/skills/excalidraw/references/examples.md +141 -0
  323. xerxes/skills/excalidraw/scripts/upload.py +112 -0
  324. xerxes/skills/execute-the-ascii-video-skill-now/SKILL.md +49 -0
  325. xerxes/skills/execute-the-deepscan-skill-now/SKILL.md +42 -0
  326. xerxes/skills/execute-the-news-read-skill-now/SKILL.md +48 -0
  327. xerxes/skills/find-nearby/SKILL.md +69 -0
  328. xerxes/skills/find-nearby/scripts/find_nearby.py +178 -0
  329. xerxes/skills/findmy/SKILL.md +131 -0
  330. xerxes/skills/github/codebase-inspection/SKILL.md +115 -0
  331. xerxes/skills/github/github-auth/SKILL.md +246 -0
  332. xerxes/skills/github/github-auth/scripts/gh-env.sh +79 -0
  333. xerxes/skills/github/github-code-review/SKILL.md +480 -0
  334. xerxes/skills/github/github-code-review/references/review-output-template.md +74 -0
  335. xerxes/skills/github/github-issues/SKILL.md +369 -0
  336. xerxes/skills/github/github-issues/templates/bug-report.md +35 -0
  337. xerxes/skills/github/github-issues/templates/feature-request.md +31 -0
  338. xerxes/skills/github/github-pr-workflow/SKILL.md +366 -0
  339. xerxes/skills/github/github-pr-workflow/references/ci-troubleshooting.md +183 -0
  340. xerxes/skills/github/github-pr-workflow/references/conventional-commits.md +71 -0
  341. xerxes/skills/github/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
  342. xerxes/skills/github/github-pr-workflow/templates/pr-body-feature.md +33 -0
  343. xerxes/skills/github/github-repo-management/SKILL.md +515 -0
  344. xerxes/skills/github/github-repo-management/references/github-api-cheatsheet.md +161 -0
  345. xerxes/skills/go-to-documents-projects-spectrax/SKILL.md +29 -0
  346. xerxes/skills/godmode/SKILL.md +403 -0
  347. xerxes/skills/godmode/references/jailbreak-templates.md +128 -0
  348. xerxes/skills/godmode/references/refusal-detection.md +142 -0
  349. xerxes/skills/godmode/scripts/auto_jailbreak.py +733 -0
  350. xerxes/skills/godmode/scripts/godmode_race.py +557 -0
  351. xerxes/skills/godmode/scripts/load_godmode.py +63 -0
  352. xerxes/skills/godmode/scripts/parseltongue.py +789 -0
  353. xerxes/skills/himalaya/SKILL.md +278 -0
  354. xerxes/skills/himalaya/references/configuration.md +184 -0
  355. xerxes/skills/himalaya/references/message-composition.md +199 -0
  356. xerxes/skills/huggingface-hub/SKILL.md +80 -0
  357. xerxes/skills/imessage/SKILL.md +102 -0
  358. xerxes/skills/inference/gguf/SKILL.md +430 -0
  359. xerxes/skills/inference/gguf/references/advanced-usage.md +504 -0
  360. xerxes/skills/inference/gguf/references/troubleshooting.md +442 -0
  361. xerxes/skills/inference/guidance/SKILL.md +575 -0
  362. xerxes/skills/inference/guidance/references/backends.md +554 -0
  363. xerxes/skills/inference/guidance/references/constraints.md +674 -0
  364. xerxes/skills/inference/guidance/references/examples.md +767 -0
  365. xerxes/skills/inference/llama-cpp/SKILL.md +261 -0
  366. xerxes/skills/inference/llama-cpp/references/optimization.md +89 -0
  367. xerxes/skills/inference/llama-cpp/references/quantization.md +213 -0
  368. xerxes/skills/inference/llama-cpp/references/server.md +125 -0
  369. xerxes/skills/inference/obliteratus/SKILL.md +330 -0
  370. xerxes/skills/inference/obliteratus/references/analysis-modules.md +166 -0
  371. xerxes/skills/inference/obliteratus/references/methods-guide.md +141 -0
  372. xerxes/skills/inference/obliteratus/templates/abliteration-config.yaml +33 -0
  373. xerxes/skills/inference/obliteratus/templates/analysis-study.yaml +40 -0
  374. xerxes/skills/inference/obliteratus/templates/batch-abliteration.yaml +41 -0
  375. xerxes/skills/inference/outlines/SKILL.md +655 -0
  376. xerxes/skills/inference/outlines/references/backends.md +615 -0
  377. xerxes/skills/inference/outlines/references/examples.md +773 -0
  378. xerxes/skills/inference/outlines/references/json_generation.md +652 -0
  379. xerxes/skills/inference/vllm/SKILL.md +367 -0
  380. xerxes/skills/inference/vllm/references/optimization.md +226 -0
  381. xerxes/skills/inference/vllm/references/quantization.md +284 -0
  382. xerxes/skills/inference/vllm/references/server-deployment.md +255 -0
  383. xerxes/skills/inference/vllm/references/troubleshooting.md +447 -0
  384. xerxes/skills/jupyter-live-kernel/SKILL.md +171 -0
  385. xerxes/skills/manim-video/README.md +23 -0
  386. xerxes/skills/manim-video/SKILL.md +264 -0
  387. xerxes/skills/manim-video/references/animation-design-thinking.md +161 -0
  388. xerxes/skills/manim-video/references/animations.md +282 -0
  389. xerxes/skills/manim-video/references/camera-and-3d.md +135 -0
  390. xerxes/skills/manim-video/references/decorations.md +202 -0
  391. xerxes/skills/manim-video/references/equations.md +216 -0
  392. xerxes/skills/manim-video/references/graphs-and-data.md +163 -0
  393. xerxes/skills/manim-video/references/mobjects.md +333 -0
  394. xerxes/skills/manim-video/references/paper-explainer.md +255 -0
  395. xerxes/skills/manim-video/references/production-quality.md +190 -0
  396. xerxes/skills/manim-video/references/rendering.md +185 -0
  397. xerxes/skills/manim-video/references/scene-planning.md +118 -0
  398. xerxes/skills/manim-video/references/troubleshooting.md +135 -0
  399. xerxes/skills/manim-video/references/updaters-and-trackers.md +260 -0
  400. xerxes/skills/manim-video/references/visual-design.md +124 -0
  401. xerxes/skills/manim-video/scripts/setup.sh +27 -0
  402. xerxes/skills/mcporter/SKILL.md +122 -0
  403. xerxes/skills/media/gif-search/SKILL.md +86 -0
  404. xerxes/skills/media/heartmula/SKILL.md +170 -0
  405. xerxes/skills/media/songsee/SKILL.md +82 -0
  406. xerxes/skills/media/youtube-content/SKILL.md +72 -0
  407. xerxes/skills/media/youtube-content/references/output-formats.md +56 -0
  408. xerxes/skills/media/youtube-content/scripts/fetch_transcript.py +120 -0
  409. xerxes/skills/minecraft-modpack-server/SKILL.md +186 -0
  410. xerxes/skills/models/audiocraft/SKILL.md +567 -0
  411. xerxes/skills/models/audiocraft/references/advanced-usage.md +666 -0
  412. xerxes/skills/models/audiocraft/references/troubleshooting.md +504 -0
  413. xerxes/skills/models/clip/SKILL.md +256 -0
  414. xerxes/skills/models/clip/references/applications.md +207 -0
  415. xerxes/skills/models/segment-anything/SKILL.md +503 -0
  416. xerxes/skills/models/segment-anything/references/advanced-usage.md +589 -0
  417. xerxes/skills/models/segment-anything/references/troubleshooting.md +484 -0
  418. xerxes/skills/models/stable-diffusion/SKILL.md +522 -0
  419. xerxes/skills/models/stable-diffusion/references/advanced-usage.md +716 -0
  420. xerxes/skills/models/stable-diffusion/references/troubleshooting.md +555 -0
  421. xerxes/skills/models/whisper/SKILL.md +320 -0
  422. xerxes/skills/models/whisper/references/languages.md +189 -0
  423. xerxes/skills/native-mcp/SKILL.md +356 -0
  424. xerxes/skills/note-taking/obsidian/SKILL.md +66 -0
  425. xerxes/skills/opencode/SKILL.md +218 -0
  426. xerxes/skills/openhue/SKILL.md +108 -0
  427. xerxes/skills/p5js/README.md +64 -0
  428. xerxes/skills/p5js/SKILL.md +547 -0
  429. xerxes/skills/p5js/references/animation.md +439 -0
  430. xerxes/skills/p5js/references/color-systems.md +352 -0
  431. xerxes/skills/p5js/references/core-api.md +410 -0
  432. xerxes/skills/p5js/references/export-pipeline.md +566 -0
  433. xerxes/skills/p5js/references/interaction.md +398 -0
  434. xerxes/skills/p5js/references/shapes-and-geometry.md +300 -0
  435. xerxes/skills/p5js/references/troubleshooting.md +532 -0
  436. xerxes/skills/p5js/references/typography.md +302 -0
  437. xerxes/skills/p5js/references/visual-effects.md +895 -0
  438. xerxes/skills/p5js/references/webgl-and-3d.md +423 -0
  439. xerxes/skills/p5js/scripts/export-frames.js +179 -0
  440. xerxes/skills/p5js/scripts/render.sh +102 -0
  441. xerxes/skills/p5js/scripts/serve.sh +30 -0
  442. xerxes/skills/p5js/scripts/setup.sh +97 -0
  443. xerxes/skills/p5js/templates/viewer.html +395 -0
  444. xerxes/skills/plan/SKILL.md +57 -0
  445. xerxes/skills/pokemon-player/SKILL.md +215 -0
  446. xerxes/skills/popular-web-designs/SKILL.md +207 -0
  447. xerxes/skills/popular-web-designs/templates/airbnb.md +259 -0
  448. xerxes/skills/popular-web-designs/templates/airtable.md +102 -0
  449. xerxes/skills/popular-web-designs/templates/apple.md +326 -0
  450. xerxes/skills/popular-web-designs/templates/bmw.md +193 -0
  451. xerxes/skills/popular-web-designs/templates/cal.md +272 -0
  452. xerxes/skills/popular-web-designs/templates/claude.md +325 -0
  453. xerxes/skills/popular-web-designs/templates/clay.md +317 -0
  454. xerxes/skills/popular-web-designs/templates/clickhouse.md +294 -0
  455. xerxes/skills/popular-web-designs/templates/cohere.md +279 -0
  456. xerxes/skills/popular-web-designs/templates/coinbase.md +142 -0
  457. xerxes/skills/popular-web-designs/templates/composio.md +320 -0
  458. xerxes/skills/popular-web-designs/templates/cursor.md +322 -0
  459. xerxes/skills/popular-web-designs/templates/elevenlabs.md +278 -0
  460. xerxes/skills/popular-web-designs/templates/expo.md +294 -0
  461. xerxes/skills/popular-web-designs/templates/figma.md +233 -0
  462. xerxes/skills/popular-web-designs/templates/framer.md +259 -0
  463. xerxes/skills/popular-web-designs/templates/hashicorp.md +291 -0
  464. xerxes/skills/popular-web-designs/templates/ibm.md +345 -0
  465. xerxes/skills/popular-web-designs/templates/intercom.md +159 -0
  466. xerxes/skills/popular-web-designs/templates/kraken.md +138 -0
  467. xerxes/skills/popular-web-designs/templates/linear.app.md +380 -0
  468. xerxes/skills/popular-web-designs/templates/lovable.md +311 -0
  469. xerxes/skills/popular-web-designs/templates/minimax.md +270 -0
  470. xerxes/skills/popular-web-designs/templates/mintlify.md +339 -0
  471. xerxes/skills/popular-web-designs/templates/miro.md +121 -0
  472. xerxes/skills/popular-web-designs/templates/mistral.ai.md +274 -0
  473. xerxes/skills/popular-web-designs/templates/mongodb.md +279 -0
  474. xerxes/skills/popular-web-designs/templates/notion.md +322 -0
  475. xerxes/skills/popular-web-designs/templates/nvidia.md +306 -0
  476. xerxes/skills/popular-web-designs/templates/ollama.md +280 -0
  477. xerxes/skills/popular-web-designs/templates/opencode.ai.md +294 -0
  478. xerxes/skills/popular-web-designs/templates/pinterest.md +243 -0
  479. xerxes/skills/popular-web-designs/templates/posthog.md +269 -0
  480. xerxes/skills/popular-web-designs/templates/raycast.md +281 -0
  481. xerxes/skills/popular-web-designs/templates/replicate.md +274 -0
  482. xerxes/skills/popular-web-designs/templates/resend.md +316 -0
  483. xerxes/skills/popular-web-designs/templates/revolut.md +198 -0
  484. xerxes/skills/popular-web-designs/templates/runwayml.md +257 -0
  485. xerxes/skills/popular-web-designs/templates/sanity.md +370 -0
  486. xerxes/skills/popular-web-designs/templates/sentry.md +275 -0
  487. xerxes/skills/popular-web-designs/templates/spacex.md +207 -0
  488. xerxes/skills/popular-web-designs/templates/spotify.md +259 -0
  489. xerxes/skills/popular-web-designs/templates/stripe.md +335 -0
  490. xerxes/skills/popular-web-designs/templates/supabase.md +268 -0
  491. xerxes/skills/popular-web-designs/templates/superhuman.md +265 -0
  492. xerxes/skills/popular-web-designs/templates/together.ai.md +276 -0
  493. xerxes/skills/popular-web-designs/templates/uber.md +308 -0
  494. xerxes/skills/popular-web-designs/templates/vercel.md +323 -0
  495. xerxes/skills/popular-web-designs/templates/voltagent.md +336 -0
  496. xerxes/skills/popular-web-designs/templates/warp.md +266 -0
  497. xerxes/skills/popular-web-designs/templates/webflow.md +105 -0
  498. xerxes/skills/popular-web-designs/templates/wise.md +186 -0
  499. xerxes/skills/popular-web-designs/templates/x.ai.md +270 -0
  500. xerxes/skills/popular-web-designs/templates/zapier.md +341 -0
  501. xerxes/skills/productivity/google-workspace/SKILL.md +279 -0
  502. xerxes/skills/productivity/google-workspace/references/gmail-search-syntax.md +63 -0
  503. xerxes/skills/productivity/google-workspace/scripts/google_api.py +905 -0
  504. xerxes/skills/productivity/google-workspace/scripts/gws_bridge.py +106 -0
  505. xerxes/skills/productivity/google-workspace/scripts/setup.py +395 -0
  506. xerxes/skills/productivity/linear/SKILL.md +297 -0
  507. xerxes/skills/productivity/nano-pdf/SKILL.md +51 -0
  508. xerxes/skills/productivity/notion/SKILL.md +171 -0
  509. xerxes/skills/productivity/notion/references/block-types.md +112 -0
  510. xerxes/skills/productivity/ocr-and-documents/SKILL.md +171 -0
  511. xerxes/skills/productivity/ocr-and-documents/scripts/extract_marker.py +105 -0
  512. xerxes/skills/productivity/ocr-and-documents/scripts/extract_pymupdf.py +128 -0
  513. xerxes/skills/productivity/powerpoint/LICENSE.txt +30 -0
  514. xerxes/skills/productivity/powerpoint/SKILL.md +232 -0
  515. xerxes/skills/productivity/powerpoint/editing.md +205 -0
  516. xerxes/skills/productivity/powerpoint/pptxgenjs.md +420 -0
  517. xerxes/skills/productivity/powerpoint/scripts/__init__.py +14 -0
  518. xerxes/skills/productivity/powerpoint/scripts/add_slide.py +196 -0
  519. xerxes/skills/productivity/powerpoint/scripts/clean.py +294 -0
  520. xerxes/skills/productivity/powerpoint/scripts/office/helpers/__init__.py +14 -0
  521. xerxes/skills/productivity/powerpoint/scripts/office/helpers/merge_runs.py +214 -0
  522. xerxes/skills/productivity/powerpoint/scripts/office/helpers/simplify_redlines.py +210 -0
  523. xerxes/skills/productivity/powerpoint/scripts/office/pack.py +170 -0
  524. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  525. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  526. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  527. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  528. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  529. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  530. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  531. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  532. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  533. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  534. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  535. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  536. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  537. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  538. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  539. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  540. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  541. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  542. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  543. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  544. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  545. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  546. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  547. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  548. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  549. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  550. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  551. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-contentTypes.xsd +42 -0
  552. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-coreProperties.xsd +50 -0
  553. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-digSig.xsd +49 -0
  554. xerxes/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-relationships.xsd +33 -0
  555. xerxes/skills/productivity/powerpoint/scripts/office/schemas/mce/mc.xsd +75 -0
  556. xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  557. xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  558. xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  559. xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  560. xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  561. xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  562. xerxes/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  563. xerxes/skills/research/arxiv/SKILL.md +281 -0
  564. xerxes/skills/research/arxiv/scripts/search_arxiv.py +134 -0
  565. xerxes/skills/research/blogwatcher/SKILL.md +136 -0
  566. xerxes/skills/research/dspy/SKILL.md +593 -0
  567. xerxes/skills/research/dspy/references/examples.md +663 -0
  568. xerxes/skills/research/dspy/references/modules.md +475 -0
  569. xerxes/skills/research/dspy/references/optimizers.md +566 -0
  570. xerxes/skills/research/llm-wiki/SKILL.md +460 -0
  571. xerxes/skills/research/polymarket/SKILL.md +76 -0
  572. xerxes/skills/research/polymarket/references/api-endpoints.md +220 -0
  573. xerxes/skills/research/polymarket/scripts/polymarket.py +300 -0
  574. xerxes/skills/research/research-paper-writing/SKILL.md +2375 -0
  575. xerxes/skills/research/research-paper-writing/references/autoreason-methodology.md +394 -0
  576. xerxes/skills/research/research-paper-writing/references/checklists.md +434 -0
  577. xerxes/skills/research/research-paper-writing/references/citation-workflow.md +564 -0
  578. xerxes/skills/research/research-paper-writing/references/experiment-patterns.md +728 -0
  579. xerxes/skills/research/research-paper-writing/references/human-evaluation.md +476 -0
  580. xerxes/skills/research/research-paper-writing/references/paper-types.md +481 -0
  581. xerxes/skills/research/research-paper-writing/references/reviewer-guidelines.md +433 -0
  582. xerxes/skills/research/research-paper-writing/references/sources.md +191 -0
  583. xerxes/skills/research/research-paper-writing/references/writing-guide.md +474 -0
  584. xerxes/skills/research/research-paper-writing/templates/README.md +251 -0
  585. xerxes/skills/research/research-paper-writing/templates/aaai2026/README.md +534 -0
  586. xerxes/skills/research/research-paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
  587. xerxes/skills/research/research-paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
  588. xerxes/skills/research/research-paper-writing/templates/aaai2026/aaai2026.bib +111 -0
  589. xerxes/skills/research/research-paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
  590. xerxes/skills/research/research-paper-writing/templates/aaai2026/aaai2026.sty +315 -0
  591. xerxes/skills/research/research-paper-writing/templates/acl/README.md +50 -0
  592. xerxes/skills/research/research-paper-writing/templates/acl/acl.sty +312 -0
  593. xerxes/skills/research/research-paper-writing/templates/acl/acl_latex.tex +377 -0
  594. xerxes/skills/research/research-paper-writing/templates/acl/acl_lualatex.tex +101 -0
  595. xerxes/skills/research/research-paper-writing/templates/acl/acl_natbib.bst +1940 -0
  596. xerxes/skills/research/research-paper-writing/templates/acl/anthology.bib.txt +26 -0
  597. xerxes/skills/research/research-paper-writing/templates/acl/custom.bib +70 -0
  598. xerxes/skills/research/research-paper-writing/templates/acl/formatting.md +326 -0
  599. xerxes/skills/research/research-paper-writing/templates/colm2025/README.md +3 -0
  600. xerxes/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
  601. xerxes/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
  602. xerxes/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
  603. xerxes/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
  604. xerxes/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
  605. xerxes/skills/research/research-paper-writing/templates/colm2025/fancyhdr.sty +485 -0
  606. xerxes/skills/research/research-paper-writing/templates/colm2025/math_commands.tex +508 -0
  607. xerxes/skills/research/research-paper-writing/templates/colm2025/natbib.sty +1246 -0
  608. xerxes/skills/research/research-paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
  609. xerxes/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
  610. xerxes/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
  611. xerxes/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
  612. xerxes/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
  613. xerxes/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
  614. xerxes/skills/research/research-paper-writing/templates/iclr2026/math_commands.tex +508 -0
  615. xerxes/skills/research/research-paper-writing/templates/iclr2026/natbib.sty +1246 -0
  616. xerxes/skills/research/research-paper-writing/templates/icml2026/algorithm.sty +79 -0
  617. xerxes/skills/research/research-paper-writing/templates/icml2026/algorithmic.sty +201 -0
  618. xerxes/skills/research/research-paper-writing/templates/icml2026/example_paper.bib +75 -0
  619. xerxes/skills/research/research-paper-writing/templates/icml2026/example_paper.pdf +0 -0
  620. xerxes/skills/research/research-paper-writing/templates/icml2026/example_paper.tex +662 -0
  621. xerxes/skills/research/research-paper-writing/templates/icml2026/fancyhdr.sty +864 -0
  622. xerxes/skills/research/research-paper-writing/templates/icml2026/icml2026.bst +1443 -0
  623. xerxes/skills/research/research-paper-writing/templates/icml2026/icml2026.sty +767 -0
  624. xerxes/skills/research/research-paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
  625. xerxes/skills/research/research-paper-writing/templates/neurips2025/Makefile +36 -0
  626. xerxes/skills/research/research-paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
  627. xerxes/skills/research/research-paper-writing/templates/neurips2025/main.tex +38 -0
  628. xerxes/skills/research/research-paper-writing/templates/neurips2025/neurips.sty +382 -0
  629. xerxes/skills/software-development/plan/SKILL.md +57 -0
  630. xerxes/skills/software-development/requesting-code-review/SKILL.md +282 -0
  631. xerxes/skills/software-development/subagent-driven-development/SKILL.md +342 -0
  632. xerxes/skills/software-development/systematic-debugging/SKILL.md +366 -0
  633. xerxes/skills/software-development/test-driven-development/SKILL.md +342 -0
  634. xerxes/skills/software-development/writing-plans/SKILL.md +304 -0
  635. xerxes/skills/songwriting-and-ai-music/SKILL.md +289 -0
  636. xerxes/skills/systematic-debugging/SKILL.md +358 -0
  637. xerxes/skills/training/axolotl/SKILL.md +161 -0
  638. xerxes/skills/training/axolotl/references/api.md +5548 -0
  639. xerxes/skills/training/axolotl/references/dataset-formats.md +1029 -0
  640. xerxes/skills/training/axolotl/references/index.md +15 -0
  641. xerxes/skills/training/axolotl/references/other.md +3563 -0
  642. xerxes/skills/training/grpo-rl-training/README.md +97 -0
  643. xerxes/skills/training/grpo-rl-training/SKILL.md +575 -0
  644. xerxes/skills/training/grpo-rl-training/templates/basic_grpo_training.py +195 -0
  645. xerxes/skills/training/peft/SKILL.md +434 -0
  646. xerxes/skills/training/peft/references/advanced-usage.md +514 -0
  647. xerxes/skills/training/peft/references/troubleshooting.md +480 -0
  648. xerxes/skills/training/pytorch-fsdp/SKILL.md +129 -0
  649. xerxes/skills/training/pytorch-fsdp/references/index.md +7 -0
  650. xerxes/skills/training/pytorch-fsdp/references/other.md +4261 -0
  651. xerxes/skills/training/trl-fine-tuning/SKILL.md +458 -0
  652. xerxes/skills/training/trl-fine-tuning/references/dpo-variants.md +227 -0
  653. xerxes/skills/training/trl-fine-tuning/references/online-rl.md +82 -0
  654. xerxes/skills/training/trl-fine-tuning/references/reward-modeling.md +122 -0
  655. xerxes/skills/training/trl-fine-tuning/references/sft-training.md +168 -0
  656. xerxes/skills/training/unsloth/SKILL.md +83 -0
  657. xerxes/skills/training/unsloth/references/index.md +7 -0
  658. xerxes/skills/training/unsloth/references/llms-full.md +16799 -0
  659. xerxes/skills/training/unsloth/references/llms-txt.md +12044 -0
  660. xerxes/skills/training/unsloth/references/llms.md +82 -0
  661. xerxes/skills/webhook-subscriptions/SKILL.md +180 -0
  662. xerxes/skills/xerxes-agent/SKILL.md +284 -0
  663. xerxes/streaming/__init__.py +120 -0
  664. xerxes/streaming/events.py +208 -0
  665. xerxes/streaming/loop.py +900 -0
  666. xerxes/streaming/loop_debug.py +741 -0
  667. xerxes/streaming/messages.py +284 -0
  668. xerxes/streaming/parsers/__init__.py +135 -0
  669. xerxes/streaming/parsers/common.py +103 -0
  670. xerxes/streaming/parsers/deepseek.py +55 -0
  671. xerxes/streaming/parsers/glm.py +39 -0
  672. xerxes/streaming/parsers/kimi.py +29 -0
  673. xerxes/streaming/parsers/longcat.py +29 -0
  674. xerxes/streaming/parsers/mistral.py +56 -0
  675. xerxes/streaming/parsers/qwen.py +39 -0
  676. xerxes/streaming/permissions.py +224 -0
  677. xerxes/streaming/prompt_caching.py +98 -0
  678. xerxes/streaming/responses_api.py +117 -0
  679. xerxes/streaming/sse.py +142 -0
  680. xerxes/streaming/tool_call_ids.py +59 -0
  681. xerxes/streaming/wire_events.py +1006 -0
  682. xerxes/tools/__init__.py +538 -0
  683. xerxes/tools/agent_memory_tool.py +145 -0
  684. xerxes/tools/agent_meta_tools.py +460 -0
  685. xerxes/tools/ai_tools.py +870 -0
  686. xerxes/tools/browser_tools.py +809 -0
  687. xerxes/tools/clarify_tool.py +129 -0
  688. xerxes/tools/claude_tools.py +1660 -0
  689. xerxes/tools/coding_tools.py +918 -0
  690. xerxes/tools/data_tools.py +668 -0
  691. xerxes/tools/duckduckgo_engine.py +499 -0
  692. xerxes/tools/google_search.py +451 -0
  693. xerxes/tools/history_tool.py +130 -0
  694. xerxes/tools/home_assistant_tools.py +433 -0
  695. xerxes/tools/image_generation_tool.py +116 -0
  696. xerxes/tools/math_tools.py +822 -0
  697. xerxes/tools/media_tools.py +366 -0
  698. xerxes/tools/memory_crud.py +136 -0
  699. xerxes/tools/memory_tool.py +593 -0
  700. xerxes/tools/rl_tools.py +681 -0
  701. xerxes/tools/send_message_tool.py +101 -0
  702. xerxes/tools/skill_manage_tool.py +151 -0
  703. xerxes/tools/standalone.py +316 -0
  704. xerxes/tools/system_tools.py +672 -0
  705. xerxes/tools/transcription_tool.py +121 -0
  706. xerxes/tools/tts_tool.py +190 -0
  707. xerxes/tools/vision_tool.py +138 -0
  708. xerxes/tools/voice_mode.py +212 -0
  709. xerxes/tools/web_tools.py +437 -0
  710. xerxes/tools/workspace_tools.py +178 -0
  711. xerxes/training/__init__.py +30 -0
  712. xerxes/training/batch_runner.py +212 -0
  713. xerxes/training/rl/__init__.py +42 -0
  714. xerxes/training/rl/envs.py +108 -0
  715. xerxes/training/rl/status.py +79 -0
  716. xerxes/training/rl/tinker_client.py +157 -0
  717. xerxes/training/rl/wandb_hook.py +70 -0
  718. xerxes/training/trajectory_compressor.py +172 -0
  719. xerxes/tui/__init__.py +23 -0
  720. xerxes/tui/app.py +1146 -0
  721. xerxes/tui/at_mentions.py +315 -0
  722. xerxes/tui/banner.py +120 -0
  723. xerxes/tui/blocks.py +663 -0
  724. xerxes/tui/clipboard.py +139 -0
  725. xerxes/tui/clipboard_attach.py +129 -0
  726. xerxes/tui/console.py +361 -0
  727. xerxes/tui/context_bar.py +70 -0
  728. xerxes/tui/engine.py +545 -0
  729. xerxes/tui/input_buffer.py +138 -0
  730. xerxes/tui/panel_state.py +194 -0
  731. xerxes/tui/prompt.py +1107 -0
  732. xerxes/tui/reasoning_filter.py +141 -0
  733. xerxes/tui/skin_engine.py +239 -0
  734. xerxes/tui/status_bar.py +136 -0
  735. xerxes/tui/tips.py +199 -0
  736. xerxes/tui/voice_keys.py +160 -0
  737. xerxes/types/__init__.py +121 -0
  738. xerxes/types/agent_types.py +387 -0
  739. xerxes/types/converters.py +162 -0
  740. xerxes/types/function_execution_types.py +480 -0
  741. xerxes/types/messages.py +690 -0
  742. xerxes/types/oai_protocols.py +510 -0
  743. xerxes/types/tool_calls.py +175 -0
  744. xerxes/xerxes.py +2297 -0
  745. xerxes_agent-0.2.0.dist-info/METADATA +593 -0
  746. xerxes_agent-0.2.0.dist-info/RECORD +749 -0
  747. xerxes_agent-0.2.0.dist-info/WHEEL +4 -0
  748. xerxes_agent-0.2.0.dist-info/entry_points.txt +2 -0
  749. 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()
@@ -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"]