mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-03 05:59:43 +02:00
refactor: SSE event handlers, LLM context optimization, @fileoverview docs (#29)
* refactor: extract SSE event handlers into named class methods Replace ~80 inline addListener closures in connectSSE() with a declarative _SSE_HANDLER_MAP array that drives registration in a single loop. Each handler is now a named _on* method on CodemanApp, making them individually addressable for LLM navigation. Add SSE_EVENTS constant object in constants.js to eliminate magic event-type strings scattered across the frontend. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: fix inaccuracies in CLAUDE.md - Fix types barrel path: src/types.ts → src/types/index.ts - Update app.js line count: ~12K → ~11.5K - Correct route handler counts (113 → 111, per-group fixes) - Add code style, ESM gotcha, env vars, route test, lifecycle log docs - Add Node 22 CI note, test teardown timeout, port range Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add mobile screenshots and QR auth security writeup to README Add 3 mobile screenshots (landing, idle, active) and expand the mobile section with QR auth security design details and a touch-optimized interface subsection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: bundle xterm-zerolag-input as vendor IIFE and add pre-commit hook Build and postinstall now bundle the local xterm-zerolag-input package as an IIFE at vendor/xterm-zerolag-input.js with global LocalEchoOverlay shim. Add git pre-commit hook that runs prettier --check on staged .ts files to catch format issues before CI. Also bump constants.js and app.js cache-bust versions to 0.3.0 and add tunnel upload URL display row in settings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add cloudflared install support and interactive launch menu - Add optional cloudflared dependency detection and installation across 6 distro families (macOS, Debian, Fedora, Arch, Alpine, SUSE) - Add tunnel systemd service setup helper - Replace post-install instructions with interactive launch menu (run now / systemd service / skip) - Uninstall now cleans up both codeman-web and codeman-tunnel services Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: gitignore readme-preview.mjs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: WIP — SSE event constants, @fileoverview docs, CLAUDE.md compression - Migrate broadcast() string literals → SseEvent.* typed constants - Add @fileoverview with cross-domain references to all 13 type domain files - Add @fileoverview to frontend JS modules (constants, mobile, voice, etc.) - Add section dividers to route files for LLM scanability - Compress CLAUDE.md: flat file list → domain table, fix counts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: optimize codebase for LLM context window efficiency CLAUDE.md: 456 → 309 lines (32% reduction) - Merge Commands into compact table, remove redundant bash block - Convert Security section to dense table format - Merge Performance + Resource Limits, Debugging + Troubleshooting - Compress Tunnel, Memory Leak, Scripts, Screenshots sections - Remove Key Patterns that duplicate @fileoverview in source files Backend @fileoverview enhancements (10 priority files): - session.ts: key methods, events, cross-domain refs - respawn-controller.ts: state machine, idle detection layers - ralph-tracker.ts: exports, circuit breaker, events - ralph-loop.ts: lifecycle, persistence, events - subagent-watcher.ts: watched patterns, teammate detection - server.ts: coordination list, port interfaces - state-store.ts: dual-file persistence, migration - session-manager.ts: lifecycle methods, mutex guard - hooks-config.ts: hook events list, categories - sse-events.ts: category breakdown (~90 events, 17 categories) Frontend app.js: add 6 section dividers, update @fileoverview line refs Fix: escape glob `*/` in JSDoc that broke ESLint parser Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address PR #29 review bugs - server.ts: replace hardcoded 'session:needsRefresh' with SseEvent constant - install.sh: fix Alpine cloudflared install for non-root (download to tmpfile first) - install.sh: replace Arch pacman (AUR-only) with direct binary download - index.html: bump all 8 remaining cache-bust versions from v0.2.9 to v0.3.0 - mobile-handlers.js: fix @dependency annotation (keyboard-accessory.js, not constants.js) - types/push.ts: fix layer number (4, not 5) - subagent-watcher.ts: fix watched pattern path to include {session} segment - constants.js: fix SSE_EVENTS count in @fileoverview (~73, not ~65) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+16
-1
@@ -1,5 +1,20 @@
|
||||
/**
|
||||
* @fileoverview API types and error handling
|
||||
* @fileoverview API types and error handling.
|
||||
*
|
||||
* Defines the standardized API response envelope (ApiResponse), error codes,
|
||||
* hook event types from Claude Code's hooks system, and utility functions
|
||||
* for error message extraction. Used by all route modules in `src/web/routes/`.
|
||||
*
|
||||
* Key exports:
|
||||
* - ApiResponse<T> — discriminated union envelope (success with data or error with code)
|
||||
* - ApiErrorCode — enum of standard error codes with user-friendly messages
|
||||
* - HookEventType — union of Claude Code hook event names (idle_prompt, stop, etc.)
|
||||
* - createErrorResponse() — factory for consistent error responses
|
||||
* - getErrorMessage() — safe extraction from unknown catch values
|
||||
* - CaseInfo, QuickStartResponse — case folder metadata types
|
||||
*
|
||||
* No dependencies on other domain modules. Consumed by all route modules
|
||||
* and validated via Zod schemas in `src/web/schemas.ts`.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
+18
-1
@@ -1,5 +1,22 @@
|
||||
/**
|
||||
* @fileoverview Application state type definitions
|
||||
* @fileoverview Application state type definitions.
|
||||
*
|
||||
* Defines the top-level persisted state structure (AppState) which composes
|
||||
* types from multiple domains: SessionState (session), TaskState (task),
|
||||
* RalphLoopState (ralph), and RespawnConfig (respawn).
|
||||
*
|
||||
* Key exports:
|
||||
* - AppState — root state object (sessions, tasks, ralphLoop, config, globalStats, tokenStats)
|
||||
* - AppConfig — app configuration including default RespawnConfig
|
||||
* - GlobalStats — cumulative usage stats across all sessions (lifetime)
|
||||
* - TokenStats / TokenUsageEntry — daily token usage history
|
||||
* - DEFAULT_CONFIG — default AppConfig values
|
||||
* - createInitialState() — factory for fresh AppState
|
||||
*
|
||||
* Persisted to `~/.codeman/state.json` via StateStore (debounced 500ms writes).
|
||||
* Served at `GET /api/status` (full state) and `GET /api/config` (config subset).
|
||||
*
|
||||
* Cross-domain imports: SessionState, TaskState, RalphLoopState, RespawnConfig.
|
||||
*/
|
||||
|
||||
import type { SessionState } from './session.js';
|
||||
|
||||
+10
-1
@@ -1,5 +1,14 @@
|
||||
/**
|
||||
* @fileoverview Common/shared type definitions
|
||||
* @fileoverview Common/shared type definitions.
|
||||
*
|
||||
* Base types used across multiple domains. No dependencies on other domain modules.
|
||||
*
|
||||
* Key exports:
|
||||
* - Disposable — interface for objects requiring explicit cleanup (timers, watchers)
|
||||
* - BufferConfig — size-limited storage config (terminal: 2MB, text: 1MB)
|
||||
* - CleanupRegistration / CleanupResourceType — entries for the centralized CleanupManager
|
||||
* - NiceConfig / DEFAULT_NICE_CONFIG — process priority settings for `nice`/`ionice`
|
||||
* - ProcessStats — memory/CPU/child-count snapshot for resource monitoring
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
+50
-2
@@ -1,6 +1,54 @@
|
||||
/**
|
||||
* @fileoverview Barrel re-export for all type definitions.
|
||||
* Split into domain modules for maintainability.
|
||||
* @fileoverview Barrel re-export for all Codeman type definitions.
|
||||
*
|
||||
* The type system is split into 13 domain modules for maintainability.
|
||||
* Import from `'./types'` (or `'./types/index.js'`) to access any type:
|
||||
*
|
||||
* ```ts
|
||||
* import type { SessionState, AppState, RespawnConfig } from './types';
|
||||
* import { createErrorResponse, ApiErrorCode } from './types';
|
||||
* ```
|
||||
*
|
||||
* ## Domain modules
|
||||
*
|
||||
* | Module | Key exports | Persistence / API |
|
||||
* |--------------|-----------------------------------------------------------------------|-------------------------------------------------|
|
||||
* | common | Disposable, BufferConfig, CleanupRegistration, NiceConfig, ProcessStats | In-memory only |
|
||||
* | session | SessionState, SessionConfig, SessionStatus, SessionMode, ClaudeMode, OpenCodeConfig | `~/.codeman/state.json` → `GET /api/sessions` |
|
||||
* | task | TaskDefinition, TaskState, TaskStatus | `~/.codeman/state.json` → `GET /api/tasks` |
|
||||
* | app-state | AppState, AppConfig, GlobalStats, TokenStats, DEFAULT_CONFIG | `~/.codeman/state.json` → `GET /api/status` |
|
||||
* | respawn | RespawnConfig, RespawnPreset, RespawnCycleMetrics, RalphLoopHealthScore, TimingHistory | Per-session in state.json → `GET /api/sessions/:id/respawn` |
|
||||
* | ralph | RalphTrackerState, RalphTodoItem, CircuitBreakerStatus, RalphStatusBlock, RalphSessionState | Per-session → `GET /api/sessions/:id/ralph-state` |
|
||||
* | api | ApiResponse, ApiErrorCode, HookEventType, CaseInfo, createErrorResponse, getErrorMessage | Used by all route handlers |
|
||||
* | lifecycle | LifecycleEntry, LifecycleEventType | `~/.codeman/session-lifecycle.jsonl` (append-only) |
|
||||
* | run-summary | RunSummary, RunSummaryEvent, RunSummaryStats | In-memory → `GET /api/sessions/:id/run-summary` |
|
||||
* | tools | ActiveBashTool, ImageDetectedEvent | In-memory, broadcast via SSE |
|
||||
* | teams | TeamConfig, TeamMember, TeamTask, InboxMessage, PaneInfo | `~/.claude/teams/`, `~/.claude/tasks/` → `GET /api/teams` |
|
||||
* | push | PushSubscriptionRecord, VapidKeys | `~/.codeman/push-keys.json`, `~/.codeman/push-subscriptions.json` |
|
||||
* | plan | PlanItem, PlanTaskStatus, TddPhase | In-memory → `GET /api/sessions/:id/plan/tasks` |
|
||||
*
|
||||
* ## Cross-domain relationship map
|
||||
*
|
||||
* ```
|
||||
* AppState (app-state)
|
||||
* ├── sessions: Record<id, SessionState> ← session domain
|
||||
* │ ├── respawnConfig?: RespawnConfig ← respawn domain (per-session settings)
|
||||
* │ ├── ralphEnabled?: boolean ← toggles ralph tracking
|
||||
* │ └── id ← referenced by:
|
||||
* │ ├── RalphSessionState.sessionId ← ralph domain
|
||||
* │ ├── RunSummary.sessionId ← run-summary domain
|
||||
* │ ├── ActiveBashTool.sessionId ← tools domain
|
||||
* │ ├── RespawnCycleMetrics.sessionId ← respawn domain
|
||||
* │ └── TeamConfig.leadSessionId ← teams domain
|
||||
* ├── tasks: Record<id, TaskState> ← task domain
|
||||
* │ └── assignedSessionId → SessionState.id
|
||||
* ├── ralphLoop: RalphLoopState ← ralph domain (global loop state)
|
||||
* └── config: AppConfig
|
||||
* └── respawn: RespawnConfig ← respawn domain (global defaults)
|
||||
*
|
||||
* RalphLoopHealthScore (respawn)
|
||||
* └── components.circuitBreaker ← derived from CircuitBreakerStatus (ralph)
|
||||
* ```
|
||||
*/
|
||||
|
||||
export * from './common.js';
|
||||
|
||||
+12
-1
@@ -1,5 +1,16 @@
|
||||
/**
|
||||
* @fileoverview Session lifecycle audit types
|
||||
* @fileoverview Session lifecycle audit types.
|
||||
*
|
||||
* Types for the append-only JSONL audit log at `~/.codeman/session-lifecycle.jsonl`.
|
||||
* Records session creation, PTY launch/exit, server start/stop, tmux recovery,
|
||||
* and QR auth events. Written by `SessionLifecycleLog`, read for debugging.
|
||||
*
|
||||
* Key exports:
|
||||
* - LifecycleEventType — union of 11 event types (created, started, exit, qr_auth, etc.)
|
||||
* - LifecycleEntry — a single timestamped log entry with event, sessionId, and optional metadata
|
||||
*
|
||||
* No dependencies on other domain modules. LifecycleEntry.sessionId links
|
||||
* back to SessionState.id for correlation.
|
||||
*/
|
||||
|
||||
/** Types of session lifecycle events recorded to the audit log */
|
||||
|
||||
+14
-1
@@ -1,5 +1,18 @@
|
||||
/**
|
||||
* @fileoverview Plan orchestrator type definitions
|
||||
* @fileoverview Plan orchestrator type definitions.
|
||||
*
|
||||
* Types for the 2-agent plan generation system (optional research agent → planner agent).
|
||||
*
|
||||
* Key exports:
|
||||
* - PlanItem — a single task with priority (P0/P1/P2), TDD phase, dependencies, verification criteria
|
||||
* - PlanTaskStatus — 'pending' | 'in_progress' | 'completed' | 'failed' | 'blocked'
|
||||
* - TddPhase / PlanPhase — 'setup' | 'test' | 'impl' | 'verify' | 'review'
|
||||
*
|
||||
* Used by PlanOrchestrator (`src/plan-orchestrator.ts`) and the plan API routes
|
||||
* (`src/web/routes/plan-routes.ts`). Served at `GET /api/sessions/:id/plan/tasks`.
|
||||
*
|
||||
* PlanItem was moved here from plan-orchestrator.ts to break a circular dependency.
|
||||
* No dependencies on other domain modules.
|
||||
*/
|
||||
|
||||
/** Task execution status for plan tracking */
|
||||
|
||||
+14
-1
@@ -1,5 +1,18 @@
|
||||
/**
|
||||
* @fileoverview Web Push notification type definitions
|
||||
* @fileoverview Web Push notification type definitions.
|
||||
*
|
||||
* Types for the Web Push notification layer (layer 4 of the 5-layer notification system).
|
||||
*
|
||||
* Key exports:
|
||||
* - PushSubscriptionRecord — a registered push endpoint with per-event preferences
|
||||
* - VapidKeys — VAPID key pair (public + private) for Web Push authentication
|
||||
*
|
||||
* Persistence:
|
||||
* - VAPID keys: `~/.codeman/push-keys.json` (auto-generated on first use)
|
||||
* - Subscriptions: `~/.codeman/push-subscriptions.json` (expired auto-cleaned on 410/404)
|
||||
*
|
||||
* Managed by PushStore (`src/push-store.ts`). Served at `GET /api/push/vapid-key`,
|
||||
* `POST /api/push/subscribe`. No dependencies on other domain modules.
|
||||
*/
|
||||
|
||||
/** A registered push subscription */
|
||||
|
||||
+22
-1
@@ -1,5 +1,26 @@
|
||||
/**
|
||||
* @fileoverview Ralph Loop / todo tracking type definitions
|
||||
* @fileoverview Ralph Loop / todo tracking type definitions.
|
||||
*
|
||||
* Covers the autonomous task execution system: loop state, todo items,
|
||||
* completion confidence scoring, RALPH_STATUS block parsing, and the
|
||||
* circuit breaker for stuck-loop detection.
|
||||
*
|
||||
* Key exports:
|
||||
* - RalphLoopState / RalphLoopStatus — global loop controller state (embedded in AppState)
|
||||
* - RalphTrackerState — per-session loop tracking (cycle count, completion phrase, plan version)
|
||||
* - RalphTodoItem / RalphTodoProgress — detected todo items with priority and progress estimation
|
||||
* - RalphSessionState — composite per-session state (loop + todos), linked via sessionId
|
||||
* - CompletionConfidence — multi-signal scoring for completion detection (0-100)
|
||||
* - RalphStatusBlock — parsed RALPH_STATUS block from Claude output (status, tests, exit signal)
|
||||
* - CircuitBreakerStatus / CircuitBreakerState — stuck-loop detection state machine (CLOSED → HALF_OPEN → OPEN)
|
||||
* - Factory functions: createInitialCircuitBreakerStatus(), createInitialRalphTrackerState(), createInitialRalphSessionState()
|
||||
*
|
||||
* Cross-domain relationships:
|
||||
* - RalphLoopState is embedded in AppState.ralphLoop (app-state domain)
|
||||
* - RalphSessionState.sessionId links to SessionState.id (session domain)
|
||||
* - CircuitBreakerStatus feeds into RalphLoopHealthScore.components.circuitBreaker (respawn domain)
|
||||
*
|
||||
* Served at `GET /api/sessions/:id/ralph-state` and `GET /api/sessions/:id/ralph-status`.
|
||||
*/
|
||||
|
||||
/** Status of the Ralph Loop controller */
|
||||
|
||||
+22
-1
@@ -1,5 +1,26 @@
|
||||
/**
|
||||
* @fileoverview Respawn controller type definitions
|
||||
* @fileoverview Respawn controller type definitions.
|
||||
*
|
||||
* Covers the autonomous session cycling system: configuration, presets,
|
||||
* per-cycle metrics, aggregate health scoring, and adaptive timing.
|
||||
*
|
||||
* Key exports:
|
||||
* - RespawnConfig — full respawn settings (idle timeout, AI checks, adaptive timing, skip-clear)
|
||||
* - PersistedRespawnConfig — subset saved to disk for mux session recovery
|
||||
* - RespawnPreset — named preset for quick setup (solo-work, team-lead, overnight-autonomous, etc.)
|
||||
* - RespawnCycleMetrics — per-cycle outcome tracking (duration, idle reason, steps, tokens)
|
||||
* - RespawnAggregateMetrics — aggregate stats across cycles (success rate, p90 duration)
|
||||
* - RalphLoopHealthScore — composite 0-100 health score with 5 component scores
|
||||
* - HealthStatus — 'excellent' | 'good' | 'degraded' | 'critical'
|
||||
* - TimingHistory — rolling window of timing data for adaptive adjustments
|
||||
* - CycleOutcome — 'success' | 'stuck_recovery' | 'blocked' | 'error' | 'cancelled'
|
||||
*
|
||||
* Cross-domain relationships:
|
||||
* - RespawnConfig is embedded in AppConfig.respawn (app-state) and SessionState.respawnConfig (session)
|
||||
* - RalphLoopHealthScore.components.circuitBreaker derives from CircuitBreakerStatus (ralph domain)
|
||||
* - RespawnCycleMetrics.sessionId links to SessionState.id (session domain)
|
||||
*
|
||||
* Served at `GET /api/sessions/:id/respawn` (config + state).
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
/**
|
||||
* @fileoverview Run summary type definitions
|
||||
* @fileoverview Run summary type definitions.
|
||||
*
|
||||
* Types for the "what happened while away" session timeline. RunSummary
|
||||
* aggregates events (respawn cycles, errors, token milestones, AI checks)
|
||||
* into a per-session historical view.
|
||||
*
|
||||
* Key exports:
|
||||
* - RunSummary — complete per-session summary (events timeline + aggregated stats)
|
||||
* - RunSummaryEvent — a single timestamped event (16 event types, 4 severity levels)
|
||||
* - RunSummaryStats — aggregated metrics (cycles, tokens, active/idle time, error count)
|
||||
* - RunSummaryEventType — union of event types (session_started, respawn_cycle_*, error, etc.)
|
||||
* - RunSummaryEventSeverity — 'info' | 'warning' | 'error' | 'success'
|
||||
* - createInitialRunSummaryStats() — factory for fresh stats
|
||||
*
|
||||
* Cross-domain: RunSummary.sessionId links to SessionState.id (session domain).
|
||||
* In-memory only (not persisted to disk). Served at `GET /api/sessions/:id/run-summary`.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
+23
-1
@@ -1,5 +1,27 @@
|
||||
/**
|
||||
* @fileoverview Session type definitions
|
||||
* @fileoverview Session type definitions.
|
||||
*
|
||||
* Core domain type — SessionState is the primary entity in the system.
|
||||
*
|
||||
* Key exports:
|
||||
* - SessionState — full session state (status, tokens, respawn, ralph, CLI metadata)
|
||||
* - SessionConfig — creation-time config (id, workingDir, createdAt)
|
||||
* - SessionOutput — captured stdout/stderr/exitCode
|
||||
* - SessionStatus — 'idle' | 'busy' | 'stopped' | 'error'
|
||||
* - SessionMode — 'claude' | 'shell' | 'opencode' (which CLI backend)
|
||||
* - ClaudeMode — CLI permission mode ('dangerously-skip-permissions' | 'normal' | 'allowedTools')
|
||||
* - SessionColor — visual differentiation color
|
||||
* - OpenCodeConfig — OpenCode-specific settings (model, autoAllowTools, continueSession)
|
||||
*
|
||||
* Cross-domain relationships:
|
||||
* - SessionState.respawnConfig embeds RespawnConfig (respawn domain)
|
||||
* - SessionState.id is referenced by: RalphSessionState.sessionId (ralph),
|
||||
* RunSummary.sessionId (run-summary), ActiveBashTool.sessionId (tools),
|
||||
* TeamConfig.leadSessionId (teams), RespawnCycleMetrics.sessionId (respawn),
|
||||
* TaskState.assignedSessionId (task)
|
||||
*
|
||||
* Persisted to `~/.codeman/state.json`. Served at `GET /api/sessions` and
|
||||
* `GET /api/sessions/:id`.
|
||||
*/
|
||||
|
||||
import type { RespawnConfig } from './respawn.js';
|
||||
|
||||
+15
-1
@@ -1,5 +1,19 @@
|
||||
/**
|
||||
* @fileoverview Task queue type definitions
|
||||
* @fileoverview Task queue type definitions.
|
||||
*
|
||||
* Types for the prompt execution queue: TaskDefinition (input) and
|
||||
* TaskState (persisted state with execution details).
|
||||
*
|
||||
* Key exports:
|
||||
* - TaskDefinition — input type for creating a task (prompt, workingDir, priority, dependencies)
|
||||
* - TaskState — persisted state with execution details (status, assignedSessionId, output, error)
|
||||
* - TaskStatus — 'pending' | 'running' | 'completed' | 'failed'
|
||||
*
|
||||
* Cross-domain relationships:
|
||||
* - TaskState.assignedSessionId links to SessionState.id (session domain)
|
||||
* - TaskState is stored in AppState.tasks (app-state domain)
|
||||
*
|
||||
* Persisted to `~/.codeman/state.json`. No dependencies on other domain modules.
|
||||
*/
|
||||
|
||||
/** Status of a task in the queue */
|
||||
|
||||
+19
-1
@@ -1,5 +1,23 @@
|
||||
/**
|
||||
* @fileoverview Agent Teams type definitions
|
||||
* @fileoverview Agent Teams type definitions (experimental).
|
||||
*
|
||||
* Types for Claude Code's Agent Teams feature: team configuration,
|
||||
* member metadata, task tracking, and inbox messaging.
|
||||
*
|
||||
* Key exports:
|
||||
* - TeamConfig — team from `~/.claude/teams/{name}/config.json` (name, leadSessionId, members[])
|
||||
* - TeamMember — member entry (agentId, name, agentType, color)
|
||||
* - TeamTask — task from `~/.claude/tasks/{name}/{N}.json` (subject, status, blocks/blockedBy, owner)
|
||||
* - InboxMessage — message from `~/.claude/teams/{name}/inboxes/{member}.json`
|
||||
* - PaneInfo — tmux pane metadata for teammate pane management
|
||||
*
|
||||
* Cross-domain relationships:
|
||||
* - TeamConfig.leadSessionId links to SessionState.id (session domain)
|
||||
* - Teammates appear as standard subagents (detected by SubagentWatcher)
|
||||
*
|
||||
* Served at `GET /api/teams` (list) and `GET /api/teams/:name/tasks`.
|
||||
* Requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` env var.
|
||||
* No dependencies on other domain modules.
|
||||
*/
|
||||
|
||||
/** Team configuration from ~/.claude/teams/{name}/config.json */
|
||||
|
||||
+16
-1
@@ -1,5 +1,20 @@
|
||||
/**
|
||||
* @fileoverview Tool-related type definitions
|
||||
* @fileoverview Tool-related type definitions.
|
||||
*
|
||||
* Types for tracking Claude's tool invocations in real-time.
|
||||
*
|
||||
* Key exports:
|
||||
* - ActiveBashTool — a live bash command with extracted file paths and status
|
||||
* - ActiveBashToolStatus — 'running' | 'completed'
|
||||
* - ImageDetectedEvent — screenshot/image file detection trigger for UI popup
|
||||
*
|
||||
* Cross-domain relationships:
|
||||
* - ActiveBashTool.sessionId links to SessionState.id (session domain)
|
||||
* - ImageDetectedEvent.sessionId links to SessionState.id (session domain)
|
||||
*
|
||||
* Both types are in-memory only (not persisted). Broadcast via SSE events
|
||||
* `subagent:tool_call` and `image:detected`. Parsed by BashToolParser
|
||||
* (`src/bash-tool-parser.ts`).
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user