T-D2SL-appframe-contracts
Status: closed/done · Impact: high · Complexity: large
Replace the determined couplings in the moved frame with host-injected contracts so any host can supply its own domain. Per the design the contribution registry stays shared (both hosts register manifests), so the injected surface is small: a settings transport, a token contract, and deep-link scheme plus product config. The active-context resolver is derived from manifest-declared base routes rather than injected.
| Location | Role today |
|---|---|
packages/ts/app-frame/app/composables/useContributions.ts | Neutral registry, but ingests @determined/platform manifest types. |
packages/ts/app-frame/app/composables/useTransport.ts | Imports @determined/platform/transport (domain client); env-switches IPC vs HTTP. |
packages/ts/app-frame/app/composables/useKeybindings.ts | Gates context-scoped commands via a hardcoded /apps/<id> route regex. |
packages/ts/app-frame/app/utils/deepLinks.ts | Hardcodes the determined:// scheme. |
Proposed
Section titled “Proposed”The frame defines framework-free contracts. A neutralized module manifest (defineModule) bundles
nav, commands, context-menus, settings, and deep-links, each manifest declaring its base route; both
hosts register their own manifests, and the frame derives the active context by matching the current
route against manifest base routes (no injected resolver). A minimal SettingsTransport
(settingGetNamespace, settingSetNamespace) is the only transport surface the frame uses; the
IPC/HTTP env-switch stays in the frame and the host injects its full (ontogen-generated) client,
which structurally satisfies the interface. Deep-link scheme and product name/tagline become config
values.
Approach
Section titled “Approach”- Factor the manifest/contribution types into the frame (framework-free), rename
experiencetomodule, add abaseRoutefield, and drop the@determined/platformimport. - Derive active-context in
useKeybindingsfrom manifest base routes; remove the/apps/<id>regex. - Define
SettingsTransportand inject the client (replace the@determined/platform/transportimport); keep the env-switch generic. - Make the deep-link scheme and product config injected/config values.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
packages/ts/app-frame/app/composables/useContributions.ts | modify | neutral manifest types + base route; drop platform import |
packages/ts/app-frame/app/composables/useTransport.ts | modify | inject SettingsTransport; keep the env-switch |
packages/ts/app-frame/app/composables/useKeybindings.ts | modify | derive active context from manifest routes |
packages/ts/app-frame/app/utils/deepLinks.ts | modify | deep-link scheme as config |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: The frame has no
@determined/*import; the domain client is injected and the settings surface is the minimalSettingsTransport. - AC-2: Context-scoped keybindings gate on manifest-declared base routes, with no
/apps/<id>hardcode. - AC-3: Deep-link scheme and product config are host-supplied.
Out of scope
Section titled “Out of scope”- Wiring determined onto the contracts — T-7BIN-appframe-determined-adapter.
- Token neutralization — T-21FI-appframe-neutralize-tokens.