openvibers/openvibe.sdk Commits

Export TRUSTORDER from placement and list each Fabric module in 0.27.0 (#10)

OP OpenVibers committed 4 Oct 2026 · 52d2ab61cc · 4 files, +19 −6

checks run by GitHub CI (test) · CI ✓ 3/3 · review SHIP by DeepSeek harness

https://github.com/OpenVibers/OpenVibe.SDK/pull/10

Changes

ddiff --git a/CHANGELOG.md b/CHANGELOG.md
iindex 4bd6fa1..16f4898 100644
---- a/CHANGELOG.md
++++ b/CHANGELOG.md
@@@ -7,10 +7,22 @@ release may change an API and says so here.
--## 0.27.0 (2026-10-03)
--
--- Add server subpaths `openvibe-sdk/cost`, `openvibe-sdk/runtime`, `openvibe-sdk/storage`,
-- `openvibe-sdk/delivery`, and `openvibe-sdk/node` for Fabric contract records and offer builders.
++## 0.27.0 (2026-10-04)
++
++- **`openvibe-sdk/cost` (new, server; plan T1):** `rateCard()` / `validateRateCard()` for `platform.rate-card@1`,
++ `costSnapshot()` / `validateCostSnapshot()` for `platform.cost-snapshot@1`, and `estimate(card, quantity, unit)`
++ for the charge a rate card gives a quantity.
++- **`openvibe-sdk/runtime` (new, server; plan T1):** `runtimeOffer()` / `validateRuntimeOffer()` for
++ `platform.runtime-offer@1`, and `runtimeClass()` / `validateRuntimeClass()` / `RUNTIME_CLASSES` for
++ `platform.runtime-class@1`.
++- **`openvibe-sdk/storage` (new, server; plan T1):** `storageOffer()` / `validateStorageOffer()` for
++ `platform.storage-offer@1`.
++- **`openvibe-sdk/delivery` (new, server; plan T1):** `deliveryOffer()` / `validateDeliveryOffer()` for
++ `platform.delivery-offer@1`.
++- **`openvibe-sdk/node` (new, server; plan T1):** `nodeCapabilities()` / `validateNodeCapabilities()` for
++ `platform.node-capabilities@1`, and `nodeOffers(descriptor)`, which derives a node's resource and runtime offers.
++- **`openvibe-sdk/placement` exports `TRUST_CLASSES`** (the five T1 trust classes) and `TRUST_ORDER` (the planner's
++ default preference, unchanged), with their type declarations.
- **`openvibe-sdk/usage` (new, server; plan T1):** `platform.usage-sample@1` readings in one place.
`usageSample(fields)` builds the record — `id`, `idempotency_key`, `service`, `operation`, `quantity`, `unit` and
every optional dimension pass through, `at` defaults to now (ISO) and `source` to `openvibe-sdk/usage`, null fields
ddiff --git a/esm/placement.mjs b/esm/placement.mjs
iindex 58a9e44..57e37d5 100644
---- a/esm/placement.mjs
++++ b/esm/placement.mjs
@@@ -4,6 +4,6 @@ import cjs from '../src/placement.js';
export const {
plan, excluded, marginalCost, priceOf, forecast, ownedLoadCost,
rendezvous, pickTwo, signPlan, verifyPlan, createPlanHolder, canonical,
-- TRUST_CLASSES,
++ TRUST_CLASSES, TRUST_ORDER,
} = cjs;
export default cjs;
ddiff --git a/src/placement.js b/src/placement.js
iindex bfc7485..4455d54 100644
---- a/src/placement.js
++++ b/src/placement.js
@@@ -257,4 +257,4 @@ function createPlanHolder(publicKeys, { now = () => Date.now(), onReject = null
/** The five trust classes (T1 ADR-046): the order is the planner's preference when no list is named. */
const TRUST_CLASSES = ['first-party', 'user-owned', 'partner', 'community', 'external'];
--module.exports = { plan, excluded, marginalCost, priceOf, forecast, ownedLoadCost, rendezvous, pickTwo, signPlan, verifyPlan, createPlanHolder, canonical, TRUST_CLASSES };
++module.exports = { plan, excluded, marginalCost, priceOf, forecast, ownedLoadCost, rendezvous, pickTwo, signPlan, verifyPlan, createPlanHolder, canonical, TRUST_CLASSES, TRUST_ORDER };
ddiff --git a/types/placement.d.ts b/types/placement.d.ts
iindex 660730e..13f90f3 100644
---- a/types/placement.d.ts
++++ b/types/placement.d.ts
@@@ -26,3 +26,4 @@ export declare function createPlanHolder(publicKeys: Record<string, any>, opts?:
export declare function canonical(v: unknown): string;
/** The five trust classes (T1 ADR-046): first-party, user-owned, partner, community, external. */
export declare const TRUST_CLASSES: readonly ['first-party', 'user-owned', 'partner', 'community', 'external'];
++export declare const TRUST_ORDER: readonly ['first-party', 'user-owned', 'partner', 'community', 'external'];