@shuind/dsh-codex-harness 0.2.20 → 0.2.21

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/lib/client.js CHANGED
@@ -5316,7 +5316,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5316
5316
  position: "fixed",
5317
5317
  left: position.left,
5318
5318
  top: position.top,
5319
- zIndex: 100,
5319
+ zIndex: 0,
5320
5320
  pointerEvents: "none"
5321
5321
  }
5322
5322
  },
@@ -5379,27 +5379,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5379
5379
  setPosition(null);
5380
5380
  return;
5381
5381
  }
5382
+ let frame;
5383
+ let previous = null;
5382
5384
  const update = () => {
5383
- if (!target.isConnected) {
5384
- setPosition(null);
5385
- return;
5386
- }
5385
+ if (!target.isConnected) return;
5387
5386
  const rect = target.getBoundingClientRect();
5388
5387
  if (rect.width === 0 && rect.height === 0) {
5389
- setPosition(null);
5388
+ if (previous !== null) {
5389
+ previous = null;
5390
+ setPosition(null);
5391
+ }
5390
5392
  return;
5391
5393
  }
5392
- setPosition({
5394
+ const next = {
5393
5395
  left: Math.round(rect.right + 10),
5394
5396
  top: Math.round(rect.top + (rect.height - 26) / 2)
5395
- });
5397
+ };
5398
+ if (previous?.left === next.left && previous.top === next.top) return;
5399
+ previous = next;
5400
+ setPosition(next);
5401
+ };
5402
+ const track = () => {
5403
+ if (!target.isConnected) {
5404
+ previous = null;
5405
+ setPosition(null);
5406
+ return;
5407
+ }
5408
+ update();
5409
+ frame = window.requestAnimationFrame(track);
5396
5410
  };
5397
5411
  update();
5412
+ frame = window.requestAnimationFrame(track);
5398
5413
  window.addEventListener("resize", update);
5399
5414
  window.addEventListener("scroll", update, true);
5400
5415
  const observer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(update);
5401
5416
  observer?.observe(target);
5402
5417
  return () => {
5418
+ if (frame !== void 0) window.cancelAnimationFrame(frame);
5403
5419
  window.removeEventListener("resize", update);
5404
5420
  window.removeEventListener("scroll", update, true);
5405
5421
  observer?.disconnect();
package/lib/index.js CHANGED
@@ -2306,8 +2306,8 @@ function applyCodexCapabilitySettings(assembly, settings) {
2306
2306
  function buildCodexSystemPrompt(config = {}) {
2307
2307
  return resolveCodexSystemPrompt(config.systemPrompt);
2308
2308
  }
2309
- const EXEC_COMMAND_DESCRIPTION = "Runs a command in a PTY, returning output, a session ID for ongoing interaction, or a background job ID when requested.";
2310
- const WRITE_STDIN_DESCRIPTION = "Writes characters to an existing unified exec session and returns recent output.";
2309
+ const EXEC_COMMAND_DESCRIPTION = "Runs a shell command. By default it uses pipes: a running session can be polled for output but does not accept stdin. Set tty=true before starting a command that needs interactive input; background jobs use pipes.";
2310
+ const WRITE_STDIN_DESCRIPTION = "Polls output from an existing unified exec session. Non-empty chars can be sent only to a session created with tty=true; pipe-backed sessions accept empty chars for polling only.";
2311
2311
  const UPDATE_PLAN_DESCRIPTION = "Updates the task plan.\nProvide an optional explanation and a list of plan items, each with a step and status.\nAt most one step can be in_progress at a time.";
2312
2312
  const PLAN_STATUSES = [
2313
2313
  "pending",
@@ -2523,7 +2523,7 @@ function registerExecTools(ctx, config) {
2523
2523
  },
2524
2524
  chars: {
2525
2525
  type: "string",
2526
- description: "Bytes to write to stdin. Defaults to empty, which polls without writing."
2526
+ description: "Characters to send to a PTY session created with tty=true. Leave empty to poll output without writing; pipe-backed sessions do not accept input."
2527
2527
  },
2528
2528
  yield_time_ms: {
2529
2529
  type: "number",
@@ -364,7 +364,10 @@ export function ActivityLine({ sessionId: _sessionId, useSession, useSessions: _
364
364
  position: 'fixed',
365
365
  left: position.left,
366
366
  top: position.top,
367
- zIndex: 100,
367
+ // Keep the overlay in the conversation layer. The host composer is
368
+ // sticky at z-index 7, so this follows the same occlusion rule as
369
+ // the native Deep diving status instead of floating above the input.
370
+ zIndex: 0,
368
371
  pointerEvents: 'none',
369
372
  }),
370
373
  }, children: [_jsx("span", { "aria-hidden": "true", style: {
@@ -417,27 +420,50 @@ function useTurnStatusPosition(target) {
417
420
  setPosition(null);
418
421
  return undefined;
419
422
  }
423
+ let frame;
424
+ let previous = null;
420
425
  const update = () => {
421
426
  if (!target.isConnected) {
422
- setPosition(null);
423
427
  return;
424
428
  }
425
429
  const rect = target.getBoundingClientRect();
426
430
  if (rect.width === 0 && rect.height === 0) {
427
- setPosition(null);
431
+ if (previous !== null) {
432
+ previous = null;
433
+ setPosition(null);
434
+ }
428
435
  return;
429
436
  }
430
- setPosition({
437
+ const next = {
431
438
  left: Math.round(rect.right + 10),
432
439
  top: Math.round(rect.top + (rect.height - 26) / 2),
433
- });
440
+ };
441
+ if (previous?.left === next.left && previous.top === next.top)
442
+ return;
443
+ previous = next;
444
+ setPosition(next);
445
+ };
446
+ const track = () => {
447
+ if (!target.isConnected) {
448
+ previous = null;
449
+ setPosition(null);
450
+ return;
451
+ }
452
+ // Streaming rows can be inserted above the status without resizing the
453
+ // status element itself; a ResizeObserver alone would leave the overlay
454
+ // at its first position.
455
+ update();
456
+ frame = window.requestAnimationFrame(track);
434
457
  };
435
458
  update();
459
+ frame = window.requestAnimationFrame(track);
436
460
  window.addEventListener('resize', update);
437
461
  window.addEventListener('scroll', update, true);
438
462
  const observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(update);
439
463
  observer?.observe(target);
440
464
  return () => {
465
+ if (frame !== undefined)
466
+ window.cancelAnimationFrame(frame);
441
467
  window.removeEventListener('resize', update);
442
468
  window.removeEventListener('scroll', update, true);
443
469
  observer?.disconnect();
@@ -381,8 +381,8 @@ export function applyCodexCapabilitySettings(assembly, settings) {
381
381
  export function buildCodexSystemPrompt(config = {}) {
382
382
  return resolveCodexSystemPrompt(config.systemPrompt);
383
383
  }
384
- const EXEC_COMMAND_DESCRIPTION = 'Runs a command in a PTY, returning output, a session ID for ongoing interaction, or a background job ID when requested.';
385
- const WRITE_STDIN_DESCRIPTION = 'Writes characters to an existing unified exec session and returns recent output.';
384
+ const EXEC_COMMAND_DESCRIPTION = 'Runs a shell command. By default it uses pipes: a running session can be polled for output but does not accept stdin. Set tty=true before starting a command that needs interactive input; background jobs use pipes.';
385
+ const WRITE_STDIN_DESCRIPTION = 'Polls output from an existing unified exec session. Non-empty chars can be sent only to a session created with tty=true; pipe-backed sessions accept empty chars for polling only.';
386
386
  const UPDATE_PLAN_DESCRIPTION = 'Updates the task plan.\nProvide an optional explanation and a list of plan items, each with a step and status.\nAt most one step can be in_progress at a time.';
387
387
  const PLAN_STATUSES = ['pending', 'in_progress', 'completed'];
388
388
  function assertCapabilityEnabled(current, setting, toolName) {
@@ -533,7 +533,7 @@ function registerExecTools(ctx, config) {
533
533
  description: WRITE_STDIN_DESCRIPTION,
534
534
  parameters: {
535
535
  session_id: { type: 'number', required: true, description: 'Identifier of the running unified exec session.' },
536
- chars: { type: 'string', description: 'Bytes to write to stdin. Defaults to empty, which polls without writing.' },
536
+ chars: { type: 'string', description: 'Characters to send to a PTY session created with tty=true. Leave empty to poll output without writing; pipe-backed sessions do not accept input.' },
537
537
  yield_time_ms: { type: 'number', description: 'Wait before yielding output. Non-empty writes default to 250 ms and cap at 30000 ms; empty polls wait 5000-300000 ms by default.' },
538
538
  max_output_tokens: { type: 'number', description: 'Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy.' },
539
539
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuind/dsh-codex-harness",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "packageManager": "pnpm@9.15.9",
5
5
  "description": "Codex coding preset with customizable prompts and tools for DSH.",
6
6
  "type": "module",
@@ -79,14 +79,14 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "license": "MIT",
83
- "dsh": {
84
- "engines": {
85
- "dsh": "0.1.5-rc.2"
86
- },
87
- "bundle": {
88
- "patch": "./cordis.patch.yml"
89
- },
82
+ "license": "MIT",
83
+ "dsh": {
84
+ "engines": {
85
+ "dsh": "0.1.5-rc.2"
86
+ },
87
+ "bundle": {
88
+ "patch": "./cordis.patch.yml"
89
+ },
90
90
  "client": {
91
91
  "inject": [
92
92
  "@deepseek-ai/dsh-client-locale",