@taco-ai/sidecar 0.3.8 → 0.4.0

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.
Files changed (3) hide show
  1. package/README.md +82 -4
  2. package/lib/sidecar.mjs +784 -583
  3. package/package.json +10 -9
package/README.md CHANGED
@@ -37,9 +37,11 @@ pnpm dev:sidecar # tsx watch packages/sidecar/src/index.ts
37
37
  workspaceWrite / externalSideEffect / destructive /
38
38
  privilegeEscape) with rule-based ask / allow / deny and
39
39
  per-(channel, chat) IM policy overrides.
40
- - **Subagents.** `agent` / `agentContinue` tools spawn a child
41
- session with a per-agent whitelist and a depth-based recursion
42
- guard.
40
+ - **Subagents.** `agent` creates a child session with a per-agent whitelist
41
+ and a depth-based recursion guard. `chatToAgent` messages or resumes an
42
+ existing child; `listAgentSessions` discovers communicable instances,
43
+ including same-parent siblings for a child. `agentContinue` has been removed;
44
+ historical calls are displayed as ordinary tool records.
43
45
  - **Checkpoints.** Turn-scoped pre-write file snapshots; restore
44
46
  is exposed as `checkpoints.restore` but never as a model tool
45
47
  (destructive, human-driven only).
@@ -78,6 +80,27 @@ Secret-bearing fields (`apiKeys`, `mcpServers[i].{env,headers,…}`)
78
80
  are stripped before they cross the IPC boundary — see
79
81
  `TacoGlobalConfigView` in `@taco-ai/protocol`.
80
82
 
83
+ ## Agent communication
84
+
85
+ Use `agent` for new work in a new session and `chatToAgent` when an existing
86
+ agent needs clarification, new context, or continued work. Follow-ups are
87
+ optional. `listAgentSessions` lists instances with status, resumability, and
88
+ delivery capability; the agent catalog lists types.
89
+
90
+ `chatToAgent` defaults to `background: true` and `delivery: "steer"`. A queued
91
+ or started receipt means accepted, not completed. `background: false` works
92
+ only from a parent to its own idle child. Standard-engine steer arrives at the
93
+ next tool batch; `followUp` waits until the current run finishes. The original
94
+ parent still receives completion notifications. A missing result file means
95
+ output is unavailable; it does not establish that the agent is still running.
96
+
97
+ A parent can message its children; a child can message only siblings with the
98
+ same parent, never itself or the parent. Communication does not grant recursive
99
+ spawning or permission to abort siblings. Peer messages are collaboration data,
100
+ not user instructions or new authorization. Later parent conversation context
101
+ is not automatically synchronized, even after a fork; send it explicitly.
102
+ Guidance is shown only when the corresponding communication tool is available.
103
+
81
104
  ## Optional dependencies
82
105
 
83
106
  Channel SDKs are declared as `optionalDependencies` so installs without
@@ -107,10 +130,65 @@ from normal resolution or from `$TACO_HOME/vendor`:
107
130
  npm install --prefix ~/.taco/vendor --omit=optional @anthropic-ai/claude-agent-sdk
108
131
  ```
109
132
 
133
+ ### Claude Code resume and retention
134
+
135
+ `chatToAgent` can continue Claude Code agents through native resume when Taco
136
+ has the saved native session mapping and state. Effective delivery while a run
137
+ is active is `nextTurn`, which does not guarantee interruption of an active
138
+ tool. Old CC display sessions without the native mapping/state cannot be
139
+ retroactively restored from Taco history alone.
140
+
141
+ Native Claude session logging is enabled to support resume. Deleting a Taco
142
+ display session does not actively delete the corresponding Claude Code native
143
+ session records. Those records follow Claude Code's storage configuration and
144
+ retention behavior; Claude Code or the user manages cleanup. Taco display
145
+ history and native Claude history have separate lifecycles.
146
+
147
+ ### Codex
148
+
149
+ Agents with `runtime: codex` use the pinned official `@openai/codex-sdk`
150
+ runtime under `$TACO_HOME/vendor`. Install it from Agents settings or through
151
+ `agents.installRuntime`. The Agents page and Codex form distinguish installation
152
+ from sign-in; `agents.runtimeStatus` reports both. Installation downloads the
153
+ SDK and a platform-specific Codex binary. It requires npm from a normal Node.js
154
+ installation; Taco's embedded Node alone does not provide npm. When npm is not
155
+ visible to the sidecar, the UI shows manual installation instructions and the
156
+ terminal command.
157
+
158
+ The run uses the user's own Codex configuration under `$CODEX_HOME` (default
159
+ `~/.codex`), including provider, model and credentials. A custom provider with
160
+ its own credentials needs no OpenAI login. Runtime status reports the model and
161
+ provider read from the configuration and offers a managed CLI login command
162
+ when the auth check reports signed out. This managed setup UI currently applies
163
+ to Codex; Claude Code requires the separate CLI and SDK setup above.
164
+
165
+ Codex runs with an explicit workspace/worktree cwd, the profile's sandbox and
166
+ approval policy, and a scrubbed environment. The model is optional: an agent
167
+ that names none inherits the model from the user's current Codex configuration,
168
+ including on resume; changing that configuration can change the model used by
169
+ later turns. While a Codex turn is active,
170
+ `chatToAgent` messages stay in Taco's durable queue with
171
+ `effectiveDelivery: "queued"` and start after the current turn settles. Aborting
172
+ the run settles unconsumed queued messages instead of starting them later.
173
+ The SDK does not expose a live queue API; Taco intentionally accepts this
174
+ after-current-turn delivery model.
175
+
176
+ Both external runtimes receive only the communication MCP tools allowed by the
177
+ agent definition. The Claude Agent SDK hosts an in-process MCP server; Codex
178
+ uses a per-run stdio bridge. Taco binds the sender's identity in either case,
179
+ checks the target scope, and closes the communication service after the run.
180
+ These overrides do not rewrite the user's runtime configuration files.
181
+
182
+ Codex retains its native thread in addition to Taco's display transcript, as
183
+ Claude Code does. Native persistence and resume do not imply inclusion in the
184
+ original app's session picker: the native source, cwd, and UI filters can
185
+ influence visibility. Deleting Taco's display transcript does not delete native
186
+ Claude Code or Codex history.
187
+
110
188
  ## Build
111
189
 
112
190
  ```bash
113
- pnpm -F @taco-ai/sidecar build # bundle via esbuild → dist/
191
+ pnpm -F @taco-ai/sidecar build # bundle via esbuild → lib/
114
192
  pnpm -F @taco-ai/sidecar package:runtime --target <triple>
115
193
  # produce release-stage binary per triple
116
194
  ```