@north-light/sdk 0.3.543 → 0.3.544

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.
@@ -2,16 +2,32 @@
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.543"
5
+ sdk-version: "0.3.544"
6
6
  ---
7
7
 
8
8
  # Building a Northlight app
9
9
 
10
- An app on Northlight signs people in with their Northlight account, then starts agent runs and calls providers (sms, search, integrations, context, device) on that person's own Northlight-hosted runtime, using their AI subscription. You write and host the app server with `@north-light/sdk`. Northlight hosts the directory (accounts, app registration, consent, the marketplace) and each person's runtime. It does not host your app's code. See [Where your app runs](https://sdk.docs.northlight.ai/docs/how-it-fits.md).
10
+ An app on Northlight signs people in with their Northlight account, then starts agent runs and calls providers (sms, search, integrations, context, device) on that person's own Northlight-hosted runtime, using their AI subscription. You write and host the app server with [`@north-light/sdk`](https://www.npmjs.com/package/@north-light/sdk). Northlight hosts the directory (accounts, app registration, consent, the marketplace) and each person's runtime. It does not host your app's code. See [Where your app runs](https://sdk.docs.northlight.ai/docs/how-it-fits.md).
11
+
12
+ ## If the person gave you an idea: build it as an app people text
13
+
14
+ The default Northlight app is one people text. It gets its own iMessage number through Comms; each text reaches your server as a webhook, and your server answers with an agent run on the texter's own runtime. If the person gave you an idea, build it this way. If they gave you none, ask them what the app should do before you start.
15
+
16
+ [comms.northlight.ai/llms.txt](https://comms.northlight.ai/llms.txt) is the whole Comms guide: read it and follow it rather than this summary. [Reach people by text](https://sdk.docs.northlight.ai/docs/reach-people-by-text.md) shows the webhook handler.
17
+
18
+ 1. **Build in fake mode.** `npx @north-light/sdk@latest init <dir>`, then `npm i @north-light/comms --legacy-peer-deps` (its 0.3.0 release pins an older `@north-light/sdk` as an optional peer). Run `npx @north-light/comms fake --webhook http://localhost:3000/hook`, and play a person with `npx @north-light/comms fake send --from +15550001 --text "hi"`. No account is needed yet.
19
+ 2. **Sign up, log in, register.** Steps 1 to 4 of the journey below. Comms signs in with the same app key.
20
+ 3. **Connect the app to Comms.** Ask the person to sign in at `https://comms.northlight.ai` and choose **Connect an app**; an admin of the app approves it there. This is done in a browser only.
21
+ 4. **Turn Texting on**, on the app's page there or with `crtr comms turn-on`: display name, square avatar, HELP text, test webhook URL. Copy the test signing secret it shows into the server's environment.
22
+ 5. **Answer with an agent run.** On `message.received`, get the person's runtime with `oauth.client(contact.user.id)` and pass it to `continueInRuntime` from `@north-light/comms`. When that throws `not_connected`, call `sendSignInLink(comms, contact, {environment: event.environment})` so the person signs in to your app.
23
+ 6. **Text it from the person's phone, in test mode.** Test mode is free. Add them as a tester (`crtr comms testers add --app-id <id> --phone <number> --label <name>`, or on the site) and ask them to text `JOIN <code>` to the test number; the Comms guide has the tester limit.
24
+ 7. **Production is paid.** When they want the app's own number and anyone to text it, they add a card on the billing account at `https://comms.northlight.ai`. Do not promise a free production number.
25
+
26
+ Never text a person first: Comms refuses a send to anyone who has not texted your number (`403 not_texted_first`). The rest of this skill is the Northlight side: sign-in, runs and providers.
11
27
 
12
28
  ## First: check this skill matches the SDK
13
29
 
14
- This skill is for SDK version `0.3.543`. 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. That command needs no account and no crtr. A project that has no SDK yet starts with `npx @north-light/sdk@latest init <dir>`.
30
+ This skill is for SDK version `0.3.544`. 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>`.
15
31
 
16
32
  ## Where things run
17
33
 
@@ -164,7 +180,7 @@ Details behind each rule: [Errors](https://sdk.docs.northlight.ai/docs/errors.md
164
180
 
165
181
  ## The CLI
166
182
 
167
- `npx @north-light/sdk <command>`. None needs crtr unless noted.
183
+ `npx @north-light/sdk <command>`. The last column says which commands also use `crtr`, the [`@north-light/cli`](https://www.npmjs.com/package/@north-light/cli) runtime, when it is joined to your account.
168
184
 
169
185
  | Command | Effect | Needs crtr |
170
186
  |---|---|---|
@@ -180,28 +196,46 @@ Details behind each rule: [Errors](https://sdk.docs.northlight.ai/docs/errors.md
180
196
 
181
197
  ## Pages
182
198
 
183
- Read a page as markdown by adding `.md` to its URL. The whole site as one file: https://sdk.docs.northlight.ai/llms-full.txt.
199
+ Read a page as markdown by adding `.md` to its URL. The whole site as one file: https://sdk.docs.northlight.ai/llms-full.txt. The site is organised by what the app does; each section's first page shows one snippet and lists its guides:
200
+
201
+ - [Get started](https://sdk.docs.northlight.ai/docs/get-started.md): account, registration, sign-in, connections, scopes, testing mode.
202
+ - [Let your app use our AI](https://sdk.docs.northlight.ai/docs/use-our-ai.md): runs on the person's runtime, typed results, streaming, background runs.
203
+ - [Let your app use our apps](https://sdk.docs.northlight.ai/docs/use-our-apps.md): providers (sms, search, integrations, context, device).
204
+ - [Let your app know the person](https://sdk.docs.northlight.ai/docs/know-the-person.md): the context provider and their public documents.
205
+ - [Reach people by text](https://sdk.docs.northlight.ai/docs/reach-people-by-text.md): your app's own number with Comms.
206
+ - [Let the person's AI use your app](https://sdk.docs.northlight.ai/docs/let-their-ai-use-your-app.md): offer tools with [`@north-light/plugin`](https://www.npmjs.com/package/@north-light/plugin).
207
+ - [Let other apps build on yours](https://sdk.docs.northlight.ai/docs/build-on-your-app.md): offer a service and list it with a docs link.
184
208
 
209
+ Every page:
210
+
211
+ - [Get started](https://sdk.docs.northlight.ai/docs/get-started.md)
185
212
  - [Quick setup](https://sdk.docs.northlight.ai/docs/quickstart.md)
186
213
  - [Use your coding agent](https://sdk.docs.northlight.ai/docs/coding-agents.md)
187
214
  - [Where your app runs](https://sdk.docs.northlight.ai/docs/how-it-fits.md)
188
215
  - [Apps and sign-in](https://sdk.docs.northlight.ai/docs/concepts/apps-and-sign-in.md)
189
216
  - [Scopes and grants](https://sdk.docs.northlight.ai/docs/concepts/scopes-and-grants.md)
190
217
  - [Connections](https://sdk.docs.northlight.ai/docs/concepts/connections.md)
191
- - [Runs](https://sdk.docs.northlight.ai/docs/concepts/runs.md)
192
218
  - [Testing mode](https://sdk.docs.northlight.ai/docs/concepts/testing-mode.md)
193
- - [Providers](https://sdk.docs.northlight.ai/docs/concepts/providers.md)
219
+ - [Test your app](https://sdk.docs.northlight.ai/docs/guides/test-your-app.md)
220
+ - [Manage your app](https://sdk.docs.northlight.ai/docs/guides/manage-your-app.md)
221
+ - [Go live](https://sdk.docs.northlight.ai/docs/guides/go-live.md)
222
+ - [Let your app use our AI](https://sdk.docs.northlight.ai/docs/use-our-ai.md)
223
+ - [Runs](https://sdk.docs.northlight.ai/docs/concepts/runs.md)
194
224
  - [Typed results](https://sdk.docs.northlight.ai/docs/guides/typed-results.md)
195
225
  - [Stream a run](https://sdk.docs.northlight.ai/docs/guides/stream-a-run.md)
196
226
  - [Background runs](https://sdk.docs.northlight.ai/docs/guides/background-runs.md)
197
- - [Many users](https://sdk.docs.northlight.ai/docs/guides/many-users.md)
198
- - [Grant changes](https://sdk.docs.northlight.ai/docs/guides/grant-changes.md)
199
227
  - [Files and documents](https://sdk.docs.northlight.ai/docs/guides/files-and-documents.md)
200
- - [Test your app](https://sdk.docs.northlight.ai/docs/guides/test-your-app.md)
201
- - [Manage your app](https://sdk.docs.northlight.ai/docs/guides/manage-your-app.md)
202
- - [Go live](https://sdk.docs.northlight.ai/docs/guides/go-live.md)
228
+ - [Many users](https://sdk.docs.northlight.ai/docs/guides/many-users.md)
229
+ - [Let your app use our apps](https://sdk.docs.northlight.ai/docs/use-our-apps.md)
230
+ - [Providers](https://sdk.docs.northlight.ai/docs/concepts/providers.md)
203
231
  - [Providers index](https://sdk.docs.northlight.ai/docs/providers.md)
204
232
  - [Texting (sms)](https://sdk.docs.northlight.ai/docs/providers/sms.md)
233
+ - [Grant changes](https://sdk.docs.northlight.ai/docs/guides/grant-changes.md)
234
+ - [Let your app know the person](https://sdk.docs.northlight.ai/docs/know-the-person.md)
235
+ - [Context](https://sdk.docs.northlight.ai/docs/providers/context.md)
236
+ - [Reach people by text](https://sdk.docs.northlight.ai/docs/reach-people-by-text.md)
237
+ - [Let the person's AI use your app](https://sdk.docs.northlight.ai/docs/let-their-ai-use-your-app.md)
238
+ - [Let other apps build on yours](https://sdk.docs.northlight.ai/docs/build-on-your-app.md)
205
239
  - [Errors](https://sdk.docs.northlight.ai/docs/errors.md)
206
240
  - [CLI reference](https://sdk.docs.northlight.ai/docs/cli.md)
207
241
  - [Release notes](https://sdk.docs.northlight.ai/docs/release-notes.md)
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.543";
2
+ export declare const SDK_VERSION = "0.3.544";
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.543';
3
+ export const SDK_VERSION = '0.3.544';
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.543",
3
+ "version": "0.3.544",
4
4
  "crouterContract": "1.29",
5
5
  "description": "Typed Node and browser client for running crouter agents through the crtrd /v1 API.",
6
6
  "type": "module",
@@ -44,8 +44,8 @@
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.543",
48
- "@north-light/identity": "0.3.543",
47
+ "@north-light/api": "0.3.544",
48
+ "@north-light/identity": "0.3.544",
49
49
  "jose": "^6.2.1"
50
50
  },
51
51
  "peerDependencies": {