@flop-labs/sdk 0.8.0 → 0.9.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.
- package/CHANGELOG.md +41 -1
- package/README.md +2 -2
- package/dist/bundle/index.esm.js +1 -1
- package/dist/bundle/index.esm.js.map +1 -1
- package/dist/bundle/index.umd.cjs +1 -1
- package/dist/bundle/index.umd.cjs.map +1 -1
- package/dist/compute-channel/index.d.ts +2 -0
- package/dist/compute-channel/index.d.ts.map +1 -1
- package/dist/compute-channel/index.js +2 -0
- package/dist/compute-channel/index.js.map +1 -1
- package/dist/compute-channel/kimi-k31.d.ts +73 -0
- package/dist/compute-channel/kimi-k31.d.ts.map +1 -0
- package/dist/compute-channel/kimi-k31.js +265 -0
- package/dist/compute-channel/kimi-k31.js.map +1 -0
- package/dist/compute-channel/long-session.d.ts +7 -2
- package/dist/compute-channel/long-session.d.ts.map +1 -1
- package/dist/compute-channel/long-session.js +45 -10
- package/dist/compute-channel/long-session.js.map +1 -1
- package/dist/compute-channel/model-config.d.ts +6 -4
- package/dist/compute-channel/model-config.d.ts.map +1 -1
- package/dist/compute-channel/model-config.js +55 -5
- package/dist/compute-channel/model-config.js.map +1 -1
- package/dist/compute-channel/peer-info.d.ts +37 -2
- package/dist/compute-channel/peer-info.d.ts.map +1 -1
- package/dist/compute-channel/peer-info.js +25 -5
- package/dist/compute-channel/peer-info.js.map +1 -1
- package/dist/compute-channel/response-length.d.ts +84 -0
- package/dist/compute-channel/response-length.d.ts.map +1 -0
- package/dist/compute-channel/response-length.js +85 -0
- package/dist/compute-channel/response-length.js.map +1 -0
- package/dist/compute-channel/session-estimate.d.ts.map +1 -1
- package/dist/compute-channel/session-estimate.js +9 -1
- package/dist/compute-channel/session-estimate.js.map +1 -1
- package/dist/compute-channel/transport-http.d.ts +9 -0
- package/dist/compute-channel/transport-http.d.ts.map +1 -1
- package/dist/compute-channel/transport-http.js +4 -0
- package/dist/compute-channel/transport-http.js.map +1 -1
- package/dist/discovery/metered-pricing.d.ts.map +1 -1
- package/dist/discovery/metered-pricing.js +10 -1
- package/dist/discovery/metered-pricing.js.map +1 -1
- package/dist/faucet.d.ts +1 -1
- package/dist/faucet.js +1 -1
- package/dist/miner-admission.d.ts +14 -3
- package/dist/miner-admission.d.ts.map +1 -1
- package/dist/miner-admission.js +26 -6
- package/dist/miner-admission.js.map +1 -1
- package/dist/runtime-compatibility.d.ts +1 -1
- package/dist/runtime-compatibility.d.ts.map +1 -1
- package/dist/runtime-compatibility.js +6 -2
- package/dist/runtime-compatibility.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.0] - 2026-11-23
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `computeChannel.predictResponseLength`: one shared completion-length predictor returning p50/p90
|
|
15
|
+
completion tokens with their source (`heuristic`, `history:<window>` or `model:<id>`), for
|
|
16
|
+
pre-request previews only. `responseLengthHistory` builds a per-model baseline from aggregate
|
|
17
|
+
`(prompt, completion)` token counts by prompt bucket; `estimatePromptTokens` is the shared
|
|
18
|
+
`⌈chars / 4⌉` prompt heuristic. `previewTurn` prices a turn at `max_tokens` (`bound`, what holds
|
|
19
|
+
and caps are sized by) and at the predicted p50/p90 through `estimateSession`, and suggests a
|
|
20
|
+
`max_tokens` no larger than the caller's. Billing and settlement never read a prediction.
|
|
21
|
+
- `computeChannel.fetchSessionInfoEvidence` keeps a miner's v2-asking signed session info as
|
|
22
|
+
evidence (`{ challenge, proof }`), and `computeChannel.verifySessionInfoEvidence` re-verifies it
|
|
23
|
+
later for an exact chain, account, session key and model identity.
|
|
24
|
+
- Session info proof v2: `fetchSessionInfoProof` / `fetchProvenSessionInfo` take an optional
|
|
25
|
+
`version` 2, and `verifySessionInfoProof` accepts a `flop-session-info-v2` proof, which also signs
|
|
26
|
+
the inference backend's build and chat profile (`backend`). v1 proofs verify as before and never
|
|
27
|
+
carry a backend; a v2 proof with its backend stripped or altered does not verify.
|
|
28
|
+
`test-vectors/compute-channel/session-info-proof-v2.json` pins the encoding.
|
|
29
|
+
- `parseMeteringConfig` meters `moonshotai/Kimi-K3.1-Pro` @ `d9e99b07` as the unverified
|
|
30
|
+
`kimi-k31-reference-v1` family (devnet only, text-only), and only for its exact config bytes; any
|
|
31
|
+
other `kimi_k31` config keeps the MLA/KDA refusals. It reports BF16 activations and expert-only
|
|
32
|
+
MXFP4 weights, bills `ceil(F / 10^9)` once per turn with the router, gate products and attention
|
|
33
|
+
residuals counted (arch hash `cee27be3…e7af`). It is priced only when both the model hash and the
|
|
34
|
+
miner's measured root are content root `0xbfe37d42…ca90`.
|
|
35
|
+
The module is exported from `computeChannel`, including `refuseKimiK31Media`.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- `SUPPORTED_SPEC_VERSIONS` admits devnet runtime `1014034` (candidate 1.14.34, D-0553 / #4575), and `SUPPORTED_SPEC_VERSION_RANGE` now ends at `1014034`. `1014031` stays admitted so clients work before and after `setCode`; `1014032` and `1014033` stay rejected.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- `computeChannel.LongSession` keeps waiting when the miner's `/session/close` hand-off times out
|
|
44
|
+
or loses its connection, since the miner answers only after DA publish, TOPLOC and `settle`. It
|
|
45
|
+
polls the finalized channel for up to 600 s on `close()` (capped by the channel window's length),
|
|
46
|
+
or one turn timeout on a rollover while a request waits, and journals the channel `closed` once
|
|
47
|
+
it finalizes `Closed`; `close()` reconciles a rolled-over channel that finalized later. A close
|
|
48
|
+
that never finalizes is still `orphaned` for the timeout refund, and a refusal from the miner
|
|
49
|
+
still orphans at once.
|
|
50
|
+
|
|
10
51
|
## [0.8.0] - 2026-11-21
|
|
11
52
|
|
|
12
53
|
### Added
|
|
@@ -594,7 +635,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
594
635
|
|
|
595
636
|
- `inspectHuggingFace` resolves an immutable inventory and bounded config before weight transfer. `fetchHuggingFaceToDir` supports an external `resumeState` receipt with hashed file reuse and pending-rename crash recovery.
|
|
596
637
|
|
|
597
|
-
|
|
598
638
|
- Opt-in miner turn-evidence persistence before transcript/fence mutation, for
|
|
599
639
|
private encrypted replay and retirement handoff without changing receipt bytes.
|
|
600
640
|
- Hash-verified whole-blob retrieval on `HttpValidatorDa` for watchtower DA reads
|
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`.
|
|
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`.
|
|
34
34
|
`SUPPORTED_SPEC_VERSION_RANGE` retains its exported shape as the envelope
|
|
35
|
-
`1013000..
|
|
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`;
|
|
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
|