@taco-ai/sidecar 0.3.9 → 0.4.1
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 +113 -4
- package/lib/codexCommunicationBridge.mjs +77 -0
- package/lib/sidecar.mjs +697 -614
- package/package.json +11 -10
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`
|
|
41
|
-
|
|
42
|
-
|
|
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,96 @@ 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
|
+
|
|
188
|
+
## Memory topic files
|
|
189
|
+
|
|
190
|
+
New writes use YAML frontmatter with `topicCodec: 1`; active and archived topics
|
|
191
|
+
share one codec. Unmarked files keep the older literal-field interpretation.
|
|
192
|
+
Reading never rewrites a file, and unknown versions are skipped without being
|
|
193
|
+
overwritten by an add or restore. YAML provenance identifiers are strings; quote
|
|
194
|
+
numeric-looking identifiers to preserve leading zeros (a bare number is normalized
|
|
195
|
+
to its decimal string).
|
|
196
|
+
|
|
197
|
+
Canonical UTC timestamps stay unquoted and `sources` stays a single JSON line,
|
|
198
|
+
so older releases can parse archive ages and provenance after a rollback.
|
|
199
|
+
Names and descriptions that YAML must quote, such as `A: B` or `A # B`, are still
|
|
200
|
+
read by older releases with the quote characters included; an old-version write
|
|
201
|
+
can permanently change those values. Back up `$TACO_HOME/memory` before using
|
|
202
|
+
this build and restore that backup before rolling back to a pre-codec release.
|
|
203
|
+
|
|
204
|
+
Files produced by an earlier codec build with quoted timestamps and block YAML
|
|
205
|
+
sources need additional care: older releases read the timestamp quotes literally
|
|
206
|
+
(`Date.parse` fails), lose provenance, and silently skip retention cleanup for
|
|
207
|
+
archives whose age is quoted. Merely reading those files with the current release
|
|
208
|
+
does not convert them. Restore a pre-upgrade memory backup before downgrade;
|
|
209
|
+
otherwise keep the codec-aware reader and review/export those files first.
|
|
210
|
+
|
|
211
|
+
## Codex communication bridge
|
|
212
|
+
|
|
213
|
+
Codex communication uses the MCP SDK in a separate
|
|
214
|
+
`lib/codexCommunicationBridge.mjs` process. Both npm and portable builds ship
|
|
215
|
+
this self-contained entry beside the main bundle; portable manifests include
|
|
216
|
+
its SHA-256 checksum. Source execution launches the TypeScript entry with
|
|
217
|
+
Node's explicit type transformation flag, suppressing only experimental warnings.
|
|
218
|
+
|
|
110
219
|
## Build
|
|
111
220
|
|
|
112
221
|
```bash
|
|
113
|
-
pnpm -F @taco-ai/sidecar build # bundle via esbuild →
|
|
222
|
+
pnpm -F @taco-ai/sidecar build # bundle via esbuild → lib/
|
|
114
223
|
pnpm -F @taco-ai/sidecar package:runtime --target <triple>
|
|
115
224
|
# produce release-stage binary per triple
|
|
116
225
|
```
|