@alexjbarnes/cockpit 0.1.1 → 0.2.0
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 +12 -0
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +51 -3
- package/.next/react-loadable-manifest.json +2 -2
- package/.next/routes-manifest.json +76 -0
- 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)/changes/page.js +2 -2
- package/.next/server/app/(app)/changes/page.js.nft.json +1 -1
- package/.next/server/app/(app)/changes/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)/files/page.js +2 -2
- package/.next/server/app/(app)/files/page.js.nft.json +1 -1
- package/.next/server/app/(app)/files/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 -0
- package/.next/server/app/(app)/inbox/[id]/page.js.nft.json +1 -0
- package/.next/server/app/(app)/inbox/[id]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/inbox/page.js +2 -0
- package/.next/server/app/(app)/inbox/page.js.nft.json +1 -0
- package/.next/server/app/(app)/inbox/page_client-reference-manifest.js +1 -0
- 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)/reviews/[owner]/[repo]/[number]/page.js +9 -9
- 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/notifications/page.js +2 -0
- package/.next/server/app/(app)/settings/notifications/page.js.nft.json +1 -0
- package/.next/server/app/(app)/settings/notifications/page_client-reference-manifest.js +1 -0
- 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)/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_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_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/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/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/health/route.js +1 -1
- package/.next/server/app/api/hooks/route.js +1 -1
- package/.next/server/app/api/inbox/[id]/route.js +5 -0
- package/.next/server/app/api/inbox/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/inbox/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/inbox/route.js +5 -0
- package/.next/server/app/api/inbox/route.js.nft.json +1 -0
- package/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/jobs/[id]/route.js +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/route.js +1 -1
- package/.next/server/app/api/jobs/[id]/trigger/route.js +1 -1
- package/.next/server/app/api/jobs/mcp-discover/route.js +1 -1
- package/.next/server/app/api/jobs/route.js +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/route.js +1 -1
- package/.next/server/app/api/notifications/route.js +1 -0
- package/.next/server/app/api/notifications/route.js.nft.json +1 -0
- package/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/notifications/test/route.js +5 -0
- package/.next/server/app/api/notifications/test/route.js.nft.json +1 -0
- package/.next/server/app/api/notifications/test/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/reviews/pinned/route.js +1 -0
- package/.next/server/app/api/reviews/pinned/route.js.nft.json +1 -0
- package/.next/server/app/api/reviews/pinned/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/mcp/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/search/route.js +1 -1
- package/.next/server/app/api/sessions/bulk-delete/route.js +1 -0
- package/.next/server/app/api/sessions/bulk-delete/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/bulk-delete/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/by-ids/route.js +1 -0
- package/.next/server/app/api/sessions/by-ids/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/by-ids/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/group/route.js +1 -0
- package/.next/server/app/api/sessions/group/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/group/route_client-reference-manifest.js +1 -0
- 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/search/route.js +1 -0
- package/.next/server/app/api/sessions/search/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/search/route_client-reference-manifest.js +1 -0
- 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/usage/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/changes.html +1 -1
- package/.next/server/app/changes.rsc +4 -4
- package/.next/server/app/changes.segments/!KGFwcCk/changes/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/changes.segments/!KGFwcCk/changes.segment.rsc +1 -1
- package/.next/server/app/changes.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/changes.segments/_full.segment.rsc +4 -4
- package/.next/server/app/changes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/changes.segments/_index.segment.rsc +2 -2
- package/.next/server/app/changes.segments/_tree.segment.rsc +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/files.html +1 -1
- package/.next/server/app/files.rsc +4 -4
- package/.next/server/app/files.segments/!KGFwcCk/files/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/files.segments/!KGFwcCk/files.segment.rsc +1 -1
- package/.next/server/app/files.segments/!KGFwcCk.segment.rsc +2 -2
- package/.next/server/app/files.segments/_full.segment.rsc +4 -4
- package/.next/server/app/files.segments/_head.segment.rsc +1 -1
- package/.next/server/app/files.segments/_index.segment.rsc +2 -2
- package/.next/server/app/files.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 -0
- package/.next/server/app/inbox.meta +16 -0
- package/.next/server/app/inbox.rsc +23 -0
- package/.next/server/app/inbox.segments/!KGFwcCk/inbox/__PAGE__.segment.rsc +9 -0
- package/.next/server/app/inbox.segments/!KGFwcCk/inbox.segment.rsc +5 -0
- package/.next/server/app/inbox.segments/!KGFwcCk.segment.rsc +7 -0
- package/.next/server/app/inbox.segments/_full.segment.rsc +23 -0
- package/.next/server/app/inbox.segments/_head.segment.rsc +6 -0
- package/.next/server/app/inbox.segments/_index.segment.rsc +5 -0
- package/.next/server/app/inbox.segments/_tree.segment.rsc +2 -0
- 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_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- 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 +1 -1
- 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/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/notifications.html +1 -0
- package/.next/server/app/settings/notifications.meta +17 -0
- package/.next/server/app/settings/notifications.rsc +23 -0
- package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings/notifications/__PAGE__.segment.rsc +9 -0
- package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings/notifications.segment.rsc +5 -0
- package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings.segment.rsc +5 -0
- package/.next/server/app/settings/notifications.segments/!KGFwcCk.segment.rsc +7 -0
- package/.next/server/app/settings/notifications.segments/_full.segment.rsc +23 -0
- package/.next/server/app/settings/notifications.segments/_head.segment.rsc +6 -0
- package/.next/server/app/settings/notifications.segments/_index.segment.rsc +5 -0
- package/.next/server/app/settings/notifications.segments/_tree.segment.rsc +2 -0
- 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 +12 -0
- package/.next/server/chunks/1659.js +1 -1
- package/.next/server/chunks/1941.js +2 -2
- package/.next/server/chunks/1979.js +2 -2
- package/.next/server/chunks/2408.js +1 -1
- package/.next/server/chunks/2444.js +1 -1
- package/.next/server/chunks/3108.js +1 -0
- package/.next/server/chunks/4445.js +1 -1
- package/.next/server/chunks/{6142.js → 5920.js} +1 -1
- package/.next/server/chunks/5965.js +1 -1
- package/.next/server/chunks/{9012.js → 7627.js} +3 -3
- 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/brzairTqHmHwvfgKpdkYX/_buildManifest.js +1 -0
- package/.next/static/chunks/11242-d240a18d4e59390b.js +199 -0
- package/.next/static/chunks/3765-a4c7a493ec83f918.js +20 -0
- package/.next/static/chunks/{80392.bca860d8b5972706.js → 58011.3de5770e8b0d8759.js} +1 -1
- package/.next/static/chunks/{69427.755a0a4013596f7a.js → 69427.0f379c6bdea95405.js} +1 -1
- package/.next/static/chunks/75866-76a3987dda1295ae.js +1 -0
- package/.next/static/chunks/93273-87110c1449e1e7fd.js +6 -0
- package/.next/static/chunks/app/(app)/agents/[name]/{page-44c5691c80f17d38.js → page-3ec9a3460e8e9006.js} +2 -2
- package/.next/static/chunks/app/(app)/agents/page-d6d504e7d7757ea2.js +1 -0
- package/.next/static/chunks/app/(app)/changes/page-a09bf4742aa8b5ce.js +1 -0
- package/.next/static/chunks/app/(app)/claude-md/edit/page-ab42921ba2618dc3.js +1 -0
- package/.next/static/chunks/app/(app)/claude-md/page-c4c8b20aa002a94a.js +1 -0
- package/.next/static/chunks/app/(app)/commands/[name]/{page-6ef571e73b105248.js → page-2124ffed9a4e95a3.js} +2 -2
- package/.next/static/chunks/app/(app)/commands/page-d5bf1bddd17e31dd.js +1 -0
- package/.next/static/chunks/app/(app)/files/page-04e4e5bf1ca89945.js +1 -0
- package/.next/static/chunks/app/(app)/hooks/[event]/{page-03f85595561b068a.js → page-d988623e739973b5.js} +2 -2
- package/.next/static/chunks/app/(app)/hooks/page-818242d7db432578.js +1 -0
- package/.next/static/chunks/app/(app)/inbox/[id]/page-c33dc94e309ff117.js +1 -0
- package/.next/static/chunks/app/(app)/inbox/page-ca3e1724b5072734.js +1 -0
- package/.next/static/chunks/app/(app)/jobs/[id]/edit/page-3a1c927d76333bf0.js +1 -0
- package/.next/static/chunks/app/(app)/jobs/[id]/page-8e698e00b90968b0.js +1 -0
- package/.next/static/chunks/app/(app)/jobs/[id]/runs/[runId]/page-f942df0b7c1d280b.js +1 -0
- package/.next/static/chunks/app/(app)/jobs/page-7a88cc6ac34550c2.js +1 -0
- package/.next/static/chunks/app/(app)/layout-81c1899969de11e6.js +1 -0
- package/.next/static/chunks/app/(app)/mcp-servers/[name]/page-3541bf3ccdef9145.js +1 -0
- package/.next/static/chunks/app/(app)/mcp-servers/page-3927dfd03d921040.js +1 -0
- package/.next/static/chunks/app/(app)/page-594120e0ea1df527.js +1 -0
- package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/[number]/page-74c23b04f5c3ff88.js +13 -0
- package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/page-c7473a899c7c59c3.js +1 -0
- package/.next/static/chunks/app/(app)/reviews/page-0e6e7395a4f62b50.js +1 -0
- package/.next/static/chunks/app/(app)/sessions/[id]/page-435e9fb4dd34007d.js +1 -0
- package/.next/static/chunks/app/(app)/settings/notifications/page-a28db2ebc9fd0de8.js +1 -0
- package/.next/static/chunks/app/(app)/settings/page-f8ada7997c0d5b03.js +1 -0
- package/.next/static/chunks/app/(app)/skills/[name]/{page-e6572062a6ad90df.js → page-5dbe1e7682880145.js} +2 -2
- package/.next/static/chunks/app/(app)/skills/page-fd1986ad7e060f4d.js +1 -0
- package/.next/static/chunks/app/_global-error/page-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/agents/[name]/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/agents/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/auth/check/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/auth/setup/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/auth/ws-token/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/btw/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/claude-md/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/commands/[name]/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/commands/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/defaults/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/filesystem/browse/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/filesystem/files/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/filesystem/mkdir/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/filesystem/read/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/git/clone/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/git/commit/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/git/discard/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/git/generate-message/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/git/push/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/github/file-content/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/github/orgs/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/github/prs/checks/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/github/prs/diff/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/github/prs/review/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/github/prs/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/github/prs/view/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/github/repos/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/github/review-session/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/health/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/hooks/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/inbox/[id]/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/inbox/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/transcript/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/runs/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/jobs/[id]/trigger/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/jobs/mcp-discover/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/jobs/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/jobs/status/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/mcp-servers/[name]/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/mcp-servers/[name]/test/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/mcp-servers/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/notifications/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/notifications/test/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/reviews/pinned/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/mcp/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/search/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/sessions/bulk-delete/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/sessions/by-ids/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/sessions/group/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/sessions/pinned/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/sessions/search/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/skills/[name]/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/skills/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/usage/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/version/cockpit/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/app/api/version/route-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-65c661eddfc65f5b.js +1 -0
- package/.next/static/chunks/{webpack-2a5835e108df6f34.js → webpack-3461a05957b13f46.js} +1 -1
- package/.next/static/css/f04f303b5708dd90.css +1 -0
- package/README.md +14 -4
- package/dist/server.js +38 -1
- package/dist/src/server/defaults.js +2 -0
- package/dist/src/server/inbox.js +132 -0
- package/dist/src/server/job-scheduler.js +152 -40
- package/dist/src/server/job-storage.js +4 -7
- package/dist/src/server/notification-settings.js +39 -0
- package/dist/src/server/notifications.js +125 -0
- package/dist/src/server/session-manager.js +118 -15
- package/dist/src/server/transcript.js +271 -6
- package/dist/src/server/ws-handler.js +16 -13
- package/package.json +1 -1
- package/.next/server/chunks/8346.js +0 -1
- package/.next/static/V2EfPtTUC96VYyF12K0om/_buildManifest.js +0 -1
- package/.next/static/chunks/22086-756d490e3320ad15.js +0 -1
- package/.next/static/chunks/30120-1535e9064b17ce74.js +0 -20
- package/.next/static/chunks/66997-652baf5596173fea.js +0 -199
- package/.next/static/chunks/93273-c5cb6dcedef67c81.js +0 -6
- package/.next/static/chunks/app/(app)/agents/page-4ce7a715bc0145dc.js +0 -1
- package/.next/static/chunks/app/(app)/changes/page-84cf4cd3ca347d98.js +0 -1
- package/.next/static/chunks/app/(app)/claude-md/edit/page-fb7117171d0f94d2.js +0 -1
- package/.next/static/chunks/app/(app)/claude-md/page-9503f1415e660911.js +0 -1
- package/.next/static/chunks/app/(app)/commands/page-e8a506da73d1c280.js +0 -1
- package/.next/static/chunks/app/(app)/files/page-67a95d351a685d79.js +0 -1
- package/.next/static/chunks/app/(app)/hooks/page-5578c83ad353e307.js +0 -1
- package/.next/static/chunks/app/(app)/jobs/[id]/edit/page-51d784c59737778c.js +0 -1
- package/.next/static/chunks/app/(app)/jobs/[id]/page-7d00e7a01c70a261.js +0 -1
- package/.next/static/chunks/app/(app)/jobs/[id]/runs/[runId]/page-665191da233fde19.js +0 -1
- package/.next/static/chunks/app/(app)/jobs/page-8b4ee1166a53d5e1.js +0 -1
- package/.next/static/chunks/app/(app)/layout-8dad55d6ce637a01.js +0 -1
- package/.next/static/chunks/app/(app)/mcp-servers/[name]/page-c30f0d78daf7719e.js +0 -1
- package/.next/static/chunks/app/(app)/mcp-servers/page-737b87d338afdb49.js +0 -1
- package/.next/static/chunks/app/(app)/page-40052655d2a9a84f.js +0 -1
- package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/[number]/page-1d9179bf5a4de7a4.js +0 -13
- package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/page-d8a9ee39e7cc056a.js +0 -1
- package/.next/static/chunks/app/(app)/reviews/page-098e6e6fe3123e02.js +0 -1
- package/.next/static/chunks/app/(app)/sessions/[id]/page-a74f7fe8322678ba.js +0 -1
- package/.next/static/chunks/app/(app)/settings/page-1fa46b8ac8e22927.js +0 -1
- package/.next/static/chunks/app/(app)/skills/page-8fca8814aa818ae6.js +0 -1
- package/.next/static/chunks/app/_global-error/page-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/agents/[name]/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/agents/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/auth/check/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/auth/setup/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/auth/ws-token/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/btw/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/claude-md/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/commands/[name]/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/commands/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/defaults/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/filesystem/browse/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/filesystem/files/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/filesystem/mkdir/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/filesystem/read/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/git/clone/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/git/commit/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/git/discard/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/git/generate-message/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/git/push/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/github/file-content/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/github/orgs/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/github/prs/checks/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/github/prs/diff/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/github/prs/review/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/github/prs/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/github/prs/view/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/github/repos/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/github/review-session/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/health/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/hooks/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/jobs/[id]/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/transcript/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/jobs/[id]/runs/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/jobs/[id]/trigger/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/jobs/mcp-discover/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/jobs/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/jobs/status/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/mcp-servers/[name]/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/mcp-servers/[name]/test/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/mcp-servers/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/mcp/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/search/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/sessions/pinned/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/skills/[name]/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/skills/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/usage/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/version/cockpit/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/app/api/version/route-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-b277aba73f9e0212.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b277aba73f9e0212.js +0 -1
- package/.next/static/css/1e1239c76b265910.css +0 -1
- /package/.next/static/{V2EfPtTUC96VYyF12K0om → brzairTqHmHwvfgKpdkYX}/_ssgManifest.js +0 -0
package/dist/server.js
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const node_http_1 = require("node:http");
|
|
7
|
+
const node_os_1 = require("node:os");
|
|
7
8
|
const node_url_1 = require("node:url");
|
|
8
9
|
const next_1 = __importDefault(require("next"));
|
|
9
10
|
const auth_1 = require("./src/server/auth");
|
|
@@ -16,6 +17,42 @@ const port = parseInt(process.env.PORT || "3001", 10);
|
|
|
16
17
|
const host = process.env.HOST || "0.0.0.0";
|
|
17
18
|
const app = (0, next_1.default)({ dev, hostname: host, port });
|
|
18
19
|
const handle = app.getRequestHandler();
|
|
20
|
+
function getLanAddresses() {
|
|
21
|
+
const addresses = [];
|
|
22
|
+
const ifaces = (0, node_os_1.networkInterfaces)();
|
|
23
|
+
for (const name of Object.keys(ifaces)) {
|
|
24
|
+
for (const iface of ifaces[name] || []) {
|
|
25
|
+
if (iface.family === "IPv4" && !iface.internal) {
|
|
26
|
+
addresses.push(iface.address);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return addresses;
|
|
31
|
+
}
|
|
32
|
+
function logStartupBanner() {
|
|
33
|
+
console.log(`Cockpit listening on ${host}:${port}`);
|
|
34
|
+
console.log("");
|
|
35
|
+
console.log("Connect via:");
|
|
36
|
+
const isWildcard = host === "0.0.0.0" || host === "::";
|
|
37
|
+
const isLoopback = host === "127.0.0.1" || host === "localhost" || host === "::1";
|
|
38
|
+
if (isWildcard) {
|
|
39
|
+
console.log(` Local: http://localhost:${port}`);
|
|
40
|
+
const network = getLanAddresses();
|
|
41
|
+
if (network.length > 0) {
|
|
42
|
+
console.log(` Network: http://${network[0]}:${port}`);
|
|
43
|
+
for (let i = 1; i < network.length; i++) {
|
|
44
|
+
console.log(` http://${network[i]}:${port}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else if (isLoopback) {
|
|
49
|
+
console.log(` Local: http://localhost:${port}`);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
console.log(` Network: http://${host}:${port}`);
|
|
53
|
+
}
|
|
54
|
+
console.log("");
|
|
55
|
+
}
|
|
19
56
|
async function main() {
|
|
20
57
|
// Handle password reset flag
|
|
21
58
|
if (process.env.COCKPIT_RESET_PASSWORD === "true") {
|
|
@@ -34,7 +71,7 @@ async function main() {
|
|
|
34
71
|
});
|
|
35
72
|
(0, ws_handler_1.createWebSocketHandler)(server, sessionManager);
|
|
36
73
|
server.listen(port, host, () => {
|
|
37
|
-
|
|
74
|
+
logStartupBanner();
|
|
38
75
|
if ((0, auth_1.needsSetup)()) {
|
|
39
76
|
console.log("No password set. Visit the UI to create one.");
|
|
40
77
|
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getInboxMessages = getInboxMessages;
|
|
7
|
+
exports.getUnreadCount = getUnreadCount;
|
|
8
|
+
exports.addInboxMessage = addInboxMessage;
|
|
9
|
+
exports.markRead = markRead;
|
|
10
|
+
exports.markAllRead = markAllRead;
|
|
11
|
+
exports.deleteInboxMessage = deleteInboxMessage;
|
|
12
|
+
exports.clearInbox = clearInbox;
|
|
13
|
+
exports.parseInboxBlock = parseInboxBlock;
|
|
14
|
+
exports.parseErrorBlock = parseErrorBlock;
|
|
15
|
+
const node_fs_1 = require("node:fs");
|
|
16
|
+
const node_os_1 = require("node:os");
|
|
17
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
18
|
+
const uuid_1 = require("uuid");
|
|
19
|
+
const notifications_1 = require("./notifications");
|
|
20
|
+
const INBOX_DIR = node_path_1.default.join((0, node_os_1.homedir)(), ".cockpit");
|
|
21
|
+
const INBOX_FILE = node_path_1.default.join(INBOX_DIR, "inbox.jsonl");
|
|
22
|
+
function ensureDir() {
|
|
23
|
+
if (!(0, node_fs_1.existsSync)(INBOX_DIR))
|
|
24
|
+
(0, node_fs_1.mkdirSync)(INBOX_DIR, { recursive: true });
|
|
25
|
+
}
|
|
26
|
+
function readAll() {
|
|
27
|
+
if (!(0, node_fs_1.existsSync)(INBOX_FILE))
|
|
28
|
+
return [];
|
|
29
|
+
const raw = (0, node_fs_1.readFileSync)(INBOX_FILE, "utf-8");
|
|
30
|
+
const messages = [];
|
|
31
|
+
for (const line of raw.split("\n")) {
|
|
32
|
+
if (!line.trim())
|
|
33
|
+
continue;
|
|
34
|
+
try {
|
|
35
|
+
messages.push(JSON.parse(line));
|
|
36
|
+
}
|
|
37
|
+
catch { }
|
|
38
|
+
}
|
|
39
|
+
return messages;
|
|
40
|
+
}
|
|
41
|
+
function writeAll(messages) {
|
|
42
|
+
ensureDir();
|
|
43
|
+
(0, node_fs_1.writeFileSync)(INBOX_FILE, messages.map((m) => JSON.stringify(m)).join("\n") + "\n");
|
|
44
|
+
}
|
|
45
|
+
function getInboxMessages() {
|
|
46
|
+
return readAll().sort((a, b) => b.createdAt - a.createdAt);
|
|
47
|
+
}
|
|
48
|
+
function getUnreadCount() {
|
|
49
|
+
return readAll().filter((m) => !m.read).length;
|
|
50
|
+
}
|
|
51
|
+
function addInboxMessage(msg) {
|
|
52
|
+
const messages = readAll();
|
|
53
|
+
const entry = {
|
|
54
|
+
id: (0, uuid_1.v4)(),
|
|
55
|
+
title: msg.title,
|
|
56
|
+
body: msg.body,
|
|
57
|
+
priority: msg.priority || "info",
|
|
58
|
+
jobId: msg.jobId,
|
|
59
|
+
jobName: msg.jobName,
|
|
60
|
+
runId: msg.runId,
|
|
61
|
+
createdAt: Date.now(),
|
|
62
|
+
read: false,
|
|
63
|
+
};
|
|
64
|
+
messages.push(entry);
|
|
65
|
+
writeAll(messages);
|
|
66
|
+
(0, notifications_1.dispatchNotification)({
|
|
67
|
+
title: entry.title,
|
|
68
|
+
body: entry.body,
|
|
69
|
+
priority: entry.priority,
|
|
70
|
+
source: "inbox",
|
|
71
|
+
url: `/inbox/${entry.id}`,
|
|
72
|
+
providerIds: msg.notifyProviders,
|
|
73
|
+
});
|
|
74
|
+
return entry;
|
|
75
|
+
}
|
|
76
|
+
function markRead(id) {
|
|
77
|
+
const messages = readAll();
|
|
78
|
+
const msg = messages.find((m) => m.id === id);
|
|
79
|
+
if (!msg)
|
|
80
|
+
return false;
|
|
81
|
+
msg.read = true;
|
|
82
|
+
writeAll(messages);
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
function markAllRead() {
|
|
86
|
+
const messages = readAll();
|
|
87
|
+
for (const m of messages)
|
|
88
|
+
m.read = true;
|
|
89
|
+
writeAll(messages);
|
|
90
|
+
}
|
|
91
|
+
function deleteInboxMessage(id) {
|
|
92
|
+
const messages = readAll();
|
|
93
|
+
const idx = messages.findIndex((m) => m.id === id);
|
|
94
|
+
if (idx === -1)
|
|
95
|
+
return false;
|
|
96
|
+
messages.splice(idx, 1);
|
|
97
|
+
writeAll(messages);
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
function clearInbox() {
|
|
101
|
+
writeAll([]);
|
|
102
|
+
}
|
|
103
|
+
const INBOX_BLOCK_RE = /```cockpit-inbox\s*\n([\s\S]*?)\n```/;
|
|
104
|
+
function parseInboxBlock(text) {
|
|
105
|
+
const match = INBOX_BLOCK_RE.exec(text);
|
|
106
|
+
if (!match)
|
|
107
|
+
return null;
|
|
108
|
+
try {
|
|
109
|
+
const parsed = JSON.parse(match[1]);
|
|
110
|
+
if (typeof parsed.title !== "string" || typeof parsed.body !== "string")
|
|
111
|
+
return null;
|
|
112
|
+
return { title: parsed.title, body: parsed.body, priority: parsed.priority };
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const ERROR_BLOCK_RE = /```cockpit-error\s*\n([\s\S]*?)\n```/;
|
|
119
|
+
function parseErrorBlock(text) {
|
|
120
|
+
const match = ERROR_BLOCK_RE.exec(text);
|
|
121
|
+
if (!match)
|
|
122
|
+
return null;
|
|
123
|
+
try {
|
|
124
|
+
const parsed = JSON.parse(match[1]);
|
|
125
|
+
if (typeof parsed.error !== "string")
|
|
126
|
+
return null;
|
|
127
|
+
return { error: parsed.error, details: parsed.details };
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -9,15 +9,60 @@ const node_os_1 = require("node:os");
|
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
10
|
const uuid_1 = require("uuid");
|
|
11
11
|
const cron_utils_1 = require("./cron-utils");
|
|
12
|
+
const inbox_1 = require("./inbox");
|
|
12
13
|
const job_storage_1 = require("./job-storage");
|
|
14
|
+
const transcript_1 = require("./transcript");
|
|
13
15
|
const SCRATCHPAD_DIR = node_path_1.default.join((0, node_os_1.homedir)(), ".cockpit", "jobs");
|
|
14
|
-
const
|
|
16
|
+
const JOB_PROMPT_HEADER = [
|
|
15
17
|
"You are running as an autonomous scheduled job. There is no human operator in this session.",
|
|
16
18
|
"Do not ask clarifying questions. Do not wait for user input. Make reasonable assumptions and proceed.",
|
|
17
|
-
"Complete the task fully, then stop.
|
|
19
|
+
"Complete the task fully, then stop.",
|
|
18
20
|
"",
|
|
19
|
-
"
|
|
21
|
+
"Error reporting: If you cannot complete the task due to permission errors, tool failures, missing data, or any other reason,",
|
|
22
|
+
"your final message MUST include a cockpit-error block explaining the failure.",
|
|
23
|
+
"Format it as a fenced code block tagged cockpit-error containing a JSON object:",
|
|
24
|
+
"",
|
|
25
|
+
"```cockpit-error",
|
|
26
|
+
'{"error":"Brief description of what went wrong","details":"Longer explanation of which tools failed and why"}',
|
|
27
|
+
"```",
|
|
20
28
|
].join("\n");
|
|
29
|
+
function buildJobPrompt(job) {
|
|
30
|
+
const parts = [JOB_PROMPT_HEADER, ""];
|
|
31
|
+
if (job.bypassPermissions) {
|
|
32
|
+
parts.push("Permissions: All tools and MCP servers are available.");
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
const tools = job.allowedTools || [];
|
|
36
|
+
const servers = job.mcpServers || [];
|
|
37
|
+
parts.push("Permissions: Only the tools and MCP servers listed below are allowed. Do not attempt to use any others.");
|
|
38
|
+
if (tools.length > 0)
|
|
39
|
+
parts.push(`Allowed tools: ${tools.join(", ")}`);
|
|
40
|
+
if (servers.length > 0)
|
|
41
|
+
parts.push(`Allowed MCP servers: ${servers.join(", ")}`);
|
|
42
|
+
if (tools.length === 0 && servers.length === 0)
|
|
43
|
+
parts.push("No tools or MCP servers are allowed.");
|
|
44
|
+
}
|
|
45
|
+
if (job.cwd) {
|
|
46
|
+
const storageDir = node_path_1.default.join(SCRATCHPAD_DIR, job.id);
|
|
47
|
+
parts.push("");
|
|
48
|
+
parts.push(`Storage: If you need to persist any files between runs (state, cache, data), save them in ${storageDir}`);
|
|
49
|
+
parts.push("Do not store persistent files in the working directory as it is a git repository.");
|
|
50
|
+
}
|
|
51
|
+
if (job.inboxOutput) {
|
|
52
|
+
parts.push("");
|
|
53
|
+
parts.push("Output: When you have results to report, include a cockpit-inbox block in your final message.");
|
|
54
|
+
parts.push("If there is nothing to report (e.g. no new data to process), do NOT include an inbox block.");
|
|
55
|
+
parts.push("Format it as a fenced code block tagged cockpit-inbox containing a JSON object:");
|
|
56
|
+
parts.push("");
|
|
57
|
+
parts.push("```cockpit-inbox");
|
|
58
|
+
parts.push(JSON.stringify({ title: "Short descriptive title", body: "Markdown body with your full output", priority: "info" }));
|
|
59
|
+
parts.push("```");
|
|
60
|
+
parts.push("");
|
|
61
|
+
parts.push('The body field supports full markdown. Set priority to "info", "warning", or "error" as appropriate.');
|
|
62
|
+
}
|
|
63
|
+
parts.push("", "Task:", job.prompt);
|
|
64
|
+
return parts.join("\n");
|
|
65
|
+
}
|
|
21
66
|
const SHELL_OPERATORS = /(?:;|&&|\|\||>|<|`|\$\(|<\()/;
|
|
22
67
|
const BACKGROUND_AMPERSAND = /(?:^|[^|])&(?!&)/;
|
|
23
68
|
function hasShellOperators(cmd) {
|
|
@@ -53,33 +98,41 @@ function isToolAllowed(toolName, toolInput, rules) {
|
|
|
53
98
|
}
|
|
54
99
|
return false;
|
|
55
100
|
}
|
|
101
|
+
function normalizeMcpName(name) {
|
|
102
|
+
return name.replace(/[^a-zA-Z0-9]/g, "_");
|
|
103
|
+
}
|
|
56
104
|
function isMcpToolAllowed(toolName, toolInput, enabledServers, mcpToolFilters) {
|
|
57
|
-
|
|
58
|
-
if (!match)
|
|
105
|
+
if (!toolName.startsWith("mcp__"))
|
|
59
106
|
return null;
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (
|
|
107
|
+
const remainder = toolName.slice(5);
|
|
108
|
+
for (const serverName of enabledServers) {
|
|
109
|
+
const normalized = normalizeMcpName(serverName);
|
|
110
|
+
const prefix = `${normalized}__`;
|
|
111
|
+
if (!remainder.startsWith(prefix))
|
|
112
|
+
continue;
|
|
113
|
+
const tool = remainder.slice(prefix.length);
|
|
114
|
+
if (!mcpToolFilters || !(serverName in mcpToolFilters))
|
|
68
115
|
return true;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
116
|
+
const filters = mcpToolFilters[serverName];
|
|
117
|
+
for (const filter of filters) {
|
|
118
|
+
if (filter === tool)
|
|
119
|
+
return true;
|
|
120
|
+
if (filter.includes(":")) {
|
|
121
|
+
let parsed;
|
|
122
|
+
try {
|
|
123
|
+
parsed = JSON.parse(toolInput);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
const [filterServer, filterTool] = filter.split(":", 2);
|
|
129
|
+
if (parsed.server === filterServer) {
|
|
130
|
+
if (filterTool === "*" || parsed.tool === filterTool)
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
81
133
|
}
|
|
82
134
|
}
|
|
135
|
+
return false;
|
|
83
136
|
}
|
|
84
137
|
return false;
|
|
85
138
|
}
|
|
@@ -119,17 +172,20 @@ class JobScheduler {
|
|
|
119
172
|
}
|
|
120
173
|
recoverState() {
|
|
121
174
|
(0, job_storage_1.pruneAllRuns)();
|
|
175
|
+
const now = Date.now();
|
|
122
176
|
const jobs = (0, job_storage_1.loadJobs)();
|
|
123
177
|
for (const job of jobs) {
|
|
124
178
|
const latest = (0, job_storage_1.getLatestRun)(job.id);
|
|
125
179
|
if (latest) {
|
|
126
180
|
this.lastFiredAt.set(job.id, new Date(latest.startedAt));
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
181
|
+
}
|
|
182
|
+
for (const run of (0, job_storage_1.loadRuns)(job.id)) {
|
|
183
|
+
if (run.status === "running") {
|
|
184
|
+
run.status = "failure";
|
|
185
|
+
run.error = "Server restarted while job was running";
|
|
186
|
+
run.completedAt = now;
|
|
187
|
+
run.durationMs = now - run.startedAt;
|
|
188
|
+
(0, job_storage_1.saveRun)(run);
|
|
133
189
|
}
|
|
134
190
|
}
|
|
135
191
|
}
|
|
@@ -142,6 +198,19 @@ class JobScheduler {
|
|
|
142
198
|
this.lastPruneAt = nowMs;
|
|
143
199
|
(0, job_storage_1.pruneAllRuns)();
|
|
144
200
|
}
|
|
201
|
+
for (const [jobId, run] of this.runningJobs) {
|
|
202
|
+
if (!this.sessionManager.hasRunningProcess(run.sessionId)) {
|
|
203
|
+
console.log(`[scheduler] run ${run.id} for job ${jobId} has no running process, marking as failure`);
|
|
204
|
+
run.status = "failure";
|
|
205
|
+
run.error = "Session process exited unexpectedly";
|
|
206
|
+
run.completedAt = Date.now();
|
|
207
|
+
run.durationMs = run.completedAt - run.startedAt;
|
|
208
|
+
if (run.cwd)
|
|
209
|
+
run.messageCount = (0, transcript_1.countTranscriptMessages)(run.sessionId, run.cwd);
|
|
210
|
+
(0, job_storage_1.saveRun)(run);
|
|
211
|
+
this.runningJobs.delete(jobId);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
145
214
|
const jobs = (0, job_storage_1.loadJobs)();
|
|
146
215
|
for (const job of jobs) {
|
|
147
216
|
if (!job.enabled)
|
|
@@ -175,11 +244,11 @@ class JobScheduler {
|
|
|
175
244
|
}
|
|
176
245
|
async executeJob(job) {
|
|
177
246
|
const runId = (0, uuid_1.v4)();
|
|
178
|
-
const jobCwd = job.cwd || SCRATCHPAD_DIR;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
247
|
+
const jobCwd = job.cwd || node_path_1.default.join(SCRATCHPAD_DIR, job.id);
|
|
248
|
+
(0, node_fs_1.mkdirSync)(node_path_1.default.join(SCRATCHPAD_DIR, job.id), { recursive: true });
|
|
249
|
+
const sessionInfo = this.sessionManager.createSession(jobCwd, `[job] ${job.name}`, {
|
|
250
|
+
bypassPermissions: !!job.bypassPermissions,
|
|
251
|
+
});
|
|
183
252
|
const sessionId = sessionInfo.id;
|
|
184
253
|
const run = {
|
|
185
254
|
id: runId,
|
|
@@ -195,6 +264,7 @@ class JobScheduler {
|
|
|
195
264
|
(0, job_storage_1.saveRun)(run);
|
|
196
265
|
this.runningJobs.set(job.id, run);
|
|
197
266
|
const toolTracker = new Map();
|
|
267
|
+
let lastAssistantText = "";
|
|
198
268
|
const unsubEvent = this.sessionManager.subscribe(sessionId, (event) => {
|
|
199
269
|
if (event.type === "tool_use_start" && event.toolId) {
|
|
200
270
|
toolTracker.set(event.toolId, {
|
|
@@ -215,14 +285,29 @@ class JobScheduler {
|
|
|
215
285
|
}
|
|
216
286
|
else if (event.type === "message_done") {
|
|
217
287
|
run.messageCount++;
|
|
288
|
+
if (event.message) {
|
|
289
|
+
let text = event.message.content;
|
|
290
|
+
if (!text && event.message.blocks) {
|
|
291
|
+
text = event.message.blocks
|
|
292
|
+
.filter((b) => b.type === "text")
|
|
293
|
+
.map((b) => b.text)
|
|
294
|
+
.join("\n");
|
|
295
|
+
}
|
|
296
|
+
if (text)
|
|
297
|
+
lastAssistantText = text;
|
|
298
|
+
}
|
|
218
299
|
}
|
|
219
300
|
else if (event.type === "permission_request" && event.requestId) {
|
|
220
|
-
if (
|
|
301
|
+
if (job.bypassPermissions) {
|
|
302
|
+
this.sessionManager.respondToPermission(sessionId, event.requestId, true, event.rawToolInput);
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
221
305
|
const toolName = event.toolName || "unknown";
|
|
222
306
|
const inputStr = event.toolInput || "";
|
|
223
307
|
const mcpResult = isMcpToolAllowed(toolName, inputStr, enabledServers, job.mcpToolFilters);
|
|
224
308
|
const allowed = mcpResult !== null ? mcpResult : isToolAllowed(toolName, inputStr, job.allowedTools || []);
|
|
225
|
-
|
|
309
|
+
console.log(`[scheduler] permission: ${toolName} mcpResult=${mcpResult} allowed=${allowed} servers=[${[...enabledServers]}]`);
|
|
310
|
+
this.sessionManager.respondToPermission(sessionId, event.requestId, allowed, allowed ? (event.rawToolInput ?? {}) : undefined);
|
|
226
311
|
const permEntry = {
|
|
227
312
|
name: toolName,
|
|
228
313
|
input: inputStr,
|
|
@@ -272,18 +357,45 @@ class JobScheduler {
|
|
|
272
357
|
unsubStatus?.();
|
|
273
358
|
unsubError?.();
|
|
274
359
|
initCleanup?.();
|
|
275
|
-
run.status = finalStatus;
|
|
276
360
|
run.completedAt = Date.now();
|
|
277
361
|
run.durationMs = run.completedAt - run.startedAt;
|
|
278
362
|
if (finalStatus === "timeout") {
|
|
279
363
|
run.error = `Exceeded max duration of ${job.maxDurationMinutes || 30} minutes`;
|
|
280
364
|
this.sessionManager.destroySession(sessionId);
|
|
281
365
|
}
|
|
366
|
+
if (finalStatus === "success" && lastAssistantText) {
|
|
367
|
+
const errorBlock = (0, inbox_1.parseErrorBlock)(lastAssistantText);
|
|
368
|
+
if (errorBlock) {
|
|
369
|
+
finalStatus = "failure";
|
|
370
|
+
run.error = errorBlock.details ? `${errorBlock.error}: ${errorBlock.details}` : errorBlock.error;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
run.status = finalStatus;
|
|
374
|
+
const transcriptCount = (0, transcript_1.countTranscriptMessages)(sessionId, jobCwd);
|
|
375
|
+
if (transcriptCount > run.messageCount)
|
|
376
|
+
run.messageCount = transcriptCount;
|
|
282
377
|
(0, job_storage_1.saveRun)(run);
|
|
378
|
+
if (job.inboxOutput && lastAssistantText) {
|
|
379
|
+
const inbox = (0, inbox_1.parseInboxBlock)(lastAssistantText);
|
|
380
|
+
if (inbox) {
|
|
381
|
+
(0, inbox_1.addInboxMessage)({ ...inbox, jobId: job.id, jobName: job.name, runId: run.id, notifyProviders: job.notifyProviders });
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
if (finalStatus === "failure" || finalStatus === "timeout") {
|
|
385
|
+
(0, inbox_1.addInboxMessage)({
|
|
386
|
+
title: `Job failed: ${job.name}`,
|
|
387
|
+
body: `**Status:** ${finalStatus}\n\n${run.error || "Job failed with no error message"}`,
|
|
388
|
+
priority: "error",
|
|
389
|
+
jobId: job.id,
|
|
390
|
+
jobName: job.name,
|
|
391
|
+
runId: run.id,
|
|
392
|
+
notifyProviders: job.notifyProviders,
|
|
393
|
+
});
|
|
394
|
+
}
|
|
283
395
|
this.runningJobs.delete(job.id);
|
|
284
396
|
resolve(run);
|
|
285
397
|
};
|
|
286
|
-
this.sessionManager.sendMessage(sessionId,
|
|
398
|
+
this.sessionManager.sendMessage(sessionId, buildJobPrompt(job));
|
|
287
399
|
});
|
|
288
400
|
}
|
|
289
401
|
}
|
|
@@ -120,16 +120,13 @@ function getLatestRun(jobId) {
|
|
|
120
120
|
return undefined;
|
|
121
121
|
return runs.reduce((latest, r) => (r.startedAt > latest.startedAt ? r : latest));
|
|
122
122
|
}
|
|
123
|
-
function getRecentFailureCount(
|
|
123
|
+
function getRecentFailureCount() {
|
|
124
124
|
const jobs = loadJobs();
|
|
125
|
-
const cutoff = Date.now() - withinMs;
|
|
126
125
|
let count = 0;
|
|
127
126
|
for (const job of jobs) {
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
count++;
|
|
132
|
-
}
|
|
127
|
+
const latest = getLatestRun(job.id);
|
|
128
|
+
if (latest && (latest.status === "failure" || latest.status === "timeout")) {
|
|
129
|
+
count++;
|
|
133
130
|
}
|
|
134
131
|
}
|
|
135
132
|
return count;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNotificationSettings = getNotificationSettings;
|
|
4
|
+
exports.setNotificationSettings = setNotificationSettings;
|
|
5
|
+
exports.updateNotificationSettings = updateNotificationSettings;
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const node_os_1 = require("node:os");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
const CONFIG_DIR = (0, node_path_1.join)((0, node_os_1.homedir)(), ".cockpit");
|
|
10
|
+
const CONFIG_FILE = (0, node_path_1.join)(CONFIG_DIR, "notifications.json");
|
|
11
|
+
const fallback = {
|
|
12
|
+
providers: [],
|
|
13
|
+
};
|
|
14
|
+
function getNotificationSettings() {
|
|
15
|
+
try {
|
|
16
|
+
return { ...fallback, ...JSON.parse((0, node_fs_1.readFileSync)(CONFIG_FILE, "utf-8")) };
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return { ...fallback };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function setNotificationSettings(settings) {
|
|
23
|
+
try {
|
|
24
|
+
(0, node_fs_1.mkdirSync)(CONFIG_DIR, { recursive: true });
|
|
25
|
+
(0, node_fs_1.writeFileSync)(CONFIG_FILE, JSON.stringify(settings, null, 2) + "\n");
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// best effort
|
|
29
|
+
}
|
|
30
|
+
return settings;
|
|
31
|
+
}
|
|
32
|
+
function updateNotificationSettings(partial) {
|
|
33
|
+
const current = getNotificationSettings();
|
|
34
|
+
const updated = { ...current, ...partial };
|
|
35
|
+
if (!(0, node_fs_1.existsSync)(CONFIG_DIR))
|
|
36
|
+
(0, node_fs_1.mkdirSync)(CONFIG_DIR, { recursive: true });
|
|
37
|
+
(0, node_fs_1.writeFileSync)(CONFIG_FILE, JSON.stringify(updated, null, 2) + "\n");
|
|
38
|
+
return updated;
|
|
39
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dispatchNotification = dispatchNotification;
|
|
4
|
+
exports.sendTestNotification = sendTestNotification;
|
|
5
|
+
const notification_settings_1 = require("./notification-settings");
|
|
6
|
+
function buildFullUrl(path, baseUrl) {
|
|
7
|
+
if (!path)
|
|
8
|
+
return undefined;
|
|
9
|
+
if (baseUrl)
|
|
10
|
+
return `${baseUrl.replace(/\/$/, "")}${path}`;
|
|
11
|
+
return path;
|
|
12
|
+
}
|
|
13
|
+
function formatPlainMessage(payload, baseUrl) {
|
|
14
|
+
const priorityTag = payload.priority === "error" ? "[ERROR]" : payload.priority === "warning" ? "[WARN]" : "";
|
|
15
|
+
const prefix = priorityTag ? `${priorityTag} ` : "";
|
|
16
|
+
const url = buildFullUrl(payload.url, baseUrl);
|
|
17
|
+
const link = url ? `\n\n${url}` : "";
|
|
18
|
+
return `${prefix}${payload.title}\n\n${payload.body}${link}`;
|
|
19
|
+
}
|
|
20
|
+
const telegramProvider = {
|
|
21
|
+
async send(payload, config, baseUrl) {
|
|
22
|
+
const text = formatPlainMessage(payload, baseUrl);
|
|
23
|
+
const url = `https://api.telegram.org/bot${config.botToken}/sendMessage`;
|
|
24
|
+
const res = await fetch(url, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
headers: { "Content-Type": "application/json" },
|
|
27
|
+
body: JSON.stringify({
|
|
28
|
+
chat_id: config.chatId,
|
|
29
|
+
text,
|
|
30
|
+
disable_web_page_preview: true,
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
33
|
+
if (!res.ok) {
|
|
34
|
+
const body = await res.text();
|
|
35
|
+
throw new Error(`Telegram API ${res.status}: ${body}`);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const ntfyProvider = {
|
|
40
|
+
async send(payload, config, baseUrl) {
|
|
41
|
+
const serverUrl = (config.serverUrl || "https://ntfy.sh").replace(/\/$/, "");
|
|
42
|
+
const url = `${serverUrl}/${config.topic}`;
|
|
43
|
+
const fullUrl = buildFullUrl(payload.url, baseUrl);
|
|
44
|
+
const headers = {
|
|
45
|
+
Title: payload.title,
|
|
46
|
+
Priority: payload.priority === "error" ? "urgent" : payload.priority === "warning" ? "high" : "default",
|
|
47
|
+
};
|
|
48
|
+
if (config.token) {
|
|
49
|
+
headers.Authorization = `Bearer ${config.token}`;
|
|
50
|
+
}
|
|
51
|
+
if (fullUrl) {
|
|
52
|
+
headers.Click = fullUrl;
|
|
53
|
+
}
|
|
54
|
+
const res = await fetch(url, {
|
|
55
|
+
method: "POST",
|
|
56
|
+
headers,
|
|
57
|
+
body: payload.body,
|
|
58
|
+
});
|
|
59
|
+
if (!res.ok) {
|
|
60
|
+
const body = await res.text();
|
|
61
|
+
throw new Error(`ntfy ${res.status}: ${body}`);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
function getProvider(type) {
|
|
66
|
+
switch (type) {
|
|
67
|
+
case "telegram":
|
|
68
|
+
return telegramProvider;
|
|
69
|
+
case "ntfy":
|
|
70
|
+
return ntfyProvider;
|
|
71
|
+
default:
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function matchesFilter(entry, payload) {
|
|
76
|
+
if (!entry.filter)
|
|
77
|
+
return true;
|
|
78
|
+
if (entry.filter.priorities?.length && !entry.filter.priorities.includes(payload.priority)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (entry.filter.sources?.length && !entry.filter.sources.includes(payload.source)) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
function dispatchNotification(payload) {
|
|
87
|
+
const settings = (0, notification_settings_1.getNotificationSettings)();
|
|
88
|
+
for (const entry of settings.providers) {
|
|
89
|
+
if (!entry.enabled)
|
|
90
|
+
continue;
|
|
91
|
+
if (payload.providerIds) {
|
|
92
|
+
if (!payload.providerIds.includes(entry.id))
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
if (!matchesFilter(entry, payload))
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const provider = getProvider(entry.type);
|
|
100
|
+
if (!provider)
|
|
101
|
+
continue;
|
|
102
|
+
provider.send(payload, entry.config, settings.baseUrl).catch((err) => {
|
|
103
|
+
console.error(`[notifications] ${entry.type}/${entry.name} failed:`, err);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async function sendTestNotification(entry, baseUrl) {
|
|
108
|
+
const provider = getProvider(entry.type);
|
|
109
|
+
if (!provider)
|
|
110
|
+
return `Unknown provider type: ${entry.type}`;
|
|
111
|
+
const payload = {
|
|
112
|
+
title: "Cockpit Test Notification",
|
|
113
|
+
body: "This is a test notification from Cockpit.",
|
|
114
|
+
priority: "info",
|
|
115
|
+
source: "test",
|
|
116
|
+
url: "/inbox",
|
|
117
|
+
};
|
|
118
|
+
try {
|
|
119
|
+
await provider.send(payload, entry.config, baseUrl);
|
|
120
|
+
return "ok";
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
return `Failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
124
|
+
}
|
|
125
|
+
}
|