@surething/cockpit 1.0.219 → 1.0.221
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-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +2 -2
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page.js +1 -1
- package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +1 -1
- package/.next-prod/server/app/_not-found.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +2 -2
- package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js +2 -2
- package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js +2 -2
- package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js +2 -2
- package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/pty-input/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/route.js +4 -2
- package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/commands/route.js +1 -1
- package/.next-prod/server/app/api/commands/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next-prod/server/app/page.js +1 -1
- package/.next-prod/server/app/page.js.nft.json +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js +1 -1
- package/.next-prod/server/app/project/page.js.nft.json +1 -1
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page.js +1 -1
- package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +2 -2
- package/.next-prod/server/chunks/{1921.js → 3408.js} +2 -2
- package/.next-prod/server/chunks/3863.js +2 -2
- package/.next-prod/server/chunks/8555.js +836 -0
- package/.next-prod/server/chunks/8916.js +1 -1
- package/.next-prod/server/chunks/9658.js +6 -6
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +1 -1
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/{5204-babf0d0290febbec.js → 2759-50f11ab1460db5e0.js} +2 -2
- package/.next-prod/static/chunks/6345-bab6a02df39cb716.js +14 -0
- package/.next-prod/static/chunks/9403-de4673c851686913.js +29 -0
- package/.next-prod/static/chunks/app/{layout-a21c32c2b18fbae2.js → layout-de73b7c59e956b47.js} +1 -1
- package/.next-prod/static/chunks/app/{page-c5dc8ea6f9fc740b.js → page-d539c7c36a32fd49.js} +1 -1
- package/.next-prod/static/chunks/app/project/{page-c5dc8ea6f9fc740b.js → page-d539c7c36a32fd49.js} +1 -1
- package/.next-prod/trace +13 -13
- package/.next-prod/trace-build +1 -1
- package/README.md +2 -1
- package/README.zh.md +2 -1
- package/dist/{chunk-O4P2J44N.mjs → chunk-4S74IEU4.mjs} +1 -1
- package/dist/{chunk-GCYLMG43.mjs → chunk-6BFKFQG5.mjs} +7 -0
- package/dist/{chunk-WOM47O75.mjs → chunk-ICB7IS3A.mjs} +1 -1
- package/dist/httpApi.mjs +2 -2
- package/dist/scheduledTasks.mjs +74 -14
- package/dist/{server-SNB4H35J.mjs → server-Z6V4HKGV.mjs} +2 -2
- package/dist/wsServer.mjs +14 -4
- package/package.json +1 -1
- package/.next-prod/server/chunks/9877.js +0 -511
- package/.next-prod/static/chunks/6321-a2227f1f162bd000.js +0 -29
- package/.next-prod/static/chunks/6345-d9033e1e3d07c277.js +0 -14
- /package/.next-prod/static/{2xsVtkHy1Q-18e5b3DPua → QNr0r0SO5D70hTak_CnhT}/_buildManifest.js +0 -0
- /package/.next-prod/static/{2xsVtkHy1Q-18e5b3DPua → QNr0r0SO5D70hTak_CnhT}/_ssgManifest.js +0 -0
package/.next-prod/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":20779307,"timestamp":210722173,"id":14,"parentId":1,"tags":{},"startTime":1781283743366,"traceId":"de7a9f0cc4e0ee72"},{"name":"run-typescript","duration":16955561,"timestamp":231511781,"id":1528,"parentId":1,"tags":{},"startTime":1781283764155,"traceId":"de7a9f0cc4e0ee72"},{"name":"static-check","duration":1121392,"timestamp":248512898,"id":1531,"parentId":1,"tags":{},"startTime":1781283781157,"traceId":"de7a9f0cc4e0ee72"},{"name":"static-generation","duration":6044407,"timestamp":249734514,"id":1789,"parentId":1,"tags":{},"startTime":1781283782378,"traceId":"de7a9f0cc4e0ee72"},{"name":"collect-build-traces","duration":19091678,"timestamp":249634994,"id":1786,"parentId":1,"tags":{},"startTime":1781283782279,"traceId":"de7a9f0cc4e0ee72"},{"name":"telemetry-flush","duration":56,"timestamp":268730646,"id":1798,"parentId":1,"tags":{},"startTime":1781283801374,"traceId":"de7a9f0cc4e0ee72"},{"name":"next-build","duration":58175017,"timestamp":210555698,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1781283743199,"traceId":"de7a9f0cc4e0ee72"}]
|
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ Cockpit is the instrument panel. It does **not** replace Claude Code; it stands
|
|
|
49
49
|
| Agent can't reach your browser / DB | **Smart Bubbles**: Chrome, PostgreSQL, MySQL, Redis — drivable by the agent |
|
|
50
50
|
| Reading an unfamiliar repo means a 90-min file-tree scavenger hunt | **Code Map** chip view — caller / callee pins, click to walk the call graph |
|
|
51
51
|
| Reviewing AI output is friction | **LAN-shared review pages**, line-level comments, send any comment back as AI context |
|
|
52
|
-
| Same "do X but don't change code" prompt every day | **Slash modes** `/qa /fx /ex /go /cg /cc` + custom `SKILL.md` via the Skills sidebar |
|
|
52
|
+
| Same "do X but don't change code" prompt every day | **Slash modes** `/qa /fx /ex /go /cg /cc /cr` + custom `SKILL.md` via the Skills sidebar |
|
|
53
53
|
| No automation hooks | One-time / interval / cron-based **scheduled tasks** |
|
|
54
54
|
| "Cloud relay" trust concerns | **Fully local**. No telemetry. Keys (Codex / DeepSeek / Kimi) stay in `~/.cockpit/settings.json` on your laptop. |
|
|
55
55
|
|
|
@@ -107,6 +107,7 @@ Cockpit is the instrument panel. It does **not** replace Claude Code; it stands
|
|
|
107
107
|
- `/go` — **Land**: take a converged plan, slice into MVP stages, write + self-verify per stage, recap at end
|
|
108
108
|
- `/cg` — **CodeGraph** project exploration: 10 HTTP endpoints for symbol / callers / impact / co-edit / risk / affected queries (precise where grep is fuzzy)
|
|
109
109
|
- `/cc` — **Cockpit CLI**: drive the cockpit CLI surface — codegraph subcommands, terminal observation, browser automation
|
|
110
|
+
- `/cr` — **Code review**: full PR review — static triangulation (intent / input domain / surroundings) + dynamic modelling (state diagram + timeline → 6 risk classes), findings ranked by impact × probability
|
|
110
111
|
- **Custom**: drop any `SKILL.md` and add it via the Skills sidebar — it auto-appears in the slash autocomplete menu (see [Skills](#skills--extensibility))
|
|
111
112
|
|
|
112
113
|
### Scheduled tasks — Cron for AI
|
package/README.zh.md
CHANGED
|
@@ -49,7 +49,7 @@ Cockpit 就是那个仪表盘。它**不替代** Claude Code,而是站在官
|
|
|
49
49
|
| Agent 够不到浏览器 / 数据库 | **智能气泡**:Chrome、PostgreSQL、MySQL、Redis —— Agent 可驱动 |
|
|
50
50
|
| 读陌生仓库就是 90 分钟"找地鼠" | **代码地图(Code Map)** chip 视图 —— caller / callee pin 一点即跳 |
|
|
51
51
|
| AI 输出审阅低效 | **局域网共享评审页**、行级评论、任意评论可回喂给 AI |
|
|
52
|
-
| 每天写一遍"做 X 但不要动代码" | **斜杠模式** `/qa /fx /ex /go /cg /cc` + 通过 Skills 侧边栏自定义 `SKILL.md` |
|
|
52
|
+
| 每天写一遍"做 X 但不要动代码" | **斜杠模式** `/qa /fx /ex /go /cg /cc /cr` + 通过 Skills 侧边栏自定义 `SKILL.md` |
|
|
53
53
|
| 没有自动化触发器 | 一次性 / 间隔 / **Cron** **定时任务** |
|
|
54
54
|
| 担心"云端中转" | **完全本地**。无遥测,Codex / DeepSeek / Kimi 的 Key 仅存在本机 `~/.cockpit/settings.json` |
|
|
55
55
|
|
|
@@ -107,6 +107,7 @@ Cockpit 就是那个仪表盘。它**不替代** Claude Code,而是站在官
|
|
|
107
107
|
- `/go` —— **落地**:把收敛后的方案切成 MVP 阶段,每阶段自运行验证,最后端到端回看
|
|
108
108
|
- `/cg` —— **CodeGraph 项目探索**:10 个 HTTP 接口按符号 / 调用关系 / 影响范围 / 协同编辑 / 风险 / 受影响测试精确查询(比 grep 精准)
|
|
109
109
|
- `/cc` —— **Cockpit CLI**:驾驭 cockpit 命令行 —— codegraph 子命令、terminal 观察、browser 自动化
|
|
110
|
+
- `/cr` —— **代码审查**:完整 PR 审查 —— 静态三角校验(意图 / 输入域 / 周遭)+ 动态推演(状态图 + 时间线 → 6 类风险),按 影响 × 概率 排序输出 findings
|
|
110
111
|
- **自定义**:任意 `SKILL.md` 通过 Skills 侧边栏添加 —— 自动出现在斜杠补全菜单(见 [Skills](#skills--可扩展性))
|
|
111
112
|
|
|
112
113
|
### 定时任务 —— 给 AI 的 Cron
|
|
@@ -28724,6 +28724,12 @@ function getClaude2ProjectDir(cwd) {
|
|
|
28724
28724
|
function getClaude2SessionPath(cwd, sessionId) {
|
|
28725
28725
|
return join4(getClaude2ProjectDir(cwd), `${sessionId}.jsonl`);
|
|
28726
28726
|
}
|
|
28727
|
+
function getDeepseekProjectDir(cwd) {
|
|
28728
|
+
return join4(DEEPSEEK_PROJECTS_DIR, encodePath(cwd));
|
|
28729
|
+
}
|
|
28730
|
+
function getDeepseekSessionPath(cwd, sessionId) {
|
|
28731
|
+
return join4(getDeepseekProjectDir(cwd), `${sessionId}.jsonl`);
|
|
28732
|
+
}
|
|
28727
28733
|
function getOllamaSessionsDir(cwd) {
|
|
28728
28734
|
return join4(COCKPIT_DIR, "ollama-sessions", encodePath(cwd));
|
|
28729
28735
|
}
|
|
@@ -29905,6 +29911,7 @@ export {
|
|
|
29905
29911
|
getBubbleOrderPath,
|
|
29906
29912
|
getClaudeSessionPath,
|
|
29907
29913
|
getClaude2SessionPath,
|
|
29914
|
+
getDeepseekSessionPath,
|
|
29908
29915
|
getOllamaSessionPath,
|
|
29909
29916
|
findCodexSessionPath,
|
|
29910
29917
|
findKimiSessionPath,
|
package/dist/httpApi.mjs
CHANGED
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
unregisterBrowser,
|
|
22
22
|
unregisterTerminal,
|
|
23
23
|
writeStdinToCommand
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ICB7IS3A.mjs";
|
|
25
25
|
import {
|
|
26
26
|
getTerminalHistoryPath
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-6BFKFQG5.mjs";
|
|
28
28
|
import "./chunk-7P6ASYW6.mjs";
|
|
29
29
|
|
|
30
30
|
// src/lib/httpApi.ts
|
package/dist/scheduledTasks.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSessionTitle,
|
|
3
3
|
updateGlobalState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4S74IEU4.mjs";
|
|
5
5
|
import {
|
|
6
6
|
AgentError,
|
|
7
7
|
AppRuntime,
|
|
@@ -9,12 +9,19 @@ import {
|
|
|
9
9
|
CockpitConfig,
|
|
10
10
|
Effect_exports,
|
|
11
11
|
SCHEDULED_TASKS_FILE,
|
|
12
|
+
findCodexSessionPath,
|
|
13
|
+
findKimiSessionPath,
|
|
14
|
+
getClaude2SessionPath,
|
|
15
|
+
getClaudeSessionPath,
|
|
16
|
+
getDeepseekSessionPath,
|
|
17
|
+
getOllamaSessionPath,
|
|
12
18
|
readJsonFile,
|
|
13
19
|
writeJsonFile
|
|
14
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6BFKFQG5.mjs";
|
|
15
21
|
import "./chunk-7P6ASYW6.mjs";
|
|
16
22
|
|
|
17
23
|
// packages/feature/agent/src/server/scheduledTasks.ts
|
|
24
|
+
import { existsSync } from "fs";
|
|
18
25
|
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
19
26
|
function parseCronField(field, min, max) {
|
|
20
27
|
const values = [];
|
|
@@ -60,7 +67,7 @@ function getNextCronTime(cronExpr, after = /* @__PURE__ */ new Date()) {
|
|
|
60
67
|
}
|
|
61
68
|
return after.getTime() + 864e5;
|
|
62
69
|
}
|
|
63
|
-
var
|
|
70
|
+
var sendClaudeMessageEff = (task) => {
|
|
64
71
|
const options = {
|
|
65
72
|
resume: task.sessionId,
|
|
66
73
|
cwd: task.cwd,
|
|
@@ -127,18 +134,71 @@ var sendChatMessageEff = (task) => {
|
|
|
127
134
|
() => updateGlobalState(task.cwd, task.sessionId, "unread", title)
|
|
128
135
|
).pipe(Effect_exports.orElse(() => Effect_exports.void));
|
|
129
136
|
return true;
|
|
130
|
-
})
|
|
131
|
-
Effect_exports.catchAll(
|
|
132
|
-
(err) => Effect_exports.gen(function* () {
|
|
133
|
-
console.error(`[ScheduledTask] Failed to send message for task ${task.id}:`, err);
|
|
134
|
-
yield* Effect_exports.tryPromise(
|
|
135
|
-
() => updateGlobalState(task.cwd, task.sessionId, "unread")
|
|
136
|
-
).pipe(Effect_exports.orElse(() => Effect_exports.void));
|
|
137
|
-
return false;
|
|
138
|
-
})
|
|
139
|
-
)
|
|
140
|
-
);
|
|
137
|
+
});
|
|
141
138
|
};
|
|
139
|
+
var sendHttpEngineMessageEff = (task, engine) => Effect_exports.tryPromise({
|
|
140
|
+
try: async () => {
|
|
141
|
+
const res = await fetch(`http://127.0.0.1:${task.port}/api/chat/${engine}`, {
|
|
142
|
+
method: "POST",
|
|
143
|
+
headers: { "Content-Type": "application/json" },
|
|
144
|
+
body: JSON.stringify({
|
|
145
|
+
prompt: task.message,
|
|
146
|
+
sessionId: task.sessionId,
|
|
147
|
+
cwd: task.cwd,
|
|
148
|
+
...task.model && { model: task.model }
|
|
149
|
+
})
|
|
150
|
+
});
|
|
151
|
+
if (!res.ok || !res.body) {
|
|
152
|
+
throw new Error(`${engine} chat route responded ${res.status}`);
|
|
153
|
+
}
|
|
154
|
+
const reader = res.body.getReader();
|
|
155
|
+
while (!(await reader.read()).done) {
|
|
156
|
+
}
|
|
157
|
+
return true;
|
|
158
|
+
},
|
|
159
|
+
catch: (cause) => new AgentError({ provider: engine, kind: "unknown", cause })
|
|
160
|
+
});
|
|
161
|
+
function sessionPathFor(engine, task) {
|
|
162
|
+
if (engine === "claude2") return getClaude2SessionPath(task.cwd, task.sessionId);
|
|
163
|
+
if (engine === "ollama") return getOllamaSessionPath(task.cwd, task.sessionId);
|
|
164
|
+
if (engine === "deepseek") return getDeepseekSessionPath(task.cwd, task.sessionId);
|
|
165
|
+
if (engine === "codex") return findCodexSessionPath(task.sessionId);
|
|
166
|
+
if (engine === "kimi") return findKimiSessionPath(task.sessionId);
|
|
167
|
+
return getClaudeSessionPath(task.cwd, task.sessionId);
|
|
168
|
+
}
|
|
169
|
+
var sendChatMessageEff = (task) => Effect_exports.gen(function* () {
|
|
170
|
+
const engine = task.engine ?? "claude";
|
|
171
|
+
if (!["claude", "claude2", "ollama", "codex", "kimi", "deepseek"].includes(engine)) {
|
|
172
|
+
return yield* Effect_exports.fail(
|
|
173
|
+
new AgentError({
|
|
174
|
+
provider: "claude",
|
|
175
|
+
kind: "unsupported-engine",
|
|
176
|
+
cause: new Error(`scheduled tasks not supported for engine '${engine}' (task ${task.id})`)
|
|
177
|
+
})
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
const sessionPath = sessionPathFor(engine, task);
|
|
181
|
+
if (!sessionPath || !existsSync(sessionPath)) {
|
|
182
|
+
return yield* Effect_exports.fail(
|
|
183
|
+
new AgentError({
|
|
184
|
+
provider: engine === "claude2" ? "claude" : engine,
|
|
185
|
+
kind: "session-not-found",
|
|
186
|
+
cause: new Error(`session file missing: ${sessionPath ?? `(no session for ${task.sessionId})`} (task ${task.id}, engine ${engine})`)
|
|
187
|
+
})
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
return engine === "claude" || engine === "claude2" ? yield* sendClaudeMessageEff(task) : yield* sendHttpEngineMessageEff(task, engine);
|
|
191
|
+
}).pipe(
|
|
192
|
+
Effect_exports.catchAll(
|
|
193
|
+
(err) => Effect_exports.gen(function* () {
|
|
194
|
+
console.error(`[ScheduledTask] Failed to send message for task ${task.id}:`, err);
|
|
195
|
+
yield* Effect_exports.tryPromise(
|
|
196
|
+
() => updateGlobalState(task.cwd, task.sessionId, "unread")
|
|
197
|
+
).pipe(Effect_exports.orElse(() => Effect_exports.void));
|
|
198
|
+
return false;
|
|
199
|
+
})
|
|
200
|
+
)
|
|
201
|
+
);
|
|
142
202
|
async function sendChatMessage(task) {
|
|
143
203
|
return AppRuntime.runPromise(sendChatMessageEff(task));
|
|
144
204
|
}
|
|
@@ -41,12 +41,12 @@ import {
|
|
|
41
41
|
unregisterTerminal,
|
|
42
42
|
updateBrowserWs,
|
|
43
43
|
writeStdinToCommand
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-ICB7IS3A.mjs";
|
|
45
45
|
import {
|
|
46
46
|
createNeo4jDriver,
|
|
47
47
|
runCypherWithDriver,
|
|
48
48
|
serializeValue
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-6BFKFQG5.mjs";
|
|
50
50
|
import "./chunk-7P6ASYW6.mjs";
|
|
51
51
|
export {
|
|
52
52
|
PtyRingBuffer,
|
package/dist/wsServer.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getLastUserMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4S74IEU4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
addExitListener,
|
|
6
6
|
addOutputListener,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
resolvePendingRequest,
|
|
17
17
|
unregisterBrowser,
|
|
18
18
|
writeStdinToCommand
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ICB7IS3A.mjs";
|
|
20
20
|
import {
|
|
21
21
|
AppError,
|
|
22
22
|
Effect_exports,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
ValidationError,
|
|
33
33
|
WSError,
|
|
34
34
|
readJsonFile
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-6BFKFQG5.mjs";
|
|
36
36
|
import "./chunk-7P6ASYW6.mjs";
|
|
37
37
|
|
|
38
38
|
// src/lib/wsServer.ts
|
|
@@ -683,7 +683,7 @@ var handleJupyter = (conn, bubbleId, cwd) => Effect_exports.gen(function* () {
|
|
|
683
683
|
Effect_exports.annotateLogs("cwd", cwd)
|
|
684
684
|
);
|
|
685
685
|
const { kernelManager } = yield* Effect_exports.tryPromise({
|
|
686
|
-
try: () => import("./server-
|
|
686
|
+
try: () => import("./server-Z6V4HKGV.mjs"),
|
|
687
687
|
catch: (cause) => new AppError({
|
|
688
688
|
message: "failed to import kernel manager",
|
|
689
689
|
cause
|
|
@@ -951,6 +951,16 @@ var dispatchMessage = (msg, projectCwd, registry, send) => Effect_exports.sync((
|
|
|
951
951
|
USER: process.env.USER,
|
|
952
952
|
SHELL: process.env.SHELL,
|
|
953
953
|
TERM: "xterm-256color",
|
|
954
|
+
// UTF-8 locale so the pty renders multi-byte text (CJK, emoji) correctly.
|
|
955
|
+
// ptyEnv is rebuilt from scratch (not inherited from process.env), and a
|
|
956
|
+
// macOS `--login` shell does NOT restore LANG (Terminal.app/iTerm inject it,
|
|
957
|
+
// not the rc files) — so without this, vim/less open UTF-8 files in the
|
|
958
|
+
// C/POSIX locale and mojibake every non-ASCII char. Pass the real locale
|
|
959
|
+
// through when present, else fall back to a UTF-8 default; LC_ALL/LC_CTYPE
|
|
960
|
+
// stay undefined (and are skipped below) unless the server actually has them.
|
|
961
|
+
LANG: process.env.LANG ?? "en_US.UTF-8",
|
|
962
|
+
LC_ALL: process.env.LC_ALL,
|
|
963
|
+
LC_CTYPE: process.env.LC_CTYPE,
|
|
954
964
|
FORCE_COLOR: "1",
|
|
955
965
|
CLICOLOR: "1",
|
|
956
966
|
CLICOLOR_FORCE: "1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surething/cockpit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.221",
|
|
4
4
|
"description": "Claude Code GUI for parallel AI coding — drive Claude (default), Codex, DeepSeek, Kimi, or local Ollama in tabs. Multi-project sessions, terminal, browser & DB bubbles, code review, slash modes. Local-first, MIT.",
|
|
5
5
|
"author": "Robert",
|
|
6
6
|
"license": "MIT",
|