Commit Graph
2377 Commits
Author SHA1 Message Date
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
Dotta 269bae3688 Prevent stale heartbeat start locks 2026-04-24 13:32:06 -05:00
DottaandPaperclip 4bcd27bc18 Wake assigned issues reopened from done
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
Dotta cd2c922af2 Stabilize image drops in issue composer 2026-04-24 13:32:06 -05:00
DottaandPaperclip 43ce73ecb7 Allow subtree cancel without reason
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00
Dotta 6f34728caa Broaden rich editor HTML tag regression 2026-04-24 13:32:06 -05:00
Dotta 6c7c18a7c5 Keep issue composer as sole drop target 2026-04-24 13:32:06 -05:00
DottaandPaperclip 356dac58f5 Fix subtree cancel status application
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 13:32:06 -05:00