- Replace Node.js http with Fastify + @fastify/cors, swagger, rate-limit
- Migrate all routes to Fastify plugins under /api/v1/ prefix
- Add global error handler with consistent ApiError format
- Add auth middleware stub (secret token only, JWT in Plan 2)
- Add ApiServerService for plugin route registration
- Add backward-compat redirects from /api/ to /api/v1/
- Add new /api/v1/commands routes for command execution via API
- Preserve SSE manager, static server, all existing functionality
- Improved error handling in TunnelService to capture and log start errors when the tunnel fails to initialize.
- Updated startServer function to provide user feedback on tunnel status, including error messages for unavailable viewer links.
- Enhanced MessageTransformer to skip viewer link generation when only localhost URLs are available, preventing unclickable links in Telegram.
- Refined DisplaySpecBuilder to conditionally display content based on the availability of a public tunnel URL.
- Added tests to ensure correct behavior when handling localhost URLs in viewer link generation.
- Introduced a new function `computeLineDiff` to accurately calculate line-level diffs by stripping common prefixes and suffixes, improving diff accuracy.
- Updated `MessageTransformer` to utilize the new diff computation for better metadata extraction.
- Enhanced `DisplaySpecBuilder` to include `inputContent` in the display specifications, allowing for inline display of raw input in high verbosity mode.
- Refined title generation logic to improve clarity and consistency in displayed titles across different contexts.
- Adjusted formatting functions to ensure proper display of input content and viewer links in tool cards.
- Refined logging in agent-instance to reduce verbosity by removing debug logs for raw input/output.
- Enhanced activity tracker logging to include viewer links for improved traceability.
- Updated .gitignore to exclude .log files from version control.
- Added .log to .gitignore to exclude log files from version control.
- Removed debug logging for raw input/output in agent-instance to reduce verbosity.
- Enhanced logging in activity tracker to include viewer links for better traceability.
Implements the write-side component that captures agent events from
middleware hooks, accumulates them into structured turns (text/thinking
chunk merging, tool call tracking, diff extraction, permission capture),
and writes completed turns to disk via HistoryStore.
Includes 32 tests covering all event types, accumulation rules, edge
cases, multi-turn sequences, and session cleanup.
Adds /outputmode [low|medium|high] for adapter-level config and /outputmode session [low|medium|high|reset] for per-session override. Deprecates /verbosity as an alias that forwards to /outputmode. Prefixes unused verbosity params in adapter.ts with underscore to suppress TS warnings.
- Add OutputModeResolver field to TelegramAdapter; resolve mode per-call in handleToolCall, handleToolUpdate, handleThought, handleText, handlePlan instead of forwarding raw DisplayVerbosity
- Update getOrCreateTracker signature from verbosity: DisplayVerbosity to outputMode: OutputMode; pass tunnelService and sessionContext to ActivityTracker constructor
- Pass content, rawInput, and diffStats through onToolUpdate calls so ActivityTracker receives full update payload
Replace addTool/updateTool/verbosity calls with updateFromSpec(ToolDisplaySpec),
update snapshot field references (entries→specs, hidden→isHidden, visibleCount→totalVisible),
and remove the verbosity config param that was removed from ToolCardStateConfig.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rewrites activity.ts to use ToolStateMap for tool state tracking and
DisplaySpecBuilder for spec-driven rendering, removing all @ts-ignore
suppressions and as-any casts added in Task 7. Updates activity.test.ts
to match the new API (updateFromSpec instead of addTool/updateTool,
onThought takes a text param, ToolCard constructor drops verbosity arg).
Also fixes adapter.ts to pass thought text to onThought().
Replaces the old entries-based renderToolCard implementation with one that
reads from snap.specs (ToolDisplaySpec[]), rendering icon, title, description,
command, outputSummary, outputContent, diffStats, and viewer links per spec.
Fixes splitToolCardText to truncate single sections larger than 4096 chars
instead of passing them through untruncated. Updates formatting-extended tests
to use the new ToolDisplaySpec/specs API.
Replaces ToolCardEntry[]/addTool/updateTool with ToolDisplaySpec[]/updateFromSpec.
Updates primitives/index.ts to export ToolDisplaySpec instead of removed ToolCardEntry.
Adds @ts-ignore suppressions in activity.ts and formatting.ts as temporary bridge until Tasks 8/9.
Implements DisplaySpecBuilder that derives ToolDisplaySpec and ThoughtDisplaySpec
from a ToolEntry + OutputMode. Controls title logic per kind, output inlining
threshold (≤15 lines AND ≤800 chars for high mode only), noise hiding, and
diffStats pass-through. 14 tests, all green.
Implements ToolStateMap for accumulating ACP tool_call/tool_call_update
events with out-of-order delivery support, and ThoughtBuffer for
streaming thought chunk accumulation across turns.
Add OutputMode type as the new standard output mode type (replacing DisplayVerbosity
usage pattern). Maintain DisplayVerbosity as deprecated alias for backward compatibility.
Add outputMode to SessionRecord, channel config schema, and global config schema.
Add migration to auto-migrate displayVerbosity to outputMode in channel configs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Serialize per-session message dispatch to prevent out-of-order event processing
(tool_update arriving before tool_call due to concurrent fire-and-forget dispatch)
- Buffer tool updates that arrive before their tool_call and apply on addTool
- Allow post-finalize tool updates to flush immediately (late completion after seal)
- Track overflow message IDs and edit them instead of only sending once
- Forward tool updates to previous sealed card for late completions
- Count failed/error tools as done in header (Tools N/N ✅)
- Stop deleting thinking indicator messages to reduce Telegram API calls
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove @openacp/usage from builtin plugin lists (plugin was extracted
but registration entries remained, causing silent failures on first boot)
- Guard fs.readdirSync(nodeModulesDir) with existsSync check to prevent
crash when community plugins are registered but node_modules/ missing
- Clean up onboard.ts: remove redundant duplicate imports and local constants
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Combines setup wizard fixes (settingsManager/pluginRegistry passing,
ESM plugin resolution, path centralization) with develop's shell
injection validation and community adapter flow. Adds error handling
and tests for importFromDir.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wrap package.json parsing with descriptive error messages and validate
entry point exists before importing. Add 7 unit tests covering all
resolution paths and error cases.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>