peertable 0.8.20 → 0.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peertable",
3
- "version": "0.8.20",
3
+ "version": "0.8.21",
4
4
  "description": "A round table of peer agents. No orchestrator at the head. Turn Claude Code, Codex, and Grok sessions into a team of equal, long-lived peers.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/room/client.mjs CHANGED
@@ -13,7 +13,7 @@ import { findModelsDoc, resolveSeatIdentity } from '../skill/scripts/resolve-sea
13
13
 
14
14
  // client.mjs 側のハードコード版数。package.json の version と一致していることを
15
15
  // diagnostics の version_consistency が見る(2 つの版数源の drift 検出。決定45)
16
- const MCP_VERSION = '0.8.20'
16
+ const MCP_VERSION = '0.8.21'
17
17
  const PKG_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
18
18
 
19
19
  const USAGE = `usage:
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from 'node:fs'
3
+ import { Client } from '@modelcontextprotocol/sdk/client/index.js'
4
+ import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'
5
+
6
+ const [sessionId, promptFile] = process.argv.slice(2)
7
+ if (!sessionId || !promptFile) throw new Error('SEAT_AITERM_SEND_ARGS_INVALID')
8
+ const prompt = readFileSync(promptFile, 'utf8')
9
+ const client = new Client({ name: 'peertable-seat-send', version: '0.8.21' })
10
+ await client.connect(new StdioClientTransport({ command: 'aiterm-mcp', env: process.env }))
11
+ const result = await client.callTool({
12
+ name: 'pty_send',
13
+ arguments: { session_id: sessionId, text: prompt, enter: true },
14
+ })
15
+ await client.close()
16
+ if (result.isError) throw new Error(result.content?.[0]?.text || 'SEAT_AITERM_SEND_FAILED')
17
+ const receipt = result.structuredContent ?? JSON.parse(result.content?.[0]?.text ?? '{}')
18
+ if (receipt?.schema !== 'aiterm.pty-send-result.v1' || receipt.session_id !== sessionId
19
+ || receipt.mode !== 'agent_dispatch' || receipt.submit_residue === true) {
20
+ throw new Error('SEAT_AITERM_SEND_RECEIPT_INVALID')
21
+ }
22
+ process.stdout.write(`${JSON.stringify(receipt)}\n`)
@@ -482,6 +482,7 @@ pass_codex_pane() {
482
482
  while IFS= read -r key; do
483
483
  [ -n "$key" ] || continue
484
484
  tmux_at send-keys -t "$sess" "$key" || return 1
485
+ sleep .3
485
486
  done < <(python3 -c 'import json,sys
486
487
  a=json.loads(sys.stdin.read() or "null")
487
488
  print("\n".join(a.get("keys") or []) if isinstance(a, dict) else "")' <<<"$json")
@@ -615,6 +616,15 @@ if [ "$brief_dispatched" = true ]; then
615
616
  fi
616
617
 
617
618
  if [ -n "$brief" ] && [ "$brief_dispatched" != true ]; then
619
+ if [ "$brief_in_composer" != true ]; then
620
+ if node "$peertable_script_dir/aiterm-send.mjs" "$sess" "$brief_file" >/dev/null; then
621
+ brief_completed=true
622
+ echo "briefed: $sess(Aiterm pty_send)"
623
+ else
624
+ echo "LAUNCH_BRIEF_SEND_FAILED: Aiterm pty_sendでbriefをdispatchできない" >&2
625
+ exit 1
626
+ fi
627
+ else
618
628
  # Codex はヘッダを描いた後も MCP 初期化を続ける。Aiterm の ready 契約に合わせ、
619
629
  # 同じ可視 pane 内に入力候補行とモデルフッタがある構造を連続して観測する。
620
630
  # hook / MCP warning の更新で画面全体が変わっても、入力欄周辺が ready なら通す。
@@ -682,6 +692,7 @@ if [ -n "$brief" ] && [ "$brief_dispatched" != true ]; then
682
692
  fi
683
693
  brief_completed=true
684
694
  echo "briefed: $sess"
695
+ fi
685
696
  fi
686
697
  fi
687
698