@robota-sdk/agent-sdk 3.0.0-beta.53 → 3.0.0-beta.55

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.
package/README.md CHANGED
@@ -44,7 +44,7 @@ const response = await query('Analyze the code', {
44
44
  - **Hooks** — `PreToolUse`, `PostToolUse`, `PreCompact`, `PostCompact`, `SessionStart`, `UserPromptSubmit`, `Stop` events with shell command execution
45
45
  - **Streaming** — Real-time text delta callbacks via `onTextDelta`
46
46
  - **Context Loading** — AGENTS.md / CLAUDE.md walk-up discovery and system prompt assembly
47
- - **Config Loading** — 6-layer merge (CLI flags, local, project, Claude Code compat, user global, user global Claude Code compat) with `$ENV:VAR` substitution
47
+ - **Config Loading** — 6-file settings merge with provider profiles, legacy provider compatibility, and `$ENV:VAR` substitution for provider API keys
48
48
  - **Context Window Management** — Token tracking, auto-compaction at ~83.5%, manual `session.compact()`
49
49
  - **Bundle Plugin System** — Install and manage reusable extensions packaged as bundle plugins
50
50
 
@@ -273,7 +273,7 @@ import { webFetchTool, webSearchTool } from '@robota-sdk/agent-tools';
273
273
 
274
274
  ## Subagent Sessions
275
275
 
276
- `createSubagentSession()` creates an isolated child session for delegating subtasks. The subagent receives pre-resolved config and context from the parent — it does not load config files or context from disk.
276
+ `createSubagentSession()` creates an isolated child session for delegating subtasks. The subagent receives pre-resolved config and context from the parent — it does not load config files or context from disk. Callers may provide a stable `sessionId` and `sessionLogger` so the child session writes a durable transcript.
277
277
 
278
278
  ```typescript
279
279
  import { createSubagentSession } from '@robota-sdk/agent-sdk';
@@ -296,6 +296,8 @@ Built-in agents: `general-purpose` (full tool access), `Explore` (read-only, Hai
296
296
 
297
297
  `createAgentTool()` wraps subagent creation into a tool the AI can invoke directly. The parent session's hooks, permissions, and context are forwarded to the child.
298
298
 
299
+ Background subagent lifecycle events are persisted through `InteractiveSession` when a `SessionStore` is configured. Streaming chunks are written to append-only JSONL logs/transcripts rather than rewriting the main session JSON per token.
300
+
299
301
  ## Hook Executors (SDK-Specific)
300
302
 
301
303
  `agent-sdk` provides two `IHookTypeExecutor` implementations beyond the `command` and `http` executors in `agent-core`:
@@ -330,26 +332,40 @@ Manages plugin installation and uninstallation:
330
332
 
331
333
  ## Configuration
332
334
 
333
- Settings are loaded from (highest priority first):
335
+ Settings are merged from lowest to highest priority:
334
336
 
335
- | Layer | Path | Scope |
336
- | ----- | --------------------------------- | ------------------------------------ |
337
- | 1 | CLI flags / environment variables | Invocation |
338
- | 2 | `.robota/settings.local.json` | Project (local) |
339
- | 3 | `.robota/settings.json` | Project |
340
- | 4 | `.claude/settings.json` | Project (Claude Code compatible) |
341
- | 5 | `~/.robota/settings.json` | User global |
342
- | 6 | `~/.claude/settings.json` | User global (Claude Code compatible) |
337
+ | Layer | Path | Scope |
338
+ | ----- | ----------------------------- | --------------------------------------- |
339
+ | 1 | `~/.robota/settings.json` | User global |
340
+ | 2 | `~/.claude/settings.json` | User global (Claude Code compatible) |
341
+ | 3 | `.robota/settings.json` | Project |
342
+ | 4 | `.robota/settings.local.json` | Project (local) |
343
+ | 5 | `.claude/settings.json` | Project (Claude Code compatible) |
344
+ | 6 | `.claude/settings.local.json` | Project (local, Claude Code compatible) |
343
345
 
344
- `$ENV:VAR` substitution is applied after merge.
346
+ `$ENV:VAR` substitution is applied after merge for provider API keys.
345
347
 
346
348
  ```json
347
349
  {
348
350
  "defaultMode": "default",
349
- "provider": {
350
- "name": "anthropic",
351
- "model": "claude-sonnet-4-6",
352
- "apiKey": "$ENV:ANTHROPIC_API_KEY"
351
+ "currentProvider": "gemma",
352
+ "providers": {
353
+ "gemma": {
354
+ "type": "gemma",
355
+ "model": "supergemma4-26b-uncensored-v2",
356
+ "apiKey": "lm-studio",
357
+ "baseURL": "http://localhost:1234/v1"
358
+ },
359
+ "openai": {
360
+ "type": "openai",
361
+ "model": "<openai-compatible-model>",
362
+ "apiKey": "$ENV:OPENAI_API_KEY"
363
+ },
364
+ "anthropic": {
365
+ "type": "anthropic",
366
+ "model": "claude-sonnet-4-6",
367
+ "apiKey": "$ENV:ANTHROPIC_API_KEY"
368
+ }
353
369
  },
354
370
  "permissions": {
355
371
  "allow": ["Bash(pnpm *)"],
@@ -358,6 +374,8 @@ Settings are loaded from (highest priority first):
358
374
  }
359
375
  ```
360
376
 
377
+ `currentProvider` selects the active entry from `providers`. Gemma-family local models should use a `type: "gemma"` profile so provider-specific stream projection is applied. The resolved SDK config normalizes the active profile into `provider.name`, `provider.model`, `provider.apiKey`, optional `provider.baseURL`, and optional `provider.timeout`. The legacy `provider` object remains supported when `currentProvider` is not configured.
378
+
361
379
  ## Permission Modes
362
380
 
363
381
  | Mode | Read/Glob/Grep | Write/Edit | Bash |