@north-light/cli 0.3.638 → 0.3.640
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/commands/sys/import/move.js +8 -8
- package/dist/core/import/bundle/layout.d.ts +10 -10
- package/dist/core/import/bundle/layout.js +3 -3
- package/dist/core/import/export/dump.d.ts +1 -1
- package/dist/core/import/export/dump.js +4 -4
- package/dist/core/import/export/files.js +1 -1
- package/dist/core/import/load/run.js +2 -2
- package/dist/core/import/load/stage.d.ts +1 -1
- package/package.json +2 -2
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +13 -13
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
`),await
|
|
3
|
-
`),
|
|
4
|
-
`));await
|
|
5
|
-
`),{runId:r.runId,account:r.account.display,timings:t.timings.join(" ")}}catch(
|
|
6
|
-
`),o<
|
|
7
|
-
`)}if(t===null)return r;try{await
|
|
8
|
-
`)}return r}
|
|
1
|
+
var W=Object.defineProperty;var d=(e,t)=>W(e,"name",{value:t,configurable:!0});import{mkdtempSync as X,readFileSync as L,readdirSync as A,rmSync as Q}from"node:fs";import{tmpdir as Z}from"node:os";import{join as g}from"node:path";import{CrtrError as s,general as tt}from"../../../core/errors.js";import{ExitCode as h}from"../../../types.js";import{cliClient as R}from"../../api-client.js";import{ImportCloud as T,STORE_FILE as et,STORE_ORDER as rt}from"../../../core/import/export/cloud.js";import{Uploader as nt,localObjects as F,reviewSourceObject as ot}from"../../../core/import/export/files.js";import{BODIES_TABLE as P,bundleKeys as x}from"../../../core/import/bundle/layout.js";import{crtrVersion as it}from"../../../shared/crtr-version.js";import{nodeArchive as at}from"../../../core/import/export/archive.js";import{buildSourceJson as st}from"../../../core/import/export/source.js";import{runDaemonBodiesDump as ct,runDaemonImportDump as dt,runDaemonInstallId as lt,spawnDaemon as ut,stopAllDaemons as ft}from"../../../daemon/manage.js";import{deleteMoveRecord as U,moveUnfinishedError as mt,readMachineConfig as wt,readMoveRecord as D,writeMachineConfig as pt,writeMachineCredential as ht,writeMoveRecord as M}from"../../../daemon/machine-link/config.js";import{notifyMoveFinished as gt}from"../../../daemon/machine-link/move-notify.js";import{controlPlaneUrl as _t,forgetSignIn as yt,personAccount as B,personBearer as b,readPersonCredential as Et,signIn as $t,signOut as vt}from"../../../core/directory/person-credential.js";import{NORTHLIGHT_DIRECTORY_URL as St}from"../../../core/directory/issuer.js";import{isPidAlive as j}from"../../../core/canvas/pid.js";const _=d(e=>new Promise(t=>setTimeout(t,e)),"sleep");function Qt(){return wt()?.directoryUrl??Et()?.directoryUrl??St}d(Qt,"defaultDirectoryUrl");async function J(e){let t="the daemon still reports a drain";for(let r=1;r<=3;r++){try{if((await e.endDaemonDrain()).drained===!1)return}catch(n){t=n instanceof Error?n.message:String(n)}r<3&&await _(1e3)}throw new s("drain_not_ended",`the local daemon's pause could not be confirmed ended: ${t}`,h.GENERAL,{next:"Run `crtr sys import resume`."})}d(J,"endDrainConfirmed");async function Ut(e,t){e||await J(t)}d(Ut,"settleDrainAtEnd");const It=3e4;async function Nt(e,t,r){let n=2e3;for(;;){let i;try{i=await e.get(t)}catch(c){const l=c instanceof s?c.details?.status:void 0;if(c instanceof s&&(c.code==="not_signed_in"||typeof l=="number"&&l<500&&l!==408&&l!==429))throw new s("move_outcome_unknown",`could not confirm whether Northlight finished loading this computer's records: ${c.message}`,h.GENERAL,{next:"Run `crtr sys signin` to settle the move."});process.stderr.write(`waiting for Northlight: ${c instanceof Error?c.message:String(c)}
|
|
2
|
+
`),await _(n),n=Math.min(n*2,It);continue}if(n=2e3,i.state==="done")return;if(i.state==="failed"||i.state==="rolled_back")throw tt(`the import failed at ${i.failure?.step??i.step??"an unknown step"}: ${i.failure?.message??i.state}`,{code:i.failure?.code??"import_failed"});if(i.state==="uploading"&&r!==void 0)throw r;await _(2e3)}}d(Nt,"awaitRunOutcome");async function At(e,t,r,n,i=()=>{},c=()=>{}){let l=Date.now();const o=d((f,m)=>{const p=Date.now(),S=`${f}=${((p-l)/1e3).toFixed(1)}s`;n.timings.push(S),process.stderr.write(`${f} ${((p-l)/1e3).toFixed(1)}s
|
|
3
|
+
`),l=p,n.name=m},"next"),u=X(g(Z(),"crtr-import-")),v=R({local:!0});let y=!1,I=!1,E=!1,$;try{n.name="start";const{installId:f}=await lt(),m=r===void 0?await t.start({source_install_id:f,source_kind:e,release:it()}):{run_id:r};i(m.run_id),n.name="blobs";const p=new nt(t,m.run_id,a=>process.stderr.write(`${a}
|
|
4
|
+
`));await p.upload(F()),await ct(u);const S=new Set,O=d(async(a,w)=>{await p.uploadBytes(x.rowPart(m.run_id,a,w.replace(/\.jsonl\.zst$/,"")),L(g(u,"rows",a,w))),S.add(`${a}/${w}`)},"uploadPart");for(const a of A(g(u,"rows",P)))await O(P,a);o("blobs","drain"),y=!0,await v.drainDaemon({settle_limit_ms:6e5}),o("drain","dump"),await p.upload(F());const N=await dt(u,e),k=[];for(const a of N.requests){const w=ot(a.id,a.dir,a.file);w!==null&&k.push(w)}await p.upload(k),o("dump","upload");for(const a of A(g(u,"rows")))for(const w of A(g(u,"rows",a)))S.has(`${a}/${w}`)||await O(a,w);const C=[];if(e==="hosted")for(const a of N.runningNodes){const{data:w,prefixes:K}=await at(a);C.push(...K),await p.uploadBytes(x.nodeFiles(m.run_id,a.node),w)}await p.uploadBytes(x.source(m.run_id),Buffer.from(JSON.stringify(st(N.source,C))));const z=JSON.parse(L(g(u,et),"utf8"));for(const a of rt)await t.putStore(m.run_id,a,z[a]);o("upload","load"),E=!0;let G;try{await t.load(m.run_id)}catch(a){G=a}try{await Nt(t,m.run_id,G)}catch(a){throw a instanceof s&&a.code==="move_outcome_unknown"||(E=!1),a}return E=!1,I=!0,o("load","restart"),m.run_id}catch(f){throw $=f,f}finally{if(Q(u,{recursive:!0,force:!0}),!I&&!E&&c(),y&&!E)try{await Ut(I,v)}catch(f){if($===void 0)throw f;const m=f instanceof s?f.code:"drain_not_ended";throw new s(m,`${$ instanceof Error?$.message:String($)} (and ${f instanceof Error?f.message:String(f)})`,h.GENERAL,{next:"Run `crtr sys import resume`."})}}}d(At,"exportRun");async function Rt(e){await gt(e);const t=new T(e.apiUrl,()=>b(e.directoryUrl));let r;try{r=await t.machineCredential(e.runId)}catch(n){if(!(n instanceof s)||n.details?.code!=="credential_exists")throw n;r=await t.machineCredential(e.runId,!0)}ht(r.credential),pt({apiUrl:e.apiUrl,environmentId:r.environment_id,runId:e.runId,directoryUrl:e.directoryUrl,account:e.account}),await ft(),await ut(),U()}d(Rt,"finishMove");const V=3,Tt=3e4;async function Zt(e){const t={name:"sign-in",timings:[]};let r,n="",i;try{const o=await B(e.directoryUrl),u=e.apiUrl??await _t(e.directoryUrl),v=new T(u,()=>b(e.directoryUrl));i={apiUrl:u,directoryUrl:e.directoryUrl,account:o,notify:e.notify,notified:!1,pid:process.pid},await At("machine",v,void 0,t,y=>{n=y,M({...i,runId:y,state:"running"})},U)}catch(o){throw o instanceof s&&o.code==="move_outcome_unknown"?o:await H(t.name,o,e.notify)}r={...i,runId:n,state:"committed"},M(r);let c;const l=Date.now();for(let o=1;o<=V;o++)try{return await Rt(r),t.timings.push(`restart=${((Date.now()-l)/1e3).toFixed(1)}s`),process.stderr.write(`restart ${((Date.now()-l)/1e3).toFixed(1)}s
|
|
5
|
+
`),{runId:r.runId,account:r.account.display,timings:t.timings.join(" ")}}catch(u){c=u,process.stderr.write(`switch-over attempt ${o} failed: ${u instanceof Error?u.message:String(u)}
|
|
6
|
+
`),o<V&&await _(Tt),r=D()??r}throw mt(c instanceof Error?c.message:String(c))}d(Zt,"runMove");async function H(e,t,r){const n=t instanceof Error?t.message:String(t),i=t instanceof s&&t.code==="drain_not_ended"?"crtr is still local, but its pause could not be ended: run `crtr sys import resume`":"crtr is still local and working as before",c=`The move to Northlight failed at ${e}: ${n}. ${i}.`,l=await q(c,r),o=t instanceof s&&t.code!=="error"?t.code:t instanceof s&&typeof t.details?.code=="string"?t.details.code:"move_failed";return new s(o,`the move to Northlight failed at ${e}: ${n}. ${i}, and ${Y(l)}`,h.GENERAL)}d(H,"undoMove");const Y=d(e=>e===void 0?"this computer is signed out.":`this computer's sign-in was removed here but could not be revoked at Northlight (${e}); revoke it on your Northlight account page.`,"signedOutText");async function q(e,t){U();let r;try{await vt()}catch(n){yt(),r=n instanceof Error?n.message:String(n),process.stderr.write(`could not revoke the sign-in at Northlight: ${r}
|
|
7
|
+
`)}if(t===null)return r;try{await R({local:!0}).sendMessage(t,{from:null,body:`${e} Tell the person the move failed.${r===void 0?"":` ${Y(r)}`}`})}catch(n){process.stderr.write(`could not message ${t}: ${n instanceof Error?n.message:String(n)}
|
|
8
|
+
`)}return r}d(q,"dropMove");async function xt(e){const t=D();if(t===void 0||t.state==="activated")return;const r=d(async()=>{await $t(t.directoryUrl,e,{accept:d(async o=>o.account.id===t.account.id?void 0:new s("signin_other_account",`This computer's move belongs to the Northlight account ${t.account.display}. Sign in to that account.`,h.USAGE),"accept")})},"signBackIn");if(t.state==="committed"){if(e!==void 0)try{await B(t.directoryUrl)}catch(o){if(!(o instanceof s&&o.code==="not_signed_in"))throw o;await r()}return t}if(t.pid>0&&j(t.pid))throw new s("move_running",`a move to Northlight is already running (process ${t.pid}).`,h.USAGE,{next:"Wait for it to finish; the node that asked is messaged when it does."});const n=d(()=>new T(t.apiUrl,()=>b(t.directoryUrl)).get(t.runId),"ask");let i;try{i=await n()}catch(o){if(!(o instanceof s&&o.code==="not_signed_in")||e===void 0)throw o;await r(),i=await n()}if(i.state==="done"){const o={...t,state:"committed"};return M(o),o}if(i.state==="loading"||i.state==="committed")throw new s("move_running","Northlight is still loading this computer's records from an earlier move.",h.USAGE,{next:"Retry in a minute."});if(i.state!=="failed"&&i.state!=="rolled_back"&&i.state!=="uploading")throw new s("move_outcome_unknown","Northlight did not report a settled outcome for this move.",h.GENERAL,{next:"Run `crtr sys signin` to settle the move."});const c=i.failure?.step??"an earlier step",l=i.failure==null?"the process that was moving this computer stopped before Northlight had the records":i.failure.message;U();try{await J(R({local:!0}))}catch(o){throw await H(c,new s("drain_not_ended",`${l} (and ${o instanceof Error?o.message:String(o)})`,h.GENERAL),t.notify)}await q(`The move to Northlight failed at ${c}: ${l}. crtr is still local and working as before.`,t.notify)}d(xt,"settleEarlierMove");const Dt=6e4,Mt=5e3;async function te(e,t){for(await _(Mt);!e();){const r=D();if(r===void 0||r.state!=="running"||r.pid>0&&j(r.pid))return;try{await xt();return}catch(n){if(t(n),n instanceof s&&n.code==="not_signed_in")return}await _(Dt)}}d(te,"settleMoveAtDaemonStart");export{Qt as defaultDirectoryUrl,J as endDrainConfirmed,At as exportRun,Rt as finishMove,Zt as runMove,Ut as settleDrainAtEnd,xt as settleEarlierMove,te as settleMoveAtDaemonStart};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/** `bodies` (revision text, design-fleet D106) is copied like any table
|
|
2
|
-
* travel as the part files named in `source.bodyParts` (see `rowKeys`), each written and read a line at a time (`RowFileWriter`, `rowLines`).
|
|
1
|
+
/** `bodies` (revision text, design-fleet D106) is copied like any table; it is dumped apart only because its rows come from the database in hash batches, and every row must be canonical.
|
|
3
2
|
* Every row is canonical: `hash` is the sha256 of `text`, which holds no NUL. The exporter dumps only such rows and the lane refuses a bundle with any other (`stage`). */
|
|
4
3
|
export declare const BODIES_TABLE = "bodies";
|
|
5
4
|
/** Tables whose rows are dumped, staged and (after rewrites) copied, in no particular order: the lane computes the copy
|
|
6
|
-
* order from the target's foreign-key catalog.
|
|
5
|
+
* order from the target's foreign-key catalog. A table's part files, read in order, hold its rows in primary-key order (identity-ordered
|
|
7
6
|
* tables in source `seq` order). */
|
|
8
7
|
export declare const COPIED_TABLES: readonly ["objects", "documents", "revisions", "revision_parents", "identities", "jobs", "custom_objects", "context_sessions", "environments", "object_kinds", "edges", "watches", "watch_subscriptions", "exposures", "rules", "unresolved_links", "nodes", "sessions", "worktrees", "node_faults", "waits", "structured_requests", "memory_reads", "deleted_isolated_nodes", "node_outcome_deliveries", "run_events", "messages", "message_causes", "deliveries", "crons", "cron_runs", "daemon_actions", "human_requests", "human_action_deliveries", "review_comments", "review_comment_events", "audit_rows", "idempotency_keys", "uploads", "upload_uses", "shares", "provider_approvals", "relations", "charges", "limits", "conversation_parts", "conversation_entries", "profiles", "bodies"];
|
|
9
8
|
/** Dumped and staged so rewrite 2 can map them, never inserted into the target (`grants`: the directory writes them). */
|
|
@@ -20,15 +19,15 @@ export declare const KEY_MAPPED_TABLES: {
|
|
|
20
19
|
export declare const SEQ_TABLES: readonly ["objects", "revisions", "watches", "watch_subscriptions", "sessions", "waits", "structured_requests", "deliveries", "run_events"];
|
|
21
20
|
export declare const bundleKeys: {
|
|
22
21
|
readonly prefix: (run: string) => string;
|
|
23
|
-
|
|
22
|
+
/** One part file of a table's rows (`source.rowParts[table]` names the parts). */
|
|
23
|
+
readonly rowPart: (run: string, table: string, part: string) => string;
|
|
24
24
|
readonly source: (run: string) => string;
|
|
25
25
|
readonly manifest: (run: string) => string;
|
|
26
26
|
readonly nodeFiles: (run: string, node: string) => string;
|
|
27
|
-
readonly bodyRows: (run: string, part: string) => string;
|
|
28
27
|
readonly request: (requestId: string, relative: string) => string;
|
|
29
28
|
};
|
|
30
|
-
/** The blob keys of a table's row files
|
|
31
|
-
export declare function rowKeys(run: string, table: string, source: Pick<SourceJson, '
|
|
29
|
+
/** The blob keys of a table's row part files, in order. A table with no rows has none. */
|
|
30
|
+
export declare function rowKeys(run: string, table: string, source: Pick<SourceJson, 'rowParts'>): string[];
|
|
32
31
|
/** `imports/<run>/source.json`. */
|
|
33
32
|
export interface SourceJson {
|
|
34
33
|
installId: string;
|
|
@@ -37,15 +36,16 @@ export interface SourceJson {
|
|
|
37
36
|
person: string;
|
|
38
37
|
release: string;
|
|
39
38
|
schemaVersion: number;
|
|
40
|
-
/** Rows per dumped table. The lane refuses a
|
|
39
|
+
/** Rows per dumped table. The lane refuses a table whose part files' line count differs. */
|
|
41
40
|
counts: Record<string, number>;
|
|
41
|
+
/** The part files of each dumped table's rows (`imports/<run>/rows/<table>/<part>.jsonl.zst`), in row order; each holds about 16 MiB of JSON before compression, so no upload is large.
|
|
42
|
+
* `bodies` lists the pre-pause dump's parts, then the pause dump's. `counts[table]` is the total of a table's parts. */
|
|
43
|
+
rowParts: Record<string, string[]>;
|
|
42
44
|
/** The source's machine environment object id, when it has one (`environments.object`). */
|
|
43
45
|
environmentObject?: string;
|
|
44
46
|
/** Hosted sources: every directory the exporter archived for a running node (`nodeFiles` holds its entries as `<from minus leading slash>/<relative path>`).
|
|
45
47
|
* The lane picks the sandbox directory each one lands in (`sandboxPathMap`); the exporter does not. */
|
|
46
48
|
pathPrefixes?: PathPrefix[];
|
|
47
|
-
/** The part files of the `bodies` rows (`imports/<run>/rows/bodies/<part>.jsonl.zst`): the pre-pause dump's parts, then the pause dump's. `counts.bodies` is their total. */
|
|
48
|
-
bodyParts?: string[];
|
|
49
49
|
/** Shipped documents (`documents.source_path` set): document object id → hash of the body text the exporter read from its file; that text is a `bodies` row in the bundle.
|
|
50
50
|
* The lane uses it for a shipped document the target has no copy of, which becomes an ordinary document (I23). */
|
|
51
51
|
shippedBodies?: Record<string, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var c=Object.defineProperty;var n=(t,e)=>c(t,"name",{value:e,configurable:!0});import{once as a}from"node:events";import{createWriteStream as d}from"node:fs";import{pipeline as u}from"node:stream/promises";import{createZstdCompress as f,createZstdDecompress as m,zstdDecompressSync as l}from"node:zlib";const E="bodies",p=["objects","documents","revisions","revision_parents","identities","jobs","custom_objects","context_sessions","environments","object_kinds","edges","watches","watch_subscriptions","exposures","rules","unresolved_links","nodes","sessions","worktrees","node_faults","waits","structured_requests","memory_reads","deleted_isolated_nodes","node_outcome_deliveries","run_events","messages","message_causes","deliveries","crons","cron_runs","daemon_actions","human_requests","human_action_deliveries","review_comments","review_comment_events","audit_rows","idempotency_keys","uploads","upload_uses","shares","provider_approvals","relations","charges","limits","conversation_parts","conversation_entries","profiles","bodies"],_=["grants"],S=[...p,..._],b={audit_rows:"id",review_comment_events:"seq"},z=["objects","revisions","watches","watch_subscriptions","sessions","waits","structured_requests","deliveries","run_events"],h={prefix:n(t=>`imports/${t}/`,"prefix"),rowPart:n((t,e,s)=>`imports/${t}/rows/${e}/${s}.jsonl.zst`,"rowPart"),source:n(t=>`imports/${t}/source.json`,"source"),manifest:n(t=>`imports/${t}/manifest.jsonl.zst`,"manifest"),nodeFiles:n((t,e)=>`imports/${t}/node-files/${e}.tar.zst`,"nodeFiles"),request:n((t,e)=>`requests/${t}/${e}`,"request")};function $(t,e,s){return(s.rowParts[e]??[]).map(r=>h.rowPart(t,e,r))}n($,"rowKeys");function L(t,e){let s;for(const r of t)(e===r.from||e.startsWith(r.from.endsWith("/")?r.from:`${r.from}/`))&&(s===void 0||r.from.length>s.from.length)&&(s=r);return s===void 0?e:s.to+e.slice(s.from.length)}n(L,"mapPath");function B(t){const e=l(t).toString("utf8");if(e==="")return[];if(!e.endsWith(`
|
|
2
2
|
`))throw new Error("row file is truncated: the last line is not newline-terminated");return e.slice(0,-1).split(`
|
|
3
|
-
`).map(
|
|
4
|
-
`}
|
|
3
|
+
`).map(s=>JSON.parse(s))}n(B,"decodeRows");function P(t){return`${JSON.stringify(t)}
|
|
4
|
+
`}n(P,"rowLine");class j{static{n(this,"RowFileWriter")}zst=f();finished;written=0;constructor(e){this.finished=u(this.zst,d(e)),this.finished.catch(()=>{})}get bytes(){return this.written}async write(e,s=Buffer.byteLength(e,"utf8")){this.written+=s,this.zst.write(e,"utf8")||await Promise.race([a(this.zst,"drain"),this.finished])}async close(){this.zst.end(),await this.finished}destroy(){this.zst.destroy()}}async function*A(t){const e=m({chunkSize:1048576});e.end(t);let s=[];for await(const r of e){let o=0;for(let i=r.indexOf(10,o);i!==-1;i=r.indexOf(10,o))s.push(r.subarray(o,i)),yield(s.length===1?s[0]:Buffer.concat(s)).toString("utf8"),s=[],o=i+1;o<r.length&&s.push(r.subarray(o))}if(s.length>0)throw new Error("row file is truncated: the last line is not newline-terminated")}n(A,"rowLines");export{E as BODIES_TABLE,p as COPIED_TABLES,S as DUMPED_TABLES,b as KEY_MAPPED_TABLES,j as RowFileWriter,z as SEQ_TABLES,_ as STAGED_ONLY_TABLES,h as bundleKeys,B as decodeRows,L as mapPath,$ as rowKeys,P as rowLine,A as rowLines};
|
|
@@ -20,7 +20,7 @@ export interface DumpResult {
|
|
|
20
20
|
bodiesMissing: number;
|
|
21
21
|
bodiesInlined: number;
|
|
22
22
|
}
|
|
23
|
-
/** A
|
|
23
|
+
/** A row part file holds about this much JSON (the encoded lines, before compression); a row that alone exceeds it is a part of its own. */
|
|
24
24
|
export declare const PART_JSON_BYTES: number;
|
|
25
25
|
/** A body longer than this many UTF-8 bytes fails the export. The largest body on Silas's Mac is 5.2 MB. JSON escapes one character into at most six (`\u0001`), so a body at
|
|
26
26
|
* the ceiling is a line of at most 192 MiB, well inside V8's ~512 MiB string limit. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
2
|
-
JOIN pg_attribute a ON a.attrelid = c.conrelid AND a.attnum = k.attnum) AS cols FROM pg_constraint c WHERE c.contype = 'p' AND c.connamespace = current_schema()::regnamespace`).all(),
|
|
3
|
-
WHERE d.source_path IS NOT NULL AND NOT EXISTS (SELECT 1 FROM revision_parents p WHERE p.parent = r.rev_id) ORDER BY d.object, r.number DESC, r.rev_id`).all(),
|
|
4
|
-
WHERE n.status IN ('active', 'idle') ORDER BY n.node_id`).all();return
|
|
1
|
+
var Q=Object.defineProperty;var s=(t,e)=>Q(t,"name",{value:e,configurable:!0});import{mkdirSync as Z,readFileSync as $,writeFileSync as K}from"node:fs";import{join as w}from"node:path";import{openDb as ee,withCanvasWrite as te}from"../../canvas/db.js";import{hashOf as re}from"../../graph/bodies.js";import{personIdAsync as ne}from"../../canvas/person.js";import{CANVAS_SCHEMA_VERSION as ae}from"../../canvas/schema-version.js";import{crtrVersion as se}from"../../../shared/crtr-version.js";import{BODIES_TABLE as O,DUMPED_TABLES as k,RowFileWriter as oe,SEQ_TABLES as ie,rowLine as W}from"../bundle/layout.js";import{inlineMessageBody as ce}from"./inline.js";const le=16*1024*1024,he=8*1024*1024,Y=32*1024*1024,de=500,j=5e3,g="bodies-pre.json";class v{static{s(this,"PartWriter")}dir;prefix;parts=[];file=null;constructor(e,a){this.dir=e,this.prefix=a,Z(e,{recursive:!0})}async add(e){const a=Buffer.byteLength(e,"utf8");if(this.file!==null&&this.file.bytes>0&&this.file.bytes+a>le&&await this.close(),this.file===null){const o=`${this.prefix}${this.parts.length}`;this.file=new oe(w(this.dir,`${o}.jsonl.zst`)),this.parts.push(o)}await this.file.write(e,a)}async close(){const e=this.file;this.file=null,e!==null&&await e.close()}destroy(){this.file?.destroy(),this.file=null}}const b=s(t=>`"${t.replace(/"/g,'""')}"`,"q");function pe(t){try{const e=$(t,"utf8");return e.trim()===""?null:e}catch(e){if(e.code==="ENOENT")return null;throw e}}s(pe,"readText");function ue(t,e){return new Error(`revision text ${t} is ${e} bytes; the import carries at most ${Y} bytes of text per body`)}s(ue,"tooLarge");function Ee(t){const e=re(t.text);if(e!==t.hash)throw new Error(`body ${t.hash} does not hash to its key (its text hashes to ${e}); upgrade and restart the daemon so its boot repair rekeys the row, then export again`)}s(Ee,"assertCanonical");async function H(t,e,a,o){const n=new v(w(e,"rows",O),`${a}-`),y=s(async i=>{Ee(i),await n.add(W(i))},"add");try{for(let i=0;i<o.length;){const S=await t.prepare("SELECT hash, octet_length(text) AS n FROM bodies WHERE hash = ANY(?::text[]) ORDER BY hash").all(o.slice(i,i+j));let h=[],u=0;const m=s(async()=>{if(h.length===0)return;const l=await t.prepare("SELECT hash, text FROM bodies WHERE hash = ANY(?::text[]) ORDER BY hash").all(h);for(const d of l)await y(d);h=[],u=0},"fetchPage");for(const{hash:l,n:d}of S){const p=Number(d);if(p>Y)throw ue(l,p);h.length>0&&u+p>he&&await m(),h.push(l),u+=p}await m(),i+=j}await n.close()}catch(i){throw n.destroy(),i}return n.parts}s(H,"writeBodyParts");const P=s(async t=>(await t.prepare("SELECT hash FROM bodies ORDER BY hash").all()).map(e=>e.hash),"allHashes");async function Le(t){const e=await ee(),a=await P(e),o=await H(e,t,"pre",a),n={hashes:a,parts:o,count:a.length,canonical:!0};return K(w(t,g),JSON.stringify(n)),{parts:o,count:a.length}}s(Le,"dumpBodiesPre");function fe(t){try{return JSON.parse($(w(t,g),"utf8"))}catch(e){if(e.code==="ENOENT")return{hashes:[],parts:[],count:0};throw e}}s(fe,"readPre");function we(t,e){if(t.count===0&&t.parts.length===0)return;if(t.canonical!==!0)throw new Error(`${g} was written before bodies were checked against their keys; discard the export directory and run the pre-pause dump again`);const a=t.hashes.filter(o=>!e.has(o));if(a.length>0)throw new Error(`the pre-pause dump holds ${a.length} body row(s) the database no longer has (first: ${a[0]}); the boot repair ran after it. Discard the export directory and run the pre-pause dump again`)}s(we,"assertPreCurrent");async function Ae(t,e,a=de){const o=await ne();return te(async n=>{await n.exec("SET TRANSACTION ISOLATION LEVEL REPEATABLE READ");const y=new Set((await n.prepareUncached("SELECT table_name FROM information_schema.tables WHERE table_schema = current_schema()").all()).map(r=>r.table_name)),i=k.filter(r=>!y.has(r));if(i.length>0)throw new Error(`the canvas database lacks tables the bundle needs: ${i.join(", ")}`);const S=await n.prepareUncached(`SELECT c.conrelid::regclass::text AS tbl, (SELECT array_agg(a.attname::text ORDER BY k.ord) FROM unnest(c.conkey) WITH ORDINALITY k(attnum, ord)
|
|
2
|
+
JOIN pg_attribute a ON a.attrelid = c.conrelid AND a.attnum = k.attnum) AS cols FROM pg_constraint c WHERE c.contype = 'p' AND c.connamespace = current_schema()::regnamespace`).all(),h=new Map(S.map(r=>[r.tbl.replace(/"/g,"").replace(/^.*\./,""),r.cols])),u=await n.prepareUncached("SELECT table_name, column_name FROM information_schema.columns WHERE table_schema = current_schema() ORDER BY table_name, ordinal_position").all(),m=new Set(ie),l={},d={};let p=0,T=0;for(const r of k.filter(E=>E!==O)){const E=m.has(r)?["seq"]:h.get(r),D=E!==void 0&&E.length>0?E.map(c=>`t.${b(c)}`):u.filter(c=>c.table_name===r).map(c=>`t.${b(c.column_name)}::text`);if(D.length===0)throw new Error(`table ${r} has no columns to order its dump by`);const _=new v(w(t,"rows",r),"");let F=0;try{for(await n.exec(`DECLARE dump_cursor NO SCROLL CURSOR FOR SELECT row_to_json(t)::text AS j FROM ${b(r)} t ORDER BY ${D.join(", ")}`);;){const c=await n.prepareUncached(`FETCH FORWARD ${a} FROM dump_cursor`).all();for(const G of c){let f=JSON.parse(G.j);if(r==="messages"){const I=f.body_ref,M=ce(f,pe);typeof I=="string"&&I.startsWith("/")&&(M===f?T+=1:p+=1),f=M}await _.add(W(f))}if(F+=c.length,c.length<a)break}await n.exec("CLOSE dump_cursor"),await _.close()}catch(c){throw _.destroy(),c}l[r]=F,d[r]=_.parts}const N=(await n.prepare("SELECT value FROM canvas_meta WHERE key = 'install_id'").get())?.value;if(N===void 0)throw new Error("this canvas database has no install id");const L=await n.prepare("SELECT object FROM environments WHERE kind = 'machine' ORDER BY object LIMIT 1").get(),A={installId:N,kind:e,person:o,release:se(),schemaVersion:ae,counts:l,rowParts:d,...L===void 0?{}:{environmentObject:L.object}},q=await n.prepare("SELECT request_id, request_dir, file FROM human_requests ORDER BY request_id").all(),J=await n.prepare(`SELECT d.object, r.body_hash FROM documents d JOIN revisions r ON r.document = d.object
|
|
3
|
+
WHERE d.source_path IS NOT NULL AND NOT EXISTS (SELECT 1 FROM revision_parents p WHERE p.parent = r.rev_id) ORDER BY d.object, r.number DESC, r.rev_id`).all(),C={};for(const r of J)C[r.object]??=r.body_hash;const R=fe(t),U=new Set(R.hashes),x=await P(n);we(R,new Set(x));const B=x.filter(r=>!U.has(r)),V=await H(n,t,"pause",B),z=R.count+B.length;l[O]=z,d[O]=[...R.parts,...V];const X=await n.prepare(`SELECT n.node_id, r.grantee, n.cwd, w.path AS worktree FROM nodes n JOIN node_rows r ON r.node_id = n.node_id LEFT JOIN worktrees w ON w.node_id = n.node_id AND w.state = 'open'
|
|
4
|
+
WHERE n.status IN ('active', 'idle') ORDER BY n.node_id`).all();return A.shippedBodies=C,{source:A,requests:q.map(r=>({id:r.request_id,dir:r.request_dir,file:r.file})),runningNodes:X.map(r=>({node:r.node_id,app:r.grantee,cwd:r.cwd,worktree:r.worktree})),bodiesInlined:p,bodiesMissing:T}})}s(Ae,"dumpRows");export{Y as BODY_MAX_BYTES,le as PART_JSON_BYTES,Le as dumpBodiesPre,Ae as dumpRows};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var N=Object.defineProperty;var a=(i,e)=>N(i,"name",{value:e,configurable:!0});import{readFileSync as j,readdirSync as M,statSync as R}from"node:fs";import{basename as z,join as w,relative as S,sep as T}from"node:path";import{runtimeRoot as x}from"../../layout.js";import{bundleKeys as k}from"../bundle/layout.js";import{runBlobKey as O}from"../bundle/blob-keys.js";function y(i,e,t=i){let n;try{n=M(i,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;throw o}for(const o of n){const u=w(i,o.name);o.isDirectory()?y(u,e,t):o.isFile()&&!o.name.endsWith(".tmp")&&!o.name.includes(".tmp-")&&e(u,S(t,u).split(T).join("/"))}}a(y,"walk");function _(){const i=x(),e=[];y(w(i,"blobs"),(t,n)=>e.push({key:n,path:t}));for(const t of["requests","reviews"])y(w(i,t),(n,o)=>{const[u,...c]=o.split("/");c.length>0&&e.push({key:k.request(u,c.join("/")),path:n})});return e}a(_,"localObjects");function Y(i,e,t){return t===null||!t.startsWith("/")||t.startsWith(e.endsWith("/")?e:`${e}/`)?null:{key:k.request(i,`source/${z(t)}`),path:t}}a(Y,"reviewSourceObject");const d=100,L=128,v=128*1024*1024;class K{static{a(this,"Uploader")}cloud;run;progress;sent=new Map;uploaded=0;missing=[];constructor(e,t,n){this.cloud=e,this.run=t,this.progress=n}async upload(e){const t=[];for(const r of e){let s;try{s=R(r.path)}catch(h){if(h.code==="ENOENT"){this.missing.push(r.path);continue}throw h}const l=`${s.size}:${s.mtimeMs}`;this.sent.get(r.key)!==l&&t.push({...r,stamp:l,size:s.size})}const n=new Map,o=a(r=>{let s=n.get(r);return s===void 0&&(s=this.cloud.uploadUrls(this.run,t.slice(r*d,(r+1)*d).map(l=>O(this.run,l.key))).then(l=>l.urls),s.catch(()=>{}),n.set(r,s)),s},"urlsFor");let u=0,c=!1,p=0,m=[];const g=a(()=>{const r=m;m=[];for(const s of r)s()},"wake"),$=a(async()=>{try{for(;!c&&u<t.length;){const r=u++,s=t[r],l=Math.floor(r/d);n.delete(l-1),(l+1)*d<t.length&&o(l+1);const h=O(this.run,s.key),U=(await o(l))[h];if(U===void 0)throw new Error(`no upload URL returned for ${s.key}`);for(;!c&&p>0&&p+s.size>v;)await new Promise(f=>m.push(f));if(c)return;p+=s.size;try{let f;try{f=j(s.path)}catch(E){if(E.code==="ENOENT"){this.missing.push(s.path);continue}throw E}await this.cloud.put(U,f,h,()=>this.freshUrl(h))}finally{p-=s.size,g()}this.sent.set(s.key,s.stamp),this.uploaded+=1,this.uploaded%d===0&&this.progress(`uploaded ${this.uploaded}`)}}catch(r){throw c=!0,g(),r}},"worker"),b=await Promise.allSettled(Array.from({length:Math.min(L,t.length)},$));for(const r of b)if(r.status==="rejected")throw r.reason;t.length>0&&this.progress(`uploaded ${t.length}/${t.length}`)}async freshUrl(e){const t=(await this.cloud.uploadUrls(this.run,[e])).urls[e];if(t===void 0)throw new Error(`no upload URL returned for ${e}`);return t}async uploadBytes(e,t){await this.cloud.put(await this.freshUrl(e),t,e,()=>this.freshUrl(e))}}export{K as Uploader,_ as localObjects,Y as reviewSourceObject};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Q=Object.defineProperty;var u=(e,s)=>Q(e,"name",{value:s,configurable:!0});import{zstdCompressSync as V}from"node:zlib";import{blobStore as X}from"../../blobs/index.js";import{openDb as S,withCanvasWrite as C}from"../../canvas/db.js";import{insertImportedRevisions as Z}from"../../graph/documents.js";import{getById as x}from"../../graph/objects.js";import{bundleKeys as M,decodeRows as ee,rowKeys as N,SEQ_TABLES as te}from"../bundle/layout.js";import{readCatalog as ae}from"./catalog.js";import{copyRows as ne,decodeKeys as L,encodeKeys as B}from"./copy.js";import{pruneStaged as ie,precheck as se,renameClashingProfiles as re,rewriteConversationHeaders as oe,rewritePaths as de,rewriteRequestPaths as pe,takeRepoSyncedDocuments as ue}from"./prepare.js";import{boundSub as ce,checkSourcePerson as le,checkStagedBlobKeys as fe,checkStagedPersons as _e,checkStagedReferences as me,checkStagedRequestKeys as we}from"./bind.js";import{deleteBlobs as ge,deleteRunBlobs as be,deleteRunPrefix as he,moveRunBlobs as ye}from"./blobs.js";import{dropStubRows as Ee,findFleetGrant as Se,grantMissing as ve,mapProfileIds as Re,renameClashingRepos as Oe,rewriteIds as Pe,rewritePerson as Ie,scopeRepoIdentities as Te}from"./rewrite.js";import{dropStaging as W,ImportLaneError as w,stage as ke,stagingSchema as je,targetSchema as De}from"./stage.js";import{verifyRun as Ae}from"./verify.js";import{sandboxPathMap as Ce,writeNodeFiles as Me}from"./path-map.js";import{allStoreKeys as Ne,readPluginsStore as Le,recordImportedActivations as Be,writeStores as We}from"./stores.js";import{publishImportedPlugins as He}from"./publish-plugins.js";import{COPIED_TABLES as Ke}from"../bundle/layout.js";import{ClaimLostError as Ue}from"../../../daemon/reconcilers/row-claim.js";const H=10*6e4,Fe=30*6e4,v=u(()=>new Date().toISOString(),"now"),R=u(async(e,s)=>{await(await S()).prepare("UPDATE import_runs SET step = ? WHERE run_id = ?").run(s,e)},"setStep");async function Je(e,s){const i=await e.get(M.source(s));if(i===null)throw new w("stage","bundle_invalid","source.json is missing");const n=JSON.parse(i.toString("utf8"));if(typeof n.rowParts!="object"||n.rowParts===null)throw new w("stage","bundle_invalid","source.json names no row parts");return n}u(Je,"readSource");async function qe(e,s,i,n,r,d){const a=[];for(const l of N(i.run_id,"grants",n)){const t=await e.get(l);if(t===null)throw new w("stage","bundle_invalid",`row file ${l} is missing`);a.push(...ee(t))}const c=[];for(const l of a){const t=ce(l.sub,n.person,i.person,"grants.sub");await Se(s,r,d,t,l.grantee)===void 0&&c.push(l.grantee)}if(c.length===0)return!0;if(i.loaded_at===void 0||i.loaded_at===null)throw new w("stage","import_failed","a loading run has no loaded_at");if(Date.now()-Date.parse(i.loaded_at)>=H)throw ve(c);return!1}u(qe,"grantsReady");async function mt(e,s,i={}){const n=i.blobs??await X(),r=await S(),d=je(e.run_id),a=u(async t=>{await s.assertOwned(),await R(e.run_id,t),await i.atStep?.(t)},"at");let c=e.state==="committed";const l=[];try{const t=await Je(n,e.run_id);if(e.source_kind==="machine"&&t.installId!==e.source_install_id)throw new w("stage","bundle_invalid",`source.json names install ${t.installId}, the run is for ${e.source_install_id}`);t.installId=e.source_install_id;const f=await De(r),O=[...Ke],g=await ae(r,f,[...O,"grants"]);if(!c){const _={},I=[],T=[],k=i.fleetRuntime??process.env.CRTR_RUNTIME??null;if(await le(r,f,t.person,e.person),!await qe(n,r,e,t,f,k)){await s.assertOwned(),await R(e.run_id,"waiting_for_grants");return}await a("publish-plugins");const h=await He(await Le(n,e.run_id));if(h.unavailable.length>0){if(e.loaded_at===void 0||e.loaded_at===null)throw new w("publish-plugins","import_failed","a loading run has no loaded_at");if(Date.now()-Date.parse(e.loaded_at)>=H)throw new w("publish-plugins","directory_unavailable",`the directory did not answer for: ${h.unavailable.slice(0,10).join(", ")}; rerun the import once it is reachable`,{plugins:h.unavailable});await s.assertOwned(),await R(e.run_id,"waiting_for_directory");return}T.push(...h.refused),await a("stage");const U=await ke(r,e.run_id,t.counts,o=>N(e.run_id,o,t),o=>n.get(o));for(const[o,p]of Object.entries(U))_[o]={staged:p,inserted:0,mapped:0,dropped:0};const m={db:r,schema:d,target:f,catalog:g,sourcePerson:t.person,targetPerson:e.person,fleetRuntime:k,shippedBodies:t.shippedBodies??{}};await a("bind-staged");for(const[o,p]of Object.entries(await _e(m)))y(_,o,p);for(const[o,p]of Object.entries(await fe(m)))y(_,o,p);await a("rewrite-person"),await Ie(m),await Te(m),await a("prune");const F=await ie(r,d,g,t),E=t.kind==="hosted"?Ce(t.pathPrefixes??[]):[];await a("rewrite-paths"),await de(r,d,E),await oe(r,d,E,n,e.run_id),await pe(r,d),await we(m);const J=await Re(m);await re(r,d,f,t.installId,e.person),await a("rewrite-ids");const j=await Pe(m,J);await a("drop");const q=await ue(r,d,f),$=await Ee(m);for(const[o,p]of Object.entries({...F}))y(_,o,p);for(const[o,p]of Object.entries($))y(_,o,p);await me(m,{installId:t.installId,person:e.person,runId:e.run_id}),await Oe(m),await a("pre-check");const G=new Map([["messages",["seq"]],...te.map(o=>[o,["seq"]])]);await se(r,d,f,g,O,new Set,G),await a("blobs"),await ye(r,d,f,e.person,n,e.run_id,l),await a("copy"),await C(async o=>{await s.assertOwned({extendLeaseMs:Fe});const p=await ne({db:o,runId:e.run_id,schema:d,target:f,catalog:g,source:t,person:e.person,idMap:j,pathMap:E}),D=await Ye(o,e.run_id,q);D>0&&(p.inserted.revisions=(p.inserted.revisions??0)+D),await Me(o,d,e.run_id,t);const A=await We({db:o,blobs:n,runId:e.run_id,person:e.person,objectMap:j.object});for(const[Y,z]of Object.entries(A.inserted))p.inserted[Y]=z.length;return I.push(...A.unresolvedPlugins),await o.prepare("UPDATE import_runs SET counts_json = ?, loaded_at = COALESCE(loaded_at, ?) WHERE run_id = ?").run(JSON.stringify({...Ge(_,p),unresolved_plugins:I,refused_plugins:T}),v(),e.run_id),p}),c=!0,await i.atStep?.("committed")}await a("verify");const b=await Ae(r,e.run_id,d,f,g,t.installId);if(await r.prepare("UPDATE import_runs SET verify_json = ? WHERE run_id = ?").run(JSON.stringify(b),e.run_id),!b.ok)throw new w("verify","verify_failed","the committed rows differ from the staged rows or an invariant failed",{differences:b.differences,invariants:b.invariants});await a("manifest");const P=M.manifest(e.run_id);await n.put(P,await ze(e.run_id)),await W(r,e.run_id);for(const _ of Ne(e.run_id))await n.delete(_);await be(n,e.run_id),await C(async _=>{await Be(_,e.run_id,e.person),await _.prepare("UPDATE import_runs SET state = 'done', step = 'done', manifest_key = ?, finished_at = ? WHERE run_id = ?").run(P,v(),e.run_id)})}catch(t){if(t instanceof Ue)throw t;const f=$e(t);await W(r,e.run_id).catch(()=>{}),c||await ge(n,l,!0),await r.prepare("UPDATE import_runs SET state = 'failed', failure_json = ?, finished_at = ? WHERE run_id = ?").run(JSON.stringify(f),v(),e.run_id),await he(n,e.run_id,{keepNodeFiles:c,bestEffort:!0})}}u(mt,"processRun");function $e(e){if(e instanceof w)return{step:e.step,code:e.code,message:e.message,...e.detail===void 0?{}:{detail:e.detail}};const s=e.code;return{step:"unknown",code:typeof s=="string"?s:"import_failed",message:e instanceof Error?e.message:String(e)}}u($e,"failureOf");function y(e,s,i){(e[s]??={staged:0,inserted:0,mapped:0,dropped:0}).dropped+=i}u(y,"addDropped");function Ge(e,s){for(const[i,n]of Object.entries(s.inserted))(e[i]??={staged:0,inserted:0,mapped:0,dropped:0}).inserted=n;for(const[i,n]of Object.entries(s.mapped))(e[i]??={staged:0,inserted:0,mapped:0,dropped:0}).mapped=n;return e}u(Ge,"withInserted");async function Ye(e,s,i){const n=new Set((await e.prepareUncached("SELECT rev_id FROM revisions WHERE rev_id IN (SELECT jsonb_array_elements_text(?::jsonb))").all(JSON.stringify(i.map(a=>a.rev_id)))).map(a=>a.rev_id)),r=i.filter(a=>!n.has(a.rev_id)),d=new Map;for(const a of i)d.set(a.document,[...d.get(a.document)??[],a]);for(const[a,c]of d){const l=await x(e,a);l!==null&&await Z(e,l,c.map(t=>({rev_id:t.rev_id,parents:t.parents,body_hash:t.body_hash,rationale:t.rationale,created_at:t.created_at})))}return await K(e,s,"revisions",r.map(a=>[a.rev_id])),await K(e,s,"revision_parents",r.flatMap(a=>a.parents.map(c=>[a.rev_id,c]))),r.length}u(Ye,"arrive");async function K(e,s,i,n){if(n.length===0)return;const r=await e.prepare("SELECT inserted_keys FROM import_manifest WHERE run_id = ? AND table_name = ?").get(s,i);r===void 0?await e.prepare("INSERT INTO import_manifest (run_id, table_name, inserted_keys) VALUES (?, ?, ?)").run(s,i,B(n)):await e.prepare("UPDATE import_manifest SET inserted_keys = ? WHERE run_id = ? AND table_name = ?").run(B([...L(r.inserted_keys),...n]),s,i)}u(K,"appendManifest");async function ze(e){const i=await(await S()).prepare("SELECT table_name, inserted_keys FROM import_manifest WHERE run_id = ? ORDER BY table_name").all(e);return V(Buffer.from(i.map(n=>JSON.stringify({table:n.table_name,keys:L(n.inserted_keys)})).join(`
|
|
2
2
|
`)+`
|
|
3
|
-
`))}
|
|
3
|
+
`))}u(ze,"manifestFile");export{Fe as COPY_LEASE_MS,H as GRANT_WAIT_MS,mt as processRun};
|
|
@@ -5,7 +5,7 @@ export declare const stagingSchema: (run: string) => string;
|
|
|
5
5
|
/** The target schema's name (the transaction's current schema). */
|
|
6
6
|
export declare function targetSchema(db: CanvasDb): Promise<string>;
|
|
7
7
|
export declare function dropStaging(db: CanvasDb, run: string): Promise<void>;
|
|
8
|
-
/** Create the staging schema and load every row file. `rowKeys(table)` names the table's row files
|
|
8
|
+
/** Create the staging schema and load every row file. `rowKeys(table)` names the table's row part files, in order, and `get` reads one from R2. */
|
|
9
9
|
export declare function stage(db: CanvasDb, run: string, counts: Record<string, number>, rowKeys: (table: string) => string[], get: (key: string) => Promise<Buffer | null>): Promise<Record<string, number>>;
|
|
10
10
|
export declare class ImportLaneError extends Error {
|
|
11
11
|
readonly step: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.640",
|
|
4
4
|
"description": "crtr — agent runtime with memory, plugins, and marketplaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
},
|
|
146
146
|
"license": "UNLICENSED",
|
|
147
147
|
"dependencies": {
|
|
148
|
-
"@north-light/identity": "0.3.
|
|
148
|
+
"@north-light/identity": "0.3.640",
|
|
149
149
|
"@earendil-works/chord": "1.1.0",
|
|
150
150
|
"@earendil-works/pi-agent-core": "1.1.0",
|
|
151
151
|
"@earendil-works/pi-ai": "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.640",
|
|
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.640",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "UNLICENSED",
|
|
12
12
|
"workspaces": [
|
|
@@ -28,7 +28,7 @@
|
|
|
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.
|
|
31
|
+
"@north-light/identity": "0.3.640",
|
|
32
32
|
"cron-parser": "^5.6.0",
|
|
33
33
|
"esbuild": "^0.27.7",
|
|
34
34
|
"jose": "^6.2.12",
|
|
@@ -11956,17 +11956,17 @@
|
|
|
11956
11956
|
},
|
|
11957
11957
|
"packages/crouter-api": {
|
|
11958
11958
|
"name": "@north-light/api",
|
|
11959
|
-
"version": "0.3.
|
|
11959
|
+
"version": "0.3.640",
|
|
11960
11960
|
"license": "UNLICENSED"
|
|
11961
11961
|
},
|
|
11962
11962
|
"packages/crouter-env-docker": {
|
|
11963
11963
|
"name": "@north-light/env-docker",
|
|
11964
|
-
"version": "0.3.
|
|
11964
|
+
"version": "0.3.640",
|
|
11965
11965
|
"license": "UNLICENSED"
|
|
11966
11966
|
},
|
|
11967
11967
|
"packages/crouter-identity": {
|
|
11968
11968
|
"name": "@north-light/identity",
|
|
11969
|
-
"version": "0.3.
|
|
11969
|
+
"version": "0.3.640",
|
|
11970
11970
|
"license": "UNLICENSED",
|
|
11971
11971
|
"dependencies": {
|
|
11972
11972
|
"jose": "^6.2.1"
|
|
@@ -11974,21 +11974,21 @@
|
|
|
11974
11974
|
},
|
|
11975
11975
|
"packages/crouter-plugin": {
|
|
11976
11976
|
"name": "@north-light/plugin",
|
|
11977
|
-
"version": "0.3.
|
|
11977
|
+
"version": "0.3.640",
|
|
11978
11978
|
"license": "UNLICENSED",
|
|
11979
11979
|
"dependencies": {
|
|
11980
|
-
"@north-light/api": "0.3.
|
|
11981
|
-
"@north-light/identity": "0.3.
|
|
11980
|
+
"@north-light/api": "0.3.640",
|
|
11981
|
+
"@north-light/identity": "0.3.640"
|
|
11982
11982
|
}
|
|
11983
11983
|
},
|
|
11984
11984
|
"packages/crouter-sdk": {
|
|
11985
11985
|
"name": "@north-light/sdk",
|
|
11986
|
-
"version": "0.3.
|
|
11986
|
+
"version": "0.3.640",
|
|
11987
11987
|
"license": "UNLICENSED",
|
|
11988
11988
|
"dependencies": {
|
|
11989
|
-
"@north-light/api": "0.3.
|
|
11990
|
-
"@north-light/identity": "0.3.
|
|
11991
|
-
"@north-light/plugin": "0.3.
|
|
11989
|
+
"@north-light/api": "0.3.640",
|
|
11990
|
+
"@north-light/identity": "0.3.640",
|
|
11991
|
+
"@north-light/plugin": "0.3.640",
|
|
11992
11992
|
"jose": "^6.2.1"
|
|
11993
11993
|
},
|
|
11994
11994
|
"bin": {
|