@foundocs/foundocs-setup 0.3.16 → 0.3.19

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
@@ -149,7 +149,7 @@ The bundled `check-update.mjs` remains a read-only manual version checker, with
149
149
 
150
150
  The bundled Foundocs skill uses live tool discovery for `set_content_status` (atomic 1–100 document/knowledge archive or restore), `get_archive_candidates` (run-scoped review evidence) and `approve_archive_proposal` (one archive-only proposal explicitly approved by the human in chat). Existing `set_knowledge_status` remains compatible on servers with only single-knowledge archival. The stdio bridge forwards server tool schemas and responses dynamically; no hardcoded tool list or runtime upgrade is needed just to expose these tools.
151
151
 
152
- Manual identified targets execute on explicit request. Dreaming never archives automatically: the 168-hour/four-negative-evaluation threshold selects review candidates, current bodies and beneficial uses must also be assessed, and only specific current human approval applies a proposal. Documents gain archive proposals only. See the [Dreaming protocol](skills/foundocs/references/dreaming.md) and [evaluation cases](eval/README.md). Test new installs and skill updates in isolated fixtures; do not overwrite a developer's edited installed skills.
152
+ Manual identified targets execute on explicit request. Dreaming never archives automatically: the 168-hour/four-negative-evaluation threshold selects review candidates, current bodies and beneficial uses must also be assessed, and only specific current human approval applies a proposal. Content-grounded low future reuse value is also a reason to propose archiving unnecessary knowledge, even if it is factually correct and has no retrieval history; rare but useful rules, decision context and recovery lessons remain protected. Documents gain archive proposals only. See the [Dreaming protocol](skills/foundocs/references/dreaming.md) and [evaluation cases](eval/README.md). Test new installs and skill updates in isolated fixtures; do not overwrite a developer's edited installed skills.
153
153
 
154
154
  ## Source and releases
155
155
 
@@ -195,3 +195,75 @@ 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.19 upgrade-runtime --root /absolute/project
234
+ npx --yes @foundocs/foundocs-setup@0.3.19 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, supports interrupted retry and the existing conflict-safe `rollback`.
240
+ Reconnect MCP and review the exact new hook hashes afterward. Skill updates do
241
+ not silently activate or upgrade the runtime. `doctor` reports runtime support
242
+ and live/stale checkpoint locks separately from host verification. If a crashed
243
+ helper leaves a stale lock, confirm its process has ended and remove only the
244
+ reported lock; preserve the outbox and credentials.
245
+
246
+ Opt out without editing managed hooks/skills by adding
247
+ `"episodes": {"enabled": false}` to `foundocs.json`, or launch the host with
248
+ `FOUNDOCS_EPISODES=off`. Deleting/modifying managed hooks is treated as an update
249
+ conflict; other hooks and user-edited skills remain preserved.
250
+
251
+ For opt-in live package validation, `eval/episode-host-check.mjs` (run with Bun)
252
+ installs a `.tgz` into isolated projects backed by the product HTTP/PostgreSQL
253
+ fixture. Supply `FOUNDOCS_EPISODE_LIVE=1`, `FOUNDOCS_PRODUCT_DIR`,
254
+ `FOUNDOCS_EPISODE_PACKAGE`, and the test database URL. It never edits host trust.
255
+ Review the generated project in each actual host, perform an ordinary task and
256
+ a trivial lookup, then send `verify` to inspect persisted episodes. This fixture
257
+ is separate from deterministic unit tests and does not claim model execution
258
+ merely because installation succeeded.
259
+
260
+ After starting that fixture, `eval/episode-host-run.mjs` runs an ordinary model
261
+ turn and asserts the observed tool path. Set `FOUNDOCS_EPISODE_CLIENT` to
262
+ `codex` or `claude`, and `FOUNDOCS_EPISODE_CASE` to `important` or `routine`.
263
+ Codex additionally requires an explicit `FOUNDOCS_EPISODE_MODEL` and
264
+ `FOUNDOCS_EPISODE_REVIEW_HOOKS=1` after reviewing the generated commands. This
265
+ opt-in test uses the host's exact-hash hook review RPC in an isolated temporary
266
+ CODEX_HOME, with workspace-write and on-request approvals. It never alters the
267
+ real user configuration. Claude uses project/local settings and a scoped tool
268
+ allowlist, with no permission bypass. `eval/episode-api-check.mjs` separately
269
+ checks scripted API scenarios; those are not reported as host model evidence.