gdc-sdk-node-ts 0.9.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +153 -2
  2. package/dist/backend-profile-runtime.d.ts +214 -0
  3. package/dist/backend-profile-runtime.js +436 -0
  4. package/dist/consent-claim-helpers.d.ts +2 -1
  5. package/dist/constants/lifecycle.d.ts +1 -0
  6. package/dist/constants/lifecycle.js +2 -0
  7. package/dist/gdc-session-bridge.js +6 -2
  8. package/dist/host-onboarding.d.ts +6 -39
  9. package/dist/host-onboarding.js +8 -38
  10. package/dist/index.d.ts +5 -0
  11. package/dist/index.js +5 -0
  12. package/dist/individual-controller-backend-runtime.d.ts +46 -0
  13. package/dist/individual-controller-backend-runtime.js +53 -0
  14. package/dist/individual-onboarding.d.ts +1 -0
  15. package/dist/individual-onboarding.js +1 -0
  16. package/dist/individual-start.d.ts +1 -10
  17. package/dist/legacy-compat.d.ts +2 -0
  18. package/dist/legacy-compat.js +1 -0
  19. package/dist/node-runtime-client.d.ts +141 -10
  20. package/dist/node-runtime-client.js +337 -26
  21. package/dist/orchestration/client-port.d.ts +46 -2
  22. package/dist/orchestration/host-onboarding-sdk.d.ts +16 -4
  23. package/dist/orchestration/host-onboarding-sdk.js +22 -1
  24. package/dist/orchestration/individual-controller-sdk.d.ts +41 -1
  25. package/dist/orchestration/individual-controller-sdk.js +58 -0
  26. package/dist/orchestration/organization-controller-sdk.d.ts +79 -2
  27. package/dist/orchestration/organization-controller-sdk.js +101 -0
  28. package/dist/orchestration/personal-sdk.d.ts +19 -1
  29. package/dist/orchestration/personal-sdk.js +36 -0
  30. package/dist/orchestration/professional-sdk.d.ts +6 -1
  31. package/dist/orchestration/professional-sdk.js +7 -0
  32. package/dist/order-offer-summary.d.ts +6 -0
  33. package/dist/order-offer-summary.js +11 -0
  34. package/dist/organization-license-order.d.ts +40 -0
  35. package/dist/organization-license-order.js +42 -0
  36. package/dist/resource-operations.d.ts +204 -1
  37. package/dist/resource-operations.js +213 -14
  38. package/dist/session.js +1 -1
  39. package/package.json +17 -4
package/README.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # gdc-sdk-node-ts
2
2
 
3
+ See [ARCHITECTURE.md](./ARCHITECTURE.md) and
4
+ [CONTRIBUTING.md](./CONTRIBUTING.md) before adding node runtime facades,
5
+ execution adapters, or orchestration tests.
6
+
7
+ Short rule:
8
+
9
+ - `101` tests must read like executable tutorials
10
+ - shared fixtures/types belong in `gdc-common-utils-ts`, not as local literals
11
+ in node runtime tests
12
+
3
13
  Node runtime package for consuming the shared GDC SDK contracts against real
4
14
  gateway backends.
5
15
 
@@ -14,6 +24,24 @@ Use this package when your backend needs to:
14
24
  This package is for runtime execution. It is not the place where the canonical
15
25
  business contract is defined.
16
26
 
27
+ Important test-harness boundary:
28
+
29
+ - `gdc-sdk-node-ts` is not the product BFF
30
+ - the live E2E suite simulates a controlled `virtual API` with a BFF-like role
31
+ only to validate GW CORE lifecycles end to end
32
+ - the current live suites run with the future `user job manager` queue disabled,
33
+ so every high-level call goes directly through that controlled `virtual API`
34
+ - app-side job queues, offline retry, local vault/read models, and the future
35
+ user job manager are separate follow-up concerns
36
+
37
+ Important live-run rule:
38
+
39
+ - the canonical live E2E result must come from the user's real terminal/TTY
40
+ - do not assume an AI agent sandbox has equivalent localhost, Docker, DNS, or
41
+ GCP connectivity
42
+ - if sandboxed runs disagree with the user's terminal, trust the user's
43
+ terminal for live GW validation
44
+
17
45
  Architectural rule:
18
46
 
19
47
  - shared contracts and actor boundaries come from `gdc-sdk-core-ts`
@@ -28,6 +56,22 @@ If you are integrating this package for the first time, open these in order:
28
56
  1. [gdc-sdk-core-ts/docs/101-SDK_PACKAGE_BOUNDARIES.md](https://github.com/Global-DataCare/gdc-sdk-core-ts/blob/main/docs/101-SDK_PACKAGE_BOUNDARIES.md)
29
57
  Why `core`, `node`, and `front` are separate packages, what belongs in each
30
58
  one, and why actor-scoped facades must stay aligned across runtimes.
59
+ 1. [tests/101-backend-profile-runtime.test.mjs](./tests/101-backend-profile-runtime.test.mjs)
60
+ Minimal backend-generic walkthrough for loading one actor profile,
61
+ registering one trusted device/runtime context, connecting to one subject
62
+ index, reading one subject index composition, and then materializing the
63
+ `IndividualController` facade from the loaded backend session.
64
+ That walkthrough now uses the concrete direct backend runtime over the
65
+ injected `RuntimeClient`, not only one abstract adapter mock, and now also
66
+ demonstrates in-memory `JobManager` usage plus `closeProfile(...)`.
67
+ 1. [tests/101-individual-controller-backend-runtime.test.mjs](./tests/101-individual-controller-backend-runtime.test.mjs)
68
+ First pragmatic backend wrapper over the generic profile runtime for the
69
+ current individual-controller CORE baseline:
70
+ load profile, start registration, confirm order, and search the clinical
71
+ index.
72
+ 1. [docs/V2_INDIVIDUAL_REGISTRATION_RECONCILIATION.md](./docs/V2_INDIVIDUAL_REGISTRATION_RECONCILIATION.md)
73
+ Reconciles the old consumer flow with the current CORE registration baseline
74
+ and separates the stable registration base from later product extensions.
31
75
  1. [docs/101-SDK_END_TO_END.md](./docs/101-SDK_END_TO_END.md)
32
76
  Ordered onboarding guide with end-to-end journeys, copy/paste snippets, and
33
77
  the recommended reading path for new backend integrators.
@@ -44,10 +88,16 @@ If you are integrating this package for the first time, open these in order:
44
88
  5. [gdc-sdk-core-ts/docs/101-SDK_FLOWS.md](https://github.com/Global-DataCare/gdc-sdk-core-ts/blob/main/docs/101-SDK_FLOWS.md)
45
89
  Actor split and business-flow map across organization, individual,
46
90
  permissions, invitation, import, and SMART flows.
47
- 6. [gdc-common-utils-ts/src/examples/](https://github.com/Global-DataCare/gdc-common-utils-ts/tree/main/src/examples)
91
+ 6. [gwtemplate-node-ts/docs/PORTAL_API_TO_GW_CORE.md](https://github.com/Global-DataCare/gwtemplate-node-ts/blob/main/docs/PORTAL_API_TO_GW_CORE.md)
92
+ Canonical portal/BFF functional map over GW CORE, including the domain
93
+ split between `employees`, `related persons`, `members`, and `consents`.
94
+ 7. [gdc-common-utils-ts/src/examples/](https://github.com/Global-DataCare/gdc-common-utils-ts/tree/main/src/examples)
48
95
  Shared payload values used by the docs and tests.
49
- 7. [gdc-common-utils-ts/docs/101-LIFECYCLE.md](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/main/docs/101-LIFECYCLE.md)
96
+ 8. [gdc-common-utils-ts/docs/101-LIFECYCLE.md](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/main/docs/101-LIFECYCLE.md)
50
97
  Canonical `enable/disable/delete` semantics and copy/paste placeholders.
98
+ 9. [docs/NEXT_STEPS.md](./docs/NEXT_STEPS.md)
99
+ Follow-up scope after GW CORE live validation, including the future user job
100
+ manager boundary.
51
101
 
52
102
  If you need the shortest path:
53
103
 
@@ -65,6 +115,22 @@ If you need the shortest path:
65
115
  - dataspace discovery and fallback/cache boundary:
66
116
  [docs/101-DISCOVERY.md](./docs/101-DISCOVERY.md)
67
117
 
118
+ Immediate live validation target:
119
+
120
+ - the next profile-runtime validation must be treated as an actor-profile suite,
121
+ not as a replay of the GW CORE platform lifecycle
122
+ - the standalone current entry point for that is:
123
+ [tests/live-profile-runtime-individual.e2e.test.mjs](tests/live-profile-runtime-individual.e2e.test.mjs)
124
+ - it should begin with `loadProfile(...)` for the target actor and then prove:
125
+ - `startIndividualOrganization(...)`
126
+ - `confirmIndividualOrganizationOrder(...)`
127
+ - the canonical current index/`Composition` read helper
128
+ - if that actor flow creates lifecycle-owned state, `disable` / `purge` belong
129
+ at the end of that scenario as cleanup
130
+ - until that live proof exists, treat `getLatestIps(...)` and
131
+ `searchClinicalBundle(...)` as candidate read contracts, not yet final
132
+ wording
133
+
68
134
  ## Executable Usage Examples
69
135
 
70
136
  Open these tests when you want to see exact method calls and exact inputs:
@@ -83,6 +149,9 @@ Open these tests when you want to see exact method calls and exact inputs:
83
149
  SMART token request flow.
84
150
  - [tests/live-gw-node-runtime.e2e.test.mjs](tests/live-gw-node-runtime.e2e.test.mjs)
85
151
  End-to-end runtime wiring against a real GW environment.
152
+ - [tests/live-profile-runtime-individual.e2e.test.mjs](tests/live-profile-runtime-individual.e2e.test.mjs)
153
+ Standalone actor-profile E2E for the individual controller on an already
154
+ operational tenant, including scenario-owned cleanup.
86
155
  - [tests/101-dataspace-resolver.test.mjs](tests/101-dataspace-resolver.test.mjs)
87
156
  Minimal `HttpDataspaceResolver` 101 with one host and one published provider.
88
157
  - [tests/101-default-first-dataspace-discovery.test.mjs](tests/101-default-first-dataspace-discovery.test.mjs)
@@ -98,12 +167,20 @@ Before running that suite, read:
98
167
 
99
168
  - [docs/101-LIVE_GW_LOCAL.md](./docs/101-LIVE_GW_LOCAL.md)
100
169
 
170
+ Execution requirement:
171
+
172
+ - run the live suite from a real user terminal/TTY
173
+ - if an AI agent is assisting, it should prefer a long-lived TTY process and
174
+ avoid treating sandbox-local connectivity failures as product failures
175
+
101
176
  Teaching rule:
102
177
 
103
178
  - defaults come from `gdc-common-utils-ts/examples`
104
179
  - override with env vars only when your tenant, bearer, or route is different
105
180
  - local GW default is `http://127.0.0.1:3000`
106
181
  - Docker-exposed GW can be overridden with `BASE_URL=http://127.0.0.1:8000`
182
+ - `LIVE_GW_E2E_EXECUTION_MODE=direct` is the current and only supported mode
183
+ for live validation; queued app-side job management is a later phase
107
184
 
108
185
  Current live flow covered by the test suite:
109
186
 
@@ -118,6 +195,47 @@ Current live flow covered by the test suite:
118
195
  7. verify the returned bundle document contains both medication statements
119
196
  8. persist audit/debug traces in `test-results/*.jsonl`
120
197
 
198
+ What is still not fully covered as one single root lifecycle:
199
+
200
+ - initial organization license listing
201
+ - extra-seat activation after the portal-side fictitious payment confirmation
202
+ - relisting licenses after seat activation
203
+ - one employee bundle with employee `A` and employee `B`
204
+ - selective disable/purge validation across both employees
205
+ - consent escalation from partial IPS access to broader IPS access
206
+ - final cleanup of consent, individual, remaining employees, and tenant
207
+
208
+ Current invoice/readback behavior:
209
+
210
+ - both host and individual `Order/_batch-response` flows now return the flat
211
+ compatibility claims and an embedded invoice `Bundle`
212
+ - the invoice bundle contains one FHIR `Invoice`, one PDF
213
+ `DocumentReference`, and one structured JSON/XML `DocumentReference`
214
+ - live suites can read that bundle back through the same high-level response
215
+ body that the virtual API exposes to the simulated front
216
+
217
+ Current runtime boundary:
218
+
219
+ - `OrganizationControllerSdk.confirmOrganizationLicenseOrder(...)` now uses the
220
+ public host `Order/_batch` route used by GW CORE for portal-managed
221
+ post-payment seat activation
222
+ - the long root lifecycle is still not fully closed because the suite does not
223
+ yet orchestrate the whole `license list -> pay -> confirm -> relist -> two
224
+ employees -> selective purge -> cleanup` dialogue as one single test
225
+
226
+ The exact pending release-readiness checklist lives in:
227
+
228
+ - [docs/NEXT_STEPS.md](./docs/NEXT_STEPS.md)
229
+
230
+ Optional live lifecycle extension:
231
+
232
+ - set `RUN_LIVE_GW_E2E_INDIVIDUAL_LIFECYCLE=1` to extend the same suite with
233
+ `disableIndividual(...)` + `purgeIndividual(...)` against the real
234
+ `gwtemplate-node-ts` runtime contract
235
+ - this extra block is intentionally separate from the default happy path
236
+ because it changes lifecycle state and should only run when that tenant/test
237
+ subject is disposable
238
+
121
239
  Shared example source of truth:
122
240
 
123
241
  - tenant/route/controller/professional defaults:
@@ -141,6 +259,20 @@ Run the full live runtime baseline:
141
259
  npm run test:e2e:live-gw
142
260
  ```
143
261
 
262
+ Select one live transport profile from the same Node entrypoint:
263
+
264
+ ```bash
265
+ npm run test:e2e:live-gw:didcomm-plain
266
+ npm run test:e2e:live-gw:legacy-fhir
267
+ npm run test:e2e:live-gw:all
268
+ ```
269
+
270
+ Profile note:
271
+
272
+ - `didcomm-plain` is the current live baseline implemented by the Node runtime client
273
+ - `legacy-fhir` exercises raw `application/fhir+json` async batch submission for `org.hl7.fhir.*`
274
+ - `all` runs every implemented profile from the same suite file
275
+
144
276
  Run the IPS ingestion/search branch as well:
145
277
 
146
278
  ```bash
@@ -494,6 +626,7 @@ modules below.
494
626
  ### Node runtime client
495
627
 
496
628
  - [`NodeHttpClient`](src/node-runtime-client.ts)
629
+ - [`NodeHttpClient.submitLegalOrganizationVerificationTransaction(...)`](src/node-runtime-client.ts)
497
630
  - [`NodeHttpClient.ingestCommunicationAndUpdateIndex(...)`](src/node-runtime-client.ts)
498
631
  - [`NodeHttpClient.submitCommunicationAndPoll(...)`](src/node-runtime-client.ts)
499
632
  - [`NodeHttpClient.searchClinicalBundle(...)`](src/node-runtime-client.ts)
@@ -521,3 +654,21 @@ modules below.
521
654
  - README explains backend-facing flows first.
522
655
  - Shared contract shapes must be documented in `gdc-sdk-core-ts`, not duplicated here.
523
656
  - Route details and GW-specific behavior belong in runtime docs and JSDoc, not in app-facing examples.
657
+
658
+ ## Host Onboarding Runtime Flow
659
+
660
+ For legal-organization onboarding from a Node BFF/runtime, keep the host steps separate:
661
+
662
+ 1. `Organization/_transaction`
663
+ 2. legacy `Organization/_activate` after ICA `_verify`
664
+ 3. `Order/_batch`
665
+
666
+ Use `OrganizationControllerSdk.submitLegalOrganizationVerificationTransaction(...)` or
667
+ `NodeHttpClient.submitLegalOrganizationVerificationTransaction(...)` for step 1.
668
+
669
+ Rules:
670
+
671
+ - `_transaction` and `_activate` are different flows
672
+ - transport/runtime communication keys stay outside the business payload
673
+ - controller binding key stays in `body.data[].resource.controller.*`
674
+ - do not mix this path with `requestIcaEnrollment` or Fabric
@@ -0,0 +1,214 @@
1
+ import type { ActorProfileDescriptor, IJobManager, ActorKind, LoadedActorProfile, ProfileLoadRequest, SubjectIndexCompositionRequest, SubjectIndexConnectionRequest, TrustedDeviceRegistrationRequest } from 'gdc-sdk-core-ts';
2
+ import type { ActorSession } from './session.js';
3
+ import type { RuntimeClient } from './orchestration/client-port.js';
4
+ import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
5
+ import type { RouteContext } from './individual-onboarding.js';
6
+ /**
7
+ * Result of registering one trusted backend runtime device/profile context.
8
+ *
9
+ * This is intentionally backend-generic. It does not describe one concrete
10
+ * channel or product flow.
11
+ */
12
+ export type BackendTrustedDeviceRegistrationResult = {
13
+ trustedDeviceId: string;
14
+ status: 'registered' | 'already-trusted';
15
+ };
16
+ /**
17
+ * Result of connecting one loaded actor profile to one subject index.
18
+ */
19
+ export type BackendSubjectIndexConnectionResult = {
20
+ subjectId: string;
21
+ userId: string;
22
+ userRoleCode: string;
23
+ status: 'connected' | 'already-connected';
24
+ };
25
+ /**
26
+ * Result of reading one subject index composition after the relationship is
27
+ * already established.
28
+ */
29
+ export type BackendSubjectIndexCompositionResult = {
30
+ subjectId: string;
31
+ userId: string;
32
+ userRoleCode: string;
33
+ composition: unknown;
34
+ };
35
+ export declare const BackendSubjectIndexReadModes: Readonly<{
36
+ LatestIps: "latest-ips";
37
+ ClinicalBundle: "clinical-bundle";
38
+ }>;
39
+ export type BackendSubjectIndexReadMode = typeof BackendSubjectIndexReadModes[keyof typeof BackendSubjectIndexReadModes];
40
+ /**
41
+ * Backend materialization of one loaded actor profile with runtime sessions
42
+ * ready to expose actor-scoped facades.
43
+ */
44
+ export type BackendLoadedActorProfile = LoadedActorProfile & {
45
+ actorSessions: ActorSession[];
46
+ };
47
+ export type BackendIndividualControllerProfile = {
48
+ profile: BackendLoadedActorProfile;
49
+ session: ActorSession;
50
+ sdk: IndividualControllerSdk;
51
+ };
52
+ /**
53
+ * Canonical backend runtime contract for loading one actor profile after
54
+ * authentication and then working with trusted device registration and subject
55
+ * index access.
56
+ *
57
+ * This surface is intentionally generic for BFF or other backend runtimes.
58
+ * It does not encode one product-specific interaction channel.
59
+ */
60
+ export type BackendProfileRuntimeClient = {
61
+ loadProfile?: (input: ProfileLoadRequest) => Promise<BackendLoadedActorProfile>;
62
+ closeProfile?: (profileKey: string) => Promise<void>;
63
+ registerTrustedDevice?: (input: TrustedDeviceRegistrationRequest) => Promise<BackendTrustedDeviceRegistrationResult>;
64
+ connectToSubjectIndex?: (input: SubjectIndexConnectionRequest) => Promise<BackendSubjectIndexConnectionResult>;
65
+ getSubjectIndexComposition?: (input: SubjectIndexCompositionRequest) => Promise<BackendSubjectIndexCompositionResult>;
66
+ };
67
+ export type BackendProfileRuntimeAdapters = {
68
+ loadProfile(input: ProfileLoadRequest): Promise<LoadedActorProfile>;
69
+ registerTrustedDevice(input: TrustedDeviceRegistrationRequest): Promise<BackendTrustedDeviceRegistrationResult>;
70
+ connectToSubjectIndex(input: SubjectIndexConnectionRequest): Promise<BackendSubjectIndexConnectionResult>;
71
+ getSubjectIndexComposition(input: SubjectIndexCompositionRequest): Promise<BackendSubjectIndexCompositionResult>;
72
+ };
73
+ export type BackendProfileRuntimeOptions = {
74
+ /**
75
+ * Runtime client injected into the materialized actor sessions so backend
76
+ * consumers can immediately call `asIndividualController()`,
77
+ * `asProfessional()`, and the other actor-specific facades after
78
+ * `loadProfile(...)`.
79
+ */
80
+ facadeClient?: RuntimeClient;
81
+ };
82
+ export type BackendLoadedProfileKey = string;
83
+ export type DirectBackendProfileRuntimeOptions = BackendProfileRuntimeOptions & {
84
+ /**
85
+ * Default route context reused by the current GW CORE subject-index fallback.
86
+ *
87
+ * This is intentionally optional because some integrators only need
88
+ * `loadProfile(...)` plus explicit actor facades first.
89
+ */
90
+ defaultRouteContext?: RouteContext;
91
+ /**
92
+ * Current temporary CORE-facing index read helper to use when the caller asks
93
+ * for one subject index composition through the profile runtime.
94
+ *
95
+ * Until GW CORE freezes one canonical public profile-runtime read contract,
96
+ * keep this selectable instead of hardcoding one final wording.
97
+ */
98
+ subjectIndexReadMode?: BackendSubjectIndexReadMode;
99
+ /**
100
+ * Optional override for trusted-device registration while GW CORE finalizes
101
+ * the backend runtime contract for that step.
102
+ */
103
+ registerTrustedDevice?: (input: TrustedDeviceRegistrationRequest) => Promise<BackendTrustedDeviceRegistrationResult>;
104
+ /**
105
+ * Optional override for backend subject-index connection while GW CORE
106
+ * finalizes the stable contract for that step.
107
+ */
108
+ connectToSubjectIndex?: (input: SubjectIndexConnectionRequest) => Promise<BackendSubjectIndexConnectionResult>;
109
+ /**
110
+ * Optional override for reading the subject index after connection.
111
+ */
112
+ getSubjectIndexComposition?: (input: SubjectIndexCompositionRequest) => Promise<BackendSubjectIndexCompositionResult>;
113
+ /**
114
+ * Optional custom job-manager factory. When omitted, the backend runtime
115
+ * creates one in-memory job manager so `loadProfile(...)` returns one
116
+ * complete v2 profile object immediately.
117
+ */
118
+ createJobManager?: (descriptor: ActorProfileDescriptor, input: ProfileLoadRequest) => IJobManager;
119
+ };
120
+ /**
121
+ * Default backend-generic runtime implementation backed by injected adapters.
122
+ *
123
+ * This class is the first concrete v2 slice intended for backend consumers that
124
+ * need one reusable actor-aware profile runtime after authentication.
125
+ */
126
+ export declare class BackendProfileRuntime implements BackendProfileRuntimeClient {
127
+ private readonly adapters;
128
+ private readonly options;
129
+ constructor(adapters: BackendProfileRuntimeAdapters, options?: BackendProfileRuntimeOptions);
130
+ loadProfile(input: ProfileLoadRequest): Promise<BackendLoadedActorProfile>;
131
+ closeProfile(_profileKey: string): Promise<void>;
132
+ registerTrustedDevice(input: TrustedDeviceRegistrationRequest): Promise<BackendTrustedDeviceRegistrationResult>;
133
+ connectToSubjectIndex(input: SubjectIndexConnectionRequest): Promise<BackendSubjectIndexConnectionResult>;
134
+ getSubjectIndexComposition(input: SubjectIndexCompositionRequest): Promise<BackendSubjectIndexCompositionResult>;
135
+ }
136
+ /**
137
+ * Current concrete backend profile runtime over one injected runtime client.
138
+ *
139
+ * This is the pragmatic v2 bridge for backend consumers that already possess
140
+ * an authenticated `RuntimeClient` and need `loadProfile(...)` to materialize
141
+ * actor facades immediately against the current GW CORE contract.
142
+ */
143
+ export declare class DirectBackendProfileRuntime implements BackendProfileRuntimeClient {
144
+ private readonly loadedProfiles;
145
+ private readonly options;
146
+ constructor(options: DirectBackendProfileRuntimeOptions);
147
+ loadProfile(input: ProfileLoadRequest): Promise<BackendLoadedActorProfile>;
148
+ closeProfile(profileKey: string): Promise<void>;
149
+ registerTrustedDevice(input: TrustedDeviceRegistrationRequest): Promise<BackendTrustedDeviceRegistrationResult>;
150
+ connectToSubjectIndex(input: SubjectIndexConnectionRequest): Promise<BackendSubjectIndexConnectionResult>;
151
+ getSubjectIndexComposition(input: SubjectIndexCompositionRequest): Promise<BackendSubjectIndexCompositionResult>;
152
+ private rememberLoadedProfile;
153
+ private forgetLoadedProfile;
154
+ private resolveLoadedProfile;
155
+ }
156
+ /**
157
+ * Minimal in-memory `JobManager` for backend runtimes that do not need durable
158
+ * persistence during one live session.
159
+ */
160
+ export declare function createJobManagerInMemory(descriptor: ActorProfileDescriptor): IJobManager;
161
+ /**
162
+ * Requires one backend profile-runtime method from one runtime client.
163
+ */
164
+ export declare function requireBackendProfileRuntimeMethod<T extends keyof BackendProfileRuntimeClient>(client: BackendProfileRuntimeClient, method: T): NonNullable<BackendProfileRuntimeClient[T]>;
165
+ /**
166
+ * Canonical backend helper for loading one actor profile after authentication.
167
+ */
168
+ export declare function loadBackendProfile(client: BackendProfileRuntimeClient, input: ProfileLoadRequest): Promise<BackendLoadedActorProfile>;
169
+ /**
170
+ * Canonical backend helper for closing one loaded actor profile and clearing
171
+ * runtime-owned in-memory state.
172
+ */
173
+ export declare function closeBackendProfile(client: BackendProfileRuntimeClient, profileKey: string): Promise<void>;
174
+ /**
175
+ * Canonical backend helper for registering one trusted device/runtime context.
176
+ */
177
+ export declare function registerBackendTrustedDevice(client: BackendProfileRuntimeClient, input: TrustedDeviceRegistrationRequest): Promise<BackendTrustedDeviceRegistrationResult>;
178
+ /**
179
+ * Canonical backend helper for connecting one actor profile to one subject
180
+ * index after the profile is already loaded.
181
+ */
182
+ export declare function connectBackendToSubjectIndex(client: BackendProfileRuntimeClient, input: SubjectIndexConnectionRequest): Promise<BackendSubjectIndexConnectionResult>;
183
+ /**
184
+ * Canonical backend helper for reading one subject index composition after the
185
+ * relationship is already established.
186
+ */
187
+ export declare function getBackendSubjectIndexComposition(client: BackendProfileRuntimeClient, input: SubjectIndexCompositionRequest): Promise<BackendSubjectIndexCompositionResult>;
188
+ /**
189
+ * Returns one materialized backend actor session by actor kind.
190
+ *
191
+ * Backend callers should use this instead of scanning `actorSessions` manually.
192
+ */
193
+ export declare function requireBackendActorSession(profile: BackendLoadedActorProfile, actorKind: ActorKind): ActorSession;
194
+ /**
195
+ * Returns the individual-controller session from one loaded backend profile.
196
+ *
197
+ * This helper is the first concrete bridge from the generic backend runtime to
198
+ * the current individual bootstrap/index use case.
199
+ */
200
+ export declare function requireBackendIndividualControllerSession(profile: BackendLoadedActorProfile): ActorSession;
201
+ /**
202
+ * Materializes the individual-controller facade directly from one loaded
203
+ * backend profile.
204
+ */
205
+ export declare function requireBackendIndividualControllerSdk(profile: BackendLoadedActorProfile): IndividualControllerSdk;
206
+ /**
207
+ * Loads one backend profile and resolves the individual-controller session in
208
+ * one step.
209
+ *
210
+ * This is the first pragmatic use-case helper on top of the generic backend
211
+ * profile runtime, because the current stable CORE bootstrap baseline starts
212
+ * from the individual-controller flow.
213
+ */
214
+ export declare function loadBackendIndividualControllerProfile(client: BackendProfileRuntimeClient, input: ProfileLoadRequest): Promise<BackendIndividualControllerProfile>;