Commit Graph
2384 Commits
Author SHA1 Message Date
DottaandPaperclip 4d2534e1bc Merge origin/master into master
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 17:05:11 -05:00
Dotta 5a0c1979cf [codex] Add runtime lifecycle recovery and live issue visibility (#4419) canary/v2026.424.0-canary.7 2026-04-24 15:50:32 -05:00
DottaandPaperclip 17b860bdfa Fix reassigned issue scheduled retries
Cancel stale scheduled retries when an issue is reassigned so the new assignee can queue immediately instead of waiting behind the old assignee's retry.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 15:23:27 -05:00
DottaandPaperclip 3df7db0b44 Cancel active runs when issues are cancelled
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 15:21:24 -05:00
DottaandPaperclip 9a8d219949 [codex] Stabilize tests and local maintenance assets (#4423)
## Thinking Path

> - Paperclip orchestrates AI agents for zero-human companies
> - A fast-moving control plane needs stable local tests and repeatable
local maintenance tools so contributors can safely split and review work
> - Several route suites needed stronger isolation, Codex manual model
selection needed a faster-mode option, and local browser cleanup missed
Playwright's headless shell binary
> - Storybook static output also needed to be preserved as a generated
review artifact from the working branch
> - This pull request groups the test/local-dev maintenance pieces so
they can be reviewed separately from product runtime changes
> - The benefit is more predictable contributor verification and cleaner
local maintenance without mixing these changes into feature PRs

## What Changed

- Added stable Vitest runner support and serialized route/authz test
isolation.
- Fixed workspace runtime authz route mocks and stabilized
Claude/company-import related assertions.
- Allowed Codex fast mode for manually selected models.
- Broadened the agent browser cleanup script to detect
`chrome-headless-shell` as well as Chrome for Testing.
- Preserved generated Storybook static output from the source branch.

## Verification

- `pnpm exec vitest run
src/__tests__/workspace-runtime-routes-authz.test.ts
src/__tests__/claude-local-execute.test.ts --config vitest.config.ts`
from `server/` passed: 2 files, 19 tests.
- `pnpm exec vitest run src/server/codex-args.test.ts --config
vitest.config.ts` from `packages/adapters/codex-local/` passed: 1 file,
3 tests.
- `bash -n scripts/kill-agent-browsers.sh &&
scripts/kill-agent-browsers.sh --dry` passed; dry-run detected
`chrome-headless-shell` processes without killing them.
- `test -f ui/storybook-static/index.html && test -f
ui/storybook-static/assets/forms-editors.stories-Dry7qwx2.js` passed.
- `git diff --check public-gh/master..pap-2228-test-local-maintenance --
. ':(exclude)ui/storybook-static'` passed.
- `pnpm exec vitest run
cli/src/__tests__/company-import-export-e2e.test.ts --config
cli/vitest.config.ts` did not complete in the isolated split worktree
because `paperclipai run` exited during build prep with `TS2688: Cannot
find type definition file for 'react'`; this appears to be caused by the
worktree dependency symlink setup, not the code under test.
- Confirmed this PR does not include `pnpm-lock.yaml`.

## Risks

- Medium risk: the stable Vitest runner changes how route/authz tests
are scheduled.
- Generated `ui/storybook-static` files are large and contain minified
third-party output; `git diff --check` reports whitespace inside those
generated assets, so reviewers may choose to drop or regenerate that
artifact before merge.
- No database migrations.

> 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

- OpenAI Codex coding agent based on GPT-5, with shell, git, Paperclip
API, and GitHub CLI tool use in the local Paperclip workspace.

## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge

Note: screenshot checklist item is not applicable to source UI behavior;
the included Storybook static output is generated artifact preservation
from the source branch.

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
canary/v2026.424.0-canary.6
2026-04-24 15:11:42 -05:00
DottaandPaperclip 25c9e92ca4 Glue icon to link text, add external-link indicator
PAP-2240: the GitHub icon on github.com markdown links could wrap onto
the previous line, separated from the first character of the URL. Pin
the icon and first character inside a white-space:nowrap span so they
never split across a line break. Also add an ExternalLink (lucide) icon
on the right of any target="_blank" link, glued to the last character
with the same no-wrap treatment so the "opens in new tab" cue stays
with the link text.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 14:52:10 -05:00
DottaandPaperclip 69fa65328a Remove border around inbox list card
The inbox list card's outer border was visually redundant — the list items
are already delimited by their internal dividers. Drop `border border-border`
from the list container so neither light nor dark mode shows the outline.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 14:37:44 -05:00
Dotta 80ae1b55f6 Merge remote-tracking branch 'origin/master'
* origin/master:
  Add sandbox environment support (#4415)
  [codex] Harden create-agent skill governance (#4422)
  [codex] Polish issue composer and long document display (#4420)

# Conflicts:
#	server/src/__tests__/agent-permissions-routes.test.ts
#	server/src/__tests__/issues-goal-context-routes.test.ts
#	server/src/routes/agents.ts
#	server/src/routes/issues.ts
#	ui/src/components/IssueChatThread.test.tsx
2026-04-24 14:29:55 -05:00
Dotta c6955a607c Normalize escaped newlines in server text inputs 2026-04-24 14:21:49 -05:00
Dotta 4de7648bd9 Remove superseded benchmark harness 2026-04-24 14:20:19 -05:00
DottaandPaperclip a279304c30 Remove generated Storybook static output
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 14:19:23 -05:00
Devin Foley 70679a3321 Add sandbox environment support (#4415)
## Thinking Path

> - Paperclip orchestrates AI agents for zero-human companies.
> - The environment/runtime layer decides where agent work executes and
how the control plane reaches those runtimes.
> - Today Paperclip can run locally and over SSH, but sandboxed
execution needs a first-class environment model instead of one-off
adapter behavior.
> - We also want sandbox providers to be pluggable so the core does not
hardcode every provider implementation.
> - This branch adds the Sandbox environment path, the provider
contract, and a deterministic fake provider plugin.
> - That required synchronized changes across shared contracts, plugin
SDK surfaces, server runtime orchestration, and the UI
environment/workspace flows.
> - The result is that sandbox execution becomes a core control-plane
capability while keeping provider implementations extensible and
testable.

## What Changed

- Added sandbox runtime support to the environment execution path,
including runtime URL discovery, sandbox execution targeting,
orchestration, and heartbeat integration.
- Added plugin-provider support for sandbox environments so providers
can be supplied via plugins instead of hardcoded server logic.
- Added the fake sandbox provider plugin with deterministic behavior
suitable for local and automated testing.
- Updated shared types, validators, plugin protocol definitions, and SDK
helpers to carry sandbox provider and workspace-runtime contracts across
package boundaries.
- Updated server routes and services so companies can create sandbox
environments, select them for work, and execute work through the sandbox
runtime path.
- Updated the UI environment and workspace surfaces to expose sandbox
environment configuration and selection.
- Added test coverage for sandbox runtime behavior, provider seams,
environment route guards, orchestration, and the fake provider plugin.

## Verification

- Ran locally before the final fixture-only scrub:
  - `pnpm -r typecheck`
  - `pnpm test:run`
  - `pnpm build`
- Ran locally after the final scrub amend:
  - `pnpm vitest run server/src/__tests__/runtime-api.test.ts`
- Reviewer spot checks:
  - create a sandbox environment backed by the fake provider plugin
  - run work through that environment
- confirm sandbox provider execution does not inherit host secrets
implicitly

## Risks

- This touches shared contracts, plugin SDK plumbing, server runtime
orchestration, and UI environment/workspace flows, so regressions would
likely show up as cross-layer mismatches rather than isolated type
errors.
- Runtime URL discovery and sandbox callback selection are sensitive to
host/bind configuration; if that logic is wrong, sandbox-backed
callbacks may fail even when execution succeeds.
- The fake provider plugin is intentionally deterministic and
test-oriented; future providers may expose capability gaps that this
branch does not yet cover.

## Model Used

- OpenAI Codex coding agent on a GPT-5-class backend in the
Paperclip/Codex harness. Exact backend model ID is not exposed
in-session. Tool-assisted workflow with shell execution, file editing,
git history inspection, and local test 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
canary/v2026.424.0-canary.5
2026-04-24 12:15:53 -07:00
DottaandPaperclip 641eb44949 [codex] Harden create-agent skill governance (#4422)
## Thinking Path

> - Paperclip orchestrates AI agents for zero-human companies
> - Hiring agents is a governance-sensitive workflow because it grants
roles, adapter config, skills, and execution capability
> - The create-agent skill needs explicit templates and review guidance
so hires are auditable and not over-permissioned
> - Skill sync also needs to recognize bundled Paperclip skills
consistently for Codex local agents
> - This pull request expands create-agent role templates, adds a
security-engineer template, and documents capability/secret-handling
review requirements
> - The benefit is safer, more repeatable agent creation with clearer
approval payloads and less permission sprawl

## What Changed

- Expanded `paperclip-create-agent` guidance for template selection,
adjacent-template drafting, and role-specific review bars.
- Added a Security Engineer agent template and collaboration/safety
sections for Coder, QA, and UX Designer templates.
- Hardened draft-review guidance around desired skills, external-system
access, secrets, and confidential advisory handling.
- Updated LLM agent-configuration guidance to point hiring workflows at
the create-agent skill.
- Added tests for bundled skill sync, create-agent skill injection, hire
approval payloads, and LLM route guidance.

## Verification

- `pnpm exec vitest run server/src/__tests__/agent-skills-routes.test.ts
server/src/__tests__/codex-local-skill-injection.test.ts
server/src/__tests__/codex-local-skill-sync.test.ts
server/src/__tests__/llms-routes.test.ts
server/src/__tests__/paperclip-skill-utils.test.ts --config
server/vitest.config.ts` passed: 5 files, 23 tests.
- `git diff --check public-gh/master..pap-2228-create-agent-governance
-- . ':(exclude)ui/storybook-static'` passed.
- Confirmed this PR does not include `pnpm-lock.yaml`.

## Risks

- Low-to-medium risk: this primarily changes skills/docs and tests, but
it affects future hiring guidance and approval expectations.
- Reviewers should check whether the new Security Engineer template is
too broad for default company installs.
- No database migrations.

> 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

- OpenAI Codex coding agent based on GPT-5, with shell, git, Paperclip
API, and GitHub CLI tool use in the local Paperclip workspace.

## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge

Note: screenshot checklist item is not applicable; this PR changes
skills, docs, and server tests.

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-24 14:15:28 -05:00
77a72e28c2 [codex] Polish issue composer and long document display (#4420)
## Thinking Path

> - Paperclip orchestrates AI agents for zero-human companies
> - Issue comments and documents are the main working surface where
operators and agents collaborate
> - File drops, markdown editing, and long issue descriptions need to
feel predictable because they sit directly in the task execution loop
> - The composer had edge cases around drag targets, attachment
feedback, image drops, and long markdown content crowding the page
> - This pull request polishes the issue composer, hardens markdown
editor regressions, and adds a fold curtain for long issue
descriptions/documents
> - The benefit is a calmer issue detail surface that handles uploads
and long work products without hiding state or breaking layout

## What Changed

- Scoped issue-composer drag/drop behavior so the composer owns file
drops without turning the whole thread into a competing drop target.
- Added clearer attachment upload feedback for non-image files and
image-drop stability coverage.
- Hardened markdown editor and markdown body handling around HTML-like
tag regressions.
- Added `FoldCurtain` and wired it into issue descriptions and issue
documents so long markdown previews can expand/collapse.
- Added Storybook coverage for the fold curtain state.

## Verification

- `pnpm exec vitest run ui/src/components/IssueChatThread.test.tsx
ui/src/components/MarkdownEditor.test.tsx
ui/src/components/MarkdownBody.test.tsx --config ui/vitest.config.ts`
passed: 3 files, 75 tests.
- `git diff --check public-gh/master..pap-2228-editor-composer-polish --
. ':(exclude)ui/storybook-static'` passed.
- Confirmed this PR does not include `pnpm-lock.yaml`.

## Risks

- Low-to-medium risk: this changes user-facing composer/drop behavior
and long markdown display.
- The fold curtain uses DOM measurement and `ResizeObserver`; reviewers
should check browser behavior for very long descriptions and documents.
- No database migrations.

> 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

- OpenAI Codex coding agent based on GPT-5, with shell, git, Paperclip
API, and GitHub CLI tool use in the local Paperclip workspace.

## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge

Note: screenshots were not newly captured during branch splitting; the
UI states are covered by component tests and a Storybook story.

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
canary/v2026.424.0-canary.4
2026-04-24 14:12:41 -05:00
Dotta aa69bd4082 Relax active run payload assertion 2026-04-24 14:01:22 -05:00
Dotta 3e5a1c83e3 Stabilize maintenance branch tests 2026-04-24 13:59:21 -05:00
Dotta 0c813dddd3 Stabilize dependency scheduling teardown 2026-04-24 13:59:21 -05:00
Dotta 7515fa673e Guard fold curtain resize observer 2026-04-24 13:59:21 -05:00
Dotta 8cc676cb84 Stabilize issue route tree control mocks 2026-04-24 13:59:21 -05:00
DottaandPaperclip 496a7ec858 Fix composer drop overlay test copy
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:43:04 -05:00
DottaandPaperclip 524de337b4 Broaden agent browser cleanup script
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:37:57 -05:00
DottaandPaperclip 4e445c155e Add fold curtain for long issue documents
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:37:54 -05:00
DottaandPaperclip a62b180587 Harden create-agent skill guidance
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:37:50 -05:00
DottaandPaperclip 195091afac Polish benchmark scaffold layout
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:37:45 -05:00
DottaandPaperclip ef740acbae Stabilize running task chain of thought
Keep live run chain-of-thought sections in the active Working state until the run itself completes, even during gaps between command executions. Add a regression test for a running run whose latest command already has a result.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:07 -05:00
Dotta e729c0b1fe Prevent mention wakes from taking issue execution lock 2026-04-24 13:32:07 -05:00
Dotta 98f6136a3e Show terminal blockers in blocked issue notice 2026-04-24 13:32:07 -05:00
Dotta 1439708ea0 Cancel blocked queued heartbeat retries 2026-04-24 13:32:07 -05:00
DottaandPaperclip d4c70cdd18 Fix stale covered-blocked run detection
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:07 -05:00
DottaandClaude Opus 4.7 3e4dd2a988 Pad composer bottom so long text doesn't touch buttons
Add pb-2 inside the floating reply editor's scrollable content so the
last line of a long message has breathing room before the action row.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 13:32:07 -05:00
DottaandPaperclip 4fb8e337e9 Add live run issue filter
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:07 -05:00
DottaandPaperclip 2e0111b11e Restore covered blocked cyan status ring
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:07 -05:00
Dotta 528468c5b3 Fix covered blocked status visual 2026-04-24 13:32:07 -05:00
DottaandPaperclip 6a518ca828 Page persisted run logs incrementally
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
Dotta f626996e63 Fix covered blocked status icons 2026-04-24 13:32:06 -05:00
DottaandPaperclip 0ee91c1651 Virtualize raw transcript rendering
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
Dotta 8f208110b0 Add covered blocked issue attention state 2026-04-24 13:32:06 -05:00
DottaandPaperclip 4788e563fd Harden pause-hold wake provenance
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
DottaandPaperclip 4ccbd7ec43 Add dashboard live runs page
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
DottaandPaperclip 97ea7e50f8 Revert raw transcript timestamp tooltips
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
DottaandPaperclip 1fa83cbdd3 Suppress recovery under pause holds
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
DottaandPaperclip fcaa681400 Implement explicit issue follow-up intent
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
DottaandPaperclip 855471b6a0 test: cover paused-tree recovery suppression
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
Dotta c19197581b Preserve Storybook static build output 2026-04-24 13:32:06 -05:00
Dotta 5d22432abe Lazily compute transcript timestamp tooltips 2026-04-24 13:32:06 -05:00
Dotta 4d2c361cca Add explicit issue follow-up intent 2026-04-24 13:32:06 -05:00
Dotta c5020b13fc Add Paperclip bench harness 2026-04-24 13:32:06 -05:00
DottaandPaperclip 6fd5fe6607 PAP-2147: explicit template selection in paperclip-create-agent
Phase 1 of the agent-creator skill upgrade plan.

- SKILL.md: step 4 is now an explicit "choose the instruction source"
  decision (exact template / adjacent template / generic fallback), and
  step 7 references the new pre-submit checklist.
- references/baseline-role-guide.md (new): section-by-section guide for
  drafting a no-template AGENTS.md.
- references/draft-review-checklist.md (new): pre-submit checklist
  covering identity, role clarity, workflow, lenses, output bar,
  collaboration routing, governance fields, least-privilege permissions,
  and done criteria.
- references/agent-instruction-templates.md: added the three-path
  decision flow and separate "apply exact / adjacent / fallback"
  procedures.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
DottaandPaperclip d72b693fd6 Add raw transcript timestamp tooltips
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
Dotta 89b94da25b Add markdown HTML security regressions 2026-04-24 13:32:06 -05:00