## Summary When asked about Composio, Nod could quote Composio's default logging policy and say that Nod's retention setup was unknown. Nod's default Composio project has Zero Data Retention enabled. That fact now lives in the docs, where Nod can find it with the rest of its product information. This change adds `nod_docs`, a local search and read tool. The full and compact instructions require Nod to search and read the docs before answering every question about Nod. Answers can link directly to the source section. Current account state and owner settings still need live tools. ### Small results, local reads - Build the index and term statistics once, on first use, and keep them in memory. - Rank Markdown text with exact title matches first, then BM25 weights and common plural handling. Markdown link destinations do not affect search scores. - Keep fenced code examples intact while removing leading MDX imports. - Include the docs in the Linux test image, readable by the test user without write access. - Return up to five search results, with excerpts of at most 400 characters. - Read up to 8,000 characters from one section. Return a continuation offset for longer sections. - Include the Markdown and MDX pages in desktop packages and self-hosted images. The docs match the application's source revision. Docs changes also trigger self-host bundle checks. - Run search and read without a network request, embedding service, new dependency, or extra model call. ### Clear Composio security information The docs lead with the default service's ZDR setting. They explain each control and its boundary: | Control | What the docs explain | | --- | --- | | Retention | Covered call arguments, results, and error text stay out of execution logs. Metadata and app tokens remain stored. Files, triggers, search queries, older logs, and managed OAuth apps have separate limits. | | Account permissions | The provider's permission grant sets what the connection can read or change. Some grants cover a whole mailbox. ZDR does not reduce that access. | | Nod's trust check | Nod checks app requests before dispatch. These checks cannot stop a stolen token used outside Nod. | | Account access | Requests are signed per installation, and accounts are checked against their owner. An account ID alone grants no access. | | Credentials and app content | App tokens stay outside the model, workspace, and browser. App results are untrusted data and cannot grant permission. | | Owner controls | Owners can review actions in Usage, disconnect accounts, and revoke access at the provider. | Reader pages: [Connect apps](https://nod.n8n.io/docs/connect/apps/), [Your data and privacy](https://nod.n8n.io/docs/trust/privacy/), and [The agent runtime](https://nod.n8n.io/docs/how-it-works/agent-runtime/). The new sections become public after this PR merges and the docs deploy. Official sources: [Composio ZDR coverage](https://docs.composio.dev/docs/security/zero-data-retention), [security controls](https://docs.composio.dev/docs/security/overview), and [Trust Center](https://trust.composio.dev/). ### Safety scope The new read path accepts indexed section IDs, never arbitrary file paths or URLs. The index skips file and directory symlinks. Tool results use the existing untrusted-result wrapper. Documentation grants no permission to act. This change documents existing app protections; it does not change Trust, Vault, sign-in, or app account isolation. The compact prompt keeps the owner-name restriction with shorter wording to leave space for docs, live-state, and navigation guidance. ## How to test Passed locally: - `pnpm exec tsx --test tests/agent-guard.test.ts tests/pi.test.ts`: 205 tests after rebasing onto current main. The same 205 tests also passed inside the Linux test image with networking disabled. These include search ranking, bounded reads, continuation, caching, rejected paths, symlinks, result wrapping, and real tool discovery. - The docs tool also discovers, searches, and reads with memory in an 8,192-token context. A manual variant with the maximum 8,000-character read passed too. - Nine CI selection tests and actionlint with the repository's existing custom-runner label exception. - Two focused desktop tests: bundled docs without site dependencies or media, and production imports. - `pnpm exec tsc --noEmit` and `node scripts/check-architecture.mjs`. - Prettier on the changed source, tests, scripts, and docs; `git diff --check`. - `pnpm --dir docs build`, including internal links. Checked the new sections in the generated HTML. - Checked 622 returned section links against 62 built pages, with no broken anchors. - Manual retrieval checks across 14 topics: models, channels, schedules, memory, privacy, Composio, local models, browsers, spending, hosting, installation, feedback, and rules. To review retrieval without a model or connected account, search for `Composio zero data retention` with `createDocumentation('docs/src/content/docs')`. Read the returned `trust/privacy#composio-zero-data-retention` section. Its source link and coverage limits should be present. ## Related issues No linked issue. ## Checklist - [x] The PR title uses Conventional Commits. - [x] I reviewed this change and take responsibility for it. - [x] I ran checks that match the changed files and behavior, and listed the results above. - [x] New tests check the read boundary, runtime contract, and packaged docs. - [x] No keys, credentials, real accounts, private conversations, or other people's data are included. - [x] Docs are updated where behavior changed. - [x] The summary states the scope of changes to security controls.
13 lines
602 B
Docker
13 lines
602 B
Docker
FROM node:24.21.0-bookworm-slim@sha256:d6aa754f16b3197301076f047b5def2f02ea1dbbc2ca920407d46d7ec7f87b20
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
chromium xvfb xauth xdotool ffmpeg fonts-liberation fonts-noto-core fonts-noto-cjk fonts-noto-color-emoji ca-certificates python3 git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /app
|
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
COPY patches ./patches
|
|
RUN corepack enable && pnpm install --frozen-lockfile && pnpm store prune
|
|
COPY docs/src/content/docs ./docs/src/content/docs
|
|
RUN chmod -R a+rX /app/docs
|
|
USER node
|