@geminilight/mindos-windows-arm64 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_standalone/.mindos-build-version +1 -1
- package/_standalone/__next/BUILD_ID +1 -1
- package/_standalone/__next/app-path-routes-manifest.json +25 -25
- package/_standalone/__next/build-manifest.json +3 -3
- package/_standalone/__next/prerender-manifest.json +3 -3
- package/_standalone/__next/react-loadable-manifest.json +4 -4
- package/_standalone/__next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/_global-error.html +2 -2
- package/_standalone/__next/server/app/_global-error.rsc +1 -1
- package/_standalone/__next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/_standalone/__next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/_standalone/__next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/_standalone/__next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/_standalone/__next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/_standalone/__next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/_standalone/__next/server/app/_not-found/page.js +1 -1
- package/_standalone/__next/server/app/_not-found/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/agents/[agentKey]/page.js +1 -1
- package/_standalone/__next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/agents/page.js +1 -1
- package/_standalone/__next/server/app/agents/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/a2a/agents/route.js +1 -1
- package/_standalone/__next/server/app/api/a2a/agents/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/a2a/delegations/route.js +1 -1
- package/_standalone/__next/server/app/api/a2a/delegations/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/a2a/discover/route.js +1 -1
- package/_standalone/__next/server/app/api/a2a/discover/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/a2a/route.js +1 -1
- package/_standalone/__next/server/app/api/a2a/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/acp/config/route.js +1 -1
- package/_standalone/__next/server/app/api/acp/config/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/acp/detect/route.js +1 -1
- package/_standalone/__next/server/app/api/acp/detect/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/acp/install/route.js +1 -1
- package/_standalone/__next/server/app/api/acp/install/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/acp/registry/route.js +1 -1
- package/_standalone/__next/server/app/api/acp/registry/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/acp/session/route.js +1 -1
- package/_standalone/__next/server/app/api/acp/session/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/agent-activity/route.js +1 -1
- package/_standalone/__next/server/app/api/agent-activity/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/agents/copy-skill/route.js +1 -1
- package/_standalone/__next/server/app/api/agents/copy-skill/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/agents/copy-skill/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/agents/custom/detect/route.js +1 -1
- package/_standalone/__next/server/app/api/agents/custom/detect/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/agents/custom/detect/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/agents/custom/route.js +1 -1
- package/_standalone/__next/server/app/api/agents/custom/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/agents/custom/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/ask/route.js +1 -1
- package/_standalone/__next/server/app/api/ask/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/ask/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/ask-sessions/route.js +1 -1
- package/_standalone/__next/server/app/api/ask-sessions/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/auth/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/backlinks/route.js +1 -1
- package/_standalone/__next/server/app/api/backlinks/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/bootstrap/route.js +1 -1
- package/_standalone/__next/server/app/api/bootstrap/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/changes/route.js +1 -1
- package/_standalone/__next/server/app/api/changes/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/changes/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/channels/verify/route.js +1 -1
- package/_standalone/__next/server/app/api/channels/verify/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/channels/verify/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/connect/route.js +1 -1
- package/_standalone/__next/server/app/api/connect/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/connect/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/embedding/route.js +1 -1
- package/_standalone/__next/server/app/api/embedding/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/embedding/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/export/route.js +1 -1
- package/_standalone/__next/server/app/api/export/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/export/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/extract-docx/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/file/import/route.js +1 -1
- package/_standalone/__next/server/app/api/file/import/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/file/raw/route.js +1 -1
- package/_standalone/__next/server/app/api/file/raw/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/file/raw/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/file/route.js +1 -1
- package/_standalone/__next/server/app/api/file/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/file/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/files/route.js +1 -1
- package/_standalone/__next/server/app/api/files/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/git/route.js +1 -1
- package/_standalone/__next/server/app/api/git/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/graph/route.js +1 -1
- package/_standalone/__next/server/app/api/graph/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/graph/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/health/route.js +1 -1
- package/_standalone/__next/server/app/api/health/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/im/activity/route.js +1 -1
- package/_standalone/__next/server/app/api/im/activity/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/im/activity/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/im/config/route.js +1 -1
- package/_standalone/__next/server/app/api/im/config/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/im/config/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/im/feishu/long-connection/event/route.js +1 -1
- package/_standalone/__next/server/app/api/im/feishu/long-connection/event/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/im/feishu/long-connection/event/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/im/feishu/long-connection/route.js +1 -1
- package/_standalone/__next/server/app/api/im/feishu/long-connection/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/im/feishu/long-connection/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/im/status/route.js +1 -1
- package/_standalone/__next/server/app/api/im/status/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/im/status/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/im/test/route.js +1 -1
- package/_standalone/__next/server/app/api/im/test/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/im/test/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/im/webhook/feishu/route.js +1 -1
- package/_standalone/__next/server/app/api/im/webhook/feishu/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/im/webhook/feishu/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/im/webhook-status/route.js +1 -1
- package/_standalone/__next/server/app/api/im/webhook-status/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/im/webhook-status/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/inbox/clip/route.js +1 -1
- package/_standalone/__next/server/app/api/inbox/clip/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/inbox/clip/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/inbox/route.js +1 -1
- package/_standalone/__next/server/app/api/inbox/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/init/route.js +1 -1
- package/_standalone/__next/server/app/api/init/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/lint/route.js +1 -1
- package/_standalone/__next/server/app/api/lint/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/lint/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/mcp/agents/route.js +1 -1
- package/_standalone/__next/server/app/api/mcp/agents/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/mcp/direct-tools/route.js +1 -1
- package/_standalone/__next/server/app/api/mcp/direct-tools/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/mcp/direct-tools/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/mcp/install/route.js +1 -1
- package/_standalone/__next/server/app/api/mcp/install/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/mcp/install-skill/route.js +1 -1
- package/_standalone/__next/server/app/api/mcp/install-skill/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/mcp/restart/route.js +1 -1
- package/_standalone/__next/server/app/api/mcp/restart/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/mcp/status/route.js +1 -1
- package/_standalone/__next/server/app/api/mcp/status/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/mcp/tools/route.js +1 -1
- package/_standalone/__next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/mcp/uninstall/route.js +1 -1
- package/_standalone/__next/server/app/api/mcp/uninstall/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/monitoring/route.js +1 -1
- package/_standalone/__next/server/app/api/monitoring/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/obsidian/compat-report/route.js +1 -1
- package/_standalone/__next/server/app/api/obsidian/compat-report/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/obsidian/compat-report/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/obsidian/import/route.js +1 -1
- package/_standalone/__next/server/app/api/obsidian/import/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/obsidian/import/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/obsidian-plugins/settings/route.js +1 -1
- package/_standalone/__next/server/app/api/obsidian-plugins/settings/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/obsidian-plugins/settings/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/recent-files/route.js +1 -1
- package/_standalone/__next/server/app/api/recent-files/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/restart/route.js +1 -1
- package/_standalone/__next/server/app/api/restart/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/search/prewarm/route.js +1 -1
- package/_standalone/__next/server/app/api/search/prewarm/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/search/prewarm/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/search/route.js +1 -1
- package/_standalone/__next/server/app/api/search/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/settings/list-models/route.js +1 -1
- package/_standalone/__next/server/app/api/settings/list-models/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/settings/reset-token/route.js +1 -1
- package/_standalone/__next/server/app/api/settings/reset-token/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/settings/route.js +1 -1
- package/_standalone/__next/server/app/api/settings/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/settings/test-key/route.js +1 -1
- package/_standalone/__next/server/app/api/settings/test-key/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/setup/check-path/route.js +1 -1
- package/_standalone/__next/server/app/api/setup/check-path/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/setup/check-port/route.js +1 -1
- package/_standalone/__next/server/app/api/setup/check-port/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/setup/generate-token/route.js +1 -1
- package/_standalone/__next/server/app/api/setup/generate-token/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/setup/ls/route.js +1 -1
- package/_standalone/__next/server/app/api/setup/ls/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/setup/route.js +1 -1
- package/_standalone/__next/server/app/api/setup/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/setup/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/skills/route.js +1 -1
- package/_standalone/__next/server/app/api/skills/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/space-overview/route.js +1 -1
- package/_standalone/__next/server/app/api/space-overview/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/space-overview/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/sync/route.js +1 -1
- package/_standalone/__next/server/app/api/sync/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/sync/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/tree-version/route.js +1 -1
- package/_standalone/__next/server/app/api/tree-version/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/uninstall/route.js +1 -1
- package/_standalone/__next/server/app/api/uninstall/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/update/route.js +1 -1
- package/_standalone/__next/server/app/api/update/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/update-check/route.js +1 -1
- package/_standalone/__next/server/app/api/update-check/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/update-status/route.js +1 -1
- package/_standalone/__next/server/app/api/update-status/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/api/workflows/route.js +1 -1
- package/_standalone/__next/server/app/api/workflows/route.js.nft.json +1 -1
- package/_standalone/__next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/capture/history/page.js +1 -1
- package/_standalone/__next/server/app/capture/history/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/capture/history/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/capture/page.js +1 -1
- package/_standalone/__next/server/app/capture/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/capture/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/changelog/page.js +1 -1
- package/_standalone/__next/server/app/changelog/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/changelog/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/changes/page.js +1 -1
- package/_standalone/__next/server/app/changes/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/changes/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/echo/[segment]/page.js +1 -1
- package/_standalone/__next/server/app/echo/[segment]/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/echo/page.js +1 -1
- package/_standalone/__next/server/app/echo/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/echo/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/explore/page.js +1 -1
- package/_standalone/__next/server/app/explore/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/explore/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/help/page.js +1 -1
- package/_standalone/__next/server/app/help/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/help/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/inbox/history/page.js +1 -1
- package/_standalone/__next/server/app/inbox/history/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/inbox/history/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/login/page.js +1 -1
- package/_standalone/__next/server/app/login/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/login/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/page.js +1 -1
- package/_standalone/__next/server/app/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/settings/page.js +2 -2
- package/_standalone/__next/server/app/settings/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/setup/page.js +1 -1
- package/_standalone/__next/server/app/setup/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/todo/page.js +1 -1
- package/_standalone/__next/server/app/todo/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/todo/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/trash/page.js +2 -2
- package/_standalone/__next/server/app/trash/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/trash/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/view/[...path]/page.js +3 -3
- package/_standalone/__next/server/app/view/[...path]/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app/wiki/page.js +1 -1
- package/_standalone/__next/server/app/wiki/page.js.nft.json +1 -1
- package/_standalone/__next/server/app/wiki/page_client-reference-manifest.js +1 -1
- package/_standalone/__next/server/app-paths-manifest.json +25 -25
- package/_standalone/__next/server/chunks/1976.js +3 -3
- package/_standalone/__next/server/chunks/{49.js → 3219.js} +5 -5
- package/_standalone/__next/server/chunks/3566.js +1 -1
- package/_standalone/__next/server/chunks/6602.js +37 -37
- package/_standalone/__next/server/chunks/6754.js +1 -1
- package/_standalone/__next/server/chunks/6965.js +3 -3
- package/_standalone/__next/server/chunks/7765.js +1 -1
- package/_standalone/__next/server/chunks/8028.js +1 -1
- package/_standalone/__next/server/chunks/{7295.js → 8461.js} +19 -19
- package/_standalone/__next/server/middleware-build-manifest.js +1 -1
- package/_standalone/__next/server/middleware-react-loadable-manifest.js +1 -1
- package/_standalone/__next/server/pages/500.html +2 -2
- package/_standalone/__next/server/server-reference-manifest.js +1 -1
- package/_standalone/__next/server/server-reference-manifest.json +1 -1
- package/_standalone/__next/static/chunks/{1430-a3447cf370715cad.js → 1430-c4ffa328888515c1.js} +1 -1
- package/{static-web/_next/static/chunks/2992-509ffe91c9d819fe.js → _standalone/__next/static/chunks/2461-a1073a0bd04c228a.js} +12 -12
- package/_standalone/__next/static/chunks/{862-ad4c9d6035101858.js → 47-41e1a06e6d389b69.js} +1 -1
- package/_standalone/__next/static/chunks/{5200-2447cea5eb41a922.js → 5200-6c82e5ce54a95b4b.js} +2 -2
- package/_standalone/__next/static/chunks/{6947.5f1325c9403c27b2.js → 6947.7e50e18da7dc4aef.js} +1 -1
- package/_standalone/__next/static/chunks/9216.d3339c27169b21bf.js +1 -0
- package/{static-web/_next/static/chunks/app/layout-14395cc1f39f1847.js → _standalone/__next/static/chunks/app/layout-5966cd317bbed698.js} +6 -6
- package/_standalone/__next/static/chunks/app/settings/{page-2786e9eb5103d6f3.js → page-c9f44b3447a41431.js} +1 -1
- package/_standalone/__next/static/chunks/app/trash/page-d87207a63591ee16.js +1 -0
- package/_standalone/__next/static/chunks/app/view/[...path]/page-1898f4ae4ab28db0.js +12 -0
- package/_standalone/__next/static/chunks/{webpack-44b6c35a50fd7205.js → webpack-75abef9cbb1ea912.js} +1 -1
- package/dist/server/handlers/mcp-agents.d.ts +1 -0
- package/dist/server/handlers/mcp-agents.d.ts.map +1 -1
- package/dist/server/handlers/mcp-agents.js +230 -7
- package/dist/server/handlers/mcp-agents.js.map +1 -1
- package/dist/server/http.d.ts +7 -4
- package/dist/server/http.d.ts.map +1 -1
- package/dist/server/http.js +2 -0
- package/dist/server/http.js.map +1 -1
- package/dist/server/mcp-agent-registry.d.ts +4 -0
- package/dist/server/mcp-agent-registry.d.ts.map +1 -0
- package/dist/server/mcp-agent-registry.js +266 -0
- package/dist/server/mcp-agent-registry.js.map +1 -0
- package/package.json +1 -1
- package/runtime-manifest.json +1 -1
- package/scripts/smoke-desktop-app.mjs +82 -8
- package/scripts/verify-desktop-runtime.mjs +2 -1
- package/static-web/.mindos-build-version +1 -1
- package/static-web/_next/static/chunks/{1430-a3447cf370715cad.js → 1430-c4ffa328888515c1.js} +1 -1
- package/{_standalone/__next/static/chunks/2992-509ffe91c9d819fe.js → static-web/_next/static/chunks/2461-a1073a0bd04c228a.js} +12 -12
- package/static-web/_next/static/chunks/{862-ad4c9d6035101858.js → 47-41e1a06e6d389b69.js} +1 -1
- package/static-web/_next/static/chunks/{5200-2447cea5eb41a922.js → 5200-6c82e5ce54a95b4b.js} +2 -2
- package/static-web/_next/static/chunks/{6947.5f1325c9403c27b2.js → 6947.7e50e18da7dc4aef.js} +1 -1
- package/static-web/_next/static/chunks/9216.d3339c27169b21bf.js +1 -0
- package/{_standalone/__next/static/chunks/app/layout-14395cc1f39f1847.js → static-web/_next/static/chunks/app/layout-5966cd317bbed698.js} +6 -6
- package/static-web/_next/static/chunks/app/settings/{page-2786e9eb5103d6f3.js → page-c9f44b3447a41431.js} +1 -1
- package/static-web/_next/static/chunks/app/trash/page-d87207a63591ee16.js +1 -0
- package/static-web/_next/static/chunks/app/view/[...path]/page-1898f4ae4ab28db0.js +12 -0
- package/static-web/_next/static/chunks/{webpack-44b6c35a50fd7205.js → webpack-75abef9cbb1ea912.js} +1 -1
- package/static-web/help/index.html +3 -3
- package/static-web/index.html +3 -3
- package/static-web/setup/index.html +3 -3
- package/static-web/static-web-manifest.json +1 -1
- package/static-web/wiki/index.html +3 -3
- package/_standalone/__next/static/chunks/32.c0cfe8b9737e00f0.js +0 -1
- package/_standalone/__next/static/chunks/app/trash/page-98300a315c5d021a.js +0 -1
- package/_standalone/__next/static/chunks/app/view/[...path]/page-44010b2aff77acd6.js +0 -12
- package/static-web/_next/static/chunks/32.c0cfe8b9737e00f0.js +0 -1
- package/static-web/_next/static/chunks/app/trash/page-98300a315c5d021a.js +0 -1
- package/static-web/_next/static/chunks/app/view/[...path]/page-44010b2aff77acd6.js +0 -12
- /package/_standalone/__next/static/{Zq7WEkb-0jkSRDtJcWLrD → J9M4pgRyRHH7Ofbxuuklh}/_buildManifest.js +0 -0
- /package/_standalone/__next/static/{Zq7WEkb-0jkSRDtJcWLrD → J9M4pgRyRHH7Ofbxuuklh}/_ssgManifest.js +0 -0
- /package/static-web/_next/static/{Zq7WEkb-0jkSRDtJcWLrD → J9M4pgRyRHH7Ofbxuuklh}/_buildManifest.js +0 -0
- /package/static-web/_next/static/{Zq7WEkb-0jkSRDtJcWLrD → J9M4pgRyRHH7Ofbxuuklh}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { homedir } from 'node:os';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
function normalizeConfigRoot(path) {
|
|
4
|
+
return path.replace(/\\/g, '/').replace(/\/+$/, '');
|
|
5
|
+
}
|
|
6
|
+
function winAppDataRoot() {
|
|
7
|
+
return normalizeConfigRoot(process.env.APPDATA || join(homedir(), 'AppData', 'Roaming'));
|
|
8
|
+
}
|
|
9
|
+
function platformAppDataPath(options) {
|
|
10
|
+
if (process.platform === 'darwin')
|
|
11
|
+
return options.darwin;
|
|
12
|
+
if (process.platform === 'win32')
|
|
13
|
+
return `${winAppDataRoot()}/${options.win32}`;
|
|
14
|
+
return options.linux;
|
|
15
|
+
}
|
|
16
|
+
const codeUserRoot = platformAppDataPath({
|
|
17
|
+
darwin: '~/Library/Application Support/Code/User',
|
|
18
|
+
linux: '~/.config/Code/User',
|
|
19
|
+
win32: 'Code/User',
|
|
20
|
+
});
|
|
21
|
+
const codeRoot = platformAppDataPath({
|
|
22
|
+
darwin: '~/Library/Application Support/Code',
|
|
23
|
+
linux: '~/.config/Code',
|
|
24
|
+
win32: 'Code',
|
|
25
|
+
});
|
|
26
|
+
const traeCnRoot = platformAppDataPath({
|
|
27
|
+
darwin: '~/Library/Application Support/Trae CN',
|
|
28
|
+
linux: '~/.config/Trae CN',
|
|
29
|
+
win32: 'Trae CN',
|
|
30
|
+
});
|
|
31
|
+
export const DEFAULT_MCP_AGENTS = {
|
|
32
|
+
'mindos': {
|
|
33
|
+
name: 'MindOS',
|
|
34
|
+
project: null,
|
|
35
|
+
global: '~/.mindos/mcp.json',
|
|
36
|
+
key: 'mcpServers',
|
|
37
|
+
preferredTransport: 'stdio',
|
|
38
|
+
presenceDirs: ['~/.mindos/'],
|
|
39
|
+
},
|
|
40
|
+
'claude-code': {
|
|
41
|
+
name: 'Claude Code',
|
|
42
|
+
project: '.mcp.json',
|
|
43
|
+
global: '~/.claude.json',
|
|
44
|
+
key: 'mcpServers',
|
|
45
|
+
preferredTransport: 'stdio',
|
|
46
|
+
presenceCli: 'claude',
|
|
47
|
+
presenceDirs: ['~/.claude/'],
|
|
48
|
+
},
|
|
49
|
+
'cursor': {
|
|
50
|
+
name: 'Cursor',
|
|
51
|
+
project: '.cursor/mcp.json',
|
|
52
|
+
global: '~/.cursor/mcp.json',
|
|
53
|
+
key: 'mcpServers',
|
|
54
|
+
preferredTransport: 'stdio',
|
|
55
|
+
presenceDirs: ['~/.cursor/extensions/'],
|
|
56
|
+
},
|
|
57
|
+
'windsurf': {
|
|
58
|
+
name: 'Windsurf',
|
|
59
|
+
project: null,
|
|
60
|
+
global: '~/.codeium/windsurf/mcp_config.json',
|
|
61
|
+
key: 'mcpServers',
|
|
62
|
+
preferredTransport: 'stdio',
|
|
63
|
+
presenceDirs: ['~/.codeium/windsurf/'],
|
|
64
|
+
},
|
|
65
|
+
'cline': {
|
|
66
|
+
name: 'Cline',
|
|
67
|
+
project: null,
|
|
68
|
+
global: `${codeUserRoot}/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`,
|
|
69
|
+
key: 'mcpServers',
|
|
70
|
+
preferredTransport: 'stdio',
|
|
71
|
+
presenceDirs: [`${codeUserRoot}/globalStorage/saoudrizwan.claude-dev/`],
|
|
72
|
+
},
|
|
73
|
+
'trae': {
|
|
74
|
+
name: 'Trae',
|
|
75
|
+
project: '.trae/mcp.json',
|
|
76
|
+
global: '~/.trae/mcp.json',
|
|
77
|
+
key: 'mcpServers',
|
|
78
|
+
preferredTransport: 'stdio',
|
|
79
|
+
presenceDirs: ['~/.trae/'],
|
|
80
|
+
},
|
|
81
|
+
'gemini-cli': {
|
|
82
|
+
name: 'Gemini CLI',
|
|
83
|
+
project: '.gemini/settings.json',
|
|
84
|
+
global: '~/.gemini/settings.json',
|
|
85
|
+
key: 'mcpServers',
|
|
86
|
+
preferredTransport: 'stdio',
|
|
87
|
+
presenceCli: 'gemini',
|
|
88
|
+
presenceDirs: ['~/.gemini/'],
|
|
89
|
+
},
|
|
90
|
+
'openclaw': {
|
|
91
|
+
name: 'OpenClaw',
|
|
92
|
+
project: null,
|
|
93
|
+
global: '~/.openclaw/mcp.json',
|
|
94
|
+
key: 'mcpServers',
|
|
95
|
+
preferredTransport: 'stdio',
|
|
96
|
+
presenceCli: 'openclaw',
|
|
97
|
+
presenceDirs: ['~/.openclaw/'],
|
|
98
|
+
},
|
|
99
|
+
'codebuddy': {
|
|
100
|
+
name: 'CodeBuddy',
|
|
101
|
+
project: null,
|
|
102
|
+
global: '~/.codebuddy/mcp.json',
|
|
103
|
+
key: 'mcpServers',
|
|
104
|
+
preferredTransport: 'stdio',
|
|
105
|
+
presenceCli: 'codebuddy',
|
|
106
|
+
presenceDirs: ['~/.codebuddy/'],
|
|
107
|
+
},
|
|
108
|
+
'iflow-cli': {
|
|
109
|
+
name: 'iFlow CLI',
|
|
110
|
+
project: '.iflow/settings.json',
|
|
111
|
+
global: '~/.iflow/settings.json',
|
|
112
|
+
key: 'mcpServers',
|
|
113
|
+
preferredTransport: 'stdio',
|
|
114
|
+
presenceCli: 'iflow',
|
|
115
|
+
presenceDirs: ['~/.iflow/'],
|
|
116
|
+
},
|
|
117
|
+
'kimi-cli': {
|
|
118
|
+
name: 'Kimi Code',
|
|
119
|
+
project: '.kimi/mcp.json',
|
|
120
|
+
global: '~/.kimi/mcp.json',
|
|
121
|
+
key: 'mcpServers',
|
|
122
|
+
preferredTransport: 'stdio',
|
|
123
|
+
presenceCli: 'kimi',
|
|
124
|
+
presenceDirs: ['~/.kimi/'],
|
|
125
|
+
},
|
|
126
|
+
'opencode': {
|
|
127
|
+
name: 'OpenCode',
|
|
128
|
+
project: null,
|
|
129
|
+
global: '~/.config/opencode/config.json',
|
|
130
|
+
key: 'mcpServers',
|
|
131
|
+
preferredTransport: 'stdio',
|
|
132
|
+
presenceCli: 'opencode',
|
|
133
|
+
presenceDirs: ['~/.config/opencode/'],
|
|
134
|
+
},
|
|
135
|
+
'pi': {
|
|
136
|
+
name: 'Pi',
|
|
137
|
+
project: '.pi/settings.json',
|
|
138
|
+
global: '~/.pi/agent/mcp.json',
|
|
139
|
+
key: 'mcpServers',
|
|
140
|
+
preferredTransport: 'stdio',
|
|
141
|
+
presenceCli: 'pi',
|
|
142
|
+
presenceDirs: ['~/.pi/'],
|
|
143
|
+
},
|
|
144
|
+
'augment': {
|
|
145
|
+
name: 'Augment',
|
|
146
|
+
project: '.augment/settings.json',
|
|
147
|
+
global: '~/.augment/settings.json',
|
|
148
|
+
key: 'mcpServers',
|
|
149
|
+
preferredTransport: 'stdio',
|
|
150
|
+
presenceCli: 'auggie',
|
|
151
|
+
presenceDirs: ['~/.augment/'],
|
|
152
|
+
},
|
|
153
|
+
'qwen-code': {
|
|
154
|
+
name: 'Qwen Code',
|
|
155
|
+
project: '.qwen/settings.json',
|
|
156
|
+
global: '~/.qwen/settings.json',
|
|
157
|
+
key: 'mcpServers',
|
|
158
|
+
preferredTransport: 'stdio',
|
|
159
|
+
presenceCli: 'qwen',
|
|
160
|
+
presenceDirs: ['~/.qwen/'],
|
|
161
|
+
},
|
|
162
|
+
'qoder': {
|
|
163
|
+
name: 'Qoder',
|
|
164
|
+
project: null,
|
|
165
|
+
global: '~/.qoder.json',
|
|
166
|
+
key: 'mcpServers',
|
|
167
|
+
preferredTransport: 'stdio',
|
|
168
|
+
presenceCli: 'qoder',
|
|
169
|
+
presenceDirs: ['~/.qoder/', '~/.qoder.json'],
|
|
170
|
+
},
|
|
171
|
+
'trae-cn': {
|
|
172
|
+
name: 'Trae CN',
|
|
173
|
+
project: '.trae/mcp.json',
|
|
174
|
+
global: `${traeCnRoot}/User/mcp.json`,
|
|
175
|
+
key: 'mcpServers',
|
|
176
|
+
preferredTransport: 'stdio',
|
|
177
|
+
presenceCli: 'trae-cli',
|
|
178
|
+
presenceDirs: [`${traeCnRoot}/`],
|
|
179
|
+
},
|
|
180
|
+
'roo': {
|
|
181
|
+
name: 'Roo Code',
|
|
182
|
+
project: '.roo/mcp.json',
|
|
183
|
+
global: `${codeUserRoot}/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json`,
|
|
184
|
+
key: 'mcpServers',
|
|
185
|
+
preferredTransport: 'stdio',
|
|
186
|
+
presenceDirs: [`${codeUserRoot}/globalStorage/rooveterinaryinc.roo-cline/`],
|
|
187
|
+
},
|
|
188
|
+
'github-copilot': {
|
|
189
|
+
name: 'GitHub Copilot',
|
|
190
|
+
project: '.vscode/mcp.json',
|
|
191
|
+
global: `${codeUserRoot}/mcp.json`,
|
|
192
|
+
key: 'servers',
|
|
193
|
+
preferredTransport: 'stdio',
|
|
194
|
+
presenceDirs: [`${codeRoot}/`],
|
|
195
|
+
presenceCli: 'code',
|
|
196
|
+
},
|
|
197
|
+
'codex': {
|
|
198
|
+
name: 'Codex',
|
|
199
|
+
project: null,
|
|
200
|
+
global: '~/.codex/config.toml',
|
|
201
|
+
key: 'mcp_servers',
|
|
202
|
+
format: 'toml',
|
|
203
|
+
preferredTransport: 'stdio',
|
|
204
|
+
presenceCli: 'codex',
|
|
205
|
+
presenceDirs: ['~/.codex/'],
|
|
206
|
+
},
|
|
207
|
+
'antigravity': {
|
|
208
|
+
name: 'Antigravity',
|
|
209
|
+
project: '.antigravity/mcp_config.json',
|
|
210
|
+
global: '~/.gemini/antigravity/mcp_config.json',
|
|
211
|
+
key: 'mcpServers',
|
|
212
|
+
preferredTransport: 'stdio',
|
|
213
|
+
presenceCli: 'agy',
|
|
214
|
+
presenceDirs: ['~/.gemini/antigravity/'],
|
|
215
|
+
},
|
|
216
|
+
'qclaw': {
|
|
217
|
+
name: 'QClaw',
|
|
218
|
+
project: null,
|
|
219
|
+
global: '~/.qclaw/mcp.json',
|
|
220
|
+
key: 'mcpServers',
|
|
221
|
+
preferredTransport: 'stdio',
|
|
222
|
+
presenceCli: 'qclaw',
|
|
223
|
+
presenceDirs: ['~/.qclaw/'],
|
|
224
|
+
},
|
|
225
|
+
'workbuddy': {
|
|
226
|
+
name: 'WorkBuddy',
|
|
227
|
+
project: null,
|
|
228
|
+
global: '~/.workbuddy/mcp.json',
|
|
229
|
+
key: 'mcpServers',
|
|
230
|
+
preferredTransport: 'stdio',
|
|
231
|
+
presenceCli: 'workbuddy',
|
|
232
|
+
presenceDirs: ['~/.workbuddy/'],
|
|
233
|
+
},
|
|
234
|
+
'lingma': {
|
|
235
|
+
name: 'Lingma',
|
|
236
|
+
project: null,
|
|
237
|
+
global: '~/.lingma/mcp.json',
|
|
238
|
+
key: 'mcpServers',
|
|
239
|
+
preferredTransport: 'stdio',
|
|
240
|
+
presenceDirs: ['~/.lingma/'],
|
|
241
|
+
},
|
|
242
|
+
'copaw': {
|
|
243
|
+
name: 'CoPaw',
|
|
244
|
+
project: null,
|
|
245
|
+
global: '~/.copaw/config.json',
|
|
246
|
+
key: 'mcp',
|
|
247
|
+
globalNestedKey: 'mcp.clients',
|
|
248
|
+
preferredTransport: 'stdio',
|
|
249
|
+
presenceCli: 'copaw',
|
|
250
|
+
presenceDirs: ['~/.copaw/'],
|
|
251
|
+
},
|
|
252
|
+
'hermes': {
|
|
253
|
+
name: 'Hermes',
|
|
254
|
+
project: null,
|
|
255
|
+
global: '~/.hermes/config.yaml',
|
|
256
|
+
key: 'mcp_servers',
|
|
257
|
+
format: 'yaml',
|
|
258
|
+
preferredTransport: 'stdio',
|
|
259
|
+
presenceCli: 'hermes',
|
|
260
|
+
presenceDirs: ['~/.hermes/'],
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
export function createDefaultMcpAgents() {
|
|
264
|
+
return { ...DEFAULT_MCP_AGENTS };
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=mcp-agent-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-agent-registry.js","sourceRoot":"","sources":["../../src/server/mcp-agent-registry.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
package/runtime-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
-
import { tmpdir } from 'node:os';
|
|
2
|
+
import { existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { homedir, tmpdir } from 'node:os';
|
|
4
4
|
import { dirname, join, resolve } from 'node:path';
|
|
5
5
|
import { spawn } from 'node:child_process';
|
|
6
6
|
|
|
@@ -11,6 +11,7 @@ const webPort = Number(args.webPort ?? 3456);
|
|
|
11
11
|
const home = mkdtempSync(join(tmpdir(), 'mindos-desktop-smoke-home-'));
|
|
12
12
|
const mindRoot = mkdtempSync(join(tmpdir(), 'mindos-desktop-smoke-mind-'));
|
|
13
13
|
const logPath = join(tmpdir(), `mindos-desktop-smoke-${Date.now()}.log`);
|
|
14
|
+
const seededConfigs = [];
|
|
14
15
|
const fatalPatterns = [
|
|
15
16
|
/MCP bundle not found/i,
|
|
16
17
|
/ERR_MODULE_NOT_FOUND/i,
|
|
@@ -33,17 +34,21 @@ if (args.skipIfArchMismatch && isArchMismatch(appPath)) {
|
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
writeFileSync(join(mindRoot, 'README.md'), '# MindOS smoke\n', 'utf-8');
|
|
37
|
+
seedDesktopConfig();
|
|
36
38
|
|
|
37
39
|
const executable = resolveExecutable(appPath);
|
|
38
40
|
console.log(`[smoke-desktop-app] Launching ${executable}`);
|
|
39
41
|
console.log(`[smoke-desktop-app] Log: ${logPath}`);
|
|
40
42
|
|
|
41
|
-
const
|
|
43
|
+
const launchArgs = process.platform === 'linux' ? ['--no-sandbox'] : [];
|
|
44
|
+
const child = spawn(executable, launchArgs, {
|
|
42
45
|
cwd: dirname(executable),
|
|
46
|
+
detached: process.platform !== 'win32',
|
|
43
47
|
env: {
|
|
44
48
|
...process.env,
|
|
45
49
|
HOME: home,
|
|
46
50
|
USERPROFILE: home,
|
|
51
|
+
APPIMAGE_EXTRACT_AND_RUN: process.platform === 'linux' ? '1' : process.env.APPIMAGE_EXTRACT_AND_RUN,
|
|
47
52
|
MIND_ROOT: mindRoot,
|
|
48
53
|
MINDOS_WEB_PORT: String(webPort),
|
|
49
54
|
MINDOS_MCP_PORT: String(args.mcpPort ?? 8781),
|
|
@@ -69,10 +74,11 @@ try {
|
|
|
69
74
|
console.error(log.split('\n').slice(-120).join('\n'));
|
|
70
75
|
process.exitCode = 1;
|
|
71
76
|
} finally {
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
terminateChild();
|
|
78
|
+
restoreSeededConfigs();
|
|
74
79
|
rmSync(home, { recursive: true, force: true });
|
|
75
80
|
rmSync(mindRoot, { recursive: true, force: true });
|
|
81
|
+
process.exit(process.exitCode ?? 0);
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
async function waitForApp(timeout) {
|
|
@@ -119,6 +125,42 @@ function appendLog(chunk) {
|
|
|
119
125
|
writeFileSync(logPath, log);
|
|
120
126
|
}
|
|
121
127
|
|
|
128
|
+
function seedDesktopConfig() {
|
|
129
|
+
const config = JSON.stringify({
|
|
130
|
+
desktopMode: 'local',
|
|
131
|
+
mindRoot,
|
|
132
|
+
setupPending: false,
|
|
133
|
+
port: webPort,
|
|
134
|
+
mcpPort: Number(args.mcpPort ?? 8781),
|
|
135
|
+
}, null, 2);
|
|
136
|
+
|
|
137
|
+
seedConfigPath(join(home, '.mindos', 'config.json'), config);
|
|
138
|
+
// Electron's app.getPath('home') can resolve to the OS account home instead
|
|
139
|
+
// of the HOME env passed to child_process.spawn, especially on macOS runners.
|
|
140
|
+
seedConfigPath(join(homedir(), '.mindos', 'config.json'), config);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function seedConfigPath(configPath, contents) {
|
|
144
|
+
if (seededConfigs.some((entry) => entry.configPath === configPath)) return;
|
|
145
|
+
const configDir = dirname(configPath);
|
|
146
|
+
const previous = existsSync(configPath) ? readFileSync(configPath, 'utf-8') : null;
|
|
147
|
+
seededConfigs.push({ configPath, previous });
|
|
148
|
+
mkdirSync(configDir, { recursive: true });
|
|
149
|
+
writeFileSync(configPath, contents, 'utf-8');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function restoreSeededConfigs() {
|
|
153
|
+
for (const { configPath, previous } of seededConfigs.reverse()) {
|
|
154
|
+
try {
|
|
155
|
+
if (previous === null) rmSync(configPath, { force: true });
|
|
156
|
+
else writeFileSync(configPath, previous, 'utf-8');
|
|
157
|
+
} catch {
|
|
158
|
+
// Best effort only: CI homes are disposable, and local runs should not fail
|
|
159
|
+
// after the app itself has already been validated.
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
122
164
|
function scanFatalLog(throwOnMatch = true) {
|
|
123
165
|
for (const pattern of fatalPatterns) {
|
|
124
166
|
if (pattern.test(log)) {
|
|
@@ -136,18 +178,50 @@ function resolveExecutable(app) {
|
|
|
136
178
|
return app;
|
|
137
179
|
}
|
|
138
180
|
|
|
181
|
+
function terminateChild() {
|
|
182
|
+
const pid = child.pid;
|
|
183
|
+
try {
|
|
184
|
+
child.stdout?.destroy();
|
|
185
|
+
child.stderr?.destroy();
|
|
186
|
+
} catch {
|
|
187
|
+
// ignore cleanup errors
|
|
188
|
+
}
|
|
189
|
+
try {
|
|
190
|
+
if (pid && process.platform !== 'win32') process.kill(-pid, 'SIGTERM');
|
|
191
|
+
else child.kill('SIGTERM');
|
|
192
|
+
} catch {
|
|
193
|
+
// already exited
|
|
194
|
+
}
|
|
195
|
+
try {
|
|
196
|
+
if (pid && process.platform !== 'win32') process.kill(-pid, 'SIGKILL');
|
|
197
|
+
else child.kill('SIGKILL');
|
|
198
|
+
} catch {
|
|
199
|
+
// already exited
|
|
200
|
+
}
|
|
201
|
+
child.unref();
|
|
202
|
+
}
|
|
203
|
+
|
|
139
204
|
function findPackagedApp() {
|
|
140
|
-
const
|
|
141
|
-
const candidates = [
|
|
205
|
+
const distRoots = [resolve('packages/desktop/dist'), resolve('dist')];
|
|
206
|
+
const candidates = distRoots.flatMap((desktopDist) => [
|
|
142
207
|
join(desktopDist, 'mac-arm64', 'MindOS.app'),
|
|
143
208
|
join(desktopDist, 'mac', 'MindOS.app'),
|
|
209
|
+
join(desktopDist, 'linux-unpacked', 'MindOS'),
|
|
144
210
|
join(desktopDist, 'linux-unpacked', 'mindos'),
|
|
145
211
|
join(desktopDist, 'win-unpacked', 'MindOS.exe'),
|
|
146
212
|
join(desktopDist, 'win-arm64-unpacked', 'MindOS.exe'),
|
|
147
|
-
|
|
213
|
+
...findDistFiles(desktopDist, /\.AppImage$/),
|
|
214
|
+
]);
|
|
148
215
|
return candidates.find((candidate) => existsSync(candidate));
|
|
149
216
|
}
|
|
150
217
|
|
|
218
|
+
function findDistFiles(dir, pattern) {
|
|
219
|
+
if (!existsSync(dir)) return [];
|
|
220
|
+
return readdirSync(dir)
|
|
221
|
+
.filter((entry) => pattern.test(entry))
|
|
222
|
+
.map((entry) => join(dir, entry));
|
|
223
|
+
}
|
|
224
|
+
|
|
151
225
|
function isArchMismatch(app) {
|
|
152
226
|
if (process.platform === 'darwin') {
|
|
153
227
|
const wantsArm = app.includes('mac-arm64');
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
3
3
|
import { join, resolve } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
4
5
|
|
|
5
|
-
const root = resolve(new URL('..', import.meta.url)
|
|
6
|
+
const root = resolve(fileURLToPath(new URL('..', import.meta.url)));
|
|
6
7
|
const args = parseArgs(process.argv.slice(2));
|
|
7
8
|
const runtimeRoot = resolve(root, args.runtimeRoot ?? 'packages/desktop/resources/mindos-runtime');
|
|
8
9
|
const mainBundle = resolve(root, args.mainBundle ?? 'packages/desktop/dist-electron/main/main.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.6
|
package/static-web/_next/static/chunks/{1430-a3447cf370715cad.js → 1430-c4ffa328888515c1.js}
RENAMED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
prose-pre:bg-muted/30 prose-pre:border prose-pre:border-border/50 prose-pre:rounded-lg prose-pre:p-3 prose-pre:text-2xs prose-pre:overflow-x-auto
|
|
9
9
|
prose-ul:my-1 prose-ol:my-1
|
|
10
10
|
prose-hr:border-border/30 prose-hr:my-3
|
|
11
|
-
${t}`,dangerouslySetInnerHTML:{__html:r}})}function S({open:e,skillName:t,skill:r,agentNames:i=[],allAgentNames:a=[],isNative:l=!1,nativeSourcePath:o,copy:d,onClose:N,onToggle:S,onDelete:T,onRefresh:z,onAddAgent:L,onRemoveAgent:E}){let K,P,[F,M]=(0,n.useState)(null),[O,W]=(0,n.useState)(""),[R,q]=(0,n.useState)(!1),[J,H]=(0,n.useState)(!1),[_,B]=(0,n.useState)(!1),[I,U]=(0,n.useState)(!1),[G,Q]=(0,n.useState)(null),[V,Z]=(0,n.useState)(!1),[Y,X]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(!1),er=(0,n.useCallback)(async()=>{if(t){q(!0),H(!1);try{if(l&&o){let e=await (0,h.n)("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"read-native",name:t,sourcePath:o})});M(e.content),W(e.description||"")}else if(!l){let e=await (0,h.n)("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"read",name:t})});M(e.content)}}catch{H(!0)}finally{q(!1)}}},[t,l,o]);(0,n.useEffect)(()=>{e&&t&&(M(null),W(""),H(!1),Q(null),U(!1),Z(!1),X(!1),et(!1),er())},[e,t,er]),(0,n.useEffect)(()=>{if(e)return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t);function t(e){"Escape"===e.key&&N()}},[e,N]);let es=(0,n.useCallback)(async()=>{!F||await (0,v.l)(F)&&j.oR.copy()},[F]),en=(0,n.useCallback)(async e=>{if(t&&S){Z(!0);try{await S(t,e)}finally{Z(!1)}}},[t,S]),ei=(0,n.useCallback)(async()=>{if(t&&T){B(!1),U(!0);try{await T(t),Q(d.deleted),await z?.(),setTimeout(()=>N(),800)}catch{Q(d.deleteFailed),U(!1)}}},[t,T,z,N,d.deleted,d.deleteFailed]);if(!e||!t)return null;let ea=r?(0,C.yQ)(`${r.name} ${r.description}`):(0,C.yQ)(t),el=A[ea]??c.A,eo=r?.source==="user",ed=l?d.sourceNative:r?.source==="builtin"?d.sourceBuiltin:d.sourceUser,ec=r?.description||O||"",eu=r?.path||(l&&o?`${o}/${t}/SKILL.md`:""),em=F?(K=F,(P=F.match(/^---\n[\s\S]*?\n---\n?/))&&(K=F.slice(P[0].length).trim()),{triggerConditions:ec||"",instructions:K}):null,ep=a.filter(e=>!i.includes(e));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-40 overlay-backdrop",onClick:N,"aria-hidden":"true"}),(0,s.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":t,className:"fixed right-0 top-0 z-50 h-full w-full max-w-md border-l border-border bg-card shadow-2xl flex flex-col animate-in slide-in-from-right duration-200",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/60 bg-gradient-to-r from-card to-card/80 shrink-0",children:[(0,s.jsx)("div",{className:"w-9 h-9 rounded-xl bg-[var(--amber)]/[0.08] flex items-center justify-center text-[var(--amber)] shrink-0",children:(0,s.jsx)(el,{size:18})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-foreground truncate",children:t}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)("span",{className:`text-2xs px-2 py-0.5 rounded-full font-medium select-none ${l||r?.source==="builtin"?"bg-muted text-muted-foreground":"bg-[var(--amber-dim)] text-[var(--amber-text)]"}`,children:ed}),(0,s.jsx)("span",{className:"text-2xs text-muted-foreground/60 capitalize",children:ea})]})]}),(0,s.jsx)("button",{type:"button",onClick:N,className:"shrink-0 p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":d.close,children:(0,s.jsx)(u.A,{size:16})})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[ec&&(0,s.jsxs)("section",{children:[(0,s.jsx)(D,{label:"Trigger Conditions"}),(0,s.jsx)("div",{className:"rounded-lg border border-border/40 bg-muted/[0.03] p-3.5",children:(0,s.jsx)("p",{className:"text-xs text-foreground/80 leading-relaxed whitespace-pre-wrap",children:ec})})]}),!ec&&!l&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground italic",children:d.noDescription}),(0,s.jsx)("section",{children:(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[!l&&r&&(0,s.jsx)($,{label:d.enabled,value:r.enabled?"✓":"—",tone:r.enabled?"ok":"muted"}),(0,s.jsx)($,{label:d.capability,value:ea}),(0,s.jsx)($,{label:d.source,value:ed}),(0,s.jsx)($,{label:d.agents,value:String(i.length)})]})}),(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)(D,{label:d.agents,noMargin:!0}),L&&ep.length>0&&(0,s.jsxs)("button",{type:"button",onClick:()=>X(!Y),className:"inline-flex items-center gap-1 text-2xs font-medium text-[var(--amber)] hover:opacity-80 transition-opacity cursor-pointer",children:[(0,s.jsx)(m.A,{size:12}),(0,s.jsx)("span",{children:"Add"})]})]}),Y&&ep.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2 p-2 rounded-lg border border-dashed border-[var(--amber)]/30 bg-[var(--amber)]/[0.03]",children:ep.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>{L?.(t,e),X(!1)},className:"inline-flex items-center gap-1 px-2 py-1 text-2xs rounded-md border border-border bg-card hover:bg-muted cursor-pointer transition-colors",children:[(0,s.jsx)(m.A,{size:10,className:"text-[var(--amber)]"}),(0,s.jsx)("span",{className:"text-foreground/80",children:e})]},e))}),i.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,s.jsx)(k.lx,{name:e,size:"sm",onRemove:E?()=>E(t,e):void 0},e))}):(0,s.jsx)("div",{className:"rounded-lg border border-border/40 bg-card/30 p-3 text-center",children:(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:d.noAgents})})]}),(null!==F||R||J)&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)(D,{label:"Instructions",noMargin:!0}),(0,s.jsx)("div",{className:"flex items-center gap-2",children:F&&(0,s.jsxs)("button",{type:"button",onClick:es,className:"inline-flex items-center gap-1 text-2xs text-muted-foreground hover:text-foreground cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded px-1.5 py-0.5","aria-label":d.copyContent,children:[(0,s.jsx)(p.A,{size:11}),d.copyContent]})})]}),R&&(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-background p-6 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[(0,s.jsx)(x.A,{size:14,className:"animate-spin"}),d.loading]}),J&&(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/20 bg-destructive/[0.03] p-4 text-center space-y-2",children:[(0,s.jsx)("p",{className:"text-sm text-destructive",children:d.loadFailed}),(0,s.jsx)("button",{type:"button",onClick:er,className:"text-xs text-foreground underline hover:no-underline cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",children:d.retry})]}),em&&!R&&!J&&(0,s.jsx)("div",{className:`rounded-lg border border-border/50 bg-muted/[0.02] p-4 overflow-hidden transition-all duration-200 ${!ee?"max-h-60":""}`,children:(0,s.jsx)(w,{text:em.instructions})}),em&&!R&&!J&&em.instructions.split("\n").length>15&&(0,s.jsxs)("button",{type:"button",onClick:()=>et(!ee),className:"inline-flex items-center gap-1 mt-2 text-2xs font-medium text-[var(--amber)] hover:opacity-80 transition-opacity cursor-pointer",children:[(0,s.jsx)(g.A,{size:12,className:`transition-transform duration-200 ${ee?"rotate-180":""}`}),(0,s.jsx)("span",{children:ee?"Collapse":"View All"})]})]}),eu&&(0,s.jsxs)("section",{children:[(0,s.jsx)(D,{label:d.path}),(0,s.jsx)("div",{className:"rounded-lg border border-border/50 bg-muted/[0.03] p-3",children:(0,s.jsx)("code",{className:"text-2xs text-foreground/60 font-mono break-all leading-relaxed",children:eu})})]}),G&&(0,s.jsx)("div",{role:"status","aria-live":"polite",className:"rounded-md border border-border bg-muted/50 px-3 py-2 text-xs text-muted-foreground animate-in fade-in duration-200",children:G})]}),!l&&r&&(0,s.jsxs)("div",{className:"shrink-0 border-t border-border px-5 py-3 flex items-center gap-2",children:[S&&(0,s.jsxs)("div",{className:"flex items-center gap-2 mr-auto",children:[(0,s.jsx)(f.A,{size:14,className:"text-muted-foreground","aria-hidden":"true"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:r.enabled?d.enabled:d.disabled}),(0,s.jsx)(y.lM,{size:"sm",checked:r.enabled,onChange:e=>void en(e),disabled:V})]}),eo&&T&&(0,s.jsxs)("button",{type:"button",onClick:()=>B(!0),disabled:I,className:"inline-flex items-center gap-1.5 px-2.5 min-h-[32px] text-xs rounded-md border border-destructive/30 text-destructive hover:bg-destructive/10 cursor-pointer disabled:opacity-50 transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[I?(0,s.jsx)(x.A,{size:12,className:"animate-spin"}):(0,s.jsx)(b.A,{size:12}),d.deleteSkill]})]})]}),(0,s.jsx)(k.TM,{open:_,title:d.confirmDeleteTitle,message:t?d.confirmDeleteMessage(t):"",confirmLabel:d.confirmDeleteAction,cancelLabel:d.cancelAction,onConfirm:()=>void ei(),onCancel:()=>B(!1),variant:"destructive"})]})}function D({label:e,noMargin:t}){return(0,s.jsx)("h3",{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider ${t?"":"mb-2"}`,children:e})}function $({label:e,value:t,tone:r="default"}){return(0,s.jsxs)("div",{className:"rounded-xl border border-border/50 bg-muted/[0.03] px-3.5 py-3 hover:bg-muted/[0.06] transition-colors duration-100",children:[(0,s.jsx)("span",{className:"text-2xs text-muted-foreground/60 block mb-1 uppercase tracking-wider",children:e}),(0,s.jsx)("span",{className:`text-sm font-semibold capitalize ${"ok"===r?"text-[var(--success)]":"muted"===r?"text-muted-foreground":"text-foreground"}`,children:t})]})}},51117:(e,t,r)=>{r.d(t,{V:()=>n});var s=r(44223);function n(){let[e,t]=(0,s.useState)([]),[r,n]=(0,s.useState)(!1),[i,a]=(0,s.useState)(null),l=(0,s.useCallback)(async e=>{n(!0),a(null);try{let r=await fetch("/api/a2a/discover",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})}),s=await r.json();if(s.agent)return t(e=>e.some(e=>e.id===s.agent.id)?e.map(e=>e.id===s.agent.id?s.agent:e):[...e,s.agent]),s.agent;return a(s.error||"Discovery failed"),null}catch(e){return a(e.message),null}finally{n(!1)}},[]);return{agents:e,discovering:r,error:i,discover:l,remove:(0,s.useCallback)(e=>{t(t=>t.filter(t=>t.id!==e))},[]),refresh:(0,s.useCallback)(()=>{t([]),a(null)},[])}}},82829:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(66839),n=r(44223),i=r(72799),a=r(21082),l=r(38688),o=r(53097),d=r(30626),c=r(29696),u=r(72615),m=r(98327),p=r(44361),x=r(2073),g=r(84747),f=r(79455),b=r(69527);function h({open:e,onClose:t,onSuccess:r,existingAgents:h,editAgent:j}){let{t:y}=(0,x.Y)(),N=y.agentsContent.overview,k=(0,n.useRef)(null),C=(0,n.useRef)(null),A=!!j,[w,S]=(0,n.useState)("input"),[D,$]=(0,n.useState)(!1),[T,z]=(0,n.useState)(!1),[L,E]=(0,n.useState)(null),[K,P]=(0,n.useState)(null),[F,M]=(0,n.useState)(!1),[O,W]=(0,n.useState)(!1),[R,q]=(0,n.useState)({name:"",baseDir:"",global:"",configKey:"mcpServers",format:"json",preferredTransport:"stdio",project:"",presenceCli:"",skillDir:""});(0,n.useEffect)(()=>{e&&(j?(q({name:j.name,baseDir:j.customBaseDir||"",global:j.globalPath||"",configKey:j.configKey||"mcpServers",format:j.format||"json",preferredTransport:j.preferredTransport||"stdio",project:j.projectPath||"",presenceCli:"",skillDir:j.skillWorkspacePath||""}),S("result"),W(!0),P(null),E(null)):(q({name:"",baseDir:"",global:"",configKey:"mcpServers",format:"json",preferredTransport:"stdio",project:"",presenceCli:"",skillDir:""}),S("input"),W(!1),P(null),E(null),M(!1)))},[e,j]),(0,n.useEffect)(()=>{e&&"input"===w&&setTimeout(()=>C.current?.focus(),100)},[e,w]),(0,g.r)(k,e),(0,n.useEffect)(()=>{if(!e)return;let r=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t]);let J=(0,n.useMemo)(()=>{let e=new Set(h.map(e=>e.key));return A&&j&&e.delete(j.key),e},[h,A,j]),H=(0,n.useMemo)(()=>R.name.toLowerCase().replace(/[^\x20-\x7E]/g,"").replace(/[_\s]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-{2,}/g,"-").replace(/^-|-$/g,""),[R.name]),_=(0,n.useMemo)(()=>{if(A||!R.name.trim())return null;let e=H||"";if(!e)return null;if(J.has(e)){let t=h.find(t=>t.key===e);return t?.isCustom?N.customAgentKeyConflict?.(e)??`An agent with key "${e}" already exists`:N.customAgentBuiltinConflict?.(t?.name||e)??`Conflicts with built-in agent "${t?.name||e}"`}return null},[A,H,J,h,R.name,N]),B=R.name.trim()&&R.baseDir.trim()&&!_,I=(0,n.useCallback)((e,t)=>{q(r=>({...r,[e]:t}))},[]),U=(0,n.useCallback)(async()=>{if(!B)return;E(null),$(!0);let e=R.baseDir.trim();if(!e.startsWith("~/")){let t=e.endsWith("/")?e:e+"/";I("global",t+"mcp.json"),I("skillDir",t+"skills/"),P({exists:!1,hasSkillsDir:!1}),S("result"),$(!1);return}let t=new AbortController,r=setTimeout(()=>t.abort(),3e3);try{let s=await fetch("/api/agents/custom/detect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseDir:e}),signal:t.signal});clearTimeout(r);let n=await s.json();if(!s.ok)return void E(n.error||N.customAgentFailedSave);P(n),n.detectedConfig?I("global",n.detectedConfig):I("global",(e.endsWith("/")?e:e+"/")+"mcp.json"),n.detectedFormat&&I("format",n.detectedFormat),n.detectedConfigKey&&I("configKey",n.detectedConfigKey),I("skillDir",n.detectedSkillDir||(e.endsWith("/")?e:e+"/")+"skills/"),S("result")}catch{clearTimeout(r);let t=e.endsWith("/")?e:e+"/";I("global",t+"mcp.json"),I("skillDir",t+"skills/"),P({exists:!1,hasSkillsDir:!1}),M(!0),S("result")}finally{$(!1)}},[B,R.baseDir,I,N]),G=(0,n.useCallback)(async()=>{z(!0),E(null);let e=A?{key:j.key,name:R.name.trim(),baseDir:R.baseDir.trim(),global:R.global.trim()||void 0,configKey:R.configKey.trim()||void 0,format:R.format,preferredTransport:R.preferredTransport,project:R.project.trim()||null,presenceCli:R.presenceCli.trim()||void 0,skillDir:R.skillDir.trim()||void 0}:{name:R.name.trim(),baseDir:R.baseDir.trim(),global:R.global.trim()||void 0,configKey:R.configKey.trim()||void 0,format:R.format,preferredTransport:R.preferredTransport,project:R.project.trim()||null,presenceCli:R.presenceCli.trim()||void 0,skillDir:R.skillDir.trim()||void 0};try{let s=await fetch("/api/agents/custom",{method:A?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await s.json();if(!s.ok){E(n.error||N.customAgentFailedSave),z(!1);return}let i=A?N.customAgentUpdated(R.name.trim()):N.customAgentAdded(R.name.trim());f.oR.success(i),r(),t()}catch{E(N.customAgentNetworkError)}finally{z(!1)}},[A,j,R,r,t,N]),Q=(0,n.useCallback)(e=>{"Enter"===e.key&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),"input"===w&&B&&!D?U():"result"!==w||T||G())},[w,B,D,T,U,G]);if(!e)return null;let V=A?N.editCustomAgentTitle(j.name):N.addCustomAgentTitle;return(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"custom-agent-modal-title",children:[(0,s.jsx)("div",{className:"absolute inset-0 modal-backdrop",onClick:t,"aria-hidden":"true"}),(0,s.jsxs)("div",{ref:k,className:"relative bg-card border border-border rounded-xl shadow-2xl max-w-md w-full mx-4 animate-in fade-in zoom-in-95 duration-200 max-h-[85vh] overflow-y-auto",onKeyDown:Q,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-5 pt-5 pb-1",children:[(0,s.jsx)("h2",{id:"custom-agent-modal-title",className:"text-base font-semibold text-foreground",children:V}),(0,s.jsx)("button",{type:"button",onClick:t,className:"w-7 h-7 rounded-md flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Close",children:(0,s.jsx)(i.A,{size:16})})]}),(0,s.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,s.jsxs)(b.D0,{label:N.customAgentName,children:[(0,s.jsx)("input",{ref:C,value:R.name,onChange:e=>I("name",e.target.value),placeholder:N.customAgentNamePlaceholder,"aria-invalid":!!_,className:`w-full px-3 py-2 text-sm bg-background border rounded-lg text-foreground placeholder:text-muted-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50 ${_?"border-[var(--error)] focus-visible:ring-[var(--error)]":"border-border"}`,autoComplete:"off"}),_?(0,s.jsxs)("p",{className:"text-xs text-[var(--error)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(a.A,{size:12}),_]}):R.name.trim()&&H?(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:N.customAgentKeyPreview(H)}):null]}),(0,s.jsxs)(b.D0,{label:N.customAgentDir,hint:"input"===w?N.customAgentDirHint:void 0,children:[(0,s.jsx)(b.pd,{value:R.baseDir,onChange:e=>{I("baseDir",e.target.value),"result"===w&&(S("input"),P(null))},placeholder:N.customAgentDirPlaceholder,autoComplete:"off"}),"result"===w&&K?.exists&&(0,s.jsxs)("p",{className:"text-xs text-[var(--success)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(l.A,{size:12}),N.customAgentDirFound]}),"result"===w&&K&&!K.exists&&!F&&(0,s.jsxs)("p",{className:"text-xs text-[var(--info,var(--muted-foreground))] mt-1 flex items-center gap-1",children:[(0,s.jsx)(o.A,{size:12}),N.customAgentDirNotFound]}),"result"===w&&F&&(0,s.jsxs)("p",{className:"text-xs text-[var(--amber)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(a.A,{size:12}),N.customAgentDetectTimeout]})]}),"result"===w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:`rounded-lg p-4 space-y-3 ${K?.exists?"border border-[var(--success)]/20 bg-[var(--success)]/5":"border border-border bg-muted/30"}`,children:[(0,s.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:K?.exists?N.customAgentDetectedTitle:N.customAgentDefaultTitle}),(0,s.jsxs)("div",{className:"space-y-2.5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentConfigLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground font-mono truncate block",children:R.global}),K?.mcpParseError&&(0,s.jsxs)("p",{className:"text-xs text-[var(--error)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(a.A,{size:12,className:"shrink-0"}),K.mcpParseError]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentFormatLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground",children:R.format.toUpperCase()})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:"Config Key"}),(0,s.jsx)("span",{className:"text-sm text-foreground font-mono",children:R.configKey})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentTransportLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground",children:R.preferredTransport})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-xs text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(d.A,{size:11,className:"shrink-0","aria-hidden":"true"}),"MCP Servers"]}),K?.mcpServers&&K.mcpServers.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:K.mcpServers.map(e=>(0,s.jsx)("span",{className:"text-xs bg-muted/60 text-foreground px-2 py-0.5 rounded font-mono",children:e},e))}):(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-xs text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(c.A,{size:11,className:"shrink-0","aria-hidden":"true"}),N.customAgentSkillsLabel]}),K?.skillNames&&K.skillNames.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:K.skillNames.map(e=>(0,s.jsx)("span",{className:"text-xs bg-[var(--amber-dim)] text-[var(--amber-text,var(--foreground))] px-2 py-0.5 rounded font-mono",children:e},e))}):(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})]})]})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>W(e=>!e),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",children:[O?(0,s.jsx)(u.A,{size:14}):(0,s.jsx)(m.A,{size:14}),N.customAgentCustomize]}),(0,s.jsx)("div",{className:"grid transition-[grid-template-rows] duration-200 ease-out",style:{gridTemplateRows:O?"1fr":"0fr"},children:(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card/50 p-5 space-y-4",children:[(0,s.jsx)(b.D0,{label:N.customAgentConfigPath,children:(0,s.jsx)(b.pd,{value:R.global,onChange:e=>I("global",e.target.value),autoComplete:"off"})}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsx)(b.D0,{label:N.customAgentConfigKey,children:(0,s.jsx)(b.pd,{value:R.configKey,onChange:e=>I("configKey",e.target.value),autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentFormat,children:(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(v,{label:"JSON",checked:"json"===R.format,onChange:()=>I("format","json"),name:"format"}),(0,s.jsx)(v,{label:"TOML",checked:"toml"===R.format,onChange:()=>I("format","toml"),name:"format"})]})})]}),(0,s.jsx)(b.D0,{label:N.customAgentTransport,children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(v,{label:"stdio",checked:"stdio"===R.preferredTransport,onChange:()=>I("preferredTransport","stdio"),name:"transport"}),(0,s.jsx)(v,{label:"http",checked:"http"===R.preferredTransport,onChange:()=>I("preferredTransport","http"),name:"transport"})]})}),(0,s.jsx)(b.D0,{label:N.customAgentSkillDir,hint:N.customAgentSkillDirHint,children:(0,s.jsx)(b.pd,{value:R.skillDir,onChange:e=>I("skillDir",e.target.value),placeholder:N.customAgentSkillDirPlaceholder,autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentProjectConfig,children:(0,s.jsx)(b.pd,{value:R.project,onChange:e=>I("project",e.target.value),autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentCliBinary,children:(0,s.jsx)(b.pd,{value:R.presenceCli,onChange:e=>I("presenceCli",e.target.value),placeholder:N.customAgentCliBinaryPlaceholder,autoComplete:"off"})})]})})})]}),L&&(0,s.jsxs)("div",{className:"rounded-lg border border-[var(--error)]/30 bg-[var(--error)]/5 p-3 flex items-start gap-2",children:[(0,s.jsx)(a.A,{size:14,className:"text-[var(--error)] mt-0.5 shrink-0"}),(0,s.jsx)("p",{className:"text-sm text-[var(--error)]",children:L})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 px-5 pb-5 pt-1",children:[(0,s.jsx)("button",{type:"button",onClick:t,className:"px-4 min-h-[36px] text-sm rounded-lg border border-border hover:bg-muted cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:N.customAgentCancel}),"input"===w?(0,s.jsx)("button",{type:"button",onClick:U,disabled:!B||D,className:"px-4 min-h-[36px] text-sm rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex items-center gap-2",children:D?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{size:14,className:"animate-spin"}),N.customAgentDetecting]}):(0,s.jsxs)(s.Fragment,{children:[N.customAgentContinue,(0,s.jsx)(m.A,{size:14})]})}):(0,s.jsx)("button",{type:"button",onClick:G,disabled:T,className:"px-4 min-h-[36px] text-sm rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex items-center gap-2",children:T?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{size:14,className:"animate-spin"}),A?N.customAgentSaving:N.customAgentAdding]}):L?N.customAgentRetry:A?N.customAgentSave:N.customAgentAdd})]})]})]})}function v({label:e,checked:t,onChange:r,name:n}){return(0,s.jsxs)("label",{className:`px-3 py-1.5 text-sm rounded-md border cursor-pointer transition-all duration-150 select-none ${t?"border-[var(--amber)]/40 bg-[var(--amber-dim)] text-foreground font-medium":"border-border bg-background text-muted-foreground hover:bg-muted"}`,children:[(0,s.jsx)("input",{type:"radio",name:n,checked:t,onChange:r,className:"sr-only"}),e]})}},82977:(e,t,r)=>{r.d(t,{Gj:()=>i,ZD:()=>n,v7:()=>a});let s={"&":"&","<":"<",">":">",'"':""","'":"'"};function n(e){return e.replace(/[&<>"']/g,e=>s[e])}function i(e){return n(e).replace(/`/g,"`")}function a(e){let t=e.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").trim(),r=t.replace(/[\u0000-\u001f\u007f\s]+/g,"").toLowerCase();return r.startsWith("http://")||r.startsWith("https://")||r.startsWith("mailto:")||t.startsWith("/")&&!t.startsWith("//")||t.startsWith("#")?i(t):"#"}}}]);
|
|
11
|
+
${t}`,dangerouslySetInnerHTML:{__html:r}})}function S({open:e,skillName:t,skill:r,agentNames:i=[],allAgentNames:a=[],isNative:l=!1,nativeSourcePath:o,copy:d,onClose:N,onToggle:S,onDelete:T,onRefresh:z,onAddAgent:L,onRemoveAgent:E}){let K,P,[F,M]=(0,n.useState)(null),[O,W]=(0,n.useState)(""),[R,q]=(0,n.useState)(!1),[J,H]=(0,n.useState)(!1),[_,B]=(0,n.useState)(!1),[I,U]=(0,n.useState)(!1),[G,Q]=(0,n.useState)(null),[V,Z]=(0,n.useState)(!1),[Y,X]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(!1),er=(0,n.useCallback)(async()=>{if(t){q(!0),H(!1);try{if(l&&o){let e=await (0,h.n)("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"read-native",name:t,sourcePath:o})});M(e.content),W(e.description||"")}else if(!l){let e=await (0,h.n)("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"read",name:t})});M(e.content)}}catch{H(!0)}finally{q(!1)}}},[t,l,o]);(0,n.useEffect)(()=>{e&&t&&(M(null),W(""),H(!1),Q(null),U(!1),Z(!1),X(!1),et(!1),er())},[e,t,er]),(0,n.useEffect)(()=>{if(e)return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t);function t(e){"Escape"===e.key&&N()}},[e,N]);let es=(0,n.useCallback)(async()=>{!F||await (0,v.l)(F)&&j.oR.copy()},[F]),en=(0,n.useCallback)(async e=>{if(t&&S){Z(!0);try{await S(t,e)}finally{Z(!1)}}},[t,S]),ei=(0,n.useCallback)(async()=>{if(t&&T){B(!1),U(!0);try{await T(t),Q(d.deleted),await z?.(),setTimeout(()=>N(),800)}catch{Q(d.deleteFailed),U(!1)}}},[t,T,z,N,d.deleted,d.deleteFailed]);if(!e||!t)return null;let ea=r?(0,C.yQ)(`${r.name} ${r.description}`):(0,C.yQ)(t),el=A[ea]??c.A,eo=r?.source==="user",ed=l?d.sourceNative:r?.source==="builtin"?d.sourceBuiltin:d.sourceUser,ec=r?.description||O||"",eu=r?.path||(l&&o?`${o}/${t}/SKILL.md`:""),em=F?(K=F,(P=F.match(/^---\n[\s\S]*?\n---\n?/))&&(K=F.slice(P[0].length).trim()),{triggerConditions:ec||"",instructions:K}):null,ep=a.filter(e=>!i.includes(e));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-40 overlay-backdrop",onClick:N,"aria-hidden":"true"}),(0,s.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":t,className:"fixed right-0 top-0 z-50 h-full w-full max-w-md border-l border-border bg-card shadow-2xl flex flex-col animate-in slide-in-from-right duration-200",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/60 bg-gradient-to-r from-card to-card/80 shrink-0",children:[(0,s.jsx)("div",{className:"w-9 h-9 rounded-xl bg-[var(--amber)]/[0.08] flex items-center justify-center text-[var(--amber)] shrink-0",children:(0,s.jsx)(el,{size:18})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-foreground truncate",children:t}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)("span",{className:`text-2xs px-2 py-0.5 rounded-full font-medium select-none ${l||r?.source==="builtin"?"bg-muted text-muted-foreground":"bg-[var(--amber-dim)] text-[var(--amber-text)]"}`,children:ed}),(0,s.jsx)("span",{className:"text-2xs text-muted-foreground/60 capitalize",children:ea})]})]}),(0,s.jsx)("button",{type:"button",onClick:N,className:"shrink-0 p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":d.close,children:(0,s.jsx)(u.A,{size:16})})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[ec&&(0,s.jsxs)("section",{children:[(0,s.jsx)(D,{label:"Trigger Conditions"}),(0,s.jsx)("div",{className:"rounded-lg border border-border/40 bg-muted/[0.03] p-3.5",children:(0,s.jsx)("p",{className:"text-xs text-foreground/80 leading-relaxed whitespace-pre-wrap",children:ec})})]}),!ec&&!l&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground italic",children:d.noDescription}),(0,s.jsx)("section",{children:(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[!l&&r&&(0,s.jsx)($,{label:d.enabled,value:r.enabled?"✓":"—",tone:r.enabled?"ok":"muted"}),(0,s.jsx)($,{label:d.capability,value:ea}),(0,s.jsx)($,{label:d.source,value:ed}),(0,s.jsx)($,{label:d.agents,value:String(i.length)})]})}),(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)(D,{label:d.agents,noMargin:!0}),L&&ep.length>0&&(0,s.jsxs)("button",{type:"button",onClick:()=>X(!Y),className:"inline-flex items-center gap-1 text-2xs font-medium text-[var(--amber)] hover:opacity-80 transition-opacity cursor-pointer",children:[(0,s.jsx)(m.A,{size:12}),(0,s.jsx)("span",{children:"Add"})]})]}),Y&&ep.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2 p-2 rounded-lg border border-dashed border-[var(--amber)]/30 bg-[var(--amber)]/[0.03]",children:ep.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>{L?.(t,e),X(!1)},className:"inline-flex items-center gap-1 px-2 py-1 text-2xs rounded-md border border-border bg-card hover:bg-muted cursor-pointer transition-colors",children:[(0,s.jsx)(m.A,{size:10,className:"text-[var(--amber)]"}),(0,s.jsx)("span",{className:"text-foreground/80",children:e})]},e))}),i.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,s.jsx)(k.lx,{name:e,size:"sm",onRemove:E?()=>E(t,e):void 0},e))}):(0,s.jsx)("div",{className:"rounded-lg border border-border/40 bg-card/30 p-3 text-center",children:(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:d.noAgents})})]}),(null!==F||R||J)&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)(D,{label:"Instructions",noMargin:!0}),(0,s.jsx)("div",{className:"flex items-center gap-2",children:F&&(0,s.jsxs)("button",{type:"button",onClick:es,className:"inline-flex items-center gap-1 text-2xs text-muted-foreground hover:text-foreground cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded px-1.5 py-0.5","aria-label":d.copyContent,children:[(0,s.jsx)(p.A,{size:11}),d.copyContent]})})]}),R&&(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-background p-6 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[(0,s.jsx)(x.A,{size:14,className:"animate-spin"}),d.loading]}),J&&(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/20 bg-destructive/[0.03] p-4 text-center space-y-2",children:[(0,s.jsx)("p",{className:"text-sm text-destructive",children:d.loadFailed}),(0,s.jsx)("button",{type:"button",onClick:er,className:"text-xs text-foreground underline hover:no-underline cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",children:d.retry})]}),em&&!R&&!J&&(0,s.jsx)("div",{className:`rounded-lg border border-border/50 bg-muted/[0.02] p-4 overflow-hidden transition-all duration-200 ${!ee?"max-h-60":""}`,children:(0,s.jsx)(w,{text:em.instructions})}),em&&!R&&!J&&em.instructions.split("\n").length>15&&(0,s.jsxs)("button",{type:"button",onClick:()=>et(!ee),className:"inline-flex items-center gap-1 mt-2 text-2xs font-medium text-[var(--amber)] hover:opacity-80 transition-opacity cursor-pointer",children:[(0,s.jsx)(g.A,{size:12,className:`transition-transform duration-200 ${ee?"rotate-180":""}`}),(0,s.jsx)("span",{children:ee?"Collapse":"View All"})]})]}),eu&&(0,s.jsxs)("section",{children:[(0,s.jsx)(D,{label:d.path}),(0,s.jsx)("div",{className:"rounded-lg border border-border/50 bg-muted/[0.03] p-3",children:(0,s.jsx)("code",{className:"text-2xs text-foreground/60 font-mono break-all leading-relaxed",children:eu})})]}),G&&(0,s.jsx)("div",{role:"status","aria-live":"polite",className:"rounded-md border border-border bg-muted/50 px-3 py-2 text-xs text-muted-foreground animate-in fade-in duration-200",children:G})]}),!l&&r&&(0,s.jsxs)("div",{className:"shrink-0 border-t border-border px-5 py-3 flex items-center gap-2",children:[S&&(0,s.jsxs)("div",{className:"flex items-center gap-2 mr-auto",children:[(0,s.jsx)(f.A,{size:14,className:"text-muted-foreground","aria-hidden":"true"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:r.enabled?d.enabled:d.disabled}),(0,s.jsx)(y.lM,{size:"sm",checked:r.enabled,onChange:e=>void en(e),disabled:V})]}),eo&&T&&(0,s.jsxs)("button",{type:"button",onClick:()=>B(!0),disabled:I,className:"inline-flex items-center gap-1.5 px-2.5 min-h-[32px] text-xs rounded-md border border-destructive/30 text-destructive hover:bg-destructive/10 cursor-pointer disabled:opacity-50 transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[I?(0,s.jsx)(x.A,{size:12,className:"animate-spin"}):(0,s.jsx)(b.A,{size:12}),d.deleteSkill]})]})]}),(0,s.jsx)(k.TM,{open:_,title:d.confirmDeleteTitle,message:t?d.confirmDeleteMessage(t):"",confirmLabel:d.confirmDeleteAction,cancelLabel:d.cancelAction,onConfirm:()=>void ei(),onCancel:()=>B(!1),variant:"destructive"})]})}function D({label:e,noMargin:t}){return(0,s.jsx)("h3",{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider ${t?"":"mb-2"}`,children:e})}function $({label:e,value:t,tone:r="default"}){return(0,s.jsxs)("div",{className:"rounded-xl border border-border/50 bg-muted/[0.03] px-3.5 py-3 hover:bg-muted/[0.06] transition-colors duration-100",children:[(0,s.jsx)("span",{className:"text-2xs text-muted-foreground/60 block mb-1 uppercase tracking-wider",children:e}),(0,s.jsx)("span",{className:`text-sm font-semibold capitalize ${"ok"===r?"text-[var(--success)]":"muted"===r?"text-muted-foreground":"text-foreground"}`,children:t})]})}},51117:(e,t,r)=>{r.d(t,{V:()=>n});var s=r(44223);function n(){let[e,t]=(0,s.useState)([]),[r,n]=(0,s.useState)(!1),[i,a]=(0,s.useState)(null),l=(0,s.useCallback)(async e=>{n(!0),a(null);try{let r=await fetch("/api/a2a/discover",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})}),s=await r.json();if(s.agent)return t(e=>e.some(e=>e.id===s.agent.id)?e.map(e=>e.id===s.agent.id?s.agent:e):[...e,s.agent]),s.agent;return a(s.error||"Discovery failed"),null}catch(e){return a(e.message),null}finally{n(!1)}},[]);return{agents:e,discovering:r,error:i,discover:l,remove:(0,s.useCallback)(e=>{t(t=>t.filter(t=>t.id!==e))},[]),refresh:(0,s.useCallback)(()=>{t([]),a(null)},[])}}},82829:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(66839),n=r(44223),i=r(72799),a=r(21082),l=r(38688),o=r(53097),d=r(30626),c=r(29696),u=r(72615),m=r(98327),p=r(44361),x=r(2073),g=r(84747),f=r(79455),b=r(69527);function h({open:e,onClose:t,onSuccess:r,existingAgents:h,editAgent:j}){let{t:y}=(0,x.Y)(),N=y.agentsContent.overview,k=(0,n.useRef)(null),C=(0,n.useRef)(null),A=!!j,[w,S]=(0,n.useState)("input"),[D,$]=(0,n.useState)(!1),[T,z]=(0,n.useState)(!1),[L,E]=(0,n.useState)(null),[K,P]=(0,n.useState)(null),[F,M]=(0,n.useState)(!1),[O,W]=(0,n.useState)(!1),[R,q]=(0,n.useState)({name:"",baseDir:"",global:"",configKey:"mcpServers",format:"json",preferredTransport:"stdio",project:"",presenceCli:"",skillDir:""});(0,n.useEffect)(()=>{e&&(j?(q({name:j.name,baseDir:j.customBaseDir||"",global:j.globalPath||"",configKey:j.configKey||"mcpServers",format:"toml"===j.format?"toml":"json",preferredTransport:j.preferredTransport||"stdio",project:j.projectPath||"",presenceCli:"",skillDir:j.skillWorkspacePath||""}),S("result"),W(!0),P(null),E(null)):(q({name:"",baseDir:"",global:"",configKey:"mcpServers",format:"json",preferredTransport:"stdio",project:"",presenceCli:"",skillDir:""}),S("input"),W(!1),P(null),E(null),M(!1)))},[e,j]),(0,n.useEffect)(()=>{e&&"input"===w&&setTimeout(()=>C.current?.focus(),100)},[e,w]),(0,g.r)(k,e),(0,n.useEffect)(()=>{if(!e)return;let r=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t]);let J=(0,n.useMemo)(()=>{let e=new Set(h.map(e=>e.key));return A&&j&&e.delete(j.key),e},[h,A,j]),H=(0,n.useMemo)(()=>R.name.toLowerCase().replace(/[^\x20-\x7E]/g,"").replace(/[_\s]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-{2,}/g,"-").replace(/^-|-$/g,""),[R.name]),_=(0,n.useMemo)(()=>{if(A||!R.name.trim())return null;let e=H||"";if(!e)return null;if(J.has(e)){let t=h.find(t=>t.key===e);return t?.isCustom?N.customAgentKeyConflict?.(e)??`An agent with key "${e}" already exists`:N.customAgentBuiltinConflict?.(t?.name||e)??`Conflicts with built-in agent "${t?.name||e}"`}return null},[A,H,J,h,R.name,N]),B=R.name.trim()&&R.baseDir.trim()&&!_,I=(0,n.useCallback)((e,t)=>{q(r=>({...r,[e]:t}))},[]),U=(0,n.useCallback)(async()=>{if(!B)return;E(null),$(!0);let e=R.baseDir.trim();if(!e.startsWith("~/")){let t=e.endsWith("/")?e:e+"/";I("global",t+"mcp.json"),I("skillDir",t+"skills/"),P({exists:!1,hasSkillsDir:!1}),S("result"),$(!1);return}let t=new AbortController,r=setTimeout(()=>t.abort(),3e3);try{let s=await fetch("/api/agents/custom/detect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseDir:e}),signal:t.signal});clearTimeout(r);let n=await s.json();if(!s.ok)return void E(n.error||N.customAgentFailedSave);P(n),n.detectedConfig?I("global",n.detectedConfig):I("global",(e.endsWith("/")?e:e+"/")+"mcp.json"),n.detectedFormat&&I("format",n.detectedFormat),n.detectedConfigKey&&I("configKey",n.detectedConfigKey),I("skillDir",n.detectedSkillDir||(e.endsWith("/")?e:e+"/")+"skills/"),S("result")}catch{clearTimeout(r);let t=e.endsWith("/")?e:e+"/";I("global",t+"mcp.json"),I("skillDir",t+"skills/"),P({exists:!1,hasSkillsDir:!1}),M(!0),S("result")}finally{$(!1)}},[B,R.baseDir,I,N]),G=(0,n.useCallback)(async()=>{z(!0),E(null);let e=A?{key:j.key,name:R.name.trim(),baseDir:R.baseDir.trim(),global:R.global.trim()||void 0,configKey:R.configKey.trim()||void 0,format:R.format,preferredTransport:R.preferredTransport,project:R.project.trim()||null,presenceCli:R.presenceCli.trim()||void 0,skillDir:R.skillDir.trim()||void 0}:{name:R.name.trim(),baseDir:R.baseDir.trim(),global:R.global.trim()||void 0,configKey:R.configKey.trim()||void 0,format:R.format,preferredTransport:R.preferredTransport,project:R.project.trim()||null,presenceCli:R.presenceCli.trim()||void 0,skillDir:R.skillDir.trim()||void 0};try{let s=await fetch("/api/agents/custom",{method:A?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await s.json();if(!s.ok){E(n.error||N.customAgentFailedSave),z(!1);return}let i=A?N.customAgentUpdated(R.name.trim()):N.customAgentAdded(R.name.trim());f.oR.success(i),r(),t()}catch{E(N.customAgentNetworkError)}finally{z(!1)}},[A,j,R,r,t,N]),Q=(0,n.useCallback)(e=>{"Enter"===e.key&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),"input"===w&&B&&!D?U():"result"!==w||T||G())},[w,B,D,T,U,G]);if(!e)return null;let V=A?N.editCustomAgentTitle(j.name):N.addCustomAgentTitle;return(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"custom-agent-modal-title",children:[(0,s.jsx)("div",{className:"absolute inset-0 modal-backdrop",onClick:t,"aria-hidden":"true"}),(0,s.jsxs)("div",{ref:k,className:"relative bg-card border border-border rounded-xl shadow-2xl max-w-md w-full mx-4 animate-in fade-in zoom-in-95 duration-200 max-h-[85vh] overflow-y-auto",onKeyDown:Q,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-5 pt-5 pb-1",children:[(0,s.jsx)("h2",{id:"custom-agent-modal-title",className:"text-base font-semibold text-foreground",children:V}),(0,s.jsx)("button",{type:"button",onClick:t,className:"w-7 h-7 rounded-md flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Close",children:(0,s.jsx)(i.A,{size:16})})]}),(0,s.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,s.jsxs)(b.D0,{label:N.customAgentName,children:[(0,s.jsx)("input",{ref:C,value:R.name,onChange:e=>I("name",e.target.value),placeholder:N.customAgentNamePlaceholder,"aria-invalid":!!_,className:`w-full px-3 py-2 text-sm bg-background border rounded-lg text-foreground placeholder:text-muted-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50 ${_?"border-[var(--error)] focus-visible:ring-[var(--error)]":"border-border"}`,autoComplete:"off"}),_?(0,s.jsxs)("p",{className:"text-xs text-[var(--error)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(a.A,{size:12}),_]}):R.name.trim()&&H?(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:N.customAgentKeyPreview(H)}):null]}),(0,s.jsxs)(b.D0,{label:N.customAgentDir,hint:"input"===w?N.customAgentDirHint:void 0,children:[(0,s.jsx)(b.pd,{value:R.baseDir,onChange:e=>{I("baseDir",e.target.value),"result"===w&&(S("input"),P(null))},placeholder:N.customAgentDirPlaceholder,autoComplete:"off"}),"result"===w&&K?.exists&&(0,s.jsxs)("p",{className:"text-xs text-[var(--success)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(l.A,{size:12}),N.customAgentDirFound]}),"result"===w&&K&&!K.exists&&!F&&(0,s.jsxs)("p",{className:"text-xs text-[var(--info,var(--muted-foreground))] mt-1 flex items-center gap-1",children:[(0,s.jsx)(o.A,{size:12}),N.customAgentDirNotFound]}),"result"===w&&F&&(0,s.jsxs)("p",{className:"text-xs text-[var(--amber)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(a.A,{size:12}),N.customAgentDetectTimeout]})]}),"result"===w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:`rounded-lg p-4 space-y-3 ${K?.exists?"border border-[var(--success)]/20 bg-[var(--success)]/5":"border border-border bg-muted/30"}`,children:[(0,s.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:K?.exists?N.customAgentDetectedTitle:N.customAgentDefaultTitle}),(0,s.jsxs)("div",{className:"space-y-2.5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentConfigLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground font-mono truncate block",children:R.global}),K?.mcpParseError&&(0,s.jsxs)("p",{className:"text-xs text-[var(--error)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(a.A,{size:12,className:"shrink-0"}),K.mcpParseError]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentFormatLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground",children:R.format.toUpperCase()})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:"Config Key"}),(0,s.jsx)("span",{className:"text-sm text-foreground font-mono",children:R.configKey})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentTransportLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground",children:R.preferredTransport})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-xs text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(d.A,{size:11,className:"shrink-0","aria-hidden":"true"}),"MCP Servers"]}),K?.mcpServers&&K.mcpServers.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:K.mcpServers.map(e=>(0,s.jsx)("span",{className:"text-xs bg-muted/60 text-foreground px-2 py-0.5 rounded font-mono",children:e},e))}):(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-xs text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(c.A,{size:11,className:"shrink-0","aria-hidden":"true"}),N.customAgentSkillsLabel]}),K?.skillNames&&K.skillNames.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:K.skillNames.map(e=>(0,s.jsx)("span",{className:"text-xs bg-[var(--amber-dim)] text-[var(--amber-text,var(--foreground))] px-2 py-0.5 rounded font-mono",children:e},e))}):(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})]})]})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>W(e=>!e),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",children:[O?(0,s.jsx)(u.A,{size:14}):(0,s.jsx)(m.A,{size:14}),N.customAgentCustomize]}),(0,s.jsx)("div",{className:"grid transition-[grid-template-rows] duration-200 ease-out",style:{gridTemplateRows:O?"1fr":"0fr"},children:(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card/50 p-5 space-y-4",children:[(0,s.jsx)(b.D0,{label:N.customAgentConfigPath,children:(0,s.jsx)(b.pd,{value:R.global,onChange:e=>I("global",e.target.value),autoComplete:"off"})}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsx)(b.D0,{label:N.customAgentConfigKey,children:(0,s.jsx)(b.pd,{value:R.configKey,onChange:e=>I("configKey",e.target.value),autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentFormat,children:(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(v,{label:"JSON",checked:"json"===R.format,onChange:()=>I("format","json"),name:"format"}),(0,s.jsx)(v,{label:"TOML",checked:"toml"===R.format,onChange:()=>I("format","toml"),name:"format"})]})})]}),(0,s.jsx)(b.D0,{label:N.customAgentTransport,children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(v,{label:"stdio",checked:"stdio"===R.preferredTransport,onChange:()=>I("preferredTransport","stdio"),name:"transport"}),(0,s.jsx)(v,{label:"http",checked:"http"===R.preferredTransport,onChange:()=>I("preferredTransport","http"),name:"transport"})]})}),(0,s.jsx)(b.D0,{label:N.customAgentSkillDir,hint:N.customAgentSkillDirHint,children:(0,s.jsx)(b.pd,{value:R.skillDir,onChange:e=>I("skillDir",e.target.value),placeholder:N.customAgentSkillDirPlaceholder,autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentProjectConfig,children:(0,s.jsx)(b.pd,{value:R.project,onChange:e=>I("project",e.target.value),autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentCliBinary,children:(0,s.jsx)(b.pd,{value:R.presenceCli,onChange:e=>I("presenceCli",e.target.value),placeholder:N.customAgentCliBinaryPlaceholder,autoComplete:"off"})})]})})})]}),L&&(0,s.jsxs)("div",{className:"rounded-lg border border-[var(--error)]/30 bg-[var(--error)]/5 p-3 flex items-start gap-2",children:[(0,s.jsx)(a.A,{size:14,className:"text-[var(--error)] mt-0.5 shrink-0"}),(0,s.jsx)("p",{className:"text-sm text-[var(--error)]",children:L})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 px-5 pb-5 pt-1",children:[(0,s.jsx)("button",{type:"button",onClick:t,className:"px-4 min-h-[36px] text-sm rounded-lg border border-border hover:bg-muted cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:N.customAgentCancel}),"input"===w?(0,s.jsx)("button",{type:"button",onClick:U,disabled:!B||D,className:"px-4 min-h-[36px] text-sm rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex items-center gap-2",children:D?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{size:14,className:"animate-spin"}),N.customAgentDetecting]}):(0,s.jsxs)(s.Fragment,{children:[N.customAgentContinue,(0,s.jsx)(m.A,{size:14})]})}):(0,s.jsx)("button",{type:"button",onClick:G,disabled:T,className:"px-4 min-h-[36px] text-sm rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex items-center gap-2",children:T?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{size:14,className:"animate-spin"}),A?N.customAgentSaving:N.customAgentAdding]}):L?N.customAgentRetry:A?N.customAgentSave:N.customAgentAdd})]})]})]})}function v({label:e,checked:t,onChange:r,name:n}){return(0,s.jsxs)("label",{className:`px-3 py-1.5 text-sm rounded-md border cursor-pointer transition-all duration-150 select-none ${t?"border-[var(--amber)]/40 bg-[var(--amber-dim)] text-foreground font-medium":"border-border bg-background text-muted-foreground hover:bg-muted"}`,children:[(0,s.jsx)("input",{type:"radio",name:n,checked:t,onChange:r,className:"sr-only"}),e]})}},82977:(e,t,r)=>{r.d(t,{Gj:()=>i,ZD:()=>n,v7:()=>a});let s={"&":"&","<":"<",">":">",'"':""","'":"'"};function n(e){return e.replace(/[&<>"']/g,e=>s[e])}function i(e){return n(e).replace(/`/g,"`")}function a(e){let t=e.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").trim(),r=t.replace(/[\u0000-\u001f\u007f\s]+/g,"").toLowerCase();return r.startsWith("http://")||r.startsWith("https://")||r.startsWith("mailto:")||t.startsWith("/")&&!t.startsWith("//")||t.startsWith("#")?i(t):"#"}}}]);
|