@alexjbarnes/cockpit 0.3.1 → 0.4.1
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +10 -2
- package/.next/build-manifest.json +4 -4
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +21 -45
- package/.next/react-loadable-manifest.json +279 -267
- package/.next/routes-manifest.json +68 -12
- package/.next/server/app/(app)/agents/[name]/page.js +3 -3
- package/.next/server/app/(app)/agents/[name]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/agents/[name]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/agents/page.js +2 -2
- package/.next/server/app/(app)/agents/page.js.nft.json +1 -1
- package/.next/server/app/(app)/agents/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/claude-md/edit/page.js +2 -2
- package/.next/server/app/(app)/claude-md/edit/page.js.nft.json +1 -1
- package/.next/server/app/(app)/claude-md/edit/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/claude-md/page.js +2 -2
- package/.next/server/app/(app)/claude-md/page.js.nft.json +1 -1
- package/.next/server/app/(app)/claude-md/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/commands/[name]/page.js +3 -3
- package/.next/server/app/(app)/commands/[name]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/commands/[name]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/commands/page.js +2 -2
- package/.next/server/app/(app)/commands/page.js.nft.json +1 -1
- package/.next/server/app/(app)/commands/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/hooks/[event]/page.js +3 -3
- package/.next/server/app/(app)/hooks/[event]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/hooks/[event]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/hooks/page.js +2 -2
- package/.next/server/app/(app)/hooks/page.js.nft.json +1 -1
- package/.next/server/app/(app)/hooks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/inbox/[id]/page.js +2 -2
- package/.next/server/app/(app)/inbox/[id]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/inbox/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/inbox/page.js +2 -2
- package/.next/server/app/(app)/inbox/page.js.nft.json +1 -1
- package/.next/server/app/(app)/inbox/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/jobs/[id]/edit/page.js +2 -2
- package/.next/server/app/(app)/jobs/[id]/edit/page.js.nft.json +1 -1
- package/.next/server/app/(app)/jobs/[id]/edit/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/jobs/[id]/page.js +2 -2
- package/.next/server/app/(app)/jobs/[id]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/jobs/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/jobs/[id]/runs/[runId]/page.js +2 -2
- package/.next/server/app/(app)/jobs/[id]/runs/[runId]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/jobs/[id]/runs/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/jobs/page.js +2 -2
- package/.next/server/app/(app)/jobs/page.js.nft.json +1 -1
- package/.next/server/app/(app)/jobs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/mcp-servers/[name]/page.js +2 -2
- package/.next/server/app/(app)/mcp-servers/[name]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/mcp-servers/[name]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/mcp-servers/page.js +2 -2
- package/.next/server/app/(app)/mcp-servers/page.js.nft.json +1 -1
- package/.next/server/app/(app)/mcp-servers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/page.js +2 -2
- package/.next/server/app/(app)/page.js.nft.json +1 -1
- package/.next/server/app/(app)/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/plugins/page.js +2 -0
- package/.next/server/app/(app)/{files → plugins}/page.js.nft.json +1 -1
- package/.next/server/app/(app)/plugins/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/reviews/[owner]/[repo]/[number]/page.js +4 -4
- package/.next/server/app/(app)/reviews/[owner]/[repo]/[number]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/reviews/[owner]/[repo]/[number]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/reviews/[owner]/[repo]/page.js +2 -2
- package/.next/server/app/(app)/reviews/[owner]/[repo]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/reviews/[owner]/[repo]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/reviews/page.js +2 -2
- package/.next/server/app/(app)/reviews/page.js.nft.json +1 -1
- package/.next/server/app/(app)/reviews/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/sessions/[id]/page.js +2 -2
- package/.next/server/app/(app)/sessions/[id]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/settings/appearance/page.js +2 -2
- package/.next/server/app/(app)/settings/appearance/page.js.nft.json +1 -1
- package/.next/server/app/(app)/settings/appearance/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/settings/notifications/page.js +2 -2
- package/.next/server/app/(app)/settings/notifications/page.js.nft.json +1 -1
- package/.next/server/app/(app)/settings/notifications/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/settings/page.js +2 -2
- package/.next/server/app/(app)/settings/page.js.nft.json +1 -1
- package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/settings/providers/[id]/page.js +2 -2
- package/.next/server/app/(app)/settings/providers/[id]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/settings/providers/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/settings/providers/new/page.js +2 -2
- package/.next/server/app/(app)/settings/providers/new/page.js.nft.json +1 -1
- package/.next/server/app/(app)/settings/providers/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/settings/providers/page.js +2 -2
- package/.next/server/app/(app)/settings/providers/page.js.nft.json +1 -1
- package/.next/server/app/(app)/settings/providers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/settings/session/page.js +2 -2
- package/.next/server/app/(app)/settings/session/page.js.nft.json +1 -1
- package/.next/server/app/(app)/settings/session/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/skills/[name]/page.js +3 -3
- package/.next/server/app/(app)/skills/[name]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/skills/[name]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/skills/page.js +2 -2
- package/.next/server/app/(app)/skills/page.js.nft.json +1 -1
- package/.next/server/app/(app)/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error/page.js +3 -3
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/agents.html +1 -1
- package/.next/server/app/agents.rsc +4 -4
- package/.next/server/app/agents.segments/!KGFwcCk/agents/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/agents.segments/!KGFwcCk/agents.segment.rsc +1 -1
- package/.next/server/app/agents.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/agents.segments/_full.segment.rsc +4 -4
- package/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/.next/server/app/agents.segments/_index.segment.rsc +2 -2
- package/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/agents/[name]/route.js +1 -1
- package/.next/server/app/api/agents/route.js +1 -1
- package/.next/server/app/api/assistant-session/route.js +1 -0
- package/.next/server/app/api/assistant-session/route.js.nft.json +1 -0
- package/.next/server/app/api/assistant-session/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/check/route.js +1 -1
- package/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/server/app/api/auth/setup/route.js +1 -1
- package/.next/server/app/api/auth/ws-token/route.js +1 -1
- package/.next/server/app/api/btw/route.js +2 -2
- package/.next/server/app/api/claude-md/route.js +1 -1
- package/.next/server/app/api/commands/[name]/route.js +1 -1
- package/.next/server/app/api/commands/route.js +1 -1
- package/.next/server/app/api/config/cwd/route.js +1 -0
- package/.next/server/app/api/config/cwd/route.js.nft.json +1 -0
- package/.next/server/app/api/config/cwd/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/defaults/route.js +1 -1
- package/.next/server/app/api/filesystem/browse/route.js +1 -1
- package/.next/server/app/api/filesystem/files/route.js +1 -1
- package/.next/server/app/api/filesystem/mkdir/route.js +1 -1
- package/.next/server/app/api/filesystem/read/route.js +1 -1
- package/.next/server/app/api/git/clone/route.js +1 -1
- package/.next/server/app/api/git/commit/route.js +1 -1
- package/.next/server/app/api/git/diff/route.js +1 -1
- package/.next/server/app/api/git/discard/route.js +1 -1
- package/.next/server/app/api/git/generate-message/route.js +2 -2
- package/.next/server/app/api/git/push/route.js +1 -1
- package/.next/server/app/api/git/status/route.js +1 -1
- package/.next/server/app/api/github/file-content/route.js +1 -1
- package/.next/server/app/api/github/orgs/route.js +1 -1
- package/.next/server/app/api/github/prs/checks/route.js +1 -1
- package/.next/server/app/api/github/prs/diff/route.js +1 -1
- package/.next/server/app/api/github/prs/review/route.js +1 -1
- package/.next/server/app/api/github/prs/route.js +1 -1
- package/.next/server/app/api/github/prs/view/route.js +1 -1
- package/.next/server/app/api/github/repos/route.js +1 -1
- package/.next/server/app/api/github/review-session/route.js +1 -1
- package/.next/server/app/api/github/review-session/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js +1 -1
- package/.next/server/app/api/hooks/route.js +1 -1
- package/.next/server/app/api/inbox/[id]/route.js +1 -5
- package/.next/server/app/api/inbox/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/inbox/route.js +1 -5
- package/.next/server/app/api/inbox/route.js.nft.json +1 -1
- package/.next/server/app/api/jobs/[id]/route.js +1 -1
- package/.next/server/app/api/jobs/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/jobs/[id]/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/jobs/[id]/runs/[runId]/transcript/route.js +1 -1
- package/.next/server/app/api/jobs/[id]/runs/[runId]/transcript/route.js.nft.json +1 -1
- package/.next/server/app/api/jobs/[id]/runs/route.js +1 -1
- package/.next/server/app/api/jobs/[id]/stop/route.js +1 -0
- package/.next/server/app/api/jobs/[id]/stop/route.js.nft.json +1 -0
- package/.next/server/app/api/jobs/[id]/stop/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/jobs/[id]/trigger/route.js +1 -1
- package/.next/server/app/api/jobs/[id]/trigger/route.js.nft.json +1 -1
- package/.next/server/app/api/jobs/mcp-discover/route.js +1 -1
- package/.next/server/app/api/jobs/mcp-discover/route.js.nft.json +1 -1
- package/.next/server/app/api/jobs/route.js +1 -1
- package/.next/server/app/api/jobs/route.js.nft.json +1 -1
- package/.next/server/app/api/jobs/status/route.js +1 -1
- package/.next/server/app/api/mcp-servers/[name]/route.js +1 -1
- package/.next/server/app/api/mcp-servers/[name]/test/route.js +1 -1
- package/.next/server/app/api/mcp-servers/[name]/tools/route.js +1 -0
- package/.next/server/app/api/mcp-servers/[name]/tools/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp-servers/[name]/tools/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp-servers/route.js +1 -1
- package/.next/server/app/api/notifications/route.js +1 -1
- package/.next/server/app/api/notifications/test/route.js +3 -3
- package/.next/server/app/api/plugins/[id]/route.js +1 -0
- package/.next/server/app/api/plugins/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/plugins/install/route.js +1 -0
- package/.next/server/app/api/plugins/install/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/install/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/plugins/marketplaces/[name]/route.js +1 -0
- package/.next/server/app/api/plugins/marketplaces/[name]/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/marketplaces/[name]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/plugins/marketplaces/route.js +1 -0
- package/.next/server/app/api/plugins/marketplaces/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/marketplaces/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/plugins/route.js +1 -0
- package/.next/server/app/api/plugins/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/providers/[id]/route.js +1 -1
- package/.next/server/app/api/providers/route.js +1 -1
- package/.next/server/app/api/reviews/pinned/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/mcp/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/search/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/search/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/tabs/route.js +1 -1
- package/.next/server/app/api/sessions/bulk-delete/route.js +1 -1
- package/.next/server/app/api/sessions/bulk-delete/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/by-ids/route.js +1 -1
- package/.next/server/app/api/sessions/by-ids/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/group/route.js +1 -1
- package/.next/server/app/api/sessions/group/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/pinned/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/search/route.js +1 -1
- package/.next/server/app/api/sessions/search/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/thinking/route.js +1 -1
- package/.next/server/app/api/sessions/thinking/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[name]/route.js +1 -1
- package/.next/server/app/api/skills/route.js +1 -1
- package/.next/server/app/api/terminal/[id]/route.js +1 -1
- package/.next/server/app/api/terminal/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/terminal/route.js +1 -1
- package/.next/server/app/api/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/usage/route.js +1 -1
- package/.next/server/app/api/version/changelog/route.js +1 -1
- package/.next/server/app/api/version/cockpit/changelog/route.js +1 -1
- package/.next/server/app/api/version/cockpit/route.js +1 -1
- package/.next/server/app/api/version/route.js +2 -2
- package/.next/server/app/claude-md/edit.html +1 -1
- package/.next/server/app/claude-md/edit.rsc +4 -4
- package/.next/server/app/claude-md/edit.segments/!KGFwcCk/claude-md/edit/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/claude-md/edit.segments/!KGFwcCk/claude-md/edit.segment.rsc +1 -1
- package/.next/server/app/claude-md/edit.segments/!KGFwcCk/claude-md.segment.rsc +1 -1
- package/.next/server/app/claude-md/edit.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/claude-md/edit.segments/_full.segment.rsc +4 -4
- package/.next/server/app/claude-md/edit.segments/_head.segment.rsc +1 -1
- package/.next/server/app/claude-md/edit.segments/_index.segment.rsc +2 -2
- package/.next/server/app/claude-md/edit.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/claude-md.html +1 -1
- package/.next/server/app/claude-md.rsc +4 -4
- package/.next/server/app/claude-md.segments/!KGFwcCk/claude-md/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/claude-md.segments/!KGFwcCk/claude-md.segment.rsc +1 -1
- package/.next/server/app/claude-md.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/claude-md.segments/_full.segment.rsc +4 -4
- package/.next/server/app/claude-md.segments/_head.segment.rsc +1 -1
- package/.next/server/app/claude-md.segments/_index.segment.rsc +2 -2
- package/.next/server/app/claude-md.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/commands.html +1 -1
- package/.next/server/app/commands.rsc +4 -4
- package/.next/server/app/commands.segments/!KGFwcCk/commands/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/commands.segments/!KGFwcCk/commands.segment.rsc +1 -1
- package/.next/server/app/commands.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/commands.segments/_full.segment.rsc +4 -4
- package/.next/server/app/commands.segments/_head.segment.rsc +1 -1
- package/.next/server/app/commands.segments/_index.segment.rsc +2 -2
- package/.next/server/app/commands.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/hooks.html +1 -1
- package/.next/server/app/hooks.rsc +4 -4
- package/.next/server/app/hooks.segments/!KGFwcCk/hooks/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/hooks.segments/!KGFwcCk/hooks.segment.rsc +1 -1
- package/.next/server/app/hooks.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/hooks.segments/_full.segment.rsc +4 -4
- package/.next/server/app/hooks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/hooks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/hooks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/inbox.html +1 -1
- package/.next/server/app/inbox.rsc +4 -4
- package/.next/server/app/inbox.segments/!KGFwcCk/inbox/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/inbox.segments/!KGFwcCk/inbox.segment.rsc +1 -1
- package/.next/server/app/inbox.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/inbox.segments/_full.segment.rsc +4 -4
- package/.next/server/app/inbox.segments/_head.segment.rsc +1 -1
- package/.next/server/app/inbox.segments/_index.segment.rsc +2 -2
- package/.next/server/app/inbox.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +4 -4
- package/.next/server/app/index.segments/!KGFwcCk/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/jobs.html +1 -1
- package/.next/server/app/jobs.rsc +4 -4
- package/.next/server/app/jobs.segments/!KGFwcCk/jobs/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/jobs.segments/!KGFwcCk/jobs.segment.rsc +1 -1
- package/.next/server/app/jobs.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/jobs.segments/_full.segment.rsc +4 -4
- package/.next/server/app/jobs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/jobs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/jobs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page.js +2 -2
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +3 -3
- package/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/mcp-servers.html +1 -1
- package/.next/server/app/mcp-servers.rsc +4 -4
- package/.next/server/app/mcp-servers.segments/!KGFwcCk/mcp-servers/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/mcp-servers.segments/!KGFwcCk/mcp-servers.segment.rsc +1 -1
- package/.next/server/app/mcp-servers.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/mcp-servers.segments/_full.segment.rsc +4 -4
- package/.next/server/app/mcp-servers.segments/_head.segment.rsc +1 -1
- package/.next/server/app/mcp-servers.segments/_index.segment.rsc +2 -2
- package/.next/server/app/mcp-servers.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/plugins.html +1 -0
- package/.next/server/app/{changes.meta → plugins.meta} +3 -3
- package/.next/server/app/{changes.rsc → plugins.rsc} +4 -4
- package/.next/server/app/{files.segments/!KGFwcCk/files → plugins.segments/!KGFwcCk/plugins}/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/{changes.segments/!KGFwcCk/changes.segment.rsc → plugins.segments/!KGFwcCk/plugins.segment.rsc} +1 -1
- package/.next/server/app/{changes.segments → plugins.segments}/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/{changes.segments → plugins.segments}/_full.segment.rsc +4 -4
- package/.next/server/app/{changes.segments → plugins.segments}/_head.segment.rsc +1 -1
- package/.next/server/app/{files.segments → plugins.segments}/_index.segment.rsc +2 -2
- package/.next/server/app/{changes.segments → plugins.segments}/_tree.segment.rsc +2 -2
- package/.next/server/app/reviews.html +1 -1
- package/.next/server/app/reviews.rsc +4 -4
- package/.next/server/app/reviews.segments/!KGFwcCk/reviews/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/reviews.segments/!KGFwcCk/reviews.segment.rsc +1 -1
- package/.next/server/app/reviews.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/reviews.segments/_full.segment.rsc +4 -4
- package/.next/server/app/reviews.segments/_head.segment.rsc +1 -1
- package/.next/server/app/reviews.segments/_index.segment.rsc +2 -2
- package/.next/server/app/reviews.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/appearance.html +1 -1
- package/.next/server/app/settings/appearance.rsc +4 -4
- package/.next/server/app/settings/appearance.segments/!KGFwcCk/settings/appearance/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings/appearance.segments/!KGFwcCk/settings/appearance.segment.rsc +1 -1
- package/.next/server/app/settings/appearance.segments/!KGFwcCk/settings.segment.rsc +1 -1
- package/.next/server/app/settings/appearance.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/settings/appearance.segments/_full.segment.rsc +4 -4
- package/.next/server/app/settings/appearance.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/appearance.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/appearance.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/notifications.html +1 -1
- package/.next/server/app/settings/notifications.rsc +4 -4
- package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings/notifications/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings/notifications.segment.rsc +1 -1
- package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings.segment.rsc +1 -1
- package/.next/server/app/settings/notifications.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/settings/notifications.segments/_full.segment.rsc +4 -4
- package/.next/server/app/settings/notifications.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/notifications.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/notifications.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/providers/new.html +1 -1
- package/.next/server/app/settings/providers/new.rsc +4 -4
- package/.next/server/app/settings/providers/new.segments/!KGFwcCk/settings/providers/new/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings/providers/new.segments/!KGFwcCk/settings/providers/new.segment.rsc +1 -1
- package/.next/server/app/settings/providers/new.segments/!KGFwcCk/settings/providers.segment.rsc +1 -1
- package/.next/server/app/settings/providers/new.segments/!KGFwcCk/settings.segment.rsc +1 -1
- package/.next/server/app/settings/providers/new.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/settings/providers/new.segments/_full.segment.rsc +4 -4
- package/.next/server/app/settings/providers/new.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/providers/new.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/providers/new.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/providers.html +1 -1
- package/.next/server/app/settings/providers.rsc +4 -4
- package/.next/server/app/settings/providers.segments/!KGFwcCk/settings/providers/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings/providers.segments/!KGFwcCk/settings/providers.segment.rsc +1 -1
- package/.next/server/app/settings/providers.segments/!KGFwcCk/settings.segment.rsc +1 -1
- package/.next/server/app/settings/providers.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/settings/providers.segments/_full.segment.rsc +4 -4
- package/.next/server/app/settings/providers.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/providers.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/providers.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/session.html +1 -1
- package/.next/server/app/settings/session.rsc +4 -4
- package/.next/server/app/settings/session.segments/!KGFwcCk/settings/session/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings/session.segments/!KGFwcCk/settings/session.segment.rsc +1 -1
- package/.next/server/app/settings/session.segments/!KGFwcCk/settings.segment.rsc +1 -1
- package/.next/server/app/settings/session.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/settings/session.segments/_full.segment.rsc +4 -4
- package/.next/server/app/settings/session.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/session.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/session.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +4 -4
- package/.next/server/app/settings.segments/!KGFwcCk/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/!KGFwcCk/settings.segment.rsc +1 -1
- package/.next/server/app/settings.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_full.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/skills.html +1 -1
- package/.next/server/app/skills.rsc +4 -4
- package/.next/server/app/skills.segments/!KGFwcCk/skills/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/skills.segments/!KGFwcCk/skills.segment.rsc +1 -1
- package/.next/server/app/skills.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/skills.segments/_full.segment.rsc +4 -4
- package/.next/server/app/skills.segments/_head.segment.rsc +1 -1
- package/.next/server/app/skills.segments/_index.segment.rsc +2 -2
- package/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
- package/.next/server/app-paths-manifest.json +10 -2
- package/.next/server/chunks/1011.js +1 -1
- package/.next/server/chunks/1327.js +1 -1
- package/.next/server/chunks/1979.js +7 -2
- package/.next/server/chunks/2666.js +1 -0
- package/.next/server/chunks/3136.js +11 -0
- package/.next/server/chunks/319.js +45 -0
- package/.next/server/chunks/3445.js +2 -2
- package/.next/server/chunks/3764.js +1 -1
- package/.next/server/chunks/4053.js +4971 -0
- package/.next/server/chunks/4734.js +201 -0
- package/.next/server/chunks/5318.js +1 -1
- package/.next/server/chunks/5472.js +1 -1
- package/.next/server/chunks/6304.js +1 -1
- package/.next/server/chunks/6705.js +1 -1
- package/.next/server/chunks/7539.js +5 -0
- package/.next/server/chunks/7891.js +3 -0
- package/.next/server/chunks/8578.js +1 -1
- package/.next/server/chunks/8728.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/NTa6G91R3HtKCLYuQqdR0/_buildManifest.js +1 -0
- package/.next/static/chunks/12644.84908edd1bec8b5a.js +1 -0
- package/.next/static/chunks/14371-46bd93e838a73082.js +201 -0
- package/.next/static/chunks/1550-2b61396833da3dec.js +25 -0
- package/.next/static/chunks/18977.393a8bc1bef44fc4.js +1 -0
- package/.next/static/chunks/{2503.bb9d3528c3c7ccae.js → 2503.68e12779c4b14adb.js} +1 -1
- package/.next/static/chunks/{27455.1bce740b63d7c3cc.js → 27455.8f2189c777c63368.js} +1 -1
- package/.next/static/chunks/33072.3d32bb7b2a85ca9b.js +1 -0
- package/.next/static/chunks/39267.0c93a6bed8e46ac0.js +1 -0
- package/.next/static/chunks/52333.ff3bf0753b68875e.js +1 -0
- package/.next/static/chunks/69940.42e1ca99efc62caf.js +1 -0
- package/.next/static/chunks/70400.ffe0412efe741888.js +1 -0
- package/.next/static/chunks/7113.336a2a8deabe2aa5.js +1 -0
- package/.next/static/chunks/{71642.852436e8f0287b89.js → 71642.e11bcaa30efbf1f2.js} +1 -1
- package/.next/static/chunks/{72839.a5325a99f8c12fed.js → 72839.225c36dd5e767a20.js} +1 -1
- package/.next/static/chunks/{69427.a0b463c808aa54c8.js → 81272.b0027c9bc80050aa.js} +1 -1
- package/.next/static/chunks/85853.421f0c913b3d332b.js +1 -0
- package/.next/static/chunks/86155.3c5c1468fa2f446e.js +1 -0
- package/.next/static/chunks/86339.ba009abde9765665.js +1 -0
- package/.next/static/chunks/86939-ba1fb2321ef9cd80.js +1 -0
- package/.next/static/chunks/93794-b87eef7d177fe7b3.js +32 -0
- package/.next/static/chunks/989-6074551b2b54a168.js +3 -0
- package/.next/static/chunks/app/(app)/agents/[name]/page-2b04446e17990f1a.js +8 -0
- package/.next/static/chunks/app/(app)/agents/page-ba23fc2296a7be83.js +1 -0
- package/.next/static/chunks/app/(app)/claude-md/edit/page-a281913e0b8add64.js +1 -0
- package/.next/static/chunks/app/(app)/claude-md/{page-cd9e2176a12ba241.js → page-2d96e3554ef23d18.js} +1 -1
- package/.next/static/chunks/app/(app)/commands/[name]/page-fb34a46c0c086dab.js +6 -0
- package/.next/static/chunks/app/(app)/commands/page-3802984c62d8ac69.js +1 -0
- package/.next/static/chunks/app/(app)/hooks/[event]/{page-28038323fd29adfa.js → page-9481839e736408cb.js} +2 -2
- package/.next/static/chunks/app/(app)/hooks/page-f430735f702c7219.js +1 -0
- package/.next/static/chunks/app/(app)/inbox/[id]/page-aadeab885f4845b0.js +1 -0
- package/.next/static/chunks/app/(app)/inbox/page-b95594cb0a1a5cac.js +1 -0
- package/.next/static/chunks/app/(app)/jobs/[id]/edit/page-cc5a314765daff0b.js +1 -0
- package/.next/static/chunks/app/(app)/jobs/[id]/page-5890d22a832830ae.js +1 -0
- package/.next/static/chunks/app/(app)/jobs/[id]/runs/[runId]/page-0b99d3ca8a0db5a4.js +1 -0
- package/.next/static/chunks/app/(app)/jobs/page-3112e52c1cf2a1c6.js +1 -0
- package/.next/static/chunks/app/(app)/{layout-ce9e1be301c60fe5.js → layout-62bd7715bd974abb.js} +1 -1
- package/.next/static/chunks/app/(app)/mcp-servers/[name]/{page-d6d805a27ec0b0c0.js → page-c8586b1dc6f9824d.js} +1 -1
- package/.next/static/chunks/app/(app)/mcp-servers/page-bfc2a6ca8f7968c9.js +1 -0
- package/.next/static/chunks/app/(app)/page-7fa2e1ffac49c78b.js +1 -0
- package/.next/static/chunks/app/(app)/plugins/page-f37a96c5d3bd20a1.js +1 -0
- package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/[number]/page-9bdb676f496d53bd.js +13 -0
- package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/{page-c5fd013309ab3eba.js → page-200fefe31b935564.js} +1 -1
- package/.next/static/chunks/app/(app)/reviews/page-2b8118a506454063.js +1 -0
- package/.next/static/chunks/app/(app)/sessions/[id]/page-428e74d62712abe2.js +1 -0
- package/.next/static/chunks/app/(app)/settings/appearance/{page-95902da748ac5f1e.js → page-e2b21c857330b047.js} +1 -1
- package/.next/static/chunks/app/(app)/settings/notifications/page-4c4e5802b3993e7f.js +1 -0
- package/.next/static/chunks/app/(app)/settings/page-3c1d956c719f0160.js +1 -0
- package/.next/static/chunks/app/(app)/settings/providers/[id]/page-020f2eab5c3a93ee.js +1 -0
- package/.next/static/chunks/app/(app)/settings/providers/new/page-9010d32aeca78d7f.js +1 -0
- package/.next/static/chunks/app/(app)/settings/providers/page-d86ebcd6d1cb033d.js +1 -0
- package/.next/static/chunks/app/(app)/settings/session/page-174370077dbb9079.js +1 -0
- package/.next/static/chunks/app/(app)/skills/[name]/page-dfea5f58b95c01b6.js +6 -0
- package/.next/static/chunks/app/(app)/skills/page-c33dbb722dbdf826.js +1 -0
- package/.next/static/chunks/app/_global-error/page-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/agents/[name]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/agents/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/assistant-session/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/auth/check/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/auth/setup/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/auth/ws-token/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/btw/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/claude-md/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/commands/[name]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/commands/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/config/cwd/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/defaults/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/filesystem/browse/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/filesystem/files/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/filesystem/mkdir/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/filesystem/read/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/git/clone/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/git/commit/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/git/discard/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/git/generate-message/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/git/push/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/github/file-content/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/github/orgs/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/github/prs/checks/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/github/prs/diff/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/github/prs/review/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/github/prs/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/github/prs/view/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/github/repos/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/github/review-session/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/health/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/hooks/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/inbox/[id]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/inbox/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/transcript/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/runs/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/stop/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/trigger/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/jobs/mcp-discover/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/jobs/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/jobs/status/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/mcp-servers/[name]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/mcp-servers/[name]/test/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/mcp-servers/[name]/tools/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/mcp-servers/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/notifications/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/notifications/test/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/plugins/[id]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/plugins/install/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/plugins/marketplaces/[name]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/plugins/marketplaces/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/providers/[id]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/providers/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/reviews/pinned/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/mcp/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/search/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/tabs/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/bulk-delete/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/by-ids/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/group/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/pinned/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/search/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/sessions/thinking/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/skills/[name]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/skills/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/terminal/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/usage/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/version/changelog/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/version/cockpit/changelog/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/version/cockpit/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/app/api/version/route-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/{framework-6fd9f138158c42e0.js → framework-45a1aae1a0f575fd.js} +1 -1
- package/.next/static/chunks/{main-5dac9bfffcc23702.js → main-eb9ff0b73c75808a.js} +3 -3
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-bf8153dffcb47d46.js +1 -0
- package/.next/static/chunks/webpack-76a545b642140725.js +1 -0
- package/.next/static/css/4cc7360c7e3ca504.css +1 -0
- package/README.md +2 -2
- package/dist/server.js +10 -0
- package/dist/src/lib/cli-commands.js +147 -0
- package/dist/src/lib/models.js +57 -1
- package/dist/src/lib/paste-detect.js +161 -0
- package/dist/src/server/assistant-settings.js +35 -0
- package/dist/src/server/claude-bin.js +32 -0
- package/dist/src/server/claude-settings.js +3 -0
- package/dist/src/server/cli-init-fetch.js +6 -1
- package/dist/src/server/inbox.js +2 -2
- package/dist/src/server/job-scheduler.js +146 -4
- package/dist/src/server/job-storage.js +33 -0
- package/dist/src/server/mcp/cockpit-agent-prompt.js +5 -0
- package/dist/src/server/mcp/cockpit-config-server.js +632 -0
- package/dist/src/server/mcp/run-context.js +23 -0
- package/dist/src/server/notifications.js +51 -10
- package/dist/src/server/plugins.js +103 -0
- package/dist/src/server/providers.js +25 -2
- package/dist/src/server/pty-runtime.js +113 -3
- package/dist/src/server/pty-session.js +7 -4
- package/dist/src/server/session-manager.js +394 -116
- package/dist/src/server/singleton.js +9 -0
- package/dist/src/server/terminal-buffer.js +17 -0
- package/dist/src/server/terminal-manager.js +9 -13
- package/dist/src/server/transcript.js +65 -27
- package/dist/src/server/ws-handler.js +19 -7
- package/next.config.ts +1 -0
- package/package.json +3 -2
- package/.next/server/app/(app)/changes/page.js +0 -2
- package/.next/server/app/(app)/changes/page.js.nft.json +0 -1
- package/.next/server/app/(app)/changes/page_client-reference-manifest.js +0 -1
- package/.next/server/app/(app)/files/page.js +0 -2
- package/.next/server/app/(app)/files/page_client-reference-manifest.js +0 -1
- package/.next/server/app/changes.html +0 -1
- package/.next/server/app/changes.segments/!KGFwcCk/changes/__PAGE__.segment.rsc +0 -9
- package/.next/server/app/changes.segments/_index.segment.rsc +0 -5
- package/.next/server/app/files.html +0 -1
- package/.next/server/app/files.meta +0 -16
- package/.next/server/app/files.rsc +0 -23
- package/.next/server/app/files.segments/!KGFwcCk/files.segment.rsc +0 -5
- package/.next/server/app/files.segments/!KGFwcCk.segment.rsc +0 -7
- package/.next/server/app/files.segments/_full.segment.rsc +0 -23
- package/.next/server/app/files.segments/_head.segment.rsc +0 -6
- package/.next/server/app/files.segments/_tree.segment.rsc +0 -2
- package/.next/server/chunks/3006.js +0 -199
- package/.next/server/chunks/4342.js +0 -1
- package/.next/server/chunks/4352.js +0 -1
- package/.next/server/chunks/4445.js +0 -1
- package/.next/server/chunks/63.js +0 -45
- package/.next/server/chunks/7782.js +0 -6
- package/.next/server/chunks/8148.js +0 -1
- package/.next/server/chunks/9599.js +0 -11
- package/.next/static/I-rxZaJEzhe3ZUTjSqB11/_buildManifest.js +0 -1
- package/.next/static/chunks/18977.a98edaf19c6df2d4.js +0 -1
- package/.next/static/chunks/26126-97874904b42befb8.js +0 -1
- package/.next/static/chunks/31010-6e87f77b97544424.js +0 -1
- package/.next/static/chunks/33072.9c3cd19e8d515dea.js +0 -1
- package/.next/static/chunks/3765-d323c6675307a63e.js +0 -20
- package/.next/static/chunks/39267.ef60669ade47cf4c.js +0 -1
- package/.next/static/chunks/41487-d802643f4a8fad3c.js +0 -199
- package/.next/static/chunks/48273-fb393846bb4333c0.js +0 -6
- package/.next/static/chunks/52333.f98d1cca9a127b34.js +0 -1
- package/.next/static/chunks/6935-f436a624267529fb.js +0 -1
- package/.next/static/chunks/70400.1816c247ad90f9bc.js +0 -1
- package/.next/static/chunks/7113.39704408fef3d26e.js +0 -1
- package/.next/static/chunks/85853.39872899093b140a.js +0 -1
- package/.next/static/chunks/86155.40f687f9aaa13854.js +0 -1
- package/.next/static/chunks/86339.4dbd51a9b9871f65.js +0 -1
- package/.next/static/chunks/86939-dfc6f8eb395caa89.js +0 -1
- package/.next/static/chunks/93794-5f89a674d8cefcff.js +0 -32
- package/.next/static/chunks/989-94bf2b9d242776c3.js +0 -3
- package/.next/static/chunks/app/(app)/agents/[name]/page-8bdd0359043537d4.js +0 -8
- package/.next/static/chunks/app/(app)/agents/page-6fcfd7ab6781814e.js +0 -1
- package/.next/static/chunks/app/(app)/changes/page-4549a5bd72d77e3e.js +0 -1
- package/.next/static/chunks/app/(app)/claude-md/edit/page-08e6e120e71979f4.js +0 -1
- package/.next/static/chunks/app/(app)/commands/[name]/page-7cdfdef29ded0aa0.js +0 -6
- package/.next/static/chunks/app/(app)/commands/page-f126b608b04747ac.js +0 -1
- package/.next/static/chunks/app/(app)/files/page-f526eb95821e000e.js +0 -1
- package/.next/static/chunks/app/(app)/hooks/page-f1f39284e53c0344.js +0 -1
- package/.next/static/chunks/app/(app)/inbox/[id]/page-bc1ff3a0db0114a4.js +0 -1
- package/.next/static/chunks/app/(app)/inbox/page-82e03870103ce9bd.js +0 -1
- package/.next/static/chunks/app/(app)/jobs/[id]/edit/page-7fb788f772ff2129.js +0 -1
- package/.next/static/chunks/app/(app)/jobs/[id]/page-a5856b9ae967ff59.js +0 -1
- package/.next/static/chunks/app/(app)/jobs/[id]/runs/[runId]/page-b7c513402db11db6.js +0 -1
- package/.next/static/chunks/app/(app)/jobs/page-e9bbd6c116b9699f.js +0 -1
- package/.next/static/chunks/app/(app)/mcp-servers/page-4b7276d43451cd43.js +0 -1
- package/.next/static/chunks/app/(app)/page-027a5382da30ddb9.js +0 -1
- package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/[number]/page-9ab2955c455bb5fa.js +0 -13
- package/.next/static/chunks/app/(app)/reviews/page-47530d93bb9d4a76.js +0 -1
- package/.next/static/chunks/app/(app)/sessions/[id]/page-94f891e1b54fd05f.js +0 -1
- package/.next/static/chunks/app/(app)/settings/notifications/page-229f1db6beb1d19c.js +0 -1
- package/.next/static/chunks/app/(app)/settings/page-8ed16a66fdde10cd.js +0 -1
- package/.next/static/chunks/app/(app)/settings/providers/[id]/page-13654263246617b3.js +0 -1
- package/.next/static/chunks/app/(app)/settings/providers/new/page-e1798e321ccbc6df.js +0 -1
- package/.next/static/chunks/app/(app)/settings/providers/page-0bb4c1db2ee35b3d.js +0 -1
- package/.next/static/chunks/app/(app)/settings/session/page-ab216a8fa37a0f76.js +0 -1
- package/.next/static/chunks/app/(app)/skills/[name]/page-8ab85d5090967ee4.js +0 -6
- package/.next/static/chunks/app/(app)/skills/page-c52773eacb27c04e.js +0 -1
- package/.next/static/chunks/app/_global-error/page-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/agents/[name]/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/agents/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/auth/check/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/auth/setup/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/auth/ws-token/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/btw/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/claude-md/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/commands/[name]/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/commands/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/defaults/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/filesystem/browse/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/filesystem/files/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/filesystem/mkdir/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/filesystem/read/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/git/clone/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/git/commit/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/git/discard/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/git/generate-message/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/git/push/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/github/file-content/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/github/orgs/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/github/prs/checks/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/github/prs/diff/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/github/prs/review/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/github/prs/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/github/prs/view/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/github/repos/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/github/review-session/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/health/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/hooks/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/inbox/[id]/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/inbox/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/jobs/[id]/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/transcript/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/jobs/[id]/runs/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/jobs/[id]/trigger/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/jobs/mcp-discover/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/jobs/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/jobs/status/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/mcp-servers/[name]/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/mcp-servers/[name]/test/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/mcp-servers/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/notifications/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/notifications/test/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/providers/[id]/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/providers/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/reviews/pinned/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/mcp/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/search/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/tabs/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/bulk-delete/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/by-ids/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/group/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/pinned/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/search/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/sessions/thinking/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/skills/[name]/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/skills/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/terminal/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/usage/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/version/changelog/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/version/cockpit/changelog/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/version/cockpit/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/app/api/version/route-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-fc747760bd4c8a4b.js +0 -1
- package/.next/static/chunks/webpack-e31bb45fa59caed8.js +0 -1
- package/.next/static/css/3f8af4ae6f812d5c.css +0 -1
- /package/.next/static/{I-rxZaJEzhe3ZUTjSqB11 → NTa6G91R3HtKCLYuQqdR0}/_ssgManifest.js +0 -0
|
@@ -4,17 +4,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SessionManager = void 0;
|
|
7
|
+
exports.buildMcpConfigArg = buildMcpConfigArg;
|
|
7
8
|
const node_child_process_1 = require("node:child_process");
|
|
9
|
+
const node_crypto_1 = require("node:crypto");
|
|
8
10
|
const node_events_1 = require("node:events");
|
|
9
11
|
const node_fs_1 = require("node:fs");
|
|
12
|
+
const node_os_1 = require("node:os");
|
|
10
13
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
14
|
const uuid_1 = require("uuid");
|
|
15
|
+
const cli_commands_1 = require("../lib/cli-commands");
|
|
12
16
|
const models_1 = require("../lib/models");
|
|
17
|
+
const assistant_settings_1 = require("../server/assistant-settings");
|
|
18
|
+
const claude_bin_1 = require("../server/claude-bin");
|
|
13
19
|
const paths_1 = require("../server/paths");
|
|
14
20
|
const providers_1 = require("../server/providers");
|
|
15
21
|
const debug_logger_1 = require("./debug-logger");
|
|
16
22
|
const defaults_1 = require("./defaults");
|
|
17
23
|
const event_parser_1 = require("./event-parser");
|
|
24
|
+
const job_storage_1 = require("./job-storage");
|
|
25
|
+
const cockpit_agent_prompt_1 = require("./mcp/cockpit-agent-prompt");
|
|
26
|
+
const run_context_1 = require("./mcp/run-context");
|
|
18
27
|
const plans_1 = require("./plans");
|
|
19
28
|
const pty_runtime_1 = require("./pty-runtime");
|
|
20
29
|
const session_prefs_1 = require("./session-prefs");
|
|
@@ -26,19 +35,6 @@ const transcript_watcher_1 = require("./transcript-watcher");
|
|
|
26
35
|
function defaultRuntime() {
|
|
27
36
|
return "stream";
|
|
28
37
|
}
|
|
29
|
-
let resolvedClaudeBin = null;
|
|
30
|
-
function getClaudeBin() {
|
|
31
|
-
if (resolvedClaudeBin)
|
|
32
|
-
return resolvedClaudeBin;
|
|
33
|
-
const cmd = process.platform === "win32" ? "where" : "which";
|
|
34
|
-
try {
|
|
35
|
-
resolvedClaudeBin = (0, node_child_process_1.execFileSync)(cmd, ["claude"], { encoding: "utf-8" }).trim().split("\n")[0];
|
|
36
|
-
}
|
|
37
|
-
catch {
|
|
38
|
-
resolvedClaudeBin = "claude";
|
|
39
|
-
}
|
|
40
|
-
return resolvedClaudeBin;
|
|
41
|
-
}
|
|
42
38
|
const smLog = (sessionId, msg) => {
|
|
43
39
|
if (!(0, debug_logger_1.isDebugEnabled)())
|
|
44
40
|
return;
|
|
@@ -46,8 +42,25 @@ const smLog = (sessionId, msg) => {
|
|
|
46
42
|
const short = sessionId.slice(0, 8);
|
|
47
43
|
console.log(`[session:${short}] ${ts} ${msg}`);
|
|
48
44
|
};
|
|
45
|
+
function buildMcpConfigArg(url, token) {
|
|
46
|
+
const dir = node_path_1.default.join((0, node_os_1.tmpdir)(), "cockpit-mcp-config");
|
|
47
|
+
(0, node_fs_1.mkdirSync)(dir, { recursive: true });
|
|
48
|
+
const filePath = node_path_1.default.join(dir, `${token.slice(0, 16)}.json`);
|
|
49
|
+
const config = {
|
|
50
|
+
mcpServers: {
|
|
51
|
+
"cockpit-config": {
|
|
52
|
+
type: "http",
|
|
53
|
+
url: `${url}/mcp`,
|
|
54
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
(0, node_fs_1.writeFileSync)(filePath, JSON.stringify(config, null, 2), { mode: 0o600 });
|
|
59
|
+
return { path: filePath };
|
|
60
|
+
}
|
|
49
61
|
class SessionManager {
|
|
50
62
|
sessions = new Map();
|
|
63
|
+
_cockpitAgentSessionPromise = null;
|
|
51
64
|
constructor() {
|
|
52
65
|
// Periodically check for sessions stuck in "running" with a dead process
|
|
53
66
|
setInterval(() => {
|
|
@@ -55,7 +68,11 @@ class SessionManager {
|
|
|
55
68
|
if (session.info.status === "running" && !session.process && !session.ptyRuntime?.isAlive) {
|
|
56
69
|
const short = id.slice(0, 8);
|
|
57
70
|
(0, debug_logger_1.debugLog)(`[session:${short}] stale check: status=running but no live process, correcting to idle`);
|
|
58
|
-
(0, debug_logger_1.logDiag)(id, "idle:stale-check"
|
|
71
|
+
(0, debug_logger_1.logDiag)(id, "idle:stale-check", {
|
|
72
|
+
runtime: session.runtime,
|
|
73
|
+
spawning: session.spawning ?? false,
|
|
74
|
+
hasPtyRuntime: !!session.ptyRuntime,
|
|
75
|
+
});
|
|
59
76
|
session.info.status = "idle";
|
|
60
77
|
session.emitter.emit("status", id, "idle");
|
|
61
78
|
}
|
|
@@ -67,10 +84,12 @@ class SessionManager {
|
|
|
67
84
|
const now = Date.now();
|
|
68
85
|
const defaults = (0, defaults_1.getDefaults)();
|
|
69
86
|
const modelSlots = { main: defaults.modelSlots.main ?? "sonnet" };
|
|
87
|
+
const isCockpitAgent = options?.cockpitAgent === true;
|
|
70
88
|
const rt = options?.runtime ?? defaultRuntime();
|
|
89
|
+
const sessionName = isCockpitAgent ? "Cockpit Assistant" : name || node_path_1.default.basename(cwd) || cwd;
|
|
71
90
|
const info = {
|
|
72
91
|
id,
|
|
73
|
-
name:
|
|
92
|
+
name: sessionName,
|
|
74
93
|
cwd,
|
|
75
94
|
createdAt: now,
|
|
76
95
|
lastActiveAt: now,
|
|
@@ -85,10 +104,9 @@ class SessionManager {
|
|
|
85
104
|
process: null,
|
|
86
105
|
stdin: null,
|
|
87
106
|
emitter: new node_events_1.EventEmitter(),
|
|
88
|
-
hasSpawnedBefore: false,
|
|
89
107
|
cliSessionId: id,
|
|
90
108
|
previousCliSessionIds: [],
|
|
91
|
-
bypassAllPermissions: options?.bypassPermissions ?? defaults.bypassAllPermissions,
|
|
109
|
+
bypassAllPermissions: isCockpitAgent ? false : (options?.bypassPermissions ?? defaults.bypassAllPermissions),
|
|
92
110
|
planMode: false,
|
|
93
111
|
needsRespawnForPermissions: false,
|
|
94
112
|
compacting: false,
|
|
@@ -114,16 +132,49 @@ class SessionManager {
|
|
|
114
132
|
todoWatcher: null,
|
|
115
133
|
attachmentPaths: [],
|
|
116
134
|
totalTokens: { input: 0, output: 0, cacheCreate: 0, cacheRead: 0 },
|
|
135
|
+
cockpitAgent: isCockpitAgent,
|
|
136
|
+
cockpitAgentCleanups: [],
|
|
117
137
|
});
|
|
118
|
-
(0, session_prefs_1.setSessionPrefs)(id, { runtime: rt });
|
|
138
|
+
(0, session_prefs_1.setSessionPrefs)(id, { runtime: rt, ...(isCockpitAgent ? { cockpitAgent: true } : {}) });
|
|
139
|
+
if (isCockpitAgent) {
|
|
140
|
+
this.registerCockpitAgentOnInit(id);
|
|
141
|
+
}
|
|
119
142
|
return info;
|
|
120
143
|
}
|
|
121
|
-
|
|
144
|
+
registerCockpitAgentOnInit(id) {
|
|
145
|
+
const session = this.sessions.get(id);
|
|
146
|
+
if (!session)
|
|
147
|
+
return; // TypeScript narrows to Session below; push is safe
|
|
148
|
+
const cleanup = this.onInit(id, async (data) => {
|
|
149
|
+
for (const server of data.mcpServers) {
|
|
150
|
+
if (server.name !== "cockpit-config" && server.status !== "disabled") {
|
|
151
|
+
try {
|
|
152
|
+
await this.mcpToggle(id, server.name, false);
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
// best effort — server may not be started yet
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
if (cleanup) {
|
|
161
|
+
session.cockpitAgentCleanups.push(cleanup); // destroySession iterates this to unsubscribe
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
console.warn(`[cockpit-agent] onInit returned null for session ${id.slice(0, 8)}`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
ensureSession(id, cwd, opts) {
|
|
122
168
|
let session = this.sessions.get(id);
|
|
123
169
|
if (!session) {
|
|
124
170
|
const prefs = (0, session_prefs_1.getSessionPrefs)(id);
|
|
125
|
-
|
|
126
|
-
|
|
171
|
+
// pinCliSessionId forces the session to resume an exact transcript link
|
|
172
|
+
// (history-view continue), with that link's ancestors as the stitch chain,
|
|
173
|
+
// overriding the usual "resolve to the chain head" behaviour.
|
|
174
|
+
const cliId = opts?.pinCliSessionId || prefs?.cliSessionId || id;
|
|
175
|
+
const prevIds = opts?.pinCliSessionId
|
|
176
|
+
? ((0, session_prefs_1.findChainForCliSession)(opts.pinCliSessionId)?.truncatedPrevIds ?? [])
|
|
177
|
+
: prefs?.previousCliSessionIds || [];
|
|
127
178
|
const short = id.slice(0, 8);
|
|
128
179
|
(0, debug_logger_1.debugLog)(`[session:${short}] ensureSession: cliSessionId=${cliId.slice(0, 8)}, prevIds=[${prevIds.map((p) => p.slice(0, 8)).join(",")}], hasPrefs=${!!prefs}`);
|
|
129
180
|
const defaults = (0, defaults_1.getDefaults)();
|
|
@@ -147,10 +198,9 @@ class SessionManager {
|
|
|
147
198
|
process: null,
|
|
148
199
|
stdin: null,
|
|
149
200
|
emitter: new node_events_1.EventEmitter(),
|
|
150
|
-
hasSpawnedBefore: true,
|
|
151
201
|
cliSessionId: cliId,
|
|
152
202
|
previousCliSessionIds: prevIds,
|
|
153
|
-
bypassAllPermissions: prefs?.bypassAllPermissions ?? defaults.bypassAllPermissions,
|
|
203
|
+
bypassAllPermissions: (prefs?.cockpitAgent ? false : prefs?.bypassAllPermissions) ?? defaults.bypassAllPermissions,
|
|
154
204
|
planMode: prefs?.planMode ?? false,
|
|
155
205
|
pendingPlanReminder: prefs?.planMode ?? false,
|
|
156
206
|
needsRespawnForPermissions: false,
|
|
@@ -180,11 +230,69 @@ class SessionManager {
|
|
|
180
230
|
todoWatcher: null,
|
|
181
231
|
attachmentPaths: [],
|
|
182
232
|
totalTokens: { input: 0, output: 0, cacheCreate: 0, cacheRead: 0 },
|
|
233
|
+
cockpitAgent: prefs?.cockpitAgent ?? false,
|
|
234
|
+
cockpitAgentCleanups: [],
|
|
183
235
|
};
|
|
184
236
|
this.sessions.set(id, session);
|
|
237
|
+
if (prefs?.cockpitAgent) {
|
|
238
|
+
this.registerCockpitAgentOnInit(id);
|
|
239
|
+
}
|
|
185
240
|
}
|
|
186
241
|
return session;
|
|
187
242
|
}
|
|
243
|
+
async getOrCreateCockpitAgentSession() {
|
|
244
|
+
// Fast path: the session is already live in memory (the common case once the
|
|
245
|
+
// modal has been opened this server lifetime). Returns synchronously.
|
|
246
|
+
const stored = (0, assistant_settings_1.getAssistantSettings)().sessionId;
|
|
247
|
+
if (stored && this.sessions.has(stored))
|
|
248
|
+
return stored;
|
|
249
|
+
// Slow path: restore-from-disk or create-new. There is no `await` between the
|
|
250
|
+
// null-check and the assignment below, so the first caller sets the promise
|
|
251
|
+
// before any other caller can run; every concurrent first-open then awaits
|
|
252
|
+
// that same single execution. The finally clears it for the next miss.
|
|
253
|
+
if (!this._cockpitAgentSessionPromise) {
|
|
254
|
+
this._cockpitAgentSessionPromise = this._resolveOrCreateCockpitAgentSession().finally(() => {
|
|
255
|
+
this._cockpitAgentSessionPromise = null;
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
return this._cockpitAgentSessionPromise;
|
|
259
|
+
}
|
|
260
|
+
async _resolveOrCreateCockpitAgentSession() {
|
|
261
|
+
const settings = (0, assistant_settings_1.getAssistantSettings)();
|
|
262
|
+
const stored = settings.sessionId;
|
|
263
|
+
if (stored) {
|
|
264
|
+
if (this.sessions.has(stored))
|
|
265
|
+
return stored; // restored by an earlier caller
|
|
266
|
+
const prefs = (0, session_prefs_1.getSessionPrefs)(stored);
|
|
267
|
+
// Only restore a stored id that is genuinely a cockpit agent session. A
|
|
268
|
+
// pointer to a regular session (e.g. a hand-edited assistant.json) must not
|
|
269
|
+
// be rehydrated here — it would lack the MCP-disable/permission restrictions.
|
|
270
|
+
if (prefs?.cockpitAgent) {
|
|
271
|
+
// The assistant's cwd is always getCockpitDir(); fall back to it when no
|
|
272
|
+
// transcript exists yet (the assistant was changed but never messaged) so
|
|
273
|
+
// its model/thinking still restore from session-prefs instead of the
|
|
274
|
+
// session being recreated from the assistant.json fallback (Sonnet/High).
|
|
275
|
+
const cwd = (await (0, transcript_1.findSessionCwd)(prefs.cliSessionId || stored)) ?? (await (0, transcript_1.findSessionCwd)(stored)) ?? (0, paths_1.getCockpitDir)();
|
|
276
|
+
// ensureSession rebuilds in-memory state and (Step 5) registers the MCP-disable
|
|
277
|
+
// onInit listener. Model/thinking are restored from session-prefs — which the
|
|
278
|
+
// in-modal selector keeps current — so no re-apply is needed here.
|
|
279
|
+
this.ensureSession(stored, cwd);
|
|
280
|
+
return stored;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
// No stored id, or its transcript is gone — create a fresh session seeded from
|
|
284
|
+
// assistant.json. createSession is synchronous (this.sessions.set before return).
|
|
285
|
+
const info = this.createSession((0, paths_1.getCockpitDir)(), undefined, {
|
|
286
|
+
cockpitAgent: true,
|
|
287
|
+
runtime: settings.runtime,
|
|
288
|
+
});
|
|
289
|
+
if (settings.model)
|
|
290
|
+
this.setModel(info.id, settings.model, settings.contextSize);
|
|
291
|
+
if (settings.thinkingLevel)
|
|
292
|
+
this.setThinkingLevel(info.id, settings.thinkingLevel);
|
|
293
|
+
(0, assistant_settings_1.updateAssistantSettings)({ sessionId: info.id });
|
|
294
|
+
return info.id;
|
|
295
|
+
}
|
|
188
296
|
async getSession(id) {
|
|
189
297
|
let session = this.sessions.get(id);
|
|
190
298
|
if (!session) {
|
|
@@ -507,9 +615,6 @@ class SessionManager {
|
|
|
507
615
|
return false;
|
|
508
616
|
}
|
|
509
617
|
this.killProcess(session);
|
|
510
|
-
if (!(0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd)) {
|
|
511
|
-
session.hasSpawnedBefore = false;
|
|
512
|
-
}
|
|
513
618
|
session.pendingRequests.clear();
|
|
514
619
|
this.notifyPendingChanged(session, sessionId);
|
|
515
620
|
session.streamingSnapshot = null;
|
|
@@ -540,6 +645,24 @@ class SessionManager {
|
|
|
540
645
|
session.todoWatcher = null;
|
|
541
646
|
}
|
|
542
647
|
this.cleanupAttachments(session);
|
|
648
|
+
for (const cleanup of session.cockpitAgentCleanups) {
|
|
649
|
+
try {
|
|
650
|
+
cleanup();
|
|
651
|
+
}
|
|
652
|
+
catch {
|
|
653
|
+
/* best effort */
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
if (session.mcpToken) {
|
|
657
|
+
(0, run_context_1.clearToken)(session.mcpToken);
|
|
658
|
+
const configPath = node_path_1.default.join((0, node_os_1.tmpdir)(), "cockpit-mcp-config", `${session.mcpToken.slice(0, 16)}.json`);
|
|
659
|
+
try {
|
|
660
|
+
(0, node_fs_1.unlinkSync)(configPath);
|
|
661
|
+
}
|
|
662
|
+
catch {
|
|
663
|
+
/* best effort */
|
|
664
|
+
}
|
|
665
|
+
}
|
|
543
666
|
session.emitter.removeAllListeners();
|
|
544
667
|
this.sessions.delete(id);
|
|
545
668
|
return true;
|
|
@@ -734,7 +857,7 @@ class SessionManager {
|
|
|
734
857
|
}
|
|
735
858
|
setBypassAllPermissions(sessionId) {
|
|
736
859
|
const session = this.sessions.get(sessionId);
|
|
737
|
-
if (!session || session.bypassAllPermissions)
|
|
860
|
+
if (!session || session.bypassAllPermissions || session.cockpitAgent)
|
|
738
861
|
return;
|
|
739
862
|
session.bypassAllPermissions = true;
|
|
740
863
|
(0, session_prefs_1.setSessionPrefs)(sessionId, { bypassAllPermissions: true });
|
|
@@ -766,7 +889,6 @@ class SessionManager {
|
|
|
766
889
|
return;
|
|
767
890
|
if (session.info.status === "idle") {
|
|
768
891
|
this.killProcess(session);
|
|
769
|
-
session.hasSpawnedBefore = (0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd);
|
|
770
892
|
}
|
|
771
893
|
else {
|
|
772
894
|
session.needsRespawnForPermissions = true;
|
|
@@ -864,6 +986,8 @@ class SessionManager {
|
|
|
864
986
|
const levels = this.modelEffortLevels(model);
|
|
865
987
|
if (levels.length === 0)
|
|
866
988
|
return null;
|
|
989
|
+
if (session.thinkingLevel === "off")
|
|
990
|
+
return "off";
|
|
867
991
|
if (levels.includes(session.thinkingLevel))
|
|
868
992
|
return session.thinkingLevel;
|
|
869
993
|
return levels[levels.length - 1];
|
|
@@ -886,7 +1010,7 @@ class SessionManager {
|
|
|
886
1010
|
const effortRequest = {
|
|
887
1011
|
type: "control_request",
|
|
888
1012
|
request_id: `effort-${Date.now()}`,
|
|
889
|
-
request: { subtype: "apply_flag_settings", settings:
|
|
1013
|
+
request: { subtype: "apply_flag_settings", settings: this.thinkingFlagSettings(session.thinkingLevel) },
|
|
890
1014
|
};
|
|
891
1015
|
session.stdin.write(JSON.stringify(effortRequest) + "\n");
|
|
892
1016
|
}
|
|
@@ -894,9 +1018,6 @@ class SessionManager {
|
|
|
894
1018
|
else {
|
|
895
1019
|
this.log(sessionId, `setModel: killing process (hasStdin=${!!session.stdin}, contextChanged=${contextChanged})`);
|
|
896
1020
|
this.killProcess(session);
|
|
897
|
-
if (!(0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd)) {
|
|
898
|
-
session.hasSpawnedBefore = false;
|
|
899
|
-
}
|
|
900
1021
|
session.queuedMessages.length = 0;
|
|
901
1022
|
session.queuePaused = false;
|
|
902
1023
|
session.info.status = "idle";
|
|
@@ -934,6 +1055,14 @@ class SessionManager {
|
|
|
934
1055
|
getModel(sessionId) {
|
|
935
1056
|
return this.sessions.get(sessionId)?.info.model || "sonnet";
|
|
936
1057
|
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Settings patch for the CLI's apply_flag_settings / settings file. "off"
|
|
1060
|
+
* disables thinking via alwaysThinkingEnabled (there is no --effort value for
|
|
1061
|
+
* it); any other level sets effort and ensures thinking is enabled.
|
|
1062
|
+
*/
|
|
1063
|
+
thinkingFlagSettings(level) {
|
|
1064
|
+
return level === "off" ? { alwaysThinkingEnabled: false } : { effort: level, alwaysThinkingEnabled: true };
|
|
1065
|
+
}
|
|
937
1066
|
setThinkingLevel(sessionId, level) {
|
|
938
1067
|
const session = this.sessions.get(sessionId);
|
|
939
1068
|
if (!session || session.thinkingLevel === level)
|
|
@@ -945,7 +1074,7 @@ class SessionManager {
|
|
|
945
1074
|
const request = {
|
|
946
1075
|
type: "control_request",
|
|
947
1076
|
request_id: `effort-${Date.now()}`,
|
|
948
|
-
request: { subtype: "apply_flag_settings", settings:
|
|
1077
|
+
request: { subtype: "apply_flag_settings", settings: this.thinkingFlagSettings(level) },
|
|
949
1078
|
};
|
|
950
1079
|
session.stdin.write(JSON.stringify(request) + "\n");
|
|
951
1080
|
}
|
|
@@ -1176,9 +1305,13 @@ class SessionManager {
|
|
|
1176
1305
|
return;
|
|
1177
1306
|
const u = raw.message.usage;
|
|
1178
1307
|
const used = (u.input_tokens || 0) + (u.cache_creation_input_tokens || 0) + (u.cache_read_input_tokens || 0);
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1308
|
+
// Only move the gauge on a real reading. An interrupted/cancelled turn
|
|
1309
|
+
// emits an all-zero usage block; setting it would wipe the gauge to 0.
|
|
1310
|
+
if (used > 0) {
|
|
1311
|
+
const usage = { used, total: session.contextWindowSize };
|
|
1312
|
+
session.contextUsage = usage;
|
|
1313
|
+
session.emitter.emit("usage", sessionId, usage);
|
|
1314
|
+
}
|
|
1182
1315
|
session.totalTokens.input += u.input_tokens || 0;
|
|
1183
1316
|
session.totalTokens.output += u.output_tokens || 0;
|
|
1184
1317
|
session.totalTokens.cacheCreate += u.cache_creation_input_tokens || 0;
|
|
@@ -1237,6 +1370,10 @@ class SessionManager {
|
|
|
1237
1370
|
session.ptyRuntime = null;
|
|
1238
1371
|
runtime.kill().catch(() => { });
|
|
1239
1372
|
}
|
|
1373
|
+
// A kill ends any in-flight spawn, so clear the ensureProcess guard now. A
|
|
1374
|
+
// deliberate kill-then-respawn (settings change, /clear, restart) must not
|
|
1375
|
+
// be blocked until the dying runtime's start() promise happens to settle.
|
|
1376
|
+
session.spawning = false;
|
|
1240
1377
|
session.compacting = false;
|
|
1241
1378
|
}
|
|
1242
1379
|
emitSystem(session, sessionId, text) {
|
|
@@ -1329,6 +1466,47 @@ class SessionManager {
|
|
|
1329
1466
|
else if (pa.type === "auto_deny") {
|
|
1330
1467
|
this.respondToPermission(sessionId, pa.requestId, false, undefined, undefined, pa.denyReason);
|
|
1331
1468
|
}
|
|
1469
|
+
else if (session.cockpitAgent && pa.toolName !== "AskUserQuestion") {
|
|
1470
|
+
const tool = pa.toolName;
|
|
1471
|
+
const isReadOnlyBuiltin = ["Read", "Grep", "Glob"].includes(tool);
|
|
1472
|
+
const cockpitPrefix = "mcp__cockpit-config__";
|
|
1473
|
+
const isCockpitTool = tool.startsWith(cockpitPrefix);
|
|
1474
|
+
const cockpitAction = isCockpitTool ? tool.slice(cockpitPrefix.length).split("_")[0] : "";
|
|
1475
|
+
const isCockpitRead = isCockpitTool && (cockpitAction === "list" || cockpitAction === "get");
|
|
1476
|
+
const isCockpitWrite = isCockpitTool && !isCockpitRead;
|
|
1477
|
+
(0, debug_logger_1.logDiag)(sessionId, "cockpit-agent:permission", {
|
|
1478
|
+
toolName: tool,
|
|
1479
|
+
decision: isReadOnlyBuiltin || isCockpitRead ? "auto_approve" : isCockpitWrite ? "proposal" : "auto_deny",
|
|
1480
|
+
});
|
|
1481
|
+
if (isReadOnlyBuiltin || isCockpitRead) {
|
|
1482
|
+
this.respondToPermission(sessionId, pa.requestId, true, pa.rawToolInput);
|
|
1483
|
+
}
|
|
1484
|
+
else if (isCockpitWrite) {
|
|
1485
|
+
const suffix = tool.replace("mcp__cockpit-config__", "");
|
|
1486
|
+
const parts = suffix.split("_");
|
|
1487
|
+
const action = parts[0];
|
|
1488
|
+
const domain = parts.slice(1).join("_");
|
|
1489
|
+
let displayName;
|
|
1490
|
+
if (domain === "job" && (action === "update" || action === "delete")) {
|
|
1491
|
+
const jobId = pa.rawToolInput?.id;
|
|
1492
|
+
if (typeof jobId === "string") {
|
|
1493
|
+
displayName = (0, job_storage_1.getJob)(jobId)?.name;
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
session.pendingRequests.set(pa.requestId, {
|
|
1497
|
+
type: "permission",
|
|
1498
|
+
requestId: pa.requestId,
|
|
1499
|
+
toolName: pa.toolName,
|
|
1500
|
+
toolInput: pa.toolInput || "",
|
|
1501
|
+
rawToolInput: pa.rawToolInput,
|
|
1502
|
+
configProposal: { toolName: tool, domain, action, ...(displayName ? { displayName } : {}) },
|
|
1503
|
+
});
|
|
1504
|
+
this.notifyPendingChanged(session, sessionId);
|
|
1505
|
+
}
|
|
1506
|
+
else {
|
|
1507
|
+
this.respondToPermission(sessionId, pa.requestId, false, undefined, undefined, "This tool is not available in the cockpit assistant");
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1332
1510
|
else if (session.bypassAllPermissions && !session.planMode && pa.toolName !== "AskUserQuestion") {
|
|
1333
1511
|
this.respondToPermission(sessionId, pa.requestId, true, pa.rawToolInput);
|
|
1334
1512
|
bypassedRequestIds.add(pa.requestId);
|
|
@@ -1437,7 +1615,6 @@ class SessionManager {
|
|
|
1437
1615
|
// generate a new CLI session ID to get a fresh context.
|
|
1438
1616
|
session.previousCliSessionIds.push(session.cliSessionId);
|
|
1439
1617
|
session.cliSessionId = (0, uuid_1.v4)();
|
|
1440
|
-
session.hasSpawnedBefore = false;
|
|
1441
1618
|
session.queuedMessages.length = 0;
|
|
1442
1619
|
session.queuePaused = false;
|
|
1443
1620
|
session.todoItems = [];
|
|
@@ -1457,13 +1634,12 @@ class SessionManager {
|
|
|
1457
1634
|
return true;
|
|
1458
1635
|
}
|
|
1459
1636
|
this.log(sessionId, `/model command: args="${args}", was=${session.info.model}`);
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1637
|
+
// Route through setModel so model + modelSlots.main + contextSize persist
|
|
1638
|
+
// together (and the process restarts correctly per runtime). Writing only
|
|
1639
|
+
// prefs.model left modelSlots.main stale, and rehydrate prefers modelSlots,
|
|
1640
|
+
// so the switch reverted on restart.
|
|
1641
|
+
this.setModel(sessionId, args);
|
|
1465
1642
|
this.emitSystem(session, sessionId, `Model switched to ${args}`);
|
|
1466
|
-
this.emitInfoUpdated(session, sessionId);
|
|
1467
1643
|
return true;
|
|
1468
1644
|
}
|
|
1469
1645
|
case "/rename": {
|
|
@@ -1505,6 +1681,24 @@ class SessionManager {
|
|
|
1505
1681
|
return true;
|
|
1506
1682
|
}
|
|
1507
1683
|
case "/context": {
|
|
1684
|
+
// Forward to the CLI's own /context: it shows the live per-category
|
|
1685
|
+
// breakdown and the ACTUAL window, which cockpit's readout (picked size
|
|
1686
|
+
// only) can't. /context is a local command (no model turn → no Stop hook),
|
|
1687
|
+
// so never enter the running state — that would hang the session on
|
|
1688
|
+
// "processing". If no CLI is live (e.g. a context-size switch just killed
|
|
1689
|
+
// it), spawn one rather than showing cockpit's one-liner; the spawn applies
|
|
1690
|
+
// the freshly-picked window so /context reflects the switch immediately.
|
|
1691
|
+
// Output arrives as a local_command transcript entry (ANSI-stripped). When a
|
|
1692
|
+
// turn is already running we don't interfere — fall back to the local readout.
|
|
1693
|
+
if (session.runtime === "pty" && session.info.status !== "running") {
|
|
1694
|
+
if (session.ptyRuntime?.isAlive) {
|
|
1695
|
+
session.ptyRuntime.sendText("/context").catch(() => { });
|
|
1696
|
+
}
|
|
1697
|
+
else {
|
|
1698
|
+
this.spawnPtyProcess(session, sessionId, "/context");
|
|
1699
|
+
}
|
|
1700
|
+
return true;
|
|
1701
|
+
}
|
|
1508
1702
|
if (!session.contextUsage) {
|
|
1509
1703
|
this.emitSystem(session, sessionId, "Context usage data not available yet.");
|
|
1510
1704
|
return true;
|
|
@@ -1521,66 +1715,32 @@ class SessionManager {
|
|
|
1521
1715
|
return true;
|
|
1522
1716
|
}
|
|
1523
1717
|
}
|
|
1524
|
-
// In PTY mode,
|
|
1718
|
+
// In PTY mode, only model-invoking commands are safe to forward to the REPL:
|
|
1719
|
+
// they run a turn that fires a Stop hook, which clears the running state.
|
|
1720
|
+
// CLI-local commands don't: "local-jsx" opens an interactive panel cockpit
|
|
1721
|
+
// renders from the transcript, not the raw PTY, so it can't show or drive; and
|
|
1722
|
+
// "local" acts with no Stop hook, hanging the session on "processing". Block
|
|
1723
|
+
// both. Classification (incl. aliases) is generated from the CLI binary; see
|
|
1724
|
+
// src/lib/cli-commands.ts. Unknown commands (custom/project/plugin) are
|
|
1725
|
+
// prompt-style and pass through.
|
|
1525
1726
|
if (session.ptyRuntime?.isAlive) {
|
|
1526
|
-
const
|
|
1527
|
-
|
|
1528
|
-
|
|
1727
|
+
const kind = (0, cli_commands_1.classifyCliCommand)(cmd);
|
|
1728
|
+
// /compact is CLI-local but cockpit drives compaction through it (PostCompact
|
|
1729
|
+
// clears the running state), so it must reach the CLI -- let it pass through.
|
|
1730
|
+
const passThrough = SessionManager.PTY_FORWARD_LOCAL.has(cmd.replace(/^\//, ""));
|
|
1731
|
+
if (!passThrough && (kind === "local" || kind === "local-jsx")) {
|
|
1732
|
+
const detail = kind === "local-jsx" ? "opens an interactive CLI dialog" : "runs in the CLI only";
|
|
1733
|
+
this.emitSystem(session, sessionId, `"${cmd}" ${detail} and isn't available in remote mode.`);
|
|
1529
1734
|
return true;
|
|
1530
1735
|
}
|
|
1531
1736
|
}
|
|
1532
1737
|
// All other slash commands pass through to Claude
|
|
1533
1738
|
return false;
|
|
1534
1739
|
}
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
"stats",
|
|
1540
|
-
"doctor",
|
|
1541
|
-
"diff",
|
|
1542
|
-
"mcp",
|
|
1543
|
-
"permissions",
|
|
1544
|
-
"hooks",
|
|
1545
|
-
"tasks",
|
|
1546
|
-
"agents",
|
|
1547
|
-
"skills",
|
|
1548
|
-
"memory",
|
|
1549
|
-
"theme",
|
|
1550
|
-
"fast",
|
|
1551
|
-
"feedback",
|
|
1552
|
-
"copy",
|
|
1553
|
-
"branch",
|
|
1554
|
-
"plan",
|
|
1555
|
-
"chrome",
|
|
1556
|
-
"desktop",
|
|
1557
|
-
"ide",
|
|
1558
|
-
"mobile",
|
|
1559
|
-
"bridge",
|
|
1560
|
-
"sandbox",
|
|
1561
|
-
"export",
|
|
1562
|
-
"login",
|
|
1563
|
-
"logout",
|
|
1564
|
-
"upgrade",
|
|
1565
|
-
"rate-limit-options",
|
|
1566
|
-
"privacy-settings",
|
|
1567
|
-
"terminal-setup",
|
|
1568
|
-
"install-github-app",
|
|
1569
|
-
"remote-env",
|
|
1570
|
-
"remote-setup",
|
|
1571
|
-
"resume",
|
|
1572
|
-
"add-dir",
|
|
1573
|
-
"btw",
|
|
1574
|
-
"extra-usage",
|
|
1575
|
-
"passes",
|
|
1576
|
-
"think-back",
|
|
1577
|
-
"ultrareview",
|
|
1578
|
-
"tag",
|
|
1579
|
-
"exit",
|
|
1580
|
-
"effort",
|
|
1581
|
-
"color",
|
|
1582
|
-
"files",
|
|
1583
|
-
]);
|
|
1740
|
+
// CLI-local commands cockpit intentionally forwards in PTY despite their type,
|
|
1741
|
+
// because their lifecycle is handled (e.g. /compact fires PostCompact, which
|
|
1742
|
+
// clears the running state the same way a Stop hook would).
|
|
1743
|
+
static PTY_FORWARD_LOCAL = new Set(["compact"]);
|
|
1584
1744
|
static MEDIA_EXT = {
|
|
1585
1745
|
"image/png": ".png",
|
|
1586
1746
|
"image/jpeg": ".jpg",
|
|
@@ -1655,17 +1815,27 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
1655
1815
|
- Read, Grep, Glob, and all other read-only tools: unrestricted.
|
|
1656
1816
|
</system-reminder>`;
|
|
1657
1817
|
}
|
|
1658
|
-
async recoverSession(id) {
|
|
1818
|
+
async recoverSession(id, opts) {
|
|
1659
1819
|
if (this.sessions.has(id))
|
|
1660
1820
|
return true;
|
|
1661
1821
|
smLog(id, "recovering session: not in memory, searching disk");
|
|
1662
1822
|
const prefs = (0, session_prefs_1.getSessionPrefs)(id);
|
|
1663
|
-
const cwd = (await (0, transcript_1.findSessionCwd)(prefs?.cliSessionId || id)) || (await (0, transcript_1.findSessionCwd)(id));
|
|
1823
|
+
const cwd = (await (0, transcript_1.findSessionCwd)(prefs?.cliSessionId || id)) || (await (0, transcript_1.findSessionCwd)(id)) || opts?.cwd;
|
|
1664
1824
|
if (!cwd) {
|
|
1665
1825
|
smLog(id, "recovery failed: no transcript found on disk");
|
|
1666
1826
|
return false;
|
|
1667
1827
|
}
|
|
1668
|
-
|
|
1828
|
+
// When recovered from a history-view deep link, `id` is the exact transcript
|
|
1829
|
+
// link being viewed, which may be an older link of a compacted/cleared chain.
|
|
1830
|
+
// Pin it as the cliSessionId so the resume continues that link (--resume
|
|
1831
|
+
// appends to the same file) instead of jumping to the chain head — otherwise
|
|
1832
|
+
// the view and the agent diverge.
|
|
1833
|
+
if (opts?.pinExact && (0, transcript_1.transcriptExists)(id, cwd)) {
|
|
1834
|
+
this.ensureSession(id, cwd, { pinCliSessionId: id });
|
|
1835
|
+
}
|
|
1836
|
+
else {
|
|
1837
|
+
this.ensureSession(id, cwd);
|
|
1838
|
+
}
|
|
1669
1839
|
smLog(id, `recovery succeeded: restored from ${cwd}`);
|
|
1670
1840
|
return true;
|
|
1671
1841
|
}
|
|
@@ -1784,7 +1954,13 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
1784
1954
|
}
|
|
1785
1955
|
ensureProcess(sessionId) {
|
|
1786
1956
|
const session = this.sessions.get(sessionId);
|
|
1787
|
-
|
|
1957
|
+
// `spawning` guards the PTY startup window: the runtime is assigned before
|
|
1958
|
+
// its async start() resolves, and during that window ptyRuntime.isAlive is
|
|
1959
|
+
// false, so a second ensureProcess (a WS reconnect, or a startup race)
|
|
1960
|
+
// would otherwise spawn a duplicate CLI for the same session — two
|
|
1961
|
+
// processes racing on the same --session-id. (Stream sets session.process
|
|
1962
|
+
// synchronously, so it is already covered by that check.)
|
|
1963
|
+
if (!session || session.process || session.ptyRuntime?.isAlive || session.spawning)
|
|
1788
1964
|
return;
|
|
1789
1965
|
this.spawnProcess(session, sessionId);
|
|
1790
1966
|
}
|
|
@@ -1805,23 +1981,24 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
1805
1981
|
this.spawnPtyProcess(session, sessionId, text, images, documents);
|
|
1806
1982
|
return;
|
|
1807
1983
|
}
|
|
1808
|
-
|
|
1984
|
+
const willResume = (0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd);
|
|
1985
|
+
this.log(sessionId, `spawning CLI process (resume=${willResume}, model=${session.info.model || "sonnet"})`);
|
|
1809
1986
|
const args = ["-p", "--verbose", "--output-format", "stream-json", "--input-format", "stream-json"];
|
|
1810
1987
|
// In plan mode, omit --allow-dangerously-skip-permissions so the CLI
|
|
1811
1988
|
// natively enforces tool restrictions and sends permission_requests for
|
|
1812
1989
|
// write tools (which the server auto-denies).
|
|
1813
1990
|
// Outside plan mode, enable bypass so it can be toggled mid-session.
|
|
1814
|
-
if (!session.planMode) {
|
|
1991
|
+
if (!session.planMode && !session.cockpitAgent) {
|
|
1815
1992
|
args.push("--allow-dangerously-skip-permissions");
|
|
1816
1993
|
}
|
|
1817
1994
|
args.push("--permission-prompt-tool", "stdio");
|
|
1818
1995
|
if (session.planMode) {
|
|
1819
1996
|
args.push("--permission-mode", "plan");
|
|
1820
1997
|
}
|
|
1821
|
-
else if (session.bypassAllPermissions) {
|
|
1998
|
+
else if (session.bypassAllPermissions && !session.cockpitAgent) {
|
|
1822
1999
|
args.push("--permission-mode", "bypassPermissions");
|
|
1823
2000
|
}
|
|
1824
|
-
if (
|
|
2001
|
+
if (willResume) {
|
|
1825
2002
|
args.push("--resume", session.cliSessionId);
|
|
1826
2003
|
}
|
|
1827
2004
|
else {
|
|
@@ -1833,7 +2010,9 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
1833
2010
|
if (cliModel) {
|
|
1834
2011
|
args.push("--model", cliModel);
|
|
1835
2012
|
}
|
|
1836
|
-
|
|
2013
|
+
// "off" has no --effort value; thinking is disabled via a post-init
|
|
2014
|
+
// apply_flag_settings control request below instead.
|
|
2015
|
+
if (this.modelEffortLevels(session.info.model).length > 0 && session.thinkingLevel !== "off") {
|
|
1837
2016
|
args.push("--effort", session.thinkingLevel);
|
|
1838
2017
|
}
|
|
1839
2018
|
const env = { ...process.env };
|
|
@@ -1849,13 +2028,43 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
1849
2028
|
if (models_1.CONTEXT_SIZES[sizeKey].disableEnv) {
|
|
1850
2029
|
env.CLAUDE_CODE_DISABLE_1M_CONTEXT = "1";
|
|
1851
2030
|
}
|
|
2031
|
+
else {
|
|
2032
|
+
// 1m: drop any inherited override so cockpit's pick stays authoritative and
|
|
2033
|
+
// a CLAUDE_CODE_DISABLE_1M_CONTEXT in cockpit's own env can't force 200k.
|
|
2034
|
+
delete env.CLAUDE_CODE_DISABLE_1M_CONTEXT;
|
|
2035
|
+
}
|
|
1852
2036
|
if (session.modelSlots.subagent && session.modelSlots.subagent !== session.modelSlots.main) {
|
|
1853
2037
|
const resolvedSub = (0, providers_1.resolveProviderModel)(session.modelSlots.subagent);
|
|
1854
2038
|
env.ANTHROPIC_SMALL_FAST_MODEL = resolvedSub ? resolvedSub.model.modelId : session.modelSlots.subagent;
|
|
1855
2039
|
}
|
|
2040
|
+
if (session.cockpitAgent) {
|
|
2041
|
+
args.push("--append-system-prompt", cockpit_agent_prompt_1.COCKPIT_AGENT_SYSTEM_PROMPT);
|
|
2042
|
+
const cockpitMcp = (0, singleton_1.getCockpitMcp)();
|
|
2043
|
+
if (cockpitMcp) {
|
|
2044
|
+
if (session.mcpToken) {
|
|
2045
|
+
(0, run_context_1.clearToken)(session.mcpToken);
|
|
2046
|
+
try {
|
|
2047
|
+
(0, node_fs_1.unlinkSync)(node_path_1.default.join((0, node_os_1.tmpdir)(), "cockpit-mcp-config", `${session.mcpToken.slice(0, 16)}.json`));
|
|
2048
|
+
}
|
|
2049
|
+
catch {
|
|
2050
|
+
/* best effort */
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
const token = (0, node_crypto_1.randomBytes)(24).toString("hex");
|
|
2054
|
+
if (session.runContext) {
|
|
2055
|
+
(0, run_context_1.registerRunContext)(token, session.runContext);
|
|
2056
|
+
}
|
|
2057
|
+
else {
|
|
2058
|
+
(0, run_context_1.registerAuthToken)(token);
|
|
2059
|
+
}
|
|
2060
|
+
session.mcpToken = token;
|
|
2061
|
+
const configFile = buildMcpConfigArg(cockpitMcp.getUrl(), token);
|
|
2062
|
+
args.push("--mcp-config", configFile.path);
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
1856
2065
|
(0, node_fs_1.mkdirSync)(session.info.cwd, { recursive: true });
|
|
1857
2066
|
const isWin = process.platform === "win32";
|
|
1858
|
-
const proc = (0, node_child_process_1.spawn)(getClaudeBin(), args, {
|
|
2067
|
+
const proc = (0, node_child_process_1.spawn)((0, claude_bin_1.getClaudeBin)(), args, {
|
|
1859
2068
|
cwd: session.info.cwd,
|
|
1860
2069
|
env,
|
|
1861
2070
|
stdio: ["pipe", "pipe", "pipe"],
|
|
@@ -1863,7 +2072,6 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
1863
2072
|
});
|
|
1864
2073
|
session.process = proc;
|
|
1865
2074
|
session.stdin = proc.stdin;
|
|
1866
|
-
session.hasSpawnedBefore = true;
|
|
1867
2075
|
this.log(sessionId, `CLI process spawned (pid=${proc.pid})`);
|
|
1868
2076
|
this.startTodoWatcher(session, sessionId);
|
|
1869
2077
|
// Send initialize control request before the first user message to get
|
|
@@ -1879,9 +2087,19 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
1879
2087
|
if (session.planMode) {
|
|
1880
2088
|
this.sendPermissionMode(session, sessionId, "plan");
|
|
1881
2089
|
}
|
|
1882
|
-
else if (session.bypassAllPermissions) {
|
|
2090
|
+
else if (session.bypassAllPermissions && !session.cockpitAgent) {
|
|
1883
2091
|
this.sendPermissionMode(session, sessionId, "bypassPermissions");
|
|
1884
2092
|
}
|
|
2093
|
+
// Thinking "off": there is no --effort value for it and stream mode has no
|
|
2094
|
+
// --settings file, so disable thinking as a settings patch over stdin.
|
|
2095
|
+
if (session.thinkingLevel === "off" && this.modelEffortLevels(session.info.model).length > 0) {
|
|
2096
|
+
const offRequest = {
|
|
2097
|
+
type: "control_request",
|
|
2098
|
+
request_id: `thinking-off-${Date.now()}`,
|
|
2099
|
+
request: { subtype: "apply_flag_settings", settings: { alwaysThinkingEnabled: false } },
|
|
2100
|
+
};
|
|
2101
|
+
proc.stdin.write(JSON.stringify(offRequest) + "\n");
|
|
2102
|
+
}
|
|
1885
2103
|
if (text) {
|
|
1886
2104
|
const content = this.buildContent(session, text, images, documents);
|
|
1887
2105
|
const userInput = { type: "user", message: { role: "user", content } };
|
|
@@ -2010,13 +2228,20 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
2010
2228
|
session.emitter.emit("error", sessionId, msg);
|
|
2011
2229
|
return;
|
|
2012
2230
|
}
|
|
2013
|
-
|
|
2231
|
+
const willResume = (0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd);
|
|
2232
|
+
this.log(sessionId, `spawning PTY claude (resume=${willResume}, model=${session.info.model || "sonnet"})`);
|
|
2233
|
+
const spawnBeginAt = Date.now();
|
|
2234
|
+
(0, debug_logger_1.logDiag)(sessionId, "pty:spawn-begin", {
|
|
2235
|
+
model: session.info.model,
|
|
2236
|
+
hasText: !!text,
|
|
2237
|
+
status: session.info.status,
|
|
2238
|
+
});
|
|
2014
2239
|
(0, node_fs_1.mkdirSync)(session.info.cwd, { recursive: true });
|
|
2015
2240
|
const streamState = (0, stream_processor_1.createStreamState)();
|
|
2016
2241
|
session.streamState = streamState;
|
|
2017
2242
|
streamState.thinkingStartedAt = Date.now();
|
|
2018
2243
|
const extraArgs = [];
|
|
2019
|
-
if (
|
|
2244
|
+
if ((0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd)) {
|
|
2020
2245
|
extraArgs.push("--resume", session.cliSessionId);
|
|
2021
2246
|
}
|
|
2022
2247
|
else {
|
|
@@ -2026,13 +2251,15 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
2026
2251
|
const cliModelPty = resolvedPty ? resolvedPty.model.modelId : session.info.model;
|
|
2027
2252
|
if (cliModelPty)
|
|
2028
2253
|
extraArgs.push("--model", cliModelPty);
|
|
2029
|
-
|
|
2254
|
+
// "off" is applied via the settings file (alwaysThinkingEnabled:false) passed
|
|
2255
|
+
// to PtyRuntime below, not --effort (which has no "off" value).
|
|
2256
|
+
if (this.modelEffortLevels(session.info.model).length > 0 && session.thinkingLevel !== "off") {
|
|
2030
2257
|
extraArgs.push("--effort", session.thinkingLevel);
|
|
2031
2258
|
}
|
|
2032
2259
|
if (session.planMode) {
|
|
2033
2260
|
extraArgs.push("--permission-mode", "plan");
|
|
2034
2261
|
}
|
|
2035
|
-
else if (session.bypassAllPermissions) {
|
|
2262
|
+
else if (session.bypassAllPermissions && !session.cockpitAgent) {
|
|
2036
2263
|
extraArgs.push("--permission-mode", "bypassPermissions");
|
|
2037
2264
|
}
|
|
2038
2265
|
const extraEnv = {};
|
|
@@ -2046,14 +2273,40 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
2046
2273
|
const resolvedSub = (0, providers_1.resolveProviderModel)(session.modelSlots.subagent);
|
|
2047
2274
|
extraEnv.ANTHROPIC_SMALL_FAST_MODEL = resolvedSub ? resolvedSub.model.modelId : session.modelSlots.subagent;
|
|
2048
2275
|
}
|
|
2276
|
+
if (session.cockpitAgent) {
|
|
2277
|
+
extraArgs.push("--append-system-prompt", cockpit_agent_prompt_1.COCKPIT_AGENT_SYSTEM_PROMPT);
|
|
2278
|
+
const cockpitMcp = (0, singleton_1.getCockpitMcp)();
|
|
2279
|
+
if (cockpitMcp) {
|
|
2280
|
+
if (session.mcpToken) {
|
|
2281
|
+
(0, run_context_1.clearToken)(session.mcpToken);
|
|
2282
|
+
try {
|
|
2283
|
+
(0, node_fs_1.unlinkSync)(node_path_1.default.join((0, node_os_1.tmpdir)(), "cockpit-mcp-config", `${session.mcpToken.slice(0, 16)}.json`));
|
|
2284
|
+
}
|
|
2285
|
+
catch {
|
|
2286
|
+
/* best effort */
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
const token = (0, node_crypto_1.randomBytes)(24).toString("hex");
|
|
2290
|
+
if (session.runContext) {
|
|
2291
|
+
(0, run_context_1.registerRunContext)(token, session.runContext);
|
|
2292
|
+
}
|
|
2293
|
+
else {
|
|
2294
|
+
(0, run_context_1.registerAuthToken)(token);
|
|
2295
|
+
}
|
|
2296
|
+
session.mcpToken = token;
|
|
2297
|
+
const configFile = buildMcpConfigArg(cockpitMcp.getUrl(), token);
|
|
2298
|
+
extraArgs.push("--mcp-config", configFile.path);
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2049
2301
|
const runtime = new pty_runtime_1.PtyRuntime({
|
|
2050
2302
|
sessionId,
|
|
2051
2303
|
cwd: session.info.cwd,
|
|
2052
2304
|
cliSessionId: session.cliSessionId,
|
|
2053
2305
|
hookRouter,
|
|
2054
|
-
claudeBin: getClaudeBin(),
|
|
2306
|
+
claudeBin: (0, claude_bin_1.getClaudeBin)(),
|
|
2055
2307
|
extraArgs,
|
|
2056
2308
|
extraEnv,
|
|
2309
|
+
thinkingEnabled: session.thinkingLevel !== "off",
|
|
2057
2310
|
onEvents: (events) => {
|
|
2058
2311
|
const types = events.map((e) => e.type).join(", ");
|
|
2059
2312
|
console.log(`[sm] pty onEvents for ${sessionId.slice(0, 8)}: [${types}]`);
|
|
@@ -2069,8 +2322,14 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
2069
2322
|
if (session.ptyRuntime !== runtime)
|
|
2070
2323
|
return;
|
|
2071
2324
|
session.ptyRuntime = null;
|
|
2325
|
+
session.spawning = false;
|
|
2072
2326
|
session.streamingSnapshot = null;
|
|
2073
|
-
(0, debug_logger_1.logDiag)(sessionId, "idle:pty-exit", {
|
|
2327
|
+
(0, debug_logger_1.logDiag)(sessionId, "idle:pty-exit", {
|
|
2328
|
+
exitCode,
|
|
2329
|
+
signal: signal ?? null,
|
|
2330
|
+
flushedOnMessageDone: streamState.flushedOnMessageDone,
|
|
2331
|
+
sinceSpawnMs: Date.now() - spawnBeginAt,
|
|
2332
|
+
});
|
|
2074
2333
|
if (session.transcriptWatcher) {
|
|
2075
2334
|
session.transcriptWatcher.stop();
|
|
2076
2335
|
session.transcriptWatcher = null;
|
|
@@ -2098,7 +2357,7 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
2098
2357
|
},
|
|
2099
2358
|
});
|
|
2100
2359
|
session.ptyRuntime = runtime;
|
|
2101
|
-
|
|
2360
|
+
(0, debug_logger_1.logDiag)(sessionId, "pty:runtime-assigned", { elapsedMs: Date.now() - spawnBeginAt });
|
|
2102
2361
|
this.cleanupAttachments(session);
|
|
2103
2362
|
const attachments = this.writeAttachments(images, documents);
|
|
2104
2363
|
session.attachmentPaths.push(...attachments);
|
|
@@ -2127,19 +2386,38 @@ Additional Cockpit rules beyond the CLI's defaults:
|
|
|
2127
2386
|
});
|
|
2128
2387
|
session.transcriptWatcher = watcher;
|
|
2129
2388
|
this.startTodoWatcher(session, sessionId);
|
|
2389
|
+
// Set the in-flight guard immediately before start(). Everything above is
|
|
2390
|
+
// synchronous (no re-entrancy is possible until start() yields to the event
|
|
2391
|
+
// loop), so a synchronous throw in the setup above can never strand
|
|
2392
|
+
// spawning=true and permanently block ensureProcess for this session.
|
|
2393
|
+
session.spawning = true;
|
|
2130
2394
|
runtime
|
|
2131
2395
|
.start(ptyText)
|
|
2132
2396
|
.then(() => {
|
|
2397
|
+
session.spawning = false;
|
|
2133
2398
|
this.log(sessionId, `PTY claude ready (pid=${runtime.pid})`);
|
|
2399
|
+
(0, debug_logger_1.logDiag)(sessionId, "pty:start-resolved", {
|
|
2400
|
+
pid: runtime.pid,
|
|
2401
|
+
elapsedMs: Date.now() - spawnBeginAt,
|
|
2402
|
+
isAlive: runtime.isAlive,
|
|
2403
|
+
status: session.info.status,
|
|
2404
|
+
});
|
|
2134
2405
|
watcher.start();
|
|
2135
2406
|
})
|
|
2136
2407
|
.catch((err) => {
|
|
2408
|
+
session.spawning = false;
|
|
2137
2409
|
const msg = err instanceof Error ? err.message : String(err);
|
|
2138
2410
|
this.log(sessionId, `pty runtime start failed: ${msg}`);
|
|
2411
|
+
(0, debug_logger_1.logDiag)(sessionId, "pty:start-rejected", { error: msg, elapsedMs: Date.now() - spawnBeginAt });
|
|
2412
|
+
const dead = session.ptyRuntime;
|
|
2139
2413
|
session.ptyRuntime = null;
|
|
2414
|
+
// Emit error BEFORE idle: a job's onStatus("idle") maps to success, so an
|
|
2415
|
+
// idle-first order would mark a failed spawn as a successful empty run.
|
|
2416
|
+
session.emitter.emit("error", sessionId, msg);
|
|
2140
2417
|
session.info.status = "idle";
|
|
2141
2418
|
session.emitter.emit("status", sessionId, "idle");
|
|
2142
|
-
|
|
2419
|
+
// Reap the half-started PTY so a failed delivery can't leak an idle CLI.
|
|
2420
|
+
dead?.kill().catch(() => { });
|
|
2143
2421
|
});
|
|
2144
2422
|
}
|
|
2145
2423
|
async loadAgentChildren(session, sessionId, messageId, cwd) {
|