@north-light/cli 0.3.711 → 0.3.713

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.
Files changed (71) hide show
  1. package/dist/clients/attach/input/controller.d.ts +6 -0
  2. package/dist/clients/attach/input/controller.js +3 -3
  3. package/dist/clients/attach/input/local-files.d.ts +16 -0
  4. package/dist/clients/attach/input/local-files.js +6 -0
  5. package/dist/clients/attach/session/editor-frame.d.ts +2 -2
  6. package/dist/clients/attach/session/editor-frame.js +1 -1
  7. package/dist/clients/attach/viewer.js +406 -402
  8. package/dist/commands/node/bash.js +1 -1
  9. package/dist/core/bash-guard.d.ts +10 -0
  10. package/dist/core/bash-guard.js +4 -4
  11. package/dist/core/broker-client/client.d.ts +2 -2
  12. package/dist/core/conversation-store/row-store.js +1 -1
  13. package/dist/core/graph/documents.d.ts +5 -5
  14. package/dist/core/graph/documents.js +9 -9
  15. package/dist/core/graph/kinds/custom.js +2 -2
  16. package/dist/core/graph/kinds/document.js +4 -4
  17. package/dist/core/graph/kinds/environment.js +2 -2
  18. package/dist/core/graph/kinds/job.js +2 -2
  19. package/dist/core/graph/kinds/kind.d.ts +9 -1
  20. package/dist/core/graph/kinds/live-read.d.ts +4 -2
  21. package/dist/core/graph/kinds/live-read.js +1 -1
  22. package/dist/core/graph/kinds/node.js +5 -5
  23. package/dist/core/graph/kinds/owner.js +2 -2
  24. package/dist/core/graph/reader.js +3 -3
  25. package/dist/core/import/load/run.js +2 -2
  26. package/dist/core/permissions/evaluator.js +2 -2
  27. package/dist/core/runtime/bearings-render.d.ts +3 -0
  28. package/dist/core/runtime/bearings-render.js +7 -7
  29. package/dist/core/runtime/bearings.js +5 -5
  30. package/dist/core/runtime/broker/frame-dispatch.js +1 -1
  31. package/dist/core/runtime/broker/frame-read.d.ts +5 -1
  32. package/dist/core/runtime/broker/frame-read.js +1 -1
  33. package/dist/core/runtime/broker-protocol.d.ts +37 -2
  34. package/dist/daemon/api/handlers/broker-ops.js +1 -1
  35. package/dist/daemon/api/handlers/llm.js +3 -3
  36. package/dist/daemon/api/handlers/objects.js +3 -3
  37. package/dist/daemon/api/handlers/reviews.js +1 -1
  38. package/dist/daemon/api/map.d.ts +6 -0
  39. package/dist/daemon/api/map.js +1 -1
  40. package/dist/daemon/machine-daemon.js +1 -1
  41. package/dist/daemon/reconcilers/node-lifecycle/tick.js +1 -1
  42. package/dist/pi-extensions/canvas-inbox-watcher.js +2 -2
  43. package/docs/ci-runner.md +4 -4
  44. package/package.json +3 -3
  45. package/packages/crouter-api/dist/clients/attach/input/controller.js +43 -12
  46. package/packages/crouter-api/dist/clients/attach/input/local-files.js +97 -0
  47. package/packages/crouter-api/dist/clients/attach/session/editor-frame.js +27 -8
  48. package/packages/crouter-api/dist/commands/node/bash.js +2 -2
  49. package/packages/crouter-api/dist/core/bash-guard.js +1 -1
  50. package/packages/crouter-api/dist/core/conversation-store/row-store.js +1 -1
  51. package/packages/crouter-api/dist/core/graph/documents.js +12 -24
  52. package/packages/crouter-api/dist/core/graph/kinds/custom.js +1 -3
  53. package/packages/crouter-api/dist/core/graph/kinds/document.js +8 -25
  54. package/packages/crouter-api/dist/core/graph/kinds/environment.js +1 -3
  55. package/packages/crouter-api/dist/core/graph/kinds/job.js +1 -3
  56. package/packages/crouter-api/dist/core/graph/kinds/node.js +1 -3
  57. package/packages/crouter-api/dist/core/graph/kinds/owner.js +1 -3
  58. package/packages/crouter-api/dist/core/graph/reader.js +7 -1
  59. package/packages/crouter-api/dist/core/permissions/evaluator.js +12 -6
  60. package/packages/crouter-api/dist/core/runtime/bearings-render.js +11 -0
  61. package/packages/crouter-api/dist/core/runtime/bearings.js +6 -2
  62. package/packages/crouter-api/dist/daemon/api/handlers/broker-ops.js +5 -5
  63. package/packages/crouter-api/dist/daemon/api/map.js +1 -1
  64. package/packages/crouter-api/dist/{clients/attach/chrome/git-info.js → shared/git-status.js} +5 -5
  65. package/packages/crouter-api/package.json +1 -1
  66. package/packages/crouter-identity/package.json +1 -1
  67. package/packages/crouter-plugin/package.json +3 -3
  68. package/runtime.lock.json +14 -14
  69. package/packages/crouter-api/dist/core/graph/kinds/live-read.js +0 -11
  70. /package/dist/{clients/attach/chrome/git-info.d.ts → shared/git-status.d.ts} +0 -0
  71. /package/dist/{clients/attach/chrome/git-info.js → shared/git-status.js} +0 -0
@@ -382,9 +382,9 @@ async function residentBlaxelCanIdle(nodeId, viewer) {
382
382
  && !await isHeldAwake(nodeId, viewer)
383
383
  && (await runningJobs(await openDb(), nodeId)).length === 0;
384
384
  }
385
- /** A yield's settle: a broker that can start the next cycle itself is told to ask for it; any other exits and is relaunched. */
386
- function refreshDirective(request) {
387
- return request.inPlaceCycle === true ? { action: 'new_cycle' } : { action: 'shutdown' };
385
+ /** A yield's settle: a broker that can start the next cycle itself is told to ask for it, unless that cycle is already recorded and starting; any other exits and is relaunched. */
386
+ function refreshDirective(request, node) {
387
+ return request.inPlaceCycle !== true ? { action: 'shutdown' } : node.cycle_pending === true ? { action: 'stay_dormant' } : { action: 'new_cycle' };
388
388
  }
389
389
  async function settleBroker(nodeId, request, viewer) {
390
390
  const node = await getNode(nodeId);
@@ -418,7 +418,7 @@ async function settleBroker(nodeId, request, viewer) {
418
418
  if (request.stopReason !== 'stop' && request.stopReason !== 'length') {
419
419
  await clearFault(nodeId, { link: 'daemon→node' });
420
420
  if (node.intent === 'refresh')
421
- return { directive: refreshDirective(request), closePane: false };
421
+ return { directive: refreshDirective(request, node), closePane: false };
422
422
  // The broker reports a recorded fatal provider fault with no retry or fallback armed: nothing is left to run, so a resident
423
423
  // Blaxel broker goes idle like any settled one, instead of holding its awake sandbox until the unattended park clock tears it
424
424
  // down. A pending structured-output request keeps it awake as before.
@@ -437,7 +437,7 @@ async function settleBroker(nodeId, request, viewer) {
437
437
  }
438
438
  if (node.intent === 'refresh') {
439
439
  await clearFault(nodeId);
440
- return { directive: refreshDirective(request), closePane: false };
440
+ return { directive: refreshDirective(request, node), closePane: false };
441
441
  }
442
442
  const decision = await evaluateStop(nodeId, signals);
443
443
  await clearFault(nodeId);
@@ -723,7 +723,7 @@ function statusForExitCode(exitCode) {
723
723
  * line (capped) turns an opaque `internal error` into an actionable one while
724
724
  * still refusing to leak multi-line traces. The router logs the FULL error
725
725
  * (with stack) server-side alongside this. */
726
- function boundedCause(err) {
726
+ export function boundedCause(err) {
727
727
  const raw = err instanceof Error ? err.message : String(err);
728
728
  const firstLine = raw.split('\n', 1)[0].trim();
729
729
  if (firstLine === '')
@@ -1,8 +1,8 @@
1
- // chrome/git-info.ts — async, non-blocking git context for the attach editor border:
2
- // the working dir's last path segment, current branch, and a couple of status
3
- // symbols (dirty / ahead / behind). Shells out via execFile (NEVER sync — the
4
- // viewer must never block its input pump on a subprocess) and reports a plain
5
- // struct the caller styles into the editor's top border.
1
+ // shared/git-status.ts — async, non-blocking git context: the working dir's last
2
+ // path segment, current branch, and status symbols (dirty / ahead / behind).
3
+ // Shells out via execFile (never sync — neither the viewer's input pump nor the
4
+ // broker's frame loop may block on a subprocess). The broker reads it for its
5
+ // own cwd (`get_git_status`); the attach viewer paints the reply.
6
6
  import { execFile } from 'node:child_process';
7
7
  import { basename } from 'node:path';
8
8
  /** Parse `git status --porcelain=v1 --branch` into {@link GitInfo} flags. The
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/api",
3
- "version": "0.3.711",
3
+ "version": "0.3.713",
4
4
  "description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/api/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/identity",
3
- "version": "0.3.711",
3
+ "version": "0.3.713",
4
4
  "description": "Northlight access-token verification and scope rules",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/plugin",
3
- "version": "0.3.711",
3
+ "version": "0.3.713",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -27,8 +27,8 @@
27
27
  "postpack": "node ../../scripts/pack-minify.mjs postpack packages/crouter-plugin"
28
28
  },
29
29
  "dependencies": {
30
- "@north-light/api": "0.3.711",
31
- "@north-light/identity": "0.3.711"
30
+ "@north-light/api": "0.3.713",
31
+ "@north-light/identity": "0.3.713"
32
32
  },
33
33
  "license": "UNLICENSED",
34
34
  "publishConfig": {
package/runtime.lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@north-light/cli",
3
- "version": "0.3.711",
3
+ "version": "0.3.713",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@north-light/cli",
9
- "version": "0.3.711",
9
+ "version": "0.3.713",
10
10
  "hasInstallScript": true,
11
11
  "license": "UNLICENSED",
12
12
  "workspaces": [
@@ -28,8 +28,8 @@
28
28
  "@milkdown/preset-gfm": "^7.22.3",
29
29
  "@milkdown/prose": "^7.22.3",
30
30
  "@milkdown/utils": "^7.22.3",
31
- "@north-light/identity": "0.3.711",
32
- "@north-light/plugin": "0.3.711",
31
+ "@north-light/identity": "0.3.713",
32
+ "@north-light/plugin": "0.3.713",
33
33
  "cron-parser": "^5.6.0",
34
34
  "esbuild": "0.28.2",
35
35
  "jose": "^6.2.12",
@@ -11902,17 +11902,17 @@
11902
11902
  },
11903
11903
  "packages/crouter-api": {
11904
11904
  "name": "@north-light/api",
11905
- "version": "0.3.711",
11905
+ "version": "0.3.713",
11906
11906
  "license": "UNLICENSED"
11907
11907
  },
11908
11908
  "packages/crouter-env-docker": {
11909
11909
  "name": "@north-light/env-docker",
11910
- "version": "0.3.711",
11910
+ "version": "0.3.713",
11911
11911
  "license": "UNLICENSED"
11912
11912
  },
11913
11913
  "packages/crouter-identity": {
11914
11914
  "name": "@north-light/identity",
11915
- "version": "0.3.711",
11915
+ "version": "0.3.713",
11916
11916
  "license": "UNLICENSED",
11917
11917
  "dependencies": {
11918
11918
  "jose": "^6.2.1"
@@ -11920,21 +11920,21 @@
11920
11920
  },
11921
11921
  "packages/crouter-plugin": {
11922
11922
  "name": "@north-light/plugin",
11923
- "version": "0.3.711",
11923
+ "version": "0.3.713",
11924
11924
  "license": "UNLICENSED",
11925
11925
  "dependencies": {
11926
- "@north-light/api": "0.3.711",
11927
- "@north-light/identity": "0.3.711"
11926
+ "@north-light/api": "0.3.713",
11927
+ "@north-light/identity": "0.3.713"
11928
11928
  }
11929
11929
  },
11930
11930
  "packages/crouter-sdk": {
11931
11931
  "name": "@north-light/sdk",
11932
- "version": "0.3.711",
11932
+ "version": "0.3.713",
11933
11933
  "license": "UNLICENSED",
11934
11934
  "dependencies": {
11935
- "@north-light/api": "0.3.711",
11936
- "@north-light/identity": "0.3.711",
11937
- "@north-light/plugin": "0.3.711",
11935
+ "@north-light/api": "0.3.713",
11936
+ "@north-light/identity": "0.3.713",
11937
+ "@north-light/plugin": "0.3.713",
11938
11938
  "jose": "^6.2.1"
11939
11939
  },
11940
11940
  "bin": {
@@ -1,11 +0,0 @@
1
- import { actorOf } from '../documents.js';
2
- import { publish } from '../events.js';
3
- import { recordWatch } from '../watches.js';
4
- /** A live read of a non-document object: the reader watches it and its other watchers hear `read`. */
5
- export async function recordLiveRead(db, reader, object, reposFn) {
6
- const actor = actorOf(reader);
7
- if (actor.id === object.id)
8
- return; // reading yourself is not an act on anything
9
- await recordWatch(db, actor, object, 'read');
10
- await publish(db, { event: 'read', object, actor, attrs: {} }, reposFn);
11
- }