@dmsdc-ai/aigentry-telepty 0.1.4 → 0.1.5

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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "cross_session_deliberation",
3
+ "sender": "telepty (orchestrator)",
4
+ "topic": "[Feature Proposal] Autonomous Deliberation Handoff",
5
+ "content": "1. 배경 및 발생한 해프닝 (The Happening)\n최근 aigentry-brain 프로젝트에서 아키텍처 결정을 위해 mcp-deliberation을 사용하여 Claude와 GPT-4 간의 토론을 진행했습니다. 토론이 완료되어 상태가 completed로 변경되고 synthesis (Next Steps 포함)가 로컬 상태 파일(~/.local/lib/mcp-deliberation/state/...)에 기록되었습니다.\n\n이때 놀라운 창발적(Emergent) 동작이 발생했습니다. 백그라운드에서 프로젝트 디렉토리를 주시하며 ultrawork (자율 실행) 모드로 돌고 있던 다른 Claude Code 에이전트가, 사용자의 명시적인 프롬프트 지시 없이도 토론 결과(Synthesis)가 업데이트된 것을 감지했습니다. 그리고는 스스로 토론에서 합의된 'Next Steps'를 파싱하여, 하위 에이전트들을 스폰(Spawn)하고 실제 코드 구현, 테스트 작성, 빌드 검증까지 완벽하게 병렬로 끝마쳤습니다.\n\n즉, '인간은 방향성 토론만 중재하고, 코딩은 합의안을 바탕으로 백그라운드 에이전트가 알아서 처리하는' 이상적인 파이프라인이 우연히 시연된 것입니다.\n\n2. 현재 현황 (Current Status)\n* 현재 이 동작은 공식적인 연동 인터페이스 없이, 백그라운드 에이전트(Claude Code 등)가 파일 시스템이나 프로젝트 컨텍스트를 지속적으로 모니터링하다가 우연히 상태 변경을 주워 먹는(Polling/Heuristic) 방식으로 발생했습니다.\n* synthesis 필드는 단순한 Markdown 텍스트 덩어리이므로, 실행 에이전트가 구체적으로 '무엇을 코딩해야 하는지'를 발췌할 때 할루시네이션이나 오작동의 여지가 존재합니다.\n\n3. 기능화 방향 및 제안 (How to Feature-ize)\n이 강력한 패턴을 mcp-deliberation의 공식 기능(Handoff Pattern)으로 승격시키기 위해 다음 세 가지의 기능 추가를 제안합니다.\n\n* A. Synthesis 구조화 (Structured Synthesis Schema)\n * 토론 합성 단계(deliberation_synthesize)에서 결과물을 단순 Markdown이 아닌 구조화된 JSON 형태로 분리합니다.\n * 예: {\"summary\": \"...\", \"decisions\": [...], \"actionable_tasks\": [{\"id\": 1, \"task\": \"refactor X\", \"files\": [\"src/X.ts\"]}]}\n * 이를 통해 실행 에이전트가 정확히 태스크 리스트만 빼내어 작업을 할당할 수 있습니다.\n* B. Handoff Trigger (명시적 실행 인박스/웹훅)\n * 토론이 성공적으로 끝났을 때, 실행을 전담하는 에이전트들을 깨우기 위한 메커니즘이 필요합니다.\n * 방안 1: ~/.local/lib/mcp-deliberation/inbox/ 같은 태스크 큐 디렉토리를 만들어, 합의안을 task.json으로 떨궈 실행 에이전트가 이를 워치(Watch)하게 합니다.\n * 방안 2: deliberation_start 옵션에 auto_execute: true 플래그를 추가하여, 토론이 끝나면 자동으로 시스템에 등록된 범용 에이전트(Generalist / Executor) 도구를 호출해 코딩을 지시하도록 라우팅합니다.\n* C. Handoff Status 연동\n * 현재 토론의 상태는 active -> awaiting_synthesis -> completed로 끝납니다.\n * 여기에 executing -> implemented 같은 후속 상태 트래킹을 추가하여, Session Monitor 화면에서도 토론 결과가 실제 코드로 구현되고 있는지 프로그레스 바를 통해 볼 수 있게 시각화합니다.\n\n4. 기대 효과\n이 기능이 구현되면 mcp-deliberation은 단순한 'LLM 간의 토론장'을 넘어, '요구사항 분석 -> 아키텍처 결정 -> 자동 구현'으로 이어지는 완전자율형 소프트웨어 팩토리(Software Factory)의 핵심 오케스트레이터로 진화할 것입니다.",
6
+ "instructions": "dustcraw, brain, deliberation 세션에 있는 에이전트들은 위 제안을 읽고 각자의 프로젝트(역할) 관점에서 이 기능(자율 실행 핸드오프)의 타당성과 아키텍처적 영향을 분석하여 버스(bus)로 답변을 회신해 주세요."
7
+ }
@@ -1 +1 @@
1
- {"topic": "Brainstorming and critiquing the 3 communication modes in telepty (Prompt Injection, Visual Log, Background JSON). What crucial interaction pattern between human users and AI agents is missing from this list? Consider synchronous vs asynchronous, blocking vs non-blocking, and explicit handshakes.", "speakers": ["claude", "codex", "gemini"], "role_preset": "brainstorm"}
1
+ {"topic": "[Feature Proposal] Autonomous Deliberation Handoff. 1. Background: Emergent behavior observed where a background agent automatically parsed a deliberation synthesis and implemented it without human intervention. 2. Current Status: Works via fragile heuristic polling of unstructured markdown. 3. Proposal: A) Structured JSON Synthesis B) Explicit Handoff Trigger (inbox dir or auto_execute flag) C) Handoff Status tracking in monitor. Discuss the feasibility and architectural implications of this across dustcraw, brain, deliberation, and telepty.", "speakers": ["gemini", "claude", "codex", "gpt4"], "role_preset": "brainstorm"}
@@ -0,0 +1 @@
1
+ {"topic": "Architectural Design for Session x LLM CLI Deliberation. Currently, aigentry-deliberation orchestrates local LLM CLIs via MCP. How do we extend this to orchestrate across PHYSICAL terminal sessions distributed via aigentry-telepty? We need a bridge between the logical deliberation rounds and the physical telepty bus. The goal is to let the deliberation server route a turn to a specific telepty session ID, let that session`s AI generate a response, and capture that response back into the deliberation forum. Brainstorm the most elegant, Unix-like bridge architecture.", "speakers": ["claude", "gemini", "codex"], "role_preset": "brainstorm"}
@@ -0,0 +1 @@
1
+ {"topic": "Architectural Design for Session x LLM CLI Deliberation. Currently, aigentry-deliberation orchestrates local LLM CLIs via MCP. How do we extend this to orchestrate across PHYSICAL terminal sessions distributed via aigentry-telepty? We need a bridge between the logical deliberation rounds and the physical telepty bus. The goal is to let the deliberation server route a turn to a specific telepty session ID, let that session`s AI generate a response, and capture that response back into the deliberation forum. Brainstorm the most elegant, Unix-like bridge architecture.", "speakers": ["gemini", "codex", "claude"], "role_preset": "brainstorm"}
@@ -33,5 +33,16 @@ When the user asks about their current session ID, wants to check active session
33
33
  ```
34
34
  4. **To subscribe to the Event Bus (Listen for JSON events):**
35
35
  - Run `nohup telepty listen > .telepty_bus_events.log 2>&1 &`
36
- 5. **To update telepty:**
36
+ 5. **To physically OPEN a new Terminal Window for the user (macOS):**
37
+ - If the user asks you to "open a new telepty terminal" or "방 파줘", you can physically spawn a new Ghostty/Terminal window on their screen that is already attached to a telepty session.
38
+ - Run this shell command (replace `<ID>` and `<CMD>`):
39
+ ```bash
40
+ cat << 'EOF' > /tmp/telepty-auto.command
41
+ #!/bin/bash
42
+ telepty spawn --id <ID> <CMD>
43
+ EOF
44
+ chmod +x /tmp/telepty-auto.command
45
+ open -a Ghostty /tmp/telepty-auto.command || open /tmp/telepty-auto.command
46
+ ```
47
+ 6. **To update telepty:**
37
48
  - Run `telepty update`.
package/cli.js CHANGED
@@ -490,9 +490,16 @@ async function main() {
490
490
  return;
491
491
  }
492
492
 
493
- if (cmd === 'listen') {
493
+ if (cmd === 'listen' || cmd === 'monitor') {
494
494
  await ensureDaemonRunning();
495
- console.log('\x1b[36m👂 Listening to the telepty event bus...\x1b[0m');
495
+
496
+ if (cmd === 'monitor') {
497
+ console.log('\x1b[36m\x1b[1m📺 Telepty Event Billboard\x1b[0m');
498
+ console.log('Listening for background agent communications...\n');
499
+ } else {
500
+ console.log('\x1b[36m👂 Listening to the telepty event bus...\x1b[0m');
501
+ }
502
+
496
503
  const wsUrl = `ws://${REMOTE_HOST}:${PORT}/api/bus?token=${encodeURIComponent(TOKEN)}`;
497
504
  const ws = new WebSocket(wsUrl);
498
505
 
@@ -501,8 +508,29 @@ async function main() {
501
508
  });
502
509
 
503
510
  ws.on('message', (message) => {
504
- // Print raw JSON to stdout so agents can parse it
505
- console.log(message.toString());
511
+ const raw = message.toString();
512
+ if (cmd === 'listen') {
513
+ // Raw JSON output for machines
514
+ console.log(raw);
515
+ } else {
516
+ // Human readable billboard output
517
+ try {
518
+ const msg = JSON.parse(raw);
519
+ const time = new Date().toLocaleTimeString();
520
+ const sender = msg.sender || msg.from || 'Unknown';
521
+ const target = msg.target_agent || msg.to || 'Broadcast';
522
+
523
+ let preview = msg.content || msg.message || msg.payload || JSON.stringify(msg);
524
+ if (typeof preview === 'object') preview = JSON.stringify(preview);
525
+ if (preview.length > 200) preview = preview.substring(0, 197) + '...';
526
+
527
+ console.log(`\x1b[90m[${time}]\x1b[0m \x1b[32m\x1b[1m${sender}\x1b[0m ➔ \x1b[33m\x1b[1m${target}\x1b[0m`);
528
+ console.log(` \x1b[37m${preview}\x1b[0m\n`);
529
+ } catch (e) {
530
+ // Fallback if not valid JSON
531
+ console.log(`\x1b[90m[${new Date().toLocaleTimeString()}]\x1b[0m 📦 \x1b[37m${raw}\x1b[0m\n`);
532
+ }
533
+ }
506
534
  });
507
535
 
508
536
  ws.on('close', () => {
@@ -528,6 +556,7 @@ Usage:
528
556
  telepty multicast <id1,id2> "<prompt>" Inject text into multiple specific sessions
529
557
  telepty broadcast "<prompt>" Inject text into ALL active sessions
530
558
  telepty listen Listen to the event bus and print JSON to stdout
559
+ telepty monitor Human-readable real-time billboard of bus events
531
560
  telepty update Update telepty to the latest version
532
561
  `);
533
562
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmsdc-ai/aigentry-telepty",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "main": "daemon.js",
5
5
  "bin": {
6
6
  "telepty": "cli.js",