feat: look up local row ids by sync id for the sync plugin (Plugin-Sync#4)

This commit is contained in:
LukeGus committed 2026-10-29 12:49:47 -05:00
1 parent 691896db2d
commit 8d26c716b4
6 files changed
+54 -3

No files matched your search

+1
View File
@@ -10,6 +10,7 @@ Plugin API 1.13.0.
- `termix-plugin build` bundles `src/mobile` into the `contributes.mobile.entry` file, and `validate` checks that it exists
- `@termix-ssh/plugin-sdk/frame-host` runs one plugin view outside the shell, with core's bridge, registries and CSS, so the mobile app can show `webview` plugins
- SSH transport providers get the host's owner, sync id, connection origin and local only flag in `claims` and `open`, and core's SSH relay takes a `syncId` instead of a host id
- `ctx.sync.host.entities.idsOf` maps sync ids to the local ids of the user's own rows of one type
### Fixed
+6
View File
@@ -470,6 +470,12 @@ export interface PluginSyncHost {
ensureCore: () => Promise<void>;
onChanged: (listener: () => void) => () => void;
onLocalWrite: (listener: () => void) => () => void;
/** Local ids of the user's own rows of a type, by sync id. Termix 26.10.6+. */
idsOf?: (
type: string,
userId: string,
syncIds: string[],
) => Promise<Record<string, number>>;
};
/** Rows and bookkeeping of one local user's replica. */