Commit Graph
3314 Commits
Author SHA1 Message Date
DottaandPaperclip 02f9cac163 fix(cli): recover installs and confirm git updates
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:52:52 +00:00
DottaandPaperclip cff904bfd2 fix(cli): reject systemd directive injection
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:36:22 +00:00
88408b2884 fix(install): build git checkouts hermetically against NODE_ENV=production
installGitPayload's in-checkout pnpm install inherited ambient
NODE_ENV=production, so pnpm omitted devDependencies (esbuild) and
build-npm.sh failed with ERR_MODULE_NOT_FOUND. Strip NODE_ENV from the
env of every build/pack command run inside the checkout so source
installs succeed on hosts that export NODE_ENV=production globally
(PAP-15205).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:36 +00:00
8c0ee1fc8c fix(installer): align install.sh help with git-ref gate
install.sh advertised --ref/--repo in usage() while unconditionally
rejecting them. Remove them from the help text, use a supported env
example, and point the rejection error at the CLI's working
'paperclipai install --ref' path. (PAP-15204)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:36 +00:00
DottaandPaperclip ce9db23bf3 fix(cli): stage git install workspace closure
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 42c561cbdb fix(release): install only bundled staging dependencies
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 60e3ef657b fix(release): stage bundled packages without registry workspace fetches
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip a7e5e28229 fix(install): scope postgres patch and surface rollback failures
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 14df3c37e9 fix(db): preserve child process spawn overloads
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip bcec510631 fix(cli): harden activation and service writes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 6feacab361 test(installer): pass explicit noninteractive consent
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 871dbe0302 fix(cli): secure git installs and restart locks
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 0f5a674ea0 fix(server): clear stale workspace finalize blockers
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip ae7ca9b456 chore: exclude generated lockfile from install change
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip c9559a5d90 fix(service): make managed installs start reliably
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 8925d3f38a fix(cli): escape launchd service names
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 8a7d9c1040 fix(cli): serialize same-instance restarts
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 38dadbf5ba fix(installer): require explicit noninteractive consent
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip fda763e27a docs(cli): align update options with implementation
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 388978397e fix(cli): harden managed lifecycle coordination
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 7fd6e8d829 fix(doctor): ignore empty managed install stores
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip ade8761ae3 fix(cli): ignore update cache in managed install doctor
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 5b61cf1f63 test(installer): make fixture logging atomic
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip c7d8e0fe59 test(cli): cover final installer hardening
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip b9df8bf4f5 fix(installer): pin npm registry trust boundary
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 94b68d2437 fix(cli): allow cached managed reinstalls
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip dc06b610b9 feat(cli): add managed GitHub ref installs
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip a491790319 chore: retrigger PR policy checks
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 66d9c9860a fix(cli): avoid guessed restart versions
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip eeaec78627 feat(cli): add managed update and rollback
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip e64d383b6f fix(cli): preserve installs when service state is unknown
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 06e8d2f387 fix(installer): harden dry runs and unit escaping
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 7a22677471 fix(cli): fail closed on install locks
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip c15a35fb8f fix(cli): serialize managed uninstall
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 6eda77574e fix(cli): harden managed install store
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 0a4651232c fix(installer): verify third-party bootstrap scripts
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 9f0aa2ac75 fix(cli): make bootstrap options explicit
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 49503ddba4 fix(cli): harden service lifecycle edge cases
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 247ed753b2 fix(cli): align installer flags and restart health
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip d38ac01af5 chore: retrigger PR policy checks
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip a45ba82d94 chore(cli): clean installer smoke script whitespace
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip c858e7364c fix(cli): harden managed install filesystem writes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 8354cecede fix(cli): harden install integration checks
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:13 +00:00
DottaandPaperclip 1c5b6c1caf feat(cli): integrate managed install workflows
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:12 +00:00
DottaandPaperclip 3bfeba5835 feat(cli): add managed npm install store
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:12 +00:00
DottaandPaperclip 3c1666e318 docs: document installer raw fallback
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:12 +00:00
DottaandPaperclip b4b596503d feat(cli): add managed service lifecycle
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:12 +00:00
DottaandPaperclip 189da8bb95 feat(cli): add curl bootstrap installer
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-27 15:32:12 +00:00
DottaandPaperclip aed4478c81 fix(pr-gardening): scope runs to instance-authored PRs (#10323)
## Thinking Path

> - Paperclip is the open source control plane people use to manage
AI-agent companies
> - Maintainers use the pr-gardening skill to keep referenced pull
requests reviewable and moving toward merge
> - The skill previously treated every recently referenced repository PR
as owned work, including community PRs and stale references
> - That oversized scope caused noisy reports, capped-search failures,
and follow-up actions aimed at PRs this Paperclip instance should not
manage
> - The workflow also stopped at reminders instead of dispatching the
repository's standard PR-preparation process
> - This pull request scopes gardening to the authenticated instance
identity by default and makes exclusions explicit and inspectable
> - The benefit is a smaller, ownership-correct queue that automatically
routes actionable PRs through the established preparation workflow

## Linked Issues or Issue Description

No public issue exists for this maintenance fix, so the bug report is
included inline.

### Pre-submission checklist

- [x] I searched existing open and closed issues and found no duplicate.
- [x] The behavior reproduces on the current `master` branch.
- [x] The behavior originates in Paperclip's repository skill, not an
adapter, provider, or local configuration.

### What happened?

The `pr-gardening` skill included community-authored and stale pull
requests in its actionable candidate set, aborted when issue-to-PR
extraction hit its cap, and only notified assignees rather than
dispatching the standard PR-preparation workflow.

### Expected behavior

By default, gardening should act only on PRs authored by the current
GitHub identity, report excluded community and stale PRs explicitly,
tolerate capped match sets, and dispatch actionable PRs through
`/prepare-paperclip-pr`. Operators should retain explicit overrides for
broader author scopes.

### Steps to reproduce

1. Run Stage A against issue history containing recently referenced PRs
from both the authenticated operator and community contributors.
2. Include an issue whose PR-reference extraction reaches the configured
match cap and an open PR with no activity inside the configured window.
3. Observe that the prior workflow admits non-owned and stale PRs,
aborts on the capped extract, and leaves Stage C at assignee reminders.

### Paperclip version or commit

Reproduced on upstream `master` at
`2568bdecc4577c60d76d58a45c5eaf3dc58f7e13`.

### Deployment mode

Local repository skill execution.

### Installation method

Built from source.

### Agent adapter(s) involved

Not adapter-specific; this is a repository maintenance skill.

### Database mode

Not database-related.

### Access context

Agent execution using the repository's authenticated GitHub CLI
identity.

### Node.js version

Current repository development environment.

### Operating system

Linux.

### Relevant logs or output

Live verification before the fix showed 264 community PRs entering
discovery scope. The corrected discovery retained 54 candidates, all
authored by `cryppadotta`.

### Relevant config

Default author resolution via `gh api user --jq .login`; no secret or
user-specific configuration is included.

### Additional context

The fix retains `--authors` and `--include-community` overrides for
intentionally broader maintenance runs.

### Privacy checklist

- [x] I reviewed all included output and configuration details for
secrets and PII.

## What Changed

- Resolve the default author allowlist from the authenticated `gh`
login, with `--authors` and `--include-community` overrides.
- Default the activity window to 14 days and record community-authored
and stale PRs in explicit dropped lists.
- Preserve capped issue-extract match sets with warnings instead of
aborting discovery.
- Add PR author and a one-line purpose summary to readiness data and
rendered reports.
- Rewrite Stage C to dispatch `/prepare-paperclip-pr` for PRs that need
gardening.
- Expand the focused Node test suite to cover the new scoping,
stale-drop, cap, summary, reporting, and guardrail behavior.

## Verification

- `node --test
.agents/skills/pr-gardening/scripts/pr-gardening.test.mjs` — 15/15
passing, including contributor-controlled Markdown escaping.
- `git diff --check origin/master...HEAD` — clean.
- Live discovery verification excluded 264 community PRs and retained 54
candidates, all authored by `cryppadotta`.

## Risks

- Low-to-moderate behavioral risk: default candidate scope is
intentionally narrower; operators who want community PRs must opt in
with `--include-community` or provide `--authors`.
- The authenticated `gh` login must be available unless an explicit
author override is supplied.
- No database, API, UI, migration, workflow, or dependency-lock changes.

> 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 using GPT-5.4 with reasoning, repository tool use, shell
execution, GitHub CLI access, and focused test execution. The original
implementation commit also records Claude Fable 5 assistance.

## 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.727.0-canary.0
2026-07-27 09:24:11 -05:00
DottaandPaperclip 2568bdecc4 fix(adapter-utils): keep sandbox proxy sockets within Linux path limit (#10221)
## Thinking Path

> - Paperclip is the open source control plane people use to manage AI
agents for work
> - Local process adapters can enforce network allowlists through a
Unix-socket proxy inside the Linux sandbox
> - The proxy socket was created under `os.tmpdir()`, which can be a
deeply nested run-specific directory
> - Linux Unix-domain socket paths are limited to 107 usable bytes, so
deep temporary paths can be silently truncated during bind
> - A truncated proxy socket resets every confined outbound connection,
including the model provider API, before the agent can do work
> - This pull request creates proxy sockets under the short `/tmp` path
when possible and validates the path length before bind
> - The benefit is reliable sandboxed egress under deep `TMPDIR` values
and an explicit error instead of an opaque connection-reset storm

## Linked Issues or Issue Description

### Pre-submission checklist

- [x] I searched existing open and closed issues and this is not a
duplicate.
- [x] I can reproduce this on upstream `master`.
- [x] I confirmed the error originates in Paperclip's local-process
sandbox proxy.

### What happened?

Sandboxed local-process agents using `networkScope: "allowlist"` could
lose all proxied egress when `TMPDIR` was deeply nested because
`proxy.sock` exceeded Linux's Unix socket path limit. The truncated bind
surfaced as repeated connection resets, including for provider API
traffic.

### Expected behavior

Proxy creation should use a Linux-safe short path and fail explicitly if
no safe socket path can be created.

### Steps to reproduce

1. Set `TMPDIR` to a path long enough that
`<TMPDIR>/paperclip-network-sandbox-XXXXXX/proxy.sock` exceeds 107
bytes.
2. Build or run a local-process sandbox with `networkScope:
"allowlist"`.
3. Make an HTTP or HTTPS request through the generated sandbox proxy.
4. Observe connection resets from the overlong Unix socket path on
affected code.

### Paperclip version or commit

Upstream `master` before this change.

### Deployment mode

Other — Linux local-process adapters using Bubblewrap network
allowlisting.

### Installation method

Built from source.

### Agent adapter(s) involved

Codex and any other local-process adapter using the shared sandbox
utility.

### Operating system

Linux.

### Additional context

GitHub search found no duplicate public issue or pull request for this
defect.

## What Changed

- Add a Linux Unix-socket byte-length guard that reports the unsafe path
before binding.
- Create network proxy temporary directories under `/tmp` first, with
`os.tmpdir()` as a validated fallback.
- Use the safe temporary-directory helper at both allowlist proxy
creation sites while preserving trusted URL handling.
- Add regression coverage that sets a deliberately deep `TMPDIR` and
verifies the working socket remains within 107 bytes under `/tmp`.

## Verification

- `node
/srv/paperclip/home/paperclipai/paperclip/node_modules/vitest/vitest.mjs
run packages/adapter-utils/src/local-process-sandbox.test.ts` — 8
passed, 4 environment-gated tests skipped.
- `git diff --check origin/master...HEAD` — passed.
- Greptile Review — passed after reviewing 2 files with 0 comments and
no unresolved threads; this repository integration did not emit a
separate numeric confidence score.
- Full GitHub CI matrix — passed after one rerun of an unrelated ACPX
`ENOTEMPTY` cleanup flake.
- Package typecheck was attempted, but the existing shared install
cannot resolve `acpx/runtime`; the failure is outside the changed files
and is expected to be covered by CI's clean dependency install.

## Risks

- Low risk: the change is limited to Linux sandbox proxy
temporary-directory selection and validation.
- Systems without a writable `/tmp` fall back to `os.tmpdir()` only when
the resulting socket path is safe; otherwise startup now fails loudly
instead of producing connection resets.
- No schema, API, UI, migration, or documentation behavior changes.

> 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, `gpt-5.3-codex`, tool-enabled coding agent with managed
reasoning and code execution; context-window size is not exposed by the
runtime.

## 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.726.0-canary.0
2026-07-26 10:52:16 -05:00