Skip to content

feat(server): migrate openwork.json from .opencode/ to .openwork/#1570

Open
arozanov wants to merge 1 commit intodifferent-ai:devfrom
arozanov:feat/openwork-config-migration
Open

feat(server): migrate openwork.json from .opencode/ to .openwork/#1570
arozanov wants to merge 1 commit intodifferent-ai:devfrom
arozanov:feat/openwork-config-migration

Conversation

@arozanov
Copy link
Copy Markdown

Resolves #1161

Moves openwork.json out of .opencode/ into its own .openwork/ directory across all five packages: server, server-v2, orchestrator, Tauri desktop, Electron desktop.

What changed

Read paths check .openwork/openwork.json first, fall back to .opencode/openwork.json, default to .openwork/ for new workspaces.

Write paths always target .openwork/openwork.json.

Migration copies (not moves) the legacy file on first boot. Idempotent, never overwrites a different target, graceful on filesystem errors.

Watchers detect openwork.json changes in both directories. Server reload-watcher has a dedicated legacy watcher on .opencode/ and a tree watcher on .openwork/. Tauri desktop watcher now watches .openwork/ alongside .opencode/.

Inbox/outbox moved from .opencode/openwork/inbox to .openwork/inbox (server and server-v2).

Export/import includes both .opencode/ and .openwork/ in archives, validates at least one exists on import.

Docs updated: AGENTS.md, ARCHITECTURE.md, server README, tauri-audit PRD.

New files

  • apps/server/src/config-migration.ts -- migration logic
  • apps/server/src/workspace-files.ts -- path resolution with fallback
  • Tests for both (6 + 6 = 12 test cases)

Test plan

  • bun test server (15 pass)
  • bun test server-v2 (4 pass)
  • cargo check Tauri desktop (compiles clean)
  • tsc --noEmit server (0 errors on source files)
  • Integration test: 8 real filesystem flows (fresh workspace, legacy migration, idempotency, diverged configs, permission errors, full lifecycle, sequential migrations, empty/corrupt files) -- 44/44 pass

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, Comment, Open in v0 Apr 26, 2026 2:29pm

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 26, 2026

@arozanov is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Moves the canonical location of openwork.json from .opencode/openwork.json
to .openwork/openwork.json across server, server-v2, orchestrator, Tauri
desktop, and Electron desktop.

Read paths prefer .openwork/, fall back to .opencode/, default to .openwork/.
Write paths always target .openwork/openwork.json.
Migration copies (not moves) the legacy file on first boot.

Closes different-ai#1161

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@src-opn
Copy link
Copy Markdown
Collaborator

src-opn commented May 4, 2026

not sure on this one yet

@src-opn src-opn added the hold label May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move workspace config from .opencode/openwork.json to .openwork/openwork.json with safe migration

2 participants