co-mono/packages/coding-agent/test
Mario Zechner ba185b0571 Hook API: replace send() with sendMessage(), add appendEntry() and registerCommand()
Breaking changes to Hook API:
- pi.send(text, attachments?) replaced with pi.sendMessage(message, triggerTurn?)
  - Creates CustomMessageEntry instead of user messages
  - Properly handles queuing during streaming via agent loop
  - Supports optional turn triggering when idle
- New pi.appendEntry(customType, data?) for hook state persistence
- New pi.registerCommand(name, options) for custom slash commands
- Handler types renamed: SendHandler -> SendMessageHandler, new AppendEntryHandler

Implementation:
- AgentSession.sendHookMessage() handles all three cases:
  - Streaming: queues message with _hookData marker, agent loop processes it
  - Not streaming + triggerTurn: appends to state/session, calls agent.continue()
  - Not streaming + no trigger: appends to state/session only
- message_end handler routes based on _hookData presence to correct persistence
- HookRunner gains getRegisteredCommands() and getCommand() methods

New types: HookMessage<T>, RegisteredCommand, CommandContext
2025-12-30 22:42:18 +01:00
..
fixtures Fix syntax highlighting stderr spam with malformed markdown, fixes #274 2025-12-22 00:23:01 +01:00
session-manager Add label support for session entries 2025-12-30 22:42:18 +01:00
agent-session-branching.test.ts Fix API key priority and compaction bugs 2025-12-30 22:42:17 +01:00
agent-session-compaction.test.ts Fix API key priority and compaction bugs 2025-12-30 22:42:17 +01:00
args.test.ts Add --version/-v flag to CLI (#170) 2025-12-12 00:01:06 +01:00
compaction-hooks-example.test.ts Refactor SessionEventBase to pass sessionManager and modelRegistry 2025-12-30 22:42:18 +01:00
compaction-hooks.test.ts Hook API: replace send() with sendMessage(), add appendEntry() and registerCommand() 2025-12-30 22:42:18 +01:00
compaction.test.ts Refactor session manager: migration chain, validation, tests 2025-12-30 22:42:18 +01:00
fuzzy.test.ts Reorganize file structure: core/, utils/, modes/interactive/components/, modes/interactive/theme/ 2025-12-09 00:51:33 +01:00
model-resolver.test.ts fix(coding-agent): handle OpenRouter models with colons in IDs (#242) 2025-12-19 15:26:12 +01:00
rpc-example.ts Update RPC example to use RpcClient 2025-12-09 14:44:13 +01:00
rpc.test.ts Fix agent event ordering: update state before emitting events 2025-12-09 14:33:39 +01:00
skills.test.ts Enable more biome lints and fix things 2025-12-21 22:56:20 +01:00
streaming-render-debug.ts Fix syntax highlighting stderr spam with malformed markdown, fixes #274 2025-12-22 00:23:01 +01:00
test-theme-colors.ts Reorganize file structure: core/, utils/, modes/interactive/components/, modes/interactive/theme/ 2025-12-09 00:51:33 +01:00
tools.test.ts Fix edit tool failing on Windows due to CRLF line endings 2025-12-30 02:32:16 +05:30
truncate-to-width.test.ts fix: TUI crash with Unicode characters in branch selector 2025-12-05 11:59:39 +01:00