Skip to content

Expose ensureTable on Scope for handleApplication (plugin API parity) #607

@kriszyp

Description

@kriszyp

The new plugin API's handleApplication(scope) (introduced by HarperFast/harper#383) is the replacement for the old start / startOnMainThread extension hooks. Those hooks received ensureTable as an argument (see components/componentLoader.ts:464 and :493). The new Scope passed to handleApplication does not expose ensureTable, so plugins migrating from the old API lose this capability.

Reference

  • ensureTable is defined at components/componentLoader.ts:404:
    const ensureTable = (options: any) => {
        options.origin = origin;
        return table(options);
    };
  • It's passed to both startOnMainThread (line 464) and the worker-thread start invocation (line 493).
  • It's not on Scope (see components/Scope.ts).
  • Customer impact: the acl-connect extension uses ensureTable today and would lose functionality on migration.

Ask

Expose ensureTable as scope.ensureTable (or similar — match the existing Scope API convention) so it's available inside handleApplication.

Acceptance criteria

  • scope.ensureTable(options) works inside handleApplication with the same semantics as the legacy ensureTable argument (origin propagation + table creation).
  • Documented as part of the plugin API.
  • acl-connect (or an equivalent test plugin) can be migrated to the new API without losing the ensureTable capability.

Tracked in Jira: CORE-2953

🤖 Filed by Claude on behalf of Kris.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:componentsComponents / applications subsystemenhancementNew feature or requestfrom-jiraMigrated or originated from a Jira ticket

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions