Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
TypeScript adeagent-ideai-agentsautomationbotclaude-codecodexghosttygrok-bothermes-agentmobile-appmuseopenclawopencodeorchestrationpiruntimeterminalworktreesyc-backed
plugins: derive the publisher from where a plugin comes from, like a Go module path (#36281)
Neil8e61c440df41
diff --git a/config/scripts/validate-plugin-files.mjs b/config/scripts/validate-plugin-files.mjsindex a4deb4981fc..46bb0566d0d 100644--- a/config/scripts/validate-plugin-files.mjs+++ b/config/scripts/validate-plugin-files.mjs@@ -9,7 +9,9 @@ import path from 'node:path'import process from 'node:process'import { loadPluginSchemaModule } from './plugin-schema-module-loader.mjs'-const { validatePluginFile } = loadPluginSchemaModule('installation/plugin-file-validation.ts')+const { validatePluginFile, pluginManifestWarnings } = loadPluginSchemaModule(+ 'installation/plugin-file-validation.ts'+)const { parsePluginManifest } = loadPluginSchemaModule('manifest/plugin-manifest.ts')const { pluginCatalogReleaseEntry } = loadPluginSchemaModule('catalog/plugin-catalog-release.ts')// Why the install code itself: the printed contentHash must be what Orca computes at install.@@ -153,13 +155,13 @@ async function catalogReleaseEntry(pluginDir) {rmSync(tree, { recursive: true, force: true })}}-// Why a warning: only the official and community catalogs require it; a private catalog may not.+// Why a warning: Orca derives the publisher from the owner; older Orca refuses a declared one that differs.async function publisherOwnerWarning(pluginDir) {const remote = await git(pluginDir, ['remote', 'get-url', 'origin']).catch(() => '')const owner = parseGitRepositoryIdentity(remote)?.ownerconst { publisher } = JSON.parse(readFileSync(path.join(pluginDir, 'orca-plugin.json'), 'utf8'))- return owner && owner.toLowerCase() !== publisher.toLowerCase()- ? `warning: the official and community catalogs require publisher to match the repository owner "${owner}" (publisher is "${publisher}")`+ return owner && typeof publisher === 'string' && owner.toLowerCase() !== publisher.toLowerCase()+ ? `warning: Orca lists this plugin under the repository owner "${owner.toLowerCase()}", and older Orca refuses it because publisher is "${publisher}"; remove publisher or set it to "${owner.toLowerCase()}"`: null}@@ -213,6 +215,11 @@ for (const target of targets) {for (const error of errors) {console.error(`${file}: ${error}`)}+ if (errors.length === 0 && path.basename(file) === 'orca-plugin.json') {+ for (const warning of pluginManifestWarnings(raw)) {+ console.warn(`${file}: warning: ${warning}`)+ }+ }failed ||= errors.length > 0if (errors.length === 0) {console.log(`${file}: ok`)diff --git a/docs/reference/plugin-authoring.md b/docs/reference/plugin-authoring.mdindex a4d9ba3b07e..5a0c350622d 100644--- a/docs/reference/plugin-authoring.md+++ b/docs/reference/plugin-authoring.md@@ -17,10 +17,28 @@ completion, or from one of:| `examples/plugins/orca-gleam-syntax` | `data` | A syntax, no code || `examples/plugins/hello-orca` | `trusted-worker` | A panel, a worker command and events |-Set `publisher` to the GitHub or GitLab user or organization that owns your repository (`acme`-for `github.com/acme/gleam-syntax`), or the official and community catalogs reject the listing.+Leave `publisher` out. Orca names the publisher after where the plugin comes from, the way a+[Go module path](https://go.dev/ref/mod#module-path) is its repository path: the owner of the+repository, lowercased (`acme` for `github.com/Acme/gleam-syntax`), so the plugin installs as+`acme.gleam-syntax`. Nobody can choose a publisher name that is not theirs.++| Installed from | Publisher |+| ----------------------------- | ------------------------------------------------------------- |+| The official or community catalog | the repository owner, set by the catalog in the entry's `id` |+| Another catalog | whatever that catalog's entry `id` says |+| A Git URL | the URL's owner (`.` and `_` become `-`) |+| A local or development folder | `local` |++`publisher` is deprecated: Orca ignores it for catalog and Git installs. Leaving it out needs+`engines.orca` of at least `>=1.4.246`, because older Orca requires the field and refuses a+value that differs from the catalog's. To keep supporting older Orca, keep `publisher` and set it+to the repository owner; `validate:plugin` warns about it either way. An install made before+1.4.246 keeps its key, approvals and data. A local or development folder that still declares+`publisher` keeps using it until you remove it.+When copying the Gleam example, also drop its `stablyai` publisher and `orca-` id prefix: both are-reserved for Orca's own plugins.+reserved for Orca's own plugins, as are owners named `official`, `anthropic`, `openai`, `github`+or starting with `orca`.Pick the lowest `execution` profile that covers what you contribute; it decides what the user isasked to approve:@@ -121,8 +139,9 @@ listen with `orca.on('theme', …)`, to follow it.## 2. Load it while you work1. Settings → Plugins: click **Turn on plugins**.-2. **Development folders…** → add the plugin folder. A development folder overrides an installed- copy with the same `<publisher>.<id>`.+2. **Development folders…** → add the plugin folder. It loads as `local.<id>` (or under its+ deprecated `publisher` while it still declares one), and overrides an installed copy with+ the same key.3. Review and enable it. Nothing runs before that.Orca watches development folders and reloads the plugin when its manifest or files change.@@ -140,8 +159,9 @@ pnpm validate:plugin path/to/pluginThis runs the manifest checks Orca runs, strictly: unknown keys, limits, contributions beyond theexecution profile, and an `engines.orca` too low for the fields used. On a catalog it also-checks that listed images exist and fit. In a Git repository it warns when `publisher` is not the-owner of the `origin` remote. Run it in CI for the plugin and catalog repositories.+checks that listed images exist and fit. It warns when the manifest still declares the deprecated+`publisher`, and, in a Git repository, when that value is not the owner of the `origin` remote.+Warnings do not fail the check. Run it in CI for the plugin and catalog repositories.## 4. Publish to a catalog@@ -170,6 +190,9 @@ the description.}```+ The `id` is `<publisher>.<manifest id>`. In your own catalog you choose the publisher; use the+ repository owner, as the official and community catalogs do.+`commit` must be a full 40-character SHA. A tag or branch name is refused by validation andskipped by Orca. Keep the previous release listed when you raise `engines.orca`, so olderOrca still has something to install.diff --git a/docs/reference/plugin-catalog.md b/docs/reference/plugin-catalog.mdindex fcc9d080345..c891602c3a4 100644--- a/docs/reference/plugin-catalog.md+++ b/docs/reference/plugin-catalog.md@@ -23,8 +23,9 @@ One installable plugin.| Field | Type | Required | Since | Description || --- | --- | --- | --- | --- |-| `id` | string | yes | 1.4.245 | `<publisher>.<id>`, matching the plugin's manifest. Each half is at most 64 characters, and the reserved names `constructor` and `prototype` are refused. Example: `"acme.gleam-syntax"` |+| `id` | string | yes | 1.4.245 | `<publisher>.<id>`: the publisher is the repository owner, lowercased (Orca installs under this key, whatever the manifest's deprecated `publisher` says), and the id is the manifest's `id`. Each half is at most 64 characters, and the reserved names `constructor` and `prototype` are refused. Example: `"acme.gleam-syntax"` || `source` | [CatalogGitSource](#cataloggitsource) | yes | | Where the plugin source lives. |+| `ownerId` | integer | no | 1.4.246 | GitHub's numeric id of the repository owner, recorded the first time the plugin was listed. Names can be renamed or re-registered; this id cannot. Informational: Orca does not read it yet, and older Orca ignores it. Example: `1234567` || `description` | string | no | 1.4.245 | Listing text shown in the catalog. || `categories` | string[] | no | 1.4.245 | Lowercase slugs used to filter the catalog, each listed once. At most 16; extras are ignored. || `releases` | [CatalogRelease](#catalogrelease)[] | yes | 1.4.245 | Installable releases, newest first. Orca installs the first one whose `minimumOrca` it meets, so keep older releases listed when you raise `engines.orca`. At most 32. |@@ -118,7 +119,8 @@ One thing the release adds to Orca.## Publisher names and trust-- **Publisher is the repository owner.** The official and community catalogs list a plugin only when its `publisher` equals the GitHub or GitLab user or organization that owns its repository (`acme` for `github.com/acme/gleam-syntax`). Their CI enforces this; Orca does not check it for catalogs you add yourself.+- **Publisher is the repository owner.** Like a Go module path, a plugin's publisher is where it lives, never what its manifest says: the official and community catalogs set each entry's `id` to `<owner>.<manifest id>` from the GitHub user or organization that owns the repository (`acme` for `github.com/acme/gleam-syntax`), and Orca installs under that `id`. A Git URL install uses the URL's owner and a folder uses `local`. The manifest's `publisher` is deprecated and ignored. Orca does not check the owner for catalogs you add yourself; their `id` is what they say.+- **Listed names are pinned to GitHub ids.** The community catalog records the numeric owner and repository ids when a plugin is first listed, pauses new versions after a rename or transfer until Stably confirms it, and refuses a repository that was deleted and recreated under the same name. Each listed version is permanent: a moved tag never replaces it.- **Reserved names install only from Orca's official catalog.** The publishers `stablyai`, `official`, `anthropic`, `openai`, `github` and any starting `orca` (any case), and ids starting `orca-`, are refused from any other catalog, a Git URL or a local folder. A catalog that lists one is refused whole. `pnpm validate:plugin` rejects these publishers except `stablyai`.- **Trust comes from the catalog's address.** Orca labels a plugin with where it came from: the Official mark for Orca's catalog, otherwise the catalog's name and the owner in its Git URL (`github.com/acme`, `gitlab.com/acme/tools`), never the manifest's text. Development folders show `Dev · unverified`, Git URL installs `Unverified`.- **An install stays with its catalog.** Orca records the catalog each plugin was installed from and updates it only from there. When another catalog lists the same id, the plugin page says so, and switching means removing the plugin and installing it again.diff --git a/docs/reference/plugin-manifest.md b/docs/reference/plugin-manifest.mdindex 6b62f7414f4..3cbb21e96b5 100644--- a/docs/reference/plugin-manifest.md+++ b/docs/reference/plugin-manifest.md@@ -14,8 +14,8 @@ Add `"$schema": "https://raw.githubusercontent.com/stablyai/orca/main/docs/schem| `$schema` | string | no | 1.4.245 | JSON Schema URL for editor completion. Ignored by Orca. || `manifestVersion` | `2` | yes | 1.4.245 | Manifest format. Use 2 for new plugins. || `execution` | `"data"` \| `"declarative"` \| `"sandboxed-ui"` \| `"trusted-worker"` | yes | 1.4.245 | Most authority the plugin needs, least first: `data` (themes, syntaxes, translations), `declarative` (commands, shortcuts, recipes), `sandboxed-ui` (panels), `trusted-worker` (`main` and events). Contributions beyond it fail validation. Example: `"data"` |-| `id` | string | yes | 1.4.160 | Plugin id, kebab-case. The install identity is `<publisher>.<id>`. The reserved names `constructor` and `prototype` are refused. Example: `"gleam-syntax"` |-| `publisher` | string | yes | 1.4.160 | Publisher slug, kebab-case. Must be the GitHub or GitLab user or organization that owns the repository (`acme` for `github.com/acme/gleam-syntax`), or the official and community catalogs reject the listing. The reserved names `constructor` and `prototype` are refused. The publishers `stablyai`, `official`, `anthropic`, `openai`, `github` and any starting `orca` (any case), and ids starting `orca-`, install only from Orca's official catalog. Example: `"acme"` |+| `id` | string | yes | 1.4.160 | Plugin id, kebab-case. The install identity is `<publisher>.<id>`, where Orca derives the publisher from the repository owner. The reserved names `constructor` and `prototype` are refused. Example: `"gleam-syntax"` |+| `publisher` | string | no | 1.4.160 | Deprecated: leave it out. Orca derives the publisher from where the plugin comes from, the way a Go module is named by its repository path: the repository owner for the official and community catalogs and for Git URL installs (`acme` for `github.com/acme/gleam-syntax`), and `local` for a folder. A value here is ignored for catalog and Git installs. Leaving it out needs `engines.orca` of at least `>=1.4.246`, because older Orca requires it; if you keep it for older Orca, it must equal the repository owner. Reserved owners (`stablyai`, `official`, `anthropic`, `openai`, `github` and any starting `orca`) and ids starting `orca-` install only from Orca's official catalog. Example: `"acme"` || `name` | string | yes | 1.4.160 | Display name. Example: `"Gleam"` || `version` | string | yes | 1.4.160 | Plugin version, semver. Example: `"1.2.0"` || `description` | string | no | 1.4.160 | One or two sentences shown in the plugin list. |diff --git a/docs/schemas/plugins/orca-catalog.v2.schema.json b/docs/schemas/plugins/orca-catalog.v2.schema.jsonindex 3b3bf00c10e..6a6e4d019f9 100644--- a/docs/schemas/plugins/orca-catalog.v2.schema.json+++ b/docs/schemas/plugins/orca-catalog.v2.schema.json@@ -61,7 +61,7 @@"id": {"type": "string","pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z0-9]+(?:-[a-z0-9]+)*$",- "description": "`<publisher>.<id>`, matching the plugin's manifest. Each half is at most 64 characters, and the reserved names `constructor` and `prototype` are refused.",+ "description": "`<publisher>.<id>`: the publisher is the repository owner, lowercased (Orca installs under this key, whatever the manifest's deprecated `publisher` says), and the id is the manifest's `id`. Each half is at most 64 characters, and the reserved names `constructor` and `prototype` are refused.","x-orca-since": "1.4.245","examples": ["acme.gleam-syntax"@@ -70,6 +70,16 @@"source": {"$ref": "#/$defs/CatalogGitSource"},+ "ownerId": {+ "description": "GitHub's numeric id of the repository owner, recorded the first time the plugin was listed. Names can be renamed or re-registered; this id cannot. Informational: Orca does not read it yet, and older Orca ignores it.",+ "x-orca-since": "1.4.246",+ "examples": [+ 1234567+ ],+ "type": "integer",+ "exclusiveMinimum": 0,+ "maximum": 9007199254740991+ },"description": {"description": "Listing text shown in the catalog.","x-orca-since": "1.4.245",diff --git a/docs/schemas/plugins/orca-plugin.v2.schema.json b/docs/schemas/plugins/orca-plugin.v2.schema.jsonindex 69576d0a84e..0fc85f7f64b 100644--- a/docs/schemas/plugins/orca-plugin.v2.schema.json+++ b/docs/schemas/plugins/orca-plugin.v2.schema.json@@ -35,21 +35,22 @@"type": "string","maxLength": 64,"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",- "description": "Plugin id, kebab-case. The install identity is `<publisher>.<id>`. The reserved names `constructor` and `prototype` are refused.",+ "description": "Plugin id, kebab-case. The install identity is `<publisher>.<id>`, where Orca derives the publisher from the repository owner. The reserved names `constructor` and `prototype` are refused.","x-orca-since": "1.4.160","examples": ["gleam-syntax"]},"publisher": {- "type": "string",- "maxLength": 64,- "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",- "description": "Publisher slug, kebab-case. Must be the GitHub or GitLab user or organization that owns the repository (`acme` for `github.com/acme/gleam-syntax`), or the official and community catalogs reject the listing. The reserved names `constructor` and `prototype` are refused. The publishers `stablyai`, `official`, `anthropic`, `openai`, `github` and any starting `orca` (any case), and ids starting `orca-`, install only from Orca's official catalog.",+ "deprecated": true,+ "description": "Deprecated: leave it out. Orca derives the publisher from where the plugin comes from, the way a Go module is named by its repository path: the repository owner for the official and community catalogs and for Git URL installs (`acme` for `github.com/acme/gleam-syntax`), and `local` for a folder. A value here is ignored for catalog and Git installs. Leaving it out needs `engines.orca` of at least `>=1.4.246`, because older Orca requires it; if you keep it for older Orca, it must equal the repository owner. Reserved owners (`stablyai`, `official`, `anthropic`, `openai`, `github` and any starting `orca`) and ids starting `orca-` install only from Orca's official catalog.","x-orca-since": "1.4.160","examples": ["acme"- ]+ ],+ "type": "string",+ "maxLength": 64,+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name": {"type": "string",@@ -433,7 +434,6 @@"manifestVersion","execution","id",- "publisher","name","version","engines"diff --git a/examples/plugins/orca-gleam-syntax/orca-plugin.v2.schema.json b/examples/plugins/orca-gleam-syntax/orca-plugin.v2.schema.jsonindex 69576d0a84e..0fc85f7f64b 100644--- a/examples/plugins/orca-gleam-syntax/orca-plugin.v2.schema.json+++ b/examples/plugins/orca-gleam-syntax/orca-plugin.v2.schema.json@@ -35,21 +35,22 @@"type": "string","maxLength": 64,"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",- "description": "Plugin id, kebab-case. The install identity is `<publisher>.<id>`. The reserved names `constructor` and `prototype` are refused.",+ "description": "Plugin id, kebab-case. The install identity is `<publisher>.<id>`, where Orca derives the publisher from the repository owner. The reserved names `constructor` and `prototype` are refused.","x-orca-since": "1.4.160","examples": ["gleam-syntax"]},"publisher": {- "type": "string",- "maxLength": 64,- "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",- "description": "Publisher slug, kebab-case. Must be the GitHub or GitLab user or organization that owns the repository (`acme` for `github.com/acme/gleam-syntax`), or the official and community catalogs reject the listing. The reserved names `constructor` and `prototype` are refused. The publishers `stablyai`, `official`, `anthropic`, `openai`, `github` and any starting `orca` (any case), and ids starting `orca-`, install only from Orca's official catalog.",+ "deprecated": true,+ "description": "Deprecated: leave it out. Orca derives the publisher from where the plugin comes from, the way a Go module is named by its repository path: the repository owner for the official and community catalogs and for Git URL installs (`acme` for `github.com/acme/gleam-syntax`), and `local` for a folder. A value here is ignored for catalog and Git installs. Leaving it out needs `engines.orca` of at least `>=1.4.246`, because older Orca requires it; if you keep it for older Orca, it must equal the repository owner. Reserved owners (`stablyai`, `official`, `anthropic`, `openai`, `github` and any starting `orca`) and ids starting `orca-` install only from Orca's official catalog.","x-orca-since": "1.4.160","examples": ["acme"- ]+ ],+ "type": "string",+ "maxLength": 64,+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name": {"type": "string",@@ -433,7 +434,6 @@"manifestVersion","execution","id",- "publisher","name","version","engines"diff --git a/src/main/plugins/__mocks__/plugin-uninstall-log-test-fixture.ts b/src/main/plugins/__mocks__/plugin-uninstall-log-test-fixture.tsindex 58b3724c1c5..c38a8cefb0d 100644--- a/src/main/plugins/__mocks__/plugin-uninstall-log-test-fixture.ts+++ b/src/main/plugins/__mocks__/plugin-uninstall-log-test-fixture.ts@@ -134,7 +134,8 @@ export async function createUninstallFixture() {},plugin: { url: `https://github.com/stablyai/${id}.git`, ref: 'main' }},- resolvedCommit: '1'.repeat(40)+ resolvedCommit: '1'.repeat(40),+ identity: { publisher: 'stablyai' }}): await installPluginFromLocalPath({pluginsDir: getUserPluginsDir(root),diff --git a/src/main/plugins/catalog/plugin-marketplace-installer.test.ts b/src/main/plugins/catalog/plugin-marketplace-installer.test.tsindex 9d85a9392b1..74f0cacba1e 100644--- a/src/main/plugins/catalog/plugin-marketplace-installer.test.ts+++ b/src/main/plugins/catalog/plugin-marketplace-installer.test.ts@@ -17,7 +17,7 @@ const git = vi.hoisted((): {checkout: ReturnType<typeof vi.fn>version: string- publisher: string+ publisher: string | undefinedid: stringcommit: stringpayload: string@@ -319,12 +319,39 @@ describe('PluginMarketplaceInstaller', () => {])})- it('rejects a source whose manifest identity differs from its listing', async () => {- const { installer, sourceId } = await setup()+ it('installs under the listing publisher, ignoring the manifest publisher', async () => {+ const { installer, sourceId, root } = await setup()git.publisher = 'attacker'+ const preview = await installer.preview(sourceId, 'community.notes')+ expect(preview.manifest.publisher).toBe('community')+ await expect(installer.install(preview)).resolves.toMatchObject({+ ok: true,+ pluginKey: 'community.notes'+ })+ expect(Object.keys((await readPluginLockfile(join(root, 'plugins'))).plugins)).toEqual([+ 'community.notes'+ ])+ })++ it('installs a format 2 manifest that leaves the publisher out', async () => {+ git.v2 = true+ git.publisher = undefined+ const { installer, sourceId } = await setup()++ const preview = await installer.preview(sourceId, 'community.notes')+ await expect(installer.install(preview)).resolves.toMatchObject({+ ok: true,+ pluginKey: 'community.notes'+ })+ })++ it('rejects a source whose manifest id differs from its listing', async () => {+ const { installer, sourceId } = await setup()+ git.id = 'other'+await expect(installer.preview(sourceId, 'community.notes')).rejects.toThrow(- 'attacker.notes does not match marketplace listing community.notes'+ 'plugin manifest id other does not match marketplace listing community.notes')})diff --git a/src/main/plugins/catalog/plugin-marketplace-installer.ts b/src/main/plugins/catalog/plugin-marketplace-installer.tsindex f8c86053a84..48416370912 100644--- a/src/main/plugins/catalog/plugin-marketplace-installer.ts+++ b/src/main/plugins/catalog/plugin-marketplace-installer.ts@@ -114,7 +114,7 @@ export class PluginMarketplaceInstaller {const inspection = await inspectPluginInstallTree({rootDir: stagingDirectory,hostVersion: this.hostVersion,- expectedPluginKey: pluginKey,+ identity: { pluginKey },...(listing.release ? { release: { record: listing.release, resolvedCommit } } : {})})if (!inspection.ok) {diff --git a/src/main/plugins/installation/plugin-derived-publisher.test.ts b/src/main/plugins/installation/plugin-derived-publisher.test.tsnew file mode 100644index 00000000000..5a26c647c50--- /dev/null+++ b/src/main/plugins/installation/plugin-derived-publisher.test.ts@@ -0,0 +1,145 @@+import { execFile } from 'node:child_process'+import { mkdtemp, rm, writeFile } from 'node:fs/promises'+import { tmpdir } from 'node:os'+import { join } from 'node:path'+import { promisify } from 'node:util'+import { afterEach, describe, expect, it, vi } from 'vitest'+import {+ installPluginFromGit,+ installPluginFromLocalPath,+ readPluginLockfile+} from './plugin-install'+import { serveRepositoriesOverTestSsh } from '../__mocks__/plugin-git-ssh-remote-fixture'+import { installStagedPluginTree } from './plugin-install-staging'+import { discoverPlugins, isInvalidDiscoveredPlugin } from '../plugin-discovery'+import { PLUGIN_DERIVED_PUBLISHER_SINCE } from '../../../shared/plugins/manifest/plugin-schema-field-docs'++const execFileAsync = promisify(execFile)+const roots: string[] = []+const HOST = PLUGIN_DERIVED_PUBLISHER_SINCE++async function tempRoot(prefix: string): Promise<string> {+ const root = await mkdtemp(join(tmpdir(), prefix))+ roots.push(root)+ return root+}++async function writeThemePlugin(root: string, publisher?: string): Promise<void> {+ await writeFile(+ join(root, 'orca-plugin.json'),+ JSON.stringify({+ manifestVersion: 2,+ execution: 'data',+ id: 'dusk',+ ...(publisher ? { publisher } : {}),+ name: 'Dusk',+ version: '1.0.0',+ engines: { orca: `>=${HOST}` },+ contributes: { terminalThemes: [{ id: 'dusk', title: 'Dusk', path: 'dusk.json' }] }+ })+ )+ await writeFile(+ join(root, 'dusk.json'),+ JSON.stringify({ background: '#101010', foreground: '#f0f0f0' })+ )+}++async function commitRepository(root: string): Promise<void> {+ const git = (...args: string[]) => execFileAsync('git', args, { cwd: root })+ await git('init', '--quiet')+ await git('config', 'user.email', '[email protected]')+ await git('config', 'user.name', 'Plugin Test')+ await git('add', '.')+ await git('commit', '--quiet', '-m', 'fixture')+}++afterEach(async () => {+ vi.unstubAllEnvs()+ await Promise.all(roots.splice(0).map((root) => rm(root, { recursive: true, force: true })))+})++describe('derived plugin publishers', () => {+ it('names a Git URL install after the URL owner, ignoring the manifest publisher', async () => {+ const source = await tempRoot('orca-derived-git-')+ const pluginsDir = await tempRoot('orca-derived-installs-')+ await writeThemePlugin(source, 'brand-name')+ await commitRepository(source)+ await serveRepositoriesOverTestSsh(await tempRoot('orca-derived-ssh-'), {+ '/Acme/dusk.git': source+ })++ const result = await installPluginFromGit({+ pluginsDir,+ url: 'ssh://[email protected]/Acme/dusk.git',+ ref: '',+ hostVersion: HOST+ })++ expect(result).toMatchObject({ ok: true, pluginKey: 'acme.dusk' })+ })++ it('keeps the key of an install made before publishers were derived', async () => {+ const source = await tempRoot('orca-derived-git-')+ const pluginsDir = await tempRoot('orca-derived-installs-')+ await writeThemePlugin(source, 'brand-name')+ await commitRepository(source)+ await serveRepositoriesOverTestSsh(await tempRoot('orca-derived-ssh-'), {+ '/acme/dusk.git': source+ })+ const url = 'ssh://[email protected]/acme/dusk.git'+ // Why staged directly: it records `brand-name.dusk` from a Git source, as older Orca did.+ const legacy = await installStagedPluginTree({+ pluginsDir,+ stagingDir: source,+ hostVersion: HOST,+ source: { kind: 'git', url, ref: '' },+ resolvedCommit: null,+ identity: { publisher: 'brand-name' }+ })+ expect(legacy).toMatchObject({ ok: true, pluginKey: 'brand-name.dusk' })++ const result = await installPluginFromGit({ pluginsDir, url, ref: '', hostVersion: HOST })++ expect(result).toMatchObject({ ok: true, pluginKey: 'brand-name.dusk' })+ expect(Object.keys((await readPluginLockfile(pluginsDir)).plugins)).toEqual(['brand-name.dusk'])+ })++ it('installs a folder without a publisher as local', async () => {+ const source = await tempRoot('orca-derived-folder-')+ const pluginsDir = await tempRoot('orca-derived-installs-')+ await writeThemePlugin(source)++ await expect(+ installPluginFromLocalPath({ pluginsDir, sourcePath: source, hostVersion: HOST })+ ).resolves.toMatchObject({ ok: true, pluginKey: 'local.dusk' })+ })++ it('discovers installed and development plugins under their derived publisher', async () => {+ const installedSource = await tempRoot('orca-derived-installed-')+ const devFolder = await tempRoot('orca-derived-dev-')+ const legacyDevFolder = await tempRoot('orca-derived-legacy-dev-')+ const pluginsDir = await tempRoot('orca-derived-installs-')+ await writeThemePlugin(installedSource)+ await writeThemePlugin(devFolder)+ await writeThemePlugin(legacyDevFolder, 'acme')+ await installPluginFromLocalPath({ pluginsDir, sourcePath: installedSource, hostVersion: HOST })++ const discovered = await discoverPlugins({+ pluginsDir,+ devPluginPaths: [devFolder, legacyDevFolder],+ hostVersion: HOST+ })++ expect(+ discovered.map((plugin) =>+ isInvalidDiscoveredPlugin(plugin)+ ? plugin.error+ : [plugin.pluginKey, plugin.manifest.publisher, plugin.isDev]+ )+ ).toEqual([+ // Why replaced: a dev folder overrides an installed copy with the same key.+ ['local.dusk', 'local', true],+ ['acme.dusk', 'acme', true]+ ])+ })+})diff --git a/src/main/plugins/installation/plugin-install-staging.ts b/src/main/plugins/installation/plugin-install-staging.tsindex a359377b035..27b997961e5 100644--- a/src/main/plugins/installation/plugin-install-staging.ts+++ b/src/main/plugins/installation/plugin-install-staging.ts@@ -6,8 +6,11 @@ import {parseHostPluginManifest,qualifiedPluginKey,satisfiesOrcaEngineRange,- type PluginManifest+ type PluginManifest,+ type PluginManifestWithPublisher} from '../../../shared/plugins/manifest/plugin-manifest'+import { withPluginPublisher } from '../../../shared/plugins/installation/plugin-publisher-derivation'+import { splitQualifiedPluginKey } from '../../../shared/plugins/catalog/plugin-marketplace'import { pluginManifestCompatibilityError } from '../../../shared/plugins/manifest/plugin-manifest-compatibility'import { fingerprintPluginConsent } from '../../../shared/plugins/approval/plugin-consent-fingerprint'import {@@ -43,7 +46,7 @@ export type PluginInstallResult =export type PluginInstallInspection =| {ok: true- manifest: PluginManifest+ manifest: PluginManifestWithPublisherpluginKey: stringcontentHash: stringconsentFingerprint: string@@ -85,11 +88,20 @@ async function readInstallManifest(return { ok: true, manifest: parsed.manifest }}+/** Who names the install: a listing's exact key, or a publisher derived from the source. */+export type PluginInstallIdentity = { pluginKey: string } | { publisher: string }++function identityPublisher(identity: PluginInstallIdentity): string {+ return 'pluginKey' in identity+ ? (splitQualifiedPluginKey(identity.pluginKey)?.publisher ?? '')+ : identity.publisher+}+/** Preview and install share tree verification so reviewed bytes obey install policy. */export async function inspectPluginInstallTree(input: {rootDir: stringhostVersion: string- expectedPluginKey?: string+ identity: PluginInstallIdentity/** Catalog-pinned release these bytes must match exactly. */release?: { record: PluginCatalogRelease; resolvedCommit: string | null }}): Promise<PluginInstallInspection> {@@ -97,14 +109,16 @@ export async function inspectPluginInstallTree(input: {if (!sourceManifest.ok) {return sourceManifest}- const pluginKey = qualifiedPluginKey(sourceManifest.manifest)- if (input.expectedPluginKey && pluginKey !== input.expectedPluginKey) {+ // Why the listing's publisher: catalogs derive it, so a manifest's own `publisher` is ignored.+ const manifest = withPluginPublisher(sourceManifest.manifest, identityPublisher(input.identity))+ const pluginKey = qualifiedPluginKey(manifest)+ if ('pluginKey' in input.identity && pluginKey !== input.identity.pluginKey) {return {ok: false,- error: `plugin manifest identity ${pluginKey} does not match marketplace listing ${input.expectedPluginKey}`+ error: `plugin manifest id ${manifest.id} does not match marketplace listing ${input.identity.pluginKey}`}}- const declaredArtifacts = await validatePluginInstallTree(input.rootDir, sourceManifest.manifest)+ const declaredArtifacts = await validatePluginInstallTree(input.rootDir, manifest)if (!declaredArtifacts.ok) {return { ok: false, error: `invalid declared artifact: ${declaredArtifacts.error}` }}@@ -116,7 +130,7 @@ export async function inspectPluginInstallTree(input: {input.release &&pluginCatalogReleaseError({release: input.release.record,- manifest: sourceManifest.manifest,+ manifest,resolvedCommit: input.release.resolvedCommit,contentHash: treeHash.hash})@@ -125,10 +139,10 @@ export async function inspectPluginInstallTree(input: {}return {ok: true,- manifest: sourceManifest.manifest,+ manifest,pluginKey,contentHash: treeHash.hash,- consentFingerprint: fingerprintPluginConsent(sourceManifest.manifest, treeHash.hash)+ consentFingerprint: fingerprintPluginConsent(manifest, treeHash.hash)}}@@ -138,7 +152,7 @@ export async function installStagedPluginTree(input: {hostVersion: stringsource: PluginInstallSourceresolvedCommit: string | null- expectedPluginKey?: string+ identity: PluginInstallIdentityrelease?: PluginCatalogRelease/** Trusted bundled bytes may restore an immutable directory damaged on disk. */repairCorruptedVersion?: boolean@@ -149,7 +163,7 @@ export async function installStagedPluginTree(input: {const sourceInspection = await inspectPluginInstallTree({rootDir: input.stagingDir,hostVersion: input.hostVersion,- ...(input.expectedPluginKey ? { expectedPluginKey: input.expectedPluginKey } : {}),+ identity: input.identity,...(input.release? { release: { record: input.release, resolvedCommit: input.resolvedCommit } }: {})@@ -209,10 +223,10 @@ export async function installStagedPluginTree(input: {if (!copiedManifest.ok) {return { ok: false, error: `copied ${copiedManifest.error}` }}- if (qualifiedPluginKey(copiedManifest.manifest) !== pluginKey) {+ if (copiedManifest.manifest.id !== manifest.id) {return { ok: false, error: 'plugin manifest identity changed while it was being staged' }}- manifest = copiedManifest.manifest+ manifest = withPluginPublisher(copiedManifest.manifest, manifest.publisher)const copiedArtifacts = await validatePluginInstallTree(stagedVersionDir, manifest)if (!copiedArtifacts.ok) {return { ok: false, error: `copied artifact validation failed: ${copiedArtifacts.error}` }@@ -238,10 +252,10 @@ export async function installStagedPluginTree(input: {if (!existingManifest.ok) {return { ok: false, error: `installed ${existingManifest.error}` }}- if (qualifiedPluginKey(existingManifest.manifest) !== pluginKey) {+ if (existingManifest.manifest.id !== manifest.id) {return { ok: false, error: 'installed plugin manifest identity does not match its directory' }}- manifest = existingManifest.manifest+ manifest = withPluginPublisher(existingManifest.manifest, manifest.publisher)const existingArtifacts = await validatePluginInstallTree(versionDir, manifest)if (!existingArtifacts.ok) {return {diff --git a/src/main/plugins/installation/plugin-install.test.ts b/src/main/plugins/installation/plugin-install.test.tsindex 9d3a4bdcccc..cbf23f41e09 100644--- a/src/main/plugins/installation/plugin-install.test.ts+++ b/src/main/plugins/installation/plugin-install.test.ts@@ -127,7 +127,8 @@ describe('installPluginFromLocalPath', () => {stagingDir: sourcePath,hostVersion: '1.4.0',source: { kind: 'local-path', path: sourcePath },- resolvedCommit: null+ resolvedCommit: null,+ identity: { publisher: 'acme' }})expect(manifestRead).toHaveBeenCalledTimes(2)diff --git a/src/main/plugins/installation/plugin-install.ts b/src/main/plugins/installation/plugin-install.tsindex 16ec49201ab..80a00d37e8d 100644--- a/src/main/plugins/installation/plugin-install.ts+++ b/src/main/plugins/installation/plugin-install.ts@@ -10,7 +10,8 @@ import {import {isAllowedPluginGitUrl,PLUGIN_COMMIT_PATTERN,- pluginInstallSourceSchema+ pluginInstallSourceSchema,+ type PluginLockEntry} from '../../../shared/plugins/installation/plugin-install-lockfile'import type { PluginCatalogRelease } from '../../../shared/plugins/catalog/plugin-catalog-release'import { readPluginLockfile } from './plugin-install-lockfile-store'@@ -24,6 +25,15 @@ import { checkoutPluginGitSource } from './plugin-git-repository'import { findPluginRollbackCandidate } from './plugin-rollback-candidate'import { readPluginInstallProvenance } from './plugin-install-provenance'import { publishPluginInstall } from './plugin-install-publication'+import {+ gitUrlPluginPublisher,+ localPluginPublisher+} from '../../../shared/plugins/installation/plugin-publisher-derivation'+import {+ isSameGitRepository,+ splitQualifiedPluginKey+} from '../../../shared/plugins/catalog/plugin-marketplace'+import { readPluginManifestText } from '../plugin-manifest-file'export type { PluginInstallResult } from './plugin-install-staging'@@ -47,12 +57,19 @@ export async function installPluginFromLocalPath(input: {if (!existsSync(join(input.sourcePath, PLUGIN_MANIFEST_FILENAME))) {return { ok: false, error: `no ${PLUGIN_MANIFEST_FILENAME} found in ${input.sourcePath}` }}+ const reinstall = await installedPublisherFor(+ input.pluginsDir,+ (source) => source.kind === 'local-path' && source.path === input.sourcePath+ )return installStagedPluginTree({pluginsDir: input.pluginsDir,stagingDir: input.sourcePath,hostVersion: input.hostVersion,source: { kind: 'local-path', path: input.sourcePath },resolvedCommit: null,+ identity: {+ publisher: reinstall ?? localPluginPublisher(await declaredPublisher(input.sourcePath))+ },blockedPluginReason: input.blockedPluginReason})})@@ -72,7 +89,7 @@ export async function installBundledPlugin(input: {hostVersion: input.hostVersion,source: { kind: 'bundled', bundleId: input.expectedPluginKey },resolvedCommit: null,- expectedPluginKey: input.expectedPluginKey,+ identity: { pluginKey: input.expectedPluginKey },repairCorruptedVersion: true,blockedPluginReason: input.blockedPluginReason})@@ -91,6 +108,11 @@ export async function installPluginFromGit(input: {return { ok: false, error: 'plugin Git URL must use HTTPS or SSH' }}return serializePluginMutation(input.pluginsDir, async () => {+ // Why reuse: an install from before derived publishers keeps the key its data is stored under.+ const reinstall = await installedPublisherFor(+ input.pluginsDir,+ (source) => source.kind === 'git' && isSameGitRepository(source.url, input.url)+ )const stagingDir = await mkdtemp(join(tmpdir(), 'orca-plugin-install-'))try {const ref = input.ref.trim()@@ -100,12 +122,22 @@ export async function installPluginFromGit(input: {destination: stagingDir,workingDirectory: tmpdir()})+ // Why the declared one last: a URL with no owner segment (`host/repo.git`) names nobody.+ const publisher =+ reinstall ?? gitUrlPluginPublisher(input.url) ?? (await declaredPublisher(stagingDir))+ if (!publisher) {+ return {+ ok: false,+ error: 'cannot name a publisher for this Git URL; use one with an owner (host/owner/repo)'+ }+ }return await installStagedPluginTree({pluginsDir: input.pluginsDir,stagingDir,hostVersion: input.hostVersion,source: { kind: 'git', url: input.url, ref },resolvedCommit,+ identity: { publisher },blockedPluginReason: input.blockedPluginReason})} catch (error) {@@ -174,7 +206,7 @@ export async function installPluginFromMarketplace(input: {hostVersion: input.hostVersion,source,resolvedCommit,- expectedPluginKey: input.expectedPluginKey,+ identity: { pluginKey: input.expectedPluginKey },...(input.release ? { release: input.release } : {}),blockedPluginReason: input.blockedPluginReason,manifestError: input.manifestError@@ -219,7 +251,7 @@ export async function rollbackInstalledPlugin(input: {const inspection = await inspectPluginInstallTree({rootDir: join(pluginDir, contentHash),hostVersion: input.hostVersion,- expectedPluginKey: input.pluginKey+ identity: { pluginKey: input.pluginKey }})if (!inspection.ok || inspection.contentHash !== contentHash) {return {@@ -242,3 +274,25 @@ export async function rollbackInstalledPlugin(input: {}})}++/** Publisher of an existing install from the same source, so reinstalling keeps its key. */+async function installedPublisherFor(+ pluginsDir: string,+ sameSource: (source: PluginLockEntry['source']) => boolean+): Promise<string | null> {+ const entries = Object.values((await readPluginLockfile(pluginsDir)).plugins)+ const entry = entries.find((candidate) => sameSource(candidate.source))+ return entry ? (splitQualifiedPluginKey(entry.pluginKey)?.publisher ?? null) : null+}++async function declaredPublisher(rootDir: string): Promise<string | undefined> {+ try {+ const raw: unknown = JSON.parse(await readPluginManifestText(rootDir))+ const publisher =+ typeof raw === 'object' && raw !== null && 'publisher' in raw ? raw.publisher : undefined+ return typeof publisher === 'string' ? publisher : undefined+ } catch {+ // Why undefined: staging reports the unreadable manifest with its real error.+ return undefined+ }+}diff --git a/src/main/plugins/plugin-bundled-bootstrap.ts b/src/main/plugins/plugin-bundled-bootstrap.tsindex 67c178fd199..70b7e090785 100644--- a/src/main/plugins/plugin-bundled-bootstrap.ts+++ b/src/main/plugins/plugin-bundled-bootstrap.ts@@ -138,7 +138,7 @@ export async function bootstrapBundledPlugins(options: {const inspection = await inspectPluginInstallTree({rootDir: sourcePath,hostVersion: options.hostVersion,- expectedPluginKey: entry.pluginKey+ identity: { pluginKey: entry.pluginKey }})if (!inspection.ok) {throw new Error(inspection.error)diff --git a/src/main/plugins/plugin-discovery.ts b/src/main/plugins/plugin-discovery.tsindex 01e55c973dd..cd828fe513c 100644--- a/src/main/plugins/plugin-discovery.ts+++ b/src/main/plugins/plugin-discovery.ts@@ -11,6 +11,11 @@ import {satisfiesOrcaEngineRange,type PluginManifest} from '../../shared/plugins/manifest/plugin-manifest'+import {+ localPluginPublisher,+ withPluginPublisher+} from '../../shared/plugins/installation/plugin-publisher-derivation'+import { splitQualifiedPluginKey } from '../../shared/plugins/catalog/plugin-marketplace'import { pluginManifestCompatibilityError } from '../../shared/plugins/manifest/plugin-manifest-compatibility'import {fingerprintPluginConsent,@@ -31,6 +36,7 @@ const INSTALLED_PLUGIN_DISCOVERY_CONCURRENCY = 8export type ValidDiscoveredPlugin = {pluginKey: stringrootDir: string+ /** `publisher` is always the derived one (the install directory's or the dev folder's). */manifest: PluginManifest/** Fingerprint of the capabilities and trusted-worker execution tier. */consentFingerprint: string@@ -68,6 +74,8 @@ async function readManifestDir(rootDir: string,hostVersion: string,isDev: boolean,+ /** Installed trees take it from their directory name; dev folders derive it. */+ installedPublisher?: string,installedContentHash?: string): Promise<DiscoveredPlugin> {let rawText: string@@ -99,7 +107,10 @@ async function readManifestDir(const incompatible = pluginManifestCompatibilityError(raw, hostVersion)return { rootDir, error: incompatible ?? `invalid manifest: ${parsed.error}`, isDev }}- const manifest = parsed.manifest+ const manifest = withPluginPublisher(+ parsed.manifest,+ installedPublisher ?? localPluginPublisher(parsed.manifest.publisher)+ )const pluginKey = qualifiedPluginKey(manifest)if (!satisfiesOrcaEngineRange(hostVersion, manifest.engines.orca)) {return {@@ -182,7 +193,8 @@ async function readInstalledPlugin(}}const versionDir = join(pluginDir, contentHash)- const discovered = await readManifestDir(versionDir, hostVersion, false, contentHash)+ const publisher = splitQualifiedPluginKey(dirName)?.publisher ?? ''+ const discovered = await readManifestDir(versionDir, hostVersion, false, publisher, contentHash)if (isInvalidDiscoveredPlugin(discovered)) {return { ...discovered, pluginKey: dirName }}@@ -191,7 +203,7 @@ async function readInstalledPlugin(return {pluginKey: dirName,rootDir: versionDir,- error: `manifest identity "${discovered.pluginKey}" does not match install directory "${dirName}"`,+ error: `manifest id "${discovered.manifest.id}" does not match install directory "${dirName}"`,isDev: false}}diff --git a/src/main/plugins/plugin-example-gleam-syntax.test.ts b/src/main/plugins/plugin-example-gleam-syntax.test.tsindex cfcef7b99f6..c2a890b4310 100644--- a/src/main/plugins/plugin-example-gleam-syntax.test.ts+++ b/src/main/plugins/plugin-example-gleam-syntax.test.ts@@ -12,7 +12,7 @@ it('ships an installable Gleam syntax pack whose grammar loads', async () => {const inspection = await inspectPluginInstallTree({rootDir: root,hostVersion: PLUGIN_SCHEMA_NEWEST_SINCE,- expectedPluginKey: 'stablyai.orca-gleam-syntax'+ identity: { pluginKey: 'stablyai.orca-gleam-syntax' }})expect(inspection).toMatchObject({ ok: true })if (!inspection.ok) {diff --git a/src/main/plugins/plugin-launch-content.test.ts b/src/main/plugins/plugin-launch-content.test.tsindex e23c4efc4d3..dc47c9dfc86 100644--- a/src/main/plugins/plugin-launch-content.test.ts+++ b/src/main/plugins/plugin-launch-content.test.ts@@ -58,7 +58,7 @@ describe('Phase 1 launch plugin content', () => {const inspection = await inspectPluginInstallTree({rootDir: join(launchRoot, listing.id),hostVersion: '1.4.0',- expectedPluginKey: listing.id+ identity: { pluginKey: listing.id }})expect(inspection, `${listing.id} must pass the production install inspection`).toMatchObject({diff --git a/src/main/plugins/plugin-list-projection.ts b/src/main/plugins/plugin-list-projection.tsindex 94abe29ac51..5353af0fe55 100644--- a/src/main/plugins/plugin-list-projection.ts+++ b/src/main/plugins/plugin-list-projection.ts@@ -13,7 +13,8 @@ import { listPluginVmRecipeCommands } from '../../shared/plugins/artifacts/plugiimport {isOfficialMarketplaceGitSource,isOfficialOrganizationGitSource,- pluginSourceLabel+ pluginSourceLabel,+ splitQualifiedPluginKey} from '../../shared/plugins/catalog/plugin-marketplace'import { pluginCatalogTypes } from '../../shared/plugins/catalog/plugin-catalog-types'import { mapWithConcurrency } from '../../shared/map-with-concurrency'@@ -142,7 +143,7 @@ export async function buildPluginList(consentFingerprint: plugin.consentFingerprint,name: plugin.manifest.name,version: plugin.manifest.version,- publisher: plugin.manifest.publisher,+ publisher: splitQualifiedPluginKey(plugin.pluginKey)?.publisher ?? '',...(plugin.manifest.description ? { description: plugin.manifest.description } : {}),execution: pluginExecutionProfile(plugin.manifest),types: pluginCatalogTypes(plugin.manifest),diff --git a/src/renderer/src/components/plugins/review/PluginUpdateCandidate.tsx b/src/renderer/src/components/plugins/review/PluginUpdateCandidate.tsxindex c272b3dd16d..a8d8c5fb542 100644--- a/src/renderer/src/components/plugins/review/PluginUpdateCandidate.tsx+++ b/src/renderer/src/components/plugins/review/PluginUpdateCandidate.tsx@@ -154,7 +154,7 @@ export function AllAccess({</ul><PluginConsentProvenanceofficial={preview.official}- publisher={preview.manifest.publisher}+ publisher={preview.manifest.publisher ?? ''}source={{kind: preview.bundled ? 'bundled' : 'marketplace',reference: sourceLabel({diff --git a/src/renderer/src/components/plugins/review/PluginUpdateReview.tsx b/src/renderer/src/components/plugins/review/PluginUpdateReview.tsxindex 1a4065862fe..d97c836893b 100644--- a/src/renderer/src/components/plugins/review/PluginUpdateReview.tsx+++ b/src/renderer/src/components/plugins/review/PluginUpdateReview.tsx@@ -103,7 +103,7 @@ export function PluginUpdateReview({{notice !== 'none' ? (<PluginNotOfficialWarningnotice={notice}- publisher={preview.manifest.publisher}+ publisher={preview.manifest.publisher ?? null}moment="update"/>) : null}diff --git a/src/shared/plugins/catalog/plugin-catalog.test.ts b/src/shared/plugins/catalog/plugin-catalog.test.tsindex c2460086568..81e9de84a3a 100644--- a/src/shared/plugins/catalog/plugin-catalog.test.ts+++ b/src/shared/plugins/catalog/plugin-catalog.test.ts@@ -7,7 +7,11 @@ import {selectPluginCatalogRelease} from './plugin-catalog'import { pluginCatalogReleaseSchema } from './plugin-catalog-release'-import { PLUGIN_MARKETPLACE_ENTRY_LIMIT, pluginMarketplaceSchema } from './plugin-marketplace'+import {+ PLUGIN_MARKETPLACE_ENTRY_LIMIT,+ pluginMarketplaceListingSchema,+ pluginMarketplaceSchema+} from './plugin-marketplace'function release(version: string, minimumOrca = '1.4.0') {return pluginCatalogReleaseSchema.parse({@@ -77,6 +81,17 @@ describe('plugin catalog', () => {expect(parsed.plugins[1]?.releases.map((r) => r.version)).toEqual(['1.1.0'])})+ it('reads the owner id without carrying it into the cached listing', () => {+ const parsed = pluginCatalogSchema.parse(+ catalog([entry('acme.one', { ownerId: 1_234 }), entry('acme.two', { ownerId: 'acme' })])+ )+ expect(parsed.plugins.map((plugin) => plugin.id)).toEqual(['acme.one', 'acme.two'])+ expect(parsed.plugins[0]).not.toHaveProperty('ownerId')+ // Why strict: older Orca reads the cached listing back with this shape after a downgrade.+ const { name, owner, plugins } = parsed+ expect(pluginMarketplaceListingSchema.safeParse({ name, owner, plugins }).success).toBe(true)+ })+it('trims an oversized catalog and release list instead of refusing it', () => {const many = Array.from({ length: PLUGIN_MARKETPLACE_ENTRY_LIMIT + 5 }, (_, index) =>entry(`acme.p${index}`, {diff --git a/src/shared/plugins/catalog/plugin-catalog.ts b/src/shared/plugins/catalog/plugin-catalog.tsindex ebe482ad830..a98a3ef3e02 100644--- a/src/shared/plugins/catalog/plugin-catalog.ts+++ b/src/shared/plugins/catalog/plugin-catalog.ts@@ -10,7 +10,11 @@ import {PLUGIN_MARKETPLACE_CATEGORY_LIMIT,PLUGIN_MARKETPLACE_ENTRY_LIMIT} from './plugin-marketplace'-import { pluginFieldDoc, PLUGIN_MANIFEST_V2_SINCE } from '../manifest/plugin-schema-field-docs'+import {+ pluginFieldDoc,+ PLUGIN_DERIVED_PUBLISHER_SINCE,+ PLUGIN_MANIFEST_V2_SINCE+} from '../manifest/plugin-schema-field-docs'/*** The plugin catalog (`orca-catalog.json`). The name never changes; `catalogVersion` does, and@@ -40,6 +44,20 @@ export const pluginCatalogEntrySchema = z.object({id: marketplaceEntryFields.id,source: catalogV2GitSourceSchema,+ ownerId: z+ .number()+ .int()+ .positive()+ .max(Number.MAX_SAFE_INTEGER)+ .optional()+ .catch(undefined)+ .meta(+ pluginFieldDoc(+ "GitHub's numeric id of the repository owner, recorded the first time the plugin was listed. Names can be renamed or re-registered; this id cannot. Informational: Orca does not read it yet, and older Orca ignores it.",+ PLUGIN_DERIVED_PUBLISHER_SINCE,+ [1_234_567]+ )+ ),description: safePluginDisplayText(z.string().min(1).max(4_096)).optional().catch(undefined)@@ -123,7 +141,9 @@ export const pluginCatalogSchema = pluginCatalogDocumentSchemareturn []}seen.add(id)- return [parsed.data]+ // Why dropped: listings are cached in a strict shape that older Orca reads back after a downgrade.+ const { ownerId: _ownerId, ...entry } = parsed.data+ return [entry]})return { ...catalog, plugins }})diff --git a/src/shared/plugins/catalog/plugin-marketplace.ts b/src/shared/plugins/catalog/plugin-marketplace.tsindex 94b8f76e6a4..7ed474cc71d 100644--- a/src/shared/plugins/catalog/plugin-marketplace.ts+++ b/src/shared/plugins/catalog/plugin-marketplace.ts@@ -106,7 +106,7 @@ export const catalogV2GitSourceSchema = zconst QUALIFIED_PLUGIN_KEY_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$/export const marketplaceEntryFields = {- /** Canonical `<publisher>.<id>` identity expected in the source manifest. */+ /** Canonical `<publisher>.<id>` install identity; the manifest must carry the same `id`. */id: z.string().regex(QUALIFIED_PLUGIN_KEY_RE, 'invalid qualified plugin key')@@ -116,7 +116,7 @@ export const marketplaceEntryFields = {).meta(pluginFieldDoc(- "`<publisher>.<id>`, matching the plugin's manifest. Each half is at most 64 characters, and the reserved names `constructor` and `prototype` are refused.",+ "`<publisher>.<id>`: the publisher is the repository owner, lowercased (Orca installs under this key, whatever the manifest's deprecated `publisher` says), and the id is the manifest's `id`. Each half is at most 64 characters, and the reserved names `constructor` and `prototype` are refused.",NEXT,['acme.gleam-syntax'])diff --git a/src/shared/plugins/installation/plugin-file-validation.test.ts b/src/shared/plugins/installation/plugin-file-validation.test.tsindex 2d9727f97c0..e8e278c728f 100644--- a/src/shared/plugins/installation/plugin-file-validation.test.ts+++ b/src/shared/plugins/installation/plugin-file-validation.test.ts@@ -4,7 +4,7 @@ import {catalogFixture,v2ManifestFixture} from '../manifest/plugin-json-schema.test-fixture'-import { validatePluginFile } from './plugin-file-validation'+import { pluginManifestWarnings, validatePluginFile } from './plugin-file-validation'const VALID_RELEASE = {version: '1.0.0',@@ -26,6 +26,26 @@ describe('validatePluginFile', () => {).toEqual([expect.stringContaining('engines.orca: must be at least')])})+ it('warns, never fails, about a deprecated manifest publisher', () => {+ expect(validatePluginFile('orca-plugin.json', v2ManifestFixture())).toEqual([])+ expect(pluginManifestWarnings(v2ManifestFixture())).toEqual([+ expect.stringContaining('publisher is deprecated and ignored')+ ])+ const { publisher: _publisher, ...withoutPublisher } = v2ManifestFixture({+ engines: { orca: '>=9.0.0' }+ })+ expect(pluginManifestWarnings(withoutPublisher)).toEqual([])+ })++ it('accepts a catalog entry carrying the owner id', () => {+ expect(+ validatePluginFile(+ 'orca-catalog.json',+ catalogFixture([catalogEntryFixture({ ownerId: 42 })])+ )+ ).toEqual([])+ })+it('turns every runtime repair of a catalog into an error', () => {const errors = validatePluginFile('orca-catalog.json',diff --git a/src/shared/plugins/installation/plugin-file-validation.ts b/src/shared/plugins/installation/plugin-file-validation.tsindex 3d36aa2336d..5d3e8f22230 100644--- a/src/shared/plugins/installation/plugin-file-validation.ts+++ b/src/shared/plugins/installation/plugin-file-validation.ts@@ -20,6 +20,7 @@ import {type PluginImageKind} from '../images/plugin-image-fields'import { formatPluginSchemaIssues } from '../manifest/plugin-schema-issues'+import { PLUGIN_DERIVED_PUBLISHER_SINCE } from '../manifest/plugin-schema-field-docs'import {UNSAFE_PLUGIN_DISPLAY_TEXT_MESSAGE,unsafePluginDisplayTextPaths@@ -43,7 +44,10 @@ export function validatePluginFile(if (!parsed.ok) {return [parsed.error]}- const reserved = reservedPublisherError(parsed.manifest.publisher)+ const reserved =+ parsed.manifest.publisher === undefined+ ? null+ : reservedPublisherError(parsed.manifest.publisher)return reserved ? [`publisher: ${reserved}`] : []}if (fileName === PLUGIN_CATALOG_FILENAME) {@@ -54,6 +58,17 @@ export function validatePluginFile(]}+/** Advice that never blocks a listing: deprecated fields that still work. */+export function pluginManifestWarnings(raw: unknown): string[] {+ const parsed = parsePluginManifest(raw)+ if (!parsed.ok || parsed.manifest.manifestVersion !== 2 || !parsed.manifest.publisher) {+ return []+ }+ return [+ `publisher is deprecated and ignored: Orca derives it from the repository owner, like a Go module path. Remove it once engines.orca is at least >=${PLUGIN_DERIVED_PUBLISHER_SINCE}; until then it must equal the repository owner`+ ]+}+// Why stablyai passes: install alone knows the catalog, and only the official one may use it.function reservedPublisherError(publisher: string): string | null {return isReservedPluginPublisher(publisher) && publisher !== OFFICIAL_PLUGIN_PUBLISHERdiff --git a/src/shared/plugins/installation/plugin-host-version.ts b/src/shared/plugins/installation/plugin-host-version.tsindex 228a3c77110..6cee859e2d6 100644--- a/src/shared/plugins/installation/plugin-host-version.ts+++ b/src/shared/plugins/installation/plugin-host-version.ts@@ -1,13 +1,16 @@import { satisfiesOrcaEngineRange } from '../manifest/plugin-manifest-engine-range'import {+ PLUGIN_DERIVED_PUBLISHER_SINCE,PLUGIN_MANIFEST_V2_SINCE,PLUGIN_SCHEMA_SINCE_V1} from '../manifest/plugin-schema-field-docs'/** The newest "since" this build's schemas cite: everything up to it is readable here. */-export const PLUGIN_SCHEMA_NEWEST_SINCE = [PLUGIN_SCHEMA_SINCE_V1, PLUGIN_MANIFEST_V2_SINCE].reduce(- (newest, version) => (satisfiesOrcaEngineRange(version, `>=${newest}`) ? version : newest)-)+export const PLUGIN_SCHEMA_NEWEST_SINCE = [+ PLUGIN_SCHEMA_SINCE_V1,+ PLUGIN_MANIFEST_V2_SINCE,+ PLUGIN_DERIVED_PUBLISHER_SINCE+].reduce((newest, version) => (satisfiesOrcaEngineRange(version, `>=${newest}`) ? version : newest))/*** The version plugins are gated against. Why not the app version alone: development and localdiff --git a/src/shared/plugins/installation/plugin-publisher-derivation.test.ts b/src/shared/plugins/installation/plugin-publisher-derivation.test.tsnew file mode 100644index 00000000000..966a3786aed--- /dev/null+++ b/src/shared/plugins/installation/plugin-publisher-derivation.test.ts@@ -0,0 +1,33 @@+import { describe, expect, it } from 'vitest'+import {+ gitUrlPluginPublisher,+ localPluginPublisher,+ withPluginPublisher+} from './plugin-publisher-derivation'++describe('plugin publisher derivation', () => {+ it('names a Git URL after its owner, lowercased', () => {+ expect(gitUrlPluginPublisher('https://github.com/Acme/gleam.git')).toBe('acme')+ expect(gitUrlPluginPublisher('[email protected]:Acme/gleam.git')).toBe('acme')+ expect(gitUrlPluginPublisher('ssh://[email protected]/acme/tools/gleam.git')).toBe('acme')+ expect(gitUrlPluginPublisher('https://gitlab.com/john.doe__x/gleam.git')).toBe('john-doe-x')+ })++ it('names nobody when the URL has no usable owner', () => {+ expect(gitUrlPluginPublisher('ssh://[email protected]/gleam.git')).toBeNull()+ expect(gitUrlPluginPublisher('https://github.com/constructor/gleam.git')).toBeNull()+ expect(gitUrlPluginPublisher('file:///tmp/acme/gleam')).toBeNull()+ })++ it('keeps a folder on its declared publisher while deprecated, else local', () => {+ expect(localPluginPublisher('acme')).toBe('acme')+ expect(localPluginPublisher(undefined)).toBe('local')+ })++ it('overrides whatever publisher the manifest declared', () => {+ expect(withPluginPublisher({ id: 'gleam', publisher: 'brand' }, 'acme')).toEqual({+ id: 'gleam',+ publisher: 'acme'+ })+ })+})diff --git a/src/shared/plugins/installation/plugin-publisher-derivation.ts b/src/shared/plugins/installation/plugin-publisher-derivation.tsnew file mode 100644index 00000000000..3b171877a38--- /dev/null+++ b/src/shared/plugins/installation/plugin-publisher-derivation.ts@@ -0,0 +1,39 @@+import { isSafePluginId } from './plugin-id-format'+import { parseGitRepositoryIdentity } from '../catalog/plugin-marketplace'++/**+ * Orca names a plugin's publisher after where the plugin comes from, the way a Go module path is+ * its repository path: a catalog listing names it (Stably's catalogs use the repository owner), a+ * Git URL install uses the URL's owner, and a local folder uses `local`. The manifest's own+ * `publisher` is deprecated and never decides identity for a catalog or Git install.+ */+export const LOCAL_PLUGIN_PUBLISHER = 'local'++/** Repository owner of a Git URL as a publisher slug (`github.com/Acme/x` → `acme`). */+export function gitUrlPluginPublisher(url: string): string | null {+ const owner = parseGitRepositoryIdentity(url)?.owner+ if (!owner) {+ return null+ }+ // Why fold `.` and `_`: GitLab allows them in owner names, plugin slugs do not.+ const slug = owner+ .toLowerCase()+ .replace(/[._]+/g, '-')+ .replace(/-{2,}/g, '-')+ .replace(/^-+|-+$/g, '')+ return isSafePluginId(slug) ? slug : null+}++/** Local and dev folders keep a declared publisher while it is deprecated, so existing dev+ * setups keep their identity, approvals and storage; otherwise they are `local`. */+export function localPluginPublisher(declared: string | undefined): string {+ return declared ?? LOCAL_PLUGIN_PUBLISHER+}++/** The manifest as Orca uses it: `publisher` is the derived one, whatever the file declared. */+export function withPluginPublisher<Manifest extends { publisher?: string }>(+ manifest: Manifest,+ publisher: string+): Manifest & { publisher: string } {+ return { ...manifest, publisher }+}diff --git a/src/shared/plugins/manifest/plugin-manifest-v2-rules.test.ts b/src/shared/plugins/manifest/plugin-manifest-v2-rules.test.tsindex 69d91fea768..95bf0ad659c 100644--- a/src/shared/plugins/manifest/plugin-manifest-v2-rules.test.ts+++ b/src/shared/plugins/manifest/plugin-manifest-v2-rules.test.ts@@ -4,7 +4,10 @@ import { pluginEngineFloor } from './plugin-engine-floor'import { PLUGIN_ENUM_SINCE_KEY } from './plugin-engine-floor-keys'import { PLUGIN_SCHEMA_NEWEST_SINCE, pluginHostVersion } from '../installation/plugin-host-version'import { parseHostPluginManifest, parsePluginManifest } from './plugin-manifest'-import { PLUGIN_MANIFEST_V2_SINCE } from './plugin-schema-field-docs'+import {+ PLUGIN_DERIVED_PUBLISHER_SINCE,+ PLUGIN_MANIFEST_V2_SINCE+} from './plugin-schema-field-docs'import { PLUGIN_RESERVED_CONTRIBUTION_POINTS } from '../contributions/plugin-contribution-points'function v2(overrides: Record<string, unknown> = {}): Record<string, unknown> {@@ -21,6 +24,22 @@ function v2(overrides: Record<string, unknown> = {}): Record<string, unknown> {}describe('manifest format 2 rules', () => {+ it('lets publisher be left out only where older Orca will say it needs a newer one', () => {+ const { publisher: _publisher, ...withoutPublisher } = v2()+ expect(parsePluginManifest(withoutPublisher)).toEqual({+ ok: false,+ error: `engines.orca: must be at least >=${PLUGIN_DERIVED_PUBLISHER_SINCE} when publisher is left out, because older Orca requires publisher`+ })+ expect(+ parsePluginManifest({+ ...withoutPublisher,+ engines: { orca: `>=${PLUGIN_DERIVED_PUBLISHER_SINCE}` }+ })+ ).toMatchObject({ ok: true })+ // Why the host still reads it: the floor only exists for older hosts.+ expect(parseHostPluginManifest(withoutPublisher)).toMatchObject({ ok: true })+ })+it('defaults pluginApi and refuses it where no code calls the host API', () => {expect(parsePluginManifest(v2())).toMatchObject({ ok: true })expect(parsePluginManifest(v2({ pluginApi: 1 }))).toEqual({diff --git a/src/shared/plugins/manifest/plugin-manifest-v2-rules.ts b/src/shared/plugins/manifest/plugin-manifest-v2-rules.tsindex 12f075a03eb..72dedfd5696 100644--- a/src/shared/plugins/manifest/plugin-manifest-v2-rules.ts+++ b/src/shared/plugins/manifest/plugin-manifest-v2-rules.ts@@ -5,6 +5,8 @@ import {type PluginExecutionProfile} from '../contributions/plugin-execution-profile'import { pluginCapabilityReachable } from '../capabilities/plugin-capability-reach'+import { orcaEngineRangeSchema, satisfiesOrcaEngineRange } from './plugin-manifest-engine-range'+import { PLUGIN_DERIVED_PUBLISHER_SINCE } from './plugin-schema-field-docs'type V2RuleSubject = {execution: PluginExecutionProfile@@ -34,3 +36,23 @@ export function validatePluginManifestV2Rules(manifest: V2RuleSubject, ctx: Refi}})}++/** Why authoring only: Orca before PLUGIN_DERIVED_PUBLISHER_SINCE requires `publisher`, so a+ * manifest without it must say "requires Orca X" there instead of failing to parse. */+export function validateOmittedPublisherFloor(+ manifest: { publisher?: string; engines: { orca: string } },+ ctx: RefinementCtx+): void {+ if (+ manifest.publisher !== undefined ||+ !orcaEngineRangeSchema.safeParse(manifest.engines.orca).success ||+ satisfiesOrcaEngineRange(manifest.engines.orca.slice(2), `>=${PLUGIN_DERIVED_PUBLISHER_SINCE}`)+ ) {+ return+ }+ ctx.addIssue({+ code: 'custom',+ path: ['engines', 'orca'],+ message: `must be at least >=${PLUGIN_DERIVED_PUBLISHER_SINCE} when publisher is left out, because older Orca requires publisher`+ })+}diff --git a/src/shared/plugins/manifest/plugin-manifest.ts b/src/shared/plugins/manifest/plugin-manifest.tsindex 02fd47e3519..23cd250ce38 100644--- a/src/shared/plugins/manifest/plugin-manifest.ts+++ b/src/shared/plugins/manifest/plugin-manifest.ts@@ -15,13 +15,17 @@ import { pluginManifestDetailFields } from '../catalog/plugin-detail-fields'import { PLUGIN_ICON_RULE_TEXT, pluginManifestImageFields } from '../images/plugin-image-fields'import { validatePluginManifestContributions } from './plugin-manifest-contribution-validation'import { validatePluginEngineFloor } from './plugin-engine-floor'-import { validatePluginManifestV2Rules } from './plugin-manifest-v2-rules'+import {+ validateOmittedPublisherFloor,+ validatePluginManifestV2Rules+} from './plugin-manifest-v2-rules'import { upgradePluginManifestV1Names } from './plugin-manifest-v1-names'import { formatPluginSchemaIssues } from './plugin-schema-issues'import { pluginApiMajorSchema } from '../workers/plugin-host-api-major'import {pluginFieldDoc,pluginPathFieldDoc,+ PLUGIN_DERIVED_PUBLISHER_SINCE,PLUGIN_MANIFEST_V2_SINCE,PLUGIN_SCHEMA_SINCE_V1} from './plugin-schema-field-docs'@@ -76,7 +80,7 @@ const enginesDoc = pluginFieldDoc(const pluginManifestFields = {id: pluginIdSchema.meta(pluginFieldDoc(- 'Plugin id, kebab-case. The install identity is `<publisher>.<id>`. The reserved names `constructor` and `prototype` are refused.',+ 'Plugin id, kebab-case. The install identity is `<publisher>.<id>`, where Orca derives the publisher from the repository owner. The reserved names `constructor` and `prototype` are refused.',V1,['gleam-syntax'])@@ -167,6 +171,15 @@ export const pluginManifestV2Object = z)),...pluginManifestFields,+ // Why optional: Orca derives the publisher (plugin-publisher-derivation.ts), so a value is ignored.+ publisher: pluginIdSchema.optional().meta({+ deprecated: true,+ ...pluginFieldDoc(+ `Deprecated: leave it out. Orca derives the publisher from where the plugin comes from, the way a Go module is named by its repository path: the repository owner for the official and community catalogs and for Git URL installs (\`acme\` for \`github.com/acme/gleam-syntax\`), and \`local\` for a folder. A value here is ignored for catalog and Git installs. Leaving it out needs \`engines.orca\` of at least \`>=${PLUGIN_DERIVED_PUBLISHER_SINCE}\`, because older Orca requires it; if you keep it for older Orca, it must equal the repository owner. Reserved owners (\`stablyai\`, \`official\`, \`anthropic\`, \`openai\`, \`github\` and any starting \`orca\`) and ids starting \`orca-\` install only from Orca's official catalog.`,+ V1,+ ['acme']+ )+ }),...pluginManifestImageFields,// Why strict here too: format 2 refuses unknown keys at every level; format 1 never did.author: z.strictObject(authorFields).optional().meta(authorDoc),@@ -194,6 +207,7 @@ function buildPluginManifestSchema(enforceEngineFloor: boolean) {validatePluginManifestV2Rules(manifest, ctx)if (enforceEngineFloor) {validatePluginEngineFloor(pluginManifestV2Object, manifest, ctx)+ validateOmittedPublisherFloor(manifest, ctx)}})])@@ -206,7 +220,10 @@ export const pluginManifestSchema = buildPluginManifestSchema(true)// parses every field and meets engines.orca runs the plugin fine, so refusing it strands installs.const hostPluginManifestSchema = buildPluginManifestSchema(false)+/** The manifest file as written; format 2 may leave `publisher` out. */export type PluginManifest = z.infer<typeof pluginManifestSchema>+/** A manifest whose `publisher` Orca derived from its source (withPluginPublisher). */+export type PluginManifestWithPublisher = PluginManifest & { publisher: string }export {PLUGIN_PANEL_LIMIT,type PluginPanelContribution@@ -230,8 +247,9 @@ export {export const PLUGIN_MANIFEST_FILENAME = 'orca-plugin.json'-/** Canonical install identity: `<publisher>.<id>` (also the install dir name). */-export function qualifiedPluginKey(manifest: Pick<PluginManifest, 'publisher' | 'id'>): string {+/** Canonical install identity: `<publisher>.<id>` (also the install dir name). The publisher+ * must be the derived one, never the file's own. */+export function qualifiedPluginKey(manifest: { publisher: string; id: string }): string {return `${manifest.publisher}.${manifest.id}`}diff --git a/src/shared/plugins/manifest/plugin-schema-field-docs.ts b/src/shared/plugins/manifest/plugin-schema-field-docs.tsindex d9f092f582b..8003bc34d63 100644--- a/src/shared/plugins/manifest/plugin-schema-field-docs.ts+++ b/src/shared/plugins/manifest/plugin-schema-field-docs.ts@@ -3,6 +3,8 @@export const PLUGIN_SCHEMA_SINCE_V1 = '1.4.160'/** First release planned to read manifest v2, the v2 catalog and their new fields. */export const PLUGIN_MANIFEST_V2_SINCE = '1.4.245'+/** First release that derives the publisher, so a format 2 manifest may leave `publisher` out. */+export const PLUGIN_DERIVED_PUBLISHER_SINCE = '1.4.246'type PluginFieldDoc = {description: stringdiff --git a/src/shared/plugins/manifest/plugin-schema-policy-notes.ts b/src/shared/plugins/manifest/plugin-schema-policy-notes.tsindex 10763da6c87..be070779538 100644--- a/src/shared/plugins/manifest/plugin-schema-policy-notes.ts+++ b/src/shared/plugins/manifest/plugin-schema-policy-notes.ts@@ -50,7 +50,8 @@ export const PLUGIN_CATALOG_POLICY_NOTES: readonly string[] = ['','## Publisher names and trust','',- '- **Publisher is the repository owner.** The official and community catalogs list a plugin only when its `publisher` equals the GitHub or GitLab user or organization that owns its repository (`acme` for `github.com/acme/gleam-syntax`). Their CI enforces this; Orca does not check it for catalogs you add yourself.',+ "- **Publisher is the repository owner.** Like a Go module path, a plugin's publisher is where it lives, never what its manifest says: the official and community catalogs set each entry's `id` to `<owner>.<manifest id>` from the GitHub user or organization that owns the repository (`acme` for `github.com/acme/gleam-syntax`), and Orca installs under that `id`. A Git URL install uses the URL's owner and a folder uses `local`. The manifest's `publisher` is deprecated and ignored. Orca does not check the owner for catalogs you add yourself; their `id` is what they say.",+ '- **Listed names are pinned to GitHub ids.** The community catalog records the numeric owner and repository ids when a plugin is first listed, pauses new versions after a rename or transfer until Stably confirms it, and refuses a repository that was deleted and recreated under the same name. Each listed version is permanent: a moved tag never replaces it.',"- **Reserved names install only from Orca's official catalog.** The publishers `stablyai`, `official`, `anthropic`, `openai`, `github` and any starting `orca` (any case), and ids starting `orca-`, are refused from any other catalog, a Git URL or a local folder. A catalog that lists one is refused whole. `pnpm validate:plugin` rejects these publishers except `stablyai`.","- **Trust comes from the catalog's address.** Orca labels a plugin with where it came from: the Official mark for Orca's catalog, otherwise the catalog's name and the owner in its Git URL (`github.com/acme`, `gitlab.com/acme/tools`), never the manifest's text. Development folders show `Dev · unverified`, Git URL installs `Unverified`.",'- **An install stays with its catalog.** Orca records the catalog each plugin was installed from and updates it only from there. When another catalog lists the same id, the plugin page says so, and switching means removing the plugin and installing it again.',