Commit Graph

538 Commits

Author SHA1 Message Date
Devin Foley
ff8b839f42 Merge pull request #1658 from paperclipai/fix/migration-auto-apply-precedence
fix(server): check MIGRATION_AUTO_APPLY before MIGRATION_PROMPT
2026-03-24 15:56:00 -07:00
Devin Foley
fea892c8b3 Merge pull request #1702 from paperclipai/fix/codex-auth-check
fix(codex): check native auth before warning about missing API key
2026-03-24 15:40:20 -07:00
Devin Foley
4da83296a9 test(codex): move OPENAI_API_KEY stub to beforeEach for all tests
Consolidate the env stub into beforeEach so the pre-existing cwd
test is also isolated from host OPENAI_API_KEY, avoiding
non-deterministic filesystem side effects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 12:33:11 -07:00
Dotta
03f44d0089 Merge pull request #1708 from paperclipai/pr/pap-817-onboarding-goal-context
Seed onboarding project and issue goal context
2026-03-24 12:38:19 -05:00
Dotta
add6ca5648 Merge pull request #1709 from paperclipai/pr/pap-817-join-request-task-assignment-grants
Preserve task assignment grants for joined agents
2026-03-24 12:33:40 -05:00
Devin Foley
58c511af9a test(codex): isolate auth tests from host OPENAI_API_KEY
Use vi.stubEnv to clear OPENAI_API_KEY in both new tests so they
don't silently pass the wrong branch when the key is set in the
test runner's environment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 09:58:40 -07:00
Devin Foley
06b85d62b2 test(codex): add coverage for native auth detection in environment probe
Add tests for codex_native_auth_present and codex_openai_api_key_missing
code paths. Also pass adapter-configured CODEX_HOME through to
readCodexAuthInfo so the probe respects per-adapter home directories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 09:51:44 -07:00
dotta
44fbf83106 Preserve task assignment grants for joined agents 2026-03-24 11:49:00 -05:00
dotta
eb73fc747a Seed onboarding project and issue goal context
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-24 11:48:59 -05:00
dotta
5602576ae1 Fix embedded Postgres initdb failure in Docker slim containers
The embedded-postgres library hardcodes --lc-messages=en_US.UTF-8 and
strips the parent process environment when spawning initdb/postgres.
In slim Docker images (e.g. node:20-bookworm-slim), the en_US.UTF-8
locale isn't installed, causing initdb to exit with code 1.

Two fixes applied:
1. Add --lc-messages=C to all initdbFlags arrays (overrides the
   library's hardcoded locale since our flags come after in the spread)
2. pnpm patch on embedded-postgres to preserve process.env in spawn
   calls, preventing loss of PATH, LD_LIBRARY_PATH, and other vars

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-24 11:48:59 -05:00
dotta
08bdc3d28e Handle nested imported AGENTS edge case
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 20:56:34 -05:00
dotta
e4e5b61596 Fix imported agent bundle frontmatter leakage
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 20:43:20 -05:00
Dotta
eeb7e1a91a Merge pull request #1655 from paperclipai/pr/pap-795-company-portability
feat(portability): improve company import and export flow
2026-03-23 19:45:05 -05:00
Dotta
f2637e6972 Merge pull request #1654 from paperclipai/pr/pap-795-agent-runtime
fix(runtime): improve agent recovery and heartbeat operations
2026-03-23 19:44:51 -05:00
dotta
c8f8f6752f fix: address latest Greptile runtime review 2026-03-23 19:43:50 -05:00
Devin Foley
dd1d9bed80 fix(server): check MIGRATION_AUTO_APPLY before MIGRATION_PROMPT
PAPERCLIP_MIGRATION_PROMPT=never was checked before
PAPERCLIP_MIGRATION_AUTO_APPLY=true, causing auto-apply to never
trigger when both env vars are set (as in dev:watch). Swap the
check order so AUTO_APPLY takes precedence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:14:14 -07:00
dotta
a3f568dec7 Improve generated company org chart assets
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:58:07 -05:00
dotta
159c5b4360 Preserve sidebar order in company portability
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:59 -05:00
dotta
f9927bdaaa Disable imported timer heartbeats
Prevent company imports from re-enabling scheduler heartbeats on imported agents and cover both new-company and existing-company import flows in portability tests.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:39 -05:00
dotta
dcead97650 Fix company zip imports
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:39 -05:00
dotta
2a6e1cf1fc Fix imported GitHub skill file paths
Normalize GitHub skill directories for blob/file imports and when reading legacy stored metadata so imported SKILL.md files resolve correctly.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:38 -05:00
dotta
a339b488ae fix: dedupe company skill inventory refreshes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:38 -05:00
dotta
c41dd2e393 Reduce portability warning fan-out
Infer portable repo metadata from local git workspaces when repoUrl is missing, and collapse repeated task workspace export warnings into a single summary per missing workspace.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:38 -05:00
dotta
2e76a2a554 Add routine support to recurring task portability
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:38 -05:00
dotta
19154d0fec Clarify Codex instruction sources
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
2daae758b1 Include all agents on heartbeats page regardless of interval config
Agents without a heartbeat interval configured (intervalSec=0) were
filtered out, making them invisible on the instance heartbeats page.
This prevented managing heartbeats for agents that hadn't been
configured yet (e.g. donchitos company agents).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
43b21c6033 Ignore .paperclip paths in restart tracking
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
0bb1ee3caa Recover agent instructions from disk
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
3b2cb3a699 Show all companies' agents on instance heartbeats page
The /instance/scheduler-heartbeats endpoint was filtering agents by the
requesting user's company memberships, which meant non-member companies
(like donchitos) were hidden. Since this is an instance-level admin page,
it should show all agents across all companies.

- Added assertInstanceAdmin to authz.ts for reuse
- Replaced assertBoard + company filter with assertInstanceAdmin
- Removed the companyIds-based WHERE clause since instance admins see all

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
1adfd30b3b fix: recover managed agent instructions from disk
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
a315838d43 fix: preserve agent instructions on adapter switch
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
75c7eb3868 Ignore test-only paths in dev restart tracking
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
eac3f3fa69 Honor explicit failed-run session resume
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
02c779b41d Use issue participation for agent history
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
5a1e17f27f Fix issue workspace reuse after isolation
Persist realized isolated/operator workspaces back onto the issue as reusable workspaces so later runs stay on the same workspace, and update the issue workspace picker to present realized isolated workspaces as existing workspaces.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:33 -05:00
dotta
8232456ce8 Fix markdown mention chips
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 16:57:27 -05:00
dotta
7f9a76411a Address Greptile review on board CLI auth
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 08:46:05 -05:00
dotta
37c2c4acc4 Add browser-based board CLI auth flow
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 08:46:05 -05:00
dotta
e6df9fa078 Support GitHub shorthand refs for company import
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 08:14:51 -05:00
dotta
da2c15905a fix: restore post-merge route verification 2026-03-20 17:09:57 -05:00
dotta
be911754c5 Default comment reopen to checked
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 17:01:52 -05:00
dotta
df64530333 test: add routines api end-to-end coverage 2026-03-20 16:50:11 -05:00
dotta
8dc98db717 fix: close remaining routine merge blockers 2026-03-20 16:40:27 -05:00
dotta
9093cfbe4f fix: address greptile routine review 2026-03-20 16:26:29 -05:00
dotta
99eb317600 fix: harden routine dispatch and permissions 2026-03-20 16:15:32 -05:00
dotta
e3c92a20f1 Merge remote-tracking branch 'public-gh/master' into paperclip-routines
* public-gh/master: (46 commits)
  chore(lockfile): refresh pnpm-lock.yaml (#1377)
  fix: manage codex home per company by default
  Ensure agent home directories exist before use
  Handle directory entries in imported zip archives
  Fix portability import and org chart test blockers
  Fix PR verify failures after merge
  fix: address greptile follow-up feedback
  Address remaining Greptile portability feedback
  docs: clarify quickstart npx usage
  Add guarded dev restart handling
  Fix PAP-576 settings toggles and transcript default
  Add username log censor setting
  fix: use standard toggle component for permission controls
  fix: add missing setPrincipalPermission mock in portability tests
  fix: use fixed 1280x640 dimensions for org chart export image
  Adjust default CEO onboarding task copy
  fix: link Agent Company to agentcompanies.io in export README
  fix: strip agents and projects sections from COMPANY.md export body
  fix: default company export page to README.md instead of first file
  Add default agent instructions bundle
  ...

# Conflicts:
#	packages/adapters/pi-local/src/server/execute.ts
#	packages/db/src/migrations/meta/0039_snapshot.json
#	packages/db/src/migrations/meta/_journal.json
#	server/src/__tests__/agent-permissions-routes.test.ts
#	server/src/__tests__/agent-skills-routes.test.ts
#	server/src/services/company-portability.ts
#	skills/paperclip/references/company-skills.md
#	ui/src/api/agents.ts
2026-03-20 15:04:55 -05:00
dotta
d53714a145 fix: manage codex home per company by default 2026-03-20 14:44:27 -05:00
dotta
07757a59e9 Ensure agent home directories exist before use
mkdir -p the CODEX_HOME directory in codex-local adapter and the
agentHome directory in the heartbeat service before passing them to
adapters. This prevents CLI tools from erroring when their home
directory hasn't been created yet. Covers all local adapters that
set AGENT_HOME.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 14:25:18 -05:00
dotta
553e7b6b30 Fix portability import and org chart test blockers 2026-03-20 14:06:37 -05:00
dotta
1830216078 Fix PR verify failures after merge 2026-03-20 13:40:53 -05:00