@north-light/sdk 0.3.860 → 0.3.862

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/client.d.ts CHANGED
@@ -19,7 +19,7 @@ import { Shares } from './resources/shares.js';
19
19
  import { Memory } from './resources/memory.js';
20
20
  import { Uploads } from './resources/uploads.js';
21
21
  import type { RequestOptions } from './types.js';
22
- import type { AppProfile } from './resources/runs.js';
22
+ import type { AppMachine, AppProfile } from './resources/runs.js';
23
23
  /** Connection settings for a Crouter daemon. `headers` lets a Docker environment's
24
24
  * `connection()` result pass directly to this constructor. */
25
25
  export interface CrouterOptions {
@@ -70,6 +70,12 @@ export declare class Crouter {
70
70
  readonly customObjects: CustomObjects;
71
71
  /** Install a model credential (`models.credentials.install`); the person's own client only. */
72
72
  readonly models: Models;
73
+ /** Machines the app is granted. */
74
+ readonly machines: {
75
+ list: (options?: RequestOptions) => Promise<{
76
+ machines: AppMachine[];
77
+ }>;
78
+ };
73
79
  /** Agent profiles. */
74
80
  readonly profiles: {
75
81
  /** The profiles an app may start runs with (app listener only): its own, and those of other apps its grant covers. `default` marks its default profile. */
package/dist/client.js CHANGED
@@ -35,6 +35,8 @@ export class Crouter {
35
35
  customObjects;
36
36
  /** Install a model credential (`models.credentials.install`); the person's own client only. */
37
37
  models;
38
+ /** Machines the app is granted. */
39
+ machines;
38
40
  /** Agent profiles. */
39
41
  profiles;
40
42
  /** A download link for a file an agent handed over, by its id (`files.link`). */
@@ -164,6 +166,7 @@ export class Crouter {
164
166
  this.canvas = new Canvas(request);
165
167
  this.customObjects = new CustomObjects(request, (path, options) => this.openCustomDeliveries(path, options));
166
168
  this.models = new Models(request);
169
+ this.machines = { list: (options) => this.call(deadline(options), (options) => this.client.request('GET', routes.machines(), undefined, options)) };
167
170
  this.profiles = {
168
171
  list: (options) => this.call(deadline(options), (options) => this.client.request('GET', routes.profiles(), undefined, options)),
169
172
  };
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 { AppProfile, RunActivity, RunDeleteResult, RunObject, RunParsedOutcome, RunParseOptions, RunParseParams, RunRecap, RunStartParams, RunStartResult, RunStatus, RunTrace } from './resources/runs.js';
9
+ export type { AppMachine, AppProfile, RunActivity, RunDeleteResult, RunObject, RunParsedOutcome, RunParseOptions, RunParseParams, RunRecap, RunStartParams, RunStartResult, 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';
@@ -88,7 +88,7 @@ export declare class Questions {
88
88
  history(query: {
89
89
  settled_since: string;
90
90
  }, options?: RequestOptions): Promise<QuestionHistory>;
91
- /** The person's Discuss conversation about an open question with a copy of the asking agent, from its first message on. Empty before one is posted. The ticket id is the question id. */
91
+ /** The person's Discuss conversation about an open question with a copy of the asking agent, from its first message on. Empty before one is posted. The path takes the question id. */
92
92
  discuss(questionId: string, options?: RequestOptions): Promise<DiscussDTO>;
93
93
  /** Post a Discuss message. The first one forks the asking agent at that moment. The message never reaches the question's result. */
94
94
  postDiscuss(questionId: string, text: string, options?: RequestOptions): Promise<PostDiscussMessageDTO>;
@@ -27,7 +27,7 @@ export class Questions {
27
27
  history(query, options) {
28
28
  return this.request('GET', withQuery('/v1/questions', query), undefined, options);
29
29
  }
30
- /** The person's Discuss conversation about an open question with a copy of the asking agent, from its first message on. Empty before one is posted. The ticket id is the question id. */
30
+ /** The person's Discuss conversation about an open question with a copy of the asking agent, from its first message on. Empty before one is posted. The path takes the question id. */
31
31
  discuss(questionId, options) {
32
32
  return this.request('GET', discussPath(questionId), undefined, options);
33
33
  }
@@ -15,6 +15,10 @@ export interface RunStartParams {
15
15
  fixed_subject?: boolean;
16
16
  /** Profile id (`profile_id` from `profiles.list()`) the run's agent uses; absent uses the app's default profile. */
17
17
  profile?: string;
18
+ /** Run on this granted machine (`machines.list()`'s `machine_id`); needs `repository`. Refused before anything is created: `scope_missing`, `machine_not_found`, `machine_offline`, `repository_not_covered`, `repository_required`. */
19
+ machine?: string;
20
+ /** `owner/name` checked out on `machine`; the run works in a managed worktree of it. */
21
+ repository?: string;
18
22
  /** The model the run's root agent runs on: a bare strength (`medium`, resolved against the default provider), `family/strength` (`anthropic/medium`), or a concrete registered model id. Absent uses the run kind's default. Applies to the root only; its child nodes choose their own. An unknown or unregistered value is refused (`invalid_request`, `param: model`). */
19
23
  model?: string;
20
24
  /** Wall-clock limit on the run, measured from start: one or more `<int>[smhd]` parts (`10m`, `1h30m`), at most `24h`. When it passes the run settles with outcome `deadline_exceeded` (`runs.get`'s `outcome.reason`) and its agent is stopped. Absent sets no limit. A malformed, zero or over-24h value is refused (`invalid_request`, `param: deadline`). */
@@ -115,7 +119,18 @@ export interface AppProfile {
115
119
  grantee: string;
116
120
  default_kind: string;
117
121
  default: boolean; /** `owner/name` of a cloud dev profile's repositories; empty otherwise. */
118
- repositories?: string[];
122
+ repositories?: string[]; /** The environment the profile runs in; null for a profile on the hosted machine. */
123
+ environment?: {
124
+ id: string;
125
+ kind: 'machine' | 'blaxel';
126
+ } | null;
127
+ }
128
+ /** A machine the app's grant covers (`crtr:machine:<machine_id>`). */
129
+ export interface AppMachine {
130
+ machine_id: string;
131
+ name: string;
132
+ online: boolean; /** `owner/name` of each repository checked out on it. */
133
+ repositories: string[];
119
134
  }
120
135
  export interface RunDeleteResult {
121
136
  run_id: string;
@@ -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.860"
5
+ sdk-version: "0.3.862"
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.860`. 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>`.
30
+ This skill is for SDK version `0.3.862`. 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.860";
2
+ export declare const SDK_VERSION = "0.3.862";
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.860';
3
+ export const SDK_VERSION = '0.3.862';
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.860",
4
- "crouterContract": "1.105",
3
+ "version": "0.3.862",
4
+ "crouterContract": "1.106",
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.860",
54
- "@north-light/identity": "0.3.860",
55
- "@north-light/plugin": "0.3.860",
53
+ "@north-light/api": "0.3.862",
54
+ "@north-light/identity": "0.3.862",
55
+ "@north-light/plugin": "0.3.862",
56
56
  "jose": "^6.2.1"
57
57
  },
58
58
  "peerDependencies": {