Commit Graph
4846 Commits
Author SHA1 Message Date
DottaandPaperclip bb56af7fbd Keep the legacy question fixture payload type-safe
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 12:28:36 -05:00
DottaandPaperclip f308b14dae fix(ui): isolate pending question drafts by request identity
Remount question state before persistence when request identity changes, retaining same-request edits. Preserve exact canonical text at the compact-card API boundary while keeping legacy and custom-answer trimming.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 12:17:25 -05:00
DottaandPaperclip c5a4714add feat(runner): preserve editable question defaults through explicit response
Carry bounded text-only initialText through ACP normalization, Rust durable validation, shared contracts and the question UI. Saved edits and explicit clears survive reload. Preserve canonical submitted text while retaining legacy custom-answer normalization and existing validation.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 12:07:19 -05:00
DottaandPaperclip 8e8cdd7aaa fix(ui): allow clearing preloaded markdown on the first edit
Preserve the programmatic empty mount reset guard while recognizing input and Lexical deletion intent before change callbacks.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 12:07:19 -05:00
DottaandPaperclip 36f7a89b37 Check exact candidate eval profile before provider startup
Compare expected profile fields with the built Runner before materializing context or constructing a live service. Require the flag for candidate runs; old CLIs reject it without starting a provider.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:59:19 -05:00
DottaandPaperclip 61f33cb1ef Bound Daytona provider build worker memory
Limit pnpm tarball and lifecycle concurrency in the build stage. Keep dependency pins and runtime environment unchanged.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:59:19 -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 df3c87735a Merge branch 'codex/runner-cursor-acp' into codex/runner-copilot-acp
* codex/runner-cursor-acp:
  Bound Cursor child summaries without splitting Unicode characters

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:49:53 -05:00
DottaandPaperclip 76d943e625 Bound Cursor child summaries without splitting Unicode characters
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:44:35 -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
DottaandPaperclip 1d02ab77b2 fix(runner): refresh trusted system instructions before ACPX restore
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:09:17 -05:00
DottaandPaperclip aaf67099e9 fix(runner): refresh runtime context when restoring ACPX sessions
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:09:17 -05:00
DottaandPaperclip 751f59f26c test(copilot): record native system instruction delivery evidence
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 11:07:17 -05:00
DottaandPaperclip a93e8c03f6 fix(runner): refresh trusted system instructions before ACPX restore
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:43:30 -05:00
DottaandPaperclip e7572c693a perf(runner): bound native snapshot copy concurrency at 32
Preserve the 32 MiB batch budget and standalone oversized files, checked descriptors, canonical ordering, and fully drained failure cleanup.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:37:43 -05:00
DottaandPaperclip 3a08122558 Merge current master into Cursor ACP provider branch
Preserve upstream ACPX terminal diagnostics and rich extension delivery hooks.

Co-Authored-By: Paperclip <hello@paperclip.ing>
2026-09-29 10:36:20 -05:00
DottaandPaperclip 5630481a38 test(copilot): preserve final question failure and offline recovery proof
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:34:51 -05:00
DottaandPaperclip e08bb92aa2 fix(runner): refresh runtime context when restoring ACPX sessions
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:34:15 -05:00
DottaandPaperclip 83076d7e7c feat: return completed handoffs to Agent Chat (#14408)
Return completed Agent Chat handoffs through a durable outbox and scope each generated update to its supplied tasks. Add recovery, browser delivery, result access, and calibrated quality coverage.

Validated with two consecutive ten-case Claude/Codex campaigns, all CI checks, and a 5/5 review.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:25:52 -05:00
DottaandPaperclip 3b4b270650 fix(adapters): preserve ACP terminal failure diagnostics (#14573)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - The shared ACP adapter engine records agent failures for operators.
> - ACP providers can report a failure category, title, and detailed
cause.
> - Our patch kept only the category in the saved error, so an operator
could not diagnose a failure when tracing was off.
> - This pull request preserves redacted provider diagnostics in the run
error, transcript, and structured run result.
> - Operators can now inspect the provider message and any supplied
request ID or stack trace after the run ends.

## Linked Issues or Issue Description

Refs #13889 (the diagnostic gap; this PR does not update the bundled
Claude version).
Refs #14484 (related model-refusal classification; this PR retains
diagnostics for all terminal failure categories).

**What happened?**
An ACP turn failed with only `ACP agent reported a terminal service
failure.` The provider's title and details were available in memory but
absent from the saved error and transcript.

**Expected behavior**
The run retains useful provider diagnostics even when raw tracing is
disabled. Credentials remain redacted. A size limit must report
truncation instead of silently removing the cause.

**Steps to reproduce**
1. Run an ACP agent that returns an error-severity typed session
failure.
2. Include an HTTP error, request ID, and stack text in its title and
details.
3. Inspect the failed run with tracing disabled. Before this change,
only the category survives.

## What Changed

- Both pinned ACPX patches pass complete error text to the in-memory
callback, so redaction happens before truncation.
- The shared engine retains the sanitized category, title, and details
in `resultJson.terminalSessionFailure` and includes the text in the run
error and error transcript.
- Diagnostics redact configured environment values even under arbitrary
names, unknown launch-environment values, connection URL passwords, run
credentials, and common credential syntax. Known boolean settings remain
readable, while credential values are redacted even when embedded in
other text. Diagnostics remove control characters and invalid Unicode.
- Title and detail limits keep escaped transcript JSON below the
server's chunk limit. Truncated fields include an omission count. The
safe run-result projection preserves a byte-bounded diagnostic preview
when the result exceeds its byte budget, with an explicit pointer to the
full adapter-bounded run error and transcript.
- The existing UI and CLI display the error. Diagnostics do not become
assistant output. Issue continuation summaries and session-compaction
prompts receive only the generic category, preventing provider text from
becoming handoff instructions. Existing quota classification, warnings,
timeout precedence, and control-channel failure precedence remain in
place.
- Regression tests cover real ACP child processes with both pinned
versions in one-shot and persistent modes, credential redaction, request
IDs after the old 4 KiB cutoff, transcript parsing, storage bounds, and
database retrieval of oversized multibyte diagnostics.

## Verification

- Full CI on `20ad4f5f1f66c46d2c260e6ad0339cbea607b4cf`: **54 passed, 2
intentionally skipped, no pending or failing checks**. Includes
typechecking, build, all Vitest shards, Runner checks, browser E2E, and
the canary packaging/public-install dry run.
- Greptile: **5/5** on this commit. Superagent security scan passes. All
review threads are resolved.
- Local verification passed: shared ACP engine suite (395 tests); real
Claude ACP child-process and diagnostic regressions across both pinned
runtimes and both execution modes; run retrieval and model-handoff
regressions (59 tests); ACPX patch packaging (16 tests); full typecheck
and build. Affected package typechecks and focused tests were rerun
after review fixes.
- The broad local `pnpm test:run` was stopped after review edits made
its cached imports stale. Fresh targeted runs pass, including both
affected server suites. Cold-build import failures were also rerun after
dependency builds: chat integration (1,063 tests) and tool access (351
tests) pass. The final commit's complete CI matrix is green.

## Risks

- Provider diagnostic text is untrusted. This change retains more of it
in company-scoped run records. Redaction and size bounds apply before
persistence.
- Diagnostics are limited to fields the provider supplies. Old runs
cannot recover discarded error text.
- No schema migration, recovery-policy change, or new Telemetry or
OpenTelemetry export.

## Model Used

- OpenAI GPT-6 through Codex, with reasoning, repository inspection,
code editing, and test execution. The exact serving model ID and
context-window size are not exposed in 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-29 10:18:30 -05:00
DottaandPaperclip 3d0c45920c Admit the verified Copilot v3 identity in Rust
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:09:15 -05:00
DottaandPaperclip 70d9fc4bee Admit the verified Cursor v3 identity in Rust
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:08:55 -05:00
Dotta 550801f956 Merge branch 'codex/runner-cursor-acp' into codex/runner-copilot-acp
* codex/runner-cursor-acp:
  Admit the verified Cursor v3 identity in Rust
  Admit current ACP profiles and verify cross-language pin agreement
  Prove Cursor SDK interactions and retain profile v3 build evidence
2026-09-29 10:08:55 -05:00
DottaandPaperclip ff37a38ed3 Admit current ACP profiles and verify cross-language pin agreement
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:08:37 -05:00
DottaandPaperclip 59bba28192 Follow current Copilot profile identity in native installation admission
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:04:53 -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 7668cd822d Preserve Copilot policy rejection codes across sidecar transport
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 10:00:20 -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
Dotta 304472946d Merge commit 'abad2bd0d' into codex/runner-copilot-acp
* commit 'abad2bd0d':
  Bind Daytona image identity to Cursor isolation patch
2026-09-29 09:58:05 -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 1f8316294e Prove Cursor SDK interactions and retain profile v3 build evidence
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:54:38 -05:00
DottaandPaperclip abad2bd0da Bind Daytona image identity to Cursor isolation patch
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:53:20 -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 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 c368b73dd6 Clarify Cursor admission and patched runtime isolation boundaries
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:46:12 -05:00
Dotta a8a503ee13 Merge commit '46b759888' into codex/runner-copilot-acp
* commit '46b759888':
  Bind ACP persistent agent files to registered runtime context
2026-09-29 09:45:41 -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
Dotta 703ad69de5 Merge branch 'codex/runner-acp-production' into codex/runner-cursor-acp
* codex/runner-acp-production:
  Bind ACP persistent agent files to registered runtime context
2026-09-29 09:45:05 -05:00
DottaandPaperclip 4eec13c06b Bind Cursor typed-error constructor outside the native turn scope
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:44:37 -05:00
DottaandPaperclip 46b7598889 Bind ACP persistent agent files to registered runtime context
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:44:36 -05:00
DottaandPaperclip f49907f42c Isolate pinned Cursor ACP configuration and preserve typed failures
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-29 09:42:28 -05:00
da887ea3e9 fix(runner): honor Codex effort selected in composer (#14568)
## Thinking Path

> - Paperclip manages AI agents that work on assigned tasks.
> - The task composer lets a person choose an assignee, model, and
effort for the next run.
> - A Paperclip Runner agent can use Codex as its provider.
> - The composer hid Codex effort for that agent because it checked only
the older Codex adapter.
> - The native Runner input also did not carry an effort choice to
Codex.
> - This pull request carries the chosen effort from the composer to
each Codex turn.
> - People can now select a supported effort and get the effort they
selected.

## Linked Issues or Issue Description

Refs #14322

**What happened?**

The composer showed a model but no effort slider when the assignee used
Paperclip Runner with the Codex provider. A task-level model override
also did not reach the native Runner input.

**Expected behavior**

The composer shows effort choices for a known Codex model. The next
native Codex turn uses the selected model and effort.

**Steps to reproduce**

1. Open a task composer.
2. Select an agent that uses Paperclip Runner with the Codex provider.
3. Select a known Codex model such as `gpt-6-astra`.
4. Open the assignee and model picker. The effort slider is missing
before this change.

## What Changed

- Show known Codex effort levels for Paperclip Runner Codex assignees.
- Save the task effort override in the native run input and send it to
Codex on each turn.
- Apply the task's merged model and effort overrides when the native run
starts.
- Apply a task model override for OpenCode Runner without changing the
agent's provider.
- Add Runner effort tests and desktop and mobile Storybook cases.

## Verification

- `pnpm -r typecheck` passed.
- `pnpm build` passed.
- `pnpm build-storybook` passed.
- `pnpm check:token-gates` passed.
- Focused UI, server, Runner contract, and Codex driver tests passed.
- The full CI test matrix, build, typecheck, and canary dry run passed
on the latest head.

## Risks

- Native Runner inputs add an optional Codex effort field to the current
v5 input. Older inputs keep their previous behavior.
- A known model rejects an effort that its catalog does not support.
Unknown models do not show a slider.

> This fixes an existing composer bug. I checked `ROADMAP.md`; it does
not describe this bug as planned work.

## Model Used

OpenAI Codex, GPT-6. The exact deployment ID and context window are not
exposed in this session. The model used reasoning, code execution, and
repository tools.

## 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>
Co-authored-by: OpenAI GPT-6 Astra <noreply@openai.com>
2026-09-29 09:41:05 -05:00
DottaandPaperclip 3f4f8b37ba fix: grade Codex clarification and refusal outcomes from evidence (#14570)
Grade clarification lists, obsolete unstarted wakes, and refusal cancellation from persisted evidence. Preserve execution and ownership assertions, add boundary regressions, and version the affected eval definitions.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
canary/v2026.929.0-canary.3
2026-09-29 09:40:55 -05:00
DottaandPaperclip 7636966452 fix(inbox): keep other users’ failed runs out of Mine (#14572)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - The Mine inbox shows work that needs the current user.
> - Failed-run rows used the latest run for every agent in the company.
> - A failure from another user therefore appeared in Mine and its
badge.
> - Run list responses also omitted the responsible user needed to
filter these rows.
> - This pull request uses run ownership for personal failure routing.
> - Users see their own failures and can still inspect company failures
in All.

## Linked Issues or Issue Description

**What happened?**

An agent run started for one user failed. Its row and failure badge
appeared in another user's Mine inbox.

**Expected behavior**

Mine and its badge include failed runs for the current responsible user.
Other users' failures remain available in All and run details.

**Steps to reproduce**

1. Use a company with two human users.
2. Create a failed or timed-out run attributed to the first user.
3. Open Mine as the second user. Before this fix, the failed run appears
there and increases the badge.

**Paperclip version or commit**

Reproduced in regression tests on master at `24beb0057`.

**Deployment mode**

Authenticated deployment with multiple users. Tests also cover the local
single-user board.

Related prior work: #933 addressed inbox dismissal and badge
consistency. No duplicate ownership fix was found.

## What Changed

- Return `responsibleUserId` in normal and summary run lists.
- Share one ownership rule across both inbox versions and client/server
badges.
- Select the latest run per agent before applying the ownership filter.
This prevents old failures from resurfacing on shared agents.
- Keep unattributed historical failures in the local board's Mine view.
Hide them from authenticated users with no matching owner.
- Keep company health alerts outside the personal badge, consistent with
the client.
- Document the routing contract and add page, badge, and database
regression coverage.

## Verification

- Red: the new badge cases failed with three company failures instead of
one personal failure; eight Mine page cases failed across both inbox
versions.
- Green: 113 focused tests pass in `ui/src/lib/inbox.test.ts`,
`ui/src/pages/Inbox.test.tsx`,
`server/src/__tests__/heartbeat-list.test.ts`, and
`server/src/__tests__/inbox-dismissals.test.ts`.
- `pnpm check:token-gates` passes.
- Agent calls on behalf of a user have two additional red-to-green API
regressions.
- Full `pnpm -r typecheck` and `pnpm build` pass. Server typecheck also
passes after the agent-call fix.
- All CI test shards and browser tests pass on `243bfa681`. The
duplicate local `pnpm test:run` was stopped after the CI test lanes
completed; it did not finish locally.

## Risks

- Authenticated users no longer receive unattributed legacy failures in
Mine. Those failures remain visible in All.
- The server badge no longer counts company health alerts, matching the
existing client badge.
- No migration, run state, retry behavior, or company access rules
change.

## Model Used

- OpenAI GPT-6 through Codex, with reasoning, terminal execution, and
browser tools. The exact deployment variant and context window size are
not exposed in 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-29 09:40:21 -05:00