ApiModule · packages/server/src/http/routes/plugins.ts:785

PluginRegistryRoutes

component

The index the Plugins page reads: deployment-global, like the skill library. The published document rides the swap: the successor's cache starts from what the last App fetched, so a refresh that fails right after a push still lists what was known instead of reporting the source unreachable.

API

@Component({
  contributes: {
    "HttpModule.routes": [
      {
        id: "PluginRegistryRoutes.routes",
        prefix: "/api/plugins/registry",
        auth: "user",
        order: 69,
      },
    ],
  },
  context: {
    version: 2,
    schema: {
      "index?": {
        at: "number",
        entries: "unknown[]",
        "url?": "string",
        "mirrorsKey?": "string",
        "effectiveBase?": "string",
      },
    },
  },
})
export class PluginRegistryRoutes {
  @Use() private readonly config!: Config;
  @Use() private readonly hmr!: Hmr;
  @Use() private readonly sources!: IndexSources;
  @Bind("PluginRegistryRoutes.routes") routes!: Hono<AppEnv>;
  setup(_ctx: ClassCtx, context: Json);
  park(): Json;
}

Dependencies & Wiring

Extracted from class decorators
@Userequires (3)
config: Config · hmr: Hmr · sources: IndexSources
@Bindbinds (1)
routes → PluginRegistryRoutes.routes: Hono<AppEnv>

Parked Context

context: {
    version: 2,
    schema: {
      "index?": {
        at: "number",
        entries: "unknown[]",
        "url?": "string",
        "mirrorsKey?": "string",
        "effectiveBase?": "string",
      },
    },
  }

Contributes

{
  "HttpModule.routes": [
    {
      "id": "PluginRegistryRoutes.routes",
      "prefix": "/api/plugins/registry",
      "auth": "user",
      "order": 69
    }
  ]
}

Target slots: HttpModule.routes · View HTTP endpoints (4) →

Methods (2)

setup

setup(_ctx: ClassCtx, context: Json)
@param_ctxClassCtx
@paramcontextJson

park

park(): Json
@returnsJson