clay-server 5.2.0-beta.1 → 5.2.0-beta.11
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/README.md +0 -4
- package/lib/account-auth-socket.js +1 -0
- package/lib/builtin-mates.js +19 -16
- package/lib/bundled-skills/clay-agent-browser/SKILL.md +6 -2
- package/lib/canonical-clay-record-authority.js +15 -0
- package/lib/canonical-clay-scheduling-authority.js +19 -0
- package/lib/claude-hook-installer.js +1 -239
- package/lib/claude-jsonl-watcher.js +1 -204
- package/lib/clay-control-presentation-binding.js +96 -0
- package/lib/clay-control-presentation.js +128 -0
- package/lib/clay-control-target-projection.js +26 -0
- package/lib/clay-mate-chat-receipts.js +26 -0
- package/lib/clay-mate-chat.js +88 -0
- package/lib/clay-mate-knowledge-input.js +26 -0
- package/lib/clay-mate-knowledge.js +95 -0
- package/lib/clay-mate-lifecycle.js +95 -0
- package/lib/clay-product-control-input.js +33 -0
- package/lib/clay-product-control-tools.js +52 -0
- package/lib/clay-product-control.js +250 -0
- package/lib/clay-project-lifecycle.js +154 -0
- package/lib/clay-project-record-input.js +44 -0
- package/lib/clay-project-records.js +84 -0
- package/lib/clay-scheduling-input.js +21 -0
- package/lib/clay-scheduling-receipts.js +26 -0
- package/lib/clay-scheduling.js +119 -0
- package/lib/clay-screen-controls.js +104 -0
- package/lib/clay-skill-install.js +1 -33
- package/lib/clay-vendor-usage.js +44 -0
- package/lib/clay-workspace-controls.js +84 -0
- package/lib/clay-workspace-input.js +17 -0
- package/lib/clay-workspace-receipts.js +26 -0
- package/lib/cli-sessions.js +1 -300
- package/lib/codex-defaults.js +1 -28
- package/lib/context-usage.js +3 -2
- package/lib/contextual-screen-snapshot.js +38 -0
- package/lib/daemon-project-access.js +11 -0
- package/lib/daemon-project-lifecycle-callbacks.js +15 -0
- package/lib/daemon-project-lifecycle.js +262 -0
- package/lib/daemon-projects.js +1 -1
- package/lib/daemon.js +78 -276
- package/lib/default-ai-runtime.js +4 -8
- package/lib/dm-digest-cursor.js +120 -0
- package/lib/email-mcp-server.js +1 -1
- package/lib/github-star-count.js +147 -0
- package/lib/issues-service.js +29 -15
- package/lib/kiro-defaults.js +1 -22
- package/lib/knowledge-db-import-validation.js +46 -0
- package/lib/knowledge-db-import.js +99 -0
- package/lib/knowledge-db-service.js +24 -33
- package/lib/knowledge-db-storage-nedb-maintenance.js +99 -0
- package/lib/knowledge-db-storage-nedb.js +66 -0
- package/lib/knowledge-db-storage.js +72 -0
- package/lib/knowledge-db-validation.js +0 -0
- package/lib/knowledge-document-index.js +2 -1
- package/lib/knowledge-file-store.js +7 -1
- package/lib/knowledge-product-operations.js +46 -0
- package/lib/mate-avatar-catalog.js +12 -0
- package/lib/mate-avatar-migration.js +41 -0
- package/lib/mate-context-service.js +138 -0
- package/lib/mate-context-tools.js +21 -0
- package/lib/mate-creation-mcp-server.js +2 -0
- package/lib/mate-knowledge-canonical-access.js +10 -0
- package/lib/mate-knowledge-mate-bound.js +53 -0
- package/lib/mate-knowledge-mcp-server.js +55 -8
- package/lib/mate-knowledge-service.js +16 -34
- package/lib/mate-knowledge-text-tools.js +106 -0
- package/lib/mate-lifecycle-service.js +94 -0
- package/lib/mate-message-delivery.js +43 -0
- package/lib/mate-ready-creation.js +9 -1
- package/lib/mate-schedule-input.js +29 -0
- package/lib/mate-schedule-lifecycle.js +151 -0
- package/lib/mate-scheduling.js +103 -0
- package/lib/mates.js +18 -6
- package/lib/mcp-agent-tools.js +117 -0
- package/lib/mcp-connection-store.js +119 -15
- package/lib/mcp-import-credentials.js +31 -0
- package/lib/mcp-local-transport.js +13 -0
- package/lib/mcp-oauth.js +8 -6
- package/lib/mcp-proxy.js +2 -32
- package/lib/mcp-query-bridge.js +30 -0
- package/lib/mcp-remote-connections.js +74 -20
- package/lib/mcp-source-adapters.js +1 -0
- package/lib/mcp-source-context.js +1 -0
- package/lib/mcp-source-discovery.js +1 -0
- package/lib/mcp-source-plugins.js +1 -0
- package/lib/mcp-source-restrictions.js +1 -0
- package/lib/mcp-tool-policy.js +9 -0
- package/lib/notes-checklist.js +92 -0
- package/lib/notes.js +51 -4
- package/lib/os-user-diagnostics.js +2 -4
- package/lib/os-users.js +24 -70
- package/lib/pane-pending-interactions.js +20 -0
- package/lib/pane-session-activation.js +114 -0
- package/lib/pane-session-transport.js +26 -0
- package/lib/project-admin-overview.js +51 -0
- package/lib/project-ask-user.js +8 -4
- package/lib/project-connection.js +14 -10
- package/lib/project-control-git-view.js +12 -0
- package/lib/project-debate.js +1 -0
- package/lib/project-delegated-follow-up.js +2 -1
- package/lib/project-directory-claim.js +65 -0
- package/lib/project-file-operations.js +61 -0
- package/lib/project-filesystem.js +15 -85
- package/lib/project-full-access.js +23 -2
- package/lib/project-http.js +7 -4
- package/lib/project-knowledge.js +32 -18
- package/lib/project-lifecycle-operations.js +98 -0
- package/lib/project-lifecycle-process-witness.js +32 -0
- package/lib/project-lifecycle-runtime.js +50 -0
- package/lib/project-linux-access.js +22 -0
- package/lib/project-logs-canonical-clay.js +27 -0
- package/lib/project-logs-clay-query.js +16 -0
- package/lib/project-logs-schema.js +4 -2
- package/lib/project-logs-service.js +8 -7
- package/lib/project-logs.js +1 -0
- package/lib/project-loop.js +1 -0
- package/lib/project-mate-chat-control.js +55 -0
- package/lib/project-mate-creation-proposal.js +18 -3
- package/lib/project-mate-interaction.js +40 -62
- package/lib/project-mcp.js +54 -16
- package/lib/project-models.js +14 -31
- package/lib/project-notifications.js +76 -17
- package/lib/project-ownership.js +77 -0
- package/lib/project-pair-result-delivery.js +14 -3
- package/lib/project-pair-usage.js +12 -13
- package/lib/project-pending-message-queue.js +4 -1
- package/lib/project-product-control.js +89 -0
- package/lib/project-product-session-queue.js +46 -0
- package/lib/project-push-access.js +28 -0
- package/lib/project-scheduled-message-queue.js +30 -0
- package/lib/project-scheduled-messages.js +67 -68
- package/lib/project-scheduled-task-control.js +83 -0
- package/lib/project-scheduled-tasks.js +13 -2
- package/lib/project-scheduling-access.js +10 -0
- package/lib/project-session-actions.js +65 -0
- package/lib/project-session-delete.js +8 -1
- package/lib/project-session-document.js +27 -7
- package/lib/project-session-github.js +63 -19
- package/lib/project-session-history-actions.js +167 -0
- package/lib/project-session-linear.js +14 -6
- package/lib/project-session-notes.js +40 -11
- package/lib/project-session-pair.js +1 -1
- package/lib/project-session-runtime-actions.js +64 -0
- package/lib/project-session-spawn.js +2 -3
- package/lib/project-session-vendor.js +55 -0
- package/lib/project-sessions.js +160 -290
- package/lib/project-shared-browser.js +78 -17
- package/lib/project-start-protocol.js +29 -0
- package/lib/project-studio-presentation.js +58 -0
- package/lib/project-user-message.js +67 -1
- package/lib/project-vendor-login.js +8 -36
- package/lib/project-workspace-operations.js +126 -0
- package/lib/project-workspace-query.js +19 -2
- package/lib/project.js +181 -45
- package/lib/public/app.js +71 -17
- package/lib/public/appearance-bootstrap.js +16 -0
- package/lib/public/css/clay-tool-activity.css +51 -0
- package/lib/public/css/clay-workspace.css +29 -0
- package/lib/public/css/command-palette.css +12 -33
- package/lib/public/css/contextual-clay.css +240 -0
- package/lib/public/css/filebrowser.css +1 -1
- package/lib/public/css/home-debate-planning.css +2 -0
- package/lib/public/css/home-mate-creation.css +5 -0
- package/lib/public/css/input.css +6 -0
- package/lib/public/css/mate-avatar-gallery.css +12 -0
- package/lib/public/css/mate-conversation.css +10 -5
- package/lib/public/css/mate-loading-scene.css +21 -0
- package/lib/public/css/messages.css +6 -2
- package/lib/public/css/overlays.css +68 -258
- package/lib/public/css/project-admin-overview.css +13 -0
- package/lib/public/css/project-mate-creation.css +5 -6
- package/lib/public/css/project-start.css +108 -0
- package/lib/public/css/projects-hub.css +53 -14
- package/lib/public/css/session-folders.css +11 -0
- package/lib/public/css/session-github.css +46 -1
- package/lib/public/css/settings-shell.css +103 -0
- package/lib/public/css/shared-browser.css +35 -1
- package/lib/public/css/sidebar.css +7 -0
- package/lib/public/css/sticky-notes.css +87 -1
- package/lib/public/css/title-bar.css +79 -0
- package/lib/public/index.html +61 -68
- package/lib/public/mate-avatars/B01.png +0 -0
- package/lib/public/mate-avatars/B02.png +0 -0
- package/lib/public/mate-avatars/B03.png +0 -0
- package/lib/public/mate-avatars/B04.png +0 -0
- package/lib/public/mate-avatars/B05.png +0 -0
- package/lib/public/mate-avatars/B06.png +0 -0
- package/lib/public/mate-avatars/B07.png +0 -0
- package/lib/public/mate-avatars/B08.png +0 -0
- package/lib/public/mate-avatars/B09.png +0 -0
- package/lib/public/mate-avatars/B10.png +0 -0
- package/lib/public/mate-avatars/B11.png +0 -0
- package/lib/public/mate-avatars/B12.png +0 -0
- package/lib/public/mate-avatars/B13.png +0 -0
- package/lib/public/mate-avatars/B14.png +0 -0
- package/lib/public/mate-avatars/B15.png +0 -0
- package/lib/public/mate-avatars/B16.png +0 -0
- package/lib/public/mate-avatars/B17.png +0 -0
- package/lib/public/mate-avatars/B18.png +0 -0
- package/lib/public/mate-avatars/B19.png +0 -0
- package/lib/public/mate-avatars/B20.png +0 -0
- package/lib/public/mate-avatars/B21.png +0 -0
- package/lib/public/mate-avatars/B22.png +0 -0
- package/lib/public/mate-avatars/B23.png +0 -0
- package/lib/public/mate-avatars/B24.png +0 -0
- package/lib/public/mate-avatars/B25.png +0 -0
- package/lib/public/mate-avatars/B26.png +0 -0
- package/lib/public/mate-avatars/B27.png +0 -0
- package/lib/public/mate-avatars/B28.png +0 -0
- package/lib/public/mate-avatars/B29.png +0 -0
- package/lib/public/mate-avatars/B30.png +0 -0
- package/lib/public/mate-avatars/B31.png +0 -0
- package/lib/public/mate-avatars/B32.png +0 -0
- package/lib/public/mate-avatars/B33.png +0 -0
- package/lib/public/mate-avatars/B34.png +0 -0
- package/lib/public/mate-avatars/B35.png +0 -0
- package/lib/public/mate-avatars/B36.png +0 -0
- package/lib/public/mate-avatars/B37.png +0 -0
- package/lib/public/mate-avatars/B38.png +0 -0
- package/lib/public/mate-avatars/B39.png +0 -0
- package/lib/public/mate-avatars/B40.png +0 -0
- package/lib/public/mate-avatars/B41.png +0 -0
- package/lib/public/mate-avatars/B42.png +0 -0
- package/lib/public/mate-avatars/B43.png +0 -0
- package/lib/public/mate-avatars/B44.png +0 -0
- package/lib/public/mate-avatars/B45.png +0 -0
- package/lib/public/mate-avatars/B46.png +0 -0
- package/lib/public/mate-avatars/B47.png +0 -0
- package/lib/public/mate-avatars/B48.png +0 -0
- package/lib/public/mate-avatars/C01.png +0 -0
- package/lib/public/mate-avatars/C02.png +0 -0
- package/lib/public/mate-avatars/C03.png +0 -0
- package/lib/public/mate-avatars/C04.png +0 -0
- package/lib/public/mate-avatars/C05.png +0 -0
- package/lib/public/mate-avatars/C06.png +0 -0
- package/lib/public/mate-avatars/C07.png +0 -0
- package/lib/public/mate-avatars/C08.png +0 -0
- package/lib/public/mate-avatars/C09.png +0 -0
- package/lib/public/mate-avatars/C10.png +0 -0
- package/lib/public/mate-avatars/C11.png +0 -0
- package/lib/public/mate-avatars/C12.png +0 -0
- package/lib/public/mate-avatars/C13.png +0 -0
- package/lib/public/mate-avatars/C14.png +0 -0
- package/lib/public/mate-avatars/C15.png +0 -0
- package/lib/public/mate-avatars/C16.png +0 -0
- package/lib/public/mate-avatars/C17.png +0 -0
- package/lib/public/mate-avatars/C18.png +0 -0
- package/lib/public/mate-avatars/C19.png +0 -0
- package/lib/public/mate-avatars/C20.png +0 -0
- package/lib/public/mate-avatars/C21.png +0 -0
- package/lib/public/mate-avatars/C22.png +0 -0
- package/lib/public/mate-avatars/C23.png +0 -0
- package/lib/public/mate-avatars/C24.png +0 -0
- package/lib/public/mate-avatars/C25.png +0 -0
- package/lib/public/mate-avatars/C26.png +0 -0
- package/lib/public/mate-avatars/C27.png +0 -0
- package/lib/public/mate-avatars/C28.png +0 -0
- package/lib/public/mate-avatars/C29.png +0 -0
- package/lib/public/mate-avatars/C30.png +0 -0
- package/lib/public/mate-avatars/C31.png +0 -0
- package/lib/public/mate-avatars/C32.png +0 -0
- package/lib/public/mate-avatars/C33.png +0 -0
- package/lib/public/mate-avatars/C34.png +0 -0
- package/lib/public/mate-avatars/C35.png +0 -0
- package/lib/public/mate-avatars/C36.png +0 -0
- package/lib/public/mate-avatars/C37.png +0 -0
- package/lib/public/mate-avatars/C38.png +0 -0
- package/lib/public/mate-avatars/C39.png +0 -0
- package/lib/public/mate-avatars/C40.png +0 -0
- package/lib/public/mate-avatars/C41.png +0 -0
- package/lib/public/mate-avatars/C42.png +0 -0
- package/lib/public/mate-avatars/C43.png +0 -0
- package/lib/public/mate-avatars/C44.png +0 -0
- package/lib/public/mate-avatars/C45.png +0 -0
- package/lib/public/mate-avatars/C46.png +0 -0
- package/lib/public/mate-avatars/C47.png +0 -0
- package/lib/public/mate-avatars/C48.png +0 -0
- package/lib/public/mate-avatars/catalog.json +482 -0
- package/lib/public/mate-avatars/lead-clay.png +0 -0
- package/lib/public/modules/admin-settings-invitations.js +2 -2
- package/lib/public/modules/admin-settings-projects.js +8 -4
- package/lib/public/modules/admin-settings-ui.js +20 -4
- package/lib/public/modules/admin-settings-users.js +4 -4
- package/lib/public/modules/app-connection.js +11 -1
- package/lib/public/modules/app-favicon.js +18 -9
- package/lib/public/modules/app-header.js +7 -4
- package/lib/public/modules/app-home-hub.js +2 -1
- package/lib/public/modules/app-loop-ui.js +2 -0
- package/lib/public/modules/app-message-router.js +22 -1
- package/lib/public/modules/app-messages.js +125 -19
- package/lib/public/modules/app-misc.js +3 -1
- package/lib/public/modules/app-notifications.js +11 -5
- package/lib/public/modules/app-panels.js +61 -123
- package/lib/public/modules/app-projects.js +14 -407
- package/lib/public/modules/app-rate-limit.js +19 -28
- package/lib/public/modules/app-rendering.js +4 -3
- package/lib/public/modules/avatar.js +15 -41
- package/lib/public/modules/chat-render-runtime.js +20 -0
- package/lib/public/modules/clay-browser-links.js +47 -0
- package/lib/public/modules/clay-control-activity.js +214 -0
- package/lib/public/modules/clay-control-copy.js +36 -0
- package/lib/public/modules/clay-control-detail-targets.js +44 -0
- package/lib/public/modules/clay-control-object-targets.js +52 -0
- package/lib/public/modules/clay-control-target-visibility.js +12 -0
- package/lib/public/modules/clay-control-targets.js +44 -0
- package/lib/public/modules/clay-log-links.js +23 -0
- package/lib/public/modules/clay-navigation-render.js +52 -0
- package/lib/public/modules/clay-owner-navigation.js +33 -0
- package/lib/public/modules/clay-session-links.js +31 -0
- package/lib/public/modules/clay-studio-bridge.js +20 -0
- package/lib/public/modules/clay-studio-document.js +67 -0
- package/lib/public/modules/clay-studio-render.js +146 -0
- package/lib/public/modules/clay-tool-activity.js +140 -0
- package/lib/public/modules/clay-tool-presentation.js +343 -0
- package/lib/public/modules/command-palette.js +162 -40
- package/lib/public/modules/contextual-ask-session.js +26 -0
- package/lib/public/modules/contextual-clay-geometry.js +155 -0
- package/lib/public/modules/contextual-clay-session.js +130 -0
- package/lib/public/modules/contextual-clay-workspace.js +169 -0
- package/lib/public/modules/contextual-clay.js +252 -0
- package/lib/public/modules/contextual-composer.js +91 -0
- package/lib/public/modules/contextual-mate-context.js +117 -0
- package/lib/public/modules/contextual-mate-hint.js +40 -0
- package/lib/public/modules/contextual-mate-identity.js +23 -0
- package/lib/public/modules/contextual-mate-sessions.js +134 -0
- package/lib/public/modules/contextual-search.js +137 -0
- package/lib/public/modules/contextual-session-citations.js +58 -0
- package/lib/public/modules/debate.js +1 -0
- package/lib/public/modules/default-ai.js +11 -3
- package/lib/public/modules/elicitation-form.js +5 -0
- package/lib/public/modules/filebrowser.js +20 -1
- package/lib/public/modules/generation-stop.js +8 -5
- package/lib/public/modules/git-panel.js +3 -1
- package/lib/public/modules/github-star.js +66 -0
- package/lib/public/modules/history-replay-batch.js +13 -1
- package/lib/public/modules/home-debate-live.js +2 -0
- package/lib/public/modules/home-debate-planning.js +7 -7
- package/lib/public/modules/home-mate-avatar-editor.js +127 -208
- package/lib/public/modules/home-mate-chat.js +8 -6
- package/lib/public/modules/home-mate-creation.js +73 -1
- package/lib/public/modules/home-mate-settings.js +19 -12
- package/lib/public/modules/icon-strip-tooltip.js +2 -1
- package/lib/public/modules/input.js +88 -10
- package/lib/public/modules/issues-render.js +3 -2
- package/lib/public/modules/knowledge-db-workbench.js +4 -4
- package/lib/public/modules/markdown.js +6 -34
- package/lib/public/modules/mate-avatar-catalog.js +97 -0
- package/lib/public/modules/mate-knowledge-workbench.js +1 -1
- package/lib/public/modules/mate-loading-scene.js +17 -0
- package/lib/public/modules/mate-management.js +40 -7
- package/lib/public/modules/mcp-connection-view.js +31 -13
- package/lib/public/modules/mcp-discovery-view.js +31 -0
- package/lib/public/modules/mcp-ui.js +23 -4
- package/lib/public/modules/mention.js +3 -0
- package/lib/public/modules/message-delivery.js +20 -2
- package/lib/public/modules/model-picker.js +2 -0
- package/lib/public/modules/pane-activation.js +214 -0
- package/lib/public/modules/pane-binding.js +82 -0
- package/lib/public/modules/pane-bridge.js +7 -4
- package/lib/public/modules/pane-browser-bridge.js +22 -0
- package/lib/public/modules/pane-file-bridge.js +4 -0
- package/lib/public/modules/pane-issue-bridge.js +4 -1
- package/lib/public/modules/pending-message-queue.js +1 -0
- package/lib/public/modules/permission-control.js +5 -4
- package/lib/public/modules/personal-settings-dialog.js +7 -1
- package/lib/public/modules/product-review.js +26 -0
- package/lib/public/modules/profile.js +12 -241
- package/lib/public/modules/project-access-recovery.js +17 -0
- package/lib/public/modules/project-admin-overview.js +21 -0
- package/lib/public/modules/project-chat-identity.js +13 -4
- package/lib/public/modules/project-logs-render.js +3 -0
- package/lib/public/modules/project-mate-creation-workspace.js +13 -4
- package/lib/public/modules/project-mate-navigation.js +144 -22
- package/lib/public/modules/project-session-visibility-settings.js +19 -16
- package/lib/public/modules/project-settings.js +119 -129
- package/lib/public/modules/project-start-dialog.js +130 -0
- package/lib/public/modules/project-start-folder-state.js +78 -0
- package/lib/public/modules/project-start-folder-view.js +190 -0
- package/lib/public/modules/project-start-forms.js +66 -0
- package/lib/public/modules/project-start-path.js +60 -0
- package/lib/public/modules/project-start-state.js +54 -0
- package/lib/public/modules/project-start-submit.js +67 -0
- package/lib/public/modules/projects-hub-view.js +33 -14
- package/lib/public/modules/projects-hub.js +10 -6
- package/lib/public/modules/rewind.js +5 -0
- package/lib/public/modules/scheduled-tasks.js +2 -0
- package/lib/public/modules/scheduler.js +2 -0
- package/lib/public/modules/search-clay-chat.js +5 -440
- package/lib/public/modules/server-settings.js +36 -91
- package/lib/public/modules/session-actions.js +5 -2
- package/lib/public/modules/session-context-menu.js +5 -0
- package/lib/public/modules/session-create-form.js +10 -10
- package/lib/public/modules/session-folder-layout.js +1 -1
- package/lib/public/modules/session-folder-view-menu.js +9 -0
- package/lib/public/modules/session-github.js +85 -14
- package/lib/public/modules/session-rich-drafts.js +21 -0
- package/lib/public/modules/session-switch-defer.js +67 -0
- package/lib/public/modules/session-work-primary.js +51 -0
- package/lib/public/modules/settings-defaults.js +27 -28
- package/lib/public/modules/settings-project-target.js +56 -0
- package/lib/public/modules/settings-select.js +1 -1
- package/lib/public/modules/settings-shell-registry.js +88 -0
- package/lib/public/modules/settings-shell-view.js +104 -0
- package/lib/public/modules/settings-shell.js +342 -0
- package/lib/public/modules/shared-browser-settings.js +112 -0
- package/lib/public/modules/shared-browser-tabs.js +13 -3
- package/lib/public/modules/shared-browser.js +29 -6
- package/lib/public/modules/sidebar-mobile.js +12 -33
- package/lib/public/modules/sidebar-projects.js +3 -1
- package/lib/public/modules/sidebar-session-folders-ui.js +1 -1
- package/lib/public/modules/sidebar-sessions.js +1 -0
- package/lib/public/modules/split-group-restore.js +68 -0
- package/lib/public/modules/split-pair-ui.js +1 -0
- package/lib/public/modules/split-pane-reconciler.js +15 -0
- package/lib/public/modules/split-pane-renderer.js +87 -6
- package/lib/public/modules/split-session-boundary.js +1 -1
- package/lib/public/modules/split-view.js +60 -68
- package/lib/public/modules/sticky-note-markdown.js +72 -6
- package/lib/public/modules/sticky-notes-actions.js +30 -0
- package/lib/public/modules/sticky-notes-browser.js +9 -2
- package/lib/public/modules/sticky-notes-card.js +23 -7
- package/lib/public/modules/sticky-notes-checklist.js +116 -0
- package/lib/public/modules/sticky-notes-editor.js +108 -44
- package/lib/public/modules/sticky-notes-shared.js +50 -2
- package/lib/public/modules/sticky-notes-state.js +66 -0
- package/lib/public/modules/sticky-notes.js +34 -51
- package/lib/public/modules/stt-controller.js +4 -1
- package/lib/public/modules/stt-recording.js +1 -1
- package/lib/public/modules/stt.js +7 -2
- package/lib/public/modules/terminal.js +9 -0
- package/lib/public/modules/theme.js +18 -3
- package/lib/public/modules/thinking-lifecycle.js +33 -3
- package/lib/public/modules/thinking-view.js +23 -1
- package/lib/public/modules/tools.js +60 -11
- package/lib/public/modules/tui-grab.js +1 -2
- package/lib/public/modules/user-settings-appearance.js +10 -3
- package/lib/public/modules/user-settings-editors.js +1 -1
- package/lib/public/modules/user-settings-layout.js +14 -30
- package/lib/public/modules/user-settings-preferences.js +6 -2
- package/lib/public/modules/user-settings-profile.js +13 -3
- package/lib/public/modules/user-settings.js +18 -84
- package/lib/public/modules/vendor-login-browser.js +5 -3
- package/lib/public/modules/vendor-login.js +2 -2
- package/lib/public/modules/vendor-priority.js +15 -1
- package/lib/public/modules/vendor-usage-format.js +93 -0
- package/lib/public/modules/vendor-usage-list.js +45 -0
- package/lib/public/modules/vendor-usage-model.js +215 -0
- package/lib/public/modules/vendor-usage-overview.js +312 -0
- package/lib/public/modules/wireframe-workbench.js +5 -2
- package/lib/public/muse-avatar.svg +4 -0
- package/lib/public/style.css +14 -6
- package/lib/public/sw.js +3 -1
- package/lib/public/welcome-art/conversation-desk.png +0 -0
- package/lib/public/welcome-art/mate-clay.png +0 -0
- package/lib/public/welcome-art/project-clay.png +0 -0
- package/lib/safe-bash-commands.js +3 -45
- package/lib/scheduled-task-records.js +3 -1
- package/lib/scheduler.js +2 -0
- package/lib/sdk-bridge.js +348 -402
- package/lib/sdk-foreground-admission.js +16 -0
- package/lib/sdk-mcp-descriptors.js +2 -37
- package/lib/sdk-message-processor.js +61 -18
- package/lib/sdk-quota-snapshot.js +21 -3
- package/lib/sdk-response-recovery.js +1 -0
- package/lib/sdk-worker.js +2 -677
- package/lib/server-admin.js +63 -16
- package/lib/server-appearance-settings.js +13 -1
- package/lib/server-contextual-clay-settings.js +40 -0
- package/lib/server-contextual-mate-sessions.js +70 -0
- package/lib/server-dm.js +2 -1
- package/lib/server-github-stars.js +39 -0
- package/lib/server-global-ws.js +26 -32
- package/lib/server-home-chat-events.js +18 -4
- package/lib/server-home-chat.js +22 -20
- package/lib/server-home-clay-entry.js +23 -4
- package/lib/server-home-clay-session-links.js +29 -9
- package/lib/server-home-mate-creation.js +1 -0
- package/lib/server-home-mcp-consent.js +14 -0
- package/lib/server-mates.js +25 -62
- package/lib/server-owner-ui.js +118 -0
- package/lib/server-path-access.js +38 -0
- package/lib/server-project-removal.js +22 -0
- package/lib/server-settings.js +6 -1
- package/lib/server.js +167 -43
- package/lib/session-config-transition.js +45 -0
- package/lib/session-folders.js +7 -2
- package/lib/session-fork-history.js +21 -0
- package/lib/session-github.js +9 -2
- package/lib/session-hygiene.js +3 -35
- package/lib/session-notes-mcp-server.js +26 -4
- package/lib/session-notes-writes.js +88 -0
- package/lib/session-permission-mode.js +4 -3
- package/lib/session-skill-scope.js +11 -0
- package/lib/session-visibility.js +25 -10
- package/lib/session-work-primary.js +50 -0
- package/lib/sessions.js +66 -99
- package/lib/shared-browser-cookie-sync.js +32 -0
- package/lib/shared-browser-cookies.js +79 -0
- package/lib/shared-browser-runtime.js +25 -9
- package/lib/shared-browser-storage-sync.js +43 -0
- package/lib/shared-browser-storage.js +101 -0
- package/lib/shared-browser-tools.js +2 -1
- package/lib/shared-browser-worker.js +46 -10
- package/lib/terminal-manager.js +65 -6
- package/lib/tool-llm.js +1 -1
- package/lib/tui-transcript-index.js +1 -132
- package/lib/users-contextual-clay-preferences.js +31 -0
- package/lib/users-permissions.js +2 -8
- package/lib/users.js +7 -0
- package/lib/vendor-login-browser.js +1 -11
- package/lib/vendor-usage-acp-readers.js +97 -0
- package/lib/vendor-usage-capabilities.js +88 -0
- package/lib/vendor-usage-http-readers.js +214 -0
- package/lib/vendor-usage-metrics.js +47 -0
- package/lib/vendor-usage-native-readers.js +106 -0
- package/lib/vendor-usage-overview.js +406 -0
- package/lib/vendor-usage-service.js +281 -0
- package/lib/workspace-assignment-service.js +25 -0
- package/lib/workspace-query-access.js +4 -1
- package/lib/workspace-query-mcp-server.js +1 -1
- package/lib/workspace-query-service.js +13 -2
- package/lib/ws-request.js +1 -0
- package/lib/ws-schema.js +22 -4
- package/lib/yoke/acp-agent-profiles.js +7 -5
- package/lib/yoke/adapters/antigravity.js +3 -14
- package/lib/yoke/adapters/claude-query-contract.js +9 -0
- package/lib/yoke/adapters/claude.js +66 -50
- package/lib/yoke/adapters/codex-query-contract.js +25 -0
- package/lib/yoke/adapters/codex.js +98 -123
- package/lib/yoke/adapters/kiro.js +3 -1
- package/lib/yoke/adapters/muse-query-contract.js +7 -0
- package/lib/yoke/adapters/muse.js +122 -0
- package/lib/yoke/auth-events.js +17 -0
- package/lib/yoke/claude-hook-installer.js +272 -0
- package/lib/yoke/claude-jsonl-watcher.js +204 -0
- package/lib/yoke/claude-maintenance.js +55 -0
- package/lib/yoke/claude-permission-patterns.js +53 -0
- package/lib/yoke/claude-response-recovery.js +155 -0
- package/lib/yoke/claude-transcript-hygiene.js +34 -0
- package/lib/yoke/claude-worker-startup.js +28 -0
- package/lib/yoke/clay-skill-install.js +33 -0
- package/lib/yoke/cli-sessions.js +300 -0
- package/lib/yoke/codex-app-server.js +7 -12
- package/lib/yoke/codex-dynamic-tool-names.js +80 -0
- package/lib/yoke/codex-idle-recovery.js +81 -1
- package/lib/yoke/codex-model-catalog.js +37 -3
- package/lib/yoke/codex-recovery-admission.js +164 -0
- package/lib/yoke/configuration.js +13 -0
- package/lib/yoke/discovery.js +70 -0
- package/lib/yoke/errors.js +8 -0
- package/lib/yoke/host-environment.js +7 -0
- package/lib/yoke/index.js +9 -51
- package/lib/yoke/interface.js +116 -0
- package/lib/yoke/kiro-acp-server.js +5 -5
- package/lib/yoke/legacy-sessions.js +89 -0
- package/lib/yoke/login-protocol.js +25 -0
- package/lib/yoke/maintenance.js +12 -0
- package/lib/yoke/mcp-proxy.js +32 -0
- package/lib/yoke/mcp-source-adapters.js +91 -0
- package/lib/yoke/mcp-source-context.js +42 -0
- package/lib/yoke/mcp-source-discovery.js +169 -0
- package/lib/yoke/mcp-source-plugins.js +68 -0
- package/lib/yoke/mcp-source-restrictions.js +47 -0
- package/lib/yoke/mcp-tool-policy-normalize.js +28 -0
- package/lib/yoke/model-preferences.js +6 -0
- package/lib/yoke/muse-artifacts.js +36 -0
- package/lib/yoke/muse-controls.js +50 -0
- package/lib/yoke/muse-input.js +64 -0
- package/lib/yoke/muse-items.js +157 -0
- package/lib/yoke/muse-policy.js +52 -0
- package/lib/yoke/muse-query.js +428 -0
- package/lib/yoke/muse-runtime.js +211 -0
- package/lib/yoke/muse-services.js +92 -0
- package/lib/yoke/muse-skills.js +79 -0
- package/lib/yoke/muse-turns.js +71 -0
- package/lib/yoke/options/acp.js +2 -0
- package/lib/yoke/options/antigravity.js +2 -0
- package/lib/yoke/options/claude.js +21 -0
- package/lib/yoke/options/codex-defaults.js +29 -0
- package/lib/yoke/options/codex-settings.js +21 -0
- package/lib/yoke/options/codex.js +6 -0
- package/lib/yoke/options/kiro-defaults.js +22 -0
- package/lib/yoke/options/kiro.js +5 -0
- package/lib/yoke/options/muse.js +5 -0
- package/lib/yoke/provider-contract.js +5 -0
- package/lib/yoke/providers/antigravity-executable.js +8 -0
- package/lib/yoke/providers/claude-executable.js +40 -0
- package/lib/yoke/providers/claude-model-descriptions.js +34 -0
- package/lib/yoke/providers/claude-process.js +97 -0
- package/lib/yoke/providers/claude-provision.js +75 -0
- package/lib/yoke/providers/codex-errors.js +8 -0
- package/lib/yoke/providers/muse-executable.js +17 -0
- package/lib/yoke/provisioning.js +6 -0
- package/lib/yoke/query-options.js +10 -0
- package/lib/yoke/response-recovery.js +41 -0
- package/lib/yoke/sdk-mcp-descriptors.js +37 -0
- package/lib/yoke/sdk-server-factory.js +7 -0
- package/lib/yoke/session-history.js +8 -0
- package/lib/yoke/session-tool-transport.js +34 -13
- package/lib/yoke/settings.js +23 -0
- package/lib/yoke/source-locations.js +4 -0
- package/lib/yoke/title-query.js +18 -7
- package/lib/yoke/tui-transcript-index.js +132 -0
- package/lib/yoke/usage.js +48 -0
- package/lib/yoke/user-input.js +13 -0
- package/lib/yoke/vendor-registry.js +87 -3
- package/package.json +11 -4
- package/lib/public/modules/server-settings-navigation.js +0 -39
|
@@ -17,9 +17,9 @@ var { wrapSpawnAsUser } = require("../os-users");
|
|
|
17
17
|
//
|
|
18
18
|
// The bundled @openai/codex platform package is the default. Set the
|
|
19
19
|
// CLAY_CODEX_PATH env var to an existing executable to run a different codex
|
|
20
|
-
// build (local dev build, system install, pinned older release)
|
|
21
|
-
//
|
|
22
|
-
//
|
|
20
|
+
// build (local dev build, system install, pinned older release). An unset
|
|
21
|
+
// override uses bundled resolution; an explicitly invalid override fails
|
|
22
|
+
// closed without selecting a different installation.
|
|
23
23
|
|
|
24
24
|
var PLATFORM_PACKAGE_BY_TARGET = {
|
|
25
25
|
"aarch64-apple-darwin": "@openai/codex-darwin-arm64",
|
|
@@ -45,14 +45,9 @@ function getTargetTriple() {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
function findCodexPath() {
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
console.log("[codex-app-server] Using CLAY_CODEX_PATH binary:", override);
|
|
52
|
-
return override;
|
|
53
|
-
}
|
|
54
|
-
console.warn("[codex-app-server] CLAY_CODEX_PATH does not exist, falling back to bundled codex:", override);
|
|
55
|
-
}
|
|
48
|
+
var discovery = require("./discovery");
|
|
49
|
+
var override = discovery.explicitEntry(process.env, "CLAY_CODEX_PATH", false);
|
|
50
|
+
if (override !== undefined) return override;
|
|
56
51
|
|
|
57
52
|
var triple = getTargetTriple();
|
|
58
53
|
if (!triple) throw new Error("Unsupported platform: " + process.platform + "/" + process.arch);
|
|
@@ -74,7 +69,7 @@ function findCodexPath() {
|
|
|
74
69
|
path.join(vendorRoot, triple, "codex", binaryName),
|
|
75
70
|
];
|
|
76
71
|
for (var i = 0; i < candidates.length; i++) {
|
|
77
|
-
if (
|
|
72
|
+
if (discovery.validEntry(candidates[i], false)) {
|
|
78
73
|
console.log("[codex-app-server] Using bundled codex binary:", candidates[i]);
|
|
79
74
|
return candidates[i];
|
|
80
75
|
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Reversible Codex transport names for Clay dynamic tools.
|
|
2
|
+
//
|
|
3
|
+
// Codex app-server (rust-v0.162.1 validate_dynamic_tools) rejects a
|
|
4
|
+
// thread/start whose dynamic tool names do not match ^[a-zA-Z0-9_-]+$, exceed
|
|
5
|
+
// 128 characters, repeat, or are "mcp" / start with "mcp__". Clay keeps its
|
|
6
|
+
// original names (for example mcp__server__tool) for dispatch, permissions and
|
|
7
|
+
// activity, and only the Codex wire uses a deterministic alias. Determinism
|
|
8
|
+
// lets a resumed thread's persisted catalog resolve against a rebuilt catalog.
|
|
9
|
+
|
|
10
|
+
var crypto = require("crypto");
|
|
11
|
+
|
|
12
|
+
var MAX_NAME_LENGTH = 128;
|
|
13
|
+
var ALIAS_PREFIX = "clay__";
|
|
14
|
+
var HASH_LENGTH = 16;
|
|
15
|
+
var IDENTIFIER = /^[A-Za-z0-9_-]+$/;
|
|
16
|
+
|
|
17
|
+
function isReserved(name) {
|
|
18
|
+
return name === "mcp" || name.indexOf("mcp__") === 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// True when Codex accepts the name as-is and it cannot be mistaken for an alias.
|
|
22
|
+
function isPlainName(name) {
|
|
23
|
+
return typeof name === "string" && name.length > 0 && name.length <= MAX_NAME_LENGTH
|
|
24
|
+
&& IDENTIFIER.test(name) && !isReserved(name) && name.indexOf(ALIAS_PREFIX) !== 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function transportName(name) {
|
|
28
|
+
if (typeof name !== "string" || !name) throw new Error("Dynamic tool names must be non-empty strings.");
|
|
29
|
+
if (isPlainName(name)) return name;
|
|
30
|
+
var hash = crypto.createHash("sha256").update(name, "utf8").digest("hex").slice(0, HASH_LENGTH);
|
|
31
|
+
var readable = name.replace(/^mcp__/, "").replace(/[^A-Za-z0-9_-]/g, "_");
|
|
32
|
+
var room = MAX_NAME_LENGTH - ALIAS_PREFIX.length - 2 - HASH_LENGTH;
|
|
33
|
+
return ALIAS_PREFIX + readable.slice(0, room) + "__" + hash;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Build the exact alias map for one query's catalog. Repeated identical
|
|
37
|
+
// originals resolve to the same handler, so they are advertised once. Two
|
|
38
|
+
// different originals sharing an alias fail closed instead of guessing.
|
|
39
|
+
function createCatalog(defs) {
|
|
40
|
+
var byTransport = new Map();
|
|
41
|
+
var byOriginal = new Map();
|
|
42
|
+
var advertised = [];
|
|
43
|
+
(defs || []).forEach(function (def) {
|
|
44
|
+
var original = def && def.name;
|
|
45
|
+
var alias = transportName(original);
|
|
46
|
+
if (byOriginal.has(original)) return;
|
|
47
|
+
if (byTransport.has(alias)) {
|
|
48
|
+
throw new Error("Codex dynamic tool names collide: " + byTransport.get(alias) + " and " + original);
|
|
49
|
+
}
|
|
50
|
+
byTransport.set(alias, original);
|
|
51
|
+
byOriginal.set(original, alias);
|
|
52
|
+
advertised.push({ def: def, name: alias });
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Map a Codex call back to the original Clay name. Plain names keep the
|
|
56
|
+
// existing live-catalog lookup; aliases must belong to this catalog.
|
|
57
|
+
function resolve(tool, namespace) {
|
|
58
|
+
if (namespace !== undefined && namespace !== null && namespace !== "") {
|
|
59
|
+
return { error: "Clay does not register namespaced dynamic tools: " + namespace };
|
|
60
|
+
}
|
|
61
|
+
if (typeof tool !== "string" || !tool) return { error: "Dynamic tool call has no tool name." };
|
|
62
|
+
if (byTransport.has(tool)) return { name: byTransport.get(tool) };
|
|
63
|
+
if (isPlainName(tool)) return { name: tool };
|
|
64
|
+
return { error: "Session tool is not in this conversation's current catalog: " + tool };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function displayName(tool) {
|
|
68
|
+
return byTransport.has(tool) ? byTransport.get(tool) : tool;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return { advertised: advertised, resolve: resolve, displayName: displayName };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
module.exports = {
|
|
75
|
+
MAX_NAME_LENGTH: MAX_NAME_LENGTH,
|
|
76
|
+
ALIAS_PREFIX: ALIAS_PREFIX,
|
|
77
|
+
isPlainName: isPlainName,
|
|
78
|
+
transportName: transportName,
|
|
79
|
+
createCatalog: createCatalog,
|
|
80
|
+
};
|
|
@@ -49,4 +49,84 @@ async function retireIdleQueries(entries, server, checkCurrent) {
|
|
|
49
49
|
return true;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
// A separate process may resume a different thread only after the shared
|
|
53
|
+
// process proves it has no writer for that thread. Never infer this from the
|
|
54
|
+
// number of query handles: Codex can retain a loaded thread after input ends.
|
|
55
|
+
async function loadedThreads(server, checkCurrent) {
|
|
56
|
+
var cursor = null;
|
|
57
|
+
var threads = [];
|
|
58
|
+
var deadline = Date.now() + 5000;
|
|
59
|
+
for (var page = 0; page < 20; page++) {
|
|
60
|
+
var remaining = deadline - Date.now();
|
|
61
|
+
if (remaining <= 0) return null;
|
|
62
|
+
var result;
|
|
63
|
+
try {
|
|
64
|
+
result = await server.send('thread/loaded/list', { cursor: cursor, limit: 100 }, remaining);
|
|
65
|
+
} catch (error) {
|
|
66
|
+
checkCurrent();
|
|
67
|
+
if (!server.started) throw error;
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
checkCurrent();
|
|
71
|
+
if (!result || !Array.isArray(result.data) || !result.data.every(function(id) { return typeof id === 'string'; })) return null;
|
|
72
|
+
threads = threads.concat(result.data);
|
|
73
|
+
if (!result.nextCursor) return threads;
|
|
74
|
+
if (result.nextCursor === cursor) return null;
|
|
75
|
+
cursor = result.nextCursor;
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function threadIsAbsent(server, threadId, checkCurrent) {
|
|
81
|
+
var threads = await loadedThreads(server, checkCurrent);
|
|
82
|
+
return !!threads && threads.indexOf(threadId) === -1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async function runtimeCanStop(server, retiredThreads, checkCurrent) {
|
|
86
|
+
var threads = await loadedThreads(server, checkCurrent);
|
|
87
|
+
return !!threads && threads.every(function(threadId) { return retiredThreads.indexOf(threadId) !== -1; });
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
async function releaseThread(entries, server, threadId, checkCurrent) {
|
|
91
|
+
if (!server || !server.started) throw new Error('Codex disconnected while checking recovery admission');
|
|
92
|
+
var matching = entries.filter(function(entry) {
|
|
93
|
+
return entry.handle && entry.handle.getRecoveryThreadId() === threadId;
|
|
94
|
+
});
|
|
95
|
+
if (!matching.length && await threadIsAbsent(server, threadId, checkCurrent)) return true;
|
|
96
|
+
if (matching.length) {
|
|
97
|
+
if (!await retireIdleQueries(matching, server, checkCurrent)) return false;
|
|
98
|
+
checkCurrent();
|
|
99
|
+
} else {
|
|
100
|
+
// A closed SDK handle can leave a loaded provider thread behind. Only an
|
|
101
|
+
// explicitly idle provider thread with verified terminal state may unload.
|
|
102
|
+
try {
|
|
103
|
+
var status = await server.send('thread/read', { threadId: threadId, includeTurns: false }, 5000);
|
|
104
|
+
checkCurrent();
|
|
105
|
+
if (!status || !status.thread || status.thread.id !== threadId
|
|
106
|
+
|| !status.thread.status || status.thread.status.type !== 'idle') return false;
|
|
107
|
+
var terminals = await server.send('thread/backgroundTerminals/list', { threadId: threadId }, 5000);
|
|
108
|
+
checkCurrent();
|
|
109
|
+
if (!terminalsAreIdle(terminals)) return false;
|
|
110
|
+
} catch (error) { checkCurrent(); if (!server.started) throw error; return false; }
|
|
111
|
+
}
|
|
112
|
+
try { await server.send('thread/unsubscribe', { threadId: threadId }, 5000); }
|
|
113
|
+
catch (error) { checkCurrent(); if (!server.started) throw error; return false; }
|
|
114
|
+
return threadIsAbsent(server, threadId, checkCurrent);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Poll the lifecycle without holding the admission lock. Also check Stop and
|
|
118
|
+
// shutdown while a provider probe, initialization, or process exit is pending.
|
|
119
|
+
function wait(promise, checkCurrent) {
|
|
120
|
+
return new Promise(function(resolve, reject) {
|
|
121
|
+
var timer = setInterval(function() {
|
|
122
|
+
try { checkCurrent(); } catch (error) { clearInterval(timer); reject(error); }
|
|
123
|
+
}, 25);
|
|
124
|
+
Promise.resolve(promise).then(function(value) {
|
|
125
|
+
clearInterval(timer);
|
|
126
|
+
try { checkCurrent(); resolve(value); } catch (error) { reject(error); }
|
|
127
|
+
}, function(error) { clearInterval(timer); reject(error); });
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
module.exports = { retireIdleQueries: retireIdleQueries, checkAbort: checkAbort,
|
|
132
|
+
releaseThread: releaseThread, runtimeCanStop: runtimeCanStop, wait: wait };
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
// Runtime catalogs are scoped to the adapter's OS user and provider configuration.
|
|
2
|
-
|
|
2
|
+
// The runtime model/list is authoritative. This offline fallback mirrors the
|
|
3
|
+
// picker-visible presets bundled with @openai/codex 0.162.1, in their priority
|
|
4
|
+
// order, minus models the official Codex models page lists as retired for
|
|
5
|
+
// ChatGPT sign-in or deprecated (gpt-5.5, gpt-5.2). Verified 2026-10-17:
|
|
6
|
+
// https://learn.chatgpt.com/docs/models
|
|
7
|
+
var FALLBACK = ["gpt-6.1-sol", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"];
|
|
8
|
+
// Codex marks its highest-priority picker-visible preset as default; for the
|
|
9
|
+
// bundled 0.162.1 presets that is gpt-6.1-sol. Used only without a runtime flag.
|
|
10
|
+
var DEFAULT_MODEL = "gpt-6.1-sol";
|
|
11
|
+
// Fast, low-cost models for title generation, newest first (gpt-5.6-luna's
|
|
12
|
+
// bundled upgrade target is gpt-6-luna).
|
|
13
|
+
var TITLE_MODELS = ["gpt-6-luna", "gpt-5.6-luna"];
|
|
3
14
|
|
|
4
15
|
function fallback() {
|
|
5
16
|
return FALLBACK.slice();
|
|
@@ -21,6 +32,8 @@ async function load(server) {
|
|
|
21
32
|
if (!entry || entry.hidden || typeof entry.model !== "string" || !entry.model || seen.has(entry.model)) return;
|
|
22
33
|
seen.add(entry.model);
|
|
23
34
|
var model = { value: entry.model, displayName: entry.displayName || entry.model, description: entry.description || "" };
|
|
35
|
+
if (typeof entry.defaultReasoningEffort === "string" && entry.defaultReasoningEffort) model.defaultReasoningEffort = entry.defaultReasoningEffort;
|
|
36
|
+
if (entry.isDefault === true) model.isDefault = true;
|
|
24
37
|
if (Array.isArray(entry.supportedReasoningEfforts)) {
|
|
25
38
|
model.supportedEffortLevels = entry.supportedReasoningEfforts.map(function (option) { return option.reasoningEffort; }).filter(function (effort) { return typeof effort === "string" && effort.length > 0; });
|
|
26
39
|
}
|
|
@@ -37,11 +50,32 @@ async function load(server) {
|
|
|
37
50
|
return fallback();
|
|
38
51
|
}
|
|
39
52
|
|
|
53
|
+
// The runtime's own default wins. Without a flag, never name a model the
|
|
54
|
+
// catalog does not offer: use the static default only when it is listed,
|
|
55
|
+
// otherwise the first valid row. An empty catalog keeps the static default.
|
|
56
|
+
function defaultModel(models) {
|
|
57
|
+
var values = [];
|
|
58
|
+
var flagged = null;
|
|
59
|
+
(models || []).forEach(function (entry) {
|
|
60
|
+
var value = typeof entry === "string" ? entry : entry && typeof entry === "object" ? entry.value : null;
|
|
61
|
+
if (typeof value !== "string" || !value.trim()) return;
|
|
62
|
+
values.push(value);
|
|
63
|
+
if (!flagged && typeof entry === "object" && entry.isDefault === true) flagged = value;
|
|
64
|
+
});
|
|
65
|
+
if (flagged) return flagged;
|
|
66
|
+
if (values.indexOf(DEFAULT_MODEL) !== -1 || values.length === 0) return DEFAULT_MODEL;
|
|
67
|
+
return values[0];
|
|
68
|
+
}
|
|
69
|
+
|
|
40
70
|
function selectTitleModel(models, sessionModel) {
|
|
41
71
|
var entries = models.map(function (entry) {
|
|
42
72
|
return typeof entry === "string" ? { value: entry } : entry;
|
|
43
73
|
}).filter(function (entry) { return entry && typeof entry.value === "string" && entry.value.trim(); });
|
|
44
|
-
var selected =
|
|
74
|
+
var selected = null;
|
|
75
|
+
for (var ti = 0; ti < TITLE_MODELS.length && !selected; ti++) {
|
|
76
|
+
selected = entries.find(function (entry) { return entry.value === TITLE_MODELS[ti]; }) || null;
|
|
77
|
+
}
|
|
78
|
+
selected = selected
|
|
45
79
|
|| entries.find(function (entry) { return entry.value === sessionModel; }) || entries[0];
|
|
46
80
|
if (!selected) throw new Error("No supported Codex title model is available");
|
|
47
81
|
var efforts = selected.supportedEffortLevels;
|
|
@@ -49,4 +83,4 @@ function selectTitleModel(models, sessionModel) {
|
|
|
49
83
|
return { model: selected.value, effort: effort };
|
|
50
84
|
}
|
|
51
85
|
|
|
52
|
-
module.exports = { fallback: fallback, load: load, selectTitleModel: selectTitleModel };
|
|
86
|
+
module.exports = { DEFAULT_MODEL: DEFAULT_MODEL, fallback: fallback, load: load, defaultModel: defaultModel, selectTitleModel: selectTitleModel };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
var idleRecovery = require('./codex-idle-recovery');
|
|
2
|
+
|
|
3
|
+
// Serialize decisions, not whole model turns. Waiting for a target must release
|
|
4
|
+
// the gate so an unrelated Driver can still answer its Worker's permissions.
|
|
5
|
+
function attachRecoveryAdmission(ctx) {
|
|
6
|
+
var handoff = null;
|
|
7
|
+
var runtimes = [];
|
|
8
|
+
var targets = new Map();
|
|
9
|
+
var cleanupTasks = new Map();
|
|
10
|
+
var cleanupFailures = new Map();
|
|
11
|
+
var cleanup = Promise.resolve();
|
|
12
|
+
var unconfirmedSharedProcess = null;
|
|
13
|
+
|
|
14
|
+
function checkSharedExit() {
|
|
15
|
+
if (!unconfirmedSharedProcess) return;
|
|
16
|
+
if (unconfirmedSharedProcess.exitCode === null && unconfirmedSharedProcess.signalCode === null) {
|
|
17
|
+
throw new Error('Codex shared runtime exit could not be confirmed; recovery remains reserved.');
|
|
18
|
+
}
|
|
19
|
+
unconfirmedSharedProcess = null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function checker(queryOpts) {
|
|
23
|
+
var epoch = ctx.state().epoch;
|
|
24
|
+
return function() {
|
|
25
|
+
idleRecovery.checkAbort(queryOpts);
|
|
26
|
+
var state = ctx.state();
|
|
27
|
+
if ((state.shuttingDown && !state.retiring) || state.epoch !== epoch) throw ctx.shutdownError();
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function cleanupRuntime(runtime) {
|
|
32
|
+
if (cleanupTasks.has(runtime)) return cleanupTasks.get(runtime);
|
|
33
|
+
var task = cleanup.catch(function() { return null; }).then(function() {
|
|
34
|
+
return runtime.shutdownForRecovery();
|
|
35
|
+
}).then(function() {
|
|
36
|
+
runtimes = runtimes.filter(function(current) { return current !== runtime; });
|
|
37
|
+
targets.forEach(function(current, threadId) { if (current === runtime) targets.delete(threadId); });
|
|
38
|
+
cleanupTasks.delete(runtime);
|
|
39
|
+
return true;
|
|
40
|
+
}, function(error) {
|
|
41
|
+
console.error('[yoke/codex] Isolated recovery runtime shutdown failed:', error.message || error);
|
|
42
|
+
// Retain ownership after an unconfirmed exit. In particular, never admit
|
|
43
|
+
// a second writer just because bounded process cleanup reached its limit.
|
|
44
|
+
cleanupFailures.set(runtime, error);
|
|
45
|
+
return false;
|
|
46
|
+
});
|
|
47
|
+
cleanupTasks.set(runtime, task);
|
|
48
|
+
cleanup = task;
|
|
49
|
+
return task;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function withAdmission(checkCurrent, action) {
|
|
53
|
+
var release;
|
|
54
|
+
var prior = handoff;
|
|
55
|
+
var own = new Promise(function(resolve) { release = resolve; });
|
|
56
|
+
var tail = Promise.resolve(prior).then(function() { return own; });
|
|
57
|
+
handoff = tail;
|
|
58
|
+
tail.then(function() { if (handoff === tail) handoff = null; });
|
|
59
|
+
try {
|
|
60
|
+
await idleRecovery.wait(prior || Promise.resolve(), checkCurrent);
|
|
61
|
+
await idleRecovery.wait(cleanup, checkCurrent);
|
|
62
|
+
checkSharedExit();
|
|
63
|
+
return await action();
|
|
64
|
+
} finally {
|
|
65
|
+
// An aborted waiter still links to its predecessor. Releasing its own
|
|
66
|
+
// slot cannot let a later caller overtake a probe that is still running.
|
|
67
|
+
release();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function releaseTarget(threadId, checkCurrent) {
|
|
72
|
+
var prior = targets.get(threadId);
|
|
73
|
+
if (!prior) return true;
|
|
74
|
+
if (cleanupFailures.has(prior)) throw cleanupFailures.get(prior);
|
|
75
|
+
await prior.retireIdleForRecovery(checkCurrent);
|
|
76
|
+
await cleanup;
|
|
77
|
+
checkCurrent();
|
|
78
|
+
if (cleanupFailures.has(prior)) throw cleanupFailures.get(prior);
|
|
79
|
+
return !targets.has(threadId);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function prepareShared(threadId, checkCurrent) {
|
|
83
|
+
var state = ctx.state();
|
|
84
|
+
if (state.initializing) return false;
|
|
85
|
+
var retiredThreads = [];
|
|
86
|
+
if (state.refCount > 0) {
|
|
87
|
+
var snapshots = state.entries.map(function(entry) { return entry.handle && entry.handle.getIdleRecoverySnapshot(); });
|
|
88
|
+
if (await idleRecovery.retireIdleQueries(state.entries, state.server, checkCurrent)) {
|
|
89
|
+
retiredThreads = snapshots.filter(Boolean).map(function(snapshot) { return snapshot.threadId; });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
state = ctx.state();
|
|
93
|
+
if (!state.server) return true;
|
|
94
|
+
if (!state.refCount && await idleRecovery.runtimeCanStop(state.server, retiredThreads, checkCurrent)) {
|
|
95
|
+
var proc = state.server.proc;
|
|
96
|
+
var stopped = await ctx.stopIdle();
|
|
97
|
+
if (stopped) { unconfirmedSharedProcess = proc || null; checkSharedExit(); }
|
|
98
|
+
return stopped;
|
|
99
|
+
}
|
|
100
|
+
return idleRecovery.releaseThread(state.entries, state.server, threadId, checkCurrent);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
async function waitUntilAvailable(queryOpts, action) {
|
|
104
|
+
var checkCurrent = checker(queryOpts);
|
|
105
|
+
var waiting = false;
|
|
106
|
+
if (typeof queryOpts.onRecoveryAdmission === 'function') queryOpts.onRecoveryAdmission(true);
|
|
107
|
+
try {
|
|
108
|
+
while (true) {
|
|
109
|
+
checkCurrent();
|
|
110
|
+
// Cancellation returns to the caller immediately, but an in-flight
|
|
111
|
+
// unsubscribe or shutdown retains the gate until its bounded RPC settles.
|
|
112
|
+
var result = await idleRecovery.wait(withAdmission(checkCurrent, action.bind(null, checkCurrent)), checkCurrent);
|
|
113
|
+
if (result) {
|
|
114
|
+
if (waiting && typeof queryOpts.onRecoveryWaiting === 'function') queryOpts.onRecoveryWaiting(false);
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
if (!waiting && typeof queryOpts.onRecoveryWaiting === 'function') queryOpts.onRecoveryWaiting(true);
|
|
118
|
+
waiting = true;
|
|
119
|
+
await idleRecovery.wait(new Promise(function(resolve) { setTimeout(resolve, 50); }), checkCurrent);
|
|
120
|
+
}
|
|
121
|
+
} finally {
|
|
122
|
+
if (typeof queryOpts.onRecoveryAdmission === 'function') queryOpts.onRecoveryAdmission(false);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function createQuery(queryOpts) {
|
|
127
|
+
return waitUntilAvailable(queryOpts, async function(checkCurrent) {
|
|
128
|
+
if (!await releaseTarget(queryOpts.resumeSessionId, checkCurrent)) return false;
|
|
129
|
+
if (!await prepareShared(queryOpts.resumeSessionId, checkCurrent)) return false;
|
|
130
|
+
checkCurrent();
|
|
131
|
+
var runtime = ctx.createRuntime(queryOpts);
|
|
132
|
+
runtimes.push(runtime);
|
|
133
|
+
targets.set(queryOpts.resumeSessionId, runtime);
|
|
134
|
+
try {
|
|
135
|
+
return await runtime.createQuery(Object.assign({}, queryOpts, {
|
|
136
|
+
isolatedRecovery: true,
|
|
137
|
+
onRuntimeFinished: function() { return cleanupRuntime(runtime); },
|
|
138
|
+
}));
|
|
139
|
+
} catch (error) {
|
|
140
|
+
await cleanupRuntime(runtime);
|
|
141
|
+
throw error;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
createQuery: createQuery,
|
|
148
|
+
pending: function() { return handoff; },
|
|
149
|
+
checkSharedExit: checkSharedExit,
|
|
150
|
+
hasTarget: function(threadId) { return targets.has(threadId); },
|
|
151
|
+
waitForTarget: function(queryOpts) {
|
|
152
|
+
return waitUntilAvailable(queryOpts, function(checkCurrent) { return releaseTarget(queryOpts.resumeSessionId, checkCurrent); });
|
|
153
|
+
},
|
|
154
|
+
shutdown: function() {
|
|
155
|
+
return Promise.all(runtimes.slice().map(cleanupRuntime)).then(function(results) {
|
|
156
|
+
checkSharedExit();
|
|
157
|
+
if (results.indexOf(false) !== -1) throw new Error('Codex recovery runtime cleanup could not be confirmed.');
|
|
158
|
+
return cleanup;
|
|
159
|
+
});
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
module.exports = { attachRecoveryAdmission: attachRecoveryAdmission };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Serializable descriptions of implemented provider controls. Legacy setting
|
|
2
|
+
// keys and message names describe persistence compatibility, never authority.
|
|
3
|
+
var claude = {
|
|
4
|
+
auto: true,
|
|
5
|
+
permissionModes: [{ value: 'default', label: 'Ask' }, { value: 'plan', label: 'Plan' }, { value: 'acceptEdits', label: 'Auto-accept edits' }],
|
|
6
|
+
thinking: { options: ['disabled', 'adaptive', 'budget'], budget: true },
|
|
7
|
+
};
|
|
8
|
+
var codex = {
|
|
9
|
+
approval: { options: [{ value: 'never', label: 'Auto' }, { value: 'untrusted', label: 'Untrusted' }, { value: 'on-request', label: 'Ask' }], state: 'codexApproval', message: 'set_codex_approval', key: 'approval' },
|
|
10
|
+
sandbox: { options: [{ value: 'read-only', label: 'Read Only' }, { value: 'workspace-write', label: 'Workspace' }, { value: 'danger-full-access', label: 'Full Access' }], state: 'codexSandbox', message: 'set_codex_sandbox', key: 'sandbox' },
|
|
11
|
+
webSearch: { options: [{ value: 'disabled', label: 'Off' }, { value: 'cached', label: 'Cached' }, { value: 'live', label: 'Live' }], state: 'codexWebSearch', message: 'set_codex_websearch', key: 'webSearch' },
|
|
12
|
+
};
|
|
13
|
+
module.exports = { claude: claude, codex: codex };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Installation resolution shared by adapter creation, startup and product UI.
|
|
2
|
+
// This never starts a provider; callers may replace resolvers for isolated tests.
|
|
3
|
+
var fs = require('fs');
|
|
4
|
+
var cp = require('child_process');
|
|
5
|
+
function onPath(binary, user) {
|
|
6
|
+
try {
|
|
7
|
+
if (user && !/^[a-z_][a-z0-9_-]*\$?$/i.test(user)) return null;
|
|
8
|
+
var command = user ? 'su' : process.platform === 'win32' ? 'where' : 'which';
|
|
9
|
+
var args = user ? ['-', user, '-c', 'which ' + binary] : [binary];
|
|
10
|
+
if (!/^[a-zA-Z0-9_.-]+$/.test(binary)) return null;
|
|
11
|
+
var result = cp.execFileSync(command, args, { encoding: 'utf8', timeout: 3000, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
12
|
+
return String(result || '').trim().split(/\r?\n/)[0] || null;
|
|
13
|
+
} catch (error) { return null; }
|
|
14
|
+
}
|
|
15
|
+
// Native commands require an executable regular file. SDK-owned JavaScript
|
|
16
|
+
// entries are readable files launched through Node, not native executables.
|
|
17
|
+
function validEntry(file, script) {
|
|
18
|
+
try {
|
|
19
|
+
if (typeof file !== 'string' || !file || !fs.statSync(file).isFile()) return false;
|
|
20
|
+
fs.accessSync(file, script && /\.(?:c|m)?js$/i.test(file) ? fs.constants.R_OK : fs.constants.X_OK);
|
|
21
|
+
return true;
|
|
22
|
+
} catch (error) { return false; }
|
|
23
|
+
}
|
|
24
|
+
function explicitEntry(env, name, script) {
|
|
25
|
+
if (!Object.prototype.hasOwnProperty.call(env, name)) return undefined;
|
|
26
|
+
if (!validEntry(env[name], script)) throw new Error('Invalid explicit provider executable: ' + name);
|
|
27
|
+
return env[name];
|
|
28
|
+
}
|
|
29
|
+
function pathResolver(binary, override) {
|
|
30
|
+
return function(options) {
|
|
31
|
+
options = options || {};
|
|
32
|
+
var env = options.env || process.env;
|
|
33
|
+
if (!options.user && override) {
|
|
34
|
+
var explicit = explicitEntry(env, override, false);
|
|
35
|
+
if (explicit !== undefined) return explicit;
|
|
36
|
+
}
|
|
37
|
+
var resolved = onPath(binary, options.user);
|
|
38
|
+
return options.user || validEntry(resolved, false) ? resolved : null;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function bundledResolver(find, binary) {
|
|
42
|
+
return function(options) {
|
|
43
|
+
options = options || {};
|
|
44
|
+
// The mapped account cannot inherit the daemon account's installation.
|
|
45
|
+
if (options.user) return onPath(binary, options.user);
|
|
46
|
+
// The runtime resolver owns all fallback policy. Adding a discovery-only
|
|
47
|
+
// PATH fallback would advertise a runtime that its adapter cannot start.
|
|
48
|
+
return find();
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function acpResolver(vendor) {
|
|
52
|
+
return function(options) {
|
|
53
|
+
if (options && options.user) return null;
|
|
54
|
+
var profiles = require('./acp-agent-profiles');
|
|
55
|
+
return profiles.findAcpAgentPath(profiles.getAcpAgentProfile(vendor));
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function installed(options) {
|
|
59
|
+
var registry = options && options.registry || require('./vendor-registry').VENDOR_REGISTRY;
|
|
60
|
+
var result = {};
|
|
61
|
+
Object.keys(registry).forEach(function(vendor) {
|
|
62
|
+
var info = registry[vendor];
|
|
63
|
+
result[vendor] = false;
|
|
64
|
+
if (options && options.user && info.osUserIsolation !== true) return;
|
|
65
|
+
if (typeof info.resolveExecutable !== 'function') return;
|
|
66
|
+
try { result[vendor] = !!info.resolveExecutable(options || {}); } catch (error) {}
|
|
67
|
+
});
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
module.exports = { installed: installed, pathResolver: pathResolver, bundledResolver: bundledResolver, acpResolver: acpResolver, validEntry: validEntry, explicitEntry: explicitEntry };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
function classify(provider, text) {
|
|
2
|
+
var service = require('./provider-contract').resolve(provider).classifyError;
|
|
3
|
+
return typeof service === 'function' ? service(text) : null;
|
|
4
|
+
}
|
|
5
|
+
function contextOverflow(error) {
|
|
6
|
+
return /prompt is too long|context_length|maximum context length/i.test(String(error || ""));
|
|
7
|
+
}
|
|
8
|
+
module.exports = { contextOverflow: contextOverflow, classify: classify };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Provider compatibility at the host boundary. No effects occur on import.
|
|
2
|
+
function prepare(env) { delete env.CLAUDECODE; }
|
|
3
|
+
function reaper(env) {
|
|
4
|
+
return { idleMs: Number(env.CLAY_ADAPTER_IDLE_MS) || Number(env.CLAY_CODEX_IDLE_MS) || 5 * 60 * 1000,
|
|
5
|
+
reapMs: Number(env.CLAY_ADAPTER_REAPER_MS) || Number(env.CLAY_CODEX_REAPER_MS) || 60 * 1000 };
|
|
6
|
+
}
|
|
7
|
+
module.exports = { prepare: prepare, reaper: reaper };
|
package/lib/yoke/index.js
CHANGED
|
@@ -16,11 +16,12 @@ var createGrokAdapter = require("./adapters/grok").createGrokAdapter;
|
|
|
16
16
|
var createCopilotAdapter = require("./adapters/copilot").createCopilotAdapter;
|
|
17
17
|
var createQwenAdapter = require("./adapters/qwen").createQwenAdapter;
|
|
18
18
|
var createJunieAdapter = require("./adapters/junie").createJunieAdapter;
|
|
19
|
+
var createMuseAdapter = require("./adapters/muse").createMuseAdapter;
|
|
19
20
|
var createKiroAdapter = require("./adapters/kiro").createKiroAdapter;
|
|
20
21
|
|
|
21
22
|
// Keep the first session in a new project predictable. This order is also
|
|
22
23
|
// used by the UI when a project has no remembered vendor yet.
|
|
23
|
-
var DEFAULT_VENDOR_ORDER = ["claude", "codex", "grok", "kimi", "copilot", "qwen", "junie", "antigravity", "opencode", "kiro"];
|
|
24
|
+
var DEFAULT_VENDOR_ORDER = ["claude", "codex", "muse", "grok", "kimi", "copilot", "qwen", "junie", "antigravity", "opencode", "kiro"];
|
|
24
25
|
|
|
25
26
|
function resolveDefaultVendor(availableVendors) {
|
|
26
27
|
availableVendors = availableVendors || {};
|
|
@@ -97,6 +98,8 @@ function createAdapter(opts) {
|
|
|
97
98
|
adapter = createJunieAdapter(opts);
|
|
98
99
|
} else if (vendor === "kiro") {
|
|
99
100
|
adapter = createKiroAdapter(opts);
|
|
101
|
+
} else if (vendor === "muse") {
|
|
102
|
+
adapter = createMuseAdapter(opts);
|
|
100
103
|
} else {
|
|
101
104
|
throw new Error("[YOKE] Unknown adapter vendor: " + vendor);
|
|
102
105
|
}
|
|
@@ -262,6 +265,7 @@ function checkAuth() {
|
|
|
262
265
|
qwen: !!lookupBinary("qwen"),
|
|
263
266
|
junie: !!lookupBinary("junie"),
|
|
264
267
|
kiro: checkKiro(),
|
|
268
|
+
muse: null,
|
|
265
269
|
};
|
|
266
270
|
logAuthCheck(_authCache);
|
|
267
271
|
return _authCache;
|
|
@@ -280,54 +284,8 @@ function checkAuth() {
|
|
|
280
284
|
var _installedCache = null;
|
|
281
285
|
|
|
282
286
|
function checkInstalled() {
|
|
283
|
-
if (_installedCache)
|
|
284
|
-
|
|
285
|
-
var fs = require("fs");
|
|
286
|
-
var execFileSync = require("child_process").execFileSync;
|
|
287
|
-
var result = { claude: false, codex: false, antigravity: false, opencode: false, kimi: false, grok: false, copilot: false, qwen: false, junie: false, kiro: false };
|
|
288
|
-
try {
|
|
289
|
-
if (process.platform === "win32") execFileSync("where", ["claude"], { timeout: 3000, stdio: ["pipe", "pipe", "pipe"] });
|
|
290
|
-
else execFileSync("which", ["claude"], { timeout: 3000, stdio: ["pipe", "pipe", "pipe"] });
|
|
291
|
-
result.claude = true;
|
|
292
|
-
} catch (e) {}
|
|
293
|
-
try {
|
|
294
|
-
var findKiroPath = require("./kiro-acp-server").findKiroPath;
|
|
295
|
-
var kiroBin = findKiroPath();
|
|
296
|
-
if (kiroBin && fs.existsSync(kiroBin)) result.kiro = true;
|
|
297
|
-
} catch (e) {}
|
|
298
|
-
try {
|
|
299
|
-
var codexBin = null;
|
|
300
|
-
try {
|
|
301
|
-
var findCodexPath = require("./codex-app-server").findCodexPath;
|
|
302
|
-
codexBin = findCodexPath();
|
|
303
|
-
if (codexBin && fs.existsSync(codexBin)) {
|
|
304
|
-
result.codex = true;
|
|
305
|
-
}
|
|
306
|
-
} catch (e) {}
|
|
307
|
-
|
|
308
|
-
if (!result.codex) {
|
|
309
|
-
var whichOut = process.platform === "win32"
|
|
310
|
-
? execFileSync("where", ["codex"], { timeout: 3000, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] })
|
|
311
|
-
: execFileSync("which", ["codex"], { timeout: 3000, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] });
|
|
312
|
-
if (whichOut.trim()) result.codex = true;
|
|
313
|
-
}
|
|
314
|
-
} catch (e) {}
|
|
315
|
-
try {
|
|
316
|
-
var antigravityBinary = process.platform === "win32"
|
|
317
|
-
? execFileSync("where", ["agy"], { timeout: 3000, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] })
|
|
318
|
-
: execFileSync("which", ["agy"], { timeout: 3000, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] });
|
|
319
|
-
result.antigravity = !!antigravityBinary.trim();
|
|
320
|
-
} catch (e) {}
|
|
321
|
-
var acpVendorKeys = ["opencode", "kimi", "grok", "copilot", "qwen", "junie"];
|
|
322
|
-
for (var acpIndex = 0; acpIndex < acpVendorKeys.length; acpIndex++) {
|
|
323
|
-
try {
|
|
324
|
-
var acpProfiles = require("./acp-agent-profiles");
|
|
325
|
-
var acpVendor = acpVendorKeys[acpIndex];
|
|
326
|
-
result[acpVendor] = !!acpProfiles.findAcpAgentPath(acpProfiles.getAcpAgentProfile(acpVendor));
|
|
327
|
-
} catch (e) {}
|
|
328
|
-
}
|
|
329
|
-
_installedCache = result;
|
|
330
|
-
return result;
|
|
287
|
+
if (!_installedCache) _installedCache = require("./discovery").installed();
|
|
288
|
+
return _installedCache;
|
|
331
289
|
}
|
|
332
290
|
|
|
333
291
|
function invalidateAuthCache() {
|
|
@@ -352,7 +310,7 @@ function createAdapters(opts) {
|
|
|
352
310
|
// Tests can supply a fixed installation snapshot without probing or spawning
|
|
353
311
|
// vendor binaries; production callers always use the cached host scan.
|
|
354
312
|
var installed = opts._installed || checkInstalled();
|
|
355
|
-
var auth = { claude: false, codex: false, antigravity: false, opencode: false, kimi: false, grok: false, copilot: false, qwen: false, junie: false, kiro: false };
|
|
313
|
+
var auth = { claude: false, codex: false, antigravity: false, opencode: false, kimi: false, grok: false, copilot: false, qwen: false, junie: false, kiro: false, muse: false };
|
|
356
314
|
var adapters = {};
|
|
357
315
|
|
|
358
316
|
function supportsConfiguredIsolation(vendor) {
|
|
@@ -390,7 +348,7 @@ function createAdapters(opts) {
|
|
|
390
348
|
}
|
|
391
349
|
}
|
|
392
350
|
|
|
393
|
-
var subprocessVendors = ["antigravity", "opencode", "kimi", "grok", "copilot", "qwen", "junie"];
|
|
351
|
+
var subprocessVendors = ["antigravity", "opencode", "kimi", "grok", "copilot", "qwen", "junie", "muse"];
|
|
394
352
|
for (var subprocessIndex = 0; subprocessIndex < subprocessVendors.length; subprocessIndex++) {
|
|
395
353
|
var subprocessVendor = subprocessVendors[subprocessIndex];
|
|
396
354
|
var subprocessInfo = vendorRegistry.getVendorInfo(subprocessVendor);
|