Skip to content

Commit f9ea119

Browse files
docs: consolidate SDK documentation and fix README message types (#47)
- Create comprehensive sdk-usage-guide.md with Getting Started, Config Reference, List Skills, Raw Notification, and Low-level APIs sections - Delete 8 redundant example docs superseded by sdk-usage-guide.md - Delete typescript-sdk-reference.md after merging unique content - Fix README: DroidMessageType.TurnComplete → Result, update message type table to match actual enum values Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent 40d7ada commit f9ea119

11 files changed

Lines changed: 708 additions & 1090 deletions

README.md

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ try {
4141
if (msg.type === DroidMessageType.AssistantTextDelta) {
4242
process.stdout.write(msg.text);
4343
}
44-
if (msg.type === DroidMessageType.TurnComplete) {
44+
if (msg.type === DroidMessageType.Result) {
4545
console.log('\nDone!');
4646
}
4747
}
@@ -409,30 +409,35 @@ if (msg.type === DroidMessageType.AssistantTextDelta) {
409409
}
410410
```
411411

412-
| Type | Description |
413-
| -------------------------- | --------------------------------------- |
414-
| `assistant_text_delta` | Streaming text token from the assistant |
415-
| `thinking_text_delta` | Streaming reasoning/thinking token |
416-
| `tool_use` | Tool invocation by the assistant |
417-
| `tool_result` | Result from a tool execution |
418-
| `tool_progress` | Progress update during tool execution |
419-
| `working_state_changed` | Agent working state transition |
420-
| `token_usage_update` | Updated token usage counters |
421-
| `create_message` | Full assistant message created |
422-
| `turn_complete` | Sentinel: agent turn finished |
423-
| `session_title_updated` | Session title changed |
424-
| `mcp_status_changed` | MCP server status changed |
425-
| `mission_state_changed` | Mission state changed |
426-
| `mission_features_changed` | Mission features changed |
427-
| `mission_progress_entry` | Mission progress log changed |
428-
| `mission_heartbeat` | Mission heartbeat |
429-
| `mission_worker_started` | Mission worker started |
430-
| `mission_worker_completed` | Mission worker completed |
431-
| `mcp_auth_required` | MCP authentication required |
432-
| `mcp_auth_completed` | MCP authentication completed |
433-
| `permission_resolved` | Tool permission request resolved |
434-
| `settings_updated` | Session settings changed |
435-
| `error` | Error event from the process |
412+
| Type | Description |
413+
| -------------------------- | ----------------------------------------------- |
414+
| `assistant` | Complete assistant message |
415+
| `user` | Complete user message |
416+
| `assistant_text_delta` | Streaming text token from the assistant |
417+
| `assistant_text_complete` | End of an assistant text block |
418+
| `thinking_text_delta` | Streaming reasoning/thinking token |
419+
| `thinking_text_complete` | End of a thinking block |
420+
| `tool_call` | Tool invocation by the assistant |
421+
| `tool_call_delta` | Streaming tool call input |
422+
| `tool_result` | Result from a tool execution |
423+
| `tool_progress` | Progress update during tool execution |
424+
| `hook` | File hook execution event (started or finished) |
425+
| `working_state_changed` | Agent working state transition |
426+
| `token_usage_update` | Updated token usage counters |
427+
| `result` | End-of-turn sentinel with aggregated metadata |
428+
| `session_title_updated` | Session title changed |
429+
| `settings_updated` | Session settings changed |
430+
| `permission_resolved` | Tool permission request resolved |
431+
| `mcp_status_changed` | MCP server status changed |
432+
| `mcp_auth_required` | MCP authentication required |
433+
| `mcp_auth_completed` | MCP authentication completed |
434+
| `error` | Error event from the process |
435+
| `mission_state_changed` | Mission state changed |
436+
| `mission_features_changed` | Mission features changed |
437+
| `mission_progress_entry` | Mission progress log changed |
438+
| `mission_heartbeat` | Mission heartbeat |
439+
| `mission_worker_started` | Mission worker started |
440+
| `mission_worker_completed` | Mission worker completed |
436441

437442
### Options
438443

docs/examples/init-metadata.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/examples/list-sessions.md

Lines changed: 0 additions & 64 deletions
This file was deleted.

docs/examples/multi-turn-session.md

Lines changed: 0 additions & 90 deletions
This file was deleted.

docs/examples/permission-handler.md

Lines changed: 0 additions & 112 deletions
This file was deleted.

0 commit comments

Comments
 (0)