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.
The new plugin API's
handleApplication(scope)(introduced by HarperFast/harper#383) is the replacement for the oldstart/startOnMainThreadextension hooks. Those hooks receivedensureTableas an argument (seecomponents/componentLoader.ts:464and:493). The newScopepassed tohandleApplicationdoes not exposeensureTable, so plugins migrating from the old API lose this capability.Reference
ensureTableis defined atcomponents/componentLoader.ts:404:startOnMainThread(line 464) and the worker-threadstartinvocation (line 493).Scope(seecomponents/Scope.ts).acl-connectextension usesensureTabletoday and would lose functionality on migration.Ask
Expose
ensureTableasscope.ensureTable(or similar — match the existing Scope API convention) so it's available insidehandleApplication.Acceptance criteria
scope.ensureTable(options)works insidehandleApplicationwith the same semantics as the legacyensureTableargument (origin propagation + table creation).acl-connect(or an equivalent test plugin) can be migrated to the new API without losing theensureTablecapability.Tracked in Jira: CORE-2953
🤖 Filed by Claude on behalf of Kris.