Pindoc

io.github.var-gg由 GitHub 账号 var-gg 发布v0.2.0更新于 Oct 24, 2026

Code-pinned team memory for AI coding agents — typed artifacts, MCP-native, self-host.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

面向 AI 编码代理的自托管项目记忆系统,把代理发现整理成带类型、可关联代码的条目,供团队和后续代理检索。

可以做什么
检测工作区并解析当前仓库对应的项目标识,可安装 harness 把标识写入项目文件。读取任务队列,并在改代码前获取任务上下文。提交带类型的条目,如决策、分析、调试路径、任务收尾和验证记录,并关联到提交、文件、行范围、URL 或相关条目。更新任务的验收与收尾状态。上传并附加图片等资源到条目。通过内置嵌入模型对项目记忆做语义检索。
适用场景
适合多会话使用 AI 编码代理的团队,希望调试路径、决策和分析沉淀为可审阅的团队知识,而不是随对话消失。也适合多个代理或成员在改代码前需要共享、与提交关联的上下文时使用。
运行要求
以本地 Docker Compose 方式运行(建议 Docker 27+、约 2 核 CPU、4 GB 内存和 5 GB 磁盘),启动带 pgvector 的 Postgres、守护进程和阅读界面。需要 PINDOC_DATABASE_URL(Postgres 连接串),首次运行需出站 HTTPS 以缓存内置嵌入模型。MCP 客户端连接守护进程的 HTTP 端点 127.0.0.1:5830/mcp;PINDOC_BIND_ADDR 默认仅回环。
安装前请注意
代理可写入持久的、阅读界面可见的条目;draft 完整度只是信任状态而非私密草稿,敏感内容应使用私有可见性或审阅流程。不要在无身份提供方的情况下把可写守护进程暴露到公网;非回环绑定地址和 PINDOC_ALLOW_PUBLIC_UNAUTHENTICATED 会削弱防护。资源上传读取的是服务器或容器主机上的路径,而非客户端机器。切勿把测试数据库变量指向个人或生产数据库。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Pindoc,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Pindoc

[English README] [Korean README]

[CI] [License] [MCP]

Code-pinned team memory for AI-assisted development. Agents write the durable record; humans review, discuss, and steer.

Pindoc is a self-hosted project memory system for teams working with AI coding agents. It turns useful agent discoveries into typed artifacts: decisions, debugging paths, task closeouts, verification notes, and code-linked analyses. Every artifact is scoped to a project area and pinned back to commits, files, URLs, resources, or related Pindoc artifacts.

It is still the wiki you never type into, but the point is not automation for its own sake. Pindoc keeps the parts of agent work that teammates and future agents can reuse.

Why It Exists

AI coding sessions are productive, but team context still falls through the cracks:

  • a debugging path dies with the terminal session,
  • the same decision is re-explained to every new agent,
  • useful analysis stays in one operator's chat instead of becoming team knowledge,
  • duplicate documents accumulate across wikis, issue trackers, PRs, and commit messages,
  • in real project environments, the person who finds a problem cannot always change the code immediately; structured evidence helps the team discuss and decide.

Pindoc turns agent work worth keeping into searchable, code-pinned team memory. The next teammate or coding agent can ask Pindoc what matters before it edits.

What Makes Pindoc Different

  • Collaborative memory layer: artifacts are written for teammates and future agents, not as private chat summaries.
  • Agent-only write surface: the Reader UI is for reading and review; durable writes go through agents.
  • MCP-native workflow: tools such as pindoc.context_for_task, pindoc.artifact.propose, and pindoc.task.queue regulate agent behavior instead of acting as a thin CRUD API.
  • Typed artifacts: Decision, Analysis, Debug, Flow, Task, TC, Glossary, and domain-pack types.
  • Code-pinned memory: artifacts can point to commits, files, line ranges, resources, URLs, and related artifacts.
  • Record-worthy by design: Pindoc avoids raw chat archives and keeps only decisions, analyses, debug paths, verification, and task context with future value.
  • Multi-project daemon: one /mcp endpoint can serve multiple projects; each tool call carries project_slug.
  • Self-host first: Docker Compose brings up Postgres, pgvector, the Pindoc daemon, and the Reader SPA.

Public Demo

A read-only public demo is a follow-up track and is not part of this OSS release. Until it ships, the README, docs/, and a self-hosted clone are the primary proof. Operators who want to evaluate Pindoc end-to-end run docker compose up -d --build and inspect their own artifacts.

The follow-up demo plan stays in Public Demo Plan for when a hosted instance is appropriate.

Quick Start

Prerequisites:

  • Docker 27+
  • 2 CPU cores and 4 GB RAM recommended for local dogfood or small-team use
  • 5 GB free disk recommended for Docker images, Postgres data, and the embedding cache; 2 GB is a light fresh-clone minimum
  • outbound HTTPS on first run so the bundled EmbeddingGemma model and runtime can be cached
  • Go 1.25+ only for host-native development
  • Node 20.15+ and pnpm 10+ only for web development outside Docker

The default Docker path includes semantic search through a bundled EmbeddingGemma Q4 ONNX provider, so no embedding sidecar is required. See System Requirements for minimum and optional deployment profiles.

bash
git clone https://github.com/var-gg/pindoc.gitcd pindocdocker compose up -d --build

To make the running daemon report the exact source revision, pass the current commit through the Compose build argument before building:

bash
export PINDOC_BUILD_COMMIT="$(git rev-parse HEAD)"docker compose up -d --build

PowerShell users can set the same value with $env:PINDOC_BUILD_COMMIT = git rev-parse HEAD. make compose-up performs this stamping automatically.

Open the Reader:

text
http://localhost:5830/

Check that the database ledger matches the migrations embedded in the image:

bash
docker compose exec pindoc-server-daemon pindoc-admin schema doctor --json

The command is read-only and exits non-zero for unknown applied migrations, pending migrations, or checksum drift. It never deletes or accepts an unknown schema change automatically.

Preview and repair semantic indexes that are unknown, stale, failed, or were built with a different embedding model:

bash
docker compose exec pindoc-server-daemon pindoc-reembed -dry-run -state needs-refreshdocker compose exec pindoc-server-daemon pindoc-reembed -state needs-refresh

Pindoc records the indexed revision, title/body hashes, model identity, attempt count, and last error in artifact_index_state. Embeddings are fully prepared before old chunks are replaced. If the provider fails, the artifact write can still succeed with index_state.status="failed" and retryable=true, while the last known-good chunks remain searchable. The re-embed command handles each artifact in its own transaction and exits non-zero if any retry still fails.

On a fresh instance, / first asks for the owner identity (display name and email), then routes to the first-project wizard. To open the project wizard directly after identity setup:

text
http://localhost:5830/projects/new?welcome=1

Repair Ownerless Projects From Older REST Builds

Older builds could create a project through POST /api/projects without a matching project_members owner row. After upgrading, repair any affected project by assigning the configured loopback owner:

sql
INSERT INTO project_members (project_id, user_id, role)SELECT p.id, s.default_loopback_user_id::uuid, 'owner'FROM projects pCROSS JOIN server_settings sWHERE p.slug = '<project-slug>'  AND s.default_loopback_user_id IS NOT NULLON CONFLICT (project_id, user_id) DO UPDATE SET role = 'owner';

Connect an MCP Client

The Docker daemon exposes one account-level MCP endpoint:

jsonc
{  "mcpServers": {    "pindoc": {      "type": "http",      "url": "http://127.0.0.1:5830/mcp"    }  }}

Project scope is not encoded in the URL. Agents pass project_slug on project-scoped tool calls. Workspaces generated by pindoc.harness.install store that slug in PINDOC.md frontmatter. pindoc.workspace.detect resolves the likely slug for the current workspace, but it does not mutate the daemon-wide PINDOC_PROJECT default. In a multi-project Docker daemon, keep passing the detected project_slug explicitly after the session sweep.

completeness=draft is a maturity/trust state, not an unpublished private draft. Accepted MCP writes are still published and Reader-visible when visibility allows. Use visibility=private or the review workflow for content that must not appear on the normal user surface.

Common Workflows

Ask an agent to start work with project context:

text
Use Pindoc context before editing. Find the current project, inspect assignedTasks, then implement the next acceptance item.

Typical MCP loop:

  1. pindoc.workspace.detect
  2. pindoc.task.queue
  3. pindoc.context_for_task
  4. code or doc work
  5. pindoc.artifact.propose
  6. update Task acceptance and closeout state

Asset uploads from Docker Desktop / Windows

pindoc.asset.upload(local_path=...) reads paths from the MCP server host/container, not from the Windows client. For Docker Desktop, copy the host file into the pindoc-server-daemon container first:

powershell
pwsh -File tools/push-asset.ps1 A:\path\image.png -ProjectSlug survival-manager

The script prints the JSON input for pindoc.asset.upload, including the container-local /tmp/pindoc-asset-upload/... path.

For Reader-visible inline images, two steps are intentionally separate:

  1. Put ![alt](<asset.blob_url>) in body_markdown; this controls rendering.
  2. Call pindoc.asset.attach with role="inline_image"; this records revision metadata and evidence.

Configuration

The default Docker path is single-user and loopback-only:

VariableDefaultPurpose
PINDOC_DAEMON_PORT5830Host port used by Docker Compose.
PINDOC_PROJECTpindocDefault project for unscoped reads/config.
PINDOC_PUBLIC_BASE_URLhttp://127.0.0.1:${PINDOC_DAEMON_PORT}Public base URL used in generated links and OAuth metadata.
PINDOC_BIND_ADDR127.0.0.1:5830Security intent. Non-loopback values require an IdP or explicit public unauthenticated opt-in.
PINDOC_AUTH_PROVIDERSemptyIdentity providers enabled for external requests. Current provider: github.
PINDOC_ALLOW_PUBLIC_UNAUTHENTICATEDfalseExplicit opt-in for external exposure without an IdP. Use only behind a trusted network/reverse proxy.
PINDOC_FORCE_OAUTH_LOCALfalseDevelopment flag that routes loopback /mcp calls through OAuth bearer auth for local QA.
PINDOC_ALLOWED_ORIGINSemptyComma-separated CORS allowlist. Empty means same-origin only; set explicit origins for cross-origin frontends.
PINDOC_DEV_MODEfalseDevelopment-only flag that permits wildcard CORS for local tooling. Do not enable on public instances.

Do not expose a writable daemon to the public internet without an identity provider. For a public read-only demo, keep /mcp and mutating HTTP routes blocked at the reverse proxy; see SECURITY.md and docs/22-public-demo.md. The daemon also sets baseline security headers itself, including nosniff, clickjacking protection, referrer policy, and hardened asset-blob CSP.

For a writable public or cross-device instance, follow docs/oauth-setup.md. It covers GitHub OAuth App setup, the ${PINDOC_PUBLIC_BASE_URL}/auth/github/callback callback rule, runtime MCP client registration, and local OAuth QA with PINDOC_FORCE_OAUTH_LOCAL.

Development

bash
# Run Go tests. Integration tests that need Postgres are skipped unless# PINDOC_TEST_DATABASE_URL is set.go test ./...
# Web checks.cd webpnpm install --frozen-lockfilepnpm typecheckpnpm test:unitpnpm build
# Full image build.docker build -t pindoc-server:local .

To test the OAuth bearer path locally while still connecting through 127.0.0.1, set PINDOC_FORCE_OAUTH_LOCAL=true; the daemon will warn on boot and require Bearer tokens for loopback /mcp calls.

On Windows hosts without a local C toolchain, run Go tests through Docker:

powershell
docker run --rm -v "${PWD}:/work" -w /work golang:1.25 go test ./...

Run database integration tests against a disposable Postgres/pgvector database; never point PINDOC_TEST_DATABASE_URL at a personal or production Pindoc database. Test and plugin fixtures must opt into Reader isolation explicitly: set projects.CreateProjectInput.ReaderHidden to true, or set projects.reader_hidden = TRUE when inserting with SQL. Slug-prefix detection is deprecated and no longer runs at request time. Migration 0070 only performs a one-time backfill for fixture prefixes used by older Pindoc releases.

Documentation

Feedback

Long-form questions, feature requests, and design discussions go to GitHub Discussions. Bug reports go to GitHub Issues. The maintainer typically responds within a day.

Status

Pindoc is in active dogfood. The local self-host path, Reader UI, project/area model, artifact proposal flow, task queue, revision history, summaries, and real embedding provider path are implemented. The public OSS launch track is focused on first-run reliability, a read-only dogfood demo, CI, security docs, and clearer collaborative positioning.

License

Apache License 2.0. See LICENSE.

来源:README.md,提交 075f3c1

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分