| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Add standalone Paperclip MCP server package Co-Authored-By: Paperclip <noreply@paperclip.ing> | 6 个月前 | |
Add standalone Paperclip MCP server package Co-Authored-By: Paperclip <noreply@paperclip.ing> | 6 个月前 | |
Add standalone Paperclip MCP server package Co-Authored-By: Paperclip <noreply@paperclip.ing> | 6 个月前 | |
Add standalone Paperclip MCP server package Co-Authored-By: Paperclip <noreply@paperclip.ing> | 6 个月前 | |
Add standalone Paperclip MCP server package Co-Authored-By: Paperclip <noreply@paperclip.ing> | 6 个月前 | |
feat: agents see the company skill library at runtime (#12147) ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - An agent's runtime mounts only its own enabled skills; nothing tells the model what else the company skill library holds > - From inside a sandbox, "installed but not enabled for me" and "does not exist" look identical, so agents tell users freshly installed skills are not installed > - This pull request renders the library as a deterministic markdown section appended to claude-local agent instructions, and adds a paperclipListSkills MCP tool > - The benefit is that agents report the true state ("installed, not enabled for me — ask an operator to enable it") instead of a false negative ## Linked Issues or Issue Description **What existing behavior does this improve?** How agents reason about the company skill library at runtime. **Subsystem affected** `packages/adapter-utils` (new pure builder), `packages/adapters/claude-local` (instructions append), `packages/mcp-server` (new tool). **Current behavior** The runtime hands adapters the full library list, but only the agent's enabled skills are mounted, and no prompt content or MCP tool describes the rest. Agents inspect their sandbox, find nothing, and report installed skills as not installed. **Proposed behavior** A "Company skill library" markdown section lists every skill as `enabled`, `installed, not enabled for you`, or `enabled but unavailable: <cause>`, with instructions to report the not-enabled state accurately and ask an operator to enable it. claude-local appends it to the agent instructions text. A `paperclipListSkills` MCP tool exposes the same list on demand. **Breaking changes** None. Other adapters are untouched (they can adopt the builder later); the manifest is deterministic, so the claude-local prompt-bundle cache only busts when the library actually changes. ## What Changed - New `packages/adapter-utils/src/skill-library-manifest.ts` with `buildSkillLibraryManifestMarkdown` (pure, key-sorted, deterministic; renders the missing-cause detail from #12146). - `packages/adapters/claude-local/src/server/execute.ts` appends the manifest to `combinedInstructionsContents` (creating it when no instructions file is configured). - `packages/mcp-server/src/tools.ts` adds `paperclipListSkills` hitting `GET /companies/:companyId/skills`. ## Verification - `npx vitest run packages/adapter-utils/src/skill-library-manifest.test.ts` (from repo root) — 3 tests: byte-identical output for shuffled input, state rendering incl. the unavailable cause, change detection. - `cd packages/mcp-server && npx vitest run` — new tool routing test passes (13 passed; 1 pre-existing failure on my machine reproduces unchanged at the branch base). - `cd packages/adapters/claude-local && npx vitest run` — 244 passed, 1 skipped. - `pnpm run typecheck` clean in adapter-utils, mcp-server, claude-local. ## Risks - Prompt growth is one line per installed skill plus a five-line header — bounded and only present when the library is non-empty. Stacked on #12146 so the manifest's "enabled but unavailable" state reflects real materialization failures. ## Model Used - Claude Fable 5 (`claude-fable-5`, Anthropic) with extended thinking and tool use, via Claude Code. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge | 2 个月前 | |
feat(connections): add self-serve intent runtime (#12345) ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Agents need a governed way to request app connections during issue work. > - The catalog now describes the available providers and setup methods. > - A request must become a durable, company-scoped intent before an operator acts on it. > - This pull request adds that intent runtime across server, agent, CLI, and shared contracts. > - The benefit is a safe bridge from agent need to operator-approved setup. ## Linked Issues or Issue Description Refs #11965 This is stack 7 of 11. It depends on stack 6 and replaces another reviewable part of #11965. ## What Changed - Add connection intent types, validation, service logic, and routes. - Add agent runtime tools and CLI support for connection requests. - Add issue-thread interaction support for connection intents. - Add runtime, route, adapter, and contract tests. - Hold the final resolved-continuation row lock through asynchronous adapter preparation until an actual process spawn, so parking or reassignment cannot cross that boundary. - Report Hermes Gateway's first remote run request through the shared dispatch hook so the resolved-intent lock is released at the true dispatch boundary. - Revalidate the addressed user's live non-viewer membership and connection-management authority for every intent mutation, including OAuth completion. ## Verification - `pnpm --filter @paperclipai/server typecheck` - `pnpm --filter @paperclipai/server exec vitest run src/__tests__/tool-access-service.test.ts` - Result: 176 tests passed. - `pnpm build` - `pnpm --filter @paperclipai/server exec vitest run src/__tests__/heartbeat-stale-queue-invalidation.test.ts` (32 passed; includes non-process dispatch lock-release coverage) - `pnpm exec vitest run --project @paperclipai/server server/src/__tests__/connection-intents-service.test.ts -t "addressed-user mutation"` (1 passed) - `pnpm exec vitest run --project @paperclipai/server server/src/__tests__/tool-access-service.test.ts -t "binds OAuth callback completion to the initiating board session"` (1 passed) - `pnpm --filter @paperclipai/hermes-paperclip-adapter test -- src/gateway/server/execute.test.ts` (23 passed; includes dispatch-hook ordering and exactly-once coverage) - `pnpm --filter @paperclipai/hermes-paperclip-adapter typecheck` ## Risks - A malformed intent could create an unusable operator request. - Validators and company checks reject invalid or cross-company requests. - The final continuation gate holds the issue row lock through adapter preparation until process or remote dispatch; later operator changes use the normal active-run interruption path. - The change does not add a database migration. > I checked `ROADMAP.md`. This stack continues the existing app connection work from #11965 and does not duplicate another planned item. ## Model Used OpenAI Codex, GPT-5. The runtime model ID and context window were not exposed. The model used reasoning, tool use, and code execution. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have linked the public source pull request with `Refs #` - [x] I have not referenced internal or instance-local Paperclip issues or links - [x] My branch name describes the change and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Paperclip <noreply@paperclip.ing> | 2 个月前 |