@smthrs/plan 1.0.0-rc.12 → 1.0.0-rc.14

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@smthrs/plan",
3
3
  "type": "module",
4
- "version": "1.0.0-rc.12",
4
+ "version": "1.0.0-rc.14",
5
5
  "license": "MIT",
6
6
  "smthrs": {
7
7
  "group": "engine"
@@ -218,19 +218,19 @@
218
218
  "tag": "next"
219
219
  },
220
220
  "dependencies": {
221
- "@smthrs/crypto": "1.0.0-rc.12",
222
- "@smthrs/keys": "1.0.0-rc.12",
223
- "@smthrs/canonical": "1.0.0-rc.12"
221
+ "@smthrs/crypto": "1.0.0-rc.14",
222
+ "@smthrs/keys": "1.0.0-rc.14",
223
+ "@smthrs/canonical": "1.0.0-rc.14"
224
224
  },
225
225
  "devDependencies": {
226
226
  "@effect/language-service": "0.87.2",
227
- "@effect/platform-node": "4.0.4",
228
- "@effect/vitest": "4.0.4",
227
+ "@effect/platform-node": "4.0.5",
228
+ "@effect/vitest": "4.0.5",
229
229
  "@eslint/js": "9.39.5",
230
230
  "@types/node": "26.4.1",
231
231
  "@vitest/coverage-v8": "5.0.0",
232
232
  "dprint": "0.57.1",
233
- "effect": "4.0.4",
233
+ "effect": "4.0.5",
234
234
  "esbuild": "0.28.2",
235
235
  "eslint": "9.39.5",
236
236
  "eslint-import-resolver-typescript": "4.4.5",
@@ -244,7 +244,7 @@
244
244
  "fast-check": "4.9.0"
245
245
  },
246
246
  "peerDependencies": {
247
- "effect": "^4.0.4"
247
+ "effect": "4.0.5"
248
248
  },
249
249
  "scripts": {
250
250
  "lint": "eslint src --max-warnings=0 && dprint check",
package/src/Node.ts CHANGED
@@ -539,9 +539,14 @@ export const bindPlanned: {
539
539
  )
540
540
  )
541
541
 
542
- // Arm builders run before the graph walker can enforce its topology bound.
543
- // Leave native stack headroom to construct the typed refusal and unwind.
544
- const maximumArmDepth = 512
542
+ /**
543
+ * Maximum eagerly nested branch arms. Arm construction precedes graph walking;
544
+ * this bound leaves native stack headroom for a typed refusal.
545
+ *
546
+ * @since 1.0.0
547
+ * @category constants
548
+ */
549
+ export const maximumArmDepth = 512
545
550
  let armDepth = 0
546
551
 
547
552
  /**
@@ -301,6 +301,8 @@ export interface FunctionIdentity {
301
301
  readonly _tag: "FunctionIdentity"
302
302
  readonly algorithm: IdentityAlgorithm
303
303
  readonly digest: string
304
+ /** Nonce-free resume comparison material. Step keys still use `digest`. */
305
+ readonly sourceDigest?: string | undefined
304
306
  }
305
307
 
306
308
  /**
@@ -729,12 +731,25 @@ const filterIdentity = (filter: Schema.Top): FunctionIdentity => {
729
731
  }
730
732
  }
731
733
  }
734
+ const ephemeral = identities.some(([, identity]) => identity.algorithm === "sha256-source-ephemeral/v4")
735
+ const sourceComparable = identities.every(([, identity]) =>
736
+ identity.algorithm !== "sha256-source-ephemeral/v4" || identity.sourceDigest !== undefined
737
+ )
732
738
  return {
733
739
  _tag: "FunctionIdentity",
734
- algorithm: identities.some(([, identity]) => identity.algorithm === "sha256-source-ephemeral/v4")
740
+ algorithm: ephemeral
735
741
  ? "sha256-source-ephemeral/v4"
736
742
  : "sha256-source-captures/v5",
737
- digest: digestSync(JSON.stringify(identities))
743
+ digest: digestSync(JSON.stringify(identities)),
744
+ ...(ephemeral && sourceComparable
745
+ ? {
746
+ sourceDigest: digestSync(JSON.stringify(identities.map(([path, identity]) => [path, {
747
+ _tag: identity._tag,
748
+ algorithm: identity.algorithm,
749
+ digest: identity.sourceDigest ?? identity.digest
750
+ }])))
751
+ }
752
+ : {})
738
753
  }
739
754
  }
740
755