@foundocs/foundocs-setup 0.4.1 → 0.5.2

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
@@ -1,5 +1,11 @@
1
1
  # Foundocs setup
2
2
 
3
+ ## Discussion capture and Dreaming
4
+
5
+ When a project discussion concludes, the connected agent records its topic, outcome or open question under `docs/` and saves a one- or two-sentence episode. Starting implementation also updates the relevant feature document. The agent asks when it is unclear whether a discussion belongs in the shared project and honors episode opt-out.
6
+
7
+ When you ask the agent to dream, it checks accessible project conversations from the last 30 days for missing documentation. Codex conversations are analyzed by GPT-6 Luna and Claude conversations by Claude Haiku. Only user-facing messages attributable to the selected project are eligible. The agent compares evidence with existing documents, reports what it changed and surfaces unresolved conflicts. You can ask it to skip conversation history for a dream. If a provider is unavailable, its unprocessed messages can be retried within the same 30-day window.
8
+
3
9
  ## One installation for multiple projects
4
10
 
5
11
  In the Foundocs web agent guide, choose **글로벌로 적용** for Codex or Claude Code and copy the installation prompt. The default **이 프로젝트에만 적용** installs into a single checkout. Global installation registers the current workspace for the selected OS user and client. Reload the client to discover its MCP server and the `foundocs-workspace` skill.
@@ -26,7 +32,7 @@ Input JSON follows `SetupInstallInput` version 1: `client` (`claude` or `codex`)
26
32
 
27
33
  Configuration is local to the exact `--root`: `foundocs.json`, a marked `AGENTS.md` block, and either `.codex/config.toml` or `.mcp.json`. Claude additionally receives a marked `CLAUDE.md` reference to `AGENTS.md`. The package also installs its English Foundocs skill at `.agents/skills/foundocs/` for Codex or `.claude/skills/foundocs/` for Claude, including the Dreaming protocol reference. The managed instruction block points to the selected client’s discoverable skill. Existing instructions and foreign MCP entries are preserved. Skill files are updated only when unchanged from the installer’s recorded version. Byte-identical packaged files in a new clone are adopted locally; other foreign or user-edited skills stop preflight, and rollback preserves later user edits. Run `update-skills` to add the bundled skills to an older installation without a new connection code. Manual document archival/restoration uses the server-discovered `set_content_status` tool on explicit request; the bundled Foundocs skill documents versioned writes, archived lookup and the separate Dreaming approval path. Existing installations receive this guidance through `update-skills`; ordinary capture does not authorize archival. The bridge discovers tools dynamically, so server tool additions do not require a runtime upgrade. Dreaming itself requires the connected server to expose `dream_memory` and `get_dream`; installation does not enable unavailable server capabilities. Conflicting project IDs, malformed files, symlinks, or a different same-name `foundocs` server stop installation before exchanging the code. Resolve a conflict explicitly; this installer does not overwrite it.
28
34
 
29
- Keys, backups and installation journals live in `~/.local/share/foundocs/setup`, outside the project. `FOUNDOCS_SETUP_HOME` may select another absolute private directory outside the target project, including isolated test fixtures. Keep using that same value for doctor/rollback. Credentials are isolated by workspace, project, and canonical project root. Both clients use the exact-version npm package’s `mcp` command through `npx` on PATH; their project settings contain no user-specific path. Older copied helpers remain in private storage for compatibility and rollback, but portable MCP does not depend on them. Its stdio adapter forwards MCP tool discovery and calls to the same Remote HTTP endpoint with the saved Bearer key. This adapter preserves remote structured results and errors, augments supported measurement schemas/annotations with local task metadata, and requires an explicit valid project ID on every call. A changed valid project ID is forwarded unchanged; the remote server enforces workspace access. It adds no remote service. macOS/Linux use user-only directories/files (0700/0600). Windows uses PowerShell to apply and verify a protected current-user-only ACL; unsupported ACL filesystems stop before code exchange.
35
+ Keys, backups and installation journals live in `~/.local/share/foundocs/setup`, outside the project. `FOUNDOCS_SETUP_HOME` may select another absolute private directory outside the target project, including isolated test fixtures. Keep using that same value for doctor/rollback. Credentials are isolated by workspace, project, and canonical project root. Both clients use the exact-version npm package’s `mcp` command through `npx` on PATH; their project settings contain no user-specific path. Older copied helpers remain in private storage for compatibility and rollback, but portable MCP does not depend on them. Its stdio adapter forwards MCP tool discovery and calls to the same Remote HTTP endpoint with the saved Bearer key. This adapter preserves remote structured results and errors and requires an explicit valid project ID on every call. A changed valid project ID is forwarded unchanged; the remote server enforces workspace access. It adds no remote service. macOS/Linux use user-only directories/files (0700/0600). Windows uses PowerShell to apply and verify a protected current-user-only ACL; unsupported ACL filesystems stop before code exchange.
30
36
 
31
37
  The helper prefers the saved installation credential. To explicitly use a process-provided `FOUNDOCS_API_KEY`, also provide matching `FOUNDOCS_PROJECT_ID` and `FOUNDOCS_WORKSPACE_ID`. An unrelated shell key never silently overrides the saved workspace key. The legacy HTTP helper’s stdout contains authentication headers solely for the host MCP client; do not invoke it through tools that log stdout. The shared portable runtime writes only MCP messages to stdout.
32
38
 
@@ -201,18 +207,6 @@ git push origin --follow-tags
201
207
  See [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/).
202
208
 
203
209
 
204
- ## Optional effect measurement (0.3.15)
205
-
206
- The installed Foundocs skill automatically checks the project policy once per information task. When an administrator has enabled measurement, a supported shell host freezes a short pre-retrieval brief and allowlisted local source snapshot before its first index/search/read, then runs one measured pair after a beneficial retrieval. Users do not need to type a command for each task. Policy remains OFF unless a web owner/admin explicitly changes it.
207
-
208
- The initial verified probe runner is Claude Code 2.1.312 on macOS, with an existing Claude login and an exact model ID such as `claude-haiku-5-5`. Codex and Claude shell hosts can coordinate it. Codex-native probes, Linux/Windows pending platform canaries, shell-less hosts and missing isolation/authentication are reported as unsupported without a fallback. Child tools are restricted to Read/Glob/Grep in separate snapshots; only the coordinator receives Foundocs credentials. The watchdog also terminates the provider CLI when its coordinator crashes.
209
-
210
- `foundocs-setup measure prepare|run|flush --root ABSOLUTE_PATH` accepts private stdin JSON. [The installed procedure](skills/foundocs/references/effect-measurement.md) defines the exact inputs and automatic host sequence. This is an opt-in sampled information-acquisition comparison, not whole-task savings. Actual input/output/cache usage and nullable estimated USD are kept separately, including failed and cancelled costs. Max turns and estimated USD settings are not hard API/billing caps.
211
-
212
- 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.
213
-
214
- 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.
215
-
216
210
  ### Automatic selective episodes (0.3.19)
217
211
 
218
212
  New Codex and Claude Code installs include `foundocs-capture-episode`, a
@@ -223,7 +217,9 @@ host trust, approvals or sandbox settings. Confirm actual hook execution and
223
217
  remote `capture_episode` plus local `episode_checkpoint` tool discovery after
224
218
  reconnecting; installed files alone do not prove activation.
225
219
 
226
- The current host batches related small edits, investigations and tests into one
220
+ In a bound project the host saves each concluded discussion to its topic document in `docs/`, including options and open questions. When implementation starts it records the chosen scope and reasons in the feature document. If project relevance or sharing intent is unclear, the host asks before writing. It also records the concluded discussion as a one- or two-sentence episode when episodes are enabled. Global installations use the same skills in a linked folder and support direct episode capture without hooks.
221
+
222
+ For implementation, the current host batches related small edits, investigations and tests into one
227
223
  episode at a meaningful delivery boundary, such as PR submission or a completed
228
224
  service rollout. If the authorized work continues through merge and release, it
229
225
  captures once at the final intended boundary. Individual successes, knowledge saves
@@ -307,9 +303,3 @@ CODEX_HOME, with workspace-write and on-request approvals. It never alters the
307
303
  real user configuration. Claude uses project/local settings and a scoped tool
308
304
  allowlist, with no permission bypass. `eval/episode-api-check.mjs` separately
309
305
  checks scripted API scenarios; those are not reported as host model evidence.
310
-
311
- ### Automatic effect measurement
312
-
313
- After explicit consent, `measure configure --root /absolute/project` accepts stdin JSON with `enabled: true`, `consentVersion: 1`, `shareProjectDataWithWorkingModel: true`, `additionalModelUsage: true`, a relative `allowlist`, and `excludePaths`. New installations may include this object as `effectMeasurement`; existing installations do not need a new key. Use `measure status` with `{}` to diagnose readiness. Disable with `{"enabled":false}`. These commands never weaken host security or enable project policy.
314
-
315
- On a server advertising measurement diagnostics, the local MCP runtime augments information read schemas with `effectTask` and evaluation with `effectTaskId`/`effectTaskComplete`. The first read supplies the pre-exposure brief and trusted current host identity; subsequent reads reuse the task ID. The installer prepares and attaches tracking before exposure, accumulates every retrieval, and runs once after the final successful evaluation. Ordinary reads continue on skip/failure. Reconnect recovery flushes normalized reports only, never repeats inference. Insights shows bounded status/reason metadata without prompts or source paths. Hosts that cannot run the installed process/network/model retain ordinary MCP and report the restriction.