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.
- illusion_agent-0.3.3/.github/workflows/publish.yml +47 -0
- illusion_agent-0.3.3/.gitignore +72 -0
- illusion_agent-0.3.3/.python-version +1 -0
- illusion_agent-0.3.3/LICENSE +21 -0
- illusion_agent-0.3.3/PKG-INFO +215 -0
- illusion_agent-0.3.3/README.md +157 -0
- illusion_agent-0.3.3/README.zh-CN.md +154 -0
- illusion_agent-0.3.3/docs/en/architecture.md +136 -0
- illusion_agent-0.3.3/docs/en/channels.md +399 -0
- illusion_agent-0.3.3/docs/en/commands.md +239 -0
- illusion_agent-0.3.3/docs/en/extensions.md +449 -0
- illusion_agent-0.3.3/docs/en/getting-started.md +227 -0
- illusion_agent-0.3.3/docs/en/introduction.md +85 -0
- illusion_agent-0.3.3/docs/en/project-files.md +121 -0
- illusion_agent-0.3.3/docs/en/settings.md +467 -0
- illusion_agent-0.3.3/docs/images/illusion-agent.png +0 -0
- illusion_agent-0.3.3/docs/images/image1.png +0 -0
- illusion_agent-0.3.3/docs/images/image2.png +0 -0
- illusion_agent-0.3.3/docs/zh-CN/architecture.md +138 -0
- illusion_agent-0.3.3/docs/zh-CN/channels.md +400 -0
- illusion_agent-0.3.3/docs/zh-CN/commands.md +241 -0
- illusion_agent-0.3.3/docs/zh-CN/extensions.md +658 -0
- illusion_agent-0.3.3/docs/zh-CN/getting-started.md +229 -0
- illusion_agent-0.3.3/docs/zh-CN/introduction.md +86 -0
- illusion_agent-0.3.3/docs/zh-CN/project-files.md +165 -0
- illusion_agent-0.3.3/docs/zh-CN/settings.md +467 -0
- illusion_agent-0.3.3/frontend/terminal/build.mjs +34 -0
- illusion_agent-0.3.3/frontend/terminal/package-lock.json +1763 -0
- illusion_agent-0.3.3/frontend/terminal/package.json +28 -0
- illusion_agent-0.3.3/frontend/terminal/src/App.tsx +811 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/CommandPicker.tsx +135 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/Composer.tsx +87 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/ComposerController.tsx +155 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/ConversationView.tsx +710 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/CustomInputModal.tsx +83 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/Footer.tsx +49 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/MarkdownContent.tsx +573 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/MarkdownTable.tsx +262 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/ModalHost.tsx +985 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/MultilineTextInput.tsx +327 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/PromptInput.tsx +91 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/QuestionNavigationBar.tsx +98 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/QuestionPreviewBox.tsx +135 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/SelectModal.tsx +122 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/SidePanel.tsx +226 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/Spinner.tsx +102 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/StatusBar.tsx +175 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/SwarmPanel.tsx +168 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/TodoPanel.tsx +181 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/ToolCallDisplay.tsx +116 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/TranscriptPane.tsx +99 -0
- illusion_agent-0.3.3/frontend/terminal/src/components/WelcomeBanner.tsx +55 -0
- illusion_agent-0.3.3/frontend/terminal/src/hooks/useAnimationFrame.ts +63 -0
- illusion_agent-0.3.3/frontend/terminal/src/hooks/useBackendSession.ts +688 -0
- illusion_agent-0.3.3/frontend/terminal/src/hooks/useBlink.ts +31 -0
- illusion_agent-0.3.3/frontend/terminal/src/hooks/useQuestionState.ts +234 -0
- illusion_agent-0.3.3/frontend/terminal/src/hooks/useTerminalSize.ts +25 -0
- illusion_agent-0.3.3/frontend/terminal/src/i18n.ts +174 -0
- illusion_agent-0.3.3/frontend/terminal/src/index.tsx +72 -0
- illusion_agent-0.3.3/frontend/terminal/src/theme/ThemeContext.tsx +49 -0
- illusion_agent-0.3.3/frontend/terminal/src/theme/builtinThemes.ts +148 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/ToolInterface.ts +62 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/AgentTool.ts +63 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/BashTool.ts +88 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/CronTool.ts +23 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/EditTool.ts +64 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/GenericTool.ts +49 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/LspTool.ts +35 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/McpTool.ts +25 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/NotebookTool.ts +25 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/PlanTool.ts +21 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/ReadTool.ts +74 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/SearchTool.ts +97 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/SkillTool.ts +22 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/TaskTool.ts +14 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/WebTool.ts +51 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/WorktreeTool.ts +18 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/implementations/WriteTool.ts +51 -0
- illusion_agent-0.3.3/frontend/terminal/src/tools/registry.ts +188 -0
- illusion_agent-0.3.3/frontend/terminal/src/types.ts +288 -0
- illusion_agent-0.3.3/frontend/terminal/src/utils/Cursor.ts +297 -0
- illusion_agent-0.3.3/frontend/terminal/src/utils/MeasuredText.ts +264 -0
- illusion_agent-0.3.3/frontend/terminal/src/utils/markdown.ts +127 -0
- illusion_agent-0.3.3/frontend/terminal/src/utils/thinking.ts +191 -0
- illusion_agent-0.3.3/frontend/terminal/src/version.ts +9 -0
- illusion_agent-0.3.3/frontend/terminal/tsconfig.json +13 -0
- illusion_agent-0.3.3/frontend/web/index.html +27 -0
- illusion_agent-0.3.3/frontend/web/package-lock.json +4522 -0
- illusion_agent-0.3.3/frontend/web/package.json +31 -0
- illusion_agent-0.3.3/frontend/web/postcss.config.js +6 -0
- illusion_agent-0.3.3/frontend/web/src/App.tsx +521 -0
- illusion_agent-0.3.3/frontend/web/src/components/ChatArea.tsx +457 -0
- illusion_agent-0.3.3/frontend/web/src/components/ErrorBoundary.tsx +103 -0
- illusion_agent-0.3.3/frontend/web/src/components/MessageBubble.tsx +525 -0
- illusion_agent-0.3.3/frontend/web/src/components/ModalCard.tsx +603 -0
- illusion_agent-0.3.3/frontend/web/src/components/PromptInput.tsx +336 -0
- illusion_agent-0.3.3/frontend/web/src/components/RightPanel.tsx +272 -0
- illusion_agent-0.3.3/frontend/web/src/components/Sidebar.tsx +216 -0
- illusion_agent-0.3.3/frontend/web/src/components/TodoPanel.tsx +171 -0
- illusion_agent-0.3.3/frontend/web/src/components/Toolbar.tsx +125 -0
- illusion_agent-0.3.3/frontend/web/src/components/WelcomeScreen.tsx +76 -0
- illusion_agent-0.3.3/frontend/web/src/hooks/useTheme.ts +89 -0
- illusion_agent-0.3.3/frontend/web/src/hooks/useWebSocketSession.ts +542 -0
- illusion_agent-0.3.3/frontend/web/src/i18n.ts +221 -0
- illusion_agent-0.3.3/frontend/web/src/index.css +802 -0
- illusion_agent-0.3.3/frontend/web/src/main.tsx +31 -0
- illusion_agent-0.3.3/frontend/web/src/remarkSuperscript.ts +39 -0
- illusion_agent-0.3.3/frontend/web/src/types/protocol.ts +374 -0
- illusion_agent-0.3.3/frontend/web/src/utils/toolDisplayName.ts +138 -0
- illusion_agent-0.3.3/frontend/web/src/version.ts +9 -0
- illusion_agent-0.3.3/frontend/web/src/vite-env.d.ts +1 -0
- illusion_agent-0.3.3/frontend/web/tailwind.config.js +116 -0
- illusion_agent-0.3.3/frontend/web/tsconfig.json +22 -0
- illusion_agent-0.3.3/frontend/web/tsconfig.node.json +13 -0
- illusion_agent-0.3.3/frontend/web/vite.config.ts +32 -0
- illusion_agent-0.3.3/pyproject.toml +107 -0
- illusion_agent-0.3.3/scripts/build_frontend.py +121 -0
- illusion_agent-0.3.3/scripts/hatch_build.py +117 -0
- illusion_agent-0.3.3/scripts/sync_version.py +183 -0
- illusion_agent-0.3.3/skills/illusion-usage/SKILL.md +420 -0
- illusion_agent-0.3.3/src/illusion/__init__.py +26 -0
- illusion_agent-0.3.3/src/illusion/__main__.py +15 -0
- illusion_agent-0.3.3/src/illusion/api/__init__.py +33 -0
- illusion_agent-0.3.3/src/illusion/api/auth_status.py +53 -0
- illusion_agent-0.3.3/src/illusion/api/client.py +513 -0
- illusion_agent-0.3.3/src/illusion/api/codex_client.py +592 -0
- illusion_agent-0.3.3/src/illusion/api/compat.py +138 -0
- illusion_agent-0.3.3/src/illusion/api/effort.py +129 -0
- illusion_agent-0.3.3/src/illusion/api/errors.py +57 -0
- illusion_agent-0.3.3/src/illusion/api/openai_client.py +1199 -0
- illusion_agent-0.3.3/src/illusion/api/usage.py +45 -0
- illusion_agent-0.3.3/src/illusion/auth/__init__.py +38 -0
- illusion_agent-0.3.3/src/illusion/auth/codex_oauth.py +635 -0
- illusion_agent-0.3.3/src/illusion/auth/copilot.py +421 -0
- illusion_agent-0.3.3/src/illusion/auth/flows.py +58 -0
- illusion_agent-0.3.3/src/illusion/auth/manager.py +208 -0
- illusion_agent-0.3.3/src/illusion/auth/storage.py +175 -0
- illusion_agent-0.3.3/src/illusion/bridge/__init__.py +38 -0
- illusion_agent-0.3.3/src/illusion/bridge/manager.py +190 -0
- illusion_agent-0.3.3/src/illusion/bridge/session_runner.py +84 -0
- illusion_agent-0.3.3/src/illusion/bridge/types.py +112 -0
- illusion_agent-0.3.3/src/illusion/bridge/work_secret.py +131 -0
- illusion_agent-0.3.3/src/illusion/channels/__init__.py +1056 -0
- illusion_agent-0.3.3/src/illusion/channels/base.py +271 -0
- illusion_agent-0.3.3/src/illusion/channels/base_commands.py +208 -0
- illusion_agent-0.3.3/src/illusion/channels/config.py +237 -0
- illusion_agent-0.3.3/src/illusion/channels/delivery.py +760 -0
- illusion_agent-0.3.3/src/illusion/channels/exit_handler.py +37 -0
- illusion_agent-0.3.3/src/illusion/channels/feishu/__init__.py +43 -0
- illusion_agent-0.3.3/src/illusion/channels/feishu/adapter.py +685 -0
- illusion_agent-0.3.3/src/illusion/channels/feishu/commands.py +15 -0
- illusion_agent-0.3.3/src/illusion/channels/feishu/messaging.py +913 -0
- illusion_agent-0.3.3/src/illusion/channels/feishu/session_map.py +286 -0
- illusion_agent-0.3.3/src/illusion/channels/feishu/streaming.py +416 -0
- illusion_agent-0.3.3/src/illusion/channels/feishu/ws_client.py +273 -0
- illusion_agent-0.3.3/src/illusion/channels/pid.py +129 -0
- illusion_agent-0.3.3/src/illusion/channels/qq/__init__.py +44 -0
- illusion_agent-0.3.3/src/illusion/channels/qq/adapter.py +819 -0
- illusion_agent-0.3.3/src/illusion/channels/qq/api.py +848 -0
- illusion_agent-0.3.3/src/illusion/channels/qq/commands.py +15 -0
- illusion_agent-0.3.3/src/illusion/channels/qq/session_map.py +210 -0
- illusion_agent-0.3.3/src/illusion/channels/qq/streaming.py +377 -0
- illusion_agent-0.3.3/src/illusion/channels/qq/ws_client.py +519 -0
- illusion_agent-0.3.3/src/illusion/channels/registry.py +254 -0
- illusion_agent-0.3.3/src/illusion/channels/serve.py +414 -0
- illusion_agent-0.3.3/src/illusion/channels/tools/__init__.py +8 -0
- illusion_agent-0.3.3/src/illusion/channels/tools/cross_channel.py +346 -0
- illusion_agent-0.3.3/src/illusion/channels/tools/feishu_doc.py +358 -0
- illusion_agent-0.3.3/src/illusion/channels/tools/feishu_drive.py +436 -0
- illusion_agent-0.3.3/src/illusion/channels/tools/media.py +215 -0
- illusion_agent-0.3.3/src/illusion/channels/weixin/__init__.py +47 -0
- illusion_agent-0.3.3/src/illusion/channels/weixin/adapter.py +1064 -0
- illusion_agent-0.3.3/src/illusion/channels/weixin/commands.py +15 -0
- illusion_agent-0.3.3/src/illusion/channels/weixin/ilink_api.py +1032 -0
- illusion_agent-0.3.3/src/illusion/channels/weixin/session_map.py +226 -0
- illusion_agent-0.3.3/src/illusion/cli.py +1894 -0
- illusion_agent-0.3.3/src/illusion/commands/__init__.py +32 -0
- illusion_agent-0.3.3/src/illusion/commands/auth.py +67 -0
- illusion_agent-0.3.3/src/illusion/commands/bridge.py +75 -0
- illusion_agent-0.3.3/src/illusion/commands/context.py +75 -0
- illusion_agent-0.3.3/src/illusion/commands/git.py +54 -0
- illusion_agent-0.3.3/src/illusion/commands/helpers.py +170 -0
- illusion_agent-0.3.3/src/illusion/commands/init/__init__.py +20 -0
- illusion_agent-0.3.3/src/illusion/commands/init/analysis/__init__.py +1 -0
- illusion_agent-0.3.3/src/illusion/commands/init/analysis/architecture.py +180 -0
- illusion_agent-0.3.3/src/illusion/commands/init/analysis/conventions.py +231 -0
- illusion_agent-0.3.3/src/illusion/commands/init/analysis/dependencies.py +173 -0
- illusion_agent-0.3.3/src/illusion/commands/init/analysis/key_modules.py +109 -0
- illusion_agent-0.3.3/src/illusion/commands/init/extraction/__init__.py +1 -0
- illusion_agent-0.3.3/src/illusion/commands/init/extraction/lsp_symbols.py +167 -0
- illusion_agent-0.3.3/src/illusion/commands/init/extraction/readme.py +138 -0
- illusion_agent-0.3.3/src/illusion/commands/init/extraction/scanner.py +522 -0
- illusion_agent-0.3.3/src/illusion/commands/init/generation/__init__.py +1 -0
- illusion_agent-0.3.3/src/illusion/commands/init/generation/claudemd.py +240 -0
- illusion_agent-0.3.3/src/illusion/commands/init/generation/illusionmd.py +125 -0
- illusion_agent-0.3.3/src/illusion/commands/init/generation/memory_template.py +81 -0
- illusion_agent-0.3.3/src/illusion/commands/init/generation/rules.py +110 -0
- illusion_agent-0.3.3/src/illusion/commands/init/generation/sections.py +73 -0
- illusion_agent-0.3.3/src/illusion/commands/init/orchestrator.py +255 -0
- illusion_agent-0.3.3/src/illusion/commands/init/types.py +96 -0
- illusion_agent-0.3.3/src/illusion/commands/mcp.py +63 -0
- illusion_agent-0.3.3/src/illusion/commands/memory.py +54 -0
- illusion_agent-0.3.3/src/illusion/commands/misc.py +391 -0
- illusion_agent-0.3.3/src/illusion/commands/model.py +62 -0
- illusion_agent-0.3.3/src/illusion/commands/plugin.py +40 -0
- illusion_agent-0.3.3/src/illusion/commands/registry.py +293 -0
- illusion_agent-0.3.3/src/illusion/commands/rules.py +71 -0
- illusion_agent-0.3.3/src/illusion/commands/sandbox.py +128 -0
- illusion_agent-0.3.3/src/illusion/commands/session.py +338 -0
- illusion_agent-0.3.3/src/illusion/commands/settings.py +320 -0
- illusion_agent-0.3.3/src/illusion/commands/types.py +72 -0
- illusion_agent-0.3.3/src/illusion/config/__init__.py +39 -0
- illusion_agent-0.3.3/src/illusion/config/i18n.py +880 -0
- illusion_agent-0.3.3/src/illusion/config/paths.py +326 -0
- illusion_agent-0.3.3/src/illusion/config/plan_file.py +185 -0
- illusion_agent-0.3.3/src/illusion/config/settings.py +546 -0
- illusion_agent-0.3.3/src/illusion/coordinator/__init__.py +41 -0
- illusion_agent-0.3.3/src/illusion/coordinator/agent_definitions.py +1069 -0
- illusion_agent-0.3.3/src/illusion/coordinator/coordinator_mode.py +125 -0
- illusion_agent-0.3.3/src/illusion/daemon_ipc.py +937 -0
- illusion_agent-0.3.3/src/illusion/engine/__init__.py +95 -0
- illusion_agent-0.3.3/src/illusion/engine/cost_tracker.py +55 -0
- illusion_agent-0.3.3/src/illusion/engine/messages.py +380 -0
- illusion_agent-0.3.3/src/illusion/engine/query.py +1061 -0
- illusion_agent-0.3.3/src/illusion/engine/query_engine.py +422 -0
- illusion_agent-0.3.3/src/illusion/engine/stream_events.py +191 -0
- illusion_agent-0.3.3/src/illusion/hooks/__init__.py +59 -0
- illusion_agent-0.3.3/src/illusion/hooks/events.py +43 -0
- illusion_agent-0.3.3/src/illusion/hooks/executor.py +467 -0
- illusion_agent-0.3.3/src/illusion/hooks/hot_reload.py +74 -0
- illusion_agent-0.3.3/src/illusion/hooks/loader.py +134 -0
- illusion_agent-0.3.3/src/illusion/hooks/register_hooks.py +58 -0
- illusion_agent-0.3.3/src/illusion/hooks/schemas.py +129 -0
- illusion_agent-0.3.3/src/illusion/hooks/session_hooks.py +117 -0
- illusion_agent-0.3.3/src/illusion/hooks/types.py +168 -0
- illusion_agent-0.3.3/src/illusion/hooks/utils.py +13 -0
- illusion_agent-0.3.3/src/illusion/mcp/__init__.py +111 -0
- illusion_agent-0.3.3/src/illusion/mcp/client.py +518 -0
- illusion_agent-0.3.3/src/illusion/mcp/config.py +246 -0
- illusion_agent-0.3.3/src/illusion/mcp/types.py +246 -0
- illusion_agent-0.3.3/src/illusion/memory/__init__.py +42 -0
- illusion_agent-0.3.3/src/illusion/memory/manager.py +138 -0
- illusion_agent-0.3.3/src/illusion/memory/memdir.py +58 -0
- illusion_agent-0.3.3/src/illusion/memory/paths.py +85 -0
- illusion_agent-0.3.3/src/illusion/memory/scan.py +120 -0
- illusion_agent-0.3.3/src/illusion/memory/search.py +83 -0
- illusion_agent-0.3.3/src/illusion/memory/types.py +43 -0
- illusion_agent-0.3.3/src/illusion/output_styles/__init__.py +15 -0
- illusion_agent-0.3.3/src/illusion/output_styles/loader.py +64 -0
- illusion_agent-0.3.3/src/illusion/permissions/__init__.py +73 -0
- illusion_agent-0.3.3/src/illusion/permissions/checker.py +276 -0
- illusion_agent-0.3.3/src/illusion/permissions/loader.py +87 -0
- illusion_agent-0.3.3/src/illusion/permissions/modes.py +38 -0
- illusion_agent-0.3.3/src/illusion/permissions/schemas.py +40 -0
- illusion_agent-0.3.3/src/illusion/platforms.py +149 -0
- illusion_agent-0.3.3/src/illusion/plugins/__init__.py +78 -0
- illusion_agent-0.3.3/src/illusion/plugins/installer.py +59 -0
- illusion_agent-0.3.3/src/illusion/plugins/loader.py +302 -0
- illusion_agent-0.3.3/src/illusion/plugins/options.py +45 -0
- illusion_agent-0.3.3/src/illusion/plugins/schemas.py +33 -0
- illusion_agent-0.3.3/src/illusion/plugins/types.py +57 -0
- illusion_agent-0.3.3/src/illusion/prompts/__init__.py +31 -0
- illusion_agent-0.3.3/src/illusion/prompts/channel_hints.py +232 -0
- illusion_agent-0.3.3/src/illusion/prompts/claudemd.py +111 -0
- illusion_agent-0.3.3/src/illusion/prompts/context.py +246 -0
- illusion_agent-0.3.3/src/illusion/prompts/environment.py +192 -0
- illusion_agent-0.3.3/src/illusion/prompts/system_prompt.py +154 -0
- illusion_agent-0.3.3/src/illusion/sandbox/__init__.py +32 -0
- illusion_agent-0.3.3/src/illusion/sandbox/adapter.py +286 -0
- illusion_agent-0.3.3/src/illusion/sandbox/platforms/__init__.py +1 -0
- illusion_agent-0.3.3/src/illusion/sandbox/platforms/base.py +69 -0
- illusion_agent-0.3.3/src/illusion/sandbox/platforms/linux.py +69 -0
- illusion_agent-0.3.3/src/illusion/sandbox/platforms/macos.py +128 -0
- illusion_agent-0.3.3/src/illusion/sandbox/platforms/windows.py +182 -0
- illusion_agent-0.3.3/src/illusion/sandbox/proxy/__init__.py +1 -0
- illusion_agent-0.3.3/src/illusion/sandbox/proxy/env_vars.py +58 -0
- illusion_agent-0.3.3/src/illusion/sandbox/runtime.py +213 -0
- illusion_agent-0.3.3/src/illusion/sandbox/symlink_protection.py +76 -0
- illusion_agent-0.3.3/src/illusion/sandbox/utils.py +93 -0
- illusion_agent-0.3.3/src/illusion/sandbox/violation_store.py +89 -0
- illusion_agent-0.3.3/src/illusion/services/__init__.py +59 -0
- illusion_agent-0.3.3/src/illusion/services/compact/__init__.py +102 -0
- illusion_agent-0.3.3/src/illusion/services/compact/auto_compact.py +100 -0
- illusion_agent-0.3.3/src/illusion/services/compact/compact_core.py +165 -0
- illusion_agent-0.3.3/src/illusion/services/compact/compact_prompt.py +50 -0
- illusion_agent-0.3.3/src/illusion/services/compact/constants.py +83 -0
- illusion_agent-0.3.3/src/illusion/services/compact/message_ops.py +185 -0
- illusion_agent-0.3.3/src/illusion/services/compact/microcompact.py +125 -0
- illusion_agent-0.3.3/src/illusion/services/compact/models.py +30 -0
- illusion_agent-0.3.3/src/illusion/services/compact/token_utils.py +125 -0
- illusion_agent-0.3.3/src/illusion/services/cron.py +345 -0
- illusion_agent-0.3.3/src/illusion/services/cron_scheduler.py +825 -0
- illusion_agent-0.3.3/src/illusion/services/cron_serve.py +128 -0
- illusion_agent-0.3.3/src/illusion/services/cron_spawn.py +220 -0
- illusion_agent-0.3.3/src/illusion/services/file_history.py +256 -0
- illusion_agent-0.3.3/src/illusion/services/lsp/__init__.py +21 -0
- illusion_agent-0.3.3/src/illusion/services/lsp/client.py +324 -0
- illusion_agent-0.3.3/src/illusion/services/lsp/config.py +96 -0
- illusion_agent-0.3.3/src/illusion/services/lsp/manager.py +223 -0
- illusion_agent-0.3.3/src/illusion/services/lsp/types.py +70 -0
- illusion_agent-0.3.3/src/illusion/services/session_storage.py +496 -0
- illusion_agent-0.3.3/src/illusion/services/token_estimation.py +72 -0
- illusion_agent-0.3.3/src/illusion/skills/__init__.py +66 -0
- illusion_agent-0.3.3/src/illusion/skills/bundled/__init__.py +110 -0
- illusion_agent-0.3.3/src/illusion/skills/bundled/content/illusion-print-mode.md +198 -0
- illusion_agent-0.3.3/src/illusion/skills/bundled/content/remember.md +105 -0
- illusion_agent-0.3.3/src/illusion/skills/bundled/content/skillify.md +113 -0
- illusion_agent-0.3.3/src/illusion/skills/bundled/content/update-config.md +778 -0
- illusion_agent-0.3.3/src/illusion/skills/loader.py +353 -0
- illusion_agent-0.3.3/src/illusion/skills/registry.py +40 -0
- illusion_agent-0.3.3/src/illusion/skills/types.py +31 -0
- illusion_agent-0.3.3/src/illusion/state/__init__.py +18 -0
- illusion_agent-0.3.3/src/illusion/state/app_state.py +65 -0
- illusion_agent-0.3.3/src/illusion/state/store.py +93 -0
- illusion_agent-0.3.3/src/illusion/swarm/__init__.py +71 -0
- illusion_agent-0.3.3/src/illusion/swarm/agent_executor.py +949 -0
- illusion_agent-0.3.3/src/illusion/swarm/in_process.py +293 -0
- illusion_agent-0.3.3/src/illusion/swarm/subprocess_backend.py +133 -0
- illusion_agent-0.3.3/src/illusion/swarm/team_helpers.py +123 -0
- illusion_agent-0.3.3/src/illusion/swarm/types.py +162 -0
- illusion_agent-0.3.3/src/illusion/swarm/worktree.py +350 -0
- illusion_agent-0.3.3/src/illusion/tasks/__init__.py +33 -0
- illusion_agent-0.3.3/src/illusion/tasks/local_agent_task.py +42 -0
- illusion_agent-0.3.3/src/illusion/tasks/local_shell_task.py +27 -0
- illusion_agent-0.3.3/src/illusion/tasks/manager.py +520 -0
- illusion_agent-0.3.3/src/illusion/tasks/stop_task.py +21 -0
- illusion_agent-0.3.3/src/illusion/tasks/types.py +98 -0
- illusion_agent-0.3.3/src/illusion/tools/__init__.py +121 -0
- illusion_agent-0.3.3/src/illusion/tools/agent_tool.py +454 -0
- illusion_agent-0.3.3/src/illusion/tools/ask_user_question_tool.py +185 -0
- illusion_agent-0.3.3/src/illusion/tools/base.py +163 -0
- illusion_agent-0.3.3/src/illusion/tools/bash_tool.py +500 -0
- illusion_agent-0.3.3/src/illusion/tools/config_tool.py +91 -0
- illusion_agent-0.3.3/src/illusion/tools/cron_tool.py +561 -0
- illusion_agent-0.3.3/src/illusion/tools/enter_plan_mode_tool.py +165 -0
- illusion_agent-0.3.3/src/illusion/tools/enter_worktree_tool.py +194 -0
- illusion_agent-0.3.3/src/illusion/tools/exit_plan_mode_tool.py +130 -0
- illusion_agent-0.3.3/src/illusion/tools/exit_worktree_tool.py +216 -0
- illusion_agent-0.3.3/src/illusion/tools/file_edit_tool.py +349 -0
- illusion_agent-0.3.3/src/illusion/tools/file_read_tool.py +358 -0
- illusion_agent-0.3.3/src/illusion/tools/file_write_tool.py +217 -0
- illusion_agent-0.3.3/src/illusion/tools/glob_tool.py +160 -0
- illusion_agent-0.3.3/src/illusion/tools/grep_tool.py +193 -0
- illusion_agent-0.3.3/src/illusion/tools/list_mcp_resources_tool.py +82 -0
- illusion_agent-0.3.3/src/illusion/tools/lsp_formatters.py +277 -0
- illusion_agent-0.3.3/src/illusion/tools/lsp_schemas.py +78 -0
- illusion_agent-0.3.3/src/illusion/tools/lsp_tool.py +377 -0
- illusion_agent-0.3.3/src/illusion/tools/mcp_auth_tool.py +110 -0
- illusion_agent-0.3.3/src/illusion/tools/mcp_tool.py +81 -0
- illusion_agent-0.3.3/src/illusion/tools/notebook_edit_tool.py +293 -0
- illusion_agent-0.3.3/src/illusion/tools/powershell_tool.py +442 -0
- illusion_agent-0.3.3/src/illusion/tools/read_mcp_resource_tool.py +64 -0
- illusion_agent-0.3.3/src/illusion/tools/repl_tool.py +100 -0
- illusion_agent-0.3.3/src/illusion/tools/send_message_tool.py +116 -0
- illusion_agent-0.3.3/src/illusion/tools/shell_common.py +186 -0
- illusion_agent-0.3.3/src/illusion/tools/skill_tool.py +122 -0
- illusion_agent-0.3.3/src/illusion/tools/sleep_tool.py +62 -0
- illusion_agent-0.3.3/src/illusion/tools/task_output_tool.py +68 -0
- illusion_agent-0.3.3/src/illusion/tools/task_stop_tool.py +76 -0
- illusion_agent-0.3.3/src/illusion/tools/team_create_tool.py +236 -0
- illusion_agent-0.3.3/src/illusion/tools/team_delete_tool.py +104 -0
- illusion_agent-0.3.3/src/illusion/tools/todo_write_tool.py +198 -0
- illusion_agent-0.3.3/src/illusion/tools/web_fetch_tool.py +300 -0
- illusion_agent-0.3.3/src/illusion/tools/web_search_tool.py +186 -0
- illusion_agent-0.3.3/src/illusion/ui/__init__.py +23 -0
- illusion_agent-0.3.3/src/illusion/ui/app.py +710 -0
- illusion_agent-0.3.3/src/illusion/ui/backend_host.py +1655 -0
- illusion_agent-0.3.3/src/illusion/ui/input.py +88 -0
- illusion_agent-0.3.3/src/illusion/ui/output.py +366 -0
- illusion_agent-0.3.3/src/illusion/ui/permission_dialog.py +47 -0
- illusion_agent-0.3.3/src/illusion/ui/permission_store.py +101 -0
- illusion_agent-0.3.3/src/illusion/ui/protocol.py +450 -0
- illusion_agent-0.3.3/src/illusion/ui/react_launcher.py +278 -0
- illusion_agent-0.3.3/src/illusion/ui/runtime.py +1062 -0
- illusion_agent-0.3.3/src/illusion/ui/terminal_io.py +320 -0
- illusion_agent-0.3.3/src/illusion/ui/web/__init__.py +10 -0
- illusion_agent-0.3.3/src/illusion/ui/web/env_routes.py +219 -0
- illusion_agent-0.3.3/src/illusion/ui/web/server.py +91 -0
- illusion_agent-0.3.3/src/illusion/ui/web/ws_host.py +1880 -0
- illusion_agent-0.3.3/src/illusion/ui/web/ws_web_api.py +725 -0
- illusion_agent-0.3.3/src/illusion/utils/__init__.py +1 -0
- illusion_agent-0.3.3/src/illusion/utils/aioqueue.py +102 -0
- illusion_agent-0.3.3/src/illusion/utils/atomic_write.py +92 -0
- illusion_agent-0.3.3/src/illusion/utils/file_state_cache.py +289 -0
- illusion_agent-0.3.3/src/illusion/utils/ripgrep.py +352 -0
- illusion_agent-0.3.3/src/illusion/utils/shell.py +311 -0
- illusion_agent-0.3.3/src/illusion/utils/signals.py +51 -0
- illusion_agent-0.3.3/src/illusion/utils/stderr_redirect.py +250 -0
- illusion_agent-0.3.3/tests/__init__.py +0 -0
- illusion_agent-0.3.3/tests/api/test_anthropic_client.py +20 -0
- illusion_agent-0.3.3/tests/api/test_client.py +50 -0
- illusion_agent-0.3.3/tests/api/test_codex_client.py +20 -0
- illusion_agent-0.3.3/tests/api/test_effort.py +125 -0
- illusion_agent-0.3.3/tests/api/test_fallback/346/217/220/347/244/272.py +27 -0
- illusion_agent-0.3.3/tests/api/test_openai_client.py +20 -0
- illusion_agent-0.3.3/tests/channels/__init__.py +0 -0
- illusion_agent-0.3.3/tests/channels/feishu/__init__.py +0 -0
- illusion_agent-0.3.3/tests/channels/feishu/test_adapter.py +186 -0
- illusion_agent-0.3.3/tests/channels/feishu/test_commands.py +102 -0
- illusion_agent-0.3.3/tests/channels/feishu/test_session_map.py +95 -0
- illusion_agent-0.3.3/tests/channels/test_ask_user_multi.py +135 -0
- illusion_agent-0.3.3/tests/channels/test_base.py +38 -0
- illusion_agent-0.3.3/tests/channels/test_base_commands.py +63 -0
- illusion_agent-0.3.3/tests/channels/test_channel_daemon_deprecated.py +57 -0
- illusion_agent-0.3.3/tests/channels/test_config.py +86 -0
- illusion_agent-0.3.3/tests/channels/test_exit_handler.py +62 -0
- illusion_agent-0.3.3/tests/channels/test_health_probe.py +98 -0
- illusion_agent-0.3.3/tests/channels/test_pid.py +73 -0
- illusion_agent-0.3.3/tests/channels/test_registry.py +250 -0
- illusion_agent-0.3.3/tests/channels/test_session_persist.py +72 -0
- illusion_agent-0.3.3/tests/channels/test_spawn_ipc.py +99 -0
- illusion_agent-0.3.3/tests/channels/test_supervise.py +71 -0
- illusion_agent-0.3.3/tests/channels/test_tool_registration.py +36 -0
- illusion_agent-0.3.3/tests/channels/tools/__init__.py +0 -0
- illusion_agent-0.3.3/tests/channels/tools/test_feishu_doc.py +60 -0
- illusion_agent-0.3.3/tests/channels/tools/test_feishu_drive.py +64 -0
- illusion_agent-0.3.3/tests/channels/weixin/__init__.py +0 -0
- illusion_agent-0.3.3/tests/channels/weixin/test_adapter.py +828 -0
- illusion_agent-0.3.3/tests/channels/weixin/test_config.py +45 -0
- illusion_agent-0.3.3/tests/channels/weixin/test_ilink_api.py +183 -0
- illusion_agent-0.3.3/tests/channels/weixin/test_ilink_retry.py +65 -0
- illusion_agent-0.3.3/tests/channels/weixin/test_session_map.py +58 -0
- illusion_agent-0.3.3/tests/commands/conftest.py +15 -0
- illusion_agent-0.3.3/tests/commands/init/__init__.py +0 -0
- illusion_agent-0.3.3/tests/commands/init/test_claudemd.py +134 -0
- illusion_agent-0.3.3/tests/commands/init/test_orchestrator.py +107 -0
- illusion_agent-0.3.3/tests/commands/init/test_scanner.py +58 -0
- illusion_agent-0.3.3/tests/commands/init/test_sections.py +51 -0
- illusion_agent-0.3.3/tests/commands/test_effort_command.py +52 -0
- illusion_agent-0.3.3/tests/commands/test_max_tokens_command.py +35 -0
- illusion_agent-0.3.3/tests/config/test_i18n.py +31 -0
- illusion_agent-0.3.3/tests/config/test_settings.py +43 -0
- illusion_agent-0.3.3/tests/conftest.py +1 -0
- illusion_agent-0.3.3/tests/engine/test_query_engine.py +33 -0
- illusion_agent-0.3.3/tests/fixtures/fake_mcp_server.py +21 -0
- illusion_agent-0.3.3/tests/integration/test_effort_integration.py +60 -0
- illusion_agent-0.3.3/tests/services/lsp/test_lsp_client.py +23 -0
- illusion_agent-0.3.3/tests/services/lsp/test_lsp_config.py +79 -0
- illusion_agent-0.3.3/tests/services/lsp/test_lsp_manager.py +44 -0
- illusion_agent-0.3.3/tests/services/lsp/test_lsp_types.py +78 -0
- illusion_agent-0.3.3/tests/test_api/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_api/test_client.py +18 -0
- illusion_agent-0.3.3/tests/test_api/test_codex_client.py +296 -0
- illusion_agent-0.3.3/tests/test_api/test_compat.py +28 -0
- illusion_agent-0.3.3/tests/test_api/test_openai_client.py +668 -0
- illusion_agent-0.3.3/tests/test_bridge/test_core.py +35 -0
- illusion_agent-0.3.3/tests/test_bridge/test_session_flow.py +32 -0
- illusion_agent-0.3.3/tests/test_channels/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_channels/test_channel_async_io.py +372 -0
- illusion_agent-0.3.3/tests/test_channels/test_channel_fire_forget.py +110 -0
- illusion_agent-0.3.3/tests/test_channels/test_channel_queue_shutdown.py +193 -0
- illusion_agent-0.3.3/tests/test_cli_exit_handler.py +48 -0
- illusion_agent-0.3.3/tests/test_commands/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_commands/test_auth_login_multi_model.py +237 -0
- illusion_agent-0.3.3/tests/test_commands/test_cli.py +115 -0
- illusion_agent-0.3.3/tests/test_commands/test_command_flows.py +161 -0
- illusion_agent-0.3.3/tests/test_commands/test_registry.py +666 -0
- illusion_agent-0.3.3/tests/test_config/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_config/test_paths.py +143 -0
- illusion_agent-0.3.3/tests/test_config/test_settings.py +200 -0
- illusion_agent-0.3.3/tests/test_coordinator/test_agent_definitions.py +184 -0
- illusion_agent-0.3.3/tests/test_coordinator/test_coordinator_mode.py +69 -0
- illusion_agent-0.3.3/tests/test_daemon_ipc/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_daemon_ipc/test_wait_for_thread.py +95 -0
- illusion_agent-0.3.3/tests/test_engine/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_engine/test_as_completed_cancel.py +88 -0
- illusion_agent-0.3.3/tests/test_engine/test_bg_agent_tracker.py +275 -0
- illusion_agent-0.3.3/tests/test_engine/test_media_block.py +60 -0
- illusion_agent-0.3.3/tests/test_engine/test_query_engine.py +548 -0
- illusion_agent-0.3.3/tests/test_engine/test_query_permission.py +23 -0
- illusion_agent-0.3.3/tests/test_engine/test_query_progress.py +206 -0
- illusion_agent-0.3.3/tests/test_engine/test_query_synthesize.py +238 -0
- illusion_agent-0.3.3/tests/test_engine/test_tool_result_media.py +116 -0
- illusion_agent-0.3.3/tests/test_hooks/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_hooks/test_executor.py +122 -0
- illusion_agent-0.3.3/tests/test_hooks/test_loader_permissions.py +83 -0
- illusion_agent-0.3.3/tests/test_hooks_skills_plugins_real.py +629 -0
- illusion_agent-0.3.3/tests/test_integration/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_integration/test_e2e_refactor.py +39 -0
- illusion_agent-0.3.3/tests/test_mcp/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_mcp/test_config_permissions.py +69 -0
- illusion_agent-0.3.3/tests/test_mcp/test_integration.py +99 -0
- illusion_agent-0.3.3/tests/test_mcp/test_stdio_flow.py +51 -0
- illusion_agent-0.3.3/tests/test_mcp/test_types.py +54 -0
- illusion_agent-0.3.3/tests/test_memory/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_memory/test_manager_permissions.py +136 -0
- illusion_agent-0.3.3/tests/test_memory/test_memdir.py +201 -0
- illusion_agent-0.3.3/tests/test_merged_prs_on_autoagent.py +672 -0
- illusion_agent-0.3.3/tests/test_permissions/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_permissions/test_checker.py +149 -0
- illusion_agent-0.3.3/tests/test_permissions/test_loader.py +118 -0
- illusion_agent-0.3.3/tests/test_permissions/test_project_permissions.py +56 -0
- illusion_agent-0.3.3/tests/test_platforms.py +25 -0
- illusion_agent-0.3.3/tests/test_plugins/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_plugins/test_lifecycle_flow.py +90 -0
- illusion_agent-0.3.3/tests/test_plugins/test_loader.py +82 -0
- illusion_agent-0.3.3/tests/test_plugins/test_loader_permissions.py +66 -0
- illusion_agent-0.3.3/tests/test_prompts/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_prompts/test_claudemd.py +83 -0
- illusion_agent-0.3.3/tests/test_prompts/test_claudemd_permissions.py +75 -0
- illusion_agent-0.3.3/tests/test_prompts/test_environment.py +93 -0
- illusion_agent-0.3.3/tests/test_prompts/test_system_prompt.py +64 -0
- illusion_agent-0.3.3/tests/test_qq_channel.py +438 -0
- illusion_agent-0.3.3/tests/test_real_large_tasks.py +818 -0
- illusion_agent-0.3.3/tests/test_runtime/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_runtime/test_local_bash_notify.py +165 -0
- illusion_agent-0.3.3/tests/test_sandbox/test_adapter.py +123 -0
- illusion_agent-0.3.3/tests/test_sandbox/test_config_schema.py +92 -0
- illusion_agent-0.3.3/tests/test_sandbox/test_platform_linux.py +49 -0
- illusion_agent-0.3.3/tests/test_sandbox/test_platform_macos.py +39 -0
- illusion_agent-0.3.3/tests/test_sandbox/test_platform_windows.py +34 -0
- illusion_agent-0.3.3/tests/test_sandbox/test_proxy_env_vars.py +29 -0
- illusion_agent-0.3.3/tests/test_sandbox/test_runtime.py +50 -0
- illusion_agent-0.3.3/tests/test_sandbox/test_symlink_protection.py +49 -0
- illusion_agent-0.3.3/tests/test_sandbox/test_utils.py +59 -0
- illusion_agent-0.3.3/tests/test_sandbox/test_violation_store.py +54 -0
- illusion_agent-0.3.3/tests/test_scripts/test_sync_version.py +102 -0
- illusion_agent-0.3.3/tests/test_services/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_services/test_compact.py +352 -0
- illusion_agent-0.3.3/tests/test_services/test_cron.py +342 -0
- illusion_agent-0.3.3/tests/test_services/test_cron_scheduler.py +290 -0
- illusion_agent-0.3.3/tests/test_services/test_cron_serve.py +110 -0
- illusion_agent-0.3.3/tests/test_services/test_cron_spawn.py +124 -0
- illusion_agent-0.3.3/tests/test_services/test_lsp_client.py +432 -0
- illusion_agent-0.3.3/tests/test_services/test_session_storage.py +170 -0
- illusion_agent-0.3.3/tests/test_skills/test_loader.py +120 -0
- illusion_agent-0.3.3/tests/test_skills/test_loader_permissions.py +59 -0
- illusion_agent-0.3.3/tests/test_swarm/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_swarm/test_agent_cancel_force.py +96 -0
- illusion_agent-0.3.3/tests/test_swarm/test_agent_executor.py +279 -0
- illusion_agent-0.3.3/tests/test_swarm/test_agent_executor_cancel.py +41 -0
- illusion_agent-0.3.3/tests/test_swarm/test_imports.py +71 -0
- illusion_agent-0.3.3/tests/test_swarm/test_in_process.py +283 -0
- illusion_agent-0.3.3/tests/test_swarm/test_types.py +125 -0
- illusion_agent-0.3.3/tests/test_swarm/test_worktree.py +129 -0
- illusion_agent-0.3.3/tests/test_tasks/test_manager.py +289 -0
- illusion_agent-0.3.3/tests/test_tools/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_tools/test_agent_tool.py +131 -0
- illusion_agent-0.3.3/tests/test_tools/test_bash_tool.py +72 -0
- illusion_agent-0.3.3/tests/test_tools/test_core_tools.py +389 -0
- illusion_agent-0.3.3/tests/test_tools/test_file_read_media.py +80 -0
- illusion_agent-0.3.3/tests/test_tools/test_glob_tool.py +83 -0
- illusion_agent-0.3.3/tests/test_tools/test_grep_tool.py +107 -0
- illusion_agent-0.3.3/tests/test_tools/test_integration.py +84 -0
- illusion_agent-0.3.3/tests/test_tools/test_integration_flows.py +261 -0
- illusion_agent-0.3.3/tests/test_tools/test_mcp_auth_tool.py +101 -0
- illusion_agent-0.3.3/tests/test_tools/test_ripgrep.py +283 -0
- illusion_agent-0.3.3/tests/test_tools/test_shell_common.py +191 -0
- illusion_agent-0.3.3/tests/test_tools/test_task_tools.py +35 -0
- illusion_agent-0.3.3/tests/test_tools/test_team_tools.py +147 -0
- illusion_agent-0.3.3/tests/test_tools/test_tool_blocking_io.py +441 -0
- illusion_agent-0.3.3/tests/test_tools/test_web_fetch_tool.py +109 -0
- illusion_agent-0.3.3/tests/test_ui/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_ui/test_append_system_prompt.py +57 -0
- illusion_agent-0.3.3/tests/test_ui/test_async_fixes.py +247 -0
- illusion_agent-0.3.3/tests/test_ui/test_backend_host_refactored.py +519 -0
- illusion_agent-0.3.3/tests/test_ui/test_bug_fixes.py +41 -0
- illusion_agent-0.3.3/tests/test_ui/test_cli_tool_filters.py +131 -0
- illusion_agent-0.3.3/tests/test_ui/test_modes.py +31 -0
- illusion_agent-0.3.3/tests/test_ui/test_pending_question.py +344 -0
- illusion_agent-0.3.3/tests/test_ui/test_permission_mode.py +85 -0
- illusion_agent-0.3.3/tests/test_ui/test_permission_store.py +16 -0
- illusion_agent-0.3.3/tests/test_ui/test_print_mode_enhanced.py +149 -0
- illusion_agent-0.3.3/tests/test_ui/test_print_mode_plan_approval.py +60 -0
- illusion_agent-0.3.3/tests/test_ui/test_react_backend.py +491 -0
- illusion_agent-0.3.3/tests/test_ui/test_react_launcher.py +35 -0
- illusion_agent-0.3.3/tests/test_ui/test_terminal_io.py +192 -0
- illusion_agent-0.3.3/tests/test_ui/test_verbose_debug_bare.py +84 -0
- illusion_agent-0.3.3/tests/test_ui/test_web_host_refactored.py +255 -0
- illusion_agent-0.3.3/tests/test_untested_features.py +856 -0
- illusion_agent-0.3.3/tests/test_utils/__init__.py +0 -0
- illusion_agent-0.3.3/tests/test_utils/test_aioqueue.py +105 -0
- illusion_agent-0.3.3/tests/test_utils/test_daemon_ipc.py +225 -0
- illusion_agent-0.3.3/tests/test_utils/test_ripgrep.py +102 -0
- illusion_agent-0.3.3/tests/test_utils/test_shell.py +106 -0
- illusion_agent-0.3.3/tests/test_utils/test_signals.py +46 -0
- illusion_agent-0.3.3/tests/test_utils/test_stderr_redirect.py +133 -0
- illusion_agent-0.3.3/tests/ui/test_backend_host.py +28 -0
- illusion_agent-0.3.3/tests/ui/test_env_routes.py +254 -0
- illusion_agent-0.3.3/tests/ui/test_protocol_web.py +103 -0
- illusion_agent-0.3.3/tests/ui/test_runtime_auth_missing.py +53 -0
- illusion_agent-0.3.3/tests/ui/test_web_api.py +450 -0
- illusion_agent-0.3.3/tests/unit/__init__.py +0 -0
- illusion_agent-0.3.3/tests/unit/test_channel_hints.py +74 -0
- illusion_agent-0.3.3/tests/unit/test_cross_channel.py +186 -0
- illusion_agent-0.3.3/tests/unit/test_delivery.py +239 -0
- illusion_agent-0.3.3/tests/unit/test_feishu_streaming.py +666 -0
- illusion_agent-0.3.3/tests/unit/test_media_tools.py +32 -0
- illusion_agent-0.3.3/tests/unit/test_qq_streaming.py +429 -0
- 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>
|