Commit Graph
4800 Commits
Author SHA1 Message Date
DottaandPaperclip 5d3e2ba5d0 docs: link calibrated native candidate campaign
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 00:07:53 -05:00
DottaandPaperclip 0e3650d87b docs: publish calibrated native launcher admission
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 00:05:23 -05:00
DottaandPaperclip 402ee94c52 docs: retain hosted calibration setup failures
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 23:51:07 -05:00
DottaandPaperclip bcf524fa90 Link immutable native qualification dispatch receipts
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 23:39:43 -05:00
DottaandPaperclip 67830d0f61 Publish immutable native recovery admission and bounded manifest
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 23:36:17 -05:00
DottaandPaperclip 27653eb1a8 Preserve all twelve provider-free hosted native setup failures
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 22:15:52 -05:00
DottaandPaperclip 7dbc3c4594 Record concurrent immutable native qualification dispatches
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 22:01:21 -05:00
DottaandPaperclip 93f6fc9356 Publish isolated native qualification manifest and exact admissions
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 21:58:16 -05:00
DottaandPaperclip 2d6fc5eb03 docs(evals): keep unclosed ACP delivery regression visible
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 21:02:22 -05:00
DottaandPaperclip 9d7c8a1b61 docs(evals): qualify retained browser failure evidence
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 20:11:13 -05:00
DottaandPaperclip 64986c5f25 docs(evals): preserve limited sidecar and strict action results
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 19:53:48 -05:00
DottaandPaperclip a6ca91266d docs: publish native hiring read-evidence carrier audit
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 19:30:54 -05:00
DottaandPaperclip 8eb517ca14 test(evals): retain bounded hiring lifecycle accounting
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 18:48:10 -05:00
DottaandPaperclip f051264765 docs(evals): publish complete original hiring pairs
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 18:38:09 -05:00
DottaandPaperclip c897bea111 docs: publish original paired Claude hiring failures and coverage limits
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 18:21:09 -05:00
DottaandPaperclip e3720f369d docs: publish pending matched hiring qualification evidence
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 18:02:20 -05:00
DottaandPaperclip 9f5404ad3a eval: freeze matched hiring admission with shared stock context
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:55:35 -05:00
DottaandPaperclip c471504099 test(evals): correct hiring template comparison evidence
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:37:52 -05:00
DottaandPaperclip 430db408d5 Combine hiring templates with the qualified stock instruction context
Unfrozen comparison preparation; no provider qualification claimed.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:37:52 -05:00
DottaandPaperclip f46492a453 Align native qualification docs with the integrated 29-cell catalog
Record the two classic document repair cells and preserve the distinction between original native grades and analytical regrading.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:31:40 -05:00
DottaandPaperclip 664c1899ef Fix blocker browser grading and retain the complete native comparison
Accept the requested marker plus concrete blocker explanation, calibrate contradictory and future-condition replies, and clarify future fixture punctuation. Preserve every original paid failure and label retained-DOM replay separately from live qualification.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:31:40 -05:00
DottaandPaperclip 44b06c53fd docs(evals): publish first native completion result and pending matrix
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:31:40 -05:00
DottaandPaperclip f592498fce test(evals): require a useful visible native blocker explanation
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:31:40 -05:00
DottaandPaperclip 12d9276baf test(evals): qualify native blocked reports with persisted outcomes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:31:40 -05:00
DottaandPaperclip 0afb70c59e Record native completion guidance verification
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:31:21 -05:00
DottaandPaperclip c0861720ba Clarify native Runner completion tool guidance
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:31:21 -05:00
DottaandPaperclip 2d6e27f47e Support unnumbered issues in the document link recipe
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:29:55 -05:00
DottaandPaperclip 5b05d9dcf9 test(evals): qualify production hiring templates
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:22:39 -05:00
DottaandPaperclip 826799311b fix(agents): keep hiring instructions focused on roles
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:22:39 -05:00
DottaandPaperclip 74d0d3d945 Derive document handoff links from the current issue and saved key
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:17:24 -05:00
DottaandPaperclip 51b63829d4 Retain matched OpenCode routing results and original handoff defects
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:13:15 -05:00
DottaandPaperclip d7bdfc422c fix(ui): show agent avatar and align chat header controls (#14726)
## Thinking Path

> - Paperclip helps people manage AI agents and their work.
> - Agent chat shows which agent receives each message.
> - The chat header used initials instead of the agent avatar.
> - The name and controls did not use the same center alignment.
> - This change uses the shared avatar and centers the header content.
> - Users can identify the agent and open its settings from the same
row.

## Linked Issues or Issue Description

**What happened?**
The agent chat header showed initials instead of the agent avatar. The
settings control did not align with the name and avatar.

**Expected behavior**
Show the agent avatar. Put the avatar, name, and settings control on the
same horizontal center line.

**Steps to reproduce**
1. Enable Agent Chat in Experimental settings.
2. Open a conversation with an agent that has an appearance set.
3. Check the avatar and settings control in the top bar.

Related navigation work: #14706.

## What Changed

- Use `AgentAvatar` in the conversation breadcrumb.
- Update the breadcrumb key when the agent appearance changes.
- Center breadcrumb labels that have an adjacent action. Keep task
identifier baseline alignment unchanged.
- Add regression checks for avatar props, appearance changes, and center
alignment.

## Verification

- PASS: affected Vitest suites, 129 tests.
- PASS: `pnpm check:token-gates`.
- PASS: `pnpm --filter @paperclipai/ui typecheck` on an isolated retry.
- PASS: `pnpm --filter @paperclipai/ui build`.
- PASS: browser checks at 1000 and 390 CSS pixels. Avatar, name, and
settings control all have center Y = 29.5 CSS pixels.
- Screenshots use the real header and avatar renderer with isolated
context fixtures. No screenshot or fixture is part of this diff.
- Full typecheck and build cannot complete because Cargo is not
installed.
- Full tests stopped with SIGKILL. The first UI typecheck also stopped
with exit 137. These runs do not prove full-suite success.

## Risks

- Low risk. The change only affects UI rendering. It changes no API or
database contract.
- Breadcrumbs with adjacent actions now use center alignment. Ordinary
task identifiers keep baseline alignment.

## Model Used

OpenAI Codex agent, with code editing, shell tools, and browser checks.
The runtime did not expose the exact model ID or context-window size.

## 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)
- [ ] 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

No behavior or command documentation needs an update for this rendering
fix. The execution environment requires the assigned branch name to stay
unchanged. Pending review gates are not marked complete.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-10-02 22:06:50 +00:00
Devin FoleyandPaperclip 5b8b2b38ca feat(apps): add Neon connection (#14980)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Agents reach external services through the Apps catalog. Each
catalog entry is a reviewed `AppDefinition` that wires a provider's
hosted MCP server into Paperclip's shared vault, grants, policies,
gateway, and audit trail.
> - Neon is a widely used serverless Postgres provider with an official
hosted MCP server, but it is not in the catalog. Teams that run their
databases on Neon must use the generic "connect your own MCP server"
path, which has no branding, no guidance, and no project or read-only
controls.
> - The connector playbook requires a catalog entry for a provider like
this: the hosted server supports dynamic client registration and bearer
API keys, and the common definition fields can express every option
Paperclip can serialize.
> - This pull request adds the Neon definition, its official artwork,
the research and permission-review ledger rows, documentation, and
deterministic tests, without any provider-specific runtime code.
> - The benefit is a one-click, governed Neon connection with optional
project pinning and read-only mode, and a documented path to live
qualification.

## Linked Issues or Issue Description

**Problem or motivation**

Neon is a common Postgres host for the applications agents work on, but
Paperclip's Apps catalog has no Neon entry. Operators who want agents to
inspect schemas, run SQL, or manage branches must paste the MCP URL into
the generic remote-MCP flow, which gives no branding, no provider
guidance, no project boundary, and no read-only switch.

**Proposed solution**

Add a catalog-only Neon connection built from the connector playbook:
browser sign-in through Neon's dynamic client registration with the
reviewed `read` and `write` scopes, or a customer API key sent as an
Authorization bearer header. Both methods expose Neon's documented
`projectId` pin and `readonly` switch as optional Advanced fields. Every
discovered tool stays governed by the normal per-action policies.

**Alternatives considered**

A plugin was not needed because no custom UI, tables, workers, or
webhooks are involved. A separate read-only method was not added because
the playbook treats read-only switches as advanced fields rather than
methods. Neon's repeatable `category` query filter was left out because
tenant fields serialize lists as one comma-joined value, so it cannot be
sent correctly without new runtime code; per-action policies cover
catalog narrowing instead.

**Roadmap alignment**

This extends the existing self-serve remote-MCP connection catalog and
does not overlap planned core work.

## What Changed

- Added the `neon` provider to `scripts/ingest-app-definitions.mjs`
(category, API-key placement, methods, tenant fields, guidance,
warnings) and regenerated
`packages/shared/src/app-definitions/neon.json` plus the generated
registry.
- Added the Neon row to the self-serve MCP research ledger with
`dcr_or_api_key` auth and risk tier S4.
- Added permission reviews for `neon/mcp-oauth` (explicit scopes `read`,
`write`, taken from Neon's live authorization-server metadata) and
`neon/mcp-api-key` (provider key), with evidence links.
- Added Neon's official tile icon (`ui/public/brands/apps/neon.png`,
copied byte-for-byte from the icon linked by neon.com) and the brand
manifest entry.
- Added prosumer gallery copy for the Neon card.
- Added `doc/connections/NEON.md` (service involvement, endpoints,
administrator setup, capabilities and policy, manifest, brand
provenance, validation hook) and linked it from the connections README
and the permission audit.
- Tests: Neon definition shape, store visibility and artwork, URL
recognition, reviewed scopes with scope-widening rejection, URL
projection of the project pin and read-only flag, invalid project ID
rejection, the connect form's API-key gating, and the pinned catalog
counts.

## Verification

- `pnpm exec vitest run packages/shared/src/app-definitions.test.ts
packages/shared/src/app-definitions-url.test.ts` — 34 passed.
- `pnpm exec vitest run
server/src/__tests__/tool-access-service.test.ts` — 367 passed.
- `pnpm exec vitest run ui/src/pages/apps/AppsConnect.test.tsx
ui/src/pages/apps/Browse.test.tsx ui/src/lib/app-brand-assets.test.ts
ui/src/pages/apps/AppLogo.brand-assets.test.tsx` — all passed.
- `node scripts/check-app-brand-assets.mjs` and `node --test
scripts/app-brand-validation.test.mjs` — passed.
- `pnpm --filter @paperclipai/shared typecheck`, `pnpm --filter
@paperclipai/server typecheck`, `pnpm --filter @paperclipai/ui
typecheck`, `pnpm check:token-gates` — clean.
- Manual: in a local instance, open Apps → Browse, confirm the Neon card
and icon, open `/apps/connect?source=neon`, confirm both methods, the
Advanced project pin and read-only toggle, and that Connect enables
after an API key is entered. The operator completed a live connection
against a Neon account on this build.
- Live metadata probed on 2026-10-02: both `.well-known` documents at
`mcp.neon.tech` return the recorded endpoints and scopes; an
unauthenticated `initialize` returns 401 with `resource_metadata`.

## Risks

- Low risk to existing providers: the change is additive catalog data
plus tests. The generated registry only gains one import.
- Neon's hosted server grants broad project and database management. The
definition carries two warnings, recommends a development project, and
keeps every write under the normal action policies; the read-only switch
is enforced by Neon's server, not locally.
- The permission-review ledger records live proof for both methods as
not run; the full lifecycle checklist in `doc/connections/NEON.md` still
needs a documented pass before the entry is considered fully qualified.

> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.

## Model Used

- Claude Fable 5.1 (`claude-fable-5-1`) in Claude Code, with extended
thinking and tool use (shell, file editing, browser verification).

## 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>
canary/v2026.1002.0-canary.18
2026-10-02 15:04:52 -07:00
DottaandPaperclip fe9dc1e3c5 Route legacy task work to the operational skill and show clickable delivery
Use stock discovery metadata and an actual Markdown document-link example. Clarify the future explicit UI-link fixture and retain the original task request and all measured failures.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:48:49 -05:00
DottaandPaperclip ed42cb2be3 Use one declared skill source list for both capability inventories
Include the issue-document reference in the normative inventory and calibrate coverage of every declared source without changing each inventory’s existing heading parsing scope.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:48:49 -05:00
DottaandPaperclip b85668c406 Fix skill capability metadata and publish the bounded repair comparison
Regenerate both capability inventories for the early issue-document recipe and reject stale derived manifests before stock-harness provider admission. Preserve the eight measured repair results, automatic recovery cost, and OpenCode delivery diagnosis.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:30:31 -05:00
DottaandPaperclip 19b22b907a Clarify legacy issue document delivery in the operational skill
Preserve the tiny hire manual and original assigned-skill case. Add a focused public document/revision/link oracle and explicit presence/absence provenance for a matched skill-only comparison.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:38 -05:00
DottaandPaperclip ee26b2caf5 docs(evals): keep timeout document outcomes unknown
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:38 -05:00
DottaandPaperclip 374e000601 docs(evals): close the unchanged-source baseline recovery
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:38 -05:00
DottaandPaperclip 9ab1714bee docs(evals): retain matched stock-harness results and failures
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:38 -05:00
DottaandPaperclip 70603a58c4 fix(evals): retain prerequisites inside the campaign artifact root
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:38 -05:00
DottaandPaperclip 4b8de1e7ac fix(evals): use complete Rust protocol test preparation
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:37 -05:00
DottaandPaperclip 0ce454e8a0 fix(evals): bind protocol evidence to the built daemon
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:37 -05:00
DottaandPaperclip 2dd8931eee fix(evals): build the cold daemon before protocol prerequisites
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:37 -05:00
DottaandPaperclip f65f1b9454 fix(evals): prepare cold prerequisites and fingerprint connection guidance
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:37 -05:00
DottaandPaperclip a2b9d62e52 test(evals): enforce exact-source stock harness prerequisites
Run credential-free gates before live admission and verify retained evidence in direct browser execution. Include evaluated instruction sources in suite revisions and calibrate stale/missing evidence rejection.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:37 -05:00
DottaandPaperclip 668d8d9591 test(evals): cover production default hires across stock harnesses
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:37 -05:00
DottaandPaperclip 48020514d7 fix(agents): reduce default manual and shared legacy guidance
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:29:37 -05:00
Devin FoleyandPaperclip d6d88b9de2 fix: preserve run outcomes when agent file cleanup is deferred (#14945)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - The heartbeat service records each agent turn and releases its
working files.
> - A turn can save its work and finish before instruction-copy cleanup
runs.
> - A cleanup exception can replace that completed result with an
adapter failure.
> - This also loses result accounting and can prevent environment lease
release.
> - This pull request records a cleanup warning and keeps the original
run outcome.
> - The existing recovery sweep retries cleanup from the durable
working-copy record.

## Linked Issues or Issue Description

Related cleanup and lock work: #14866 and #14869. Related, distinct
work: #14695 retains warm-process files; #12021 handles provider-process
SIGTERM after a terminal result.

**What happened?**

An agent saved its plan, posted a comment, and requested approval. The
provider completed its turn. Instruction-copy cleanup then timed out on
a directory lock. Its exception escaped a `finally` block and replaced
the provider result, so the completed turn showed `Run failed`.

**Expected behavior**

Keep the provider outcome, usage, cost, saved work, and pending
approval. Record a cleanup warning and let the existing recovery sweep
retry. A real provider failure must keep its original error. A failed
file save must keep its failed-save receipt.

**Steps to reproduce**

1. Complete a legacy adapter turn that saves work and requests approval.
2. Make instruction-copy release throw a directory-lock timeout.
3. Read the run result. Before this change, the cleanup error replaces
the provider outcome.

The new heartbeat tests reproduce the failure without a live provider or
external service.

**Paperclip version or commit**

The regression reproduces on `c83df091b1a5207375eaf23466bb5c62e4e1518e`.
This branch is rebased onto `cf8ad63c80`.

**Deployment mode**

Server-managed agent execution with persistent instruction working
copies.

## What Changed

- Catch instruction-copy release failures in both heartbeat teardown
paths. Stop repeating a failed cleanup attempt within the same run.
- Write a sanitized `instruction_cleanup` warning. A warning-write
failure also preserves the run result.
- Test successful, failed, and throwing providers; both teardown paths;
warning-write failure; accounting; approval state; and execution-control
release.
- Extend the held-lock test to prove a fresh recovery worker removes the
deferred copy and preserves its failed-save receipt.
- Document deferred cleanup and the run-log event.

## Verification

- Red proof: all five new heartbeat regression cases fail with the
original release calls.
- At head `20bea4f431c916d2f5db1970213aab85f5daa34c`, all 417 tests
passed across heartbeat process recovery, agent directory working
copies, and directory merge locks.
- Full local `pnpm -r typecheck`, `pnpm build`, and `git diff --check`
passed.
- [GitHub
CI](https://github.com/paperclipai/paperclip/actions/runs/37031119795)
passed at this head. All 53 reported checks passed; the two Storybook
checks were correctly skipped. This includes general and serialized
tests, browser shards, runner verification, build, typecheck, and the
canary dry run.
- Greptile reviewed this head with 5/5, no code comments, and no
unresolved review threads. The branch has no merge conflicts.
- The local `pnpm test:run` attempt was stopped after it reported eight
failures in unchanged suites. Four Slack/AgentMail cases selected an
unrelated ancestor skills directory and failed with `ENOENT`; the two
Slack cases passed with a temporary local skill-root link, which was
then removed. Three company-skill cases reproduced macOS `EACCES` errors
when renaming read-only cache directories. One gateway case passed when
rerun alone. No full local-suite pass is claimed; the complete CI test
jobs passed.

## Risks

- Cleanup errors now leave recovery work pending. The durable
working-copy record remains available for the existing retry sweep.
- This change preserves provider failures and failed-save receipts. It
does not claim that unsaved file edits were saved.
- Native instruction reservation errors retain their existing behavior
because they guard process ownership.
- No schema, lockfile, workflow, API, or UI changes.

## Model Used

OpenAI Codex, based on GPT-6, with reasoning, repository tools, and code
execution. The exact backend model ID and context-window size are not
exposed by 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>
canary/v2026.1002.0-canary.17
2026-10-02 14:16:18 -07:00
abderrahmen bejaouiandabderbj d9b64ee28e fix(codex-local): order Codex models the way the ChatGPT app does (stacked on #14917) (#14918)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Each agent runs on an adapter, and the operator picks the agent's
model from the list the adapter advertises.
> - The `codex_local` adapter advertises a static, curated list. The
server returns that list as written, but the list itself is not in a
useful order: the default `gpt-5.6-sol` sits above the whole GPT-6
family (#14878).
> - This pull request orders the list the way the ChatGPT app orders
Codex models: newest model version first, then by decreasing capability
inside each version, with older models at the end.
> - It is stacked on #14917, which makes the model dropdown show a
hand-ordered list as the adapter advertises it. Without that change the
picker shows every list alphabetically.
> - The benefit is that a user who knows Codex finds the right model at
once, and older models sit at the end of the list.

## Linked Issues or Issue Description

Fixes #14878.

Related: #14917 (the Claude counterpart, #14877) carries the dropdown
change this PR relies on. This PR contains that commit until #14917
lands; after that it rebases to the Codex commit alone.

## What Changed

- `packages/adapters/codex-local/src/index.ts`: reorder the advertised
`models` list. GPT-6 (`astra`, `sol`, `luna`) first, then GPT-5.6
(`sol`, `terra`, `luna`), then `gpt-5.5`, `gpt-5.4`, `gpt-5.4-mini`,
`gpt-5`, `gpt-5-mini`, `gpt-5-nano`, then the o-series and
`codex-mini-latest` in their existing relative order.
`DEFAULT_CODEX_LOCAL_MODEL` is unchanged.
- `packages/adapters/codex-local/src/index.test.ts`: the metadata test
now asserts the full order of the GPT entries.

The ChatGPT app also lists GPT-6.1 Sol first. That model is not in
Paperclip's list today. Adding a model needs reasoning-effort and
fast-mode entries as well, so it is out of scope for an ordering fix.

## Verification

Run from the repository root:

```sh
pnpm exec vitest run packages/adapters/codex-local server/src/__tests__/adapter-models.test.ts
pnpm --filter @paperclipai/adapter-codex-local typecheck
```

Red on `master`, green here: the updated metadata test fails against the
unmodified list because `gpt-5.6-sol` comes first.

Manual check: open an agent that uses `codex_local` and open the model
dropdown. The list reads gpt-6-astra, gpt-6-sol, gpt-6-luna,
gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4,
gpt-5.4-mini, gpt-5, gpt-5-mini, gpt-5-nano, o3, o4-mini, o3-mini, Codex
Mini.

## Risks

- Low risk. The list content and the default model do not change; only
the order does. The server returns this list as-is for the built-in
Codex adapter and the server test compares against the exported list, so
no server change is needed.
- The first entry is no longer the default model. Nothing reads the
first entry as a default: `DEFAULT_CODEX_LOCAL_MODEL` is resolved
separately.

## Model Used

Anthropic Claude Fable 5.1 (`claude-fable-5-1`) through Claude Code,
extended thinking on, with tool use for reading the repository, running
vitest and tsc, and editing files. The account holder reviewed the
change and owns the commit.

## 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

---------

Co-authored-by: abderbj <115119179+abderbj@users.noreply.github.com>
canary/v2026.1002.0-canary.16
2026-10-02 13:32:18 -07:00