shraga 0.1.111 → 0.1.112

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
@@ -222,7 +222,8 @@ common ones:
222
222
 
223
223
  Beyond env vars, a typed config module in your data dir declares **global MCP servers**: the tools
224
224
  every user gets. (Per-user MCPs are added in the UI, and agent settings like model and engine live
225
- in `agent-config.json`, editable from the UI.) Shraga seeds it from a template on first run and
225
+ in `agent-config.json`, editable from the UI; `"sdkResume": true` there opts the claude-code engine into
226
+ SDK session resume — see `defaults/skills/platform.md`.) Shraga seeds it from a template on first run and
226
227
  gitignores it, so you just edit the seeded file:
227
228
 
228
229
  ```ts
@@ -43,6 +43,7 @@ Users can prefix any message with `[directives]` to override settings. Parsed se
43
43
  | `effort:VALUE` | `low`, `medium`, `high`, `max` | Set reasoning effort level |
44
44
  | `model:VALUE` | Any alias | Override model |
45
45
  | `turns:VALUE` | Integer | Override max turns |
46
+ | `resume:VALUE` | `on`, `off` | claude-code engine: resume the SDK session across turns instead of re-sending the history (prompt-cache savings). Overrides agent-config `sdkResume` for this conversation |
46
47
 
47
48
  ### Examples
48
49
 
@@ -68,6 +69,8 @@ Persistent settings that apply to all messages until changed:
68
69
  | Skill Discovery | On/Off | On |
69
70
  | System Prompt | Free text appended to system prompt | Empty |
70
71
 
72
+ **SDK session resume (`sdkResume`, default off).** Not in the panel: set `"sdkResume": true` in `agent-config.json` (re-read every turn, no restart) or per conversation with `[resume:on]` / `PUT /api/sessions/:id/directives {"resume": true}`. When on, the claude-code engine sends the full context + history once (fresh query), then resumes that Claude Code session and sends only the new message, appending the current speaker's `user` section (every resume turn), changed context sections and messages other channels added AFTER the user text. It falls back to a fresh query — logged as `[claude] Cache: … path=fallback:<reason>` — on: `no-session`, `concurrent-run` (an earlier CLI process on the conversation, e.g. the run a steer took over, was still alive after 5s), `speaker-change` (a different person than the one whose turns the Claude Code session holds — keeps one user's private context out of another's turns; single-speaker conversations keep resuming), `engine-switch`, `account-change`, `reset`, `summary`, `history-diverged`, `drift`, `transcript-missing` (CLI cleanup removed it), `resume-failed` (the CLI couldn't load the session, e.g. "No conversation found" — retried fresh in the same turn; any other error, like a usage limit, surfaces as-is and keeps the mapping). Flag off logs `path=fresh`, a resumed turn `path=resume`.
73
+
71
74
  Directives override config and persist for the session. On a session's first turn, the resolved engine/model/turns/thinking are pinned to the session — reopening it from history resumes the exact same shape even if config defaults change later.
72
75
 
73
76
  ## Thinking / Reasoning