@flop-labs/sdk 0.9.0 → 0.10.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +2 -2
  3. package/dist/bundle/index.esm.js +1 -1
  4. package/dist/bundle/index.esm.js.map +1 -1
  5. package/dist/bundle/index.umd.cjs +1 -1
  6. package/dist/bundle/index.umd.cjs.map +1 -1
  7. package/dist/client.d.ts +2 -0
  8. package/dist/client.d.ts.map +1 -1
  9. package/dist/client.js +4 -1
  10. package/dist/client.js.map +1 -1
  11. package/dist/compute-channel/agent-driver.d.ts.map +1 -1
  12. package/dist/compute-channel/agent-driver.js +4 -1
  13. package/dist/compute-channel/agent-driver.js.map +1 -1
  14. package/dist/compute-channel/channel-price.d.ts +34 -0
  15. package/dist/compute-channel/channel-price.d.ts.map +1 -0
  16. package/dist/compute-channel/channel-price.js +63 -0
  17. package/dist/compute-channel/channel-price.js.map +1 -0
  18. package/dist/compute-channel/deepseek-v41.d.ts +2 -2
  19. package/dist/compute-channel/direct-session-chain.d.ts.map +1 -1
  20. package/dist/compute-channel/direct-session-chain.js +6 -1
  21. package/dist/compute-channel/direct-session-chain.js.map +1 -1
  22. package/dist/compute-channel/direct-session.d.ts +2 -0
  23. package/dist/compute-channel/direct-session.d.ts.map +1 -1
  24. package/dist/compute-channel/direct-session.js +2 -2
  25. package/dist/compute-channel/direct-session.js.map +1 -1
  26. package/dist/compute-channel/index.d.ts +2 -0
  27. package/dist/compute-channel/index.d.ts.map +1 -1
  28. package/dist/compute-channel/index.js +2 -0
  29. package/dist/compute-channel/index.js.map +1 -1
  30. package/dist/compute-channel/long-session-chain.d.ts.map +1 -1
  31. package/dist/compute-channel/long-session-chain.js +52 -7
  32. package/dist/compute-channel/long-session-chain.js.map +1 -1
  33. package/dist/compute-channel/long-session.d.ts +25 -5
  34. package/dist/compute-channel/long-session.d.ts.map +1 -1
  35. package/dist/compute-channel/long-session.js +66 -30
  36. package/dist/compute-channel/long-session.js.map +1 -1
  37. package/dist/compute-channel/model-config.js +2 -2
  38. package/dist/compute-channel/model-config.js.map +1 -1
  39. package/dist/compute-channel/session-estimate.d.ts +3 -1
  40. package/dist/compute-channel/session-estimate.d.ts.map +1 -1
  41. package/dist/compute-channel/session-estimate.js +7 -2
  42. package/dist/compute-channel/session-estimate.js.map +1 -1
  43. package/dist/compute-channel/session.d.ts +16 -2
  44. package/dist/compute-channel/session.d.ts.map +1 -1
  45. package/dist/compute-channel/session.js +34 -10
  46. package/dist/compute-channel/session.js.map +1 -1
  47. package/dist/compute-channel/toploc-completion-rpc.d.ts.map +1 -1
  48. package/dist/compute-channel/toploc-completion-rpc.js +3 -1
  49. package/dist/compute-channel/toploc-completion-rpc.js.map +1 -1
  50. package/dist/compute-channel/transcript.d.ts +5 -2
  51. package/dist/compute-channel/transcript.d.ts.map +1 -1
  52. package/dist/compute-channel/transcript.js +6 -3
  53. package/dist/compute-channel/transcript.js.map +1 -1
  54. package/dist/compute-channel/warm-pool.d.ts +127 -0
  55. package/dist/compute-channel/warm-pool.d.ts.map +1 -0
  56. package/dist/compute-channel/warm-pool.js +169 -0
  57. package/dist/compute-channel/warm-pool.js.map +1 -0
  58. package/dist/faucet.d.ts +1 -1
  59. package/dist/faucet.d.ts.map +1 -1
  60. package/dist/faucet.js +1 -1
  61. package/dist/faucet.js.map +1 -1
  62. package/dist/runtime-compatibility.d.ts +1 -1
  63. package/dist/runtime-compatibility.d.ts.map +1 -1
  64. package/dist/runtime-compatibility.js +7 -2
  65. package/dist/runtime-compatibility.js.map +1 -1
  66. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,10 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.10.0] - 2026-11-24
11
+
12
+ ### Added
13
+
14
+ - `LongSessionConfig.minOfferWindowSeconds`: the shortest miner-signed offer window a long
15
+ session takes (default `windowSeconds`, unchanged). A bare open still asks for `windowSeconds`.
16
+ - Warm-pool reopen flow (#4643): `selectStandbys`, `freezePrimary`, `oldChannelAction` /
17
+ `watchOldChannel` and `reopenOnStandby` reopen a session on a matching standby miner after a
18
+ `TurnTimeoutError`, replay the transcript and publish lineage; `StandbyExhaustedError` when
19
+ every standby fails. `ChannelSession.lastCosignedCheckpoint()` returns the last checkpoint the
20
+ agent co-signed.
21
+
22
+ ### Changed
23
+
24
+ - `SUPPORTED_SPEC_VERSIONS` admits runtime `1014035` (candidate 1.14.35, D-0554 / #4581), the
25
+ spec the public Testnet (`flop-testnet`) launched on, and `SUPPORTED_SPEC_VERSION_RANGE` now
26
+ ends at `1014035`. `1014034` stays admitted so devnet clients work before and after `setCode`.
27
+ - **Breaking:** spot compute-channel tariffs price work per channel (#4581 / D-0554):
28
+ `forceSettlePayable(basePerTurn, turns, aggregateGn, pricePerGn)` takes a required price;
29
+ `ChannelSession.open` takes the price or a reader as a third argument and `fromOpenChannel`
30
+ takes `pricePerGn`; `LongSessionConfig.worstCaseTurnPlanck` is replaced by `worstCaseTurnGn`
31
+ (the session prices it at the model price before an open, then re-checks and tops up to the
32
+ pinned price); `LongSessionRuntime` gains `modelPricePerGn` and both channel snapshots carry
33
+ `pricePerGn`. New `readChannelPricePerGn`, `readModelPricePerGn` and
34
+ `resolveChannelPricePerGn` mirror the pallet rule (forward or unpinned channel, or a runtime
35
+ without `ChannelPricePerGn`: one atom per `G_n`). `estimateSession` sizes escrow to
36
+ `BasePerTurn·turns + price·ΣG_n`, so it now always includes the per-turn base.
37
+
10
38
  ## [0.9.0] - 2026-11-23
11
39
 
12
40
  ### Added
13
41
 
42
+ - `LongSessionRuntime.requestOffer`: when no listed offer fits, a long session asks the miner's
43
+ `POST /session/offer` for a freshly signed offer and checks it exactly as a listed one, before
44
+ falling back to a bare open. The live runtime returns no offer on any non-200 reply, a malformed
45
+ or oversized body, a redirect or a 10 s timeout, so miners without the route get a bare open.
14
46
  - `computeChannel.predictResponseLength`: one shared completion-length predictor returning p50/p90
15
47
  completion tokens with their source (`heuristic`, `history:<window>` or `model:<id>`), for
16
48
  pre-request previews only. `responseLengthHistory` builds a per-model baseline from aggregate
package/README.md CHANGED
@@ -30,9 +30,9 @@ For the examples, set `FLOP_HTLC_TEE_REQUIREMENTS` to that canonical hex from yo
30
30
 
31
31
  TypeScript SDK for the FLOP Network — HTLC workflows, PoI proofs, and account management.
32
32
 
33
- `SUPPORTED_SPEC_VERSIONS` in this source admits exactly `1013000`, `1014000`, `1014001`, `1014002`, `1014003`, `1014004`, `1014005`, `1014007`, `1014008`, `1014009`, `1014010`, `1014011`, `1014012`, `1014013`, `1014014`, `1014015`, `1014016`, `1014017`, `1014018`, `1014019`, `1014020`, `1014021`, `1014022`, `1014023`, `1014024`, `1014025`, `1014026`, `1014027`, `1014029`, `1014031`, `1014034`.
33
+ `SUPPORTED_SPEC_VERSIONS` in this source admits exactly `1013000`, `1014000`, `1014001`, `1014002`, `1014003`, `1014004`, `1014005`, `1014007`, `1014008`, `1014009`, `1014010`, `1014011`, `1014012`, `1014013`, `1014014`, `1014015`, `1014016`, `1014017`, `1014018`, `1014019`, `1014020`, `1014021`, `1014022`, `1014023`, `1014024`, `1014025`, `1014026`, `1014027`, `1014029`, `1014031`, `1014034`, `1014035`.
34
34
  `SUPPORTED_SPEC_VERSION_RANGE` retains its exported shape as the envelope
35
- `1013000..1014034`; admission requires exact membership (including no `1014006`, `1014028`, `1014030`, `1014032` or `1014033`). The published `0.4.0` executable stops at `1014011` and also excludes `1014006`;
35
+ `1013000..1014035`; admission requires exact membership (including no `1014006`, `1014028`, `1014030`, `1014032` or `1014033`). The published `0.4.0` executable stops at `1014011` and also excludes `1014006`;
36
36
  its bundled README has stale connection and HTLC examples. These source corrections
37
37
  are unreleased: installing `@latest` does not deliver them until a new version is
38
38
  published. The examples below describe this source candidate. Qualification covers