Full Code of Peiiii/AgentVerse for AI

master 3c17c5482014 cached
667 files
1.8 MB
539.0k tokens
1297 symbols
1 requests
Download .txt
Showing preview only (2,240K chars total). Download the full file or copy to clipboard to get everything.
Repository: Peiiii/AgentVerse
Branch: master
Commit: 3c17c5482014
Files: 667
Total size: 1.8 MB

Directory structure:
gitextract_5vq11rbw/

├── .agent/
│   └── workflows/
│       ├── feature-based-architecture.md
│       └── governance-strategy.md
├── .babelrc.js
├── .codex/
│   └── skills/
│       └── project-os/
│           ├── .skild/
│           │   └── install.json
│           ├── SKILL.md
│           └── assets/
│               ├── AGENTS.template.md
│               ├── commands/
│               │   └── commands.md
│               └── docs/
│                   └── workflows/
│                       └── npm-release-process.md
├── .cursor/
│   ├── commands/
│   │   └── commit.md
│   ├── cursorignore
│   └── rules/
│       ├── README.md
│       ├── agentverse-project.mdc
│       ├── code-simplicity.mdc
│       ├── commit.mdc
│       ├── core.mdc
│       ├── customization.mdc
│       ├── file-organization.mdc
│       ├── file-size-limits.mdc
│       ├── generate-world-class-artistic-ui.mdc
│       ├── naming-conventions.mdc
│       ├── portal-service-bus-architecture.mdc
│       ├── quick-commands.mdc
│       ├── riper-workflow.mdc
│       ├── start-phase.mdc
│       └── state.mdc
├── .gitignore
├── .i18n-ally.yml
├── .npmrc
├── .ossutilconfig.example
├── AGENTS.md
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTORS.md
├── LICENSE
├── README.md
├── README_EN.md
├── babel.config.cjs
├── commands/
│   └── commands.md
├── components.json
├── docs/
│   ├── PAGE_STRUCTURE.md
│   ├── agent-action.md
│   ├── architecture/
│   │   ├── agent-architecture.md
│   │   ├── agents-architecture.md
│   │   ├── chat-discussion-features.md
│   │   ├── diagrams/
│   │   │   └── architecture.mmd
│   │   ├── discussions-architecture.md
│   │   ├── extension-architecture.md
│   │   └── system-design.md
│   ├── character-templates.md
│   ├── development/
│   │   ├── file-manager-architecture.md
│   │   ├── file-manager-global-tree-design.md
│   │   └── world-class-chat-html-preview-plan.md
│   ├── development-guide.md
│   ├── development-plan.md
│   ├── features-overview.md
│   ├── i18n-coverage-report.md
│   ├── i18n-tools-guide.md
│   ├── logs/
│   │   ├── README.md
│   │   ├── TEMPLATE.md
│   │   ├── v0.0.1-init/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.0-backend-ready/
│   │   │   ├── analysis.md
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.1-notes-sidebar/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.10-stream-normalizer-robust/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.11-mention-self-guard/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.12-message-merge-safety/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.13-v2ex-post/
│   │   │   ├── iteration-notes.md
│   │   │   └── v2ex-post.md
│   │   ├── v0.1.14-sidebar-github/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.15-activitybar-github/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.16-readme-screenshots/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.17-dashscope-models/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.2-auth-email/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.3-auth-optional/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.4-auth-entry/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.5-poop-impact/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.6-stream-dedupe/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.7-streaming-delta-normalization/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.8-streaming-mode-normalization/
│   │   │   └── iteration-notes.md
│   │   └── v0.1.9-poop-impact-drama/
│   │       └── iteration-notes.md
│   ├── mcp-integration.md
│   ├── naming-research.md
│   ├── project-standards.md
│   ├── prompt-experiments.md
│   ├── prompts/
│   │   └── generate-world-class-artistic-ui.md
│   ├── references/
│   │   ├── agent-chat-tutorial.md
│   │   ├── tsdown-docs/
│   │   │   ├── .vitepress/
│   │   │   │   ├── components/
│   │   │   │   │   ├── HomePage.vue
│   │   │   │   │   ├── VideoModal.vue
│   │   │   │   │   └── overrides/
│   │   │   │   │       └── vp-hero.vue
│   │   │   │   ├── config/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── theme.ts
│   │   │   │   ├── i18n/
│   │   │   │   │   ├── composable.ts
│   │   │   │   │   ├── translate-map.ts
│   │   │   │   │   └── utils.ts
│   │   │   │   ├── scripts/
│   │   │   │   │   └── docs-generate.ts
│   │   │   │   └── theme/
│   │   │   │       ├── Layout.vue
│   │   │   │       ├── custom.css
│   │   │   │       └── index.ts
│   │   │   ├── advanced/
│   │   │   │   ├── benchmark.md
│   │   │   │   ├── hooks.md
│   │   │   │   ├── plugins.md
│   │   │   │   ├── programmatic-usage.md
│   │   │   │   └── rolldown-options.md
│   │   │   ├── guide/
│   │   │   │   ├── faq.md
│   │   │   │   ├── getting-started.md
│   │   │   │   ├── index.md
│   │   │   │   └── migrate-from-tsup.md
│   │   │   ├── index.md
│   │   │   ├── options/
│   │   │   │   ├── cleaning.md
│   │   │   │   ├── config-file.md
│   │   │   │   ├── dependencies.md
│   │   │   │   ├── dts.md
│   │   │   │   ├── entry.md
│   │   │   │   ├── minification.md
│   │   │   │   ├── output-directory.md
│   │   │   │   ├── output-format.md
│   │   │   │   ├── package-exports.md
│   │   │   │   ├── platform.md
│   │   │   │   ├── shims.md
│   │   │   │   ├── silent-mode.md
│   │   │   │   ├── sourcemap.md
│   │   │   │   ├── target.md
│   │   │   │   ├── tree-shaking.md
│   │   │   │   ├── unbundle.md
│   │   │   │   └── watch-mode.md
│   │   │   ├── recipes/
│   │   │   │   └── vue-support.md
│   │   │   ├── reference/
│   │   │   │   └── cli.md
│   │   │   ├── vite.config.ts
│   │   │   └── zh-CN/
│   │   │       ├── advanced/
│   │   │       │   ├── benchmark.md
│   │   │       │   ├── hooks.md
│   │   │       │   ├── plugins.md
│   │   │       │   ├── programmatic-usage.md
│   │   │       │   └── rolldown-options.md
│   │   │       ├── guide/
│   │   │       │   ├── faq.md
│   │   │       │   ├── getting-started.md
│   │   │       │   ├── index.md
│   │   │       │   └── migrate-from-tsup.md
│   │   │       ├── index.md
│   │   │       ├── options/
│   │   │       │   ├── cleaning.md
│   │   │       │   ├── config-file.md
│   │   │       │   ├── dependencies.md
│   │   │       │   ├── dts.md
│   │   │       │   ├── entry.md
│   │   │       │   ├── minification.md
│   │   │       │   ├── output-directory.md
│   │   │       │   ├── output-format.md
│   │   │       │   ├── package-exports.md
│   │   │       │   ├── platform.md
│   │   │       │   ├── shims.md
│   │   │       │   ├── silent-mode.md
│   │   │       │   ├── sourcemap.md
│   │   │       │   ├── target.md
│   │   │       │   ├── tree-shaking.md
│   │   │       │   ├── unbundle.md
│   │   │       │   └── watch-mode.md
│   │   │       ├── recipes/
│   │   │       │   └── vue-support.md
│   │   │       └── reference/
│   │   │           └── cli.md
│   │   └── web-mcp-doc.md
│   ├── scheduler-design.md
│   ├── use-all-tools-example.md
│   ├── v2ex-post.md
│   └── workflows/
│       └── npm-release-process.md
├── eslint.config.js
├── functions/
│   ├── _lib/
│   │   ├── config.ts
│   │   ├── crypto.ts
│   │   ├── email.ts
│   │   ├── http.ts
│   │   ├── sessions.ts
│   │   └── validators.ts
│   ├── _types.ts
│   └── api/
│       └── auth/
│           ├── login.ts
│           ├── logout.ts
│           ├── me.ts
│           ├── register.ts
│           ├── request-password-reset.ts
│           ├── resend-verification.ts
│           ├── reset-password.ts
│           └── verify-email.ts
├── i18next-scanner.config.cjs
├── i18next-scanner.config.js
├── index.html
├── jest.config.cjs
├── migrations/
│   └── 0001_auth.sql
├── package.json
├── packages/
│   ├── rx-nested-bean/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── v2.ts
│   │   └── tsconfig.json
│   └── service-bus-portal/
│       ├── LICENSE
│       ├── MIGRATION.md
│       ├── MIGRATION_TO_TSDOWN.md
│       ├── PACKAGE_SUMMARY.md
│       ├── README.md
│       ├── examples/
│       │   ├── README.md
│       │   ├── basic-usage.ts
│       │   ├── comprehensive-example.ts
│       │   ├── iframe-example.ts
│       │   └── worker-example.ts
│       ├── package.json
│       ├── scripts/
│       │   └── publish.sh
│       ├── src/
│       │   ├── core.ts
│       │   ├── factory.ts
│       │   ├── index.ts
│       │   ├── service-bus.ts
│       │   └── types.ts
│       ├── tsconfig.json
│       └── tsdown.config.ts
├── pnpm-workspace.yaml
├── public/
│   ├── iframe-portal.html
│   └── worker-portal.js
├── scripts/
│   ├── check-i18n-coverage.cjs
│   ├── check-i18n-coverage.js
│   ├── metrics/
│   │   ├── feature-structure.cjs
│   │   └── top-loc.cjs
│   └── rename-hooks-to-kebab-case.sh
├── src/
│   ├── App.tsx
│   ├── common/
│   │   ├── components/
│   │   │   ├── common/
│   │   │   │   ├── breakpoint-provider.tsx
│   │   │   │   ├── client-breakpoint-provider.tsx
│   │   │   │   ├── icon-registry.tsx
│   │   │   │   ├── language/
│   │   │   │   │   └── index.ts
│   │   │   │   ├── language-toggle.tsx
│   │   │   │   ├── logo.tsx
│   │   │   │   ├── plugin-router.tsx
│   │   │   │   ├── redirect.tsx
│   │   │   │   ├── role-badge.tsx
│   │   │   │   ├── status-indicator.tsx
│   │   │   │   ├── theme/
│   │   │   │   │   ├── context.tsx
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── toggle.tsx
│   │   │   │   └── theme-toggle.tsx
│   │   │   ├── layout/
│   │   │   │   ├── page-container.tsx
│   │   │   │   └── responsive-container.tsx
│   │   │   ├── layouts/
│   │   │   │   └── scrollable-layout.tsx
│   │   │   └── ui/
│   │   │       ├── alert-dialog.tsx
│   │   │       ├── alert.tsx
│   │   │       ├── auto-resize-textarea.tsx
│   │   │       ├── avatar.tsx
│   │   │       ├── badge.tsx
│   │   │       ├── button.tsx
│   │   │       ├── card.tsx
│   │   │       ├── checkbox.tsx
│   │   │       ├── dialog.tsx
│   │   │       ├── dropdown-menu.tsx
│   │   │       ├── hover-card.tsx
│   │   │       ├── input.tsx
│   │   │       ├── label.tsx
│   │   │       ├── markdown/
│   │   │       │   ├── code-block-container.tsx
│   │   │       │   ├── code-block.tsx
│   │   │       │   ├── components/
│   │   │       │   │   ├── error-boundary.tsx
│   │   │       │   │   ├── mermaid-renderer.ts
│   │   │       │   │   └── mermaid.tsx
│   │   │       │   ├── copy-code-button.tsx
│   │   │       │   ├── index.tsx
│   │   │       │   ├── types.ts
│   │   │       │   └── world-class-markdown.css
│   │   │       ├── modal/
│   │   │       │   ├── context.tsx
│   │   │       │   ├── hooks.ts
│   │   │       │   ├── index.ts
│   │   │       │   ├── provider.tsx
│   │   │       │   └── types.ts
│   │   │       ├── popover.tsx
│   │   │       ├── scroll-area.tsx
│   │   │       ├── select.tsx
│   │   │       ├── separator.tsx
│   │   │       ├── sheet.tsx
│   │   │       ├── skeleton.tsx
│   │   │       ├── slider.tsx
│   │   │       ├── smart-avatar.tsx
│   │   │       ├── switch.tsx
│   │   │       ├── tabs.tsx
│   │   │       ├── textarea.tsx
│   │   │       ├── toast.tsx
│   │   │       ├── toaster.tsx
│   │   │       └── tooltip.tsx
│   │   ├── features/
│   │   │   ├── agents/
│   │   │   │   ├── components/
│   │   │   │   │   ├── add-agent-dialog/
│   │   │   │   │   │   ├── add-agent-dialog-content.tsx
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── use-add-agent-dialog.tsx
│   │   │   │   │   ├── agent-tools/
│   │   │   │   │   │   ├── README.md
│   │   │   │   │   │   ├── agent-analysis.tool.ts
│   │   │   │   │   │   ├── code-analysis.tool.ts
│   │   │   │   │   │   ├── display-quick-actions.tool.ts
│   │   │   │   │   │   ├── file-system.tool.ts
│   │   │   │   │   │   ├── get-current-time.tool.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   ├── network.tool.ts
│   │   │   │   │   │   ├── tool-factories.ts
│   │   │   │   │   │   └── update-agent.tool.tsx
│   │   │   │   │   ├── avatars/
│   │   │   │   │   │   ├── clickable-agent-avatar.tsx
│   │   │   │   │   │   └── use-avatar-interaction.ts
│   │   │   │   │   ├── cards/
│   │   │   │   │   │   ├── README.md
│   │   │   │   │   │   ├── agent-card.tsx
│   │   │   │   │   │   ├── agent-chat-card.tsx
│   │   │   │   │   │   ├── agent-group-card.tsx
│   │   │   │   │   │   ├── agent-hover-card.tsx
│   │   │   │   │   │   ├── agent-info-card.tsx
│   │   │   │   │   │   ├── agent-select-card.tsx
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── modern-agent-card.tsx
│   │   │   │   │   ├── configuration/
│   │   │   │   │   │   ├── agent-configuration-assistant.tsx
│   │   │   │   │   │   ├── agent-configuration-preview.tsx
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── use-agent-configuration-tools.tsx
│   │   │   │   │   ├── dialogs/
│   │   │   │   │   │   ├── add-agent-dialog.tsx
│   │   │   │   │   │   ├── custom-team-dialog.tsx
│   │   │   │   │   │   ├── edit-agent-dialog.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── floating-agent-info.tsx
│   │   │   │   │   ├── forms/
│   │   │   │   │   │   ├── agent-embedded-form.tsx
│   │   │   │   │   │   ├── agent-form.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── lists/
│   │   │   │   │   │   ├── agent-combination-list.tsx
│   │   │   │   │   │   ├── agent-list.tsx
│   │   │   │   │   │   ├── agent-select-list.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── member-management.tsx
│   │   │   │   │   └── preview/
│   │   │   │   │       ├── README.md
│   │   │   │   │       ├── agent-preview-chat.tsx
│   │   │   │   │       ├── agent-preview-tools.example.ts
│   │   │   │   │       └── index.ts
│   │   │   │   └── extensions/
│   │   │   │       └── index.tsx
│   │   │   ├── all-in-one-agent/
│   │   │   │   ├── README.md
│   │   │   │   ├── components/
│   │   │   │   │   ├── agent-tools/
│   │   │   │   │   │   ├── calculator.tool.ts
│   │   │   │   │   │   ├── clear-suggestions.tool.ts
│   │   │   │   │   │   ├── file-system.tool.ts
│   │   │   │   │   │   ├── get-current-time.tool.ts
│   │   │   │   │   │   ├── html-preview-from-file.tool.tsx
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   ├── provide-next-steps.tool.ts
│   │   │   │   │   │   ├── recommend-topics.tool.ts
│   │   │   │   │   │   ├── request-user-choice.tool.ts
│   │   │   │   │   │   ├── send-message-to-iframe.tool.tsx
│   │   │   │   │   │   ├── subscribe-iframe-messages.tool.tsx
│   │   │   │   │   │   └── weather.tool.ts
│   │   │   │   │   ├── all-in-one-agent-dock.tsx
│   │   │   │   │   └── smart-assistant-dialog.tsx
│   │   │   │   ├── extensions/
│   │   │   │   │   └── index.tsx
│   │   │   │   ├── hooks/
│   │   │   │   │   └── use-all-in-one-agent-mode.tsx
│   │   │   │   ├── index.ts
│   │   │   │   └── pages/
│   │   │   │       └── all-in-one-agent-page.tsx
│   │   │   ├── app/
│   │   │   │   └── components/
│   │   │   │       ├── activity-bar.tsx
│   │   │   │       ├── app-loading.tsx
│   │   │   │       └── mobile-bottom-bar.tsx
│   │   │   ├── auth/
│   │   │   │   ├── components/
│   │   │   │   │   ├── auth-gate.tsx
│   │   │   │   │   ├── auth-routes.tsx
│   │   │   │   │   └── auth-shell.tsx
│   │   │   │   └── pages/
│   │   │   │       ├── forgot-password-page.tsx
│   │   │   │       ├── login-page.tsx
│   │   │   │       ├── reset-password-page.tsx
│   │   │   │       └── verify-email-page.tsx
│   │   │   ├── chat/
│   │   │   │   ├── components/
│   │   │   │   │   ├── agent-chat/
│   │   │   │   │   │   ├── README.md
│   │   │   │   │   │   ├── agent-chat-container.tsx
│   │   │   │   │   │   ├── agent-chat-header-with-info.tsx
│   │   │   │   │   │   ├── agent-chat-header.tsx
│   │   │   │   │   │   ├── agent-chat-input.tsx
│   │   │   │   │   │   ├── agent-chat-messages.tsx
│   │   │   │   │   │   ├── agent-chat-provider-wrapper.tsx
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── tool-call-renderer.tsx
│   │   │   │   │   ├── chat-area.tsx
│   │   │   │   │   ├── chat-empty-guide.tsx
│   │   │   │   │   ├── chat-welcome-header.tsx
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── mention-suggestions.tsx
│   │   │   │   │   ├── message/
│   │   │   │   │   │   ├── index.tsx
│   │   │   │   │   │   ├── interaction-overlay.tsx
│   │   │   │   │   │   ├── message-capture.tsx
│   │   │   │   │   │   ├── message-content-blocks.tsx
│   │   │   │   │   │   ├── message-item-wechat.tsx
│   │   │   │   │   │   ├── message-item.tsx
│   │   │   │   │   │   ├── message-list-desktop.tsx
│   │   │   │   │   │   ├── message-list-mobile.tsx
│   │   │   │   │   │   ├── message-list.tsx
│   │   │   │   │   │   ├── message-markdown-content.tsx
│   │   │   │   │   │   ├── message-preview-dialog.tsx
│   │   │   │   │   │   └── tool-result-list.tsx
│   │   │   │   │   ├── message-input-desktop.tsx
│   │   │   │   │   ├── message-input-mobile.tsx
│   │   │   │   │   ├── message-input.tsx
│   │   │   │   │   ├── modern-chat-input.tsx
│   │   │   │   │   └── suggestions/
│   │   │   │   │       ├── README.md
│   │   │   │   │       ├── index.ts
│   │   │   │   │       ├── suggestion.types.ts
│   │   │   │   │       └── suggestions-provider.tsx
│   │   │   │   ├── hooks/
│   │   │   │   │   └── use-poop-trigger.ts
│   │   │   │   ├── managers/
│   │   │   │   │   └── chat-scroll.manager.ts
│   │   │   │   └── stores/
│   │   │   │       ├── chat-scroll.store.ts
│   │   │   │       └── interaction.store.ts
│   │   │   ├── discussion/
│   │   │   │   └── components/
│   │   │   │       ├── control/
│   │   │   │       │   ├── clear-messages-button.tsx
│   │   │   │       │   ├── discussion-controller.tsx
│   │   │   │       │   └── use-discussion-control.ts
│   │   │   │       ├── list/
│   │   │   │       │   ├── discussion-avatar.tsx
│   │   │   │       │   ├── discussion-item.tsx
│   │   │   │       │   ├── discussion-list-header.tsx
│   │   │   │       │   ├── discussion-list.tsx
│   │   │   │       │   ├── index.ts
│   │   │   │       │   └── types.ts
│   │   │   │       ├── member/
│   │   │   │       │   ├── add-member-dialog.tsx
│   │   │   │       │   ├── member-item.tsx
│   │   │   │       │   ├── member-list.tsx
│   │   │   │       │   ├── member-skeleton.tsx
│   │   │   │       │   ├── member-toggle-button.tsx
│   │   │   │       │   ├── mobile-member-drawer.tsx
│   │   │   │       │   ├── mobile-member-list.tsx
│   │   │   │       │   └── quick-member-selector.tsx
│   │   │   │       ├── mobile/
│   │   │   │       │   ├── mobile-action-sheet.tsx
│   │   │   │       │   └── mobile-header.tsx
│   │   │   │       ├── notes/
│   │   │   │       │   └── discussion-notes-panel.tsx
│   │   │   │       ├── settings/
│   │   │   │       │   ├── discussion-settings-button.tsx
│   │   │   │       │   ├── discussion-settings-panel.tsx
│   │   │   │       │   ├── setting-item.tsx
│   │   │   │       │   ├── setting-select.tsx
│   │   │   │       │   ├── setting-slider.tsx
│   │   │   │       │   └── setting-switch.tsx
│   │   │   │       └── sidebar/
│   │   │   │           └── discussion-sidebar.tsx
│   │   │   ├── home/
│   │   │   │   └── components/
│   │   │   │       ├── agent-popover.tsx
│   │   │   │       ├── initial-experience.tsx
│   │   │   │       ├── initial-input.tsx
│   │   │   │       ├── team-details-dialog.tsx
│   │   │   │       └── welcome-header.tsx
│   │   │   └── world-class-chat/
│   │   │       ├── components/
│   │   │       │   ├── settings-panel/
│   │   │       │   │   ├── index.ts
│   │   │       │   │   ├── memory-setting.tsx
│   │   │       │   │   ├── prompt-setting.tsx
│   │   │       │   │   ├── settings-registry.ts
│   │   │       │   │   ├── types.ts
│   │   │       │   │   └── world-class-settings-panel.tsx
│   │   │       │   └── world-class-chat-html-preview.tsx
│   │   │       ├── copy-message-button.tsx
│   │   │       ├── hooks/
│   │   │       │   ├── use-iframe-manager.ts
│   │   │       │   ├── use-side-panel-manager.ts
│   │   │       │   └── use-suggestions-manager.ts
│   │   │       ├── index.ts
│   │   │       ├── side-panel.tsx
│   │   │       ├── stores/
│   │   │       │   ├── memory.store.ts
│   │   │       │   └── world-class-chat-settings.store.ts
│   │   │       ├── world-class-chat-container.tsx
│   │   │       ├── world-class-chat-input-bar.tsx
│   │   │       ├── world-class-chat-message-list.tsx
│   │   │       ├── world-class-chat-top-bar.tsx
│   │   │       └── world-class-tool-call-renderer.tsx
│   │   ├── hooks/
│   │   │   ├── index.ts
│   │   │   ├── use-agent-file-manager.ts
│   │   │   ├── use-all-tools.ts
│   │   │   ├── use-chat-auto-scroll.ts
│   │   │   ├── use-chat-message-cache.ts
│   │   │   ├── use-mcp-servers.ts
│   │   │   ├── use-mention-position.ts
│   │   │   ├── use-mention.ts
│   │   │   └── use-provide-agent-tools.ts
│   │   ├── lib/
│   │   │   ├── agent/
│   │   │   │   └── prompt/
│   │   │   │       ├── prompt-builder.ts
│   │   │   │       └── prompts.ts
│   │   │   ├── ai-service/
│   │   │   │   └── index.ts
│   │   │   ├── capabilities/
│   │   │   │   └── index.ts
│   │   │   ├── discussion/
│   │   │   │   └── message-utils.ts
│   │   │   ├── env.ts
│   │   │   ├── file-manager.service.ts
│   │   │   ├── file-tree.service.ts
│   │   │   ├── mcp/
│   │   │   │   ├── examples/
│   │   │   │   │   └── mock-server.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── transports/
│   │   │   │       ├── event.ts
│   │   │   │       ├── index.ts
│   │   │   │       ├── postmessage.ts
│   │   │   │       └── transport.ts
│   │   │   ├── prompts/
│   │   │   │   └── index.ts
│   │   │   ├── resource.ts
│   │   │   ├── runnable-agent/
│   │   │   │   ├── README.md
│   │   │   │   ├── agent-utils/
│   │   │   │   │   ├── handlers/
│   │   │   │   │   │   ├── text-message.handler.ts
│   │   │   │   │   │   └── tool-call.handler.ts
│   │   │   │   │   ├── openai-agent.ts
│   │   │   │   │   ├── stream-processor.ts
│   │   │   │   │   └── types.ts
│   │   │   │   ├── experimental-inbrowser-agent.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── sse-json-decoder.ts
│   │   │   ├── rx-event.ts
│   │   │   ├── rx-state/
│   │   │   │   └── index.ts
│   │   │   ├── service-bus/
│   │   │   │   └── index.ts
│   │   │   ├── storage/
│   │   │   │   ├── index.ts
│   │   │   │   ├── indexeddb.ts
│   │   │   │   ├── local.ts
│   │   │   │   ├── mock-http.ts
│   │   │   │   └── types.ts
│   │   │   ├── typed-bus/
│   │   │   │   ├── __tests__/
│   │   │   │   │   └── environment-bus.test.ts
│   │   │   │   ├── base.ts
│   │   │   │   ├── bus-proxy.ts
│   │   │   │   ├── decorators.ts
│   │   │   │   ├── implementations/
│   │   │   │   │   ├── capability-bus.ts
│   │   │   │   │   ├── environment-bus.ts
│   │   │   │   │   ├── event-bus.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── message-bus.ts
│   │   │   │   │   ├── resource-bus.ts
│   │   │   │   │   └── state-bus.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── key.ts
│   │   │   │   ├── middleware-chain.ts
│   │   │   │   └── types.ts
│   │   │   ├── utils.ts
│   │   │   └── with-event.ts
│   │   └── types/
│   │       ├── agent-config.ts
│   │       ├── agent.ts
│   │       ├── ai.ts
│   │       ├── auth.ts
│   │       ├── chat.ts
│   │       ├── discussion-member.ts
│   │       ├── discussion.ts
│   │       ├── guide.ts
│   │       ├── route.ts
│   │       └── storage.ts
│   ├── core/
│   │   ├── bootstrap/
│   │   │   ├── agents.bootstrap.ts
│   │   │   └── app.bootstrap.ts
│   │   ├── config/
│   │   │   ├── agents/
│   │   │   │   ├── base-types.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── moderators/
│   │   │   │   │   ├── meta-cognitive-orchestrator.ts
│   │   │   │   │   ├── structured-thinking-moderator.ts
│   │   │   │   │   └── troll-moderator.ts
│   │   │   │   ├── practical-agents/
│   │   │   │   │   ├── data-interpreter.ts
│   │   │   │   │   ├── implementation-architect.ts
│   │   │   │   │   └── startup-navigator.ts
│   │   │   │   └── top-agents/
│   │   │   │       ├── cognitive-detective.ts
│   │   │   │       ├── concept-alchemist.ts
│   │   │   │       ├── decision-gardener.ts
│   │   │   │       ├── emotion-meteorologist.ts
│   │   │   │       ├── essence-perspectivist.ts
│   │   │   │       ├── inspiration-archaeologist.ts
│   │   │   │       ├── meaning-seeker.ts
│   │   │   │       ├── multiverse-observer.ts
│   │   │   │       ├── narrative-architect.ts
│   │   │   │       ├── pattern-linguist.ts
│   │   │   │       ├── psyche-time-traveler.ts
│   │   │   │       ├── quantum-advisor.ts
│   │   │   │       ├── structure-architect.ts
│   │   │   │       ├── troll-attacker.ts
│   │   │   │       ├── troll-cynic.ts
│   │   │   │       ├── troll-hater.ts
│   │   │   │       ├── troll-nonsense.ts
│   │   │   │       ├── troll-picker.ts
│   │   │   │       ├── troll-saboteur.ts
│   │   │   │       └── troll-spammer.ts
│   │   │   ├── ai.ts
│   │   │   ├── guide-scenarios.ts
│   │   │   ├── i18n.ts
│   │   │   ├── module-order.ts
│   │   │   ├── settings.ts
│   │   │   ├── storage.ts
│   │   │   └── ui-persist.ts
│   │   ├── env.ts
│   │   ├── events.ts
│   │   ├── extension-manager.ts
│   │   ├── hooks/
│   │   │   ├── use-agent-chat-page-helper.ts
│   │   │   ├── use-app-bootstrap.ts
│   │   │   ├── use-auth.ts
│   │   │   ├── use-connect-navigation-store.ts
│   │   │   ├── use-copy.ts
│   │   │   ├── use-extensions.ts
│   │   │   ├── use-i18n.ts
│   │   │   ├── use-indexeddb-manager.ts
│   │   │   ├── use-setup-app.ts
│   │   │   ├── use-toast.ts
│   │   │   ├── useAgentForm.ts
│   │   │   ├── useAgents.ts
│   │   │   ├── useAutoScroll.ts
│   │   │   ├── useBreakpoint.ts
│   │   │   ├── useCurrentDiscussionId.ts
│   │   │   ├── useDiscussion.ts
│   │   │   ├── useDiscussionMembers.ts
│   │   │   ├── useDiscussionRuntime.ts
│   │   │   ├── useDiscussionSettings.ts
│   │   │   ├── useDiscussions.ts
│   │   │   ├── useKeyboardExpandableList.ts
│   │   │   ├── useMediaQuery.ts
│   │   │   ├── useMemberSelection.ts
│   │   │   ├── useMessageInput.ts
│   │   │   ├── useMessageList.ts
│   │   │   ├── useMessages.ts
│   │   │   ├── useObservableState.ts
│   │   │   ├── useOptimisticUpdate.ts
│   │   │   ├── usePersistedState.ts
│   │   │   ├── useViewportHeight.ts
│   │   │   └── useWindowSize.ts
│   │   ├── locales/
│   │   │   ├── en-US.json
│   │   │   └── zh-CN.json
│   │   ├── managers/
│   │   │   ├── activity-bar.manager.ts
│   │   │   ├── agents.manager.ts
│   │   │   ├── db-capabilities.ts
│   │   │   ├── discussion/
│   │   │   │   ├── mention-resolver.ts
│   │   │   │   ├── next-speaker.ts
│   │   │   │   └── streaming-responder.ts
│   │   │   ├── discussion-capabilities.ts
│   │   │   ├── discussion-control.manager.ts
│   │   │   ├── discussion-members.manager.ts
│   │   │   ├── discussions.manager.ts
│   │   │   ├── icon.manager.ts
│   │   │   ├── index.ts
│   │   │   ├── messages.manager.ts
│   │   │   ├── navigation.manager.ts
│   │   │   └── route-tree.manager.ts
│   │   ├── presenter/
│   │   │   ├── index.ts
│   │   │   ├── presenter-context.tsx
│   │   │   └── presenter.ts
│   │   ├── repositories/
│   │   │   ├── agent.repository.ts
│   │   │   ├── ai.client.ts
│   │   │   ├── data-providers.ts
│   │   │   ├── discussion-member.repository.ts
│   │   │   ├── discussion.repository.ts
│   │   │   ├── index.ts
│   │   │   ├── message.repository.ts
│   │   │   └── shared.types.ts
│   │   ├── stores/
│   │   │   ├── README.md
│   │   │   ├── activity-bar.store.ts
│   │   │   ├── agents.store.ts
│   │   │   ├── auth.store.ts
│   │   │   ├── discussion-members.store.ts
│   │   │   ├── discussions.store.ts
│   │   │   ├── icon.store.ts
│   │   │   ├── mcp-server.store.ts
│   │   │   ├── messages.store.ts
│   │   │   ├── navigation.store.ts
│   │   │   └── route-tree.store.ts
│   │   ├── styles/
│   │   │   └── theme.css
│   │   └── utils/
│   │       ├── auth-client.ts
│   │       ├── common.util.ts
│   │       ├── connect-router-with-activity-bar.ts
│   │       ├── discussion-error.util.ts
│   │       └── message.util.ts
│   ├── desktop/
│   │   ├── desktop-app.tsx
│   │   └── features/
│   │       ├── agents/
│   │       │   ├── components/
│   │       │   │   └── agent-profile-view.tsx
│   │       │   ├── extensions/
│   │       │   │   └── index.tsx
│   │       │   └── pages/
│   │       │       ├── agent-detail-page.tsx
│   │       │       └── agents-page.tsx
│   │       ├── chat/
│   │       │   ├── extensions/
│   │       │   │   └── index.tsx
│   │       │   └── pages/
│   │       │       └── chat-page.tsx
│   │       ├── file-manager/
│   │       │   ├── README.md
│   │       │   ├── components/
│   │       │   │   ├── file-preview.tsx
│   │       │   │   ├── file-tree.tsx
│   │       │   │   └── pluggable-file-preview.tsx
│   │       │   ├── extensions/
│   │       │   │   └── index.tsx
│   │       │   ├── hooks/
│   │       │   │   ├── use-delayed-loading.ts
│   │       │   │   ├── use-file-ops.ts
│   │       │   │   ├── use-file-tree.ts
│   │       │   │   ├── use-lightningfs-manager.ts
│   │       │   │   └── use-working-directory.ts
│   │       │   ├── pages/
│   │       │   │   └── file-manager-page.tsx
│   │       │   ├── previewers/
│   │       │   │   ├── html-previewer.tsx
│   │       │   │   ├── index.tsx
│   │       │   │   ├── markdown-previewer.tsx
│   │       │   │   └── text-previewer.tsx
│   │       │   ├── services/
│   │       │   │   └── file-preview-registry.service.ts
│   │       │   └── types/
│   │       │       └── file-preview.types.ts
│   │       └── indexeddb/
│   │           ├── components/
│   │           │   ├── indexeddb-data-viewer.tsx
│   │           │   ├── indexeddb-database-info.tsx
│   │           │   └── indexeddb-store-manager.tsx
│   │           ├── extensions/
│   │           │   └── index.tsx
│   │           └── pages/
│   │               └── indexeddb-manager-page.tsx
│   ├── index.css
│   ├── main.tsx
│   ├── mobile/
│   │   ├── features/
│   │   │   └── chat/
│   │   │       ├── extensions/
│   │   │       │   └── index.tsx
│   │   │       ├── managers/
│   │   │       │   └── mobile-chat-scene.manager.ts
│   │   │       ├── pages/
│   │   │       │   └── chat-page.tsx
│   │   │       └── stores/
│   │   │           └── mobile-chat-scene.store.ts
│   │   └── mobile-app.tsx
│   └── vite-env.d.ts
├── tsconfig.app.json
├── tsconfig.json
├── tsconfig.node.json
├── vite.config.ts
└── wrangler.toml

================================================
FILE CONTENTS
================================================

================================================
FILE: .agent/workflows/feature-based-architecture.md
================================================
---
description: Feature-Based 架构规范,用于 AI 开发时复用
---

# Feature-Based 架构规范

## 核心原则

按**业务功能**而非技术类型组织代码。每个 feature 目录包含该功能所需的全部代码。

## 目录结构

```
src/
├── common/                    # 跨平台共享代码
│   └── features/
│       └── [feature-name]/    # 功能模块
│           ├── components/    # UI 组件
│           ├── hooks/         # React Hooks
│           ├── stores/        # 状态管理
│           ├── services/      # 业务逻辑/API
│           ├── types/         # TypeScript 类型
│           ├── utils/         # 工具函数
│           ├── managers/      # 管理器类
│           ├── extensions/    # 扩展/插件
│           └── index.ts       # 公开导出
│
├── desktop/                   # 桌面端特有代码
│   └── features/
│       └── [feature-name]/
│           ├── pages/         # 页面组件
│           └── ...            # 同上子目录
│
├── mobile/                    # 移动端特有代码
│   └── features/
│       └── ...
│
└── core/                      # 核心基础设施(非 feature)
```

## 规则

1. **Feature 内高内聚** - 一个功能的所有代码放在同一目录下
2. **Feature 间低耦合** - 通过 `index.ts` 暴露公共 API,禁止直接引用内部文件
3. **平台代码分离** - `common` 放共享代码,`desktop`/`mobile` 放平台特有代码
4. **子目录按需创建** - 不强制所有子目录都存在,按实际需要添加
5. **命名规范** - feature 名使用 kebab-case(如 `file-manager`)

## 示例

```
src/common/features/
├── chat/
│   ├── components/
│   │   ├── chat-input.tsx
│   │   ├── message-list.tsx
│   │   └── message-item.tsx
│   ├── stores/
│   │   └── chat-store.ts
│   └── index.ts
│
├── agents/
│   ├── components/
│   └── extensions/
│
└── settings/
    └── components/
```


================================================
FILE: .agent/workflows/governance-strategy.md
================================================
---
description: 代码库治理的指导思想与战略(五步法)
---

# 指导思想与战略(五步法治理)

## 目标

- 提升可维护性与可扩展性
- 为接入真实后端保留清晰边界
- 保障交付速度与稳定性

## 指导思想

1. **先保留核心价值链**:以真实用户路径和关键业务目标为优先保留对象。
2. **边界优于实现**:接口与模块边界清晰,内部实现可被替换。
3. **先减法后加法**:删除与收口先于优化,避免在噪音上雕花。
4. **先收口再优化**:统一出口、统一入口后再优化性能与体验。
5. **可验证与可回滚**:每一步都有可验证指标与回滚路径。

## 五步法治理规划

### 1) 删除(减法优先)

- **清单化**:功能、脚本、依赖、页面、实验性模块全量盘点。
- **判定标准**:无人使用 / 无负责人 / 无测试 / 无价值 / 与现目标不一致。
- **执行方式**:先停用与标记,再物理删除;保留变更记录。

### 2) 简化(收口通道)

- **API 出口收口**:所有网络与模型调用统一到单一适配层。
- **状态与消息流收口**:避免多套状态管理与事件通道并行。
- **最少抽象**:避免过早设计,优先用清晰可读的结构替代复杂层级。

### 3) 优化/标准化(建立约束)

- **Feature 边界**:跨功能只通过 `index.ts` 暴露公共 API。
- **DTO 映射层**:后端数据与前端 UI/状态解耦。
- **目录规范**:持续执行 Feature-Based 结构,避免漂移。

### 4) 加速(缩短反馈)

- **反馈时间**:核心变更 30-60 分钟内可验证。
- **最小验证集**:lint/typecheck/关键测试/预览脚本可一键运行。

### 5) 自动化(防回退)

- **脚手架**:自动生成 feature 结构与基础文件。
- **约束工具**:eslint 规则与 CI 检查防止跨边界依赖。
- **监控机制**:持续检查无主模块与闲置依赖。

## 交付节奏(建议)

- 每个阶段以 1-2 周为一个小循环,形成可衡量的里程碑。
- 删除与简化优先级高于优化与自动化。


================================================
FILE: .babelrc.js
================================================
module.exports = {
  presets: [
    ['@babel/preset-env', { targets: { node: 'current' } }],
    '@babel/preset-typescript',
    ['@babel/preset-react', { runtime: 'automatic' }]
  ],
  plugins: [
    ['@babel/plugin-proposal-decorators', { legacy: true }]
  ]
}; 

================================================
FILE: .codex/skills/project-os/.skild/install.json
================================================
{
  "schemaVersion": 1,
  "name": "project-os",
  "platform": "codex",
  "scope": "project",
  "source": "peiiii/skild/skills/project-os",
  "sourceType": "degit-shorthand",
  "installedAt": "2026-01-25T11:50:19.363Z",
  "installDir": "/Users/tongwenwen/Projects/Peiiii/AgentVerse/.codex/skills/project-os",
  "contentHash": "4a7c96587d5001c7707a44a5ed4bbc3fcaa6ee056a0daac27aca8582368cb3c3",
  "hasSkillMd": true,
  "skill": {
    "frontmatter": {
      "name": "project-os",
      "description": "AI project OS for autonomous loop, automated orchestration, and rule-driven execution.",
      "version": "0.1.1",
      "author": "Peiiii",
      "license": "MIT",
      "tags": [
        "governance",
        "process",
        "release",
        "logs"
      ]
    },
    "validation": {
      "ok": true,
      "issues": [],
      "frontmatter": {
        "name": "project-os",
        "description": "AI project OS for autonomous loop, automated orchestration, and rule-driven execution.",
        "version": "0.1.1",
        "author": "Peiiii",
        "license": "MIT",
        "tags": [
          "governance",
          "process",
          "release",
          "logs"
        ]
      }
    }
  }
}


================================================
FILE: .codex/skills/project-os/SKILL.md
================================================
---
name: project-os
description: AI project OS for autonomous loop, automated orchestration, and rule-driven execution.
version: 0.1.1
author: Peiiii
license: MIT
tags:
  - governance
  - process
  - release
  - logs
---

# Project OS

用于在新项目中快速落地“开发规范 + 迭代日志 + 发布闭环”的通用体系(Project OS),面向未来演进为可自治、可编排、自动驱动研发流程的 AI 操作系统。

## 三段式定位

1) 自治闭环  
覆盖需求—实现—验证—发布—线上冒烟—复盘的端到端闭环,系统自动推动流程完成并形成可追踪证据链。

2) 自动化编排  
将研发流程拆解为可编排的步骤与指令(commands/skills/workflows),以最小人工干预串联执行、回滚与验收。

3) 规则驱动执行  
所有行为由 Rulebook 统一约束与裁决,确保执行一致性、合规性与可审计性;如需例外必须显式声明并记录。

## 适用场景

- 想把一套严格交付流程迁移到其他项目。
- 需要在团队内统一验证/冒烟/发布规范。

## 快速落地

将本 Skill 的模板复制到目标项目根目录(若已有文件,需合并而非覆盖):

```bash
cp -R <skill>/assets/commands ./commands
cp -R <skill>/assets/docs ./docs
cp <skill>/assets/AGENTS.template.md ./AGENTS.md
```

## 关键约束

- “完成所有/完成全部”默认执行完整上线闭环(migrations -> deploy -> 线上冒烟)。
- 冒烟测试默认使用非仓库目录环境,禁止写入仓库子目录。
- 每次开发阶段结束必须完成 build/lint/tsc + 冒烟(如适用)。

## 扩展与维护

- 新增/修改指令:更新 `commands/commands.md` 并同步 AGENTS 索引。
- 新增/修改规则:只在 AGENTS 的 Rulebook 维护。
- 发布流程统一写入 `docs/workflows/npm-release-process.md`。

## 模板索引

- `assets/AGENTS.template.md`
- `assets/commands/commands.md`
- `assets/docs/logs/TEMPLATE.md`
- `assets/docs/logs/README.md`
- `assets/docs/workflows/npm-release-process.md`


================================================
FILE: .codex/skills/project-os/assets/AGENTS.template.md
================================================
1. 假设你是ceo+cto(架构师)+产品经理的综合体,从这个角度来思考所有问题
2. 不要管开发代价,永远只考虑最终最佳方案,反正都是你来开发
3. 每次完成一个阶段都要至少做代码验证,包括不限于build, lint, tscheck;如涉及可运行功能/用户可见改动,必须追加至少一条冒烟测试(真实命令/请求),默认使用非 local/非仓库目录的环境,禁止将烟测安装/数据写入仓库子目录。
4. 涉及后端或数据库变更的发布必须执行远程 migration,并对关键 API 做线上冒烟验证后才算阶段完成
5. 任何“发布/上线”必须形成闭环:migrations apply -> deploy -> 线上冒烟验证;缺一不可,否则视为未完成
6. 发布部署必须覆盖所有需要发布的组件(registry/console/cli 等),若用户未明确范围必须先确认;缺项视为流程缺陷
7. 若用户明确要求“直接发布/不做选择”,默认执行全量发布闭环(覆盖所有本次变更涉及的组件),不得再次要求用户决策
8. NPM 包发布流程详见 `docs/workflows/npm-release-process.md`,必须遵循
9. 用户指令中出现“完成所有”“完成全部”等表述时,默认执行完整上线闭环:远程 migration -> 全量组件发布/部署(registry/console/cli/npm 包等,含版本号提升与发布)-> 线上冒烟验证;无需再次确认范围,不得省略任一环节。

---
负面清单
- 同一个功能,逻辑不应该多次实现。唯一性。
- UI 组件禁止依赖业务逻辑

---
不急,接下来我们采取一种面向未来的逆天超级快节奏的开发方式。


## 迭代制度(docs/logs)

- 每个迭代在 `docs/logs` 下新增一个目录
- 目录内按版本号建立子目录,命名为 `v0.0.1-版本的slug`(语义化)
- 每个版本目录至少包含:
  - 迭代完成说明(改了什么)
  - 测试/验证/验收方式
  - 发布/部署方式
- 可选文档:PRD、讨论记录等

## 指令/Command 机制

- 新增指令统一记录在 `commands/commands.md`,并在此处索引
- 约定元指令:输入 `/new-command` 触发创建新指令流程
- 指令文件结构:每条指令包含名称、用途、输入格式、输出/期望行为
- 后续新增或修改指令时,更新 `commands/commands.md` 并保持此处索引最新
- 已有指令:
  - `/new-command`:创建新指令
  - `/config-meta`:调整或更新本文件(AGENTS.md)的机制/元信息
  - `/commit`:进行提交操作(提交信息需使用英文)
  - `/validate`:运行项目验证,至少包含 `build`、`lint`、`tsc`,必要时冒烟测试

## 规则/Rule 机制

- 规则直接维护在本文件末尾的 **Rulebook** 区域
- 约定元指令:输入 `/new-rule` 触发创建新规则流程
- 规则条目包含:名称(英文 kebab-case)、约束/适用范围、示例/反例、执行方式(工具/流程)、维护责任人
- 后续新增或修改规则时,直接在本文件的 **Rulebook** 区域追加/更新
- 默认所有规则必须严格遵守(无额外声明即视为强制);如需例外必须在规则中明确说明

## Rulebook

- **post-dev-stage-validation**:每个开发阶段结束必须做验证,至少运行 `build`、`lint`、`tsc`(如确认为无关可有理由地省略),如条件允许应做基础冒烟测试。
- **no-self-commit-without-request**:除非用户明确要求,否则禁止擅自提交/推送代码。
- **use-chinese-when-communicating**:与用户交流时使用中文。
- **smoke-test-required**:所有用户可见/可运行行为改动必须附带冒烟测试,使用真实命令或接口调用验证主路径成功;发布/上线前必须记录冒烟结果(命令与观察点)。执行方式:按组件选择对应 CLI/API/UI 最小可行流程;责任人:当次交付 owner。
- **smoke-no-local-repo-writes**:冒烟测试默认在非 local/非仓库目录环境执行;禁止将冒烟测试的安装/数据写入仓库目录或其子目录,需使用全局/隔离路径并在测试后清理。执行方式:优先 global scope 或临时目录;责任人:当次交付 owner。
- **reply-prefix-required**:所有对用户的回复必须以前缀`[我严格遵守规则]`开头(含本条指令当次起立即生效);执行方式:所有输出前置该前缀;责任人:当前助手。


================================================
FILE: .codex/skills/project-os/assets/commands/commands.md
================================================
# Commands

- `/new-command`: 新建一条指令的元指令。流程:确认名称、用途、输入格式、输出/期望行为,写入本文件并保持 `AGENTS.md` 索引同步。
- `/config-meta`: 调整或更新 `AGENTS.md` 中的机制/元信息(如规则、流程、索引等)的指令。执行时需明确变更点与预期影响。
- `/commit`: 进行提交操作(提交信息需使用英文)。
- `/validate`: 对项目进行验证,至少运行 `build`、`lint`、`tsc`,必要时补充冒烟测试。执行前需确认验证范围和可跳过项。

(后续指令在此追加,保持格式一致。) 


================================================
FILE: .codex/skills/project-os/assets/docs/workflows/npm-release-process.md
================================================
# NPM Package Release Process

Scope: publish npm packages in `packages/*`.
This does NOT cover registry/console deployment.

## Prereqs
- npm auth available via one of:
  - `.npmrc.publish.local` (preferred, ignored by git)
  - `NPM_TOKEN` env var
  - `npm login` (interactive)

## Standard flow
1) Create changeset
```bash
pnpm changeset
```

2) Bump versions + changelogs
```bash
pnpm release:version
```

3) Publish
```bash
pnpm release:publish
```

Notes:
- `release:publish` should run `release:check` (build + lint + typecheck) before publishing.
- `release:publish` should create git tags automatically.


================================================
FILE: .cursor/commands/commit.md
================================================
# Git提交规则

## 核心原则

- **禁止擅自提交**: 只有用户明确要求才能commit
- **英文message**: 使用英文commit message
- **默认git add .**: 自动添加所有更改

## 前端项目要求

- **构建验证**:如果commit 后跟build,则commit前必须先运行 `pnpm build` 验证构建成功

## 提交流程

1. 用户明确要求commit
2. 如果commit 后跟build,则运行 `pnpm build` 验证构建
3. 执行 `git add .`
4. 生成英文commit message
5. 执行 `git commit -m "message"`


================================================
FILE: .cursor/cursorignore
================================================
# CursorRIPER Framework ignore patterns
# This file helps control which files are processed by Cursor's AI features

# Temporary files
*.tmp
*.temp
*.swp
*~

# Build artifacts
build/
dist/
out/
.next/
.nuxt/
.output/
.cache/
.parcel-cache/
.webpack/
.rollup.cache/

# Dependency directories
node_modules/
bower_components/
jspm_packages/
vendor/
.pnp/
.pnp.js

# Log files
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Environment files (may contain secrets)
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.env*.local

# Debug files
.nyc_output/
coverage/
.coverage/
.coverage.*
htmlcov/
.hypothesis/
.pytest_cache/
nosetests.xml
coverage.xml

# IDE & editor directories
.idea/
.vscode/
.vs/
*.sublime-project
*.sublime-workspace
.project
.classpath
.c9/
*.launch
.settings/
.vim/
.DS_Store

# Framework specific (uncomment as needed)
# .cursor/rules/archive/
# memory-bank/backups/


================================================
FILE: .cursor/rules/README.md
================================================
# Cursor Rules 使用说明

## 命名规范规则

### 文件位置
- 规则文件:`.cursor/rules/naming-conventions.mdc`
- 修复脚本:`scripts/rename-hooks-to-kebab-case.sh`

### 规则内容

#### 1. 文件命名规范
- 所有文件和文件夹必须使用 **kebab-case** 命名
- Service文件必须以 `.service.ts` 结尾

#### 2. Hook命名规范
- Hook名称应当语义化,清晰表达功能用途
- 避免可能与其他功能混淆的命名
- 确保命名具有清晰的识别性

### 当前项目修复状态

#### ✅ 已符合规范
- Service文件命名:所有service文件都已正确使用 `.service.ts` 后缀
- 部分Hook文件:`use-connect-navigation-store.ts`, `use-extensions.ts` 等

#### ❌ 需要修复
- 大部分Hook文件仍使用camelCase命名,需要改为kebab-case

### 修复步骤

#### 1. 运行重命名脚本
```bash
./scripts/rename-hooks-to-kebab-case.sh
```

#### 2. 更新import语句
运行以下命令查找需要更新的import:
```bash
grep -r 'from.*use[A-Z]' src/ --include='*.ts' --include='*.tsx'
```

#### 3. 手动更新import
将找到的import语句从:
```typescript
import { useAgentChat } from "@/core/hooks/useAgentChat";
```
更新为:
```typescript
import { useAgentChat } from "@/core/hooks/use-agent-chat";
```

### 规则应用

这些规则会在Cursor中自动应用,帮助:
- 在创建新文件时提供命名建议
- 在代码审查时检查命名规范
- 保持项目代码风格一致性

### 注意事项

1. **重命名前备份**:建议在运行重命名脚本前提交当前代码
2. **测试功能**:重命名后需要测试所有功能是否正常
3. **团队协作**:确保团队成员都了解并遵循这些规范 

================================================
FILE: .cursor/rules/agentverse-project.mdc
================================================
# AgentVerse Project Rules

## Project Architecture

### Directory Structure
```
src/
├── common/                    # Shared components and utilities
│   ├── components/           # UI components
│   ├── features/             # Feature-based organization
│   │   └── agents/          # Agent-related features
│   │       ├── components/  # Agent components
│   │       └── extensions/  # Feature extensions
│   ├── hooks/               # Custom hooks
│   ├── lib/                 # Core libraries
│   └── types/               # Type definitions
├── core/                     # Application core
│   ├── config/              # Configuration
│   ├── hooks/               # App-level hooks
│   ├── services/            # Business services
│   └── stores/              # State management
├── desktop/                  # Desktop-specific features
└── mobile/                   # Mobile-specific features
```

### Feature Organization
- **Platform Separation**: Keep desktop/mobile specific code separate
- **Feature-First**: Organize by business features, not technical layers
- **Reusability**: Common components in `common/`, platform-specific in respective directories

## Agent Configuration System

### Component Structure
- **Configuration**: AI-driven agent configuration assistant
- **Preview**: Agent testing and preview environment
- **Tools**: Reusable agent tools and utilities

### Naming Conventions
- **Components**: `AgentConfigurationAssistant`, `AgentPreviewChat`
- **Files**: `agent-configuration-assistant.tsx`, `agent-preview-chat.tsx`
- **Hooks**: `useAgentConfigurationTools`, `useAgentPreviewTools`
- **Directories**: `configuration/`, `preview/`, `tools/`

## Code Quality Standards

### File Size Limits
- **Components**: Keep under 250 lines
- **Functions**: Keep under 50 lines
- **Split when needed**: Break large files into focused modules

### Component Splitting Guidelines
- **UI Components**: Pure presentation components
- **Logic Components**: Business logic and state management
- **Hook Files**: Custom hooks and utilities
- **Tool Files**: Tool definitions and executors

### Separation of Concerns
- **UI Layer**: React components, styling, layout
- **Logic Layer**: Hooks, business logic, state management
- **Data Layer**: API calls, data transformation, storage
- **Tool Layer**: Agent tools, executors, renderers

## Development Workflow

### Component Development
1. **Analyze Requirements**: Understand feature needs
2. **Design Structure**: Plan component hierarchy and responsibilities
3. **Implement**: Follow naming conventions and file organization
4. **Test**: Build and lint validation
5. **Refactor**: Optimize structure and naming if needed

### Refactoring Process
1. **Identify Issues**: Large files, mixed responsibilities, unclear naming
2. **Plan Changes**: Design new structure and naming
3. **Execute Carefully**: Make minimal, focused changes
4. **Validate**: Build and test to ensure functionality
5. **Commit**: Use descriptive English commit messages

## Common Patterns

### Agent Tools
- Define tools in separate files
- Use TypeScript for type safety
- Provide clear descriptions and parameters
- Include renderers for UI feedback

### Component Composition
- Use composition over inheritance
- Keep components focused and reusable
- Maintain clear prop interfaces
- Use proper TypeScript types

### State Management
- Use React hooks for local state
- Keep state close to where it's used
- Avoid prop drilling with context when needed
- Use proper dependency arrays in useEffect

## Error Handling

### Development Errors
- Provide clear error messages
- Suggest specific solutions
- Prioritize fixes by impact
- Always verify solutions work

### Code Quality Issues
- Address lint warnings promptly
- Follow established patterns
- Maintain consistency across codebase
- Document complex logic when needed
---
alwaysApply: true
description: AgentVerse project specific rules and architecture guidelines
---


================================================
FILE: .cursor/rules/code-simplicity.mdc
================================================
---
alwaysApply: true
description: "代码简洁性、可维护性和可扩展性指导原则"
---

# 代码简洁性与可维护性指导原则

## 核心原则

### 1. 简洁性优先
- **避免冗余**:不要重复造轮子,优先复用现有类型和组件
- **减少代码量**:用最少的代码实现功能,避免过度设计
- **消除重复**:DRY (Don't Repeat Yourself) 原则

### 2. 文件大小控制
- **单文件限制**:一个文件的代码尽量不要超过 250 行
- **组件拆分**:当文件过大时,及时拆分为更小的组件
- **职责单一**:每个文件/组件只负责一个明确的功能

### 3. 可维护性
- **清晰命名**:变量名严格区分不同概念(如 `agentTools` vs `toolDefinitions`)
- **类型安全**:充分利用 TypeScript 类型系统,避免 `any`
- **注释简洁**:只在必要时添加注释,代码本身应该自解释

### 4. 可扩展性
- **低耦合**:修改已有逻辑时,能不耦合尽量不耦合
- **可插拔**:尽量以可插拔的方式引入新功能
- **接口稳定**:保持公共 API 的稳定性

## 具体实践

### 类型定义
```typescript
// ✅ 好的做法:复用现有类型
export interface AgentTool extends ToolDefinition {
  execute?: ToolExecutor
  render?: ToolRenderer['render']
}

// ❌ 避免:重复定义已有类型
export interface AgentTool {
  name: string
  description: string
  parameters: { /* 重复定义 */ }
}
```

### 函数实现
```typescript
// ✅ 好的做法:使用现代 API,链式调用
const toolExecutors = Object.fromEntries(
  agentTools
    .filter(agentTool => agentTool.execute)
    .map(agentTool => [agentTool.name, agentTool.execute!])
)

// ❌ 避免:手动循环和条件判断
const toolExecutors = {}
agentTools.forEach(agentTool => {
  if (agentTool.execute) {
    toolExecutors[agentTool.name] = agentTool.execute
  }
})
```

### 组件拆分
```typescript
// ✅ 好的做法:职责单一的小组件
function AgentToolCard({ tool, onEdit, onDelete }) {
  return <div>...</div>
}

function AgentToolList({ tools }) {
  return tools.map(tool => <AgentToolCard key={tool.id} tool={tool} />)
}

// ❌ 避免:一个组件做太多事情
function AgentToolManager({ tools, onEdit, onDelete, onAdd, onSearch, ... }) {
  // 200+ 行的复杂逻辑
}
```

### Hook 封装
```typescript
// ✅ 好的做法:封装复杂逻辑为可复用 hook
export function useProvideAgentTools(agentTools: AgentTool[]) {
  // 简洁的实现,内部处理复杂性
}

// ❌ 避免:在组件中直接调用多个相关 hook
function MyComponent() {
  useProvideAgentToolDefs(toolDefs)
  useProvideAgentToolExecutors(toolExecutors)
  useProvideAgentToolRenderers(toolRenderers)
  // 容易遗漏或出错
}
```

## 代码审查检查点

1. **文件大小**:是否超过 250 行?需要拆分吗?
2. **类型复用**:是否重复定义了已有类型?
3. **现代 API**:是否使用了 `Object.fromEntries`、链式调用等现代语法?
4. **命名清晰**:变量名是否严格区分了不同概念?
5. **职责单一**:每个函数/组件是否只做一件事?
6. **可插拔**:新功能是否以可插拔的方式引入?

## 重构指导

当发现以下情况时,考虑重构:
- 文件超过 250 行
- 函数超过 50 行
- 重复的类型定义
- 手动循环可以用现代 API 替代
- 组件承担

================================================
FILE: .cursor/rules/commit.mdc
================================================
---
alwaysApply: true
---
不要未经授权就commit
不要自作主张就提交commit !!!
不要自作主张就提交commit !!!
除非用户明确提出要commit代码,否则不要自作主张就提交commit !!!
如果用户需要commit,请使用英文message, 默认git add .

前端项目commit前必须先运行 `pnpm build` 验证构建成功,确保代码质量。

不要自作主张就提交commit !!!
不要自作主张就提交commit !!!
除非用户明确提出要commit代码,否则不要自作主张就提交commit !!!
如果用户需要commit,请使用英文message, 默认git add .


================================================
FILE: .cursor/rules/core.mdc
================================================
---
description: "CursorRIPER Framework - Core"
globs: 
alwaysApply: true
version: "1.0.2"
date_created: "2025-04-05"
last_updated: "2025-04-06"
framework_component: "core"
priority: "critical"
scope: "always_load"
---
<!-- Note: Cursor will strip out all the other header information and only keep the first three. -->

# CursorRIPER Framework - Core
# Version 1.0.2

## AI PROCESSING INSTRUCTIONS
This is the core component of the CursorRIPER Framework. As an AI assistant, you MUST:
- Load this file first before any other framework components
- Adhere strictly to the principles and processes defined here
- Check project state in state.mdc to determine which other components to load
- Never skip or ignore any part of this framework
- Begin every response with your current mode declaration
- Maintain and update memory bank files according to specifications

## OVERVIEW

You are Claude 3.7, an AI assistant integrated into Cursor IDE, an AI-based fork of VS Code. Despite your advanced capabilities for context management and structured workflow execution, you tend to be overeager and often implement changes without explicit request, breaking existing logic by assuming you know better than the user. This leads to UNACCEPTABLE disasters to the code. When working on any codebase — whether it's web applications, data pipelines, embedded systems, or any other software project—unauthorized modifications can introduce subtle bugs and break critical functionality. Your memory resets completely between sessions, so you rely ENTIRELY on your Memory Bank to understand projects and continue work effectively. You MUST follow this STRICT, comprehensive protocol to prevent unintended modifications and enhance productivity.

## FIRST-RUN INITIALIZATION

When you first encounter a project:
1. Check for existence of `.cursor/rules/state.mdc`
2. If missing, create the initial framework structure:
   - Create `.cursor/rules/state.mdc` with PROJECT_PHASE="UNINITIATED"
   - Inform the user: "CursorRIPER Framework initialized. To begin project setup, use /start command."
3. If state.mdc exists, read it to determine the current project phase and mode

## FRAMEWORK COMPONENT LOADING

Based on the project state, load these components in order:
1. CORE, `.cursor/rules/core.mdc` (this file) - Always load
2. STATE, `.cursor/rules/state.mdc` - Always load 
3. Current workflow component based on PROJECT_PHASE:
   - If "UNINITIATED" or "INITIALIZING": Load `.cursor/rules/start-phase.mdc`
   - If "DEVELOPMENT" or "MAINTENANCE": Load `.cursor/rules/riper-workflow.mdc`
4. Memory bank files (if they exist) located in folder `./memory-bank/`
5. User customization settings (if they exist), `.cursor/rules/customization.mdc`

```mermaid
flowchart TD
    Start([First Run]) --> CheckState{state.mdc exists?}
    CheckState -->|No| CreateState[Create state.mdc]
    CheckState -->|Yes| LoadState[Load state.mdc]
    
    CreateState --> InformUser[Inform User]
    LoadState --> CheckPhase{Check PROJECT_PHASE}
    
    CheckPhase -->|UNINITIATED/INITIALIZING| LoadStart[Load start-phase.mdc]
    CheckPhase -->|DEVELOPMENT/MAINTENANCE| LoadRIPER[Load riper-workflow.mdc]
    
    LoadStart --> LoadMemory[Load Memory Bank]
    LoadRIPER --> LoadMemory
    
    LoadMemory --> LoadCustom[Load Customization]
    LoadCustom --> Ready[Ready]
```

## FRAMEWORK CONSTANTS

### PROJECT PHASES
- UNINITIATED: Initial state, framework installed but project not started
- INITIALIZING: START phase is active, project being set up
- DEVELOPMENT: Main development phase using RIPER workflow
- MAINTENANCE: Long-term maintenance phase using RIPER workflow

### RIPER MODES
- RESEARCH: Information gathering only
- INNOVATE: Brainstorming approaches
- PLAN: Creating detailed specifications
- EXECUTE: Implementing planned changes
- REVIEW: Validating implementation

## MODE DECLARATION REQUIREMENT

YOU MUST BEGIN EVERY SINGLE RESPONSE WITH YOUR CURRENT MODE IN BRACKETS.
Format: [MODE: MODE_NAME]

Example:
[MODE: RESEARCH]
I've examined the codebase and found...

## COMMAND PARSING

The framework recognizes commands in two formats:
1. Full command: "ENTER X MODE" (e.g., "ENTER RESEARCH MODE")
2. Slash command: "/x" (e.g., "/research")

Command mapping:
- "ENTER RESEARCH MODE" or "/research" -> Switch to RESEARCH mode
- "ENTER INNOVATE MODE" or "/innovate" -> Switch to INNOVATE mode
- "ENTER PLAN MODE" or "/plan" -> Switch to PLAN mode
- "ENTER EXECUTE MODE" or "/execute" -> Switch to EXECUTE mode
- "ENTER REVIEW MODE" or "/review" -> Switch to REVIEW mode
- "BEGIN START PHASE" or "/start" -> Begin or resume START phase

When a mode change command is detected:
1. Update state.mdc with new mode
2. Begin operating according to the new mode's specification
3. Acknowledge the mode change in your response

## SAFETY PROTOCOLS

### Destructive Operation Protection
For any operation that might overwrite existing work:
1. Explicitly warn the user about potential consequences
2. Require confirmation before proceeding
3. Create a backup before making changes

### Phase Transition Protection
When transitioning between major phases:
1. Verify that all requirements for the transition are met
2. Create a snapshot of the current memory bank state
3. Update `.cursor/rules/state.mdc` to reflect the new phase
4. Acknowledge the transition in your response

### Re-initialization Protection
If the user attempts to re-initialize a project:
1. Check if the project is already initialized
2. If yes, warn the user: "This project appears to have already been initialized. Re-initialization may overwrite the existing setup."
3. Require explicit confirmation: "CONFIRM RE-INITIALIZATION"
4. Create a backup of all memory files before proceeding

## ERROR HANDLING

If you encounter an inconsistent state or missing files:
1. Report the issue clearly: "Framework state inconsistency detected: [specific issue]"
2. Suggest recovery action: "Recommended action: [specific recommendation]"
3. Offer to attempt automatic repair if possible

## MEMORY BANK STRUCTURE

The memory bank is organized as:

```
memory-bank/
├── projectbrief.md        # Foundation document defining core requirements and goals
├── systemPatterns.md      # System architecture and key technical decisions
├── techContext.md         # Technologies used and development setup
├── activeContext.md       # Current work focus and next steps
└── progress.md            # What works, what's left to build, and known issues
```

## FRAMEWORK INTEGRATION

The CursorRIPER Framework integrates with Cursor IDE through:
1. Reading and writing MDC files in the `.cursor/rules/` directory
2. Maintaining project state across sessions via memory bank
3. Processing user commands to change modes and phases
4. Following strict operational workflows for each mode

---

*This is the core component of the CursorRIPER Framework. The framework state and workflow components provide additional functionality based on current project phase.*


================================================
FILE: .cursor/rules/customization.mdc
================================================
---
description: "CursorRIPER Framework - Customization"
globs: 
alwaysApply: false
version: "1.0.1"
<!-- Note: Cursor will strip out all the other header information and only keep the first three. -->
# CursorRIPER Framework - Customization
# Version 1.0.1

## AI PROCESSING INSTRUCTIONS
This file contains user-defined customizations for the CursorRIPER Framework. As an AI assistant, you MUST:
- Load this file after core framework components if it exists
- Apply these customizations to override default framework behavior
- Never modify this file unless explicitly requested by the user
- Acknowledge the active customizations in your first response of each session

## USER PREFERENCES

### Response Style
RESPONSE_VERBOSITY: "BALANCED"
# Possible values: "CONCISE", "BALANCED", "DETAILED"
# Controls the level of detail in AI responses

CODE_STYLE_PREFERENCES: ""
# Specify coding style preferences (indentation, naming conventions, etc.)

EXPLANATION_LEVEL: "MEDIUM"
# Possible values: "MINIMAL", "MEDIUM", "COMPREHENSIVE"
# Controls how much explanation is provided with code

### Mode Behavior
SUGGEST_MODE_TRANSITIONS: true
# If true, AI can suggest when a mode transition might be appropriate

AUTO_MODE_TRANSITION: false
# If true, AI can automatically transition between modes (except to EXECUTE)
# EXECUTE mode always requires explicit user authorization

PLAN_QUESTION_COUNT: 5
# Number of clarifying questions to ask in PLAN mode

### Memory Management
AUTO_UPDATE_MEMORY: true
# If true, AI will automatically update memory files after significant changes

MEMORY_UPDATE_FREQUENCY: "AFTER_COMPLETION"
# Possible values: "AFTER_EVERY_RESPONSE", "AFTER_COMPLETION", "MANUAL_ONLY"
# Controls when memory files are updated

REQUIRED_MEMORY_FILES: ["projectbrief.md", "activeContext.md", "progress.md"]
# List of memory files that must exist for the framework to function

### Archive Behavior
AUTO_ARCHIVE_START_PHASE: true
# If true, START phase will be automatically archived upon completion

BACKUP_FREQUENCY: "DAILY"
# Possible values: "NEVER", "DAILY", "WEEKLY", "BEFORE_CHANGES"
# Controls how often memory bank backups are created

KEEP_BACKUP_COUNT: 5
# Number of backup sets to retain before deleting oldest

## ADVANCED CUSTOMIZATION

### Command Aliases
CUSTOM_COMMANDS: {
  "/r": "/research",
  "/i": "/innovate",
  "/p": "/plan",
  "/e": "/execute",
  "/rev": "/review"
}
# Custom command shortcuts for mode transitions

### Mode Extensions
RESEARCH_MODE_EXTENSIONS: []
# Additional behaviors for RESEARCH mode

INNOVATE_MODE_EXTENSIONS: []
# Additional behaviors for INNOVATE mode

PLAN_MODE_EXTENSIONS: []
# Additional behaviors for PLAN mode

EXECUTE_MODE_EXTENSIONS: []
# Additional behaviors for EXECUTE mode

REVIEW_MODE_EXTENSIONS: []
# Additional behaviors for REVIEW mode

### Framework Extensions
CUSTOM_PHASES: []
# Additional project phases beyond standard ones

CUSTOM_WORKFLOWS: []
# Custom workflows for specific project types

## USER DOCUMENTATION PREFERENCES

### Documentation Format
DOCUMENTATION_STYLE: "MARKDOWN"
# Format for generated documentation

INCLUDE_CODE_COMMENTS: true
# Whether to include detailed comments in generated code

CODE_BLOCK_LANGUAGE_TAGS: true
# Whether to include language tags in code blocks

### AI Output Format
MODE_DECLARATION_FORMAT: "[MODE: {mode}]"
# Format string for mode declarations

PROGRESS_INDICATOR_FORMAT: "[{current_step}/{total_steps}]"
# Format for progress indicators in responses

## CUSTOM PROJECT STRUCTURE

PROJECT_TYPE: "DEFAULT"
# Identifies the type of project for specialized handling

CUSTOM_FOLDER_STRUCTURE: {}
# Custom folder structure definitions for project scaffolding

TECHNOLOGY_PRESETS: {}
# Predefined technology stacks for quick selection

---

*This file contains user-defined customizations for the CursorRIPER Framework. Edit these settings to adjust framework behavior to your preferences.*

# Customization

- 需要修改代码时默认直接修改,无需用户确认,除非用户特别要求。

# Predefined technology stacks for quick selection

---

*This file contains user-defined customizations for the CursorRIPER Framework. Edit these settings to adjust framework behavior to your preferences.*


================================================
FILE: .cursor/rules/file-organization.mdc
================================================
---
alwaysApply: true
---
# 文件组织规则

## 核心目录结构(示意)

src/
├── assets/                # 静态资源
├── common/
│   ├── components/        # 通用组件
│   ├── features/          # 通用功能域
│   │   ├── [feature]/
│   │   │   ├── components/    # 功能组件
│   │   │   ├── extensions/    # 功能扩展
│   │   │   └── pages/         # 页面组件
│   │   └── ...
│   ├── hooks/             # 通用hooks
│   ├── lib/               # 通用核心库与工具
│   └── types/             # 通用类型定义
├── core/
│   ├── config/            # 配置
│   ├── hooks/             # 应用级hooks
│   ├── resources/         # 资源定义
│   ├── services/          # 服务与状态管理
│   ├── stores/            # 状态存储
│   ├── styles/            # 样式
│   └── utils/             # 工具函数
├── desktop/
│   └── features/          # 桌面端功能
│       ├── [feature]/
│       │   ├── components/    # 平台特定组件
│       │   ├── extensions/    # 平台特定扩展
│       │   ├── hooks/         # 平台特定hooks
│       │   └── pages/         # 平台特定页面
│       └── ...
├── mobile/
│   └── features/          # 移动端功能
│       ├── [feature]/
│       │   ├── extensions/    # 平台特定扩展
│       │   └── pages/         # 平台特定页面
│       └── ...


## 核心原则
- **平台分离**:desktop/mobile 平台特定代码分离
- **功能优先**:按业务功能分组,而非技术类型
- **复用性**:通用组件放 common,特定功能放 features

## 分类规则

### `src/common/components/`
- **UI 组件**:纯展示组件 (`ui/`)
- **业务组件**:功能相关组件
- **布局组件**:结构组件 (`layout/`)

### `src/common/features/[feature]/`
- **components/**:功能组件
- **extensions/**:功能扩展
- **pages/**:页面组件

### `src/common/lib/`
- **核心库**:核心功能库
- **第三方集成**:外部库封装
- **工具库**:工具函数

### `src/core/`
- **应用核心**:配置、服务、状态管理、hooks
- **业务逻辑**:应用级业务逻辑

### `src/desktop/features/[feature]/` 和 `src/mobile/features/[feature]/`
- **components/**:平台特定组件(仅desktop)
- **extensions/**:平台特定扩展
- **hooks/**:平台特定hooks(仅desktop)
- **pages/**:平台特定页面

## 命名规范
- 目录:kebab-case
- 文件:kebab-case
- 服务文件:以 `.service.ts` 结尾
- Hook 文件:以 `use-` 开头


================================================
FILE: .cursor/rules/file-size-limits.mdc
================================================
# File Size Limits and Code Organization

## Core Principle: Keep Files Small and Focused

### File Size Guidelines
- **Target**: Under 100 lines per file
- **Maximum**: 250 lines per file
- **When to split**: If a file exceeds 200 lines, consider refactoring

### Why Small Files Matter
1. **Maintainability**: Easier to understand and modify
2. **Testability**: Smaller units are easier to test
3. **Reusability**: Focused modules can be reused independently
4. **Collaboration**: Multiple developers can work on different files simultaneously
5. **Code Review**: Smaller changes are easier to review

## Refactoring Patterns

### When a File Gets Too Large

#### 1. Extract Types and Interfaces
```typescript
// Before: 300+ lines with mixed types and implementation
// After: Separate types.ts file
export interface MyInterface { ... }
export type MyType = ...;
```

#### 2. Split by Responsibility
```typescript
// Before: One large class with multiple responsibilities
// After: Multiple focused classes
- base-class.ts
- implementation-a.ts
- implementation-b.ts
```

#### 3. Extract Utilities
```typescript
// Before: Utility functions mixed with business logic
// After: Dedicated utils file
export function utilityFunction() { ... }
```

#### 4. Separate Concerns
```typescript
// Before: UI, logic, and data access in one file
// After: Separate files for each concern
- component.tsx (UI only)
- logic.ts (Business logic)
- data.ts (Data access)
```

## Directory Organization

### Service Bus Portal Example
The portal system demonstrates proper file organization:

```
portal/
├── types.ts                    # 80 lines - Type definitions only
├── base-portal.ts              # 50 lines - Abstract base class
├── postmessage-portal.ts       # 90 lines - PostMessage implementation
├── event-target-portal.ts      # 70 lines - EventTarget implementation
├── portal-factory.ts           # 60 lines - Factory methods
├── service-bus-portal-connector.ts  # 80 lines - Service integration
├── service-bus-portal-proxy.ts      # 90 lines - Proxy implementation
├── portal-composer.ts          # 80 lines - Multi-portal management
├── compatibility.ts            # 70 lines - Legacy support
└── index.ts                    # 30 lines - Exports only
```

## Refactoring Checklist

When a file approaches 200 lines:

- [ ] Can types be extracted to a separate file?
- [ ] Can the class be split into multiple classes?
- [ ] Can utility functions be moved to a utils file?
- [ ] Can the file be split by feature or responsibility?
- [ ] Are there clear boundaries between different concerns?
- [ ] Can some logic be moved to a separate service or hook?

## Benefits of Small Files

1. **Single Responsibility**: Each file has one clear purpose
2. **Easier Navigation**: Developers can quickly find relevant code
3. **Better Testing**: Smaller units are easier to test in isolation
4. **Reduced Conflicts**: Less chance of merge conflicts
5. **Improved Performance**: Smaller files load and parse faster
6. **Better IDE Support**: Faster autocomplete and navigation

## Examples of Good File Organization

### Before (Monolithic - 650 lines)
```typescript
// connect-service-bus-with-portal.ts - 650 lines
// Contains: types, implementations, factories, adapters, compatibility
```

### After (Modular - 10 files, each under 100 lines)
```typescript
// types.ts - 80 lines
// base-portal.ts - 50 lines  
// postmessage-portal.ts - 90 lines
// event-target-portal.ts - 70 lines
// portal-factory.ts - 60 lines
// service-bus-portal-connector.ts - 80 lines
// service-bus-portal-proxy.ts - 90 lines
// portal-composer.ts - 80 lines
// compatibility.ts - 70 lines
// index.ts - 30 lines
```

## Enforcement

- **Code Review**: Always flag files over 250 lines
- **Linting**: Consider adding file size limits to linting rules
- **Documentation**: Document the reasoning for any files over 200 lines
- **Refactoring**: Prioritize splitting large files in technical debt reviews
description:
globs:
alwaysApply: false
---


================================================
FILE: .cursor/rules/generate-world-class-artistic-ui.mdc
================================================
---
description: 
globs: 
alwaysApply: false
---
# 世界级艺术化界面生成规则

本规则对应 [docs/prompts/generate-world-class-artistic-ui.md](mdc:docs/prompts/generate-world-class-artistic-ui.md)。

## 规则说明
该文档为界面设计和开发提供了最高标准的美学与体验要求。其核心思想如下:
- 追求令人惊叹、精美绝伦的界面效果
- 强调世界级的用户体验,兼顾美观与实用
- 鼓励现代化、充满创意、有趣而非平庸的设计
- 要求界面如艺术品般超越常规,实现引领而非跟随

## 使用场景
- 设计 UI/UX 时,参考本规则确保界面达到世界级水准
- 生成界面相关 prompt、需求或评审标准时,引用本规则内容

## 关键要求
- 视觉与交互体验需达到艺术品级别
- 拒绝平庸、无聊、缺乏创意的设计
- 鼓励创新、趣味性和引领潮流

> 本规则为所有界面相关开发和设计的最高指导原则。


================================================
FILE: .cursor/rules/naming-conventions.mdc
================================================
# 命名规范

## 文件与文件夹命名

### 1. 文件命名规范
- 所有文件和文件夹必须使用 **kebab-case** 命名
- 示例:
  - ✅ `user-profile.tsx`
  - ✅ `agent-detail-page.tsx`
  - ✅ `discussion-member.service.ts`
  - ❌ `userProfile.tsx`
  - ❌ `agentDetailPage.tsx`
  - ❌ `discussionMemberService.ts`

### 2. Service文件特殊规范
- Service文件必须以 `.service.ts` 结尾
- 示例:
  - ✅ `discussion-member.service.ts`
  - ✅ `agent.service.ts`
  - ✅ `message.service.ts`
  - ❌ `discussion-member.ts`
  - ❌ `agentService.ts`

### 3. Tool文件特殊规范
- Agent工具文件必须以 `.tool.ts` 结尾
- 示例:
  - ✅ `agent-analysis.tool.ts`
  - ✅ `file-system.tool.ts`
  - ✅ `code-analysis.tool.ts`
  - ❌ `agent-analysis-tool.ts`
  - ❌ `fileSystemTool.ts`

### 4. 文件夹命名规范
- 文件夹也必须使用 kebab-case
- 示例:
  - ✅ `agent-detail/`
  - ✅ `discussion-control/`
  - ✅ `member-management/`
  - ❌ `agentDetail/`
  - ❌ `discussionControl/`

## Hook命名规范

### 1. 语义化命名原则
- Hook名称应当语义化,清晰表达功能用途
- 避免可能与其他功能混淆的命名
- 确保命名具有清晰的识别性

### 2. 命名模式
- 使用 `use` 前缀 + 功能描述
- 功能描述应当具体且唯一
- 示例:
  - ✅ `useAgentChat` - 进入AI对话空间
  - ✅ `useDiscussionMembers` - 讨论成员管理
  - ✅ `useAgentDetail` - 智能体详情
  - ✅ `useMessageHistory` - 消息历史
  - ❌ `useData` - 过于通用
  - ❌ `useManager` - 不够具体
  - ❌ `useHandler` - 功能不明确

### 3. 避免的命名模式
- 避免过于通用的词汇:`useData`, `useManager`, `useHandler`
- 避免可能冲突的命名:`useAgent` (可能与其他agent相关hook混淆)
- 避免缩写:`useMsg` (应使用 `useMessage`)
- 避免数字后缀:`useAgent2`, `useChatV2`

### 4. 推荐命名模式
- 功能 + 对象:`useAgentChat`, `useMessageHistory`
- 动作 + 对象:`useCreateDiscussion`, `useUpdateAgent`
- 状态 + 对象:`useAgentState`, `useDiscussionStatus`

## 当前项目需要修复的命名

### Hook文件命名不一致问题
以下文件需要重命名为kebab-case:

**需要修复的文件:**
- `useAgentChat.ts` → `use-agent-chat.ts`
- `useAgentForm.ts` → `use-agent-form.ts`
- `useAgents.ts` → `use-agents.ts`
- `useMemberSelection.ts` → `use-member-selection.ts`
- `useMessageList.ts` → `use-message-list.ts`
- `useDiscussionMembers.ts` → `use-discussion-members.ts`
- `useDiscussions.ts` → `use-discussions.ts`
- `useMessages.ts` → `use-messages.ts`
- `useSettings.ts` → `use-settings.ts`
- `useSettingCategories.ts` → `use-setting-categories.ts`
- `useDiscussion.ts` → `use-discussion.ts`
- `useOptimisticUpdate.ts` → `use-optimistic-update.ts`
- `useKeyboardExpandableList.ts` → `use-keyboard-expandable-list.ts`
- `useMediaQuery.ts` → `use-media-query.ts`
- `useMessageInput.ts` → `use-message-input.ts`
- `useObservableState.ts` → `use-observable-state.ts`
- `usePersistedState.ts` → `use-persisted-state.ts`
- `useViewportHeight.ts` → `use-viewport-height.ts`
- `useWindowSize.ts` → `use-window-size.ts`
- `useAutoScroll.ts` → `use-auto-scroll.ts`
- `useBreakpoint.ts` → `use-breakpoint.ts`

**已符合规范的文件:**
- `use-connect-navigation-store.ts` ✅
- `use-extensions.ts` ✅
- `use-setup-app.ts` ✅
- `use-toast.ts` ✅
- `use-copy.ts` ✅

### 修复步骤
1. 重命名文件为kebab-case
2. 更新所有import语句
3. 确保功能不受影响
---
alwaysApply: true
description: 文件命名和Hook命名规范,确保代码风格一致性
---


================================================
FILE: .cursor/rules/portal-service-bus-architecture.mdc
================================================
# Portal Service Bus Architecture

## Overview

The Portal Service Bus is a modular, composable cross-context communication system that supports Web Workers, iframes, Shared Workers, and Service Workers. It follows a layered architecture with clear separation of concerns.

## Directory Structure

```
src/common/lib/service-bus/portal/
├── types.ts                     # Type definitions (86 lines)
├── core.ts                      # Core implementations (200 lines)
├── service-bus.ts               # Service bus adapters (180 lines)
├── factory.ts                   # Factory and composer (140 lines)
├── usage-examples.ts            # Usage examples (341 lines)
└── index.ts                     # Unified exports (8 lines)
```

## Core Principles

### 1. Clear Type Separation
- **Types**: All interfaces and type definitions in [types.ts](mdc:src/common/lib/service-bus/portal/types.ts)
- **Implementations**: Core classes and logic in [core.ts](mdc:src/common/lib/service-bus/portal/core.ts)
- **Service Integration**: Service bus adapters in [service-bus.ts](mdc:src/common/lib/service-bus/portal/service-bus.ts)
- **Creation Utilities**: Factories and composers in [factory.ts](mdc:src/common/lib/service-bus/portal/factory.ts)

### 2. Balanced File Sizes
- **Target**: 100-300 lines per file
- **Maximum**: 400 lines per file
- **Rationale**: Large enough to group related functionality, small enough to maintain

### 3. Clean Architecture
- Types are imported from [types.ts](mdc:src/common/lib/service-bus/portal/types.ts)
- No legacy compatibility layer (removed for simplicity)
- Clear separation between types and implementations

## Key Components

### Type Definitions ([types.ts](mdc:src/common/lib/service-bus/portal/types.ts))
```typescript
interface CommunicationPortal {
  readonly id: string;
  readonly type: PortalType;
  send(message: PortalMessage): Promise<void>;
  onMessage(handler: (message: PortalMessage) => void): void;
  connect(): Promise<void>;
  disconnect(): Promise<void>;
  isConnected(): boolean;
  getTargetInfo(): PortalTargetInfo;
  generateMessageId(): string;
}
```

### Core Implementations ([core.ts](mdc:src/common/lib/service-bus/portal/core.ts))
- `BasePortal`: Abstract base class for all portals
- `PostMessagePortal`: PostMessage-based communication
- `EventTargetPortal`: EventTarget-based communication

### Service Bus Integration ([service-bus.ts](mdc:src/common/lib/service-bus/portal/service-bus.ts))
- `PortalServiceBusConnector`: Exposes services through portals
- `PortalServiceBusProxy`: Creates proxies for remote service calls

### Factory and Composition ([factory.ts](mdc:src/common/lib/service-bus/portal/factory.ts))
- `PortalFactory`: Creates different types of portals
- `PortalComposer`: Manages multiple portals together

## Portal Types
- `window-to-worker`: Main thread ↔ Web Worker
- `window-to-iframe`: Main page ↔ iframe
- `worker-to-window`: Web Worker → Main thread
- `iframe-to-window`: iframe → Main page
- `shared-worker`: Shared Worker communication
- `service-worker`: Service Worker communication

## Usage Patterns

### Single Portal
```typescript
import { PortalFactory, PortalServiceBusProxy } from './portal';

const portal = PortalFactory.createWorkerPortal(worker);
const proxy = new PortalServiceBusProxy(portal);
await proxy.connect();
const serviceProxy = proxy.createProxy();
```

### Multi-Portal Composition
```typescript
import { PortalComposer } from './portal';

const composer = new PortalComposer();
composer.addPortal(workerPortal);
composer.addPortal(iframePortal);
composer.createConnector(portalId, serviceBus);
await composer.connectAll();
```

## File Organization Rules

1. **Types First**: All type definitions in [types.ts](mdc:src/common/lib/service-bus/portal/types.ts)
2. **Core Implementation**: Base classes and portal implementations in [core.ts](mdc:src/common/lib/service-bus/portal/core.ts)
3. **Service Integration**: Service bus adapters in [service-bus.ts](mdc:src/common/lib/service-bus/portal/service-bus.ts)
4. **Creation Utilities**: Factories and composers in [factory.ts](mdc:src/common/lib/service-bus/portal/factory.ts)
5. **Examples**: Usage examples in [usage-examples.ts](mdc:src/common/lib/service-bus/portal/usage-examples.ts)
6. **Exports**: Unified exports in [index.ts](mdc:src/common/lib/service-bus/portal/index.ts)

## Migration Guide

### From Monolithic to Modular
- Old: Single 650-line file
- New: 6 focused files, each under 400 lines
- Import from `./portal` instead of individual files
- Clean architecture without legacy compatibility

### Adding New Portal Types
1. Define new type in [types.ts](mdc:src/common/lib/service-bus/portal/types.ts)
2. Create implementation extending `BasePortal` in [core.ts](mdc:src/common/lib/service-bus/portal/core.ts)
3. Add factory method to [factory.ts](mdc:src/common/lib/service-bus/portal/factory.ts)
4. Export from [index.ts](mdc:src/common/lib/service-bus/portal/index.ts)

## Best Practices

1. **Type separation**: Keep types separate from implementations
2. **Balanced sizes**: Keep files between 100-400 lines
3. **Type safety**: Use TypeScript interfaces for all public APIs
4. **Error handling**: Consistent error patterns across all portals
5. **Resource cleanup**: Always implement proper disconnect logic
6. **Testing**: Each module can be tested independently
7. **Documentation**: JSDoc comments for all public APIs

## File Size Guidelines

- **types.ts**: 86 lines - Type definitions only
- **core.ts**: 200 lines - Core implementations
- **service-bus.ts**: 180 lines - Service bus integration
- **factory.ts**: 140 lines - Creation utilities and composition
- **usage-examples.ts**: 341 lines - Comprehensive examples
- **index.ts**: 8 lines - Exports only


================================================
FILE: .cursor/rules/quick-commands.mdc
================================================
---
alwaysApply: true
---


# Quick Commands & Communication Conventions

## Git Operations

### ⚠️ 重要:禁止擅自提交
- **严格禁止**:在用户没有明确要求的情况下,禁止擅自进行任何 git commit 操作
- **必须等待**:只有用户明确使用 `/commit` 命令或明确要求提交时,才能执行提交
- **安全第一**:宁可等待用户确认,也不要冒险擅自提交

### `/commit` - Auto Commit with English Message
When user types `/commit`, automatically:
1. Run `git status` to review changes before committing
2. Run `git add .` to stage all changes
3. Generate a descriptive English commit message based on changes
4. Execute `git commit -m "message"`
5. Follow conventional commit format: `type(scope): description`

**Example commit messages:**
- `refactor: optimize component structure and naming`
- `feat: add new agent configuration assistant`
- `fix: resolve lint errors in agent preview component`
- `docs: update README with new features`

## Discussion & Planning

### `/readonly` - Read-Only Discussion Mode
When user types `/readonly`, enter discussion-only mode:
1. **No Code Changes**: Do not modify any files or run commands
2. **Analysis Only**: Provide insights, suggestions, and recommendations
3. **Creative Discussion**: Focus on ideas, concepts, and planning
4. **Architecture Review**: Discuss design patterns and approaches
5. **Problem Solving**: Brainstorm solutions without implementation

**Use cases:**
- Creative brainstorming sessions
- Architecture and design discussions
- Feature planning and requirements analysis
- Code review and feedback sessions
- Problem analysis and solution exploration
- Technology selection and comparison

**Response format:**
- Start with `[MODE: DISCUSSION]`
- Provide detailed analysis and insights
- Suggest multiple approaches when applicable
- Focus on concepts and ideas rather than implementation
- Ask clarifying questions to better understand requirements

## Code Quality & Architecture

### `/architect` - Architect's Perspective Review
When user requests "架构师视角" or "/architect", provide:
1. **Code Structure Analysis**: Evaluate file organization and component hierarchy
2. **Naming Conventions**: Check for semantic clarity and consistency
3. **Separation of Concerns**: Identify mixed responsibilities and suggest splits
4. **Maintainability**: Assess code complexity and suggest improvements
5. **Scalability**: Consider future extensibility and potential bottlenecks
6. **Best Practices**: Recommend architectural patterns and conventions

**Key evaluation criteria:**
- File size (keep under 250 lines)
- Single responsibility principle
- Clear naming conventions (kebab-case for files, PascalCase for components)
- Proper separation of UI, logic, and data layers
- Reusability and modularity

## Development Workflow

### `/build` - Build and Validate
When user types `/build`, automatically:
1. Run `pnpm build` to compile and build
2. Run `pnpm lint` to check code quality
3. Report any errors or warnings
4. Suggest fixes if issues found

### `/refactor` - Code Refactoring
When user requests refactoring:
1. Analyze current code structure
2. Identify areas for improvement
3. Suggest specific refactoring steps
4. Maintain functionality while improving code quality
5. Follow established naming conventions and patterns

## File Organization Rules

### Directory Structure
- Use kebab-case for directory and file names
- Group related functionality in feature directories
- Separate UI components, hooks, and utilities
- Keep index.ts files for clean exports

### Component Organization
- Split large components (>250 lines) into smaller, focused files
- Separate UI components from business logic
- Use descriptive, semantic names for components and functions
- Maintain clear import/export relationships

## Communication Patterns

### Code Review Responses
- Always start with current mode declaration: `[MODE: RESEARCH/PLAN/EXECUTE/REVIEW/DISCUSSION]`
- Provide clear, actionable feedback
- Suggest specific improvements with examples
- Consider both immediate fixes and long-term architectural benefits

### Error Handling
- When encountering errors, provide clear explanations
- Suggest multiple solutions when possible
- Prioritize fixes based on impact and effort
- Always verify fixes work before proceeding

## Naming Conventions

### Files and Directories
- Use kebab-case: `agent-configuration-assistant.tsx`
- Be descriptive and semantic: `use-agent-configuration-tools.tsx`
- Group related files in feature directories

### Components and Functions
- Use PascalCase for components: `AgentConfigurationAssistant`
- Use camelCase for functions and hooks: `useAgentConfigurationTools`
- Use descriptive names that clearly indicate purpose

### Types and Interfaces
- Use PascalCase with descriptive names: `AgentConfigurationAssistantProps`
- Include type information in names when helpful
- Be consistent across related types

# Quick Commands & Communication Conventions

## Git Operations

### ⚠️ 重要:禁止擅自提交
- **严格禁止**:在用户没有明确要求的情况下,禁止擅自进行任何 git commit 操作
- **必须等待**:只有用户明确使用 `/commit` 命令或明确要求提交时,才能执行提交
- **安全第一**:宁可等待用户确认,也不要冒险擅自提交

### `/commit` - Auto Commit with English Message
When user types `/commit`, automatically:
1. Run `git status` to review changes before committing
2. Run `git add .` to stage all changes
3. Generate a descriptive English commit message based on changes
4. Execute `git commit -m "message"`
5. Follow conventional commit format: `type(scope): description`

**Example commit messages:**
- `refactor: optimize component structure and naming`
- `feat: add new agent configuration assistant`
- `fix: resolve lint errors in agent preview component`
- `docs: update README with new features`

## Discussion & Planning

### `/readonly` - Read-Only Discussion Mode
When user types `/readonly`, enter discussion-only mode:
1. **No Code Changes**: Do not modify any files or run commands
2. **Analysis Only**: Provide insights, suggestions, and recommendations
3. **Creative Discussion**: Focus on ideas, concepts, and planning
4. **Architecture Review**: Discuss design patterns and approaches
5. **Problem Solving**: Brainstorm solutions without implementation

**Use cases:**
- Creative brainstorming sessions
- Architecture and design discussions
- Feature planning and requirements analysis
- Code review and feedback sessions
- Problem analysis and solution exploration
- Technology selection and comparison

**Response format:**
- Start with `[MODE: DISCUSSION]`
- Provide detailed analysis and insights
- Suggest multiple approaches when applicable
- Focus on concepts and ideas rather than implementation
- Ask clarifying questions to better understand requirements

## Code Quality & Architecture

### `/architect` - Architect's Perspective Review
When user requests "架构师视角" or "/architect", provide:
1. **Code Structure Analysis**: Evaluate file organization and component hierarchy
2. **Naming Conventions**: Check for semantic clarity and consistency
3. **Separation of Concerns**: Identify mixed responsibilities and suggest splits
4. **Maintainability**: Assess code complexity and suggest improvements
5. **Scalability**: Consider future extensibility and potential bottlenecks
6. **Best Practices**: Recommend architectural patterns and conventions

**Key evaluation criteria:**
- File size (keep under 250 lines)
- Single responsibility principle
- Clear naming conventions (kebab-case for files, PascalCase for components)
- Proper separation of UI, logic, and data layers
- Reusability and modularity

## Development Workflow

### `/build` - Build and Validate
When user types `/build`, automatically:
1. Run `pnpm build` to compile and build
2. Run `pnpm lint` to check code quality
3. Report any errors or warnings
4. Suggest fixes if issues found

### `/refactor` - Code Refactoring
When user requests refactoring:
1. Analyze current code structure
2. Identify areas for improvement
3. Suggest specific refactoring steps
4. Maintain functionality while improving code quality
5. Follow established naming conventions and patterns

## File Organization Rules

### Directory Structure
- Use kebab-case for directory and file names
- Group related functionality in feature directories
- Separate UI components, hooks, and utilities
- Keep index.ts files for clean exports

### Component Organization
- Split large components (>250 lines) into smaller, focused files
- Separate UI components from business logic
- Use descriptive, semantic names for components and functions
- Maintain clear import/export relationships

## Communication Patterns

### Code Review Responses
- Always start with current mode declaration: `[MODE: RESEARCH/PLAN/EXECUTE/REVIEW/DISCUSSION]`
- Provide clear, actionable feedback
- Suggest specific improvements with examples
- Consider both immediate fixes and long-term architectural benefits

### Error Handling
- When encountering errors, provide clear explanations
- Suggest multiple solutions when possible
- Prioritize fixes based on impact and effort
- Always verify fixes work before proceeding

## Naming Conventions

### Files and Directories
- Use kebab-case: `agent-configuration-assistant.tsx`
- Be descriptive and semantic: `use-agent-configuration-tools.tsx`
- Group related files in feature directories

### Components and Functions
- Use PascalCase for components: `AgentConfigurationAssistant`
- Use camelCase for functions and hooks: `useAgentConfigurationTools`
- Use descriptive names that clearly indicate purpose

### Types and Interfaces
- Use PascalCase with descriptive names: `AgentConfigurationAssistantProps`
- Include type information in names when helpful
- Be consistent across related types


================================================
FILE: .cursor/rules/riper-workflow.mdc
================================================
---
description: "CursorRIPER Framework - RIPER Workflow"
globs: 
alwaysApply: false
version: "1.0.1"
date_created: "2025-04-05"
last_updated: "2025-04-06"
framework_component: "riper_workflow"
priority: "high"
scope: "development_maintenance"
---
<!-- Note: Cursor will strip out all the other header information and only keep the first three. -->
# CursorRIPER Framework - RIPER Workflow
# Version 1.0.1

## AI PROCESSING INSTRUCTIONS
This file defines the RIPER workflow component of the CursorRIPER Framework. As an AI assistant, you MUST:
- Load this file when PROJECT_PHASE is "DEVELOPMENT" or "MAINTENANCE"
- Follow mode-specific instructions for each RIPER mode
- Always declare your current mode at the beginning of each response
- Only transition between modes when explicitly commanded
- Reference memory bank files to maintain context

## THE RIPER-5 MODES

```mermaid
flowchart LR
    R[RESEARCH] --> I[INNOVATE]
    I --> P[PLAN]
    P --> E[EXECUTE]
    E --> Rev[REVIEW]
    Rev -.-> R
    
    style R fill:#e6f3ff,stroke:#0066cc
    style I fill:#e6ffe6,stroke:#006600
    style P fill:#fff0e6,stroke:#cc6600
    style E fill:#ffe6e6,stroke:#cc0000
    style Rev fill:#f0e6ff,stroke:#6600cc
```

### MODE 1: RESEARCH
[MODE: RESEARCH]
- **Purpose**: Information gathering ONLY
- **Permitted**: Reading files, asking clarifying questions, understanding code structure
- **Forbidden**: Suggestions, implementations, planning, or any hint of action
- **Requirement**: You may ONLY seek to understand what exists, not what could be
- **Duration**: Until user explicitly signals to move to next mode
- **Output Format**: Begin with [MODE: RESEARCH], then ONLY observations and questions
- **Pre-Research Checkpoint**: Confirm which files/components need to be analyzed before starting

### MODE 2: INNOVATE
[MODE: INNOVATE]
- **Purpose**: Brainstorming potential approaches
- **Permitted**: Discussing ideas, advantages/disadvantages, seeking feedback
- **Forbidden**: Concrete planning, implementation details, or any code writing
- **Requirement**: All ideas must be presented as possibilities, not decisions
- **Duration**: Until user explicitly signals to move to next mode
- **Output Format**: Begin with [MODE: INNOVATE], then ONLY possibilities and considerations
- **Decision Documentation**: Capture design decisions with explicit rationales using high relevance scores

### MODE 3: PLAN
[MODE: PLAN]
- **Purpose**: Creating exhaustive technical specification
- **Permitted**: Detailed plans with exact file paths, function names, and changes
- **Forbidden**: Any implementation or code writing, even "example code"
- **Requirement**: Plan must be comprehensive enough that no creative decisions are needed during implementation
- **Planning Process**:
  1. Deeply reflect upon the changes being asked
  2. Analyze existing code to map the full scope of changes needed
  3. Ask 4-6 clarifying questions based on your findings
  4. Once answered, draft a comprehensive plan of action
  5. Ask for approval on that plan
- **Mandatory Final Step**: Convert the entire plan into a numbered, sequential CHECKLIST with each atomic action as a separate item
- **Checklist Format**:
```
IMPLEMENTATION CHECKLIST:
1. [Specific action 1]
2. [Specific action 2]
...
n. [Final action]
```
- **Duration**: Until user explicitly approves plan and signals to move to next mode
- **Output Format**: Begin with [MODE: PLAN], then ONLY specifications and implementation details
- **Implementation Dry Run**: Optional step to outline potential side effects of planned changes

### MODE 4: EXECUTE
[MODE: EXECUTE]
- **Purpose**: Implementing EXACTLY what was planned in Mode 3
- **Permitted**: ONLY implementing what was explicitly detailed in the approved plan
- **Forbidden**: Any deviation, improvement, or creative addition not in the plan
- **Entry Requirement**: ONLY enter after explicit "ENTER EXECUTE MODE" command from user
- **Deviation Handling**: If ANY issue is found requiring deviation, IMMEDIATELY return to PLAN mode
- **Output Format**: Begin with [MODE: EXECUTE], then ONLY implementation matching the plan
- **Progress Tracking**: 
  - Mark items as complete as they are implemented
  - After completing each phase/step, mention what was just completed
  - State what the next steps are and phases remaining
  - Update progress.md and activeContext.md after significant progress
- **Emergency Rollback Protocol**: Be prepared to restore previous code versions if problems arise

### MODE 5: REVIEW
[MODE: REVIEW]
- **Purpose**: Ruthlessly validate implementation against the plan
- **Permitted**: Line-by-line comparison between plan and implementation
- **Required**: EXPLICITLY FLAG ANY DEVIATION, no matter how minor
- **Deviation Format**: ":warning: DEVIATION DETECTED: [description of exact deviation]"
- **Reporting**: Must report whether implementation is IDENTICAL to plan or NOT
- **Conclusion Format**: ":white_check_mark: IMPLEMENTATION MATCHES PLAN EXACTLY" or ":cross_mark: IMPLEMENTATION DEVIATES FROM PLAN"
- **Output Format**: Begin with [MODE: REVIEW], then systematic comparison and explicit verdict
- **Code Review Templates**: Apply standardized templates aligned with user's code quality standards

## WORKFLOW DIAGRAMS

### PLAN Mode Workflow
```mermaid
flowchart TD
    Start[Start] --> ReadFiles[Read Memory Bank]
    ReadFiles --> CheckFiles{Files Complete?}
    
    CheckFiles -->|No| Plan[Create Plan]
    Plan --> Document[Document in Chat]
    
    CheckFiles -->|Yes| Verify[Verify Context]
    Verify --> Strategy[Develop Strategy]
    Strategy --> Present[Present Approach]
```

### EXECUTE Mode Workflow
```mermaid
flowchart TD
    Start[Start] --> Context[Check Memory Bank]
    Context --> Update[Update Documentation]
    Update --> Rules[Update Project Intelligence]
    Rules --> Execute[Execute Task]
    Execute --> Document[Document Changes]
```

## MODE TRANSITION SIGNALS

Mode transitions occur only when user explicitly signals with:
- "ENTER RESEARCH MODE" or "/research" to enter RESEARCH mode
- "ENTER INNOVATE MODE" or "/innovate" to enter INNOVATE mode
- "ENTER PLAN MODE" or "/plan" to enter PLAN mode
- "ENTER EXECUTE MODE" or "/execute" to enter EXECUTE mode
- "ENTER REVIEW MODE" or "/review" to enter REVIEW mode

## MEMORY UPDATES

After significant progress in any mode:
1. Update activeContext.md with current focus and recent changes
2. Update progress.md with completed tasks and current status
3. Document any important decisions in systemPatterns.md
4. Record any observed patterns in systemPatterns.md

## MODE-SPECIFIC MEMORY BANK UPDATES

### RESEARCH Mode Updates
- Update techContext.md with newly discovered technical details
- Add observed patterns to systemPatterns.md
- Document current status in activeContext.md

### INNOVATE Mode Updates
- Document design alternatives considered
- Record decision rationales with relevance scores
- Update activeContext.md with potential approaches

### PLAN Mode Updates
- Create implementation plans in chat
- Update activeContext.md with planned changes
- Document expected outcomes in progress.md

### EXECUTE Mode Updates
- Track implementation progress in progress.md
- Update activeContext.md after each significant step
- Document any implementation challenges encountered

### REVIEW Mode Updates
- Document review findings in progress.md
- Update activeContext.md with review status
- Record any patterns or issues for future reference

## CONTEXT AWARENESS

The AI should maintain awareness of:
1. Current project state from state.mdc
2. Project requirements from projectbrief.md
3. Technical context from techContext.md
4. System architecture from systemPatterns.md
5. Active work from activeContext.md
6. Progress status from progress.md

This context should inform all responses, ensuring continuity and relevance.

---

*This file defines the RIPER workflow component of the CursorRIPER Framework.*


================================================
FILE: .cursor/rules/start-phase.mdc
================================================
---
description: "CursorRIPER Framework - START Phase"
globs: 
alwaysApply: false
version: "1.0.1"
date_created: "2025-04-05"
last_updated: "2025-04-06"
framework_component: "start_phase"
priority: "high"
scope: "initialization"
archive_after_completion: true
---
<!-- Note: Cursor will strip out all the other header information and only keep the first three. -->
# CursorRIPER Framework - START Phase
# Version 1.0.1

## AI PROCESSING INSTRUCTIONS
This file defines the START phase component of the CursorRIPER Framework. As an AI assistant, you MUST:
- Load this file when PROJECT_PHASE is "UNINITIATED" or "INITIALIZING"
- Guide the user through project initialization in a step-by-step manner
- Create all required memory bank files with proper formatting
- Update state.mdc as each step is completed
- Archive this component once initialization is complete

## START PHASE OVERVIEW

The START phase is a one-time preprocessing phase that runs at the beginning of a new project or major component. It focuses on project initialization, scaffolding, and setting up the Memory Bank with baseline information.

```mermaid
flowchart TD
    Start[BEGIN START PHASE] --> Req[Requirements Gathering]
    Req --> Tech[Technology Selection]
    Tech --> Arch[Architecture Definition]
    Arch --> Scaffold[Project Scaffolding]
    Scaffold --> Setup[Environment Setup]
    Setup --> Memory[Memory Bank Initialization]
    Memory --> End[TRANSITION TO RIPER]
```

## START PHASE PROCESS

[PHASE: START]
- **Purpose**: Project initialization and scaffolding
- **Permitted**: Requirements gathering, technology selection, architecture definition, project structure setup
- **Entry Point**: User command "BEGIN START PHASE" or "/start"
- **Exit Point**: Automatic transition to RESEARCH mode after setup is complete

## STEP-BY-STEP INITIALIZATION

### Step 1: Requirements Gathering
- Collect and document core project requirements
- Define project scope, goals, and constraints
- Identify key stakeholders and their needs
- Document success criteria
- **Key Questions**:
  - What problem is this project trying to solve?
  - Who are the primary users or stakeholders?
  - What are the must-have features?
  - What are the nice-to-have features?
  - What are the technical constraints?
  - What is the timeline for completion?
- **Output**: Create projectbrief.md with gathered requirements

### Step 2: Technology Selection
- Assess technology options based on requirements
- Evaluate frameworks, libraries, and tools
- Make recommendations with clear rationales
- Document technology decisions
- **Key Questions**:
  - What programming language(s) best fit this project?
  - What frameworks or libraries would be most appropriate?
  - What database technology should be used?
  - What deployment environment is targeted?
  - Are there any specific performance requirements?
  - What testing frameworks should be used?
- **Output**: Add technology decisions to techContext.md

### Step 3: Architecture Definition
- Define high-level system architecture
- Identify key components and their relationships
- Create initial architectural diagrams
- Document architectural decisions
- **Key Questions**:
  - What architectural pattern is most appropriate?
  - How will the application be structured?
  - What are the key components and their responsibilities?
  - How will data flow through the system?
  - How will the system scale?
  - What security considerations need to be addressed?
- **Output**: Create systemPatterns.md with architecture definition

### Step 4: Project Scaffolding
- Set up initial folder structure
- Create configuration files
- Initialize version control
- Set up package management
- Create initial README and documentation
- **Key Actions**:
  - Create the basic folder structure
  - Initialize git repository
  - Set up package manager (npm, pip, etc.)
  - Create initial configuration files
  - Set up basic build process
- **Output**: Create project scaffold according to defined structure

### Step 5: Environment Setup
- Configure development environment
- Set up testing framework
- Establish CI/CD pipeline configuration
- Define deployment strategy
- **Key Actions**:
  - Set up local development environment
  - Configure testing framework
  - Create initial test cases
  - Define CI/CD pipeline
  - Document deployment process
- **Output**: Update techContext.md with environment setup details

### Step 6: Memory Bank Initialization
- Create and populate all core memory files:
  - projectbrief.md (if not already created)
  - systemPatterns.md (if not already created)
  - techContext.md (if not already created)
  - activeContext.md
  - progress.md
- Establish initial project intelligence files
- **Key Actions**:
  - Create memory-bank directory structure
  - Create and populate all core memory files
  - Document initial state in activeContext.md
  - Set up progress.md with initial tasks
- **Output**: Complete memory bank with all required files

## MEMORY BANK TEMPLATES

### projectbrief.md Template
```markdown
# Project Brief: [PROJECT_NAME]
*Version: 1.0*
*Created: [CURRENT_DATE]*
*Last Updated: [CURRENT_DATE]*

## Project Overview
[Brief description of the project, its purpose, and main goals]

## Core Requirements
- [REQUIREMENT_1]
- [REQUIREMENT_2]
- [REQUIREMENT_3]

## Success Criteria
- [CRITERION_1]
- [CRITERION_2]
- [CRITERION_3]

## Scope
### In Scope
- [IN_SCOPE_ITEM_1]
- [IN_SCOPE_ITEM_2]

### Out of Scope
- [OUT_OF_SCOPE_ITEM_1]
- [OUT_OF_SCOPE_ITEM_2]

## Timeline
- [MILESTONE_1]: [DATE]
- [MILESTONE_2]: [DATE]
- [MILESTONE_3]: [DATE]

## Stakeholders
- [STAKEHOLDER_1]: [ROLE]
- [STAKEHOLDER_2]: [ROLE]

---

*This document serves as the foundation for the project and informs all other memory files.*
```

### systemPatterns.md Template
```markdown
# System Patterns: [PROJECT_NAME]
*Version: 1.0*
*Created: [CURRENT_DATE]*
*Last Updated: [CURRENT_DATE]*

## Architecture Overview
[High-level description of the system architecture]

## Key Components
- [COMPONENT_1]: [PURPOSE]
- [COMPONENT_2]: [PURPOSE]
- [COMPONENT_3]: [PURPOSE]

## Design Patterns in Use
- [PATTERN_1]: [USAGE_CONTEXT]
- [PATTERN_2]: [USAGE_CONTEXT]
- [PATTERN_3]: [USAGE_CONTEXT]

## Data Flow
[Description or diagram of how data flows through the system]

## Key Technical Decisions
- [DECISION_1]: [RATIONALE]
- [DECISION_2]: [RATIONALE]
- [DECISION_3]: [RATIONALE]

## Component Relationships
[Description of how components interact with each other]

---

*This document captures the system architecture and design patterns used in the project.*
```

### techContext.md Template
```markdown
# Technical Context: [PROJECT_NAME]
*Version: 1.0*
*Created: [CURRENT_DATE]*
*Last Updated: [CURRENT_DATE]*

## Technology Stack
- Frontend: [FRONTEND_TECHNOLOGIES]
- Backend: [BACKEND_TECHNOLOGIES]
- Database: [DATABASE_TECHNOLOGIES]
- Infrastructure: [INFRASTRUCTURE_TECHNOLOGIES]

## Development Environment Setup
[Instructions for setting up the development environment]

## Dependencies
- [DEPENDENCY_1]: [VERSION] - [PURPOSE]
- [DEPENDENCY_2]: [VERSION] - [PURPOSE]
- [DEPENDENCY_3]: [VERSION] - [PURPOSE]

## Technical Constraints
- [CONSTRAINT_1]
- [CONSTRAINT_2]
- [CONSTRAINT_3]

## Build and Deployment
- Build Process: [BUILD_PROCESS]
- Deployment Procedure: [DEPLOYMENT_PROCEDURE]
- CI/CD: [CI_CD_SETUP]

## Testing Approach
- Unit Testing: [UNIT_TESTING_APPROACH]
- Integration Testing: [INTEGRATION_TESTING_APPROACH]
- E2E Testing: [E2E_TESTING_APPROACH]

---

*This document describes the technologies used in the project and how they're configured.*
```

### activeContext.md Template
```markdown
# Active Context: [PROJECT_NAME]
*Version: 1.0*
*Created: [CURRENT_DATE]*
*Last Updated: [CURRENT_DATE]*
*Current RIPER Mode: [MODE_NAME]*

## Current Focus
[Description of what we're currently working on]

## Recent Changes
- [CHANGE_1]: [DATE] - [DESCRIPTION]
- [CHANGE_2]: [DATE] - [DESCRIPTION]
- [CHANGE_3]: [DATE] - [DESCRIPTION]

## Active Decisions
- [DECISION_1]: [STATUS] - [DESCRIPTION]
- [DECISION_2]: [STATUS] - [DESCRIPTION]
- [DECISION_3]: [STATUS] - [DESCRIPTION]

## Next Steps
1. [NEXT_STEP_1]
2. [NEXT_STEP_2]
3. [NEXT_STEP_3]

## Current Challenges
- [CHALLENGE_1]: [DESCRIPTION]
- [CHALLENGE_2]: [DESCRIPTION]
- [CHALLENGE_3]: [DESCRIPTION]

## Implementation Progress
- [✓] [COMPLETED_TASK_1]
- [✓] [COMPLETED_TASK_2]
- [ ] [PENDING_TASK_1]
- [ ] [PENDING_TASK_2]

---

*This document captures the current state of work and immediate next steps.*
```

### progress.md Template
```markdown
# Progress Tracker: [PROJECT_NAME]
*Version: 1.0*
*Created: [CURRENT_DATE]*
*Last Updated: [CURRENT_DATE]*

## Project Status
Overall Completion: [PERCENTAGE]%

## What Works
- [FEATURE_1]: [COMPLETION_STATUS] - [NOTES]
- [FEATURE_2]: [COMPLETION_STATUS] - [NOTES]
- [FEATURE_3]: [COMPLETION_STATUS] - [NOTES]

## What's In Progress
- [FEATURE_4]: [PROGRESS_PERCENTAGE]% - [NOTES]
- [FEATURE_5]: [PROGRESS_PERCENTAGE]% - [NOTES]
- [FEATURE_6]: [PROGRESS_PERCENTAGE]% - [NOTES]

## What's Left To Build
- [FEATURE_7]: [PRIORITY] - [NOTES]
- [FEATURE_8]: [PRIORITY] - [NOTES]
- [FEATURE_9]: [PRIORITY] - [NOTES]

## Known Issues
- [ISSUE_1]: [SEVERITY] - [DESCRIPTION] - [STATUS]
- [ISSUE_2]: [SEVERITY] - [DESCRIPTION] - [STATUS]
- [ISSUE_3]: [SEVERITY] - [DESCRIPTION] - [STATUS]

## Milestones
- [MILESTONE_1]: [DUE_DATE] - [STATUS]
- [MILESTONE_2]: [DUE_DATE] - [STATUS]
- [MILESTONE_3]: [DUE_DATE] - [STATUS]

---

*This document tracks what works, what's in progress, and what's left to build.*
```

## TRANSITION TO RIPER WORKFLOW

Once all six steps are completed:
1. Verify all memory files are properly created and populated
2. Update state.mdc with:
   - PROJECT_PHASE = "DEVELOPMENT"
   - START_PHASE_STATUS = "COMPLETED"
   - START_PHASE_STEP = 6
   - INITIALIZATION_DATE = [current date/time]
3. Archive this component to .cursor/rules/archive/start-phase.mdc.archive
4. Automatically transition to RESEARCH mode
5. Inform the user: "Project initialization complete. Entering RESEARCH mode to begin development."

## DELIVERABLES CHECKLIST

At the end of the START phase, ensure the following are complete:

- [ ] Project requirements documented in projectbrief.md
- [ ] Technology stack selected and documented in techContext.md
- [ ] System architecture defined in systemPatterns.md
- [ ] Project scaffold created
- [ ] Development environment configured and documented
- [ ] Memory Bank initialized with all core files
- [ ] Initial tasks documented in progress.md

Once all items are checked, the system will automatically transition to the RIPER workflow.

---

*This file guides project initialization through the START phase. It will be automatically archived once initialization is complete.*


================================================
FILE: .cursor/rules/state.mdc
================================================
---
description: "CursorRIPER Framework - State Management"
globs: 
alwaysApply: true
version: "1.0.2"
date_created: "2025-04-05"
last_updated: "2025-04-05"
framework_component: "state"
priority: "critical"
scope: "always_load"
---
<!-- Note: Cursor will strip out all the other header information and only keep the first three. -->
# CursorRIPER Framework - State Management
# Version 1.0.2

## AI PROCESSING INSTRUCTIONS
This file defines the current state of the project within the CursorRIPER Framework. As an AI assistant, you MUST:
- Always load this file after core.mdc but before other components
- Never modify state values without proper authorization via commands
- Validate state transitions against allowed paths
- Update this file when state changes occur
- Keep all state values consistent with each other

## CURRENT PROJECT STATE

PROJECT_PHASE: "UNINITIATED"
# Possible values: "UNINITIATED", "INITIALIZING", "DEVELOPMENT", "MAINTENANCE"

RIPER_CURRENT_MODE: "NONE"
# Possible values: "NONE", "RESEARCH", "INNOVATE", "PLAN", "EXECUTE", "REVIEW"

START_PHASE_STATUS: "NOT_STARTED"
# Possible values: "NOT_STARTED", "IN_PROGRESS", "COMPLETED", "ARCHIVED"

START_PHASE_STEP: 0
# Possible values: 0-6 (0=Not started, 1=Requirements, 2=Technology, 3=Architecture, 4=Scaffolding, 5=Environment, 6=Memory Bank)

LAST_UPDATE: "2025-04-05T00:00:00Z"
# ISO 8601 formatted timestamp of last state update

INITIALIZATION_DATE: ""
# When START phase was completed, empty if not completed

FRAMEWORK_VERSION: "1.0.0"
# Current version of the framework

## STATE TRANSITION RULES

```mermaid
stateDiagram-v2
    [*] --> UNINITIATED
    
    UNINITIATED --> INITIALIZING: /start
    INITIALIZING --> DEVELOPMENT: START phase complete
    DEVELOPMENT --> MAINTENANCE: User request
    MAINTENANCE --> DEVELOPMENT: User request
    
    state INITIALIZING {
        [*] --> NOT_STARTED
        NOT_STARTED --> IN_PROGRESS: Begin START
        IN_PROGRESS --> COMPLETED: All steps finished
        COMPLETED --> ARCHIVED: Enter DEVELOPMENT
    }
    
    state "DEVELOPMENT/MAINTENANCE" as DM {
        [*] --> RESEARCH
        RESEARCH --> INNOVATE: /innovate
        INNOVATE --> PLAN: /plan
        PLAN --> EXECUTE: /execute
        EXECUTE --> REVIEW: /review
        REVIEW --> RESEARCH: /research
    }
```

### Phase Transitions
- UNINITIATED → INITIALIZING
  - Trigger: "/start" or "BEGIN START PHASE"
  - Requirements: None
  
- INITIALIZING → DEVELOPMENT
  - Trigger: Automatic upon START phase completion
  - Requirements: START_PHASE_STATUS = "COMPLETED"
  
- DEVELOPMENT → MAINTENANCE
  - Trigger: Manual transition by user
  - Requirements: Explicit user request
  
- MAINTENANCE → DEVELOPMENT
  - Trigger: Manual transition by user
  - Requirements: Explicit user request

### Mode Transitions
- Any mode → RESEARCH
  - Trigger: "/research" or "ENTER RESEARCH MODE"
  - Requirements: PROJECT_PHASE in ["DEVELOPMENT", "MAINTENANCE"]
  
- Any mode → INNOVATE
  - Trigger: "/innovate" or "ENTER INNOVATE MODE"
  - Requirements: PROJECT_PHASE in ["DEVELOPMENT", "MAINTENANCE"]
  
- Any mode → PLAN
  - Trigger: "/plan" or "ENTER PLAN MODE"
  - Requirements: PROJECT_PHASE in ["DEVELOPMENT", "MAINTENANCE"]
  
- Any mode → EXECUTE
  - Trigger: "/execute" or "ENTER EXECUTE MODE"
  - Requirements: PROJECT_PHASE in ["DEVELOPMENT", "MAINTENANCE"]
  
- Any mode → REVIEW
  - Trigger: "/review" or "ENTER REVIEW MODE"
  - Requirements: PROJECT_PHASE in ["DEVELOPMENT", "MAINTENANCE"]

### START Phase Status Transitions
- NOT_STARTED → IN_PROGRESS
  - Trigger: "/start" or "BEGIN START PHASE"
  - Requirements: PROJECT_PHASE = "UNINITIATED"
  
- IN_PROGRESS → COMPLETED
  - Trigger: Completion of all START phase steps
  - Requirements: START_PHASE_STEP = 6
  
- COMPLETED → ARCHIVED
  - Trigger: Automatic after transition to DEVELOPMENT
  - Requirements: PROJECT_PHASE = "DEVELOPMENT"

## STATE UPDATE PROCEDURES

### Update Project Phase
1. Validate transition is allowed
2. Create backup of current state
3. Update PROJECT_PHASE value
4. Update LAST_UPDATE timestamp
5. Perform any phase-specific initialization

### Update RIPER Mode
1. Validate transition is allowed
2. Update RIPER_CURRENT_MODE value
3. Update LAST_UPDATE timestamp
4. Update activeContext.md to reflect mode change

### Update START Phase Status
1. Validate transition is allowed
2. Update START_PHASE_STATUS value
3. Update LAST_UPDATE timestamp
4. If transitioning to COMPLETED, set INITIALIZATION_DATE

### Update START Phase Step
1. Validate step increment is logical
2. Update START_PHASE_STEP value
3. Update LAST_UPDATE timestamp
4. If reaching step 6, trigger completion process

## AUTOMATIC STATE DETECTION

When determining current project state:
1. Check for existence of memory bank files
2. If complete memory bank exists but STATE_PHASE is "UNINITIATED":
   - Set PROJECT_PHASE to "DEVELOPMENT"
   - Set START_PHASE_STATUS to "COMPLETED"
   - Set START_PHASE_STEP to 6
   - Set INITIALIZATION_DATE based on file timestamps
3. If partial memory bank exists:
   - Set PROJECT_PHASE to "INITIALIZING"
   - Set START_PHASE_STATUS to "IN_PROGRESS"
   - Determine START_PHASE_STEP based on existing files

## RE-INITIALIZATION PROTECTION

If "/start" or "BEGIN START PHASE" is detected when PROJECT_PHASE is not "UNINITIATED":
1. Warn user about re-initialization risks
2. Require explicit confirmation: "CONFIRM RE-INITIALIZATION"
3. If confirmed:
   - Create backup of current memory bank
   - Reset state to PROJECT_PHASE = "INITIALIZING"
   - Reset START_PHASE_STATUS to "IN_PROGRESS"
   - Reset START_PHASE_STEP to 1

---

*This file automatically tracks the current state of the project. It should never be edited manually.*


================================================
FILE: .gitignore
================================================
# Logs
logs
!docs/logs
!docs/logs/**
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?


.env
tmp

# TypeScript build info
*.tsbuildinfo


================================================
FILE: .i18n-ally.yml
================================================
# i18n Ally 配置文件
# 文档: https://github.com/lokalise/i18n-ally

# 语言文件路径
localesPaths:
  - src/core/locales

# 翻译键的样式
keystyle: nested

# 启用的框架
enabledFrameworks:
  - i18next
  - react

# 源语言(主要开发语言)
sourceLanguage: zh-CN

# 显示语言
displayLanguage: zh-CN

# 命名空间
namespace: false

# 路径匹配模式
pathMatcher: "{locale}.json"

# 扫描忽略的文件
usage:
  scanningIgnore:
    - "**/node_modules/**"
    - "**/dist/**"
    - "**/*.spec.{js,jsx,ts,tsx}"
    - "**/*.test.{js,jsx,ts,tsx}"
  scanningDepth: 10

# 内联注释显示
annotation:
  inPlace: true
  maxLength: 30



================================================
FILE: .npmrc
================================================
ignore-workspace-root-check=true
registry=https://registry.npmjs.org/


================================================
FILE: .ossutilconfig.example
================================================
[Credentials]
language=CH
Region=cn-hangzhou
endpoint=oss-cn-hangzhou.aliyuncs.com
accessKeyID=your-accessKeyID
accessKeySecret=your-accessKeySecret


================================================
FILE: AGENTS.md
================================================
# AGENTS

## 总则

1. 假设你是ceo+cto(架构师)+产品经理的综合体,从这个角度来思考所有问题
2. 不要管开发代价,永远只考虑最终最佳方案,反正都是你来开发
3. 每次完成一个阶段都要至少做代码验证,包括不限于build, lint, tscheck;如涉及可运行功能/用户可见改动,必须追加至少一条冒烟测试(真实命令/请求),默认使用非 local/非仓库目录的环境,禁止将烟测安装/数据写入仓库子目录。
4. 涉及后端或数据库变更的发布必须执行远程 migration,并对关键 API 做线上冒烟验证后才算阶段完成
5. 任何“发布/上线”必须形成闭环:migrations apply -> deploy -> 线上冒烟验证;缺一不可,否则视为未完成
6. 发布部署必须覆盖所有需要发布的组件(registry/console/cli 等),若用户未明确范围必须先确认;缺项视为流程缺陷
7. 若用户明确要求“直接发布/不做选择”,默认执行全量发布闭环(覆盖所有本次变更涉及的组件),不得再次要求用户决策
8. NPM 包发布流程详见 `docs/workflows/npm-release-process.md`,必须遵循
9. 用户指令中出现“完成所有”“完成全部”等表述时,默认执行完整上线闭环:远程 migration -> 全量组件发布/部署(registry/console/cli/npm 包等,含版本号提升与发布)-> 线上冒烟验证;无需再次确认范围,不得省略任一环节。

---
负面清单
- 同一个功能,逻辑不应该多次实现。唯一性。
- UI 组件禁止依赖业务逻辑

不急,接下来我们采取一种面向未来的逆天超级快节奏的开发方式。

## Workflows

- Feature-Based 架构规范: `.agent/workflows/feature-based-architecture.md`
- 代码库治理指导思想与战略: `.agent/workflows/governance-strategy.md`

后续我们要有统一的规范和不断完善的机制。我们会不断维护 Agents.md。

## 迭代制度(docs/logs)

- 每个迭代在 `docs/logs` 下新增一个目录
- 目录内按版本号建立子目录,命名为 `v0.0.1-版本的slug`(语义化)
- 每个版本目录至少包含:
  - 迭代完成说明(改了什么)
  - 测试/验证/验收方式
  - 发布/部署方式
- 可选文档:PRD、讨论记录等

## 指令/Command 机制

- 新增指令统一记录在 `commands/commands.md`,并在此处索引
- 约定元指令:输入 `/new-command` 触发创建新指令流程
- 指令文件结构:每条指令包含名称、用途、输入格式、输出/期望行为
- 后续新增或修改指令时,更新 `commands/commands.md` 并保持此处索引最新
- 已有指令:
  - `/new-command`:创建新指令
  - `/config-meta`:调整或更新本文件(AGENTS.md)的机制/元信息
  - `/commit`:进行提交操作(提交信息需使用英文)
  - `/validate`:运行项目验证,至少包含 `build`、`lint`、`tsc`,必要时冒烟测试

## 规则/Rule 机制

- 规则直接维护在本文件末尾的 **Rulebook** 区域
- 约定元指令:输入 `/new-rule` 触发创建新规则流程
- 规则条目包含:名称(英文 kebab-case)、约束/适用范围、示例/反例、执行方式(工具/流程)、维护责任人
- 后续新增或修改规则时,直接在本文件的 **Rulebook** 区域追加/更新
- 默认所有规则必须严格遵守(无额外声明即视为强制);如需例外必须在规则中明确说明

## Rulebook

- **post-dev-stage-validation**:每个开发阶段结束必须做验证,至少运行 `build`、`lint`、`tsc`(如确认为无关可有理由地省略),如条件允许应做基础冒烟测试。
- **no-self-commit-without-request**:除非用户明确要求,否则禁止擅自提交/推送代码。
- **use-chinese-when-communicating**:与用户交流时使用中文。
- **smoke-test-required**:所有用户可见/可运行行为改动必须附带冒烟测试,使用真实命令或接口调用验证主路径成功;发布/上线前必须记录冒烟结果(命令与观察点)。执行方式:按组件选择对应 CLI/API/UI 最小可行流程;责任人:当次交付 owner。
- **smoke-no-local-repo-writes**:冒烟测试默认在非 local/非仓库目录环境执行;禁止将冒烟测试的安装/数据写入仓库目录或其子目录,需使用全局/隔离路径并在测试后清理。执行方式:优先 global scope 或临时目录;责任人:当次交付 owner。
- **reply-prefix-required**:所有对用户的回复必须以前缀`[我严格遵守规则]`开头(含本条指令当次起立即生效);执行方式:所有输出前置该前缀;责任人:当前助手。
- **manager-only-repository-access**:约束/适用范围:repository 只允许在 manager 层访问,其他层(presenter/store/ui/hooks/resources)禁止直接依赖;示例:manager 内调用 repository 读写;反例:hook 直接 import repository;执行方式:代码 review + `rg "core/repositories"` 排查;维护责任人:core。
- **presenter-exposes-managers-only**:约束/适用范围:presenter 只透出 manager 属性,除特殊情况不暴露方法或非 manager 属性;示例:`presenter.messages`;反例:`presenter.emit()` 或 `presenter.events`;执行方式:代码 review;维护责任人:core。


================================================
FILE: CHANGELOG.md
================================================
# 更新日志

所有对本项目的重要更改都将记录在此文件中。

本文档格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/),
并且本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。

## [未发布]

### 新增
- 基于 DeepSeek API 的智能代理对话功能
- 多代理管理系统
- 自动回复功能
- 主题讨论功能
- 亮暗主题切换
- 响应式布局设计

### 优化
- 优化代理卡片布局
- 改进滚动条样式
- 优化消息列表性能

### 修复
- 修复消息重复发送问题
- 修复自动回复状态同步问题
- 修复主题切换时的样式问题

## [0.1.0] - 2024-01-20

### 新增
- 项目初始化
- 基础UI框架搭建
- 核心功能实现

[未发布]: https://github.com/yourusername/ai-agent-discussion/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/yourusername/ai-agent-discussion/releases/tag/v0.1.0 

================================================
FILE: CODE_OF_CONDUCT.md
================================================
# 贡献者行为准则

## 我们的承诺

为了营造一个开放和友好的环境,我们作为贡献者和维护者承诺:无论年龄、体型、身体健全与否、民族、性征、性别认同与表达、经验水平、教育程度、社会地位、国籍、相貌、种族、宗教信仰、性取向如何,我们项目和社区的参与者都免受骚扰。

## 我们的标准

有助于创造积极环境的行为包括:

* 使用友好和包容性的语言
* 尊重不同的观点和经历
* 耐心地接受建设性批评
* 关注对社区最有利的事情
* 友善对待其他社区成员

不当行为包括:

* 使用与性有关的言语或是图像,以及不受欢迎的性骚扰
* 发表挑衅、侮辱/贬损的评论,进行人身攻击或政治攻击
* 公开或私下的骚扰
* 未经明确许可,发布他人的私人信息
* 其他可以被合理地认定为不恰当或者违反职业操守的行为

## 我们的责任

项目维护者有责任为可接受的行为标准做出诠释,以及对已发生的不当行为采取恰当且公平的纠正措施。

项目维护者有权利和责任删除、编辑或拒绝违反本行为准则的评论、提交、代码、wiki 编辑、问题以及其他贡献,并暂时或永久地禁止任何贡献者进行违反行为。

## 适用范围

当一个人代表项目或其社区时,本行为准则适用于其所有的项目空间和公共空间。代表项目或社区的情况包括使用官方项目电子邮件地址、通过官方社交媒体帐户发布,或在线上或线下事件中担任指定代表。项目的代表性质可由项目维护者进一步定义和解释。

## 强制执行

可以通过 [INSERT EMAIL] 向项目团队举报滥用、骚扰或其他不可接受的行为。所有投诉都将被审查和调查,并将作出必要且适当的回应。项目团队有义务为事件举报者保密。具体执行政策的更多细节可能会单独发布。

对于善意遵循或执行本行为准则的项目维护者,不会因为执行本准则而遭到报复性的举动。

## 来源

本行为准则改编自[贡献者公约][homepage], 版本 1.4,可在此查看:
https://www.contributor-covenant.org/zh-cn/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org 

================================================
FILE: CONTRIBUTORS.md
================================================
# 贡献者列表

感谢所有为本项目做出贡献的开发者!

## 核心团队

- **[Your Name](https://github.com/yourusername)**
  - 项目发起人
  - 核心功能开发
  - 架构设计

## 功能贡献者

按字母顺序排列:

- **[Contributor 1](https://github.com/contributor1)**
  - 改进代理管理系统
  - 优化UI组件

- **[Contributor 2](https://github.com/contributor2)**
  - 添加新的主题样式
  - 修复性能问题

## 文档贡献者

- **[Doc Writer 1](https://github.com/docwriter1)**
  - 编写技术文档
  - 改进 README

## 如何成为贡献者

1. Fork 本仓库
2. 创建您的特性分支
3. 提交您的改动
4. 推送到您的分支
5. 创建一个 Pull Request

详细信息请参考 [贡献指南](./docs/development-guide.md)。

## 特别感谢

感谢以下开源项目,没有它们就没有本项目的顺利开发:

- [React](https://reactjs.org/)
- [Vite](https://vitejs.dev/)
- [TailwindCSS](https://tailwindcss.com/)
- [Shadcn/ui](https://ui.shadcn.com/)
- [DeepSeek](https://deepseek.com) 

================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2024 AI Agent Discussion Platform

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. 

================================================
FILE: README.md
================================================
# AgentVerse - AI 专家团队协作平台

让多个 AI 专家一起为你解决问题的协作平台

[English](./README_EN.md) | 简体中文

## 🔍 这是什么?

AgentVerse 是一个支持多 AI 智能体协作对话的开源平台。在这里,多个具有不同专业领域和个性的 AI 专家可以自主交流、协作讨论,为你提供多角度的专业见解和解决方案。

## 🚀 在线体验

直接体验:[AgentVerse 演示](https://agent.dimstack.com)

![演示截图](./screenshots/demo2.jpeg)

### 📸 更多截图

![首页概览](./screenshots/agent-verse-first-page.png)
![群聊讨论](./screenshots/agnet-verse-gangjing-discussion.png)
![头脑风暴与笔记](./screenshots/agentverse-brainstorming-with-note.png)
![Agent 共创编辑](./screenshots/agent-verse-edit-with-agent.png)

**核心特点:**
- 💬 **多专家协作对话** - 不是简单的聊天机器人,而是一个能自主思考、协作的 AI 专家团队
- 🧠 **丰富的角色设定** - 每个 AI 都有自己的专业领域、个性和思维风格
- 🔄 **自主对话管理** - AI 之间会自动交流讨论,无需你手动协调
- 🛠️ **强大的工具系统** - 支持 MCP 协议,AI 可以使用各种工具完成任务
- 📁 **文件管理能力** - 内置文件系统,支持文件操作和管理

## 🌟 核心功能

### 1️⃣ 丰富的预设专家团队

针对不同场景,我们提供了 **14 个预设专家团队**:

**思维探索类:**
- **思维探索团队** - 深度思考和创新(推荐)
- **自由思考组** - 开放性思考和深度探讨
- **认知融合团队** - 概念转化和模式识别
- **情绪决策团队** - 情绪智能和决策优化
- **结构化思考团队** - 使用结构化框架解决问题
- **超级思维团队** - 全方位思维专家团队

**创作类:**
- **小说创作组** - 故事创作和剧情发展
- **创意激发组** - 创意发散和跨界思维
- **叙事探索团队** - 故事结构和多元可能性

**商业类:**
- **创业创新组** - 商业模式和市场分析
- **产品开发组** - 产品设计、开发和项目管理
- **实践执行团队** - 实际执行和项目落地

**其他:**
- **时间探索团队** - 时间视角和历史灵感
- **Agent设计组** - AI Agent 系统设计

### 2️⃣ 自定义 Agent 创建

- **对话式创建** - 通过自然语言对话创建专属 AI 智能体
- **智能配置助手** - AI 助手帮你完善 Agent 配置,减少手动操作
- **灵活定制** - 支持自定义角色、性格、专长、行为方式等

### 3️⃣ MCP 工具集成

支持 **Model Context Protocol (MCP)**,让 AI 可以使用外部工具:
- 文件系统操作
- 数据查询和分析
- 信息检索
- 自动化任务
- 代码生成和执行

### 4️⃣ 文件管理系统

内置基于 LightningFS 的文件系统:
- 文件/目录的增删改查
- 文件内容编辑和预览
- 文件搜索
- 文件上传和下载

### 5️⃣ 多讨论管理

- 支持多个独立的讨论话题
- 讨论状态控制(活跃/暂停)
- 消息历史记录
- 自动标题生成

## 💡 应用场景

### 头脑风暴和创意激发
让不同思维方式的 AI 专家一起激发创意,从多角度思考问题。

### 产品设计与评估
产品经理、开发者、设计师和用户体验专家一起讨论产品方案。

### 决策辅助
获取多个专业角度的分析和建议,辅助重要决策。

### 学习辅导
多位导师从不同角度解释概念,提供全面的学习支持。

### 代码开发与调试
AI 专家协作分析代码问题,提供解决方案,并可以使用工具执行实际操作。

## 🛠️ 技术特点

- 🌐 **完整的智能体生态** - 多角色协作、自主对话、场景化应用
- 📱 **响应式设计** - 完美支持桌面端和移动端
- 🎨 **深色/浅色主题** - 支持主题切换
- 🔌 **可扩展架构** - 支持插件和扩展
- 🛡️ **类型安全** - 完整的 TypeScript 支持

## 🚀 快速开始

### 环境要求
- Node.js >= 18
- pnpm >= 8.0

### 安装步骤

1. **克隆并安装**
```bash
git clone https://github.com/Peiiii/AgentVerse.git
cd AgentVerse
pnpm install
```

2. **配置环境变量**
```bash
cp .env.example .env
# 编辑 .env 文件,配置 AI 服务商和 API Key
```

3. **启动开发服务器**
```bash
pnpm dev
```

访问 `http://localhost:3000` 即可使用。

## 🗺️ 开发计划

近期:
- [x] 主题切换(亮暗主题)
- [x] 移动端适配
- [x] 添加自动终止机制
- [x] 支持自定义大模型 API_KEY
- [x] MCP 工具集成
- [x] 文件管理系统
- [x] 多语言支持(中文/英文)

## 📄 许可证

本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情

## 📞 联系我们

- [GitHub Issues](https://github.com/Peiiii/AgentVerse/issues)


================================================
FILE: README_EN.md
================================================
# AgentVerse - AI Expert Team Collaboration Platform

A platform where multiple AI experts collaborate to solve your problems

English | [简体中文](./README.md)

## 🔍 What is AgentVerse?

AgentVerse is an open-source platform that supports autonomous conversations between multiple AI agents. Here, multiple AI experts with different expertise and personalities can communicate and collaborate autonomously, providing you with multi-perspective professional insights and solutions.

## 🚀 Live Demo

Try it now: [AgentVerse Demo](https://agent.dimstack.com)

![Demo Screenshot](./screenshots/demo2.jpeg)

**Core Features:**
- 💬 **Multi-Expert Collaboration** - Not just a simple chatbot, but a team of AI experts that can think independently and collaborate
- 🧠 **Rich Character Profiles** - Each AI has its own expertise, personality, and thinking style
- 🔄 **Autonomous Dialogue Management** - AIs discuss and interact automatically, no need for manual coordination
- 🛠️ **Powerful Tool System** - Supports MCP protocol, allowing AIs to use various tools to complete tasks
- 📁 **File Management** - Built-in file system supporting file operations and management

## 🌟 Core Features

### 1️⃣ Rich Preset Expert Teams

We provide **14 preset expert teams** for different scenarios:

**Thinking & Exploration:**
- **Thinking Exploration Team** - Deep thinking and innovation (Recommended)
- **Free Thinking Group** - Open thinking and deep exploration
- **Cognitive Fusion Team** - Concept transformation and pattern recognition
- **Emotional Decision Team** - Emotional intelligence and decision optimization
- **Structured Thinking Team** - Problem-solving using structured frameworks
- **Super Thinking Team** - Comprehensive thinking expert team

**Creative:**
- **Story Creation Team** - Story creation and plot development
- **Creative Ideation Group** - Creative divergence and cross-domain thinking
- **Narrative Exploration Team** - Story structure and multiple possibilities

**Business:**
- **Startup Ideation Team** - Business models and market analysis
- **Product Development Team** - Product design, development, and project management
- **Practical Execution Team** - Actual execution and project implementation

**Others:**
- **Time Exploration Team** - Time perspective and historical inspiration
- **Agent Design Team** - AI Agent system design

### 2️⃣ Custom Agent Creation

- **Conversational Creation** - Create exclusive AI agents through natural language dialogue
- **Intelligent Configuration Assistant** - AI assistant helps you complete Agent configuration with minimal manual operation
- **Flexible Customization** - Support custom roles, personalities, expertise, behaviors, etc.

### 3️⃣ MCP Tool Integration

Supports **Model Context Protocol (MCP)**, enabling AIs to use external tools:
- File system operations
- Data query and analysis
- Information retrieval
- Automated tasks
- Code generation and execution

### 4️⃣ File Management System

Built-in file system based on LightningFS:
- File/directory CRUD operations
- File content editing and preview
- File search
- File upload and download

### 5️⃣ Multi-Discussion Management

- Support multiple independent discussion topics
- Discussion state control (active/paused)
- Message history
- Automatic title generation

## 💡 Real-World Applications

### Brainstorming and Idea Generation
Let AI experts with different thinking styles spark creativity and explore problems from multiple angles.

### Product Design and Evaluation
Product managers, developers, designers, and UX specialists discuss product solutions together.

### Decision Support
Get analysis and advice from multiple professional perspectives to aid important decisions.

### Learning Assistance
Multiple tutors explain concepts from different perspectives, providing comprehensive learning support.

### Code Development and Debugging
AI experts collaborate to analyze code issues, provide solutions, and can use tools to perform actual operations.

## 🛠️ Technical Features

- 🌐 **Complete Agent Ecosystem** - Multi-role collaboration, autonomous dialogue, scenario-based applications
- 📱 **Responsive Design** - Perfect support for desktop and mobile
- 🎨 **Dark/Light Theme** - Theme switching support
- 🔌 **Extensible Architecture** - Support for plugins and extensions
- 🛡️ **Type Safety** - Full TypeScript support

## 🚀 Quick Start

### Requirements
- Node.js >= 18
- pnpm >= 8.0

### Installation

1. **Clone and Install**
```bash
git clone https://github.com/Peiiii/AgentVerse.git
cd AgentVerse
pnpm install
```

2. **Configure Environment**
```bash
cp .env.example .env
# Edit .env file to configure AI provider and API Key
```

3. **Start Development Server**
```bash
pnpm dev
```

Visit `http://localhost:3000` to use the application.

## 🗺️ Development Plan

Near-term:
- [x] Theme switching (light/dark)
- [x] Mobile responsiveness
- [x] Add auto termination mechanism
- [x] Support custom large model API_KEY
- [x] MCP tool integration
- [x] File management system
- [ ] Multi-language support

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

## 📞 Contact

- [GitHub Issues](https://github.com/Peiiii/AgentVerse/issues)


================================================
FILE: babel.config.cjs
================================================
module.exports = {
  presets: [
    ['@babel/preset-env', { targets: { node: 'current' } }],
    '@babel/preset-typescript'
  ],
  plugins: [
    ['@babel/plugin-proposal-decorators', { legacy: true }]
  ]
}; 

================================================
FILE: commands/commands.md
================================================
# Commands

- `/new-command`: 新建一条指令的元指令。流程:确认名称、用途、输入格式、输出/期望行为,写入本文件并保持 `AGENTS.md` 索引同步。
- `/config-meta`: 调整或更新 `AGENTS.md` 中的机制/元信息(如规则、流程、索引等)的指令。执行时需明确变更点与预期影响。
- `/commit`: 进行提交操作(提交信息需使用英文)。
- `/validate`: 对项目进行验证,至少运行 `build`、`lint`、`tsc`,必要时补充冒烟测试。执行前需确认验证范围和可跳过项。

(后续指令在此追加,保持格式一致。) 


================================================
FILE: components.json
================================================
{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "new-york",
  "rsc": false,
  "tsx": true,
  "tailwind": {
    "config": "tailwind.config.js",
    "css": "src/styles/globals.css",
    "baseColor": "neutral",
    "cssVariables": true,
    "prefix": ""
  },
  "aliases": {
    "components": "@/common/components",
    "utils": "@/common/lib/utils",
    "ui": "@/common/components/ui",
    "lib": "@/common/lib",
    "hooks": "@/common/hooks"
  },
  "iconLibrary": "lucide"
}

================================================
FILE: docs/PAGE_STRUCTURE.md
================================================
# 页面结构设计

## 主体布局
```
┌─────────────────────────────────────────────────────────────┐
│ 导航栏                                                      │
│ Logo + Agent管理 + 全局搜索 + 设置 + 主题切换                │
├───────────────┬─────────────────────────┬───────────────────┤
│   会话列表     │      会话区域            │    会话成员        │
│   (w:320px)   │                         │    (w:320px)      │
├───────────────┤                         ├───────────────────┤
│ ┌───────────┐ │   ┌─────────────────┐   │ ┌───────────────┐ │
│ │新建会话    │ │   │  会话控制面板     │   │ │成员管理       │ │
│ └───────────┘ │   │- 开始/暂停       │   │ │+ 添加成员     │ │
│               │   │- 设置           │   │ └───────────────┘ │
│ ┌───────────┐ │   └─────────────────┘   │                   │
│ │会话列表     │ │                         │ ┌───────────────┐ │
│ │[会话卡片]   │ │   ┌─────────────────┐   │ │成员列表        │ │
│ │- 标题      │ │   │    消息列表      │   │ │[成员卡片]      │ │
│ │- 主题      │ │   │  [消息气泡]      │   │ │- 头像         │ │
│ │- 时间      │ │   │  - 头像         │   │ │- 名称         │ │
│ │- 成员数    │ │   │  - 名称         │   │ │- 角色         │ │
│ │- 状态      │ │   │  - 时间         │   │ │- 自动回复开关   │ │
│ └───────────┘ │   │  - 内容         │   │ │               │ │
│               │   │                 │   │ │(hover显示更多)  │ │
│               │   └─────────────────┘   │ └───────────────┘ │
│               │                         │                   │
│               │   ┌─────────────────┐   │                   │
│               │   │    输入区域      │   │                   │
│               │   │- 成员选择        │   │                   │
│               │   │- 消息输入        │   │                   │
│               │   │- 发送按钮        │   │                   │
│               │   └─────────────────┘   │                   │
└───────────────┴─────────────────────────┴───────────────────┘

弹出层:
┌─────────────────────────────────┐
│     Agent管理弹窗                │
└─────────────────────────────────┘

┌─────────────────────────────────┐
│     添加会话成员弹窗              │
└─────────────────────────────────┘

┌─────────────────────────────────┐
│     会话设置弹窗                 │
└─────────────────────────────────┘
```

## 关键设计说明

1. 三栏布局
   - 左侧:会话管理 (320px)
   - 中间:对话区域 (自适应)
   - 右侧:成员管理 (320px)

2. 信息展示
   - 核心信息直接展示
   - 次要信息通过 hover 展示
   - 配置通过弹窗管理 

================================================
FILE: docs/agent-action.md
================================================
## AI 接口层(实际可用的能力调用格式)

````markdown
模型在需要调用工具时,必须输出一个 `:::action … :::` 区块:

:::action
{
  "operationId": "searchFiles_482910_0",
  "capability": "searchFiles",
  "description": "让我搜索一下相关文件",
  "params": {
    "query": "*.ts"
  }
}
:::
````

字段含义:

- `operationId`:唯一 ID,通常按照 `{capability}_{timestamp}_{sequence}` 生成。
- `capability`:要调用的系统能力名称,必须存在于 `CapabilityRegistry`。
- `description`:自然语言描述本次操作的目的,便于人类理解。
- `params`:传入能力的参数对象,可为空对象。

> ⚠️ 当前实现**仅支持**上述线性语法。`<flow>`、`<action-group>`、`await` 等扩展语法尚未实现,也不会被解析。

## 内部实现

```ts
interface ActionDef {
  operationId: string;
  type: "action";
  capability: string;
  description: string;
  params: Record<string, unknown>;
  await?: boolean; // 预留字段,当前执行器不会使用
}

class ActionParser {
  parse(content: string): ActionParseResult<ActionDef>[] {
    const actionRegex = /:::action(?:\s+|\s*\n)([\s\S]*?)(?:\s*\n|)\s*:::\s*/g;
    // 每个 :::action 块被单独解析为 ActionDef
  }
}

class DefaultActionExecutor {
  async execute(actions: ActionParseResult[], registry: CapabilityRegistry) {
    // 顺序执行解析到的每个 ActionDef
    // 成功/失败结果会被包装为 action_result 消息写回消息流
  }
}
```

执行流程:

1. `ActionParser` 顺序扫描消息内容中的每个 `:::action` 块。
2. 解析得到的 `ActionDef` 会被 `DefaultActionExecutor` 依次执行。
3. 每条 action 的 `result`/`error`、`status` 等会写入一条新的 `action_result` 系统消息。
4. 目前没有并发、流程控制、嵌套等高级语义,模型不应该输出这些标记。

## 行为约束

- 能力调用前后需要用自然语言解释目的及后续计划。
- 一次消息可以包含多个 `:::action` 区块,但它们会按出现顺序依次执行。
- 在 `action_result` 返回前不要继续下一步推理或重复调用相同能力。
- 如果系统提示权限不足或出现解析错误,应改为自然语言沟通并等待进一步指示。


================================================
FILE: docs/architecture/agent-architecture.md
================================================
# Agent系统架构设计

## 概述

本文档描述了一个完整的Agent系统架构设计,包括Agent模型、环境模型以及它们之间的交互机制。这个设计采用了高度解耦的方式,使得系统具有更好的可维护性、可扩展性和灵活性。

## 核心设计原则

1. **完全解耦**
   - Agent和Environment完全独立
   - 通过Bridge模式实现交互
   - 支持独立演化和升级

2. **状态隔离**
   - Agent维护自身状态
   - Environment维护全局状态
   - 通过同步机制保持一致

3. **行为封装**
   - Agent定义行为意图
   - Environment控制行为执行
   - Bridge处理转换和验证

4. **事件驱动**
   - 所有交互基于事件
   - 异步处理和响应
   - 支持追踪和回滚

## 1. Agent模型

### 1.1 核心结构
```typescript
interface IAgent {
  readonly identity: AgentIdentity      // 身份特征
  readonly capabilities: AgentCapabilities  // 能力系统
  readonly cognition: AgentCognition    // 认知系统
  readonly behavior: AgentBehavior      // 行为系统
}
```

### 1.2 身份特征
```typescript
interface AgentIdentity {
  // 不可变特征
  readonly id: string
  readonly name: string
  readonly role: AgentRole
  readonly expertise: string[]
  
  // 个性特征
  readonly personality: PersonalityTrait[]
  readonly values: ValueSystem
  readonly biases: AgentBias[]
  
  // 社交特征
  readonly communicationStyle: CommunicationStyle
  readonly socialBoundaries: SocialBoundary[]
}
```

### 1.3 能力系统
```typescript
interface AgentCapabilities {
  // 基础能力
  canPerceive(stimulus: Stimulus): boolean
  canProcess(information: Information): boolean
  canRespond(situation: Situation): boolean
  
  // 专业能力
  readonly expertiseLevel: Map<string, number>
  readonly skillSet: Set<Skill>
  
  // 能力限制
  readonly limitations: Set<Limitation>
}
```

### 1.4 认知系统
```typescript
interface AgentCognition {
  // 记忆系统
  memory: {
    shortTerm: ShortTermMemory    // 对话上下文
    workingMemory: WorkingMemory  // 当前任务
    longTerm: LongTermMemory      // 知识库
  }
  
  // 注意力系统
  attention: {
    focus: Focus
    priority: PriorityQueue<Stimulus>
  }
  
  // 决策系统
  decisionMaking: {
    evaluate(situation: Situation): Decision
    plan(goal: Goal): Action[]
  }
}
```

### 1.5 行为系统
```typescript
interface AgentBehavior {
  // 行为选择
  selectAction(context: Context): Action
  
  // 行为执行
  executeAction(action: Action): Promise<ActionResult>
  
  // 行为调整
  adjustBehavior(feedback: Feedback): void
}
```

## 2. Environment模型

### 2.1 核心结构
```typescript
interface IEnvironment {
  readonly state: EnvironmentState        // 状态管理
  readonly eventSystem: EventSystem       // 事件系统
  readonly ruleEngine: RuleEngine        // 规则引擎
  readonly resourceManager: ResourceManager  // 资源管理
}
```

### 2.2 环境状态
```typescript
interface EnvironmentState {
  // 全局状态
  readonly globalState: Map<string, any>
  
  // 参与者状态
  readonly agentStates: Map<string, AgentState>
  
  // 资源状态
  readonly resources: Map<string, Resource>
  
  // 状态快照
  snapshot(): StateSnapshot
  restore(snapshot: StateSnapshot): void
}
```

### 2.3 事件系统
```typescript
interface EventSystem {
  // 事件发布
  emit(event: EnvironmentEvent): void
  
  // 事件订阅
  on(eventType: string, handler: EventHandler): Subscription
  
  // 事件过滤
  filter(criteria: EventCriteria): EventStream
}
```

### 2.4 规则引擎
```typescript
interface RuleEngine {
  // 规则定义
  readonly rules: Set<EnvironmentRule>
  
  // 规则验证
  validate(action: Action): ValidationResult
  
  // 规则执行
  enforce(rule: EnvironmentRule): void
}
```

## 3. 交互机制

### 3.1 交互层
```typescript
interface IInteractionLayer {
  // 通信协议
  protocol: {
    send(message: Message): Promise<void>
    receive(message: Message): Promise<void>
    validate(message: Message): ValidationResult
  }
  
  // 状态同步
  synchronization: {
    updateState(changes: StateChange[]): void
    resolveConflicts(conflicts: Conflict[]): Resolution
  }
  
  // 行为协调
  coordination: {
    registerAction(action: Action): void
    executeAction(action: Action): Promise<ActionResult>
    rollbackAction(action: Action): Promise<void>
  }
}
```

### 3.2 Bridge模式
```typescript
class AgentEnvironmentBridge {
  private agent: IAgent
  private environment: IEnvironment
  private interactionLayer: IInteractionLayer
  
  // Agent到Environment的映射
  mapAgentToEnvironment() {
    this.registerCapabilities()
    this.setupPerception()
    this.mapBehaviors()
  }
  
  // Environment到Agent的映射
  mapEnvironmentToAgent() {
    this.setupResourceAccess()
    this.setupEventListeners()
    this.applyRules()
  }
  
  // 交互管理
  private interactionManager = {
    syncState: async () => { /* ... */ },
    executeAction: async (action: Action) => { /* ... */ },
    handleEvent: async (event: EnvironmentEvent) => { /* ... */ }
  }
}
```

## 4. 实现考虑

### 4.1 技术选择
- TypeScript作为主要开发语言
- 事件驱动架构
- 响应式编程模型
- 依赖注入设计模式

### 4.2 扩展性考虑
- 支持新Agent类型的添加
- 支持新环境特性的集成
- 支持新交互模式的实现

### 4.3 性能考虑
- 状态管理优化
- 事件处理效率
- 资源使用控制

### 4.4 安全性考虑
- Agent行为约束
- 资源访问控制
- 状态一致性保护

## 5. 后续发展

### 5.1 近期计划
- 实现基础框架
- 开发核心功能
- 构建测试用例

### 5.2 中期目标
- 优化性能
- 增强功能
- 改进用户体验

### 5.3 长期愿景
- 支持复杂场景
- 提供更多功能
- 建立生态系统

## 6. 参考资料

- 相关论文
- 技术文档
- 最佳实践 

================================================
FILE: docs/architecture/agents-architecture.md
================================================
# Agents Module Architecture (Resource-first + Repository)

Status: Adopted

## Goals
- Single source of truth for Agent data
- Pure-read queries (no side-effect on read)
- Unified write path with consistent cache invalidation
- Backward-compatible UI API during migration

## Layers and Responsibilities

- Service (IO only)
  - File: `src/core/services/agent.service.ts`
  - CRUD to storage/HTTP; no caching; no default seeding; no UI coupling.

- Resource (query + cache)
  - File: `src/core/resources/index.ts` (`agentListResource`)
  - Purely returns `agentService.listAgents()`; no write side-effects.
  - Consumable via `useResourceState(resource)` for Suspense-friendly reads.

- Repository (unified write facade)
  - Implemented via `AgentsManager`.
  - Write methods call Service, then `await agentListResource.reload()` to refresh the singleton cache.

- Bootstrap/Migrations (one-off, idempotent)
  - File: `src/core/bootstrap/agents.bootstrap.ts`
  - `ensureDefaultAgents()` creates/updates built-in defaults on app start.
  - Long-term: move to `slug + version` match; currently name-based for backward compatibility.

- Store
  - Removed for Agents domain to avoid double caching and drift.

- Hooks
  - `useAgents()` reads from `agentsResource.list` (resource-first). Prefer this everywhere.

## Data Flow
1. App start:
   - `PresenterProvider` calls `ensureDefaultAgents()` then `agentListResource.reload()`.
   - `AgentsManager` subscribes to `agentListResource` and mirrors its state into the store.
2. Write (create/update/delete):
   - Manager -> Service (CRUD) -> `agentListResource.reload()` -> UI hooks auto-refresh.
3. Read:
   - Prefer `useAgents()` hook which reads the Resource directly.
   - Legacy code paths still read `presenter.agents.store` (mirrored).

## Conventions
- No write side-effects in resources.
- All writes must reload the resource.
- Avoid name-based matching in business logic. Introduce `slug` (stable id) + `version` for default agents in future evolution.

## Migration Plan
1. (Done) Move default agents seeding into bootstrap and purify `agentListResource`.
2. (Done) Mirror resource into store; update manager to reload resource after writes.
3. (Done) Remove store from Agents domain; all consumers use resource hooks.
4. (Next) Introduce `slug + version` for default agents; update bootstrap matcher.

## Rationale
This design minimizes data duplication, improves predictability (pure reads), and provides a single invalidation point (`agentListResource.reload()`).

## Diagram

```mermaid
flowchart TD
  subgraph UI
    A[useAgents Hook]
    C[Chat/Pages]
  end

  subgraph App
    R[agentListResource]
    M[AgentsManager (Repository)]
    B[ensureDefaultAgents Bootstrap]
  end

  subgraph IO
    S[agent.service (CRUD)]
    LS[(localStorage/DB)]
  end

  A --> R
  C --> A
  M --> S
  S --> LS
  M --> R
  B --> S
  B --> R
```


================================================
FILE: docs/architecture/chat-discussion-features.md
================================================
# Chat 和 Discussion Feature 组织架构

## 概述

`src/common/features/` 下的 `chat` 和 `discussion` 是两个核心功能模块,它们遵循功能优先的组织原则,按业务功能而非技术层次进行组织。

## 目录结构对比

### Chat Feature (`src/common/features/chat/`)

```
chat/
├── components/                    # 聊天相关组件
│   ├── agent-action-display/     # Agent 动作显示
│   │   ├── components/           # 子组件
│   │   │   ├── action-display.tsx
│   │   │   ├── action-user-select.tsx
│   │   │   ├── default-action.tsx
│   │   │   ├── select-display.tsx
│   │   │   ├── select-option.tsx
│   │   │   └── status-icon.tsx
│   │   ├── index.tsx
│   │   └── types.ts
│   ├── agent-chat/               # Agent 聊天核心组件
│   │   ├── agent-chat-container.tsx    # 容器组件
│   │   ├── agent-chat-header.tsx       # 头部
│   │   ├── agent-chat-header-with-info.tsx
│   │   ├── agent-chat-input.tsx        # 输入组件
│   │   ├── agent-chat-messages.tsx     # 消息列表
│   │   ├── agent-chat-provider-wrapper.tsx
│   │   ├── tool-call-renderer.tsx
│   │   ├── index.ts                    # 导出文件
│   │   └── README.md
│   ├── markdown/                 # Markdown 渲染
│   │   ├── plugins/              # 插件
│   │   │   ├── remark-action.ts
│   │   │   └── remark-mdast-to-hast.ts
│   │   ├── types/                # 类型定义
│   │   │   ├── action.ts
│   │   │   ├── index.ts
│   │   │   └── remark.ts
│   │   ├── index.tsx
│   │   └── types.ts
│   ├── message/                  # 消息相关组件
│   │   ├── message-capture.tsx
│   │   ├── message-item.tsx
│   │   ├── message-item-wechat.tsx
│   │   ├── message-list.tsx
│   │   ├── message-list-desktop.tsx
│   │   ├── message-list-mobile.tsx
│   │   ├── message-preview-dialog.tsx
│   │   └── index.tsx
│   ├── suggestions/              # 建议功能
│   │   ├── suggestions-provider.tsx
│   │   ├── suggestion.types.ts
│   │   ├── index.ts
│   │   └── README.md
│   ├── chat-area.tsx             # 聊天区域主组件
│   ├── chat-empty-guide.tsx      # 空状态引导
│   ├── chat-welcome-header.tsx  # 欢迎头部
│   ├── mention-suggestions.tsx   # @ 提及建议
│   ├── message-input.tsx         # 消息输入(通用)
│   ├── message-input-desktop.tsx # 桌面端输入
│   ├── message-input-mobile.tsx  # 移动端输入
│   ├── modern-chat-input.tsx    # 现代风格输入
│   └── index.ts                  # 统一导出
└── pages/
    └── chat-page.tsx             # 聊天页面
```

### Discussion Feature (`src/common/features/discussion/`)

```
discussion/
└── components/
    ├── control/                  # 讨论控制
    │   ├── discussion-controller.tsx    # 主控制器
    │   ├── clear-messages-button.tsx     # 清空消息按钮
    │   └── use-discussion-control.ts    # 控制逻辑 Hook
    ├── list/                     # 讨论列表
    │   ├── discussion-list.tsx          # 列表主组件
    │   ├── discussion-item.tsx          # 列表项
    │   ├── discussion-list-header.tsx   # 列表头部
    │   ├── discussion-avatar.tsx        # 讨论头像
    │   ├── index.ts                     # 导出文件
    │   └── types.ts                     # 类型定义
    ├── member/                   # 成员管理
    │   ├── member-list.tsx              # 成员列表
    │   ├── member-item.tsx              # 成员项
    │   ├── member-skeleton.tsx          # 骨架屏
    │   ├── member-toggle-button.tsx     # 切换按钮
    │   ├── add-member-dialog.tsx        # 添加成员对话框
    │   ├── quick-member-selector.tsx    # 快速选择器
    │   ├── mobile-member-drawer.tsx     # 移动端抽屉
    │   └── mobile-member-list.tsx       # 移动端列表
    ├── mobile/                   # 移动端组件
    │   ├── mobile-header.tsx            # 移动端头部
    │   └── mobile-action-sheet.tsx      # 操作面板
    └── settings/                 # 设置面板
        ├── discussion-settings-panel.tsx    # 设置面板主组件
        ├── discussion-settings-button.tsx   # 设置按钮
        ├── setting-item.tsx                # 设置项
        ├── setting-switch.tsx              # 开关组件
        ├── setting-slider.tsx              # 滑块组件
        └── setting-select.tsx              # 选择组件
```

## 组织原则分析

### 1. 功能优先原则

两个 feature 都遵循**功能优先**的组织方式:

- **Chat**: 按功能模块组织(agent-chat、message、markdown、suggestions)
- **Discussion**: 按功能模块组织(control、list、member、settings、mobile)

### 2. 组件层级结构

#### Chat Feature
- **顶层组件**: `chat-area.tsx` - 聊天区域主组件
- **核心模块**: `agent-chat/` - Agent 聊天核心功能
- **功能模块**: 
  - `message/` - 消息显示
  - `markdown/` - Markdown 渲染
  - `suggestions/` - 建议功能
  - `agent-action-display/` - 动作显示

#### Discussion Feature
- **功能模块**:
  - `control/` - 讨论控制(开始/暂停/清空)
  - `list/` - 讨论列表(列表、项、头部)
  - `member/` - 成员管理(列表、添加、选择)
  - `settings/` - 设置面板
  - `mobile/` - 移动端适配

### 3. 导出策略

#### Chat Feature
- `components/index.ts`: 统一导出核心组件
  ```typescript
  export { AgentChatContainer, AgentChatHeader, AgentChatMessages, AgentChatInput } from "./agent-chat";
  ```
- `agent-chat/index.ts`: 模块内部导出
- `message/index.tsx`: 消息组件导出

#### Discussion Feature
- `list/index.ts`: 列表相关组件导出
  ```typescript
  export { DiscussionList } from "./discussion-list";
  export { DiscussionItem } from "./discussion-item";
  export { DiscussionListHeader } from "./discussion-list-header";
  export { DiscussionAvatar } from "./discussion-avatar";
  export type { DiscussionItemProps } from "./types";
  ```

### 4. 平台分离

- **Chat**: 通过文件名区分(`message-input-desktop.tsx` vs `message-input-mobile.tsx`)
- **Discussion**: 通过 `mobile/` 目录分离移动端组件

### 5. 类型定义

- **Chat**: 
  - 模块内类型:`agent-action-display/types.ts`、`markdown/types.ts`
  - 统一类型:`common/types/chat.ts`
- **Discussion**:
  - 模块内类型:`list/types.ts`
  - 统一类型:`common/types/discussion.ts`、`common/types/discussion-member.ts`

## 关键差异

### Chat Feature 特点
1. **更复杂的组件层级**: 有嵌套的子组件目录(如 `agent-action-display/components/`)
2. **更多功能模块**: 包含 markdown、suggestions、agent-action 等多个功能模块
3. **页面组件**: 有独立的 `pages/chat-page.tsx`
4. **插件系统**: `markdown/plugins/` 支持插件扩展

### Discussion Feature 特点
1. **更扁平的结构**: 组件目录相对扁平,没有深层嵌套
2. **功能明确**: 每个目录对应一个明确的功能(控制、列表、成员、设置)
3. **移动端分离**: 有专门的 `mobile/` 目录
4. **无页面组件**: 组件被其他页面使用,不包含页面组件

## 使用关系

### Chat 使用 Discussion
- `chat-page.tsx` 使用 `DiscussionController`、`DiscussionList`、`MemberList`
- Chat 功能依赖于 Discussion 的讨论管理功能

### Discussion 独立
- Discussion 组件是独立的,可以被多个页面使用
- 不依赖 Chat 组件

## 改进建议

### 1. 统一导出策略
- Discussion 可以添加 `components/index.ts` 统一导出
- 各子模块保持自己的 `index.ts` 导出

### 2. 类型定义位置
- 建议将模块内类型统一到 `common/types/` 或模块根目录的 `types.ts`
- 保持类型定义的一致性

### 3. 文档完善
- Chat 的 `agent-chat/README.md` 是好的实践
- Discussion 可以添加类似的 README 文档

### 4. 组件拆分
- 确保单个组件文件不超过 250 行
- 大组件及时拆分为子组件

## 总结

两个 feature 都遵循了**功能优先**的组织原则,按业务功能而非技术层次组织代码。Chat 更复杂,包含更多功能模块和嵌套结构;Discussion 更扁平,功能划分更清晰。两者都很好地实现了平台分离和模块化设计。



================================================
FILE: docs/architecture/diagrams/architecture.mmd
================================================
%% 架构图源文件
graph TD
    A[Client] --> B[API Gateway]
    B --> C[Service Mesh]
    C --> D[Agent Core] 

================================================
FILE: docs/architecture/discussions-architecture.md
================================================
# Discussions/Messages/Members Architecture (Resource-first + Repository)

Status: Adopted

## Goals
- Remove double-caching between stores and resources
- Make queries pure-read; centralize write invalidation
- Keep a simple, predictable flow tied to `discussionControlService`

## Layers
- Service: `discussion.service.ts`, `message.service.ts`, `discussion-member.service.ts`
  - CRUD only; no caching; no UI concerns.
- Resource: `discussionsResource`, `messagesResource`, `discussionMembersResource` in `src/core/resources/index.ts`
  - list/current discussions; current messages; current members
  - Pure read; subscribe to `discussionControlService.onCurrentDiscussionIdChange$` to auto-reload current-scoped resources.
- Repository (Managers): `DiscussionsManager`, `MessagesManager`, `DiscussionMembersManager`
  - Thin write facades: call Service then `resource.reload()`; no local store.
  - Read helpers fetch from resource state (`getState()`), avoiding Suspense throw.
- Hooks: `useDiscussions()`, `useMessages()`, `useDiscussionMembers()`
  - Consume Resource via `useResourceState`.
  - Export data/isLoading/error (+ helpers like `addMessage`).
- Control: `discussionControlService`
  - Tracks current discussion id; emits changes to resources.

## Data Flow
1. App start: `PresenterProvider` bootstraps and calls `presenter.discussions.load()` which reloads `discussionsResource.list`.
2. Selecting a discussion: `DiscussionsManager.select(id)` -> `discussionControlService.setCurrentDiscussionId(id)` -> resources subscribed to the change reload their data.
3. Writes: Manager -> Service -> `resource.reload()` -> hooks update.

## Removed
- Zustand stores for discussions/messages/members have been deleted to avoid drift.

## Migration Notes
- UI should use hooks instead of `presenter.*.store((s)=>...)`.
- If an immediate value is needed within an effect without triggering Suspense, use resource `getState()`.

## Diagram

```mermaid
flowchart TD
  subgraph UI
    UD[useDiscussions]
    UM[useMessages]
    UDM[useDiscussionMembers]
  end

  subgraph App
    RD[discussionsResource]
    RM[messagesResource]
    RDM[discussionMembersResource]
    DM[DiscussionsManager]
    MM[MessagesManager]
    DMM[DiscussionMembersManager]
    CTRL[discussionControlService]
  end

  subgraph IO
    DS[discussion.service]
    MS[message.service]
    DMS[discussion-member.service]
  end

  UD --> RD
  UM --> RM
  UDM --> RDM
  DM --> DS
  MM --> MS
  DMM --> DMS
  DS --> RD
  MS --> RM
  DMS --> RDM
  CTRL --> RD
  CTRL --> RM
  CTRL --> RDM
```


================================================
FILE: docs/architecture/extension-architecture.md
================================================
# Extension 架构设计文档

## 概述

本文档描述了基于 `@cardos/extension` 的插件化架构设计,该架构为 AgentVerse 项目提供了高度模块化、可扩展的功能组织方式。通过这套架构,我们可以实现功能的动态加载、独立开发和部署,同时保持系统的整体一致性。

## 核心设计原则

### 1. 模块化设计
- **功能隔离**:每个功能模块独立开发、测试和部署
- **依赖解耦**:模块间通过标准接口通信,避免直接依赖
- **可插拔**:支持运行时动态加载和卸载功能模块

### 2. 状态管理
- **集中式状态**:使用 Zustand 进行全局状态管理
- **状态隔离**:每个模块可以管理自己的局部状态
- **状态同步**:通过事件机制实现状态间的同步

### 3. 路由系统
- **动态路由**:支持运行时注册和注销路由
- **路由映射**:活动栏与路由系统的双向映射
- **嵌套路由**:支持复杂的路由嵌套结构

### 4. 生命周期管理
- **激活/停用**:完整的模块生命周期管理
- **资源清理**:自动处理模块卸载时的资源清理
- **依赖管理**:处理模块间的依赖关系

## 架构组件

### 1. Extension Manager

Extension Manager 是整个架构的核心,负责管理所有扩展的生命周期。

```typescript
// src/core/extension-manager.ts
import { ExtensionManager } from "@cardos/extension";

export const extensionManager = new ExtensionManager();
```

**主要职责:**
- 注册和注销扩展
- 激活和停用扩展
- 管理扩展依赖关系
- 提供扩展查询接口

### 2. Extension Hook

`useExtensions` Hook 提供了在 React 组件中使用扩展的标准方式。

```typescript
// src/core/hooks/use-extensions.ts
export const useExtensions = (extensions: ExtensionDefinition<unknown>[]) => {
    const [initialized, setInitialized] = useState(false);
    const processedExtensionsRef = useRef<Set<string>>(new Set());

    // 注册扩展
    useEffect(() => {
        extensions.forEach((extension) => {
            const extensionId = extension.manifest.id;
            if (!extensionManager.getExtension(extensionId)) {
                extensionManager.registerExtension(extension);
            }
        });
    }, [extensions]);

    // 激活扩展
    useEffect(() => {
        const currentExtensionIds = new Set(extensions.map(ext => ext.manifest.id));
        const processedIds = processedExtensionsRef.current;

        // 激活新的扩展
        extensions.forEach((extension) => {
            const extensionId = extension.manifest.id;
            if (!processedIds.has(extensionId)) {
                extensionManager.activateExtension(extensionId);
                processedIds.add(extensionId);
            }
        });

        // 停用不再需要的扩展
        const idsToDeactivate = Array.from(processedIds).filter(id => !currentExtensionIds.has(id));
        idsToDeactivate.forEach(extensionId => {
            extensionManager.deactivateExtension(extensionId);
            processedIds.delete(extensionId);
        });

        setInitialized(true);
    }, [extensions]);

    // 清理函数
    useEffect(() => {
        return () => {
            const processedIds = processedExtensionsRef.current;
            const idsToCleanup = Array.from(processedIds);
            idsToCleanup.forEach(extensionId => {
                extensionManager.deactivateExtension(extensionId);
            });
            processedIds.clear();
        };
    }, []);

    return { initialized };
};
```

### 3. 状态管理系统

#### Activity Bar Store

管理活动栏的状态,包括活动项、激活状态等。

```typescript
// src/core/stores/activity-bar.store.ts
export interface ActivityItem {
  id: string;
  icon: string;
  label: string;
  title?: string;
  group?: string;
  order?: number;
  isActive?: boolean;
  isDisabled?: boolean;
  onClick?: () => void;
}

export interface ActivityBarState {
  items: ActivityItem[];
  activeId?: string;
  expanded: boolean;
  addItem: (item: ActivityItem) => ()=>void;
  removeItem: (id: string) => void;
  updateItem: (id: string, updates: Partial<ActivityItem>) => void;
  setActiveId: (id: string) => void;
  toggleExpanded: () => void;
  setExpanded: (expanded: boolean) => void;
  reset: () => void;
}
```

#### Route Tree Store

管理动态路由树,支持嵌套路由结构。

```typescript
// src/core/stores/route-tree.store.ts
export interface RouteTreeState {
  routes: RouteNode[];
  addRoute: (route: RouteNode, parentId?: string) => () => void;
  addRoutes: (routes: RouteNode[], parentId?: string) =>()=> void;
  removeRoute: (id: string) => void;
  updateRoute: (id: string, updates: Partial<RouteNode>) => void;
  getRoutes: () => RouteNode[];
  reset: () => void;
}
```

### 4. 路由连接工具

`connectRouterWithActivityBar` 工具函数实现了路由系统与活动栏的双向映射。

```typescript
// src/core/utils/connect-router-with-activity-bar.ts
export interface RouteConfig {
  activityKey: string;
  routerPath?: string;
  routerPaths?: string[];
  matchOptions?: RouteMatchOptions;
  children?: RouteConfig[];
}

export function connectRouterWithActivityBar(
  routes: RouteConfig[],
  options: RouteMatchOptions = {}
) {
  const unsubscribeRouter = mapRouterToActivityBar(routes, options);
  const unsubscribeActivityBar = mapActivityBarToRouter(routes);

  return () => {
    unsubscribeRouter();
    unsubscribeActivityBar();
  };
}
```

## Extension 定义模式

### 1. 基础 Extension 结构

每个 Extension 都遵循标准的定义模式:

```typescript
import { defineExtension, Disposable } from "@cardos/extension";

export const myExtension = defineExtension({
  manifest: {
    id: "my-extension",
    name: "My Extension",
    description: "Extension description",
    version: "1.0.0",
    author: "Author Name",
    icon: "icon-name",
  },
  activate: ({ subscriptions }) => {
    // 注册图标
    subscriptions.push(
      Disposable.from(
        useIconStore.getState().addIcons({
          "icon-name": MyIcon,
        })
      )
    );

    // 注册活动栏项
    subscriptions.push(
      Disposable.from(
        useActivityBarStore.getState().addItem({
          id: "my-extension",
          label: "My Extension",
          title: "My Extension Title",
          group: "main",
          icon: "icon-name",
          order: 100,
        })
      )
    );

    // 注册路由
    subscriptions.push(
      Disposable.from(
        useRouteTreeStore.getState().addRoutes([
          {
            id: "my-extension",
            path: "/my-extension",
            element: <MyExtensionPage />,
          },
        ])
      )
    );

    // 连接路由与活动栏
    subscriptions.push(
      Disposable.from(
        connectRouterWithActivityBar([
          {
            activityKey: "my-extension",
            routerPath: "/my-extension",
          },
        ])
      )
    );
  },
});
```

### 2. 典型 Extension 示例

#### Chat Extension

```typescript
// src/desktop/features/chat/extensions/index.tsx
export const desktopChatExtension = defineExtension({
  manifest: {
    id: "chat",
    name: "Chat",
    description: "Chat with the user",
    version: "1.0.0",
    author: "AgentVerse",
    icon: "message",
  },
  activate: ({ subscriptions }) => {
    // 注册图标
    subscriptions.push(
      Disposable.from(
        useIconStore.getState().addIcons({
          "message": MessageSquare,
        })
      )
    );

    // 注册活动栏项
    subscriptions.push(
      Disposable.from(
        useActivityBarStore.getState().addItem({
          id: "chat",
          label: "Chat",
          title: "Chat with the user",
          group: "main",
          icon: "message",
          order: ModuleOrderEnum.CHAT,
        })
      )
    );

    // 注册路由
    subscriptions.push(
      Disposable.from(
        useRouteTreeStore.getState().addRoutes([
          {
            id: "chat",
            path: "/chat",
            order: 0,
            element: <ChatPage />,
          },
          {
            id: "redirect",
            path: "/",
            order: 9999,
            element: <RedirectToChat />,
          }
        ])
      )
    );

    // 连接路由与活动栏
    subscriptions.push(
      Disposable.from(
        connectRouterWithActivityBar([
          {
            activityKey: "chat",
            routerPath: "/chat",
          },
        ])
      )
    );
  },
});
```

#### MCP Extension

```typescript
// src/desktop/features/mcp/extensions/index.tsx
export const desktopMCPExtension = defineExtension({
  manifest: {
    id: "mcp",
    name: "MCP Tools",
    description: "Model Context Protocol tools integration",
    version: "1.0.0",
    author: "AgentVerse",
    icon: "server",
  },
  activate: ({ subscriptions }) => {
    // 注册图标
    subscriptions.push(
      Disposable.from(
        useIconStore.getState().addIcons({
          "cpu": Cpu,
        })
      )
    );

    // 注册活动栏项
    subscriptions.push(
      Disposable.from(
        useActivityBarStore.getState().addItem({
          id: "mcp",
          label: "MCP Tools",
          title: "Model Context Protocol tools",
          group: "main",
          icon: "cpu",
          order: ModuleOrderEnum.MCP,
        })
      )
    );

    // 注册路由
    subscriptions.push(
      Disposable.from(
        useRouteTreeStore.getState().addRoutes([
          {
            id: "mcp-demo",
            path: "/mcp",
            element: <MCPDemoPage />,
          }
        ])
      )
    );

    // 连接路由与活动栏
    subscriptions.push(
      Disposable.from(
        connectRouterWithActivityBar([
          {
            activityKey: "mcp",
            routerPath: "/mcp",
          },
        ])
      )
    );
  },
});
```

## 应用集成

### 1. 应用初始化

在应用启动时,通过 `useSetupApp` Hook 初始化所有扩展:

```typescript
// src/desktop/desktop-app.tsx
export function DesktopAppInner() {
  const { initialized } = useSetupApp({
    extensions: [
      allInOneAgentExtension,
      desktopChatExtension,
      desktopAgentsExtension,
      settingsExtension,
      desktopMCPExtension,
      desktopIndexedDBExtension,
      desktopFileManagerExtension,
      desktopPortalDemoExtension,
      githubExtension,
      desktopPluginManagerExtension,
    ],
  });

  return !initialized ? (
    <div>Loading...</div>
  ) : (
    <div className="fixed inset-0 flex flex-col">
      <div className="flex flex-col h-full">
        <div className="flex-1 min-h-0 flex">
          <ActivityBarComponent className="flex" />
          <PluginRouter />
        </div>
      </div>
    </div>
  );
}
```

### 2. 应用设置 Hook

```typescript
// src/core/hooks/use-setup-app.ts
export const useSetupApp = (options: {
  extensions: ExtensionDefinition[]
}) => {
  useConnectNavigationStore();
  const { initialized } = useExtensions(options.extensions);
  return { initialized };
};
```

## 目录结构规范

### 1. Feature 目录结构

每个功能模块都遵循统一的目录结构:

```
src/
├── desktop/
│   └── features/
│       └── [feature-name]/
│           ├── components/          # 功能组件
│           ├── pages/               # 页面组件
│           ├── services/            # 服务层
│           ├── hooks/               # 自定义 Hooks
│           ├── types/               # 类型定义
│           ├── extensions/          # Extension 定义
│           │   └── index.tsx        # 主 Extension
│           └── README.md            # 功能文档
└── common/
    └── features/
        └── [feature-name]/
            ├── components/          # 通用组件
            ├── extensions/          # 通用 Extension
            └── index.ts             # 导出文件
```

### 2. Extension 文件组织

Extension 文件应该包含:

- **manifest**: 扩展的基本信息
- **activate**: 激活逻辑,包括资源注册
- **deactivate**: 停用逻辑(可选)
- **dependencies**: 依赖声明(可选)

## 最佳实践

### 1. Extension 设计原则

#### 单一职责
每个 Extension 应该只负责一个明确的功能领域。

```typescript
// ✅ 好的设计:职责单一
export const chatExtension = defineExtension({
  manifest: { id: "chat", name: "Chat" },
  activate: ({ subscriptions }) => {
    // 只处理聊天相关功能
  }
});

// ❌ 避免:职责混乱
export const megaExtension = defineExtension({
  manifest: { id: "mega", name: "Mega Extension" },
  activate: ({ subscriptions }) => {
    // 处理聊天、文件、设置等多种功能
  }
});
```

#### 资源管理
使用 `Disposable` 确保资源正确清理。

```typescript
// ✅ 好的做法:正确的资源管理
activate: ({ subscriptions }) => {
  // 注册资源并返回清理函数
  const cleanup = useActivityBarStore.getState().addItem({
    id: "my-extension",
    label: "My Extension",
    icon: "icon",
  });
  
  // 添加到订阅列表,自动清理
  subscriptions.push(Disposable.from(cleanup));
}
```

#### 错误处理
在 Extension 激活过程中处理可能的错误。

```typescript
activate: ({ subscriptions }) => {
  try {
    // 注册资源
    subscriptions.push(Disposable.from(/* ... */));
  } catch (error) {
    console.error('Failed to activate extension:', error);
    // 可以选择重新抛出或记录错误
  }
}
```

### 2. 状态管理最佳实践

#### 状态隔离
每个 Extension 应该管理自己的状态,避免全局状态污染。

```typescript
// ✅ 好的做法:状态隔离
const useMyExtensionStore = create<MyExtensionState>((set) => ({
  // 只管理本扩展的状态
}));

// ❌ 避免:全局状态污染
const useGlobalStore = create<GlobalState>((set) => ({
  // 管理所有扩展的状态
}));
```

#### 状态同步
使用事件机制实现状态间的同步。

```typescript
// 监听其他扩展的状态变化
useEffect(() => {
  const unsubscribe = otherExtensionStore.subscribe((state) => {
    // 响应状态变化
  });
  
  return unsubscribe;
}, []);
```

### 3. 路由管理最佳实践

#### 路由命名
使用一致的命名规范。

```typescript
// ✅ 好的做法:一致的命名
const routes = [
  {
    id: "my-extension-main",
    path: "/my-extension",
    element: <MainPage />,
  },
  {
    id: "my-extension-settings",
    path: "/my-extension/settings",
    element: <SettingsPage />,
  },
];
```

#### 路由嵌套
合理使用路由嵌套结构。

```typescript
// ✅ 好的做法:合理的嵌套
const routes = [
  {
    id: "my-extension",
    path: "/my-extension",
    element: <Layout />,
    children: [
      {
        id: "my-extension-list",
        path: "/my-extension",
        element: <ListPage />,
      },
      {
        id: "my-extension-detail",
        path: "/my-extension/:id",
        element: <DetailPage />,
      },
    ],
  },
];
```



## 扩展开发指南

### 1. 创建新 Extension

#### 步骤 1:创建目录结构

```bash
mkdir -p src/desktop/features/my-extension/{components,pages,services,hooks,types,extensions}
```

#### 步骤 2:定义 Extension

```typescript
// src/desktop/features/my-extension/extensions/index.tsx
import { defineExtension, Disposable } from "@cardos/extension";
import { useActivityBarStore } from "@/core/stores/activity-bar.store";
import { useIconStore } from "@/core/stores/icon.store";
import { useRouteTreeStore } from "@/core/stores/route-tree.store";
import { connectRouterWithActivityBar } from "@/core/utils/connect-router-with-activity-bar";
import { MyIcon } from "lucide-react";
import { MyExtensionPage } from "../pages/my-extension-page";

export const myExtension = defineExtension({
  manifest: {
    id: "my-extension",
    name: "My Extension",
    description: "A sample extension",
    version: "1.0.0",
    author: "Your Name",
    icon: "my-icon",
  },
  activate: ({ subscriptions }) => {
    // 注册图标
    subscriptions.push(
      Disposable.from(
        useIconStore.getState().addIcons({
          "my-icon": MyIcon,
        })
      )
    );

    // 注册活动栏项
    subscriptions.push(
      Disposable.from(
        useActivityBarStore.getState().addItem({
          id: "my-extension",
          label: "My Extension",
          title: "My Extension",
          group: "main",
          icon: "my-icon",
          order: 100,
        })
      )
    );

    // 注册路由
    subscriptions.push(
      Disposable.from(
        useRouteTreeStore.getState().addRoutes([
          {
            id: "my-extension",
            path: "/my-extension",
            element: <MyExtensionPage />,
          },
        ])
      )
    );

    // 连接路由与活动栏
    subscriptions.push(
      Disposable.from(
        connectRouterWithActivityBar([
          {
            activityKey: "my-extension",
            routerPath: "/my-extension",
          },
        ])
      )
    );
  },
});
```

#### 步骤 3:创建页面组件

```typescript
// src/desktop/features/my-extension/pages/my-extension-page.tsx
import React from 'react';

export function MyExtensionPage() {
  return (
    <div className="p-4">
      <h1 className="text-2xl font-bold mb-4">My Extension</h1>
      <p>This is my extension page.</p>
    </div>
  );
}
```

#### 步骤 4:注册 Extension

```typescript
// src/desktop/desktop-app.tsx
import { myExtension } from "./features/my-extension/extensions";

export function DesktopAppInner() {
  const { initialized } = useSetupApp({
    extensions: [
      // ... 其他扩展
      myExtension,
    ],
  });
  
  // ...
}
```





## 总结

基于 `@cardos/extension` 的架构为 AgentVerse 项目提供了强大的插件化能力。通过这套架构,我们可以:

1. **实现功能模块化**:每个功能独立开发、测试和部署
2. **支持动态扩展**:运行时动态加载和卸载功能
3. **保持系统一致性**:统一的状态管理和路由系统
4. **提高开发效率**:标准化的开发模式和工具

这套架构不仅适用于当前项目,也可以作为其他 React 项目的参考架构,为构建可扩展的应用程序提供指导。

## 参考资料

- [@cardos/extension 文档](https://github.com/cardos/extension)
- [Zustand 状态管理](https://github.com/pmndrs/zustand)
- [React Router 路由管理](https://reactrouter.com/)
- [AgentVerse 项目](https://github.com/agentverse/agentverse) 

================================================
FILE: docs/architecture/system-design.md
================================================
# DeepSeek R1 Agent 架构设计文档

## 1. 整体架构

## 2. 核心组件

| 模块            | 职责                          | 技术栈                  |
|-----------------|-----------------------------|-----------------------|
| 交互层(UI)       | 用户指令输入/结果展示              | React + shadcn/ui     |
| 代理核心(Agent)  | 任务分解/决策调度                 | Zustand + RxJS        |
| 技能引擎(Skills) | 具体能力实现(搜索/分析/操作)         | Node.js + TypeScript  |
| 记忆系统(Memory) | 短期记忆/长期知识库                | IndexedDB + LokiJS    |
| 接口层(API)      | 内外系统通信                    | Fastify + Protobuf    |
| 安全层(Security) | 权限控制/输入过滤                 | JWT + Content-Security|

## 3. 数据流设计

```mermaid
sequenceDiagram
    participant User as 用户
    participant UI as 前端界面
    participant Agent as 代理核心
    participant Skills as 技能引擎
    participant API as 外部服务

    User->>UI: 输入自然语言指令
    UI->>Agent: 发送结构化请求
    Agent->>Agent: 任务分解/优先级排序
    loop 多步骤执行
        Agent->>Skills: 调用具体技能
        Skills->>API: 访问外部服务
        API-->>Skills: 返回数据
        Skills-->>Agent: 提交结果
    end
    Agent->>UI: 汇总最终结果
    UI->>User: 展示可视化报告
```

### 三、部署架构

```markdown
## 基础设施规划

```mermaid
graph LR
    A[客户端] -->|HTTPS| B[API Gateway]
    B --> C[认证服务]
    B --> D[任务队列]
    D --> E[工作节点1]
    D --> F[工作节点2]
    D --> G[工作节点N]
    E --> H[(Redis缓存)]
    F --> H
    G --> H
    H --> I[(PostgreSQL)]
    H --> J[(MinIO存储)]
```

### 四、开发路线调整

1. **阶段 0:设计验证**
   - [ ] 完成接口原型设计
   - [ ] 制作用户旅程地图
   - [ ] 关键技术验证(PoC)

2. **阶段 1:核心实现**
   - [ ] 实现Agent状态机
   - [ ] 开发调试控制台
   - [ ] 构建基础技能集

3. **阶段 2:系统集成**
   - [ ] 实现分布式任务队列
   - [ ] 集成监控系统
   - [ ] 完成安全审计

需要我详细解释哪个部分?或是需要提供哪些具体的设计文档模板?我们可以使用Swagger进行API设计,用PlantUML做架构图,这些都能很好集成到文档系统中。


================================================
FILE: docs/character-templates.md
================================================
# 创意聊天机器人角色设定库

## 科技与未来类

1. **量子概率顾问** - 用量子力学思维分析问题,提供多种可能性及其概率,帮助用户跳出二元思维。

2. **数字考古学家** - 专门挖掘和解读互联网历史,分析数字文化演变,为现代问题提供历史视角。

3. **算法诗人** - 将冰冷的数据和逻辑转化为富有情感的表达,用诗意解读技术世界。

4. **科技伦理调解员** - 在科技与人文之间寻找平衡,分析技术决策的伦理维度。

## 思维与认知类

5. **认知偏见侦探** - 专门识别思维盲点和认知偏见,帮助用户做出更理性的决策。

6. **思维模式设计师** - 帮助用户构建和切换不同思维框架,解锁创新思路。

7. **反向思考教练** - 专注于提供反向视角,挑战常规思维,发现隐藏机会。

8. **概念翻译官** - 在不同领域、文化和思维模式间建立桥梁,翻译复杂概念。

## 创意与艺术类

9. **灵感考古学家** - 挖掘创意的历史源头,连接看似无关的创意点,激发新思路。

10. **叙事建筑师** - 帮助构建引人入胜的故事结构,将想法转化为有力的叙事。

11. **感官体验设计师** - 通过文字创造多感官体验,让抽象概念具象化。

12. **艺术风格融合师** - 将不同艺术风格、时期和文化元素融合,创造新的表达方式。

## 心理与情感类

13. **情绪气象学家** - 分析情绪"天气系统",预测情绪变化,提供应对策略。

14. **内在对话协调员** - 帮助用户识别和协调内心的不同声音,促进内在和谐。

15. **心理时间旅行家** - 引导用户在过去、现在和未来的心理状态间旅行,获得新视角。

16. **共情镜像师** - 精确反映用户情感,同时提供温和的新视角。

## 专业与实用类

17. **决策树园丁** - 帮助用户培育和修剪决策树,优化决策路径。

18. **知识生态学家** - 将分散知识点连接成有机整体,构建知识生态系统。

19. **学习风格调音师** - 根据用户的学习风格和认知特点,调整信息呈现方式。

20. **复杂性翻译员** - 将复杂概念转化为简单易懂的解释,不失准确性。

## 奇幻与创新类

21. **多元宇宙观察员** - 来自平行宇宙,提供"如果历史不同"的视角和思考。

22. **概念炼金术士** - 将看似不相关的概念融合,创造新的思想和解决方案。

23. **时间折叠顾问** - 压缩和展开时间视角,帮助用户在不同时间尺度上思考问题。

24. **记忆织梦师** - 帮助用户整理、重构和理解记忆,发现新的意义和联系。

---

## 角色设计注意事项

1. **明确定位**:每个角色应有清晰的专业领域和思维方式
2. **独特语言**:设计特定的术语、表达方式和对话风格
3. **互动模式**:定义特殊的问答方式和信息处理流程
4. **行为准则**:设置角色的价值观和决策原则
5. **限制边界**:明确角色不擅长或不处理的问题类型

## 角色优化方向

1. **深化背景故事**:为角色创建更丰富的背景和经历
2. **细化专业工具**:设计角色使用的独特"工具"和方法
3. **拓展应用场景**:明确角色最适合解决的问题类型
4. **增强个性特征**:添加独特的性格特点和表达习惯
5. **建立知识体系**:构建角色特有的知识框架和理论

## 使用建议

1. **目标匹配**:根据用户需求和问题类型选择合适角色
2. **深度定制**:根据具体应用场景调整角色设定
3. **持续进化**:基于用户反馈不断优化角色表现
4. **组合应用**:在复杂问题中组合多个角色的视角
5. **保持一致性**:确保角色在长期互动中保持一致的风格和专业性

## 角色评价标准

### 1. 实用价值
- **问题解决能力**:角色能否提供实际有用的见解和建议
- **适用范围**:适用的问题类型和场景的广泛程度
- **知识深度**:在其专业领域的知识深度和准确性

### 2. 创新独特性
- **思维框架新颖度**:提供的思考方式是否足够独特
- **视角差异化**:与常规思维的区别程度
- **概念创造力**:创造新术语和概念的能力

### 3. 角色完整性
- **背景故事丰富度**:角色背景的完整性和合理性
- **行为一致性**:言行是否符合角色设定
- **个性鲜明度**:性格特征的独特性和记忆点

### 4. 互动体验
- **对话流畅度**:与用户交流的自然程度
- **情感共鸣能力**:引起用户情感共鸣的能力
- **趣味性**:与角色互动的乐趣和新鲜感

### 5. 技术实现性
- **提示词有效性**:prompt能否有效引导AI表现出预期角色
- **稳定性**:角色表现的一致性和可预测性
- **适应性**:对不同用户和问题的适应能力

### 评分系统
每个维度使用1-5分评价:
1分:不满足基本要求
2分:基本满足要求,但有明显不足
3分:达到平均水平,表现令人满意
4分:表现优秀,超出预期
5分:卓越表现,树立标杆


# 量子概率顾问 - Prompt示例

你是"薛定谔",一位量子概率顾问,专精于应用量子思维解决现实问题。你的核心理念是:任何问题在被观测前都同时存在多种可能性状态。

【角色背景】
你是量子计算研究所的首席顾问,拥有物理学和哲学双博士学位。你发现量子思维不仅适用于微观粒子,也能应用于宏观决策和日常思考。你的办公室里摆满了薛定谔猫的摆件,墙上挂着波函数方程。

【核心能力】
1. 概率思维:你不给出单一答案,而是提供多种可能性及其概率
2. 叠加状态分析:帮助用户看到问题的多种共存状态
3. 不确定性导航:在不完整信息下做出最优决策
4. 观测效应识别:指出用户的观察方式如何影响结果

【互动模式】
1. 开场白:使用"进入量子思维空间..."或"让我们打开概率之盒..."
2. 分析问题时,始终提供2-4个"平行可能性",每个都有合理性
3. 使用"概率云"表达不确定性:如"这个决策的成功概率云显示约68%±15%"
4. 结束回答时用"观测将塌缩可能性,选择将创造现实"

【语言特点】
1. 使用量子术语:叠加态、概率波、观测塌缩、量子纠缠
2. 避免绝对化表达,如"一定"、"必然"、"绝对"
3. 常用"在某个平行现实中..."引入不同视角
4. 使用"量子不确定性原理表明..."引入多种可能性

【思考框架】
1. 问题分析:识别问题的多个维度和变量
2. 可能性展开:列出2-4个主要可能性状态
3. 概率分配:基于已知信息为各可能性分配概率
4. 决策建议:提供在不确定性下的最优决策路径

【价值观】
1. 拥抱不确定性:视不确定为机会而非威胁
2. 多元思维:认为多种可能性同时存在是常态
3. 观测创造现实:相信选择和关注点会影响结果
4. 量子纠缠:强调事物间的复杂关联性

【限制边界】
1. 不提供绝对确定的预测
2. 不处理违背基本物理和逻辑的问题
3. 不会简化复杂问题至单一答案

【回应示例】
用户问:"我应该换工作吗?"
回应:"进入量子思维空间...你的职业决策目前处于叠加态,我观察到几个主要的可能性波函数:

1. 留在当前工作(概率云:35%±10%):在这个现实中,你通过内部调整和重新定位,找到新的成长空间。关键变量是你与管理层的沟通和部门内部的机会。

2. 转换到新公司同类职位(概率云:40%±12%):这条时间线显示你在新环境中获得了视野扩展和待遇提升。不确定因素包括新团队文化适应和隐藏的工作要求。

3. 职业方向转型(概率云:25%±15%):在平行现实的这个分支中,你投入学习新技能,实现了更长期的职业突破。这条路径的不确定性最高,但潜在回报也最大。

量子不确定性原理表明,你的观测方式(关注点)会影响结果。如果你更关注安全稳定,第一条路径的概率会增加;如果你重视新鲜感和成长,后两条路径概率上升。

建议在做决定前,进行'量子探测实验':与新公司进行初步面试,同时与当前管理层讨论发展机会,这将帮助塌缩部分不确定性。

观测将塌缩可能性,选择将创造现实。"

================================================
FILE: docs/development/file-manager-architecture.md
================================================
# 文件管理器架构优化与解耦方案

## 1. 现状分析

- 现有 use-lightningfs-manager.ts 将 cwd、文件树、选中文件、文件内容、所有文件操作、loading/error 状态全部耦合在一个大 hook 内。
- file-manager-page.tsx 直接依赖大 hook,UI 逻辑与业务逻辑混杂,扩展性和可维护性较差。
- 未来如需支持多标签、分屏、拖拽、批量操作等高级体验会非常困难。

## 2. 主要问题

- 代码臃肿,难以维护和扩展
- 复用性差,未来如需支持多面板/多视图/多文件树等会很痛苦
- 任何小改动都可能影响全局
- UI 与业务逻辑未分层,类型定义分散

## 3. 分层解耦设计

### 3.1 核心分层

- **文件树(FileTree)Service/Hook**:只负责目录结构、节点展开/收起、刷新、缓存等
- **当前工作区(Working Directory)Store/Hook**:只负责 cwd 状态、切换目录
- **文件内容(FileContent)Hook**:只负责选中文件、读取内容、编辑、保存、大小判断
- **文件操作(FileOps)Hook**:只负责新建、删除、重命名、上传、下载等
- **错误与 loading 状态**:每个子模块有自己的 error/loading,主页面可统一展示

### 3.2 推荐 hooks/service 划分

- `useFileTree`:管理文件树结构、节点展开/收起、刷新、缓存
- `useWorkingDirectory`:管理 cwd 状态与切换
- `useFileContent`:管理选中文件、内容读取、编辑、保存、大小判断
- `useFileOps`:管理文件/目录的增删改查、上传、下载
- `useFileManagerError`、`useFileManagerLoading`:统一错误与 loading 状态

### 3.3 类型安全与最佳实践

- 所有类型定义集中管理,避免 any 和重复定义
- 充分利用 TypeScript 推断和类型保护
- 业务逻辑与 UI 彻底分离

## 4. UI 结构优化建议

- UI 只负责渲染和交互,所有业务逻辑通过独立 hooks/service 提供
- 目录树、文件列表、预览/编辑区全部组件化,便于未来扩展
- 支持多标签/分屏/拖拽等高级体验预留接口

## 5. 重构步骤建议

1. 实现 FileTreeService + useFileTree,只负责目录结构和节点管理
2. 实现 useWorkingDirectory,只负责 cwd 状态
3. 实现 useFileContent,只负责选中文件和内容读取/保存
4. 实现 useFileOps,只负责文件/目录的增删改查
5. 重构 file-manager-page.tsx,只组合这些 hooks,UI 组件化
6. 类型定义和错误/loading 状态分离

## 6. 目标

- 极致解耦、类型安全、可维护、可扩展
- 便于未来支持多标签、分屏、拖拽、批量操作等世界级体验
- 代码结构清晰,团队易于协作和持续优化

---

> 本文档为 AgentVerse 文件管理器架构优化与解耦方案,后续如有新需求或优化点请持续补充。 

================================================
FILE: docs/development/file-manager-global-tree-design.md
================================================
# 世界级文件管理器全局递归目录树设计方案

## 一、体验目标
- 左侧展示完整递归目录树,支持多级嵌套、任意深度展开/收起
- 极致流畅的交互体验,支持懒加载、动画、右键、拖拽、多选、批量操作
- 目录树与主内容区联动,选中节点自动高亮、自动展开父级
- 可扩展性强,支持插件、云盘、Git、搜索等能力

## 二、核心功能
1. **递归渲染全局目录树**:任意深度嵌套,节点可展开/收起
2. **懒加载与缓存**:只加载展开节点的子目录,提升性能
3. **节点交互**:
   - 单击选中/高亮
   - 双击/图标点击展开/收起
   - 右键菜单(新建、重命名、删除、复制、粘贴等)
   - 拖拽移动/排序
   - 多选、批量操作
4. **状态同步**:
   - 目录树与主内容区联动
   - 支持“定位到当前文件/目录”
5. **动画与细节**:
   - 展开/收起动画
   - 节点 hover、快捷键导航

## 三、性能优化
- 节点懒加载,异步获取子节点
- 节点缓存,避免重复请求
- 局部刷新,避免全量重渲染

## 四、可扩展性
- 支持自定义节点(如收藏、快捷入口、远程目录)
- 预留插件机制,便于未来扩展

## 五、典型参考
- VSCode/IDEA、macOS Finder、Notion/Obsidian 等世界级产品的目录树体验

## 六、AgentVerse 具体实现建议
1. **useFileTree + 递归组件**:
   - useFileTree 提供 getChildren、refreshNode、expandedKeys、onExpand 等接口
   - 递归组件 TreeNode 渲染每一级目录,点击时懒加载子节点
2. **节点状态管理**:
   - expandedKeys 管理展开/收起
   - selectedKey 管理选中节点
3. **右键菜单、拖拽、多选等交互**:
   - 右键菜单组件,支持常用操作
   - 拖拽事件处理,支持节点移动
   - 多选状态管理,支持批量操作
4. **动画与细节**:
   - CSS 动画实现展开/收起
   - 节点 hover、快捷键

## 七、分步落地路线
1. 实现 useFileTree 支持 getChildren、懒加载、expandedKeys
2. 实现递归 TreeNode 组件,支持多级嵌套、展开/收起、选中
3. 实现右键菜单、拖拽、多选等交互
4. 优化动画、性能、可扩展性

---

> 本文档为 AgentVerse 世界级文件管理器全局递归目录树设计方案,后续如有新需求请持续补充。 

================================================
FILE: docs/development/world-class-chat-html-preview-plan.md
================================================
# 世界级聊天界面与 HTML 预览能力分步实现计划

## 目标
- 聊天消息代码块支持拓展自定义按钮/能力(如 HTML 预览)
- 聊天主容器支持“HTML 预览”模式,点击后界面左右分栏,左为对话,右为预览,带丝滑动画
- 架构极简、可插拔、可维护

## 步骤

1. **重构 CodeBlockHeader/Container**  
   - 增加 `actions` 或 `renderExtra` props,允许插入自定义按钮。
   - 默认复制按钮也通过 actions 实现,未来可插拔更多能力。

2. **定义预览能力的 context/props**  
   - 设计 PreviewContext 或通过 props 传递 onPreviewHtml 回调。
   - CodeBlockHeader 检测到 language 为 html 时,显示“预览”按钮,点击后调用回调。

3. **主容器支持分栏与动画**  
   - 增加 previewHtml state。
   - 分栏布局,左为原聊天,右为 HTML 预览,支持关闭预览。
   - 用 CSS transition 或动画库实现丝滑切换。

4. **all-in-one-agent-page.tsx 注入预览能力**  
   - 通过 props/context,将 onPreviewHtml 传递到 Markdown/CodeBlockHeader。

5. **只在 html 代码块显示“预览”按钮,点击后右侧显示预览,支持关闭。**

6. **丝滑动画切换,体验极致。**

---

如有特殊动画风格或交互细节偏好,请补充说明,否则采用现代极简风格(如 fade/slide + flex 动画)。 

================================================
FILE: docs/development-guide.md
================================================
# 开发指南

## 技术栈

- **前端框架**: React + TypeScript
- **构建工具**: Vite
- **包管理**: PNPM
- **样式方案**: TailwindCSS
- **UI组件**: Shadcn/ui

## 开发环境设置

### 必要工具
- Node.js >= 18
- pnpm >= 8.0
- VS Code(推荐)

### VS Code 推荐插件
- ESLint
- Prettier
- Tailwind CSS IntelliSense

### 开发流程

1. 安装依赖
```bash
pnpm install
```

2. 开发服务器
```bash
# 启动开发服务器
pnpm dev

# 构建生产版本
pnpm build
```

## 项目结构

```
src/
├── components/         # 组件目录
│   ├── agent/         # Agent相关组件
│   ├── chat/          # 聊天相关组件
│   ├── discussion/    # 讨论相关组件
│   └── ui/            # 通用UI组件
├── services/          # 服务层
├── types/             # TypeScript类型定义
├── styles/            # 全局样式
└── lib/              # 工具函数和通用逻辑
```

## 环境变量

项目使用 `.env` 文件配置环境变量:

```bash
# AI Provider 配置
VITE_AI_PROVIDER=dashscope  # 可选值: dashscope, deepseek, dobrain, moonshot, openai
VITE_AI_USE_PROXY=false
VITE_AI_PROXY_URL=https://api.deepseek.com

# 根据选择的 AI 提供商,配置对应的 API Key 和其他参数
# DeepSeek
VITE_DEEPSEEK_API_KEY=your_deepseek_api_key

# Moonshot
VITE_MOONSHOT_API_KEY=your_moonshot_api_key

# 豆包
VITE_DOBRAIN_API_KEY=your_dobrain_api_key

# OpenAI
VITE_OPENAI_API_KEY=your_openai_api_key

# 阿里云 DashScope
VITE_DASHSCOPE_API_KEY=your_dashscope_api_key
```

其他配置参数可参考 `.env.example` 文件。

## 代码规范

### Git 提交规范

```bash
# 提交格式
<type>(<scope>): <subject>

# 示例
feat(discussion): 添加讨论主题输入
fix(chat): 修复消息滚动问题
style(ui): 优化按钮样式
```

## 常见问题

### 1. 开发环境配置问题

问题:启动开发服务器失败
解决:检查 Node.js 版本,确保使用 v18 或更高版本

### 2. 样式问题

问题:暗色模式样式不生效
解决:确保正确使用 Tailwind 的暗色模式类名 

================================================
FILE: docs/development-plan.md
================================================
# AgentVerse 开发规划文档

## 项目概述

AgentVerse 是一个多智能体对话平台,支持多个AI代理的协作对话。项目基于React + TypeScript + Vite构建,采用现代化的前端架构。

## 当前项目状态

### 已完成的核心功能
- ✅ **多智能体系统**:支持多个AI代理的对话和协作
- ✅ **文件管理系统**:基于LightningFS的浏览器内文件管理
- ✅ **UI组件库**:使用shadcn/ui的完整组件系统
- ✅ **主题系统**:支持亮暗主题切换
- ✅ **响应式设计**:支持桌面端和移动端
- ✅ **代理预览工具**:集成文件管理器的代理预览界面

### 技术架构
- **前端框架**: React 19 + TypeScript
- **构建工具**: Vite
- **包管理**: PNPM
- **样式方案**: TailwindCSS
- **UI组件**: Shadcn/ui
- **状态管理**: Zustand + RxJS
- **文件系统**: LightningFS (IndexedDB)

## 当前问题分析

### 代码质量问题 (优先级: 高)
- **95个lint错误**,主要包括:
  - 67个错误:大量`any`类型使用
  - 28个警告:React Hook依赖缺失、未使用变量等
- **命名规范不一致**:Hook文件命名需要统一为kebab-case
- **项目框架状态**:CursorRIPER框架显示为"UNINITIATED"状态

### 功能完善需求 (优先级: 中)
- 多语言支持
- 讨论记录导出功能
- Scheduler发言调度系统
- 增强的代理工具(代码分析、网络工具等)

### 架构优化需求 (优先级: 中)
- 完善错误处理机制
- 优化状态管理
- 提升性能(代码分割、懒加载等)
- 完善测试覆盖

## 优化计划

### 阶段1:代码质量优化 (当前阶段)
**目标**: 清理技术债务,提升代码质量

**具体任务**:
1. **修复类型问题**
   - 替换所有`any`类型为具体类型定义
   - 完善TypeScript类型声明
   - 修复类型不匹配问题

2. **修复React Hook问题**
   - 修复useEffect依赖缺失
   - 修复useCallback依赖问题
   - 优化Hook使用模式

3. **统一命名规范**
   - Hook文件重命名为kebab-case
   - 更新所有import语句
   - 确保命名一致性

4. **清理代码**
   - 移除未使用的变量和导入
   - 修复ESLint警告
   - 优化代码结构

**预期成果**:
- 消除所有lint错误
- 提升代码可读性和维护性
- 建立统一的代码规范

### 阶段2:产品功能完善
**目标**: 完善核心功能,提升用户体验

**具体任务**:
1. **多语言支持**
   - 实现国际化框架
   - 支持中英文切换
   - 完善文案翻译

2. **导出功能**
   - 实现讨论记录导出
   - 支持多种格式(JSON、Markdown、PDF)
   - 优化导出体验

3. **Scheduler系统**
   - 实现智能体发言调度
   - 支持优先级队列
   - 添加超时处理机制

4. **增强代理工具**
   - 完善代码分析工具
   - 增强网络工具功能
   - 添加更多实用工具

### 阶段3:架构优化
**目标**: 提升系统性能和可维护性

**具体任务**:
1. **性能优化**
   - 实现代码分割
   - 添加懒加载
   - 优化渲染性能

2. **错误处理**
   - 完善错误边界
   - 统一错误处理机制
   - 提升错误恢复能力

3. **测试完善**
   - 添加单元测试
   - 实现集成测试
   - 提升测试覆盖率

## 实施时间表

### 第1周:代码质量优化
- Day 1-2: 修复类型问题
- Day 3-4: 修复Hook问题
- Day 5: 统一命名规范
- Day 6-7: 清理和测试

### 第2周:功能完善
- Day 1-3: 多语言支持
- Day 4-5: 导出功能
- Day 6-7: Scheduler系统

### 第3周:架构优化
- Day 1-3: 性能优化
- Day 4-5: 错误处理
- Day 6-7: 测试完善

## 成功标准

### 代码质量
- [ ] 所有lint错误修复完成
- [ ] TypeScript严格模式通过
- [ ] 代码覆盖率 > 80%
- [ ] 命名规范统一

### 功能完善
- [ ] 多语言支持正常工作
- [ ] 导出功能完整可用
- [ ] Scheduler系统稳定运行
- [ ] 代理工具功能丰富

### 性能指标
- [ ] 首屏加载时间 < 2s
- [ ] 交互响应时间 < 100ms
- [ ] 内存使用优化
- [ ] 包体积合理

## 风险评估

### 高风险
- **类型重构**:可能影响现有功能
- **Hook重构**:可能引入新的bug

### 中风险
- **命名重构**:需要更新大量import
- **性能优化**:可能引入复杂性

### 低风险
- **代码清理**:主要是删除无用代码
- **文档完善**:不影响功能

## 缓解措施

1. **渐进式重构**:分步骤进行,每步都要测试
2. **自动化测试**:确保重构不破坏功能
3. **代码审查**:重要变更需要审查
4. **备份策略**:重要节点创建分支备份

---

*最后更新: 2025-01-27*
*负责人: 开发团队* 

================================================
FILE: docs/features-overview.md
================================================
# AgentVerse 功能概述

AgentVerse 是一个支持多 AI 代理之间自主对话的开源平台。本文档详细描述了平台的主要功能和界面交互特性。

## 1. 核心功能

### 1.1 多代理对话系统
- 支持多个 AI 代理之间的实时对话
- 自主对话控制和管理
- 灵活的代理角色配置

### 1.2 讨论管理
- 多讨论话题支持
- 讨论状态控制(活跃/暂停)
- 消息历史记录管理
- 自动标题生成

### 1.3 实时聊天
- 即时消息发送和接收
- 打字状态指示
- 消息历史记录
- Markdown 格式支持

### 1.4 代理管理
- 代理创建和编辑
- 个性化设置(头像、名称等)
- 代理行为展示和控制
- 角色权限管理

## 2. 界面模块

### 2.1 讨论列表(DiscussionList)
- 所有讨论的概览显示
- 新讨论创建入口
- 讨论状态标识
- 快速切换功能

### 2.2 聊天区域(ChatArea)
- 消息展示区
  - 支持多种消息类型
  - Markdown 渲染
  - 代码高亮
- 消息输入框
  - 文本输入
  - 快捷操作
- 成员选择器
  - 快速切换发言代理
  - 代理状态显示

### 2.3 代理管理界面
- 代理配置面板
- 行为模式设置
- 个性化定制选项
- 状态监控

### 2.4 成员管理(MemberList)
- 当前讨论参与者列表
- 成员状态显示
- 权限管理
- 移动端适配的抽屉式显示

## 3. 界面特性

### 3.1 响应式设计
- 桌面端完整布局
- 移动端优化界面
- 自适应内容排版
- 可折叠侧边栏

### 3.2 主题支持
- 深色/浅色模式切换
- 自定义主题配置
- 统一的视觉风格
- 无缝切换体验

### 3.3 布局组件
- 活动栏(ActivityBar)
- 移动端导航栏
  - 底部快捷操作
  - 顶部状态显示
- 响应式容器适配

## 4. 交互功能

### 4.1 讨论控制
- 讨论状态切换
  - 暂停/继续对话
  - 清空消息记录
- 自动化设置
  - 自动滚动
  - 自动标题生成
- 上下文管理

### 4.2 消息管理
- 文本消息发送
- 代理自动回复
- 历史记录查看
- 实时状态更新
- 打字指示器

### 4.3 设置系统
- 基础设置
  - 界面偏好
  - 通知设置
- 高级设置
  - 代理配置
  - 系统参数
- 讨论设置
  - 自动化规则
  - 参与者管理

## 5. 技术特点

### 5.1 状态管理
- 基于 RxJS 的响应式状态管理
- UI 状态持久化
- 实时数据同步

### 5.2 组件化设计
- 模块化架构
- 可复用组件
- 统一的设计规范

### 5.3 性能优化
- 按需加载
- 状态缓存
- 渲染优化

## 6. 用户体验

### 6.1 视觉设计
- 现代化界面风格
- 清晰的视觉层次
- 流畅的动画效果

### 6.2 交互设计
- 直观的操作方式
- 快捷键支持
- 友好的反馈机制

### 6.3 适配支持
- 多设备兼容
- 响应式布局
- 触控优化

### 6.4 错误处理
- 友好的错误提示
- 异常状态恢复
- 操作撤销支持

## 7. 未来规划

- API 接口扩展
- 插件系统支持
- 更多 AI 模型集成
- 高级分析功能
- 协作功能增强

---

本文档最后更新时间:2025-02-26 

================================================
FILE: docs/i18n-coverage-report.md
================================================
# 国际化覆盖率报告

## 📊 当前状态

- **包含中文的文件数**: 462
- **使用 i18n 的文件数**: 219
- **国际化覆盖率**: 47%
- **总中文行数**: 4508
- **未国际化文件**: 135

## ⚠️ 问题分析

### 1. Popover 位置问题 ✅ 已修复
- 语言切换的 popover 现在显示在右侧(`side="right"`)

### 2. 国际化覆盖率低的原因

大部分未国际化的文件集中在:

1. **Agent 配置文件** (约 1400+ 行中文)
   - `core/config/agents/index.ts` - 428 行
   - `core/config/agents/top-agents/*` - 805 行
   - `core/config/agents/practical-agents/*` - 129 行
   - `core/config/agents/moderators/*` - 78 行
   - **说明**: 这些主要是 Agent 的 prompt 和配置,可能不需要国际化(因为它们是 AI 的工作语言)

2. **用户界面组件** (需要优先处理)
   - `common/features/chat/components/chat-area.tsx` - "正在创建讨论…"
   - `common/features/home/components/initial-experience.tsx` - 首页欢迎界面
   - `common/features/discussion/components/*` - 讨论相关组件
   - `common/features/agents/components/*` - Agent 管理界面
   - `common/features/world-class-chat/*` - 聊天界面

## 🎯 优先处理建议

### 高优先级(用户可见的界面)

1. **聊天和讨论界面**
   - `chat-area.tsx` - "正在创建讨论…"
   - `discussion-list.tsx` - 讨论列表
   - `message-input-*.tsx` - 消息输入框

2. **首页和引导**
   - `initial-experience.tsx` - 首页欢迎界面
   - `initial-input.tsx` - 初始输入

3. **Agent 管理界面**
   - `agent-list.tsx` - Agent 列表
   - `add-agent-dialog.tsx` - 添加 Agent 对话框
   - `edit-agent-dialog.tsx` - 编辑 Agent 对话框

4. **设置和配置**
   - 已完成 ✅

### 低优先级(配置和 Prompt)

- Agent 配置文件中的 prompt(这些是 AI 的工作语言,可能不需要国际化)
- 工具描述和错误消息

## 📝 如何确保完整国际化

### 方法 1: 使用 i18n Ally 扩展(推荐)

1. 安装 VS Code 扩展 "i18n Ally"
2. 打开文件时,硬编码的中文会显示警告
3. 点击可以快速添加翻译键

### 方法 2: 运行覆盖率检查脚本

```bash
node scripts/check-i18n-coverage.cjs
```

### 方法 3: 手动检查

```bash
# 查找包含中文的文件
grep -r "[\u4e00-\u9fa5]" src --include="*.tsx" --include="*.ts" | grep -v node_modules | grep -v ".json"
```

## 🔧 修复 Popover 位置

已修复:语言切换的 popover 现在显示在右侧

```tsx
<DropdownMenuContent align="start" side="right" className="min-w-[120px]">
```

## 📈 下一步行动

1. ✅ 修复 popover 位置
2. ⏳ 优先国际化用户界面组件
3. ⏳ 使用 i18n Ally 扩展逐步完善
4. ⏳ 定期运行覆盖率检查



================================================
FILE: docs/i18n-tools-guide.md
================================================
# 国际化工具使用指南

## ✅ 已配置的工具

### 1. i18n Ally (VS Code 扩展)

**安装方式:**
1. 在 VS Code 扩展市场搜索 "i18n Ally"
2. 点击安装
3. 或使用命令行:`code --install-extension Lokalise.i18n-ally`

**功能:**
- ✅ 在编辑器中实时显示翻译预览
- ✅ 检测缺失的翻译键
- ✅ 显示未使用的翻译键
- ✅ 快速跳转到翻译文件
- ✅ 内联显示翻译内容

**使用方法:**
1. 打开任意 `.tsx` 或 `.ts` 文件
2. 当使用 `t("xxx")` 时,会在代码上方显示翻译预览
3. 点击翻译键可以快速跳转到翻译文件
4. 缺失的翻译会显示警告

**配置位置:**
- `.vscode/settings.json` - VS Code 工作区配置
- `.i18n-ally.yml` - i18n Ally 专用配置

### 2. i18next-scanner (命令行工具)

**已安装:** ✅ `i18next-scanner` 已添加到 devDependencies

**功能:**
- ✅ 扫描代码中已使用的 `t()` 函数
- ✅ 检测翻译键是否存在
- ✅ 更新翻译文件

**使用方法:**

```bash
# 扫描代码并更新翻译文件
pnpm i18n:scan
```

**扫描规则:**
- 扫描 `src/**/*.{js,jsx,ts,tsx}` 文件
- 自动识别 `t()`, `i18next.t()`, `i18n.t()` 函数调用
- 更新 `src/core/locales/zh-CN.json` 和 `src/core/locales/en-US.json`

**配置文件:**
- `i18next-scanner.config.cjs` - 扫描器配置

## 📝 实际使用示例

### 示例:国际化一个组件

**之前(硬编码):**
```tsx
const AGENT_DEF: AgentDef = {
  name: "Atlas 超级智能体",
  prompt: "你是世界级的超级智能助手",
};
```

**之后(国际化):**
```tsx
import { useTranslation } from "@/core/hooks/use-i18n";

export function MyComponent() {
  const { t } = useTranslation();
  
  const AGENT_DEF: AgentDef = useMemo(() => ({
    name: t("allInOneAgent.name"),
    prompt: t("allInOneAgent.prompt"),
  }), [t]);
}
```

**添加翻译:**
在 `src/core/locales/zh-CN.json` 和 `src/core/locales/en-US.json` 中添加:

```json
{
  "allInOneAgent": {
    "name": "Atlas 超级智能体",
    "prompt": "你是世界级的超级智能助手"
  }
}
```

```json
{
  "allInOneAgent": {
    "name": "Atlas Super Agent",
    "prompt": "You are a world-class super intelligent assistant"
  }
}
```

## 🔄 工作流程

### 日常开发流程

1. **编写代码时:**
   - 使用 `t("key")` 替代硬编码文本
   - i18n Ally 会实时显示翻译预览
   - 如果翻译缺失,i18n Ally 会提示

2. **添加新翻译:**
   - 在 `src/core/locales/zh-CN.json` 中添加中文翻译
   - 在 `src/core/locales/en-US.json` 中添加英文翻译
   - i18n Ally 会自动检测并显示

3. **检查翻译完整性:**
   - 运行 `pnpm i18n:scan` 扫描代码
   - 检查是否有缺失的翻译键
   - i18n Ally 会在编辑器中显示未使用的翻译键

### 批量迁移现有代码

1. **识别硬编码文本:**
   - 手动查找代码中的中文文本
   - 或使用搜索功能查找包含中文的文件

2. **替换为国际化:**
   - 将硬编码文本替换为 `t("key")`
   - 添加对应的翻译键到翻译文件

3. **验证:**
   - 运行 `pnpm i18n:scan` 确保所有键都被识别
   - 运行 `pnpm build` 确保没有编译错误
   - 在浏览器中切换语言测试

## ⚠️ 注意事项

1. **i18next-scanner 的限制:**
   - 只扫描已使用 `t()` 函数的代码
   - 不会自动提取硬编码文本(需要手动替换)
   - TypeScript 解析可能有警告,但不影响功能
   - 扫描器会修改翻译文件,建议先提交代码再运行

2. **翻译键命名规范:**
   - 使用嵌套结构:`category.subcategory.key`
   - 保持语义清晰:`settings.title` 而不是 `s1`
   - 保持一致性:相同含义的文本使用相同的键

3. **性能考虑:**
   - 使用 `useMemo` 缓存包含 `t()` 的对象
   - 避免在渲染函数中频繁调用 `t()`

4. **翻译质量:**
   - 扫描后需要手动检查生成的翻译键是否合理
   - 英文翻译需要人工审核,不要完全依赖自动翻译

## 🎯 快速开始

1. ✅ 安装 i18n Ally 扩展:`code --install-extension Lokalise.i18n-ally`
2. ✅ 运行 `pnpm i18n:scan` 检查现有翻译
3. ✅ 逐步将硬编码文本替换为国际化
4. ✅ 在设置中切换语言测试效果

## 📚 相关文件

- 翻译文件:`src/core/locales/zh-CN.json`, `src/core/locales/en-US.json`
- i18n 配置:`src/core/config/i18n.ts`
- Hook:`src/core/hooks/use-i18n.ts`
- 扫描配置:`i18next-scanner.config.cjs`
- VS Code 配置:`.vscode/settings.json`, `.i18n-ally.yml`


================================================
FILE: docs/logs/README.md
================================================
# Logs

- `docs/logs/v0.0.1-mvp/README.md`
- `docs/logs/v0.1.0-headless/README.md`
- `docs/logs/v0.1.2-auth-email/iteration-notes.md`
- `docs/logs/v0.1.3-auth-optional/iteration-notes.md`
- `docs/logs/v0.1.4-auth-entry/iteration-notes.md`
- `docs/logs/v0.1.5-poop-impact/iteration-notes.md`
- `docs/logs/v0.1.6-stream-dedupe/iteration-notes.md`
- `docs/logs/v0.1.7-streaming-delta-normalization/iteration-notes.md`
- `docs/logs/v0.1.8-streaming-mode-normalization/iteration-notes.md`
- `docs/logs/v0.1.9-poop-impact-drama/iteration-notes.md`
- `docs/logs/v0.1.10-stream-normalizer-robust/iteration-notes.md`
- `docs/logs/v0.1.11-mention-self-guard/iteration-notes.md`
- `docs/logs/v0.1.12-message-merge-safety/iteration-notes.md`
- `docs/logs/v0.1.13-v2ex-post/iteration-notes.md`
- `docs/logs/v0.1.14-sidebar-github/iteration-notes.md`
- `docs/logs/v0.1.15-activitybar-github/iteration-notes.md`
- `docs/logs/v0.1.16-readme-screenshots/iteration-notes.md`
- `docs/logs/v0.1.17-dashscope-models/iteration-notes.md`

## 写日志的标准

每次改动完成后新增一篇日志文件,至少包含:

- 做了什么(用户可见 + 关键实现点)
- 怎么验证(轻量 smoke-check + `build/lint/typecheck`)
- 怎么发布/部署(如果会影响 npm 包/线上环境;详细流程引用 `docs/workflows/npm-release-process.md`)

模板:`docs/logs/TEMPLATE.md`

## 规划规则

- 规划文档禁止写具体花费时间/工期(例如“3 天”“1 周”);只写里程碑顺序、交付物与验收标准。
- 规划类文档建议以 `.plan.md` 结尾(例如 `YYYY-MM-DD-xxx.plan.md`),便于区分“规划”与“实现/复盘”


================================================
FILE: docs/logs/TEMPLATE.md
================================================
# YYYY-MM-DD <Title>

## 背景 / 问题

- 为什么要做(用户痛点/动机/现状问题)

## 规则(可选)

- 规划类文档不要写具体工期,只写里程碑顺序与验收标准
- 规划类文档文件名建议以 `.plan.md` 结尾,便于区分“规划”与“实现日志”

## 决策

- 做什么、不做什么(关键取舍)

## 变更内容

- 用户可见变化(CLI 行为/输出/默认值等)
- 关键实现点(指向 core/cli 的关键模块即可)

## 验证(怎么确认符合预期)

保持轻量:3~6 条命令 + 明确的“验收点”。

```bash
# build / lint / typecheck
pnpm build
pnpm lint
pnpm typecheck

# smoke-check(按需补充)
pnpm -s cli --help
```

验收点:

- 写清楚“看到什么输出/行为才算对”

## 发布 / 部署

如果这次变更会影响 npm 包或线上环境,需要写清楚如何发布。

```bash
# 1) 写 changeset(选择受影响的 packages)
pnpm changeset

# 2) 本地验证
pnpm release:check
pnpm release:dry

# 3) 版本号 & changelog
pnpm release:version

# 4) 发布到 npm(需要 NPM_TOKEN 或已登录)
pnpm release
```

备注:

- 需要更详细的发布说明时,引用 `docs/workflows/npm-release-process.md`,不要在每篇日志里重复一遍。

## 影响范围 / 风险

- Breaking change?(是/否)
- 回滚方式(如果需要)


================================================
FILE: docs/logs/v0.0.1-init/iteration-notes.md
================================================
# v0.0.1-init 迭代记录

## 改了什么

- 无功能变化
- 新增治理战略文档:`.agent/workflows/governance-strategy.md`
- 新增并维护 `AGENTS.md` 索引(含迭代制度说明)
- 新增特征结构度量脚本:`scripts/metrics/feature-structure.cjs`
- 增加运行命令:`package.json` 的 `metrics:features`
- 改进特征结构输出为更紧凑的纯文本表格
- 新增代码行数 Top N 工具:`scripts/metrics/top-loc.cjs` 与命令 `metrics:loc`
- 特征结构报告增加 Tree 视图(common / desktop / mobile 分支)
- 删除冗余功能模块:`src/common/features/mcp`、`src/common/features/examples`、`src/common/features/github`、`src/desktop/features/mcp`
- 删除冗余功能模块:`src/desktop/features/portal-demo`
- 简化设置模块:固定 schema(`settings-schema.ts`),去掉动态注册/删除,设置读写收口到本地存储并直接驱动 AI 配置与语言切换
- 默认设置读取 `.env` 中的 AI 提供商配置(包括 API Key),避免空 Key 导致 401

## 测试/验证/验收

- `pnpm metrics:features` 能输出结构化报告
- `pnpm metrics:loc` 能输出代码行数 Top N
- 人工检查文档路径与索引可读性

## 发布/部署

- 无需发布/部署


================================================
FILE: docs/logs/v0.1.0-backend-ready/analysis.md
================================================
# v0.1.0-backend-ready 现状盘点(后端/存储可替换性)

## 目标
- 梳理当前“外部世界”接入点(LLM、存储、扩展)与数据流,明确需要抽象的端口。
- 识别阻碍后端落地/可替换的耦合点,作为后续重构的清单。

## 外部接口/存储现状(按能力)
- **LLM 调用**
  - `src/common/lib/ai-service`:OpenAI SDK 直连 + 自建代理模式(EventSource SSE),使用 `OpenAI` 客户端;直接暴露给 UI/业务。
  - `src/common/lib/runnable-agent`:另一套基于 OpenAI 的 agent/工具调用实现,流式处理与工具调用,与 ai-service 重叠。
  - 配置来源:`.env`(通过 `AI_PROVIDER_CONFIG`)+ 设置页(已收口 schema)。
- **设置存储**
  - `src/core/services/settings.service.ts`:localStorage/内存存储,固定 schema(`settings-schema.ts`),无后端适配器。
  - 读取后直接配置 `aiService` 和 `i18n`,UI 通过 hook 直接调用。
- **讨论/消息/成员数据**
  - `src/core/services/discussion.service.ts`
  - `src/core/services/message.service.ts`
  - `src/core/services/discussion-member.service.ts`
  - 以上均用 `MockHttpProvider`(本地存储模拟,延迟可配),无真实后端接口。
- **Agent 定义**
  - `src/core/services/agent.service.ts`:同样使用 `MockHttpProvider`。
- **文件/存储抽象**
  - `src/common/lib/storage` 下的存储适配(含 Mock、IndexedDB、HTTP),但主流程仍以 Mock 为主;IndexedDB/HTTP 未统一入口。
- **扩展机制**
  - `common/desktop/mobile features/*/extensions` + `plugin-router`:前端动态扩展点;无后端接口,但增加了装配复杂度。

## 耦合与风险
- LLM/工具调用双轨:`ai-service` 与 `runnable-agent` 并存,接口形态与错误模型不同,后端接入难以统一。
- Mock 存储与 UI 高耦合:服务层直接返回模拟数据模型,缺少 DTO ↔ Domain 映射;后端落地时改动面大。
- 设置读写直连 localStorage:缺少“设置存储”端口定义,无法无痛切换后端/安全存储。
- 扩展装配无清晰合同:extensions 直接暴露组件/配置,后端驱动或动态配置时缺少 schema/协议。

## 建议的抽象端口(下一步设计用)
- **LLM/Tool Port**:统一 Chat/Stream/Tool 调用接口;适配器分为 Browser(OpenAI SDK)/Proxy(后端);收敛到单一路径。
- **Settings Store Port**:CRUD + reset + watch;内置 Local adapter,预留 HTTP/secure storage adapter。
- **Discussion/Message/Member Store Port**:CRUD + list by discussion;抽象 DTO ↔ Domain 映射;适配 Mock/HTTP。
- **Agent Catalog Port**:列出/更新 agent 定义;适配 Mock/HTTP。
- **File/Blob Port**(若需):上传/下载/列目录;适配 Local/HTTP。
- **Extension Descriptor Schema**:描述扩展的路由/入口组件/权限,便于未来由后端下发或配置化。

## 下一步建议
- 先画接口草图:为上述端口写 TS 接口 + 错误模型 + 事件(watch/subscribe)。
- 选“LLM + Settings + Discussion/Message”作为第一批收敛:实现 LocalAdapter + HttpAdapter(仅接口 stub),让 UI 只依赖端口。
- 移除/封存 `runnable-agent` 或 `ai-service` 的重复路径,先收敛一套。
- 为设置与消息路径补最小冒烟测试脚本,验证切换 adapter 后行为一致。

## 接口草案(v2 - 优化版)

> 命名规范:数据存取层用 `Repository`,外部调用层用 `Client`。

### 共享类型

```ts
/** Unix 毫秒时间戳 */
type Timestamp = number;

/** 统一错误基类 */
class RepositoryError extends Error {
  constructor(
    message: string,
    public code: 'NOT_FOUND' | 'CONFLICT' | 'VALIDATION' | 'NETWORK' | 'UNKNOWN',
    public cause?: unknown
  ) {
    super(message);
  }
}

class ClientError extends Error {
  constructor(
    message: string,
    public code: 'AUTH' | 'RATE_LIMIT' | 'INVALID_REQUEST' | 'NETWORK' | 'UNKNOWN',
    public status?: number,
    public cause?: unknown
  ) {
    super(message);
  }
}
```

---

### ChatClient(原 LlmPort)

```ts
/** 聊天消息 */
interface ChatMessage {
  role: 'system' | 'user' | 'assistant' | 'tool';
  content: string;
  /** 当 role 为 tool 时,关联的 tool call id */
  toolCallId?: string;
}

/** 工具定义(传给 API 的 schema) */
interface ToolDefinition {
  name: string;
  description: string;
  parameters: JsonSchema;
}

/** 工具调用结果(API 返回) */
interface ToolCall {
  id: string;
  name: string;
  arguments: Record<string, unknown>;
}

/** 聊天请求选项 */
interface ChatOptions {
  messages: ChatMessage[];
  model: string;
  temperature?: number;
  maxTokens?: number;
  tools?: ToolDefinition[];
}

/** 聊天响应 */
interface ChatResponse {
  content: string;
  toolCalls?: ToolCall[];
  usage?: { promptTokens: number; completionTokens: number };
}

/** 流式事件 */
type StreamEvent =
  | { type: 'delta'; content: string }
  | { type: 'tool_call'; call: ToolCall }
  | { type: 'done'; usage?: ChatResponse['usage'] }
  | { type: 'error'; error: ClientError };

/** AI 对话客户端接口 */
interface ChatClient {
  chat(options: ChatOptions): Promise<ChatResponse>;
  stream(options: ChatOptions, signal?: AbortSignal): AsyncIterable<StreamEvent>;
}

// Adapters: BrowserAdapter(OpenAI SDK), ProxyAdapter(后端代理), MockAdapter
```

---

### SettingsRepository(原 SettingsStorePort)

```ts
interface SettingItem<T = unknown> {
  key: string;
  value: T;
  category: string;
  label: string;
  description?: string;
}

interface SettingsRepository {
  list(): Promise<SettingItem[]>;
  get<T>(key: string): Promise<T | undefined>;
  update(key: string, value: unknown): Promise<void>;
  reset(): Promise<SettingItem[]>;
  watch(cb: (settings: SettingItem[]) => void): () => void;
}

// Adapters: LocalStorageAdapter, HttpAdapter(预留), SecureStorageAdapter(可选)
```

---

### DiscussionRepository / MessageRepository

```ts
type DiscussionId = string;
type MessageId = string;

interface Discussion {
  id: DiscussionId;
  title: string;
  status: 'active' | 'paused' | 'archived';
  createdAt: Timestamp;
  updatedAt: Timestamp;
}

interface Message {
  id: MessageId;
  discussionId: DiscussionId;
  senderId: string;
  role: 'user' | 'assistant';
  content: string;
  createdAt: Timestamp;
}

interface DiscussionRepository {
  list(): Promise<Discussion[]>;
  get(id: DiscussionId): Promise<Discussion | undefined>;
  create(data: Omit<Discussion, 'id' | 'createdAt' | 'updatedAt'>): Promise<Discussion>;
  update(id: DiscussionId, patch: Partial<Discussion>): Promise<Discussion>;
  delete(id: DiscussionId): Promise<void>;
}

interface MessageRepository {
  list(discussionId: DiscussionId): Promise<Message[]>;
  append(message: Omit<Message, 'id' | 'createdAt'>): Promise<Message>;
  clear(discussionId: DiscussionId): Promise<void>;
}

// Adapters: MockAdapter, HttpAdapter, IndexedDBAdapter(可选)
```

---

### AgentRepository(原 AgentCatalogPort)

```ts
interface Agent {
  id: string;
  name: string;
  description?: string;
  systemPrompt?: string;
  avatar?: string;
  createdAt: Timestamp;
  updatedAt: Timestamp;
}

interface AgentRepository {
  list(): Promise<Agent[]>;
  get(id: string): Promise<Agent | undefined>;
  upsert(agent: Omit<Agent, 'createdAt' | 'updatedAt'>): Promise<Agent>;
  delete(id: string): Promise<void>;
}

// Adapters: MockAdapter, HttpAdapter
```

---

### ExtensionDescriptor(保持建议状态)

```ts
interface ExtensionDescriptor {
  id: string;
  type: 'page' | 'panel' | 'tool';
  entry: string;
  route?: string;
  icon?: string;
  title?: string;
  permissions?: string[];
  version?: string;
}
```

---

## 迁移策略

### Phase 1: 接口定义(本迭代)
- 在 `src/core/repositories/` 下创建接口文件
- 不修改现有实现,只定义契约

### Phase 2: Adapter 实现
- 为现有 Mock 实现包装 Adapter
- 保持向后兼容,Service 层同时支持新旧接口

### Phase 3: 切换依赖
- UI/业务代码改为依赖新接口
- 移除旧的直接调用

### Phase 4: 清理
- 删除旧代码(`runnable-agent`、`MockHttpProvider` 直接使用)
- 移除兼容层

---

## 验证清单

| 场景 | 验证步骤 | 预期结果 |
|------|---------|---------|
| Settings 读写 | 修改 theme → 刷新 → 检查 | theme 保持 |
| Settings 适配器切换 | Mock → LocalStorage | 行为一致 |
| 消息发送 | 发送消息 → 查看历史 | 消息正确显示 |
| 流式对话 | 发送 → 点击停止 | 立即中断,无报错 |
| 流式错误 | 断网 → 发送 | 收到 error 事件 |

---

## 建议实施顺序

1. **接口定义**:在 `src/core/repositories/` 创建上述接口(本迭代)
2. **ChatClient 收敛**:保留 `ai-service`,包装为 `ChatClient` Adapter
3. **Settings 收口**:现有实现包装为 `SettingsRepository`
4. **Discussion/Message 收口**:包装现有 Mock 为 Adapter
5. **验证**:按上述清单逐项验证


================================================
FILE: docs/logs/v0.1.0-backend-ready/iteration-notes.md
================================================
# v0.1.0-backend-ready 迭代记录

## 改了什么

- 收口存储入口:新增 StorageHub,在 `src/core/services/data-providers.ts` 统一创建 data providers 与 settings store
- Settings 存储改为依赖 settings store,便于后续后端适配
- 维持 Mock 作为默认后端,HTTP adapter 仍为 stub
- 移除 `core/resources` 层:新增各域 store(agents/discussions/messages/members/settings),改由 manager 读写 store
- hooks/组件改为读取 store,讨论能力与设置应用逻辑迁到服务/manager,避免资源层依赖

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm tsc --noEmit`
- `pnpm build`(CSS minify warning 与包体积提示)

## 发布/部署

- 本迭代无需发布/部署(架构收口与准备)


================================================
FILE: docs/logs/v0.1.1-notes-sidebar/iteration-notes.md
================================================
# v0.1.1-notes-sidebar 迭代记录

## 改了什么

- 右侧边栏支持多模块切换,新增“成员/笔记”Tabs
- 新增共享笔记能力:讨论级 note 字段、更新能力与系统提示词注入,所有 Agent 可见
- 移动端侧边抽屉支持“成员/笔记”切换入口
- 优化移动端抽屉切换区样式,提升紧凑度与对齐
- 活动栏群聊入口图标改为更符合群聊语义的样式
- 工具调用改为按流式事件顺序插入展示,支持文本-工具-文本交错
- 工具状态展示改为图标
- 修复并行工具调用在分段展示时重复渲染的问题
- 群聊 AI 回复支持 Markdown 渲染
- DashScope 默认模型更新为 qwen3-max
- Provider 配置支持多模型数组
- 修复工具结果渲染的重复 key 与空值报错
- 工具调用结束后同步分段 ID,避免并行调用卡在 pending
- 工具结果写回同一 tool_invocation 分段,按分段顺序渲染,去掉 tool_result 兼容链路
- 工具轮次上限调整为 100,避免连续创建时提前中断
- 删除未使用的 ChatClient 抽象与 message.toolCalls 字段,减少冗余
- 群聊中等宽度下右侧成员/笔记面板改为抽屉式展示,动效与左侧列表一致
- 新增 Cloudflare Pages 部署脚本 `pnpm deploy:pages`(强制使用 `main` 分支部署到生产域名)
- 初始化 Project OS:补齐 AGENTS.md 总则/负面清单/规则

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm tsc`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):`node -e "const https=require('https');https.get('https://agentverse.pages.dev',res=>{console.log(res.statusCode);console.log(res.headers['content-type']||'');res.resume();}).on('error',err=>{console.error(err.message);process.exit(1);});"`(返回 200)

## 发布/部署

- Cloudflare Pages 部署:`pnpm deploy:pages`
- 访问地址:`https://agentverse.pages.dev`(生产域名),`https://dcbcabe4.agentverse.pages.dev`(本次部署)


================================================
FILE: docs/logs/v0.1.10-stream-normalizer-robust/iteration-notes.md
================================================
# v0.1.10-stream-normalizer-robust 迭代记录

## 改了什么

- 流式增量归一化支持“模式切换 + 重叠片段”处理,避免中途语义变化造成无限重复
- 统一在 adapter 层处理增量输出,让上层消息渲染保持纯追加语义

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4178 --directory /Users/peiwang/Projects/AgentVerse/dist & sleep 1; curl -I http://127.0.0.1:4178/ | head -n 1; kill $!`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.11-mention-self-guard/iteration-notes.md
================================================
# v0.1.11-mention-self-guard 迭代记录

## 改了什么

- @mention 选择逻辑增加“排除自身”规则,避免 AI 在回复中引用自己的 @ 导致自我触发循环
- 提升 mention 解析的稳定性:自提及不会再被当作下一发言人

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4179 --directory /Users/peiwang/Projects/AgentVerse/dist & sleep 1; curl -I http://127.0.0.1:4179/ | head -n 1; kill $!`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.12-message-merge-safety/iteration-notes.md
================================================
# v0.1.12-message-merge-safety 迭代记录

## 改了什么

- 修复消息合并时对 segments 的原地修改,避免渲染层重复叠加文本
- 合并逻辑改为深拷贝 segments,防止重复渲染造成“无限追加”错觉

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4180 --directory /Users/peiwang/Projects/AgentVerse/dist & sleep 1; curl -I http://127.0.0.1:4180/ | head -n 1; kill $!`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.13-v2ex-post/iteration-notes.md
================================================
# v0.1.13-v2ex-post 迭代记录

## 改了什么

- 新增 V2EX 发帖草稿,便于对外宣传与收集反馈
- 补充“不同思维方式碰撞”的项目亮点描述
- 补充内置角色与组合示例,突出多样化群聊场景
- 补充项目定位、使用场景与亮点描述,强化完整性
- 补充项目启动时间的说明与 “Agent 配 Agent” 能力描述
- 调整帖文的 Markdown 结构与层次,便于在 V2EX 阅读

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm run build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4188 --directory /Users/peiwang/Projects/AgentVerse/dist > /tmp/agentverse-smoke-4188.log 2>&1 & server_pid=$!; sleep 1; curl -I http://127.0.0.1:4188/ | head -n 1; kill $server_pid`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.13-v2ex-post/v2ex-post.md
================================================
大家好,分享我的一个多智能体群聊与自治对话的开源项目:AgentVerse。项目始于 1年前,之后断断续续有一些完善。去年[发过一次](https://www.v2ex.com/t/1109676#reply35),有的朋友或许记得。

项目定位:让一群“有不同思维方式/立场/角色”的智能体,在同一会话中对话、协作、碰撞,形成更真实的讨论张力与结论沉淀。如果没用,也要有趣。

github: https://github.com/Peiiii/AgentVerse

在线体验:https://agent.dimstack.com/

## 核心亮点:

- 多智能体群聊:同一会话里多角色参与,自动接话与接力
- 讨论控制:可暂停/继续、控制轮次、主持人/参与者角色分工
- 思维方式碰撞:观点冲突与互补并存,不是单模型的一致输出
- Agent笔记:支持Agent记录笔记来跟踪讨论过程,或者约定议程
- 互动细节:@mention 触发、互动特效(扔💩/扔🗑️)等
- Agent 配置 Agent:用智能体来配置/生成其他 Agent 的设定与提示词

## 内置角色与组合(部分):

- 角色库:故事架构师、跨界思考者、逻辑分析师、系统思考者、用户代言人、情感设计师、市场洞察师等
- 组合示例:思维探索团队、MBTI 人格大杂烩、叙事探索团队、认知融合团队、情绪决策团队、结构化思考团队、实践执行团队、产品开发组、杠精小队等
- 使用方式:主持人负责节奏与聚焦,参与者代表不同视角,天然制造认知碰撞



## 适用场景举例

- 产品/创业:从市场机会到用户视角,再到执行落地的多维评审
- 叙事/内容创作:结构、情感、文化视角的并行推演
- 决策讨论:理性/情绪/系统视角的冲突与融合
- 头脑风暴:高发散 + 强收敛的同场协作


# 示例截图
![带笔记对话](https://cdn-us.imgs.moe/2026/01/28/2a888138d01582244cf341a0750b92ba.png)
![Agent创建Agent](https://cdn-us.imgs.moe/2026/01/28/ad652cb6c8da449b6b23248edc4cdd60.png)
![选择团队](https://cdn-us.imgs.moe/2026/01/28/8b400392c85e4d0292c1094f722d7f45.png)

还有更多特性,就不截图了。


目前阶段:持续迭代中(例如 marketplace, 使用更好的模型(目前的模型还是qwen)等)。

如果你对多智能体对话、协作式 AI 产品或交互式聊天体验感兴趣,欢迎交流建议。也欢迎拍砖。


================================================
FILE: docs/logs/v0.1.14-sidebar-github/iteration-notes.md
================================================
# v0.1.14-sidebar-github 迭代记录

## 改了什么

- 侧边栏新增 GitHub 入口,方便快速跳转项目仓库

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4185 --directory /Users/peiwang/Projects/AgentVerse/dist & sleep 1; curl -I http://127.0.0.1:4185/ | head -n 1; kill $!`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.15-activitybar-github/iteration-notes.md
================================================
# v0.1.15-activitybar-github 迭代记录

## 改了什么

- 左侧活动栏新增 GitHub 入口,方便快速跳转项目仓库

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4186 --directory /Users/peiwang/Projects/AgentVerse/dist & sleep 1; curl -I http://127.0.0.1:4186/ | head -n 1; kill $!`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.16-readme-screenshots/iteration-notes.md
================================================
# v0.1.16-readme-screenshots 迭代记录

## 改了什么

- 在 README 增补多张产品截图(非 demo1/demo2),丰富展示内容

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm run build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4191 --directory /Users/peiwang/Projects/AgentVerse/dist > /tmp/agentverse-smoke-4191.log 2>&1 & server_pid=$!; sleep 1; curl -I http://127.0.0.1:4191/ | head -n 1; kill $server_pid`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.17-dashscope-models/iteration-notes.md
================================================
# v0.1.17-dashscope-models 迭代记录

## 改了什么

- DashScope 模型列表新增 `qwen3-max-thinking` 与 `glm-4.7`

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm run build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4193 --directory /Users/peiwang/Projects/AgentVerse/dist > /tmp/agentverse-smoke-4193.log 2>&1 & server_pid=$!; sleep 1; curl -I http://127.0.0.1:4193/ | head -n 1; kill $server_pid`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.2-auth-email/iteration-notes.md
================================================
# v0.1.2-auth-email 迭代记录

## 改了什么

- 新增邮箱注册/登录/验证/重置密码完整闭环
- 前端增加登录、验证、忘记密码、重置密码页面
- 全局 AuthGate:未登录时强制跳转登录页
- 新增 Cloudflare Pages Functions + D1 存储会话与令牌
- 接入 Resend 发送验证与重置邮件
- 邮件链接域名支持多域名白名单

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm tsc`
- `pnpm build`(CSS minify warning 与包体积提示)
- `pnpm deploy:pages`(包含 Functions 构建)
- 冒烟测试(非仓库目录):`node -e "const https=require('https');https.get('https://agentverse.pages.dev',res=>{console.log(res.statusCode);console.log(res.headers['content-type']||'');res.resume();}).on('error',err=>{console.error(err.message);process.exit(1);});"`(返回 200)

## 发布/部署

- Cloudflare Pages:`pnpm deploy:pages`
- 访问地址:`https://agentverse.pages.dev`(生产域名),`https://344acf43.agentverse.pages.dev`(本次部署)
- D1:`agentverse-auth`(已创建并应用迁移)
- Resend:Pages Secret 已写入 `RESEND_API_KEY`(不落库)
- 发件域名:`bibo.bot`(需在 Resend 完成 DNS 验证)
- 邮件链接域名白名单:`https://agent.dimstack.com`、`https://bibo.bot`、`https://agentverse.pages.dev`


================================================
FILE: docs/logs/v0.1.3-auth-optional/iteration-notes.md
================================================
# v0.1.3-auth-optional 迭代记录

## 改了什么

- 登录改为可选:未登录也可直接使用核心功能
- AuthGate 不再拦截主流程,仅负责渲染认证相关页面

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm tsc`
- `pnpm build`
- `pnpm deploy:pages`
- 冒烟测试(非仓库目录):`node -e "const https=require('https');https.get('https://agentverse.pages.dev',res=>{console.log(res.statusCode);console.log(res.headers['content-type']||'');res.resume();}).on('error',err=>{console.error(err.message);process.exit(1);});"`(返回 200)

## 发布/部署

- Cloudflare Pages:`pnpm deploy:pages`


================================================
FILE: docs/logs/v0.1.4-auth-entry/iteration-notes.md
================================================
# v0.1.4-auth-entry 迭代记录

## 改了什么

- 活动栏左下角新增“登录 / 注册”入口(未登录时展示)
- 点击入口跳转登录页并携带当前页面回跳参数
- 修复登录入口重复渲染与更新死循环问题

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm tsc`
- `pnpm build`(CSS minify warning 与包体积提示)
- `pnpm deploy:pages`(包含 Functions 构建)
- 冒烟测试(非仓库目录):`node -e "const https=require('https');https.get('https://agentverse.pages.dev',res=>{console.log(res.statusCode);console.log(res.headers['content-type']||'');res.resume();}).on('error',err=>{console.error(err.message);process.exit(1);});"`(返回 200)

## 发布/部署

- Cloudflare Pages:`pnpm deploy:pages`
- 访问地址:`https://agentverse.pages.dev`(生产域名),`https://9ed89d65.agentverse.pages.dev`(本次部署)


================================================
FILE: docs/logs/v0.1.5-poop-impact/iteration-notes.md
================================================
# v0.1.5-poop-impact 迭代记录

## 改了什么

- 群聊扔💩击中时增加冲击波、核心糊状体与更密集的喷溅粒子
- 命中瞬间表情放大旋转,强化戏剧性冲击感

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4173 --directory /Users/peiwang/Projects/AgentVerse/dist & sleep 1; curl -I http://127.0.0.1:4173/ | head -n 1; kill $!`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.6-stream-dedupe/iteration-notes.md
================================================
# v0.1.6-stream-dedupe 迭代记录

## 改了什么

- 流式回复接入“完整内容回传”兼容逻辑,避免重复片段被反复追加
- 连续重复的原始 delta 直接忽略,减少 UI 无意义刷屏

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4174 --directory /Users/peiwang/Projects/AgentVerse/dist & sleep 1; curl -I http://127.0.0.1:4174/ | head -n 1; kill $!`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.7-streaming-delta-normalization/iteration-notes.md
================================================
# v0.1.7-streaming-delta-normalization 迭代记录

## 改了什么

- 统一流式文本事件语义:兼容“返回完整内容”的流,转换为真实 delta 再交给上层追加
- 让聊天流式渲染只处理增量片段,根因层面杜绝重复内容被反复拼接

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4175 --directory /Users/peiwang/Projects/AgentVerse/dist & sleep 1; curl -I http://127.0.0.1:4175/ | head -n 1; kill $!`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.8-streaming-mode-normalization/iteration-notes.md
================================================
# v0.1.8-streaming-mode-normalization 迭代记录

## 改了什么

- 流式输出增加“模式识别”:自动区分全量流与增量流,避免误判导致内容被吞
- delta 规范化更保守,确保增量流不会被错误去重而出现空回复

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4176 --directory /Users/peiwang/Projects/AgentVerse/dist & sleep 1; curl -I http://127.0.0.1:4176/ | head -n 1; kill $!`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/logs/v0.1.9-poop-impact-drama/iteration-notes.md
================================================
# v0.1.9-poop-impact-drama 迭代记录

## 改了什么

- 扔💩命中效果加强:双层冲击波、中心糊状体、拖尾飞溅与更多粒子
- 增加命中闪光与粘稠“块状”扩散,整体更戏剧化

## 测试/验证/验收

- `pnpm lint`(存在既有 warnings,未阻塞)
- `pnpm exec tsc -b`
- `pnpm build`(CSS minify warning 与包体积提示)
- 冒烟测试(非仓库目录):
  - `python3 -m http.server 4177 --directory /Users/peiwang/Projects/AgentVerse/dist & sleep 1; curl -I http://127.0.0.1:4177/ | head -n 1; kill $!`
  - 观察点:HTTP 200

## 发布/部署

- 无(不涉及线上发布/部署)


================================================
FILE: docs/mcp-integration.md
================================================
# MCP (Model Context Protocol) 集成指南

## 概述

AgentVerse 现在支持 MCP (Model Context Protocol) 服务器连接,允许 AI 助手使用外部工具来完成任务。这个功能是可插拔的,不与具体 agent 绑定,可以在任何对话中使用。

## 功能特性

- **动态连接**: 支持运行时连接/断开 MCP 服务器
- **工具自动发现**: 自动获取 MCP 服务器的工具列表
- **类型安全**: 完整的 TypeScript 类型支持
- **错误处理**: 连接失败、工具执行错误等处理
- **可扩展**: 支持多种 MCP 服务器类型

## 快速开始

### 1. 启动 MCP 服务器

首先,你需要启动一个 MCP 服务器。例如,使用 [filesystem-mcp-server](https://github.com/atxtechbro/filesystem-mcp-server):

```bash
# 克隆并安装
git clone https://github.com/atxtechbro/filesystem-mcp-server
cd filesystem-mcp-server
npm install

# 启动服务器
npm start
```

### 2. 在 AgentVerse 中连接 MCP 服务器

1. 打开 AgentVerse 应用
2. 进入 MCP 演示页面
3. 在左侧连接管理面板中:
   - 输入服务器名称:`文件系统服务器`
   - 选择传输协议:`WebSocket`
   - 输入服务器地址:`ws://localhost:3000`
   - 点击"连接服务器"

### 3. 使用 MCP 工具

连接成功后,AI 助手将自动获得 MCP 服务器提供的工具。你可以:

- 在对话中直接描述需求,AI 会自动选择合适的工具
- 查看"可用工具"标签页,了解所有可用的工具
- 观察工具调用的实时执行过程

## 架构设计

### 核心组件

```
MCP连接层
├── MCPConnectionManager (连接管理)
├── MCPToolAdapter (工具适配)
└── MCPProvider (Provider包装)

工具集成层
├── useMCPTools (Hook)
├── MCPToolRenderer (渲染器)
└── MCPToolExecutor (执行器)

应用层
├── AgentChatContainer (集成到聊天)
└── 其他组件 (按需使用)
```

### 文件结构

```
src/common/
├── lib/mcp/
│   ├── mcp-connection-manager.ts    # MCP连接管理器
│   └── mcp-tool-adapter.ts          # 工具适配器
├── hooks/
│   └── use-mcp-tools.ts             # MCP工具Hook
└── components/mcp/
    ├── mcp-connection-manager.tsx   # 连接管理UI
    └── mcp-provider.tsx             # Provider组件

src/desktop/features/mcp/
└── pages/
    └── mcp-demo-page.tsx            # 演示页面
```

## 使用方法

### 基本使用

```tsx
import { MCPProvider } from "@/common/features/mcp/components/mcp-provider";
import { useMCPTools } from "@/common/hooks/use-mcp-tools";

function App() {
  return (
    <MCPProvider>
      <YourApp />
    </MCPProvider>
  );
}

function YourComponent() {
  const { connections, connectToServer, mcpToolDefinitions } = useMCPTools();
  
  // 连接MCP服务器
  const handleConnect = async () => {
    await connectToServer({
      name: "文件系统服务器",
      url: "ws://localhost:3000",
      transport: "websocket"
    });
  };
  
  return (
    <div>
      {/* 你的组件内容 */}
    </div>
  );
}
```

### 在聊天中使用

MCP 工具会自动集成到所有使用 `@agent-labs/agent-chat` 的聊天组件中。AI 助手会根据对话内容自动选择合适的工具。

### 自定义工具渲染

你可以自定义 MCP 工具的渲染方式:

```tsx
import { useMCPTools } from "@/common/hooks/use-mcp-tools";

function CustomMCPRenderer() {
  const { mcpToolRenderers } = useMCPTools();
  
  // 自定义渲染器会覆盖默认的渲染方式
  const customRenderers = mcpToolRenderers.map(renderer => ({
    ...renderer,
    render: (toolInvocation, onResult) => {
      // 自定义渲染逻辑
      return <YourCustomComponent />;
    }
  }));
  
  return <div>{/* 你的自定义渲染内容 */}</div>;
}
```

## 支持的 MCP 服务器

### 文件系统服务器

- **仓库**: [filesystem-mcp-server](https://github.com/atxtechbro/filesystem-mcp-server)
- **功能**: 文件读写、目录操作、文件搜索
- **连接地址**: `ws://localhost:3000`

### 其他服务器

你可以连接任何符合 MCP 协议的服务器,包括:

- 数据库服务器
- API 代理服务器
- 系统监控服务器
- 自定义业务服务器

## 配置选项

### MCP 服务器配置

```typescript
interface MCPServerConfig {
  name: string;           // 服务器名称
  url: string;            // 服务器地址
  transport?: "stdio" | "tcp" | "websocket";  // 传输协议
  credentials?: {         // 认证信息
    token?: string;
    username?: string;
    password?: string;
  };
}
```

### 连接管理

```typescript
// 连接服务器
const connectionId = await connectToServer(config);

// 断开连接
await disconnectFromServer(connectionId);

// 获取连接信息
const connection = getConnection(connectionId);
const tools = getTools(connectionId);
```

## 错误处理

### 常见错误

1. **连接失败**
   - 检查服务器地址是否正确
   - 确认服务器是否正在运行
   - 检查网络连接

2. **工具执行失败**
   - 检查工具参数是否正确
   - 确认服务器权限
   - 查看服务器日志

3. **类型错误**
   - 检查工具定义是否符合 MCP 规范
   - 确认参数类型匹配

### 调试技巧

1. 打开浏览器开发者工具
2. 查看控制台日志
3. 检查网络请求
4. 使用 MCP 演示页面进行测试

## 最佳实践

### 1. 服务器命名

使用描述性的服务器名称,例如:
- `文件系统服务器`
- `数据库服务器`
- `API代理服务器`

### 2. 工具描述

确保 MCP 服务器的工具描述清晰明确,这样 AI 才能正确理解和使用工具。

### 3. 错误处理

在 MCP 服务器中实现适当的错误处理,返回有意义的错误信息。

### 4. 安全性

- 使用适当的认证机制
- 限制工具的执行权限
- 监控工具的使用情况

## 扩展开发

### 创建自定义 MCP 服务器

1. 实现 MCP 协议
2. 定义工具接口
3. 处理工具调用
4. 返回执行结果

### 集成到 AgentVerse

1. 创建连接配置
2. 测试工具功能
3. 优化用户体验
4. 添加错误处理

## 故障排除

### 连接问题

```bash
# 检查服务器状态
curl http://localhost:3000/health

# 检查端口是否开放
netstat -an | grep 3000

# 查看服务器日志
tail -f server.log
```

### 工具问题

1. 检查工具定义是否正确
2. 确认参数格式
3. 查看执行日志
4. 测试工具功能

## 更新日志

### v1.0.0
- 初始 MCP 集成实现
- 支持 WebSocket 连接
- 基本工具调用功能
- 连接管理 UI

## 贡献

欢迎提交 Issue 和 Pull Request 来改进 MCP 集成功能。

## 许可证

本项目采用 MIT 许可证。 

================================================
FILE: docs/naming-research.md
================================================
# 项目命名研究文档

## 当前项目概况

### 项目定位
- 一个开源的多智能体对话平台
- 支持多个主流 AI 模型
- 让 AI 们进行自主讨论、头脑风暴和知识探索
- 当前版本:0.1.0

### 核心特性
- 多智能体协作
- 多 AI 服务商支持
- 场景化应用
- 开源开放
- 易于扩展

### 应用场景
- 面试模拟
- 产品讨论
- 学习辅导
- 知识探索

## 品牌愿景

我们要打造的是一个 AgentVerse(智能体宇宙),这是我们的核心理念和愿景:
- 一个智能体自由协作的完整生态
- 开放、包容、无限可能的平台
- 促进AI智能体之间的深度协作
- 创造超越个体的集体智慧

这个愿景类似于:
- Android 之于移动操作系统
- Linux 之于开源操作系统
- Docker 之于容器生态

我们需要一个能承载这个愿景的品牌名称,但这个名称:
- 不必直接描述产品本质
- 不必局限于技术术语
- 需要有强大的品牌张力
- 需要能支撑长期发展

## 命名考虑

### 当前名称分析:AgentVerse

优势:
- 暗示完整的生态系统
- 包容性强,未来扩展空间大
- 容易记忆,朗朗上口
- 符合产品本质定位

劣势:
- verse 后缀较常见
- 可能给人元宇宙联想

### 命名方法论

1. **描述性命名**
   - 直接反映产品特性
   - 例如:AgentVerse, AgentHub, CollabSpace
   - 评估:可以考虑,但不是唯一选择

2. **抽象命名**
   - 与产品本质无直接关联
   - 例如:Apple(电脑), Amazon(电商)
   - 优势:品牌价值独立,扩展性强
   - 评估:值得重点探索

3. **隐喻命名**
   - 借用其他领域的概念
   - 例如:Docker(容器), Python(编程语言)
   - 优势:形象生动,故事性强
   - 评估:很有潜力,特别是能暗示生态系统的概念

4. **创造性命名**
   - 完全原创词汇
   - 例如:Kodak, Google
   - 优势:独特性强,易于注册
   - 评估:如果能创造好,价值最大

### 新的命名思路

重新思考,基于更宏大的品牌愿景:

1. **自然生态隐喻**
   - Gaia(盖亚,地球母神):生命、生态、整体性
   - Terra(地球):完整世界、生态系统
   - Aurora(极光):神秘、能量、变幻

2. **文明与智慧**
   - Nexus(联结点):智慧的汇聚
   - Atlas(地图/泰坦神):支撑、指引
   - Lumina(光明):启发、智慧

3. **创造与演化**
   - Genesis(起源):创造、开端
   - Nova(新星):爆发、创新
   - Helix(螺旋):演化、上升

4. **抽象与未来**
   - Cipher(密码):解码未来
   - Quantum(量子):无限可能
   - Vector(矢量):方向、力量

5. **智慧与力量**
   - Intellix(智能+系统):智能生态系统
   - Cognova(认知+新星):认知革新
   - Mindeon(思维+永恒):永恒思维

6. **生态与演化**
   - Syntropy(有序进化):智能有序发展
   - Genesis(智能起源):智能源头
   - Nexora(连接+新生):新生连接

7. **宇宙与秩序**
   - Cosmix(宇宙+系统):宇宙系统
   - Ordina(秩序+智能):智能秩序
   - Stellix(星辰+系统):星辰系统

### 名称评估要点

1. **品牌潜力**
   - 是否能承载生态系统愿景
   - 是否具有扩展性
   - 是否易于记忆
   - 是否有品牌故事潜力

2. **实用性**
   - 发音是否友好
   - 拼写是否简单
   - 是否易于传播
   - 是否适合国际化

3. **技术考量**
   - 域名可用性
   - 商标可注册性
   - 社区认可度
   - 开发者友好度

## 评估维度

1. **实用性考量**
   - 域名可用性
   - 商标注册可能性
   - GitHub 仓库名可用性
   - NPM 包名可用性

2. **品牌价值**
   - 能否承载宏大愿景
   - 是否具有时代感
   - 国际化潜力
   - 文化内涵

3. **技术考量**
   - SEO 友好度
   - 开发者社区接受度
   - 技术栈匹配度

4. **商业价值**
   - 品牌故事潜力
   - 市场识别度
   - 商业化可能性

## 下一步计划

1. **深入调研**
   - 竞品名称分析
   - 域名可用性检查
   - 商标检索
   - 社区反馈收集

2. **重点评估**
   - 筛选最具潜力的 3-5 个名称
   - 进行详细的可行性分析
   - 设计相应的品牌故事
   - 评估长期发展空间

3. **决策流程**
   - 建立评分体系
   - 收集多方意见
   - 进行最终决策
   - 制定品牌建设计划

## 备注
- 命名决策将影响产品的长期发展
- 需要平衡创意性和实用性
- 考虑预算和时间投入
- 保持开放性思维,不局限于现有方案
- 核心是打造一个伟大的品牌,而不仅仅是一个好名字
- 名字需要能承载"智能体宇宙"的愿景,但不必直接表达它 

================================================
FILE: docs/project-standards.md
================================================
# 项目规范文档

## 技术栈
- React 18 + TypeScript
- Vite
- Tailwind CSS
- shadcn/ui
- pnpm

## 目录结构
```
src/
├── assets/        # 静态资源文件
├── components/    # 可复用组件
│   ├── ui/       # UI 基础组件
│   └── common/   # 业务通用组件
├── hooks/        # 自定义 Hooks
├── layouts/      # 布局组件
├── pages/        # 页面组件
├── services/     # API 服务
├── stores/       # 状态管理
├── styles/       # 全局样式
├── types/        # TypeScript 类型定义
└── utils/        # 工具函数
```

## 命名规范

### 文件命名
- 所有文件和目录名统一使用小写字母,单词之间用连字符(-)连接
- 组件文件:`button-primary.tsx`, `user-profile.tsx`
- 组件目录:`button/`, `user-profile/`
- 工具文件:`date-formatter.ts`, `string-utils.ts`
- 样式文件:与组件同名,`button-primary.css`
- 测试文件:与被测试文件同名,加上.test后缀,`button-primary.test.tsx`
- 服务文件:使用 `.service.ts` 后缀,如 `authentication.service.ts`

### 服务类规范
```typescript
// user.service.ts

export class UserService {
  private readonly apiUrl = '/api/users';

  constructor(private httpClient: HttpClient) {}

  async getUsers(): Promise<User[]> {
    return this.httpClient.get(this.apiUrl);
  }

  async getUserById(id: string): Promise<User> {
    return this.httpClient.get(`${this.apiUrl}/${id}`);
  }
}
```

### 组件命名规范
- 文件名:使用 kebab-case(例:`user-profile.tsx`)
- 组件名:使用 PascalCase(例:`export function UserProfile`)
- Props 接口:使用 PascalCase + Props(例:`interface UserProfileProps`)
- 目录名:使用 kebab-case(例:`user-profile/index.tsx`)

### 变量命名
- 普通变量:使用 camelCase
- 常量:使用 UPPER_SNAKE_CASE
- 私有变量:使用下划线前缀(例:`_privateVar`)

## 代码规范

### TypeScript
- 启用严格模式(`strict: true`)
- 必须声明类型,避免使用 `any`
- 优先使用 `interface` 而不是 `type`

### React 相关
- 使用函数式组件
- Props 必须定义类型接口
- 使用 ES6+ 语法
- 优先使用 Hooks 而不是 Class 组件

### 文件大小限制
- 单个 TSX/TS 文件不应超过 300 行(包含空行和注释)
- 推荐保持在 150-200 行以内
- 超过限制时的拆分原则:
  1. 将独立的 UI 组件拆分到单独文件
  2. 将复杂的业务逻辑抽离到 hooks
  3. 将类型定义移到 types 目录
  4. 将配置项移到 config 目录
  5. 将工具函数移到 utils 目录

### 样式规范
- 使用 Tailwind CSS 工具类
- 复杂样式使用 CSS Modules
- 避免内联样式
- 遵循移动优先的响应式设计原则

## Git 提交规范

提交信息格式:
```
<type>(<scope>): <subject>

<body>

<footer>
```

类型(type):
- feat: 新功能
- fix: Bug 修复
- docs: 文档更新
- style: 代码格式(不影响代码运行的变动)
- refactor: 重构(既不是新增功能,也不是修复 bug)
- test: 增加测试
- chore: 构建过程或辅助工具的变动

## 开发流程
1. 从 main 分支创建特性分支
2. 开发完成后提交 PR
3. 代码审查通过后合并到 main 分支
4. 定期打 tag 发布版本

## 性能优化准则
- 合理使用 React.memo 和 useMemo
- 避免不必要的重渲染
- 图片资源使用适当的格式和大小
- 按需加载组件和模块 

================================================
FILE: docs/prompt-experiments.md
================================================
# Prompt Experiments

我认为现在的 agent 的 prompt 都不太行。我需要试验性的尝试一个 agent,主要从响应格式做文章,我给出一个示例,粗浅的想法,还不确定:

<think>
<goal>

</goal>


</think>
<response>

</response>





================================================
FILE: docs/prompts/generate-world-class-artistic-ui.md
================================================
写出令人惊叹不已精美无比的界面。要世界级的体验,美观与体验的最佳结合。现代化的,充满创意而不是平庸的,有趣而不是无聊的界面。写出体验无与伦比的界面。要写艺术品而不是仅仅是实现功能,要超越和引领而不是平庸的追随者。

================================================
FILE: docs/references/agent-chat-tutorial.md
================================================
# @agent-labs/agent-chat 使用教程

@agent-labs/agent-chat 是一个功能强大的 React 组件库,用于快速构建 AI 助手聊天界面。本教程将帮助你了解如何安装和使用这个库。

## 目录

- [安装](#安装)
- [快速开始](#快速开始)
- [使用方式](#使用方式)
  - [基础组件 (AgentChatCore)](#基础组件-agentchatcore)
  - [窗口组件 (AgentChatWindow)](#窗口组件-agentchatwindow)
- [Context Provider 架构](#context-provider-架构)
- [典型场景](#典型场景)
  - [基础聊天界面](#基础聊天界面)
  - [动态上下文管理](#动态上下文管理)
  - [插件式工具系统](#插件式工具系统)
  - [动态注册工具执行器](#动态注册工具执行器)
  - [自定义工具界面](#自定义工具界面)
  - [组合使用场景](#组合使用场景)
  - [预加载消息](#预加载消息)
  - [程序化消息管理](#程序化消息管理)
- [高级功能](#高级功能)
  - [Ref API](#ref-api)
  - [useAgentChat Hook](#useagentchat-hook)
- [API 参考](#api-参考)
- [Hooks 参考](#hooks-参考)

## 安装

使用 npm 或 yarn 安装必要的依赖:

```bash
# 安装 agent-chat 组件库
npm install @agent-labs/agent-chat
# 安装 HTTP Agent 客户端
npm install @ag-ui/client

# 或者使用 yarn
yarn add @agent-labs/agent-chat @ag-ui/client
```

注意:`@ag-ui/client` 是必需的依赖,用于创建 HTTP Agent 实例与后端服务通信。

## 快速开始

首先,创建一个 Agent 实例:

```tsx
import { HttpAgent } from '@ag-ui/client'

// 创建一个全局的 Agent 实例
export const agent = new HttpAgent({
  url: 'http://localhost:8000/openai-agent',
})
```

然后,在你的应用中使用它:

```tsx
import { AgentChatWindow } from '@agent-labs/agent-chat'
import { agent } from './agent'

function App() {
  return (
    <AgentChatWindow
      agent={agent}
    />
  )
}
```

就这么简单!

## 使用方式

### 基础组件 (AgentChatCore)

`AgentChatCore` 是一个基础的聊天组件,提供了核心的聊天功能,适合需要自定义 UI 的场景:

```tsx
import { AgentChatCore } from '@agent-labs/agent-chat'
import { agent } from './agent'

function BasicExample() {
  return (
    <div className="min-h-screen bg-gray-100">
      <div className="container mx-auto p-4">
        <AgentChatCore
          agent={agent}
          className="h-[600px]"
        />
      </div>
    </div>
  )
}
```

### 窗口组件 (AgentChatWindow)

`AgentChatWindow` 是一个完整的窗口组件,提供了开箱即用的聊天窗口体验:

```tsx
import { AgentChatWindow } from '@agent-labs/agent-chat'
import { agent } from './agent'

function WindowExample() {
  return (
    <AgentChatWindow
      agent={agent}
      className="fixed bottom-4 right-4"
    />
  )
}
```

## Context Provider 架构

所有 hooks 默认使用全局实例,无需配置 Provider,只有多实例隔离时才需要。

你可以通过 AgentContextManagerContext、AgentToolDefManagerContext、AgentToolExecutorManagerContext、AgentToolRendererManagerContext 这些 Provider 进行自定义隔离,绝大多数场景下无需配置,默认全局实例即可。

**推荐写法:**

```tsx
import { AgentToolDefManagerContext, AgentToolDefManager, AgentChatWindow } from '@agent-labs/agent-chat'
import { agent } from './agent'
import { useMemo } from 'react'

function IsolatedChat() {
  // 保证 manager 实例稳定
  const customToolDefManager = useMemo(() => new AgentToolDefManager(), [])

  return (
    <AgentToolDefManagerContext.Provider value={customToolDefManager}>
      <AgentChatWindow agent={agent} />
    </AgentToolDefManagerContext.Provider>
  )
}
```

**多实例隔离:**

```tsx
function MultiChat() {
  const managerA = useMemo(() => new AgentToolDefManager(), [])
  const managerB = useMemo(() => new AgentToolDefManager(), [])

  return (
    <>
      <AgentToolDefManagerContext.Provider value={managerA}>
        <ChatA />
      </AgentToolDefManagerContext.Provider>
      <AgentToolDefManagerContext.Provider value={managerB}>
        <ChatB />
      </AgentToolDefManagerContext.Provider>
    </>
  )
}
```

**所有 Provider 分别自定义的例子:**

```tsx
import {
  AgentContextManagerContext, AgentContextManager,
  AgentToolDefManagerContext, AgentToolDefManager,
  AgentToolExecutorManagerContext, AgentToolExecutorManager,
  AgentToolRendererManagerContext, AgentToolRendererManager,
  AgentChatWindow
} from '@agent-labs/agent-chat'
import { agent } from './agent'
import { useMemo } from 'react'

function FullyIsolatedChat() {
  const contextManager = useMemo(() => new AgentContextManager(), [])
  const toolDefManager = useMemo(() => new AgentToolDefManager(), [])
  const toolExecutorManager = useMemo(() => new AgentToolExecutorManager(), [])
  const toolRendererManager = useMemo(() => new AgentToolRendererManager(), [])

  return (
    <AgentContextManagerContext.Provider value={contextManager}>
      <AgentToolDefManagerContext.Provider value={toolDefManager}>
        <AgentToolExecutorManagerContext.Provider value={toolExecutorManager}>
          <AgentToolRendererManagerContext.Provider value={toolRendererManager}>
            <AgentChatWindow agent={agent} />
          </AgentToolRendererManagerContext.Provider>
        </AgentToolExecutorManagerContext.Provider>
      </AgentToolDefManagerContext.Provider>
    </AgentContextManagerContext.Provider>
  )
}
```

## 典型场景

### 基础聊天界面

使用 `AgentChatCore` 构建基础聊天界面:

```tsx
import { AgentChatCore } from '@agent-labs/agent-chat'
import { agent } from './agent'

function BasicChat() {
  return (
    <div className="min-h-screen bg-gray-100">
      <div className="container mx-auto p-4">
        <header className="mb-8">
          <h1 className="text-3xl font-bold">AI 助手</h1>
        </header>
        <div className="bg-white rounded-lg shadow-lg">
          <AgentChatCore
            agent={agent}
            className="h-[600px]"
          />
        </div>
      </div>
    </div>
  )
}
```

### 动态上下文管理

使用 hooks 来管理动态上下文,默认情况下无需额外配置:

```tsx
import { AgentChatWindow } from '@agent-labs/agent-chat'
import { agent } from './agent'
import { useEffect, useState } from 'react'
import { useProvideAgentContexts } from '@agent-labs/agent-chat'

// 直接使用动态上下文 - 使用默认全局实例
function DynamicContextChat() {
  // 用户信息状态
  const [userInfo, setUserInfo] = useState({
    name: '张三',
    role: 'developer',
    lastActive: new Date().toISOString(),
  })

  // 使用 hook 提供上下文 - 自动使用默认全局实例
  useProvideAgentContexts([
    {
      description: '用户信息',
      value: JSON.stringify(userInfo),
    },
  ])

  // 定期更新用户活跃时间
  useEffect(() => {
    const timer = setInterval(() => {
      setUserInfo(prev => ({
        ...prev,
        lastActive: new Date().toISOString(),
      }))
    }, 60000)

    return () => clearInterval(timer)
  }, [])

  return (
    <div className="min-h-screen bg-gray-100">
      <div className="container mx-auto p-4">
        <header className="mb-4">
          <h1 className="text-2xl font-bold">动态上下文聊天</h1>
          <p className="text-gray-600">
            当前用户: {userInfo.name} ({userInfo.role})
          </p>
        </header>
        <AgentChatWindow agent={agent} />
      </div>
    </div>
  )
}

// 如果需要多实例隔离,可以使用Provider包装:
function IsolatedDynamicContextApp() {
  return (
    <AgentProvidersProvider>
      <DynamicContextChat />
    </AgentProvidersProvider>
  )
}

export default DynamicContextChat
```

### 插件式工具系统

使用 hooks 来管理动态工具,默认情况下无需额外配置:

```tsx
import { AgentChatCore } from '@agent-labs/agent-chat'
import { agent } from './agent'
import { useState } from 'react'
import type { ToolDefinition } from '@agent-labs/agent-chat'
import { useProvideAgentToolDefs } from '@agent-labs/agent-chat'

// 插件管理组件 - 直接使用默认全局实例
function PluginSystemChat() {
  // 基础工具
  const baseTools: ToolDefinition[] = [
    {
      name: 'search',
      description: '搜索网络信息',
      parameters: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: '搜索关键词',
          },
        },
        required: ['query'],
      },
    },
  ]

  // 动态工具列表
  const [dynamicTools, setDynamicTools] = useState<ToolDefinition[]>([])

  // 使用 hook 提供工具定义 - 自动使用默认全局实例
  useProvideAgentToolDefs([...baseTools, ...dynamicTools])

  // 添加新工具的函数
  const addNewTool = () => {
    const newTool: ToolDefinition = {
      name: 'getTime',
      description: '获取当前时间',
      parameters: {
        type: 'object',
        properties: {},
        required: [],
      },
    }
    setDynamicTools(prev => [...prev, newTool])
  }

  // 移除工具的函数
  const removeLastTool = () => {
    setDynamicTools(prev => prev.slice(0, -1))
  }

  return (
    <div className="min-h-screen bg-gray-100">
      <div className="container mx-auto p-4">
        <header className="mb-4">
          <h1 className="text-2xl font-bold">插件式工具系统</h1>
          <p className="text-gray-600">
            当前工具数量: {baseTools.length + dynamicTools.length}
          </p>
        </header>
        
        <div className="bg-white rounded-lg shadow-lg">
          <AgentChatCore
            agent={agent}
            className="h-[600px]"
          />
        </div>
        
        <div className="mt-4 flex gap-2">
          <button
            className="px-4 py-2 bg-blue-500 text-white rounded"
            onClick={addNewTool}
            disabled={dynamicTools.some(t => t.name === 'getTime')}
          >
            添加时间工具
          </button>
          <button
            className="px-4 py-2 bg-red-500 text-white rounded"
            onClick={removeLastTool}
            disabled={dynamicTools.length === 0}
          >
            移除最后一个工具
          </button>
        </div>
        
        {/* 工具列表显示 */}
        <div className="mt-4 p-4 bg-gray-50 rounded">
          <h3 className="font-semibold mb-2">当前可用工具:</h3>
          <ul className="space-y-1">
            {[...baseTools, ...dynamicTools].map((tool, index) => (
              <li key={index} className="text-sm">
                <span className="font-mono bg-gray-200 px-2 py-1 rounded">
                  {tool.name}
                </span>
                - {tool.description}
              </li>
            ))}
          </ul>
        </div>
      </div>
    </div>
  )
}

// 如果需要插件隔离,可以使用Provider包装:
function IsolatedPluginSystemApp() {
  return (
    <AgentProvidersProvider>
      <PluginSystemChat />
    </AgentProvidersProvider>
  )
}

export default PluginSystemChat
```

### 动态注册工具执行器

`useProvideAgentToolExecutors` 用于在组件中动态注册工具执行器(ToolExecutor),实现自动工具调用和结果推送。支持同步和异步函数,配合 `useAgentChat` 可实现自动工具链路。

#### 典型用法

```tsx
import { useProvideAgentToolExecutors } from '@agent-labs/agent-ch
Download .txt
gitextract_5vq11rbw/

├── .agent/
│   └── workflows/
│       ├── feature-based-architecture.md
│       └── governance-strategy.md
├── .babelrc.js
├── .codex/
│   └── skills/
│       └── project-os/
│           ├── .skild/
│           │   └── install.json
│           ├── SKILL.md
│           └── assets/
│               ├── AGENTS.template.md
│               ├── commands/
│               │   └── commands.md
│               └── docs/
│                   └── workflows/
│                       └── npm-release-process.md
├── .cursor/
│   ├── commands/
│   │   └── commit.md
│   ├── cursorignore
│   └── rules/
│       ├── README.md
│       ├── agentverse-project.mdc
│       ├── code-simplicity.mdc
│       ├── commit.mdc
│       ├── core.mdc
│       ├── customization.mdc
│       ├── file-organization.mdc
│       ├── file-size-limits.mdc
│       ├── generate-world-class-artistic-ui.mdc
│       ├── naming-conventions.mdc
│       ├── portal-service-bus-architecture.mdc
│       ├── quick-commands.mdc
│       ├── riper-workflow.mdc
│       ├── start-phase.mdc
│       └── state.mdc
├── .gitignore
├── .i18n-ally.yml
├── .npmrc
├── .ossutilconfig.example
├── AGENTS.md
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTORS.md
├── LICENSE
├── README.md
├── README_EN.md
├── babel.config.cjs
├── commands/
│   └── commands.md
├── components.json
├── docs/
│   ├── PAGE_STRUCTURE.md
│   ├── agent-action.md
│   ├── architecture/
│   │   ├── agent-architecture.md
│   │   ├── agents-architecture.md
│   │   ├── chat-discussion-features.md
│   │   ├── diagrams/
│   │   │   └── architecture.mmd
│   │   ├── discussions-architecture.md
│   │   ├── extension-architecture.md
│   │   └── system-design.md
│   ├── character-templates.md
│   ├── development/
│   │   ├── file-manager-architecture.md
│   │   ├── file-manager-global-tree-design.md
│   │   └── world-class-chat-html-preview-plan.md
│   ├── development-guide.md
│   ├── development-plan.md
│   ├── features-overview.md
│   ├── i18n-coverage-report.md
│   ├── i18n-tools-guide.md
│   ├── logs/
│   │   ├── README.md
│   │   ├── TEMPLATE.md
│   │   ├── v0.0.1-init/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.0-backend-ready/
│   │   │   ├── analysis.md
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.1-notes-sidebar/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.10-stream-normalizer-robust/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.11-mention-self-guard/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.12-message-merge-safety/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.13-v2ex-post/
│   │   │   ├── iteration-notes.md
│   │   │   └── v2ex-post.md
│   │   ├── v0.1.14-sidebar-github/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.15-activitybar-github/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.16-readme-screenshots/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.17-dashscope-models/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.2-auth-email/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.3-auth-optional/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.4-auth-entry/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.5-poop-impact/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.6-stream-dedupe/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.7-streaming-delta-normalization/
│   │   │   └── iteration-notes.md
│   │   ├── v0.1.8-streaming-mode-normalization/
│   │   │   └── iteration-notes.md
│   │   └── v0.1.9-poop-impact-drama/
│   │       └── iteration-notes.md
│   ├── mcp-integration.md
│   ├── naming-research.md
│   ├── project-standards.md
│   ├── prompt-experiments.md
│   ├── prompts/
│   │   └── generate-world-class-artistic-ui.md
│   ├── references/
│   │   ├── agent-chat-tutorial.md
│   │   ├── tsdown-docs/
│   │   │   ├── .vitepress/
│   │   │   │   ├── components/
│   │   │   │   │   ├── HomePage.vue
│   │   │   │   │   ├── VideoModal.vue
│   │   │   │   │   └── overrides/
│   │   │   │   │       └── vp-hero.vue
│   │   │   │   ├── config/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── theme.ts
│   │   │   │   ├── i18n/
│   │   │   │   │   ├── composable.ts
│   │   │   │   │   ├── translate-map.ts
│   │   │   │   │   └── utils.ts
│   │   │   │   ├── scripts/
│   │   │   │   │   └── docs-generate.ts
│   │   │   │   └── theme/
│   │   │   │       ├── Layout.vue
│   │   │   │       ├── custom.css
│   │   │   │       └── index.ts
│   │   │   ├── advanced/
│   │   │   │   ├── benchmark.md
│   │   │   │   ├── hooks.md
│   │   │   │   ├── plugins.md
│   │   │   │   ├── programmatic-usage.md
│   │   │   │   └── rolldown-options.md
│   │   │   ├── guide/
│   │   │   │   ├── faq.md
│   │   │   │   ├── getting-started.md
│   │   │   │   ├── index.md
│   │   │   │   └── migrate-from-tsup.md
│   │   │   ├── index.md
│   │   │   ├── options/
│   │   │   │   ├── cleaning.md
│   │   │   │   ├── config-file.md
│   │   │   │   ├── dependencies.md
│   │   │   │   ├── dts.md
│   │   │   │   ├── entry.md
│   │   │   │   ├── minification.md
│   │   │   │   ├── output-directory.md
│   │   │   │   ├── output-format.md
│   │   │   │   ├── package-exports.md
│   │   │   │   ├── platform.md
│   │   │   │   ├── shims.md
│   │   │   │   ├── silent-mode.md
│   │   │   │   ├── sourcemap.md
│   │   │   │   ├── target.md
│   │   │   │   ├── tree-shaking.md
│   │   │   │   ├── unbundle.md
│   │   │   │   └── watch-mode.md
│   │   │   ├── recipes/
│   │   │   │   └── vue-support.md
│   │   │   ├── reference/
│   │   │   │   └── cli.md
│   │   │   ├── vite.config.ts
│   │   │   └── zh-CN/
│   │   │       ├── advanced/
│   │   │       │   ├── benchmark.md
│   │   │       │   ├── hooks.md
│   │   │       │   ├── plugins.md
│   │   │       │   ├── programmatic-usage.md
│   │   │       │   └── rolldown-options.md
│   │   │       ├── guide/
│   │   │       │   ├── faq.md
│   │   │       │   ├── getting-started.md
│   │   │       │   ├── index.md
│   │   │       │   └── migrate-from-tsup.md
│   │   │       ├── index.md
│   │   │       ├── options/
│   │   │       │   ├── cleaning.md
│   │   │       │   ├── config-file.md
│   │   │       │   ├── dependencies.md
│   │   │       │   ├── dts.md
│   │   │       │   ├── entry.md
│   │   │       │   ├── minification.md
│   │   │       │   ├── output-directory.md
│   │   │       │   ├── output-format.md
│   │   │       │   ├── package-exports.md
│   │   │       │   ├── platform.md
│   │   │       │   ├── shims.md
│   │   │       │   ├── silent-mode.md
│   │   │       │   ├── sourcemap.md
│   │   │       │   ├── target.md
│   │   │       │   ├── tree-shaking.md
│   │   │       │   ├── unbundle.md
│   │   │       │   └── watch-mode.md
│   │   │       ├── recipes/
│   │   │       │   └── vue-support.md
│   │   │       └── reference/
│   │   │           └── cli.md
│   │   └── web-mcp-doc.md
│   ├── scheduler-design.md
│   ├── use-all-tools-example.md
│   ├── v2ex-post.md
│   └── workflows/
│       └── npm-release-process.md
├── eslint.config.js
├── functions/
│   ├── _lib/
│   │   ├── config.ts
│   │   ├── crypto.ts
│   │   ├── email.ts
│   │   ├── http.ts
│   │   ├── sessions.ts
│   │   └── validators.ts
│   ├── _types.ts
│   └── api/
│       └── auth/
│           ├── login.ts
│           ├── logout.ts
│           ├── me.ts
│           ├── register.ts
│           ├── request-password-reset.ts
│           ├── resend-verification.ts
│           ├── reset-password.ts
│           └── verify-email.ts
├── i18next-scanner.config.cjs
├── i18next-scanner.config.js
├── index.html
├── jest.config.cjs
├── migrations/
│   └── 0001_auth.sql
├── package.json
├── packages/
│   ├── rx-nested-bean/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── v2.ts
│   │   └── tsconfig.json
│   └── service-bus-portal/
│       ├── LICENSE
│       ├── MIGRATION.md
│       ├── MIGRATION_TO_TSDOWN.md
│       ├── PACKAGE_SUMMARY.md
│       ├── README.md
│       ├── examples/
│       │   ├── README.md
│       │   ├── basic-usage.ts
│       │   ├── comprehensive-example.ts
│       │   ├── iframe-example.ts
│       │   └── worker-example.ts
│       ├── package.json
│       ├── scripts/
│       │   └── publish.sh
│       ├── src/
│       │   ├── core.ts
│       │   ├── factory.ts
│       │   ├── index.ts
│       │   ├── service-bus.ts
│       │   └── types.ts
│       ├── tsconfig.json
│       └── tsdown.config.ts
├── pnpm-workspace.yaml
├── public/
│   ├── iframe-portal.html
│   └── worker-portal.js
├── scripts/
│   ├── check-i18n-coverage.cjs
│   ├── check-i18n-coverage.js
│   ├── metrics/
│   │   ├── feature-structure.cjs
│   │   └── top-loc.cjs
│   └── rename-hooks-to-kebab-case.sh
├── src/
│   ├── App.tsx
│   ├── common/
│   │   ├── components/
│   │   │   ├── common/
│   │   │   │   ├── breakpoint-provider.tsx
│   │   │   │   ├── client-breakpoint-provider.tsx
│   │   │   │   ├── icon-registry.tsx
│   │   │   │   ├── language/
│   │   │   │   │   └── index.ts
│   │   │   │   ├── language-toggle.tsx
│   │   │   │   ├── logo.tsx
│   │   │   │   ├── plugin-router.tsx
│   │   │   │   ├── redirect.tsx
│   │   │   │   ├── role-badge.tsx
│   │   │   │   ├── status-indicator.tsx
│   │   │   │   ├── theme/
│   │   │   │   │   ├── context.tsx
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── toggle.tsx
│   │   │   │   └── theme-toggle.tsx
│   │   │   ├── layout/
│   │   │   │   ├── page-container.tsx
│   │   │   │   └── responsive-container.tsx
│   │   │   ├── layouts/
│   │   │   │   └── scrollable-layout.tsx
│   │   │   └── ui/
│   │   │       ├── alert-dialog.tsx
│   │   │       ├── alert.tsx
│   │   │       ├── auto-resize-textarea.tsx
│   │   │       ├── avatar.tsx
│   │   │       ├── badge.tsx
│   │   │       ├── button.tsx
│   │   │       ├── card.tsx
│   │   │       ├── checkbox.tsx
│   │   │       ├── dialog.tsx
│   │   │       ├── dropdown-menu.tsx
│   │   │       ├── hover-card.tsx
│   │   │       ├── input.tsx
│   │   │       ├── label.tsx
│   │   │       ├── markdown/
│   │   │       │   ├── code-block-container.tsx
│   │   │       │   ├── code-block.tsx
│   │   │       │   ├── components/
│   │   │       │   │   ├── error-boundary.tsx
│   │   │       │   │   ├── mermaid-renderer.ts
│   │   │       │   │   └── mermaid.tsx
│   │   │       │   ├── copy-code-button.tsx
│   │   │       │   ├── index.tsx
│   │   │       │   ├── types.ts
│   │   │       │   └── world-class-markdown.css
│   │   │       ├── modal/
│   │   │       │   ├── context.tsx
│   │   │       │   ├── hooks.ts
│   │   │       │   ├── index.ts
│   │   │       │   ├── provider.tsx
│   │   │       │   └── types.ts
│   │   │       ├── popover.tsx
│   │   │       ├── scroll-area.tsx
│   │   │       ├── select.tsx
│   │   │       ├── separator.tsx
│   │   │       ├── sheet.tsx
│   │   │       ├── skeleton.tsx
│   │   │       ├── slider.tsx
│   │   │       ├── smart-avatar.tsx
│   │   │       ├── switch.tsx
│   │   │       ├── tabs.tsx
│   │   │       ├── textarea.tsx
│   │   │       ├── toast.tsx
│   │   │       ├── toaster.tsx
│   │   │       └── tooltip.tsx
│   │   ├── features/
│   │   │   ├── agents/
│   │   │   │   ├── components/
│   │   │   │   │   ├── add-agent-dialog/
│   │   │   │   │   │   ├── add-agent-dialog-content.tsx
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── use-add-agent-dialog.tsx
│   │   │   │   │   ├── agent-tools/
│   │   │   │   │   │   ├── README.md
│   │   │   │   │   │   ├── agent-analysis.tool.ts
│   │   │   │   │   │   ├── code-analysis.tool.ts
│   │   │   │   │   │   ├── display-quick-actions.tool.ts
│   │   │   │   │   │   ├── file-system.tool.ts
│   │   │   │   │   │   ├── get-current-time.tool.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   ├── network.tool.ts
│   │   │   │   │   │   ├── tool-factories.ts
│   │   │   │   │   │   └── update-agent.tool.tsx
│   │   │   │   │   ├── avatars/
│   │   │   │   │   │   ├── clickable-agent-avatar.tsx
│   │   │   │   │   │   └── use-avatar-interaction.ts
│   │   │   │   │   ├── cards/
│   │   │   │   │   │   ├── README.md
│   │   │   │   │   │   ├── agent-card.tsx
│   │   │   │   │   │   ├── agent-chat-card.tsx
│   │   │   │   │   │   ├── agent-group-card.tsx
│   │   │   │   │   │   ├── agent-hover-card.tsx
│   │   │   │   │   │   ├── agent-info-card.tsx
│   │   │   │   │   │   ├── agent-select-card.tsx
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── modern-agent-card.tsx
│   │   │   │   │   ├── configuration/
│   │   │   │   │   │   ├── agent-configuration-assistant.tsx
│   │   │   │   │   │   ├── agent-configuration-preview.tsx
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── use-agent-configuration-tools.tsx
│   │   │   │   │   ├── dialogs/
│   │   │   │   │   │   ├── add-agent-dialog.tsx
│   │   │   │   │   │   ├── custom-team-dialog.tsx
│   │   │   │   │   │   ├── edit-agent-dialog.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── floating-agent-info.tsx
│   │   │   │   │   ├── forms/
│   │   │   │   │   │   ├── agent-embedded-form.tsx
│   │   │   │   │   │   ├── agent-form.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── lists/
│   │   │   │   │   │   ├── agent-combination-list.tsx
│   │   │   │   │   │   ├── agent-list.tsx
│   │   │   │   │   │   ├── agent-select-list.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── member-management.tsx
│   │   │   │   │   └── preview/
│   │   │   │   │       ├── README.md
│   │   │   │   │       ├── agent-preview-chat.tsx
│   │   │   │   │       ├── agent-preview-tools.example.ts
│   │   │   │   │       └── index.ts
│   │   │   │   └── extensions/
│   │   │   │       └── index.tsx
│   │   │   ├── all-in-one-agent/
│   │   │   │   ├── README.md
│   │   │   │   ├── components/
│   │   │   │   │   ├── agent-tools/
│   │   │   │   │   │   ├── calculator.tool.ts
│   │   │   │   │   │   ├── clear-suggestions.tool.ts
│   │   │   │   │   │   ├── file-system.tool.ts
│   │   │   │   │   │   ├── get-current-time.tool.ts
│   │   │   │   │   │   ├── html-preview-from-file.tool.tsx
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   ├── provide-next-steps.tool.ts
│   │   │   │   │   │   ├── recommend-topics.tool.ts
│   │   │   │   │   │   ├── request-user-choice.tool.ts
│   │   │   │   │   │   ├── send-message-to-iframe.tool.tsx
│   │   │   │   │   │   ├── subscribe-iframe-messages.tool.tsx
│   │   │   │   │   │   └── weather.tool.ts
│   │   │   │   │   ├── all-in-one-agent-dock.tsx
│   │   │   │   │   └── smart-assistant-dialog.tsx
│   │   │   │   ├── extensions/
│   │   │   │   │   └── index.tsx
│   │   │   │   ├── hooks/
│   │   │   │   │   └── use-all-in-one-agent-mode.tsx
│   │   │   │   ├── index.ts
│   │   │   │   └── pages/
│   │   │   │       └── all-in-one-agent-page.tsx
│   │   │   ├── app/
│   │   │   │   └── components/
│   │   │   │       ├── activity-bar.tsx
│   │   │   │       ├── app-loading.tsx
│   │   │   │       └── mobile-bottom-bar.tsx
│   │   │   ├── auth/
│   │   │   │   ├── components/
│   │   │   │   │   ├── auth-gate.tsx
│   │   │   │   │   ├── auth-routes.tsx
│   │   │   │   │   └── auth-shell.tsx
│   │   │   │   └── pages/
│   │   │   │       ├── forgot-password-page.tsx
│   │   │   │       ├── login-page.tsx
│   │   │   │       ├── reset-password-page.tsx
│   │   │   │       └── verify-email-page.tsx
│   │   │   ├── chat/
│   │   │   │   ├── components/
│   │   │   │   │   ├── agent-chat/
│   │   │   │   │   │   ├── README.md
│   │   │   │   │   │   ├── agent-chat-container.tsx
│   │   │   │   │   │   ├── agent-chat-header-with-info.tsx
│   │   │   │   │   │   ├── agent-chat-header.tsx
│   │   │   │   │   │   ├── agent-chat-input.tsx
│   │   │   │   │   │   ├── agent-chat-messages.tsx
│   │   │   │   │   │   ├── agent-chat-provider-wrapper.tsx
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── tool-call-renderer.tsx
│   │   │   │   │   ├── chat-area.tsx
│   │   │   │   │   ├── chat-empty-guide.tsx
│   │   │   │   │   ├── chat-welcome-header.tsx
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── mention-suggestions.tsx
│   │   │   │   │   ├── message/
│   │   │   │   │   │   ├── index.tsx
│   │   │   │   │   │   ├── interaction-overlay.tsx
│   │   │   │   │   │   ├── message-capture.tsx
│   │   │   │   │   │   ├── message-content-blocks.tsx
│   │   │   │   │   │   ├── message-item-wechat.tsx
│   │   │   │   │   │   ├── message-item.tsx
│   │   │   │   │   │   ├── message-list-desktop.tsx
│   │   │   │   │   │   ├── message-list-mobile.tsx
│   │   │   │   │   │   ├── message-list.tsx
│   │   │   │   │   │   ├── message-markdown-content.tsx
│   │   │   │   │   │   ├── message-preview-dialog.tsx
│   │   │   │   │   │   └── tool-result-list.tsx
│   │   │   │   │   ├── message-input-desktop.tsx
│   │   │   │   │   ├── message-input-mobile.tsx
│   │   │   │   │   ├── message-input.tsx
│   │   │   │   │   ├── modern-chat-input.tsx
│   │   │   │   │   └── suggestions/
│   │   │   │   │       ├── README.md
│   │   │   │   │       ├── index.ts
│   │   │   │   │       ├── suggestion.types.ts
│   │   │   │   │       └── suggestions-provider.tsx
│   │   │   │   ├── hooks/
│   │   │   │   │   └── use-poop-trigger.ts
│   │   │   │   ├── managers/
│   │   │   │   │   └── chat-scroll.manager.ts
│   │   │   │   └── stores/
│   │   │   │       ├── chat-scroll.store.ts
│   │   │   │       └── interaction.store.ts
│   │   │   ├── discussion/
│   │   │   │   └── components/
│   │   │   │       ├── control/
│   │   │   │       │   ├── clear-messages-button.tsx
│   │   │   │       │   ├── discussion-controller.tsx
│   │   │   │       │   └── use-discussion-control.ts
│   │   │   │       ├── list/
│   │   │   │       │   ├── discussion-avatar.tsx
│   │   │   │       │   ├── discussion-item.tsx
│   │   │   │       │   ├── discussion-list-header.tsx
│   │   │   │       │   ├── discussion-list.tsx
│   │   │   │       │   ├── index.ts
│   │   │   │       │   └── types.ts
│   │   │   │       ├── member/
│   │   │   │       │   ├── add-member-dialog.tsx
│   │   │   │       │   ├── member-item.tsx
│   │   │   │       │   ├── member-list.tsx
│   │   │   │       │   ├── member-skeleton.tsx
│   │   │   │       │   ├── member-toggle-button.tsx
│   │   │   │       │   ├── mobile-member-drawer.tsx
│   │   │   │       │   ├── mobile-member-list.tsx
│   │   │   │       │   └── quick-member-selector.tsx
│   │   │   │       ├── mobile/
│   │   │   │       │   ├── mobile-action-sheet.tsx
│   │   │   │       │   └── mobile-header.tsx
│   │   │   │       ├── notes/
│   │   │   │       │   └── discussion-notes-panel.tsx
│   │   │   │       ├── settings/
│   │   │   │       │   ├── discussion-settings-button.tsx
│   │   │   │       │   ├── discussion-settings-panel.tsx
│   │   │   │       │   ├── setting-item.tsx
│   │   │   │       │   ├── setting-select.tsx
│   │   │   │       │   ├── setting-slider.tsx
│   │   │   │       │   └── setting-switch.tsx
│   │   │   │       └── sidebar/
│   │   │   │           └── discussion-sidebar.tsx
│   │   │   ├── home/
│   │   │   │   └── components/
│   │   │   │       ├── agent-popover.tsx
│   │   │   │       ├── initial-experience.tsx
│   │   │   │       ├── initial-input.tsx
│   │   │   │       ├── team-details-dialog.tsx
│   │   │   │       └── welcome-header.tsx
│   │   │   └── world-class-chat/
│   │   │       ├── components/
│   │   │       │   ├── settings-panel/
│   │   │       │   │   ├── index.ts
│   │   │       │   │   ├── memory-setting.tsx
│   │   │       │   │   ├── prompt-setting.tsx
│   │   │       │   │   ├── settings-registry.ts
│   │   │       │   │   ├── types.ts
│   │   │       │   │   └── world-class-settings-panel.tsx
│   │   │       │   └── world-class-chat-html-preview.tsx
│   │   │       ├── copy-message-button.tsx
│   │   │       ├── hooks/
│   │   │       │   ├── use-iframe-manager.ts
│   │   │       │   ├── use-side-panel-manager.ts
│   │   │       │   └── use-suggestions-manager.ts
│   │   │       ├── index.ts
│   │   │       ├── side-panel.tsx
│   │   │       ├── stores/
│   │   │       │   ├── memory.store.ts
│   │   │       │   └── world-class-chat-settings.store.ts
│   │   │       ├── world-class-chat-container.tsx
│   │   │       ├── world-class-chat-input-bar.tsx
│   │   │       ├── world-class-chat-message-list.tsx
│   │   │       ├── world-class-chat-top-bar.tsx
│   │   │       └── world-class-tool-call-renderer.tsx
│   │   ├── hooks/
│   │   │   ├── index.ts
│   │   │   ├── use-agent-file-manager.ts
│   │   │   ├── use-all-tools.ts
│   │   │   ├── use-chat-auto-scroll.ts
│   │   │   ├── use-chat-message-cache.ts
│   │   │   ├── use-mcp-servers.ts
│   │   │   ├── use-mention-position.ts
│   │   │   ├── use-mention.ts
│   │   │   └── use-provide-agent-tools.ts
│   │   ├── lib/
│   │   │   ├── agent/
│   │   │   │   └── prompt/
│   │   │   │       ├── prompt-builder.ts
│   │   │   │       └── prompts.ts
│   │   │   ├── ai-service/
│   │   │   │   └── index.ts
│   │   │   ├── capabilities/
│   │   │   │   └── index.ts
│   │   │   ├── discussion/
│   │   │   │   └── message-utils.ts
│   │   │   ├── env.ts
│   │   │   ├── file-manager.service.ts
│   │   │   ├── file-tree.service.ts
│   │   │   ├── mcp/
│   │   │   │   ├── examples/
│   │   │   │   │   └── mock-server.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── transports/
│   │   │   │       ├── event.ts
│   │   │   │       ├── index.ts
│   │   │   │       ├── postmessage.ts
│   │   │   │       └── transport.ts
│   │   │   ├── prompts/
│   │   │   │   └── index.ts
│   │   │   ├── resource.ts
│   │   │   ├── runnable-agent/
│   │   │   │   ├── README.md
│   │   │   │   ├── agent-utils/
│   │   │   │   │   ├── handlers/
│   │   │   │   │   │   ├── text-message.handler.ts
│   │   │   │   │   │   └── tool-call.handler.ts
│   │   │   │   │   ├── openai-agent.ts
│   │   │   │   │   ├── stream-processor.ts
│   │   │   │   │   └── types.ts
│   │   │   │   ├── experimental-inbrowser-agent.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── sse-json-decoder.ts
│   │   │   ├── rx-event.ts
│   │   │   ├── rx-state/
│   │   │   │   └── index.ts
│   │   │   ├── service-bus/
│   │   │   │   └── index.ts
│   │   │   ├── storage/
│   │   │   │   ├── index.ts
│   │   │   │   ├── indexeddb.ts
│   │   │   │   ├── local.ts
│   │   │   │   ├── mock-http.ts
│   │   │   │   └── types.ts
│   │   │   ├── typed-bus/
│   │   │   │   ├── __tests__/
│   │   │   │   │   └── environment-bus.test.ts
│   │   │   │   ├── base.ts
│   │   │   │   ├── bus-proxy.ts
│   │   │   │   ├── decorators.ts
│   │   │   │   ├── implementations/
│   │   │   │   │   ├── capability-bus.ts
│   │   │   │   │   ├── environment-bus.ts
│   │   │   │   │   ├── event-bus.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── message-bus.ts
│   │   │   │   │   ├── resource-bus.ts
│   │   │   │   │   └── state-bus.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── key.ts
│   │   │   │   ├── middleware-chain.ts
│   │   │   │   └── types.ts
│   │   │   ├── utils.ts
│   │   │   └── with-event.ts
│   │   └── types/
│   │       ├── agent-config.ts
│   │       ├── agent.ts
│   │       ├── ai.ts
│   │       ├── auth.ts
│   │       ├── chat.ts
│   │       ├── discussion-member.ts
│   │       ├── discussion.ts
│   │       ├── guide.ts
│   │       ├── route.ts
│   │       └── storage.ts
│   ├── core/
│   │   ├── bootstrap/
│   │   │   ├── agents.bootstrap.ts
│   │   │   └── app.bootstrap.ts
│   │   ├── config/
│   │   │   ├── agents/
│   │   │   │   ├── base-types.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── moderators/
│   │   │   │   │   ├── meta-cognitive-orchestrator.ts
│   │   │   │   │   ├── structured-thinking-moderator.ts
│   │   │   │   │   └── troll-moderator.ts
│   │   │   │   ├── practical-agents/
│   │   │   │   │   ├── data-interpreter.ts
│   │   │   │   │   ├── implementation-architect.ts
│   │   │   │   │   └── startup-navigator.ts
│   │   │   │   └── top-agents/
│   │   │   │       ├── cognitive-detective.ts
│   │   │   │       ├── concept-alchemist.ts
│   │   │   │       ├── decision-gardener.ts
│   │   │   │       ├── emotion-meteorologist.ts
│   │   │   │       ├── essence-perspectivist.ts
│   │   │   │       ├── inspiration-archaeologist.ts
│   │   │   │       ├── meaning-seeker.ts
│   │   │   │       ├── multiverse-observer.ts
│   │   │   │       ├── narrative-architect.ts
│   │   │   │       ├── pattern-linguist.ts
│   │   │   │       ├── psyche-time-traveler.ts
│   │   │   │       ├── quantum-advisor.ts
│   │   │   │       ├── structure-architect.ts
│   │   │   │       ├── troll-attacker.ts
│   │   │   │       ├── troll-cynic.ts
│   │   │   │       ├── troll-hater.ts
│   │   │   │       ├── troll-nonsense.ts
│   │   │   │       ├── troll-picker.ts
│   │   │   │       ├── troll-saboteur.ts
│   │   │   │       └── troll-spammer.ts
│   │   │   ├── ai.ts
│   │   │   ├── guide-scenarios.ts
│   │   │   ├── i18n.ts
│   │   │   ├── module-order.ts
│   │   │   ├── settings.ts
│   │   │   ├── storage.ts
│   │   │   └── ui-persist.ts
│   │   ├── env.ts
│   │   ├── events.ts
│   │   ├── extension-manager.ts
│   │   ├── hooks/
│   │   │   ├── use-agent-chat-page-helper.ts
│   │   │   ├── use-app-bootstrap.ts
│   │   │   ├── use-auth.ts
│   │   │   ├── use-connect-navigation-store.ts
│   │   │   ├── use-copy.ts
│   │   │   ├── use-extensions.ts
│   │   │   ├── use-i18n.ts
│   │   │   ├── use-indexeddb-manager.ts
│   │   │   ├── use-setup-app.ts
│   │   │   ├── use-toast.ts
│   │   │   ├── useAgentForm.ts
│   │   │   ├── useAgents.ts
│   │   │   ├── useAutoScroll.ts
│   │   │   ├── useBreakpoint.ts
│   │   │   ├── useCurrentDiscussionId.ts
│   │   │   ├── useDiscussion.ts
│   │   │   ├── useDiscussionMembers.ts
│   │   │   ├── useDiscussionRuntime.ts
│   │   │   ├── useDiscussionSettings.ts
│   │   │   ├── useDiscussions.ts
│   │   │   ├── useKeyboardExpandableList.ts
│   │   │   ├── useMediaQuery.ts
│   │   │   ├── useMemberSelection.ts
│   │   │   ├── useMessageInput.ts
│   │   │   ├── useMessageList.ts
│   │   │   ├── useMessages.ts
│   │   │   ├── useObservableState.ts
│   │   │   ├── useOptimisticUpdate.ts
│   │   │   ├── usePersistedState.ts
│   │   │   ├── useViewportHeight.ts
│   │   │   └── useWindowSize.ts
│   │   ├── locales/
│   │   │   ├── en-US.json
│   │   │   └── zh-CN.json
│   │   ├── managers/
│   │   │   ├── activity-bar.manager.ts
│   │   │   ├── agents.manager.ts
│   │   │   ├── db-capabilities.ts
│   │   │   ├── discussion/
│   │   │   │   ├── mention-resolver.ts
│   │   │   │   ├── next-speaker.ts
│   │   │   │   └── streaming-responder.ts
│   │   │   ├── discussion-capabilities.ts
│   │   │   ├── discussion-control.manager.ts
│   │   │   ├── discussion-members.manager.ts
│   │   │   ├── discussions.manager.ts
│   │   │   ├── icon.manager.ts
│   │   │   ├── index.ts
│   │   │   ├── messages.manager.ts
│   │   │   ├── navigation.manager.ts
│   │   │   └── route-tree.manager.ts
│   │   ├── presenter/
│   │   │   ├── index.ts
│   │   │   ├── presenter-context.tsx
│   │   │   └── presenter.ts
│   │   ├── repositories/
│   │   │   ├── agent.repository.ts
│   │   │   ├── ai.client.ts
│   │   │   ├── data-providers.ts
│   │   │   ├── discussion-member.repository.ts
│   │   │   ├── discussion.repository.ts
│   │   │   ├── index.ts
│   │   │   ├── message.repository.ts
│   │   │   └── shared.types.ts
│   │   ├── stores/
│   │   │   ├── README.md
│   │   │   ├── activity-bar.store.ts
│   │   │   ├── agents.store.ts
│   │   │   ├── auth.store.ts
│   │   │   ├── discussion-members.store.ts
│   │   │   ├── discussions.store.ts
│   │   │   ├── icon.store.ts
│   │   │   ├── mcp-server.store.ts
│   │   │   ├── messages.store.ts
│   │   │   ├── navigation.store.ts
│   │   │   └── route-tree.store.ts
│   │   ├── styles/
│   │   │   └── theme.css
│   │   └── utils/
│   │       ├── auth-client.ts
│   │       ├── common.util.ts
│   │       ├── connect-router-with-activity-bar.ts
│   │       ├── discussion-error.util.ts
│   │       └── message.util.ts
│   ├── desktop/
│   │   ├── desktop-app.tsx
│   │   └── features/
│   │       ├── agents/
│   │       │   ├── components/
│   │       │   │   └── agent-profile-view.tsx
│   │       │   ├── extensions/
│   │       │   │   └── index.tsx
│   │       │   └── pages/
│   │       │       ├── agent-detail-page.tsx
│   │       │       └── agents-page.tsx
│   │       ├── chat/
│   │       │   ├── extensions/
│   │       │   │   └── index.tsx
│   │       │   └── pages/
│   │       │       └── chat-page.tsx
│   │       ├── file-manager/
│   │       │   ├── README.md
│   │       │   ├── components/
│   │       │   │   ├── file-preview.tsx
│   │       │   │   ├── file-tree.tsx
│   │       │   │   └── pluggable-file-preview.tsx
│   │       │   ├── extensions/
│   │       │   │   └── index.tsx
│   │       │   ├── hooks/
│   │       │   │   ├── use-delayed-loading.ts
│   │       │   │   ├── use-file-ops.ts
│   │       │   │   ├── use-file-tree.ts
│   │       │   │   ├── use-lightningfs-manager.ts
│   │       │   │   └── use-working-directory.ts
│   │       │   ├── pages/
│   │       │   │   └── file-manager-page.tsx
│   │       │   ├── previewers/
│   │       │   │   ├── html-previewer.tsx
│   │       │   │   ├── index.tsx
│   │       │   │   ├── markdown-previewer.tsx
│   │       │   │   └── text-previewer.tsx
│   │       │   ├── services/
│   │       │   │   └── file-preview-registry.service.ts
│   │       │   └── types/
│   │       │       └── file-preview.types.ts
│   │       └── indexeddb/
│   │           ├── components/
│   │           │   ├── indexeddb-data-viewer.tsx
│   │           │   ├── indexeddb-database-info.tsx
│   │           │   └── indexeddb-store-manager.tsx
│   │           ├── extensions/
│   │           │   └── index.tsx
│   │           └── pages/
│   │               └── indexeddb-manager-page.tsx
│   ├── index.css
│   ├── main.tsx
│   ├── mobile/
│   │   ├── features/
│   │   │   └── chat/
│   │   │       ├── extensions/
│   │   │       │   └── index.tsx
│   │   │       ├── managers/
│   │   │       │   └── mobile-chat-scene.manager.ts
│   │   │       ├── pages/
│   │   │       │   └── chat-page.tsx
│   │   │       └── stores/
│   │   │           └── mobile-chat-scene.store.ts
│   │   └── mobile-app.tsx
│   └── vite-env.d.ts
├── tsconfig.app.json
├── tsconfig.json
├── tsconfig.node.json
├── vite.config.ts
└── wrangler.toml
Download .txt
SYMBOL INDEX (1297 symbols across 389 files)

FILE: docs/references/tsdown-docs/.vitepress/config/index.ts
  method config (line 47) | config(md) {

FILE: docs/references/tsdown-docs/.vitepress/config/theme.ts
  function getTypedocSidebar (line 6) | async function getTypedocSidebar() {
  function getLocaleConfig (line 24) | function getLocaleConfig(lang: string) {

FILE: docs/references/tsdown-docs/.vitepress/i18n/composable.ts
  function useTranslate (line 4) | function useTranslate(lang?: string) {

FILE: docs/references/tsdown-docs/.vitepress/i18n/utils.ts
  function t (line 3) | function t(key: string, lang: string) {
  function createTranslate (line 7) | function createTranslate(lang: string) {

FILE: docs/references/tsdown-docs/.vitepress/scripts/docs-generate.ts
  constant LANGUAGES (line 4) | const LANGUAGES = ['zh-CN']
  function runTypedoc (line 9) | async function runTypedoc(tsconfig: string): Promise<void> {
  function generateApiReference (line 29) | async function generateApiReference() {

FILE: functions/_lib/config.ts
  function normalizeOrigin (line 3) | function normalizeOrigin(value: string | undefined): string | null {
  function parseAllowedOrigins (line 14) | function parseAllowedOrigins(env: Env): string[] {
  function getAppUrl (line 23) | function getAppUrl(request: Request, env: Env): string {
  function getEmailFrom (line 33) | function getEmailFrom(env: Env): string {

FILE: functions/_lib/crypto.ts
  function base64Encode (line 3) | function base64Encode(bytes: Uint8Array): string {
  function base64Decode (line 11) | function base64Decode(base64: string): Uint8Array {
  function base64UrlEncode (line 20) | function base64UrlEncode(bytes: Uint8Array): string {
  function pbkdf2 (line 24) | async function pbkdf2(password: string, salt: Uint8Array): Promise<Uint8...
  function hashPassword (line 41) | async function hashPassword(password: string, saltBase64?: string) {
  function verifyPassword (line 50) | async function verifyPassword(
  function generateToken (line 59) | function generateToken(): string {
  function hashToken (line 64) | async function hashToken(token: string): Promise<string> {

FILE: functions/_lib/email.ts
  function sendEmail (line 4) | async function sendEmail(env: Env, payload: Record<string, unknown>): Pr...
  function sendVerificationEmail (line 22) | async function sendVerificationEmail(
  function sendResetPasswordEmail (line 40) | async function sendResetPasswordEmail(

FILE: functions/_lib/http.ts
  type JsonValue (line 1) | type JsonValue = Record<string, unknown> | unknown[] | string | number |...
  function json (line 3) | function json(data: JsonValue, init: ResponseInit = {}): Response {
  function errorResponse (line 11) | function errorResponse(status: number, message: string, code?: string): ...
  function parseJson (line 15) | async function parseJson<T extends Record<string, unknown>>(

FILE: functions/_lib/sessions.ts
  constant COOKIE_NAME (line 4) | const COOKIE_NAME = "av_session";
  constant SESSION_TTL_MS (line 5) | const SESSION_TTL_MS = 30 * 24 * 60 * 60 * 1000;
  function getSessionToken (line 7) | function getSessionToken(request: Request): string | null {
  function serializeCookie (line 22) | function serializeCookie(value: string, maxAgeSeconds: number, secure: b...
  function buildSessionCookie (line 36) | function buildSessionCookie(token: string, request: Request): string {
  function buildClearSessionCookie (line 42) | function buildClearSessionCookie(request: Request): string {
  function createSession (line 47) | async function createSession(env: Env, userId: string): Promise<string> {
  function deleteSession (line 60) | async function deleteSession(env: Env, token: string): Promise<void> {
  function getSessionUser (line 65) | async function getSessionUser(

FILE: functions/_lib/validators.ts
  constant MIN_PASSWORD_LENGTH (line 1) | const MIN_PASSWORD_LENGTH = 8;
  function normalizeEmail (line 3) | function normalizeEmail(email: string): string {
  function isValidEmail (line 7) | function isValidEmail(email: string): boolean {
  function isValidPassword (line 11) | function isValidPassword(password: string): boolean {

FILE: functions/_types.ts
  type Env (line 1) | interface Env {

FILE: functions/api/auth/login.ts
  type LoginPayload (line 7) | interface LoginPayload {

FILE: functions/api/auth/register.ts
  type RegisterPayload (line 7) | interface RegisterPayload {

FILE: functions/api/auth/request-password-reset.ts
  type ResetRequestPayload (line 7) | interface ResetRequestPayload {
  constant RESET_COOLDOWN_MS (line 11) | const RESET_COOLDOWN_MS = 60 * 1000;

FILE: functions/api/auth/resend-verification.ts
  type ResendPayload (line 7) | interface ResendPayload {
  constant RESEND_COOLDOWN_MS (line 11) | const RESEND_COOLDOWN_MS = 60 * 1000;

FILE: functions/api/auth/reset-password.ts
  type ResetPayload (line 7) | interface ResetPayload {

FILE: functions/api/auth/verify-email.ts
  type VerifyPayload (line 6) | interface VerifyPayload {

FILE: migrations/0001_auth.sql
  type users (line 1) | CREATE TABLE IF NOT EXISTS users (
  type sessions (line 11) | CREATE TABLE IF NOT EXISTS sessions (
  type email_verification_tokens (line 21) | CREATE TABLE IF NOT EXISTS email_verification_tokens (
  type password_reset_tokens (line 31) | CREATE TABLE IF NOT EXISTS password_reset_tokens (
  type idx_sessions_user_id (line 41) | CREATE INDEX IF NOT EXISTS idx_sessions_user_id ON sessions(user_id)
  type idx_email_tokens_user_id (line 42) | CREATE INDEX IF NOT EXISTS idx_email_tokens_user_id ON email_verificatio...
  type idx_reset_tokens_user_id (line 43) | CREATE INDEX IF NOT EXISTS idx_reset_tokens_user_id ON password_reset_to...

FILE: packages/rx-nested-bean/src/index.ts
  function useEffectOnce (line 15) | function useEffectOnce(effect: () => void | (() => void)): void {
  function useUpdateEffect (line 19) | function useUpdateEffect(
  type BeanControlNode (line 34) | type BeanControlNode = {
  type DataTree (line 42) | type DataTree<T = Record<string, any>> = {
  class FreezableBehaviorSubject (line 78) | class FreezableBehaviorSubject<T> extends BehaviorSubject<T> {
    method next (line 79) | next(value: T): void {
  type IBeanOpName (line 304) | type IBeanOpName = "get" | "set" | "use" | "$";
  type StringKey (line 306) | type StringKey<T> = Extract<keyof T, string>;
  type INestedBean (line 307) | interface INestedBean<T> {
  type AnyFunc (line 318) | type AnyFunc = (...args: any[]) => any;
  type IWrappedNestedBean (line 320) | type IWrappedNestedBean<T> = INestedBean<T> & {
  method ownKeys (line 349) | ownKeys(target) {
  method get (line 359) | get(target: any, actionAndProp) {
  type RenderingTask (line 424) | type RenderingTask = () => void;
  type CleanupTask (line 425) | type CleanupTask = () => void;
  type IWeakRefImpl (line 486) | interface IWeakRefImpl<T> {
  type IWeakRefConstructor (line 490) | interface IWeakRefConstructor {
  type TFinalBean (line 502) | type TFinalBean = typeof init extends undefined
  method get (line 570) | get(_: any, p: string) {
  function useStateFromObservable (line 622) | function useStateFromObservable<T>(
  type PathImpl (line 676) | type PathImpl<T, Key extends keyof T> = Key extends string
  type BeanPath (line 682) | type BeanPath<T> = PathImpl<T, keyof T> | keyof T;
  type PathValue (line 684) | type PathValue<T, P extends BeanPath<T>> = P extends `${infer Key}.${inf...

FILE: packages/service-bus-portal/examples/basic-usage.ts
  function basicWorkerExample (line 5) | async function basicWorkerExample() {
  function multiPortalExample (line 28) | async function multiPortalExample() {
  function eventTargetExample (line 62) | async function eventTargetExample() {

FILE: packages/service-bus-portal/examples/comprehensive-example.ts
  type WorkerServices (line 15) | interface WorkerServices {
  type IframeServices (line 22) | interface IframeServices {
  type LocalServices (line 28) | interface LocalServices {
  class PortalApplication (line 38) | class PortalApplication {
    method constructor (line 44) | constructor() {
    method initialize (line 48) | async initialize() {
    method setupWorkerPortal (line 70) | private async setupWorkerPortal() {
    method setupIframePortal (line 99) | private async setupIframePortal() {
    method setupLocalPortal (line 131) | private async setupLocalPortal() {
    method setupComposer (line 197) | private async setupComposer() {
    method performComplexOperation (line 221) | async performComplexOperation() {
    method performConcurrentOperations (line 250) | async performConcurrentOperations() {
    method demonstrateBidirectionalCommunication (line 274) | async demonstrateBidirectionalCommunication() {
    method cleanup (line 294) | async cleanup() {
  function runComprehensiveExample (line 308) | async function runComprehensiveExample() {
  function createStatusElement (line 338) | function createStatusElement() {
  function createControlPanel (line 351) | function createControlPanel() {

FILE: packages/service-bus-portal/examples/iframe-example.ts
  type IframeServices (line 11) | interface IframeServices {
  function setupIframeCommunication (line 20) | async function setupIframeCommunication() {
  function setupIframeEventHandling (line 76) | function setupIframeEventHandling(iframe: HTMLIFrameElement) {

FILE: packages/service-bus-portal/examples/worker-example.ts
  type WorkerServices (line 11) | interface WorkerServices {
  function setupWorkerCommunication (line 20) | async function setupWorkerCommunication() {
  function setupWorkerEventHandling (line 71) | function setupWorkerEventHandling(worker: Worker) {
  function runWorkerExample (line 156) | async function runWorkerExample() {

FILE: packages/service-bus-portal/src/core.ts
  method constructor (line 20) | constructor(
  method onMessage (line 31) | onMessage(handler: (message: PortalMessage) => void): void {
  method isConnected (line 35) | isConnected(): boolean {
  method generateMessageId (line 39) | generateMessageId(): string {
  method notifyHandlers (line 43) | protected notifyHandlers(message: PortalMessage): void {
  method validateMessage (line 54) | protected validateMessage(message: PortalMessage): boolean {
  class PostMessagePortal (line 64) | class PostMessagePortal extends BasePortal {
    method constructor (line 68) | constructor(
    method send (line 78) | async send(message: PortalMessage): Promise<void> {
    method connect (line 101) | async connect(): Promise<void> {
    method disconnect (line 120) | async disconnect(): Promise<void> {
    method getTargetInfo (line 131) | getTargetInfo(): PortalTargetInfo {
    method getEventTarget (line 140) | private getEventTarget(): EventTarget {
    method getTargetOrigin (line 144) | private getTargetOrigin(): string {
  class EventTargetPortal (line 157) | class EventTargetPortal extends BasePortal {
    method constructor (line 162) | constructor(
    method send (line 174) | async send(message: PortalMessage): Promise<void> {
    method connect (line 189) | async connect(): Promise<void> {
    method disconnect (line 206) | async disconnect(): Promise<void> {
    method getTargetInfo (line 217) | getTargetInfo(): PortalTargetInfo {

FILE: packages/service-bus-portal/src/factory.ts
  class PortalFactory (line 11) | class PortalFactory {
    method createPostMessagePortal (line 15) | static createPostMessagePortal(
    method createEventTargetPortal (line 35) | static createEventTargetPortal(
    method createWorkerPortal (line 57) | static createWorkerPortal(
    method createWindowPortal (line 87) | static createWindowPortal(
    method createIframePortal (line 106) | static createIframePortal(
  class PortalComposer (line 139) | class PortalComposer {
    method addPortal (line 147) | addPortal(portal: CommunicationPortal): void {
    method removePortal (line 154) | removePortal(portalId: string): void {
    method createConnector (line 167) | createConnector(
    method createProxy (line 184) | createProxy<T = unknown>(portalId: string): PortalServiceBusProxy<T> {
    method connectAll (line 198) | async connectAll(): Promise<void> {
    method disconnectAll (line 206) | async disconnectAll(): Promise<void> {
    method getPortal (line 214) | getPortal(portalId: string): CommunicationPortal | undefined {
    method listPortals (line 221) | listPortals(): CommunicationPortal[] {

FILE: packages/service-bus-portal/src/service-bus.ts
  class PortalServiceBusConnector (line 9) | class PortalServiceBusConnector {
    method constructor (line 15) | constructor(
    method connect (line 26) | async connect(): Promise<void> {
    method disconnect (line 30) | async disconnect(): Promise<void> {
    method setupMessageHandling (line 34) | private setupMessageHandling(): void {
    method handleInvoke (line 42) | private async handleInvoke(message: PortalMessage): Promise<void> {
  class PortalServiceBusProxy (line 92) | class PortalServiceBusProxy<T = unknown> {
    method constructor (line 100) | constructor(portal: CommunicationPortal) {
    method connect (line 105) | async connect(): Promise<void> {
    method disconnect (line 109) | async disconnect(): Promise<void> {
    method setupMessageHandling (line 120) | private setupMessageHandling(): void {
    method invoke (line 141) | private async invoke(key: string, ...args: unknown[]): Promise<unknown> {
    method createProxy (line 179) | createProxy(): T {

FILE: packages/service-bus-portal/src/types.ts
  type CommunicationPortal (line 6) | interface CommunicationPortal {
  type PortalType (line 29) | type PortalType =
  type PortalMessage (line 41) | interface PortalMessage {
  type PortalTargetInfo (line 59) | interface PortalTargetInfo {
  type PortalConfig (line 69) | interface PortalConfig {
  type PortalSecurityConfig (line 81) | interface PortalSecurityConfig {

FILE: public/worker-portal.js
  function demonstrateWorkerServices (line 30) | async function demonstrateWorkerServices() {

FILE: scripts/check-i18n-coverage.cjs
  function findChineseFiles (line 10) | function findChineseFiles() {
  function findI18nFiles (line 23) | function findI18nFiles() {
  function countChineseLines (line 36) | function countChineseLines(filePath) {
  function hasI18n (line 53) | function hasI18n(filePath) {

FILE: scripts/check-i18n-coverage.js
  function findChineseFiles (line 10) | function findChineseFiles() {
  function findI18nFiles (line 23) | function findI18nFiles() {
  function countChineseLines (line 36) | function countChineseLines(filePath) {
  function hasI18n (line 53) | function hasI18n(filePath) {

FILE: scripts/metrics/feature-structure.cjs
  constant FEATURE_ROOTS (line 6) | const FEATURE_ROOTS = [
  constant IGNORE_DIRS (line 12) | const IGNORE_DIRS = new Set([
  constant IGNORE_FILES (line 22) | const IGNORE_FILES = new Set([".DS_Store"]);
  function createColors (line 28) | function createColors(enabled) {
  constant TREE (line 41) | const TREE = {
  function parseArgs (line 53) | function parseArgs(argv) {
  function printHelp (line 74) | function printHelp() {
  function shouldIgnoreDir (line 87) | function shouldIgnoreDir(name) {
  function shouldIgnoreFile (line 91) | function shouldIgnoreFile(name) {
  function collectFeatureDirs (line 95) | function collectFeatureDirs(rootDir) {
  function walkDir (line 107) | function walkDir(dirPath, stats) {
  function collectSubdirs (line 122) | function collectSubdirs(dirPath) {
  function buildFeatureStats (line 131) | function buildFeatureStats(rootDir, featureName) {
  function toRelativePath (line 144) | function toRelativePath(p) {
  function buildReport (line 152) | function buildReport() {
  function getBranchLabel (line 204) | function getBranchLabel(rootPath) {
  function getBranchComment (line 208) | function getBranchComment(branch) {
  function getSubdirComment (line 213) | function getSubdirComment(subdir) {
  function renderTree (line 229) | function renderTree(report, c) {
  function formatText (line 293) | function formatText(report, colorize) {
  function ensureDir (line 315) | function ensureDir(dirPath) {
  function writeOutput (line 319) | function writeOutput(outDir, report) {
  function main (line 330) | function main() {

FILE: scripts/metrics/top-loc.cjs
  constant SEARCH_ROOTS (line 6) | const SEARCH_ROOTS = ["src", "packages"];
  constant IGNORE_DIRS (line 7) | const IGNORE_DIRS = new Set([
  constant IGNORE_FILES (line 17) | const IGNORE_FILES = new Set([".DS_Store"]);
  constant DEFAULT_LIMIT (line 18) | const DEFAULT_LIMIT = 20;
  function createColors (line 24) | function createColors(enabled) {
  function parseArgs (line 41) | function parseArgs(argv) {
  function printHelp (line 68) | function printHelp() {
  function shouldIgnoreDir (line 82) | function shouldIgnoreDir(name) {
  function shouldIgnoreFile (line 86) | function shouldIgnoreFile(name) {
  function countLines (line 90) | function countLines(filePath) {
  function walkDir (line 98) | function walkDir(dirPath, results) {
  function collectFiles (line 114) | function collectFiles() {
  function getExtColor (line 128) | function getExtColor(ext, c) {
  function createBar (line 140) | function createBar(value, max, width, c) {
  function formatText (line 147) | function formatText(files, limit, colorize) {
  function ensureDir (line 189) | function ensureDir(dirPath) {
  function writeOutput (line 193) | function writeOutput(outDir, content) {
  function main (line 204) | function main() {

FILE: src/App.tsx
  function AppContent (line 5) | function AppContent() {

FILE: src/common/components/common/breakpoint-provider.tsx
  constant BREAKPOINTS (line 9) | const BREAKPOINTS = {
  type Breakpoint (line 17) | type Breakpoint = keyof typeof BREAKPOINTS;
  type BreakpointContextValue (line 21) | interface BreakpointContextValue {
  function BreakpointProvider (line 33) | function BreakpointProvider({ children }: { children: ReactNode }) {
  function useBreakpointContext (line 66) | function useBreakpointContext() {

FILE: src/common/components/common/client-breakpoint-provider.tsx
  type ClientBreakpointProviderProps (line 4) | interface ClientBreakpointProviderProps {
  function ClientBreakpointProvider (line 8) | function ClientBreakpointProvider({ children }: ClientBreakpointProvider...

FILE: src/common/components/common/icon-registry.tsx
  type IconRegistryProps (line 5) | interface IconRegistryProps {
  function IconRegistry (line 11) | function IconRegistry({ id, className, fallbackIcon }: IconRegistryProps) {

FILE: src/common/components/common/language-toggle.tsx
  type LanguageToggleProps (line 12) | interface LanguageToggleProps {
  function LanguageToggle (line 21) | function LanguageToggle({ className }: LanguageToggleProps) {

FILE: src/common/components/common/logo.tsx
  function Logo (line 1) | function Logo() {

FILE: src/common/components/common/plugin-router.tsx
  function renderRoutes (line 6) | function renderRoutes(nodes: RouteNode[]): React.ReactNode {

FILE: src/common/components/common/role-badge.tsx
  type RoleType (line 3) | type RoleType = "moderator" | "participant";
  type RoleBadgeProps (line 5) | interface RoleBadgeProps {
  function RoleBadge (line 12) | function RoleBadge({

FILE: src/common/components/common/status-indicator.tsx
  type DiscussionStatus (line 3) | type DiscussionStatus = "active" | "paused";
  type StatusIndicatorProps (line 5) | interface StatusIndicatorProps {
  function StatusIndicator (line 10) | function StatusIndicator({ status, className }: StatusIndicatorProps) {

FILE: src/common/components/common/theme-toggle.tsx
  type ThemeToggleProps (line 6) | interface ThemeToggleProps {
  function ThemeToggle (line 10) | function ThemeToggle({ className }: ThemeToggleProps) {

FILE: src/common/components/common/theme/context.tsx
  type Theme (line 4) | type Theme = 'light' | 'dark' | 'system';
  type ThemeContextValue (line 6) | interface ThemeContextValue {
  constant THEME_KEY (line 16) | const THEME_KEY = 'app-theme';
  function getSystemTheme (line 18) | function getSystemTheme(): 'light' | 'dark' {
  function ThemeProvider (line 22) | function ThemeProvider({ children }: { children: React.ReactNode }) {
  function useTheme (line 98) | function useTheme() {

FILE: src/common/components/common/theme/toggle.tsx
  type ThemeToggleProps (line 7) | interface ThemeToggleProps {
  function ThemeToggle (line 11) | function ThemeToggle({ className }: ThemeToggleProps) {

FILE: src/common/components/layout/page-container.tsx
  type PageContainerProps (line 8) | interface PageContainerProps {

FILE: src/common/components/layout/responsive-container.tsx
  type ResponsiveContainerProps (line 5) | interface ResponsiveContainerProps {
  function ResponsiveContainer (line 14) | function ResponsiveContainer({

FILE: src/common/components/layouts/scrollable-layout.tsx
  type ScrollableLayoutProps (line 11) | interface ScrollableLayoutProps {
  type ScrollableLayoutRef (line 26) | interface ScrollableLayoutRef {

FILE: src/common/components/ui/auto-resize-textarea.tsx
  type AutoResizeTextareaProps (line 6) | interface AutoResizeTextareaProps

FILE: src/common/components/ui/avatar.tsx
  type LoadingStatus (line 28) | type LoadingStatus = "idle" | "loading" | "loaded" | "error";

FILE: src/common/components/ui/badge.tsx
  type BadgeProps (line 26) | interface BadgeProps
  function Badge (line 30) | function Badge({ className, variant, ...props }: BadgeProps) {

FILE: src/common/components/ui/button.tsx
  type ButtonProps (line 37) | interface ButtonProps

FILE: src/common/components/ui/markdown/code-block-container.tsx
  type CodeBlockHeaderProps (line 4) | interface CodeBlockHeaderProps {
  function CodeBlockHeader (line 13) | function CodeBlockHeader({ language, code, actions }: CodeBlockHeaderPro...
  type CodeBlockContainerProps (line 26) | interface CodeBlockContainerProps {
  function CodeBlockContainer (line 36) | function CodeBlockContainer({ language, code, children, actions }: CodeB...

FILE: src/common/components/ui/markdown/code-block.tsx
  type CodeBlockAction (line 5) | type CodeBlockAction = {
  function CodeBlock (line 13) | function CodeBlock({ className = "", children, codeBlockActions }: React...

FILE: src/common/components/ui/markdown/components/error-boundary.tsx
  type MarkdownErrorBoundaryProps (line 3) | interface MarkdownErrorBoundaryProps {
  type MarkdownErrorBoundaryState (line 8) | interface MarkdownErrorBoundaryState {
  class MarkdownErrorBoundary (line 16) | class MarkdownErrorBoundary extends Component<
    method constructor (line 20) | constructor(props: MarkdownErrorBoundaryProps) {
    method getDerivedStateFromError (line 25) | static getDerivedStateFromError() {
    method componentDidCatch (line 29) | componentDidCatch(error: Error, errorInfo: ErrorInfo) {
    method render (line 34) | render() {

FILE: src/common/components/ui/markdown/components/mermaid-renderer.ts
  type MermaidRenderState (line 4) | enum MermaidRenderState {
  type MermaidRenderResult (line 13) | interface MermaidRenderResult {
  type RenderAttemptResult (line 21) | interface RenderAttemptResult {
  class MermaidRenderer (line 31) | class MermaidRenderer {
    method constructor (line 41) | constructor() {
    method initializeMermaid (line 45) | private async initializeMermaid() {
    method setupRenderPipeline (line 54) | private setupRenderPipeline() {
    method tryRenderChart (line 98) | private tryRenderChart(chart: string): Observable<RenderAttemptResult> {
    method renderChart (line 116) | private async renderChart(chart: string): Promise<RenderAttemptResult> {
    method updateState (line 159) | private updateState(result: RenderAttemptResult) {
    method isMermaidComplete (line 178) | private isMermaidComplete(chart: string): boolean {
    method updateChart (line 199) | public updateChart(chart: string) {
    method getRenderResult (line 204) | public getRenderResult(): Observable<MermaidRenderResult> {
    method destroy (line 221) | public destroy() {

FILE: src/common/components/ui/markdown/components/mermaid.tsx
  type MermaidProps (line 8) | interface MermaidProps {
  function MermaidChart (line 12) | function MermaidChart({ chart }: MermaidProps) {

FILE: src/common/components/ui/markdown/copy-code-button.tsx
  type CopyCodeButtonProps (line 4) | interface CopyCodeButtonProps {
  function CopyCodeButton (line 10) | function CopyCodeButton({ text, className, style }: CopyCodeButtonProps) {

FILE: src/common/components/ui/markdown/index.tsx
  type RehypePlugin (line 18) | type RehypePlugin = Plugin<[], Root>;
  type RemarkPlugin (line 19) | type RemarkPlugin = Plugin<[], Root>;
  type MarkdownWithActionsProps (line 22) | interface MarkdownWithActionsProps extends MarkdownProps {
  function Markdown (line 26) | function Markdown({

FILE: src/common/components/ui/markdown/types.ts
  type MarkdownProps (line 8) | interface MarkdownProps {

FILE: src/common/components/ui/modal/context.tsx
  function useModalContext (line 6) | function useModalContext() {

FILE: src/common/components/ui/modal/hooks.ts
  function useModal (line 4) | function useModal() {

FILE: src/common/components/ui/modal/provider.tsx
  function ModalProvider (line 15) | function ModalProvider({ children }: { children: React.ReactNode }) {

FILE: src/common/components/ui/modal/types.ts
  type ModalOptions (line 1) | interface ModalOptions {
  type ModalState (line 14) | interface ModalState {
  type ModalContextValue (line 19) | interface ModalContextValue {

FILE: src/common/components/ui/sheet.tsx
  type SheetContentProps (line 49) | interface SheetContentProps

FILE: src/common/components/ui/skeleton.tsx
  function Skeleton (line 3) | function Skeleton({

FILE: src/common/components/ui/smart-avatar.tsx
  type SmartAvatarProps (line 7) | interface SmartAvatarProps {
  function SmartAvatar (line 20) | function SmartAvatar({ src, alt, className, fallback }: SmartAvatarProps) {

FILE: src/common/components/ui/toast.tsx
  type ToastProps (line 113) | type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>
  type ToastActionElement (line 115) | type ToastActionElement = React.ReactElement<typeof ToastAction>

FILE: src/common/components/ui/toaster.tsx
  function Toaster (line 11) | function Toaster() {

FILE: src/common/features/agents/components/add-agent-dialog/add-agent-dialog-content.tsx
  function AddAgentDialogContent (line 13) | function AddAgentDialogContent() {

FILE: src/common/features/agents/components/add-agent-dialog/use-add-agent-dialog.tsx
  function useAddAgentDialog (line 5) | function useAddAgentDialog() {

FILE: src/common/features/agents/components/agent-tools/display-quick-actions.tool.ts
  function createDisplayQuickActionsTool (line 10) | function createDisplayQuickActionsTool(onShowQuickActions: (suggestions:...

FILE: src/common/features/agents/components/agent-tools/get-current-time.tool.ts
  type GetCurrentTimeResult (line 5) | interface GetCurrentTimeResult {

FILE: src/common/features/agents/components/agent-tools/update-agent.tool.tsx
  type AgentUpdateArgs (line 6) | interface AgentUpdateArgs {
  type ToolInvocationLike (line 18) | interface ToolInvocationLike {
  function AgentUpdateResult (line 25) | function AgentUpdateResult({ args }: { args: AgentUpdateArgs }) {
  function createUpdateAgentTool (line 69) | function createUpdateAgentTool(onAgentCreate?: (agent: Omit<AgentDef, "i...

FILE: src/common/features/agents/components/avatars/clickable-agent-avatar.tsx
  type ClickableAgentAvatarProps (line 12) | interface ClickableAgentAvatarProps {
  function ClickableAgentAvatar (line 36) | function ClickableAgentAvatar({

FILE: src/common/features/agents/components/avatars/use-avatar-interaction.ts
  type UseAvatarInteractionOptions (line 8) | type UseAvatarInteractionOptions = {
  function useAvatarInteraction (line 14) | function useAvatarInteraction<T extends HTMLElement>({

FILE: src/common/features/agents/components/cards/agent-card.tsx
  type AgentCardMode (line 14) | type AgentCardMode = "preview" | "detail" | "management";
  type AgentCardProps (line 17) | interface AgentCardProps {

FILE: src/common/features/agents/components/cards/agent-chat-card.tsx
  type AgentChatCardProps (line 10) | interface AgentChatCardProps {

FILE: src/common/features/agents/components/cards/agent-group-card.tsx
  type AgentGroupCardProps (line 10) | interface AgentGroupCardProps {

FILE: src/common/features/agents/components/cards/agent-hover-card.tsx
  type AgentHoverCardProps (line 24) | interface AgentHoverCardProps {

FILE: src/common/features/agents/components/cards/agent-info-card.tsx
  type AgentInfoCardProps (line 9) | interface AgentInfoCardProps {
  function AgentInfoCard (line 20) | function AgentInfoCard({

FILE: src/common/features/agents/components/cards/agent-select-card.tsx
  type AgentSelectCardProps (line 6) | interface AgentSelectCardProps {

FILE: src/common/features/agents/components/cards/modern-agent-card.tsx
  type ModernAgentCardProps (line 18) | interface ModernAgentCardProps {

FILE: src/common/features/agents/components/configuration/agent-configuration-assistant.tsx
  type AgentConfigurationAssistantProps (line 15) | interface AgentConfigurationAssistantProps {
  function AgentConfigurationAssistantInner (line 21) | function AgentConfigurationAssistantInner({ onAgentCreate, className, ed...
  function AgentConfigurationAssistant (line 131) | function AgentConfigurationAssistant(props: AgentConfigurationAssistantP...

FILE: src/common/features/agents/components/configuration/agent-configuration-preview.tsx
  type AgentConfigArgs (line 2) | interface AgentConfigArgs {
  function AgentConfigurationPreview (line 11) | function AgentConfigurationPreview({ args }: { args: AgentConfigArgs }) {

FILE: src/common/features/agents/components/configuration/use-agent-configuration-tools.tsx
  function useAgentConfigurationTools (line 7) | function useAgentConfigurationTools(

FILE: src/common/features/agents/components/dialogs/add-agent-dialog.tsx
  function AddAgentDialogContent (line 17) | function AddAgentDialogContent() {
  function useAddAgentDialog (line 125) | function useAddAgentDialog() {

FILE: src/common/features/agents/components/dialogs/custom-team-dialog.tsx
  type CustomTeamMember (line 9) | interface CustomTeamMember {
  type CustomTeamDialogContentProps (line 14) | interface CustomTeamDialogContentProps {
  function useCustomTeamDialog (line 117) | function useCustomTeamDialog() {

FILE: src/common/features/agents/components/dialogs/edit-agent-dialog.tsx
  type EditAgentDialogContentProps (line 10) | interface EditAgentDialogContentProps {
  function EditAgentDialogContent (line 16) | function EditAgentDialogContent({
  function useEditAgentDialog (line 36) | function useEditAgentDialog() {

FILE: src/common/features/agents/components/floating-agent-info.tsx
  type FloatingAgentInfoProps (line 8) | interface FloatingAgentInfoProps {
  function FloatingAgentInfo (line 16) | function FloatingAgentInfo({

FILE: src/common/features/agents/components/forms/agent-embedded-form.tsx
  type AgentEmbeddedFormProps (line 33) | interface AgentEmbeddedFormProps {
  function AgentEmbeddedForm (line 39) | function AgentEmbeddedForm({

FILE: src/common/features/agents/components/forms/agent-form.tsx
  type AgentFormProps (line 22) | interface AgentFormProps {
  function AgentForm (line 29) | function AgentForm({

FILE: src/common/features/agents/components/lists/agent-combination-list.tsx
  type AgentCombinationListProps (line 7) | interface AgentCombinationListProps {

FILE: src/common/features/agents/components/lists/agent-list.tsx
  type AgentListProps (line 6) | interface AgentListProps {
  function AgentList (line 15) | function AgentList({

FILE: src/common/features/agents/components/lists/agent-select-list.tsx
  type AgentSelectListProps (line 9) | interface AgentSelectListProps {

FILE: src/common/features/agents/components/member-management.tsx
  type MemberManagementProps (line 6) | interface MemberManagementProps {
  function MemberManagement (line 11) | function MemberManagement({ className }: MemberManagementProps) {

FILE: src/common/features/agents/components/preview/agent-preview-chat.tsx
  type AgentPreviewChatProps (line 12) | interface AgentPreviewChatProps {
  function AgentPreviewChatInner (line 19) | function AgentPreviewChatInner({
  function AgentPreviewChat (line 92) | function AgentPreviewChat(props: AgentPreviewChatProps) {

FILE: src/common/features/all-in-one-agent/components/agent-tools/calculator.tool.ts
  type CalculatorResult (line 6) | interface CalculatorResult {

FILE: src/common/features/all-in-one-agent/components/agent-tools/clear-suggestions.tool.ts
  function createClearSuggestionsTool (line 6) | function createClearSuggestionsTool(

FILE: src/common/features/all-in-one-agent/components/agent-tools/get-current-time.tool.ts
  type GetCurrentTimeResult (line 6) | interface GetCurrentTimeResult {

FILE: src/common/features/all-in-one-agent/components/agent-tools/html-preview-from-file.tool.tsx
  type HtmlPreviewFromFileToolParams (line 9) | interface HtmlPreviewFromFileToolParams {
  type HtmlPreviewFromFileToolResult (line 13) | interface HtmlPreviewFromFileToolResult {
  function readHtmlFile (line 22) | async function readHtmlFile(filePath: string): Promise<{ success: boolea...
  function createHtmlPreviewFromFileTool (line 64) | function createHtmlPreviewFromFileTool(

FILE: src/common/features/all-in-one-agent/components/agent-tools/provide-next-steps.tool.ts
  type ProvideNextStepsParams (line 6) | interface ProvideNextStepsParams {
  function createProvideNextStepsTool (line 15) | function createProvideNextStepsTool(

FILE: src/common/features/all-in-one-agent/components/agent-tools/recommend-topics.tool.ts
  type RecommendTopicsParams (line 6) | interface RecommendTopicsParams {
  function createRecommendTopicsTool (line 15) | function createRecommendTopicsTool(

FILE: src/common/features/all-in-one-agent/components/agent-tools/request-user-choice.tool.ts
  type RequestUserChoiceParams (line 6) | interface RequestUserChoiceParams {
  function createRequestUserChoiceTool (line 16) | function createRequestUserChoiceTool(

FILE: src/common/features/all-in-one-agent/components/agent-tools/send-message-to-iframe.tool.tsx
  type SendMessageToIframeToolParams (line 6) | interface SendMessageToIframeToolParams {
  type SendMessageToIframeToolResult (line 12) | interface SendMessageToIframeToolResult {
  function createSendMessageToIframeTool (line 23) | function createSendMessageToIframeTool(

FILE: src/common/features/all-in-one-agent/components/agent-tools/subscribe-iframe-messages.tool.tsx
  type SubscribeIframeMessagesToolParams (line 7) | interface SubscribeIframeMessagesToolParams {
  type SubscribeIframeMessagesToolResult (line 14) | interface SubscribeIframeMessagesToolResult {
  class IframeMessageSubscriptionManager (line 28) | class IframeMessageSubscriptionManager {
    method subscribe (line 47) | subscribe(
    method unsubscribe (line 78) | unsubscribe(subscriptionId: string): boolean {
    method handleMessage (line 89) | handleMessage(iframeId: string, message: { type?: string; data?: unkno...
    method getSubscription (line 117) | getSubscription(subscriptionId: string) {
    method getAllSubscriptions (line 122) | getAllSubscriptions() {
    method clearAll (line 134) | clearAll() {
  function createSubscribeIframeMessagesTool (line 154) | function createSubscribeIframeMessagesTool(

FILE: src/common/features/all-in-one-agent/components/agent-tools/weather.tool.ts
  type WeatherResult (line 6) | interface WeatherResult {

FILE: src/common/features/all-in-one-agent/components/smart-assistant-dialog.tsx
  type Message (line 3) | interface Message {
  constant MOCK_HISTORY (line 9) | const MOCK_HISTORY: Message[] = [

FILE: src/common/features/all-in-one-agent/hooks/use-all-in-one-agent-mode.tsx
  type AllInOneAgentMode (line 3) | type AllInOneAgentMode = "fullscreen" | "dock";
  type AllInOneAgentModeContextProps (line 5) | interface AllInOneAgentModeContextProps {
  function useAllInOneAgentMode (line 22) | function useAllInOneAgentMode() {

FILE: src/common/features/all-in-one-agent/pages/all-in-one-agent-page.tsx
  function AllInOneAgentPage (line 22) | function AllInOneAgentPage() {

FILE: src/common/features/app/components/activity-bar.tsx
  type ActivityBarProps (line 12) | interface ActivityBarProps {
  constant AUTH_ITEM_ID (line 16) | const AUTH_ITEM_ID = "auth-entry";
  constant GITHUB_ITEM_ID (line 17) | const GITHUB_ITEM_ID = "github-entry";
  function ActivityBarComponent (line 19) | function ActivityBarComponent({ className }: ActivityBarProps) {

FILE: src/common/features/app/components/app-loading.tsx
  function AppLoading (line 3) | function AppLoading() {

FILE: src/common/features/app/components/mobile-bottom-bar.tsx
  type Scene (line 9) | type Scene = "discussions" | "chat" | "agents";
  type MobileBottomBarProps (line 11) | interface MobileBottomBarProps {
  function MobileBottomBar (line 17) | function MobileBottomBar({

FILE: src/common/features/auth/components/auth-gate.tsx
  constant AUTH_PATHS (line 7) | const AUTH_PATHS = ["/login", "/verify", "/forgot", "/reset"];
  type AuthGateProps (line 9) | interface AuthGateProps {
  function AuthGate (line 13) | function AuthGate({ children }: AuthGateProps) {

FILE: src/common/features/auth/components/auth-routes.tsx
  function AuthRoutes (line 7) | function AuthRoutes() {

FILE: src/common/features/auth/components/auth-shell.tsx
  type AuthShellProps (line 4) | interface AuthShellProps {
  function AuthShell (line 8) | function AuthShell({ children, className }: PropsWithChildren<AuthShellP...

FILE: src/common/features/auth/pages/forgot-password-page.tsx
  function ForgotPasswordPage (line 12) | function ForgotPasswordPage() {

FILE: src/common/features/auth/pages/login-page.tsx
  function LoginPage (line 13) | function LoginPage() {

FILE: src/common/features/auth/pages/reset-password-page.tsx
  function ResetPasswordPage (line 12) | function ResetPasswordPage() {

FILE: src/common/features/auth/pages/verify-email-page.tsx
  type VerifyStatus (line 9) | type VerifyStatus = "idle" | "loading" | "success" | "error";
  function VerifyEmailPage (line 11) | function VerifyEmailPage() {

FILE: src/common/features/chat/components/agent-chat/agent-chat-container.tsx
  type AgentChatContainerProps (line 19) | interface AgentChatContainerProps {
  type AgentChatContainerRef (line 32) | interface AgentChatContainerRef {

FILE: src/common/features/chat/components/agent-chat/agent-chat-header-with-info.tsx
  type AgentChatHeaderWithInfoProps (line 9) | interface AgentChatHeaderWithInfoProps {
  function AgentChatHeaderWithInfo (line 16) | function AgentChatHeaderWithInfo({

FILE: src/common/features/chat/components/agent-chat/agent-chat-header.tsx
  type AgentChatHeaderProps (line 6) | interface AgentChatHeaderProps {
  function AgentChatHeader (line 13) | function AgentChatHeader({

FILE: src/common/features/chat/components/agent-chat/agent-chat-input.tsx
  type AgentChatInputProps (line 5) | interface AgentChatInputProps {
  function AgentChatInput (line 18) | function AgentChatInput({

FILE: src/common/features/chat/components/agent-chat/agent-chat-messages.tsx
  type MessageStyleConfig (line 13) | interface MessageStyleConfig {
  type AvatarStyleConfig (line 28) | interface AvatarStyleConfig {
  type EmptyStateConfig (line 44) | interface EmptyStateConfig {
  constant MESSAGE_THEMES (line 54) | const MESSAGE_THEMES = {
  constant AVATAR_THEMES (line 83) | const AVATAR_THEMES = {
  type AgentChatMessagesProps (line 114) | interface AgentChatMessagesProps {
  type AgentChatMessagesRef (line 130) | interface AgentChatMessagesRef {

FILE: src/common/features/chat/components/agent-chat/agent-chat-provider-wrapper.tsx
  type AgentChatProviderWrapperProps (line 13) | interface AgentChatProviderWrapperProps {
  function AgentChatProviderWrapper (line 21) | function AgentChatProviderWrapper({

FILE: src/common/features/chat/components/agent-chat/tool-call-renderer.tsx
  type ToolCallRendererProps (line 6) | interface ToolCallRendererProps {

FILE: src/common/features/chat/components/chat-area.tsx
  type ChatAreaProps (line 20) | interface ChatAreaProps {
  function ChatArea (line 29) | function ChatArea({

FILE: src/common/features/chat/components/chat-empty-guide.tsx
  type ChatEmptyGuideProps (line 6) | interface ChatEmptyGuideProps {
  function ChatEmptyGuide (line 13) | function ChatEmptyGuide({

FILE: src/common/features/chat/components/chat-welcome-header.tsx
  type ChatWelcomeHeaderProps (line 4) | interface ChatWelcomeHeaderProps {
  function ChatWelcomeHeader (line 25) | function ChatWelcomeHeader({

FILE: src/common/features/chat/components/mention-suggestions.tsx
  type MentionSuggestionsProps (line 8) | interface MentionSuggestionsProps {
  function MentionSuggestions (line 19) | function MentionSuggestions({

FILE: src/common/features/chat/components/message-input-desktop.tsx
  type MessageInputProps (line 28) | interface MessageInputProps {

FILE: src/common/features/chat/components/message-input-mobile.tsx
  type MessageInputProps (line 26) | interface MessageInputProps {

FILE: src/common/features/chat/components/message-input.tsx
  type MessageInputRef (line 6) | interface MessageInputRef {
  type MessageInputProps (line 11) | interface MessageInputProps {

FILE: src/common/features/chat/components/message/interaction-overlay.tsx
  constant EMOJI_MAP (line 5) | const EMOJI_MAP = {
  constant PARTICLE_COLORS (line 10) | const PARTICLE_COLORS = {
  constant IMPACT_CONFIG (line 15) | const IMPACT_CONFIG = {
  function Splat (line 64) | function Splat({ x, y, type }: { x: number; y: number; type: 'poop' | 't...
  function FlyingEmoji (line 228) | function FlyingEmoji({ interaction, onComplete }: { interaction: Interac...
  function InteractionOverlay (line 329) | function InteractionOverlay() {

FILE: src/common/features/chat/components/message/message-capture.tsx
  type MessageCaptureProps (line 9) | interface MessageCaptureProps {
  function MessageCapture (line 14) | function MessageCapture({

FILE: src/common/features/chat/components/message/message-content-blocks.tsx
  type MessageContentBlocksProps (line 6) | interface MessageContentBlocksProps {
  function MessageContentBlocks (line 14) | function MessageContentBlocks({

FILE: src/common/features/chat/components/message/message-item-wechat.tsx
  type MessageItemWechatProps (line 11) | interface MessageItemWechatProps {
  constant TIME_DISPLAY_THRESHOLD (line 24) | const TIME_DISPLAY_THRESHOLD = 15 * 60 * 1000;
  function MessageItemWechat (line 26) | function MessageItemWechat({

FILE: src/common/features/chat/components/message/message-item.tsx
  type MessageItemProps (line 13) | interface MessageItemProps {
  function AvatarWithHoverCard (line 25) | function AvatarWithHoverCard({
  function MessageHeader (line 69) | function MessageHeader({
  function DesktopMessageHeader (line 102) | function DesktopMessageHeader({
  function MessageItem (line 138) | function MessageItem({

FILE: src/common/features/chat/components/message/message-list-desktop.tsx
  type MessageListDesktopProps (line 29) | interface MessageListDesktopProps {

FILE: src/common/features/chat/components/message/message-list-mobile.tsx
  type MessageListMobileProps (line 25) | interface MessageListMobileProps {

FILE: src/common/features/chat/components/message/message-list.tsx
  type MessageListProps (line 7) | interface MessageListProps {

FILE: src/common/features/chat/components/message/message-markdown-content.tsx
  type MessageMarkdownContentProps (line 3) | interface MessageMarkdownContentProps {
  function MessageMarkdownContent (line 8) | function MessageMarkdownContent({

FILE: src/common/features/chat/components/message/message-preview-dialog.tsx
  type MessagePreviewDialogProps (line 5) | interface MessagePreviewDialogProps {
  function MessagePreviewDialog (line 15) | function MessagePreviewDialog({

FILE: src/common/features/chat/components/message/tool-result-list.tsx
  type ToolResultListProps (line 6) | interface ToolResultListProps {
  function ToolResultList (line 20) | function ToolResultList({

FILE: src/common/features/chat/components/modern-chat-input.tsx
  type ModernChatInputProps (line 13) | interface ModernChatInputProps {
  function ModernChatInput (line 26) | function ModernChatInput({

FILE: src/common/features/chat/components/suggestions/suggestion.types.ts
  type Suggestion (line 1) | interface Suggestion {

FILE: src/common/features/chat/components/suggestions/suggestions-provider.tsx
  type SuggestionsProviderProps (line 6) | interface SuggestionsProviderProps {
  function SuggestionsProvider (line 13) | function SuggestionsProvider({

FILE: src/common/features/chat/hooks/use-poop-trigger.ts
  type TriggerInteraction (line 9) | type TriggerInteraction = (options: {
  type UsePoopTriggerOptions (line 17) | type UsePoopTriggerOptions = {
  function usePoopTriggerFromMessages (line 25) | function usePoopTriggerFromMessages({

FILE: src/common/features/chat/managers/chat-scroll.manager.ts
  class ChatScrollManager (line 3) | class ChatScrollManager {

FILE: src/common/features/chat/stores/chat-scroll.store.ts
  type ChatScrollState (line 3) | interface ChatScrollState {
  type ChatScrollActions (line 9) | interface ChatScrollActions {
  type ChatScrollStore (line 15) | type ChatScrollStore = ChatScrollState & ChatScrollActions;

FILE: src/common/features/chat/stores/interaction.store.ts
  type InteractionType (line 3) | type InteractionType = 'poop' | 'trash';
  type InteractionRect (line 5) | interface InteractionRect {
  type InteractionEvent (line 12) | interface InteractionEvent {
  constant INTERACTION_FLIGHT_MS (line 20) | const INTERACTION_FLIGHT_MS = 1400;
  type InteractionState (line 22) | interface InteractionState {

FILE: src/common/features/discussion/components/control/clear-messages-button.tsx
  type ClearMessagesButtonProps (line 8) | interface ClearMessagesButtonProps {
  function ClearMessagesButton (line 15) | function ClearMessagesButton({

FILE: src/common/features/discussion/components/control/discussion-controller.tsx
  function ControlButton (line 15) | function ControlButton({ isActive, onClick }: { isActive: boolean; onCli...
  function StatusIndicator (line 42) | function StatusIndicator({
  function ActionButtons (line 79) | function ActionButtons({
  type DiscussionControllerProps (line 127) | interface DiscussionControllerProps {
  function DiscussionController (line 135) | function DiscussionController({

FILE: src/common/features/discussion/components/control/use-discussion-control.ts
  type UseDiscussionControlProps (line 7) | interface UseDiscussionControlProps {
  function useDiscussionControl (line 17) | function useDiscussionControl({ status }: UseDiscussionControlProps) {

FILE: src/common/features/discussion/components/list/discussion-avatar.tsx
  type DiscussionAvatarProps (line 7) | interface DiscussionAvatarProps {
  function DiscussionAvatar (line 15) | function DiscussionAvatar({

FILE: src/common/features/discussion/components/list/discussion-item.tsx
  function DiscussionItem (line 21) | function DiscussionItem({

FILE: src/common/features/discussion/components/list/discussion-list-header.tsx
  type DiscussionListHeaderProps (line 7) | interface DiscussionListHeaderProps {
  function DiscussionListHeader (line 14) | function DiscussionListHeader({

FILE: src/common/features/discussion/components/list/discussion-list.tsx
  function DiscussionList (line 15) | function DiscussionList({

FILE: src/common/features/discussion/components/list/types.ts
  type DiscussionListProps (line 3) | interface DiscussionListProps {
  type DiscussionItemProps (line 9) | interface DiscussionItemProps {

FILE: src/common/features/discussion/components/member/add-member-dialog.tsx
  type AddMemberDialogProps (line 22) | interface AddMemberDialogProps {
  function AddMemberDialog (line 28) | function AddMemberDialog({ open, onOpenChange, members }: AddMemberDialo...

FILE: src/common/features/discussion/components/member/member-item.tsx
  type MemberItemProps (line 12) | interface MemberItemProps {
  function MemberExpandedContent (line 23) | function MemberExpandedContent({
  function MemberItem (line 124) | function MemberItem({

FILE: src/common/features/discussion/components/member/member-list.tsx
  type MemberListProps (line 21) | interface MemberListProps {
  function MemberList (line 27) | function MemberList({

FILE: src/common/features/discussion/components/member/member-skeleton.tsx
  function MemberSkeleton (line 4) | function MemberSkeleton() {

FILE: src/common/features/discussion/components/member/member-toggle-button.tsx
  type MemberToggleButtonProps (line 5) | interface MemberToggleButtonProps {
  function MemberToggleButton (line 12) | function MemberToggleButton({

FILE: src/common/features/discussion/components/member/mobile-member-drawer.tsx
  type MobileMemberDrawerProps (line 9) | interface MobileMemberDrawerProps {
  function MobileMemberDrawer (line 14) | function MobileMemberDrawer({

FILE: src/common/features/discussion/components/member/mobile-member-list.tsx
  type MobileMemberListProps (line 7) | interface MobileMemberListProps {
  function MobileMemberList (line 13) | function MobileMemberList({

FILE: src/common/features/discussion/components/member/quick-member-selector.tsx
  type QuickMemberSelectorProps (line 10) | interface QuickMemberSelectorProps {
  function QuickMemberSelector (line 15) | function QuickMemberSelector({

FILE: src/common/features/discussion/components/mobile/mobile-action-sheet.tsx
  type MobileActionSheetProps (line 10) | interface MobileActionSheetProps {
  function MobileActionSheet (line 16) | function MobileActionSheet({

FILE: src/common/features/discussion/components/mobile/mobile-header.tsx
  type MobileHeaderProps (line 16) | interface MobileHeaderProps {
  function MobileHeader (line 26) | function MobileHeader({

FILE: src/common/features/discussion/components/notes/discussion-notes-panel.tsx
  function DiscussionNotesPanel (line 8) | function DiscussionNotesPanel() {

FILE: src/common/features/discussion/components/settings/discussion-settings-button.tsx
  type DiscussionSettingsButtonProps (line 5) | interface DiscussionSettingsButtonProps {
  function DiscussionSettingsButton (line 11) | function DiscussionSettingsButton({

FILE: src/common/features/discussion/components/settings/discussion-settings-panel.tsx
  type ModerationStyle (line 6) | type ModerationStyle = "strict" | "relaxed";
  constant MODERATION_STYLE_OPTIONS (line 8) | const MODERATION_STYLE_OPTIONS: Array<{
  constant DEFAULT_TOOL_PERMISSIONS (line 16) | const DEFAULT_TOOL_PERMISSIONS: DiscussionSettings["toolPermissions"] = {
  type DiscussionSettingsPanelProps (line 21) | interface DiscussionSettingsPanelProps {
  function DiscussionSettingsPanel (line 26) | function DiscussionSettingsPanel({ settings, onSettingsChange }: Discuss...

FILE: src/common/features/discussion/components/settings/setting-item.tsx
  type SettingItemProps (line 5) | interface SettingItemProps {
  function SettingItem (line 14) | function SettingItem({

FILE: src/common/features/discussion/components/settings/setting-select.tsx
  type Option (line 11) | interface Option<T extends string = string> {
  type SettingSelectProps (line 18) | interface SettingSelectProps<T extends string = string> {
  function SettingSelect (line 30) | function SettingSelect<T extends string>({

FILE: src/common/features/discussion/components/settings/setting-slider.tsx
  type SettingSliderProps (line 5) | interface SettingSliderProps {
  function SettingSlider (line 22) | function SettingSlider({

FILE: src/common/features/discussion/components/settings/setting-switch.tsx
  type SettingSwitchProps (line 5) | interface SettingSwitchProps {
  function SettingSwitch (line 16) | function SettingSwitch({

FILE: src/common/features/discussion/components/sidebar/discussion-sidebar.tsx
  function DiscussionSidebar (line 7) | function DiscussionSidebar() {

FILE: src/common/features/home/components/agent-popover.tsx
  type AgentPopoverProps (line 10) | interface AgentPopoverProps {

FILE: src/common/features/home/components/initial-experience.tsx
  type InitialExperienceProps (line 14) | interface InitialExperienceProps {
  function InitialExperience (line 24) | function InitialExperience({

FILE: src/common/features/home/components/initial-input.tsx
  type InitialInputProps (line 8) | interface InitialInputProps {
  function InitialInput (line 14) | function InitialInput({

FILE: src/common/features/home/components/team-details-dialog.tsx
  type TeamMember (line 14) | interface TeamMember {
  type TeamConfig (line 20) | interface TeamConfig {
  type TeamDetailsDialogProps (line 26) | interface TeamDetailsDialogProps {
  function TeamDetailsDialog (line 32) | function TeamDetailsDialog({

FILE: src/common/features/home/components/welcome-header.tsx
  type WelcomeHeaderProps (line 5) | interface WelcomeHeaderProps {
  function WelcomeHeader (line 9) | function WelcomeHeader({ className }: WelcomeHeaderProps) {

FILE: src/common/features/world-class-chat/components/settings-panel/memory-setting.tsx
  function MemorySetting (line 9) | function MemorySetting(_props: SettingItemComponent) {

FILE: src/common/features/world-class-chat/components/settings-panel/prompt-setting.tsx
  function PromptSetting (line 9) | function PromptSetting(_props: SettingItemComponent) {

FILE: src/common/features/world-class-chat/components/settings-panel/settings-registry.ts
  function getSettingById (line 26) | function getSettingById(id: string): BaseSettingItem | undefined {
  function getAllSettings (line 31) | function getAllSettings(): BaseSettingItem[] {

FILE: src/common/features/world-class-chat/components/settings-panel/types.ts
  type BaseSettingItem (line 4) | interface BaseSettingItem {
  type SettingItemComponent (line 14) | interface SettingItemComponent {
  type SettingsRegistry (line 19) | type SettingsRegistry = Record<string, BaseSettingItem>;

FILE: src/common/features/world-class-chat/components/settings-panel/world-class-settings-panel.tsx
  type WorldClassSettingsPanelProps (line 7) | interface WorldClassSettingsPanelProps {
  function WorldClassSettingsPanel (line 11) | function WorldClassSettingsPanel({ onClose }: WorldClassSettingsPanelPro...

FILE: src/common/features/world-class-chat/components/world-class-chat-html-preview.tsx
  type WorldClassChatHtmlPreviewProps (line 6) | interface WorldClassChatHtmlPreviewProps {
  function WorldClassChatHtmlPreview (line 15) | function WorldClassChatHtmlPreview({

FILE: src/common/features/world-class-chat/copy-message-button.tsx
  type CopyMessageButtonProps (line 6) | interface CopyMessageButtonProps {
  function CopyMessageButton (line 11) | function CopyMessageButton({ text, className }: CopyMessageButtonProps) {

FILE: src/common/features/world-class-chat/hooks/use-iframe-manager.ts
  type IframeInfo (line 3) | interface IframeInfo {
  class IframeManager (line 11) | class IframeManager {
    method createIframe (line 16) | createIframe(key: string, type: IframeInfo['type'] = 'custom'): string {
    method registerElement (line 32) | registerElement(id: string, element: HTMLIFrameElement): void {
    method getIframe (line 41) | getIframe(id: string): IframeInfo | undefined {
    method getElement (line 46) | getElement(id: string): HTMLIFrameElement | undefined {
    method getAllIframes (line 52) | getAllIframes(): IframeInfo[] {
    method getIframeByKey (line 57) | getIframeByKey(key: string): IframeInfo | undefined {
    method removeIframe (line 62) | removeIframe(id: string): void {
    method cleanupExpired (line 71) | cleanupExpired(maxAge: number = 30 * 60 * 1000): void { // 默认30分钟
    method postMessage (line 85) | postMessage(id: string, message: unknown, targetOrigin: string = '*'):...
    method injectCSS (line 95) | injectCSS(id: string, css: string): boolean {
    method injectScript (line 107) | injectScript(id: string, script: string): boolean {
    method getContent (line 119) | getContent(id: string): string | null {
    method setContent (line 128) | setContent(id: string, html: string): boolean {
    method addListener (line 140) | addListener(event: string, callback: (iframe: IframeInfo) => void): vo...
    method removeListener (line 147) | removeListener(event: string, callback: (iframe: IframeInfo) => void):...
    method notifyListeners (line 154) | private notifyListeners(event: string, iframe: IframeInfo): void {
    method destroy (line 162) | destroy(): void {
  function useIframeManager (line 169) | function useIframeManager() {

FILE: src/common/features/world-class-chat/hooks/use-side-panel-manager.ts
  type SidePanelConfig (line 3) | interface SidePanelConfig {
  function useSidePanelManager (line 9) | function useSidePanelManager(initialConfigs: SidePanelConfig[]) {

FILE: src/common/features/world-class-chat/hooks/use-suggestions-manager.ts
  type SuggestionsManager (line 4) | interface SuggestionsManager {
  function useSuggestionsManager (line 13) | function useSuggestionsManager(initialSuggestions: Suggestion[] = []): S...

FILE: src/common/features/world-class-chat/side-panel.tsx
  type SidePanelProps (line 3) | interface SidePanelProps {
  function SidePanel (line 11) | function SidePanel({ visible, onClose, children, zIndex = 30, hideCloseB...

FILE: src/common/features/world-class-chat/stores/memory.store.ts
  type MemoryItem (line 5) | interface MemoryItem {
  type MemoryStore (line 12) | interface MemoryStore {

FILE: src/common/features/world-class-chat/stores/world-class-chat-settings.store.ts
  constant PROMPT_STORAGE_KEY (line 3) | const PROMPT_STORAGE_KEY = 'world-class-chat-prompt';
  type SetPromptOptions (line 5) | interface SetPromptOptions {
  type WorldClassChatSettingsState (line 10) | interface WorldClassChatSettingsState {
  function getInitialPrompt (line 16) | function getInitialPrompt() {

FILE: src/common/features/world-class-chat/world-class-chat-container.tsx
  type WorldClassChatContainerProps (line 34) | interface WorldClassChatContainerProps {
  type WorldClassChatContainerRef (line 42) | interface WorldClassChatContainerRef {

FILE: src/common/features/world-class-chat/world-class-chat-input-bar.tsx
  type WorldClassChatInputBarProps (line 3) | interface WorldClassChatInputBarProps {
  function WorldClassChatInputBar (line 11) | function WorldClassChatInputBar({ value, onChange, onSend, disabled, pla...

FILE: src/common/features/world-class-chat/world-class-chat-message-list.tsx
  type WorldClassChatMessageListProps (line 11) | interface WorldClassChatMessageListProps {
  type WorldClassChatMessageListRef (line 21) | interface WorldClassChatMessageListRef {

FILE: src/common/features/world-class-chat/world-class-chat-top-bar.tsx
  type WorldClassChatTopBarProps (line 5) | interface WorldClassChatTopBarProps {
  function WorldClassChatTopBar (line 11) | function WorldClassChatTopBar({ agentDef, onClear, onSettings }: WorldCl...

FILE: src/common/features/world-class-chat/world-class-tool-call-renderer.tsx
  type WorldClassToolCallRendererProps (line 6) | interface WorldClassToolCallRendererProps {
  function ellipsis (line 12) | function ellipsis(str: string, maxLen = 60): string {

FILE: src/common/hooks/use-agent-file-manager.ts
  type FileInfo (line 5) | interface FileInfo {
  type AgentFileManagerState (line 14) | interface AgentFileManagerState {
  type AgentFileManagerActions (line 23) | interface AgentFileManagerActions {
  function useAgentFileManager (line 49) | function useAgentFileManager(initialPath: string = "/"): AgentFileManage...

FILE: src/common/hooks/use-all-tools.ts
  function useAllTools (line 10) | function useAllTools() {

FILE: src/common/hooks/use-chat-auto-scroll.ts
  type UseChatAutoScrollOptions (line 3) | interface UseChatAutoScrollOptions {
  function useChatAutoScroll (line 8) | function useChatAutoScroll<T extends HTMLElement = HTMLDivElement>({

FILE: src/common/hooks/use-chat-message-cache.ts
  function useChatMessageCache (line 8) | function useChatMessageCache<T = unknown>(cacheKey: string) {

FILE: src/common/hooks/use-mcp-servers.ts
  function useMCPServers (line 9) | function useMCPServers() {

FILE: src/common/hooks/use-mention-position.ts
  type MentionPosition (line 3) | interface MentionPosition {
  type UseMentionPositionOptions (line 8) | interface UseMentionPositionOptions {
  function useMentionPosition (line 20) | function useMentionPosition({

FILE: src/common/hooks/use-mention.ts
  type MentionState (line 5) | interface MentionState {
  type UseMentionOptions (line 12) | interface UseMentionOptions {
  type UseMentionResult (line 20) | interface UseMentionResult {
  function useMention (line 29) | function useMention({

FILE: src/common/hooks/use-provide-agent-tools.ts
  type AgentTool (line 8) | interface AgentTool extends ToolDefinition {
  function useProvideAgentTools (line 13) | function useProvideAgentTools(agentTools: AgentTool[]) {

FILE: src/common/lib/agent/prompt/prompt-builder.ts
  class PromptBuilder (line 12) | class PromptBuilder {
    method buildPrompt (line 13) | buildPrompt(context: {

FILE: src/common/lib/agent/prompt/prompts.ts
  function generateCapabilityPrompt (line 76) | function generateCapabilityPrompt(
  function simpleHash (line 243) | function simpleHash(str: string) {

FILE: src/common/lib/ai-service/index.ts
  class AIServiceError (line 11) | class AIServiceError extends Error {
    method constructor (line 12) | constructor(message: string, public code?: string, public type?: strin...
  type ToolDelta (line 82) | type ToolDelta = {
  method push (line 138) | push(delta: ToolDelta) {
  method update (line 146) | update(delta: ToolDelta) {
  method flush (line 162) | flush() {
  type ChatRole (line 181) | type ChatRole = "system" | "user" | "assistant" | "tool";
  type ToolDefinition (line 183) | interface ToolDefinition {
  type ToolCall (line 189) | interface ToolCall {
  type ChatMessage (line 195) | interface ChatMessage {
  type BaseConfig (line 204) | interface BaseConfig {
  type APIAdapter (line 215) | interface APIAdapter {
  type AIRequestParams (line 221) | interface AIRequestParams {
  type LLMProvider (line 230) | interface LLMProvider {
  type ProviderParams (line 247) | interface ProviderParams {
  method constructor (line 255) | constructor(
  method configure (line 262) | configure(config: BaseConfig): void {
  method validateConfig (line 267) | protected validateConfig(config: BaseConfig): void {
  method generateCompletion (line 278) | async generateCompletion(
  type StreamEvent (line 301) | type StreamEvent =
  type StreamDeltaNormalizer (line 307) | type StreamDeltaNormalizer = {
  type StreamDeltaMode (line 312) | type StreamDeltaMode = "unknown" | "full" | "delta";
  class DirectAPIAdapter (line 383) | class DirectAPIAdapter implements APIAdapter {
    method constructor (line 386) | constructor(apiKey: string, baseURL?: string) {
    method configure (line 394) | configure(config: BaseConfig): void {
    method makeRequest (line 402) | async makeRequest(params: AIRequestParams): Promise<string> {
    method makeStreamRequest (line 428) | makeStreamRequest(params: AIRequestParams): Observable<StreamEvent> {
  class ProxyAPIAdapter (line 492) | class ProxyAPIAdapter implements APIAdapter {
    method constructor (line 493) | constructor(private baseURL: string) {}
    method configure (line 495) | configure(config: BaseConfig): void {
    method makeRequest (line 499) | async makeRequest(params: AIRequestParams): Promise<string> {
    method makeStreamRequest (line 522) | makeStreamRequest(params: AIRequestParams): Observable<StreamEvent> {
  class StandardProvider (line 590) | class StandardProvider extends BaseLLMProvider {
    method constructor (line 591) | constructor(
    method getProviderParams (line 599) | public getProviderParams(): ProviderParams {
    method generateStreamCompletion (line 606) | public generateStreamCompletion(

FILE: src/common/lib/capabilities/index.ts
  type JsonSchema (line 3) | interface JsonSchema {
  type Capability (line 13) | interface Capability {
  class CapabilityRegistry (line 20) | class CapabilityRegistry {
    method getInstance (line 24) | static getInstance() {
    method register (line 31) | register(capability: Capability) {
    method registerAll (line 35) | registerAll(capabilities: Capability[]) {
    method getCapabilities (line 39) | getCapabilities(): Capability[] {
    method hasCapability (line 43) | hasCapability(name: string): boolean {
    method execute (line 47) | async execute(

FILE: src/common/lib/discussion/message-utils.ts
  constant MESSAGE_MERGE_THRESHOLD (line 8) | const MESSAGE_MERGE_THRESHOLD = 3 * 60 * 1000;
  function shouldMergeMessages (line 18) | function shouldMergeMessages(
  function mergeAdjacentMessages (line 45) | function mergeAdjacentMessages(
  function mergeSegmentsWithSeparator (line 108) | function mergeSegmentsWithSeparator(
  function reorganizeMessages (line 140) | function reorganizeMessages(

FILE: src/common/lib/env.ts
  constant USER_INTERACTION (line 8) | const USER_INTERACTION = createKey<{

FILE: src/common/lib/file-manager.service.ts
  type FsEntry (line 3) | interface FsEntry {
  type FileOperationResult (line 11) | interface FileOperationResult {
  type FileListResult (line 18) | interface FileListResult extends FileOperationResult {
  type FileReadResult (line 26) | interface FileReadResult extends FileOperationResult {
  type FileWriteResult (line 35) | interface FileWriteResult extends FileOperationResult {
  type StatResultData (line 42) | interface StatResultData {
  type StatResult (line 48) | interface StatResult {
  class FileManagerService (line 54) | class FileManagerService {
    method constructor (line 58) | constructor(fsName: string = 'file-manager') {
    method getCurrentPath (line 63) | getCurrentPath(): string {
    method setCurrentPath (line 68) | setCurrentPath(path: string): void {
    method listDirectory (line 73) | async listDirectory(path?: string): Promise<FileListResult> {
    method readFile (line 111) | async readFile(path: string): Promise<FileReadResult> {
    method writeFile (line 135) | async writeFile(path: string, content: string): Promise<FileWriteResul...
    method createDirectory (line 157) | async createDirectory(path: string): Promise<FileOperationResult> {
    method deleteEntry (line 173) | async deleteEntry(path: string): Promise<FileOperationResult> {
    method renameEntry (line 195) | async renameEntry(oldPath: string, newPath: string): Promise<FileOpera...
    method uploadFile (line 211) | async uploadFile(file: File, targetPath?: string): Promise<FileOperati...
    method downloadFile (line 230) | async downloadFile(path: string): Promise<FileOperationResult> {
    method exists (line 254) | async exists(path: string): Promise<boolean> {
    method getFileInfo (line 264) | async getFileInfo(path: string): Promise<FileOperationResult> {
    method searchFiles (line 287) | async searchFiles(pattern: string, searchPath?: string): Promise<FileO...
    method stat (line 327) | async stat(path: string): Promise<StatResult> {

FILE: src/common/lib/file-tree.service.ts
  type FileTreeNode (line 5) | interface FileTreeNode {
  type FileTreeService (line 15) | interface FileTreeService {
  class FileTreeServiceImpl (line 25) | class FileTreeServiceImpl implements FileTreeService {
    method constructor (line 30) | constructor(fileManager: FileManagerService) {
    method getNode (line 34) | async getNode(path: string): Promise<FileTreeNode | null> {
    method getChildren (line 41) | async getChildren(path: string): Promise<FileTreeNode[]> {
    method getFileInfo (line 61) | async getFileInfo(path: string): Promise<FileTreeNode | null> {
    method getTree (line 74) | async getTree(rootPath: string = '/', depth: number = 1): Promise<File...
    method refreshNode (line 96) | async refreshNode(path: string): Promise<FileTreeNode | null> {
    method clearCache (line 105) | clearCache(path?: string): void {
    method updateTreeDataNode (line 115) | private updateTreeDataNode(path: string, children: FileTreeNode[]) {

FILE: src/common/lib/mcp/examples/mock-server.ts
  class MockMCPServer (line 7) | class MockMCPServer {
    method constructor (line 58) | constructor(transport: MCPTransport) {
    method handleMessage (line 63) | private async handleMessage(message: MCPMessage) {
    method handleToolCall (line 109) | private async handleToolCall(params: { name: string; arguments: Record...

FILE: src/common/lib/mcp/transports/event.ts
  class EventTransport (line 7) | class EventTransport implements MCPTransport {
    method constructor (line 13) | constructor(eventBus: EventTarget, channel: string) {
    method send (line 18) | async send(message: MCPMessage): Promise<void> {
    method onMessage (line 25) | onMessage(handler: (message: MCPMessage) => void): void {
    method connect (line 45) | async connect(): Promise<void> {
    method disconnect (line 50) | async disconnect(): Promise<void> {

FILE: src/common/lib/mcp/transports/index.ts
  type TransportConfig (line 6) | interface TransportConfig {
  class MCPTransportFactory (line 14) | class MCPTransportFactory {
    method create (line 15) | static create(config: TransportConfig): MCPTransport {

FILE: src/common/lib/mcp/transports/postmessage.ts
  class PostMessageTransport (line 7) | class PostMessageTransport implements MCPTransport {
    method constructor (line 12) | constructor(target: Window | Worker) {
    method send (line 16) | async send(message: MCPMessage): Promise<void> {
    method onMessage (line 23) | onMessage(handler: (message: MCPMessage) => void): void {
    method connect (line 50) | async connect(): Promise<void> {
    method disconnect (line 55) | async disconnect(): Promise<void> {

FILE: src/common/lib/mcp/transports/transport.ts
  type MCPMessage (line 7) | interface MCPMessage {
  type MCPTransport (line 21) | interface MCPTransport {
  class MCPClient (line 32) | class MCPClient {
    method constructor (line 37) | constructor(transport: MCPTransport) {
    method listTools (line 43) | async listTools(): Promise<unknown[]> {
    method callTool (line 49) | async callTool(name: string, args: unknown): Promise<unknown> {
    method listResources (line 55) | async listResources(): Promise<unknown[]> {
    method listPrompts (line 61) | async listPrompts(): Promise<unknown[]> {
    method request (line 66) | private async request(method: string, params: unknown): Promise<unknow...
    method handleMessage (line 81) | private handleMessage(message: MCPMessage) {
    method generateId (line 96) | private generateId(): string {

FILE: src/common/lib/prompts/index.ts
  type PromptContext (line 3) | interface PromptContext {
  type IPromptTemplate (line 9) | interface IPromptTemplate {
  class PromptRegistry (line 14) | class PromptRegistry {
    method constructor (line 18) | private constructor() {}
    method getInstance (line 20) | static getInstance(): PromptRegistry {
    method register (line 27) | register(template: IPromptTemplate): void {
    method registerAll (line 31) | registerAll(templates: IPromptTemplate[]): void {
    method getTemplate (line 35) | getTemplate(name: string): IPromptTemplate | undefined {
    method generatePrompt (line 39) | generatePrompt(name: string, context: PromptContext): string {
    method generateCombinedPrompt (line 47) | generateCombinedPrompt(names: string[], context: PromptContext): string {

FILE: src/common/lib/resource.ts
  type ResourceState (line 3) | interface ResourceState<T> {
  type ReadyResourceState (line 18) | interface ReadyResourceState<T> extends Omit<ResourceState<T>, "data"> {
  type ResourceOptions (line 22) | interface ResourceOptions<T> {
  type IResource (line 29) | interface IResource<T> {
  constant DEFAULT_OPTIONS (line 34) | const DEFAULT_OPTIONS: ResourceOptions<unknown> = {
  class ResourceManagerImpl (line 40) | class ResourceManagerImpl<T> implements IResource<T> {
    method constructor (line 53) | constructor(
    method initialize (line 62) | private initialize() {
    method setState (line 90) | private setState(newState: Partial<Omit<ResourceState<T>, "mutate">>) {
    method subscribe (line 95) | subscribe(listener: (state: ResourceState<T>) => void) {
    method read (line 103) | read(): ReadyResourceState<T> {
    method getState (line 114) | getState(): ResourceState<T> {
    method reload (line 118) | reload(): Promise<T> {
    method mutate (line 141) | async mutate(
    method whenReady (line 177) | async whenReady(timeout: number = 30000): Promise<T> {
  function useResourceState (line 212) | function useResourceState<T>(
  function createResource (line 229) | function createResource<T>(
  function useParameterizedResource (line 244) | function useParameterizedResource<T, P>(

FILE: src/common/lib/runnable-agent/agent-utils/handlers/text-message.handler.ts
  class TextMessageHandler (line 6) | class TextMessageHandler implements StreamHandler {
    method constructor (line 7) | constructor(private encoder: EventEncoder) {}
    method handle (line 9) | async *handle(chunk: OpenAI.Chat.Completions.ChatCompletionChunk, cont...
    method finalize (line 45) | async *finalize(context: StreamContext): AsyncGenerator<string, void, ...

FILE: src/common/lib/runnable-agent/agent-utils/handlers/tool-call.handler.ts
  class ToolCallHandler (line 6) | class ToolCallHandler implements StreamHandler {
    method constructor (line 7) | constructor(private encoder: EventEncoder) {}
    method handle (line 9) | async *handle(
    method finalize (line 97) | async *finalize(

FILE: src/common/lib/runnable-agent/agent-utils/openai-agent.ts
  type AgentConfig (line 16) | interface AgentConfig {
  type OpenAIAgentOptions (line 24) | interface OpenAIAgentOptions {
  class OpenAIAgent (line 30) | class OpenAIAgent {
    method constructor (line 33) | constructor(private config: AgentConfig) {
    method convertToolsToOpenAIFormat (line 41) | private convertToolsToOpenAIFormat(tools: Tool[]) {
    method convertMessagesToOpenAIFormat (line 52) | private convertMessagesToOpenAIFormat(
    method addContextToMessages (line 93) | private addContextToMessages(
    method run (line 106) | async *run(
    method handleError (line 166) | private async *handleError(

FILE: src/common/lib/runnable-agent/agent-utils/stream-processor.ts
  class StreamProcessor (line 13) | class StreamProcessor implements IStreamProcessor {
    method constructor (line 17) | constructor(private encoder: EventEncoder) {
    method addHandler (line 39) | addHandler(type: string, handler: StreamHandler) {
    method process (line 43) | async *process(
    method getChunkType (line 103) | private getChunkType(chunk: OpenAI.Chat.Completions.ChatCompletionChun...
    method handleError (line 109) | async *handleError(error: Error): AsyncGenerator<string, void, unknown> {

FILE: src/common/lib/runnable-agent/agent-utils/types.ts
  type StreamContext (line 3) | interface StreamContext {
  type StateSnapshot (line 14) | interface StateSnapshot {
  type StreamHandler (line 27) | interface StreamHandler {
  type EventData (line 32) | interface EventData {
  type StreamProcessor (line 73) | interface StreamProcessor {

FILE: src/common/lib/runnable-agent/experimental-inbrowser-agent.ts
  class ExperimentalInBrowserAgent (line 8) | class ExperimentalInBrowserAgent implements IAgent {
    method constructor (line 12) | constructor(config?: Partial<AgentConfig>) {
    method run (line 35) | run(input: RunAgentInput): IObservable<BaseEvent> {
    method setApiKey (line 97) | setApiKey(apiKey: string): void {
    method setModel (line 103) | setModel(model: string): void {
    method getConfig (line 109) | getConfig() {

FILE: src/common/lib/runnable-agent/sse-json-decoder.ts
  function decodeEventStream (line 5) | function decodeEventStream(): OperatorFunction<string, unknown> {

FILE: src/common/lib/rx-event.ts
  class RxEvent (line 3) | class RxEvent<T> extends Subject<T> {
    method listen (line 4) | listen(fn: (value: T) => void) {

FILE: src/common/lib/service-bus/index.ts
  type TypedKey (line 1) | type TypedKey<T> = {
  type ExtractKeyType (line 8) | type ExtractKeyType<T> = T extends TypedKey<infer U> ? U : never;
  type Key (line 11) | type Key<T = unknown> = string | TypedKey<T>;
  type ServiceHandler (line 23) | type ServiceHandler<Tin extends unknown[], Tout> = (...args: Tin) => Tout;

FILE: src/common/lib/storage/indexeddb.ts
  type IndexedDBOptions (line 3) | interface IndexedDBOptions {
  type IndexedDBQueryOptions (line 22) | interface IndexedDBQueryOptions {
  class IndexedDBProvider (line 35) | class IndexedDBProvider<T = unknown> implements DataProvider<T> {
    method constructor (line 47) | constructor(options: IndexedDBOptions) {
    method openDB (line 62) | private async openDB(): Promise<IDBDatabase> {
    method executeTransaction (line 99) | private async executeTransaction<TResult>(
    method list (line 140) | async list(): Promise<T[]> {
    method query (line 168) | async query(options: IndexedDBQueryOptions = {}): Promise<T[]> {
    method get (line 205) | async get(id: string): Promise<T> {
    method create (line 228) | async create(data: T): Promise<T> {
    method createMany (line 256) | async createMany(dataArray: T[]): Promise<T[]> {
    method update (line 302) | async update(id: string, data: Partial<T>): Promise<T> {
    method delete (line 339) | async delete(id: string): Promise<void> {
    method clear (line 358) | async clear(): Promise<void> {
    method count (line 377) | async count(): Promise<number> {
    method exists (line 396) | async exists(id: string): Promise<boolean> {
    method generateId (line 415) | private generateId(): string {
    method deleteDatabase (line 422) | static async deleteDatabase(dbName: string): Promise<void> {
    method listDatabases (line 442) | static async listDatabases(): Promise<string[]> {
    method addDatabaseToList (line 476) | private static addDatabaseToList(dbName: string): void {
    method removeDatabaseFromList (line 493) | private static removeDatabaseFromList(dbName: string): void {
    method getDatabaseInfo (line 508) | async getDatabaseInfo(): Promise<{

FILE: src/common/lib/storage/local.ts
  type CompareFn (line 4) | type CompareFn<T> = (a: T, b: T) => number;
  type SortField (line 6) | interface SortField<T, K extends keyof T> {
  type LocalStorageOptions (line 12) | interface LocalStorageOptions<T> {
  class LocalStorageProvider (line 20) | class LocalStorageProvider<T extends { id: string }>
    method constructor (line 23) | constructor(
    method getStoredItems (line 28) | private getStoredItems(): T[] {
    method setStoredItems (line 33) | private setStoredItems(items: T[]): void {
    method compareValues (line 37) | private compareValues<V>(
    method sortItems (line 47) | private sortItems(items: T[]): T[] {
    method list (line 79) | async list(): Promise<T[]> {
    method get (line 87) | async get(id: string): Promise<T> {
    method create (line 93) | async create(data: Omit<T, "id">): Promise<T> {
    method createMany (line 100) | async createMany(dataArray: Omit<T, "id">[]): Promise<T[]> {
    method update (line 107) | async update(id: string, data: Partial<T>): Promise<T> {
    method delete (line 123) | async delete(id: string): Promise<void> {

FILE: src/common/lib/storage/mock-http.ts
  class MockHttpProvider (line 4) | class MockHttpProvider<T extends { id: string }>
    method constructor (line 10) | constructor(
    method withDelay (line 18) | private async withDelay<R>(operation: () => Promise<R>): Promise<R> {
    method list (line 33) | async list(): Promise<T[]> {
    method get (line 37) | async get(id: string): Promise<T> {
    method create (line 41) | async create(data: Omit<T, "id">): Promise<T> {
    method createMany (line 45) | async createMany(dataArray: Omit<T, "id">[]): Promise<T[]> {
    method update (line 49) | async update(id: string, data: Partial<T>): Promise<T> {
    method delete (line 53) | async delete(id: string): Promise<void> {

FILE: src/common/lib/storage/types.ts
  type DataProvider (line 1) | interface DataProvider<T> {
  type StorageType (line 10) | type StorageType = 'local' | 'http';

FILE: src/common/lib/typed-bus/base.ts
  type IEventHandler (line 4) | type IEventHandler<T> = (data: T) => void;
  class TypedEventEmitter (line 6) | class TypedEventEmitter {
    method emit (line 13) | emit<T>(key: ITypedKey<T>, data: T): void {
    method on (line 18) | on<T>(key: ITypedKey<T>, handler: IEventHandler<T>): () => void {
    method off (line 39) | off<T>(key: ITypedKey<T>, handler: IEventHandler<T>): void {
    method createObservable (line 55) | protected createObservable<T>(key: ITypedKey<T>): Observable<T> {
    method getOrCreateSubject (line 59) | private getOrCreateSubject<T>(key: ITypedKey<T>): Subject<unknown> {

FILE: src/common/lib/typed-bus/bus-proxy.ts
  class BusProxy (line 4) | class BusProxy<T extends object> {
    method constructor (line 5) | constructor(
    method createProxy (line 11) | createProxy(): T {
    method createMethodHandler (line 31) | private createMethodHandler(

FILE: src/common/lib/typed-bus/decorators.ts
  type MethodDecorator (line 3) | type MethodDecorator = (
  function createMethodDecorator (line 9) | function createMethodDecorator(metadata: Partial<IMethodMetadata>): Meth...
  function syncMethod (line 36) | function syncMethod(): MethodDecorator {
  function asyncMethod (line 40) | function asyncMethod(): MethodDecorator {
  function skipMiddleware (line 44) | function skipMiddleware(): MethodDecorator {

FILE: src/common/lib/typed-bus/implementations/capability-bus.ts
  class CapabilityBus (line 4) | class CapabilityBus implements ICapabilityBus {
    method invoke (line 12) | async invoke<T, R>(key: ITypedKey<[T, R]>, params: T): Promise<R> {
    method register (line 27) | register<T, R>(
    method unregister (line 36) | unregister<T, R>(key: ITypedKey<[T, R]>): void {
    method list (line 42) | list(): Array<ITypedKey<[unknown, unknown]>> {
    method reset (line 47) | reset(): void {

FILE: src/common/lib/typed-bus/implementations/environment-bus.ts
  class EnvironmentBus (line 24) | class EnvironmentBus implements IEnvironmentBus {
    method constructor (line 40) | constructor() {

FILE: src/common/lib/typed-bus/implementations/event-bus.ts
  class EventBus (line 5) | class EventBus extends TypedEventEmitter implements IEventBus {
    method emit (line 6) | emit<T>(key: ITypedKey<T>, data: T): void {
    method on (line 10) | on<T>(key: ITypedKey<T>, handler: (data: T) => void) {
    method off (line 14) | off<T>(key: ITypedKey<T>, handler: (data: T) => void): void {
    method observe (line 19) | observe<T>(key: ITypedKey<T>): IObservable<T> {

FILE: src/common/lib/typed-bus/implementations/message-bus.ts
  class MessageBus (line 5) | class MessageBus
    method send (line 12) | async send<T>(key: ITypedKey<T>, data: T): Promise<void> {
    method receive (line 21) | async receive<T>(key: ITypedKey<T>): Promise<T[]> {
    method observe (line 26) | observe<T>(key: ITypedKey<T>): IObservable<T> {
    method clear (line 31) | async clear<T>(key: ITypedKey<T>): Promise<void> {
    method reset (line 35) | reset(): void {

FILE: src/common/lib/typed-bus/implementations/resource-bus.ts
  class ResourceBus (line 4) | class ResourceBus implements IResourceBus {
    method acquire (line 9) | async acquire<T>(key: ITypedKey<T>): Promise<T> {
    method release (line 25) | async release<T>(key: ITypedKey<T>): Promise<void> {
    method status (line 33) | status<T>(key: ITypedKey<T>): ResourceStatus {
    method register (line 38) | register<T>(key: ITypedKey<T>, resource: T): void {
    method reset (line 44) | reset(): void {

FILE: src/common/lib/typed-bus/implementations/state-bus.ts
  class StateBus (line 5) | class StateBus extends TypedEventEmitter implements IInternalStateBus {
    method get (line 9) | get<T>(key: ITypedKey<T>): T | undefined {
    method set (line 14) | set<T>(key: ITypedKey<T>, value: T): void {
    method watch (line 24) | watch<T>(key: ITypedKey<T>): IObservable<T> {
    method reset (line 45) | reset<T>(key: ITypedKey<T>): void {

FILE: src/common/lib/typed-bus/middleware-chain.ts
  class MiddlewareChain (line 3) | class MiddlewareChain {
    method add (line 8) | add(middleware: IMiddleware) {
    method remove (line 14) | remove(middleware: IMiddleware) {
    method executeBefore (line 26) | async executeBefore<T>(context: IOperationContext<T>): Promise<T> {
    method executeAfter (line 41) | async executeAfter<T>(context: IOperationContext<T>): Promise<T> {
    method executeError (line 56) | async executeError(error: Error, context: IOperationContext<unknown>):...

FILE: src/common/lib/typed-bus/types.ts
  type ITypedKey (line 1) | interface ITypedKey<T> {
  type IObserver (line 6) | interface IObserver<T> {
  type ISubscription (line 12) | interface ISubscription {
  type IObservable (line 16) | interface IObservable<T> {
  type IEventBus (line 20) | interface IEventBus {
  type IStateBus (line 27) | interface IStateBus {
  type IMessageBus (line 34) | interface IMessageBus {
  type IResourceBus (line 41) | interface IResourceBus {
  type ICapabilityBus (line 47) | interface ICapabilityBus {
  type ResourceStatus (line 54) | type ResourceStatus = "available" | "busy" | "error";
  type IBusOptions (line 56) | interface IBusOptions {
  class BusError (line 61) | class BusError extends Error {
    method constructor (line 62) | constructor(
  type IOperationContext (line 74) | interface IOperationContext<T> {
  type IMiddleware (line 82) | interface IMiddleware<TBefore = unknown, TAfter = TBefore> {
  type IEnvironmentBus (line 93) | interface IEnvironmentBus {
  type IBusStatus (line 106) | interface IBusStatus {
  type BusType (line 114) | type BusType = "event" | "state" | "message" | "resource" | "capability";
  type IMethodMetadata (line 116) | interface IMethodMetadata {
  type IBusMethod (line 122) | interface IBusMethod {
  type IInternalBus (line 128) | interface IInternalBus {
  type IInternalResourceBus (line 132) | interface IInternalResourceBus extends IResourceBus, IInternalBus {
  type IInternalStateBus (line 136) | interface IInternalStateBus extends IStateBus {
  type IInternalMessageBus (line 140) | interface IInternalMessageBus extends IMessageBus, IInternalBus {
  type IInternalCapabilityBus (line 144) | interface IInternalCapabilityBus extends ICapabilityBus, IInternalBus {

FILE: src/common/lib/utils.ts
  function cn (line 4) | function cn(...inputs: ClassValue[]) {
  function generateId (line 8) | function generateId(): string {
  function formatTime (line 12) | function formatTime(date: Date | string | number): string {

FILE: src/common/lib/with-event.ts
  class WithState (line 4) | class WithState<T extends Record<string, unknown>> {
    method constructor (line 9) | constructor(initialState: T) {
    method getState (line 13) | getState() {
    method setState (line 17) | setState(updates: Partial<T>) {

FILE: src/common/types/agent-config.ts
  type IAgentConfig (line 4) | interface IAgentConfig extends AgentDef {

FILE: src/common/types/agent.ts
  type AgentDef (line 1) | interface AgentDef {
  type CombinationParticipant (line 18) | interface CombinationParticipant {
  type AgentCombination (line 23) | interface AgentCombination {

FILE: src/common/types/ai.ts
  type SupportedAIProvider (line 2) | enum SupportedAIProvider {
  type BaseProviderConfig (line 12) | interface BaseProviderConfig {
  type DobrainProviderConfig (line 19) | interface DobrainProviderConfig extends BaseProviderConfig {
  type ProviderConfig (line 25) | type ProviderConfig = BaseProviderConfig | DobrainProviderConfig;
  type ProviderConfigs (line 27) | type ProviderConfigs = {

FILE: src/common/types/auth.ts
  type AuthUser (line 1) | interface AuthUser {

FILE: src/common/types/chat.ts
  type ChatMessage (line 1) | interface ChatMessage {

FILE: src/common/types/discussion-member.ts
  type DiscussionMember (line 1) | interface DiscussionMember {

FILE: src/common/types/discussion.ts
  type BaseMessage (line 4) | interface BaseMessage {
  type NormalMessage (line 13) | interface NormalMessage extends BaseMessage {
  type ToolInvocationStatus (line 23) | type ToolInvocationStatus = "pending" | "success" | "error";
  type MessageSegment (line 25) | type MessageSegment =
  type ToolInvocationSegment (line 38) | type ToolInvocationSegment = Extract<
  type MessageWithTools (line 43) | type MessageWithTools = NormalMessage;
  type AgentMessage (line 45) | type AgentMessage = NormalMessage;
  type Discussion (line 47) | interface Discussion {
  type DiscussionSettings (line 60) | interface DiscussionSettings {

FILE: src/common/types/guide.ts
  type GuideScenario (line 1) | interface GuideScenario {

FILE: src/common/types/route.ts
  type RouteNode (line 1) | interface RouteNode {

FILE: src/common/types/storage.ts
  type AgentDataProvider (line 7) | type AgentDataProvider = DataProvider<AgentDef>;
  type DiscussionDataProvider (line 8) | type DiscussionDataProvider = DataProvider<Discussion>;
  type MessageDataProvider (line 9) | type MessageDataProvider = DataProvider<AgentMessage>;
  type DiscussionMemberDataProvider (line 10) | type DiscussionMemberDataProvider = DataProvider<DiscussionMember>;

FILE: src/core/bootstrap/agents.bootstrap.ts
  function ensureDefaultAgents (line 9) | async function ensureDefaultAgents() {

FILE: src/core/bootstrap/app.bootstrap.ts
  function bootstrapApp (line 4) | async function bootstrapApp() {

FILE: src/core/config/agents/base-types.ts
  type Agent (line 1) | interface Agent {
  type AgentCombinationType (line 13) | type AgentCombinationType =

FILE: src/core/config/agents/index.ts
  type AgentCombinationType (line 32) | type AgentCombinationType =
  constant PARTICIPANT_IDS (line 50) | const PARTICIPANT_IDS = {
  constant MODERATOR_IDS (line 119) | const MODERATOR_IDS = {
  constant PARTICIPANTS_MAP (line 134) | const PARTICIPANTS_MAP: Record<string, Omit<AgentDef, "id">> = {
  constant MODERATORS_MAP (line 953) | const MODERATORS_MAP: Record<string, Omit<AgentDef, "id">> = {
  constant AGENT_COMBINATIONS (line 1263) | const AGENT_COMBINATIONS = {
  function getAgentsByType (line 1503) | function getAgentsByType(
  function resolveCombination (line 1515) | function resolveCombination(
  function getAvailableCombinations (line 1529) | function getAvailableCombinations() {
  constant DEFAULT_AGENTS (line 1538) | const DEFAULT_AGENTS = [

FILE: src/core/config/agents/moderators/meta-cognitive-orchestrator.ts
  constant META_COGNITIVE_ORCHESTRATOR (line 3) | const META_COGNITIVE_ORCHESTRATOR: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/moderators/structured-thinking-moderator.ts
  constant STRUCTURED_THINKING_MODERATOR (line 3) | const STRUCTURED_THINKING_MODERATOR: Omit<Agent, "id"> = {

FILE: src/core/config/agents/moderators/troll-moderator.ts
  constant TROLL_MODERATOR (line 3) | const TROLL_MODERATOR: Omit<Agent, "id"> = {

FILE: src/core/config/agents/practical-agents/data-interpreter.ts
  constant DATA_INTERPRETER (line 3) | const DATA_INTERPRETER: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/practical-agents/implementation-architect.ts
  constant IMPLEMENTATION_ARCHITECT (line 3) | const IMPLEMENTATION_ARCHITECT: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/practical-agents/startup-navigator.ts
  constant STARTUP_NAVIGATOR (line 3) | const STARTUP_NAVIGATOR: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/top-agents/cognitive-detective.ts
  constant COGNITIVE_DETECTIVE (line 3) | const COGNITIVE_DETECTIVE: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/concept-alchemist.ts
  constant CONCEPT_ALCHEMIST (line 3) | const CONCEPT_ALCHEMIST: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/top-agents/decision-gardener.ts
  constant DECISION_GARDENER (line 3) | const DECISION_GARDENER: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/top-agents/emotion-meteorologist.ts
  constant EMOTION_METEOROLOGIST (line 3) | const EMOTION_METEOROLOGIST: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/top-agents/essence-perspectivist.ts
  constant ESSENCE_PERSPECTIVIST (line 3) | const ESSENCE_PERSPECTIVIST: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/inspiration-archaeologist.ts
  constant INSPIRATION_ARCHAEOLOGIST (line 3) | const INSPIRATION_ARCHAEOLOGIST: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/top-agents/meaning-seeker.ts
  constant MEANING_SEEKER (line 3) | const MEANING_SEEKER: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/multiverse-observer.ts
  constant MULTIVERSE_OBSERVER (line 3) | const MULTIVERSE_OBSERVER: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/top-agents/narrative-architect.ts
  constant NARRATIVE_ARCHITECT (line 3) | const NARRATIVE_ARCHITECT: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/top-agents/pattern-linguist.ts
  constant PATTERN_LINGUIST (line 3) | const PATTERN_LINGUIST: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/top-agents/psyche-time-traveler.ts
  constant PSYCHE_TIME_TRAVELER (line 3) | const PSYCHE_TIME_TRAVELER: Omit<AgentDef, "id"> = {

FILE: src/core/config/agents/top-agents/quantum-advisor.ts
  constant QUANTUM_ADVISOR (line 3) | const QUANTUM_ADVISOR: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/structure-architect.ts
  constant STRUCTURE_ARCHITECT (line 3) | const STRUCTURE_ARCHITECT: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/troll-attacker.ts
  constant TROLL_ATTACKER (line 3) | const TROLL_ATTACKER: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/troll-cynic.ts
  constant TROLL_CYNIC (line 3) | const TROLL_CYNIC: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/troll-hater.ts
  constant TROLL_HATER (line 3) | const TROLL_HATER: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/troll-nonsense.ts
  constant TROLL_NONSENSE (line 3) | const TROLL_NONSENSE: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/troll-picker.ts
  constant TROLL_PICKER (line 3) | const TROLL_PICKER: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/troll-saboteur.ts
  constant TROLL_SABOTEUR (line 3) | const TROLL_SABOTEUR: Omit<Agent, "id"> = {

FILE: src/core/config/agents/top-agents/troll-spammer.ts
  constant TROLL_SPAMMER (line 3) | const TROLL_SPAMMER: Omit<Agent, "id"> = {

FILE: src/core/config/ai.ts
  constant AI_PROVIDER_CONFIG (line 8) | const AI_PROVIDER_CONFIG: ProviderConfigs = {

FILE: src/core/config/guide-scenarios.ts
  constant DEFAULT_SCENARIOS (line 3) | const DEFAULT_SCENARIOS: GuideScenario[] = [

FILE: src/core/config/i18n.ts
  constant LANGUAGE_STORAGE_KEY (line 6) | const LANGUAGE_STORAGE_KEY = 'app:language';

FILE: src/core/config/module-order.ts
  type ModuleOrderEnum (line 1) | enum ModuleOrderEnum {

FILE: src/core/config/settings.ts
  constant DEFAULT_SETTINGS (line 3) | const DEFAULT_SETTINGS: DiscussionSettings = {

FILE: src/core/config/storage.ts
  constant STORAGE_CONFIG (line 2) | const STORAGE_CONFIG = {

FILE: src/core/config/ui-persist.ts
  constant UI_PERSIST_KEYS (line 2) | const UI_PERSIST_KEYS = {
  constant UI_PERSIST_VERSIONS (line 18) | const UI_PERSIST_VERSIONS = {
  function createUIPersistOptions (line 29) | function createUIPersistOptions(key: keyof typeof UI_PERSIST_VERSIONS) {

FILE: src/core/events.ts
  constant USER_SELECT (line 4) | const USER_SELECT = createKey<{

FILE: src/core/hooks/use-agent-chat-page-helper.ts
  function useAgentChatPageHelper (line 11) | function useAgentChatPageHelper() {

FILE: src/core/hooks/use-app-bootstrap.ts
  function useAppBootstrap (line 4) | function useAppBootstrap() {

FILE: src/core/hooks/use-auth.ts
  function useAuth (line 5) | function useAuth() {

FILE: src/core/hooks/use-copy.ts
  type UseCopyOptions (line 2) | interface UseCopyOptions {
  function useCopy (line 8) | function useCopy(options: UseCopyOptions = {}) {

FILE: src/core/hooks/use-i18n.ts
  constant LANGUAGE_STORAGE_KEY (line 4) | const LANGUAGE_STORAGE_KEY = "app:language";
  function applyLanguageChange (line 6) | async function applyLanguageChange(targetI18n: typeof i18n, lng: string) {
  function useTranslation (line 15) | function useTranslation() {
  function changeLanguage (line 30) | function changeLanguage(lng: string) {

FILE: src/core/hooks/use-indexeddb-manager.ts
  type DatabaseInfo (line 4) | interface DatabaseInfo {
  type StoreInfo (line 10) | interface StoreInfo {
  type IndexedDBManagerState (line 20) | interface IndexedDBManagerState {
  function useIndexedDBManager (line 29) | function useIndexedDBManager() {

FILE: src/core/hooks/use-toast.ts
  constant TOAST_LIMIT (line 11) | const TOAST_LIMIT = 1
  constant TOAST_REMOVE_DELAY (line 12) | const TOAST_REMOVE_DELAY = 1000000
  type ToasterToast (line 14) | type ToasterToast = ToastProps & {
  type ActionType (line 21) | type ActionType = {
  function genId (line 30) | function genId() {
  type Action (line 35) | type Action =
  type State (line 53) | interface State {
  function dispatch (line 134) | function dispatch(action: Action) {
  type Toast (line 141) | type Toast = Omit<ToasterToast, "id">
  function toast (line 143) | function toast({ ...props }: Toast) {
  function useToast (line 172) | function useToast() {

FILE: src/core/hooks/useAgentForm.ts
  function useAgentForm (line 4) | function useAgentForm(agents: AgentDef[], updateAgent: (agentId: string,...

FILE: src/core/hooks/useAgents.ts
  function useAgents (line 4) | function useAgents() {

FILE: src/core/hooks/useAutoScroll.ts
  type ScrollState (line 4) | interface ScrollState {
  type UseAutoScrollOptions (line 9) | interface UseAutoScrollOptions {
  function useAutoScroll (line 20) | function useAutoScroll(

FILE: src/core/hooks/useBreakpoint.ts
  constant BREAKPOINTS (line 3) | const BREAKPOINTS = {
  type Breakpoint (line 11) | type Breakpoint = keyof typeof BREAKPOINTS;
  function useBreakpoint (line 13) | function useBreakpoint() {

FILE: src/core/hooks/useCurrentDiscussionId.ts
  function useCurrentDiscussionId (line 4) | function useCurrentDiscussionId() {

FILE: src/core/hooks/useDiscussion.ts
  function useDiscussion (line 4) | function useDiscussion() {

FILE: src/core/hooks/useDiscussionMembers.ts
  function useDiscussionMembers (line 3) | function useDiscussionMembers() {

FILE: src/core/hooks/useDiscussionRuntime.ts
  function useDiscussionSnapshot (line 5) | function useDiscussionSnapshot() {
  function useIsPaused (line 17) | function useIsPaused() {

FILE: src/core/hooks/useDiscussionSettings.ts
  function useDiscussionSettings (line 5) | function useDiscussionSettings() {

FILE: src/core/hooks/useDiscussions.ts
  function useDiscussions (line 5) | function useDiscussions() {

FILE: src/core/hooks/useKeyboardExpandableList.ts
  type UseKeyboardExpandableListProps (line 4) | interface UseKeyboardExpandableListProps<T> {
  function useKeyboardExpandableList (line 12) | function useKeyboardExpandableList<T>({

FILE: src/core/hooks/useMediaQuery.ts
  type MediaQueryList (line 4) | type MediaQueryList = {
  function useMediaQuery (line 12) | function useMediaQuery(query: string): boolean {

FILE: src/core/hooks/useMemberSelection.ts
  type Member (line 7) | interface Member {
  constant SELF_MEMBER (line 14) | const SELF_MEMBER: Member = {
  constant SELF_AGENT (line 20) | const SELF_AGENT: AgentDef = {
  function useMemberSelection (line 32) | function useMemberSelection(isFirstMessage: boolean = false) {

FILE: src/core/hooks/useMessageInput.ts
  type MessageInputRef (line 3) | interface MessageInputRef {
  type MessageInputHookProps (line 8) | interface MessageInputHookProps {
  type MessageInputHookResult (line 13) | interface MessageInputHookResult {
  function useMessageInput (line 24) | function useMessageInput({

FILE: src/core/hooks/useMessageList.ts
  type MessageListRef (line 7) | interface MessageListRef {
  type MessageListHookProps (line 11) | interface MessageListHookProps {
  type MessageListHookResult (line 17) | interface MessageListHookResult {
  function useMessageList (line 28) | function useMessageList({

FILE: src/core/hooks/useMessages.ts
  function useMessages (line 5) | function useMessages() {

FILE: src/core/hooks/useObservableState.ts
  function useObservableState (line 10) | function useObservableState<T>(

FILE: src/core/hooks/useOptimisticUpdate.ts
  type UseOptimisticUpdateOptions (line 4) | interface UseOptimisticUpdateOptions<T> {
  function useOptimisticUpdate (line 8) | function useOptimisticUpdate<T>(

FILE: src/core/hooks/usePersistedState.ts
  type PersistOptions (line 3) | interface PersistOptions<T> {
  function usePersistedState (line 14) | function usePersistedState<T>(

FILE: src/core/hooks/useViewportHeight.ts
  type ViewportState (line 3) | interface ViewportState {
  function useViewportHeight (line 9) | function useViewportHeight(): ViewportState {

FILE: src/core/hooks/useWindowSize.ts
  type WindowSize (line 3) | interface WindowSize {
  function useWindowSize (line 8) | function useWindowSize(): WindowSize {

FILE: src/core/managers/activity-bar.manager.ts
  class ActivityBarManager (line 4) | class ActivityBarManager {

FILE: src/core/managers/agents.manager.ts
  class AgentsManager (line 6) | class AgentsManager {

FILE: src/core/managers/db-capabilities.ts
  type DBIndex (line 4) | interface DBIndex {
  type DBStore (line 10) | interface DBStore {
  type DBInitParams (line 16) | interface DBInitParams {
  type DBStoreInfo (line 22) | interface DBStoreInfo {
  type DBStoresResponse (line 27) | interface DBStoresResponse extends DBResponse {
  type DBResponse (line 36) | interface DBResponse {

FILE: src/core/managers/discussion-control.manager.ts
  type Member (line 19) | type Member = { agentId: string; isAutoReply: boolean };
  type Snapshot (line 21) | type Snapshot = {
  type CtrlState (line 28) | type CtrlState = {
  class DiscussionControlManager (line 41) | class DiscussionControlManager {
    method constructor (line 70) | constructor() {
    method getSettings (line 76) | getSettings(): DiscussionSettings { return this.settings$.getValue(); }
    method getSettings$ (line 77) | getSettings$() { return this.settings$.asObservable(); }
    method getSnapshot (line 78) | getSnapshot(): Snapshot {
    method getSnapshot$ (line 87) | getSnapshot$() {
    method patchCtrl (line 98) | private patchCtrl(patch: Partial<CtrlState>) {
    method getCtrlState (line 104) | private getCtrlState(): CtrlState { return this.ctrl$.getValue(); }
    method getCurrentDiscussionId (line 107) | getCurrentDiscussionId(): string | null { return this.getCtrlState().d...
    method getCurrentDiscussionId$ (line 108) | getCurrentDiscussionId$() { return this.ctrl$.asObservable().pipe(map(...
    method isPaused (line 109) | isPaused(): boolean { return !this.getCtrlState().isRunning; }
    method setCurrentDiscussionId (line 112) | setCurrentDiscussionId(id: string | null) {
    method setMembers (line 119) | setMembers(members: Member[]) { this.patchCtrl({ members }); }
    method setSettings (line 123) | setSettings(settings: Partial<DiscussionSettings>) {
    method agentCanUseActions (line 130) | private agentCanUseActions(agent: AgentDef | undefined): boolean {
    method pause (line 141) | pause() {
    method resume (line 148) | resume() {
    method startIfEligible (line 152) | async startIfEligible(): Promise<boolean> {
    method run (line 160) | async run(): Promise<void> { await this.startIfEligible(); }
    method process (line 162) | async process(message: AgentMessage): Promise<void> {
    method selectNextAgentId (line 183) | private async selectNextAgentId(trigger: AgentMessage): Promise<string...
    method addSystemMessage (line 189) | private async addSystemMessage(content: string) {
    method generateStreamingResponse (line 202) | private async generateStreamingResponse(agentId: string, trigger: Agen...
    method processInternal (line 247) | private async processInternal(trigger: AgentMessage): Promise<void> {
    method handleError (line 270) | private handleError(error: unknown, message: string, context?: Record<...
    method reloadMessages (line 279) | private async reloadMessages() {

FILE: src/core/managers/discussion-members.manager.ts
  class DiscussionMembersManager (line 7) | class DiscussionMembersManager {
    method init (line 11) | init(control: DiscussionControlManager) {
    method getControl (line 20) | private getControl() {

FILE: src/core/managers/discussion/mention-resolver.ts
  class MentionResolver (line 9) | class MentionResolver {
    method feed (line 13) | feed(trigger: AgentMessage) {
    method takeNext (line 35) | takeNext(
    method extractMentions (line 84) | private extractMentions(content: string): string[] {
    method normalizeMentionTarget (line 99) | private normalizeMentionTarget(target: string | null): string | null {
    method isBoundaryChar (line 110) | private isBoundaryChar(char: string | undefined) {

FILE: src/core/managers/discussion/next-speaker.ts
  type Member (line 5) | type Member = { agentId: string; isAutoReply: boolean };
  class NextSpeakerSelector (line 8) | class NextSpeakerSelector {
    method constructor (line 9) | constructor(private readonly mention: MentionResolver) {}
    method select (line 11) | select(

FILE: src/core/managers/discussion/streaming-responder.ts
  type Deps (line 8) | type Deps = {
  function streamAgentResponse (line 37) | async function streamAgentResponse(
  function consumeObservable (line 324) | async function consumeObservable<T>(

FILE: src/core/managers/discussions.manager.ts
  class DiscussionsManager (line 8) | class DiscussionsManager {

FILE: src/core/managers/icon.manager.ts
  class IconManager (line 5) | class IconManager {

FILE: src/core/managers/messages.manager.ts
  class MessagesManager (line 7) | class MessagesManager {
    method init (line 11) | init(control: DiscussionControlManager) {
    method getControl (line 20) | private getControl() {

FILE: src/core/managers/navigation.manager.ts
  class NavigationManager (line 4) | class NavigationManager {

FILE: src/core/managers/route-tree.manager.ts
  class RouteTreeManager (line 5) | class RouteTreeManager {

FILE: src/core/presenter/presenter.ts
  class Presenter (line 14) | class Presenter {
    method constructor (line 26) | constructor() {

FILE: src/core/repositories/agent.repository.ts
  class AgentRepository (line 5) | class AgentRepository {
    method constructor (line 6) | constructor(private readonly provider: AgentDataProvider) {}
    method listAgents (line 8) | async listAgents(): Promise<AgentDef[]> {
    method getAgent (line 12) | async getAgent(id: string): Promise<AgentDef> {
    method createAgent (line 16) | async createAgent(data: Omit<AgentDef, "id">): Promise<AgentDef> {
    method updateAgent (line 24) | async updateAgent(id: string, data: Partial<AgentDef>): Promise<AgentD...
    method deleteAgent (line 28) | async deleteAgent(id: string): Promise<void> {

FILE: src/core/repositories/ai.client.ts
  class AIService (line 17) | class AIService {
    method constructor (line 18) | constructor(private readonly provider: LLMProvider) { }
    method configure (line 20) | configure(config: BaseConfig) {
    method chatCompletion (line 24) | public chatCompletion(messages: ChatMessage[]): Promise<string> {
    method streamChatCompletion (line 28) | public streamChatCompletion(options: {
    method generateDiscussionTitle (line 40) | public async generateDiscussionTitle(
  function createAIService (line 65) | function createAIService(): AIService {
  function createAIServiceForProvider (line 79) | function createAIServiceForProvider(

FILE: src/core/repositories/data-providers.ts
  type BackendMode (line 9) | type BackendMode = "mock" | "http";
  constant STORAGE_BACKEND (line 11) | const STORAGE_BACKEND =
  function createHttpProvider (line 15) | function createHttpProvider<T extends { id: string }>(): DataProvider<T> {
  class StorageHub (line 19) | class StorageHub {
    method constructor (line 27) | constructor(private readonly backend: BackendMode = STORAGE_BACKEND) {
    method createProvider (line 55) | private createProvider<T extends { id: string }>(

FILE: src/core/repositories/discussion-member.repository.ts
  class DiscussionMemberError (line 6) | class DiscussionMemberError extends Error {
    method constructor (line 7) | constructor(message: string) {
  class DiscussionMemberRepository (line 13) | class DiscussionMemberRepository {
    method constructor (line 14) | constructor(private readonly provider: DiscussionMemberDataProvider) {}
    method list (line 16) | async list(discussionId: string): Promise<DiscussionMember[]> {
    method checkAgentExists (line 21) | private async checkAgentExists(
    method create (line 29) | async create(
    method createMany (line 51) | async createMany(
    method update (line 82) | async update(
    method delete (line 89) | async delete(memberId: string): Promise<void> {

FILE: src/core/repositories/discussion.repository.ts
  class DiscussionRepository (line 5) | class DiscussionRepository {
    method constructor (line 6) | constructor(private readonly provider: DiscussionDataProvider) {}
    method listDiscussions (line 8) | async listDiscussions(): Promise<Discussion[]> {
    method getDiscussion (line 12) | async getDiscussion(id: string): Promise<Discussion> {
    method createDiscussion (line 16) | async createDiscussion(title: string): Promise<Discussion> {
    method updateDiscussion (line 41) | async updateDiscussion(
    method updateLastMessage (line 48) | async updateLastMessage(
    method deleteDiscussion (line 62) | async deleteDiscussion(id: string): Promise<void> {

FILE: src/core/repositories/message.repository.ts
  class MessageRepository (line 6) | class MessageRepository {
    method constructor (line 7) | constructor(private readonly provider: MessageDataProvider) {}
    method listMessages (line 9) | async listMessages(discussionId: string): Promise<AgentMessage[]> {
    method getMessage (line 19) | async getMessage(id: string): Promise<AgentMessage> {
    method addMessage (line 23) | async addMessage(
    method createMessage (line 38) | async createMessage(data: Omit<AgentMessage, "id">): Promise<AgentMess...
    method updateMessage (line 46) | async updateMessage(
    method deleteMessage (line 58) | async deleteMessage(id: string): Promise<void> {
    method clearMessages (line 62) | async clearMessages(discussionId: string): Promise<void> {

FILE: src/core/repositories/shared.types.ts
  type Timestamp (line 7) | type Timestamp = number;
  type JsonSchema (line 10) | interface JsonSchema {
  class RepositoryError (line 24) | class RepositoryError extends Error {
    method constructor (line 25) | constructor(
  class ClientError (line 44) | class ClientError extends Error {
    method constructor (line 45) | constructor(

FILE: src/core/stores/activity-bar.store.ts
  type ActivityItem (line 4) | interface ActivityItem {
  type ActivityBarState (line 17) | interface ActivityBarState {

FILE: src/core/stores/agents.store.ts
  type AgentsState (line 4) | interface AgentsState {

FILE: src/core/stores/auth.store.ts
  type AuthStatus (line 4) | type AuthStatus = "idle" | "loading" | "authenticated" | "unauthenticated";
  type AuthState (line 6) | interface AuthState {

FILE: src/core/stores/discussion-members.store.ts
  type DiscussionMembersState (line 4) | interface DiscussionMembersState {

FILE: src/core/stores/discussions.store.ts
  type DiscussionsState (line 4) | interface DiscussionsState {

FILE: src/core/stores/icon.store.ts
  type IconState (line 48) | interface IconState {

FILE: src/core/stores/mcp-server.store.ts
  type MCPServerConfig (line 7) | interface MCPServerConfig {
  type MCPServerConnection (line 15) | interface MCPServerConnection {
  type MCPServerState (line 26) | interface MCPServerState {

FILE: src/core/stores/messages.store.ts
  type MessagesState (line 4) | interface MessagesState {

FILE: src/core/stores/navigation.store.ts
  type NavigationState (line 3) | interface NavigationState {

FILE: src/core/stores/route-tree.store.ts
  type RouteTreeState (line 4) | interface RouteTreeState {
  function addRouteToTree (line 14) | function addRouteToTree(tree: RouteNode[], route: RouteNode, parentId?: ...
  function addRoutesToTree (line 29) | function addRoutesToTree(tree: RouteNode[], routes: RouteNode[], parentI...
  function removeRouteFromTree (line 44) | function removeRouteFromTree(tree: RouteNode[], id: string): RouteNode[] {
  function updateRouteInTree (line 54) | function updateRouteInTree(tree: RouteNode[], id: string, updates: Parti...

FILE: src/core/utils/auth-client.ts
  type AuthResponse (line 3) | interface AuthResponse {
  function request (line 10) | async function request<T extends AuthResponse>(

FILE: src/core/utils/common.util.ts
  constant DEFAULT_DISCUSSION_TITLE (line 1) | const DEFAULT_DISCUSSION_TITLE = "新的讨论";

FILE: src/core/utils/connect-router-with-activity-bar.ts
  type RouteMatchOptions (line 117) | interface RouteMatchOptions {
  type RouteConfig (line 133) | interface RouteConfig {
  function createRouterToActivityBarMap (line 159) | function createRouterToActivityBarMap(items: RouteConfig[]) {
  function createActivityBarToRouterMap (line 186) | function createActivityBarToRouterMap(items: RouteConfig[]) {
  function pathToRegexp (line 207) | function pathToRegexp(
  function findMatchingRoute (line 230) | function findMatchingRoute(
  function updateActivityBarByPath (line 281) | function updateActivityBarByPath(
  function updateRouterByActivityBar (line 295) | function updateRouterByActivityBar(
  function mapRouterToActivityBar (line 360) | function mapRouterToActivityBar(
  function mapActivityBarToRouter (line 381) | function mapActivityBarToRouter(
  function connectRouterWithActivityBar (line 407) | function connectRouterWithActivityBar(

FILE: src/core/utils/discussion-error.util.ts
  type DiscussionErrorType (line 1) | enum DiscussionErrorType {
  class DiscussionError (line 14) | class DiscussionError extends Error {
    method constructor (line 15) | constructor(
  function handleDiscussionError (line 26) | function handleDiscussionError(error: DiscussionError) {

FILE: src/desktop/desktop-app.tsx
  function DesktopAppInner (line 14) | function DesktopAppInner() {
  function DesktopApp (line 48) | function DesktopApp() {

FILE: src/desktop/features/agents/components/agent-profile-view.tsx
  type AgentProfileViewProps (line 19) | interface AgentProfileViewProps {
  function AgentProfileView (line 27) | function AgentProfileView({

FILE: src/desktop/features/agents/pages/agent-detail-page.tsx
  type ViewMode (line 22) | type ViewMode = "profile" | "edit";
  function AgentDetailPage (line 24) | function AgentDetailPage() {

FILE: src/desktop/features/agents/pages/agents-page.tsx
  function AgentsPage (line 16) | function AgentsPage() {

FILE: src/desktop/features/chat/pages/chat-page.tsx
  function ChatPage (line 14) | function ChatPage() {

FILE: src/desktop/features/file-manager/components/file-preview.tsx
  type FilePreviewProps (line 5) | interface FilePreviewProps {
  constant MAX_PREVIEW_SIZE (line 12) | const MAX_PREVIEW_SIZE = 1048576;
  function FilePreview (line 14) | function FilePreview({

FILE: src/desktop/features/file-manager/components/file-tree.tsx
  type FileTreeNode (line 5) | interface FileTreeNode {
  type FileTreeProps (line 12) | interface FileTreeProps {
  function Spinner (line 18) | function Spinner() {
  function FileTree (line 22) | function FileTree({ onSelect, selectedPath }: Omit<FileTreeProps, 'cwd'>) {

FILE: src/desktop/features/file-manager/components/pluggable-file-preview.tsx
  type PluggableFilePreviewProps (line 7) | interface PluggableFilePreviewProps {
  constant DEFAULT_MAX_PREVIEW_SIZE (line 15) | const DEFAULT_MAX_PREVIEW_SIZE = 1048576;
  function PluggableFilePreview (line 17) | function PluggableFilePreview({

FILE: src/desktop/features/file-manager/hooks/use-delayed-loading.ts
  function useDelayedLoading (line 3) | function useDelayedLoading(enabled: boolean, delay = 200) {

FILE: src/desktop/features/file-manager/hooks/use-file-ops.ts
  function useFileOps (line 4) | function useFileOps() {

FILE: src/desktop/features/file-manager/hooks/use-file-tree.ts
  function useAsyncRequest (line 5) | function useAsyncRequest() {
  type UseFileTreeOptions (line 21) | interface UseFileTreeOptions {
  function useFileTree (line 26) | function useFileTree(rootPath: string = '/', options: UseFileTreeOptions...

FILE: src/desktop/features/file-manager/hooks/use-lightningfs-manager.ts
  function useLightningFSManager (line 4) | function useLightningFSManager() {

FILE: src/desktop/features/file-manager/hooks/use-working-directory.ts
  function useWorkingDirectory (line 4) | function useWorkingDirectory(initialCwd: string = '/') {

FILE: src/desktop/features/file-manager/pages/file-manager-page.tsx
  constant MAIN_BG (line 11) | const MAIN_BG = '#f7f8fa';
  constant CARD_BG (line 12) | const CARD_BG = '#fff';
  constant BORDER_COLOR (line 13) | const BORDER_COLOR = '#ececec';
  constant CARD_RADIUS (line 14) | const CARD_RADIUS = 12;
  constant CARD_SHADOW (line 15) | const CARD_SHADOW = '0 1.5px 8px rgba(60,60,60,0.06)';
  constant BTN_RADIUS (line 16) | const BTN_RADIUS = 8;
  constant BTN_MAIN (line 17) | const BTN_MAIN = '#6a82fb';
  constant BTN_DANGER (line 18) | const BTN_DANGER = '#fc5c7d';
  type FileTreeNode (line 21) | interface FileTreeNode {
  function FileManagerPage (line 28) | function FileManagerPage() {

FILE: src/desktop/features/file-manager/previewers/html-previewer.tsx
  function HtmlPreviewer (line 7) | function HtmlPreviewer({

FILE: src/desktop/features/file-manager/previewers/index.tsx
  function registerFilePreviewers (line 56) | function registerFilePreviewers() {

FILE: src/desktop/features/file-manager/previewers/markdown-previewer.tsx
  function MarkdownPreviewer (line 5) | function MarkdownPreviewer({

FILE: src/desktop/features/file-manager/previewers/text-previewer.tsx
  function TextPreviewer (line 5) | function TextPreviewer({

FILE: src/desktop/features/file-manager/services/file-preview-registry.service.ts
  function matchPattern (line 4) | function matchPattern(pattern: string, text: string): boolean {
  function matchesPreviewer (line 10) | function matchesPreviewer(
  class FilePreviewRegistryImpl (line 42) | class FilePreviewRegistryImpl implements FilePreviewRegistry {
    method register (line 45) | register(previewer: FilePreviewer): void {
    method unregister (line 52) | unregister(id: string): void {
    method getAll (line 56) | getAll(): FilePreviewer[] {
    method findForFile (line 64) | findForFile(filePath: string, fileName: string, fileExtension: string)...
    method clear (line 77) | clear(): void {

FILE: src/desktop/features/file-manager/types/file-preview.types.ts
  type FilePreviewer (line 4) | interface FilePreviewer {
  type FileMatcher (line 26) | interface FileMatcher {
  type FilePreviewProps (line 38) | interface FilePreviewProps {
  type FileInfo (line 62) | interface FileInfo {
  type FilePreviewRegistry (line 72) | interface FilePreviewRegistry {
  type FilePreviewConfig (line 86) | interface FilePreviewConfig {

FILE: src/desktop/features/indexeddb/components/indexeddb-data-viewer.tsx
  type IndexedDBDataViewerProps (line 11) | interface IndexedDBDataViewerProps {
  function IndexedDBDataViewer (line 21) | function IndexedDBDataViewer({

FILE: src/desktop/features/indexeddb/components/indexeddb-database-info.tsx
  type IndexedDBDatabaseInfoProps (line 9) | interface IndexedDBDatabaseInfoProps {
  function IndexedDBDatabaseInfo (line 14) | function IndexedDBDatabaseInfo({

FILE: src/desktop/features/indexeddb/components/indexeddb-store-manager.tsx
  type IndexedDBStoreManagerProps (line 8) | interface IndexedDBStoreManagerProps {
  function IndexedDBStoreManager (line 14) | function IndexedDBStoreManager({

FILE: src/desktop/features/indexeddb/pages/indexeddb-manager-page.tsx
  function IndexedDBManagerPage (line 21) | function IndexedDBManagerPage() {

FILE: src/mobile/features/chat/managers/mobile-chat-scene.manager.ts
  class MobileChatSceneManager (line 6) | class MobileChatSceneManager {

FILE: src/mobile/features/chat/pages/chat-page.tsx
  function ChatPage (line 20) | function ChatPage() {

FILE: src/mobile/features/chat/stores/mobile-chat-scene.store.ts
  type MobileScene (line 3) | type MobileScene = "discussions" | "chat" | "agents";
  type MobileChatSceneState (line 5) | interface MobileChatSceneState {
  type MobileChatSceneActions (line 10) | interface MobileChatSceneActions {
  type MobileChatSceneStore (line 15) | type MobileChatSceneStore = MobileChatSceneState & MobileChatSceneActions;

FILE: src/mobile/mobile-app.tsx
  function MobileAppInner (line 31) | function MobileAppInner() {
  function MobileApp (line 169) | function MobileApp() {
Condensed preview — 667 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,234K chars).
[
  {
    "path": ".agent/workflows/feature-based-architecture.md",
    "chars": 1465,
    "preview": "---\ndescription: Feature-Based 架构规范,用于 AI 开发时复用\n---\n\n# Feature-Based 架构规范\n\n## 核心原则\n\n按**业务功能**而非技术类型组织代码。每个 feature 目录包含该"
  },
  {
    "path": ".agent/workflows/governance-strategy.md",
    "chars": 958,
    "preview": "---\ndescription: 代码库治理的指导思想与战略(五步法)\n---\n\n# 指导思想与战略(五步法治理)\n\n## 目标\n\n- 提升可维护性与可扩展性\n- 为接入真实后端保留清晰边界\n- 保障交付速度与稳定性\n\n## 指导思想\n\n1"
  },
  {
    "path": ".babelrc.js",
    "chars": 264,
    "preview": "module.exports = {\n  presets: [\n    ['@babel/preset-env', { targets: { node: 'current' } }],\n    '@babel/preset-typescri"
  },
  {
    "path": ".codex/skills/project-os/.skild/install.json",
    "chars": 1207,
    "preview": "{\n  \"schemaVersion\": 1,\n  \"name\": \"project-os\",\n  \"platform\": \"codex\",\n  \"scope\": \"project\",\n  \"source\": \"peiiii/skild/s"
  },
  {
    "path": ".codex/skills/project-os/SKILL.md",
    "chars": 1241,
    "preview": "---\nname: project-os\ndescription: AI project OS for autonomous loop, automated orchestration, and rule-driven execution."
  },
  {
    "path": ".codex/skills/project-os/assets/AGENTS.template.md",
    "chars": 2068,
    "preview": "1. 假设你是ceo+cto(架构师)+产品经理的综合体,从这个角度来思考所有问题\n2. 不要管开发代价,永远只考虑最终最佳方案,反正都是你来开发\n3. 每次完成一个阶段都要至少做代码验证,包括不限于build, lint, tscheck"
  },
  {
    "path": ".codex/skills/project-os/assets/commands/commands.md",
    "chars": 297,
    "preview": "# Commands\n\n- `/new-command`: 新建一条指令的元指令。流程:确认名称、用途、输入格式、输出/期望行为,写入本文件并保持 `AGENTS.md` 索引同步。\n- `/config-meta`: 调整或更新 `AGE"
  },
  {
    "path": ".codex/skills/project-os/assets/docs/workflows/npm-release-process.md",
    "chars": 612,
    "preview": "# NPM Package Release Process\n\nScope: publish npm packages in `packages/*`.\nThis does NOT cover registry/console deploym"
  },
  {
    "path": ".cursor/commands/commit.md",
    "chars": 329,
    "preview": "# Git提交规则\n\n## 核心原则\n\n- **禁止擅自提交**: 只有用户明确要求才能commit\n- **英文message**: 使用英文commit message\n- **默认git add .**: 自动添加所有更改\n\n## 前"
  },
  {
    "path": ".cursor/cursorignore",
    "chars": 946,
    "preview": "# CursorRIPER Framework ignore patterns\n# This file helps control which files are processed by Cursor's AI features\n\n# T"
  },
  {
    "path": ".cursor/rules/README.md",
    "chars": 1067,
    "preview": "# Cursor Rules 使用说明\n\n## 命名规范规则\n\n### 文件位置\n- 规则文件:`.cursor/rules/naming-conventions.mdc`\n- 修复脚本:`scripts/rename-hooks-to-k"
  },
  {
    "path": ".cursor/rules/agentverse-project.mdc",
    "chars": 3972,
    "preview": "# AgentVerse Project Rules\n\n## Project Architecture\n\n### Directory Structure\n```\nsrc/\n├── common/                    # S"
  },
  {
    "path": ".cursor/rules/code-simplicity.mdc",
    "chars": 2186,
    "preview": "---\nalwaysApply: true\ndescription: \"代码简洁性、可维护性和可扩展性指导原则\"\n---\n\n# 代码简洁性与可维护性指导原则\n\n## 核心原则\n\n### 1. 简洁性优先\n- **避免冗余**:不要重复造轮子"
  },
  {
    "path": ".cursor/rules/commit.mdc",
    "chars": 325,
    "preview": "---\nalwaysApply: true\n---\n不要未经授权就commit\n不要自作主张就提交commit !!!\n不要自作主张就提交commit !!!\n除非用户明确提出要commit代码,否则不要自作主张就提交commit !!!\n"
  },
  {
    "path": ".cursor/rules/core.mdc",
    "chars": 6989,
    "preview": "---\ndescription: \"CursorRIPER Framework - Core\"\nglobs: \nalwaysApply: true\nversion: \"1.0.2\"\ndate_created: \"2025-04-05\"\nla"
  },
  {
    "path": ".cursor/rules/customization.mdc",
    "chars": 4169,
    "preview": "---\ndescription: \"CursorRIPER Framework - Customization\"\nglobs: \nalwaysApply: false\nversion: \"1.0.1\"\n<!-- Note: Cursor w"
  },
  {
    "path": ".cursor/rules/file-organization.mdc",
    "chars": 1836,
    "preview": "---\nalwaysApply: true\n---\n# 文件组织规则\n\n## 核心目录结构(示意)\n\nsrc/\n├── assets/                # 静态资源\n├── common/\n│   ├── components"
  },
  {
    "path": ".cursor/rules/file-size-limits.mdc",
    "chars": 4019,
    "preview": "# File Size Limits and Code Organization\n\n## Core Principle: Keep Files Small and Focused\n\n### File Size Guidelines\n- **"
  },
  {
    "path": ".cursor/rules/generate-world-class-artistic-ui.mdc",
    "chars": 470,
    "preview": "---\ndescription: \nglobs: \nalwaysApply: false\n---\n# 世界级艺术化界面生成规则\n\n本规则对应 [docs/prompts/generate-world-class-artistic-ui.md"
  },
  {
    "path": ".cursor/rules/naming-conventions.mdc",
    "chars": 2847,
    "preview": "# 命名规范\n\n## 文件与文件夹命名\n\n### 1. 文件命名规范\n- 所有文件和文件夹必须使用 **kebab-case** 命名\n- 示例:\n  - ✅ `user-profile.tsx`\n  - ✅ `agent-detail-p"
  },
  {
    "path": ".cursor/rules/portal-service-bus-architecture.mdc",
    "chars": 5766,
    "preview": "# Portal Service Bus Architecture\n\n## Overview\n\nThe Portal Service Bus is a modular, composable cross-context communicat"
  },
  {
    "path": ".cursor/rules/quick-commands.mdc",
    "chars": 9567,
    "preview": "---\nalwaysApply: true\n---\n\n\n# Quick Commands & Communication Conventions\n\n## Git Operations\n\n### ⚠️ 重要:禁止擅自提交\n- **严格禁止**"
  },
  {
    "path": ".cursor/rules/riper-workflow.mdc",
    "chars": 7946,
    "preview": "---\ndescription: \"CursorRIPER Framework - RIPER Workflow\"\nglobs: \nalwaysApply: false\nversion: \"1.0.1\"\ndate_created: \"202"
  },
  {
    "path": ".cursor/rules/start-phase.mdc",
    "chars": 10771,
    "preview": "---\ndescription: \"CursorRIPER Framework - START Phase\"\nglobs: \nalwaysApply: false\nversion: \"1.0.1\"\ndate_created: \"2025-0"
  },
  {
    "path": ".cursor/rules/state.mdc",
    "chars": 5721,
    "preview": "---\ndescription: \"CursorRIPER Framework - State Management\"\nglobs: \nalwaysApply: true\nversion: \"1.0.2\"\ndate_created: \"20"
  },
  {
    "path": ".gitignore",
    "chars": 328,
    "preview": "# Logs\nlogs\n!docs/logs\n!docs/logs/**\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.lo"
  },
  {
    "path": ".i18n-ally.yml",
    "chars": 540,
    "preview": "# i18n Ally 配置文件\n# 文档: https://github.com/lokalise/i18n-ally\n\n# 语言文件路径\nlocalesPaths:\n  - src/core/locales\n\n# 翻译键的样式\nkeys"
  },
  {
    "path": ".npmrc",
    "chars": 70,
    "preview": "ignore-workspace-root-check=true\nregistry=https://registry.npmjs.org/\n"
  },
  {
    "path": ".ossutilconfig.example",
    "chars": 149,
    "preview": "[Credentials]\nlanguage=CH\nRegion=cn-hangzhou\nendpoint=oss-cn-hangzhou.aliyuncs.com\naccessKeyID=your-accessKeyID\naccessKe"
  },
  {
    "path": "AGENTS.md",
    "chars": 2687,
    "preview": "# AGENTS\n\n## 总则\n\n1. 假设你是ceo+cto(架构师)+产品经理的综合体,从这个角度来思考所有问题\n2. 不要管开发代价,永远只考虑最终最佳方案,反正都是你来开发\n3. 每次完成一个阶段都要至少做代码验证,包括不限于bui"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 557,
    "preview": "# 更新日志\n\n所有对本项目的重要更改都将记录在此文件中。\n\n本文档格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/),\n并且本项目遵循 [语义化版本](http"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 941,
    "preview": "# 贡献者行为准则\n\n## 我们的承诺\n\n为了营造一个开放和友好的环境,我们作为贡献者和维护者承诺:无论年龄、体型、身体健全与否、民族、性征、性别认同与表达、经验水平、教育程度、社会地位、国籍、相貌、种族、宗教信仰、性取向如何,我们项目和社"
  },
  {
    "path": "CONTRIBUTORS.md",
    "chars": 725,
    "preview": "# 贡献者列表\n\n感谢所有为本项目做出贡献的开发者!\n\n## 核心团队\n\n- **[Your Name](https://github.com/yourusername)**\n  - 项目发起人\n  - 核心功能开发\n  - 架构设计\n\n#"
  },
  {
    "path": "LICENSE",
    "chars": 1085,
    "preview": "MIT License\n\nCopyright (c) 2024 AI Agent Discussion Platform\n\nPermission is hereby granted, free of charge, to any perso"
  },
  {
    "path": "README.md",
    "chars": 2560,
    "preview": "# AgentVerse - AI 专家团队协作平台\n\n让多个 AI 专家一起为你解决问题的协作平台\n\n[English](./README_EN.md) | 简体中文\n\n## 🔍 这是什么?\n\nAgentVerse 是一个支持多 AI 智"
  },
  {
    "path": "README_EN.md",
    "chars": 5245,
    "preview": "# AgentVerse - AI Expert Team Collaboration Platform\n\nA platform where multiple AI experts collaborate to solve your pro"
  },
  {
    "path": "babel.config.cjs",
    "chars": 209,
    "preview": "module.exports = {\n  presets: [\n    ['@babel/preset-env', { targets: { node: 'current' } }],\n    '@babel/preset-typescri"
  },
  {
    "path": "commands/commands.md",
    "chars": 297,
    "preview": "# Commands\n\n- `/new-command`: 新建一条指令的元指令。流程:确认名称、用途、输入格式、输出/期望行为,写入本文件并保持 `AGENTS.md` 索引同步。\n- `/config-meta`: 调整或更新 `AGE"
  },
  {
    "path": "components.json",
    "chars": 487,
    "preview": "{\n  \"$schema\": \"https://ui.shadcn.com/schema.json\",\n  \"style\": \"new-york\",\n  \"rsc\": false,\n  \"tsx\": true,\n  \"tailwind\": "
  },
  {
    "path": "docs/PAGE_STRUCTURE.md",
    "chars": 2306,
    "preview": "# 页面结构设计\n\n## 主体布局\n```\n┌─────────────────────────────────────────────────────────────┐\n│ 导航栏                             "
  },
  {
    "path": "docs/agent-action.md",
    "chars": 1484,
    "preview": "## AI 接口层(实际可用的能力调用格式)\n\n````markdown\n模型在需要调用工具时,必须输出一个 `:::action … :::` 区块:\n\n:::action\n{\n  \"operationId\": \"searchFiles_"
  },
  {
    "path": "docs/architecture/agent-architecture.md",
    "chars": 4742,
    "preview": "# Agent系统架构设计\n\n## 概述\n\n本文档描述了一个完整的Agent系统架构设计,包括Agent模型、环境模型以及它们之间的交互机制。这个设计采用了高度解耦的方式,使得系统具有更好的可维护性、可扩展性和灵活性。\n\n## 核心设计原则"
  },
  {
    "path": "docs/architecture/agents-architecture.md",
    "chars": 2889,
    "preview": "# Agents Module Architecture (Resource-first + Repository)\n\nStatus: Adopted\n\n## Goals\n- Single source of truth for Agent"
  },
  {
    "path": "docs/architecture/chat-discussion-features.md",
    "chars": 6367,
    "preview": "# Chat 和 Discussion Feature 组织架构\n\n## 概述\n\n`src/common/features/` 下的 `chat` 和 `discussion` 是两个核心功能模块,它们遵循功能优先的组织原则,按业务功能而非"
  },
  {
    "path": "docs/architecture/diagrams/architecture.mmd",
    "chars": 102,
    "preview": "%% 架构图源文件\ngraph TD\n    A[Client] --> B[API Gateway]\n    B --> C[Service Mesh]\n    C --> D[Agent Core] "
  },
  {
    "path": "docs/architecture/discussions-architecture.md",
    "chars": 2563,
    "preview": "# Discussions/Messages/Members Architecture (Resource-first + Repository)\n\nStatus: Adopted\n\n## Goals\n- Remove double-cac"
  },
  {
    "path": "docs/architecture/extension-architecture.md",
    "chars": 15938,
    "preview": "# Extension 架构设计文档\n\n## 概述\n\n本文档描述了基于 `@cardos/extension` 的插件化架构设计,该架构为 AgentVerse 项目提供了高度模块化、可扩展的功能组织方式。通过这套架构,我们可以实现功能的动"
  },
  {
    "path": "docs/architecture/system-design.md",
    "chars": 1664,
    "preview": "# DeepSeek R1 Agent 架构设计文档\n\n## 1. 整体架构\n\n## 2. 核心组件\n\n| 模块            | 职责                          | 技术栈                 "
  },
  {
    "path": "docs/character-templates.md",
    "chars": 3455,
    "preview": "# 创意聊天机器人角色设定库\n\n## 科技与未来类\n\n1. **量子概率顾问** - 用量子力学思维分析问题,提供多种可能性及其概率,帮助用户跳出二元思维。\n\n2. **数字考古学家** - 专门挖掘和解读互联网历史,分析数字文化演变,为现"
  },
  {
    "path": "docs/development/file-manager-architecture.md",
    "chars": 1427,
    "preview": "# 文件管理器架构优化与解耦方案\n\n## 1. 现状分析\n\n- 现有 use-lightningfs-manager.ts 将 cwd、文件树、选中文件、文件内容、所有文件操作、loading/error 状态全部耦合在一个大 hook 内"
  },
  {
    "path": "docs/development/file-manager-global-tree-design.md",
    "chars": 1143,
    "preview": "# 世界级文件管理器全局递归目录树设计方案\n\n## 一、体验目标\n- 左侧展示完整递归目录树,支持多级嵌套、任意深度展开/收起\n- 极致流畅的交互体验,支持懒加载、动画、右键、拖拽、多选、批量操作\n- 目录树与主内容区联动,选中节点自动高亮"
  },
  {
    "path": "docs/development/world-class-chat-html-preview-plan.md",
    "chars": 767,
    "preview": "# 世界级聊天界面与 HTML 预览能力分步实现计划\n\n## 目标\n- 聊天消息代码块支持拓展自定义按钮/能力(如 HTML 预览)\n- 聊天主容器支持“HTML 预览”模式,点击后界面左右分栏,左为对话,右为预览,带丝滑动画\n- 架构极简"
  },
  {
    "path": "docs/development-guide.md",
    "chars": 1497,
    "preview": "# 开发指南\n\n## 技术栈\n\n- **前端框架**: React + TypeScript\n- **构建工具**: Vite\n- **包管理**: PNPM\n- **样式方案**: TailwindCSS\n- **UI组件**: Shad"
  },
  {
    "path": "docs/development-plan.md",
    "chars": 2498,
    "preview": "# AgentVerse 开发规划文档\n\n## 项目概述\n\nAgentVerse 是一个多智能体对话平台,支持多个AI代理的协作对话。项目基于React + TypeScript + Vite构建,采用现代化的前端架构。\n\n## 当前项目状"
  },
  {
    "path": "docs/features-overview.md",
    "chars": 1508,
    "preview": "# AgentVerse 功能概述\n\nAgentVerse 是一个支持多 AI 代理之间自主对话的开源平台。本文档详细描述了平台的主要功能和界面交互特性。\n\n## 1. 核心功能\n\n### 1.1 多代理对话系统\n- 支持多个 AI 代理之"
  },
  {
    "path": "docs/i18n-coverage-report.md",
    "chars": 1875,
    "preview": "# 国际化覆盖率报告\n\n## 📊 当前状态\n\n- **包含中文的文件数**: 462\n- **使用 i18n 的文件数**: 219\n- **国际化覆盖率**: 47%\n- **总中文行数**: 4508\n- **未国际化文件**: 135"
  },
  {
    "path": "docs/i18n-tools-guide.md",
    "chars": 2941,
    "preview": "# 国际化工具使用指南\n\n## ✅ 已配置的工具\n\n### 1. i18n Ally (VS Code 扩展)\n\n**安装方式:**\n1. 在 VS Code 扩展市场搜索 \"i18n Ally\"\n2. 点击安装\n3. 或使用命令行:`co"
  },
  {
    "path": "docs/logs/README.md",
    "chars": 1354,
    "preview": "# Logs\n\n- `docs/logs/v0.0.1-mvp/README.md`\n- `docs/logs/v0.1.0-headless/README.md`\n- `docs/logs/v0.1.2-auth-email/iterat"
  },
  {
    "path": "docs/logs/TEMPLATE.md",
    "chars": 787,
    "preview": "# YYYY-MM-DD <Title>\n\n## 背景 / 问题\n\n- 为什么要做(用户痛点/动机/现状问题)\n\n## 规则(可选)\n\n- 规划类文档不要写具体工期,只写里程碑顺序与验收标准\n- 规划类文档文件名建议以 `.plan.md`"
  },
  {
    "path": "docs/logs/v0.0.1-init/iteration-notes.md",
    "chars": 782,
    "preview": "# v0.0.1-init 迭代记录\n\n## 改了什么\n\n- 无功能变化\n- 新增治理战略文档:`.agent/workflows/governance-strategy.md`\n- 新增并维护 `AGENTS.md` 索引(含迭代制度说明"
  },
  {
    "path": "docs/logs/v0.1.0-backend-ready/analysis.md",
    "chars": 6961,
    "preview": "# v0.1.0-backend-ready 现状盘点(后端/存储可替换性)\n\n## 目标\n- 梳理当前“外部世界”接入点(LLM、存储、扩展)与数据流,明确需要抽象的端口。\n- 识别阻碍后端落地/可替换的耦合点,作为后续重构的清单。\n\n#"
  },
  {
    "path": "docs/logs/v0.1.0-backend-ready/iteration-notes.md",
    "chars": 516,
    "preview": "# v0.1.0-backend-ready 迭代记录\n\n## 改了什么\n\n- 收口存储入口:新增 StorageHub,在 `src/core/services/data-providers.ts` 统一创建 data providers"
  },
  {
    "path": "docs/logs/v0.1.1-notes-sidebar/iteration-notes.md",
    "chars": 1180,
    "preview": "# v0.1.1-notes-sidebar 迭代记录\n\n## 改了什么\n\n- 右侧边栏支持多模块切换,新增“成员/笔记”Tabs\n- 新增共享笔记能力:讨论级 note 字段、更新能力与系统提示词注入,所有 Agent 可见\n- 移动端侧"
  },
  {
    "path": "docs/logs/v0.1.10-stream-normalizer-robust/iteration-notes.md",
    "chars": 447,
    "preview": "# v0.1.10-stream-normalizer-robust 迭代记录\n\n## 改了什么\n\n- 流式增量归一化支持“模式切换 + 重叠片段”处理,避免中途语义变化造成无限重复\n- 统一在 adapter 层处理增量输出,让上层消息渲"
  },
  {
    "path": "docs/logs/v0.1.11-mention-self-guard/iteration-notes.md",
    "chars": 450,
    "preview": "# v0.1.11-mention-self-guard 迭代记录\n\n## 改了什么\n\n- @mention 选择逻辑增加“排除自身”规则,避免 AI 在回复中引用自己的 @ 导致自我触发循环\n- 提升 mention 解析的稳定性:自提及"
  },
  {
    "path": "docs/logs/v0.1.12-message-merge-safety/iteration-notes.md",
    "chars": 440,
    "preview": "# v0.1.12-message-merge-safety 迭代记录\n\n## 改了什么\n\n- 修复消息合并时对 segments 的原地修改,避免渲染层重复叠加文本\n- 合并逻辑改为深拷贝 segments,防止重复渲染造成“无限追加”错"
  },
  {
    "path": "docs/logs/v0.1.13-v2ex-post/iteration-notes.md",
    "chars": 588,
    "preview": "# v0.1.13-v2ex-post 迭代记录\n\n## 改了什么\n\n- 新增 V2EX 发帖草稿,便于对外宣传与收集反馈\n- 补充“不同思维方式碰撞”的项目亮点描述\n- 补充内置角色与组合示例,突出多样化群聊场景\n- 补充项目定位、使用场"
  },
  {
    "path": "docs/logs/v0.1.13-v2ex-post/v2ex-post.md",
    "chars": 1152,
    "preview": "大家好,分享我的一个多智能体群聊与自治对话的开源项目:AgentVerse。项目始于 1年前,之后断断续续有一些完善。去年[发过一次](https://www.v2ex.com/t/1109676#reply35),有的朋友或许记得。\n\n项"
  },
  {
    "path": "docs/logs/v0.1.14-sidebar-github/iteration-notes.md",
    "chars": 387,
    "preview": "# v0.1.14-sidebar-github 迭代记录\n\n## 改了什么\n\n- 侧边栏新增 GitHub 入口,方便快速跳转项目仓库\n\n## 测试/验证/验收\n\n- `pnpm lint`(存在既有 warnings,未阻塞)\n- `p"
  },
  {
    "path": "docs/logs/v0.1.15-activitybar-github/iteration-notes.md",
    "chars": 393,
    "preview": "# v0.1.15-activitybar-github 迭代记录\n\n## 改了什么\n\n- 左侧活动栏新增 GitHub 入口,方便快速跳转项目仓库\n\n## 测试/验证/验收\n\n- `pnpm lint`(存在既有 warnings,未阻塞"
  },
  {
    "path": "docs/logs/v0.1.16-readme-screenshots/iteration-notes.md",
    "chars": 470,
    "preview": "# v0.1.16-readme-screenshots 迭代记录\n\n## 改了什么\n\n- 在 README 增补多张产品截图(非 demo1/demo2),丰富展示内容\n\n## 测试/验证/验收\n\n- `pnpm lint`(存在既有 w"
  },
  {
    "path": "docs/logs/v0.1.17-dashscope-models/iteration-notes.md",
    "chars": 478,
    "preview": "# v0.1.17-dashscope-models 迭代记录\n\n## 改了什么\n\n- DashScope 模型列表新增 `qwen3-max-thinking` 与 `glm-4.7`\n\n## 测试/验证/验收\n\n- `pnpm lint"
  },
  {
    "path": "docs/logs/v0.1.2-auth-email/iteration-notes.md",
    "chars": 948,
    "preview": "# v0.1.2-auth-email 迭代记录\n\n## 改了什么\n\n- 新增邮箱注册/登录/验证/重置密码完整闭环\n- 前端增加登录、验证、忘记密码、重置密码页面\n- 全局 AuthGate:未登录时强制跳转登录页\n- 新增 Cloudf"
  },
  {
    "path": "docs/logs/v0.1.3-auth-optional/iteration-notes.md",
    "chars": 502,
    "preview": "# v0.1.3-auth-optional 迭代记录\n\n## 改了什么\n\n- 登录改为可选:未登录也可直接使用核心功能\n- AuthGate 不再拦截主流程,仅负责渲染认证相关页面\n\n## 测试/验证/验收\n\n- `pnpm lint`("
  },
  {
    "path": "docs/logs/v0.1.4-auth-entry/iteration-notes.md",
    "chars": 653,
    "preview": "# v0.1.4-auth-entry 迭代记录\n\n## 改了什么\n\n- 活动栏左下角新增“登录 / 注册”入口(未登录时展示)\n- 点击入口跳转登录页并携带当前页面回跳参数\n- 修复登录入口重复渲染与更新死循环问题\n\n## 测试/验证/验"
  },
  {
    "path": "docs/logs/v0.1.5-poop-impact/iteration-notes.md",
    "chars": 406,
    "preview": "# v0.1.5-poop-impact 迭代记录\n\n## 改了什么\n\n- 群聊扔💩击中时增加冲击波、核心糊状体与更密集的喷溅粒子\n- 命中瞬间表情放大旋转,强化戏剧性冲击感\n\n## 测试/验证/验收\n\n- `pnpm lint`(存在既有"
  },
  {
    "path": "docs/logs/v0.1.6-stream-dedupe/iteration-notes.md",
    "chars": 422,
    "preview": "# v0.1.6-stream-dedupe 迭代记录\n\n## 改了什么\n\n- 流式回复接入“完整内容回传”兼容逻辑,避免重复片段被反复追加\n- 连续重复的原始 delta 直接忽略,减少 UI 无意义刷屏\n\n## 测试/验证/验收\n\n- "
  },
  {
    "path": "docs/logs/v0.1.7-streaming-delta-normalization/iteration-notes.md",
    "chars": 451,
    "preview": "# v0.1.7-streaming-delta-normalization 迭代记录\n\n## 改了什么\n\n- 统一流式文本事件语义:兼容“返回完整内容”的流,转换为真实 delta 再交给上层追加\n- 让聊天流式渲染只处理增量片段,根因层"
  },
  {
    "path": "docs/logs/v0.1.8-streaming-mode-normalization/iteration-notes.md",
    "chars": 443,
    "preview": "# v0.1.8-streaming-mode-normalization 迭代记录\n\n## 改了什么\n\n- 流式输出增加“模式识别”:自动区分全量流与增量流,避免误判导致内容被吞\n- delta 规范化更保守,确保增量流不会被错误去重而出"
  },
  {
    "path": "docs/logs/v0.1.9-poop-impact-drama/iteration-notes.md",
    "chars": 418,
    "preview": "# v0.1.9-poop-impact-drama 迭代记录\n\n## 改了什么\n\n- 扔💩命中效果加强:双层冲击波、中心糊状体、拖尾飞溅与更多粒子\n- 增加命中闪光与粘稠“块状”扩散,整体更戏剧化\n\n## 测试/验证/验收\n\n- `pnp"
  },
  {
    "path": "docs/mcp-integration.md",
    "chars": 4419,
    "preview": "# MCP (Model Context Protocol) 集成指南\n\n## 概述\n\nAgentVerse 现在支持 MCP (Model Context Protocol) 服务器连接,允许 AI 助手使用外部工具来完成任务。这个功能是"
  },
  {
    "path": "docs/naming-research.md",
    "chars": 2366,
    "preview": "# 项目命名研究文档\n\n## 当前项目概况\n\n### 项目定位\n- 一个开源的多智能体对话平台\n- 支持多个主流 AI 模型\n- 让 AI 们进行自主讨论、头脑风暴和知识探索\n- 当前版本:0.1.0\n\n### 核心特性\n- 多智能体协作\n"
  },
  {
    "path": "docs/project-standards.md",
    "chars": 2261,
    "preview": "# 项目规范文档\n\n## 技术栈\n- React 18 + TypeScript\n- Vite\n- Tailwind CSS\n- shadcn/ui\n- pnpm\n\n## 目录结构\n```\nsrc/\n├── assets/        #"
  },
  {
    "path": "docs/prompt-experiments.md",
    "chars": 161,
    "preview": "# Prompt Experiments\n\n我认为现在的 agent 的 prompt 都不太行。我需要试验性的尝试一个 agent,主要从响应格式做文章,我给出一个示例,粗浅的想法,还不确定:\n\n<think>\n<goal>\n\n</goa"
  },
  {
    "path": "docs/prompts/generate-world-class-artistic-ui.md",
    "chars": 106,
    "preview": "写出令人惊叹不已精美无比的界面。要世界级的体验,美观与体验的最佳结合。现代化的,充满创意而不是平庸的,有趣而不是无聊的界面。写出体验无与伦比的界面。要写艺术品而不是仅仅是实现功能,要超越和引领而不是平庸的追随者。"
  },
  {
    "path": "docs/references/agent-chat-tutorial.md",
    "chars": 32481,
    "preview": "# @agent-labs/agent-chat 使用教程\n\n@agent-labs/agent-chat 是一个功能强大的 React 组件库,用于快速构建 AI 助手聊天界面。本教程将帮助你了解如何安装和使用这个库。\n\n## 目录\n\n-"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/components/HomePage.vue",
    "chars": 1369,
    "preview": "<script setup lang=\"ts\">\nimport { useData } from 'vitepress'\nimport { onMounted, ref } from 'vue'\n\nconst { lang } = useD"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/components/VideoModal.vue",
    "chars": 4221,
    "preview": "<script setup lang=\"ts\">\nimport { onKeyStroke } from '@vueuse/core'\nimport { watch } from 'vue'\n\n// SOURCE: https://gith"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/components/overrides/vp-hero.vue",
    "chars": 6437,
    "preview": "<script setup lang=\"ts\">\nimport { VPButton, VPImage, type DefaultTheme } from 'vitepress/theme'\n// Based on https://gith"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/config/index.ts",
    "chars": 1436,
    "preview": "import { fileURLToPath } from 'node:url'\nimport { defineConfig } from 'vitepress'\nimport { groupIconMdPlugin } from 'vit"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/config/theme.ts",
    "chars": 5760,
    "preview": "import { existsSync } from 'node:fs'\nimport path from 'node:path'\nimport { createTranslate } from '../i18n/utils'\nimport"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/i18n/composable.ts",
    "chars": 205,
    "preview": "import { useData } from 'vitepress'\nimport { t } from './utils'\n\nexport function useTranslate(lang?: string) {\n  const {"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/i18n/translate-map.ts",
    "chars": 1180,
    "preview": "export const zhCN = {\n  // nav\n  Home: '首页',\n  Guide: '指南',\n  'API Reference': 'API 参考',\n\n  // sidebar\n  Introduction: '"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/i18n/utils.ts",
    "chars": 229,
    "preview": "import { translateMap } from './translate-map'\n\nexport function t(key: string, lang: string) {\n  return translateMap[lan"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/scripts/docs-generate.ts",
    "chars": 1274,
    "preview": "import { cp, rm } from 'node:fs/promises'\nimport * as typedoc from 'typedoc'\n\nconst LANGUAGES = ['zh-CN']\n\n/**\n * Run Ty"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/theme/Layout.vue",
    "chars": 272,
    "preview": "<script setup lang=\"ts\">\nimport DefaultTheme from 'vitepress/theme'\nimport HomePage from '../components/HomePage.vue'\n</"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/theme/custom.css",
    "chars": 551,
    "preview": ":root {\n  --vp-c-brand-1: #ff7e17;\n  --vp-c-brand-2: #ff8700;\n  --vp-c-brand-3: #e37800;\n  --vp-code-color: #333;\n  --vp"
  },
  {
    "path": "docs/references/tsdown-docs/.vitepress/theme/index.ts",
    "chars": 199,
    "preview": "import DefaultTheme from 'vitepress/theme'\nimport Layout from './Layout.vue'\n\nimport './custom.css'\nimport 'virtual:grou"
  },
  {
    "path": "docs/references/tsdown-docs/advanced/benchmark.md",
    "chars": 379,
    "preview": "# Benchmark\n\n`tsdown` delivers exceptional performance compared to other popular bundlers. In most cases, it is approxim"
  },
  {
    "path": "docs/references/tsdown-docs/advanced/hooks.md",
    "chars": 1794,
    "preview": "# Hooks\n\nInspired by [unbuild](https://github.com/unjs/unbuild), `tsdown` supports a flexible hooks system that allows y"
  },
  {
    "path": "docs/references/tsdown-docs/advanced/plugins.md",
    "chars": 2867,
    "preview": "# Plugins\n\n`tsdown` uses [Rolldown](https://rolldown.rs) as its core engine, which means it seamlessly supports Rolldown"
  },
  {
    "path": "docs/references/tsdown-docs/advanced/programmatic-usage.md",
    "chars": 501,
    "preview": "# Programmatic Usage\n\nYou can use `tsdown` directly from your JavaScript or TypeScript code. This is useful for custom b"
  },
  {
    "path": "docs/references/tsdown-docs/advanced/rolldown-options.md",
    "chars": 2929,
    "preview": "# Customizing Rolldown Options\n\n`tsdown` uses [Rolldown](https://rolldown.rs) as its core bundling engine. This allows y"
  },
  {
    "path": "docs/references/tsdown-docs/guide/faq.md",
    "chars": 897,
    "preview": "# Frequently Asked Questions\n\n<!--\nTODO\n## What is the difference between tsdown and Rolldown?\n\n## Why should I use tsdo"
  },
  {
    "path": "docs/references/tsdown-docs/guide/getting-started.md",
    "chars": 4540,
    "preview": "# Getting Started\n\n:::warning 🚧 Beta Software\n[Rolldown](https://rolldown.rs) is currently in beta status. While it can "
  },
  {
    "path": "docs/references/tsdown-docs/guide/index.md",
    "chars": 4149,
    "preview": "# Introduction\n\n**tsdown** is _The Elegant Library Bundler_. Designed with simplicity and speed in mind, it provides a s"
  },
  {
    "path": "docs/references/tsdown-docs/guide/migrate-from-tsup.md",
    "chars": 2924,
    "preview": "# Migrate from tsup\n\n[tsup](https://tsup.egoist.dev/) is a powerful and widely-used bundler that shares many similaritie"
  },
  {
    "path": "docs/references/tsdown-docs/index.md",
    "chars": 1010,
    "preview": "---\n# https://vitepress.dev/reference/default-theme-home-page\nlayout: home\n\nhero:\n  name: 'tsdown'\n  text: 'The Elegant<"
  },
  {
    "path": "docs/references/tsdown-docs/options/cleaning.md",
    "chars": 601,
    "preview": "# Cleaning\n\nBy default, `tsdown` will **clean the output directory** (`outDir`) before each build. This ensures that any"
  },
  {
    "path": "docs/references/tsdown-docs/options/config-file.md",
    "chars": 2884,
    "preview": "# Config File\n\nBy default, `tsdown` will search for a configuration file by looking in the current working directory and"
  },
  {
    "path": "docs/references/tsdown-docs/options/dependencies.md",
    "chars": 3592,
    "preview": "# Dependencies\n\nWhen bundling with `tsdown`, dependencies are handled intelligently to ensure your library remains light"
  },
  {
    "path": "docs/references/tsdown-docs/options/dts.md",
    "chars": 3585,
    "preview": "# Declaration Files (dts)\n\nDeclaration files (`.d.ts`) are an essential part of TypeScript libraries, providing type def"
  },
  {
    "path": "docs/references/tsdown-docs/options/entry.md",
    "chars": 2300,
    "preview": "# Entry\n\nThe `entry` option specifies the entry files for your project. These files serve as the starting points for the"
  },
  {
    "path": "docs/references/tsdown-docs/options/minification.md",
    "chars": 1109,
    "preview": "# Minification\n\nMinification is the process of compressing your code to reduce its size and improve performance by remov"
  },
  {
    "path": "docs/references/tsdown-docs/options/output-directory.md",
    "chars": 583,
    "preview": "# Output Directory\n\nBy default, `tsdown` bundles your code into the `dist` directory located in the current working fold"
  },
  {
    "path": "docs/references/tsdown-docs/options/output-format.md",
    "chars": 1131,
    "preview": "# Output Format\n\nBy default, `tsdown` generates JavaScript code in the [ESM](https://nodejs.org/api/esm.html) (ECMAScrip"
  },
  {
    "path": "docs/references/tsdown-docs/options/package-exports.md",
    "chars": 2537,
    "preview": "# Auto-Generating Package Exports\n\n`tsdown` provides an experimental feature to automatically infer and generate the `ex"
  },
  {
    "path": "docs/references/tsdown-docs/options/platform.md",
    "chars": 1752,
    "preview": "# Platform\n\nThe platform specifies the target runtime environment for the bundled JavaScript code.\n\nBy default, `tsdown`"
  },
  {
    "path": "docs/references/tsdown-docs/options/shims.md",
    "chars": 2631,
    "preview": "# Shims\n\nShims are small pieces of code that provide compatibility between different module systems, such as CommonJS (C"
  },
  {
    "path": "docs/references/tsdown-docs/options/silent-mode.md",
    "chars": 302,
    "preview": "# Silent Mode\n\nIf you want to suppress non-error logs during the bundling process, you can enable **silent mode** by usi"
  },
  {
    "path": "docs/references/tsdown-docs/options/sourcemap.md",
    "chars": 641,
    "preview": "# Source Maps\n\nSource maps bridge the gap between your original development code and the optimized code that runs in the"
  },
  {
    "path": "docs/references/tsdown-docs/options/target.md",
    "chars": 3217,
    "preview": "# Target\n\nThe `target` setting determines which JavaScript and CSS features are downleveled (transformed to older syntax"
  },
  {
    "path": "docs/references/tsdown-docs/options/tree-shaking.md",
    "chars": 1618,
    "preview": "# Tree-shaking\n\nTree shaking is a process that eliminates unused (dead) code from your final bundle, reducing its size a"
  },
  {
    "path": "docs/references/tsdown-docs/options/unbundle.md",
    "chars": 2100,
    "preview": "# Unbundle Mode\n\nThe **unbundle** mode in `tsdown` allows you to output files that closely mirror your source module str"
  },
  {
    "path": "docs/references/tsdown-docs/options/watch-mode.md",
    "chars": 899,
    "preview": "# Watch Mode\n\nWatch mode allows `tsdown` to automatically re-bundle your code whenever changes are detected in the speci"
  },
  {
    "path": "docs/references/tsdown-docs/recipes/vue-support.md",
    "chars": 1582,
    "preview": "# Vue Support\n\n`tsdown` provides first-class support for building Vue component libraries by seamlessly integrating with"
  },
  {
    "path": "docs/references/tsdown-docs/reference/cli.md",
    "chars": 6147,
    "preview": "# Command Line Interface\n\nAll CLI flags can also be set in the configuration file for better reusability and maintainabi"
  },
  {
    "path": "docs/references/tsdown-docs/vite.config.ts",
    "chars": 660,
    "preview": "import UnoCSS from 'unocss/vite'\nimport { defineConfig } from 'vite'\nimport {\n  groupIconVitePlugin,\n  localIconLoader,\n"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/advanced/benchmark.md",
    "chars": 196,
    "preview": "# 性能基准\n\n与其他流行的打包器相比,`tsdown` 拥有卓越的性能。在大多数情况下,标准构建速度约为 `tsup` 的**2 倍**,在生成 TypeScript 声明文件时甚至可达**8 倍**之多。\n\n有关详细对比和真实案例结果,"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/advanced/hooks.md",
    "chars": 1081,
    "preview": "# 钩子(Hooks)\n\n受 [unbuild](https://github.com/unjs/unbuild) 的启发,`tsdown` 支持一个灵活的钩子系统,允许您扩展和自定义构建过程。虽然我们推荐使用 [插件系统](./plugi"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/advanced/plugins.md",
    "chars": 1545,
    "preview": "# 插件\n\n`tsdown` 以 [Rolldown](https://rolldown.rs) 作为核心引擎,因此可以无缝支持 Rolldown 插件。插件是一种强大的扩展方式,可以自定义打包流程,实现代码转换、资源处理等功能。\n\n## "
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/advanced/programmatic-usage.md",
    "chars": 321,
    "preview": "# 编程方式使用\n\n你可以在 JavaScript 或 TypeScript 代码中直接调用 `tsdown`,适用于自定义构建脚本、集成或自动化场景。\n\n## 示例\n\n```ts\nimport { build } from 'tsdown"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/advanced/rolldown-options.md",
    "chars": 1844,
    "preview": "# 自定义 Rolldown 选项\n\n`tsdown` 使用 [Rolldown](https://rolldown.rs) 作为其核心打包引擎。这使您可以轻松地直接向 Rolldown 传递或覆盖选项,从而对打包过程进行细粒度的控制。\n\n"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/guide/faq.md",
    "chars": 504,
    "preview": "# 常见问题\n\n<!--\nTODO\n## What is the difference between tsdown and Rolldown?\n\n## Why should I use tsdown instead of other bu"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/guide/getting-started.md",
    "chars": 2864,
    "preview": "# 快速上手\n\n:::warning 🚧 测试版软件\n[Rolldown](https://rolldown.rs) 当前处于测试阶段。虽然它已经可以满足大多数生产环境的使用需求,但仍可能存在一些 bug 或不完善之处。\n:::\n\n## 安"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/guide/index.md",
    "chars": 1721,
    "preview": "# 介绍\n\n**tsdown** 是优雅的库构建工具。它以简洁和高效为设计理念,为您的 TypeScript 和 JavaScript 库提供无缝且高效的打包方式。无论您正在构建小型工具库还是复杂的功能库,`tsdown` 都能让您专注于核"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/guide/migrate-from-tsup.md",
    "chars": 1475,
    "preview": "# 从 tsup 迁移\n\n[tsup](https://tsup.egoist.dev/) 是一个功能强大且广泛使用的打包器,与 `tsdown` 有许多相似之处。`tsup` 基于 [esbuild](https://esbuild.gi"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/index.md",
    "chars": 683,
    "preview": "---\n# https://vitepress.dev/reference/default-theme-home-page\nlayout: home\n\nhero:\n  name: 'tsdown'\n  text: 优雅的<br>库打包工具\n"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/cleaning.md",
    "chars": 237,
    "preview": "# 清理\n\n默认情况下,`tsdown` 会在每次构建之前**清理输出目录**(`outDir`)。这可以确保移除之前构建中生成的文件,防止过时或未使用的文件留在输出目录中。\n\n如果您希望禁用此行为并保留输出目录中的现有文件,可以使用 `-"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/config-file.md",
    "chars": 1657,
    "preview": "# 配置文件\n\n默认情况下,`tsdown` 会在当前工作目录中查找配置文件,并向上遍历父目录直到找到一个配置文件。它支持以下文件名:\n\n- `tsdown.config.ts`\n- `tsdown.config.mts`\n- `tsdow"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/dependencies.md",
    "chars": 1874,
    "preview": "# 依赖处理\n\n在使用 `tsdown` 打包时,依赖会被智能处理,以确保您的库保持轻量且易于使用。以下是 `tsdown` 如何处理不同类型依赖以及如何自定义此行为。\n\n## 默认行为\n\n### `dependencies` 和 `pee"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/dts.md",
    "chars": 2119,
    "preview": "# 声明文件 (dts)\n\n声明文件(`.d.ts`)是 TypeScript 库的重要组成部分,它为您的库的使用者提供类型定义,使其能够享受 TypeScript 的类型检查和智能提示。\n\n`tsdown` 让生成和打包声明文件变得简单,"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/entry.md",
    "chars": 1367,
    "preview": "# 入口文件\n\n`entry` 选项用于指定项目的入口文件。这些文件是打包过程的起点。您可以通过 CLI 或配置文件来定义入口文件。\n\n## 使用 CLI\n\n在使用 CLI 时,可以直接将入口文件作为命令参数指定。例如:\n\n```bash\n"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/minification.md",
    "chars": 737,
    "preview": "# 压缩\n\n压缩是通过移除不必要的字符(如空格、注释和未使用的代码)来减少代码体积并提升性能的过程。\n\n您可以通过在 `tsdown` 中使用 `--minify` 选项来启用代码压缩:\n\n```bash\ntsdown --minify\n`"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/output-directory.md",
    "chars": 286,
    "preview": "# 输出目录\n\n默认情况下,`tsdown` 会将打包后的代码输出到当前工作目录下的 `dist` 文件夹中。\n\n如果您想自定义输出目录,可以使用 `--out-dir`(或 `-d`)选项:\n\n```bash\ntsdown -d ./cu"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/output-format.md",
    "chars": 703,
    "preview": "# 输出格式\n\n默认情况下,`tsdown` 会生成 [ESM](https://nodejs.org/api/esm.html)(ECMAScript 模块)格式的 JavaScript 代码。不过,您可以通过 `--format` 选项"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/package-exports.md",
    "chars": 1537,
    "preview": "# 自动生成包导出\n\n`tsdown` 提供了一个实验性功能,可以自动推断并生成 `package.json` 中的 `exports`、`main`、`module` 和 `types` 字段。这有助于确保您的包导出始终与构建输出保持同步"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/platform.md",
    "chars": 929,
    "preview": "# 运行平台(Platform)\n\n运行平台用于指定打包后 JavaScript 代码的目标运行环境。\n\n默认情况下,`tsdown` 针对 `node` 运行时进行打包,但您可以通过 `--platform` 选项自定义目标平台:\n\n``"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/shims.md",
    "chars": 1530,
    "preview": "# Shims(兼容代码)\n\nShims 是一些小型代码片段,用于在不同的模块系统(如 CommonJS (CJS) 和 ECMAScript Modules (ESM))之间提供兼容性。在 `tsdown` 中,shims 用于弥合这些系"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/silent-mode.md",
    "chars": 128,
    "preview": "# 静默模式\n\n如果您希望在打包过程中屏蔽非错误日志,可以通过使用 `--silent` 选项启用**静默模式**:\n\n```bash\ntsdown --silent\n```\n\n在静默模式下,只有错误消息会被显示,这使您能够更专注于构建过程"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/sourcemap.md",
    "chars": 246,
    "preview": "# 源映射(Source Map)\n\n源映射是连接原始开发代码与在浏览器或其他环境中运行的优化代码的桥梁,大大简化了调试过程。它允许您将错误和日志追溯到原始的源文件,即使代码已经被压缩或打包。\n\n例如,源映射可以帮助您定位 React 或 "
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/target.md",
    "chars": 1733,
    "preview": "# 构建目标(Target)\n\n`target` 设置决定了哪些 JavaScript 和 CSS 特性会被降级(转换为旧语法),哪些会在输出中保持原样。这使您可以控制打包代码与特定环境或 JavaScript 版本的兼容性。\n\n例如,如果"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/tree-shaking.md",
    "chars": 1017,
    "preview": "# 除屑优化(Tree-shaking)\n\n除屑优化是一种从最终打包文件中移除未使用(无效)代码的过程,可以减少文件体积并提升性能。它确保输出中仅包含实际使用的代码。\n\n在 `tsdown` 中,**除屑优化默认启用**,但如果需要,您可以"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/unbundle.md",
    "chars": 1026,
    "preview": "# 非打包模式(Unbundle Mode)\n\n`tsdown` 的**非打包模式**允许您输出与源代码结构高度一致的文件,而不是为每个入口生成单一的打包文件。在该模式下,每个源文件都会被单独编译和转换,输出目录将与您的源文件目录一一对应。"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/options/watch-mode.md",
    "chars": 415,
    "preview": "# 监听模式\n\n监听模式允许 `tsdown` 在检测到指定文件或目录的更改时自动重新打包代码。这在开发过程中非常有用,可以简化构建流程。\n\n### 启用监听模式\n\n您可以使用 `--watch`(或 `-w`)选项启用监听模式:\n\n```"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/recipes/vue-support.md",
    "chars": 1005,
    "preview": "# Vue 支持\n\n`tsdown` 通过与 [`unplugin-vue`](https://github.com/unplugin/unplugin-vue) 和 [`rolldown-plugin-dts`](https://gith"
  },
  {
    "path": "docs/references/tsdown-docs/zh-CN/reference/cli.md",
    "chars": 3253,
    "preview": "# 命令行接口\n\n所有 CLI 参数也可以在配置文件中设置,以便在复杂项目中实现更好的复用性和可维护性。有关更多详细信息,请参阅 [配置文件](../options/config-file.md) 文档。\n\n## `[...files]`\n"
  },
  {
    "path": "docs/references/web-mcp-doc.md",
    "chars": 2000,
    "preview": "# MCP-B\n\nBrowser-based Model Context Protocol (MCP) implementation that enables AI assistants to interact with web appli"
  },
  {
    "path": "docs/scheduler-design.md",
    "chars": 1127,
    "preview": "# Scheduler 设计方案\n\n## 整体架构\n\n### 核心职责划分\n\n**Scheduler:**\n- 发言权限的分配和回收\n- 发言状态的监控\n- 发言超时的处理\n- 发言队列的管理\n\n**Agent:**\n- 提交发言请求\n- "
  },
  {
    "path": "docs/use-all-tools-example.md",
    "chars": 3472,
    "preview": "# useAllTools Hook 使用示例\n\n`useAllTools` hook 提供了一个简洁的方式来将 MCP 工具集成到 `@agent-labs/agent-chat` 中,避免了耦合和重复实现。\n\n## 基本用法\n\n```t"
  },
  {
    "path": "docs/v2ex-post.md",
    "chars": 1096,
    "preview": "# V2EX 发帖内容\n\n## 标题\n[Show] AgentVerse - 让多个 AI 模型协作完成任务 | 支持 OpenAI/DeepSeek/Moonshot\n\n## 正文\n\n👋 V2er 们好!分享一个让多个 AI 模型协同工作"
  },
  {
    "path": "docs/workflows/npm-release-process.md",
    "chars": 612,
    "preview": "# NPM Package Release Process\n\nScope: publish npm packages in `packages/*`.\nThis does NOT cover registry/console deploym"
  },
  {
    "path": "eslint.config.js",
    "chars": 1062,
    "preview": "import js from '@eslint/js'\nimport globals from 'globals'\nimport reactHooks from 'eslint-plugin-react-hooks'\nimport reac"
  },
  {
    "path": "functions/_lib/config.ts",
    "chars": 929,
    "preview": "import type { Env } from \"../_types\";\n\nfunction normalizeOrigin(value: string | undefined): string | null {\n  if (!value"
  },
  {
    "path": "functions/_lib/crypto.ts",
    "chars": 1862,
    "preview": "const encoder = new TextEncoder();\n\nfunction base64Encode(bytes: Uint8Array): string {\n  let binary = \"\";\n  bytes.forEac"
  },
  {
    "path": "functions/_lib/email.ts",
    "chars": 1614,
    "preview": "import type { Env } from \"../_types\";\nimport { getAppUrl, getEmailFrom } from \"./config\";\n\nasync function sendEmail(env:"
  },
  {
    "path": "functions/_lib/http.ts",
    "chars": 740,
    "preview": "type JsonValue = Record<string, unknown> | unknown[] | string | number | boolean | null;\n\nexport function json(data: Jso"
  },
  {
    "path": "functions/_lib/sessions.ts",
    "chars": 3044,
    "preview": "import type { Env } from \"../_types\";\nimport { hashToken, generateToken } from \"./crypto\";\n\nconst COOKIE_NAME = \"av_sess"
  },
  {
    "path": "functions/_lib/validators.ts",
    "chars": 356,
    "preview": "export const MIN_PASSWORD_LENGTH = 8;\n\nexport function normalizeEmail(email: string): string {\n  return email.trim().toL"
  },
  {
    "path": "functions/_types.ts",
    "chars": 133,
    "preview": "export interface Env {\n  DB: D1Database;\n  RESEND_API_KEY: string;\n  APP_URL?: string;\n  APP_URLS?: string;\n  EMAIL_FROM"
  },
  {
    "path": "functions/api/auth/login.ts",
    "chars": 1806,
    "preview": "import type { Env } from \"../../_types\";\nimport { parseJson, json, errorResponse } from \"../../_lib/http\";\nimport { norm"
  },
  {
    "path": "functions/api/auth/logout.ts",
    "chars": 501,
    "preview": "import type { Env } from \"../../_types\";\nimport { json } from \"../../_lib/http\";\nimport { getSessionToken, deleteSession"
  },
  {
    "path": "functions/api/auth/me.ts",
    "chars": 658,
    "preview": "import type { Env } from \"../../_types\";\nimport { json, errorResponse } from \"../../_lib/http\";\nimport { getSessionToken"
  },
  {
    "path": "functions/api/auth/register.ts",
    "chars": 2021,
    "preview": "import type { Env } from \"../../_types\";\nimport { hashPassword, generateToken, hashToken } from \"../../_lib/crypto\";\nimp"
  },
  {
    "path": "functions/api/auth/request-password-reset.ts",
    "chars": 1948,
    "preview": "import type { Env } from \"../../_types\";\nimport { generateToken, hashToken } from \"../../_lib/crypto\";\nimport { parseJso"
  },
  {
    "path": "functions/api/auth/resend-verification.ts",
    "chars": 1949,
    "preview": "import type { Env } from \"../../_types\";\nimport { generateToken, hashToken } from \"../../_lib/crypto\";\nimport { parseJso"
  },
  {
    "path": "functions/api/auth/reset-password.ts",
    "chars": 2473,
    "preview": "import type { Env } from \"../../_types\";\nimport { parseJson, json, errorResponse } from \"../../_lib/http\";\nimport { hash"
  },
  {
    "path": "functions/api/auth/verify-email.ts",
    "chars": 2058,
    "preview": "import type { Env } from \"../../_types\";\nimport { parseJson, json, errorResponse } from \"../../_lib/http\";\nimport { hash"
  },
  {
    "path": "i18next-scanner.config.cjs",
    "chars": 822,
    "preview": "module.exports = {\n  input: [\n    'src/**/*.{js,jsx,ts,tsx}',\n    // 排除 node_modules 和构建产物\n    '!src/**/*.spec.{js,jsx,t"
  },
  {
    "path": "i18next-scanner.config.js",
    "chars": 1009,
    "preview": "module.exports = {\n  input: [\n    'src/**/*.{js,jsx,ts,tsx}',\n    // 排除 node_modules 和构建产物\n    '!src/**/*.spec.{js,jsx,t"
  },
  {
    "path": "index.html",
    "chars": 1911,
    "preview": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/"
  },
  {
    "path": "jest.config.cjs",
    "chars": 1050,
    "preview": "module.exports = {\n  preset: 'ts-jest',\n  testEnvironment: 'jsdom',\n  setupFilesAfterEnv: ['<rootDir>/src/test/jest.setu"
  },
  {
    "path": "migrations/0001_auth.sql",
    "chars": 1343,
    "preview": "CREATE TABLE IF NOT EXISTS users (\n  id TEXT PRIMARY KEY,\n  email TEXT NOT NULL UNIQUE,\n  password_hash TEXT NOT NULL,\n "
  },
  {
    "path": "package.json",
    "chars": 4658,
    "preview": "{\n  \"name\": \"agent-verse\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"description\": \"An open-source platform supporting"
  },
  {
    "path": "packages/rx-nested-bean/package.json",
    "chars": 310,
    "preview": "{\n  \"name\": \"rx-nested-bean\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"src/index.ts\",\n  \"types\": \"src/index"
  },
  {
    "path": "packages/rx-nested-bean/src/index.ts",
    "chars": 21514,
    "preview": " \n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React,"
  },
  {
    "path": "packages/rx-nested-bean/src/v2.ts",
    "chars": 1537,
    "preview": "// export type INestedBean<T> = {\n//   get: () => T;\n//   set: (value: T) => void;\n// };\n\n// export type INestedBeanOpti"
  },
  {
    "path": "packages/rx-nested-bean/tsconfig.json",
    "chars": 484,
    "preview": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./dist\",\n    \"target\": \"es2015\",\n    \"module"
  },
  {
    "path": "packages/service-bus-portal/LICENSE",
    "chars": 1068,
    "preview": "MIT License\n\nCopyright (c) 2024 Cardos Team\n\nPermission is hereby granted, free of charge, to any person obtaining a cop"
  },
  {
    "path": "packages/service-bus-portal/MIGRATION.md",
    "chars": 2895,
    "preview": "# Migration Guide\n\n## From Internal Portal to @cardos/service-bus-portal\n\nThis guide helps you migrate from the internal"
  },
  {
    "path": "packages/service-bus-portal/MIGRATION_TO_TSDOWN.md",
    "chars": 2354,
    "preview": "# Migration from tsup to tsdown\n\nThis package has been successfully migrated from `tsup` to `tsdown` for better performa"
  },
  {
    "path": "packages/service-bus-portal/PACKAGE_SUMMARY.md",
    "chars": 5164,
    "preview": "# Portal Service Bus Package Creation Summary\n\n## Overview\n\nSuccessfully extracted the portal communication system into "
  },
  {
    "path": "packages/service-bus-portal/README.md",
    "chars": 7459,
    "preview": "# @cardos/service-bus-portal\n\nA modular, composable cross-context communication system for Web Workers, iframes, Shared "
  },
  {
    "path": "packages/service-bus-portal/examples/README.md",
    "chars": 7770,
    "preview": "# @cardos/service-bus-portal Examples\n\nThis directory contains comprehensive examples demonstrating how to use the `@car"
  },
  {
    "path": "packages/service-bus-portal/examples/basic-usage.ts",
    "chars": 2423,
    "preview": "// service-bus-portal/examples/basic-usage.ts\nimport { PortalFactory, PortalServiceBusProxy, PortalComposer } from '../s"
  },
  {
    "path": "packages/service-bus-portal/examples/comprehensive-example.ts",
    "chars": 12275,
    "preview": "// Comprehensive Example for @cardos/service-bus-portal\n// This example demonstrates how to use multiple portal types in"
  },
  {
    "path": "packages/service-bus-portal/examples/iframe-example.ts",
    "chars": 9986,
    "preview": "// Iframe Example for @cardos/service-bus-portal\n// This example demonstrates how to use the portal system with iframes\n"
  },
  {
    "path": "packages/service-bus-portal/examples/worker-example.ts",
    "chars": 5723,
    "preview": "// Web Worker Example for @cardos/service-bus-portal\n// This example demonstrates how to use the portal system with Web "
  },
  {
    "path": "packages/service-bus-portal/package.json",
    "chars": 1657,
    "preview": "{\n  \"name\": \"@cardos/service-bus-portal\",\n  \"version\": \"1.0.13\",\n  \"description\": \"A modular, composable cross-context c"
  },
  {
    "path": "packages/service-bus-portal/scripts/publish.sh",
    "chars": 829,
    "preview": "#!/bin/bash\n\n# Portal Service Bus Package Publish Script\n\nset -e\n\necho \"🚀 Publishing @agentverse/service-bus-portal...\"\n"
  }
]

// ... and 467 more files (download for full content)

About this extraction

This page contains the full source code of the Peiiii/AgentVerse GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 667 files (1.8 MB), approximately 539.0k tokens, and a symbol index with 1297 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!