@surething/cockpit 1.0.284 → 1.0.285

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 +3 -3
  3. package/.next-prod/build-manifest.json +2 -2
  4. package/.next-prod/cockpit-build.json +1 -1
  5. package/.next-prod/prerender-manifest.json +3 -3
  6. package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
  7. package/.next-prod/server/app/_global-error.html +1 -1
  8. package/.next-prod/server/app/_global-error.rsc +1 -1
  9. package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  11. package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/.next-prod/server/app/_not-found.html +2 -2
  14. package/.next-prod/server/app/_not-found.rsc +2 -2
  15. package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
  16. package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
  17. package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  19. package/.next-prod/server/app/api/chat/route.js +1 -1
  20. package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
  21. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
  22. package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
  23. package/.next-prod/server/app/api/session/[sessionId]/turn/route.js +1 -1
  24. package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
  25. package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
  26. package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
  27. package/.next-prod/server/app-paths-manifest.json +3 -3
  28. package/.next-prod/server/chunks/2493.js +4 -4
  29. package/.next-prod/server/chunks/7438.js +10 -10
  30. package/.next-prod/server/chunks/9830.js +1 -1
  31. package/.next-prod/server/middleware-build-manifest.js +1 -1
  32. package/.next-prod/server/pages/404.html +2 -2
  33. package/.next-prod/server/pages/500.html +1 -1
  34. package/.next-prod/server/server-reference-manifest.json +1 -1
  35. package/.next-prod/static/chunks/{2550-eb5beeffe90c8632.js → 2550-8c7decb785b92fbf.js} +4 -4
  36. package/.next-prod/static/chunks/{5313-da9f9a2ce9c5ba34.js → 5313-8a3e790e11b63d64.js} +5 -5
  37. package/.next-prod/trace +14 -14
  38. package/.next-prod/trace-build +1 -1
  39. package/dist/{chunk-FP25USWW.mjs → chunk-7YQK3TY5.mjs} +140 -34
  40. package/dist/{chunk-2KRJ7JEJ.mjs → chunk-EMTH733G.mjs} +1 -1
  41. package/dist/httpApi.mjs +2 -2
  42. package/dist/scheduledTasks.mjs +3 -1
  43. package/dist/wsServer.mjs +2 -2
  44. package/package.json +3 -3
  45. /package/.next-prod/static/{qXlYDVAyeD8v5tCOCGbXD → SHzF6HEOUD5ikVkZI6v3E}/_buildManifest.js +0 -0
  46. /package/.next-prod/static/{qXlYDVAyeD8v5tCOCGbXD → SHzF6HEOUD5ikVkZI6v3E}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- [{"name":"run-webpack","duration":13516309,"timestamp":269565055,"id":14,"parentId":1,"tags":{},"startTime":1791735491429,"traceId":"df0be3604223f322"},{"name":"run-typescript","duration":4477628,"timestamp":283085589,"id":1445,"parentId":1,"tags":{},"startTime":1791735504949,"traceId":"df0be3604223f322"},{"name":"static-check","duration":1037414,"timestamp":287596356,"id":1448,"parentId":1,"tags":{},"startTime":1791735509460,"traceId":"df0be3604223f322"},{"name":"static-generation","duration":4903171,"timestamp":288718815,"id":1760,"parentId":1,"tags":{},"startTime":1791735510582,"traceId":"df0be3604223f322"},{"name":"collect-build-traces","duration":20127880,"timestamp":288634360,"id":1757,"parentId":1,"tags":{},"startTime":1791735510498,"traceId":"df0be3604223f322"},{"name":"telemetry-flush","duration":49,"timestamp":308765388,"id":1769,"parentId":1,"tags":{},"startTime":1791735530629,"traceId":"df0be3604223f322"},{"name":"next-build","duration":39472199,"timestamp":269293247,"id":1,"tags":{"buildMode":"default","version":"16.3.0","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1791735491157,"traceId":"df0be3604223f322"}]
1
+ [{"name":"run-webpack","duration":12146956,"timestamp":130103221,"id":14,"parentId":1,"tags":{},"startTime":1791911075160,"traceId":"8603caefd03508ae"},{"name":"run-typescript","duration":3651874,"timestamp":142253375,"id":1445,"parentId":1,"tags":{},"startTime":1791911087310,"traceId":"8603caefd03508ae"},{"name":"static-check","duration":875129,"timestamp":145942539,"id":1448,"parentId":1,"tags":{},"startTime":1791911090999,"traceId":"8603caefd03508ae"},{"name":"static-generation","duration":3894636,"timestamp":146884339,"id":1760,"parentId":1,"tags":{},"startTime":1791911091941,"traceId":"8603caefd03508ae"},{"name":"collect-build-traces","duration":16075264,"timestamp":146818306,"id":1757,"parentId":1,"tags":{},"startTime":1791911091875,"traceId":"8603caefd03508ae"},{"name":"telemetry-flush","duration":32,"timestamp":162896156,"id":1769,"parentId":1,"tags":{},"startTime":1791911107953,"traceId":"8603caefd03508ae"},{"name":"next-build","duration":33221237,"timestamp":129674958,"id":1,"tags":{"buildMode":"default","version":"16.3.0","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1791911074732,"traceId":"8603caefd03508ae"}]
@@ -29193,6 +29193,26 @@ function getRunInfo(key) {
29193
29193
  if (!r) return null;
29194
29194
  return { cwd: r.cwd, sessionId: r.sessionId ?? null, engine: r.engine ?? null };
29195
29195
  }
29196
+ function setRunInjector(key, injector) {
29197
+ const r = registry.get(key);
29198
+ if (!r) return;
29199
+ if (injector) r.injector = injector;
29200
+ else delete r.injector;
29201
+ }
29202
+ function injectRun(key, input, runId) {
29203
+ const r = registry.get(key);
29204
+ if (!r || r.status !== "running") return "idle";
29205
+ if (!r.injector) return "unsupported";
29206
+ if (!r.injector(input)) return "closed";
29207
+ appendRun(key, {
29208
+ type: "user",
29209
+ _human: true,
29210
+ _turnId: runId,
29211
+ _ts: Date.now(),
29212
+ message: { role: "user", content: input.text ?? "" }
29213
+ });
29214
+ return "ok";
29215
+ }
29196
29216
  function setRunAbort(key, abort) {
29197
29217
  const r = registry.get(key);
29198
29218
  if (r) r.abort = abort;
@@ -32044,6 +32064,18 @@ function isHumanTurnStart(entry) {
32044
32064
  if (!Array.isArray(content)) return false;
32045
32065
  return content.some((block) => block?.type === "text");
32046
32066
  }
32067
+ function queuedPromptAsUserEntry(entry) {
32068
+ const a = entry.attachment;
32069
+ if (entry.type !== "attachment" || a?.type !== "queued_command" || a.commandMode !== "prompt") return null;
32070
+ if (!(typeof a.prompt === "string" || Array.isArray(a.prompt)) || a.prompt.length === 0) return null;
32071
+ return {
32072
+ type: "user",
32073
+ uuid: entry.uuid,
32074
+ timestamp: entry.timestamp ?? a.timestamp,
32075
+ sessionId: entry.sessionId,
32076
+ message: { role: "user", content: a.prompt }
32077
+ };
32078
+ }
32047
32079
 
32048
32080
  // packages/feature/agent/src/shared/subagentTask.ts
32049
32081
  var TERMINAL = /* @__PURE__ */ new Set(["completed", "failed", "stopped"]);
@@ -32743,7 +32775,8 @@ async function parseTranscriptFile(filePath, page = {}) {
32743
32775
  let lastUsage;
32744
32776
  for await (const line of rl) {
32745
32777
  try {
32746
- const obj = JSON.parse(line);
32778
+ const parsed = JSON.parse(line);
32779
+ const obj = queuedPromptAsUserEntry(parsed) ?? parsed;
32747
32780
  if (obj.type === "user" || obj.type === "assistant") {
32748
32781
  if (obj.type === "user" && rawMessages.length > 0) {
32749
32782
  const prev = rawMessages[rawMessages.length - 1];
@@ -33565,10 +33598,11 @@ var SessionSearchServiceLive = Layer_exports.effect(
33565
33598
  // packages/feature/agent/src/effect/delegationLive.ts
33566
33599
  import { open as open2, stat as stat6 } from "fs/promises";
33567
33600
  import { basename as basename4, isAbsolute as isAbsolute3 } from "path";
33568
- import { randomUUID as randomUUID5 } from "crypto";
33601
+ import { randomUUID as randomUUID6 } from "crypto";
33569
33602
 
33570
33603
  // packages/feature/agent/src/server/engines/shared/sdkLoop.ts
33571
33604
  import { query as query2 } from "@anthropic-ai/claude-agent-sdk";
33605
+ import { randomUUID as randomUUID3 } from "crypto";
33572
33606
  var CHILD_EXIT_TIMEOUT_MS = 5e3;
33573
33607
  async function waitForSdkChildExit(response, timeoutMs = CHILD_EXIT_TIMEOUT_MS) {
33574
33608
  const transport = response?.transport;
@@ -33587,6 +33621,7 @@ async function waitForSdkChildExit(response, timeoutMs = CHILD_EXIT_TIMEOUT_MS)
33587
33621
  clearTimeout(timer);
33588
33622
  }
33589
33623
  var MAX_COMPACTION_RETRIES = 1;
33624
+ var MAX_RESULTS_BEFORE_START = 3;
33590
33625
  var STDERR_LOG_BUDGET_BYTES = 1e4;
33591
33626
  function makeStderrForwarder() {
33592
33627
  let spent = 0;
@@ -33605,23 +33640,28 @@ function follow(ctx) {
33605
33640
  return ac;
33606
33641
  }
33607
33642
  async function runSdkLoop(ctx, buildOptions2) {
33608
- const hasImages = !!(ctx.images && ctx.images.length > 0);
33609
- const content = [];
33610
- if (ctx.images) {
33611
- for (const img of ctx.images) {
33612
- content.push({ type: "image", source: { type: "base64", media_type: img.media_type, data: img.data } });
33613
- }
33614
- }
33615
- if (ctx.prompt) content.push({ type: "text", text: ctx.prompt });
33616
- const firstContent = hasImages ? content : ctx.prompt ?? "";
33643
+ const firstContent = userContent(ctx.prompt, ctx.images);
33617
33644
  const pendingTasks = /* @__PURE__ */ new Set();
33645
+ const awaitingStart = /* @__PURE__ */ new Set();
33646
+ let resultsSinceStart = 0;
33647
+ let turnActive = false;
33618
33648
  let closeInput = () => {
33619
33649
  };
33650
+ let gateClosed = false;
33620
33651
  if (!ctx.signal.aborted) {
33621
33652
  ctx.signal.addEventListener("abort", () => closeInput(), { once: true });
33622
33653
  }
33654
+ const injected = [];
33655
+ let wakeInput = () => {
33656
+ };
33657
+ ctx.acceptInput((input) => {
33658
+ if (gateClosed || ctx.signal.aborted) return false;
33659
+ injected.push({ content: userContent(input.text, input.images) });
33660
+ wakeInput();
33661
+ return true;
33662
+ });
33623
33663
  for (let attempt = 0; attempt <= MAX_COMPACTION_RETRIES; attempt++) {
33624
- let gateClosed = false;
33664
+ gateClosed = false;
33625
33665
  const gateOpen = new Promise((resolve3) => {
33626
33666
  closeInput = () => {
33627
33667
  if (!gateClosed) {
@@ -33632,8 +33672,13 @@ async function runSdkLoop(ctx, buildOptions2) {
33632
33672
  });
33633
33673
  if (ctx.signal.aborted) closeInput();
33634
33674
  const isRetry2 = attempt > 0;
33675
+ const firstUuid = randomUUID3();
33676
+ awaitingStart.clear();
33677
+ resultsSinceStart = 0;
33678
+ awaitingStart.add(firstUuid);
33635
33679
  const firstYield = {
33636
33680
  type: "user",
33681
+ uuid: firstUuid,
33637
33682
  // A compaction retry resumes the same session with 'continue'; the first attempt sends the
33638
33683
  // user turn (text ∪ images).
33639
33684
  message: { role: "user", content: isRetry2 ? "continue" : firstContent },
@@ -33642,7 +33687,25 @@ async function runSdkLoop(ctx, buildOptions2) {
33642
33687
  };
33643
33688
  const input = (async function* () {
33644
33689
  yield firstYield;
33645
- await gateOpen;
33690
+ for (; ; ) {
33691
+ for (let next4 = injected.shift(); next4; next4 = injected.shift()) {
33692
+ const uuid3 = randomUUID3();
33693
+ if (!turnActive) awaitingStart.add(uuid3);
33694
+ yield {
33695
+ type: "user",
33696
+ uuid: uuid3,
33697
+ message: { role: "user", content: next4.content },
33698
+ parent_tool_use_id: null,
33699
+ session_id: ctx.currentKey(),
33700
+ priority: "next"
33701
+ };
33702
+ }
33703
+ if (gateClosed) return;
33704
+ await new Promise((resolve3) => {
33705
+ wakeInput = resolve3;
33706
+ void gateOpen.then(resolve3);
33707
+ });
33708
+ }
33646
33709
  })();
33647
33710
  const attemptAbort = follow(ctx);
33648
33711
  const resume2 = isRetry2 ? ctx.currentKey() : ctx.sessionId;
@@ -33656,6 +33719,10 @@ async function runSdkLoop(ctx, buildOptions2) {
33656
33719
  break;
33657
33720
  }
33658
33721
  const msg = message;
33722
+ if (msg.type === "system" && msg.subtype === "init") turnActive = true;
33723
+ for (const uuid3 of msg.user_message_uuids ?? (msg.user_message_uuid ? [msg.user_message_uuid] : [])) {
33724
+ if (awaitingStart.delete(uuid3)) resultsSinceStart = 0;
33725
+ }
33659
33726
  if (msg.type === "system" && msg.subtype === "init" && msg.session_id) {
33660
33727
  ctx.rekey(msg.session_id);
33661
33728
  }
@@ -33669,14 +33736,28 @@ async function runSdkLoop(ctx, buildOptions2) {
33669
33736
  if (msg.type === "system" && msg.subtype === "task_notification" && msg.task_id) {
33670
33737
  pendingTasks.delete(msg.task_id);
33671
33738
  }
33672
- if (msg.type === "result") receivedResult = true;
33739
+ if (msg.type === "result") {
33740
+ receivedResult = true;
33741
+ turnActive = false;
33742
+ if (awaitingStart.size > 0 && ++resultsSinceStart >= MAX_RESULTS_BEFORE_START) awaitingStart.clear();
33743
+ }
33673
33744
  ctx.emit(message);
33674
- if (msg.type === "result" && pendingTasks.size === 0) closeInput();
33745
+ if (msg.type === "result" && pendingTasks.size === 0 && awaitingStart.size === 0) closeInput();
33675
33746
  }
33676
33747
  closeInput();
33677
33748
  await waitForSdkChildExit(response);
33678
33749
  if (receivedResult || ctx.signal.aborted) break;
33679
33750
  }
33751
+ ctx.acceptInput(null);
33752
+ }
33753
+ function userContent(text, images) {
33754
+ if (!images || images.length === 0) return text ?? "";
33755
+ const content = images.map((img) => ({
33756
+ type: "image",
33757
+ source: { type: "base64", media_type: img.media_type, data: img.data }
33758
+ }));
33759
+ if (text) content.push({ type: "text", text });
33760
+ return content;
33680
33761
  }
33681
33762
 
33682
33763
  // packages/feature/agent/src/server/engines/shared/noHistoryTranscript.ts
@@ -33893,6 +33974,11 @@ function buildClaudeOptions(ctx, independent) {
33893
33974
  canUseTool: async (toolName, input, opts) => planPermission(toolName, input, opts)
33894
33975
  },
33895
33976
  includePartialMessages: true,
33977
+ // Predicted next user prompt, shown as the composer's placeholder. The CLI emits one
33978
+ // `prompt_suggestion` after the turn's `result` and still delivers it when the input closes
33979
+ // on that result (sdkLoop), so nothing downstream waits for it. Suppressed by the CLI on a
33980
+ // session's first turn, in plan mode, and when the user disabled it in settings.json.
33981
+ promptSuggestions: true,
33896
33982
  abortController: abort,
33897
33983
  // env is ALWAYS passed: without it the SDK inherits process.env verbatim,
33898
33984
  // handing the agent this server's NODE_ENV=production. See sanitizedSpawnEnv.
@@ -33943,7 +34029,7 @@ var glmApiKey = createApiKeyStore(GLM_CREDENTIALS_FILE);
33943
34029
 
33944
34030
  // packages/feature/agent/src/server/engines/builtinAgent/index.ts
33945
34031
  import { streamText as streamText2, stepCountIs } from "ai";
33946
- import { randomUUID as randomUUID3 } from "crypto";
34032
+ import { randomUUID as randomUUID4 } from "crypto";
33947
34033
 
33948
34034
  // packages/feature/agent/src/server/engines/builtinAgent/prompt.ts
33949
34035
  function buildSystemPrompt(cwd, outputStyle) {
@@ -48513,7 +48599,7 @@ async function runBuiltinAgent(ctx, config3) {
48513
48599
  const noHistory = ctx.params.noHistory === true;
48514
48600
  const existing = noHistory ? [] : readSessionMessages(sessionsRoot, cwd, sid);
48515
48601
  const messages = [...existing, { role: "user", content: prompt }];
48516
- appendUserText(sessionsRoot, cwd, sid, prompt, { uuid: randomUUID3(), timestamp: (/* @__PURE__ */ new Date()).toISOString() });
48602
+ appendUserText(sessionsRoot, cwd, sid, prompt, { uuid: randomUUID4(), timestamp: (/* @__PURE__ */ new Date()).toISOString() });
48517
48603
  emit2(`data: ${JSON.stringify({ type: "system", subtype: "init", session_id: sid })}
48518
48604
 
48519
48605
  `);
@@ -48543,7 +48629,7 @@ async function runBuiltinAgent(ctx, config3) {
48543
48629
  for (const [toolUseId] of pendingToolCalls) {
48544
48630
  try {
48545
48631
  appendToolResult(sessionsRoot, cwd, sid, toolUseId, reason, {
48546
- uuid: randomUUID3(),
48632
+ uuid: randomUUID4(),
48547
48633
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
48548
48634
  is_error: true
48549
48635
  });
@@ -48577,7 +48663,7 @@ async function runBuiltinAgent(ctx, config3) {
48577
48663
  cwd,
48578
48664
  sid,
48579
48665
  [{ type: "tool_use", id: toolUseId, name: toolName, input }],
48580
- { uuid: randomUUID3(), timestamp: (/* @__PURE__ */ new Date()).toISOString() }
48666
+ { uuid: randomUUID4(), timestamp: (/* @__PURE__ */ new Date()).toISOString() }
48581
48667
  );
48582
48668
  } catch {
48583
48669
  }
@@ -48586,7 +48672,7 @@ async function runBuiltinAgent(ctx, config3) {
48586
48672
  try {
48587
48673
  pendingToolCalls.delete(toolUseId);
48588
48674
  appendToolResult(sessionsRoot, cwd, sid, toolUseId, content, {
48589
- uuid: randomUUID3(),
48675
+ uuid: randomUUID4(),
48590
48676
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
48591
48677
  is_error: Boolean(isError)
48592
48678
  });
@@ -48596,7 +48682,7 @@ async function runBuiltinAgent(ctx, config3) {
48596
48682
  onTextFlush: (flushedText) => {
48597
48683
  try {
48598
48684
  appendAssistantMessage(sessionsRoot, cwd, sid, [{ type: "text", text: flushedText }], {
48599
- uuid: randomUUID3(),
48685
+ uuid: randomUUID4(),
48600
48686
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
48601
48687
  });
48602
48688
  } catch {
@@ -48608,7 +48694,7 @@ async function runBuiltinAgent(ctx, config3) {
48608
48694
  emitResultMessage(usage.inputTokens || 0, usage.outputTokens || 0, emit2);
48609
48695
  if (!ctx.signal.aborted) {
48610
48696
  appendAssistantMessage(sessionsRoot, cwd, sid, text ? [{ type: "text", text }] : [], {
48611
- uuid: randomUUID3(),
48697
+ uuid: randomUUID4(),
48612
48698
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
48613
48699
  usage: {
48614
48700
  input_tokens: usage.inputTokens || 0,
@@ -48630,7 +48716,7 @@ async function runBuiltinAgent(ctx, config3) {
48630
48716
  cwd,
48631
48717
  sid,
48632
48718
  [{ type: "text", text: `\u26A0\uFE0F ${formatProviderError(error48)}` }],
48633
- { uuid: randomUUID3(), timestamp: (/* @__PURE__ */ new Date()).toISOString() }
48719
+ { uuid: randomUUID4(), timestamp: (/* @__PURE__ */ new Date()).toISOString() }
48634
48720
  );
48635
48721
  } catch {
48636
48722
  }
@@ -49326,7 +49412,7 @@ var CodexEventShim = class {
49326
49412
  };
49327
49413
 
49328
49414
  // packages/feature/agent/src/server/engines/codex.ts
49329
- import { randomUUID as randomUUID4 } from "crypto";
49415
+ import { randomUUID as randomUUID5 } from "crypto";
49330
49416
  import { writeFileSync as writeFileSync6, unlinkSync as unlinkSync4, mkdirSync as mkdirSync5, existsSync as existsSync6, statSync as statSync4, openSync as openSync2, readSync as readSync2, closeSync as closeSync2 } from "fs";
49331
49417
  import { StringDecoder as StringDecoder2 } from "string_decoder";
49332
49418
  import { join as join14 } from "path";
@@ -49551,7 +49637,7 @@ function writeImagesToTemp(images) {
49551
49637
  });
49552
49638
  }
49553
49639
  function codexToolUseId(item) {
49554
- return item.call_id || item.id || `tool-${randomUUID4()}`;
49640
+ return item.call_id || item.id || `tool-${randomUUID5()}`;
49555
49641
  }
49556
49642
  function parseCallLines(text, spawns, reports) {
49557
49643
  for (const line of text.split("\n")) {
@@ -49773,7 +49859,7 @@ function createCodexEventAdapter(ctx) {
49773
49859
  if (event.type !== "thread.started") syncSubAgents();
49774
49860
  switch (event.type) {
49775
49861
  case "thread.started": {
49776
- const threadId = event.thread_id || `codex-${randomUUID4()}`;
49862
+ const threadId = event.thread_id || `codex-${randomUUID5()}`;
49777
49863
  ctx.rekey(threadId);
49778
49864
  ctx.emit({ type: "system", subtype: "init", session_id: threadId });
49779
49865
  break;
@@ -50344,7 +50430,7 @@ var DelegationServiceLive = Layer_exports.effect(
50344
50430
  const spec = getEngineSpec(request2.engine);
50345
50431
  if (!spec) return yield* Effect_exports.fail(invalid("engine", `no engine spec for ${request2.engine}`));
50346
50432
  const parent = yield* resolveParent(parentRunId);
50347
- const presetId = randomUUID5();
50433
+ const presetId = randomUUID6();
50348
50434
  const dispatchParams = {
50349
50435
  prompt: buildChildPrompt(request2, parent),
50350
50436
  cwd: request2.cwd,
@@ -50390,7 +50476,7 @@ var DelegationServiceLive = Layer_exports.effect(
50390
50476
  );
50391
50477
 
50392
50478
  // packages/feature/agent/src/effect/botRegistryLive.ts
50393
- import { randomUUID as randomUUID6 } from "crypto";
50479
+ import { randomUUID as randomUUID7 } from "crypto";
50394
50480
  import { readFileSync as readFileSync8, realpathSync as realpathSync3 } from "fs";
50395
50481
  import path3 from "path";
50396
50482
 
@@ -50735,7 +50821,7 @@ var addBot = (inputPath) => Effect_exports.gen(function* () {
50735
50821
  if (existing) return { kind: "existing", bot: resolveBot(path3, existing, readManifest) };
50736
50822
  const clash = findNameClash(mergeBuiltins(resolveRegisteredBots(registry3)), manifest.name, dir);
50737
50823
  if (clash) return { kind: "clash", bot: clash };
50738
- const record2 = { id: `bot-${randomUUID6()}`, path: dir, addedAt: (/* @__PURE__ */ new Date()).toISOString() };
50824
+ const record2 = { id: `bot-${randomUUID7()}`, path: dir, addedAt: (/* @__PURE__ */ new Date()).toISOString() };
50739
50825
  await writeJsonFile(BOTS_FILE, { bots: [...registry3.bots, record2] });
50740
50826
  return { kind: "added", record: record2 };
50741
50827
  }),
@@ -51180,7 +51266,7 @@ function substitute(text, baseUrl) {
51180
51266
  }
51181
51267
 
51182
51268
  // packages/feature/agent/src/server/engines/orchestrator.ts
51183
- import { randomUUID as randomUUID7 } from "crypto";
51269
+ import { randomUUID as randomUUID8 } from "crypto";
51184
51270
 
51185
51271
  // packages/feature/agent/src/server/lib/outputStyles.ts
51186
51272
  var MAX_OUTPUT_STYLE_LENGTH = 8e3;
@@ -51231,7 +51317,7 @@ ${content}
51231
51317
  var WRITER_RELEASE_TIMEOUT_MS = 1e4;
51232
51318
  async function dispatchChat2(spec, body, request2) {
51233
51319
  const { sessionId, images, cwd, language } = body;
51234
- if (sessionId && isRunActive(sessionId)) {
51320
+ if (sessionId && isRunActive(sessionId) && !body.inject) {
51235
51321
  return { ok: false, status: 409, error: "session is already running" };
51236
51322
  }
51237
51323
  const rawPrompt = body.prompt;
@@ -51240,6 +51326,20 @@ async function dispatchChat2(spec, body, request2) {
51240
51326
  if (!hasContent) {
51241
51327
  return { ok: false, status: 400, error: "Missing prompt or images" };
51242
51328
  }
51329
+ const runId = typeof body.runId === "string" && body.runId || randomUUID8();
51330
+ let joinsWindingDownRun = false;
51331
+ if (sessionId && body.inject) {
51332
+ const injected = injectRun(
51333
+ sessionId,
51334
+ { text: typeof prompt === "string" ? prompt : void 0, images },
51335
+ runId
51336
+ );
51337
+ if (injected === "ok") return { ok: true, runKey: sessionId, sessionId, injected: true };
51338
+ if (injected === "unsupported") {
51339
+ return { ok: false, status: 409, error: "session is already running" };
51340
+ }
51341
+ joinsWindingDownRun = injected === "closed";
51342
+ }
51243
51343
  if (spec.preflight) {
51244
51344
  const pre = await spec.preflight(body);
51245
51345
  if (!pre.ok) return pre;
@@ -51248,15 +51348,18 @@ async function dispatchChat2(spec, body, request2) {
51248
51348
  const outputStyleText = await resolveOutputStyleText(body.outputStyleId);
51249
51349
  const outputStyle = outputStyleText ? formatOutputStyleSection(outputStyleText) : void 0;
51250
51350
  const abort = new AbortController();
51251
- const runId = typeof body.runId === "string" && body.runId || randomUUID7();
51252
51351
  let currentKey = sessionId || runId;
51253
51352
  let actualSessionId = sessionId;
51254
51353
  let isClosed = false;
51255
- if (isRunActive(currentKey)) {
51354
+ if (!joinsWindingDownRun && isRunActive(currentKey)) {
51256
51355
  return { ok: false, status: 409, error: "run already active" };
51257
51356
  }
51258
51357
  if (!await waitForWriter(currentKey, WRITER_RELEASE_TIMEOUT_MS)) {
51259
- return { ok: false, status: 409, error: "previous run is still stopping" };
51358
+ return {
51359
+ ok: false,
51360
+ status: 409,
51361
+ error: joinsWindingDownRun ? "the current run no longer takes messages; send again once it finishes" : "previous run is still stopping"
51362
+ };
51260
51363
  }
51261
51364
  if (!startRun(currentKey, cwd || "", promptText, runId, spec.name)) {
51262
51365
  return { ok: false, status: 409, error: "run already active" };
@@ -51295,6 +51398,9 @@ async function dispatchChat2(spec, body, request2) {
51295
51398
  },
51296
51399
  currentKey() {
51297
51400
  return currentKey;
51401
+ },
51402
+ acceptInput(sink) {
51403
+ setRunInjector(currentKey, sink);
51298
51404
  }
51299
51405
  };
51300
51406
  void (async () => {
@@ -17,7 +17,7 @@ import {
17
17
  readJsonFile,
18
18
  withFileLock,
19
19
  writeJsonFile
20
- } from "./chunk-FP25USWW.mjs";
20
+ } from "./chunk-7YQK3TY5.mjs";
21
21
 
22
22
  // packages/feature/console/src/server/plugins/browser/BrowserBridge.ts
23
23
  import { WebSocket } from "ws";
package/dist/httpApi.mjs CHANGED
@@ -29,11 +29,11 @@ import {
29
29
  unregisterBrowser,
30
30
  unregisterTerminal,
31
31
  writeStdinToCommand
32
- } from "./chunk-2KRJ7JEJ.mjs";
32
+ } from "./chunk-EMTH733G.mjs";
33
33
  import {
34
34
  getTerminalHistoryPath,
35
35
  tightenSecretFiles
36
- } from "./chunk-FP25USWW.mjs";
36
+ } from "./chunk-7YQK3TY5.mjs";
37
37
  import "./chunk-7P6ASYW6.mjs";
38
38
 
39
39
  // src/lib/httpApi.ts
@@ -22,7 +22,7 @@ import {
22
22
  updateGlobalState,
23
23
  withFileLock,
24
24
  writeJsonFile
25
- } from "./chunk-FP25USWW.mjs";
25
+ } from "./chunk-7YQK3TY5.mjs";
26
26
  import "./chunk-7P6ASYW6.mjs";
27
27
 
28
28
  // packages/feature/agent/src/server/scheduledTasks.ts
@@ -624,6 +624,7 @@ var en_default = {
624
624
  codexResumeFailedNew: "New session",
625
625
  placeholder: "Type a message, Enter to send (Shift+Enter for new line, paste images; start a line with / (skill), /@ (skill in a subagent) or @ (bot in a subagent), multiple allowed)",
626
626
  placeholderDisabled: "Generating... you can keep typing (ESC to cancel; if stuck, cancel and resend 'continue')",
627
+ placeholderRunning: "Generating... Enter sends now: it joins the current reply at its next step (ESC to stop)",
627
628
  imageSizeLimit: "Image size exceeds limit (max 5MB), current: {{size}}MB",
628
629
  viewGitChanges: "View Git changes",
629
630
  viewAllComments: "View all comments",
@@ -1941,6 +1942,7 @@ var zh_default = {
1941
1942
  codexResumeFailedNew: "\u65B0\u4F1A\u8BDD",
1942
1943
  placeholder: "\u8F93\u5165\u6D88\u606F\uFF0CEnter \u53D1\u9001\uFF08Shift+Enter \u6362\u884C\uFF0C\u53EF\u7C98\u8D34\u56FE\u7247\uFF1B\u884C\u9996 /\uFF08skill\uFF09\u3001/@\uFF08\u5B50\u4EE3\u7406\u6267\u884C skill\uFF09\u6216 @\uFF08\u5B50\u4EE3\u7406\u6267\u884C\u673A\u5668\u4EBA\uFF09\uFF0C\u652F\u6301\u591A\u884C\u591A\u547D\u4EE4\uFF09",
1943
1944
  placeholderDisabled: "\u751F\u6210\u4E2D... \u53EF\u7EE7\u7EED\u8F93\u5165 (ESC \u53D6\u6D88;\u5361\u4F4F\u592A\u4E45\u53EF\u53D6\u6D88\u540E\u91CD\u53D1\u300C\u7EE7\u7EED\u300D)",
1945
+ placeholderRunning: "\u751F\u6210\u4E2D... \u56DE\u8F66\u5373\u53D1\u9001\uFF0C\u4F1A\u5728\u5F53\u524D\u56DE\u590D\u7684\u4E0B\u4E00\u6B65\u63D2\u5165\uFF08ESC \u505C\u6B62\uFF09",
1944
1946
  imageSizeLimit: "\u56FE\u7247\u5927\u5C0F\u8D85\u8FC7\u9650\u5236\uFF08\u6700\u5927 5MB\uFF09\uFF0C\u5F53\u524D\u5927\u5C0F: {{size}}MB",
1945
1947
  viewGitChanges: "\u67E5\u770B Git \u53D8\u66F4",
1946
1948
  viewAllComments: "\u67E5\u770B\u6240\u6709\u8BC4\u8BBA",
package/dist/wsServer.mjs CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  spawnPtyInHost,
22
22
  unregisterBrowser,
23
23
  writeStdinToCommand
24
- } from "./chunk-2KRJ7JEJ.mjs";
24
+ } from "./chunk-EMTH733G.mjs";
25
25
  import {
26
26
  Effect_exports,
27
27
  FSError,
@@ -39,7 +39,7 @@ import {
39
39
  recoverStashedCodexRollouts,
40
40
  recoverStashedTranscripts,
41
41
  sanitizedSpawnEnv
42
- } from "./chunk-FP25USWW.mjs";
42
+ } from "./chunk-7YQK3TY5.mjs";
43
43
  import {
44
44
  registerWatcherSubscriber,
45
45
  subscribeBuildProgress
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@surething/cockpit",
3
- "version": "1.0.284",
3
+ "version": "1.0.285",
4
4
  "description": "OpenCockpit — the open Claude Code GUI for any LLM (Claude, Codex, DeepSeek, GLM, Kimi, Ollama). Cockpit IDE: parallel projects, terminal, browser & DB bubbles, code review. Self-host, local-first, MIT.",
5
5
  "author": "Robert",
6
6
  "license": "MIT",
@@ -113,9 +113,9 @@
113
113
  },
114
114
  "dependencies": {
115
115
  "@ai-sdk/openai": "^3.0.52",
116
- "@anthropic-ai/claude-agent-sdk": "0.3.293",
116
+ "@anthropic-ai/claude-agent-sdk": "0.3.296",
117
117
  "@dagrejs/dagre": "^3.0.0",
118
- "@openai/codex": "0.161.0",
118
+ "@openai/codex": "0.162.1",
119
119
  "@tanstack/react-virtual": "^3.13.18",
120
120
  "@tiptap/extension-link": "^3.19.0",
121
121
  "@tiptap/extension-placeholder": "^3.19.0",