illusion-agent 0.3.3__tar.gz

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 (590) hide show
  1. illusion_agent-0.3.3/.github/workflows/publish.yml +47 -0
  2. illusion_agent-0.3.3/.gitignore +72 -0
  3. illusion_agent-0.3.3/.python-version +1 -0
  4. illusion_agent-0.3.3/LICENSE +21 -0
  5. illusion_agent-0.3.3/PKG-INFO +215 -0
  6. illusion_agent-0.3.3/README.md +157 -0
  7. illusion_agent-0.3.3/README.zh-CN.md +154 -0
  8. illusion_agent-0.3.3/docs/en/architecture.md +136 -0
  9. illusion_agent-0.3.3/docs/en/channels.md +399 -0
  10. illusion_agent-0.3.3/docs/en/commands.md +239 -0
  11. illusion_agent-0.3.3/docs/en/extensions.md +449 -0
  12. illusion_agent-0.3.3/docs/en/getting-started.md +227 -0
  13. illusion_agent-0.3.3/docs/en/introduction.md +85 -0
  14. illusion_agent-0.3.3/docs/en/project-files.md +121 -0
  15. illusion_agent-0.3.3/docs/en/settings.md +467 -0
  16. illusion_agent-0.3.3/docs/images/illusion-agent.png +0 -0
  17. illusion_agent-0.3.3/docs/images/image1.png +0 -0
  18. illusion_agent-0.3.3/docs/images/image2.png +0 -0
  19. illusion_agent-0.3.3/docs/zh-CN/architecture.md +138 -0
  20. illusion_agent-0.3.3/docs/zh-CN/channels.md +400 -0
  21. illusion_agent-0.3.3/docs/zh-CN/commands.md +241 -0
  22. illusion_agent-0.3.3/docs/zh-CN/extensions.md +658 -0
  23. illusion_agent-0.3.3/docs/zh-CN/getting-started.md +229 -0
  24. illusion_agent-0.3.3/docs/zh-CN/introduction.md +86 -0
  25. illusion_agent-0.3.3/docs/zh-CN/project-files.md +165 -0
  26. illusion_agent-0.3.3/docs/zh-CN/settings.md +467 -0
  27. illusion_agent-0.3.3/frontend/terminal/build.mjs +34 -0
  28. illusion_agent-0.3.3/frontend/terminal/package-lock.json +1763 -0
  29. illusion_agent-0.3.3/frontend/terminal/package.json +28 -0
  30. illusion_agent-0.3.3/frontend/terminal/src/App.tsx +811 -0
  31. illusion_agent-0.3.3/frontend/terminal/src/components/CommandPicker.tsx +135 -0
  32. illusion_agent-0.3.3/frontend/terminal/src/components/Composer.tsx +87 -0
  33. illusion_agent-0.3.3/frontend/terminal/src/components/ComposerController.tsx +155 -0
  34. illusion_agent-0.3.3/frontend/terminal/src/components/ConversationView.tsx +710 -0
  35. illusion_agent-0.3.3/frontend/terminal/src/components/CustomInputModal.tsx +83 -0
  36. illusion_agent-0.3.3/frontend/terminal/src/components/Footer.tsx +49 -0
  37. illusion_agent-0.3.3/frontend/terminal/src/components/MarkdownContent.tsx +573 -0
  38. illusion_agent-0.3.3/frontend/terminal/src/components/MarkdownTable.tsx +262 -0
  39. illusion_agent-0.3.3/frontend/terminal/src/components/ModalHost.tsx +985 -0
  40. illusion_agent-0.3.3/frontend/terminal/src/components/MultilineTextInput.tsx +327 -0
  41. illusion_agent-0.3.3/frontend/terminal/src/components/PromptInput.tsx +91 -0
  42. illusion_agent-0.3.3/frontend/terminal/src/components/QuestionNavigationBar.tsx +98 -0
  43. illusion_agent-0.3.3/frontend/terminal/src/components/QuestionPreviewBox.tsx +135 -0
  44. illusion_agent-0.3.3/frontend/terminal/src/components/SelectModal.tsx +122 -0
  45. illusion_agent-0.3.3/frontend/terminal/src/components/SidePanel.tsx +226 -0
  46. illusion_agent-0.3.3/frontend/terminal/src/components/Spinner.tsx +102 -0
  47. illusion_agent-0.3.3/frontend/terminal/src/components/StatusBar.tsx +175 -0
  48. illusion_agent-0.3.3/frontend/terminal/src/components/SwarmPanel.tsx +168 -0
  49. illusion_agent-0.3.3/frontend/terminal/src/components/TodoPanel.tsx +181 -0
  50. illusion_agent-0.3.3/frontend/terminal/src/components/ToolCallDisplay.tsx +116 -0
  51. illusion_agent-0.3.3/frontend/terminal/src/components/TranscriptPane.tsx +99 -0
  52. illusion_agent-0.3.3/frontend/terminal/src/components/WelcomeBanner.tsx +55 -0
  53. illusion_agent-0.3.3/frontend/terminal/src/hooks/useAnimationFrame.ts +63 -0
  54. illusion_agent-0.3.3/frontend/terminal/src/hooks/useBackendSession.ts +688 -0
  55. illusion_agent-0.3.3/frontend/terminal/src/hooks/useBlink.ts +31 -0
  56. illusion_agent-0.3.3/frontend/terminal/src/hooks/useQuestionState.ts +234 -0
  57. illusion_agent-0.3.3/frontend/terminal/src/hooks/useTerminalSize.ts +25 -0
  58. illusion_agent-0.3.3/frontend/terminal/src/i18n.ts +174 -0
  59. illusion_agent-0.3.3/frontend/terminal/src/index.tsx +72 -0
  60. illusion_agent-0.3.3/frontend/terminal/src/theme/ThemeContext.tsx +49 -0
  61. illusion_agent-0.3.3/frontend/terminal/src/theme/builtinThemes.ts +148 -0
  62. illusion_agent-0.3.3/frontend/terminal/src/tools/ToolInterface.ts +62 -0
  63. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/AgentTool.ts +63 -0
  64. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/BashTool.ts +88 -0
  65. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/CronTool.ts +23 -0
  66. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/EditTool.ts +64 -0
  67. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/GenericTool.ts +49 -0
  68. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/LspTool.ts +35 -0
  69. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/McpTool.ts +25 -0
  70. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/NotebookTool.ts +25 -0
  71. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/PlanTool.ts +21 -0
  72. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/ReadTool.ts +74 -0
  73. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/SearchTool.ts +97 -0
  74. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/SkillTool.ts +22 -0
  75. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/TaskTool.ts +14 -0
  76. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/WebTool.ts +51 -0
  77. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/WorktreeTool.ts +18 -0
  78. illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/WriteTool.ts +51 -0
  79. illusion_agent-0.3.3/frontend/terminal/src/tools/registry.ts +188 -0
  80. illusion_agent-0.3.3/frontend/terminal/src/types.ts +288 -0
  81. illusion_agent-0.3.3/frontend/terminal/src/utils/Cursor.ts +297 -0
  82. illusion_agent-0.3.3/frontend/terminal/src/utils/MeasuredText.ts +264 -0
  83. illusion_agent-0.3.3/frontend/terminal/src/utils/markdown.ts +127 -0
  84. illusion_agent-0.3.3/frontend/terminal/src/utils/thinking.ts +191 -0
  85. illusion_agent-0.3.3/frontend/terminal/src/version.ts +9 -0
  86. illusion_agent-0.3.3/frontend/terminal/tsconfig.json +13 -0
  87. illusion_agent-0.3.3/frontend/web/index.html +27 -0
  88. illusion_agent-0.3.3/frontend/web/package-lock.json +4522 -0
  89. illusion_agent-0.3.3/frontend/web/package.json +31 -0
  90. illusion_agent-0.3.3/frontend/web/postcss.config.js +6 -0
  91. illusion_agent-0.3.3/frontend/web/src/App.tsx +521 -0
  92. illusion_agent-0.3.3/frontend/web/src/components/ChatArea.tsx +457 -0
  93. illusion_agent-0.3.3/frontend/web/src/components/ErrorBoundary.tsx +103 -0
  94. illusion_agent-0.3.3/frontend/web/src/components/MessageBubble.tsx +525 -0
  95. illusion_agent-0.3.3/frontend/web/src/components/ModalCard.tsx +603 -0
  96. illusion_agent-0.3.3/frontend/web/src/components/PromptInput.tsx +336 -0
  97. illusion_agent-0.3.3/frontend/web/src/components/RightPanel.tsx +272 -0
  98. illusion_agent-0.3.3/frontend/web/src/components/Sidebar.tsx +216 -0
  99. illusion_agent-0.3.3/frontend/web/src/components/TodoPanel.tsx +171 -0
  100. illusion_agent-0.3.3/frontend/web/src/components/Toolbar.tsx +125 -0
  101. illusion_agent-0.3.3/frontend/web/src/components/WelcomeScreen.tsx +76 -0
  102. illusion_agent-0.3.3/frontend/web/src/hooks/useTheme.ts +89 -0
  103. illusion_agent-0.3.3/frontend/web/src/hooks/useWebSocketSession.ts +542 -0
  104. illusion_agent-0.3.3/frontend/web/src/i18n.ts +221 -0
  105. illusion_agent-0.3.3/frontend/web/src/index.css +802 -0
  106. illusion_agent-0.3.3/frontend/web/src/main.tsx +31 -0
  107. illusion_agent-0.3.3/frontend/web/src/remarkSuperscript.ts +39 -0
  108. illusion_agent-0.3.3/frontend/web/src/types/protocol.ts +374 -0
  109. illusion_agent-0.3.3/frontend/web/src/utils/toolDisplayName.ts +138 -0
  110. illusion_agent-0.3.3/frontend/web/src/version.ts +9 -0
  111. illusion_agent-0.3.3/frontend/web/src/vite-env.d.ts +1 -0
  112. illusion_agent-0.3.3/frontend/web/tailwind.config.js +116 -0
  113. illusion_agent-0.3.3/frontend/web/tsconfig.json +22 -0
  114. illusion_agent-0.3.3/frontend/web/tsconfig.node.json +13 -0
  115. illusion_agent-0.3.3/frontend/web/vite.config.ts +32 -0
  116. illusion_agent-0.3.3/pyproject.toml +107 -0
  117. illusion_agent-0.3.3/scripts/build_frontend.py +121 -0
  118. illusion_agent-0.3.3/scripts/hatch_build.py +117 -0
  119. illusion_agent-0.3.3/scripts/sync_version.py +183 -0
  120. illusion_agent-0.3.3/skills/illusion-usage/SKILL.md +420 -0
  121. illusion_agent-0.3.3/src/illusion/__init__.py +26 -0
  122. illusion_agent-0.3.3/src/illusion/__main__.py +15 -0
  123. illusion_agent-0.3.3/src/illusion/api/__init__.py +33 -0
  124. illusion_agent-0.3.3/src/illusion/api/auth_status.py +53 -0
  125. illusion_agent-0.3.3/src/illusion/api/client.py +513 -0
  126. illusion_agent-0.3.3/src/illusion/api/codex_client.py +592 -0
  127. illusion_agent-0.3.3/src/illusion/api/compat.py +138 -0
  128. illusion_agent-0.3.3/src/illusion/api/effort.py +129 -0
  129. illusion_agent-0.3.3/src/illusion/api/errors.py +57 -0
  130. illusion_agent-0.3.3/src/illusion/api/openai_client.py +1199 -0
  131. illusion_agent-0.3.3/src/illusion/api/usage.py +45 -0
  132. illusion_agent-0.3.3/src/illusion/auth/__init__.py +38 -0
  133. illusion_agent-0.3.3/src/illusion/auth/codex_oauth.py +635 -0
  134. illusion_agent-0.3.3/src/illusion/auth/copilot.py +421 -0
  135. illusion_agent-0.3.3/src/illusion/auth/flows.py +58 -0
  136. illusion_agent-0.3.3/src/illusion/auth/manager.py +208 -0
  137. illusion_agent-0.3.3/src/illusion/auth/storage.py +175 -0
  138. illusion_agent-0.3.3/src/illusion/bridge/__init__.py +38 -0
  139. illusion_agent-0.3.3/src/illusion/bridge/manager.py +190 -0
  140. illusion_agent-0.3.3/src/illusion/bridge/session_runner.py +84 -0
  141. illusion_agent-0.3.3/src/illusion/bridge/types.py +112 -0
  142. illusion_agent-0.3.3/src/illusion/bridge/work_secret.py +131 -0
  143. illusion_agent-0.3.3/src/illusion/channels/__init__.py +1056 -0
  144. illusion_agent-0.3.3/src/illusion/channels/base.py +271 -0
  145. illusion_agent-0.3.3/src/illusion/channels/base_commands.py +208 -0
  146. illusion_agent-0.3.3/src/illusion/channels/config.py +237 -0
  147. illusion_agent-0.3.3/src/illusion/channels/delivery.py +760 -0
  148. illusion_agent-0.3.3/src/illusion/channels/exit_handler.py +37 -0
  149. illusion_agent-0.3.3/src/illusion/channels/feishu/__init__.py +43 -0
  150. illusion_agent-0.3.3/src/illusion/channels/feishu/adapter.py +685 -0
  151. illusion_agent-0.3.3/src/illusion/channels/feishu/commands.py +15 -0
  152. illusion_agent-0.3.3/src/illusion/channels/feishu/messaging.py +913 -0
  153. illusion_agent-0.3.3/src/illusion/channels/feishu/session_map.py +286 -0
  154. illusion_agent-0.3.3/src/illusion/channels/feishu/streaming.py +416 -0
  155. illusion_agent-0.3.3/src/illusion/channels/feishu/ws_client.py +273 -0
  156. illusion_agent-0.3.3/src/illusion/channels/pid.py +129 -0
  157. illusion_agent-0.3.3/src/illusion/channels/qq/__init__.py +44 -0
  158. illusion_agent-0.3.3/src/illusion/channels/qq/adapter.py +819 -0
  159. illusion_agent-0.3.3/src/illusion/channels/qq/api.py +848 -0
  160. illusion_agent-0.3.3/src/illusion/channels/qq/commands.py +15 -0
  161. illusion_agent-0.3.3/src/illusion/channels/qq/session_map.py +210 -0
  162. illusion_agent-0.3.3/src/illusion/channels/qq/streaming.py +377 -0
  163. illusion_agent-0.3.3/src/illusion/channels/qq/ws_client.py +519 -0
  164. illusion_agent-0.3.3/src/illusion/channels/registry.py +254 -0
  165. illusion_agent-0.3.3/src/illusion/channels/serve.py +414 -0
  166. illusion_agent-0.3.3/src/illusion/channels/tools/__init__.py +8 -0
  167. illusion_agent-0.3.3/src/illusion/channels/tools/cross_channel.py +346 -0
  168. illusion_agent-0.3.3/src/illusion/channels/tools/feishu_doc.py +358 -0
  169. illusion_agent-0.3.3/src/illusion/channels/tools/feishu_drive.py +436 -0
  170. illusion_agent-0.3.3/src/illusion/channels/tools/media.py +215 -0
  171. illusion_agent-0.3.3/src/illusion/channels/weixin/__init__.py +47 -0
  172. illusion_agent-0.3.3/src/illusion/channels/weixin/adapter.py +1064 -0
  173. illusion_agent-0.3.3/src/illusion/channels/weixin/commands.py +15 -0
  174. illusion_agent-0.3.3/src/illusion/channels/weixin/ilink_api.py +1032 -0
  175. illusion_agent-0.3.3/src/illusion/channels/weixin/session_map.py +226 -0
  176. illusion_agent-0.3.3/src/illusion/cli.py +1894 -0
  177. illusion_agent-0.3.3/src/illusion/commands/__init__.py +32 -0
  178. illusion_agent-0.3.3/src/illusion/commands/auth.py +67 -0
  179. illusion_agent-0.3.3/src/illusion/commands/bridge.py +75 -0
  180. illusion_agent-0.3.3/src/illusion/commands/context.py +75 -0
  181. illusion_agent-0.3.3/src/illusion/commands/git.py +54 -0
  182. illusion_agent-0.3.3/src/illusion/commands/helpers.py +170 -0
  183. illusion_agent-0.3.3/src/illusion/commands/init/__init__.py +20 -0
  184. illusion_agent-0.3.3/src/illusion/commands/init/analysis/__init__.py +1 -0
  185. illusion_agent-0.3.3/src/illusion/commands/init/analysis/architecture.py +180 -0
  186. illusion_agent-0.3.3/src/illusion/commands/init/analysis/conventions.py +231 -0
  187. illusion_agent-0.3.3/src/illusion/commands/init/analysis/dependencies.py +173 -0
  188. illusion_agent-0.3.3/src/illusion/commands/init/analysis/key_modules.py +109 -0
  189. illusion_agent-0.3.3/src/illusion/commands/init/extraction/__init__.py +1 -0
  190. illusion_agent-0.3.3/src/illusion/commands/init/extraction/lsp_symbols.py +167 -0
  191. illusion_agent-0.3.3/src/illusion/commands/init/extraction/readme.py +138 -0
  192. illusion_agent-0.3.3/src/illusion/commands/init/extraction/scanner.py +522 -0
  193. illusion_agent-0.3.3/src/illusion/commands/init/generation/__init__.py +1 -0
  194. illusion_agent-0.3.3/src/illusion/commands/init/generation/claudemd.py +240 -0
  195. illusion_agent-0.3.3/src/illusion/commands/init/generation/illusionmd.py +125 -0
  196. illusion_agent-0.3.3/src/illusion/commands/init/generation/memory_template.py +81 -0
  197. illusion_agent-0.3.3/src/illusion/commands/init/generation/rules.py +110 -0
  198. illusion_agent-0.3.3/src/illusion/commands/init/generation/sections.py +73 -0
  199. illusion_agent-0.3.3/src/illusion/commands/init/orchestrator.py +255 -0
  200. illusion_agent-0.3.3/src/illusion/commands/init/types.py +96 -0
  201. illusion_agent-0.3.3/src/illusion/commands/mcp.py +63 -0
  202. illusion_agent-0.3.3/src/illusion/commands/memory.py +54 -0
  203. illusion_agent-0.3.3/src/illusion/commands/misc.py +391 -0
  204. illusion_agent-0.3.3/src/illusion/commands/model.py +62 -0
  205. illusion_agent-0.3.3/src/illusion/commands/plugin.py +40 -0
  206. illusion_agent-0.3.3/src/illusion/commands/registry.py +293 -0
  207. illusion_agent-0.3.3/src/illusion/commands/rules.py +71 -0
  208. illusion_agent-0.3.3/src/illusion/commands/sandbox.py +128 -0
  209. illusion_agent-0.3.3/src/illusion/commands/session.py +338 -0
  210. illusion_agent-0.3.3/src/illusion/commands/settings.py +320 -0
  211. illusion_agent-0.3.3/src/illusion/commands/types.py +72 -0
  212. illusion_agent-0.3.3/src/illusion/config/__init__.py +39 -0
  213. illusion_agent-0.3.3/src/illusion/config/i18n.py +880 -0
  214. illusion_agent-0.3.3/src/illusion/config/paths.py +326 -0
  215. illusion_agent-0.3.3/src/illusion/config/plan_file.py +185 -0
  216. illusion_agent-0.3.3/src/illusion/config/settings.py +546 -0
  217. illusion_agent-0.3.3/src/illusion/coordinator/__init__.py +41 -0
  218. illusion_agent-0.3.3/src/illusion/coordinator/agent_definitions.py +1069 -0
  219. illusion_agent-0.3.3/src/illusion/coordinator/coordinator_mode.py +125 -0
  220. illusion_agent-0.3.3/src/illusion/daemon_ipc.py +937 -0
  221. illusion_agent-0.3.3/src/illusion/engine/__init__.py +95 -0
  222. illusion_agent-0.3.3/src/illusion/engine/cost_tracker.py +55 -0
  223. illusion_agent-0.3.3/src/illusion/engine/messages.py +380 -0
  224. illusion_agent-0.3.3/src/illusion/engine/query.py +1061 -0
  225. illusion_agent-0.3.3/src/illusion/engine/query_engine.py +422 -0
  226. illusion_agent-0.3.3/src/illusion/engine/stream_events.py +191 -0
  227. illusion_agent-0.3.3/src/illusion/hooks/__init__.py +59 -0
  228. illusion_agent-0.3.3/src/illusion/hooks/events.py +43 -0
  229. illusion_agent-0.3.3/src/illusion/hooks/executor.py +467 -0
  230. illusion_agent-0.3.3/src/illusion/hooks/hot_reload.py +74 -0
  231. illusion_agent-0.3.3/src/illusion/hooks/loader.py +134 -0
  232. illusion_agent-0.3.3/src/illusion/hooks/register_hooks.py +58 -0
  233. illusion_agent-0.3.3/src/illusion/hooks/schemas.py +129 -0
  234. illusion_agent-0.3.3/src/illusion/hooks/session_hooks.py +117 -0
  235. illusion_agent-0.3.3/src/illusion/hooks/types.py +168 -0
  236. illusion_agent-0.3.3/src/illusion/hooks/utils.py +13 -0
  237. illusion_agent-0.3.3/src/illusion/mcp/__init__.py +111 -0
  238. illusion_agent-0.3.3/src/illusion/mcp/client.py +518 -0
  239. illusion_agent-0.3.3/src/illusion/mcp/config.py +246 -0
  240. illusion_agent-0.3.3/src/illusion/mcp/types.py +246 -0
  241. illusion_agent-0.3.3/src/illusion/memory/__init__.py +42 -0
  242. illusion_agent-0.3.3/src/illusion/memory/manager.py +138 -0
  243. illusion_agent-0.3.3/src/illusion/memory/memdir.py +58 -0
  244. illusion_agent-0.3.3/src/illusion/memory/paths.py +85 -0
  245. illusion_agent-0.3.3/src/illusion/memory/scan.py +120 -0
  246. illusion_agent-0.3.3/src/illusion/memory/search.py +83 -0
  247. illusion_agent-0.3.3/src/illusion/memory/types.py +43 -0
  248. illusion_agent-0.3.3/src/illusion/output_styles/__init__.py +15 -0
  249. illusion_agent-0.3.3/src/illusion/output_styles/loader.py +64 -0
  250. illusion_agent-0.3.3/src/illusion/permissions/__init__.py +73 -0
  251. illusion_agent-0.3.3/src/illusion/permissions/checker.py +276 -0
  252. illusion_agent-0.3.3/src/illusion/permissions/loader.py +87 -0
  253. illusion_agent-0.3.3/src/illusion/permissions/modes.py +38 -0
  254. illusion_agent-0.3.3/src/illusion/permissions/schemas.py +40 -0
  255. illusion_agent-0.3.3/src/illusion/platforms.py +149 -0
  256. illusion_agent-0.3.3/src/illusion/plugins/__init__.py +78 -0
  257. illusion_agent-0.3.3/src/illusion/plugins/installer.py +59 -0
  258. illusion_agent-0.3.3/src/illusion/plugins/loader.py +302 -0
  259. illusion_agent-0.3.3/src/illusion/plugins/options.py +45 -0
  260. illusion_agent-0.3.3/src/illusion/plugins/schemas.py +33 -0
  261. illusion_agent-0.3.3/src/illusion/plugins/types.py +57 -0
  262. illusion_agent-0.3.3/src/illusion/prompts/__init__.py +31 -0
  263. illusion_agent-0.3.3/src/illusion/prompts/channel_hints.py +232 -0
  264. illusion_agent-0.3.3/src/illusion/prompts/claudemd.py +111 -0
  265. illusion_agent-0.3.3/src/illusion/prompts/context.py +246 -0
  266. illusion_agent-0.3.3/src/illusion/prompts/environment.py +192 -0
  267. illusion_agent-0.3.3/src/illusion/prompts/system_prompt.py +154 -0
  268. illusion_agent-0.3.3/src/illusion/sandbox/__init__.py +32 -0
  269. illusion_agent-0.3.3/src/illusion/sandbox/adapter.py +286 -0
  270. illusion_agent-0.3.3/src/illusion/sandbox/platforms/__init__.py +1 -0
  271. illusion_agent-0.3.3/src/illusion/sandbox/platforms/base.py +69 -0
  272. illusion_agent-0.3.3/src/illusion/sandbox/platforms/linux.py +69 -0
  273. illusion_agent-0.3.3/src/illusion/sandbox/platforms/macos.py +128 -0
  274. illusion_agent-0.3.3/src/illusion/sandbox/platforms/windows.py +182 -0
  275. illusion_agent-0.3.3/src/illusion/sandbox/proxy/__init__.py +1 -0
  276. illusion_agent-0.3.3/src/illusion/sandbox/proxy/env_vars.py +58 -0
  277. illusion_agent-0.3.3/src/illusion/sandbox/runtime.py +213 -0
  278. illusion_agent-0.3.3/src/illusion/sandbox/symlink_protection.py +76 -0
  279. illusion_agent-0.3.3/src/illusion/sandbox/utils.py +93 -0
  280. illusion_agent-0.3.3/src/illusion/sandbox/violation_store.py +89 -0
  281. illusion_agent-0.3.3/src/illusion/services/__init__.py +59 -0
  282. illusion_agent-0.3.3/src/illusion/services/compact/__init__.py +102 -0
  283. illusion_agent-0.3.3/src/illusion/services/compact/auto_compact.py +100 -0
  284. illusion_agent-0.3.3/src/illusion/services/compact/compact_core.py +165 -0
  285. illusion_agent-0.3.3/src/illusion/services/compact/compact_prompt.py +50 -0
  286. illusion_agent-0.3.3/src/illusion/services/compact/constants.py +83 -0
  287. illusion_agent-0.3.3/src/illusion/services/compact/message_ops.py +185 -0
  288. illusion_agent-0.3.3/src/illusion/services/compact/microcompact.py +125 -0
  289. illusion_agent-0.3.3/src/illusion/services/compact/models.py +30 -0
  290. illusion_agent-0.3.3/src/illusion/services/compact/token_utils.py +125 -0
  291. illusion_agent-0.3.3/src/illusion/services/cron.py +345 -0
  292. illusion_agent-0.3.3/src/illusion/services/cron_scheduler.py +825 -0
  293. illusion_agent-0.3.3/src/illusion/services/cron_serve.py +128 -0
  294. illusion_agent-0.3.3/src/illusion/services/cron_spawn.py +220 -0
  295. illusion_agent-0.3.3/src/illusion/services/file_history.py +256 -0
  296. illusion_agent-0.3.3/src/illusion/services/lsp/__init__.py +21 -0
  297. illusion_agent-0.3.3/src/illusion/services/lsp/client.py +324 -0
  298. illusion_agent-0.3.3/src/illusion/services/lsp/config.py +96 -0
  299. illusion_agent-0.3.3/src/illusion/services/lsp/manager.py +223 -0
  300. illusion_agent-0.3.3/src/illusion/services/lsp/types.py +70 -0
  301. illusion_agent-0.3.3/src/illusion/services/session_storage.py +496 -0
  302. illusion_agent-0.3.3/src/illusion/services/token_estimation.py +72 -0
  303. illusion_agent-0.3.3/src/illusion/skills/__init__.py +66 -0
  304. illusion_agent-0.3.3/src/illusion/skills/bundled/__init__.py +110 -0
  305. illusion_agent-0.3.3/src/illusion/skills/bundled/content/illusion-print-mode.md +198 -0
  306. illusion_agent-0.3.3/src/illusion/skills/bundled/content/remember.md +105 -0
  307. illusion_agent-0.3.3/src/illusion/skills/bundled/content/skillify.md +113 -0
  308. illusion_agent-0.3.3/src/illusion/skills/bundled/content/update-config.md +778 -0
  309. illusion_agent-0.3.3/src/illusion/skills/loader.py +353 -0
  310. illusion_agent-0.3.3/src/illusion/skills/registry.py +40 -0
  311. illusion_agent-0.3.3/src/illusion/skills/types.py +31 -0
  312. illusion_agent-0.3.3/src/illusion/state/__init__.py +18 -0
  313. illusion_agent-0.3.3/src/illusion/state/app_state.py +65 -0
  314. illusion_agent-0.3.3/src/illusion/state/store.py +93 -0
  315. illusion_agent-0.3.3/src/illusion/swarm/__init__.py +71 -0
  316. illusion_agent-0.3.3/src/illusion/swarm/agent_executor.py +949 -0
  317. illusion_agent-0.3.3/src/illusion/swarm/in_process.py +293 -0
  318. illusion_agent-0.3.3/src/illusion/swarm/subprocess_backend.py +133 -0
  319. illusion_agent-0.3.3/src/illusion/swarm/team_helpers.py +123 -0
  320. illusion_agent-0.3.3/src/illusion/swarm/types.py +162 -0
  321. illusion_agent-0.3.3/src/illusion/swarm/worktree.py +350 -0
  322. illusion_agent-0.3.3/src/illusion/tasks/__init__.py +33 -0
  323. illusion_agent-0.3.3/src/illusion/tasks/local_agent_task.py +42 -0
  324. illusion_agent-0.3.3/src/illusion/tasks/local_shell_task.py +27 -0
  325. illusion_agent-0.3.3/src/illusion/tasks/manager.py +520 -0
  326. illusion_agent-0.3.3/src/illusion/tasks/stop_task.py +21 -0
  327. illusion_agent-0.3.3/src/illusion/tasks/types.py +98 -0
  328. illusion_agent-0.3.3/src/illusion/tools/__init__.py +121 -0
  329. illusion_agent-0.3.3/src/illusion/tools/agent_tool.py +454 -0
  330. illusion_agent-0.3.3/src/illusion/tools/ask_user_question_tool.py +185 -0
  331. illusion_agent-0.3.3/src/illusion/tools/base.py +163 -0
  332. illusion_agent-0.3.3/src/illusion/tools/bash_tool.py +500 -0
  333. illusion_agent-0.3.3/src/illusion/tools/config_tool.py +91 -0
  334. illusion_agent-0.3.3/src/illusion/tools/cron_tool.py +561 -0
  335. illusion_agent-0.3.3/src/illusion/tools/enter_plan_mode_tool.py +165 -0
  336. illusion_agent-0.3.3/src/illusion/tools/enter_worktree_tool.py +194 -0
  337. illusion_agent-0.3.3/src/illusion/tools/exit_plan_mode_tool.py +130 -0
  338. illusion_agent-0.3.3/src/illusion/tools/exit_worktree_tool.py +216 -0
  339. illusion_agent-0.3.3/src/illusion/tools/file_edit_tool.py +349 -0
  340. illusion_agent-0.3.3/src/illusion/tools/file_read_tool.py +358 -0
  341. illusion_agent-0.3.3/src/illusion/tools/file_write_tool.py +217 -0
  342. illusion_agent-0.3.3/src/illusion/tools/glob_tool.py +160 -0
  343. illusion_agent-0.3.3/src/illusion/tools/grep_tool.py +193 -0
  344. illusion_agent-0.3.3/src/illusion/tools/list_mcp_resources_tool.py +82 -0
  345. illusion_agent-0.3.3/src/illusion/tools/lsp_formatters.py +277 -0
  346. illusion_agent-0.3.3/src/illusion/tools/lsp_schemas.py +78 -0
  347. illusion_agent-0.3.3/src/illusion/tools/lsp_tool.py +377 -0
  348. illusion_agent-0.3.3/src/illusion/tools/mcp_auth_tool.py +110 -0
  349. illusion_agent-0.3.3/src/illusion/tools/mcp_tool.py +81 -0
  350. illusion_agent-0.3.3/src/illusion/tools/notebook_edit_tool.py +293 -0
  351. illusion_agent-0.3.3/src/illusion/tools/powershell_tool.py +442 -0
  352. illusion_agent-0.3.3/src/illusion/tools/read_mcp_resource_tool.py +64 -0
  353. illusion_agent-0.3.3/src/illusion/tools/repl_tool.py +100 -0
  354. illusion_agent-0.3.3/src/illusion/tools/send_message_tool.py +116 -0
  355. illusion_agent-0.3.3/src/illusion/tools/shell_common.py +186 -0
  356. illusion_agent-0.3.3/src/illusion/tools/skill_tool.py +122 -0
  357. illusion_agent-0.3.3/src/illusion/tools/sleep_tool.py +62 -0
  358. illusion_agent-0.3.3/src/illusion/tools/task_output_tool.py +68 -0
  359. illusion_agent-0.3.3/src/illusion/tools/task_stop_tool.py +76 -0
  360. illusion_agent-0.3.3/src/illusion/tools/team_create_tool.py +236 -0
  361. illusion_agent-0.3.3/src/illusion/tools/team_delete_tool.py +104 -0
  362. illusion_agent-0.3.3/src/illusion/tools/todo_write_tool.py +198 -0
  363. illusion_agent-0.3.3/src/illusion/tools/web_fetch_tool.py +300 -0
  364. illusion_agent-0.3.3/src/illusion/tools/web_search_tool.py +186 -0
  365. illusion_agent-0.3.3/src/illusion/ui/__init__.py +23 -0
  366. illusion_agent-0.3.3/src/illusion/ui/app.py +710 -0
  367. illusion_agent-0.3.3/src/illusion/ui/backend_host.py +1655 -0
  368. illusion_agent-0.3.3/src/illusion/ui/input.py +88 -0
  369. illusion_agent-0.3.3/src/illusion/ui/output.py +366 -0
  370. illusion_agent-0.3.3/src/illusion/ui/permission_dialog.py +47 -0
  371. illusion_agent-0.3.3/src/illusion/ui/permission_store.py +101 -0
  372. illusion_agent-0.3.3/src/illusion/ui/protocol.py +450 -0
  373. illusion_agent-0.3.3/src/illusion/ui/react_launcher.py +278 -0
  374. illusion_agent-0.3.3/src/illusion/ui/runtime.py +1062 -0
  375. illusion_agent-0.3.3/src/illusion/ui/terminal_io.py +320 -0
  376. illusion_agent-0.3.3/src/illusion/ui/web/__init__.py +10 -0
  377. illusion_agent-0.3.3/src/illusion/ui/web/env_routes.py +219 -0
  378. illusion_agent-0.3.3/src/illusion/ui/web/server.py +91 -0
  379. illusion_agent-0.3.3/src/illusion/ui/web/ws_host.py +1880 -0
  380. illusion_agent-0.3.3/src/illusion/ui/web/ws_web_api.py +725 -0
  381. illusion_agent-0.3.3/src/illusion/utils/__init__.py +1 -0
  382. illusion_agent-0.3.3/src/illusion/utils/aioqueue.py +102 -0
  383. illusion_agent-0.3.3/src/illusion/utils/atomic_write.py +92 -0
  384. illusion_agent-0.3.3/src/illusion/utils/file_state_cache.py +289 -0
  385. illusion_agent-0.3.3/src/illusion/utils/ripgrep.py +352 -0
  386. illusion_agent-0.3.3/src/illusion/utils/shell.py +311 -0
  387. illusion_agent-0.3.3/src/illusion/utils/signals.py +51 -0
  388. illusion_agent-0.3.3/src/illusion/utils/stderr_redirect.py +250 -0
  389. illusion_agent-0.3.3/tests/__init__.py +0 -0
  390. illusion_agent-0.3.3/tests/api/test_anthropic_client.py +20 -0
  391. illusion_agent-0.3.3/tests/api/test_client.py +50 -0
  392. illusion_agent-0.3.3/tests/api/test_codex_client.py +20 -0
  393. illusion_agent-0.3.3/tests/api/test_effort.py +125 -0
  394. illusion_agent-0.3.3/tests/api/test_fallback/346/217/220/347/244/272.py +27 -0
  395. illusion_agent-0.3.3/tests/api/test_openai_client.py +20 -0
  396. illusion_agent-0.3.3/tests/channels/__init__.py +0 -0
  397. illusion_agent-0.3.3/tests/channels/feishu/__init__.py +0 -0
  398. illusion_agent-0.3.3/tests/channels/feishu/test_adapter.py +186 -0
  399. illusion_agent-0.3.3/tests/channels/feishu/test_commands.py +102 -0
  400. illusion_agent-0.3.3/tests/channels/feishu/test_session_map.py +95 -0
  401. illusion_agent-0.3.3/tests/channels/test_ask_user_multi.py +135 -0
  402. illusion_agent-0.3.3/tests/channels/test_base.py +38 -0
  403. illusion_agent-0.3.3/tests/channels/test_base_commands.py +63 -0
  404. illusion_agent-0.3.3/tests/channels/test_channel_daemon_deprecated.py +57 -0
  405. illusion_agent-0.3.3/tests/channels/test_config.py +86 -0
  406. illusion_agent-0.3.3/tests/channels/test_exit_handler.py +62 -0
  407. illusion_agent-0.3.3/tests/channels/test_health_probe.py +98 -0
  408. illusion_agent-0.3.3/tests/channels/test_pid.py +73 -0
  409. illusion_agent-0.3.3/tests/channels/test_registry.py +250 -0
  410. illusion_agent-0.3.3/tests/channels/test_session_persist.py +72 -0
  411. illusion_agent-0.3.3/tests/channels/test_spawn_ipc.py +99 -0
  412. illusion_agent-0.3.3/tests/channels/test_supervise.py +71 -0
  413. illusion_agent-0.3.3/tests/channels/test_tool_registration.py +36 -0
  414. illusion_agent-0.3.3/tests/channels/tools/__init__.py +0 -0
  415. illusion_agent-0.3.3/tests/channels/tools/test_feishu_doc.py +60 -0
  416. illusion_agent-0.3.3/tests/channels/tools/test_feishu_drive.py +64 -0
  417. illusion_agent-0.3.3/tests/channels/weixin/__init__.py +0 -0
  418. illusion_agent-0.3.3/tests/channels/weixin/test_adapter.py +828 -0
  419. illusion_agent-0.3.3/tests/channels/weixin/test_config.py +45 -0
  420. illusion_agent-0.3.3/tests/channels/weixin/test_ilink_api.py +183 -0
  421. illusion_agent-0.3.3/tests/channels/weixin/test_ilink_retry.py +65 -0
  422. illusion_agent-0.3.3/tests/channels/weixin/test_session_map.py +58 -0
  423. illusion_agent-0.3.3/tests/commands/conftest.py +15 -0
  424. illusion_agent-0.3.3/tests/commands/init/__init__.py +0 -0
  425. illusion_agent-0.3.3/tests/commands/init/test_claudemd.py +134 -0
  426. illusion_agent-0.3.3/tests/commands/init/test_orchestrator.py +107 -0
  427. illusion_agent-0.3.3/tests/commands/init/test_scanner.py +58 -0
  428. illusion_agent-0.3.3/tests/commands/init/test_sections.py +51 -0
  429. illusion_agent-0.3.3/tests/commands/test_effort_command.py +52 -0
  430. illusion_agent-0.3.3/tests/commands/test_max_tokens_command.py +35 -0
  431. illusion_agent-0.3.3/tests/config/test_i18n.py +31 -0
  432. illusion_agent-0.3.3/tests/config/test_settings.py +43 -0
  433. illusion_agent-0.3.3/tests/conftest.py +1 -0
  434. illusion_agent-0.3.3/tests/engine/test_query_engine.py +33 -0
  435. illusion_agent-0.3.3/tests/fixtures/fake_mcp_server.py +21 -0
  436. illusion_agent-0.3.3/tests/integration/test_effort_integration.py +60 -0
  437. illusion_agent-0.3.3/tests/services/lsp/test_lsp_client.py +23 -0
  438. illusion_agent-0.3.3/tests/services/lsp/test_lsp_config.py +79 -0
  439. illusion_agent-0.3.3/tests/services/lsp/test_lsp_manager.py +44 -0
  440. illusion_agent-0.3.3/tests/services/lsp/test_lsp_types.py +78 -0
  441. illusion_agent-0.3.3/tests/test_api/__init__.py +0 -0
  442. illusion_agent-0.3.3/tests/test_api/test_client.py +18 -0
  443. illusion_agent-0.3.3/tests/test_api/test_codex_client.py +296 -0
  444. illusion_agent-0.3.3/tests/test_api/test_compat.py +28 -0
  445. illusion_agent-0.3.3/tests/test_api/test_openai_client.py +668 -0
  446. illusion_agent-0.3.3/tests/test_bridge/test_core.py +35 -0
  447. illusion_agent-0.3.3/tests/test_bridge/test_session_flow.py +32 -0
  448. illusion_agent-0.3.3/tests/test_channels/__init__.py +0 -0
  449. illusion_agent-0.3.3/tests/test_channels/test_channel_async_io.py +372 -0
  450. illusion_agent-0.3.3/tests/test_channels/test_channel_fire_forget.py +110 -0
  451. illusion_agent-0.3.3/tests/test_channels/test_channel_queue_shutdown.py +193 -0
  452. illusion_agent-0.3.3/tests/test_cli_exit_handler.py +48 -0
  453. illusion_agent-0.3.3/tests/test_commands/__init__.py +0 -0
  454. illusion_agent-0.3.3/tests/test_commands/test_auth_login_multi_model.py +237 -0
  455. illusion_agent-0.3.3/tests/test_commands/test_cli.py +115 -0
  456. illusion_agent-0.3.3/tests/test_commands/test_command_flows.py +161 -0
  457. illusion_agent-0.3.3/tests/test_commands/test_registry.py +666 -0
  458. illusion_agent-0.3.3/tests/test_config/__init__.py +0 -0
  459. illusion_agent-0.3.3/tests/test_config/test_paths.py +143 -0
  460. illusion_agent-0.3.3/tests/test_config/test_settings.py +200 -0
  461. illusion_agent-0.3.3/tests/test_coordinator/test_agent_definitions.py +184 -0
  462. illusion_agent-0.3.3/tests/test_coordinator/test_coordinator_mode.py +69 -0
  463. illusion_agent-0.3.3/tests/test_daemon_ipc/__init__.py +0 -0
  464. illusion_agent-0.3.3/tests/test_daemon_ipc/test_wait_for_thread.py +95 -0
  465. illusion_agent-0.3.3/tests/test_engine/__init__.py +0 -0
  466. illusion_agent-0.3.3/tests/test_engine/test_as_completed_cancel.py +88 -0
  467. illusion_agent-0.3.3/tests/test_engine/test_bg_agent_tracker.py +275 -0
  468. illusion_agent-0.3.3/tests/test_engine/test_media_block.py +60 -0
  469. illusion_agent-0.3.3/tests/test_engine/test_query_engine.py +548 -0
  470. illusion_agent-0.3.3/tests/test_engine/test_query_permission.py +23 -0
  471. illusion_agent-0.3.3/tests/test_engine/test_query_progress.py +206 -0
  472. illusion_agent-0.3.3/tests/test_engine/test_query_synthesize.py +238 -0
  473. illusion_agent-0.3.3/tests/test_engine/test_tool_result_media.py +116 -0
  474. illusion_agent-0.3.3/tests/test_hooks/__init__.py +0 -0
  475. illusion_agent-0.3.3/tests/test_hooks/test_executor.py +122 -0
  476. illusion_agent-0.3.3/tests/test_hooks/test_loader_permissions.py +83 -0
  477. illusion_agent-0.3.3/tests/test_hooks_skills_plugins_real.py +629 -0
  478. illusion_agent-0.3.3/tests/test_integration/__init__.py +0 -0
  479. illusion_agent-0.3.3/tests/test_integration/test_e2e_refactor.py +39 -0
  480. illusion_agent-0.3.3/tests/test_mcp/__init__.py +0 -0
  481. illusion_agent-0.3.3/tests/test_mcp/test_config_permissions.py +69 -0
  482. illusion_agent-0.3.3/tests/test_mcp/test_integration.py +99 -0
  483. illusion_agent-0.3.3/tests/test_mcp/test_stdio_flow.py +51 -0
  484. illusion_agent-0.3.3/tests/test_mcp/test_types.py +54 -0
  485. illusion_agent-0.3.3/tests/test_memory/__init__.py +0 -0
  486. illusion_agent-0.3.3/tests/test_memory/test_manager_permissions.py +136 -0
  487. illusion_agent-0.3.3/tests/test_memory/test_memdir.py +201 -0
  488. illusion_agent-0.3.3/tests/test_merged_prs_on_autoagent.py +672 -0
  489. illusion_agent-0.3.3/tests/test_permissions/__init__.py +0 -0
  490. illusion_agent-0.3.3/tests/test_permissions/test_checker.py +149 -0
  491. illusion_agent-0.3.3/tests/test_permissions/test_loader.py +118 -0
  492. illusion_agent-0.3.3/tests/test_permissions/test_project_permissions.py +56 -0
  493. illusion_agent-0.3.3/tests/test_platforms.py +25 -0
  494. illusion_agent-0.3.3/tests/test_plugins/__init__.py +0 -0
  495. illusion_agent-0.3.3/tests/test_plugins/test_lifecycle_flow.py +90 -0
  496. illusion_agent-0.3.3/tests/test_plugins/test_loader.py +82 -0
  497. illusion_agent-0.3.3/tests/test_plugins/test_loader_permissions.py +66 -0
  498. illusion_agent-0.3.3/tests/test_prompts/__init__.py +0 -0
  499. illusion_agent-0.3.3/tests/test_prompts/test_claudemd.py +83 -0
  500. illusion_agent-0.3.3/tests/test_prompts/test_claudemd_permissions.py +75 -0
  501. illusion_agent-0.3.3/tests/test_prompts/test_environment.py +93 -0
  502. illusion_agent-0.3.3/tests/test_prompts/test_system_prompt.py +64 -0
  503. illusion_agent-0.3.3/tests/test_qq_channel.py +438 -0
  504. illusion_agent-0.3.3/tests/test_real_large_tasks.py +818 -0
  505. illusion_agent-0.3.3/tests/test_runtime/__init__.py +0 -0
  506. illusion_agent-0.3.3/tests/test_runtime/test_local_bash_notify.py +165 -0
  507. illusion_agent-0.3.3/tests/test_sandbox/test_adapter.py +123 -0
  508. illusion_agent-0.3.3/tests/test_sandbox/test_config_schema.py +92 -0
  509. illusion_agent-0.3.3/tests/test_sandbox/test_platform_linux.py +49 -0
  510. illusion_agent-0.3.3/tests/test_sandbox/test_platform_macos.py +39 -0
  511. illusion_agent-0.3.3/tests/test_sandbox/test_platform_windows.py +34 -0
  512. illusion_agent-0.3.3/tests/test_sandbox/test_proxy_env_vars.py +29 -0
  513. illusion_agent-0.3.3/tests/test_sandbox/test_runtime.py +50 -0
  514. illusion_agent-0.3.3/tests/test_sandbox/test_symlink_protection.py +49 -0
  515. illusion_agent-0.3.3/tests/test_sandbox/test_utils.py +59 -0
  516. illusion_agent-0.3.3/tests/test_sandbox/test_violation_store.py +54 -0
  517. illusion_agent-0.3.3/tests/test_scripts/test_sync_version.py +102 -0
  518. illusion_agent-0.3.3/tests/test_services/__init__.py +0 -0
  519. illusion_agent-0.3.3/tests/test_services/test_compact.py +352 -0
  520. illusion_agent-0.3.3/tests/test_services/test_cron.py +342 -0
  521. illusion_agent-0.3.3/tests/test_services/test_cron_scheduler.py +290 -0
  522. illusion_agent-0.3.3/tests/test_services/test_cron_serve.py +110 -0
  523. illusion_agent-0.3.3/tests/test_services/test_cron_spawn.py +124 -0
  524. illusion_agent-0.3.3/tests/test_services/test_lsp_client.py +432 -0
  525. illusion_agent-0.3.3/tests/test_services/test_session_storage.py +170 -0
  526. illusion_agent-0.3.3/tests/test_skills/test_loader.py +120 -0
  527. illusion_agent-0.3.3/tests/test_skills/test_loader_permissions.py +59 -0
  528. illusion_agent-0.3.3/tests/test_swarm/__init__.py +0 -0
  529. illusion_agent-0.3.3/tests/test_swarm/test_agent_cancel_force.py +96 -0
  530. illusion_agent-0.3.3/tests/test_swarm/test_agent_executor.py +279 -0
  531. illusion_agent-0.3.3/tests/test_swarm/test_agent_executor_cancel.py +41 -0
  532. illusion_agent-0.3.3/tests/test_swarm/test_imports.py +71 -0
  533. illusion_agent-0.3.3/tests/test_swarm/test_in_process.py +283 -0
  534. illusion_agent-0.3.3/tests/test_swarm/test_types.py +125 -0
  535. illusion_agent-0.3.3/tests/test_swarm/test_worktree.py +129 -0
  536. illusion_agent-0.3.3/tests/test_tasks/test_manager.py +289 -0
  537. illusion_agent-0.3.3/tests/test_tools/__init__.py +0 -0
  538. illusion_agent-0.3.3/tests/test_tools/test_agent_tool.py +131 -0
  539. illusion_agent-0.3.3/tests/test_tools/test_bash_tool.py +72 -0
  540. illusion_agent-0.3.3/tests/test_tools/test_core_tools.py +389 -0
  541. illusion_agent-0.3.3/tests/test_tools/test_file_read_media.py +80 -0
  542. illusion_agent-0.3.3/tests/test_tools/test_glob_tool.py +83 -0
  543. illusion_agent-0.3.3/tests/test_tools/test_grep_tool.py +107 -0
  544. illusion_agent-0.3.3/tests/test_tools/test_integration.py +84 -0
  545. illusion_agent-0.3.3/tests/test_tools/test_integration_flows.py +261 -0
  546. illusion_agent-0.3.3/tests/test_tools/test_mcp_auth_tool.py +101 -0
  547. illusion_agent-0.3.3/tests/test_tools/test_ripgrep.py +283 -0
  548. illusion_agent-0.3.3/tests/test_tools/test_shell_common.py +191 -0
  549. illusion_agent-0.3.3/tests/test_tools/test_task_tools.py +35 -0
  550. illusion_agent-0.3.3/tests/test_tools/test_team_tools.py +147 -0
  551. illusion_agent-0.3.3/tests/test_tools/test_tool_blocking_io.py +441 -0
  552. illusion_agent-0.3.3/tests/test_tools/test_web_fetch_tool.py +109 -0
  553. illusion_agent-0.3.3/tests/test_ui/__init__.py +0 -0
  554. illusion_agent-0.3.3/tests/test_ui/test_append_system_prompt.py +57 -0
  555. illusion_agent-0.3.3/tests/test_ui/test_async_fixes.py +247 -0
  556. illusion_agent-0.3.3/tests/test_ui/test_backend_host_refactored.py +519 -0
  557. illusion_agent-0.3.3/tests/test_ui/test_bug_fixes.py +41 -0
  558. illusion_agent-0.3.3/tests/test_ui/test_cli_tool_filters.py +131 -0
  559. illusion_agent-0.3.3/tests/test_ui/test_modes.py +31 -0
  560. illusion_agent-0.3.3/tests/test_ui/test_pending_question.py +344 -0
  561. illusion_agent-0.3.3/tests/test_ui/test_permission_mode.py +85 -0
  562. illusion_agent-0.3.3/tests/test_ui/test_permission_store.py +16 -0
  563. illusion_agent-0.3.3/tests/test_ui/test_print_mode_enhanced.py +149 -0
  564. illusion_agent-0.3.3/tests/test_ui/test_print_mode_plan_approval.py +60 -0
  565. illusion_agent-0.3.3/tests/test_ui/test_react_backend.py +491 -0
  566. illusion_agent-0.3.3/tests/test_ui/test_react_launcher.py +35 -0
  567. illusion_agent-0.3.3/tests/test_ui/test_terminal_io.py +192 -0
  568. illusion_agent-0.3.3/tests/test_ui/test_verbose_debug_bare.py +84 -0
  569. illusion_agent-0.3.3/tests/test_ui/test_web_host_refactored.py +255 -0
  570. illusion_agent-0.3.3/tests/test_untested_features.py +856 -0
  571. illusion_agent-0.3.3/tests/test_utils/__init__.py +0 -0
  572. illusion_agent-0.3.3/tests/test_utils/test_aioqueue.py +105 -0
  573. illusion_agent-0.3.3/tests/test_utils/test_daemon_ipc.py +225 -0
  574. illusion_agent-0.3.3/tests/test_utils/test_ripgrep.py +102 -0
  575. illusion_agent-0.3.3/tests/test_utils/test_shell.py +106 -0
  576. illusion_agent-0.3.3/tests/test_utils/test_signals.py +46 -0
  577. illusion_agent-0.3.3/tests/test_utils/test_stderr_redirect.py +133 -0
  578. illusion_agent-0.3.3/tests/ui/test_backend_host.py +28 -0
  579. illusion_agent-0.3.3/tests/ui/test_env_routes.py +254 -0
  580. illusion_agent-0.3.3/tests/ui/test_protocol_web.py +103 -0
  581. illusion_agent-0.3.3/tests/ui/test_runtime_auth_missing.py +53 -0
  582. illusion_agent-0.3.3/tests/ui/test_web_api.py +450 -0
  583. illusion_agent-0.3.3/tests/unit/__init__.py +0 -0
  584. illusion_agent-0.3.3/tests/unit/test_channel_hints.py +74 -0
  585. illusion_agent-0.3.3/tests/unit/test_cross_channel.py +186 -0
  586. illusion_agent-0.3.3/tests/unit/test_delivery.py +239 -0
  587. illusion_agent-0.3.3/tests/unit/test_feishu_streaming.py +666 -0
  588. illusion_agent-0.3.3/tests/unit/test_media_tools.py +32 -0
  589. illusion_agent-0.3.3/tests/unit/test_qq_streaming.py +429 -0
  590. illusion_agent-0.3.3/tests/unit/test_session_list_active.py +72 -0
@@ -0,0 +1,47 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ id-token: write
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+
23
+ - name: Set up Node.js
24
+ uses: actions/setup-node@v4
25
+ with:
26
+ node-version: "18"
27
+
28
+ - name: Install Python dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install build twine pytest pytest-timeout ruff
32
+ pip install -e ".[dev,all]"
33
+
34
+ - name: Lint
35
+ run: ruff check src/
36
+
37
+ - name: Test
38
+ run: pytest tests/ -q --timeout=300
39
+
40
+ - name: Build
41
+ run: python -m build
42
+
43
+ - name: Check package
44
+ run: twine check dist/*
45
+
46
+ - name: Publish to PyPI
47
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,72 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ *.egg-info/
20
+ .installed.cfg
21
+ *.egg
22
+
23
+ # Virtual environments
24
+ .venv/
25
+ venv/
26
+ ENV/
27
+ env/
28
+
29
+ # IDE
30
+ .idea/
31
+ .vscode/
32
+ *.swp
33
+ *.swo
34
+ *~
35
+
36
+ # Testing
37
+ .pytest_cache/
38
+ .coverage
39
+ htmlcov/
40
+ .tox/
41
+ .nox/
42
+
43
+ # Type checking
44
+ .mypy_cache/
45
+
46
+ # Ruff
47
+ .ruff_cache/
48
+
49
+ # Project specific
50
+ .illusion/
51
+ temp/
52
+ *.log
53
+
54
+ # OS
55
+ .DS_Store
56
+ Thumbs.db
57
+
58
+ # uv
59
+ uv.lock
60
+
61
+ # Node.js
62
+ node_modules/
63
+ npm-debug.log*
64
+ yarn-debug.log*
65
+ yarn-error.log*
66
+
67
+ # Frontend build artifacts
68
+ frontend/terminal/dist/
69
+ frontend/web/dist/
70
+
71
+ temp_test_data/
72
+ temp_test_config/
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 YunTai (YunTaiHua)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,215 @@
1
+ Metadata-Version: 2.4
2
+ Name: illusion-agent
3
+ Version: 0.3.3
4
+ Summary: Open-source Python port of Claude Code - an AI-powered CLI coding assistant
5
+ Project-URL: Homepage, https://github.com/YunTaiHua/illusion-agent
6
+ Project-URL: Repository, https://github.com/YunTaiHua/illusion-agent
7
+ Project-URL: Issues, https://github.com/YunTaiHua/illusion-agent/issues
8
+ Author-email: YunTaiHua <3597489498@qq.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai,claude-code,cli,coding-agent,llm,terminal
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: anthropic>=0.40.0
25
+ Requires-Dist: croniter>=2.0.0
26
+ Requires-Dist: fastapi>=0.115.0
27
+ Requires-Dist: httpx>=0.27.0
28
+ Requires-Dist: mcp>=1.0.0
29
+ Requires-Dist: openai>=1.0.0
30
+ Requires-Dist: prompt-toolkit>=3.0.0
31
+ Requires-Dist: pydantic>=2.0.0
32
+ Requires-Dist: pyperclip>=1.9.0
33
+ Requires-Dist: pyyaml>=6.0
34
+ Requires-Dist: rich>=13.0.0
35
+ Requires-Dist: typer>=0.12.0
36
+ Requires-Dist: uvicorn[standard]>=0.34.0
37
+ Requires-Dist: watchfiles>=0.20.0
38
+ Requires-Dist: websockets>=12.0
39
+ Provides-Extra: all
40
+ Requires-Dist: aiohttp>=3.9.0; extra == 'all'
41
+ Requires-Dist: cryptography>=42.0.0; extra == 'all'
42
+ Requires-Dist: lark-oapi>=1.4.0; extra == 'all'
43
+ Requires-Dist: qrcode>=7.4.0; extra == 'all'
44
+ Provides-Extra: dev
45
+ Requires-Dist: mypy>=1.10.0; extra == 'dev'
46
+ Requires-Dist: pexpect>=4.9.0; extra == 'dev'
47
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
48
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
49
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
50
+ Requires-Dist: ruff>=0.5.0; extra == 'dev'
51
+ Provides-Extra: feishu
52
+ Requires-Dist: lark-oapi>=1.4.0; extra == 'feishu'
53
+ Provides-Extra: weixin
54
+ Requires-Dist: aiohttp>=3.9.0; extra == 'weixin'
55
+ Requires-Dist: cryptography>=42.0.0; extra == 'weixin'
56
+ Requires-Dist: qrcode>=7.4.0; extra == 'weixin'
57
+ Description-Content-Type: text/markdown
58
+
59
+ # IllusionAgent
60
+
61
+ <div align="center">
62
+
63
+ **Where fantasy meets functionality.**
64
+
65
+ *The best of many worlds, refined into one intelligent agent*
66
+
67
+ [中文版](README.zh-CN.md) | English
68
+
69
+ </div>
70
+
71
+ ---
72
+
73
+ ## 📖 Introduction
74
+
75
+ IllusionAgent is an open-source AI agent platform. It unifies a multi-provider
76
+ LLM gateway, a bilingual (Chinese/English) CLI, a browser-based Web UI, and
77
+ a flexible extension ecosystem into a single intelligent agent — at home
78
+ on Windows, macOS, and Linux.
79
+
80
+ Whether you prefer the discipline of the terminal or the ease of the browser,
81
+ IllusionAgent resonates with your workflow: 42 built-in tools, 49 slash
82
+ commands, 7 specialized sub-agents, MCP server support, hooks, plugins, and
83
+ a cron scheduler for unattended automation — spanning Feishu, WeChat, and QQ.
84
+
85
+ > Standing on the shoulders of giants — Claude Code prompts, OpenHarness
86
+ > architecture, OpenClaw scheduling, kimi-cli infrastructure, hermes-agent
87
+ > channels, cc-switch routing.
88
+
89
+ ### Core Features
90
+
91
+ - 🤖 **Multi AI Provider Support** - Anthropic, OpenAI, Copilot, Codex, and any compatible endpoint
92
+ - 🧠 **Multi-Agent Collaboration** - 7 built-in specialized Agents
93
+ - 🛠️ **Rich Toolset** - 42 built-in tools (29 base + 13 channel) + MCP dynamic tool extension
94
+ - ⌨️ **49 Slash Commands** - Session, config, project, scheduling
95
+ - 🌐 **Web UI Interface** - Browser-based chat interface with `illusion web`, independently usable alongside the terminal
96
+ - 🌍 **Bilingual Interface** - Chinese/English auto-switch via `ui_language` setting
97
+ - 📝 **Comprehensive Markdown Rendering** - Tables, code blocks, rich text
98
+ - 🔌 **Flexible Extension System** - Plugins, hooks, skills, MCP servers
99
+ - 🔐 **Comprehensive Permission Control** - Three modes + fine-grained rules
100
+ - 🎯 **Reasoning Effort Control** - low/medium/high/xhigh/max levels
101
+ - 🪟 **Deep Windows Optimization** - Auto-detect Git, PowerShell support
102
+ - 🖥️ **Zero Terminal Flicker** - Stable rendering based on Ink Static component
103
+
104
+ ### Interface Preview
105
+
106
+ <div align="center">
107
+ <p>Welcome screen & rich text rendering</p>
108
+ <img src="docs/images/image1.png" alt="IllusionAgent welcome screen" width="48%" />
109
+ <img src="docs/images/image2.png" alt="IllusionAgent rich text rendering" width="48%" />
110
+ </div>
111
+
112
+ <div align="center">
113
+ <p>Demo video</p>
114
+ <a href="https://www.youtube.com/watch?v=ExrzKVjWPls">
115
+ <img src="docs/images/illusion-agent.png" alt="Click to watch demo video" width="720" />
116
+ </a>
117
+ <p><a href="https://www.youtube.com/watch?v=ExrzKVjWPls">📺 Watch demo on YouTube</a></p>
118
+ </div>
119
+
120
+ ---
121
+
122
+ ## 🚀 Quick Start
123
+
124
+ ### Requirements
125
+
126
+ - Python >= 3.10
127
+ - Supports Windows, macOS, Linux
128
+ - Node.js 18+ (only for source install; `pip install illusion-agent` does not require Node.js)
129
+
130
+ ### Installation
131
+
132
+ ```bash
133
+ # Recommended: pip install from PyPI (no Node.js required)
134
+ pip install illusion-agent
135
+
136
+ # Alternative: from source (requires Node.js 18+)
137
+ git clone https://github.com/YunTaiHua/illusion-agent.git
138
+ cd illusion-agent
139
+ pip install .
140
+ ```
141
+
142
+ ### Basic Usage
143
+
144
+ ```bash
145
+ # First-time: configure authentication
146
+ illusion auth login
147
+
148
+ # Start interactive session (recommended)
149
+ illusion
150
+
151
+ # Launch Web UI in browser
152
+ illusion web
153
+
154
+ # Non-interactive print mode
155
+ illusion -p "Analyze the structure of this project"
156
+ ```
157
+
158
+ ### Print Mode Notes
159
+
160
+ `-p` / `--print` runs a single non-interactive request and exits:
161
+
162
+ ```bash
163
+ # Read-only analysis (safe, default permission mode)
164
+ illusion -p "Analyze the structure of this project"
165
+
166
+ # Allow file writes / command execution without interactive approval
167
+ illusion --permission-mode full_auto -p "Fix the failing tests"
168
+
169
+ # Resume after the process exits with code 2 (pending question/permission/plan)
170
+ illusion -c -p "Y"
171
+
172
+ # Specify model and effort for print mode
173
+ illusion -m env_1.model_2 -e high -p "Refactor this module"
174
+ ```
175
+
176
+ Important details:
177
+
178
+ - The prompt value must be the **last argument** because typer parses `-p` greedily.
179
+ - In default permission mode, mutating tools exit with code **2** and persist a pending approval; answer it with `illusion -c -p "Y"`, `"F"`, or `"N"`.
180
+ - Exit codes: `0` success, `1` error, `2` waiting for cross-turn input.
181
+
182
+ ### Interface Notes
183
+
184
+ The terminal (`illusion`) and Web UI (`illusion web`) are two independent, first-class interfaces. They share the same backend runtime, settings, and session storage — use whichever fits your workflow.
185
+
186
+ ---
187
+
188
+ ## 📚 Detailed Documentation
189
+
190
+ | Topic | English | 中文 |
191
+ |-------|---------|------|
192
+ | Introduction | [docs/en/introduction.md](docs/en/introduction.md) | [docs/zh-CN/introduction.md](docs/zh-CN/introduction.md) |
193
+ | Getting Started | [docs/en/getting-started.md](docs/en/getting-started.md) | [docs/zh-CN/getting-started.md](docs/zh-CN/getting-started.md) |
194
+ | Commands | [docs/en/commands.md](docs/en/commands.md) | [docs/zh-CN/commands.md](docs/zh-CN/commands.md) |
195
+ | Settings & Credentials | [docs/en/settings.md](docs/en/settings.md) | [docs/zh-CN/settings.md](docs/zh-CN/settings.md) |
196
+ | Project Files & Memory | [docs/en/project-files.md](docs/en/project-files.md) | [docs/zh-CN/project-files.md](docs/zh-CN/project-files.md) |
197
+ | Extensions (MCP, Plugins, Skills, Hooks) | [docs/en/extensions.md](docs/en/extensions.md) | [docs/zh-CN/extensions.md](docs/zh-CN/extensions.md) |
198
+ | Architecture | [docs/en/architecture.md](docs/en/architecture.md) | [docs/zh-CN/architecture.md](docs/zh-CN/architecture.md) |
199
+ | Messaging Channels | [docs/en/channels.md](docs/en/channels.md) | [docs/zh-CN/channels.md](docs/zh-CN/channels.md) |
200
+
201
+ ---
202
+
203
+ ## 📄 License
204
+
205
+ This project is open-sourced under the [MIT](LICENSE) license.
206
+
207
+ ---
208
+
209
+ ## 🤝 Contributing
210
+
211
+ Welcome to submit Issues and Pull Requests!
212
+
213
+ ---
214
+
215
+ </div>
@@ -0,0 +1,157 @@
1
+ # IllusionAgent
2
+
3
+ <div align="center">
4
+
5
+ **Where fantasy meets functionality.**
6
+
7
+ *The best of many worlds, refined into one intelligent agent*
8
+
9
+ [中文版](README.zh-CN.md) | English
10
+
11
+ </div>
12
+
13
+ ---
14
+
15
+ ## 📖 Introduction
16
+
17
+ IllusionAgent is an open-source AI agent platform. It unifies a multi-provider
18
+ LLM gateway, a bilingual (Chinese/English) CLI, a browser-based Web UI, and
19
+ a flexible extension ecosystem into a single intelligent agent — at home
20
+ on Windows, macOS, and Linux.
21
+
22
+ Whether you prefer the discipline of the terminal or the ease of the browser,
23
+ IllusionAgent resonates with your workflow: 42 built-in tools, 49 slash
24
+ commands, 7 specialized sub-agents, MCP server support, hooks, plugins, and
25
+ a cron scheduler for unattended automation — spanning Feishu, WeChat, and QQ.
26
+
27
+ > Standing on the shoulders of giants — Claude Code prompts, OpenHarness
28
+ > architecture, OpenClaw scheduling, kimi-cli infrastructure, hermes-agent
29
+ > channels, cc-switch routing.
30
+
31
+ ### Core Features
32
+
33
+ - 🤖 **Multi AI Provider Support** - Anthropic, OpenAI, Copilot, Codex, and any compatible endpoint
34
+ - 🧠 **Multi-Agent Collaboration** - 7 built-in specialized Agents
35
+ - 🛠️ **Rich Toolset** - 42 built-in tools (29 base + 13 channel) + MCP dynamic tool extension
36
+ - ⌨️ **49 Slash Commands** - Session, config, project, scheduling
37
+ - 🌐 **Web UI Interface** - Browser-based chat interface with `illusion web`, independently usable alongside the terminal
38
+ - 🌍 **Bilingual Interface** - Chinese/English auto-switch via `ui_language` setting
39
+ - 📝 **Comprehensive Markdown Rendering** - Tables, code blocks, rich text
40
+ - 🔌 **Flexible Extension System** - Plugins, hooks, skills, MCP servers
41
+ - 🔐 **Comprehensive Permission Control** - Three modes + fine-grained rules
42
+ - 🎯 **Reasoning Effort Control** - low/medium/high/xhigh/max levels
43
+ - 🪟 **Deep Windows Optimization** - Auto-detect Git, PowerShell support
44
+ - 🖥️ **Zero Terminal Flicker** - Stable rendering based on Ink Static component
45
+
46
+ ### Interface Preview
47
+
48
+ <div align="center">
49
+ <p>Welcome screen & rich text rendering</p>
50
+ <img src="docs/images/image1.png" alt="IllusionAgent welcome screen" width="48%" />
51
+ <img src="docs/images/image2.png" alt="IllusionAgent rich text rendering" width="48%" />
52
+ </div>
53
+
54
+ <div align="center">
55
+ <p>Demo video</p>
56
+ <a href="https://www.youtube.com/watch?v=ExrzKVjWPls">
57
+ <img src="docs/images/illusion-agent.png" alt="Click to watch demo video" width="720" />
58
+ </a>
59
+ <p><a href="https://www.youtube.com/watch?v=ExrzKVjWPls">📺 Watch demo on YouTube</a></p>
60
+ </div>
61
+
62
+ ---
63
+
64
+ ## 🚀 Quick Start
65
+
66
+ ### Requirements
67
+
68
+ - Python >= 3.10
69
+ - Supports Windows, macOS, Linux
70
+ - Node.js 18+ (only for source install; `pip install illusion-agent` does not require Node.js)
71
+
72
+ ### Installation
73
+
74
+ ```bash
75
+ # Recommended: pip install from PyPI (no Node.js required)
76
+ pip install illusion-agent
77
+
78
+ # Alternative: from source (requires Node.js 18+)
79
+ git clone https://github.com/YunTaiHua/illusion-agent.git
80
+ cd illusion-agent
81
+ pip install .
82
+ ```
83
+
84
+ ### Basic Usage
85
+
86
+ ```bash
87
+ # First-time: configure authentication
88
+ illusion auth login
89
+
90
+ # Start interactive session (recommended)
91
+ illusion
92
+
93
+ # Launch Web UI in browser
94
+ illusion web
95
+
96
+ # Non-interactive print mode
97
+ illusion -p "Analyze the structure of this project"
98
+ ```
99
+
100
+ ### Print Mode Notes
101
+
102
+ `-p` / `--print` runs a single non-interactive request and exits:
103
+
104
+ ```bash
105
+ # Read-only analysis (safe, default permission mode)
106
+ illusion -p "Analyze the structure of this project"
107
+
108
+ # Allow file writes / command execution without interactive approval
109
+ illusion --permission-mode full_auto -p "Fix the failing tests"
110
+
111
+ # Resume after the process exits with code 2 (pending question/permission/plan)
112
+ illusion -c -p "Y"
113
+
114
+ # Specify model and effort for print mode
115
+ illusion -m env_1.model_2 -e high -p "Refactor this module"
116
+ ```
117
+
118
+ Important details:
119
+
120
+ - The prompt value must be the **last argument** because typer parses `-p` greedily.
121
+ - In default permission mode, mutating tools exit with code **2** and persist a pending approval; answer it with `illusion -c -p "Y"`, `"F"`, or `"N"`.
122
+ - Exit codes: `0` success, `1` error, `2` waiting for cross-turn input.
123
+
124
+ ### Interface Notes
125
+
126
+ The terminal (`illusion`) and Web UI (`illusion web`) are two independent, first-class interfaces. They share the same backend runtime, settings, and session storage — use whichever fits your workflow.
127
+
128
+ ---
129
+
130
+ ## 📚 Detailed Documentation
131
+
132
+ | Topic | English | 中文 |
133
+ |-------|---------|------|
134
+ | Introduction | [docs/en/introduction.md](docs/en/introduction.md) | [docs/zh-CN/introduction.md](docs/zh-CN/introduction.md) |
135
+ | Getting Started | [docs/en/getting-started.md](docs/en/getting-started.md) | [docs/zh-CN/getting-started.md](docs/zh-CN/getting-started.md) |
136
+ | Commands | [docs/en/commands.md](docs/en/commands.md) | [docs/zh-CN/commands.md](docs/zh-CN/commands.md) |
137
+ | Settings & Credentials | [docs/en/settings.md](docs/en/settings.md) | [docs/zh-CN/settings.md](docs/zh-CN/settings.md) |
138
+ | Project Files & Memory | [docs/en/project-files.md](docs/en/project-files.md) | [docs/zh-CN/project-files.md](docs/zh-CN/project-files.md) |
139
+ | Extensions (MCP, Plugins, Skills, Hooks) | [docs/en/extensions.md](docs/en/extensions.md) | [docs/zh-CN/extensions.md](docs/zh-CN/extensions.md) |
140
+ | Architecture | [docs/en/architecture.md](docs/en/architecture.md) | [docs/zh-CN/architecture.md](docs/zh-CN/architecture.md) |
141
+ | Messaging Channels | [docs/en/channels.md](docs/en/channels.md) | [docs/zh-CN/channels.md](docs/zh-CN/channels.md) |
142
+
143
+ ---
144
+
145
+ ## 📄 License
146
+
147
+ This project is open-sourced under the [MIT](LICENSE) license.
148
+
149
+ ---
150
+
151
+ ## 🤝 Contributing
152
+
153
+ Welcome to submit Issues and Pull Requests!
154
+
155
+ ---
156
+
157
+ </div>
@@ -0,0 +1,154 @@
1
+ # IllusionAgent
2
+
3
+ <div align="center">
4
+
5
+ **幻想与实用,于此交融**
6
+
7
+ *融合多个开源项目精华,构建统一智能代理*
8
+
9
+ 中文 | [English](README.md)
10
+
11
+ </div>
12
+
13
+ ---
14
+
15
+ ## 📖 项目简介
16
+
17
+ IllusionAgent 是一款开源的 AI 智能体平台。它将多模型语言模型网关、
18
+ 中英双语命令行、浏览器端 Web 界面与可扩展的插件生态融为一体,
19
+ 在 Windows、macOS、Linux 之上皆能从容运行。
20
+
21
+ 无论你习惯终端的克制,还是偏爱浏览器的舒展,IllusionAgent 都能与你的工作流共振:
22
+ 42 项内置工具、49 条斜杠命令、7 类专业子代理、MCP 服务器支持、
23
+ 钩子、插件,以及面向无人值守场景的 Cron 调度器,贯通飞书、微信、QQ 三大渠道。
24
+
25
+ > 站在巨人之肩 —— Claude Code 提示词体系、OpenHarness 架构理念、
26
+ > OpenClaw 调度设计、kimi-cli 基础设施、hermes-agent 渠道模式、cc-switch 路由方案。
27
+
28
+ ### 核心特性
29
+
30
+ - 🤖 **多 AI 提供商支持** - Anthropic Claude、OpenAI、GitHub Copilot、OpenAI Codex 及任意 OpenAI 兼容端点
31
+ - 🧠 **多智能体协作** - 7 种内置专业 Agent,支持任务编排
32
+ - 🛠️ **丰富的工具集** - 42 内置工具(29 基础 + 13 渠道)+ MCP 动态工具扩展
33
+ - ⌨️ **49 个斜杠命令** - 覆盖会话管理、配置、项目操作、任务调度等
34
+ - 🌐 **Web UI 界面** - 通过 `illusion web` 启动浏览器聊天界面,与终端界面相互独立、同等可用
35
+ - 🌍 **中英双语支持** - 所有 CLI 输出根据 `ui_language` 设置自动切换中英文
36
+ - 📝 **全面 Markdown 渲染** - 直角边框表格、圆角卡片代码块、多色富文本
37
+ - 🔌 **灵活扩展系统** - 插件、钩子、技能、MCP 服务器
38
+ - 🔐 **完善权限控制** - 三种模式 + 细粒度规则 + Always Allow 一键放行
39
+ - 🎯 **推理强度控制** - 支持 low/medium/high/xhigh/max 五种推理强度级别
40
+ - 🪟 **Windows 系统深度优化** - 自动查找 Git、PowerShell 支持
41
+ - 🖥️ **终端渲染零闪烁** - 基于 Ink Static 组件的稳定渲染
42
+
43
+ ### 界面展示
44
+
45
+ <div align="center">
46
+ <p>欢迎界面 & 富文本渲染</p>
47
+ <img src="docs/images/image1.png" alt="IllusionAgent 欢迎界面" width="48%" />
48
+ <img src="docs/images/image2.png" alt="IllusionAgent 富文本渲染" width="48%" />
49
+ </div>
50
+
51
+ <div align="center">
52
+ <p>演示视频</p>
53
+ <a href="https://b23.tv/3mWe9It">
54
+ <img src="docs/images/illusion-agent.png" alt="点击观看演示视频" width="720" />
55
+ </a>
56
+ <p><a href="https://b23.tv/3mWe9It">📺 B站观看演示视频</a></p>
57
+ </div>
58
+
59
+ ---
60
+
61
+ ## 🚀 快速开始
62
+
63
+ ### 环境要求
64
+
65
+ - Python >= 3.10
66
+ - 支持 Windows、macOS、Linux
67
+ - Node.js 18+(仅源码安装需要,`pip install illusion-agent` 无需 Node.js)
68
+
69
+ ### 安装
70
+
71
+ ```bash
72
+ # 推荐方式:从 PyPI 安装(无需 Node.js)
73
+ pip install illusion-agent
74
+
75
+ # 备选方式:从源码安装(需要 Node.js 18+)
76
+ git clone https://github.com/YunTaiHua/illusion-agent.git
77
+ cd illusion-agent
78
+ pip install .
79
+ ```
80
+
81
+ ### 基本使用
82
+
83
+ ```bash
84
+ # 首次使用:配置认证
85
+ illusion auth login
86
+
87
+ # 启动交互式会话(推荐)
88
+ illusion
89
+
90
+ # 启动 Web UI 浏览器界面
91
+ illusion web
92
+
93
+ # 非交互式打印模式
94
+ illusion -p "帮我分析这个项目的结构"
95
+ ```
96
+
97
+ ### Print 模式说明
98
+
99
+ `-p` / `--print` 以非交互方式执行单次请求并立即退出:
100
+
101
+ ```bash
102
+ # 只读分析(安全,默认权限模式)
103
+ illusion -p "帮我分析这个项目的结构"
104
+
105
+ # 允许写入文件 / 执行命令,无需交互式审批
106
+ illusion --permission-mode full_auto -p "修复失败的测试"
107
+
108
+ # 进程以退出码 2 结束后,继续回答待处理的问题 / 权限 / 计划
109
+ illusion -c -p "Y"
110
+
111
+ # 指定模型和 effort 等级用于 print 模式
112
+ illusion -m env_1.model_2 -e high -p "重构此模块"
113
+ ```
114
+
115
+ 重要细节:
116
+
117
+ - 提示词值必须放在 **最后一个参数**,因为 typer 会贪婪解析 `-p`。
118
+ - 默认权限模式下,变更类工具会以退出码 **2** 退出并保留待审批项;使用 `illusion -c -p "Y"`、`"F"` 或 `"N"` 继续回答。
119
+ - 退出码:`0` 成功,`1` 错误,`2` 等待跨轮次输入。
120
+
121
+ ### 界面说明
122
+
123
+ 终端(`illusion`)与 Web UI(`illusion web`)是两个相互独立、同等重要的界面。它们共享同一个后端运行时、设置和会话存储,按你的工作流选择即可。
124
+
125
+ ---
126
+
127
+ ## 📚 详细文档
128
+
129
+ | 主题 | English | 中文 |
130
+ |------|---------|------|
131
+ | 项目简介 | [docs/en/introduction.md](docs/en/introduction.md) | [docs/zh-CN/introduction.md](docs/zh-CN/introduction.md) |
132
+ | 快速开始 | [docs/en/getting-started.md](docs/en/getting-started.md) | [docs/zh-CN/getting-started.md](docs/zh-CN/getting-started.md) |
133
+ | 命令系统 | [docs/en/commands.md](docs/en/commands.md) | [docs/zh-CN/commands.md](docs/zh-CN/commands.md) |
134
+ | 设置与凭据 | [docs/en/settings.md](docs/en/settings.md) | [docs/zh-CN/settings.md](docs/zh-CN/settings.md) |
135
+ | 项目文件与记忆 | [docs/en/project-files.md](docs/en/project-files.md) | [docs/zh-CN/project-files.md](docs/zh-CN/project-files.md) |
136
+ | 扩展系统 (MCP, 插件, 技能, 钩子) | [docs/en/extensions.md](docs/en/extensions.md) | [docs/zh-CN/extensions.md](docs/zh-CN/extensions.md) |
137
+ | 项目架构 | [docs/en/architecture.md](docs/en/architecture.md) | [docs/zh-CN/architecture.md](docs/zh-CN/architecture.md) |
138
+ | 消息渠道 | [docs/en/channels.md](docs/en/channels.md) | [docs/zh-CN/channels.md](docs/zh-CN/channels.md) |
139
+
140
+ ---
141
+
142
+ ## 📄 许可证
143
+
144
+ 本项目采用 [MIT](LICENSE) 许可证开源。
145
+
146
+ ---
147
+
148
+ ## 🤝 贡献
149
+
150
+ 欢迎提交 Issue 和 Pull Request!
151
+
152
+ ---
153
+
154
+ </div>