Commit Graph
118 Commits
Author SHA1 Message Date
DottaandPaperclip 2d60b454a7 feat(runner): upgrade closed Pi runtime to 1.0 profile 11
Preserve structural system messages without assistant attribution, disable native cache warming, and require queued continuation acknowledgements. Pin the complete upstream 1.0 dependency closure and retain historical profile evidence.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-01 15:16:41 -05:00
Dotta f6406e7e55 Merge frozen master into the rich ACP production candidate
Preserve incremental Codex checkpoints and ACP unchanged-directory ownership as separate warm-session paths. Combine cancellation commit fencing, terminal outcome recovery, and both native fixture catalogs. Keep all candidate qualification states and provider profile identities unchanged.

Validation: 629 controller unit checks, 5 heartbeat cancellation checks, 210 runner/profile/sidecar checks, 44 catalog checks; token gates, Rust source formatting, and generated protocol manifest pass. Database tests and builds intentionally deferred. Source-aliased no-emit checking is blocked only by the borrowed ACPX SessionRecord declaration lacking the already-patched cursor_prompt_usage field.
2026-10-01 10:41:38 -05:00
Dotta 22c78242a4 fix(runner): require receiver acknowledgment for semantic receipt 2026-10-01 00:14:49 -05:00
DottaandPaperclip 2e4e06d7f0 fix(runner): commit receipts only for admitted sidecar frames
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 23:34:59 -05:00
Dotta 3665daf9dc fix(runner): bind normalized semantic receipt inputs 2026-09-30 23:28:02 -05:00
DottaandPaperclip a06fa49483 chore(runner): integrate pending v10 correlation for qualification only
Preserve both reviewed source and historical qualification evidence. CI-only branch; do not merge.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 22:14:15 -05:00
DottaandPaperclip 041d84760f fix(runner): align Cursor control IDs and retain native receipt evidence
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 22:11:14 -05:00
DottaandPaperclip e5ef415eef fix(runner): version rich tool correlation profiles
Bind Cursor permission identity and Copilot semantic receipt sources across TypeScript, native admission, provider packaging, and recovery. Preserve historical v9 fixtures and pending qualification status.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 21:54:21 -05:00
DottaandPaperclip 2ea54f2c3f fix(runner): bind transitive Copilot permission policy sources
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 20:11:36 -05:00
DottaandPaperclip eeb48425ee fix(runner): bind transitive Copilot permission policy sources
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 20:09:09 -05:00
DottaandPaperclip fcf1866928 fix(runner): bind Copilot permission grants to visible targets
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 19:59:38 -05:00
DottaandPaperclip fa8642d1eb test(runner): gate installed package staging regressions
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 19:59:19 -05:00
DottaandPaperclip 9661dd6473 fix(runner): stage installed dependency pack inputs
Preserve non-bundled package contents outside the pnpm tree before npm packs them. Keep bundled and root-package behavior and clean-consumer assertions unchanged.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 19:59:19 -05:00
DottaandPaperclip 03090216b7 fix(runner): bind Copilot permission grants to visible targets
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 19:54:27 -05:00
DottaandPaperclip 3c561642b4 fix(chat): resolve approvals and preserve unanswered questions (#14613)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Agents ask for decisions and optional details through cards in chat.
> - A clear approval in a message can leave the matching card pending.
> - An unanswered question can also block an unrelated later reply.
> - Decisions need a saved source message, while optional questions need
to remain answerable in history.
> - This pull request records conversational decisions and lets users
move on from questions and answer them later.

## Linked Issues or Issue Description

**What happened?**

Native Claude and Codex could act on approval in chat while the original
approval card stayed pending. Pending question forms stayed above the
composer, were absent from history, and could suppress later chat
replies. A late native question answer could wait for a finished run to
reconnect.

**Expected behavior**

The active agent records a clear approval or refusal against the exact
card and user message. Ambiguous replies do not grant consent. Users can
send another message without answering a question. The question remains
pending in history and can be reopened and answered later. The saved
answer reaches the agent.

**Steps to reproduce**

1. Ask an agent to propose work with a confirmation card, then approve
it in chat.
2. Check that the original card records that approval before work
starts.
3. Ask an interactive question, send an unrelated message, and reload.
4. Open the unanswered question from history and submit an answer.

Related work: #14408 added completion delivery. #14607 tests completion
reporting turns. Neither records conversational answers on approval
cards.

## What Changed

- Add a confirmation endpoint backed by a user comment, with schema
validation, OpenAPI discovery, and native Plan-mode access. Ask mode
remains read-only.
- Check company, active run, actor, current session, message provenance,
revision, and resolver policy. Save the decision and audit in one
transaction. Retries do not repeat effects. Emit resolution telemetry
after commit.
- Give fresh and resumed chat turns the actual pending confirmation
identities. Teach agents to save clear conversational decisions before
acting and to clarify ambiguity.
- Keep unanswered Agent Chat questions as compact history entries. A
newer user message closes the old form. Question cards never contribute
to composer pending counts or navigation, including after dismissing a
fresh form. The history card is the sole reminder; clicking it restores
that exact form and draft.
- Preserve Agent Chat questions when later messages or questions arrive.
Historical ordinary inputs no longer gate later chat replies.
Current-run requests, task execution, and governed approvals keep their
gates. Remove the special acknowledgement-publication proof helpers that
this rule replaces.
- Route answers to finished native runs through durable fresh-wake
delivery, with existing idempotency and source-question context. Settle
late replies against contiguous completed conversation turns and freeze
their history replay; failed, unhandled, and newly arriving messages
remain actionable.
- Add real-component Storybook scenarios, database and UI regressions,
and a three-turn native Claude/Codex E2E case. Capture distinct,
UI-ready screenshots and report the individual assertions.

## Verification

- Focused decision/publication/UI regressions after merging master: 288
passed; subsequent UI draft, failed-send, and conversation checks: 199
passed.
- Native question and durable delivery regressions: 106 passed,
including all four terminal run states and exactly-once late delivery.
Seven targeted regressions fail against the original implementation and
pass with the fix.
- Latest conversation/decision/native-delivery regressions after the
master merge: 121 passed. Covers completed progress, missing or failed
intervening turns, new messages during a late reply, stale sessions, and
frozen retry/replay boundaries. Four new assertions fail before the
ordering fix.
- E2E support suite after the master merge: 792 passed. Negative
controls reject expired cards, wrong questions/answers, stale or missing
replies, unrelated clarification forms, and unexpected tasks.
- The embedded-browser walkthrough caught one additional defect:
dismissing a fresh question still showed a composer badge. Both Cancel
and close-button regressions failed before the fix. The fix at
`65f2ade12` passes 170 chat-thread tests and 792 E2E support tests.
After merging master, 232 chat-thread/confirmation tests, server/UI
typechecks, and token gates pass. The preview and two-provider live E2E
pass at `e5512a206`; Greptile is 5/5 with zero unresolved threads at
that commit. All 55 checks are now successful at `e5512a206` (four
conditional checks skipped), including the aggregate verification gate
and clean-install canary test. The first attempt was interrupted by
simultaneous CI worker shutdowns; one failed-job rerun passed without
code changes.
- [Published
Storybook](https://d1p6rlowie26tp.cloudfront.net/storybook/branches/codex~2Fchat-approval-resolution/?path=/story/chat-comments-agent-chat-unanswered-questions--moved-on):
nine real-component scenarios. Manually exercised move on, reopen,
preserve draft, answer later, answer one of multiple questions, and a
custom mobile answer in the embedded browser. Retested fresh Cancel and
close-button dismissal in the updated build, then reopened and submitted
the preserved Green selection and inspected its answered receipt. Static
preview has no live model/backend; its callbacks are fixture responses.
- [First live
campaign](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-36714504406-1/)
reproduced the late-answer completion-state defect on both providers
despite correct saved answers and acknowledgements. It also exposed a
valid imperative clarification rejected by the old oracle. Both issues
are fixed with regression controls; this failing run is retained as
evidence.
- [Four-cell
qualification](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-36717804064-1/)
passed 4/4 at `2bf8a1009`: unanswered-question return and ambiguous
confirmation, each on native Claude and Codex. Inspected saved state,
source-message decisions, visible cards, and agent replies. Both
late-answer chats settled to waiting; no unrequested tasks were created.
[Final branch
rerun](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-36719666238-1/)
passed 2/2 at `142630720`: the same unanswered-question journey after
merging master, plus an additional screenshot and browser assertion for
the actual late-answer acknowledgement.
- [Composer-reminder
E2E](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-36727006818-1/)
passed 2/2 at `5b62c52d9`: native Claude and Codex, three turns each,
with explicit no-badge assertions before and after reload. Inspected
saved pending/answered state, both screenshots with a clear composer,
and actual Blue acknowledgements; all five behavioral matchers passed
per provider and neither created tasks. Cost coverage is partial; this
is bounded workflow qualification.
- [Fresh-dismissal
E2E](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-36742773318-1/)
passed 2/2 at `e5512a206`: native Claude and Codex, including fresh
Cancel, clear composer, reopen, unrelated message, reload, late Blue
answer, and actual agent acknowledgement. All five behavioral matchers
pass per provider. Inspected the fresh-dismissal screenshots and saved
pending/answered identity; neither created tasks. Cost coverage is
partial (4/6 runs).
- Prior evidence remains available in [the earlier
campaign](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-36642252725-1/).
Its early loading screenshot and overwritten final capture prompted the
UI-ready, distinct screenshot fixes.

## Risks

- The model interprets intent. The server verifies permission and
provenance; it does not infer consent from text. Ambiguous and unrelated
replies are not approvals.
- Historical questions can accumulate. They remain visible, pending, and
answerable; no automatic answer or expiry is invented.
- The change to completion gates is scoped to Agent Chat and ordinary
historical inputs. Current-turn and governed approvals retain their
existing controls.
- Live qualification is limited to the selected stories. Broader native
onboarding finalization remains separate work.
- No database migration. Telemetry adds no fields or values; the
contract and README document the commit boundary. Privacy review was
requested on the PR.

## Model Used

OpenAI Codex, GPT-6 family, with reasoning, repository tools, code
execution, and browser-test orchestration. The exact model ID and
context-window size are not exposed to this session.

## 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
- [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>
2026-09-30 11:46:46 -05:00
DottaandPaperclip 986f8cc534 Verify Cursor child usage lifecycle and fence profile v9
Mark missing and invalid child run ordinals as partial observations. Exercise the pinned vendor child construction and reuse methods on all three platforms and regenerate the Cursor-only execution identity.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 05:33:44 -05:00
DottaandPaperclip e95e28d9c8 Preserve partial Cursor native usage diagnostics and version ACP profiles
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 05:12:44 -05:00
DottaandPaperclip 654ec2a9cc Fix Copilot materialization rollback and cover replay identity
Roll back only files and directories created by a failed materialization. Cover partial writes, retry, foreign entries, and session replay isolation. Refresh the Copilot v7 source binding.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 02:55:29 -05:00
DottaandPaperclip 913f374191 Preserve native Copilot assistant message identities
Verify and extract the pinned Copilot distribution, preserve native message IDs on the ordered ACP stream, and bind the guarded distribution to profile v7. Keep interim messages separate from final output.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 02:55:29 -05:00
DottaandPaperclip 770dc88a11 Bind Cursor plan waits to the native tool lifecycle
Carry the admitted native plan parent tool into canonical request identity and require its exact successful durable lifecycle before passive settlement. Preserve historical committed Cursor6 waits while versioning new admission to Cursor7.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-30 01:56:28 -05:00
DottaandPaperclip 951b06d08a fix(runner): fence warm ACPX owners on runtime contract changes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 21:40:17 -05:00
DottaandPaperclip a97b626081 fix(runner): preserve Pi native assistant boundaries and notices
Pin Pi profile 8 to native message provenance, preserve explicit empty starts and ends, and keep replay/history and native notices out of final assistant aggregation. Validate fresh, warm and loaded SDK sessions and exact native closure bytes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 16:30:28 -05:00
DottaandPaperclip c867cff960 fix(runner): bind candidate pack to Cursor v5 mode admission
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-29 16:25:03 -05:00
DottaandPaperclip 4af314a055 Admit and bind Cursor native session modes in profile v5
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 16:23:41 -05:00
DottaandPaperclip c73e26107f fix(copilot): bind profile v5 to the final ACPX patch
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 16:13:35 -05:00
DottaandPaperclip bd44f41e9e fix(runner): bound Rosetta interpreter build probes at 30 seconds
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 16:05:33 -05:00
DottaandPaperclip ca28efc246 fix(runner): reject dev-only exceptions under wildcard exports
Treat unexpanded wildcard export targets as potentially exposing every scanned source, so they cannot bypass the reviewed private eval harness boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 13:48:44 -05:00
DottaandPaperclip 1ac2b22990 fix(runner): parse import gates and pack explicit consumer inputs
Use the declared TypeScript parser to distinguish module references from fixture strings. Enforce declared public exports and the ADR0001 private development-only eval harness boundary, including public transitive exposure. Pack absolute dependency inputs from scratch without adopting publisher development toolchains.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 13:47:17 -05:00
DottaandPaperclip 28c82b358e fix(runner): load live console helpers from owning modules
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 13:31:40 -05:00
DottaandPaperclip 7bd453d33d Integrate Pi v7 native tool and input contracts
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit '72ded1794':
  test(runner): distinguish Pi blank transport from form support
  fix(runner): admit Pi MCP names and bound native questions
2026-09-29 12:13:58 -05:00
DottaandPaperclip bb00c85b69 fix(runner): admit Pi MCP names and bound native questions
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 12:00:42 -05:00
DottaandPaperclip 49ba2e61fb Integrate reviewed Cursor and Copilot event fixes
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit '2042ca14c42c0112304328b8f059847be4370f6c':
  Keep Copilot notices session-scoped and close early smoke resources
  Bound Cursor child summaries without splitting Unicode characters
2026-09-29 11:50:29 -05:00
DottaandPaperclip 2042ca14c4 Keep Copilot notices session-scoped and close early smoke resources
Copilot passthrough does not identify the originating turn. Retain bounded session evidence and source identity without typed turn projection or invented turn provenance. Acquire smoke resource cleanup before every fallible setup operation.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:49:53 -05:00
DottaandPaperclip 23614d28c8 merge: integrate reviewed Copilot and Cursor runtime repairs into Pi
Preserve Pi v6 and bounded startup pools, admit current Cursor and Copilot v4 identities, and combine additive Product flows and catalog assertions.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:33:28 -05:00
DottaandPaperclip 95dfde7c5c Merge current Cursor ACP runtime into Copilot v4
Preserve both profile-specific guards and complete terminal diagnostics; bind Copilot v4 to the regenerated ACPX patch.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:28:38 -05:00
DottaandPaperclip 62e642590f Bind Cursor instructions to native rules and gate every ACP connection
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:24:48 -05:00
DottaandPaperclip 2ff6a8efea fix(copilot): refresh instructions under provider lifetime ownership
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:17:22 -05:00
DottaandPaperclip 0f33a9080a fix(copilot): deliver native instructions with v4 session identity
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:12:26 -05:00
Dotta 6766b9128e Merge branch 'codex/runner-copilot-acp' into codex/runner-pi-acp
* codex/runner-copilot-acp:
  Admit the verified Copilot v3 identity in Rust
  Admit the verified Cursor v3 identity in Rust
  Admit current ACP profiles and verify cross-language pin agreement
  Follow current Copilot profile identity in native installation admission
  Preserve authoritative Copilot guard errors for pending ACP requests
  Preserve Copilot policy rejection codes across sidecar transport
  Bind Copilot v3 identity to native detached-work admission
  Deny native Copilot detached work before permission dispatch
  Prove Cursor SDK interactions and retain profile v3 build evidence
  Bind Daytona image identity to Cursor isolation patch
  Retain Copilot detached-command early completion regression
  Prove Copilot permission recovery after provider death without replay

# Conflicts:
#	packages/paperclip-runner/src/drivers/acpx/qualified-profiles.ts
2026-09-29 10:10:17 -05:00
DottaandPaperclip fa393bff17 Preserve authoritative Copilot guard errors for pending ACP requests
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:03:28 -05:00
DottaandPaperclip 860ac89c86 Bind Copilot v3 identity to native detached-work admission
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:58:50 -05:00
DottaandPaperclip f9cd8dd256 Deny native Copilot detached work before permission dispatch
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:58:05 -05:00
DottaandPaperclip fcb1421685 Retain Copilot detached-command early completion regression
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:51:04 -05:00
DottaandPaperclip f221ca1910 Prove Copilot permission recovery after provider death without replay
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:48:54 -05:00
DottaandPaperclip ff98929d3c Integrate Copilot v3 prerequisite
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit '7bfaf3da4':
  Version Copilot protocol policy as profile v3
  Version patched Cursor isolation as profile v3
  Clarify Cursor admission and patched runtime isolation boundaries
  Fence Copilot ACP connection policy before protocol dispatch
  Bind Cursor typed-error constructor outside the native turn scope
  Isolate pinned Cursor ACP configuration and preserve typed failures
2026-09-29 09:48:52 -05:00
DottaandPaperclip 7bfaf3da4d Version Copilot protocol policy as profile v3
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:48:23 -05:00
DottaandPaperclip 66c4073080 Integrate Cursor v3 prerequisite
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit '526081b9d':
  Version patched Cursor isolation as profile v3
  Clarify Cursor admission and patched runtime isolation boundaries
  Bind Cursor typed-error constructor outside the native turn scope
  Isolate pinned Cursor ACP configuration and preserve typed failures
2026-09-29 09:48:23 -05:00
DottaandPaperclip 526081b9d6 Version patched Cursor isolation as profile v3
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:46:57 -05:00
DottaandPaperclip be54e25078 feat(runner): bind Pi agent files and native questions
Normalize pinned Pi file paths before authorization and reject fallback symlink escapes. Add bounded native questions and registered agent-files policy for profile v6.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:45:30 -05:00
DottaandPaperclip d01c2439e0 Fence Copilot ACP connection policy before protocol dispatch
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:45:26 -05:00