@north-light/cli 0.3.414 → 0.3.416
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/client.d.ts +20 -0
- package/dist/api/client.js +3 -3
- package/dist/api/dto/common.d.ts +1 -1
- package/dist/api/dto/crons.d.ts +7 -1
- package/dist/api/dto/human-requests.d.ts +1 -1
- package/dist/api/dto/run-events.d.ts +1 -1
- package/dist/api/dto/usage.d.ts +27 -0
- package/dist/api/dto/usage.js +0 -0
- package/dist/api/errors.js +1 -1
- package/dist/api/index.d.ts +3 -2
- package/dist/api/index.js +1 -1
- package/dist/builtin-memory/crouter-sdk/README.md +22 -4
- package/dist/builtin-memory/crouter-sdk/client.md +32 -1
- package/dist/builtin-memory/crouter-sdk/errors.md +3 -0
- package/dist/builtin-memory/crouter-sdk/getting-started.md +26 -4
- package/dist/builtin-memory/crouter-sdk/release-notes.md +23 -0
- package/dist/builtin-memory/crouter-sdk/testing.md +9 -3
- package/dist/builtin-memory/internal/nodes-and-canvas.md +4 -0
- package/dist/cli.js +7 -7
- package/dist/clients/attach/viewer.js +606 -606
- package/dist/commands/cron.js +1 -1
- package/dist/commands/node/create.js +1 -1
- package/dist/core/canvas/crons.d.ts +15 -1
- package/dist/core/canvas/crons.js +13 -13
- package/dist/core/canvas/delivery-contract.d.ts +1 -1
- package/dist/core/canvas/migrations.js +73 -66
- package/dist/core/canvas/types.d.ts +1 -1
- package/dist/core/command.d.ts +7 -0
- package/dist/core/command.js +9 -9
- package/dist/core/grants/mirror.d.ts +4 -0
- package/dist/core/grants/mirror.js +2 -2
- package/dist/core/grants/on-sync.js +1 -1
- package/dist/core/graph/custom.js +5 -5
- package/dist/core/graph/reader.js +3 -3
- package/dist/core/graph/spaces/app.js +1 -1
- package/dist/core/graph/types.d.ts +5 -0
- package/dist/core/layout.d.ts +2 -0
- package/dist/core/layout.js +2 -2
- package/dist/core/llm/run.d.ts +5 -1
- package/dist/core/llm/run.js +3 -3
- package/dist/core/providers/call.d.ts +2 -0
- package/dist/core/providers/call.js +1 -1
- package/dist/core/providers/errors.js +1 -1
- package/dist/core/providers/receipts.d.ts +2 -0
- package/dist/core/providers/receipts.js +2 -3
- package/dist/core/runs/confinement.d.ts +2 -0
- package/dist/core/runs/confinement.js +2 -2
- package/dist/core/runs/operations.d.ts +2 -0
- package/dist/core/runs/operations.js +4 -4
- package/dist/core/runtime/broker/model-adapter.js +2 -2
- package/dist/core/runtime/run-command.d.ts +10 -0
- package/dist/core/runtime/run-command.js +1 -1
- package/dist/core/spaces/mounts.d.ts +7 -0
- package/dist/core/spaces/mounts.js +1 -1
- package/dist/core/spaces/process.d.ts +22 -2
- package/dist/core/spaces/process.js +1 -1
- package/dist/core/usage/ledger.d.ts +49 -0
- package/dist/core/usage/ledger.js +10 -0
- package/dist/daemon/api/app-listener.js +12 -12
- package/dist/daemon/api/handlers/crons.js +1 -1
- package/dist/daemon/api/handlers/files.js +1 -1
- package/dist/daemon/api/handlers/llm.d.ts +8 -0
- package/dist/daemon/api/handlers/llm.js +3 -3
- package/dist/daemon/api/handlers/nodes.js +1 -1
- package/dist/daemon/api/handlers/providers.js +1 -1
- package/dist/daemon/api/handlers/runs.js +1 -1
- package/dist/daemon/api/map.d.ts +1 -1
- package/dist/daemon/api/map.js +1 -1
- package/dist/daemon/api/operations.d.ts +1 -1
- package/dist/daemon/api/operations.js +1 -1
- package/dist/daemon/api/router.d.ts +15 -0
- package/dist/daemon/api/router.js +1 -1
- package/dist/daemon/api/server.d.ts +5 -1
- package/dist/daemon/api/server.js +1 -1
- package/dist/daemon/cron/armed-context.d.ts +21 -4
- package/dist/daemon/cron/armed-context.js +1 -1
- package/dist/daemon/cron/authority.d.ts +27 -0
- package/dist/daemon/cron/authority.js +1 -0
- package/dist/daemon/cron/disposition.d.ts +2 -0
- package/dist/daemon/cron/disposition.js +1 -1
- package/dist/daemon/cron/escalation.js +3 -3
- package/dist/daemon/cron/folders.d.ts +5 -0
- package/dist/daemon/cron/folders.js +1 -0
- package/dist/daemon/cron/lease-recovery.js +1 -1
- package/dist/daemon/cron/live-runs.d.ts +28 -0
- package/dist/daemon/cron/live-runs.js +1 -1
- package/dist/daemon/cron/run-socket.d.ts +30 -0
- package/dist/daemon/cron/run-socket.js +1 -0
- package/dist/daemon/cron/settle.d.ts +10 -0
- package/dist/daemon/cron/settle.js +1 -1
- package/dist/daemon/cron/sinks.d.ts +2 -1
- package/dist/daemon/cron/sinks.js +2 -2
- package/dist/daemon/cron-run.js +2 -1
- package/dist/daemon/crtrd.js +7 -7
- package/dist/daemon/reconcilers/action-lane.js +1 -1
- package/dist/daemon/reconcilers/broker-supervision.d.ts +10 -0
- package/dist/daemon/reconcilers/broker-supervision.js +4 -4
- package/dist/daemon/reconcilers/cron-lane.d.ts +1 -0
- package/dist/daemon/reconcilers/cron-lane.js +1 -1
- package/dist/shared/env.d.ts +6 -5
- package/dist/shared/env.js +2 -2
- package/docs/sdk/README.md +22 -4
- package/docs/sdk/client.md +32 -1
- package/docs/sdk/errors.md +3 -0
- package/docs/sdk/getting-started.md +26 -4
- package/docs/sdk/release-notes.md +23 -0
- package/docs/sdk/testing.md +9 -3
- package/package.json +2 -2
- package/packages/crouter-identity/dist/index.d.ts +29 -2
- package/packages/crouter-identity/dist/index.js +81 -12
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +12 -12
package/dist/cli.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var w=Object.defineProperty;var s=(r,o)=>w(r,"name",{value:o,configurable:!0});import"./suppress-experimental-warnings.js";import{mkdirSync as v,openSync as R,readFileSync as S,renameSync as E,rmSync as _,statSync as
|
|
3
|
-
`,"utf8"),E(t,m)}finally{_(t,{force:!0})}}s(
|
|
4
|
-
`);return}try{if(
|
|
2
|
+
var w=Object.defineProperty;var s=(r,o)=>w(r,"name",{value:o,configurable:!0});import"./suppress-experimental-warnings.js";import{mkdirSync as v,openSync as R,readFileSync as S,renameSync as E,rmSync as _,statSync as l,writeFileSync as b}from"node:fs";import{dirname as d,join as a}from"node:path";import{enableCompileCache as C}from"node:module";import{fileURLToPath as u}from"node:url";import{isDaemonControlInvocation as g,isLayoutMigrationInvocation as I,personOnlyInvocation as N,resolveDaemonControlRoot as O,resolveLayoutMigrationRoot as k,resolveRoot as x}from"./build-root.js";import{maybeBootRoot as A}from"./core/runtime/front-door.js";import{maybeAutoUpdate as $}from"./core/auto-update.js";import{ensureProjectScope as T}from"./core/bootstrap.js";import{provisionExports as F,pruneLegacyExports as M}from"./core/host-exports/export.js";import{revalidateBundlePlugins as P}from"./core/command-plugins/revalidate.js";import{renderNode as D,runCli as y,walk as L}from"./core/command.js";import{dispatchWithStaleRecovery as j}from"./core/manifest-recovery.js";import{installStdoutErrorPolicy as K}from"./core/stdout-errors.js";import{handle as U}from"./core/io.js";import{CrtrError as h,ownerOnly as B}from"./core/errors.js";import{ExitCode as J}from"./types.js";import{layoutNeedsMigration as W,runtimeRoot as q}from"./core/layout.js";import{ApiError as G}from"./api/index.js";import{mark as e}from"./core/timing.js";import{launchSnapshotFile as V,sandboxCliNodeId as z}from"./shared/env.js";import{nodeRunDir as f}from"./core/canvas/paths.js";import{installBrokerConfigSnapshot as H}from"./core/config.js";R(u(import.meta.url),"r"),K(),e("cli.entry",{cmd:process.argv[2]??"(bare)"});try{C()}catch{}e("cli.compile_cache");const Q=a(d(u(import.meta.url)),".."),m=a(q(),"first-run.json");function c(r){return(r instanceof Error?r.message:String(r)).split(/\r?\n/,1)[0]??""}s(c,"errorMessage");function X(r){const o=d(m);v(o,{recursive:!0});const t=`${m}.${process.pid}.${Date.now()}.tmp`;try{b(t,JSON.stringify({packageVersion:r,completedAt:new Date().toISOString()})+`
|
|
3
|
+
`,"utf8"),E(t,m)}finally{_(t,{force:!0})}}s(X,"writeFirstRunMarker");async function Y(){if(process.env.CRTR_NO_AUTO_INIT==="1")return;try{if(l(m,{throwIfNoEntry:!1})!==void 0)return}catch(o){process.stderr.write(`crtr: first-run reconcile marker check failed: ${c(o)}
|
|
4
|
+
`);return}try{if(l(a(Q,".git"),{throwIfNoEntry:!1})!==void 0)return}catch(o){process.stderr.write(`crtr: first-run reconcile source check failed: ${c(o)}
|
|
5
5
|
`);return}let r;try{const{reconcileFirstRun:o}=await import("./commands/sys/setup-core.js");r=await o((t,p)=>{process.stderr.write(`crtr: first-run reconcile ${t} failed: ${c(p)}
|
|
6
6
|
`)})}catch(o){process.stderr.write(`crtr: first-run reconcile failed: ${c(o)}
|
|
7
|
-
`)}finally{if(r!==void 0)try{
|
|
8
|
-
`)}}}s(
|
|
9
|
-
`);return}await
|
|
10
|
-
`),process.exit(130)),(r instanceof G||r instanceof
|
|
7
|
+
`)}finally{if(r!==void 0)try{X(r)}catch(o){process.stderr.write(`crtr: first-run reconcile marker failed: ${c(o)}
|
|
8
|
+
`)}}}s(Y,"maybeReconcileFirstRun");async function Z(){const r=I(process.argv),o=z(),t=o!==void 0;if(o!==void 0){process.env.CRTR_API_SOCKET=a(f(o),"cli.sock");const i=N(process.argv);if(i!==null)throw B(`crtr ${i} is not available to an app's node`,"Run this command from the person's terminal.");const n=JSON.parse(S(V(f(o))??a(f(o),"broker-launch.json"),"utf8"));if(!n.configSnapshot)throw new Error("node launch is missing its config snapshot");H(n.configSnapshot)}if(!t&&W()&&!g(process.argv)&&!r)throw new h("layout_migration_required","run crtr sys migrate while the runtime is offline",J.NETWORK,{next:"Run `crtr sys migrate` while the runtime is offline, then restart it."});if(r){const i=await k();if(process.argv.slice(4).some(n=>n==="-h"||n==="--help")){process.stdout.write(D(L(i,["sys","migrate"]).node)+`
|
|
9
|
+
`);return}await y(i,process.argv);return}if(t||(M(process.argv),await Y()),await A(process.argv),e("cli.front_door_passed"),g(process.argv)){await y(await O(),process.argv);return}t||await P(process.argv),e("cli.plugins_revalidated");const p=await x(process.argv[2]);e("cli.root_resolved"),t||(F(p,process.argv),T(process.argv),$(process.argv)),e("cli.dispatch_start"),await j(p,process.argv),e("cli.dispatch_done")}s(Z,"main"),Z().catch(r=>{(r instanceof Error&&r.name==="AbortError"||r instanceof Error&&/operation was aborted/i.test(r.message))&&(process.stderr.write(`crtr: Interrupted
|
|
10
|
+
`),process.exit(130)),(r instanceof G||r instanceof h)&&(U(r),process.exit(typeof process.exitCode=="number"?process.exitCode:1));const t=r instanceof Error?r.message:String(r);process.stderr.write(`crtr: ${t}
|
|
11
11
|
`),process.exit(1)});
|