@appport/sdk 1.1.17 → 1.1.19
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/README.md +9 -86
- package/dist/index.d.ts +13 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -18
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1 -1
- package/package.json +22 -32
- package/LICENSE +0 -126
- package/dist/application-onboarding.d.ts +0 -52
- package/dist/application-onboarding.d.ts.map +0 -1
- package/dist/application-onboarding.js +0 -50
- package/dist/application-onboarding.js.map +0 -1
- package/dist/external-compatibility.d.ts +0 -142
- package/dist/external-compatibility.d.ts.map +0 -1
- package/dist/external-compatibility.js +0 -132
- package/dist/external-compatibility.js.map +0 -1
- package/dist/provider-lifecycle.d.ts +0 -247
- package/dist/provider-lifecycle.d.ts.map +0 -1
- package/dist/provider-lifecycle.js +0 -314
- package/dist/provider-lifecycle.js.map +0 -1
- package/dist/resolution-policy.d.ts +0 -81
- package/dist/resolution-policy.d.ts.map +0 -1
- package/dist/resolution-policy.js +0 -131
- package/dist/resolution-policy.js.map +0 -1
- package/vendor/@appport/authorization/README.md +0 -28
- package/vendor/@appport/authorization/dist/index.d.ts +0 -94
- package/vendor/@appport/authorization/dist/index.d.ts.map +0 -1
- package/vendor/@appport/authorization/dist/index.js +0 -131
- package/vendor/@appport/authorization/dist/index.js.map +0 -1
- package/vendor/@appport/authorization/package.json +0 -28
- package/vendor/@appport/client/README.md +0 -35
- package/vendor/@appport/client/dist/channel.d.ts +0 -14
- package/vendor/@appport/client/dist/channel.d.ts.map +0 -1
- package/vendor/@appport/client/dist/channel.js +0 -58
- package/vendor/@appport/client/dist/channel.js.map +0 -1
- package/vendor/@appport/client/dist/client.d.ts +0 -61
- package/vendor/@appport/client/dist/client.d.ts.map +0 -1
- package/vendor/@appport/client/dist/client.js +0 -214
- package/vendor/@appport/client/dist/client.js.map +0 -1
- package/vendor/@appport/client/dist/contract.d.ts +0 -55
- package/vendor/@appport/client/dist/contract.d.ts.map +0 -1
- package/vendor/@appport/client/dist/contract.js +0 -12
- package/vendor/@appport/client/dist/contract.js.map +0 -1
- package/vendor/@appport/client/dist/discovery.d.ts +0 -17
- package/vendor/@appport/client/dist/discovery.d.ts.map +0 -1
- package/vendor/@appport/client/dist/discovery.js +0 -56
- package/vendor/@appport/client/dist/discovery.js.map +0 -1
- package/vendor/@appport/client/dist/duplex.d.ts +0 -25
- package/vendor/@appport/client/dist/duplex.d.ts.map +0 -1
- package/vendor/@appport/client/dist/duplex.js +0 -194
- package/vendor/@appport/client/dist/duplex.js.map +0 -1
- package/vendor/@appport/client/dist/host.d.ts +0 -62
- package/vendor/@appport/client/dist/host.d.ts.map +0 -1
- package/vendor/@appport/client/dist/host.js +0 -139
- package/vendor/@appport/client/dist/host.js.map +0 -1
- package/vendor/@appport/client/dist/index.d.ts +0 -14
- package/vendor/@appport/client/dist/index.d.ts.map +0 -1
- package/vendor/@appport/client/dist/index.js +0 -14
- package/vendor/@appport/client/dist/index.js.map +0 -1
- package/vendor/@appport/client/dist/transport.d.ts +0 -42
- package/vendor/@appport/client/dist/transport.d.ts.map +0 -1
- package/vendor/@appport/client/dist/transport.js +0 -2
- package/vendor/@appport/client/dist/transport.js.map +0 -1
- package/vendor/@appport/client/package.json +0 -32
- package/vendor/@appport/core/README.md +0 -91
- package/vendor/@appport/core/dist/appboundry-capability-catalog.d.ts +0 -930
- package/vendor/@appport/core/dist/appboundry-capability-catalog.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-capability-catalog.js +0 -352
- package/vendor/@appport/core/dist/appboundry-capability-catalog.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-composition.d.ts +0 -93
- package/vendor/@appport/core/dist/appboundry-composition.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-composition.js +0 -184
- package/vendor/@appport/core/dist/appboundry-composition.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-contract.d.ts +0 -80
- package/vendor/@appport/core/dist/appboundry-contract.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-contract.js +0 -160
- package/vendor/@appport/core/dist/appboundry-contract.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-diagnostics.d.ts +0 -107
- package/vendor/@appport/core/dist/appboundry-diagnostics.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-diagnostics.js +0 -358
- package/vendor/@appport/core/dist/appboundry-diagnostics.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-discovery.d.ts +0 -110
- package/vendor/@appport/core/dist/appboundry-discovery.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-discovery.js +0 -141
- package/vendor/@appport/core/dist/appboundry-discovery.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-entitlements.d.ts +0 -128
- package/vendor/@appport/core/dist/appboundry-entitlements.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-entitlements.js +0 -312
- package/vendor/@appport/core/dist/appboundry-entitlements.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-execution.d.ts +0 -84
- package/vendor/@appport/core/dist/appboundry-execution.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-execution.js +0 -150
- package/vendor/@appport/core/dist/appboundry-execution.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-exercise.d.ts +0 -152
- package/vendor/@appport/core/dist/appboundry-exercise.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-exercise.js +0 -416
- package/vendor/@appport/core/dist/appboundry-exercise.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-materialization.d.ts +0 -222
- package/vendor/@appport/core/dist/appboundry-materialization.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-materialization.js +0 -494
- package/vendor/@appport/core/dist/appboundry-materialization.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-migration.d.ts +0 -195
- package/vendor/@appport/core/dist/appboundry-migration.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-migration.js +0 -227
- package/vendor/@appport/core/dist/appboundry-migration.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-onboarding.d.ts +0 -70
- package/vendor/@appport/core/dist/appboundry-onboarding.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-onboarding.js +0 -232
- package/vendor/@appport/core/dist/appboundry-onboarding.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-operation-discovery.d.ts +0 -93
- package/vendor/@appport/core/dist/appboundry-operation-discovery.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-operation-discovery.js +0 -89
- package/vendor/@appport/core/dist/appboundry-operation-discovery.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-resolution.d.ts +0 -160
- package/vendor/@appport/core/dist/appboundry-resolution.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-resolution.js +0 -218
- package/vendor/@appport/core/dist/appboundry-resolution.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-surface.d.ts +0 -96
- package/vendor/@appport/core/dist/appboundry-surface.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-surface.js +0 -223
- package/vendor/@appport/core/dist/appboundry-surface.js.map +0 -1
- package/vendor/@appport/core/dist/appboundry-usage.d.ts +0 -94
- package/vendor/@appport/core/dist/appboundry-usage.d.ts.map +0 -1
- package/vendor/@appport/core/dist/appboundry-usage.js +0 -80
- package/vendor/@appport/core/dist/appboundry-usage.js.map +0 -1
- package/vendor/@appport/core/dist/application-implementation.d.ts +0 -125
- package/vendor/@appport/core/dist/application-implementation.d.ts.map +0 -1
- package/vendor/@appport/core/dist/application-implementation.js +0 -220
- package/vendor/@appport/core/dist/application-implementation.js.map +0 -1
- package/vendor/@appport/core/dist/application-lifecycle.d.ts +0 -150
- package/vendor/@appport/core/dist/application-lifecycle.d.ts.map +0 -1
- package/vendor/@appport/core/dist/application-lifecycle.js +0 -70
- package/vendor/@appport/core/dist/application-lifecycle.js.map +0 -1
- package/vendor/@appport/core/dist/application-package.d.ts +0 -105
- package/vendor/@appport/core/dist/application-package.d.ts.map +0 -1
- package/vendor/@appport/core/dist/application-package.js +0 -349
- package/vendor/@appport/core/dist/application-package.js.map +0 -1
- package/vendor/@appport/core/dist/application-source.d.ts +0 -109
- package/vendor/@appport/core/dist/application-source.d.ts.map +0 -1
- package/vendor/@appport/core/dist/application-source.js +0 -186
- package/vendor/@appport/core/dist/application-source.js.map +0 -1
- package/vendor/@appport/core/dist/application.d.ts +0 -124
- package/vendor/@appport/core/dist/application.d.ts.map +0 -1
- package/vendor/@appport/core/dist/application.js +0 -518
- package/vendor/@appport/core/dist/application.js.map +0 -1
- package/vendor/@appport/core/dist/artifact.d.ts +0 -395
- package/vendor/@appport/core/dist/artifact.d.ts.map +0 -1
- package/vendor/@appport/core/dist/artifact.js +0 -392
- package/vendor/@appport/core/dist/artifact.js.map +0 -1
- package/vendor/@appport/core/dist/assembly.d.ts +0 -237
- package/vendor/@appport/core/dist/assembly.d.ts.map +0 -1
- package/vendor/@appport/core/dist/assembly.js +0 -458
- package/vendor/@appport/core/dist/assembly.js.map +0 -1
- package/vendor/@appport/core/dist/authority-attestation.d.ts +0 -34
- package/vendor/@appport/core/dist/authority-attestation.d.ts.map +0 -1
- package/vendor/@appport/core/dist/authority-attestation.js +0 -72
- package/vendor/@appport/core/dist/authority-attestation.js.map +0 -1
- package/vendor/@appport/core/dist/authorization-grant.d.ts +0 -107
- package/vendor/@appport/core/dist/authorization-grant.d.ts.map +0 -1
- package/vendor/@appport/core/dist/authorization-grant.js +0 -131
- package/vendor/@appport/core/dist/authorization-grant.js.map +0 -1
- package/vendor/@appport/core/dist/binding.d.ts +0 -294
- package/vendor/@appport/core/dist/binding.d.ts.map +0 -1
- package/vendor/@appport/core/dist/binding.js +0 -263
- package/vendor/@appport/core/dist/binding.js.map +0 -1
- package/vendor/@appport/core/dist/builtins.d.ts +0 -18
- package/vendor/@appport/core/dist/builtins.d.ts.map +0 -1
- package/vendor/@appport/core/dist/builtins.js +0 -38
- package/vendor/@appport/core/dist/builtins.js.map +0 -1
- package/vendor/@appport/core/dist/capability.d.ts +0 -94
- package/vendor/@appport/core/dist/capability.d.ts.map +0 -1
- package/vendor/@appport/core/dist/capability.js +0 -85
- package/vendor/@appport/core/dist/capability.js.map +0 -1
- package/vendor/@appport/core/dist/concurrency.d.ts +0 -16
- package/vendor/@appport/core/dist/concurrency.d.ts.map +0 -1
- package/vendor/@appport/core/dist/concurrency.js +0 -46
- package/vendor/@appport/core/dist/concurrency.js.map +0 -1
- package/vendor/@appport/core/dist/context.d.ts +0 -59
- package/vendor/@appport/core/dist/context.d.ts.map +0 -1
- package/vendor/@appport/core/dist/context.js +0 -14
- package/vendor/@appport/core/dist/context.js.map +0 -1
- package/vendor/@appport/core/dist/contract-artifact.d.ts +0 -15
- package/vendor/@appport/core/dist/contract-artifact.d.ts.map +0 -1
- package/vendor/@appport/core/dist/contract-artifact.js +0 -161
- package/vendor/@appport/core/dist/contract-artifact.js.map +0 -1
- package/vendor/@appport/core/dist/contract-attestation.d.ts +0 -68
- package/vendor/@appport/core/dist/contract-attestation.d.ts.map +0 -1
- package/vendor/@appport/core/dist/contract-attestation.js +0 -76
- package/vendor/@appport/core/dist/contract-attestation.js.map +0 -1
- package/vendor/@appport/core/dist/crash-injection.d.ts +0 -3
- package/vendor/@appport/core/dist/crash-injection.d.ts.map +0 -1
- package/vendor/@appport/core/dist/crash-injection.js +0 -8
- package/vendor/@appport/core/dist/crash-injection.js.map +0 -1
- package/vendor/@appport/core/dist/events.d.ts +0 -33
- package/vendor/@appport/core/dist/events.d.ts.map +0 -1
- package/vendor/@appport/core/dist/events.js +0 -79
- package/vendor/@appport/core/dist/events.js.map +0 -1
- package/vendor/@appport/core/dist/execution-barrier.d.ts +0 -13
- package/vendor/@appport/core/dist/execution-barrier.d.ts.map +0 -1
- package/vendor/@appport/core/dist/execution-barrier.js +0 -33
- package/vendor/@appport/core/dist/execution-barrier.js.map +0 -1
- package/vendor/@appport/core/dist/execution-ledger.d.ts +0 -81
- package/vendor/@appport/core/dist/execution-ledger.d.ts.map +0 -1
- package/vendor/@appport/core/dist/execution-ledger.js +0 -173
- package/vendor/@appport/core/dist/execution-ledger.js.map +0 -1
- package/vendor/@appport/core/dist/execution.d.ts +0 -387
- package/vendor/@appport/core/dist/execution.d.ts.map +0 -1
- package/vendor/@appport/core/dist/execution.js +0 -165
- package/vendor/@appport/core/dist/execution.js.map +0 -1
- package/vendor/@appport/core/dist/idempotency.d.ts +0 -36
- package/vendor/@appport/core/dist/idempotency.d.ts.map +0 -1
- package/vendor/@appport/core/dist/idempotency.js +0 -36
- package/vendor/@appport/core/dist/idempotency.js.map +0 -1
- package/vendor/@appport/core/dist/implementation.d.ts +0 -110
- package/vendor/@appport/core/dist/implementation.d.ts.map +0 -1
- package/vendor/@appport/core/dist/implementation.js +0 -65
- package/vendor/@appport/core/dist/implementation.js.map +0 -1
- package/vendor/@appport/core/dist/index.d.ts +0 -61
- package/vendor/@appport/core/dist/index.d.ts.map +0 -1
- package/vendor/@appport/core/dist/index.js +0 -60
- package/vendor/@appport/core/dist/index.js.map +0 -1
- package/vendor/@appport/core/dist/invocation.d.ts +0 -253
- package/vendor/@appport/core/dist/invocation.d.ts.map +0 -1
- package/vendor/@appport/core/dist/invocation.js +0 -258
- package/vendor/@appport/core/dist/invocation.js.map +0 -1
- package/vendor/@appport/core/dist/manifest.d.ts +0 -157
- package/vendor/@appport/core/dist/manifest.d.ts.map +0 -1
- package/vendor/@appport/core/dist/manifest.js +0 -255
- package/vendor/@appport/core/dist/manifest.js.map +0 -1
- package/vendor/@appport/core/dist/memory-application-data-store.d.ts +0 -19
- package/vendor/@appport/core/dist/memory-application-data-store.d.ts.map +0 -1
- package/vendor/@appport/core/dist/memory-application-data-store.js +0 -161
- package/vendor/@appport/core/dist/memory-application-data-store.js.map +0 -1
- package/vendor/@appport/core/dist/operations.d.ts +0 -61
- package/vendor/@appport/core/dist/operations.d.ts.map +0 -1
- package/vendor/@appport/core/dist/operations.js +0 -210
- package/vendor/@appport/core/dist/operations.js.map +0 -1
- package/vendor/@appport/core/dist/provider-contract.d.ts +0 -89
- package/vendor/@appport/core/dist/provider-contract.d.ts.map +0 -1
- package/vendor/@appport/core/dist/provider-contract.js +0 -40
- package/vendor/@appport/core/dist/provider-contract.js.map +0 -1
- package/vendor/@appport/core/dist/public.d.ts +0 -20
- package/vendor/@appport/core/dist/public.d.ts.map +0 -1
- package/vendor/@appport/core/dist/public.js +0 -19
- package/vendor/@appport/core/dist/public.js.map +0 -1
- package/vendor/@appport/core/dist/registration.d.ts +0 -165
- package/vendor/@appport/core/dist/registration.d.ts.map +0 -1
- package/vendor/@appport/core/dist/registration.js +0 -253
- package/vendor/@appport/core/dist/registration.js.map +0 -1
- package/vendor/@appport/core/dist/registry.d.ts +0 -30
- package/vendor/@appport/core/dist/registry.d.ts.map +0 -1
- package/vendor/@appport/core/dist/registry.js +0 -149
- package/vendor/@appport/core/dist/registry.js.map +0 -1
- package/vendor/@appport/core/dist/repository-connection.d.ts +0 -100
- package/vendor/@appport/core/dist/repository-connection.d.ts.map +0 -1
- package/vendor/@appport/core/dist/repository-connection.js +0 -57
- package/vendor/@appport/core/dist/repository-connection.js.map +0 -1
- package/vendor/@appport/core/dist/resolver.d.ts +0 -130
- package/vendor/@appport/core/dist/resolver.d.ts.map +0 -1
- package/vendor/@appport/core/dist/resolver.js +0 -252
- package/vendor/@appport/core/dist/resolver.js.map +0 -1
- package/vendor/@appport/core/dist/runtime-manifest.d.ts +0 -68
- package/vendor/@appport/core/dist/runtime-manifest.d.ts.map +0 -1
- package/vendor/@appport/core/dist/runtime-manifest.js +0 -84
- package/vendor/@appport/core/dist/runtime-manifest.js.map +0 -1
- package/vendor/@appport/core/dist/sanitize.d.ts +0 -14
- package/vendor/@appport/core/dist/sanitize.d.ts.map +0 -1
- package/vendor/@appport/core/dist/sanitize.js +0 -49
- package/vendor/@appport/core/dist/sanitize.js.map +0 -1
- package/vendor/@appport/core/dist/server-internal.d.ts +0 -5
- package/vendor/@appport/core/dist/server-internal.d.ts.map +0 -1
- package/vendor/@appport/core/dist/server-internal.js +0 -4
- package/vendor/@appport/core/dist/server-internal.js.map +0 -1
- package/vendor/@appport/core/dist/sessions.d.ts +0 -29
- package/vendor/@appport/core/dist/sessions.d.ts.map +0 -1
- package/vendor/@appport/core/dist/sessions.js +0 -39
- package/vendor/@appport/core/dist/sessions.js.map +0 -1
- package/vendor/@appport/core/dist/sha256.d.ts +0 -3
- package/vendor/@appport/core/dist/sha256.d.ts.map +0 -1
- package/vendor/@appport/core/dist/sha256.js +0 -46
- package/vendor/@appport/core/dist/sha256.js.map +0 -1
- package/vendor/@appport/core/dist/source-verification.d.ts +0 -53
- package/vendor/@appport/core/dist/source-verification.d.ts.map +0 -1
- package/vendor/@appport/core/dist/source-verification.js +0 -92
- package/vendor/@appport/core/dist/source-verification.js.map +0 -1
- package/vendor/@appport/core/dist/state-context.d.ts +0 -312
- package/vendor/@appport/core/dist/state-context.d.ts.map +0 -1
- package/vendor/@appport/core/dist/state-context.js +0 -100
- package/vendor/@appport/core/dist/state-context.js.map +0 -1
- package/vendor/@appport/core/dist/state.d.ts +0 -96
- package/vendor/@appport/core/dist/state.d.ts.map +0 -1
- package/vendor/@appport/core/dist/state.js +0 -89
- package/vendor/@appport/core/dist/state.js.map +0 -1
- package/vendor/@appport/core/dist/streams.d.ts +0 -38
- package/vendor/@appport/core/dist/streams.d.ts.map +0 -1
- package/vendor/@appport/core/dist/streams.js +0 -123
- package/vendor/@appport/core/dist/streams.js.map +0 -1
- package/vendor/@appport/core/dist/telemetry.d.ts +0 -42
- package/vendor/@appport/core/dist/telemetry.d.ts.map +0 -1
- package/vendor/@appport/core/dist/telemetry.js +0 -32
- package/vendor/@appport/core/dist/telemetry.js.map +0 -1
- package/vendor/@appport/core/dist/wasm-engine.d.ts +0 -24
- package/vendor/@appport/core/dist/wasm-engine.d.ts.map +0 -1
- package/vendor/@appport/core/dist/wasm-engine.js +0 -376
- package/vendor/@appport/core/dist/wasm-engine.js.map +0 -1
- package/vendor/@appport/core/package.json +0 -58
- package/vendor/@appport/mcp/README.md +0 -29
- package/vendor/@appport/mcp/dist/index.d.ts +0 -58
- package/vendor/@appport/mcp/dist/index.d.ts.map +0 -1
- package/vendor/@appport/mcp/dist/index.js +0 -69
- package/vendor/@appport/mcp/dist/index.js.map +0 -1
- package/vendor/@appport/mcp/package.json +0 -29
- package/vendor/@appport/mobile/README.md +0 -10
- package/vendor/@appport/mobile/dist/index.d.ts +0 -66
- package/vendor/@appport/mobile/dist/index.d.ts.map +0 -1
- package/vendor/@appport/mobile/dist/index.js +0 -182
- package/vendor/@appport/mobile/dist/index.js.map +0 -1
- package/vendor/@appport/mobile/package.json +0 -33
- package/vendor/@appport/protocol/README.md +0 -41
- package/vendor/@appport/protocol/dist/blob.d.ts +0 -46
- package/vendor/@appport/protocol/dist/blob.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/blob.js +0 -23
- package/vendor/@appport/protocol/dist/blob.js.map +0 -1
- package/vendor/@appport/protocol/dist/compatibility.d.ts +0 -25
- package/vendor/@appport/protocol/dist/compatibility.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/compatibility.js +0 -189
- package/vendor/@appport/protocol/dist/compatibility.js.map +0 -1
- package/vendor/@appport/protocol/dist/envelopes.d.ts +0 -175
- package/vendor/@appport/protocol/dist/envelopes.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/envelopes.js +0 -97
- package/vendor/@appport/protocol/dist/envelopes.js.map +0 -1
- package/vendor/@appport/protocol/dist/errors.d.ts +0 -74
- package/vendor/@appport/protocol/dist/errors.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/errors.js +0 -92
- package/vendor/@appport/protocol/dist/errors.js.map +0 -1
- package/vendor/@appport/protocol/dist/ids.d.ts +0 -12
- package/vendor/@appport/protocol/dist/ids.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/ids.js +0 -50
- package/vendor/@appport/protocol/dist/ids.js.map +0 -1
- package/vendor/@appport/protocol/dist/index.d.ts +0 -21
- package/vendor/@appport/protocol/dist/index.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/index.js +0 -21
- package/vendor/@appport/protocol/dist/index.js.map +0 -1
- package/vendor/@appport/protocol/dist/jsonschema.d.ts +0 -50
- package/vendor/@appport/protocol/dist/jsonschema.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/jsonschema.js +0 -6
- package/vendor/@appport/protocol/dist/jsonschema.js.map +0 -1
- package/vendor/@appport/protocol/dist/manifest.d.ts +0 -134
- package/vendor/@appport/protocol/dist/manifest.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/manifest.js +0 -20
- package/vendor/@appport/protocol/dist/manifest.js.map +0 -1
- package/vendor/@appport/protocol/dist/materialization.d.ts +0 -59
- package/vendor/@appport/protocol/dist/materialization.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/materialization.js +0 -2
- package/vendor/@appport/protocol/dist/materialization.js.map +0 -1
- package/vendor/@appport/protocol/dist/names.d.ts +0 -26
- package/vendor/@appport/protocol/dist/names.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/names.js +0 -85
- package/vendor/@appport/protocol/dist/names.js.map +0 -1
- package/vendor/@appport/protocol/dist/operations.d.ts +0 -34
- package/vendor/@appport/protocol/dist/operations.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/operations.js +0 -9
- package/vendor/@appport/protocol/dist/operations.js.map +0 -1
- package/vendor/@appport/protocol/dist/session.d.ts +0 -27
- package/vendor/@appport/protocol/dist/session.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/session.js +0 -7
- package/vendor/@appport/protocol/dist/session.js.map +0 -1
- package/vendor/@appport/protocol/dist/validate.d.ts +0 -37
- package/vendor/@appport/protocol/dist/validate.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/validate.js +0 -321
- package/vendor/@appport/protocol/dist/validate.js.map +0 -1
- package/vendor/@appport/protocol/dist/version.d.ts +0 -27
- package/vendor/@appport/protocol/dist/version.d.ts.map +0 -1
- package/vendor/@appport/protocol/dist/version.js +0 -26
- package/vendor/@appport/protocol/dist/version.js.map +0 -1
- package/vendor/@appport/protocol/package.json +0 -25
- package/vendor/@appport/schema/README.md +0 -32
- package/vendor/@appport/schema/dist/builder.d.ts +0 -85
- package/vendor/@appport/schema/dist/builder.d.ts.map +0 -1
- package/vendor/@appport/schema/dist/builder.js +0 -278
- package/vendor/@appport/schema/dist/builder.js.map +0 -1
- package/vendor/@appport/schema/dist/from-json-schema.d.ts +0 -12
- package/vendor/@appport/schema/dist/from-json-schema.d.ts.map +0 -1
- package/vendor/@appport/schema/dist/from-json-schema.js +0 -186
- package/vendor/@appport/schema/dist/from-json-schema.js.map +0 -1
- package/vendor/@appport/schema/dist/index.d.ts +0 -23
- package/vendor/@appport/schema/dist/index.d.ts.map +0 -1
- package/vendor/@appport/schema/dist/index.js +0 -22
- package/vendor/@appport/schema/dist/index.js.map +0 -1
- package/vendor/@appport/schema/dist/standard.d.ts +0 -46
- package/vendor/@appport/schema/dist/standard.d.ts.map +0 -1
- package/vendor/@appport/schema/dist/standard.js +0 -42
- package/vendor/@appport/schema/dist/standard.js.map +0 -1
- package/vendor/@appport/schema/dist/types.d.ts +0 -40
- package/vendor/@appport/schema/dist/types.d.ts.map +0 -1
- package/vendor/@appport/schema/dist/types.js +0 -19
- package/vendor/@appport/schema/dist/types.js.map +0 -1
- package/vendor/@appport/schema/package.json +0 -28
- package/vendor/@appport/server/README.md +0 -39
- package/vendor/@appport/server/dist/connection.d.ts +0 -45
- package/vendor/@appport/server/dist/connection.d.ts.map +0 -1
- package/vendor/@appport/server/dist/connection.js +0 -217
- package/vendor/@appport/server/dist/connection.js.map +0 -1
- package/vendor/@appport/server/dist/fetch.d.ts +0 -10
- package/vendor/@appport/server/dist/fetch.d.ts.map +0 -1
- package/vendor/@appport/server/dist/fetch.js +0 -50
- package/vendor/@appport/server/dist/fetch.js.map +0 -1
- package/vendor/@appport/server/dist/http.d.ts +0 -80
- package/vendor/@appport/server/dist/http.d.ts.map +0 -1
- package/vendor/@appport/server/dist/http.js +0 -307
- package/vendor/@appport/server/dist/http.js.map +0 -1
- package/vendor/@appport/server/dist/index.d.ts +0 -11
- package/vendor/@appport/server/dist/index.d.ts.map +0 -1
- package/vendor/@appport/server/dist/index.js +0 -11
- package/vendor/@appport/server/dist/index.js.map +0 -1
- package/vendor/@appport/server/dist/node-entry.d.ts +0 -4
- package/vendor/@appport/server/dist/node-entry.d.ts.map +0 -1
- package/vendor/@appport/server/dist/node-entry.js +0 -4
- package/vendor/@appport/server/dist/node-entry.js.map +0 -1
- package/vendor/@appport/server/dist/node.d.ts +0 -45
- package/vendor/@appport/server/dist/node.d.ts.map +0 -1
- package/vendor/@appport/server/dist/node.js +0 -190
- package/vendor/@appport/server/dist/node.js.map +0 -1
- package/vendor/@appport/server/dist/server.d.ts +0 -83
- package/vendor/@appport/server/dist/server.d.ts.map +0 -1
- package/vendor/@appport/server/dist/server.js +0 -114
- package/vendor/@appport/server/dist/server.js.map +0 -1
- package/vendor/@appport/server/dist/websocket.d.ts +0 -25
- package/vendor/@appport/server/dist/websocket.d.ts.map +0 -1
- package/vendor/@appport/server/dist/websocket.js +0 -221
- package/vendor/@appport/server/dist/websocket.js.map +0 -1
- package/vendor/@appport/server/package.json +0 -34
- package/vendor/@appport/transport-electron/README.md +0 -56
- package/vendor/@appport/transport-electron/dist/index.d.ts +0 -11
- package/vendor/@appport/transport-electron/dist/index.d.ts.map +0 -1
- package/vendor/@appport/transport-electron/dist/index.js +0 -11
- package/vendor/@appport/transport-electron/dist/index.js.map +0 -1
- package/vendor/@appport/transport-electron/dist/main.d.ts +0 -31
- package/vendor/@appport/transport-electron/dist/main.d.ts.map +0 -1
- package/vendor/@appport/transport-electron/dist/main.js +0 -61
- package/vendor/@appport/transport-electron/dist/main.js.map +0 -1
- package/vendor/@appport/transport-electron/dist/preload.d.ts +0 -22
- package/vendor/@appport/transport-electron/dist/preload.d.ts.map +0 -1
- package/vendor/@appport/transport-electron/dist/preload.js +0 -29
- package/vendor/@appport/transport-electron/dist/preload.js.map +0 -1
- package/vendor/@appport/transport-electron/dist/renderer.d.ts +0 -16
- package/vendor/@appport/transport-electron/dist/renderer.d.ts.map +0 -1
- package/vendor/@appport/transport-electron/dist/renderer.js +0 -36
- package/vendor/@appport/transport-electron/dist/renderer.js.map +0 -1
- package/vendor/@appport/transport-electron/dist/types.d.ts +0 -49
- package/vendor/@appport/transport-electron/dist/types.d.ts.map +0 -1
- package/vendor/@appport/transport-electron/dist/types.js +0 -5
- package/vendor/@appport/transport-electron/dist/types.js.map +0 -1
- package/vendor/@appport/transport-electron/package.json +0 -46
- package/vendor/@appport/transport-http/README.md +0 -24
- package/vendor/@appport/transport-http/dist/index.d.ts +0 -18
- package/vendor/@appport/transport-http/dist/index.d.ts.map +0 -1
- package/vendor/@appport/transport-http/dist/index.js +0 -223
- package/vendor/@appport/transport-http/dist/index.js.map +0 -1
- package/vendor/@appport/transport-http/package.json +0 -29
- package/vendor/@appport/transport-inprocess/README.md +0 -24
- package/vendor/@appport/transport-inprocess/dist/index.d.ts +0 -16
- package/vendor/@appport/transport-inprocess/dist/index.d.ts.map +0 -1
- package/vendor/@appport/transport-inprocess/dist/index.js +0 -30
- package/vendor/@appport/transport-inprocess/dist/index.js.map +0 -1
- package/vendor/@appport/transport-inprocess/package.json +0 -30
- package/vendor/@appport/transport-tauri/README.md +0 -45
- package/vendor/@appport/transport-tauri/dist/index.d.ts +0 -23
- package/vendor/@appport/transport-tauri/dist/index.d.ts.map +0 -1
- package/vendor/@appport/transport-tauri/dist/index.js +0 -44
- package/vendor/@appport/transport-tauri/dist/index.js.map +0 -1
- package/vendor/@appport/transport-tauri/package.json +0 -29
- package/vendor/@appport/transport-websocket/README.md +0 -22
- package/vendor/@appport/transport-websocket/dist/index.d.ts +0 -26
- package/vendor/@appport/transport-websocket/dist/index.d.ts.map +0 -1
- package/vendor/@appport/transport-websocket/dist/index.js +0 -72
- package/vendor/@appport/transport-websocket/dist/index.js.map +0 -1
- package/vendor/@appport/transport-websocket/package.json +0 -29
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ephemeral WASM Execution Runtime (PR26)
|
|
3
|
-
*
|
|
4
|
-
* The execution engine layer that materializes ExecutableArtifacts into
|
|
5
|
-
* ephemeral WASM instances, executes capabilities, and destroys instances
|
|
6
|
-
* after completion.
|
|
7
|
-
*
|
|
8
|
-
* CRITICAL INVARIANT:
|
|
9
|
-
* - Every execution produces exactly one instance
|
|
10
|
-
* - Every instance has an explicit lifecycle (CREATED → READY → RUNNING → COMPLETED/FAILED/CANCELLED → DESTROYED)
|
|
11
|
-
* - After any outcome (success, failure, cancellation, timeout), running instances = 0
|
|
12
|
-
* - Instances are never reused or pooled
|
|
13
|
-
* - Memory is isolated per instance
|
|
14
|
-
* - Guest code cannot access host resources (filesystem, network, etc.)
|
|
15
|
-
*
|
|
16
|
-
* The execution engine bridges:
|
|
17
|
-
* AuthorizedCapabilityBinding
|
|
18
|
-
* ↓
|
|
19
|
-
* ExecutionEngine.execute()
|
|
20
|
-
* ↓
|
|
21
|
-
* ExecutionInstance (ephemeral WASM)
|
|
22
|
-
* ↓
|
|
23
|
-
* ExecutionResult + ExecutionObservationRecord
|
|
24
|
-
* ↓
|
|
25
|
-
* instance.destroy()
|
|
26
|
-
* ↓
|
|
27
|
-
* running instances = 0
|
|
28
|
-
*/
|
|
29
|
-
import type { ExecutableArtifact } from "./artifact.js";
|
|
30
|
-
import type { CapabilityContext } from "./context.js";
|
|
31
|
-
import type { AuthorizedCapabilityBinding } from "./binding.js";
|
|
32
|
-
/**
|
|
33
|
-
* Explicit lifecycle state for an execution instance.
|
|
34
|
-
*
|
|
35
|
-
* Valid state transitions:
|
|
36
|
-
* CREATED → READY → RUNNING → COMPLETED
|
|
37
|
-
* CREATED → READY → RUNNING → FAILED
|
|
38
|
-
* CREATED → READY → RUNNING → CANCELLED
|
|
39
|
-
* CREATED → READY → RUNNING → TIMED_OUT
|
|
40
|
-
* (any state) → DESTROYED (idempotent)
|
|
41
|
-
*
|
|
42
|
-
* Invalid transitions must throw InvalidStateTransitionError.
|
|
43
|
-
* For example: DESTROYED → RUNNING must be rejected.
|
|
44
|
-
*/
|
|
45
|
-
export declare enum ExecutionInstanceState {
|
|
46
|
-
/**
|
|
47
|
-
* Instance created but not yet instantiated.
|
|
48
|
-
* WASM module is not yet loaded.
|
|
49
|
-
*/
|
|
50
|
-
CREATED = "CREATED",
|
|
51
|
-
/**
|
|
52
|
-
* WASM module instantiated and ready for execution.
|
|
53
|
-
* Instance has acquired resources (linear memory allocated).
|
|
54
|
-
*/
|
|
55
|
-
READY = "READY",
|
|
56
|
-
/**
|
|
57
|
-
* Capability execution in progress.
|
|
58
|
-
* Guest code is running or suspended on host callback.
|
|
59
|
-
*/
|
|
60
|
-
RUNNING = "RUNNING",
|
|
61
|
-
/**
|
|
62
|
-
* Execution completed successfully.
|
|
63
|
-
* Output has been validated and is available.
|
|
64
|
-
*/
|
|
65
|
-
COMPLETED = "COMPLETED",
|
|
66
|
-
/**
|
|
67
|
-
* Execution failed (implementation error or validation failure).
|
|
68
|
-
* Error information is available; output is not.
|
|
69
|
-
*/
|
|
70
|
-
FAILED = "FAILED",
|
|
71
|
-
/**
|
|
72
|
-
* Execution cancelled by host (AbortSignal fired).
|
|
73
|
-
* Cancellation reason is available.
|
|
74
|
-
*/
|
|
75
|
-
CANCELLED = "CANCELLED",
|
|
76
|
-
/**
|
|
77
|
-
* Execution timed out (deadline exceeded).
|
|
78
|
-
* No result is available.
|
|
79
|
-
*/
|
|
80
|
-
TIMED_OUT = "TIMED_OUT",
|
|
81
|
-
/**
|
|
82
|
-
* Instance destroyed and all resources released.
|
|
83
|
-
* Instance is no longer usable.
|
|
84
|
-
* This is the terminal state.
|
|
85
|
-
*/
|
|
86
|
-
DESTROYED = "DESTROYED"
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Execution instance: a temporary materialization of an executable artifact.
|
|
90
|
-
*
|
|
91
|
-
* The instance is:
|
|
92
|
-
* - Ephemeral: created for one execution, destroyed after
|
|
93
|
-
* - Isolated: separate memory from other instances
|
|
94
|
-
* - Bounded: subject to resource limits
|
|
95
|
-
* - Safe: guest cannot access host resources
|
|
96
|
-
*
|
|
97
|
-
* NOT:
|
|
98
|
-
* - Persistent
|
|
99
|
-
* - Reusable
|
|
100
|
-
* - Pooled
|
|
101
|
-
* - Shared between invocations
|
|
102
|
-
*/
|
|
103
|
-
export interface ExecutionInstance {
|
|
104
|
-
/**
|
|
105
|
-
* Unique identifier for this instance.
|
|
106
|
-
* Used for observability and debugging.
|
|
107
|
-
*/
|
|
108
|
-
readonly instanceId: string;
|
|
109
|
-
/**
|
|
110
|
-
* Current lifecycle state of this instance.
|
|
111
|
-
*/
|
|
112
|
-
readonly state: ExecutionInstanceState;
|
|
113
|
-
/**
|
|
114
|
-
* The artifact this instance materializes.
|
|
115
|
-
*/
|
|
116
|
-
readonly artifact: ExecutableArtifact;
|
|
117
|
-
/**
|
|
118
|
-
* Timestamp when the instance was created (ISO 8601).
|
|
119
|
-
*/
|
|
120
|
-
readonly createdAt: string;
|
|
121
|
-
/**
|
|
122
|
-
* Execute a capability on this instance.
|
|
123
|
-
*
|
|
124
|
-
* The instance must be in READY state.
|
|
125
|
-
* After execution, the instance transitions to COMPLETED, FAILED, CANCELLED, or TIMED_OUT.
|
|
126
|
-
*
|
|
127
|
-
* @param capabilityName The fully qualified capability name (e.g., "invoice.create")
|
|
128
|
-
* @param input The capability input (already validated by caller)
|
|
129
|
-
* @param context Execution context with signal, deadline, logger
|
|
130
|
-
* @returns The execution result (output or error)
|
|
131
|
-
* @throws InvalidStateTransitionError if instance is not in READY state
|
|
132
|
-
*/
|
|
133
|
-
execute<TOutput = unknown>(capabilityName: string, input: unknown, context: CapabilityContext): Promise<ExecutionInstanceResult<TOutput>>;
|
|
134
|
-
/**
|
|
135
|
-
* Destroy the instance and release all resources.
|
|
136
|
-
*
|
|
137
|
-
* This is idempotent: calling destroy() multiple times is safe.
|
|
138
|
-
* After destruction:
|
|
139
|
-
* - Guest memory is inaccessible
|
|
140
|
-
* - Execution cannot resume
|
|
141
|
-
* - All host resources are released
|
|
142
|
-
* - Instance state transitions to DESTROYED
|
|
143
|
-
*
|
|
144
|
-
* @throws InvalidStateTransitionError only if called on a non-destroyable state
|
|
145
|
-
* (though in practice, destroy should be callable from any state for cleanup)
|
|
146
|
-
*/
|
|
147
|
-
destroy(): Promise<void>;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Result of executing a capability on an instance.
|
|
151
|
-
*
|
|
152
|
-
* CRITICAL: This result is produced INSIDE the execution engine
|
|
153
|
-
* and is not directly returned to the caller. The invocation layer
|
|
154
|
-
* wraps this in a CapabilityInvocationResult which adds binding/context
|
|
155
|
-
* information and normalizes errors.
|
|
156
|
-
*/
|
|
157
|
-
export type ExecutionInstanceResult<TOutput = unknown> = ExecutionInstanceSuccess<TOutput> | ExecutionInstanceFailure | ExecutionInstanceCancelled | ExecutionInstanceTimedOut;
|
|
158
|
-
/**
|
|
159
|
-
* Successful execution: the capability executed and produced output.
|
|
160
|
-
*/
|
|
161
|
-
export interface ExecutionInstanceSuccess<TOutput = unknown> {
|
|
162
|
-
readonly kind: "success";
|
|
163
|
-
readonly output: TOutput;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Failed execution: the implementation threw or produced invalid output.
|
|
167
|
-
*
|
|
168
|
-
* The error message should be normalized and safe to return to caller
|
|
169
|
-
* (no internal stack traces or credentials).
|
|
170
|
-
*/
|
|
171
|
-
export interface ExecutionInstanceFailure {
|
|
172
|
-
readonly kind: "failure";
|
|
173
|
-
readonly error: {
|
|
174
|
-
readonly message: string;
|
|
175
|
-
readonly code?: string;
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Cancelled execution: the host cancelled the execution via AbortSignal.
|
|
180
|
-
*/
|
|
181
|
-
export interface ExecutionInstanceCancelled {
|
|
182
|
-
readonly kind: "cancelled";
|
|
183
|
-
readonly reason: string;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Timed out execution: the deadline was exceeded during execution.
|
|
187
|
-
*/
|
|
188
|
-
export interface ExecutionInstanceTimedOut {
|
|
189
|
-
readonly kind: "timed_out";
|
|
190
|
-
readonly reason: string;
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Execution request: parameters for executing a capability on an artifact.
|
|
194
|
-
*
|
|
195
|
-
* This captures the semantic identity of the execution without runtime handles.
|
|
196
|
-
*/
|
|
197
|
-
export interface ExecutionRequest<TInput = unknown> {
|
|
198
|
-
/**
|
|
199
|
-
* The executable artifact to instantiate and execute.
|
|
200
|
-
*/
|
|
201
|
-
readonly artifact: ExecutableArtifact;
|
|
202
|
-
/**
|
|
203
|
-
* The authorized binding permitting this execution.
|
|
204
|
-
*/
|
|
205
|
-
readonly binding: AuthorizedCapabilityBinding;
|
|
206
|
-
/**
|
|
207
|
-
* The capability being invoked (must be in artifact.exports).
|
|
208
|
-
*/
|
|
209
|
-
readonly capability: {
|
|
210
|
-
readonly name: string;
|
|
211
|
-
readonly version: number;
|
|
212
|
-
};
|
|
213
|
-
/**
|
|
214
|
-
* The input to pass to the capability (already validated by caller).
|
|
215
|
-
*/
|
|
216
|
-
readonly input: TInput;
|
|
217
|
-
/** Optional host-owned durable state transaction correlated with this execution. */
|
|
218
|
-
readonly stateTransaction?: import("./state-context.js").ApplicationStateTransaction;
|
|
219
|
-
/**
|
|
220
|
-
* Optional implementation selected for this execution (F6).
|
|
221
|
-
*
|
|
222
|
-
* Present when the artifact was materialized from a verified application
|
|
223
|
-
* source. The selection is revalidated against durable authority before the
|
|
224
|
-
* artifact is materialized, and its provenance reaches the execution ledger.
|
|
225
|
-
*/
|
|
226
|
-
readonly implementation?: import("./application-implementation.js").SelectedImplementation;
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Execution observation record: immutable record of execution for observability.
|
|
230
|
-
*
|
|
231
|
-
* This record is sufficient for:
|
|
232
|
-
* - Audit trails
|
|
233
|
-
* - Debugging
|
|
234
|
-
* - Future analytics/metering
|
|
235
|
-
* - Compliance logging
|
|
236
|
-
*
|
|
237
|
-
* It MUST NOT contain:
|
|
238
|
-
* - Secrets or credentials
|
|
239
|
-
* - Raw input/output (only hashes or summaries)
|
|
240
|
-
* - Guest memory dumps
|
|
241
|
-
* - Personal data
|
|
242
|
-
*/
|
|
243
|
-
export interface ExecutionObservationRecord {
|
|
244
|
-
/** Unique execution identifier. */
|
|
245
|
-
readonly invocationId: string;
|
|
246
|
-
/** Application providing the capability. */
|
|
247
|
-
readonly providerId: string;
|
|
248
|
-
/** Application consuming the capability. */
|
|
249
|
-
readonly consumerId?: string;
|
|
250
|
-
/** Capability name. */
|
|
251
|
-
readonly capabilityName: string;
|
|
252
|
-
/** Capability version. */
|
|
253
|
-
readonly capabilityVersion: number;
|
|
254
|
-
/** SHA256 hash of artifact bytes. */
|
|
255
|
-
readonly artifactHash: string;
|
|
256
|
-
/** Contract fingerprint. */
|
|
257
|
-
readonly contractFingerprint: string;
|
|
258
|
-
/** Execution instance ID. */
|
|
259
|
-
readonly instanceId: string;
|
|
260
|
-
/** Timestamp when execution started (ISO 8601). */
|
|
261
|
-
readonly startedAt: string;
|
|
262
|
-
/** Timestamp when execution completed (ISO 8601). */
|
|
263
|
-
readonly completedAt: string;
|
|
264
|
-
/** Duration in milliseconds. */
|
|
265
|
-
readonly durationMs: number;
|
|
266
|
-
/** Execution outcome. */
|
|
267
|
-
readonly outcome: "success" | "failure" | "cancelled" | "timed_out";
|
|
268
|
-
/** Resource usage metrics. */
|
|
269
|
-
readonly resourceUsage?: {
|
|
270
|
-
/** Peak memory used by instance linear memory (bytes). */
|
|
271
|
-
readonly peakMemoryBytes?: number;
|
|
272
|
-
/** Approximate instruction count or fuel used. */
|
|
273
|
-
readonly instructionCount?: number;
|
|
274
|
-
};
|
|
275
|
-
/** State transaction metadata (PR27). */
|
|
276
|
-
readonly stateTransaction?: {
|
|
277
|
-
/** Unique transaction identifier. */
|
|
278
|
-
readonly transactionId: string;
|
|
279
|
-
/** Number of state read operations. */
|
|
280
|
-
readonly readCount: number;
|
|
281
|
-
/** Number of state write operations. */
|
|
282
|
-
readonly writeCount: number;
|
|
283
|
-
/** Number of state delete operations. */
|
|
284
|
-
readonly deleteCount: number;
|
|
285
|
-
/** Transaction commit status. */
|
|
286
|
-
readonly commitStatus: "committed" | "aborted" | "pending";
|
|
287
|
-
/** If commit failed, the error reason. */
|
|
288
|
-
readonly commitError?: string;
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Execution Engine: materializes artifacts into ephemeral WASM instances.
|
|
293
|
-
*
|
|
294
|
-
* The engine:
|
|
295
|
-
* - Validates artifacts before instantiation
|
|
296
|
-
* - Enforces resource limits
|
|
297
|
-
* - Handles cancellation and timeout
|
|
298
|
-
* - Produces execution observation records
|
|
299
|
-
* - Ensures instances are destroyed after execution
|
|
300
|
-
*
|
|
301
|
-
* The engine does NOT:
|
|
302
|
-
* - Persist or pool instances
|
|
303
|
-
* - Cache or reuse compiled modules (for now; design for future optimization)
|
|
304
|
-
* - Make authorization decisions (caller provides AuthorizedCapabilityBinding)
|
|
305
|
-
* - Validate input or output (caller handles validation)
|
|
306
|
-
*/
|
|
307
|
-
export interface ExecutionEngine {
|
|
308
|
-
/**
|
|
309
|
-
* Execute a capability through an execution request.
|
|
310
|
-
*
|
|
311
|
-
* Flow:
|
|
312
|
-
* 1. Acquire instance from artifact
|
|
313
|
-
* 2. Resolve capability export from artifact metadata
|
|
314
|
-
* 3. Execute capability on instance
|
|
315
|
-
* 4. Observe execution
|
|
316
|
-
* 5. Destroy instance
|
|
317
|
-
* 6. Return result + observation record
|
|
318
|
-
*
|
|
319
|
-
* @param request Execution request with artifact, binding, capability, input
|
|
320
|
-
* @param context Execution context with signal, deadline, logger
|
|
321
|
-
* @returns Execution result and observation record
|
|
322
|
-
*/
|
|
323
|
-
execute<TOutput = unknown>(request: ExecutionRequest, context: CapabilityContext): Promise<{
|
|
324
|
-
result: ExecutionInstanceResult<TOutput>;
|
|
325
|
-
observation: ExecutionObservationRecord;
|
|
326
|
-
}>;
|
|
327
|
-
/**
|
|
328
|
-
* Acquire an execution instance from an artifact.
|
|
329
|
-
*
|
|
330
|
-
* Creates a new instance by:
|
|
331
|
-
* 1. Validating artifact (contract/content consistency)
|
|
332
|
-
* 2. Loading WASM bytes
|
|
333
|
-
* 3. Instantiating WASM module
|
|
334
|
-
* 4. Setting up host imports
|
|
335
|
-
* 5. Verifying all declared exports are present
|
|
336
|
-
*
|
|
337
|
-
* The instance is in READY state and can be executed.
|
|
338
|
-
*
|
|
339
|
-
* @param artifact The executable artifact
|
|
340
|
-
* @param binding The authorized binding (for identity context)
|
|
341
|
-
* @param context The execution context
|
|
342
|
-
* @returns A new ephemeral execution instance
|
|
343
|
-
* @throws ArtifactValidationError if artifact is invalid
|
|
344
|
-
* @throws MissingExportError if declared exports are missing
|
|
345
|
-
*/
|
|
346
|
-
acquireInstance(artifact: ExecutableArtifact, binding: AuthorizedCapabilityBinding, context: CapabilityContext): Promise<ExecutionInstance>;
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* Validate that execution uses exactly the authority granted by the issued
|
|
350
|
-
* binding. Execution requests are caller-supplied data, so the runtime must not
|
|
351
|
-
* trust request capability or artifact identity fields when they disagree with
|
|
352
|
-
* the authoritative binding and registered provider state.
|
|
353
|
-
*/
|
|
354
|
-
export declare function assertExecutionRequestAuthority(request: ExecutionRequest): void;
|
|
355
|
-
/**
|
|
356
|
-
* Artifact instantiation error: artifact failed validation or instantiation.
|
|
357
|
-
*
|
|
358
|
-
* This includes:
|
|
359
|
-
* - WASM structural errors
|
|
360
|
-
* - Contract fingerprint mismatch
|
|
361
|
-
* - Export/capability mismatch
|
|
362
|
-
* - Forbidden imports
|
|
363
|
-
*/
|
|
364
|
-
export declare class ArtifactInstantiationError extends Error {
|
|
365
|
-
readonly message: string;
|
|
366
|
-
readonly artifactHash: string;
|
|
367
|
-
readonly details?: unknown | undefined;
|
|
368
|
-
constructor(message: string, artifactHash: string, details?: unknown | undefined);
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Missing export error: artifact doesn't export declared capability.
|
|
372
|
-
*/
|
|
373
|
-
export declare class MissingExportError extends Error {
|
|
374
|
-
readonly capabilityName: string;
|
|
375
|
-
readonly artifactHash: string;
|
|
376
|
-
readonly availableExports: readonly string[];
|
|
377
|
-
constructor(capabilityName: string, artifactHash: string, availableExports: readonly string[]);
|
|
378
|
-
}
|
|
379
|
-
/**
|
|
380
|
-
* Invalid state transition: instance lifecycle state change is not allowed.
|
|
381
|
-
*/
|
|
382
|
-
export declare class InvalidStateTransitionError extends Error {
|
|
383
|
-
readonly fromState: ExecutionInstanceState;
|
|
384
|
-
readonly toState: ExecutionInstanceState;
|
|
385
|
-
constructor(fromState: ExecutionInstanceState, toState: ExecutionInstanceState);
|
|
386
|
-
}
|
|
387
|
-
//# sourceMappingURL=execution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAGhE;;;;;;;;;;;;GAYG;AACH,oBAAY,sBAAsB;IAChC;;;OAGG;IACH,OAAO,YAAY;IAEnB;;;OAGG;IACH,KAAK,UAAU;IAEf;;;OAGG;IACH,OAAO,YAAY;IAEnB;;;OAGG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IAC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EAAE,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACzC,WAAW,EAAE,0BAA0B,CAAC;KACzC,CAAC,CAAC;IAEH;;;;;;;;;;;;;;;;;;OAkBG;IACH,eAAe,CACb,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,2BAA2B,EACpC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAsC/E;AAED;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;aAExB,OAAO,EAAE,MAAM;aACxB,YAAY,EAAE,MAAM;aACpB,OAAO,CAAC,EAAE,OAAO;gBAFR,OAAO,EAAE,MAAM,EACxB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,OAAO,YAAA;CAKpC;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;aAEzB,cAAc,EAAE,MAAM;aACtB,YAAY,EAAE,MAAM;aACpB,gBAAgB,EAAE,SAAS,MAAM,EAAE;gBAFnC,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,SAAS,MAAM,EAAE;CAKtD;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;aAElC,SAAS,EAAE,sBAAsB;aACjC,OAAO,EAAE,sBAAsB;gBAD/B,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,sBAAsB;CAKlD"}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ephemeral WASM Execution Runtime (PR26)
|
|
3
|
-
*
|
|
4
|
-
* The execution engine layer that materializes ExecutableArtifacts into
|
|
5
|
-
* ephemeral WASM instances, executes capabilities, and destroys instances
|
|
6
|
-
* after completion.
|
|
7
|
-
*
|
|
8
|
-
* CRITICAL INVARIANT:
|
|
9
|
-
* - Every execution produces exactly one instance
|
|
10
|
-
* - Every instance has an explicit lifecycle (CREATED → READY → RUNNING → COMPLETED/FAILED/CANCELLED → DESTROYED)
|
|
11
|
-
* - After any outcome (success, failure, cancellation, timeout), running instances = 0
|
|
12
|
-
* - Instances are never reused or pooled
|
|
13
|
-
* - Memory is isolated per instance
|
|
14
|
-
* - Guest code cannot access host resources (filesystem, network, etc.)
|
|
15
|
-
*
|
|
16
|
-
* The execution engine bridges:
|
|
17
|
-
* AuthorizedCapabilityBinding
|
|
18
|
-
* ↓
|
|
19
|
-
* ExecutionEngine.execute()
|
|
20
|
-
* ↓
|
|
21
|
-
* ExecutionInstance (ephemeral WASM)
|
|
22
|
-
* ↓
|
|
23
|
-
* ExecutionResult + ExecutionObservationRecord
|
|
24
|
-
* ↓
|
|
25
|
-
* instance.destroy()
|
|
26
|
-
* ↓
|
|
27
|
-
* running instances = 0
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* Explicit lifecycle state for an execution instance.
|
|
31
|
-
*
|
|
32
|
-
* Valid state transitions:
|
|
33
|
-
* CREATED → READY → RUNNING → COMPLETED
|
|
34
|
-
* CREATED → READY → RUNNING → FAILED
|
|
35
|
-
* CREATED → READY → RUNNING → CANCELLED
|
|
36
|
-
* CREATED → READY → RUNNING → TIMED_OUT
|
|
37
|
-
* (any state) → DESTROYED (idempotent)
|
|
38
|
-
*
|
|
39
|
-
* Invalid transitions must throw InvalidStateTransitionError.
|
|
40
|
-
* For example: DESTROYED → RUNNING must be rejected.
|
|
41
|
-
*/
|
|
42
|
-
export var ExecutionInstanceState;
|
|
43
|
-
(function (ExecutionInstanceState) {
|
|
44
|
-
/**
|
|
45
|
-
* Instance created but not yet instantiated.
|
|
46
|
-
* WASM module is not yet loaded.
|
|
47
|
-
*/
|
|
48
|
-
ExecutionInstanceState["CREATED"] = "CREATED";
|
|
49
|
-
/**
|
|
50
|
-
* WASM module instantiated and ready for execution.
|
|
51
|
-
* Instance has acquired resources (linear memory allocated).
|
|
52
|
-
*/
|
|
53
|
-
ExecutionInstanceState["READY"] = "READY";
|
|
54
|
-
/**
|
|
55
|
-
* Capability execution in progress.
|
|
56
|
-
* Guest code is running or suspended on host callback.
|
|
57
|
-
*/
|
|
58
|
-
ExecutionInstanceState["RUNNING"] = "RUNNING";
|
|
59
|
-
/**
|
|
60
|
-
* Execution completed successfully.
|
|
61
|
-
* Output has been validated and is available.
|
|
62
|
-
*/
|
|
63
|
-
ExecutionInstanceState["COMPLETED"] = "COMPLETED";
|
|
64
|
-
/**
|
|
65
|
-
* Execution failed (implementation error or validation failure).
|
|
66
|
-
* Error information is available; output is not.
|
|
67
|
-
*/
|
|
68
|
-
ExecutionInstanceState["FAILED"] = "FAILED";
|
|
69
|
-
/**
|
|
70
|
-
* Execution cancelled by host (AbortSignal fired).
|
|
71
|
-
* Cancellation reason is available.
|
|
72
|
-
*/
|
|
73
|
-
ExecutionInstanceState["CANCELLED"] = "CANCELLED";
|
|
74
|
-
/**
|
|
75
|
-
* Execution timed out (deadline exceeded).
|
|
76
|
-
* No result is available.
|
|
77
|
-
*/
|
|
78
|
-
ExecutionInstanceState["TIMED_OUT"] = "TIMED_OUT";
|
|
79
|
-
/**
|
|
80
|
-
* Instance destroyed and all resources released.
|
|
81
|
-
* Instance is no longer usable.
|
|
82
|
-
* This is the terminal state.
|
|
83
|
-
*/
|
|
84
|
-
ExecutionInstanceState["DESTROYED"] = "DESTROYED";
|
|
85
|
-
})(ExecutionInstanceState || (ExecutionInstanceState = {}));
|
|
86
|
-
/**
|
|
87
|
-
* Validate that execution uses exactly the authority granted by the issued
|
|
88
|
-
* binding. Execution requests are caller-supplied data, so the runtime must not
|
|
89
|
-
* trust request capability or artifact identity fields when they disagree with
|
|
90
|
-
* the authoritative binding and registered provider state.
|
|
91
|
-
*/
|
|
92
|
-
export function assertExecutionRequestAuthority(request) {
|
|
93
|
-
if (request.capability.name !== request.binding.capability.name ||
|
|
94
|
-
request.capability.version !== request.binding.capability.version) {
|
|
95
|
-
throw new Error(`Execution capability "${request.capability.name}@${request.capability.version}" does not match authorized binding "${request.binding.capability.name}@${request.binding.capability.version}"`);
|
|
96
|
-
}
|
|
97
|
-
const artifactApplicationId = request.artifact.metadata.application?.id;
|
|
98
|
-
if (artifactApplicationId && artifactApplicationId !== request.binding.provider.id) {
|
|
99
|
-
throw new Error(`Artifact application "${artifactApplicationId}" does not match authorized provider "${request.binding.provider.id}"`);
|
|
100
|
-
}
|
|
101
|
-
const providerFingerprint = request.binding.provider.fingerprint;
|
|
102
|
-
if (providerFingerprint && request.artifact.metadata.contractFingerprint !== providerFingerprint) {
|
|
103
|
-
throw new Error(`Artifact contract "${request.artifact.metadata.contractFingerprint}" does not match authorized provider contract "${providerFingerprint}"`);
|
|
104
|
-
}
|
|
105
|
-
// Durable state is owned by an application, so an execution may only carry a
|
|
106
|
-
// state transaction belonging to a participant of the binding it executes
|
|
107
|
-
// under. Without this the provider becomes a confused deputy: any caller
|
|
108
|
-
// could pair a legitimate binding with a third application's transaction.
|
|
109
|
-
const stateApplicationId = request.stateTransaction?.applicationId;
|
|
110
|
-
if (stateApplicationId &&
|
|
111
|
-
stateApplicationId !== request.binding.provider.id &&
|
|
112
|
-
stateApplicationId !== request.binding.consumer?.id) {
|
|
113
|
-
throw new Error(`State transaction application "${stateApplicationId}" does not match authorized binding participants "${request.binding.consumer?.id}" and "${request.binding.provider.id}"`);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Artifact instantiation error: artifact failed validation or instantiation.
|
|
118
|
-
*
|
|
119
|
-
* This includes:
|
|
120
|
-
* - WASM structural errors
|
|
121
|
-
* - Contract fingerprint mismatch
|
|
122
|
-
* - Export/capability mismatch
|
|
123
|
-
* - Forbidden imports
|
|
124
|
-
*/
|
|
125
|
-
export class ArtifactInstantiationError extends Error {
|
|
126
|
-
message;
|
|
127
|
-
artifactHash;
|
|
128
|
-
details;
|
|
129
|
-
constructor(message, artifactHash, details) {
|
|
130
|
-
super(`Artifact instantiation failed: ${message}`);
|
|
131
|
-
this.message = message;
|
|
132
|
-
this.artifactHash = artifactHash;
|
|
133
|
-
this.details = details;
|
|
134
|
-
this.name = "ArtifactInstantiationError";
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Missing export error: artifact doesn't export declared capability.
|
|
139
|
-
*/
|
|
140
|
-
export class MissingExportError extends Error {
|
|
141
|
-
capabilityName;
|
|
142
|
-
artifactHash;
|
|
143
|
-
availableExports;
|
|
144
|
-
constructor(capabilityName, artifactHash, availableExports) {
|
|
145
|
-
super(`Capability '${capabilityName}' not found in artifact exports`);
|
|
146
|
-
this.capabilityName = capabilityName;
|
|
147
|
-
this.artifactHash = artifactHash;
|
|
148
|
-
this.availableExports = availableExports;
|
|
149
|
-
this.name = "MissingExportError";
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Invalid state transition: instance lifecycle state change is not allowed.
|
|
154
|
-
*/
|
|
155
|
-
export class InvalidStateTransitionError extends Error {
|
|
156
|
-
fromState;
|
|
157
|
-
toState;
|
|
158
|
-
constructor(fromState, toState) {
|
|
159
|
-
super(`Invalid state transition: ${fromState} → ${toState}`);
|
|
160
|
-
this.fromState = fromState;
|
|
161
|
-
this.toState = toState;
|
|
162
|
-
this.name = "InvalidStateTransitionError";
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
//# sourceMappingURL=execution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAOH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,sBAiDX;AAjDD,WAAY,sBAAsB;IAChC;;;OAGG;IACH,6CAAmB,CAAA;IAEnB;;;OAGG;IACH,yCAAe,CAAA;IAEf;;;OAGG;IACH,6CAAmB,CAAA;IAEnB;;;OAGG;IACH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OAAO,2BAA4B,SAAQ,KAAK;IAElC;IACA;IAFlB,YACkB,SAAiC,EACjC,OAA+B;QAE/C,KAAK,CAAC,6BAA6B,SAAS,MAAM,OAAO,EAAE,CAAC,CAAC;QAH7C,cAAS,GAAT,SAAS,CAAwB;QACjC,YAAO,GAAP,OAAO,CAAwB;QAG/C,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { AppResponse } from "../../protocol/dist/index.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Idempotency support (specification §44).
|
|
4
|
-
*
|
|
5
|
-
* A capability that declares `idempotency: "supported"` may be retried with the
|
|
6
|
-
* same `idempotencyKey`; the stored response is replayed rather than the
|
|
7
|
-
* handler being executed twice.
|
|
8
|
-
*/
|
|
9
|
-
export interface IdempotencyRecord {
|
|
10
|
-
key: string;
|
|
11
|
-
capability: string;
|
|
12
|
-
version: number;
|
|
13
|
-
requestId: string;
|
|
14
|
-
response: AppResponse;
|
|
15
|
-
storedAt: number;
|
|
16
|
-
expiresAt: number;
|
|
17
|
-
}
|
|
18
|
-
export interface IdempotencyStore {
|
|
19
|
-
get(key: string): Promise<IdempotencyRecord | undefined>;
|
|
20
|
-
set(record: IdempotencyRecord): Promise<void>;
|
|
21
|
-
}
|
|
22
|
-
export declare const DEFAULT_IDEMPOTENCY_TTL_MS: number;
|
|
23
|
-
/** Builds the storage key. Keys are scoped per session and capability version. */
|
|
24
|
-
export declare function idempotencyStorageKey(options: {
|
|
25
|
-
key: string;
|
|
26
|
-
capability: string;
|
|
27
|
-
version: number;
|
|
28
|
-
sessionId?: string;
|
|
29
|
-
}): string;
|
|
30
|
-
export declare class MemoryIdempotencyStore implements IdempotencyStore {
|
|
31
|
-
#private;
|
|
32
|
-
get(key: string): Promise<IdempotencyRecord | undefined>;
|
|
33
|
-
set(record: IdempotencyRecord): Promise<void>;
|
|
34
|
-
get size(): number;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=idempotency.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"idempotency.d.ts","sourceRoot":"","sources":["../src/idempotency.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;IACzD,GAAG,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C;AAED,eAAO,MAAM,0BAA0B,QAAsB,CAAC;AAE9D,kFAAkF;AAClF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAET;AAED,qBAAa,sBAAuB,YAAW,gBAAgB;;IAGvD,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;IAUxD,GAAG,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAcnD,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_IDEMPOTENCY_TTL_MS = 24 * 60 * 60 * 1000;
|
|
2
|
-
/** Builds the storage key. Keys are scoped per session and capability version. */
|
|
3
|
-
export function idempotencyStorageKey(options) {
|
|
4
|
-
return `${options.sessionId ?? "anonymous"}|${options.capability}@${options.version}|${options.key}`;
|
|
5
|
-
}
|
|
6
|
-
export class MemoryIdempotencyStore {
|
|
7
|
-
#records = new Map();
|
|
8
|
-
async get(key) {
|
|
9
|
-
const record = this.#records.get(key);
|
|
10
|
-
if (!record)
|
|
11
|
-
return undefined;
|
|
12
|
-
if (record.expiresAt <= Date.now()) {
|
|
13
|
-
this.#records.delete(key);
|
|
14
|
-
return undefined;
|
|
15
|
-
}
|
|
16
|
-
return record;
|
|
17
|
-
}
|
|
18
|
-
async set(record) {
|
|
19
|
-
this.#records.set(record.key, record);
|
|
20
|
-
this.#prune();
|
|
21
|
-
}
|
|
22
|
-
/** Drops expired records so a long-lived process does not grow unbounded. */
|
|
23
|
-
#prune() {
|
|
24
|
-
if (this.#records.size % 128 !== 0)
|
|
25
|
-
return;
|
|
26
|
-
const now = Date.now();
|
|
27
|
-
for (const [key, existing] of this.#records) {
|
|
28
|
-
if (existing.expiresAt <= now)
|
|
29
|
-
this.#records.delete(key);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
get size() {
|
|
33
|
-
return this.#records.size;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=idempotency.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"idempotency.js","sourceRoot":"","sources":["../src/idempotency.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAE9D,kFAAkF;AAClF,MAAM,UAAU,qBAAqB,CAAC,OAKrC;IACC,OAAO,GAAG,OAAO,CAAC,SAAS,IAAI,WAAW,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;A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