ark-runtime-kernel 1.5.0 → 1.6.0

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.
@@ -1527,7 +1527,7 @@ function createArchitectureProfile(options) {
1527
1527
  layers,
1528
1528
  rules,
1529
1529
  resolveLayer(name) {
1530
- return sortedLayers.find(
1530
+ return layers.find((layer) => layer.match?.(name))?.name ?? sortedLayers.find(
1531
1531
  (layer) => layer.prefixes.some((prefix) => name.startsWith(prefix))
1532
1532
  )?.name;
1533
1533
  }
@@ -1621,7 +1621,7 @@ var elevenLayerProfile = createArchitectureProfile({
1621
1621
  var MANIFEST_SCHEMA_VERSION = "1.0";
1622
1622
 
1623
1623
  // src/version.ts
1624
- var version = "1.5.0";
1624
+ var version = "1.6.0";
1625
1625
 
1626
1626
  // src/kernel/manifest/createArkManifest.ts
1627
1627
  function policyId(name) {
@@ -2177,6 +2177,7 @@ function createWorkflowEngine(bus, options) {
2177
2177
  }
2178
2178
 
2179
2179
  // src/kernel/runtime/createArkKernel.ts
2180
+ var DEFAULT_MAX_HISTORY_SIZE = 1e3;
2180
2181
  var kernelSequence = 0;
2181
2182
  function nextKernelInstanceId() {
2182
2183
  kernelSequence += 1;
@@ -2186,10 +2187,11 @@ function createArkKernel(options = {}) {
2186
2187
  const strict = options.strict ?? true;
2187
2188
  const instanceId = options.instanceId ?? nextKernelInstanceId();
2188
2189
  const profile = options.profile ?? elevenLayerProfile;
2190
+ const maxHistorySize = options.maxHistorySize ?? DEFAULT_MAX_HISTORY_SIZE;
2189
2191
  const registry = createIntentRegistry();
2190
2192
  const graph = createDependencyGraph();
2191
2193
  const metadata = options.metadata ?? createMetadataRegistry();
2192
- const auditTrail = options.auditTrail ?? createAuditTrail({ maxRecords: options.maxHistorySize });
2194
+ const auditTrail = options.auditTrail ?? createAuditTrail({ maxRecords: maxHistorySize });
2193
2195
  const eventContracts = options.eventContracts ?? createEventContractRegistry();
2194
2196
  const outbox = options.outbox ?? new InMemoryOutboxStore();
2195
2197
  const projections = options.projections ?? createProjectionRegistry({ auditTrail });
@@ -2214,7 +2216,7 @@ function createArkKernel(options = {}) {
2214
2216
  enforceObservedLayerFlow: options.enforceObservedLayerFlow ?? (strict ? "hard" : "off"),
2215
2217
  outbox,
2216
2218
  instanceId,
2217
- maxHistorySize: options.maxHistorySize,
2219
+ maxHistorySize,
2218
2220
  onPublish: options.autoApplyProjections === false ? void 0 : async (event) => {
2219
2221
  await projections.apply(event);
2220
2222
  }