paperclipai/paperclip · error · Error

Plugin "${pluginId}" must not include the "plugin." prefix w

Error message

Plugin "${pluginId}" must not include the "plugin." prefix when emitting events. Emit the bare event name (e.g. "sync-done") and the bus will namespace it automatically.

What it means

Error "Plugin "${pluginId}" must not include the "plugin." prefix when emitting events. Emit the bare event name (e.g. "sync-done") and the bus will namespace it automatically." thrown in paperclipai/paperclip.

Source

Thrown at server/src/services/plugin-event-bus.ts:261

       * prefixed with `plugin.<pluginId>.` so:
       * - `emit("sync-done", payload)` becomes `"plugin.acme.linear.sync-done"`.
       *
       * Requires the `events.emit` capability (enforced by the host layer).
       *
       * @throws {Error} if `name` already contains the `plugin.` prefix
       *   (prevents cross-namespace spoofing).
       */
      async emit(name: string, companyId: string, payload: unknown): Promise<PluginEventBusEmitResult> {
        if (!name || name.trim() === "") {
          throw new Error(`Plugin "${pluginId}" must provide a non-empty event name.`);
        }

        if (!companyId || companyId.trim() === "") {
          throw new Error(`Plugin "${pluginId}" must provide a companyId when emitting events.`);
        }

        if (name.startsWith("plugin.")) {
          throw new Error(
            `Plugin "${pluginId}" must not include the "plugin." prefix when emitting events. ` +
            `Emit the bare event name (e.g. "sync-done") and the bus will namespace it automatically.`,
          );
        }

        const eventType = `plugin.${pluginId}.${name}` as const;
        const event: PluginEvent = {
          eventId: crypto.randomUUID(),
          eventType,
          companyId,
          occurredAt: new Date().toISOString(),
          actorType: "plugin",
          actorId: pluginId,
          payload,
        };

        return emit(event);
      },

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Emit the bare event name (e.g. "sync-done") without the "plugin." prefix; the bus namespaces it automatically.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/plugin-event-bus.ts:261 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/3e023eb9a72256e8. Report an issue: GitHub.