Repository navigation
Conversation
There was a problem hiding this comment.
Tests and type check pass, but nothing in OpenCode uses this yet, so I could only check it through its tests. I ran the new marketplace and migration tests (28 pass) and typecheck:tsc in packages/core (clean). A search shows nothing outside the new files uses MarketplaceLocal yet.
Public API: all additions, backwards compatible:
- a new persistent
marketplace_registrySQLite table, with migration20261031060845_marketplace_local - a new
@opencode/schema/marketplaceentrypoint (Name,AgentItem,Catalog,Key,Installed,State,Plan) - a new on-disk catalog format,
opencode.marketplace/v1
The table and the catalog format are hard to change once they ship.
Concerns:
- Design not settled: you note that approval on #28696 is still pending. This slice already commits a migration, a storage shape (one JSON row) and a catalog file format, and later slices may want to change them. It would help to settle the direction there before landing the persistent parts.
- Not reachable yet: the service is built but not reachable from Location config, the server or the CLI. Until a follow-up wires it in, it's code and a database table nobody uses. If it isn't wired in this PR, the description should state the plan for adding that.
- Clashes with existing agents: see the inline comment on the clash check.
- Package boundary: see the inline comment on
State/Plan.
Related: #28696
|
Addressed the two inline comments in 6fd5402:
I also changed the provisional catalog discriminator to The description now spells out the next integration: Instance registration, explicit experimental Location-config opt-in, respecting Verification: 66 tests passed, Core |
Issue for this PR
Part of #28696. First slice of the contribution requested in #60816.
Design discussion: #28696 (comment)
Draft pending upstream agreement on storage ownership and the experimental catalog contract in #28696. The migration must not land before that agreement.
Type of change
What does this PR do?
Adds the experimental Core building block for local agent catalogs: a catalog manifest schema, a proposed SQLite registry, revision-bound one-time plans, installation/removal, and explicit config-document projection. Registry state, installed snapshots and process-local plans are owned by Core.
Agent identities are projected as
marketplace/<package-key>/<local-name>, keeping package agents separate from built-in and ordinary user-config agents. The provisional catalog discriminator isopencode.marketplace/experimental.This slice is 10 files and about 610 added lines. After design approval, the next PR will register the service in Instance and project documents through explicit experimental Location-config opt-in, respecting
global: falseand publishing config updates after committed mutations. It will exercise actual agent visibility and removal through the existing config plugin. A subsequent API/client and CLI change will expose the workflow to users.How did you verify your code works?
bun run checkpassed, including the mandatory pre-push hook.typecheck:tscpassed.bun run script/migration.ts --checkpassed.Visual
Screenshots / recordings
Core service only; the app/TUI contribution will include screenshots with its UI changes.
Checklist