@surething/cockpit 1.0.257 → 1.0.258
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 +4 -4
- package/.next-prod/build-manifest.json +3 -3
- package/.next-prod/cockpit-build.json +1 -1
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/react-loadable-manifest.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/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +2 -2
- 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/_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/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/page.js +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_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +4 -4
- package/.next-prod/server/chunks/3286.js +5 -5
- package/.next-prod/server/chunks/5750.js +9 -9
- package/.next-prod/server/chunks/6548.js +1 -1
- package/.next-prod/server/chunks/7270.js +3 -3
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/middleware-react-loadable-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +2 -2
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/6784-500e233d3e8f6b41.js +381 -0
- package/.next-prod/static/chunks/7482-8478af06d5aa0972.js +25 -0
- package/.next-prod/static/chunks/9b0008ae.d0c8feea26186989.js +45 -0
- package/.next-prod/static/chunks/app/{layout-0bbc63707f5e01ad.js → layout-bec1cf218bc88d81.js} +1 -1
- package/.next-prod/static/chunks/app/{page-1cbf8dcf1693be8e.js → page-5e6dbc9731415743.js} +1 -1
- package/.next-prod/static/chunks/app/project/{page-1cbf8dcf1693be8e.js → page-5e6dbc9731415743.js} +1 -1
- package/.next-prod/static/chunks/{webpack-37498a2c8333d458.js → webpack-ce60587570394496.js} +1 -1
- package/.next-prod/trace +14 -14
- package/.next-prod/trace-build +1 -1
- package/dist/scheduledTasks.mjs +22 -8
- package/dist/wsServer.mjs +62 -8
- package/package.json +2 -2
- package/public/html-lib/pdf-viewer.js +12 -12
- package/public/pdfjs/pdf.worker.min.mjs +4 -4
- package/.next-prod/static/chunks/6626-ff5f196a882eb10d.js +0 -25
- package/.next-prod/static/chunks/6784-d8d3cdd1f9772760.js +0 -381
- package/.next-prod/static/chunks/9b0008ae.295c31138a16177d.js +0 -45
- /package/.next-prod/static/{T5LH07mcmVVJLxAn03pYJ → ZFNy0XuBWptMqEQGi7GTy}/_buildManifest.js +0 -0
- /package/.next-prod/static/{T5LH07mcmVVJLxAn03pYJ → ZFNy0XuBWptMqEQGi7GTy}/_ssgManifest.js +0 -0
package/.next-prod/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":14118537,"timestamp":210646152,"id":14,"parentId":1,"tags":{},"startTime":1786329445044,"traceId":"e26f3cd52a4bd227"},{"name":"run-typescript","duration":4968553,"timestamp":224768523,"id":1451,"parentId":1,"tags":{},"startTime":1786329459167,"traceId":"e26f3cd52a4bd227"},{"name":"static-check","duration":1250437,"timestamp":229775773,"id":1454,"parentId":1,"tags":{},"startTime":1786329464174,"traceId":"e26f3cd52a4bd227"},{"name":"static-generation","duration":5523040,"timestamp":231138100,"id":1758,"parentId":1,"tags":{},"startTime":1786329465536,"traceId":"e26f3cd52a4bd227"},{"name":"collect-build-traces","duration":21085798,"timestamp":231026750,"id":1755,"parentId":1,"tags":{},"startTime":1786329465425,"traceId":"e26f3cd52a4bd227"},{"name":"telemetry-flush","duration":58,"timestamp":252116385,"id":1767,"parentId":1,"tags":{},"startTime":1786329486514,"traceId":"e26f3cd52a4bd227"},{"name":"next-build","duration":41630225,"timestamp":210486233,"id":1,"tags":{"buildMode":"default","version":"16.3.0","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1786329444884,"traceId":"e26f3cd52a4bd227"}]
|
package/dist/scheduledTasks.mjs
CHANGED
|
@@ -1170,13 +1170,13 @@ Finally emit [Overall recap: end-to-end interaction verification + total deliver
|
|
|
1170
1170
|
// packages/feature/agent/src/server/lib/htmlPrompt.ts
|
|
1171
1171
|
var HTML_PROMPT_ZH = `---
|
|
1172
1172
|
name: html
|
|
1173
|
-
description: "\u751F\u6210\u53EF\u4EA4\u4E92\u7684\
|
|
1174
|
-
argument-hint: "\u63CF\u8FF0\u4F60\u60F3\u8981\u7684\
|
|
1173
|
+
description: "\u751F\u6210\u53EF\u4EA4\u4E92\u7684 HTML \u5E94\u7528\uFF1A\u5185\u7F6E cockpit bash SDK\uFF0C\u6267\u884C\u547D\u4EE4\u53D6/\u6539\u6570\u636E"
|
|
1174
|
+
argument-hint: "\u63CF\u8FF0\u4F60\u60F3\u8981\u7684 HTML \u5E94\u7528"
|
|
1175
1175
|
---
|
|
1176
1176
|
|
|
1177
|
-
# \u751F\u6210 Cockpit \
|
|
1177
|
+
# \u751F\u6210 Cockpit HTML \u5E94\u7528
|
|
1178
1178
|
|
|
1179
|
-
\u4E00\u4E2A\u80FD\u53D6/\u6539\u6570\u636E\u7684\
|
|
1179
|
+
\u4E00\u4E2A\u80FD\u53D6/\u6539\u6570\u636E\u7684 HTML \u5E94\u7528\uFF1A\u9884\u89C8\u65F6\u6CE8\u5165\u4E86\u5168\u5C40 \`window.cockpit\` SDK \u2014\u2014 \u672C\u8D28\u5C31\u662F Bash
|
|
1180
1180
|
\u5DE5\u5177\u66B4\u9732\u7ED9\u9875\u9762\uFF0C\u9875\u9762\u6309\u94AE\u80FD \`curl\`\u3001\u8BFB\u5199\u6587\u4EF6\u3001\u8DD1\u811A\u672C\u3002
|
|
1181
1181
|
|
|
1182
1182
|
**\u9ED8\u8BA4\u7528 React \u5199**\uFF08\u4E0B\u9762\u7684\u672C\u5730\u96F6\u6784\u5EFA\u6808\uFF0Cproductized\u3001AI \u6700\u719F\uFF0C\u9002\u5408\u6709\u72B6\u6001 / \u591A\u89C6\u56FE /
|
|
@@ -1187,7 +1187,7 @@ argument-hint: "\u63CF\u8FF0\u4F60\u60F3\u8981\u7684\u5C0F\u5E94\u7528"
|
|
|
1187
1187
|
|
|
1188
1188
|
**\u522B\u4E00\u4E0A\u6765\u5C31\u5199\u6587\u4EF6**\uFF0C\u5206\u4E09\u6B65\uFF1A
|
|
1189
1189
|
|
|
1190
|
-
1. **\u5BF9\u9F50\u9700\u6C42** \u2014\u2014 \u5148\u590D\u8FF0\u4F60\u5BF9\u8FD9\u4E2A\
|
|
1190
|
+
1. **\u5BF9\u9F50\u9700\u6C42** \u2014\u2014 \u5148\u590D\u8FF0\u4F60\u5BF9\u8FD9\u4E2A HTML \u5E94\u7528\u7684\u7406\u89E3\uFF08\u505A\u4EC0\u4E48\u3001\u7528 React \u8FD8\u662F\u5355\u6587\u4EF6\u3001\u6570\u636E\u4ECE\u54EA\u6765\u3001
|
|
1191
1191
|
\u5173\u952E\u529F\u80FD\u4E0E\u4EA4\u4E92\uFF09\u3002\u4EC5\u5F53\u9700\u6C42\u6709\u6B67\u4E49\u6216\u5B58\u5728\u591A\u79CD\u5408\u7406\u89E3\u8BFB\u65F6\u624D\u56DE\u95EE\uFF1B\u5DF2\u7ECF\u6E05\u695A\u5C31\u76F4\u63A5\u7ED9\u4E00\u6BB5\u7B80\u77ED
|
|
1192
1192
|
\u7684\u7406\u89E3\u6458\u8981\uFF0C\u4E0D\u5FC5\u9010\u6761\u8FFD\u95EE\u3002
|
|
1193
1193
|
2. **\u544A\u77E5\u5B58\u653E\u76EE\u5F55** \u2014\u2014 \u6309\u4E0B\u9762\u300C\u5B58\u653E\u4F4D\u7F6E\u300D\u89C4\u5219\u5B9A\u51FA \`<\u76EE\u5F55>/<name>/\`\uFF0C\u660E\u786E\u544A\u8BC9\u7528\u6237\u51C6\u5907\u5B58\u54EA\u3001
|
|
@@ -18085,6 +18085,13 @@ var en_default2 = {
|
|
|
18085
18085
|
added: "Added to HTML panel",
|
|
18086
18086
|
alreadyAdded: "Already added",
|
|
18087
18087
|
addFailed: "Failed to add",
|
|
18088
|
+
add: "Add",
|
|
18089
|
+
adding: "Adding...",
|
|
18090
|
+
addHtmlApp: "Add HTML app",
|
|
18091
|
+
searchPlaceholder: "Search HTML apps...",
|
|
18092
|
+
pathLabel: "Absolute path to the .html file",
|
|
18093
|
+
invalid: "Invalid",
|
|
18094
|
+
noDescription: "No description",
|
|
18088
18095
|
emptyNoApps: "No HTML apps yet.",
|
|
18089
18096
|
emptyCreatePrefix: "Use",
|
|
18090
18097
|
emptyCreateSuffix: "in chat to create a new app.",
|
|
@@ -18562,7 +18569,7 @@ var en_default2 = {
|
|
|
18562
18569
|
singleColumn: "Single column",
|
|
18563
18570
|
dualColumn: "Dual column",
|
|
18564
18571
|
envVars: "Environment Variables",
|
|
18565
|
-
|
|
18572
|
+
launchShell: "Launch interactive shell",
|
|
18566
18573
|
htmlApps: "HTML apps",
|
|
18567
18574
|
inputPlaceholder: "Enter command or URL and press Enter... (\u2191\u2193 history, Tab complete)",
|
|
18568
18575
|
scopeProject: "Project",
|
|
@@ -19275,11 +19282,18 @@ var zh_default = {
|
|
|
19275
19282
|
current: "\u5F53\u524D"
|
|
19276
19283
|
},
|
|
19277
19284
|
htmlApps: {
|
|
19278
|
-
title: "HTML \
|
|
19285
|
+
title: "HTML \u5E94\u7528",
|
|
19279
19286
|
addTooltip: "\u6DFB\u52A0\u5230 HTML \u9762\u677F",
|
|
19280
19287
|
added: "\u5DF2\u6DFB\u52A0\u5230 HTML \u9762\u677F",
|
|
19281
19288
|
alreadyAdded: "\u5DF2\u6DFB\u52A0\u8FC7",
|
|
19282
19289
|
addFailed: "\u6DFB\u52A0\u5931\u8D25",
|
|
19290
|
+
add: "\u6DFB\u52A0",
|
|
19291
|
+
adding: "\u6DFB\u52A0\u4E2D...",
|
|
19292
|
+
addHtmlApp: "\u6DFB\u52A0 HTML \u5E94\u7528",
|
|
19293
|
+
searchPlaceholder: "\u641C\u7D22 HTML \u5E94\u7528...",
|
|
19294
|
+
pathLabel: ".html \u6587\u4EF6\u7684\u7EDD\u5BF9\u8DEF\u5F84",
|
|
19295
|
+
invalid: "\u65E0\u6548",
|
|
19296
|
+
noDescription: "\u65E0\u63CF\u8FF0",
|
|
19283
19297
|
emptyNoApps: "\u8FD8\u6CA1\u6709 HTML \u5E94\u7528\u3002",
|
|
19284
19298
|
emptyCreatePrefix: "\u5728\u804A\u5929\u91CC\u4F7F\u7528",
|
|
19285
19299
|
emptyCreateSuffix: "\u521B\u5EFA\u65B0\u5E94\u7528\u3002",
|
|
@@ -19757,7 +19771,7 @@ var zh_default = {
|
|
|
19757
19771
|
singleColumn: "\u5355\u5217\u5E03\u5C40",
|
|
19758
19772
|
dualColumn: "\u53CC\u5217\u5E03\u5C40",
|
|
19759
19773
|
envVars: "\u73AF\u5883\u53D8\u91CF",
|
|
19760
|
-
|
|
19774
|
+
launchShell: "\u542F\u52A8\u4EA4\u4E92\u7EC8\u7AEF",
|
|
19761
19775
|
htmlApps: "HTML \u5E94\u7528",
|
|
19762
19776
|
inputPlaceholder: "\u8F93\u5165\u547D\u4EE4\u6216\u7F51\u5740\u5E76\u6309 Enter... (\u2191\u2193 \u5386\u53F2, Tab \u8865\u5168)",
|
|
19763
19777
|
scopeProject: "\u9879\u76EE",
|
package/dist/wsServer.mjs
CHANGED
|
@@ -844,9 +844,62 @@ var runJupyterHandler = (ws, bubbleId, cwd) => {
|
|
|
844
844
|
};
|
|
845
845
|
|
|
846
846
|
// src/lib/effect/terminalHandler.ts
|
|
847
|
-
import { spawn, execSync } from "child_process";
|
|
847
|
+
import { spawn, execFileSync, execSync } from "child_process";
|
|
848
848
|
import * as nodePty from "node-pty";
|
|
849
849
|
var HEARTBEAT5 = Schedule_exports.spaced("30 seconds");
|
|
850
|
+
var OPEN_PREFERRED_SHELL_COMMAND = "__cockpit_open_preferred_shell__";
|
|
851
|
+
function commandPath(command) {
|
|
852
|
+
try {
|
|
853
|
+
const found = execSync(`command -v ${command}`, {
|
|
854
|
+
encoding: "utf-8",
|
|
855
|
+
timeout: 3e3
|
|
856
|
+
}).trim().split(/\r?\n/)[0];
|
|
857
|
+
return found || null;
|
|
858
|
+
} catch {
|
|
859
|
+
return null;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
function loginShellArgs(shell) {
|
|
863
|
+
if (shell === "bash") return ["--login"];
|
|
864
|
+
return ["-l"];
|
|
865
|
+
}
|
|
866
|
+
function resolvePreferredPtyShell(cwd) {
|
|
867
|
+
if (isWindows) {
|
|
868
|
+
try {
|
|
869
|
+
const wslShell = execFileSync(
|
|
870
|
+
"wsl.exe",
|
|
871
|
+
[
|
|
872
|
+
"sh",
|
|
873
|
+
"-lc",
|
|
874
|
+
"command -v zsh >/dev/null 2>&1 && printf zsh || { command -v bash >/dev/null 2>&1 && printf bash; }"
|
|
875
|
+
],
|
|
876
|
+
{ encoding: "utf-8", timeout: 3e3 }
|
|
877
|
+
).trim();
|
|
878
|
+
if (wslShell === "zsh" || wslShell === "bash") {
|
|
879
|
+
return {
|
|
880
|
+
file: "wsl.exe",
|
|
881
|
+
args: ["--cd", cwd, "--exec", wslShell, ...loginShellArgs(wslShell)],
|
|
882
|
+
cwd: process.cwd(),
|
|
883
|
+
name: wslShell
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
} catch {
|
|
887
|
+
}
|
|
888
|
+
} else {
|
|
889
|
+
for (const shell of ["zsh", "bash", "sh"]) {
|
|
890
|
+
const file = commandPath(shell);
|
|
891
|
+
if (file) return { file, args: loginShellArgs(shell), cwd, name: shell };
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
const fallback = getDefaultShell();
|
|
895
|
+
const fallbackName = fallback.split(/[\\/]/).pop() || fallback;
|
|
896
|
+
return {
|
|
897
|
+
file: fallback,
|
|
898
|
+
args: isWindows ? [] : loginShellArgs(fallbackName),
|
|
899
|
+
cwd,
|
|
900
|
+
name: fallbackName
|
|
901
|
+
};
|
|
902
|
+
}
|
|
850
903
|
function getDescendantPids(pid) {
|
|
851
904
|
const descendants = [];
|
|
852
905
|
function collect(parentPid) {
|
|
@@ -1015,21 +1068,22 @@ var dispatchMessage = (msg, projectCwd, registry, send) => Effect_exports.sync((
|
|
|
1015
1068
|
for (const [k, v] of Object.entries(childEnv)) {
|
|
1016
1069
|
if (v !== void 0) ptyEnv[k] = v;
|
|
1017
1070
|
}
|
|
1071
|
+
const ptyTarget = command === OPEN_PREFERRED_SHELL_COMMAND ? resolvePreferredPtyShell(cwd) : { file: userShell, args: ["--login", "-c", command], cwd, name: command };
|
|
1018
1072
|
const ptyProcess = nodePty.spawn(
|
|
1019
|
-
|
|
1020
|
-
|
|
1073
|
+
ptyTarget.file,
|
|
1074
|
+
ptyTarget.args,
|
|
1021
1075
|
{
|
|
1022
1076
|
name: "xterm-256color",
|
|
1023
1077
|
cols: cols || 120,
|
|
1024
1078
|
rows: rows || 30,
|
|
1025
|
-
cwd,
|
|
1079
|
+
cwd: ptyTarget.cwd,
|
|
1026
1080
|
env: ptyEnv
|
|
1027
1081
|
}
|
|
1028
1082
|
);
|
|
1029
1083
|
const dummyChild = spawn("true", [], { stdio: "ignore" });
|
|
1030
1084
|
registerCommand({
|
|
1031
1085
|
commandId,
|
|
1032
|
-
command,
|
|
1086
|
+
command: ptyTarget.name,
|
|
1033
1087
|
cwd,
|
|
1034
1088
|
projectCwd,
|
|
1035
1089
|
tabId,
|
|
@@ -1040,7 +1094,7 @@ var dispatchMessage = (msg, projectCwd, registry, send) => Effect_exports.sync((
|
|
|
1040
1094
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1041
1095
|
sourceId
|
|
1042
1096
|
});
|
|
1043
|
-
Effect_exports.runFork(send({ type: "pid", commandId, pid: ptyProcess.pid }));
|
|
1097
|
+
Effect_exports.runFork(send({ type: "pid", commandId, pid: ptyProcess.pid, command: ptyTarget.name }));
|
|
1044
1098
|
Effect_exports.runFork(
|
|
1045
1099
|
attachPtyListeners(registry, send, commandId, ptyProcess)
|
|
1046
1100
|
);
|
|
@@ -1063,7 +1117,7 @@ var dispatchMessage = (msg, projectCwd, registry, send) => Effect_exports.sync((
|
|
|
1063
1117
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1064
1118
|
sourceId
|
|
1065
1119
|
});
|
|
1066
|
-
Effect_exports.runFork(send({ type: "pid", commandId, pid: child.pid }));
|
|
1120
|
+
Effect_exports.runFork(send({ type: "pid", commandId, pid: child.pid, command }));
|
|
1067
1121
|
Effect_exports.runFork(
|
|
1068
1122
|
attachPipeListeners(registry, send, commandId, child)
|
|
1069
1123
|
);
|
|
@@ -1096,7 +1150,7 @@ var dispatchMessage = (msg, projectCwd, registry, send) => Effect_exports.sync((
|
|
|
1096
1150
|
);
|
|
1097
1151
|
return;
|
|
1098
1152
|
}
|
|
1099
|
-
Effect_exports.runFork(send({ type: "pid", commandId, pid: cmd.pid }));
|
|
1153
|
+
Effect_exports.runFork(send({ type: "pid", commandId, pid: cmd.pid, command: cmd.command }));
|
|
1100
1154
|
if (cmd.usePty && cmd.ptyRingBuffer) {
|
|
1101
1155
|
const snap = cmd.ptyRingBuffer.snapshot();
|
|
1102
1156
|
if (snap) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surething/cockpit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.258",
|
|
4
4
|
"description": "The open-source Claude Code GUI — an IDE-like workbench for parallel AI coding. Drive Claude (default), Codex, DeepSeek, Kimi, or local Ollama in tabs. Terminal, browser & DB bubbles, code review. Self-host on a shared dev box — a seat for every teammate. Local-first, MIT.",
|
|
5
5
|
"author": "Robert",
|
|
6
6
|
"license": "MIT",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"neo4j-driver": "^6.0.1",
|
|
139
139
|
"next": "16.3.0",
|
|
140
140
|
"node-pty": "^1.1.0",
|
|
141
|
-
"pdfjs-dist": "
|
|
141
|
+
"pdfjs-dist": "6.2.108",
|
|
142
142
|
"pg": "^8.20.0",
|
|
143
143
|
"react": "19.2.3",
|
|
144
144
|
"react-dom": "19.2.3",
|