@north-light/sdk 0.3.630 → 0.3.631
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.
|
@@ -34,7 +34,7 @@ export interface InferenceEndpointOptions {
|
|
|
34
34
|
issuer: string;
|
|
35
35
|
/** The endpoint base URL the app registered, for example `https://context.northlight.ai/v1/inference`. The token's `aud` must equal it exactly; its path is where `handle` is mounted. The endpoint serves `POST <baseURL>/anthropic/v1/messages`. */
|
|
36
36
|
baseURL: string;
|
|
37
|
-
/** The app's own principal, `app:<id>`; the
|
|
37
|
+
/** The app's own principal, `app:<id>`; it prefixes the vendor reference of a call the vendor gave no request id. */
|
|
38
38
|
app: string;
|
|
39
39
|
/** The app's Anthropic API key. It is used only for a call the directory admits as card-paid (no `pool` in the admission), and is never logged or returned. */
|
|
40
40
|
apiKey: string;
|
|
@@ -54,7 +54,7 @@ export interface InferenceEndpointOptions {
|
|
|
54
54
|
* that serves a person's runtime the Anthropic Messages API. Mount `handle` at the path of `baseURL`; call `sweep` on a timer.
|
|
55
55
|
*
|
|
56
56
|
* The request carries a directory token (`x-api-key` or `Authorization: Bearer`) that the handler verifies (issuer, `aud` =
|
|
57
|
-
* `baseURL`, expiry, scope `crtr:llm
|
|
57
|
+
* `baseURL`, expiry, scope `crtr:llm`); a token that does not hold is 401 and nothing is sent upstream.
|
|
58
58
|
* A server-side tool or service tier is 400, a model outside `rungs` 404, a method other than POST 405. Otherwise the directory
|
|
59
59
|
* decides, per call and from current state, whether the call is admitted: a refusal reaches the runtime as a 402 carrying the
|
|
60
60
|
* directory's `payment` body, and a directory that cannot be reached or answers anything unexpected is 503 with nothing sent upstream.
|
|
@@ -144,7 +144,7 @@ function chargedBody(body, contentType, charge) {
|
|
|
144
144
|
* that serves a person's runtime the Anthropic Messages API. Mount `handle` at the path of `baseURL`; call `sweep` on a timer.
|
|
145
145
|
*
|
|
146
146
|
* The request carries a directory token (`x-api-key` or `Authorization: Bearer`) that the handler verifies (issuer, `aud` =
|
|
147
|
-
* `baseURL`, expiry, scope `crtr:llm
|
|
147
|
+
* `baseURL`, expiry, scope `crtr:llm`); a token that does not hold is 401 and nothing is sent upstream.
|
|
148
148
|
* A server-side tool or service tier is 400, a model outside `rungs` 404, a method other than POST 405. Otherwise the directory
|
|
149
149
|
* decides, per call and from current state, whether the call is admitted: a refusal reaches the runtime as a 402 carrying the
|
|
150
150
|
* directory's `payment` body, and a directory that cannot be reached or answers anything unexpected is 503 with nothing sent upstream.
|
|
@@ -269,7 +269,7 @@ export function inferenceEndpoint(options) {
|
|
|
269
269
|
let sub;
|
|
270
270
|
try {
|
|
271
271
|
const verified = await verifyCallToken({ token, jwks, issuer: options.issuer, audience: options.baseURL });
|
|
272
|
-
if (!(verified.scope ?? '').split(' ').includes(INFERENCE_SCOPE)
|
|
272
|
+
if (!(verified.scope ?? '').split(' ').includes(INFERENCE_SCOPE))
|
|
273
273
|
throw new Error('scope');
|
|
274
274
|
sub = verified.sub;
|
|
275
275
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: northlight
|
|
3
3
|
description: "Use when building, debugging or shipping an app that signs people in with Northlight, starts runs on their Northlight runtime, or calls Northlight providers (sms, search, integrations, context, device) with @north-light/sdk."
|
|
4
4
|
metadata:
|
|
5
|
-
sdk-version: "0.3.
|
|
5
|
+
sdk-version: "0.3.631"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Building a Northlight app
|
|
@@ -27,7 +27,7 @@ Never text a person first: Comms refuses a send to anyone who has not texted you
|
|
|
27
27
|
|
|
28
28
|
## First: check this skill matches the SDK
|
|
29
29
|
|
|
30
|
-
This skill is for SDK version `0.3.
|
|
30
|
+
This skill is for SDK version `0.3.631`. If the project has `node_modules/@north-light/sdk/package.json`, compare its `version` with that number. If they differ, run `npx @north-light/sdk skill` in the project, then read the rewritten `.agents/skills/northlight/SKILL.md` (or `.claude/skills/northlight/SKILL.md`) instead of this copy. It needs no account. A project that has no SDK yet starts with `npx @north-light/sdk@latest init <dir>`.
|
|
31
31
|
|
|
32
32
|
## Where things run
|
|
33
33
|
|
package/dist/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** This SDK's release version. Informational only: compatibility is the contract level, not this number. */
|
|
2
|
-
export declare const SDK_VERSION = "0.3.
|
|
2
|
+
export declare const SDK_VERSION = "0.3.631";
|
|
3
3
|
/** The release sent in `Crouter-Minimum-Runtime-Version` on every request. It is frozen, so a runtime from before the
|
|
4
4
|
* contract level existed (which only knows this header) refuses this SDK, while every later runtime accepts it. */
|
|
5
5
|
export declare const LEGACY_FLOOR = "0.3.423";
|
package/dist/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// SDK_VERSION is written by scripts/release-version.mjs on every release; do not edit by hand.
|
|
2
2
|
/** This SDK's release version. Informational only: compatibility is the contract level, not this number. */
|
|
3
|
-
export const SDK_VERSION = '0.3.
|
|
3
|
+
export const SDK_VERSION = '0.3.631';
|
|
4
4
|
// LEGACY_FLOOR is written once by `scripts/contract.mjs release`, at the first release that carries the contract level
|
|
5
5
|
// (the `0.0.0` placeholder is replaced there and never again); do not edit by hand.
|
|
6
6
|
/** The release sent in `Crouter-Minimum-Runtime-Version` on every request. It is frozen, so a runtime from before the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.631",
|
|
4
4
|
"crouterContract": "1.50",
|
|
5
5
|
"description": "Typed Node and browser client for running crouter agents through the crtrd /v1 API.",
|
|
6
6
|
"type": "module",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"prepublishOnly": "node -e \"if (process.env.npm_config_tag !== 'next') { console.error('@north-light/sdk publishes only with --tag next; scripts/promote-sdk.mjs is the only mover of latest.'); process.exit(1); }\""
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@north-light/api": "0.3.
|
|
48
|
-
"@north-light/identity": "0.3.
|
|
49
|
-
"@north-light/plugin": "0.3.
|
|
47
|
+
"@north-light/api": "0.3.631",
|
|
48
|
+
"@north-light/identity": "0.3.631",
|
|
49
|
+
"@north-light/plugin": "0.3.631",
|
|
50
50
|
"jose": "^6.2.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|