@motebit/sdk 1.2.0 → 2.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/dist/provider-mode.d.ts
CHANGED
|
@@ -50,6 +50,32 @@ export interface OnDeviceProviderConfig {
|
|
|
50
50
|
temperature?: number;
|
|
51
51
|
/** Optional max_tokens override. */
|
|
52
52
|
maxTokens?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Opt into auto-routing across the on-device backend's available
|
|
55
|
+
* models per turn. When `true` AND `backend` supports multi-model
|
|
56
|
+
* routing (`local-server` today; `apple-fm` / `mlx` / `webllm` are
|
|
57
|
+
* single-model surfaces where per-turn routing has no models to
|
|
58
|
+
* choose between), surface runtimes consume the third-consumer
|
|
59
|
+
* half of the auto-routing primitive
|
|
60
|
+
* (`@motebit/policy::dispatchOnDeviceRouting`) to pick the best
|
|
61
|
+
* model for each turn's `TaskShape` from the backend's catalog.
|
|
62
|
+
* When `false` or omitted, the surface uses the single configured
|
|
63
|
+
* `model` (backward-compat default).
|
|
64
|
+
*
|
|
65
|
+
* Doctrine: `docs/doctrine/auto-routing-as-protocol-primitive.md`
|
|
66
|
+
* § "PR 3 — on-device consumer". The primitive lives in
|
|
67
|
+
* `@motebit/policy/on-device-router.ts`; surface wiring is the
|
|
68
|
+
* consumer site registered in the drift gate
|
|
69
|
+
* `check-routing-decision-coverage` (#95). No balance filter —
|
|
70
|
+
* on-device runs on the user's hardware with zero marginal
|
|
71
|
+
* $/token cost.
|
|
72
|
+
*
|
|
73
|
+
* Per `feedback_sovereignty_orthogonal`: orthogonal to tier —
|
|
74
|
+
* on-device auto-routing is never subscription-gated. The user
|
|
75
|
+
* owns the hardware; the surface's job is to compose the
|
|
76
|
+
* canonical dispatcher over it.
|
|
77
|
+
*/
|
|
78
|
+
autoRoute?: boolean;
|
|
53
79
|
}
|
|
54
80
|
/** Motebit Cloud mode config — the subscription-backed product. */
|
|
55
81
|
export interface MotebitCloudProviderConfig {
|
|
@@ -76,6 +102,27 @@ export interface ByokProviderConfig {
|
|
|
76
102
|
baseUrl?: string;
|
|
77
103
|
temperature?: number;
|
|
78
104
|
maxTokens?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Opt into auto-routing across the vendor's available models per turn.
|
|
107
|
+
* When `true`, surface runtimes consume the second-consumer half of the
|
|
108
|
+
* auto-routing primitive (`@motebit/policy::dispatchByokRouting`) to
|
|
109
|
+
* pick the best model for each turn's `TaskShape` from the vendor's
|
|
110
|
+
* catalog. When `false` or omitted, the surface uses the single
|
|
111
|
+
* configured `model` (backward-compat default).
|
|
112
|
+
*
|
|
113
|
+
* Doctrine: `docs/doctrine/auto-routing-as-protocol-primitive.md`
|
|
114
|
+
* § "PR 2 — BYOK consumer". The primitive lives in `@motebit/policy`;
|
|
115
|
+
* the per-surface wiring (web today; desktop/mobile mirror following)
|
|
116
|
+
* is the consumer site registered in the drift gate
|
|
117
|
+
* `check-routing-decision-coverage` (#95). No balance filter — BYOK
|
|
118
|
+
* users pay providers directly; balance is motebit-cloud-specific.
|
|
119
|
+
*
|
|
120
|
+
* Per `feedback_sovereignty_orthogonal`: this flag is orthogonal to
|
|
121
|
+
* tier — BYOK auto-routing is never subscription-gated. The user
|
|
122
|
+
* already has the vendor's key; the surface's job is to compose the
|
|
123
|
+
* canonical dispatcher over it.
|
|
124
|
+
*/
|
|
125
|
+
autoRoute?: boolean;
|
|
79
126
|
}
|
|
80
127
|
/** Union of all three modes. Surfaces persist this shape. */
|
|
81
128
|
export type UnifiedProviderConfig = OnDeviceProviderConfig | MotebitCloudProviderConfig | ByokProviderConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-mode.d.ts","sourceRoot":"","sources":["../src/provider-mode.ts"],"names":[],"mappings":"AAYA;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,eAAe,GAAG,MAAM,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GA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SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,mEAAmE;AACnE,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,eAAe,CAAC;IACtB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,6DAA6D;AAC7D,MAAM,MAAM,qBAAqB,GAC7B,sBAAsB,GACtB,0BAA0B,GAC1B,kBAAkB,CAAC;AAuBvB;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAkBxE;AAID,+DAA+D;AAC/D,wBAAgB,qBAAqB,IAAI,0BAA0B,CAElE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-mode.js","sourceRoot":"","sources":["../src/provider-mode.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,EAAE;AACF,mFAAmF;AACnF,qFAAqF;AACrF,qDAAqD;AACrD,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;
|
|
1
|
+
{"version":3,"file":"provider-mode.js","sourceRoot":"","sources":["../src/provider-mode.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,EAAE;AACF,mFAAmF;AACnF,qFAAqF;AACrF,qDAAqD;AACrD,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AA4I/E,oBAAoB;AACpB,EAAE;AACF,oDAAoD;AACpD,EAAE;AACF,mCAAmC;AACnC,sEAAsE;AACtE,0EAA0E;AAC1E,EAAE;AACF,4CAA4C;AAC5C,oFAAoF;AACpF,2CAA2C;AAC3C,uDAAuD;AACvD,EAAE;AACF,yCAAyC;AACzC,0EAA0E;AAC1E,sCAAsC;AACtC,EAAE;AACF,kCAAkC;AAClC,8DAA8D;AAC9D,gDAAgD;AAEhD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAA8B;IAC7D,IAAI,CAAC,GAAG;QAAE,OAAO,KAAK,CAAC;IACvB,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;QACtC,OAAO,CACL,IAAI,KAAK,WAAW;YACpB,IAAI,KAAK,WAAW;YACpB,IAAI,KAAK,KAAK;YACd,IAAI,KAAK,SAAS;YAClB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;YAClB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;YACxB,4BAA4B,CAAC,IAAI,CAAC,IAAI,CAAC,CACxC,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,mBAAmB;AAEnB,+DAA+D;AAC/D,MAAM,UAAU,qBAAqB;IACnC,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;AACnC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motebit/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Developer contract for building Motebit-powered agents, services, and integrations — stable types, adapter interfaces, governance config. Re-exports @motebit/protocol.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@motebit/protocol": "
|
|
50
|
+
"@motebit/protocol": "2.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^22.0.0",
|