@north-light/sdk 0.3.891 → 0.3.893
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/index.d.ts +1 -1
- package/dist/resources/runs.d.ts +16 -0
- package/dist/resources/runs.js +4 -0
- package/dist/skill/northlight/SKILL.md +2 -2
- package/dist/testing/cloud.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type { CustomDeliveryStream, ReceiveOptions } from './resources/custom-ob
|
|
|
6
6
|
export type { RunEvent, RunEventOf, RunEventType, UnknownRunEvent } from './resources/run-stream.js';
|
|
7
7
|
export { RunReply } from './resources/run-reply.js';
|
|
8
8
|
export type { RunReplyCollectOptions, RunReplyEnding, RunReplyEvent, RunReplyResult, SentRunMessage } from './resources/run-reply.js';
|
|
9
|
-
export type { AppMachine, AppProfile, RunActivity, RunDeleteResult, RunObject, RunParsedOutcome, RunParseOptions, RunParseParams, RunRecap, RunStartParams, RunStartResult, StopHook, RunStatus, RunTrace } from './resources/runs.js';
|
|
9
|
+
export type { AppMachine, AppProfile, RunActivity, RunDeleteResult, RunImportParams, RunImportResult, RunObject, RunParsedOutcome, RunParseOptions, RunParseParams, RunRecap, RunStartParams, RunStartResult, StopHook, RunStatus, RunTrace } from './resources/runs.js';
|
|
10
10
|
export type { FileLink } from './resources/files.js';
|
|
11
11
|
export type { Upload, UploadCreateParams } from './resources/uploads.js';
|
|
12
12
|
export type { AttachmentLink } from './resources/attachments.js';
|
package/dist/resources/runs.d.ts
CHANGED
|
@@ -147,6 +147,20 @@ export interface AppMachine {
|
|
|
147
147
|
online: boolean; /** `owner/name` of each repository checked out on it. */
|
|
148
148
|
repositories: string[];
|
|
149
149
|
}
|
|
150
|
+
export interface RunImportParams {
|
|
151
|
+
transcript: string;
|
|
152
|
+
title: string;
|
|
153
|
+
created_at: string;
|
|
154
|
+
last_activity_at: string;
|
|
155
|
+
files: {
|
|
156
|
+
upload_id: string;
|
|
157
|
+
path: string;
|
|
158
|
+
}[];
|
|
159
|
+
}
|
|
160
|
+
export interface RunImportResult {
|
|
161
|
+
run_id: string;
|
|
162
|
+
created: boolean;
|
|
163
|
+
}
|
|
150
164
|
export interface RunDeleteResult {
|
|
151
165
|
run_id: string;
|
|
152
166
|
uploads_pending: number;
|
|
@@ -248,6 +262,8 @@ export declare class Runs {
|
|
|
248
262
|
* `cancel` first. Deleting a run that is already gone throws `NotFoundError` (404).
|
|
249
263
|
* `uploads_pending` counts the run's released uploads storage has not yet confirmed deleted; the runtime retries those. */
|
|
250
264
|
delete(runId: string, options?: RequestOptions): Promise<RunDeleteResult>;
|
|
265
|
+
/** Bring a finished conversation into this app as a resting run. `transcript` is a pi session JSONL string (header line, then entries); the header's `id` is the session id, and a second call with the same id returns the same run with `created: false`. `files` name uploads from `uploads.create` and the relative path each takes under the run's `attachments/old-work/` when the run next starts. Refusals: `storage_limit` (402) when the app's disk is full, `cap_exhausted` (402) when a spend limit is reached. */
|
|
266
|
+
import(params: RunImportParams, options?: RequestOptions): Promise<RunImportResult>;
|
|
251
267
|
/** Rename the caller's own run. The name is trimmed, must not be empty, and is at most 200 characters. */
|
|
252
268
|
rename(runId: string, name: string, options?: RequestOptions): Promise<RunObject>;
|
|
253
269
|
trace(runId: string, options?: RequestOptions & {
|
package/dist/resources/runs.js
CHANGED
|
@@ -119,6 +119,10 @@ export class Runs {
|
|
|
119
119
|
delete(runId, options) {
|
|
120
120
|
return this.request('DELETE', runPath(runId), undefined, options);
|
|
121
121
|
}
|
|
122
|
+
/** Bring a finished conversation into this app as a resting run. `transcript` is a pi session JSONL string (header line, then entries); the header's `id` is the session id, and a second call with the same id returns the same run with `created: false`. `files` name uploads from `uploads.create` and the relative path each takes under the run's `attachments/old-work/` when the run next starts. Refusals: `storage_limit` (402) when the app's disk is full, `cap_exhausted` (402) when a spend limit is reached. */
|
|
123
|
+
import(params, options) {
|
|
124
|
+
return this.request('POST', '/v1/runs/import', params, { ...options, maxRetries: 0 });
|
|
125
|
+
}
|
|
122
126
|
/** Rename the caller's own run. The name is trimmed, must not be empty, and is at most 200 characters. */
|
|
123
127
|
rename(runId, name, options) {
|
|
124
128
|
return this.request('POST', `${runPath(runId)}/rename`, { name }, options);
|
|
@@ -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.893"
|
|
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.893`. 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/testing/cloud.js
CHANGED
|
@@ -812,7 +812,7 @@ export class FakeCloud {
|
|
|
812
812
|
if (format && format !== 'entries')
|
|
813
813
|
throw invalid('unknown trace format', 'format');
|
|
814
814
|
const run = this.ownedRun(user, id);
|
|
815
|
-
return { status: 200, body: { run_id: run.id, latest_sequence: run.latestSequence, nodes: [], files: [] } };
|
|
815
|
+
return { status: 200, body: { run_id: run.id, latest_sequence: run.latestSequence, nodes: [], files: [], notices: [] } };
|
|
816
816
|
}
|
|
817
817
|
case 'question.get': {
|
|
818
818
|
const { run, question } = this.question(user, id);
|
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.893";
|
|
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.893';
|
|
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/sdk",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"crouterContract": "1.
|
|
3
|
+
"version": "0.3.893",
|
|
4
|
+
"crouterContract": "1.116",
|
|
5
5
|
"description": "Typed Node and browser client for running crouter agents through the crtrd /v1 API.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"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); }\""
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@north-light/api": "0.3.
|
|
54
|
-
"@north-light/identity": "0.3.
|
|
55
|
-
"@north-light/plugin": "0.3.
|
|
53
|
+
"@north-light/api": "0.3.893",
|
|
54
|
+
"@north-light/identity": "0.3.893",
|
|
55
|
+
"@north-light/plugin": "0.3.893",
|
|
56
56
|
"jose": "^6.2.1"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|