@innovatorstack/harness 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +59 -2
- package/assets/brand/icon-on-dark.png +0 -0
- package/assets/brand/icon.png +0 -0
- package/assets/brand/mark-on-dark.svg +6 -0
- package/assets/brand/mark.svg +6 -0
- package/assets/brand/social-preview.png +0 -0
- package/assets/brand/social-preview.svg +13 -0
- package/dist/baseline/catalog.d.ts +5 -0
- package/dist/baseline/catalog.d.ts.map +1 -0
- package/dist/baseline/catalog.js +32 -0
- package/dist/baseline/catalog.js.map +1 -0
- package/dist/baseline/data/item-types.json +1062 -0
- package/dist/baseline/data/properties.json +31286 -0
- package/dist/baseline/data/records.json +6666 -0
- package/dist/baseline/data/relationships.json +393 -0
- package/dist/baseline/database.bin +0 -0
- package/dist/baseline/database.d.ts +4 -0
- package/dist/baseline/database.d.ts.map +1 -0
- package/dist/baseline/database.js +33 -0
- package/dist/baseline/database.js.map +1 -0
- package/dist/baseline/source.d.ts +5 -0
- package/dist/baseline/source.d.ts.map +1 -0
- package/dist/baseline/source.js +13 -0
- package/dist/baseline/source.js.map +1 -0
- package/dist/compatibility/capabilities.d.ts +49 -0
- package/dist/compatibility/capabilities.d.ts.map +1 -0
- package/dist/compatibility/capabilities.js +605 -0
- package/dist/compatibility/capabilities.js.map +1 -0
- package/dist/compatibility/check.d.ts +5 -0
- package/dist/compatibility/check.d.ts.map +1 -0
- package/dist/compatibility/check.js +332 -0
- package/dist/compatibility/check.js.map +1 -0
- package/dist/compatibility/executions.d.ts +11 -0
- package/dist/compatibility/executions.d.ts.map +1 -0
- package/dist/compatibility/executions.js +79 -0
- package/dist/compatibility/executions.js.map +1 -0
- package/dist/compatibility/executors.d.ts +21 -0
- package/dist/compatibility/executors.d.ts.map +1 -0
- package/dist/compatibility/executors.js +151 -0
- package/dist/compatibility/executors.js.map +1 -0
- package/dist/compatibility/index.d.ts +6 -0
- package/dist/compatibility/index.d.ts.map +1 -0
- package/dist/compatibility/index.js +4 -0
- package/dist/compatibility/index.js.map +1 -0
- package/dist/compatibility/metadata.d.ts +6 -0
- package/dist/compatibility/metadata.d.ts.map +1 -0
- package/dist/compatibility/metadata.js +137 -0
- package/dist/compatibility/metadata.js.map +1 -0
- package/dist/compatibility/mocks.d.ts +4 -0
- package/dist/compatibility/mocks.d.ts.map +1 -0
- package/dist/compatibility/mocks.js +22 -0
- package/dist/compatibility/mocks.js.map +1 -0
- package/dist/compatibility/revisions.d.ts +5 -0
- package/dist/compatibility/revisions.d.ts.map +1 -0
- package/dist/compatibility/revisions.js +34 -0
- package/dist/compatibility/revisions.js.map +1 -0
- package/dist/compatibility/security.d.ts +6 -0
- package/dist/compatibility/security.d.ts.map +1 -0
- package/dist/compatibility/security.js +74 -0
- package/dist/compatibility/security.js.map +1 -0
- package/dist/compatibility/sources.d.ts +6 -0
- package/dist/compatibility/sources.d.ts.map +1 -0
- package/dist/compatibility/sources.js +20 -0
- package/dist/compatibility/sources.js.map +1 -0
- package/dist/compatibility/types.d.ts +130 -0
- package/dist/compatibility/types.d.ts.map +1 -0
- package/dist/compatibility/types.js +48 -0
- package/dist/compatibility/types.js.map +1 -0
- package/dist/controls/clock.d.ts +23 -0
- package/dist/controls/clock.d.ts.map +1 -0
- package/dist/controls/clock.js +74 -0
- package/dist/controls/clock.js.map +1 -0
- package/dist/controls/execution.d.ts +8 -0
- package/dist/controls/execution.d.ts.map +1 -0
- package/dist/controls/execution.js +36 -0
- package/dist/controls/execution.js.map +1 -0
- package/dist/controls/failure-types.d.ts +52 -0
- package/dist/controls/failure-types.d.ts.map +1 -0
- package/dist/controls/failure-types.js +15 -0
- package/dist/controls/failure-types.js.map +1 -0
- package/dist/controls/failure-validation.d.ts +17 -0
- package/dist/controls/failure-validation.d.ts.map +1 -0
- package/dist/controls/failure-validation.js +63 -0
- package/dist/controls/failure-validation.js.map +1 -0
- package/dist/controls/failures.d.ts +20 -0
- package/dist/controls/failures.d.ts.map +1 -0
- package/dist/controls/failures.js +128 -0
- package/dist/controls/failures.js.map +1 -0
- package/dist/controls/ids.d.ts +24 -0
- package/dist/controls/ids.d.ts.map +1 -0
- package/dist/controls/ids.js +63 -0
- package/dist/controls/ids.js.map +1 -0
- package/dist/controls/observers.d.ts +20 -0
- package/dist/controls/observers.d.ts.map +1 -0
- package/dist/controls/observers.js +80 -0
- package/dist/controls/observers.js.map +1 -0
- package/dist/controls/state.d.ts +10 -0
- package/dist/controls/state.d.ts.map +1 -0
- package/dist/controls/state.js +50 -0
- package/dist/controls/state.js.map +1 -0
- package/dist/controls/targets.d.ts +19 -0
- package/dist/controls/targets.d.ts.map +1 -0
- package/dist/controls/targets.js +82 -0
- package/dist/controls/targets.js.map +1 -0
- package/dist/controls/values.d.ts +23 -0
- package/dist/controls/values.d.ts.map +1 -0
- package/dist/controls/values.js +27 -0
- package/dist/controls/values.js.map +1 -0
- package/dist/controls/world.d.ts +18 -0
- package/dist/controls/world.d.ts.map +1 -0
- package/dist/controls/world.js +26 -0
- package/dist/controls/world.js.map +1 -0
- package/dist/core/budget.d.ts +9 -0
- package/dist/core/budget.d.ts.map +1 -0
- package/dist/core/budget.js +23 -0
- package/dist/core/budget.js.map +1 -0
- package/dist/core/context.d.ts +8 -0
- package/dist/core/context.d.ts.map +1 -0
- package/dist/core/context.js +38 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/data.d.ts +16 -0
- package/dist/core/data.d.ts.map +1 -0
- package/dist/core/data.js +197 -0
- package/dist/core/data.js.map +1 -0
- package/dist/core/deadline.d.ts +12 -0
- package/dist/core/deadline.d.ts.map +1 -0
- package/dist/core/deadline.js +38 -0
- package/dist/core/deadline.js.map +1 -0
- package/dist/core/errors.d.ts +7 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +15 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/files.d.ts +8 -0
- package/dist/core/files.d.ts.map +1 -0
- package/dist/core/files.js +98 -0
- package/dist/core/files.js.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/limits.d.ts +15 -0
- package/dist/core/limits.d.ts.map +1 -0
- package/dist/core/limits.js +15 -0
- package/dist/core/limits.js.map +1 -0
- package/dist/core/modules.d.ts +3 -0
- package/dist/core/modules.d.ts.map +1 -0
- package/dist/core/modules.js +68 -0
- package/dist/core/modules.js.map +1 -0
- package/dist/core/operation.d.ts +18 -0
- package/dist/core/operation.d.ts.map +1 -0
- package/dist/core/operation.js +21 -0
- package/dist/core/operation.js.map +1 -0
- package/dist/core/process.d.ts +3 -0
- package/dist/core/process.d.ts.map +1 -0
- package/dist/core/process.js +44 -0
- package/dist/core/process.js.map +1 -0
- package/dist/core/resources.d.ts +3 -0
- package/dist/core/resources.d.ts.map +1 -0
- package/dist/core/resources.js +28 -0
- package/dist/core/resources.js.map +1 -0
- package/dist/core/runtime.d.ts +54 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/core/runtime.js +565 -0
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/types.d.ts +61 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +1 -0
- package/dist/core/types.js.map +1 -0
- package/dist/diagnostics/source-location.d.ts +7 -0
- package/dist/diagnostics/source-location.d.ts.map +1 -0
- package/dist/diagnostics/source-location.js +1 -0
- package/dist/diagnostics/source-location.js.map +1 -0
- package/dist/engine/instance.d.ts +57 -0
- package/dist/engine/instance.d.ts.map +1 -0
- package/dist/engine/instance.js +281 -0
- package/dist/engine/instance.js.map +1 -0
- package/dist/engine.d.ts +5 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +6 -0
- package/dist/engine.js.map +1 -0
- package/dist/fixtures/module.d.ts +5 -0
- package/dist/fixtures/module.d.ts.map +1 -0
- package/dist/fixtures/module.js +112 -0
- package/dist/fixtures/module.js.map +1 -0
- package/dist/fixtures/types.d.ts +7 -0
- package/dist/fixtures/types.d.ts.map +1 -0
- package/dist/fixtures/types.js +1 -0
- package/dist/fixtures/types.js.map +1 -0
- package/dist/harness/configuration.d.ts +53 -0
- package/dist/harness/configuration.d.ts.map +1 -0
- package/dist/harness/configuration.js +279 -0
- package/dist/harness/configuration.js.map +1 -0
- package/dist/harness/create.d.ts +5 -0
- package/dist/harness/create.d.ts.map +1 -0
- package/dist/harness/create.js +156 -0
- package/dist/harness/create.js.map +1 -0
- package/dist/harness/extensions.d.ts +8 -0
- package/dist/harness/extensions.d.ts.map +1 -0
- package/dist/harness/extensions.js +58 -0
- package/dist/harness/extensions.js.map +1 -0
- package/dist/harness/fixtures.d.ts +9 -0
- package/dist/harness/fixtures.d.ts.map +1 -0
- package/dist/harness/fixtures.js +130 -0
- package/dist/harness/fixtures.js.map +1 -0
- package/dist/harness/runtime-identity.d.ts +3 -0
- package/dist/harness/runtime-identity.d.ts.map +1 -0
- package/dist/harness/runtime-identity.js +30 -0
- package/dist/harness/runtime-identity.js.map +1 -0
- package/dist/harness/setup-cache.d.ts +11 -0
- package/dist/harness/setup-cache.d.ts.map +1 -0
- package/dist/harness/setup-cache.js +40 -0
- package/dist/harness/setup-cache.js.map +1 -0
- package/dist/harness/setup-image.d.ts +5 -0
- package/dist/harness/setup-image.d.ts.map +1 -0
- package/dist/harness/setup-image.js +118 -0
- package/dist/harness/setup-image.js.map +1 -0
- package/dist/harness/setup-imports.d.ts +3 -0
- package/dist/harness/setup-imports.d.ts.map +1 -0
- package/dist/harness/setup-imports.js +30 -0
- package/dist/harness/setup-imports.js.map +1 -0
- package/dist/harness/setup-inputs.d.ts +12 -0
- package/dist/harness/setup-inputs.d.ts.map +1 -0
- package/dist/harness/setup-inputs.js +47 -0
- package/dist/harness/setup-inputs.js.map +1 -0
- package/dist/harness/setup-module.d.ts +3 -0
- package/dist/harness/setup-module.d.ts.map +1 -0
- package/dist/harness/setup-module.js +150 -0
- package/dist/harness/setup-module.js.map +1 -0
- package/dist/harness/world.d.ts +36 -0
- package/dist/harness/world.d.ts.map +1 -0
- package/dist/harness/world.js +171 -0
- package/dist/harness/world.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/instrumentation/failures.d.ts +5 -0
- package/dist/instrumentation/failures.d.ts.map +1 -0
- package/dist/instrumentation/failures.js +94 -0
- package/dist/instrumentation/failures.js.map +1 -0
- package/dist/instrumentation/recorder.d.ts +38 -0
- package/dist/instrumentation/recorder.d.ts.map +1 -0
- package/dist/instrumentation/recorder.js +372 -0
- package/dist/instrumentation/recorder.js.map +1 -0
- package/dist/instrumentation/snapshots.d.ts +20 -0
- package/dist/instrumentation/snapshots.d.ts.map +1 -0
- package/dist/instrumentation/snapshots.js +177 -0
- package/dist/instrumentation/snapshots.js.map +1 -0
- package/dist/instrumentation/types.d.ts +107 -0
- package/dist/instrumentation/types.d.ts.map +1 -0
- package/dist/instrumentation/types.js +25 -0
- package/dist/instrumentation/types.js.map +1 -0
- package/dist/items/codec.d.ts +4 -0
- package/dist/items/codec.d.ts.map +1 -0
- package/dist/items/codec.js +137 -0
- package/dist/items/codec.js.map +1 -0
- package/dist/items/item.d.ts +58 -0
- package/dist/items/item.d.ts.map +1 -0
- package/dist/items/item.js +145 -0
- package/dist/items/item.js.map +1 -0
- package/dist/items/logical.d.ts +23 -0
- package/dist/items/logical.d.ts.map +1 -0
- package/dist/items/logical.js +92 -0
- package/dist/items/logical.js.map +1 -0
- package/dist/items/origins.d.ts +7 -0
- package/dist/items/origins.d.ts.map +1 -0
- package/dist/items/origins.js +102 -0
- package/dist/items/origins.js.map +1 -0
- package/dist/items/xml.d.ts +7 -0
- package/dist/items/xml.d.ts.map +1 -0
- package/dist/items/xml.js +134 -0
- package/dist/items/xml.js.map +1 -0
- package/dist/methods/csharp/base-input.d.ts +30 -0
- package/dist/methods/csharp/base-input.d.ts.map +1 -0
- package/dist/methods/csharp/base-input.js +140 -0
- package/dist/methods/csharp/base-input.js.map +1 -0
- package/dist/methods/csharp/cache.d.ts +3 -0
- package/dist/methods/csharp/cache.d.ts.map +1 -0
- package/dist/methods/csharp/cache.js +52 -0
- package/dist/methods/csharp/cache.js.map +1 -0
- package/dist/methods/csharp/callbacks.d.ts +12 -0
- package/dist/methods/csharp/callbacks.d.ts.map +1 -0
- package/dist/methods/csharp/callbacks.js +75 -0
- package/dist/methods/csharp/callbacks.js.map +1 -0
- package/dist/methods/csharp/compiler.d.ts +26 -0
- package/dist/methods/csharp/compiler.d.ts.map +1 -0
- package/dist/methods/csharp/compiler.js +253 -0
- package/dist/methods/csharp/compiler.js.map +1 -0
- package/dist/methods/csharp/context.d.ts +17 -0
- package/dist/methods/csharp/context.d.ts.map +1 -0
- package/dist/methods/csharp/context.js +65 -0
- package/dist/methods/csharp/context.js.map +1 -0
- package/dist/methods/csharp/documents.d.ts +13 -0
- package/dist/methods/csharp/documents.d.ts.map +1 -0
- package/dist/methods/csharp/documents.js +128 -0
- package/dist/methods/csharp/documents.js.map +1 -0
- package/dist/methods/csharp/executor.d.ts +35 -0
- package/dist/methods/csharp/executor.d.ts.map +1 -0
- package/dist/methods/csharp/executor.js +363 -0
- package/dist/methods/csharp/executor.js.map +1 -0
- package/dist/methods/csharp/index.d.ts +4 -0
- package/dist/methods/csharp/index.d.ts.map +1 -0
- package/dist/methods/csharp/index.js +3 -0
- package/dist/methods/csharp/index.js.map +1 -0
- package/dist/methods/csharp/managed/CallContext.cs +21 -0
- package/dist/methods/csharp/managed/Connections.cs +27 -0
- package/dist/methods/csharp/managed/ContextSafety.cs +219 -0
- package/dist/methods/csharp/managed/DomChanges.cs +39 -0
- package/dist/methods/csharp/managed/ErrorLookup.cs +28 -0
- package/dist/methods/csharp/managed/EventMetadata.cs +45 -0
- package/dist/methods/csharp/managed/GlobalUsings.cs.template +9 -0
- package/dist/methods/csharp/managed/Identity.cs +30 -0
- package/dist/methods/csharp/managed/InOut.cs.template +42 -0
- package/dist/methods/csharp/managed/InOutInvocation.cs +41 -0
- package/dist/methods/csharp/managed/Innovator.cs +106 -0
- package/dist/methods/csharp/managed/Item.cs +515 -0
- package/dist/methods/csharp/managed/ItemDocuments.cs +62 -0
- package/dist/methods/csharp/managed/ItemXml.cs +465 -0
- package/dist/methods/csharp/managed/LogicalData.cs +20 -0
- package/dist/methods/csharp/managed/LogicalXml.cs +181 -0
- package/dist/methods/csharp/managed/ManagedDocuments.cs +48 -0
- package/dist/methods/csharp/managed/Method.cs.template +30 -0
- package/dist/methods/csharp/managed/MethodAssemblies.cs +83 -0
- package/dist/methods/csharp/managed/MethodContext.cs +44 -0
- package/dist/methods/csharp/managed/MethodEventArgs.cs +64 -0
- package/dist/methods/csharp/managed/MethodInvocation.cs +201 -0
- package/dist/methods/csharp/managed/NuGet.Config +6 -0
- package/dist/methods/csharp/managed/PayloadXml.cs +38 -0
- package/dist/methods/csharp/managed/Permissions.cs +47 -0
- package/dist/methods/csharp/managed/Program.cs +83 -0
- package/dist/methods/csharp/managed/PropertyItems.cs +46 -0
- package/dist/methods/csharp/managed/Protocol.cs +204 -0
- package/dist/methods/csharp/managed/ProtocolInput.cs +67 -0
- package/dist/methods/csharp/managed/ProtocolJson.cs +13 -0
- package/dist/methods/csharp/managed/RemoteContext.cs +33 -0
- package/dist/methods/csharp/managed/RequestOrigins.cs +207 -0
- package/dist/methods/csharp/managed/RequestRelationships.cs +129 -0
- package/dist/methods/csharp/managed/RequestXml.cs +237 -0
- package/dist/methods/csharp/managed/ResponseXml.cs +114 -0
- package/dist/methods/csharp/managed/ServerEventArgs.cs +223 -0
- package/dist/methods/csharp/managed/WorkLimits.cs +11 -0
- package/dist/methods/csharp/managed/Worker.csproj +23 -0
- package/dist/methods/csharp/managed/XmlProperties.cs +32 -0
- package/dist/methods/csharp/managed/XmlTraversal.cs +138 -0
- package/dist/methods/csharp/method-build.d.ts +11 -0
- package/dist/methods/csharp/method-build.d.ts.map +1 -0
- package/dist/methods/csharp/method-build.js +96 -0
- package/dist/methods/csharp/method-build.js.map +1 -0
- package/dist/methods/csharp/origins.d.ts +17 -0
- package/dist/methods/csharp/origins.d.ts.map +1 -0
- package/dist/methods/csharp/origins.js +78 -0
- package/dist/methods/csharp/origins.js.map +1 -0
- package/dist/methods/csharp/protocol.d.ts +6 -0
- package/dist/methods/csharp/protocol.d.ts.map +1 -0
- package/dist/methods/csharp/protocol.js +78 -0
- package/dist/methods/csharp/protocol.js.map +1 -0
- package/dist/methods/csharp/relationship-order.d.ts +8 -0
- package/dist/methods/csharp/relationship-order.d.ts.map +1 -0
- package/dist/methods/csharp/relationship-order.js +51 -0
- package/dist/methods/csharp/relationship-order.js.map +1 -0
- package/dist/methods/csharp/request-change.d.ts +27 -0
- package/dist/methods/csharp/request-change.d.ts.map +1 -0
- package/dist/methods/csharp/request-change.js +238 -0
- package/dist/methods/csharp/request-change.js.map +1 -0
- package/dist/methods/csharp/retained-items.d.ts +9 -0
- package/dist/methods/csharp/retained-items.d.ts.map +1 -0
- package/dist/methods/csharp/retained-items.js +95 -0
- package/dist/methods/csharp/retained-items.js.map +1 -0
- package/dist/methods/csharp/security.d.ts +13 -0
- package/dist/methods/csharp/security.d.ts.map +1 -0
- package/dist/methods/csharp/security.js +82 -0
- package/dist/methods/csharp/security.js.map +1 -0
- package/dist/methods/csharp/templates.d.ts +5 -0
- package/dist/methods/csharp/templates.d.ts.map +1 -0
- package/dist/methods/csharp/templates.js +66 -0
- package/dist/methods/csharp/templates.js.map +1 -0
- package/dist/methods/csharp/worker.d.ts +31 -0
- package/dist/methods/csharp/worker.d.ts.map +1 -0
- package/dist/methods/csharp/worker.js +172 -0
- package/dist/methods/csharp/worker.js.map +1 -0
- package/dist/methods/event-data.d.ts +31 -0
- package/dist/methods/event-data.d.ts.map +1 -0
- package/dist/methods/event-data.js +8 -0
- package/dist/methods/event-data.js.map +1 -0
- package/dist/methods/types.d.ts +47 -0
- package/dist/methods/types.d.ts.map +1 -0
- package/dist/methods/types.js +2 -0
- package/dist/methods/types.js.map +1 -0
- package/dist/mocks/configuration.d.ts +5 -0
- package/dist/mocks/configuration.d.ts.map +1 -0
- package/dist/mocks/configuration.js +102 -0
- package/dist/mocks/configuration.js.map +1 -0
- package/dist/mocks/parameters.d.ts +3 -0
- package/dist/mocks/parameters.d.ts.map +1 -0
- package/dist/mocks/parameters.js +16 -0
- package/dist/mocks/parameters.js.map +1 -0
- package/dist/mocks/registry.d.ts +39 -0
- package/dist/mocks/registry.d.ts.map +1 -0
- package/dist/mocks/registry.js +129 -0
- package/dist/mocks/registry.js.map +1 -0
- package/dist/mocks/response.d.ts +10 -0
- package/dist/mocks/response.d.ts.map +1 -0
- package/dist/mocks/response.js +94 -0
- package/dist/mocks/response.js.map +1 -0
- package/dist/mocks/types.d.ts +34 -0
- package/dist/mocks/types.d.ts.map +1 -0
- package/dist/mocks/types.js +1 -0
- package/dist/mocks/types.js.map +1 -0
- package/dist/packages/bootstrap.d.ts +10 -0
- package/dist/packages/bootstrap.d.ts.map +1 -0
- package/dist/packages/bootstrap.js +66 -0
- package/dist/packages/bootstrap.js.map +1 -0
- package/dist/packages/candidates.d.ts +13 -0
- package/dist/packages/candidates.d.ts.map +1 -0
- package/dist/packages/candidates.js +43 -0
- package/dist/packages/candidates.js.map +1 -0
- package/dist/packages/defaults.d.ts +11 -0
- package/dist/packages/defaults.d.ts.map +1 -0
- package/dist/packages/defaults.js +104 -0
- package/dist/packages/defaults.js.map +1 -0
- package/dist/packages/diagnostics.d.ts +22 -0
- package/dist/packages/diagnostics.d.ts.map +1 -0
- package/dist/packages/diagnostics.js +25 -0
- package/dist/packages/diagnostics.js.map +1 -0
- package/dist/packages/draft.d.ts +66 -0
- package/dist/packages/draft.d.ts.map +1 -0
- package/dist/packages/draft.js +186 -0
- package/dist/packages/draft.js.map +1 -0
- package/dist/packages/elements.d.ts +11 -0
- package/dist/packages/elements.d.ts.map +1 -0
- package/dist/packages/elements.js +58 -0
- package/dist/packages/elements.js.map +1 -0
- package/dist/packages/evaluation.d.ts +16 -0
- package/dist/packages/evaluation.d.ts.map +1 -0
- package/dist/packages/evaluation.js +71 -0
- package/dist/packages/evaluation.js.map +1 -0
- package/dist/packages/files.d.ts +21 -0
- package/dist/packages/files.d.ts.map +1 -0
- package/dist/packages/files.js +214 -0
- package/dist/packages/files.js.map +1 -0
- package/dist/packages/importer.d.ts +23 -0
- package/dist/packages/importer.d.ts.map +1 -0
- package/dist/packages/importer.js +791 -0
- package/dist/packages/importer.js.map +1 -0
- package/dist/packages/index.d.ts +8 -0
- package/dist/packages/index.d.ts.map +1 -0
- package/dist/packages/index.js +6 -0
- package/dist/packages/index.js.map +1 -0
- package/dist/packages/manifest.d.ts +3 -0
- package/dist/packages/manifest.d.ts.map +1 -0
- package/dist/packages/manifest.js +84 -0
- package/dist/packages/manifest.js.map +1 -0
- package/dist/packages/module.d.ts +11 -0
- package/dist/packages/module.d.ts.map +1 -0
- package/dist/packages/module.js +14 -0
- package/dist/packages/module.js.map +1 -0
- package/dist/packages/parser.d.ts +12 -0
- package/dist/packages/parser.d.ts.map +1 -0
- package/dist/packages/parser.js +258 -0
- package/dist/packages/parser.js.map +1 -0
- package/dist/packages/plan.d.ts +55 -0
- package/dist/packages/plan.d.ts.map +1 -0
- package/dist/packages/plan.js +542 -0
- package/dist/packages/plan.js.map +1 -0
- package/dist/packages/schema.d.ts +9 -0
- package/dist/packages/schema.d.ts.map +1 -0
- package/dist/packages/schema.js +347 -0
- package/dist/packages/schema.js.map +1 -0
- package/dist/packages/selector.d.ts +9 -0
- package/dist/packages/selector.d.ts.map +1 -0
- package/dist/packages/selector.js +61 -0
- package/dist/packages/selector.js.map +1 -0
- package/dist/packages/state.d.ts +6 -0
- package/dist/packages/state.d.ts.map +1 -0
- package/dist/packages/state.js +62 -0
- package/dist/packages/state.js.map +1 -0
- package/dist/packages/types.d.ts +22 -0
- package/dist/packages/types.d.ts.map +1 -0
- package/dist/packages/types.js +1 -0
- package/dist/packages/types.js.map +1 -0
- package/dist/platform/action-responses.d.ts +14 -0
- package/dist/platform/action-responses.d.ts.map +1 -0
- package/dist/platform/action-responses.js +85 -0
- package/dist/platform/action-responses.js.map +1 -0
- package/dist/platform/actions.d.ts +12 -0
- package/dist/platform/actions.d.ts.map +1 -0
- package/dist/platform/actions.js +13 -0
- package/dist/platform/actions.js.map +1 -0
- package/dist/platform/catalog.d.ts +20 -0
- package/dist/platform/catalog.d.ts.map +1 -0
- package/dist/platform/catalog.js +155 -0
- package/dist/platform/catalog.js.map +1 -0
- package/dist/platform/classifications.d.ts +14 -0
- package/dist/platform/classifications.d.ts.map +1 -0
- package/dist/platform/classifications.js +100 -0
- package/dist/platform/classifications.js.map +1 -0
- package/dist/platform/creation.d.ts +4 -0
- package/dist/platform/creation.d.ts.map +1 -0
- package/dist/platform/creation.js +23 -0
- package/dist/platform/creation.js.map +1 -0
- package/dist/platform/engine.d.ts +127 -0
- package/dist/platform/engine.d.ts.map +1 -0
- package/dist/platform/engine.js +1210 -0
- package/dist/platform/engine.js.map +1 -0
- package/dist/platform/errors.d.ts +20 -0
- package/dist/platform/errors.d.ts.map +1 -0
- package/dist/platform/errors.js +28 -0
- package/dist/platform/errors.js.map +1 -0
- package/dist/platform/events/after.d.ts +22 -0
- package/dist/platform/events/after.d.ts.map +1 -0
- package/dist/platform/events/after.js +86 -0
- package/dist/platform/events/after.js.map +1 -0
- package/dist/platform/events/base-updates.d.ts +11 -0
- package/dist/platform/events/base-updates.d.ts.map +1 -0
- package/dist/platform/events/base-updates.js +43 -0
- package/dist/platform/events/base-updates.js.map +1 -0
- package/dist/platform/events/bindings.d.ts +13 -0
- package/dist/platform/events/bindings.d.ts.map +1 -0
- package/dist/platform/events/bindings.js +76 -0
- package/dist/platform/events/bindings.js.map +1 -0
- package/dist/platform/events/data.d.ts +5 -0
- package/dist/platform/events/data.d.ts.map +1 -0
- package/dist/platform/events/data.js +17 -0
- package/dist/platform/events/data.js.map +1 -0
- package/dist/platform/events/inheritance.d.ts +4 -0
- package/dist/platform/events/inheritance.d.ts.map +1 -0
- package/dist/platform/events/inheritance.js +56 -0
- package/dist/platform/events/inheritance.js.map +1 -0
- package/dist/platform/events/input.d.ts +5 -0
- package/dist/platform/events/input.d.ts.map +1 -0
- package/dist/platform/events/input.js +9 -0
- package/dist/platform/events/input.js.map +1 -0
- package/dist/platform/events/replacement.d.ts +14 -0
- package/dist/platform/events/replacement.d.ts.map +1 -0
- package/dist/platform/events/replacement.js +60 -0
- package/dist/platform/events/replacement.js.map +1 -0
- package/dist/platform/events/types.d.ts +31 -0
- package/dist/platform/events/types.d.ts.map +1 -0
- package/dist/platform/events/types.js +6 -0
- package/dist/platform/events/types.js.map +1 -0
- package/dist/platform/events/version.d.ts +5 -0
- package/dist/platform/events/version.d.ts.map +1 -0
- package/dist/platform/events/version.js +22 -0
- package/dist/platform/events/version.js.map +1 -0
- package/dist/platform/graph-actions.d.ts +18 -0
- package/dist/platform/graph-actions.d.ts.map +1 -0
- package/dist/platform/graph-actions.js +109 -0
- package/dist/platform/graph-actions.js.map +1 -0
- package/dist/platform/lifecycle.d.ts +40 -0
- package/dist/platform/lifecycle.d.ts.map +1 -0
- package/dist/platform/lifecycle.js +309 -0
- package/dist/platform/lifecycle.js.map +1 -0
- package/dist/platform/locks.d.ts +29 -0
- package/dist/platform/locks.d.ts.map +1 -0
- package/dist/platform/locks.js +150 -0
- package/dist/platform/locks.js.map +1 -0
- package/dist/platform/projection.d.ts +8 -0
- package/dist/platform/projection.d.ts.map +1 -0
- package/dist/platform/projection.js +165 -0
- package/dist/platform/projection.js.map +1 -0
- package/dist/platform/queries/conditions.d.ts +4 -0
- package/dist/platform/queries/conditions.d.ts.map +1 -0
- package/dist/platform/queries/conditions.js +48 -0
- package/dist/platform/queries/conditions.js.map +1 -0
- package/dist/platform/queries/engine.d.ts +16 -0
- package/dist/platform/queries/engine.d.ts.map +1 -0
- package/dist/platform/queries/engine.js +41 -0
- package/dist/platform/queries/engine.js.map +1 -0
- package/dist/platform/queries/fields.d.ts +7 -0
- package/dist/platform/queries/fields.d.ts.map +1 -0
- package/dist/platform/queries/fields.js +88 -0
- package/dist/platform/queries/fields.js.map +1 -0
- package/dist/platform/queries/order.d.ts +5 -0
- package/dist/platform/queries/order.d.ts.map +1 -0
- package/dist/platform/queries/order.js +69 -0
- package/dist/platform/queries/order.js.map +1 -0
- package/dist/platform/queries/paging.d.ts +9 -0
- package/dist/platform/queries/paging.d.ts.map +1 -0
- package/dist/platform/queries/paging.js +39 -0
- package/dist/platform/queries/paging.js.map +1 -0
- package/dist/platform/queries/planner.d.ts +8 -0
- package/dist/platform/queries/planner.d.ts.map +1 -0
- package/dist/platform/queries/planner.js +145 -0
- package/dist/platform/queries/planner.js.map +1 -0
- package/dist/platform/queries/relationships.d.ts +16 -0
- package/dist/platform/queries/relationships.d.ts.map +1 -0
- package/dist/platform/queries/relationships.js +84 -0
- package/dist/platform/queries/relationships.js.map +1 -0
- package/dist/platform/queries/validation.d.ts +5 -0
- package/dist/platform/queries/validation.d.ts.map +1 -0
- package/dist/platform/queries/validation.js +79 -0
- package/dist/platform/queries/validation.js.map +1 -0
- package/dist/platform/query.d.ts +10 -0
- package/dist/platform/query.d.ts.map +1 -0
- package/dist/platform/query.js +93 -0
- package/dist/platform/query.js.map +1 -0
- package/dist/platform/references/behavior.d.ts +11 -0
- package/dist/platform/references/behavior.d.ts.map +1 -0
- package/dist/platform/references/behavior.js +25 -0
- package/dist/platform/references/behavior.js.map +1 -0
- package/dist/platform/references/catalog.d.ts +23 -0
- package/dist/platform/references/catalog.d.ts.map +1 -0
- package/dist/platform/references/catalog.js +153 -0
- package/dist/platform/references/catalog.js.map +1 -0
- package/dist/platform/references/deletion.d.ts +20 -0
- package/dist/platform/references/deletion.d.ts.map +1 -0
- package/dist/platform/references/deletion.js +86 -0
- package/dist/platform/references/deletion.js.map +1 -0
- package/dist/platform/references/maintenance.d.ts +22 -0
- package/dist/platform/references/maintenance.d.ts.map +1 -0
- package/dist/platform/references/maintenance.js +113 -0
- package/dist/platform/references/maintenance.js.map +1 -0
- package/dist/platform/references/policy.d.ts +14 -0
- package/dist/platform/references/policy.d.ts.map +1 -0
- package/dist/platform/references/policy.js +76 -0
- package/dist/platform/references/policy.js.map +1 -0
- package/dist/platform/references/sessions.d.ts +20 -0
- package/dist/platform/references/sessions.d.ts.map +1 -0
- package/dist/platform/references/sessions.js +98 -0
- package/dist/platform/references/sessions.js.map +1 -0
- package/dist/platform/relationship-copy-policy.d.ts +10 -0
- package/dist/platform/relationship-copy-policy.d.ts.map +1 -0
- package/dist/platform/relationship-copy-policy.js +41 -0
- package/dist/platform/relationship-copy-policy.js.map +1 -0
- package/dist/platform/relationship-copy.d.ts +21 -0
- package/dist/platform/relationship-copy.d.ts.map +1 -0
- package/dist/platform/relationship-copy.js +146 -0
- package/dist/platform/relationship-copy.js.map +1 -0
- package/dist/platform/relationship-type.d.ts +3 -0
- package/dist/platform/relationship-type.d.ts.map +1 -0
- package/dist/platform/relationship-type.js +11 -0
- package/dist/platform/relationship-type.js.map +1 -0
- package/dist/platform/request.d.ts +7 -0
- package/dist/platform/request.d.ts.map +1 -0
- package/dist/platform/request.js +86 -0
- package/dist/platform/request.js.map +1 -0
- package/dist/platform/revisions/policy.d.ts +13 -0
- package/dist/platform/revisions/policy.d.ts.map +1 -0
- package/dist/platform/revisions/policy.js +69 -0
- package/dist/platform/revisions/policy.js.map +1 -0
- package/dist/platform/revisions/sequences.d.ts +12 -0
- package/dist/platform/revisions/sequences.d.ts.map +1 -0
- package/dist/platform/revisions/sequences.js +38 -0
- package/dist/platform/revisions/sequences.js.map +1 -0
- package/dist/platform/security/grants.d.ts +14 -0
- package/dist/platform/security/grants.d.ts.map +1 -0
- package/dist/platform/security/grants.js +83 -0
- package/dist/platform/security/grants.js.map +1 -0
- package/dist/platform/security/identities.d.ts +16 -0
- package/dist/platform/security/identities.d.ts.map +1 -0
- package/dist/platform/security/identities.js +99 -0
- package/dist/platform/security/identities.js.map +1 -0
- package/dist/platform/security/inherited-relationships.d.ts +15 -0
- package/dist/platform/security/inherited-relationships.d.ts.map +1 -0
- package/dist/platform/security/inherited-relationships.js +70 -0
- package/dist/platform/security/inherited-relationships.js.map +1 -0
- package/dist/platform/security/method-execution.d.ts +12 -0
- package/dist/platform/security/method-execution.d.ts.map +1 -0
- package/dist/platform/security/method-execution.js +24 -0
- package/dist/platform/security/method-execution.js.map +1 -0
- package/dist/platform/security/permissions.d.ts +34 -0
- package/dist/platform/security/permissions.d.ts.map +1 -0
- package/dist/platform/security/permissions.js +188 -0
- package/dist/platform/security/permissions.js.map +1 -0
- package/dist/platform/security/policy.d.ts +39 -0
- package/dist/platform/security/policy.d.ts.map +1 -0
- package/dist/platform/security/policy.js +168 -0
- package/dist/platform/security/policy.js.map +1 -0
- package/dist/platform/security/source-access.d.ts +19 -0
- package/dist/platform/security/source-access.d.ts.map +1 -0
- package/dist/platform/security/source-access.js +72 -0
- package/dist/platform/security/source-access.js.map +1 -0
- package/dist/platform/security/source-inheritance.d.ts +19 -0
- package/dist/platform/security/source-inheritance.d.ts.map +1 -0
- package/dist/platform/security/source-inheritance.js +87 -0
- package/dist/platform/security/source-inheritance.js.map +1 -0
- package/dist/platform/security/system-identities.d.ts +4 -0
- package/dist/platform/security/system-identities.d.ts.map +1 -0
- package/dist/platform/security/system-identities.js +12 -0
- package/dist/platform/security/system-identities.js.map +1 -0
- package/dist/platform/security/teams.d.ts +15 -0
- package/dist/platform/security/teams.d.ts.map +1 -0
- package/dist/platform/security/teams.js +68 -0
- package/dist/platform/security/teams.js.map +1 -0
- package/dist/platform/security/time.d.ts +4 -0
- package/dist/platform/security/time.d.ts.map +1 -0
- package/dist/platform/security/time.js +26 -0
- package/dist/platform/security/time.js.map +1 -0
- package/dist/platform/security/types.d.ts +12 -0
- package/dist/platform/security/types.d.ts.map +1 -0
- package/dist/platform/security/types.js +6 -0
- package/dist/platform/security/types.js.map +1 -0
- package/dist/platform/trace.d.ts +41 -0
- package/dist/platform/trace.d.ts.map +1 -0
- package/dist/platform/trace.js +46 -0
- package/dist/platform/trace.js.map +1 -0
- package/dist/platform/unlocking.d.ts +27 -0
- package/dist/platform/unlocking.d.ts.map +1 -0
- package/dist/platform/unlocking.js +192 -0
- package/dist/platform/unlocking.js.map +1 -0
- package/dist/platform/values.d.ts +17 -0
- package/dist/platform/values.d.ts.map +1 -0
- package/dist/platform/values.js +105 -0
- package/dist/platform/values.js.map +1 -0
- package/dist/platform/version-policy.d.ts +4 -0
- package/dist/platform/version-policy.d.ts.map +1 -0
- package/dist/platform/version-policy.js +11 -0
- package/dist/platform/version-policy.js.map +1 -0
- package/dist/platform/versioned-request.d.ts +18 -0
- package/dist/platform/versioned-request.d.ts.map +1 -0
- package/dist/platform/versioned-request.js +95 -0
- package/dist/platform/versioned-request.js.map +1 -0
- package/dist/platform/versioning.d.ts +57 -0
- package/dist/platform/versioning.d.ts.map +1 -0
- package/dist/platform/versioning.js +441 -0
- package/dist/platform/versioning.js.map +1 -0
- package/dist/queries/date.d.ts +3 -0
- package/dist/queries/date.d.ts.map +1 -0
- package/dist/queries/date.js +20 -0
- package/dist/queries/date.js.map +1 -0
- package/dist/queries/decimal.d.ts +9 -0
- package/dist/queries/decimal.d.ts.map +1 -0
- package/dist/queries/decimal.js +42 -0
- package/dist/queries/decimal.js.map +1 -0
- package/dist/queries/evaluate.d.ts +9 -0
- package/dist/queries/evaluate.d.ts.map +1 -0
- package/dist/queries/evaluate.js +122 -0
- package/dist/queries/evaluate.js.map +1 -0
- package/dist/queries/lexer.d.ts +14 -0
- package/dist/queries/lexer.d.ts.map +1 -0
- package/dist/queries/lexer.js +87 -0
- package/dist/queries/lexer.js.map +1 -0
- package/dist/queries/like.d.ts +3 -0
- package/dist/queries/like.d.ts.map +1 -0
- package/dist/queries/like.js +35 -0
- package/dist/queries/like.js.map +1 -0
- package/dist/queries/parser.d.ts +28 -0
- package/dist/queries/parser.d.ts.map +1 -0
- package/dist/queries/parser.js +271 -0
- package/dist/queries/parser.js.map +1 -0
- package/dist/queries/predicates.d.ts +7 -0
- package/dist/queries/predicates.d.ts.map +1 -0
- package/dist/queries/predicates.js +62 -0
- package/dist/queries/predicates.js.map +1 -0
- package/dist/queries/types.d.ts +65 -0
- package/dist/queries/types.d.ts.map +1 -0
- package/dist/queries/types.js +25 -0
- package/dist/queries/types.js.map +1 -0
- package/dist/queries/values.d.ts +5 -0
- package/dist/queries/values.d.ts.map +1 -0
- package/dist/queries/values.js +77 -0
- package/dist/queries/values.js.map +1 -0
- package/dist/storage/documents.d.ts +5 -0
- package/dist/storage/documents.d.ts.map +1 -0
- package/dist/storage/documents.js +12 -0
- package/dist/storage/documents.js.map +1 -0
- package/dist/storage/metadata-epoch.d.ts +6 -0
- package/dist/storage/metadata-epoch.d.ts.map +1 -0
- package/dist/storage/metadata-epoch.js +15 -0
- package/dist/storage/metadata-epoch.js.map +1 -0
- package/dist/storage/package-transaction.d.ts +5 -0
- package/dist/storage/package-transaction.d.ts.map +1 -0
- package/dist/storage/package-transaction.js +12 -0
- package/dist/storage/package-transaction.js.map +1 -0
- package/dist/storage/properties.d.ts +4 -0
- package/dist/storage/properties.d.ts.map +1 -0
- package/dist/storage/properties.js +21 -0
- package/dist/storage/properties.js.map +1 -0
- package/dist/storage/sqlite/catalog.d.ts +19 -0
- package/dist/storage/sqlite/catalog.d.ts.map +1 -0
- package/dist/storage/sqlite/catalog.js +62 -0
- package/dist/storage/sqlite/catalog.js.map +1 -0
- package/dist/storage/sqlite/connections.d.ts +5 -0
- package/dist/storage/sqlite/connections.d.ts.map +1 -0
- package/dist/storage/sqlite/connections.js +36 -0
- package/dist/storage/sqlite/connections.js.map +1 -0
- package/dist/storage/sqlite/errors.d.ts +7 -0
- package/dist/storage/sqlite/errors.d.ts.map +1 -0
- package/dist/storage/sqlite/errors.js +9 -0
- package/dist/storage/sqlite/errors.js.map +1 -0
- package/dist/storage/sqlite/index.d.ts +5 -0
- package/dist/storage/sqlite/index.d.ts.map +1 -0
- package/dist/storage/sqlite/index.js +3 -0
- package/dist/storage/sqlite/index.js.map +1 -0
- package/dist/storage/sqlite/metadata.d.ts +8 -0
- package/dist/storage/sqlite/metadata.d.ts.map +1 -0
- package/dist/storage/sqlite/metadata.js +157 -0
- package/dist/storage/sqlite/metadata.js.map +1 -0
- package/dist/storage/sqlite/predicate.d.ts +9 -0
- package/dist/storage/sqlite/predicate.d.ts.map +1 -0
- package/dist/storage/sqlite/predicate.js +214 -0
- package/dist/storage/sqlite/predicate.js.map +1 -0
- package/dist/storage/sqlite/queries.d.ts +12 -0
- package/dist/storage/sqlite/queries.d.ts.map +1 -0
- package/dist/storage/sqlite/queries.js +30 -0
- package/dist/storage/sqlite/queries.js.map +1 -0
- package/dist/storage/sqlite/schema.d.ts +16 -0
- package/dist/storage/sqlite/schema.d.ts.map +1 -0
- package/dist/storage/sqlite/schema.js +197 -0
- package/dist/storage/sqlite/schema.js.map +1 -0
- package/dist/storage/sqlite/statements.d.ts +13 -0
- package/dist/storage/sqlite/statements.d.ts.map +1 -0
- package/dist/storage/sqlite/statements.js +35 -0
- package/dist/storage/sqlite/statements.js.map +1 -0
- package/dist/storage/sqlite/storage.d.ts +61 -0
- package/dist/storage/sqlite/storage.d.ts.map +1 -0
- package/dist/storage/sqlite/storage.js +644 -0
- package/dist/storage/sqlite/storage.js.map +1 -0
- package/dist/storage/sqlite/transactions.d.ts +23 -0
- package/dist/storage/sqlite/transactions.d.ts.map +1 -0
- package/dist/storage/sqlite/transactions.js +84 -0
- package/dist/storage/sqlite/transactions.js.map +1 -0
- package/dist/storage/types.d.ts +62 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +1 -0
- package/dist/storage/types.js.map +1 -0
- package/dist/verification/diagnostics.d.ts +4 -0
- package/dist/verification/diagnostics.d.ts.map +1 -0
- package/dist/verification/diagnostics.js +106 -0
- package/dist/verification/diagnostics.js.map +1 -0
- package/dist/verification/index.d.ts +4 -0
- package/dist/verification/index.d.ts.map +1 -0
- package/dist/verification/index.js +3 -0
- package/dist/verification/index.js.map +1 -0
- package/dist/verification/inspection.d.ts +13 -0
- package/dist/verification/inspection.d.ts.map +1 -0
- package/dist/verification/inspection.js +87 -0
- package/dist/verification/inspection.js.map +1 -0
- package/dist/verification/inventory.d.ts +7 -0
- package/dist/verification/inventory.d.ts.map +1 -0
- package/dist/verification/inventory.js +55 -0
- package/dist/verification/inventory.js.map +1 -0
- package/dist/verification/types.d.ts +53 -0
- package/dist/verification/types.d.ts.map +1 -0
- package/dist/verification/types.js +12 -0
- package/dist/verification/types.js.map +1 -0
- package/dist/verification/verify.d.ts +4 -0
- package/dist/verification/verify.d.ts.map +1 -0
- package/dist/verification/verify.js +69 -0
- package/dist/verification/verify.js.map +1 -0
- package/examples/basic/.harness/fixtures.ts +5 -0
- package/examples/basic/.harness/packages/documents.xml +16 -0
- package/examples/basic/README.md +13 -0
- package/examples/basic/package.json +12 -0
- package/examples/basic/tests/documents.test.ts +19 -0
- package/examples/basic/tsconfig.json +15 -0
- package/examples/server-methods/.harness/fixtures.ts +18 -0
- package/examples/server-methods/.harness/mocks.json +6 -0
- package/examples/server-methods/.harness/packages/review.xml +69 -0
- package/examples/server-methods/README.md +14 -0
- package/examples/server-methods/package.json +12 -0
- package/examples/server-methods/tests/submission.test.ts +60 -0
- package/examples/server-methods/tsconfig.json +15 -0
- package/package.json +106 -5
- package/skills/innovator-harness/SKILL.md +109 -0
- package/skills/innovator-harness/agents/openai.yaml +7 -0
- package/skills/innovator-harness/assets/icon-small.png +0 -0
- package/skills/innovator-harness/assets/icon.png +0 -0
- package/src/baseline/catalog.ts +42 -0
- package/src/baseline/data/item-types.json +1062 -0
- package/src/baseline/data/properties.json +31286 -0
- package/src/baseline/data/records.json +6666 -0
- package/src/baseline/data/relationships.json +393 -0
- package/src/baseline/database.ts +39 -0
- package/src/baseline/source.ts +16 -0
- package/src/compatibility/capabilities.ts +626 -0
- package/src/compatibility/check.ts +483 -0
- package/src/compatibility/executions.ts +120 -0
- package/src/compatibility/executors.ts +180 -0
- package/src/compatibility/index.ts +22 -0
- package/src/compatibility/metadata.ts +219 -0
- package/src/compatibility/mocks.ts +32 -0
- package/src/compatibility/revisions.ts +45 -0
- package/src/compatibility/security.ts +102 -0
- package/src/compatibility/sources.ts +38 -0
- package/src/compatibility/types.ts +153 -0
- package/src/controls/clock.ts +108 -0
- package/src/controls/execution.ts +53 -0
- package/src/controls/failure-types.ts +61 -0
- package/src/controls/failure-validation.ts +99 -0
- package/src/controls/failures.ts +192 -0
- package/src/controls/ids.ts +87 -0
- package/src/controls/observers.ts +107 -0
- package/src/controls/state.ts +91 -0
- package/src/controls/targets.ts +123 -0
- package/src/controls/values.ts +44 -0
- package/src/controls/world.ts +31 -0
- package/src/core/budget.ts +25 -0
- package/src/core/context.ts +68 -0
- package/src/core/data.ts +273 -0
- package/src/core/deadline.ts +47 -0
- package/src/core/errors.ts +32 -0
- package/src/core/files.ts +45 -0
- package/src/core/index.ts +17 -0
- package/src/core/limits.ts +14 -0
- package/src/core/modules.ts +102 -0
- package/src/core/operation.ts +43 -0
- package/src/core/process.ts +55 -0
- package/src/core/resources.ts +34 -0
- package/src/core/runtime.ts +883 -0
- package/src/core/types.ts +80 -0
- package/src/diagnostics/source-location.ts +6 -0
- package/src/engine/instance.ts +428 -0
- package/src/engine.ts +9 -0
- package/src/fixtures/module.ts +182 -0
- package/src/fixtures/types.ts +9 -0
- package/src/harness/configuration.ts +426 -0
- package/src/harness/create.ts +214 -0
- package/src/harness/extensions.ts +86 -0
- package/src/harness/fixtures.ts +186 -0
- package/src/harness/runtime-identity.ts +41 -0
- package/src/harness/setup-cache.ts +56 -0
- package/src/harness/setup-image.ts +155 -0
- package/src/harness/setup-imports.ts +40 -0
- package/src/harness/setup-inputs.ts +80 -0
- package/src/harness/setup-module.ts +118 -0
- package/src/harness/world.ts +248 -0
- package/src/index.ts +84 -0
- package/src/instrumentation/failures.ts +148 -0
- package/src/instrumentation/recorder.ts +547 -0
- package/src/instrumentation/snapshots.ts +247 -0
- package/src/instrumentation/types.ts +126 -0
- package/src/items/codec.ts +198 -0
- package/src/items/item.ts +218 -0
- package/src/items/logical.ts +145 -0
- package/src/items/origins.ts +139 -0
- package/src/items/xml.ts +187 -0
- package/src/methods/csharp/base-input.ts +215 -0
- package/src/methods/csharp/cache.ts +67 -0
- package/src/methods/csharp/callbacks.ts +121 -0
- package/src/methods/csharp/compiler.ts +284 -0
- package/src/methods/csharp/context.ts +88 -0
- package/src/methods/csharp/documents.ts +186 -0
- package/src/methods/csharp/executor.ts +504 -0
- package/src/methods/csharp/index.ts +3 -0
- package/src/methods/csharp/method-build.ts +141 -0
- package/src/methods/csharp/origins.ts +126 -0
- package/src/methods/csharp/protocol.ts +104 -0
- package/src/methods/csharp/relationship-order.ts +76 -0
- package/src/methods/csharp/request-change.ts +349 -0
- package/src/methods/csharp/retained-items.ts +128 -0
- package/src/methods/csharp/security.ts +121 -0
- package/src/methods/csharp/templates.ts +92 -0
- package/src/methods/csharp/worker.ts +234 -0
- package/src/methods/event-data.ts +39 -0
- package/src/methods/types.ts +59 -0
- package/src/mocks/configuration.ts +158 -0
- package/src/mocks/parameters.ts +20 -0
- package/src/mocks/registry.ts +214 -0
- package/src/mocks/response.ts +128 -0
- package/src/mocks/types.ts +56 -0
- package/src/packages/bootstrap.ts +73 -0
- package/src/packages/candidates.ts +55 -0
- package/src/packages/defaults.ts +145 -0
- package/src/packages/diagnostics.ts +47 -0
- package/src/packages/draft.ts +280 -0
- package/src/packages/elements.ts +88 -0
- package/src/packages/evaluation.ts +89 -0
- package/src/packages/files.ts +332 -0
- package/src/packages/importer.ts +1257 -0
- package/src/packages/index.ts +7 -0
- package/src/packages/manifest.ts +158 -0
- package/src/packages/module.ts +36 -0
- package/src/packages/parser.ts +367 -0
- package/src/packages/plan.ts +872 -0
- package/src/packages/schema.ts +617 -0
- package/src/packages/selector.ts +104 -0
- package/src/packages/state.ts +82 -0
- package/src/packages/types.ts +25 -0
- package/src/platform/action-responses.ts +127 -0
- package/src/platform/actions.ts +11 -0
- package/src/platform/catalog.ts +220 -0
- package/src/platform/classifications.ts +165 -0
- package/src/platform/creation.ts +37 -0
- package/src/platform/engine.ts +2055 -0
- package/src/platform/errors.ts +39 -0
- package/src/platform/events/after.ts +149 -0
- package/src/platform/events/base-updates.ts +68 -0
- package/src/platform/events/bindings.ts +129 -0
- package/src/platform/events/data.ts +26 -0
- package/src/platform/events/inheritance.ts +98 -0
- package/src/platform/events/input.ts +12 -0
- package/src/platform/events/replacement.ts +109 -0
- package/src/platform/events/types.ts +56 -0
- package/src/platform/events/version.ts +38 -0
- package/src/platform/graph-actions.ts +198 -0
- package/src/platform/lifecycle.ts +549 -0
- package/src/platform/locks.ts +251 -0
- package/src/platform/projection.ts +262 -0
- package/src/platform/queries/conditions.ts +69 -0
- package/src/platform/queries/engine.ts +69 -0
- package/src/platform/queries/fields.ts +160 -0
- package/src/platform/queries/order.ts +105 -0
- package/src/platform/queries/paging.ts +66 -0
- package/src/platform/queries/planner.ts +244 -0
- package/src/platform/queries/relationships.ts +130 -0
- package/src/platform/queries/validation.ts +105 -0
- package/src/platform/query.ts +178 -0
- package/src/platform/references/behavior.ts +36 -0
- package/src/platform/references/catalog.ts +256 -0
- package/src/platform/references/deletion.ts +130 -0
- package/src/platform/references/maintenance.ts +175 -0
- package/src/platform/references/policy.ts +115 -0
- package/src/platform/references/sessions.ts +148 -0
- package/src/platform/relationship-copy-policy.ts +66 -0
- package/src/platform/relationship-copy.ts +218 -0
- package/src/platform/relationship-type.ts +23 -0
- package/src/platform/request.ts +139 -0
- package/src/platform/revisions/policy.ts +126 -0
- package/src/platform/revisions/sequences.ts +67 -0
- package/src/platform/security/grants.ts +116 -0
- package/src/platform/security/identities.ts +136 -0
- package/src/platform/security/inherited-relationships.ts +103 -0
- package/src/platform/security/method-execution.ts +34 -0
- package/src/platform/security/permissions.ts +337 -0
- package/src/platform/security/policy.ts +286 -0
- package/src/platform/security/source-access.ts +148 -0
- package/src/platform/security/source-inheritance.ts +134 -0
- package/src/platform/security/system-identities.ts +16 -0
- package/src/platform/security/teams.ts +100 -0
- package/src/platform/security/time.ts +30 -0
- package/src/platform/security/types.ts +17 -0
- package/src/platform/trace.ts +111 -0
- package/src/platform/unlocking.ts +295 -0
- package/src/platform/values.ts +217 -0
- package/src/platform/version-policy.ts +17 -0
- package/src/platform/versioned-request.ts +154 -0
- package/src/platform/versioning.ts +798 -0
- package/src/queries/date.ts +28 -0
- package/src/queries/decimal.ts +59 -0
- package/src/queries/evaluate.ts +168 -0
- package/src/queries/lexer.ts +109 -0
- package/src/queries/like.ts +47 -0
- package/src/queries/parser.ts +352 -0
- package/src/queries/predicates.ts +85 -0
- package/src/queries/types.ts +82 -0
- package/src/queries/values.ts +104 -0
- package/src/storage/documents.ts +20 -0
- package/src/storage/metadata-epoch.ts +20 -0
- package/src/storage/package-transaction.ts +25 -0
- package/src/storage/properties.ts +31 -0
- package/src/storage/sqlite/catalog.ts +89 -0
- package/src/storage/sqlite/connections.ts +49 -0
- package/src/storage/sqlite/errors.ts +23 -0
- package/src/storage/sqlite/index.ts +13 -0
- package/src/storage/sqlite/metadata.ts +216 -0
- package/src/storage/sqlite/predicate.ts +301 -0
- package/src/storage/sqlite/queries.ts +48 -0
- package/src/storage/sqlite/schema.ts +288 -0
- package/src/storage/sqlite/statements.ts +51 -0
- package/src/storage/sqlite/storage.ts +949 -0
- package/src/storage/sqlite/transactions.ts +108 -0
- package/src/storage/types.ts +69 -0
- package/src/verification/diagnostics.ts +124 -0
- package/src/verification/index.ts +10 -0
- package/src/verification/inspection.ts +108 -0
- package/src/verification/inventory.ts +76 -0
- package/src/verification/types.ts +61 -0
- package/src/verification/verify.ts +11 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { assertDataTree } from "../../core/data.js";
|
|
2
|
+
import { dataNodesMax } from "../../core/limits.js";
|
|
3
|
+
import { decodePayload, object } from "../../items/codec.js";
|
|
4
|
+
import type { ItemPayload } from "../../items/item.js";
|
|
5
|
+
import { bindItemOrigin, itemNodes, itemOrigin } from "../../items/origins.js";
|
|
6
|
+
import { PlatformError } from "../../platform/errors.js";
|
|
7
|
+
|
|
8
|
+
export interface OriginFrame {
|
|
9
|
+
readonly scope: string;
|
|
10
|
+
readonly tokens: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Tokens are local to one managed invocation; opaque Item origins survive ordinary clones. */
|
|
14
|
+
export class ManagedOrigins {
|
|
15
|
+
private readonly scope = crypto.randomUUID();
|
|
16
|
+
private readonly tokens = new Map<symbol, string>();
|
|
17
|
+
private readonly origins = new Map<string, symbol>();
|
|
18
|
+
private nextToken = 0;
|
|
19
|
+
|
|
20
|
+
capture(payload: ItemPayload): OriginFrame {
|
|
21
|
+
assertDataTree(payload);
|
|
22
|
+
const result: string[] = [];
|
|
23
|
+
const used = new Set<symbol>();
|
|
24
|
+
|
|
25
|
+
for (const node of itemNodes(payload)) {
|
|
26
|
+
const origin = itemOrigin(node) ?? Symbol("pending Item");
|
|
27
|
+
|
|
28
|
+
if (used.has(origin)) {
|
|
29
|
+
throw new PlatformError("InvalidProtocol", "An Item origin occurs more than once.");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
used.add(origin);
|
|
33
|
+
bindItemOrigin(node, origin);
|
|
34
|
+
let token = this.tokens.get(origin);
|
|
35
|
+
|
|
36
|
+
if (token === undefined) {
|
|
37
|
+
token = `b${++this.nextToken}`;
|
|
38
|
+
this.remember(token, origin);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
result.push(token);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return { scope: this.scope, tokens: result };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
decode(value: unknown, frame: unknown): ItemPayload {
|
|
48
|
+
const payload = decodePayload(value);
|
|
49
|
+
this.bind(payload, frame);
|
|
50
|
+
|
|
51
|
+
return payload;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
bind(payload: ItemPayload, frame: unknown): void {
|
|
55
|
+
if (!object(frame) || frame.scope !== this.scope) {
|
|
56
|
+
throw new PlatformError(
|
|
57
|
+
"InvalidProtocol",
|
|
58
|
+
"Managed Item origins belong to another invocation.",
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const tokens = frame.tokens;
|
|
63
|
+
|
|
64
|
+
if (!Array.isArray(tokens) || tokens.length > dataNodesMax) {
|
|
65
|
+
throw new PlatformError(
|
|
66
|
+
"InvalidProtocol",
|
|
67
|
+
"Managed Item origins must be a bounded list.",
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const used = new Set<string>();
|
|
72
|
+
let index = 0;
|
|
73
|
+
|
|
74
|
+
for (const node of itemNodes(payload)) {
|
|
75
|
+
const token: unknown = tokens[index++];
|
|
76
|
+
|
|
77
|
+
if (
|
|
78
|
+
typeof token !== "string" ||
|
|
79
|
+
!/^[bm][1-9]\d{0,6}$/.test(token) ||
|
|
80
|
+
Number(token.slice(1)) > dataNodesMax ||
|
|
81
|
+
used.has(token)
|
|
82
|
+
) {
|
|
83
|
+
throw new PlatformError(
|
|
84
|
+
"InvalidProtocol",
|
|
85
|
+
"Managed Item origins are missing or duplicated.",
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
used.add(token);
|
|
90
|
+
let origin = this.origins.get(token);
|
|
91
|
+
|
|
92
|
+
if (origin === undefined) {
|
|
93
|
+
if (token.startsWith("b")) {
|
|
94
|
+
throw new PlatformError(
|
|
95
|
+
"InvalidProtocol",
|
|
96
|
+
"Managed Item origin belongs to another invocation.",
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
origin = Symbol("managed Item");
|
|
101
|
+
this.remember(token, origin);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
bindItemOrigin(node, origin);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (index !== tokens.length) {
|
|
108
|
+
throw new PlatformError(
|
|
109
|
+
"InvalidProtocol",
|
|
110
|
+
"Managed Item origins do not match the payload.",
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
private remember(token: string, origin: symbol): void {
|
|
116
|
+
if (this.origins.size >= dataNodesMax) {
|
|
117
|
+
throw new PlatformError(
|
|
118
|
+
"ProtocolLimit",
|
|
119
|
+
"Managed Item origins exceed their invocation limit.",
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
this.tokens.set(origin, token);
|
|
124
|
+
this.origins.set(token, origin);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { ReadableStreamDefaultReader } from "node:stream/web";
|
|
2
|
+
|
|
3
|
+
import { assertDataTree, parseFrozenJson } from "../../core/data.js";
|
|
4
|
+
import { object } from "../../items/codec.js";
|
|
5
|
+
import { PlatformError } from "../../platform/errors.js";
|
|
6
|
+
|
|
7
|
+
export const messageBytesMax = 8 * 1024 * 1024;
|
|
8
|
+
export const pendingCallsMax = 128;
|
|
9
|
+
const encoder = new TextEncoder();
|
|
10
|
+
|
|
11
|
+
export function encodeMessage(message: unknown): Uint8Array {
|
|
12
|
+
assertDataTree(message);
|
|
13
|
+
const bytes = encoder.encode(`${JSON.stringify(message)}\n`);
|
|
14
|
+
|
|
15
|
+
if (bytes.length > messageBytesMax) {
|
|
16
|
+
throw new PlatformError("ProtocolLimit", "C# message exceeds the 8 MiB limit.");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return bytes;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** The byte budget applies to each frame, including when one pipe chunk contains many frames. */
|
|
23
|
+
export async function readMessages(
|
|
24
|
+
stream: ReadableStream<Uint8Array>,
|
|
25
|
+
receive: (message: Record<string, unknown>) => void,
|
|
26
|
+
readWhenActive?: () => boolean | Promise<boolean>,
|
|
27
|
+
): Promise<void> {
|
|
28
|
+
const decoder = new MessageDecoder();
|
|
29
|
+
let reader: ReadableStreamDefaultReader<Uint8Array> | undefined;
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
while (true) {
|
|
33
|
+
const active = readWhenActive?.() ?? true;
|
|
34
|
+
|
|
35
|
+
if (typeof active !== "boolean") {
|
|
36
|
+
reader?.releaseLock();
|
|
37
|
+
reader = undefined;
|
|
38
|
+
|
|
39
|
+
if (!(await active)) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
} else if (!active) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
reader ??= stream.getReader();
|
|
47
|
+
const chunk = await reader.read();
|
|
48
|
+
|
|
49
|
+
if (chunk.done) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
decoder.push(chunk.value, receive);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
decoder.finish();
|
|
57
|
+
} finally {
|
|
58
|
+
reader?.releaseLock();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
class MessageDecoder {
|
|
63
|
+
private readonly decoder = new TextDecoder("utf-8", { fatal: true });
|
|
64
|
+
private buffer = "";
|
|
65
|
+
|
|
66
|
+
push(bytes: Uint8Array, receive: (message: Record<string, unknown>) => void): void {
|
|
67
|
+
this.buffer += this.decoder.decode(bytes, { stream: true });
|
|
68
|
+
let newline = this.buffer.indexOf("\n");
|
|
69
|
+
|
|
70
|
+
while (newline >= 0) {
|
|
71
|
+
const line = this.buffer.slice(0, newline);
|
|
72
|
+
assertMessageSize(line);
|
|
73
|
+
const message = parseFrozenJson(line);
|
|
74
|
+
|
|
75
|
+
if (
|
|
76
|
+
!object(message) ||
|
|
77
|
+
typeof message.kind !== "string" ||
|
|
78
|
+
typeof message.id !== "string"
|
|
79
|
+
) {
|
|
80
|
+
throw new PlatformError("InvalidProtocol", "Invalid C# worker message.");
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
receive(message);
|
|
84
|
+
this.buffer = this.buffer.slice(newline + 1);
|
|
85
|
+
newline = this.buffer.indexOf("\n");
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
assertMessageSize(this.buffer);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
finish(): void {
|
|
92
|
+
this.buffer += this.decoder.decode();
|
|
93
|
+
|
|
94
|
+
if (this.buffer.length > 0) {
|
|
95
|
+
throw new PlatformError("InvalidProtocol", "C# worker stopped inside a message.");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function assertMessageSize(value: string): void {
|
|
101
|
+
if (value.length > messageBytesMax || encoder.encode(value).length > messageBytesMax) {
|
|
102
|
+
throw new PlatformError("ProtocolLimit", "C# worker message exceeds the 8 MiB limit.");
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { dataNodesMax } from "../../core/limits.js";
|
|
2
|
+
import type { ItemNode } from "../../items/item.js";
|
|
3
|
+
import { itemOrigin } from "../../items/origins.js";
|
|
4
|
+
import { PlatformError } from "../../platform/errors.js";
|
|
5
|
+
|
|
6
|
+
export interface RelationshipPosition {
|
|
7
|
+
readonly before?: number;
|
|
8
|
+
readonly after?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Only pending node origins establish XML identity; business IDs and values can repeat. */
|
|
12
|
+
export function relationshipOrder(
|
|
13
|
+
before: readonly ItemNode[],
|
|
14
|
+
after: readonly ItemNode[],
|
|
15
|
+
): readonly RelationshipPosition[] {
|
|
16
|
+
if (before.length > dataNodesMax || after.length > dataNodesMax) {
|
|
17
|
+
throw new PlatformError("ProtocolLimit", "Relationship origins exceed their node limit.");
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const origins = originalPositions(before);
|
|
21
|
+
const seen = new Set<symbol>();
|
|
22
|
+
const used = new Set<number>();
|
|
23
|
+
const result: RelationshipPosition[] = [];
|
|
24
|
+
|
|
25
|
+
for (const [index, node] of after.entries()) {
|
|
26
|
+
const origin = itemOrigin(node);
|
|
27
|
+
|
|
28
|
+
if (origin !== undefined) {
|
|
29
|
+
if (seen.has(origin)) {
|
|
30
|
+
throw new PlatformError("InvalidProtocol", "A relationship origin is duplicated.");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
seen.add(origin);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const previous = origin === undefined ? undefined : origins.get(origin);
|
|
37
|
+
|
|
38
|
+
if (previous === undefined) {
|
|
39
|
+
result.push({ after: index });
|
|
40
|
+
} else {
|
|
41
|
+
used.add(previous);
|
|
42
|
+
result.push({ before: previous, after: index });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
for (let index = 0; index < before.length; index += 1) {
|
|
47
|
+
if (!used.has(index)) {
|
|
48
|
+
result.push({ before: index });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function originalPositions(before: readonly ItemNode[]): ReadonlyMap<symbol, number> {
|
|
56
|
+
const result = new Map<symbol, number>();
|
|
57
|
+
|
|
58
|
+
for (const [index, node] of before.entries()) {
|
|
59
|
+
const origin = itemOrigin(node);
|
|
60
|
+
|
|
61
|
+
if (origin === undefined) {
|
|
62
|
+
throw new PlatformError(
|
|
63
|
+
"UnsupportedRequestIdentity",
|
|
64
|
+
"Untracked relationship requests require native node identity.",
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (result.has(origin)) {
|
|
69
|
+
throw new PlatformError("InvalidProtocol", "A relationship origin is duplicated.");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
result.set(origin, index);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { getOwn, setOwn } from "../../core/data.js";
|
|
2
|
+
import { dataDepthMax, dataNodesMax } from "../../core/limits.js";
|
|
3
|
+
import type { ItemNode } from "../../items/item.js";
|
|
4
|
+
import { itemOrigin } from "../../items/origins.js";
|
|
5
|
+
import { PlatformError } from "../../platform/errors.js";
|
|
6
|
+
import { relationshipOrder } from "./relationship-order.js";
|
|
7
|
+
import type { RelationshipPosition } from "./relationship-order.js";
|
|
8
|
+
|
|
9
|
+
interface RequestNode {
|
|
10
|
+
readonly type: string;
|
|
11
|
+
attributes?: ItemNode["attributes"];
|
|
12
|
+
properties?: ItemNode["properties"];
|
|
13
|
+
propertyAttributes?: ItemNode["propertyAttributes"];
|
|
14
|
+
propertyItems?: Record<string, RequestNode>;
|
|
15
|
+
relationships?: RequestNode[];
|
|
16
|
+
logical?: ItemNode["logical"];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface RequestChange {
|
|
20
|
+
readonly before: RequestNode;
|
|
21
|
+
readonly after: RequestNode;
|
|
22
|
+
readonly alignment?: RequestAlignment;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface RequestAlignment {
|
|
26
|
+
replaceItem?: true;
|
|
27
|
+
properties?: Record<string, RequestAlignment>;
|
|
28
|
+
relationships?: readonly (RelationshipPosition & { readonly alignment?: RequestAlignment })[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface Difference {
|
|
32
|
+
readonly before: RequestNode;
|
|
33
|
+
readonly after: RequestNode;
|
|
34
|
+
alignment?: RequestAlignment;
|
|
35
|
+
changed: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface Frame {
|
|
39
|
+
readonly before: ItemNode;
|
|
40
|
+
readonly after: ItemNode;
|
|
41
|
+
readonly result: Difference;
|
|
42
|
+
readonly properties: { readonly name: string; readonly result: Difference }[];
|
|
43
|
+
readonly relationships: Difference[];
|
|
44
|
+
readonly depth: number;
|
|
45
|
+
order?: readonly RelationshipPosition[];
|
|
46
|
+
finish: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Carry changes only: unchanged business values must not multiply the callback byte budget. */
|
|
50
|
+
export function requestDifference(before: ItemNode, after: ItemNode): RequestChange | undefined {
|
|
51
|
+
assertPreservedOrigin(before, after, "request root");
|
|
52
|
+
const root = createFrame(before, after, 0);
|
|
53
|
+
const pending = [root];
|
|
54
|
+
let visited = 0;
|
|
55
|
+
|
|
56
|
+
while (pending.length > 0) {
|
|
57
|
+
const current = pending.pop();
|
|
58
|
+
|
|
59
|
+
if (
|
|
60
|
+
!current ||
|
|
61
|
+
(!current.finish && ++visited > dataNodesMax) ||
|
|
62
|
+
current.depth > dataDepthMax ||
|
|
63
|
+
pending.length > dataNodesMax
|
|
64
|
+
) {
|
|
65
|
+
throw new PlatformError(
|
|
66
|
+
"ProtocolLimit",
|
|
67
|
+
"Native request changes exceed their tree budget.",
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (current.finish) {
|
|
72
|
+
completeFrame(current);
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
compareFields(current);
|
|
77
|
+
current.finish = true;
|
|
78
|
+
pending.push(current);
|
|
79
|
+
comparePropertyItems(current, pending);
|
|
80
|
+
compareRelationships(current, pending);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return root.result.changed
|
|
84
|
+
? {
|
|
85
|
+
before: root.result.before,
|
|
86
|
+
after: root.result.after,
|
|
87
|
+
...(root.result.alignment ? { alignment: root.result.alignment } : {}),
|
|
88
|
+
}
|
|
89
|
+
: undefined;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function createFrame(before: ItemNode, after: ItemNode, depth: number): Frame {
|
|
93
|
+
return {
|
|
94
|
+
before,
|
|
95
|
+
after,
|
|
96
|
+
depth,
|
|
97
|
+
result: {
|
|
98
|
+
before: { type: before.type },
|
|
99
|
+
after: { type: after.type },
|
|
100
|
+
changed: before.type !== after.type,
|
|
101
|
+
},
|
|
102
|
+
properties: [],
|
|
103
|
+
relationships: [],
|
|
104
|
+
finish: false,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function compareFields(current: Frame): void {
|
|
109
|
+
const { before, after, result } = current;
|
|
110
|
+
const attributes = compareValues(before.attributes, after.attributes);
|
|
111
|
+
const properties = compareValues(before.properties, after.properties);
|
|
112
|
+
const propertyAttributes = compareValues(before.propertyAttributes, after.propertyAttributes);
|
|
113
|
+
result.before.attributes = attributes.before;
|
|
114
|
+
result.after.attributes = attributes.after;
|
|
115
|
+
result.before.properties = properties.before;
|
|
116
|
+
result.after.properties = properties.after;
|
|
117
|
+
result.before.propertyAttributes = propertyAttributes.before;
|
|
118
|
+
result.after.propertyAttributes = propertyAttributes.after;
|
|
119
|
+
result.changed ||= attributes.changed || properties.changed || propertyAttributes.changed;
|
|
120
|
+
|
|
121
|
+
for (const name of new Set([
|
|
122
|
+
...Object.keys(propertyAttributes.before),
|
|
123
|
+
...Object.keys(propertyAttributes.after),
|
|
124
|
+
])) {
|
|
125
|
+
const previous = getOwn(before.properties, name);
|
|
126
|
+
const next = getOwn(after.properties, name);
|
|
127
|
+
|
|
128
|
+
if (previous !== undefined) {
|
|
129
|
+
setOwn(properties.before, name, previous);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (next !== undefined) {
|
|
133
|
+
setOwn(properties.after, name, next);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (!Bun.deepEquals(before.logical, after.logical)) {
|
|
138
|
+
result.before.logical = before.logical;
|
|
139
|
+
result.after.logical = after.logical;
|
|
140
|
+
// Implicit logical groups can repeat scalar and Item-valued property names.
|
|
141
|
+
result.before.properties = { ...before.properties };
|
|
142
|
+
result.after.properties = { ...after.properties };
|
|
143
|
+
result.before.propertyAttributes = { ...before.propertyAttributes };
|
|
144
|
+
result.after.propertyAttributes = { ...after.propertyAttributes };
|
|
145
|
+
result.before.propertyItems = { ...before.propertyItems };
|
|
146
|
+
result.after.propertyItems = { ...after.propertyItems };
|
|
147
|
+
result.changed = true;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function compareValues<Value>(
|
|
152
|
+
before: Readonly<Record<string, Value>>,
|
|
153
|
+
after: Readonly<Record<string, Value>>,
|
|
154
|
+
) {
|
|
155
|
+
const previous: Record<string, Value> = {};
|
|
156
|
+
const next: Record<string, Value> = {};
|
|
157
|
+
let changed = false;
|
|
158
|
+
|
|
159
|
+
for (const name of new Set([...Object.keys(before), ...Object.keys(after)])) {
|
|
160
|
+
const left = getOwn(before, name);
|
|
161
|
+
const right = getOwn(after, name);
|
|
162
|
+
|
|
163
|
+
if (Bun.deepEquals(left, right)) {
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (left !== undefined) {
|
|
168
|
+
setOwn(previous, name, left);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (right !== undefined) {
|
|
172
|
+
setOwn(next, name, right);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
changed = true;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return { before: previous, after: next, changed };
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function comparePropertyItems(current: Frame, pending: Frame[]): void {
|
|
182
|
+
const { before, after, result } = current;
|
|
183
|
+
|
|
184
|
+
for (const name of new Set([
|
|
185
|
+
...Object.keys(before.propertyItems),
|
|
186
|
+
...Object.keys(after.propertyItems),
|
|
187
|
+
])) {
|
|
188
|
+
const previous = getOwn(before.propertyItems, name);
|
|
189
|
+
const next = getOwn(after.propertyItems, name);
|
|
190
|
+
|
|
191
|
+
if (previous && next) {
|
|
192
|
+
const origin = itemOrigin(previous);
|
|
193
|
+
|
|
194
|
+
if (origin !== undefined && origin !== itemOrigin(next)) {
|
|
195
|
+
replacePropertyItem(current, name, previous, next);
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const child = createFrame(previous, next, current.depth + 1);
|
|
200
|
+
current.properties.push({ name, result: child.result });
|
|
201
|
+
pending.push(child);
|
|
202
|
+
} else {
|
|
203
|
+
if (previous) {
|
|
204
|
+
result.before.propertyItems ??= {};
|
|
205
|
+
setOwn(result.before.propertyItems, name, { type: previous.type });
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (next) {
|
|
209
|
+
result.after.propertyItems ??= {};
|
|
210
|
+
setOwn(result.after.propertyItems, name, next);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
result.changed = true;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function replacePropertyItem(
|
|
219
|
+
{ result }: Frame,
|
|
220
|
+
name: string,
|
|
221
|
+
before: ItemNode,
|
|
222
|
+
after: ItemNode,
|
|
223
|
+
): void {
|
|
224
|
+
result.before.propertyItems ??= {};
|
|
225
|
+
result.after.propertyItems ??= {};
|
|
226
|
+
setOwn(result.before.propertyItems, name, { type: before.type });
|
|
227
|
+
setOwn(result.after.propertyItems, name, after);
|
|
228
|
+
result.alignment ??= {};
|
|
229
|
+
result.alignment.properties ??= {};
|
|
230
|
+
setOwn(result.alignment.properties, name, { replaceItem: true });
|
|
231
|
+
result.changed = true;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function assertPreservedOrigin(before: ItemNode, after: ItemNode, location: string): void {
|
|
235
|
+
const origin = itemOrigin(before);
|
|
236
|
+
|
|
237
|
+
if (origin !== undefined && origin !== itemOrigin(after)) {
|
|
238
|
+
throw new PlatformError(
|
|
239
|
+
"UnsupportedRequestIdentity",
|
|
240
|
+
`Replacing the native ${location} requires a qualified DOM replacement profile.`,
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
function compareRelationships(current: Frame, pending: Frame[]): void {
|
|
246
|
+
const { before, after, result } = current;
|
|
247
|
+
const previous: RequestNode[] = before.relationships.map((node) => ({ type: node.type }));
|
|
248
|
+
const next: RequestNode[] = [...after.relationships];
|
|
249
|
+
const order = relationshipOrder(before.relationships, after.relationships);
|
|
250
|
+
current.order = order;
|
|
251
|
+
|
|
252
|
+
for (const position of order) {
|
|
253
|
+
const left =
|
|
254
|
+
position.before === undefined ? undefined : before.relationships[position.before];
|
|
255
|
+
const right =
|
|
256
|
+
position.after === undefined ? undefined : after.relationships[position.after];
|
|
257
|
+
|
|
258
|
+
if (left && right && position.before !== undefined && position.after !== undefined) {
|
|
259
|
+
const child = createFrame(left, right, current.depth + 1);
|
|
260
|
+
current.relationships.push(child.result);
|
|
261
|
+
previous[position.before] = child.result.before;
|
|
262
|
+
next[position.after] = child.result.after;
|
|
263
|
+
pending.push(child);
|
|
264
|
+
} else {
|
|
265
|
+
result.changed = true;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
result.before.relationships = previous;
|
|
270
|
+
result.after.relationships = next;
|
|
271
|
+
|
|
272
|
+
if (Object.hasOwn(before.propertyAttributes, "Relationships")) {
|
|
273
|
+
result.before.propertyAttributes ??= {};
|
|
274
|
+
setOwn(result.before.propertyAttributes, "Relationships", {});
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (Object.hasOwn(after.propertyAttributes, "Relationships")) {
|
|
278
|
+
result.after.propertyAttributes ??= {};
|
|
279
|
+
setOwn(result.after.propertyAttributes, "Relationships", {});
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function completeFrame(current: Frame): void {
|
|
284
|
+
const { result } = current;
|
|
285
|
+
|
|
286
|
+
for (const child of current.properties) {
|
|
287
|
+
if (
|
|
288
|
+
child.result.changed ||
|
|
289
|
+
Object.hasOwn(result.before.propertyAttributes ?? {}, child.name) ||
|
|
290
|
+
Object.hasOwn(result.after.propertyAttributes ?? {}, child.name)
|
|
291
|
+
) {
|
|
292
|
+
result.before.propertyItems ??= {};
|
|
293
|
+
result.after.propertyItems ??= {};
|
|
294
|
+
setOwn(result.before.propertyItems, child.name, child.result.before);
|
|
295
|
+
setOwn(result.after.propertyItems, child.name, child.result.after);
|
|
296
|
+
result.changed = true;
|
|
297
|
+
|
|
298
|
+
if (child.result.alignment) {
|
|
299
|
+
result.alignment ??= {};
|
|
300
|
+
result.alignment.properties ??= {};
|
|
301
|
+
setOwn(result.alignment.properties, child.name, child.result.alignment);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (
|
|
307
|
+
current.relationships.some((child) => child.changed) ||
|
|
308
|
+
current.order?.some((position) => position.before !== position.after)
|
|
309
|
+
) {
|
|
310
|
+
result.changed = true;
|
|
311
|
+
result.alignment ??= {};
|
|
312
|
+
let matched = 0;
|
|
313
|
+
result.alignment.relationships = (current.order ?? []).map((position) => {
|
|
314
|
+
const child =
|
|
315
|
+
position.before === undefined || position.after === undefined
|
|
316
|
+
? undefined
|
|
317
|
+
: current.relationships[matched++];
|
|
318
|
+
|
|
319
|
+
return child?.alignment ? { ...position, alignment: child.alignment } : position;
|
|
320
|
+
});
|
|
321
|
+
} else if (current.before.relationships.length === current.after.relationships.length) {
|
|
322
|
+
delete result.before.relationships;
|
|
323
|
+
delete result.after.relationships;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
compactNode(result.before);
|
|
327
|
+
compactNode(result.after);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
function compactNode(node: RequestNode): void {
|
|
331
|
+
const fields: readonly (
|
|
332
|
+
| "attributes"
|
|
333
|
+
| "properties"
|
|
334
|
+
| "propertyAttributes"
|
|
335
|
+
| "propertyItems"
|
|
336
|
+
)[] = ["attributes", "properties", "propertyAttributes", "propertyItems"];
|
|
337
|
+
|
|
338
|
+
for (const name of fields) {
|
|
339
|
+
const values = node[name];
|
|
340
|
+
|
|
341
|
+
if (values && Object.keys(values).length === 0) {
|
|
342
|
+
delete node[name];
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
if (node.relationships?.length === 0) {
|
|
347
|
+
delete node.relationships;
|
|
348
|
+
}
|
|
349
|
+
}
|