@north-light/sdk 0.3.622 → 0.3.623
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/oauth/index.d.ts +4 -2
- package/dist/oauth/index.js +4 -2
- package/dist/skill/northlight/SKILL.md +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
package/dist/oauth/index.d.ts
CHANGED
|
@@ -170,12 +170,14 @@ export declare class OAuth2Client {
|
|
|
170
170
|
returnTo?: string;
|
|
171
171
|
}): Promise<string>;
|
|
172
172
|
/** Start a sign-in. When `scopes` includes `openid` the result carries the `nonce` to pass to the exchange; with literal scopes its type is `string`.
|
|
173
|
-
* `prompt: 'consent'` makes the directory show its consent screen even when the person already approved these scopes.
|
|
174
|
-
|
|
173
|
+
* `prompt: 'consent'` makes the directory show its consent screen even when the person already approved these scopes.
|
|
174
|
+
* `loginHint` is a phone number the app already collected (any format a person types; US or Canadian numbers can be texted): a signed-out person's sign-in page then shows it with one "Text me a link" button instead of asking for it. A number the directory cannot text only prefills its form. */
|
|
175
|
+
authorizeUrl<const S extends readonly string[]>({ scopes, state, codeVerifier, prompt, loginHint }: {
|
|
175
176
|
scopes: S;
|
|
176
177
|
state: string;
|
|
177
178
|
codeVerifier?: string;
|
|
178
179
|
prompt?: 'consent';
|
|
180
|
+
loginHint?: string;
|
|
179
181
|
}): Promise<{
|
|
180
182
|
url: string;
|
|
181
183
|
codeVerifier: string;
|
package/dist/oauth/index.js
CHANGED
|
@@ -228,8 +228,9 @@ export class OAuth2Client {
|
|
|
228
228
|
return url.toString();
|
|
229
229
|
}
|
|
230
230
|
/** Start a sign-in. When `scopes` includes `openid` the result carries the `nonce` to pass to the exchange; with literal scopes its type is `string`.
|
|
231
|
-
* `prompt: 'consent'` makes the directory show its consent screen even when the person already approved these scopes.
|
|
232
|
-
|
|
231
|
+
* `prompt: 'consent'` makes the directory show its consent screen even when the person already approved these scopes.
|
|
232
|
+
* `loginHint` is a phone number the app already collected (any format a person types; US or Canadian numbers can be texted): a signed-out person's sign-in page then shows it with one "Text me a link" button instead of asking for it. A number the directory cannot text only prefills its form. */
|
|
233
|
+
async authorizeUrl({ scopes, state, codeVerifier, prompt, loginHint }) {
|
|
233
234
|
for (const scope of scopes) {
|
|
234
235
|
if (scope === 'openid' || scope === 'email' || scope === 'profile')
|
|
235
236
|
continue;
|
|
@@ -249,6 +250,7 @@ export class OAuth2Client {
|
|
|
249
250
|
client_id: this.options.clientId, response_type: 'code', redirect_uri: this.options.redirectUri,
|
|
250
251
|
scope: scopes.join(' '), state, code_challenge: challenge, code_challenge_method: 'S256',
|
|
251
252
|
...(nonce ? { nonce } : {}), ...(prompt === undefined ? {} : { prompt }),
|
|
253
|
+
...(loginHint === undefined ? {} : { login_hint: loginHint }),
|
|
252
254
|
}).toString();
|
|
253
255
|
return { url: url.href, codeVerifier: verifier, state, ...(nonce ? { nonce } : {}) };
|
|
254
256
|
}
|
|
@@ -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.623"
|
|
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.623`. 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.623";
|
|
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.623';
|
|
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.623",
|
|
4
4
|
"crouterContract": "1.49",
|
|
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.623",
|
|
48
|
+
"@north-light/identity": "0.3.623",
|
|
49
|
+
"@north-light/plugin": "0.3.623",
|
|
50
50
|
"jose": "^6.2.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|