@appport/sdk 1.1.19 → 1.1.20
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.
- package/LICENSE +126 -0
- package/README.md +86 -9
- package/dist/application-onboarding.d.ts +52 -0
- package/dist/application-onboarding.d.ts.map +1 -0
- package/dist/application-onboarding.js +50 -0
- package/dist/application-onboarding.js.map +1 -0
- package/dist/external-compatibility.d.ts +142 -0
- package/dist/external-compatibility.d.ts.map +1 -0
- package/dist/external-compatibility.js +132 -0
- package/dist/external-compatibility.js.map +1 -0
- package/dist/index.d.ts +18 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -13
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1 -1
- package/dist/provider-lifecycle.d.ts +247 -0
- package/dist/provider-lifecycle.d.ts.map +1 -0
- package/dist/provider-lifecycle.js +314 -0
- package/dist/provider-lifecycle.js.map +1 -0
- package/dist/resolution-policy.d.ts +81 -0
- package/dist/resolution-policy.d.ts.map +1 -0
- package/dist/resolution-policy.js +131 -0
- package/dist/resolution-policy.js.map +1 -0
- package/package.json +32 -22
- package/vendor/@appport/authorization/README.md +28 -0
- package/vendor/@appport/authorization/dist/index.d.ts +94 -0
- package/vendor/@appport/authorization/dist/index.d.ts.map +1 -0
- package/vendor/@appport/authorization/dist/index.js +131 -0
- package/vendor/@appport/authorization/dist/index.js.map +1 -0
- package/vendor/@appport/authorization/package.json +28 -0
- package/vendor/@appport/client/README.md +35 -0
- package/vendor/@appport/client/dist/channel.d.ts +14 -0
- package/vendor/@appport/client/dist/channel.d.ts.map +1 -0
- package/vendor/@appport/client/dist/channel.js +58 -0
- package/vendor/@appport/client/dist/channel.js.map +1 -0
- package/vendor/@appport/client/dist/client.d.ts +61 -0
- package/vendor/@appport/client/dist/client.d.ts.map +1 -0
- package/vendor/@appport/client/dist/client.js +214 -0
- package/vendor/@appport/client/dist/client.js.map +1 -0
- package/vendor/@appport/client/dist/contract.d.ts +55 -0
- package/vendor/@appport/client/dist/contract.d.ts.map +1 -0
- package/vendor/@appport/client/dist/contract.js +12 -0
- package/vendor/@appport/client/dist/contract.js.map +1 -0
- package/vendor/@appport/client/dist/discovery.d.ts +17 -0
- package/vendor/@appport/client/dist/discovery.d.ts.map +1 -0
- package/vendor/@appport/client/dist/discovery.js +56 -0
- package/vendor/@appport/client/dist/discovery.js.map +1 -0
- package/vendor/@appport/client/dist/duplex.d.ts +25 -0
- package/vendor/@appport/client/dist/duplex.d.ts.map +1 -0
- package/vendor/@appport/client/dist/duplex.js +194 -0
- package/vendor/@appport/client/dist/duplex.js.map +1 -0
- package/vendor/@appport/client/dist/host.d.ts +62 -0
- package/vendor/@appport/client/dist/host.d.ts.map +1 -0
- package/vendor/@appport/client/dist/host.js +139 -0
- package/vendor/@appport/client/dist/host.js.map +1 -0
- package/vendor/@appport/client/dist/index.d.ts +14 -0
- package/vendor/@appport/client/dist/index.d.ts.map +1 -0
- package/vendor/@appport/client/dist/index.js +14 -0
- package/vendor/@appport/client/dist/index.js.map +1 -0
- package/vendor/@appport/client/dist/transport.d.ts +42 -0
- package/vendor/@appport/client/dist/transport.d.ts.map +1 -0
- package/vendor/@appport/client/dist/transport.js +2 -0
- package/vendor/@appport/client/dist/transport.js.map +1 -0
- package/vendor/@appport/client/package.json +32 -0
- package/vendor/@appport/core/README.md +91 -0
- package/vendor/@appport/core/dist/appboundry-capability-catalog.d.ts +930 -0
- package/vendor/@appport/core/dist/appboundry-capability-catalog.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-capability-catalog.js +352 -0
- package/vendor/@appport/core/dist/appboundry-capability-catalog.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-composition.d.ts +93 -0
- package/vendor/@appport/core/dist/appboundry-composition.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-composition.js +184 -0
- package/vendor/@appport/core/dist/appboundry-composition.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-contract.d.ts +80 -0
- package/vendor/@appport/core/dist/appboundry-contract.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-contract.js +160 -0
- package/vendor/@appport/core/dist/appboundry-contract.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-diagnostics.d.ts +107 -0
- package/vendor/@appport/core/dist/appboundry-diagnostics.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-diagnostics.js +358 -0
- package/vendor/@appport/core/dist/appboundry-diagnostics.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-discovery.d.ts +110 -0
- package/vendor/@appport/core/dist/appboundry-discovery.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-discovery.js +141 -0
- package/vendor/@appport/core/dist/appboundry-discovery.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-entitlements.d.ts +128 -0
- package/vendor/@appport/core/dist/appboundry-entitlements.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-entitlements.js +312 -0
- package/vendor/@appport/core/dist/appboundry-entitlements.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-execution.d.ts +84 -0
- package/vendor/@appport/core/dist/appboundry-execution.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-execution.js +150 -0
- package/vendor/@appport/core/dist/appboundry-execution.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-exercise.d.ts +152 -0
- package/vendor/@appport/core/dist/appboundry-exercise.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-exercise.js +416 -0
- package/vendor/@appport/core/dist/appboundry-exercise.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-materialization.d.ts +222 -0
- package/vendor/@appport/core/dist/appboundry-materialization.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-materialization.js +494 -0
- package/vendor/@appport/core/dist/appboundry-materialization.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-migration.d.ts +195 -0
- package/vendor/@appport/core/dist/appboundry-migration.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-migration.js +227 -0
- package/vendor/@appport/core/dist/appboundry-migration.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-onboarding.d.ts +70 -0
- package/vendor/@appport/core/dist/appboundry-onboarding.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-onboarding.js +232 -0
- package/vendor/@appport/core/dist/appboundry-onboarding.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-operation-discovery.d.ts +93 -0
- package/vendor/@appport/core/dist/appboundry-operation-discovery.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-operation-discovery.js +89 -0
- package/vendor/@appport/core/dist/appboundry-operation-discovery.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-resolution.d.ts +160 -0
- package/vendor/@appport/core/dist/appboundry-resolution.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-resolution.js +218 -0
- package/vendor/@appport/core/dist/appboundry-resolution.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-surface.d.ts +96 -0
- package/vendor/@appport/core/dist/appboundry-surface.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-surface.js +223 -0
- package/vendor/@appport/core/dist/appboundry-surface.js.map +1 -0
- package/vendor/@appport/core/dist/appboundry-usage.d.ts +94 -0
- package/vendor/@appport/core/dist/appboundry-usage.d.ts.map +1 -0
- package/vendor/@appport/core/dist/appboundry-usage.js +80 -0
- package/vendor/@appport/core/dist/appboundry-usage.js.map +1 -0
- package/vendor/@appport/core/dist/application-conformance.d.ts +68 -0
- package/vendor/@appport/core/dist/application-conformance.d.ts.map +1 -0
- package/vendor/@appport/core/dist/application-conformance.js +108 -0
- package/vendor/@appport/core/dist/application-conformance.js.map +1 -0
- package/vendor/@appport/core/dist/application-implementation.d.ts +125 -0
- package/vendor/@appport/core/dist/application-implementation.d.ts.map +1 -0
- package/vendor/@appport/core/dist/application-implementation.js +220 -0
- package/vendor/@appport/core/dist/application-implementation.js.map +1 -0
- package/vendor/@appport/core/dist/application-lifecycle.d.ts +150 -0
- package/vendor/@appport/core/dist/application-lifecycle.d.ts.map +1 -0
- package/vendor/@appport/core/dist/application-lifecycle.js +70 -0
- package/vendor/@appport/core/dist/application-lifecycle.js.map +1 -0
- package/vendor/@appport/core/dist/application-package.d.ts +105 -0
- package/vendor/@appport/core/dist/application-package.d.ts.map +1 -0
- package/vendor/@appport/core/dist/application-package.js +349 -0
- package/vendor/@appport/core/dist/application-package.js.map +1 -0
- package/vendor/@appport/core/dist/application-source.d.ts +109 -0
- package/vendor/@appport/core/dist/application-source.d.ts.map +1 -0
- package/vendor/@appport/core/dist/application-source.js +186 -0
- package/vendor/@appport/core/dist/application-source.js.map +1 -0
- package/vendor/@appport/core/dist/application.d.ts +124 -0
- package/vendor/@appport/core/dist/application.d.ts.map +1 -0
- package/vendor/@appport/core/dist/application.js +518 -0
- package/vendor/@appport/core/dist/application.js.map +1 -0
- package/vendor/@appport/core/dist/artifact.d.ts +395 -0
- package/vendor/@appport/core/dist/artifact.d.ts.map +1 -0
- package/vendor/@appport/core/dist/artifact.js +392 -0
- package/vendor/@appport/core/dist/artifact.js.map +1 -0
- package/vendor/@appport/core/dist/assembly.d.ts +237 -0
- package/vendor/@appport/core/dist/assembly.d.ts.map +1 -0
- package/vendor/@appport/core/dist/assembly.js +458 -0
- package/vendor/@appport/core/dist/assembly.js.map +1 -0
- package/vendor/@appport/core/dist/authority-attestation.d.ts +34 -0
- package/vendor/@appport/core/dist/authority-attestation.d.ts.map +1 -0
- package/vendor/@appport/core/dist/authority-attestation.js +72 -0
- package/vendor/@appport/core/dist/authority-attestation.js.map +1 -0
- package/vendor/@appport/core/dist/authorization-grant.d.ts +107 -0
- package/vendor/@appport/core/dist/authorization-grant.d.ts.map +1 -0
- package/vendor/@appport/core/dist/authorization-grant.js +131 -0
- package/vendor/@appport/core/dist/authorization-grant.js.map +1 -0
- package/vendor/@appport/core/dist/binding.d.ts +294 -0
- package/vendor/@appport/core/dist/binding.d.ts.map +1 -0
- package/vendor/@appport/core/dist/binding.js +263 -0
- package/vendor/@appport/core/dist/binding.js.map +1 -0
- package/vendor/@appport/core/dist/builtins.d.ts +18 -0
- package/vendor/@appport/core/dist/builtins.d.ts.map +1 -0
- package/vendor/@appport/core/dist/builtins.js +38 -0
- package/vendor/@appport/core/dist/builtins.js.map +1 -0
- package/vendor/@appport/core/dist/capability.d.ts +94 -0
- package/vendor/@appport/core/dist/capability.d.ts.map +1 -0
- package/vendor/@appport/core/dist/capability.js +85 -0
- package/vendor/@appport/core/dist/capability.js.map +1 -0
- package/vendor/@appport/core/dist/concurrency.d.ts +16 -0
- package/vendor/@appport/core/dist/concurrency.d.ts.map +1 -0
- package/vendor/@appport/core/dist/concurrency.js +46 -0
- package/vendor/@appport/core/dist/concurrency.js.map +1 -0
- package/vendor/@appport/core/dist/context.d.ts +59 -0
- package/vendor/@appport/core/dist/context.d.ts.map +1 -0
- package/vendor/@appport/core/dist/context.js +14 -0
- package/vendor/@appport/core/dist/context.js.map +1 -0
- package/vendor/@appport/core/dist/contract-artifact.d.ts +15 -0
- package/vendor/@appport/core/dist/contract-artifact.d.ts.map +1 -0
- package/vendor/@appport/core/dist/contract-artifact.js +161 -0
- package/vendor/@appport/core/dist/contract-artifact.js.map +1 -0
- package/vendor/@appport/core/dist/contract-attestation.d.ts +68 -0
- package/vendor/@appport/core/dist/contract-attestation.d.ts.map +1 -0
- package/vendor/@appport/core/dist/contract-attestation.js +76 -0
- package/vendor/@appport/core/dist/contract-attestation.js.map +1 -0
- package/vendor/@appport/core/dist/crash-injection.d.ts +3 -0
- package/vendor/@appport/core/dist/crash-injection.d.ts.map +1 -0
- package/vendor/@appport/core/dist/crash-injection.js +8 -0
- package/vendor/@appport/core/dist/crash-injection.js.map +1 -0
- package/vendor/@appport/core/dist/events.d.ts +33 -0
- package/vendor/@appport/core/dist/events.d.ts.map +1 -0
- package/vendor/@appport/core/dist/events.js +79 -0
- package/vendor/@appport/core/dist/events.js.map +1 -0
- package/vendor/@appport/core/dist/execution-barrier.d.ts +13 -0
- package/vendor/@appport/core/dist/execution-barrier.d.ts.map +1 -0
- package/vendor/@appport/core/dist/execution-barrier.js +33 -0
- package/vendor/@appport/core/dist/execution-barrier.js.map +1 -0
- package/vendor/@appport/core/dist/execution-ledger.d.ts +81 -0
- package/vendor/@appport/core/dist/execution-ledger.d.ts.map +1 -0
- package/vendor/@appport/core/dist/execution-ledger.js +173 -0
- package/vendor/@appport/core/dist/execution-ledger.js.map +1 -0
- package/vendor/@appport/core/dist/execution.d.ts +387 -0
- package/vendor/@appport/core/dist/execution.d.ts.map +1 -0
- package/vendor/@appport/core/dist/execution.js +165 -0
- package/vendor/@appport/core/dist/execution.js.map +1 -0
- package/vendor/@appport/core/dist/idempotency.d.ts +36 -0
- package/vendor/@appport/core/dist/idempotency.d.ts.map +1 -0
- package/vendor/@appport/core/dist/idempotency.js +36 -0
- package/vendor/@appport/core/dist/idempotency.js.map +1 -0
- package/vendor/@appport/core/dist/implementation.d.ts +110 -0
- package/vendor/@appport/core/dist/implementation.d.ts.map +1 -0
- package/vendor/@appport/core/dist/implementation.js +65 -0
- package/vendor/@appport/core/dist/implementation.js.map +1 -0
- package/vendor/@appport/core/dist/index.d.ts +62 -0
- package/vendor/@appport/core/dist/index.d.ts.map +1 -0
- package/vendor/@appport/core/dist/index.js +61 -0
- package/vendor/@appport/core/dist/index.js.map +1 -0
- package/vendor/@appport/core/dist/invocation.d.ts +253 -0
- package/vendor/@appport/core/dist/invocation.d.ts.map +1 -0
- package/vendor/@appport/core/dist/invocation.js +258 -0
- package/vendor/@appport/core/dist/invocation.js.map +1 -0
- package/vendor/@appport/core/dist/manifest.d.ts +157 -0
- package/vendor/@appport/core/dist/manifest.d.ts.map +1 -0
- package/vendor/@appport/core/dist/manifest.js +255 -0
- package/vendor/@appport/core/dist/manifest.js.map +1 -0
- package/vendor/@appport/core/dist/memory-application-data-store.d.ts +19 -0
- package/vendor/@appport/core/dist/memory-application-data-store.d.ts.map +1 -0
- package/vendor/@appport/core/dist/memory-application-data-store.js +161 -0
- package/vendor/@appport/core/dist/memory-application-data-store.js.map +1 -0
- package/vendor/@appport/core/dist/operations.d.ts +61 -0
- package/vendor/@appport/core/dist/operations.d.ts.map +1 -0
- package/vendor/@appport/core/dist/operations.js +210 -0
- package/vendor/@appport/core/dist/operations.js.map +1 -0
- package/vendor/@appport/core/dist/provider-contract.d.ts +89 -0
- package/vendor/@appport/core/dist/provider-contract.d.ts.map +1 -0
- package/vendor/@appport/core/dist/provider-contract.js +40 -0
- package/vendor/@appport/core/dist/provider-contract.js.map +1 -0
- package/vendor/@appport/core/dist/public.d.ts +23 -0
- package/vendor/@appport/core/dist/public.d.ts.map +1 -0
- package/vendor/@appport/core/dist/public.js +22 -0
- package/vendor/@appport/core/dist/public.js.map +1 -0
- package/vendor/@appport/core/dist/registration.d.ts +165 -0
- package/vendor/@appport/core/dist/registration.d.ts.map +1 -0
- package/vendor/@appport/core/dist/registration.js +253 -0
- package/vendor/@appport/core/dist/registration.js.map +1 -0
- package/vendor/@appport/core/dist/registry.d.ts +30 -0
- package/vendor/@appport/core/dist/registry.d.ts.map +1 -0
- package/vendor/@appport/core/dist/registry.js +149 -0
- package/vendor/@appport/core/dist/registry.js.map +1 -0
- package/vendor/@appport/core/dist/resolver.d.ts +130 -0
- package/vendor/@appport/core/dist/resolver.d.ts.map +1 -0
- package/vendor/@appport/core/dist/resolver.js +252 -0
- package/vendor/@appport/core/dist/resolver.js.map +1 -0
- package/vendor/@appport/core/dist/runtime-manifest.d.ts +68 -0
- package/vendor/@appport/core/dist/runtime-manifest.d.ts.map +1 -0
- package/vendor/@appport/core/dist/runtime-manifest.js +84 -0
- package/vendor/@appport/core/dist/runtime-manifest.js.map +1 -0
- package/vendor/@appport/core/dist/sanitize.d.ts +14 -0
- package/vendor/@appport/core/dist/sanitize.d.ts.map +1 -0
- package/vendor/@appport/core/dist/sanitize.js +49 -0
- package/vendor/@appport/core/dist/sanitize.js.map +1 -0
- package/vendor/@appport/core/dist/server-internal.d.ts +5 -0
- package/vendor/@appport/core/dist/server-internal.d.ts.map +1 -0
- package/vendor/@appport/core/dist/server-internal.js +4 -0
- package/vendor/@appport/core/dist/server-internal.js.map +1 -0
- package/vendor/@appport/core/dist/sessions.d.ts +29 -0
- package/vendor/@appport/core/dist/sessions.d.ts.map +1 -0
- package/vendor/@appport/core/dist/sessions.js +39 -0
- package/vendor/@appport/core/dist/sessions.js.map +1 -0
- package/vendor/@appport/core/dist/sha256.d.ts +3 -0
- package/vendor/@appport/core/dist/sha256.d.ts.map +1 -0
- package/vendor/@appport/core/dist/sha256.js +46 -0
- package/vendor/@appport/core/dist/sha256.js.map +1 -0
- package/vendor/@appport/core/dist/source-verification.d.ts +53 -0
- package/vendor/@appport/core/dist/source-verification.d.ts.map +1 -0
- package/vendor/@appport/core/dist/source-verification.js +92 -0
- package/vendor/@appport/core/dist/source-verification.js.map +1 -0
- package/vendor/@appport/core/dist/state-context.d.ts +312 -0
- package/vendor/@appport/core/dist/state-context.d.ts.map +1 -0
- package/vendor/@appport/core/dist/state-context.js +100 -0
- package/vendor/@appport/core/dist/state-context.js.map +1 -0
- package/vendor/@appport/core/dist/state.d.ts +96 -0
- package/vendor/@appport/core/dist/state.d.ts.map +1 -0
- package/vendor/@appport/core/dist/state.js +89 -0
- package/vendor/@appport/core/dist/state.js.map +1 -0
- package/vendor/@appport/core/dist/streams.d.ts +38 -0
- package/vendor/@appport/core/dist/streams.d.ts.map +1 -0
- package/vendor/@appport/core/dist/streams.js +123 -0
- package/vendor/@appport/core/dist/streams.js.map +1 -0
- package/vendor/@appport/core/dist/telemetry.d.ts +42 -0
- package/vendor/@appport/core/dist/telemetry.d.ts.map +1 -0
- package/vendor/@appport/core/dist/telemetry.js +32 -0
- package/vendor/@appport/core/dist/telemetry.js.map +1 -0
- package/vendor/@appport/core/dist/wasm-engine.d.ts +24 -0
- package/vendor/@appport/core/dist/wasm-engine.d.ts.map +1 -0
- package/vendor/@appport/core/dist/wasm-engine.js +376 -0
- package/vendor/@appport/core/dist/wasm-engine.js.map +1 -0
- package/vendor/@appport/core/package.json +58 -0
- package/vendor/@appport/mcp/README.md +29 -0
- package/vendor/@appport/mcp/dist/index.d.ts +59 -0
- package/vendor/@appport/mcp/dist/index.d.ts.map +1 -0
- package/vendor/@appport/mcp/dist/index.js +70 -0
- package/vendor/@appport/mcp/dist/index.js.map +1 -0
- package/vendor/@appport/mcp/package.json +29 -0
- package/vendor/@appport/mobile/README.md +10 -0
- package/vendor/@appport/mobile/dist/index.d.ts +66 -0
- package/vendor/@appport/mobile/dist/index.d.ts.map +1 -0
- package/vendor/@appport/mobile/dist/index.js +182 -0
- package/vendor/@appport/mobile/dist/index.js.map +1 -0
- package/vendor/@appport/mobile/package.json +33 -0
- package/vendor/@appport/protocol/README.md +41 -0
- package/vendor/@appport/protocol/dist/blob.d.ts +46 -0
- package/vendor/@appport/protocol/dist/blob.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/blob.js +23 -0
- package/vendor/@appport/protocol/dist/blob.js.map +1 -0
- package/vendor/@appport/protocol/dist/compatibility.d.ts +25 -0
- package/vendor/@appport/protocol/dist/compatibility.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/compatibility.js +189 -0
- package/vendor/@appport/protocol/dist/compatibility.js.map +1 -0
- package/vendor/@appport/protocol/dist/envelopes.d.ts +175 -0
- package/vendor/@appport/protocol/dist/envelopes.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/envelopes.js +97 -0
- package/vendor/@appport/protocol/dist/envelopes.js.map +1 -0
- package/vendor/@appport/protocol/dist/errors.d.ts +74 -0
- package/vendor/@appport/protocol/dist/errors.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/errors.js +92 -0
- package/vendor/@appport/protocol/dist/errors.js.map +1 -0
- package/vendor/@appport/protocol/dist/ids.d.ts +12 -0
- package/vendor/@appport/protocol/dist/ids.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/ids.js +50 -0
- package/vendor/@appport/protocol/dist/ids.js.map +1 -0
- package/vendor/@appport/protocol/dist/index.d.ts +21 -0
- package/vendor/@appport/protocol/dist/index.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/index.js +21 -0
- package/vendor/@appport/protocol/dist/index.js.map +1 -0
- package/vendor/@appport/protocol/dist/jsonschema.d.ts +50 -0
- package/vendor/@appport/protocol/dist/jsonschema.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/jsonschema.js +6 -0
- package/vendor/@appport/protocol/dist/jsonschema.js.map +1 -0
- package/vendor/@appport/protocol/dist/manifest.d.ts +134 -0
- package/vendor/@appport/protocol/dist/manifest.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/manifest.js +20 -0
- package/vendor/@appport/protocol/dist/manifest.js.map +1 -0
- package/vendor/@appport/protocol/dist/materialization.d.ts +59 -0
- package/vendor/@appport/protocol/dist/materialization.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/materialization.js +2 -0
- package/vendor/@appport/protocol/dist/materialization.js.map +1 -0
- package/vendor/@appport/protocol/dist/names.d.ts +26 -0
- package/vendor/@appport/protocol/dist/names.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/names.js +85 -0
- package/vendor/@appport/protocol/dist/names.js.map +1 -0
- package/vendor/@appport/protocol/dist/operations.d.ts +34 -0
- package/vendor/@appport/protocol/dist/operations.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/operations.js +9 -0
- package/vendor/@appport/protocol/dist/operations.js.map +1 -0
- package/vendor/@appport/protocol/dist/session.d.ts +27 -0
- package/vendor/@appport/protocol/dist/session.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/session.js +7 -0
- package/vendor/@appport/protocol/dist/session.js.map +1 -0
- package/vendor/@appport/protocol/dist/validate.d.ts +37 -0
- package/vendor/@appport/protocol/dist/validate.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/validate.js +321 -0
- package/vendor/@appport/protocol/dist/validate.js.map +1 -0
- package/vendor/@appport/protocol/dist/version.d.ts +27 -0
- package/vendor/@appport/protocol/dist/version.d.ts.map +1 -0
- package/vendor/@appport/protocol/dist/version.js +26 -0
- package/vendor/@appport/protocol/dist/version.js.map +1 -0
- package/vendor/@appport/protocol/package.json +25 -0
- package/vendor/@appport/schema/README.md +32 -0
- package/vendor/@appport/schema/dist/builder.d.ts +85 -0
- package/vendor/@appport/schema/dist/builder.d.ts.map +1 -0
- package/vendor/@appport/schema/dist/builder.js +278 -0
- package/vendor/@appport/schema/dist/builder.js.map +1 -0
- package/vendor/@appport/schema/dist/from-json-schema.d.ts +12 -0
- package/vendor/@appport/schema/dist/from-json-schema.d.ts.map +1 -0
- package/vendor/@appport/schema/dist/from-json-schema.js +186 -0
- package/vendor/@appport/schema/dist/from-json-schema.js.map +1 -0
- package/vendor/@appport/schema/dist/index.d.ts +23 -0
- package/vendor/@appport/schema/dist/index.d.ts.map +1 -0
- package/vendor/@appport/schema/dist/index.js +22 -0
- package/vendor/@appport/schema/dist/index.js.map +1 -0
- package/vendor/@appport/schema/dist/standard.d.ts +46 -0
- package/vendor/@appport/schema/dist/standard.d.ts.map +1 -0
- package/vendor/@appport/schema/dist/standard.js +42 -0
- package/vendor/@appport/schema/dist/standard.js.map +1 -0
- package/vendor/@appport/schema/dist/types.d.ts +40 -0
- package/vendor/@appport/schema/dist/types.d.ts.map +1 -0
- package/vendor/@appport/schema/dist/types.js +19 -0
- package/vendor/@appport/schema/dist/types.js.map +1 -0
- package/vendor/@appport/schema/package.json +28 -0
- package/vendor/@appport/server/README.md +39 -0
- package/vendor/@appport/server/dist/connection.d.ts +45 -0
- package/vendor/@appport/server/dist/connection.d.ts.map +1 -0
- package/vendor/@appport/server/dist/connection.js +217 -0
- package/vendor/@appport/server/dist/connection.js.map +1 -0
- package/vendor/@appport/server/dist/fetch.d.ts +10 -0
- package/vendor/@appport/server/dist/fetch.d.ts.map +1 -0
- package/vendor/@appport/server/dist/fetch.js +50 -0
- package/vendor/@appport/server/dist/fetch.js.map +1 -0
- package/vendor/@appport/server/dist/http.d.ts +80 -0
- package/vendor/@appport/server/dist/http.d.ts.map +1 -0
- package/vendor/@appport/server/dist/http.js +307 -0
- package/vendor/@appport/server/dist/http.js.map +1 -0
- package/vendor/@appport/server/dist/index.d.ts +11 -0
- package/vendor/@appport/server/dist/index.d.ts.map +1 -0
- package/vendor/@appport/server/dist/index.js +11 -0
- package/vendor/@appport/server/dist/index.js.map +1 -0
- package/vendor/@appport/server/dist/node-entry.d.ts +4 -0
- package/vendor/@appport/server/dist/node-entry.d.ts.map +1 -0
- package/vendor/@appport/server/dist/node-entry.js +4 -0
- package/vendor/@appport/server/dist/node-entry.js.map +1 -0
- package/vendor/@appport/server/dist/node.d.ts +45 -0
- package/vendor/@appport/server/dist/node.d.ts.map +1 -0
- package/vendor/@appport/server/dist/node.js +190 -0
- package/vendor/@appport/server/dist/node.js.map +1 -0
- package/vendor/@appport/server/dist/server.d.ts +83 -0
- package/vendor/@appport/server/dist/server.d.ts.map +1 -0
- package/vendor/@appport/server/dist/server.js +114 -0
- package/vendor/@appport/server/dist/server.js.map +1 -0
- package/vendor/@appport/server/dist/websocket.d.ts +25 -0
- package/vendor/@appport/server/dist/websocket.d.ts.map +1 -0
- package/vendor/@appport/server/dist/websocket.js +221 -0
- package/vendor/@appport/server/dist/websocket.js.map +1 -0
- package/vendor/@appport/server/package.json +34 -0
- package/vendor/@appport/transport-electron/README.md +56 -0
- package/vendor/@appport/transport-electron/dist/index.d.ts +11 -0
- package/vendor/@appport/transport-electron/dist/index.d.ts.map +1 -0
- package/vendor/@appport/transport-electron/dist/index.js +11 -0
- package/vendor/@appport/transport-electron/dist/index.js.map +1 -0
- package/vendor/@appport/transport-electron/dist/main.d.ts +31 -0
- package/vendor/@appport/transport-electron/dist/main.d.ts.map +1 -0
- package/vendor/@appport/transport-electron/dist/main.js +61 -0
- package/vendor/@appport/transport-electron/dist/main.js.map +1 -0
- package/vendor/@appport/transport-electron/dist/preload.d.ts +22 -0
- package/vendor/@appport/transport-electron/dist/preload.d.ts.map +1 -0
- package/vendor/@appport/transport-electron/dist/preload.js +29 -0
- package/vendor/@appport/transport-electron/dist/preload.js.map +1 -0
- package/vendor/@appport/transport-electron/dist/renderer.d.ts +16 -0
- package/vendor/@appport/transport-electron/dist/renderer.d.ts.map +1 -0
- package/vendor/@appport/transport-electron/dist/renderer.js +36 -0
- package/vendor/@appport/transport-electron/dist/renderer.js.map +1 -0
- package/vendor/@appport/transport-electron/dist/types.d.ts +49 -0
- package/vendor/@appport/transport-electron/dist/types.d.ts.map +1 -0
- package/vendor/@appport/transport-electron/dist/types.js +5 -0
- package/vendor/@appport/transport-electron/dist/types.js.map +1 -0
- package/vendor/@appport/transport-electron/package.json +46 -0
- package/vendor/@appport/transport-http/README.md +24 -0
- package/vendor/@appport/transport-http/dist/index.d.ts +18 -0
- package/vendor/@appport/transport-http/dist/index.d.ts.map +1 -0
- package/vendor/@appport/transport-http/dist/index.js +223 -0
- package/vendor/@appport/transport-http/dist/index.js.map +1 -0
- package/vendor/@appport/transport-http/package.json +29 -0
- package/vendor/@appport/transport-inprocess/README.md +24 -0
- package/vendor/@appport/transport-inprocess/dist/index.d.ts +16 -0
- package/vendor/@appport/transport-inprocess/dist/index.d.ts.map +1 -0
- package/vendor/@appport/transport-inprocess/dist/index.js +30 -0
- package/vendor/@appport/transport-inprocess/dist/index.js.map +1 -0
- package/vendor/@appport/transport-inprocess/package.json +30 -0
- package/vendor/@appport/transport-tauri/README.md +45 -0
- package/vendor/@appport/transport-tauri/dist/index.d.ts +23 -0
- package/vendor/@appport/transport-tauri/dist/index.d.ts.map +1 -0
- package/vendor/@appport/transport-tauri/dist/index.js +44 -0
- package/vendor/@appport/transport-tauri/dist/index.js.map +1 -0
- package/vendor/@appport/transport-tauri/package.json +29 -0
- package/vendor/@appport/transport-websocket/README.md +22 -0
- package/vendor/@appport/transport-websocket/dist/index.d.ts +26 -0
- package/vendor/@appport/transport-websocket/dist/index.d.ts.map +1 -0
- package/vendor/@appport/transport-websocket/dist/index.js +72 -0
- package/vendor/@appport/transport-websocket/dist/index.js.map +1 -0
- package/vendor/@appport/transport-websocket/package.json +29 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application-developer API consumed by `@appport/sdk`.
|
|
3
|
+
*
|
|
4
|
+
* This is deliberately narrower than core's internal index. Durable authority,
|
|
5
|
+
* persistence, lifecycle, binding, ledger, artifact storage, and execution
|
|
6
|
+
* engine modules are not part of the npm API contract.
|
|
7
|
+
*/
|
|
8
|
+
export * from "./application.js";
|
|
9
|
+
export * from "./assembly.js";
|
|
10
|
+
export * from "./capability.js";
|
|
11
|
+
export * from "./context.js";
|
|
12
|
+
export * from "./implementation.js";
|
|
13
|
+
export * from "./manifest.js";
|
|
14
|
+
export * from "./contract-artifact.js";
|
|
15
|
+
export * from "./application-package.js";
|
|
16
|
+
export * from "./appboundry-contract.js";
|
|
17
|
+
export * from "./runtime-manifest.js";
|
|
18
|
+
export * from "./streams.js";
|
|
19
|
+
export type { CapabilityInvocationContext, CapabilityInvocationRequest, CapabilityInvocationResult, CancelledInvocationResult, FailedInvocationResult, SuccessfulInvocationResult, TimedOutInvocationResult } from "./invocation.js";
|
|
20
|
+
export * from "./appboundry-capability-catalog.js";
|
|
21
|
+
export * from "./appboundry-operation-discovery.js";
|
|
22
|
+
export * from "./appboundry-migration.js";
|
|
23
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,yBAAyB,EACzB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application-developer API consumed by `@appport/sdk`.
|
|
3
|
+
*
|
|
4
|
+
* This is deliberately narrower than core's internal index. Durable authority,
|
|
5
|
+
* persistence, lifecycle, binding, ledger, artifact storage, and execution
|
|
6
|
+
* engine modules are not part of the npm API contract.
|
|
7
|
+
*/
|
|
8
|
+
export * from "./application.js";
|
|
9
|
+
export * from "./assembly.js";
|
|
10
|
+
export * from "./capability.js";
|
|
11
|
+
export * from "./context.js";
|
|
12
|
+
export * from "./implementation.js";
|
|
13
|
+
export * from "./manifest.js";
|
|
14
|
+
export * from "./contract-artifact.js";
|
|
15
|
+
export * from "./application-package.js";
|
|
16
|
+
export * from "./appboundry-contract.js";
|
|
17
|
+
export * from "./runtime-manifest.js";
|
|
18
|
+
export * from "./streams.js";
|
|
19
|
+
export * from "./appboundry-capability-catalog.js";
|
|
20
|
+
export * from "./appboundry-operation-discovery.js";
|
|
21
|
+
export * from "./appboundry-migration.js";
|
|
22
|
+
//# sourceMappingURL=public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAW7B,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Registry: FeltDB-backed application state management
|
|
3
|
+
*
|
|
4
|
+
* Handles registration, lookup, listing, and state persistence of
|
|
5
|
+
* tracked applications. Integrates with FeltDB via the adapter pattern.
|
|
6
|
+
*
|
|
7
|
+
* The registry is the authoritative source for:
|
|
8
|
+
* - Application identity and manifests
|
|
9
|
+
* - Fingerprints and verification state
|
|
10
|
+
* - Application lifecycle and revisions
|
|
11
|
+
* - Application discovery
|
|
12
|
+
*/
|
|
13
|
+
import type { ApplicationState, RegisterApplicationOptions } from "./state.js";
|
|
14
|
+
/**
|
|
15
|
+
* Storage interface for application state.
|
|
16
|
+
*
|
|
17
|
+
* This is similar to {@link FeltDbLike} but purpose-specific for applications.
|
|
18
|
+
* Implementations can use FeltDB, memory storage, or any persistent backend.
|
|
19
|
+
*/
|
|
20
|
+
export interface ApplicationStateStore {
|
|
21
|
+
/**
|
|
22
|
+
* Retrieve an application state by ID.
|
|
23
|
+
*
|
|
24
|
+
* Returns undefined if the application is not found.
|
|
25
|
+
*/
|
|
26
|
+
get(id: string): Promise<ApplicationState | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* Store an application state.
|
|
29
|
+
*
|
|
30
|
+
* If an application with this ID already exists, its state is updated.
|
|
31
|
+
*/
|
|
32
|
+
put(state: ApplicationState): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Remove an application from storage.
|
|
35
|
+
*/
|
|
36
|
+
delete(id: string): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* List all registered applications.
|
|
39
|
+
*
|
|
40
|
+
* Options:
|
|
41
|
+
* - prefix: Filter applications by ID prefix
|
|
42
|
+
* - limit: Maximum number of results
|
|
43
|
+
*/
|
|
44
|
+
list(options?: {
|
|
45
|
+
prefix?: string;
|
|
46
|
+
limit?: number;
|
|
47
|
+
}): Promise<ApplicationState[]>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* In-memory application state store.
|
|
51
|
+
*
|
|
52
|
+
* Useful for testing and development without a persistent backend.
|
|
53
|
+
*/
|
|
54
|
+
export declare class MemoryApplicationStateStore implements ApplicationStateStore {
|
|
55
|
+
#private;
|
|
56
|
+
get(id: string): Promise<ApplicationState | undefined>;
|
|
57
|
+
put(state: ApplicationState): Promise<void>;
|
|
58
|
+
delete(id: string): Promise<void>;
|
|
59
|
+
list(options?: {
|
|
60
|
+
prefix?: string;
|
|
61
|
+
limit?: number;
|
|
62
|
+
}): Promise<ApplicationState[]>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Application registry: manages registration, lookup, and tracking of
|
|
66
|
+
* applications via a persistent store.
|
|
67
|
+
*
|
|
68
|
+
* The registry enforces:
|
|
69
|
+
* - Only verified applications can be registered
|
|
70
|
+
* - Fingerprint verification for idempotency
|
|
71
|
+
* - No implementation persistence
|
|
72
|
+
* - Manifest as canonical contract
|
|
73
|
+
*/
|
|
74
|
+
export declare class ApplicationRegistry {
|
|
75
|
+
#private;
|
|
76
|
+
constructor(store: ApplicationStateStore);
|
|
77
|
+
/**
|
|
78
|
+
* Register a verified application.
|
|
79
|
+
*
|
|
80
|
+
* @param options - Identity, manifest, fingerprint, and verification state
|
|
81
|
+
* @returns The registered application state
|
|
82
|
+
*
|
|
83
|
+
* Throws if application is not verified or if registration is invalid.
|
|
84
|
+
*/
|
|
85
|
+
register(options: RegisterApplicationOptions): Promise<ApplicationState>;
|
|
86
|
+
/**
|
|
87
|
+
* Register an application, validating manifest and fingerprint match.
|
|
88
|
+
*
|
|
89
|
+
* This is the same as {@link register} but additionally validates that
|
|
90
|
+
* the provided fingerprint matches the manifest hash.
|
|
91
|
+
*
|
|
92
|
+
* @throws If fingerprint does not match manifest
|
|
93
|
+
*/
|
|
94
|
+
registerWithValidation(options: RegisterApplicationOptions): Promise<ApplicationState>;
|
|
95
|
+
/**
|
|
96
|
+
* Retrieve a registered application by ID.
|
|
97
|
+
*
|
|
98
|
+
* @returns The application state, or undefined if not registered
|
|
99
|
+
*/
|
|
100
|
+
get(id: string): Promise<ApplicationState | undefined>;
|
|
101
|
+
/**
|
|
102
|
+
* Check if an application is registered.
|
|
103
|
+
*/
|
|
104
|
+
has(id: string): Promise<boolean>;
|
|
105
|
+
/**
|
|
106
|
+
* List all registered applications.
|
|
107
|
+
*
|
|
108
|
+
* @param options - Query options (prefix, limit)
|
|
109
|
+
* @returns Array of registered application states
|
|
110
|
+
*/
|
|
111
|
+
list(options?: {
|
|
112
|
+
prefix?: string;
|
|
113
|
+
limit?: number;
|
|
114
|
+
}): Promise<ApplicationState[]>;
|
|
115
|
+
/**
|
|
116
|
+
* Find applications by name.
|
|
117
|
+
*
|
|
118
|
+
* Returns all versions of an application with the given name (deterministically sorted by ID).
|
|
119
|
+
*/
|
|
120
|
+
findByName(name: string): Promise<ApplicationState[]>;
|
|
121
|
+
/**
|
|
122
|
+
* Find the latest version of an application by name.
|
|
123
|
+
*
|
|
124
|
+
* Returns undefined if no application with this name is registered.
|
|
125
|
+
*/
|
|
126
|
+
getLatestByName(name: string): Promise<ApplicationState | undefined>;
|
|
127
|
+
/**
|
|
128
|
+
* Delete a registered application.
|
|
129
|
+
*
|
|
130
|
+
* This marks an application as no longer tracked. The state is
|
|
131
|
+
* permanently removed from storage.
|
|
132
|
+
*/
|
|
133
|
+
delete(id: string): Promise<void>;
|
|
134
|
+
/** Persist an authoritative activation transition. */
|
|
135
|
+
activate(id: string): Promise<ApplicationState>;
|
|
136
|
+
/** Retire without deleting identity, contract, state, or history. */
|
|
137
|
+
retire(id: string): Promise<ApplicationState>;
|
|
138
|
+
/**
|
|
139
|
+
* Find an application by its manifest fingerprint.
|
|
140
|
+
*
|
|
141
|
+
* @param fingerprint - SHA256 fingerprint of the manifest
|
|
142
|
+
* @returns Array of applications with matching fingerprint (deterministically sorted by ID)
|
|
143
|
+
*
|
|
144
|
+
* Note: Applications should have unique fingerprints in practice, but this method
|
|
145
|
+
* returns an array for consistency with other discovery methods.
|
|
146
|
+
*/
|
|
147
|
+
findByFingerprint(fingerprint: string): Promise<ApplicationState[]>;
|
|
148
|
+
/**
|
|
149
|
+
* Find applications that provide a given capability.
|
|
150
|
+
*
|
|
151
|
+
* @param name - Capability name (e.g., "invoices.read")
|
|
152
|
+
* @param version - Optional specific capability version. If omitted, matches any version of the capability.
|
|
153
|
+
* @returns Array of applications providing this capability (deterministically sorted by ID)
|
|
154
|
+
*/
|
|
155
|
+
findByCapability(name: string, version?: number): Promise<ApplicationState[]>;
|
|
156
|
+
/**
|
|
157
|
+
* Find applications that require a given capability.
|
|
158
|
+
*
|
|
159
|
+
* @param name - Capability name (e.g., "invoices.read")
|
|
160
|
+
* @param version - Optional specific capability version. If omitted, matches any version of the requirement.
|
|
161
|
+
* @returns Array of applications requiring this capability (deterministically sorted by ID)
|
|
162
|
+
*/
|
|
163
|
+
findByRequirement(name: string, version?: number): Promise<ApplicationState[]>;
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../src/registration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAM/E;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC;IAEvD;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;I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,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAItF;;;;OAIG;IACG,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAQ3D;;;;OAIG;IACG,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAqB1E;;;;;OAKG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvC,sDAAsD;IAChD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAOrD,qEAAqE;IAC/D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAMnD;;;;;;;;OAQG;IACG,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAQzE;;;;;;OAMG;IACG,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAYnF;;;;;;OAMG;IACG,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAWrF"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Registry: FeltDB-backed application state management
|
|
3
|
+
*
|
|
4
|
+
* Handles registration, lookup, listing, and state persistence of
|
|
5
|
+
* tracked applications. Integrates with FeltDB via the adapter pattern.
|
|
6
|
+
*
|
|
7
|
+
* The registry is the authoritative source for:
|
|
8
|
+
* - Application identity and manifests
|
|
9
|
+
* - Fingerprints and verification state
|
|
10
|
+
* - Application lifecycle and revisions
|
|
11
|
+
* - Application discovery
|
|
12
|
+
*/
|
|
13
|
+
import { createApplicationState, markApplicationActive, retireApplication, updateApplicationState } from "./state.js";
|
|
14
|
+
import { fingerprintManifest } from "./manifest.js";
|
|
15
|
+
/**
|
|
16
|
+
* In-memory application state store.
|
|
17
|
+
*
|
|
18
|
+
* Useful for testing and development without a persistent backend.
|
|
19
|
+
*/
|
|
20
|
+
export class MemoryApplicationStateStore {
|
|
21
|
+
#states = new Map();
|
|
22
|
+
async get(id) {
|
|
23
|
+
return this.#states.get(id);
|
|
24
|
+
}
|
|
25
|
+
async put(state) {
|
|
26
|
+
this.#states.set(state.id, state);
|
|
27
|
+
}
|
|
28
|
+
async delete(id) {
|
|
29
|
+
this.#states.delete(id);
|
|
30
|
+
}
|
|
31
|
+
async list(options) {
|
|
32
|
+
let results = [...this.#states.values()];
|
|
33
|
+
if (options?.prefix) {
|
|
34
|
+
results = results.filter((s) => s.id.startsWith(options.prefix));
|
|
35
|
+
}
|
|
36
|
+
// Deterministic ordering by application ID
|
|
37
|
+
results.sort((a, b) => a.id.localeCompare(b.id));
|
|
38
|
+
if (options?.limit) {
|
|
39
|
+
results = results.slice(0, options.limit);
|
|
40
|
+
}
|
|
41
|
+
return results;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Application registry: manages registration, lookup, and tracking of
|
|
46
|
+
* applications via a persistent store.
|
|
47
|
+
*
|
|
48
|
+
* The registry enforces:
|
|
49
|
+
* - Only verified applications can be registered
|
|
50
|
+
* - Fingerprint verification for idempotency
|
|
51
|
+
* - No implementation persistence
|
|
52
|
+
* - Manifest as canonical contract
|
|
53
|
+
*/
|
|
54
|
+
export class ApplicationRegistry {
|
|
55
|
+
#store;
|
|
56
|
+
constructor(store) {
|
|
57
|
+
this.#store = store;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Register a verified application.
|
|
61
|
+
*
|
|
62
|
+
* @param options - Identity, manifest, fingerprint, and verification state
|
|
63
|
+
* @returns The registered application state
|
|
64
|
+
*
|
|
65
|
+
* Throws if application is not verified or if registration is invalid.
|
|
66
|
+
*/
|
|
67
|
+
async register(options) {
|
|
68
|
+
// Only verified applications can be registered
|
|
69
|
+
if (!options.verification.ready) {
|
|
70
|
+
throw new Error(`Cannot register application "${options.identity.id}": application is not verified. ` +
|
|
71
|
+
`Fix verification errors and try again.`);
|
|
72
|
+
}
|
|
73
|
+
const id = options.identity.id;
|
|
74
|
+
const existing = await this.#store.get(id);
|
|
75
|
+
// Idempotency: if application already registered with same fingerprint, return existing
|
|
76
|
+
if (existing) {
|
|
77
|
+
if (existing.fingerprint === options.fingerprint) {
|
|
78
|
+
// Idempotent: same contract, return existing state
|
|
79
|
+
return existing;
|
|
80
|
+
}
|
|
81
|
+
// Different contract: update to new revision
|
|
82
|
+
const updated = updateApplicationState(existing, {
|
|
83
|
+
manifest: options.manifest,
|
|
84
|
+
fingerprint: options.fingerprint,
|
|
85
|
+
verification: options.verification,
|
|
86
|
+
status: options.status
|
|
87
|
+
});
|
|
88
|
+
await this.#store.put(updated);
|
|
89
|
+
return updated;
|
|
90
|
+
}
|
|
91
|
+
// New registration: create initial state
|
|
92
|
+
const state = createApplicationState(options, 1);
|
|
93
|
+
await this.#store.put(state);
|
|
94
|
+
return state;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Register an application, validating manifest and fingerprint match.
|
|
98
|
+
*
|
|
99
|
+
* This is the same as {@link register} but additionally validates that
|
|
100
|
+
* the provided fingerprint matches the manifest hash.
|
|
101
|
+
*
|
|
102
|
+
* @throws If fingerprint does not match manifest
|
|
103
|
+
*/
|
|
104
|
+
async registerWithValidation(options) {
|
|
105
|
+
const expectedFingerprint = fingerprintManifest(options.manifest);
|
|
106
|
+
if (options.fingerprint !== expectedFingerprint) {
|
|
107
|
+
throw new Error(`Registration validation failed: fingerprint mismatch for "${options.identity.id}". ` +
|
|
108
|
+
`Expected: ${expectedFingerprint}, got: ${options.fingerprint}`);
|
|
109
|
+
}
|
|
110
|
+
return this.register(options);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Retrieve a registered application by ID.
|
|
114
|
+
*
|
|
115
|
+
* @returns The application state, or undefined if not registered
|
|
116
|
+
*/
|
|
117
|
+
async get(id) {
|
|
118
|
+
return this.#store.get(id);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Check if an application is registered.
|
|
122
|
+
*/
|
|
123
|
+
async has(id) {
|
|
124
|
+
const state = await this.#store.get(id);
|
|
125
|
+
return state !== undefined;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* List all registered applications.
|
|
129
|
+
*
|
|
130
|
+
* @param options - Query options (prefix, limit)
|
|
131
|
+
* @returns Array of registered application states
|
|
132
|
+
*/
|
|
133
|
+
async list(options) {
|
|
134
|
+
return this.#store.list(options);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Find applications by name.
|
|
138
|
+
*
|
|
139
|
+
* Returns all versions of an application with the given name (deterministically sorted by ID).
|
|
140
|
+
*/
|
|
141
|
+
async findByName(name) {
|
|
142
|
+
const all = await this.#store.list();
|
|
143
|
+
const results = all.filter((s) => s.name === name);
|
|
144
|
+
// Deterministic ordering by application ID
|
|
145
|
+
results.sort((a, b) => a.id.localeCompare(b.id));
|
|
146
|
+
return results;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Find the latest version of an application by name.
|
|
150
|
+
*
|
|
151
|
+
* Returns undefined if no application with this name is registered.
|
|
152
|
+
*/
|
|
153
|
+
async getLatestByName(name) {
|
|
154
|
+
const all = await this.findByName(name);
|
|
155
|
+
if (all.length === 0)
|
|
156
|
+
return undefined;
|
|
157
|
+
// Sort by semantic version (simple comparison - assumes valid semver)
|
|
158
|
+
all.sort((a, b) => {
|
|
159
|
+
const aParts = a.version.split(".").map((p) => parseInt(p, 10));
|
|
160
|
+
const bParts = b.version.split(".").map((p) => parseInt(p, 10));
|
|
161
|
+
for (let i = 0; i < Math.max(aParts.length, bParts.length); i++) {
|
|
162
|
+
const aVal = aParts[i] ?? 0;
|
|
163
|
+
const bVal = bParts[i] ?? 0;
|
|
164
|
+
if (aVal !== bVal)
|
|
165
|
+
return bVal - aVal;
|
|
166
|
+
}
|
|
167
|
+
return 0;
|
|
168
|
+
});
|
|
169
|
+
return all[0];
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Delete a registered application.
|
|
173
|
+
*
|
|
174
|
+
* This marks an application as no longer tracked. The state is
|
|
175
|
+
* permanently removed from storage.
|
|
176
|
+
*/
|
|
177
|
+
async delete(id) {
|
|
178
|
+
await this.#store.delete(id);
|
|
179
|
+
}
|
|
180
|
+
/** Persist an authoritative activation transition. */
|
|
181
|
+
async activate(id) {
|
|
182
|
+
const state = await this.#store.get(id);
|
|
183
|
+
if (!state)
|
|
184
|
+
throw new Error(`Cannot activate unknown application "${id}"`);
|
|
185
|
+
if (state.status === "retired")
|
|
186
|
+
throw new Error(`Cannot activate retired application "${id}"`);
|
|
187
|
+
const active = markApplicationActive(state);
|
|
188
|
+
await this.#store.put(active);
|
|
189
|
+
return active;
|
|
190
|
+
}
|
|
191
|
+
/** Retire without deleting identity, contract, state, or history. */
|
|
192
|
+
async retire(id) {
|
|
193
|
+
const state = await this.#store.get(id);
|
|
194
|
+
if (!state)
|
|
195
|
+
throw new Error(`Cannot retire unknown application "${id}"`);
|
|
196
|
+
const retired = retireApplication(state);
|
|
197
|
+
await this.#store.put(retired);
|
|
198
|
+
return retired;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Find an application by its manifest fingerprint.
|
|
202
|
+
*
|
|
203
|
+
* @param fingerprint - SHA256 fingerprint of the manifest
|
|
204
|
+
* @returns Array of applications with matching fingerprint (deterministically sorted by ID)
|
|
205
|
+
*
|
|
206
|
+
* Note: Applications should have unique fingerprints in practice, but this method
|
|
207
|
+
* returns an array for consistency with other discovery methods.
|
|
208
|
+
*/
|
|
209
|
+
async findByFingerprint(fingerprint) {
|
|
210
|
+
const all = await this.#store.list();
|
|
211
|
+
const results = all.filter((state) => state.fingerprint === fingerprint);
|
|
212
|
+
// Deterministic ordering by application ID
|
|
213
|
+
results.sort((a, b) => a.id.localeCompare(b.id));
|
|
214
|
+
return results;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Find applications that provide a given capability.
|
|
218
|
+
*
|
|
219
|
+
* @param name - Capability name (e.g., "invoices.read")
|
|
220
|
+
* @param version - Optional specific capability version. If omitted, matches any version of the capability.
|
|
221
|
+
* @returns Array of applications providing this capability (deterministically sorted by ID)
|
|
222
|
+
*/
|
|
223
|
+
async findByCapability(name, version) {
|
|
224
|
+
const all = await this.#store.list();
|
|
225
|
+
const results = all.filter((state) => state.status !== "retired" && (() => {
|
|
226
|
+
return state.manifest.provides.some((cap) => {
|
|
227
|
+
return cap.name === name && (version === undefined || cap.version === version);
|
|
228
|
+
});
|
|
229
|
+
})());
|
|
230
|
+
// Deterministic ordering by application ID
|
|
231
|
+
results.sort((a, b) => a.id.localeCompare(b.id));
|
|
232
|
+
return results;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Find applications that require a given capability.
|
|
236
|
+
*
|
|
237
|
+
* @param name - Capability name (e.g., "invoices.read")
|
|
238
|
+
* @param version - Optional specific capability version. If omitted, matches any version of the requirement.
|
|
239
|
+
* @returns Array of applications requiring this capability (deterministically sorted by ID)
|
|
240
|
+
*/
|
|
241
|
+
async findByRequirement(name, version) {
|
|
242
|
+
const all = await this.#store.list();
|
|
243
|
+
const results = all.filter((state) => {
|
|
244
|
+
return state.manifest.requires.some((req) => {
|
|
245
|
+
return req.name === name && (version === undefined || req.version === version);
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
// Deterministic ordering by application ID
|
|
249
|
+
results.sort((a, b) => a.id.localeCompare(b.id));
|
|
250
|
+
return results;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
//# sourceMappingURL=registration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.js","sourceRoot":"","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G,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,GAAG,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;YACjF,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,2CAA2C;QAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACjD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type AppPortManifest, type ApplicationDescriptor, type CapabilityManifestEntry, type EventManifestEntry, type MaterializationDeclaration, type TransportDescriptor } from "../../protocol/dist/index.d.ts";
|
|
2
|
+
import type { AnyCapability, AnyEvent, CapabilityDefinition, EventDefinition } from "./capability.js";
|
|
3
|
+
/**
|
|
4
|
+
* The capability registry: the authoritative set of capabilities and events an
|
|
5
|
+
* application exposes, and the source of its manifest (§30).
|
|
6
|
+
*/
|
|
7
|
+
export declare class CapabilityRegistry {
|
|
8
|
+
#private;
|
|
9
|
+
register<Input, Output>(input: CapabilityDefinition<Input, Output>): this;
|
|
10
|
+
registerEvent<Payload>(input: EventDefinition<Payload>): this;
|
|
11
|
+
has(name: string, version?: number): boolean;
|
|
12
|
+
/** Resolves a capability, or throws the correct protocol error (§15). */
|
|
13
|
+
resolve(name: string, version: number): AnyCapability;
|
|
14
|
+
getEvent(name: string, version?: number): AnyEvent | undefined;
|
|
15
|
+
capabilities(): AnyCapability[];
|
|
16
|
+
events(): AnyEvent[];
|
|
17
|
+
capabilityNames(): string[];
|
|
18
|
+
/** Renders the manifest entries for every registered capability. */
|
|
19
|
+
capabilityEntries(): CapabilityManifestEntry[];
|
|
20
|
+
eventEntries(): EventManifestEntry[];
|
|
21
|
+
/** Builds the full application manifest (§30). */
|
|
22
|
+
manifest(options: {
|
|
23
|
+
application: ApplicationDescriptor;
|
|
24
|
+
transports?: TransportDescriptor[];
|
|
25
|
+
materialization?: MaterializationDeclaration;
|
|
26
|
+
extensions?: string[];
|
|
27
|
+
conformance?: AppPortManifest["conformance"];
|
|
28
|
+
}): AppPortManifest;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAE5B,KAAK,kBAAkB,EAEvB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EAGzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEtG;;;GAGG;AACH,qBAAa,kBAAkB;;IAI7B,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAI;IAiBzE,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,IAAI;IAW7D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO;IAM5C,yEAAyE;IACzE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa;IAUrD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAU9D,YAAY,IAAI,aAAa,EAAE;IAI/B,MAAM,IAAI,QAAQ,EAAE;IAIpB,eAAe,IAAI,MAAM,EAAE;IAI3B,oEAAoE;IACpE,iBAAiB,IAAI,uBAAuB,EAAE;IAoC9C,YAAY,IAAI,kBAAkB,EAAE;IA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