@north-light/sdk 0.3.429 → 0.3.431

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/crtr.js CHANGED
@@ -44,7 +44,7 @@ export function runCrtr(argv, timeoutMs) {
44
44
  }
45
45
  /** "This machine's crtr isn't joined …, so <what>." then the join step. */
46
46
  export const notJoinedLines = (what, joinStep) => [
47
- `This machine's crtr isn't joined to your crouter cloud account, so ${what}.`,
47
+ `This machine's crtr isn't joined to your Northlight account, so ${what}.`,
48
48
  joinStep,
49
49
  ];
50
50
  export const say = (lines) => console.error(lines.join('\n'));
@@ -47,13 +47,13 @@ export declare class MemoryConnectionStore implements ConnectionStore {
47
47
  lock<T>(userId: string, fn: () => Promise<T>): Promise<T>;
48
48
  }
49
49
  /**
50
- * A person's crouter cloud identity from a sign-in-only (`openid`, `openid email`, `openid profile`, or `openid email profile`) request, read from an
50
+ * A person's Northlight identity from a sign-in-only (`openid`, `openid email`, `openid profile`, or `openid email profile`) request, read from an
51
51
  * ID token the SDK verified: ES256 signature against the directory's JWKS, `iss`, `aud` = the client id,
52
52
  * `exp`, and the `nonce` from `authorizeUrl`. It is not a connection: it holds no runtime URL, refresh
53
53
  * token, or grant, and nothing can be called on the person's runtime with it.
54
54
  */
55
55
  export interface Identity {
56
- /** The person's crouter cloud user id (`user:<id>`), the same `sub` a `Connection.userId` carries. */
56
+ /** The person's Northlight user id (`user:<id>`), the same `sub` a `Connection.userId` carries. */
57
57
  sub: string;
58
58
  /** Present only when `email` was requested and approved. */
59
59
  email?: string;
@@ -137,7 +137,7 @@ export declare class OAuth2Client {
137
137
  * caller stops waiting for it at its own. */
138
138
  private discoveryWithin;
139
139
  /**
140
- * The app's page on the signed-in person's crouter cloud account, where they change or remove what the app may do:
140
+ * The app's page on the signed-in person's Northlight account, where they change or remove what the app may do:
141
141
  * the discovery document's `account_app_uri_template` with its one `{client_id}` replaced by the encoded client id.
142
142
  * Needs no user or connection; its only request is the shared discovery read. Throws `CrouterError` when the field
143
143
  * is absent, does not contain `{client_id}` exactly once, or does not expand to a URL on the issuer's origin.
@@ -152,7 +152,7 @@ export class OAuth2Client {
152
152
  }
153
153
  }
154
154
  /**
155
- * The app's page on the signed-in person's crouter cloud account, where they change or remove what the app may do:
155
+ * The app's page on the signed-in person's Northlight account, where they change or remove what the app may do:
156
156
  * the discovery document's `account_app_uri_template` with its one `{client_id}` replaced by the encoded client id.
157
157
  * Needs no user or connection; its only request is the shared discovery read. Throws `CrouterError` when the field
158
158
  * is absent, does not contain `{client_id}` exactly once, or does not expand to a URL on the issuer's origin.
@@ -600,7 +600,7 @@ function parseDiscovery(value, issuer) {
600
600
  };
601
601
  }
602
602
  function notConnected(userId) {
603
- return new CrouterError(`No stored connection for ${userId}: they must sign in with crouter cloud again`, 'not_connected');
603
+ return new CrouterError(`No stored connection for ${userId}: they must sign in with Northlight again`, 'not_connected');
604
604
  }
605
605
  function assertNotInHandler(userId) {
606
606
  if (handlerScope()?.getStore() === userId) {
@@ -19,7 +19,7 @@ export interface Refusal {
19
19
  kind: RefusalKind;
20
20
  /** The directory's code: `grant_removed`, `grant_suspended`, `app_in_testing`, `refresh_token_expired`, `refresh_token_reused`, or `grant_revoked`. */
21
21
  code: string;
22
- /** The connection's crouter cloud user id (`user:<id>`). */
22
+ /** The connection's Northlight user id (`user:<id>`). */
23
23
  userId: string;
24
24
  /** The grant the refused connection held. */
25
25
  grantId: string;
@@ -8,7 +8,7 @@ export interface GrantChanged {
8
8
  previous: GrantGetDTO | null;
9
9
  }
10
10
  export interface GrantWatchOptions {
11
- /** The people whose grant the app follows (crouter cloud user ids), read from its own rows. Called at `start()`,
11
+ /** The people whose grant the app follows (Northlight user ids), read from its own rows. Called at `start()`,
12
12
  * every `sweepMs`, after each delivery, and on `nudge()`. Return only people whose change the app will act on:
13
13
  * each followed person holds one request on their runtime per turn. A user no longer returned is forgotten. */
14
14
  users: () => Promise<string[]> | string[];
@@ -91,7 +91,7 @@ export interface FakeCloudOptions {
91
91
  /** Runtime→app run notices; without it nothing is sent. */
92
92
  runNotice?: RunNoticeOptions;
93
93
  /**
94
- * Whether the runtime can start an `isolated: true` run. `available` (default) models a crouter cloud guest, where
94
+ * Whether the runtime can start an `isolated: true` run. `available` (default) models a Northlight guest, where
95
95
  * the Linux root launcher always exists: the run starts, `run.params.isolated` is true, and a `cwd` outside the run's
96
96
  * root folder (`/apps/<clientId>/nodes/<run id>`) is 400 `invalid_request` `param: cwd`. `unavailable` models a
97
97
  * runtime without the launcher (a developer's Mac): every isolated start is 503 `isolated_unavailable`, retryable.
@@ -151,7 +151,7 @@ export interface FakeRuns {
151
151
  /** Set the responder (null clears it). On a user's `runs` it overrides the cloud's for that user. */
152
152
  respond(fn: Responder | null): void;
153
153
  }
154
- /** A fake crouter cloud: the directory (discovery, refresh, JWKS) and each person's runtime, behind `fetch`. */
154
+ /** A fake Northlight: the directory (discovery, refresh, JWKS) and each person's runtime, behind `fetch`. */
155
155
  export declare class FakeCloud {
156
156
  /** Pass to `OAuth2Client` (and `verifyRunNotice`) as `fetch`. Unique per cloud. */
157
157
  readonly fetch: typeof fetch;
@@ -56,7 +56,7 @@ function withSignal(promise, signal) {
56
56
  promise.then((value) => { signal.removeEventListener('abort', onAbort); resolve(value); }, (error) => { signal.removeEventListener('abort', onAbort); reject(error); });
57
57
  });
58
58
  }
59
- /** A fake crouter cloud: the directory (discovery, refresh, JWKS) and each person's runtime, behind `fetch`. */
59
+ /** A fake Northlight: the directory (discovery, refresh, JWKS) and each person's runtime, behind `fetch`. */
60
60
  export class FakeCloud {
61
61
  /** Pass to `OAuth2Client` (and `verifyRunNotice`) as `fetch`. Unique per cloud. */
62
62
  fetch;
@@ -1,4 +1,4 @@
1
- // `@north-light/sdk/testing`: a fake crouter cloud (directory + runtime) your real `OAuth2Client` and `Crouter` talk to
1
+ // `@north-light/sdk/testing`: a fake Northlight (directory + runtime) your real `OAuth2Client` and `Crouter` talk to
2
2
  // through `fetch`. Node-only; no test framework. See docs/sdk/testing.md.
3
3
  export { FakeCloud, FAKE_TESTER_LIMIT } from './cloud.js';
4
4
  export { manualClock } from './clock.js';
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.429";
2
+ export declare const SDK_VERSION = "0.3.431";
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.429';
3
+ export const SDK_VERSION = '0.3.431';
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.429",
3
+ "version": "0.3.431",
4
4
  "crouterContract": "1.0",
5
5
  "description": "Typed Node and browser client for running crouter agents through the crtrd /v1 API.",
6
6
  "type": "module",
@@ -41,8 +41,8 @@
41
41
  "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); }\""
42
42
  },
43
43
  "dependencies": {
44
- "@north-light/api": "0.3.429",
45
- "@north-light/identity": "0.3.429",
44
+ "@north-light/api": "0.3.431",
45
+ "@north-light/identity": "0.3.431",
46
46
  "jose": "^6.2.1"
47
47
  },
48
48
  "peerDependencies": {