@foundocs/foundocs-setup 0.3.18 → 0.3.20
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 +76 -0
- package/dist/bridge.mjs +319 -61
- package/package.json +5 -4
- package/skills/foundocs/SKILL.md +4 -0
- package/skills/foundocs/scripts/episode-checkpoint.mjs +207 -0
- package/skills/foundocs-capture-episode/SKILL.md +22 -0
- package/skills/foundocs-capture-episode/references/capture.md +60 -0
- package/src/bridge.mjs +49 -4
- package/src/cli.mjs +4 -4
- package/src/setup.mjs +84 -24
- package/src/skill-assets.mjs +3 -1
- package/templates/knowledge-policy.md +1 -0
package/README.md
CHANGED
|
@@ -195,3 +195,79 @@ The initial verified probe runner is Claude Code 2.1.312 on macOS, with an exist
|
|
|
195
195
|
Raw local data expires at preparation +24h; normalized settlement data has its own finite completion +24h lifetime. Expired raw data cannot be restored by a concurrent journal write. Uncertain report transmission retries the same requestId and payload without repeating model inference. Raw CLI transcripts are not stored by default.
|
|
196
196
|
|
|
197
197
|
Maintainers can run the opt-in synthetic checks with `FOUNDOCS_EFFECT_LIVE_CHECK=1`: `node eval/effect-isolation-check.mjs` checks actual filesystem tool boundaries; `eval/effect-api-check.mjs`, executed using the product checkout's tsx runner with `FOUNDOCS_PRODUCT_DIR` and optional `FOUNDOCS_EFFECT_CLI`, uses its isolated PostgreSQL/HTTP fixture. These checks incur provider usage, never enable a production project, and remove their temporary fixtures.
|
|
198
|
+
|
|
199
|
+
### Automatic selective episodes (0.3.19)
|
|
200
|
+
|
|
201
|
+
New Codex and Claude Code installs include `foundocs-capture-episode`, a
|
|
202
|
+
`UserPromptSubmit` checkpoint and a bounded `Stop` fallback. Review and trust the
|
|
203
|
+
installed hook definitions through the host (Codex `/hooks` or desktop hook
|
|
204
|
+
review; Claude Code project hook/settings review). The installer never changes
|
|
205
|
+
host trust, approvals or sandbox settings. Confirm actual hook execution and
|
|
206
|
+
remote `capture_episode` plus local `episode_checkpoint` tool discovery after
|
|
207
|
+
reconnecting; installed files alone do not prove activation.
|
|
208
|
+
|
|
209
|
+
The current host judges important confirmed decisions, verified results and
|
|
210
|
+
discoveries, concrete blockers and milestones during ordinary work. Routine
|
|
211
|
+
turns are acknowledged locally without creating remote candidates. Private
|
|
212
|
+
checkpoint state contains only minimal identifiers; prepared requests contain
|
|
213
|
+
brief evidence, never transcripts. The bounded outbox preserves the exact
|
|
214
|
+
payload/requestId for uncertain retries (32 requests, 128 checkpoints, 14 days per prepared request;
|
|
215
|
+
cleanup on use). Required checkpoint metadata remains until its pending requests
|
|
216
|
+
settle/expire, at most 28 days after checkpoint creation; expired checkpoints
|
|
217
|
+
cannot prepare new requests. Stop can request one follow-up per checkpoint and never loops
|
|
218
|
+
on a failed write. There is no separate inference API or new model key.
|
|
219
|
+
|
|
220
|
+
The local MCP `episode_checkpoint` tool runs bookkeeping inside the existing
|
|
221
|
+
stdio process, so ordinary capture needs no extra shell filesystem access.
|
|
222
|
+
It is available only with the new portable runtime and a server advertising
|
|
223
|
+
`capture_episode`. The server's episode tools still handle all remote writes.
|
|
224
|
+
POSIX private storage is supported; Windows currently skips checkpoint capture.
|
|
225
|
+
Unsupported/missing tools and failures preserve ordinary work and never turn
|
|
226
|
+
an episode into a document. Document consent and Dreaming consent are unchanged.
|
|
227
|
+
|
|
228
|
+
**Existing installations:** `update-skills` and SessionStart updates deliberately
|
|
229
|
+
preserve the pinned MCP runtime. To opt an installer-owned portable runtime into
|
|
230
|
+
this release, run the new package's explicit upgrade, then refresh skills:
|
|
231
|
+
|
|
232
|
+
```sh
|
|
233
|
+
npx --yes @foundocs/foundocs-setup@0.3.20 upgrade-runtime --root /absolute/project
|
|
234
|
+
npx --yes @foundocs/foundocs-setup@0.3.20 update-skills --root /absolute/project
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Legacy transports must first use the existing `migrate` flow. The upgrade checks
|
|
238
|
+
the recorded transport, preserves foreign settings and credentials, journals its
|
|
239
|
+
change and supports interrupted retry. Version 0.3.20 recognizes the environment
|
|
240
|
+
list written by pre-episode portable runtimes, including 0.3.18; newer runtimes
|
|
241
|
+
still require the episode opt-out environment variable. The existing
|
|
242
|
+
conflict-safe `rollback` restores the original installation journal baseline,
|
|
243
|
+
which can precede initial setup; it is not a runtime-only undo command.
|
|
244
|
+
Reconnect MCP and review the exact new hook hashes afterward. Skill updates do
|
|
245
|
+
not silently activate or upgrade the runtime. `doctor` reports runtime support
|
|
246
|
+
and live/stale checkpoint locks separately from host verification. If a crashed
|
|
247
|
+
helper leaves a stale lock, confirm its process has ended and remove only the
|
|
248
|
+
reported lock; preserve the outbox and credentials.
|
|
249
|
+
|
|
250
|
+
Opt out without editing managed hooks/skills by adding
|
|
251
|
+
`"episodes": {"enabled": false}` to `foundocs.json`, or launch the host with
|
|
252
|
+
`FOUNDOCS_EPISODES=off`. Deleting/modifying managed hooks is treated as an update
|
|
253
|
+
conflict; other hooks and user-edited skills remain preserved.
|
|
254
|
+
|
|
255
|
+
For opt-in live package validation, `eval/episode-host-check.mjs` (run with Bun)
|
|
256
|
+
installs a `.tgz` into isolated projects backed by the product HTTP/PostgreSQL
|
|
257
|
+
fixture. Supply `FOUNDOCS_EPISODE_LIVE=1`, `FOUNDOCS_PRODUCT_DIR`,
|
|
258
|
+
`FOUNDOCS_EPISODE_PACKAGE`, and the test database URL. It never edits host trust.
|
|
259
|
+
Review the generated project in each actual host, perform an ordinary task and
|
|
260
|
+
a trivial lookup, then send `verify` to inspect persisted episodes. This fixture
|
|
261
|
+
is separate from deterministic unit tests and does not claim model execution
|
|
262
|
+
merely because installation succeeded.
|
|
263
|
+
|
|
264
|
+
After starting that fixture, `eval/episode-host-run.mjs` runs an ordinary model
|
|
265
|
+
turn and asserts the observed tool path. Set `FOUNDOCS_EPISODE_CLIENT` to
|
|
266
|
+
`codex` or `claude`, and `FOUNDOCS_EPISODE_CASE` to `important` or `routine`.
|
|
267
|
+
Codex additionally requires an explicit `FOUNDOCS_EPISODE_MODEL` and
|
|
268
|
+
`FOUNDOCS_EPISODE_REVIEW_HOOKS=1` after reviewing the generated commands. This
|
|
269
|
+
opt-in test uses the host's exact-hash hook review RPC in an isolated temporary
|
|
270
|
+
CODEX_HOME, with workspace-write and on-request approvals. It never alters the
|
|
271
|
+
real user configuration. Claude uses project/local settings and a scoped tool
|
|
272
|
+
allowlist, with no permission bypass. `eval/episode-api-check.mjs` separately
|
|
273
|
+
checks scripted API scenarios; those are not reported as host model evidence.
|