Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

COPSPA-526: Migrate OpenCode config plugin onto lib-ts-config-sync#3

Open
MarcusSchwarz wants to merge 3 commits into
mainfrom
ticket/COPSPA-526
Open

COPSPA-526: Migrate OpenCode config plugin onto lib-ts-config-sync#3
MarcusSchwarz wants to merge 3 commits into
mainfrom
ticket/COPSPA-526

Conversation

@MarcusSchwarz

Copy link
Copy Markdown
Member

COPSPA-526 – Plugin Auto-Config (OpenCode wrapper)

https://techdivision.atlassian.net/browse/COPSPA-526

Migriert das OpenCode config-Plugin auf die geteilte Bibliothek @techdivision/lib-ts-config-sync. Das Plugin ist jetzt ein dünner Wrapper; die gesamte Sync-Logik liegt in der Lib.

Änderungen

  • Dependency auf @techdivision/lib-ts-config-sync.
  • src/config.ts = dünner Wrapper: adaptiert den OpenCode-Client-Logger und ruft OpenCodeAdapter auf session.created auf (vervollständigt den zuvor fehlenden Remote-Sync).
  • Entfernt: duplizierte src/services/* und src/types/PluginConfig.ts samt Tests (jetzt in der Lib).
  • Broken docs-Symlink entfernt.
  • .env.example + Scaffolding-Test auf den echten Vertrag angepasst: CONFIG_SYNC_URL / CONFIG_SYNC_BEARER_TOKEN / CONFIG_SYNC_CONFIG_KEY (+ optional CONFIG_SYNC_PLUGINS), User-Identität via OPENCODE_USER_EMAIL.

Verhalten

  • Gemergte Config wird nach .opencode/opencode-project.json geschrieben und in process.env.OPENCODE_PROJECT_CONFIG bereitgestellt.
  • Remote gewinnt beim Merge; config_key wird aus jira.project abgeleitet, wenn keine Env-Variable gesetzt ist.

Tests

  • 43 Tests grün.
  • End-to-end gegen den Live-Webhook verifiziert.

Abhängig von: techdivision/lib-ts-config-sync#1

Marcus Schwarz and others added 3 commits June 23, 2026 08:31
…hase 3)

- Depend on @techdivision/lib-ts-config-sync (file: link, local).
- Rewrite src/config.ts as a thin wrapper: adapts the OpenCode client to the
  library Logger, reads plugin version, runs OpenCodeAdapter on
  session.created (completes the previously-missing remote sync).
- Remove duplicated logic now owned by the library: src/services/* and
  src/types/PluginConfig.ts plus their unit/acceptance tests.
- Fix logger to use the real client.app.log surface; drop unused helpers.
- Remove broken docs symlink; drop non-existent skills/ from package files.
- Update scaffolding acceptance test to the new lib-based structure.
… fix)

- .env.example: use CONFIG_SYNC_URL / CONFIG_SYNC_BEARER_TOKEN /
  CONFIG_SYNC_CONFIG_KEY (+ optional CONFIG_SYNC_PLUGINS) and keep
  OPENCODE_USER_EMAIL (sent as the 'user' field).
- Update scaffolding acceptance test to assert the new env-var names.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants