@north-light/api 0.3.501 → 0.3.503
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/api/contract.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
|
|
2
|
-
export declare const CONTRACT_LEVEL = "1.
|
|
2
|
+
export declare const CONTRACT_LEVEL = "1.17";
|
|
3
3
|
/** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
|
|
4
4
|
export declare const REQUIRED_CONTRACT_HEADER = "Crouter-Required-Contract";
|
|
5
5
|
/** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
|
package/dist/api/contract.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
//
|
|
13
13
|
// PURITY (spec §3.1): Node built-ins + `src/api/*` only.
|
|
14
14
|
/** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
|
|
15
|
-
export const CONTRACT_LEVEL = '1.
|
|
15
|
+
export const CONTRACT_LEVEL = '1.17';
|
|
16
16
|
/** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
|
|
17
17
|
export const REQUIRED_CONTRACT_HEADER = 'Crouter-Required-Contract';
|
|
18
18
|
/** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
|
package/dist/api/dto/grants.d.ts
CHANGED
|
@@ -22,9 +22,9 @@ export interface GrantGetDTO {
|
|
|
22
22
|
mode: 'always' | 'ask';
|
|
23
23
|
}[];
|
|
24
24
|
spend_cap: number | null;
|
|
25
|
-
payer: 'user';
|
|
25
|
+
payer: 'user' | 'app';
|
|
26
26
|
/** `{ <setup id>: ProviderDependency }` (a setup id is a provider id such as `context`, or a dotted level such as `context.deep`) as the directory's grant sync carried it; `{}` when the grantee has none. The daemon performs no `requires` check: an app follows this with the SDK grant watch (`oauth.watchGrants`, or `grant.get` with `wait`/`since`) and refuses its own operation with `provider_setup_pending`. When an entry's `state` is not `ready`, show its `message` (the provider's own sentence, when it has one) and send the person to its `next` (the directory's setup page; not for `unavailable`, where there is nothing for them to do) — never copy the provider's prose into the app. */
|
|
27
27
|
dependencies: Record<string, ProviderDependency>;
|
|
28
|
-
/** Opaque; changes exactly when `rev`, `resolved_scopes`, `spend_cap`, `payer` or `dependencies` changes (never on a periodic sync alone or a new token). Pass it back as `since` with `wait` to hold the read until it changes. */
|
|
28
|
+
/** Opaque; changes exactly when `rev`, `resolved_scopes`, `spend_cap`, `payer`, `inference_endpoint` or `dependencies` changes (never on a periodic sync alone or a new token). Pass it back as `since` with `wait` to hold the read until it changes. */
|
|
29
29
|
version: string;
|
|
30
30
|
}
|
|
@@ -94,7 +94,7 @@ export interface RunStartedEvent extends RunEventBaseDTO {
|
|
|
94
94
|
* default model, not one actually served. The served model is on `usage`. */
|
|
95
95
|
served_model?: string | null;
|
|
96
96
|
scopes: string[] | null;
|
|
97
|
-
payer: 'user';
|
|
97
|
+
payer: 'user' | 'app';
|
|
98
98
|
usage: RunUsageDTO;
|
|
99
99
|
/** Present when a schedule's firing started the run. */
|
|
100
100
|
schedule_id?: string;
|
|
@@ -170,6 +170,8 @@ export interface RunUsageEvent extends RunEventBaseDTO, RunUsageDTO {
|
|
|
170
170
|
type: 'usage';
|
|
171
171
|
/** One model call's model; its tokens and cost are the event's own counts. */
|
|
172
172
|
served_model: string;
|
|
173
|
+
/** Who paid for this call: the run's grant's payer. */
|
|
174
|
+
payer: 'user' | 'app';
|
|
173
175
|
/** The run's cumulative usage after this call. */
|
|
174
176
|
usage: RunUsageDTO;
|
|
175
177
|
entry_id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/api",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.503",
|
|
4
4
|
"description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/api/index.js",
|