@surething/cockpit 1.0.248 → 1.0.250

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.
Files changed (46) hide show
  1. package/.next-prod/BUILD_ID +1 -1
  2. package/.next-prod/app-path-routes-manifest.json +2 -2
  3. package/.next-prod/build-manifest.json +2 -2
  4. package/.next-prod/prerender-manifest.json +3 -3
  5. package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/.next-prod/server/app/_global-error.html +1 -1
  7. package/.next-prod/server/app/_global-error.rsc +1 -1
  8. package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  10. package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  11. package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next-prod/server/app/_not-found.html +2 -2
  16. package/.next-prod/server/app/_not-found.rsc +3 -3
  17. package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +3 -3
  18. package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
  19. package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +3 -3
  20. package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  21. package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  22. package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  23. package/.next-prod/server/app/api/session/[sessionId]/history/route.js +3 -1
  24. package/.next-prod/server/app/api/session-by-path/route.js +3 -1
  25. package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
  26. package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
  27. package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
  28. package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
  29. package/.next-prod/server/app-paths-manifest.json +2 -2
  30. package/.next-prod/server/chunks/4848.js +5 -8
  31. package/.next-prod/server/chunks/9658.js +7 -5
  32. package/.next-prod/server/middleware-build-manifest.js +1 -1
  33. package/.next-prod/server/pages/404.html +2 -2
  34. package/.next-prod/server/pages/500.html +1 -1
  35. package/.next-prod/server/server-reference-manifest.json +1 -1
  36. package/.next-prod/static/chunks/8010-7b8fcb2f7d0b4db2.js +25 -0
  37. package/.next-prod/static/chunks/{9530-7b59ce2b030911c6.js → 9530-27529c0238e4ba42.js} +6 -4
  38. package/.next-prod/static/css/3c28ac42f6804ae8.css +1 -0
  39. package/.next-prod/trace +14 -14
  40. package/.next-prod/trace-build +1 -1
  41. package/dist/scheduledTasks.mjs +56 -46
  42. package/package.json +2 -1
  43. package/.next-prod/static/chunks/8010-feeef81a0401286a.js +0 -25
  44. package/.next-prod/static/css/546386ec7f3b9978.css +0 -1
  45. /package/.next-prod/static/{16e9CEOqCbMBCySF862ss → D31r97Uo7znQ_8sEV-ZUq}/_buildManifest.js +0 -0
  46. /package/.next-prod/static/{16e9CEOqCbMBCySF862ss → D31r97Uo7znQ_8sEV-ZUq}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- [{"name":"run-webpack","duration":19542636,"timestamp":265259864,"id":14,"parentId":1,"tags":{},"startTime":1784734691672,"traceId":"6e82f9e117ec3c81"},{"name":"run-typescript","duration":18233820,"timestamp":284806379,"id":1661,"parentId":1,"tags":{},"startTime":1784734711218,"traceId":"6e82f9e117ec3c81"},{"name":"static-check","duration":1143131,"timestamp":303082866,"id":1664,"parentId":1,"tags":{},"startTime":1784734729495,"traceId":"6e82f9e117ec3c81"},{"name":"static-generation","duration":6391359,"timestamp":304328236,"id":1950,"parentId":1,"tags":{},"startTime":1784734730740,"traceId":"6e82f9e117ec3c81"},{"name":"collect-build-traces","duration":19716907,"timestamp":304226644,"id":1947,"parentId":1,"tags":{},"startTime":1784734730639,"traceId":"6e82f9e117ec3c81"},{"name":"telemetry-flush","duration":57,"timestamp":323948071,"id":1959,"parentId":1,"tags":{},"startTime":1784734750360,"traceId":"6e82f9e117ec3c81"},{"name":"next-build","duration":58859929,"timestamp":265088212,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1784734691500,"traceId":"6e82f9e117ec3c81"}]
1
+ [{"name":"run-webpack","duration":21204513,"timestamp":158342350,"id":14,"parentId":1,"tags":{},"startTime":1785123289742,"traceId":"1d7c019e30e11c5a"},{"name":"run-typescript","duration":19338369,"timestamp":179556878,"id":1661,"parentId":1,"tags":{},"startTime":1785123310957,"traceId":"1d7c019e30e11c5a"},{"name":"static-check","duration":1190470,"timestamp":198938299,"id":1664,"parentId":1,"tags":{},"startTime":1785123330338,"traceId":"1d7c019e30e11c5a"},{"name":"static-generation","duration":6633722,"timestamp":200241609,"id":1950,"parentId":1,"tags":{},"startTime":1785123331642,"traceId":"1d7c019e30e11c5a"},{"name":"collect-build-traces","duration":20373640,"timestamp":200129415,"id":1947,"parentId":1,"tags":{},"startTime":1785123331529,"traceId":"1d7c019e30e11c5a"},{"name":"telemetry-flush","duration":59,"timestamp":220507279,"id":1959,"parentId":1,"tags":{},"startTime":1785123351907,"traceId":"1d7c019e30e11c5a"},{"name":"next-build","duration":62338525,"timestamp":158168826,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1785123289569,"traceId":"1d7c019e30e11c5a"}]
@@ -2046,63 +2046,73 @@ function resolveCommandPrompt(prompt, language = "en", _req) {
2046
2046
  const userSkills = listUserSkills();
2047
2047
  const isKnown = (cmd) => !!COMMAND_CONTENT[cmd] || userSkills.some((s) => s.name === cmd);
2048
2048
  const lines = prompt.split("\n");
2049
- const marks = [];
2049
+ const cmds = [];
2050
2050
  lines.forEach((line, i) => {
2051
2051
  const m = line.match(COMMAND_LINE_RE);
2052
2052
  if (m && isKnown(m[2])) {
2053
- marks.push({ i, marker: m[1], cmd: m[2], rest: line.slice(m[0].length) });
2053
+ cmds.push({ i, marker: m[1], cmd: m[2], rest: line.slice(m[0].length).trim() });
2054
2054
  }
2055
2055
  });
2056
- if (marks.length === 0) return prompt;
2057
- const preamble = lines.slice(0, marks[0].i).join("\n").trim();
2058
- const steps = marks.map((mk, idx) => {
2059
- const end = idx + 1 < marks.length ? marks[idx + 1].i : lines.length;
2060
- const body = [mk.rest, ...lines.slice(mk.i + 1, end)].join("\n").trim();
2061
- return { marker: mk.marker, cmd: mk.cmd, body };
2062
- });
2056
+ if (cmds.length === 0) return prompt;
2057
+ const showLocus = cmds.length >= 2 || cmds.some((c) => c.marker === "@");
2063
2058
  const baseUrl = deriveBaseUrl();
2064
- const resolved = steps.map((s) => resolveStep(s, lang, baseUrl, userSkills));
2065
- const then = lang === "zh" ? "\u7136\u540E\uFF1A" : "Then: ";
2066
- if (resolved.length === 1 && resolved[0].marker === "/" && !preamble) {
2067
- const r = resolved[0];
2068
- return r.body ? `${r.pointer}
2069
-
2070
- ${then}${r.body}` : r.pointer;
2071
- }
2072
- const intro = lang === "zh" ? "\u8BF7\u6309\u4EE5\u4E0B\u6B65\u9AA4\u4F9D\u6B21\u5B8C\u6210\uFF1A" : "Complete the following steps in order:";
2073
- const blocks = resolved.map((r, idx) => {
2074
- const where = stepHeader(idx + 1, r.marker, lang);
2075
- const bodyPart = r.body ? `
2076
- ${then}${r.body}` : "";
2077
- return `${where}
2078
- ${r.pointer}${bodyPart}`;
2059
+ const rendered = /* @__PURE__ */ new Map();
2060
+ const consumed = /* @__PURE__ */ new Set();
2061
+ const listed = [];
2062
+ const seen = /* @__PURE__ */ new Set();
2063
+ cmds.forEach((c, k) => {
2064
+ const nextCmd = k + 1 < cmds.length ? cmds[k + 1].i : lines.length;
2065
+ const bodyLines = [];
2066
+ if (c.rest) bodyLines.push(c.rest);
2067
+ for (let j = c.i + 1; j < nextCmd; j++) {
2068
+ if (lines[j].trim() === "") break;
2069
+ bodyLines.push(lines[j].trim());
2070
+ consumed.add(j);
2071
+ }
2072
+ const ref = resolveSkillRef(c.cmd, lang, baseUrl, userSkills);
2073
+ rendered.set(c.i, renderCommandLine(c.marker, ref, bodyLines.join("\n"), lang, showLocus));
2074
+ if (ref.path && !seen.has(ref.name)) {
2075
+ seen.add(ref.name);
2076
+ listed.push({ name: ref.name, path: ref.path });
2077
+ }
2079
2078
  });
2080
- const parts = [];
2081
- if (preamble) parts.push(preamble);
2082
- parts.push(intro, blocks.join("\n\n"));
2083
- return parts.join("\n\n");
2079
+ const out = [];
2080
+ for (let i = 0; i < lines.length; i++) {
2081
+ if (consumed.has(i)) continue;
2082
+ out.push(rendered.get(i) ?? lines[i]);
2083
+ }
2084
+ let result = out.join("\n");
2085
+ if (listed.length > 0) {
2086
+ const header = lang === "zh" ? "\u8BF7\u5148\u8BFB\u53D6\u4EE5\u4E0B skill \u6587\u4EF6\uFF0C\u518D\u636E\u6B64\u6267\u884C\uFF1A" : "Read these skill files first, then act accordingly:";
2087
+ const sep = lang === "zh" ? "\uFF1A" : ": ";
2088
+ const entries = listed.map((s) => `- ${s.name}${sep}${s.path}`).join("\n");
2089
+ result = `${result}
2090
+
2091
+ ${header}
2092
+ ${entries}`;
2093
+ }
2094
+ return result;
2084
2095
  }
2085
- function resolveStep(step, lang, baseUrl, userSkills) {
2086
- const skill = userSkills.find((s) => s.name === step.cmd);
2087
- if (skill) {
2088
- return { marker: step.marker, body: step.body, pointer: readSkillPointer(skill.path, lang) };
2096
+ function renderCommandLine(marker, ref, body, lang, showLocus) {
2097
+ if (ref.path) {
2098
+ const tag = showLocus ? `[${locusWord(marker, lang)}\xB7${ref.name}]` : `[${ref.name}]`;
2099
+ return body ? `${tag} ${body}` : tag;
2089
2100
  }
2090
- const entry = COMMAND_CONTENT[step.cmd];
2091
- const content = entry[lang].replaceAll("{{BASE_URL}}", baseUrl);
2092
- const skillPath = writeBuiltinSkill(step.cmd, content);
2093
- const pointer = skillPath ? readSkillPointer(skillPath, lang) : content;
2094
- return { marker: step.marker, body: step.body, pointer };
2101
+ const locus = showLocus ? `[${locusWord(marker, lang)}] ` : "";
2102
+ const then = body ? lang === "zh" ? `\uFF0C\u7136\u540E\uFF1A${body}` : `, then: ${body}` : "";
2103
+ return `${locus}${ref.content ?? ""}${then}`;
2095
2104
  }
2096
- function readSkillPointer(skillPath, lang) {
2097
- return lang === "zh" ? `\u8BF7\u8BFB\u53D6\u8FD9\u4E2A skill \u6587\u4EF6\uFF1A
2098
- ${skillPath}` : `Please read this skill file:
2099
- ${skillPath}`;
2105
+ function locusWord(marker, lang) {
2106
+ if (marker === "@") return "subagent";
2107
+ return lang === "zh" ? "\u4E3B\u4F1A\u8BDD" : "main session";
2100
2108
  }
2101
- function stepHeader(n, marker, lang) {
2102
- if (lang === "zh") {
2103
- return marker === "@" ? `\u6B65\u9AA4 ${n}\uFF08\u7528 subagent \u6267\u884C\uFF09\uFF1A` : `\u6B65\u9AA4 ${n}\uFF08\u4E3B\u4F1A\u8BDD\u6267\u884C\uFF09\uFF1A`;
2104
- }
2105
- return marker === "@" ? `Step ${n} (run in a subagent): ` : `Step ${n} (run in the main session): `;
2109
+ function resolveSkillRef(cmd, lang, baseUrl, userSkills) {
2110
+ const skill = userSkills.find((s) => s.name === cmd);
2111
+ if (skill) return { name: cmd, path: skill.path, content: null };
2112
+ const entry = COMMAND_CONTENT[cmd];
2113
+ const content = entry[lang].replaceAll("{{BASE_URL}}", baseUrl);
2114
+ const skillPath = writeBuiltinSkill(cmd, content);
2115
+ return skillPath ? { name: cmd, path: skillPath, content: null } : { name: cmd, path: null, content };
2106
2116
  }
2107
2117
  function listUserSkills() {
2108
2118
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@surething/cockpit",
3
- "version": "1.0.248",
3
+ "version": "1.0.250",
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",
@@ -74,6 +74,7 @@
74
74
  "server.mjs",
75
75
  "dist",
76
76
  ".next-prod",
77
+ "!.next-prod/cache",
77
78
  "kernels",
78
79
  "next.config.mjs",
79
80
  "scripts/copy-tree-sitter-wasms.mjs",