@north-light/cli 0.3.537 → 0.3.539
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/api/contract.d.ts +1 -1
- package/dist/api/contract.js +1 -1
- package/dist/api/dto/profiles.d.ts +2 -0
- package/dist/builtin-memory/crouter-sdk/release-notes.md +8 -0
- package/dist/clients/attach/viewer.js +454 -454
- package/dist/commands/profile/list.js +1 -1
- package/dist/commands/profile/show.js +1 -1
- package/dist/commands/sys/join.js +1 -1
- package/dist/commands/sys/sync-shared.d.ts +1 -1
- package/dist/commands/sys/sync-shared.js +1 -1
- package/dist/core/canvas/canvas.d.ts +0 -6
- package/dist/core/canvas/canvas.js +17 -22
- package/dist/core/canvas/crons.js +10 -10
- package/dist/core/canvas/db.js +4 -4
- package/dist/core/canvas/export-sqlite.js +1 -1
- package/dist/core/canvas/legacy-person.d.ts +4 -0
- package/dist/core/canvas/legacy-person.js +1 -0
- package/dist/core/canvas/migrations.js +58 -58
- package/dist/core/canvas/node-tokens.d.ts +0 -4
- package/dist/core/canvas/node-tokens.js +3 -3
- package/dist/core/canvas/person.d.ts +39 -0
- package/dist/core/canvas/person.js +18 -0
- package/dist/core/canvas/schema-pg.sql +11 -0
- package/dist/core/directory/join.d.ts +2 -2
- package/dist/core/environments.d.ts +10 -0
- package/dist/core/environments.js +1 -0
- package/dist/core/grants/local.d.ts +4 -4
- package/dist/core/grants/local.js +1 -1
- package/dist/core/grants/mirror.d.ts +1 -1
- package/dist/core/grants/on-sync.js +1 -1
- package/dist/core/grants/sync.js +1 -1
- package/dist/core/graph/kinds/environment.d.ts +2 -0
- package/dist/core/graph/kinds/environment.js +2 -0
- package/dist/core/graph/kinds/registry.js +1 -1
- package/dist/core/graph/objects.d.ts +1 -1
- package/dist/core/graph/objects.js +7 -7
- package/dist/core/graph/reader.d.ts +0 -1
- package/dist/core/graph/reader.js +3 -3
- package/dist/core/layout-migrate/index.js +3 -3
- package/dist/core/layout-migrate/stores.js +3 -3
- package/dist/core/peer/stubs.js +1 -1
- package/dist/core/runs/events.d.ts +0 -2
- package/dist/core/runs/events.js +4 -4
- package/dist/core/runs/operations.d.ts +0 -3
- package/dist/core/runs/operations.js +6 -6
- package/dist/core/runtime/close.js +1 -1
- package/dist/core/runtime/host.js +3 -3
- package/dist/core/runtime/launch-target.d.ts +10 -1
- package/dist/core/runtime/launch-target.js +1 -1
- package/dist/core/runtime/nodes.js +1 -1
- package/dist/core/scoped-state/db.js +2 -2
- package/dist/core/scoped-state/profiles.js +1 -1
- package/dist/core/scoped-state/schema.d.ts +4 -0
- package/dist/core/scoped-state/schema.js +3 -3
- package/dist/core/spaces/process.js +1 -1
- package/dist/daemon/api/handlers/crons.js +1 -1
- package/dist/daemon/api/handlers/hook-exec.js +1 -1
- package/dist/daemon/api/handlers/memory.js +5 -5
- package/dist/daemon/api/handlers/messages.js +2 -2
- package/dist/daemon/api/handlers/nodes.js +1 -1
- package/dist/daemon/api/handlers/profiles.js +1 -1
- package/dist/daemon/api/reader.js +1 -1
- package/dist/daemon/api/router.js +1 -1
- package/dist/daemon/api/vendor-signin.js +15 -15
- package/dist/daemon/cron/armed-context.js +1 -1
- package/dist/daemon/cron/authority.d.ts +1 -2
- package/dist/daemon/cron/authority.js +1 -1
- package/dist/daemon/crtrd.js +12 -12
- package/dist/daemon/reconcilers/storage-maintenance.d.ts +3 -0
- package/dist/daemon/reconcilers/storage-maintenance.js +1 -1
- package/dist/migrations/004-canvas-documents/apply.js +1 -1
- package/dist/migrations/004-canvas-documents/index.js +2 -2
- package/dist/types.d.ts +2 -0
- package/docs/cli/join-northlight.md +1 -1
- package/docs/sdk/release-notes.md +8 -0
- package/package.json +2 -2
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +12 -12
- package/dist/daemon/joined-owner.d.ts +0 -5
- package/dist/daemon/joined-owner.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var R=Object.defineProperty;var p=(e,n)=>R(e,"name",{value:n,configurable:!0});import{existsSync as
|
|
2
|
-
LEFT JOIN identities i ON i.object = o.id WHERE o.type IN ('person','app','repo','profile')`).all();return
|
|
1
|
+
var R=Object.defineProperty;var p=(e,n)=>R(e,"name",{value:n,configurable:!0});import{existsSync as f}from"node:fs";import{join as l}from"node:path";import{openDb as m,withCanvasWrite as g}from"../../core/canvas/db.js";import{nodeAgentDir as C,nodeRecordDir as S,onDiskMigrationMarkerPath as k}from"../../core/canvas/paths.js";import{identifyCheckout as E}from"../../core/graph/repo-sync/identity.js";import{profileSpace as L,userRoot as j}from"../../core/layout.js";import{commitConvertedProjectCaps as I,listLegacyProjectCaps as P,listStoredProfiles as _}from"../../core/scoped-state/profiles.js";import{userStore as b}from"../../core/scoped-state/paths.js";import{userScopeRoot as y}from"../../core/scope.js";import{LEGACY_LOCAL_PERSON as O}from"../../core/canvas/legacy-person.js";import{applyPlan as x,readImportRecord as w,storePlanBodies as M}from"./apply.js";import{readLegacyCorpus as v,readMarkerIds as D}from"./legacy/discover.js";import{planImport as A}from"./plan.js";const F=p(()=>({stores:[],counts:{},rewrites:[],droppedFields:[],skipped:[],resolutions:[]}),"emptyReport");async function N(){const e=y(),n=_(e),t=P(e),c=b(e).path,s=n.map(({profileId:r,manifest:a})=>{const i=a.grantee??"app:terminal",d=new Map(t.filter(o=>o.profileId===r).map(o=>[o.path,o.memory]));return{id:r,name:a.name,app:i,memory:L(i,r).dir,projects:a.projects.map(o=>o.path),raw:{projects:a.projects.map(o=>d.has(o.path)?{path:o.path,memory:d.get(o.path)}:{path:o.path})},manifestPath:`${c}#${r}`}}),u=await(await m()).prepareUncached("SELECT node_id, cwd, grantee FROM node_rows ORDER BY created").all(),h=u.map(r=>{const a=r.grantee===O?"app:terminal":r.grantee,i=a?.startsWith("app:")?C(r.node_id,a):null,d=i!==null&&(f(l(i,"context"))||f(l(i,"reports")))?i:S(r.node_id);return{id:r.node_id,dir:d}});return{roots:{userMemory:l(j(),"memory"),profiles:s,nodeCwds:[...new Set(u.map(r=>r.cwd))],nodes:h},stored:n}}p(N,"legacyRoots");async function T(){const{roots:e,stored:n}=await N(),t=v(e),c=await(await m()).prepareUncached(`SELECT o.type, o.name AS handle, i.external_id AS externalId FROM objects o
|
|
2
|
+
LEFT JOIN identities i ON i.object = o.id WHERE o.type IN ('person','app','repo','profile')`).all();return A(t,{roots:e,markerIds:D(k()),repoIdentity:E,existingOwners:c,storedProfiles:n.map(s=>({id:s.profileId,deliveryLimits:{...s.manifest.delivery_limits??{}}}))})}p(T,"plan");async function Z(){return await w(await m())!==null}p(Z,"canvasImportDone");async function ee(e){const n=await w(await m());if(n!==null)return{report:e.dryRun?n:F(),blockers:[],dryRun:e.dryRun,pending:!1};const t=await T();if(e.dryRun||t.blockers.length>0)return{report:t.report,blockers:t.blockers,dryRun:e.dryRun,pending:!0};const c=M(t);return I(y(),t.profileLimits),await g(async s=>await x(s,t,c)),{report:t.report,blockers:[],dryRun:!1,pending:!1}}p(ee,"runCanvasImport");export{Z as canvasImportDone,ee as runCanvasImport};
|
package/dist/types.d.ts
CHANGED
|
@@ -553,6 +553,8 @@ export interface ProfileManifest {
|
|
|
553
553
|
delivery_limits?: DeliveryLimits;
|
|
554
554
|
/** App that owns this profile; older terminal profiles have no grantee. */
|
|
555
555
|
grantee?: string;
|
|
556
|
+
/** The environment the profile's nodes run in; absent means the install's machine environment. */
|
|
557
|
+
environment_id?: string;
|
|
556
558
|
created_at: string;
|
|
557
559
|
last_used_at: string | null;
|
|
558
560
|
}
|
|
@@ -23,7 +23,7 @@ Then join your laptop to the account:
|
|
|
23
23
|
|
|
24
24
|
Things to know before you join:
|
|
25
25
|
|
|
26
|
-
- **Joining rewrites your crtr home.**
|
|
26
|
+
- **Joining rewrites your crtr home.** The person this install minted becomes your Northlight user, the next time the daemon starts: your nodes, crons, usage and history in this home are then yours on the account. If you would rather not do that to your everyday home, join from a home you can throw away.
|
|
27
27
|
- **There is no unjoin.** The only undo is removing the machine on `/account/machines`.
|
|
28
28
|
- **Removing the machine stops it.** Once you choose **Remove** next to a machine, it gets no new tokens at once and the ones it holds expire within 5 minutes. After that its `cloud` commands answer `machine_revoked`: "This machine was removed from your Northlight account." It stays that way until you create a new join token and run `crtr sys join` again. Files on the computer stay on it.
|
|
29
29
|
- **Your hosted machine is unchanged.** `/account/machines` lists it as "Northlight (hosted)", the default. Your chat agent at `https://chat.northlight.ai` still runs `crtr cloud apps …` as before.
|
|
@@ -7,6 +7,14 @@ description: Behavior changes in @north-light/sdk that an app must act on, newes
|
|
|
7
7
|
|
|
8
8
|
Changes to `@north-light/sdk` that can change what an existing app sees. Newest first.
|
|
9
9
|
|
|
10
|
+
## 0.3.539
|
|
11
|
+
|
|
12
|
+
A run started with no `kind` and no `model`, in a profile with no `default_kind` (every app's own default profile), now starts as the `general` kind on the `medium` rung. It used to start as `developer` on that kind's model (`openai/medium`). `profile.list` reports `general` as such a profile's `default_kind`. On an app-paid grant the run lands on the app's `medium` inference rung, where it used to land on `strong`. Pass `model` on `run.start` to keep another rung.
|
|
13
|
+
|
|
14
|
+
Profiles name the machine environment they run on. Additive: no request or response an existing app sends or reads changes.
|
|
15
|
+
|
|
16
|
+
- Profile reads (`GET /v1/profiles`, `GET /v1/profiles/:name`) carry an optional `environment_id`: the profile's pinned environment, or this machine's environment when none is pinned. A runtime that predates the field omits it.
|
|
17
|
+
|
|
10
18
|
## 0.3.534
|
|
11
19
|
|
|
12
20
|
A cron armed by a caller with no scope limit follows the grant, and a narrowed scope pauses it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.539",
|
|
4
4
|
"description": "crtr — agent runtime with memory, plugins, and marketplaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
},
|
|
141
141
|
"license": "UNLICENSED",
|
|
142
142
|
"dependencies": {
|
|
143
|
-
"@north-light/identity": "0.3.
|
|
143
|
+
"@north-light/identity": "0.3.539",
|
|
144
144
|
"@earendil-works/pi-agent-core": "1.1.0",
|
|
145
145
|
"@earendil-works/pi-ai": "1.1.0",
|
|
146
146
|
"@earendil-works/pi-coding-agent": "1.1.0",
|
package/runtime.lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.539",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@north-light/cli",
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.539",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "UNLICENSED",
|
|
12
12
|
"workspaces": [
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@milkdown/preset-gfm": "^7.22.3",
|
|
25
25
|
"@milkdown/prose": "^7.22.3",
|
|
26
26
|
"@milkdown/utils": "^7.22.3",
|
|
27
|
-
"@north-light/identity": "0.3.
|
|
27
|
+
"@north-light/identity": "0.3.539",
|
|
28
28
|
"cron-parser": "^5.6.0",
|
|
29
29
|
"esbuild": "^0.27.7",
|
|
30
30
|
"jose": "^6.2.12",
|
|
@@ -12455,17 +12455,17 @@
|
|
|
12455
12455
|
},
|
|
12456
12456
|
"packages/crouter-api": {
|
|
12457
12457
|
"name": "@north-light/api",
|
|
12458
|
-
"version": "0.3.
|
|
12458
|
+
"version": "0.3.539",
|
|
12459
12459
|
"license": "UNLICENSED"
|
|
12460
12460
|
},
|
|
12461
12461
|
"packages/crouter-env-docker": {
|
|
12462
12462
|
"name": "@north-light/env-docker",
|
|
12463
|
-
"version": "0.3.
|
|
12463
|
+
"version": "0.3.539",
|
|
12464
12464
|
"license": "UNLICENSED"
|
|
12465
12465
|
},
|
|
12466
12466
|
"packages/crouter-identity": {
|
|
12467
12467
|
"name": "@north-light/identity",
|
|
12468
|
-
"version": "0.3.
|
|
12468
|
+
"version": "0.3.539",
|
|
12469
12469
|
"license": "UNLICENSED",
|
|
12470
12470
|
"dependencies": {
|
|
12471
12471
|
"jose": "^6.2.1"
|
|
@@ -12473,20 +12473,20 @@
|
|
|
12473
12473
|
},
|
|
12474
12474
|
"packages/crouter-plugin": {
|
|
12475
12475
|
"name": "@north-light/plugin",
|
|
12476
|
-
"version": "0.3.
|
|
12476
|
+
"version": "0.3.539",
|
|
12477
12477
|
"license": "UNLICENSED",
|
|
12478
12478
|
"dependencies": {
|
|
12479
|
-
"@north-light/api": "0.3.
|
|
12480
|
-
"@north-light/identity": "0.3.
|
|
12479
|
+
"@north-light/api": "0.3.539",
|
|
12480
|
+
"@north-light/identity": "0.3.539"
|
|
12481
12481
|
}
|
|
12482
12482
|
},
|
|
12483
12483
|
"packages/crouter-sdk": {
|
|
12484
12484
|
"name": "@north-light/sdk",
|
|
12485
|
-
"version": "0.3.
|
|
12485
|
+
"version": "0.3.539",
|
|
12486
12486
|
"license": "UNLICENSED",
|
|
12487
12487
|
"dependencies": {
|
|
12488
|
-
"@north-light/api": "0.3.
|
|
12489
|
-
"@north-light/identity": "0.3.
|
|
12488
|
+
"@north-light/api": "0.3.539",
|
|
12489
|
+
"@north-light/identity": "0.3.539",
|
|
12490
12490
|
"jose": "^6.2.1"
|
|
12491
12491
|
},
|
|
12492
12492
|
"bin": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var a=(r,e)=>i(r,"name",{value:e,configurable:!0});import{withCanvasWrite as p}from"../core/canvas/db.js";import{rewriteLocalNodeIdentity as l}from"../core/canvas/canvas.js";import{rewriteLocalNodeTokenIdentity as m}from"../core/canvas/node-tokens.js";import{joinedOwner as w}from"../core/directory/join.js";import{LOCAL_TERMINAL_GRANT_ID as t}from"../core/grants/local.js";import{dropLocalGrantMirror as c}from"../core/grants/mirror.js";import{rewriteLocalRunEventGrantee as u}from"../core/runs/events.js";import{rewriteLocalIdempotencyGrantee as E}from"../core/runs/operations.js";const o="joined_owner_applied";async function d(){const r=w();return r===null?null:await p(async e=>{if((await e.prepare("SELECT value FROM canvas_meta WHERE key = ?").get(o))?.value===r)return null;const n=await l(e,r,t)+await m(e,r,t)+await c(e)+await u(e)+await E(e);return await e.prepare("INSERT INTO canvas_meta (key, value) VALUES (?, ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value").run(o,r),{owner:r,rows:n}})}a(d,"applyJoinedOwner");export{d as applyJoinedOwner};
|