paperclipai/paperclip · error · CapabilityDeniedError

CAPABILITY_DENIED

CAPABILITY_DENIED

Error message

Plugin "${pluginId}" is missing required capability "${required}" for method "${method}"

What it means

Error "Plugin "${pluginId}" is missing required capability "${required}" for method "${method}"" thrown in paperclipai/paperclip.

Source

Thrown at packages/plugins/sdk/src/host-client-factory.ts:681

      return scopedCompanyId;
    }

    if (scopedCompanyId) return scopedCompanyId;

    throw new InvocationScopeDeniedError(pluginId, method, "company context is required");
  }

  /**
   * Assert that the plugin has the required capability for a method.
   * Throws `CapabilityDeniedError` if the capability is missing.
   */
  function requireCapability(
    method: WorkerToHostMethodName,
  ): void {
    const required = METHOD_CAPABILITY_MAP[method];
    if (required === null) return; // No capability required
    if (capabilitySet.has(required)) return;
    throw new CapabilityDeniedError(pluginId, method, required);
  }

  /**
   * Create a capability-gated proxy handler for a method.
   *
   * @param method - The RPC method name (used for capability lookup)
   * @param handler - The actual handler implementation
   * @returns A wrapper that checks capabilities before delegating
   */
  function gated<M extends WorkerToHostMethodName>(
    method: M,
    handler: HostHandler<M>,
  ): HostHandler<M> {
    return async (params: WorkerToHostMethods[M][0], context?: WorkerHostCallContext) => {
      requireCapability(method);
      requireInvocationCompanyScope(method, params, context);
      return handler(params, context);
    };

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Declare the required capability in the plugin manifest and reinstall/approve the plugin.

When it happens

Trigger: Thrown at packages/plugins/sdk/src/host-client-factory.ts:681 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/6bfc8acb1f201f62. Report an issue: GitHub.