mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-13 13:38:01 +02:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - The runner uses one provider-neutral question contract for user input. > - ACP providers describe form input with provider-specific JSON Schema values. > - Passing those values through would couple the task page to ACP and could bypass the existing response validator. > - This pull request converts bounded ACP forms to the existing Paperclip question contract and converts validated answers back to ACP content. > - The benefit is one question path that does not change any legacy adapter behavior. ## Linked Issues or Issue Description **Agent or provider** ACP-compatible providers that use form elicitation. **Why this adapter is useful** ACP providers need structured user answers during a turn. Paperclip must present those questions through its provider-neutral contract so the existing task experience and validation rules remain consistent. **How the agent is invoked** A later pull request will connect this internal adapter to the ACPX sidecar. This pull request only implements the conversion boundary. It does not launch ACPX, add a dependency, or enable an adapter. **Additional context** This pull request is stacked on #12387. URL elicitation remains unsupported and returns no form projection. ## What Changed - Convert bounded ACP string, enum, multi-select, Boolean, number, and integer fields to `paperclip.question_set.v1`. - Validate every answer with the existing provider-neutral response parser before conversion. - Convert validated answers back to typed ACP form content. - Bound provider-controlled field and option inventories. - Use stable question identities and define arbitrary property names without prototype mutation. - Keep ACP runtime types and dependencies outside this package-local conversion boundary. ## Verification - Runner TypeScript typecheck — passed. - Runner TypeScript tests — 41 files and 367 Vitest tests passed; 12 Node contract tests passed. - `pnpm -r typecheck` — passed for all applicable workspaces. - `pnpm build` — passed, including runner binary, server, UI, and workspace packages. - Prettier and `git diff --check` — passed. - The diff contains 2 files and does not change `pnpm-lock.yaml`, a workflow, a package dependency, a public export, server selection, or UI behavior. ## Risks The main risk is accepting an ACP form that cannot be represented safely by the Paperclip question contract. Unsupported field types fail closed. Field and option inventories are bounded. The existing question parser validates all text, selection, numeric, and required-field constraints before any response returns to ACP. ## Model Used OpenAI Codex with GPT-5 and repository tool use. ## 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 linked an existing public item or described the issue in this PR - [x] I have not referenced internal or instance-local Paperclip issues or links - [x] My branch name describes the change and contains no internal task identifier - [x] I have run the affected tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have documented the compatibility and security boundary - [ ] All applicable GitHub Actions are green - [ ] Greptile is 5/5 with every actionable comment resolved - [x] I will address all review findings before requesting merge