@motebit/protocol 2.0.1 → 3.0.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/README.md +6 -1
- package/dist/agent-revocation.d.ts +184 -0
- package/dist/agent-revocation.d.ts.map +1 -0
- package/dist/agent-revocation.js +108 -0
- package/dist/agent-revocation.js.map +1 -0
- package/dist/agent-settlement-anchor.d.ts +12 -0
- package/dist/agent-settlement-anchor.d.ts.map +1 -1
- package/dist/artifact-type.d.ts +25 -7
- package/dist/artifact-type.d.ts.map +1 -1
- package/dist/artifact-type.js +9 -0
- package/dist/artifact-type.js.map +1 -1
- package/dist/base58.d.ts +20 -0
- package/dist/base58.d.ts.map +1 -0
- package/dist/base58.js +47 -0
- package/dist/base58.js.map +1 -0
- package/dist/credential-anchor.d.ts +12 -0
- package/dist/credential-anchor.d.ts.map +1 -1
- package/dist/federation-settlement-anchor.d.ts +140 -0
- package/dist/federation-settlement-anchor.d.ts.map +1 -0
- package/dist/federation-settlement-anchor.js +22 -0
- package/dist/federation-settlement-anchor.js.map +1 -0
- package/dist/index.d.ts +111 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -14
- package/dist/index.js.map +1 -1
- package/dist/memory-events.d.ts +5 -2
- package/dist/memory-events.d.ts.map +1 -1
- package/dist/merkle-tree-hash.d.ts +97 -0
- package/dist/merkle-tree-hash.d.ts.map +1 -0
- package/dist/merkle-tree-hash.js +78 -0
- package/dist/merkle-tree-hash.js.map +1 -0
- package/dist/money.d.ts +45 -0
- package/dist/money.d.ts.map +1 -1
- package/dist/money.js +50 -0
- package/dist/money.js.map +1 -1
- package/dist/retention-policy.d.ts +7 -8
- package/dist/retention-policy.d.ts.map +1 -1
- package/dist/retention-policy.js.map +1 -1
- package/dist/settlement-mode.d.ts +34 -0
- package/dist/settlement-mode.d.ts.map +1 -1
- package/dist/settlement-summary.d.ts +102 -0
- package/dist/settlement-summary.d.ts.map +1 -0
- package/dist/settlement-summary.js +28 -0
- package/dist/settlement-summary.js.map +1 -0
- package/dist/skills.d.ts +1 -2
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js.map +1 -1
- package/dist/transparency.d.ts +2 -3
- package/dist/transparency.d.ts.map +1 -1
- package/dist/transparency.js.map +1 -1
- package/dist/trust-algebra.d.ts +0 -15
- package/dist/trust-algebra.d.ts.map +1 -1
- package/dist/trust-algebra.js +2 -15
- package/dist/trust-algebra.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settlement-summary wire body — the per-peer economic history the relay
|
|
3
|
+
* assembles from its signed `relay_settlements` ledger and emits as a
|
|
4
|
+
* `settlement-summary` content artifact (`/api/v1/agents/:motebitId/settlements`,
|
|
5
|
+
* `services/relay/src/state-export.ts`).
|
|
6
|
+
*
|
|
7
|
+
* This is the money side of the first-person trust graph
|
|
8
|
+
* (`docs/doctrine/agents-as-first-person-trust-graph.md` §6). Three
|
|
9
|
+
* invariants the shape encodes:
|
|
10
|
+
*
|
|
11
|
+
* 1. **First-person.** Every figure is the caller's history with a
|
|
12
|
+
* specific counterparty — what *I* earned from / paid to *this*
|
|
13
|
+
* peer. Never a global reputation or a peer's standalone balance.
|
|
14
|
+
* 2. **Projection, not balance.** The relay derives these sums from
|
|
15
|
+
* settlement rows at read time; they are NOT a denormalized field
|
|
16
|
+
* on any trust record. Receipts / settlement rows stay source of
|
|
17
|
+
* truth (`docs/doctrine/receipts-unified.md`).
|
|
18
|
+
* 3. **Micro-units.** All amounts are integer micro-units (1 USD =
|
|
19
|
+
* 1,000,000), per the money-model. Surfaces convert at the boundary
|
|
20
|
+
* with `fromMicro`. Zero floating-point in the money path.
|
|
21
|
+
*
|
|
22
|
+
* Permissive floor (Apache-2.0), type-only, zero runtime deps. Consumed
|
|
23
|
+
* by the relay producer and the `@motebit/state-export-client` verifier;
|
|
24
|
+
* `@motebit/panels` keeps its own surface-agnostic view-model (the panels
|
|
25
|
+
* layer does not import `@motebit/protocol`).
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* One counterparty's economic history with the calling motebit. Keyed by
|
|
29
|
+
* the peer's `motebit_id`. A peer appears here only when at least one
|
|
30
|
+
* settlement between the pair carries an attributable counterparty id
|
|
31
|
+
* (`delegator_id` on the settlement row) — see `SettlementSummaryExport`
|
|
32
|
+
* for the unattributed remainder.
|
|
33
|
+
*/
|
|
34
|
+
export interface SettlementSummaryPeer {
|
|
35
|
+
/** The counterparty's motebit_id. */
|
|
36
|
+
peer_id: string;
|
|
37
|
+
/**
|
|
38
|
+
* Micro-units the caller *earned from* this peer — the caller was the
|
|
39
|
+
* worker/payee, the peer was the delegator/payer. Sum of `amount_settled`
|
|
40
|
+
* over settlements where `motebit_id = caller ∧ delegator_id = peer`.
|
|
41
|
+
*/
|
|
42
|
+
earned_micro: number;
|
|
43
|
+
/**
|
|
44
|
+
* Micro-units the caller *paid to* this peer — the caller was the
|
|
45
|
+
* delegator/payer, the peer was the worker/payee. Sum of `amount_settled`
|
|
46
|
+
* over settlements where `delegator_id = caller ∧ motebit_id = peer`.
|
|
47
|
+
*/
|
|
48
|
+
paid_micro: number;
|
|
49
|
+
/** `earned_micro - paid_micro`. May be negative (net payer to this peer). */
|
|
50
|
+
net_micro: number;
|
|
51
|
+
/**
|
|
52
|
+
* Platform fee (micro-units) the relay recorded on settlements this
|
|
53
|
+
* caller funded with this peer (the 5% coordination fee, per the
|
|
54
|
+
* economic-loop doctrine). Only the legs the caller paid — never the
|
|
55
|
+
* peer's fees. Informational; not part of `net_micro` (the fee leaves
|
|
56
|
+
* the caller, it is not owed to or from the peer).
|
|
57
|
+
*/
|
|
58
|
+
fee_micro: number;
|
|
59
|
+
/** Count of attributable settlements between the pair (both directions). */
|
|
60
|
+
settled_count: number;
|
|
61
|
+
/** How many of `settled_count` cleared P2P (onchain) vs relay-custody. */
|
|
62
|
+
p2p_count: number;
|
|
63
|
+
/** Earliest `settled_at` (epoch ms) across the pair's settlements. */
|
|
64
|
+
first_at: number;
|
|
65
|
+
/** Latest `settled_at` (epoch ms) across the pair's settlements. */
|
|
66
|
+
last_at: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Settlements that cannot be attributed to a specific counterparty — rows
|
|
70
|
+
* whose `delegator_id` is null. Both P2P and relay-custody settlements
|
|
71
|
+
* record the payer's `delegator_id` going forward, so this bucket holds:
|
|
72
|
+
* settlements predating delegator attribution, multi-hop sub-delegation
|
|
73
|
+
* rows (deferred residual — see `services/relay` CLAUDE.md), and
|
|
74
|
+
* self-funded / unknown-submitter rows. Surfaced as an honest aggregate so
|
|
75
|
+
* the totals stay truthful: the per-peer rows do NOT silently drop this
|
|
76
|
+
* money. A surface MAY show it as "other / unattributed"; it is never
|
|
77
|
+
* folded into a peer.
|
|
78
|
+
*/
|
|
79
|
+
export interface SettlementSummaryUnattributed {
|
|
80
|
+
/** Micro-units the caller earned on rows with no attributable payer. */
|
|
81
|
+
earned_micro: number;
|
|
82
|
+
/** Platform fee (micro-units) on those rows. */
|
|
83
|
+
fee_micro: number;
|
|
84
|
+
/** Count of unattributable settlements. */
|
|
85
|
+
settled_count: number;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The signed body of a `settlement-summary` content artifact. The outer
|
|
89
|
+
* `ContentArtifactManifest` (in the `X-Motebit-Content-Manifest` header)
|
|
90
|
+
* attests that the relay assembled this from its settlement ledger at
|
|
91
|
+
* read time; a verifier checks it against the relay's pinned key offline
|
|
92
|
+
* (`@motebit/state-export-client`).
|
|
93
|
+
*/
|
|
94
|
+
export interface SettlementSummaryExport {
|
|
95
|
+
/** The motebit whose first-person economic history this is. */
|
|
96
|
+
motebit_id: string;
|
|
97
|
+
/** Per-counterparty history, most-recently-settled first. */
|
|
98
|
+
peers: SettlementSummaryPeer[];
|
|
99
|
+
/** Settlements with no attributable counterparty (see the type doc). */
|
|
100
|
+
unattributed: SettlementSummaryUnattributed;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=settlement-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settlement-summary.d.ts","sourceRoot":"","sources":["../src/settlement-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,aAAa,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,6BAA6B;IAC5C,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,wEAAwE;IACxE,YAAY,EAAE,6BAA6B,CAAC;CAC7C"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settlement-summary wire body — the per-peer economic history the relay
|
|
3
|
+
* assembles from its signed `relay_settlements` ledger and emits as a
|
|
4
|
+
* `settlement-summary` content artifact (`/api/v1/agents/:motebitId/settlements`,
|
|
5
|
+
* `services/relay/src/state-export.ts`).
|
|
6
|
+
*
|
|
7
|
+
* This is the money side of the first-person trust graph
|
|
8
|
+
* (`docs/doctrine/agents-as-first-person-trust-graph.md` §6). Three
|
|
9
|
+
* invariants the shape encodes:
|
|
10
|
+
*
|
|
11
|
+
* 1. **First-person.** Every figure is the caller's history with a
|
|
12
|
+
* specific counterparty — what *I* earned from / paid to *this*
|
|
13
|
+
* peer. Never a global reputation or a peer's standalone balance.
|
|
14
|
+
* 2. **Projection, not balance.** The relay derives these sums from
|
|
15
|
+
* settlement rows at read time; they are NOT a denormalized field
|
|
16
|
+
* on any trust record. Receipts / settlement rows stay source of
|
|
17
|
+
* truth (`docs/doctrine/receipts-unified.md`).
|
|
18
|
+
* 3. **Micro-units.** All amounts are integer micro-units (1 USD =
|
|
19
|
+
* 1,000,000), per the money-model. Surfaces convert at the boundary
|
|
20
|
+
* with `fromMicro`. Zero floating-point in the money path.
|
|
21
|
+
*
|
|
22
|
+
* Permissive floor (Apache-2.0), type-only, zero runtime deps. Consumed
|
|
23
|
+
* by the relay producer and the `@motebit/state-export-client` verifier;
|
|
24
|
+
* `@motebit/panels` keeps its own surface-agnostic view-model (the panels
|
|
25
|
+
* layer does not import `@motebit/protocol`).
|
|
26
|
+
*/
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=settlement-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settlement-summary.js","sourceRoot":"","sources":["../src/settlement-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|
package/dist/skills.d.ts
CHANGED
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
* and signature verification live in @motebit/crypto. Frontmatter parsing,
|
|
21
21
|
* registry, selector, and trust gate live in the BSL @motebit/skills package.
|
|
22
22
|
*/
|
|
23
|
-
import type { SuiteId } from "./crypto-suite.js";
|
|
24
23
|
/**
|
|
25
24
|
* Sensitivity tier of the data a skill's procedure causes the agent to touch.
|
|
26
25
|
*
|
|
@@ -69,7 +68,7 @@ export interface SkillHardwareAttestationGate {
|
|
|
69
68
|
*/
|
|
70
69
|
export interface SkillSignature {
|
|
71
70
|
/** Cryptosuite discriminator. Verifiers reject unknown values fail-closed. */
|
|
72
|
-
suite:
|
|
71
|
+
suite: "motebit-jcs-ed25519-b64-v1";
|
|
73
72
|
/** Hex-encoded Ed25519 public key (32 bytes → 64 lowercase hex chars). */
|
|
74
73
|
public_key: string;
|
|
75
74
|
/** Base64url-encoded Ed25519 signature over the canonical bytes. */
|
package/dist/skills.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAExF,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,EAAE,SAAS,gBAAgB,EAM7D,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,yBAAyB,EAAE,SAAS,gBAAgB,EAG/D,CAAC;AAIH,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;AAE9E,sDAAsD;AACtD,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAMlD,CAAC;AAIH;;;;;;;GAOG;AACH,MAAM,WAAW,4BAA4B;IAC3C,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAID;;;;;;;;;;;;;;G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AAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
package/dist/skills.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAcH,wEAAwE;AACxE,MAAM,CAAC,MAAM,uBAAuB,GAAgC,MAAM,CAAC,MAAM,CAAC;IAChF,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;IACX,QAAQ;CACT,CAAC,CAAC;AAEH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,yBAAyB,GAAgC,MAAM,CAAC,MAAM,CAAC;IAClF,MAAM;IACN,UAAU;CACX,CAAC,CAAC;AAOH,sDAAsD;AACtD,MAAM,CAAC,MAAM,eAAe,GAA6B,MAAM,CAAC,MAAM,CAAC;IACrE,OAAO;IACP,OAAO;IACP,SAAS;IACT,KAAK;IACL,SAAS;CACV,CAAC,CAAC"}
|
package/dist/transparency.d.ts
CHANGED
|
@@ -23,14 +23,13 @@
|
|
|
23
23
|
*
|
|
24
24
|
* Permissive floor (Apache-2.0), type-only, zero runtime deps.
|
|
25
25
|
*/
|
|
26
|
-
import type { SuiteId } from "./crypto-suite.js";
|
|
27
26
|
/**
|
|
28
27
|
* The pinned cryptosuite for transparency declarations. JCS
|
|
29
28
|
* canonicalization (RFC 8785) + Ed25519 + hex signature encoding.
|
|
30
29
|
* Matches the identity-file + credential-anchor + content-artifact
|
|
31
30
|
* family. See `SUITE_REGISTRY` in `./crypto-suite.ts`.
|
|
32
31
|
*/
|
|
33
|
-
export declare const TRANSPARENCY_SUITE:
|
|
32
|
+
export declare const TRANSPARENCY_SUITE: "motebit-jcs-ed25519-hex-v1";
|
|
34
33
|
/**
|
|
35
34
|
* Canonical memo prefix the relay emits when anchoring the
|
|
36
35
|
* declaration hash to Solana via the Memo program. Full memo shape:
|
|
@@ -79,7 +78,7 @@ export interface SignedTransparencyDeclaration {
|
|
|
79
78
|
/** Hex-encoded SHA-256 of the canonical-JSON of the signed payload. */
|
|
80
79
|
readonly hash: string;
|
|
81
80
|
/** Cryptosuite identifier — `motebit-jcs-ed25519-hex-v1` today. */
|
|
82
|
-
readonly suite:
|
|
81
|
+
readonly suite: "motebit-jcs-ed25519-hex-v1";
|
|
83
82
|
/** Hex-encoded Ed25519 signature over the canonical-JSON of the signed payload. */
|
|
84
83
|
readonly signature: string;
|
|
85
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transparency.d.ts","sourceRoot":"","sources":["../src/transparency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH
|
|
1
|
+
{"version":3,"file":"transparency.d.ts","sourceRoot":"","sources":["../src/transparency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAG,4BAAqC,CAAC;AAExE;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,EAAG,0BAAmC,CAAC;AAEnF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAG,uCAAgD,CAAC;AAErF;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,6BAA6B;IAC5C,yGAAyG;IACzG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,4DAA4D;IAC5D,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,QAAQ,CAAC,KAAK,EAAE,4BAA4B,CAAC;IAC7C,mFAAmF;IACnF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,6BAA6B,EAC7B,MAAM,GAAG,aAAa,GAAG,UAAU,GAAG,kBAAkB,GAAG,SAAS,CACrE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,0FAA0F;IAC1F,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,iGAAiG;IACjG,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,6BAA6B,CAaxC"}
|
package/dist/transparency.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transparency.js","sourceRoot":"","sources":["../src/transparency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;
|
|
1
|
+
{"version":3,"file":"transparency.js","sourceRoot":"","sources":["../src/transparency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,4BAAqC,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,0BAAmC,CAAC;AAEnF;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,uCAAgD,CAAC;AAoErF;;;;;;GAMG;AACH,MAAM,UAAU,+BAA+B,CAC7C,KAAc;IAEd,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,OAAO,CACL,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ;QAC1B,OAAO,CAAC,CAAC,WAAW,KAAK,QAAQ;QACjC,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ;QAC9B,OAAO,CAAC,CAAC,gBAAgB,KAAK,QAAQ;QACtC,SAAS,IAAI,CAAC;QACd,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ;QAC1B,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ;QAC3B,OAAO,CAAC,CAAC,SAAS,KAAK,QAAQ,CAChC,CAAC;AACJ,CAAC"}
|
package/dist/trust-algebra.d.ts
CHANGED
|
@@ -31,19 +31,4 @@ export declare function composeTrustChain(scores: number[]): number;
|
|
|
31
31
|
/** Fold parallel route scores with ⊕. No routes → 0.0 (identity). */
|
|
32
32
|
export declare function joinParallelRoutes(scores: number[]): number;
|
|
33
33
|
export declare const REFERENCE_TRUST_THRESHOLDS: TrustTransitionThresholds;
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated since 1.0.1, removed in 3.0.0. Use {@link REFERENCE_TRUST_THRESHOLDS} instead.
|
|
36
|
-
*
|
|
37
|
-
* Reason: the `DEFAULT_` prefix read as "THE value every motebit
|
|
38
|
-
* implementation uses," but trust-transition thresholds are motebit
|
|
39
|
-
* product tuning — they govern promotion and demotion policy, not
|
|
40
|
-
* protocol interop. A third-party motebit implementation may choose
|
|
41
|
-
* different thresholds and still interoperate correctly (the semiring
|
|
42
|
-
* algebra above is the interop contract). The `REFERENCE_` prefix
|
|
43
|
-
* signals "motebit's reference-implementation default; implementers
|
|
44
|
-
* MAY choose their own values." Rename-plus-deprecate so the naming
|
|
45
|
-
* correction ships without a breaking change; the old export is
|
|
46
|
-
* removed at 2.0.0.
|
|
47
|
-
*/
|
|
48
|
-
export declare const DEFAULT_TRUST_THRESHOLDS: TrustTransitionThresholds;
|
|
49
34
|
//# sourceMappingURL=trust-algebra.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trust-algebra.d.ts","sourceRoot":"","sources":["../src/trust-algebra.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAI7E;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMrD,CAAC;AAEF,kDAAkD;AAClD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,CAEzE;AAED,yDAAyD;AACzD,eAAO,MAAM,UAAU,IAAI,CAAC;AAE5B,qCAAqC;AACrC,eAAO,MAAM,SAAS,IAAI,CAAC;AAE3B,+CAA+C;AAC/C,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,0CAA0C;AAC1C,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAE1D;AAED,qEAAqE;AACrE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAE3D;AAmBD,eAAO,MAAM,0BAA0B,EAAE,yBAOxC,CAAC
|
|
1
|
+
{"version":3,"file":"trust-algebra.d.ts","sourceRoot":"","sources":["../src/trust-algebra.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAI7E;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMrD,CAAC;AAEF,kDAAkD;AAClD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,CAEzE;AAED,yDAAyD;AACzD,eAAO,MAAM,UAAU,IAAI,CAAC;AAE5B,qCAAqC;AACrC,eAAO,MAAM,SAAS,IAAI,CAAC;AAE3B,+CAA+C;AAC/C,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,0CAA0C;AAC1C,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAE1D;AAED,qEAAqE;AACrE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAE3D;AAmBD,eAAO,MAAM,0BAA0B,EAAE,yBAOxC,CAAC"}
|
package/dist/trust-algebra.js
CHANGED
|
@@ -70,19 +70,6 @@ export const REFERENCE_TRUST_THRESHOLDS = {
|
|
|
70
70
|
demote_belowRate: 0.5,
|
|
71
71
|
demote_minTasks: 3,
|
|
72
72
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
*
|
|
76
|
-
* Reason: the `DEFAULT_` prefix read as "THE value every motebit
|
|
77
|
-
* implementation uses," but trust-transition thresholds are motebit
|
|
78
|
-
* product tuning — they govern promotion and demotion policy, not
|
|
79
|
-
* protocol interop. A third-party motebit implementation may choose
|
|
80
|
-
* different thresholds and still interoperate correctly (the semiring
|
|
81
|
-
* algebra above is the interop contract). The `REFERENCE_` prefix
|
|
82
|
-
* signals "motebit's reference-implementation default; implementers
|
|
83
|
-
* MAY choose their own values." Rename-plus-deprecate so the naming
|
|
84
|
-
* correction ships without a breaking change; the old export is
|
|
85
|
-
* removed at 2.0.0.
|
|
86
|
-
*/
|
|
87
|
-
export const DEFAULT_TRUST_THRESHOLDS = REFERENCE_TRUST_THRESHOLDS;
|
|
73
|
+
// `DEFAULT_TRUST_THRESHOLDS` (the back-compat alias of REFERENCE_TRUST_THRESHOLDS)
|
|
74
|
+
// was removed at 3.0.0 per its deprecation. Use REFERENCE_TRUST_THRESHOLDS.
|
|
88
75
|
//# sourceMappingURL=trust-algebra.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trust-algebra.js","sourceRoot":"","sources":["../src/trust-algebra.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,uEAAuE;AAEvE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA2B;IACxD,OAAO,EAAE,GAAG;IACZ,aAAa,EAAE,GAAG;IAClB,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,GAAG;CACb,CAAC;AAEF,kDAAkD;AAClD,MAAM,UAAU,iBAAiB,CAAC,KAA+B;IAC/D,OAAO,kBAAkB,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC;AAC1C,CAAC;AAED,yDAAyD;AACzD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAE5B,qCAAqC;AACrC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC;AAE3B,+CAA+C;AAC/C,MAAM,UAAU,QAAQ,CAAC,CAAS,EAAE,CAAS;IAC3C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxB,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,aAAa,CAAC,CAAS,EAAE,CAAS;IAChD,OAAO,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,iBAAiB,CAAC,MAAgB;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AACjD,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,kBAAkB,CAAC,MAAgB;IACjD,OAAO,MAAM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AM,UAAU,aAAa,CAAC,CAAS,EAAE,CAAS;IAChD,OAAO,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,iBAAiB,CAAC,MAAgB;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AACjD,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,kBAAkB,CAAC,MAAgB;IACjD,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AAC7C,CAAC;AAED,sEAAsE;AACtE,EAAE;AACF,mEAAmE;AACnE,oEAAoE;AACpE,2DAA2D;AAC3D,qEAAqE;AACrE,oEAAoE;AACpE,qEAAqE;AACrE,gEAAgE;AAChE,mCAAmC;AACnC,EAAE;AACF,uEAAuE;AACvE,sEAAsE;AACtE,mEAAmE;AACnE,+DAA+D;AAC/D,sBAAsB;AAEtB,MAAM,CAAC,MAAM,0BAA0B,GAA8B;IACnE,0BAA0B,EAAE,CAAC;IAC7B,yBAAyB,EAAE,GAAG;IAC9B,yBAAyB,EAAE,EAAE;IAC7B,wBAAwB,EAAE,GAAG;IAC7B,gBAAgB,EAAE,GAAG;IACrB,eAAe,EAAE,CAAC;CACnB,CAAC;AAEF,mFAAmF;AACnF,4EAA4E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motebit/protocol",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Motebit protocol — identity, receipts, credentials, delegation, settlement, and trust algebra for sovereign AI agents. Types, semirings, routing primitives. Apache-2.0, zero dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/node": "^22.0.0",
|
|
51
51
|
"typescript": "^5.6.0",
|
|
52
|
-
"fast-check": "^4.
|
|
53
|
-
"vitest": "^
|
|
52
|
+
"fast-check": "^4.8.0",
|
|
53
|
+
"vitest": "^4.1.8"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=20"
|