@appport/sdk 1.0.2 → 1.1.1

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 (90) hide show
  1. package/README.md +23 -1
  2. package/dist/external-compatibility.d.ts +142 -0
  3. package/dist/external-compatibility.d.ts.map +1 -0
  4. package/dist/external-compatibility.js +132 -0
  5. package/dist/external-compatibility.js.map +1 -0
  6. package/dist/index.d.ts +4 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +4 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/provider-lifecycle.d.ts +247 -0
  11. package/dist/provider-lifecycle.d.ts.map +1 -0
  12. package/dist/provider-lifecycle.js +314 -0
  13. package/dist/provider-lifecycle.js.map +1 -0
  14. package/dist/resolution-policy.d.ts +81 -0
  15. package/dist/resolution-policy.d.ts.map +1 -0
  16. package/dist/resolution-policy.js +131 -0
  17. package/dist/resolution-policy.js.map +1 -0
  18. package/package.json +1 -1
  19. package/vendor/@appport/core/dist/appboundry-capability-catalog.d.ts +930 -0
  20. package/vendor/@appport/core/dist/appboundry-capability-catalog.d.ts.map +1 -0
  21. package/vendor/@appport/core/dist/appboundry-capability-catalog.js +352 -0
  22. package/vendor/@appport/core/dist/appboundry-capability-catalog.js.map +1 -0
  23. package/vendor/@appport/core/dist/appboundry-composition.d.ts +93 -0
  24. package/vendor/@appport/core/dist/appboundry-composition.d.ts.map +1 -0
  25. package/vendor/@appport/core/dist/appboundry-composition.js +184 -0
  26. package/vendor/@appport/core/dist/appboundry-composition.js.map +1 -0
  27. package/vendor/@appport/core/dist/appboundry-discovery.d.ts +110 -0
  28. package/vendor/@appport/core/dist/appboundry-discovery.d.ts.map +1 -0
  29. package/vendor/@appport/core/dist/appboundry-discovery.js +141 -0
  30. package/vendor/@appport/core/dist/appboundry-discovery.js.map +1 -0
  31. package/vendor/@appport/core/dist/appboundry-entitlements.d.ts +128 -0
  32. package/vendor/@appport/core/dist/appboundry-entitlements.d.ts.map +1 -0
  33. package/vendor/@appport/core/dist/appboundry-entitlements.js +312 -0
  34. package/vendor/@appport/core/dist/appboundry-entitlements.js.map +1 -0
  35. package/vendor/@appport/core/dist/appboundry-execution.d.ts +72 -0
  36. package/vendor/@appport/core/dist/appboundry-execution.d.ts.map +1 -0
  37. package/vendor/@appport/core/dist/appboundry-execution.js +114 -0
  38. package/vendor/@appport/core/dist/appboundry-execution.js.map +1 -0
  39. package/vendor/@appport/core/dist/appboundry-materialization.d.ts +222 -0
  40. package/vendor/@appport/core/dist/appboundry-materialization.d.ts.map +1 -0
  41. package/vendor/@appport/core/dist/appboundry-materialization.js +474 -0
  42. package/vendor/@appport/core/dist/appboundry-materialization.js.map +1 -0
  43. package/vendor/@appport/core/dist/appboundry-resolution.d.ts +160 -0
  44. package/vendor/@appport/core/dist/appboundry-resolution.d.ts.map +1 -0
  45. package/vendor/@appport/core/dist/appboundry-resolution.js +218 -0
  46. package/vendor/@appport/core/dist/appboundry-resolution.js.map +1 -0
  47. package/vendor/@appport/core/dist/appboundry-surface.d.ts +96 -0
  48. package/vendor/@appport/core/dist/appboundry-surface.d.ts.map +1 -0
  49. package/vendor/@appport/core/dist/appboundry-surface.js +223 -0
  50. package/vendor/@appport/core/dist/appboundry-surface.js.map +1 -0
  51. package/vendor/@appport/core/dist/application.d.ts +3 -1
  52. package/vendor/@appport/core/dist/application.d.ts.map +1 -1
  53. package/vendor/@appport/core/dist/application.js +3 -0
  54. package/vendor/@appport/core/dist/application.js.map +1 -1
  55. package/vendor/@appport/core/dist/index.d.ts +8 -0
  56. package/vendor/@appport/core/dist/index.d.ts.map +1 -1
  57. package/vendor/@appport/core/dist/index.js +8 -0
  58. package/vendor/@appport/core/dist/index.js.map +1 -1
  59. package/vendor/@appport/core/dist/public.d.ts +1 -0
  60. package/vendor/@appport/core/dist/public.d.ts.map +1 -1
  61. package/vendor/@appport/core/dist/public.js +1 -0
  62. package/vendor/@appport/core/dist/public.js.map +1 -1
  63. package/vendor/@appport/core/dist/registry.d.ts +2 -1
  64. package/vendor/@appport/core/dist/registry.d.ts.map +1 -1
  65. package/vendor/@appport/core/dist/registry.js +1 -0
  66. package/vendor/@appport/core/dist/registry.js.map +1 -1
  67. package/vendor/@appport/mcp/README.md +29 -0
  68. package/vendor/@appport/mcp/dist/index.d.ts +58 -0
  69. package/vendor/@appport/mcp/dist/index.d.ts.map +1 -0
  70. package/vendor/@appport/mcp/dist/index.js +69 -0
  71. package/vendor/@appport/mcp/dist/index.js.map +1 -0
  72. package/vendor/@appport/mcp/package.json +29 -0
  73. package/vendor/@appport/protocol/dist/errors.d.ts +1 -1
  74. package/vendor/@appport/protocol/dist/errors.d.ts.map +1 -1
  75. package/vendor/@appport/protocol/dist/errors.js +1 -0
  76. package/vendor/@appport/protocol/dist/errors.js.map +1 -1
  77. package/vendor/@appport/protocol/dist/index.d.ts +1 -0
  78. package/vendor/@appport/protocol/dist/index.d.ts.map +1 -1
  79. package/vendor/@appport/protocol/dist/index.js +1 -0
  80. package/vendor/@appport/protocol/dist/index.js.map +1 -1
  81. package/vendor/@appport/protocol/dist/manifest.d.ts +3 -0
  82. package/vendor/@appport/protocol/dist/manifest.d.ts.map +1 -1
  83. package/vendor/@appport/protocol/dist/manifest.js.map +1 -1
  84. package/vendor/@appport/protocol/dist/materialization.d.ts +59 -0
  85. package/vendor/@appport/protocol/dist/materialization.d.ts.map +1 -0
  86. package/vendor/@appport/protocol/dist/materialization.js +2 -0
  87. package/vendor/@appport/protocol/dist/materialization.js.map +1 -0
  88. package/vendor/@appport/server/dist/http.d.ts.map +1 -1
  89. package/vendor/@appport/server/dist/http.js +1 -0
  90. package/vendor/@appport/server/dist/http.js.map +1 -1
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Provider lifecycle and migration primitives.
3
+ *
4
+ * A capability contract is stable; the providers that fulfil it are not. These
5
+ * helpers make that difference executable: a provider is registered against a
6
+ * contract, becomes eligible, may be activated for resolution, and can be
7
+ * drained, revoked and retired without the consumer ever learning which
8
+ * implementation served it.
9
+ *
10
+ * The primitives are deliberately language, runtime and surface agnostic. A
11
+ * provider is a provider identifier plus the contract it declares; nothing here
12
+ * knows about COBOL, HTTP, Wasm or any other implementation detail. AppBoundry
13
+ * owns lifecycle and resolution, AppPort owns the capability contract.
14
+ */
15
+ /** The only state in which a provider may be selected by resolution. */
16
+ export const RESOLVABLE_PROVIDER_STATE = "active";
17
+ const LEGAL_TRANSITIONS = {
18
+ registered: ["eligible", "revoked", "retired"],
19
+ eligible: ["active", "revoked", "retired"],
20
+ active: ["draining", "revoked", "eligible"],
21
+ draining: ["revoked", "retired"],
22
+ revoked: ["retired"],
23
+ retired: []
24
+ };
25
+ /** Raised when a lifecycle operation is not permitted. */
26
+ export class ProviderLifecycleError extends Error {
27
+ providerId;
28
+ constructor(message, providerId) {
29
+ super(message);
30
+ this.providerId = providerId;
31
+ this.name = "ProviderLifecycleError";
32
+ }
33
+ }
34
+ /** Raised when a migration cannot be performed. No state changes when it is thrown. */
35
+ export class ProviderMigrationRejected extends Error {
36
+ reason;
37
+ constructor(message, reason) {
38
+ super(message);
39
+ this.reason = reason;
40
+ this.name = "ProviderMigrationRejected";
41
+ }
42
+ }
43
+ /** Recorded when a transition did not itself execute the capability. */
44
+ export const NOT_OBSERVED = "not_observed";
45
+ function observation(input) {
46
+ return (input ?? {
47
+ authorization: NOT_OBSERVED,
48
+ eligibility: NOT_OBSERVED,
49
+ resolution: NOT_OBSERVED,
50
+ materialization: NOT_OBSERVED,
51
+ execution: NOT_OBSERVED
52
+ });
53
+ }
54
+ /**
55
+ * The authority for provider lifecycle state.
56
+ *
57
+ * Resolution must consult {@link ProviderLifecycleRegistry.resolvable} so that
58
+ * eligibility, revocation and retirement affect real provider selection instead
59
+ * of being descriptive metadata.
60
+ */
61
+ export class ProviderLifecycleRegistry {
62
+ now;
63
+ #records = new Map();
64
+ #evidence = [];
65
+ #sequence = 0;
66
+ constructor(now = () => new Date()) {
67
+ this.now = now;
68
+ }
69
+ /**
70
+ * Registers a provider in the `registered` state.
71
+ *
72
+ * Registering an identifier that is currently retired is the explicit new
73
+ * registration required to bring a retired provider back into service; it
74
+ * always produces a new `registrationId`.
75
+ */
76
+ register(registration) {
77
+ const existing = this.#records.get(registration.providerId);
78
+ if (existing && existing.state !== "retired") {
79
+ throw new ProviderLifecycleError(`provider ${registration.providerId} is already registered as ${existing.state}`, registration.providerId);
80
+ }
81
+ const record = {
82
+ ...registration,
83
+ state: "registered",
84
+ registrationId: `reg_${registration.providerId}_${++this.#sequence}`
85
+ };
86
+ this.#records.set(registration.providerId, record);
87
+ this.#record(record, existing?.state ?? "registered", {});
88
+ return record;
89
+ }
90
+ /** The provider satisfies the contract requirements for its capability. */
91
+ markEligible(providerId, context = {}) {
92
+ return this.#transition(providerId, "eligible", context);
93
+ }
94
+ /** The provider may now be selected by resolution. */
95
+ activate(providerId, context = {}) {
96
+ return this.#transition(providerId, "active", context);
97
+ }
98
+ /** The provider is leaving service; new resolution must not select it. */
99
+ drain(providerId, context = {}) {
100
+ return this.#transition(providerId, "draining", context);
101
+ }
102
+ /** The provider is no longer eligible for new requests. */
103
+ revoke(providerId, context = {}) {
104
+ return this.#transition(providerId, "revoked", context);
105
+ }
106
+ /** The provider registration is removed from the provider set, permanently. */
107
+ retire(providerId, context = {}) {
108
+ return this.#transition(providerId, "retired", context);
109
+ }
110
+ /** The current record, or `undefined` when the provider was never registered. */
111
+ record(providerId) {
112
+ return this.#records.get(providerId);
113
+ }
114
+ /** The current state, or `undefined` when the provider was never registered. */
115
+ state(providerId) {
116
+ return this.#records.get(providerId)?.state;
117
+ }
118
+ /** Every known registration, in registration order. */
119
+ records() {
120
+ return [...this.#records.values()];
121
+ }
122
+ /** Providers AppBoundry may currently select for `capability`. */
123
+ resolvable(capability) {
124
+ return this.records().filter((record) => record.capability === capability && record.state === RESOLVABLE_PROVIDER_STATE);
125
+ }
126
+ /** Whether resolution may currently select `providerId`. */
127
+ isResolvable(providerId) {
128
+ return this.#records.get(providerId)?.state === RESOLVABLE_PROVIDER_STATE;
129
+ }
130
+ /** Every transition recorded so far, oldest first. */
131
+ evidence() {
132
+ return [...this.#evidence];
133
+ }
134
+ /** Records evidence for an execution that resolved to `providerId`. */
135
+ recordExecution(providerId, observed) {
136
+ const record = this.#require(providerId);
137
+ return this.#record(record, record.state, { observed });
138
+ }
139
+ #transition(providerId, next, context) {
140
+ const record = this.#require(providerId);
141
+ if (!LEGAL_TRANSITIONS[record.state].includes(next)) {
142
+ throw new ProviderLifecycleError(`provider ${providerId} cannot move from ${record.state} to ${next}`, providerId);
143
+ }
144
+ const updated = { ...record, state: next };
145
+ this.#records.set(providerId, updated);
146
+ this.#record(updated, record.state, context);
147
+ return updated;
148
+ }
149
+ #require(providerId) {
150
+ const record = this.#records.get(providerId);
151
+ if (!record)
152
+ throw new ProviderLifecycleError(`provider ${providerId} is not registered`, providerId);
153
+ return record;
154
+ }
155
+ #record(record, previousState, context) {
156
+ const observed = observation(context.observed);
157
+ const evidence = {
158
+ capability: record.capability,
159
+ contract: record.contract,
160
+ provider: record.providerId,
161
+ providerState: record.state,
162
+ previousProviderState: previousState,
163
+ ...(context.previousProvider ? { previousProvider: context.previousProvider } : {}),
164
+ ...(context.replacementProvider ? { replacementProvider: context.replacementProvider } : {}),
165
+ ...(context.migrationId ? { migrationId: context.migrationId } : {}),
166
+ ...observed,
167
+ environment: record.environment ?? "unspecified",
168
+ timestamp: this.now().toISOString(),
169
+ evidenceId: `evd_lifecycle_${record.providerId}_${++this.#sequence}`
170
+ };
171
+ this.#evidence.push(evidence);
172
+ return evidence;
173
+ }
174
+ }
175
+ let migrationSequence = 0;
176
+ /**
177
+ * Moves a capability from one provider to another as a single platform
178
+ * operation.
179
+ *
180
+ * The migration is validated in full before any state changes, so a rejected
181
+ * migration leaves the currently active provider untouched. On success the
182
+ * retiring provider is drained, revoked and retired, and the replacement is
183
+ * activated. The consumer is never involved: it keeps requesting the same
184
+ * capability contract.
185
+ */
186
+ export function migrateProvider(registry, input) {
187
+ const retiring = registry.record(input.retiringProvider);
188
+ const replacement = registry.record(input.replacementProvider);
189
+ if (!retiring) {
190
+ throw new ProviderMigrationRejected(`retiring provider ${input.retiringProvider} is not registered`, "retiring_provider_unknown");
191
+ }
192
+ if (!replacement) {
193
+ throw new ProviderMigrationRejected(`replacement provider ${input.replacementProvider} is not registered`, "replacement_provider_unknown");
194
+ }
195
+ if (retiring.capability !== input.capability || retiring.contract !== input.contract) {
196
+ throw new ProviderMigrationRejected(`retiring provider ${retiring.providerId} does not satisfy ${input.capability}/${input.contract}`, "retiring_provider_contract_mismatch");
197
+ }
198
+ if (retiring.state !== RESOLVABLE_PROVIDER_STATE) {
199
+ throw new ProviderMigrationRejected(`retiring provider ${retiring.providerId} is ${retiring.state}, not ${RESOLVABLE_PROVIDER_STATE}`, "retiring_provider_not_active");
200
+ }
201
+ if (replacement.capability !== input.capability || replacement.contract !== input.contract) {
202
+ throw new ProviderMigrationRejected(`replacement provider ${replacement.providerId} does not satisfy ${input.capability}/${input.contract}`, "replacement_contract_mismatch");
203
+ }
204
+ if (replacement.contractFingerprint !== retiring.contractFingerprint) {
205
+ throw new ProviderMigrationRejected(`replacement provider ${replacement.providerId} declares a different contract fingerprint`, "replacement_contract_fingerprint_mismatch");
206
+ }
207
+ if (replacement.state !== "eligible" && replacement.state !== "active") {
208
+ throw new ProviderMigrationRejected(`replacement provider ${replacement.providerId} is ${replacement.state} and is not eligible`, "replacement_not_eligible");
209
+ }
210
+ if (input.consumerContract !== input.capability) {
211
+ throw new ProviderMigrationRejected(`migration would change the consumer contract from ${input.consumerContract} to ${input.capability}`, "consumer_contract_changed");
212
+ }
213
+ const migrationId = input.migrationId ?? `mig_${input.capability.replace(/[^a-z0-9]+/gi, "_")}_${++migrationSequence}`;
214
+ const context = {
215
+ migrationId,
216
+ previousProvider: retiring.providerId,
217
+ replacementProvider: replacement.providerId
218
+ };
219
+ registry.drain(retiring.providerId, context);
220
+ registry.revoke(retiring.providerId, context);
221
+ registry.retire(retiring.providerId, context);
222
+ if (replacement.state === "eligible")
223
+ registry.activate(replacement.providerId, context);
224
+ return {
225
+ migrationId,
226
+ capability: input.capability,
227
+ contract: input.contract,
228
+ retiringProvider: retiring.providerId,
229
+ replacementProvider: replacement.providerId,
230
+ retiringProviderState: registry.state(retiring.providerId),
231
+ replacementProviderState: registry.state(replacement.providerId),
232
+ consumerContract: input.consumerContract,
233
+ consumerSourceHash: input.consumerSourceHash,
234
+ evidence: registry.evidence().filter((entry) => entry.migrationId === migrationId)
235
+ };
236
+ }
237
+ /**
238
+ * Fails when a request resolved to a provider AppBoundry had already declared
239
+ * ineligible.
240
+ */
241
+ export function assertResolutionInvariant(records) {
242
+ for (const record of records) {
243
+ if (record.providerStateAtResolution !== RESOLVABLE_PROVIDER_STATE) {
244
+ throw new Error(`request ${record.requestId} resolved to ${record.resolvedProvider} in state ${record.providerStateAtResolution}`);
245
+ }
246
+ }
247
+ }
248
+ /** Builds the machine-readable report from what the harness observed. */
249
+ export function createProviderMigrationReport(observation) {
250
+ const passed = observation.consumerContractUnchanged &&
251
+ observation.consumerSourceUnchanged &&
252
+ observation.before.execution === "pass" &&
253
+ observation.after.execution === "pass" &&
254
+ observation.retirement.legacyProcessStopped &&
255
+ observation.retirement.legacyArtifactUnavailable &&
256
+ observation.retirement.directInvocationFailed &&
257
+ observation.noEligibleProvider.verified &&
258
+ observation.restoration.verified &&
259
+ observation.invalidMigration.rejected &&
260
+ observation.resolutions.every((record) => record.providerStateAtResolution === RESOLVABLE_PROVIDER_STATE && record.executionResult !== "not_observed");
261
+ return {
262
+ title: "AppBoundry Provider Migration Proof",
263
+ generatedBy: "appport.providerMigrationHarness",
264
+ result: passed ? "pass" : "fail",
265
+ ...observation
266
+ };
267
+ }
268
+ function statusOf(flag, pass, fail) {
269
+ return flag ? pass : fail;
270
+ }
271
+ /** Formats the human-readable migration proof trace. */
272
+ export function formatProviderMigrationTrace(report) {
273
+ const { migration } = report;
274
+ const lines = [
275
+ report.title,
276
+ `${report.capability}`,
277
+ `Contract: ${report.contract}`,
278
+ "Before",
279
+ ` Provider: ${report.before.provider}`,
280
+ ` Environment: ${report.before.environment ?? "unspecified"}`,
281
+ ` State: ${report.before.state.toUpperCase()}`,
282
+ ` Execution: ${report.before.execution.toUpperCase()}`,
283
+ "Migration",
284
+ ` Migration ID: ${migration.migrationId}`,
285
+ ` ${migration.retiringProvider}: ACTIVE → DRAINING → REVOKED → ${migration.retiringProviderState.toUpperCase()}`,
286
+ ` ${migration.replacementProvider}: ELIGIBLE → ${migration.replacementProviderState.toUpperCase()}`,
287
+ "After",
288
+ ` Provider: ${report.after.provider}`,
289
+ ` Environment: ${report.after.environment ?? "unspecified"}`,
290
+ ` State: ${report.after.state.toUpperCase()}`,
291
+ ` Execution: ${report.after.execution.toUpperCase()}`,
292
+ `Consumer contract: ${statusOf(report.consumerContractUnchanged, "UNCHANGED", "CHANGED")}`,
293
+ `Consumer source: ${statusOf(report.consumerSourceUnchanged, "UNCHANGED", "CHANGED")}`,
294
+ "Physical retirement",
295
+ ` Legacy process: ${statusOf(report.retirement.legacyProcessStopped, "STOPPED", "RUNNING")}`,
296
+ ` Legacy artifact: ${statusOf(report.retirement.legacyArtifactUnavailable, "REMOVED", "PRESENT")}`,
297
+ ` Direct invocation: ${statusOf(report.retirement.directInvocationFailed, "FAILED AS EXPECTED", "SUCCEEDED")}`,
298
+ "No-provider test",
299
+ ` Resolution: ${report.noEligibleProvider.code}`,
300
+ ` ${statusOf(report.noEligibleProvider.verified, "VERIFIED", "NOT VERIFIED")}`,
301
+ "Restoration",
302
+ ` Provider: ${report.restoration.provider}`,
303
+ ` ${statusOf(report.restoration.verified, "VERIFIED", "NOT VERIFIED")}`,
304
+ "Invalid replacement",
305
+ ` ${statusOf(report.invalidMigration.rejected, "REJECTED", "ACCEPTED")} (${report.invalidMigration.reason})`,
306
+ "Resolution during migration"
307
+ ];
308
+ for (const record of report.resolutions) {
309
+ lines.push(` ${record.requestId} → ${record.resolvedProvider} [${record.providerStateAtResolution.toUpperCase()}] ${record.executionResult.toUpperCase()} ${record.evidenceId}`);
310
+ }
311
+ lines.push(`RESULT: ${report.result.toUpperCase()}`);
312
+ return lines.join("\n");
313
+ }
314
+ //# sourceMappingURL=provider-lifecycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-lifecycle.js","sourceRoot":"","sources":["../src/provider-lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA2BH,wEAAwE;AACxE,MAAM,CAAC,MAAM,yBAAyB,GAA2B,QAAQ,CAAC;AAE1E,MAAM,iBAAiB,GAAgF;IACrG,UAAU,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC;IAC9C,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;IAC1C,MAAM,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC;IAC3C,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IAChC,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,0DAA0D;AAC1D,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAGpC;IAFX,YACE,OAAe,EACN,UAAkB;QAE3B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFN,eAAU,GAAV,UAAU,CAAQ;QAG3B,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAED,uFAAuF;AACvF,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAGvC;IAFX,YACE,OAAe,EACN,MAAc;QAEvB,KAAK,CAAC,OAAO,CAAC,CAAC;QAFN,WAAM,GAAN,MAAM,CAAQ;QAGvB,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AAoDD,wEAAwE;AACxE,MAAM,CAAC,MAAM,YAAY,GAAG,cAAuB,CAAC;AAEpD,SAAS,WAAW,CAAC,KAAoC;IACv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M,CAAC,gBAAgB,CAAC,MAAM,GAAG;QAC7G,6BAA6B;KAC9B,CAAC;IACF,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACxC,KAAK,CAAC,IAAI,CACR,KAAK,MAAM,CAAC,SAAS,MAAM,MAAM,CAAC,gBAAgB,KAAK,MAAM,CAAC,yBAAyB,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE,CACtK,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,WAAW,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACrD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { type ProviderLifecycleRegistry, type ProviderLifecycleState, type ProviderResolutionRecord } from "./provider-lifecycle.js";
2
+ export declare const NO_ELIGIBLE_PROVIDER: "appboundry.NO_ELIGIBLE_PROVIDER";
3
+ export interface ResolutionPolicyProvider {
4
+ readonly provider: string;
5
+ readonly priority: number;
6
+ readonly environments?: readonly string[];
7
+ readonly attributes?: Readonly<Record<string, string>>;
8
+ }
9
+ export interface ResolutionPolicyDefinition {
10
+ readonly policyId: string;
11
+ readonly policyVersion: string | number;
12
+ readonly capability: string;
13
+ readonly contract: string;
14
+ readonly providers: readonly ResolutionPolicyProvider[];
15
+ }
16
+ export interface ResolutionPolicy extends ResolutionPolicyDefinition {
17
+ readonly policyVersion: string;
18
+ }
19
+ export declare class PolicyEvaluationError extends Error {
20
+ readonly code: string;
21
+ constructor(message: string, code: string);
22
+ }
23
+ export declare function defineResolutionPolicy(definition: ResolutionPolicyDefinition): ResolutionPolicy;
24
+ export interface PolicyCandidate {
25
+ readonly providerId: string;
26
+ readonly capability: string;
27
+ readonly contract: string;
28
+ readonly attributes?: Readonly<Record<string, string>>;
29
+ }
30
+ export interface PolicyAuthorizationDecision {
31
+ readonly outcome: "allow" | "deny";
32
+ readonly reason?: string;
33
+ }
34
+ export interface PolicyResolutionRequest {
35
+ readonly requestId: string;
36
+ readonly capability: string;
37
+ readonly contract: string;
38
+ readonly environment?: string;
39
+ readonly candidates: readonly PolicyCandidate[];
40
+ readonly lifecycle: ProviderLifecycleRegistry;
41
+ readonly authorize: (candidate: PolicyCandidate) => PolicyAuthorizationDecision | Promise<PolicyAuthorizationDecision>;
42
+ readonly now?: () => Date;
43
+ }
44
+ export type PolicyExclusionReason = "NOT_IN_POLICY" | "CAPABILITY_MISMATCH" | "CONTRACT_MISMATCH" | "REGISTERED" | "ELIGIBLE" | "DRAINING" | "REVOKED" | "RETIRED" | "UNREGISTERED" | "ENVIRONMENT_MISMATCH" | "ATTRIBUTE_MISMATCH" | "UNAUTHORIZED";
45
+ export interface PolicyCandidateEvidence {
46
+ readonly provider: string;
47
+ readonly priority?: number;
48
+ readonly state: ProviderLifecycleState | "unregistered";
49
+ }
50
+ export interface PolicyExcludedProvider extends PolicyCandidateEvidence {
51
+ readonly reasons: readonly PolicyExclusionReason[];
52
+ }
53
+ export interface PolicyResolutionEvidence extends ProviderResolutionRecord {
54
+ readonly policyId: string;
55
+ readonly policyVersion: string;
56
+ readonly candidateProviders: readonly PolicyCandidateEvidence[];
57
+ readonly eligibleProviders: readonly PolicyCandidateEvidence[];
58
+ readonly excludedProviders: readonly PolicyExcludedProvider[];
59
+ readonly excludedReasons: Readonly<Record<string, readonly PolicyExclusionReason[]>>;
60
+ readonly selectedProvider?: string;
61
+ readonly authorization: "allowed" | "denied" | "not_observed";
62
+ readonly eligibility: "eligible" | "ineligible";
63
+ readonly resolution: "resolved" | typeof NO_ELIGIBLE_PROVIDER;
64
+ readonly materialization: string;
65
+ readonly execution: "success" | "failure" | "not_observed";
66
+ readonly timestamp: string;
67
+ }
68
+ export type PolicyDecision = {
69
+ readonly kind: "resolved";
70
+ readonly selected: PolicyCandidate;
71
+ readonly evidence: PolicyResolutionEvidence;
72
+ } | {
73
+ readonly kind: "unresolved";
74
+ readonly code: typeof NO_ELIGIBLE_PROVIDER;
75
+ readonly evidence: PolicyResolutionEvidence;
76
+ };
77
+ /** Authorization and lifecycle are evaluated before policy priority is applied. */
78
+ export declare function resolveWithPolicy(policy: ResolutionPolicy, request: PolicyResolutionRequest): Promise<PolicyDecision>;
79
+ /** Produces a new immutable evidence record; the resolution snapshot is never rewritten. */
80
+ export declare function recordPolicyExecution(evidence: PolicyResolutionEvidence, result: "success" | "failure", materialization?: string): PolicyResolutionEvidence;
81
+ //# sourceMappingURL=resolution-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolution-policy.d.ts","sourceRoot":"","sources":["../src/resolution-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC9B,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,oBAAoB,EAAG,iCAA0C,CAAC;AAE/E,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,SAAS,wBAAwB,EAAE,CAAC;CACzD;AAED,MAAM,WAAW,gBAAiB,SAAQ,0BAA0B;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E,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAA;CAAE,GAC9G;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,oBAAoB,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAA;CAAE,CAAC;AAE7H,mFAAmF;AACnF,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,cAAc,CAAC,CAkF3H;AAED,4FAA4F;AAC5F,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,wBAAwB,EAClC,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,eAAe,SAAa,GAC3B,wBAAwB,CAE1B"}
@@ -0,0 +1,131 @@
1
+ import { NOT_OBSERVED, RESOLVABLE_PROVIDER_STATE } from "./provider-lifecycle.js";
2
+ export const NO_ELIGIBLE_PROVIDER = "appboundry.NO_ELIGIBLE_PROVIDER";
3
+ export class PolicyEvaluationError extends Error {
4
+ code;
5
+ constructor(message, code) {
6
+ super(message);
7
+ this.code = code;
8
+ this.name = "PolicyEvaluationError";
9
+ }
10
+ }
11
+ export function defineResolutionPolicy(definition) {
12
+ if (!definition.policyId.trim())
13
+ throw new PolicyEvaluationError("policyId is required", "INVALID_POLICY_ID");
14
+ const policyVersion = String(definition.policyVersion).trim();
15
+ if (!policyVersion)
16
+ throw new PolicyEvaluationError("policyVersion is required", "INVALID_POLICY_VERSION");
17
+ if (!definition.capability.trim() || !definition.contract.trim()) {
18
+ throw new PolicyEvaluationError("capability and contract are required", "INVALID_POLICY_CONTRACT");
19
+ }
20
+ const seen = new Set();
21
+ for (const entry of definition.providers) {
22
+ if (!entry.provider.trim() || !Number.isFinite(entry.priority)) {
23
+ throw new PolicyEvaluationError("provider identity and finite priority are required", "INVALID_PROVIDER_PREFERENCE");
24
+ }
25
+ if (seen.has(entry.provider)) {
26
+ throw new PolicyEvaluationError(`provider ${entry.provider} appears more than once`, "DUPLICATE_PROVIDER");
27
+ }
28
+ seen.add(entry.provider);
29
+ }
30
+ return Object.freeze({ ...definition, policyVersion, providers: Object.freeze([...definition.providers]) });
31
+ }
32
+ /** Authorization and lifecycle are evaluated before policy priority is applied. */
33
+ export async function resolveWithPolicy(policy, request) {
34
+ if (request.capability !== policy.capability || request.contract !== policy.contract) {
35
+ throw new PolicyEvaluationError("policy cannot alter the requested capability contract", "POLICY_REQUEST_MISMATCH");
36
+ }
37
+ const preferences = new Map(policy.providers.map((entry) => [entry.provider, entry]));
38
+ const candidates = [];
39
+ const eligible = [];
40
+ const excluded = [];
41
+ for (const candidate of request.candidates) {
42
+ const preference = preferences.get(candidate.providerId);
43
+ const state = request.lifecycle.state(candidate.providerId) ?? "unregistered";
44
+ const evidence = {
45
+ provider: candidate.providerId,
46
+ ...(preference ? { priority: preference.priority } : {}),
47
+ state
48
+ };
49
+ candidates.push(evidence);
50
+ const reasons = [];
51
+ if (!preference)
52
+ reasons.push("NOT_IN_POLICY");
53
+ if (candidate.capability !== request.capability)
54
+ reasons.push("CAPABILITY_MISMATCH");
55
+ if (candidate.contract !== request.contract)
56
+ reasons.push("CONTRACT_MISMATCH");
57
+ if (state !== RESOLVABLE_PROVIDER_STATE)
58
+ reasons.push(state === "unregistered" ? "UNREGISTERED" : state.toUpperCase());
59
+ if (preference?.environments && (!request.environment || !preference.environments.includes(request.environment)))
60
+ reasons.push("ENVIRONMENT_MISMATCH");
61
+ if (preference?.attributes && !matchesAttributes(preference.attributes, candidate.attributes))
62
+ reasons.push("ATTRIBUTE_MISMATCH");
63
+ if (reasons.length === 0) {
64
+ const authorization = await request.authorize(candidate);
65
+ if (authorization.outcome === "deny")
66
+ reasons.push("UNAUTHORIZED");
67
+ }
68
+ if (reasons.length)
69
+ excluded.push({ ...evidence, reasons });
70
+ else
71
+ eligible.push({ candidate, evidence });
72
+ }
73
+ eligible.sort((left, right) => (right.evidence.priority ?? 0) - (left.evidence.priority ?? 0) || left.candidate.providerId.localeCompare(right.candidate.providerId));
74
+ const selected = eligible[0];
75
+ const timestamp = (request.now ?? (() => new Date()))().toISOString();
76
+ const base = {
77
+ requestId: request.requestId,
78
+ capability: request.capability,
79
+ contract: request.contract,
80
+ policyId: policy.policyId,
81
+ policyVersion: policy.policyVersion,
82
+ candidateProviders: candidates,
83
+ eligibleProviders: eligible.map((entry) => entry.evidence),
84
+ excludedProviders: excluded,
85
+ excludedReasons: Object.fromEntries(excluded.map((entry) => [entry.provider, entry.reasons])),
86
+ materialization: NOT_OBSERVED,
87
+ execution: NOT_OBSERVED,
88
+ executionResult: "not_observed",
89
+ timestamp
90
+ };
91
+ if (!selected) {
92
+ return {
93
+ kind: "unresolved",
94
+ code: NO_ELIGIBLE_PROVIDER,
95
+ evidence: {
96
+ ...base,
97
+ resolvedProvider: NO_ELIGIBLE_PROVIDER,
98
+ providerStateAtResolution: "registered",
99
+ authorization: candidates.length ? "denied" : "not_observed",
100
+ eligibility: "ineligible",
101
+ resolution: NO_ELIGIBLE_PROVIDER,
102
+ evidenceId: evidenceId(request.requestId, policy, NO_ELIGIBLE_PROVIDER)
103
+ }
104
+ };
105
+ }
106
+ return {
107
+ kind: "resolved",
108
+ selected: selected.candidate,
109
+ evidence: {
110
+ ...base,
111
+ selectedProvider: selected.candidate.providerId,
112
+ resolvedProvider: selected.candidate.providerId,
113
+ providerStateAtResolution: RESOLVABLE_PROVIDER_STATE,
114
+ authorization: "allowed",
115
+ eligibility: "eligible",
116
+ resolution: "resolved",
117
+ evidenceId: evidenceId(request.requestId, policy, selected.candidate.providerId)
118
+ }
119
+ };
120
+ }
121
+ /** Produces a new immutable evidence record; the resolution snapshot is never rewritten. */
122
+ export function recordPolicyExecution(evidence, result, materialization = "observed") {
123
+ return { ...evidence, materialization, execution: result, executionResult: result };
124
+ }
125
+ function matchesAttributes(expected, actual) {
126
+ return Object.entries(expected).every(([key, value]) => actual?.[key] === value);
127
+ }
128
+ function evidenceId(requestId, policy, provider) {
129
+ return `evd_policy_${requestId}_${policy.policyId}_${policy.policyVersion}_${provider}`.replace(/[^a-zA-Z0-9_.-]/g, "_");
130
+ }
131
+ //# sourceMappingURL=resolution-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolution-policy.js","sourceRoot":"","sources":["../src/resolution-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,yBAAyB,EAI1B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,iCAA0C,CAAC;AAqB/E,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IACR;IAAtC,YAAY,OAAe,EAAW,IAAY;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QADqB,SAAI,GAAJ,IAAI,CAAQ;QAEhD,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AAED,MAAM,UAAU,sBAAsB,CAAC,UAAsC;IAC3E,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE;QAAE,MAAM,IAAI,qBAAqB,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,CAAC;IAC9G,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9D,IAAI,CAAC,aAAa;QAAE,MAAM,IAAI,qBAAqB,CAAC,2BAA2B,EAAE,wBAAwB,CAAC,CAAC;IAC3G,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;QACjE,MAAM,IAAI,qBAAqB,CAAC,sCAAsC,EAAE,yBAAyB,CAAC,CAAC;IACrG,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,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OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC;SACjF;KACF,CAAC;AACJ,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,qBAAqB,CACnC,QAAkC,EAClC,MAA6B,EAC7B,eAAe,GAAG,UAAU;IAE5B,OAAO,EAAE,GAAG,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC;AACtF,CAAC;AAED,SAAS,iBAAiB,CAAC,QAA0C,EAAE,MAAyC;IAC9G,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC;AACnF,CAAC;AAED,SAAS,UAAU,CAAC,SAAiB,EAAE,MAAwB,EAAE,QAAgB;IAC/E,OAAO,cAAc,SAAS,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,aAAa,IAAI,QAAQ,EAAE,CAAC,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;AAC3H,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appport/sdk",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "AppPort developer SDK: implement a universal application boundary across runtimes and transports.",
5
5
  "keywords": [
6
6
  "appport",