@north-light/cli 0.3.610 → 0.3.611
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/core/import/load/bind.d.ts +11 -4
- package/dist/core/import/load/bind.js +14 -14
- package/dist/core/import/load/blobs.d.ts +1 -1
- package/dist/core/import/load/blobs.js +1 -1
- package/dist/core/import/load/rewrite.js +11 -11
- package/dist/core/import/load/run.js +1 -1
- package/package.json +2 -2
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +13 -13
|
@@ -11,9 +11,16 @@ export declare function checkStagedPersons(input: RewriteInput): Promise<Record<
|
|
|
11
11
|
* document, the person's own object, an object with an `acts_for` fact for the person, or anything below those that is not directly under an app), and no profile or grant the
|
|
12
12
|
* rows name belongs to another person. */
|
|
13
13
|
export declare function checkStagedReferences(input: RewriteInput): Promise<void>;
|
|
14
|
-
/** After staging, before rewrite 1: every blob key a staged row names has the shape its row would produce and an owner (node) that is in this bundle
|
|
15
|
-
* A key naming another person
|
|
16
|
-
* compaction would delete, a blob of someone else's conversation. (Human requests are checked by `checkStagedRequestKeys`,
|
|
17
|
-
|
|
14
|
+
/** After staging, before rewrite 1: every blob key a staged row names has the shape its row would produce and an owner (node) that is in this bundle or is the
|
|
15
|
+
* importing person's own node in the target. A key naming a node of another person is `person_mismatch`; a key of no known shape is `bundle_invalid`. Without this,
|
|
16
|
+
* the importer's own node would read, and compaction would delete, a blob of someone else's conversation. (Human requests are checked by `checkStagedRequestKeys`,
|
|
17
|
+
* after their dirs are rewritten to blob keys.)
|
|
18
|
+
*
|
|
19
|
+
* A row whose owner node is in neither the bundle nor the target, and that no live row of the bundle holds, is what a deleted node left behind (the purge of a node
|
|
20
|
+
* keeps a conversation or attachment row and its blob; a deleted node's job rows stay too). It is dropped, not refused: a conversation no staged `sessions` row binds
|
|
21
|
+
* (its `conversation_parts` and `conversation_entries` rows), an `upload_uses` row whose `run_id` is not a node of the bundle, a `jobs` row whose job object is not
|
|
22
|
+
* owned by a node of the bundle. `moveRunBlobs` leaves the blob of such an owner where it was uploaded. A conversation's owner is the owner of its part keys; a
|
|
23
|
+
* `conversation_entries` row with no part names no owner and is copied as before. Returns rows dropped per table. */
|
|
24
|
+
export declare function checkStagedBlobKeys(input: RewriteInput): Promise<Record<string, number>>;
|
|
18
25
|
/** After rewrite 4b: a human request's `request_dir`, `presentation_dir` and `file` that are blob keys (`requests/…`) are under the request's own `requests/<its id>`. */
|
|
19
26
|
export declare function checkStagedRequestKeys(input: RewriteInput): Promise<void>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
UNION ALL SELECT 'grants' FROM ${
|
|
3
|
-
UNION ALL SELECT 'nodes' FROM ${
|
|
4
|
-
WHERE adapter_json::jsonb #>> '{principal,sub}' IS NOT NULL AND adapter_json::jsonb #>> '{principal,sub}' NOT IN (?, ?) LIMIT 5`,
|
|
5
|
-
AND ${
|
|
6
|
-
SELECT DISTINCT value, value FROM ${
|
|
7
|
-
UNION SELECT c.start, o.owner FROM chain c JOIN ${
|
|
1
|
+
var q=Object.defineProperty;var i=(a,t)=>q(a,"name",{value:t,configurable:!0});import{parseBlobKey as L}from"../bundle/blob-keys.js";import{q as _}from"./catalog.js";import{objectIdColumns as J}from"./rewrite.js";import{ImportLaneError as D}from"./stage.js";const P=/^user:[A-Za-z0-9._-]+$/,A=i(a=>a.replace(/^user:/,""),"bare"),g=i((a,t)=>`${_(a)}.${_(t)}`,"sq"),f=i(async(a,t,...c)=>await a.prepareUncached(t).all(...c),"all");function S(a,t){return new D("bind","person_mismatch",a,t)}i(S,"mismatch");function Z(a,t,c,b){if(a===t||a===c)return c;throw S(`${b} names ${a}, which is neither the bundle's person nor the importing person`,{where:b,value:a})}i(Z,"boundSub");async function Q(a,t,c,b){if(!P.test(c))throw S(`the bundle's person ${JSON.stringify(c)} is not a user:<id> principal`,{where:"source.json person",value:c});if(c===b)return;const p=i(r=>g(t,r),"T"),o=await a.prepareUncached(`SELECT 'identities' AS tbl FROM ${p("identities")} WHERE scheme IN ('user', 'local-user') AND external_id = ?
|
|
2
|
+
UNION ALL SELECT 'grants' FROM ${p("grants")} WHERE sub = ? UNION ALL SELECT 'profiles' FROM ${p("profiles")} WHERE person = ?
|
|
3
|
+
UNION ALL SELECT 'nodes' FROM ${p("nodes")} WHERE sub = ? LIMIT 1`).get(c,c,c,c);if(o!==void 0)throw S(`the bundle's person ${c} is already a person in the target (${o.tbl}), not the importing person ${b}`,{where:`${o.tbl}`,value:c})}i(Q,"checkSourcePerson");const K=[["nodes","sub"],["crons","sub"],["grants","sub"],["profiles","person"],["charges","sub"],["limits","sub"],["audit_rows","sub"],["provider_approvals","sub"]],Y=[["charges","payer"],["limits","payer"],["audit_rows","payer"],["audit_rows","grantee"],["charges","grantee"],["run_events","grantee"],["idempotency_keys","grantee"],["uploads","grantee"],["provider_approvals","grantee"],["profiles","grantee"],["crons","grantee"]];async function ee(a){const{db:t,schema:c,sourcePerson:b,targetPerson:p}=a,o=i(l=>g(c,l),"S"),r=i((l,u)=>{throw S(`${l} names ${u.join(", ")}, who is neither the bundle's person ${b} nor the importing person ${p}`,{where:l,values:u})},"refuse");for(const[l,u]of K){const n=await f(t,`SELECT DISTINCT ${_(u)} AS v FROM ${o(l)} WHERE ${_(u)} IS NOT NULL AND ${_(u)} <> '' AND ${_(u)} NOT IN (?, ?) LIMIT 5`,b,p);n.length>0&&r(`${l}.${u}`,n.map(d=>d.v))}for(const[l,u]of Y){const n=await f(t,`SELECT DISTINCT ${_(u)} AS v FROM ${o(l)} WHERE ${_(u)} LIKE 'user:%' AND ${_(u)} NOT IN (?, ?) LIMIT 5`,b,p);n.length>0&&r(`${l}.${u}`,n.map(d=>d.v))}const E=await f(t,`SELECT DISTINCT external_id AS v FROM ${o("identities")} WHERE scheme IN ('user', 'local-user') AND external_id NOT IN (?, ?) LIMIT 5`,b,p);E.length>0&&r("identities.external_id",E.map(l=>l.v));const I=await f(t,`SELECT DISTINCT adapter_json::jsonb #>> '{principal,sub}' AS v FROM ${o("daemon_actions")}
|
|
4
|
+
WHERE adapter_json::jsonb #>> '{principal,sub}' IS NOT NULL AND adapter_json::jsonb #>> '{principal,sub}' NOT IN (?, ?) LIMIT 5`,b,p);I.length>0&&r("daemon_actions principal.sub",I.map(l=>l.v));const N=await f(t,`SELECT DISTINCT subject_id AS v FROM ${o("relations")} WHERE relation = 'acts_for' AND subject_type = 'user' AND subject_id NOT IN (?, ?) LIMIT 5`,A(b),A(p));N.length>0&&r("relations acts_for subject",N.map(l=>l.v));const $=Number((await t.prepareUncached(`DELETE FROM ${o("relations")} WHERE resource_type = 'crtr/group'`).run()).changes);return $>0?{relations:$}:{}}i(ee,"checkStagedPersons");async function te(a){const{db:t,schema:c,target:b,catalog:p,targetPerson:o}=a,r=i(n=>g(c,n),"S"),E=i(n=>g(b,n),"T"),I=A(o);await t.exec(`CREATE TABLE ${r("_refs")} (tbl text NOT NULL, col text NOT NULL, value text NOT NULL)`);const N=[];for(const[n,d]of J(p))if(!(!p.tables.has(n)||n==="relations"))for(const h of d)!(n==="nodes"&&h==="profile_id")&&!(n==="crons"&&h==="profile")&&N.push([n,h,""]);N.push(["relations","resource_id","WHERE resource_type = 'crtr/object'"]);for(const[n,d,h]of N)await t.prepareUncached(`INSERT INTO ${r("_refs")} SELECT ?, ?, ${_(d)}::text FROM ${r(n)} ${h===""?"WHERE":`${h} AND`} ${_(d)} IS NOT NULL
|
|
5
|
+
AND ${_(d)}::text NOT IN (SELECT id FROM ${r("objects")}) AND ${_(d)}::text IN (SELECT id FROM ${E("objects")})`).run(n,d);const $=await f(t,`WITH RECURSIVE chain(start, id) AS (
|
|
6
|
+
SELECT DISTINCT value, value FROM ${r("_refs")}
|
|
7
|
+
UNION SELECT c.start, o.owner FROM chain c JOIN ${E("objects")} o ON o.id = c.id JOIN ${E("objects")} up ON up.id = o.owner AND up.type <> 'app'),
|
|
8
8
|
ok(id) AS (
|
|
9
|
-
SELECT o.id FROM ${
|
|
10
|
-
UNION SELECT d.object FROM ${
|
|
11
|
-
UNION SELECT i.object FROM ${
|
|
12
|
-
UNION SELECT r.resource_id FROM ${
|
|
13
|
-
SELECT r.tbl, r.col, r.value FROM ${
|
|
14
|
-
WHERE NOT EXISTS (SELECT 1 FROM chain c JOIN ok ON ok.id = c.id WHERE c.start = r.value) LIMIT 10`,
|
|
15
|
-
JOIN ${
|
|
9
|
+
SELECT o.id FROM ${E("objects")} o WHERE o.type = 'app'
|
|
10
|
+
UNION SELECT d.object FROM ${E("documents")} d WHERE d.source_path IS NOT NULL
|
|
11
|
+
UNION SELECT i.object FROM ${E("identities")} i WHERE i.scheme IN ('user', 'local-user') AND i.external_id = ?
|
|
12
|
+
UNION SELECT r.resource_id FROM ${E("relations")} r WHERE r.resource_type = 'crtr/object' AND r.relation = 'acts_for' AND r.subject_type = 'user' AND r.subject_id = ?)
|
|
13
|
+
SELECT r.tbl, r.col, r.value FROM ${r("_refs")} r
|
|
14
|
+
WHERE NOT EXISTS (SELECT 1 FROM chain c JOIN ok ON ok.id = c.id WHERE c.start = r.value) LIMIT 10`,o,I);if($.length>0)throw S(`the bundle refers to objects that are not ${o}'s: ${$.map(n=>`${n.tbl}.${n.col}=${n.value}`).join(", ")}`,{references:$});const l=[["nodes","profile_id"],["crons","profile"],["profiles","id"]];for(const[n,d]of l){const h=await f(t,`SELECT DISTINCT s.${_(d)} AS v FROM ${r(n)} s JOIN ${E("profiles")} p ON p.id = s.${_(d)} WHERE p.person <> ? LIMIT 5`,o);if(h.length>0)throw S(`${n}.${d} names profiles that belong to another person: ${h.map(T=>T.v).join(", ")}`,{where:`${n}.${d}`,values:h.map(T=>T.v)})}for(const[n,d]of[["nodes","grant_id"],["crons","grant_id"]]){const h=await f(t,`SELECT DISTINCT s.${_(d)} AS v FROM ${r(n)} s JOIN ${E("grants")} g ON g.id = s.${_(d)} WHERE g.sub <> ? LIMIT 5`,o);if(h.length>0)throw S(`${n}.${d} names grants that belong to another person: ${h.map(T=>T.v).join(", ")}`,{where:`${n}.${d}`,values:h.map(T=>T.v)})}const u=await f(t,`SELECT DISTINCT d.adapter_json::jsonb #>> '{principal,grant_id}' AS v FROM ${r("daemon_actions")} d
|
|
15
|
+
JOIN ${E("grants")} g ON g.id = d.adapter_json::jsonb #>> '{principal,grant_id}' WHERE g.sub <> ? LIMIT 5`,o);if(u.length>0)throw S(`a queued action names grants that belong to another person: ${u.map(n=>n.v).join(", ")}`,{where:"daemon_actions principal.grant_id",values:u.map(n=>n.v)})}i(te,"checkStagedReferences");const k=i((a,t)=>new D("bind","bundle_invalid",a,t),"bundleInvalid");async function oe(a){const{db:t,schema:c,target:b,targetPerson:p}=a,o=i(e=>g(c,e),"S"),r=new Set((await f(t,`SELECT node_id AS v FROM ${o("nodes")}`)).map(e=>e.v)),E=await f(t,`SELECT conversation_id, seq::text AS seq, blob_key FROM ${o("conversation_parts")}`),I=await f(t,`SELECT run_id, path, blob_key FROM ${o("upload_uses")} WHERE blob_key IS NOT NULL`),N=await f(t,`SELECT object, output_key FROM ${o("jobs")} WHERE output_key IS NOT NULL`),$=i(e=>e.split("/")[1]??"","jobOwner"),l=i((e,s,w,O)=>{const F=L(s);if(F===null||F.kind!==w||O!==void 0&&s!==O)throw k(`${e} holds ${JSON.stringify(s)}, which is not a ${w} blob key${O===void 0?"":` of the shape ${O}`}`,{where:e,value:s})},"shaped");for(const e of E)if(l("conversation_parts.blob_key",e.blob_key,"conversation"),e.blob_key.split("/")[2]!==e.conversation_id)throw k(`conversation_parts.blob_key ${e.blob_key} is not under its conversation ${e.conversation_id}`,{where:"conversation_parts.blob_key",value:e.blob_key});for(const e of I)l("upload_uses.blob_key",e.blob_key,"attachment");for(const e of N)l("jobs.output_key",e.output_key,"job",`jobs/${$(e.output_key)}/${e.object}/output`);const u=new Set;for(const{blob_key:e}of E){const s=L(e);s!==null&&s.kind==="conversation"&&!r.has(s.owner)&&u.add(s.owner)}for(const{blob_key:e}of I){const s=L(e);s!==null&&s.kind==="attachment"&&!r.has(s.owner)&&u.add(s.owner)}for(const{output_key:e}of N)r.has($(e))||u.add($(e));const n=new Map((u.size===0?[]:await f(t,`SELECT node_id, sub FROM ${g(b,"nodes")} WHERE node_id = ANY(?::text[])`,[...u])).map(e=>[e.node_id,e.sub])),d=i(e=>r.has(e)||n.get(e)===p,"held"),h=i(e=>!r.has(e)&&!n.has(e),"gone"),T={},m=i((e,s)=>{s>0&&(T[e]=(T[e]??0)+s)},"count"),R=i(async(e,...s)=>Number((await t.prepareUncached(e).run(...s)).changes),"drop"),H=new Set((await f(t,`SELECT DISTINCT session_id AS v FROM ${o("sessions")} WHERE session_id IS NOT NULL`)).map(e=>e.v)),v=new Map;for(const{conversation_id:e,blob_key:s}of E){const w=L(s),O=v.get(e);O!==null&&(w===null||w.kind!=="conversation"?v.set(e,null):v.set(e,[...O??[],w.owner]))}const y=[...v].filter(([e,s])=>s!==null&&!H.has(e)&&s.every(h)).map(([e])=>e);y.length>0&&(m("conversation_parts",await R(`DELETE FROM ${o("conversation_parts")} WHERE conversation_id = ANY(?::text[])`,y)),m("conversation_entries",await R(`DELETE FROM ${o("conversation_entries")} WHERE conversation_id = ANY(?::text[])`,y)));const W=new Set(y),j=i((e,s)=>{const w=L(s).owner;if(!d(w))throw S(`${e} holds ${s}, which belongs to node ${w}, who is not in the bundle`,{where:e,value:s})},"owned");for(const e of E)W.has(e.conversation_id)||j("conversation_parts.blob_key",e.blob_key);const M=I.filter(e=>{const s=L(e.blob_key);return s!==null&&s.kind==="attachment"&&h(s.owner)&&!r.has(e.run_id)});M.length>0&&m("upload_uses",await R(`DELETE FROM ${o("upload_uses")} u USING unnest(?::text[], ?::text[]) d(run_id, path) WHERE u.run_id = d.run_id AND u.path = d.path`,M.map(e=>e.run_id),M.map(e=>e.path)));const U=new Set(M);for(const e of I)U.has(e)||j("upload_uses.blob_key",e.blob_key);const C=N.filter(e=>e.output_key===`jobs/${$(e.output_key)}/${e.object}/output`&&h($(e.output_key)));C.length>0&&m("jobs",await R(`DELETE FROM ${o("jobs")} WHERE object = ANY(?::text[])`,C.map(e=>e.object)));const x=new Set(C);for(const e of N)x.has(e)||j("jobs.output_key",e.output_key);return T}i(oe,"checkStagedBlobKeys");async function ne(a){const{db:t,schema:c}=a;for(const b of await f(t,`SELECT request_id, request_dir, presentation_dir, file FROM ${g(c,"human_requests")}`))for(const p of["request_dir","presentation_dir","file"]){const o=b[p];if(o===null||!o.startsWith("requests/"))continue;const r=L(o.includes("/",9)?o:`${o}/x`);if(r===null||r.kind!=="request")throw k(`human_requests.${p} holds ${JSON.stringify(o)}, which is not a request blob key`,{where:`human_requests.${p}`,value:o});if(r.owner!==b.request_id)throw S(`human_requests.${p} of ${b.request_id} holds ${o}, which belongs to request ${r.owner}`,{where:`human_requests.${p}`,value:o})}}i(ne,"checkStagedRequestKeys");export{Z as boundSub,Q as checkSourcePerson,oe as checkStagedBlobKeys,ee as checkStagedPersons,te as checkStagedReferences,ne as checkStagedRequestKeys};
|
|
@@ -5,6 +5,6 @@ export interface MovedBlobs {
|
|
|
5
5
|
left: number;
|
|
6
6
|
}
|
|
7
7
|
/** `created` collects the keys this call wrote, so the caller can delete them if the run fails before its copy commits. */
|
|
8
|
-
export declare function moveRunBlobs(db: CanvasDb, schema: string, blobs: BlobStore, runId: string, created: string[]): Promise<MovedBlobs>;
|
|
8
|
+
export declare function moveRunBlobs(db: CanvasDb, schema: string, target: string, person: string, blobs: BlobStore, runId: string, created: string[]): Promise<MovedBlobs>;
|
|
9
9
|
/** Delete the run's uploaded copies (after the run is done). */
|
|
10
10
|
export declare function deleteRunBlobs(blobs: BlobStore, runId: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var x=Object.defineProperty;var r=(e,n)=>x(e,"name",{value:n,configurable:!0});import{parseBlobKey as _,runBlobPrefix as h}from"../bundle/blob-keys.js";import{q as w}from"./catalog.js";import{ImportLaneError as E}from"./stage.js";const q=8;async function M(e,n,s,g,a,y,v){const R={nodes:new Set((await e.prepareUncached(`SELECT node_id AS v FROM ${w(n)}.nodes UNION SELECT node_id FROM ${w(s)}.nodes WHERE sub = ?`).all(g)).map(t=>t.v)),human_requests:new Set((await e.prepareUncached(`SELECT request_id AS v FROM ${w(n)}.human_requests`).all()).map(t=>t.v))},p=h(y),i=await a.list(p),l={moved:0,left:0};let f=0;const S=r(async()=>{for(let t=f++;t<i.length;t=f++){const c=i[t],o=c.slice(p.length),u=_(o);if(u===null||!R[u.ownerTable].has(u.owner)){l.left+=1;continue}const d=await a.get(c);if(d===null)throw new E("blobs","bundle_invalid",`${c} was listed and is gone`);const m=await a.get(o);if(m===null)await a.put(o,d),v.push(o);else if(!m.equals(d))throw new E("blobs","unique_conflict",`${o} already exists with other contents; the import does not replace it`,{key:o});l.moved+=1}},"worker");return await Promise.all(Array.from({length:Math.min(q,i.length)},S)),l}r(M,"moveRunBlobs");async function T(e,n){for(const s of await e.list(h(n)))await e.delete(s)}r(T,"deleteRunBlobs");export{T as deleteRunBlobs,M as moveRunBlobs};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var h=Object.defineProperty;var l=(n,a)=>h(n,"name",{value:a,configurable:!0});import{createHash as g}from"node:crypto";import{ROOT_PROFILE_ID as j}from"../../profiles/manifest.js";import{substitutePerson as D}from"../../canvas/person.js";import{withCanvasWrite as A}from"../../canvas/db.js";import{ImportLaneError as _}from"./stage.js";import{q as T}from"./catalog.js";const I=[["rules","owner"],["messages","object_id"],["messages","actor_id"],["custom_objects","registered_by"],["nodes","app"],["nodes","profile_id"],["revisions","acting_app"],["relations","resource_id"],["relations","subject_id"],["crons","profile"],["profiles","environment_id"]],M=[["nodes","grant_id"],["crons","grant_id"]],S={identities:"object",documents:"object",jobs:"object",custom_objects:"object",context_sessions:"node",rules:"object"},H=["app","person","profile","repo"];function
|
|
1
|
+
var h=Object.defineProperty;var l=(n,a)=>h(n,"name",{value:a,configurable:!0});import{createHash as g}from"node:crypto";import{ROOT_PROFILE_ID as j}from"../../profiles/manifest.js";import{substitutePerson as D}from"../../canvas/person.js";import{withCanvasWrite as A}from"../../canvas/db.js";import{ImportLaneError as _}from"./stage.js";import{q as T}from"./catalog.js";const I=[["rules","owner"],["messages","object_id"],["messages","actor_id"],["custom_objects","registered_by"],["nodes","app"],["nodes","profile_id"],["revisions","acting_app"],["relations","resource_id"],["relations","subject_id"],["crons","profile"],["profiles","environment_id"]],M=[["nodes","grant_id"],["crons","grant_id"]],S={identities:"object",documents:"object",jobs:"object",custom_objects:"object",context_sessions:"node",rules:"object"},H=["app","person","profile","repo"];function W(n){const a=new Map,o=l((c,p)=>{a.has(c)||a.set(c,new Set),a.get(c).add(p)},"add");for(const c of n.foreignKeys)c.parent==="objects"&&c.columns.length===1&&o(c.table,c.columns[0]);for(const[c,p]of I)o(c,p);return a}l(W,"objectIdColumns");const N=l((n,a)=>`${T(n)}.${T(a)}`,"sq"),d=l(async(n,a,...o)=>Number((await n.prepareUncached(a).run(...o)).changes),"run"),O=l(async(n,a,...o)=>await n.prepareUncached(a).all(...o),"rows");async function K(n){n.sourcePerson!==n.targetPerson&&await A(async a=>{await a.exec(`SET LOCAL search_path TO ${T(n.schema)}`),await D(a,n.sourcePerson,n.targetPerson)})}l(K,"rewritePerson");async function C(n,a,o,c,p){return o===null?void 0:(await n.prepareUncached(`SELECT id FROM ${N(a,"grants")} WHERE runtime = ? AND sub = ? AND grantee = ?`).get(o,c,p))?.id}l(C,"findFleetGrant");function F(n){return new _("id_map","grant_missing",`no grant in the target for: ${n.slice(0,10).join(", ")}; approve the app, then rerun`,{grantees:[...n]})}l(F,"grantMissing");async function Y(n,a){const{db:o,schema:c,target:p}=n,t=l(e=>N(c,e),"S"),b=l(e=>N(p,e),"T"),m={object:new Map,grant:new Map,kind:new Map};for(const[e,E]of a)m.object.set(e,E);const i=n.targetPerson.replace(/^user:/,"");for(const e of H){const E=e==="person"?"t.external_id = ?":e==="app"?"?::text IS NOT NULL":`EXISTS (SELECT 1 FROM ${b("relations")} r WHERE r.resource_type = 'crtr/object' AND r.resource_id = tobj.id AND r.relation = 'acts_for' AND r.subject_type = 'user' AND r.subject_id = ?)`,f=await O(o,`SELECT i.object AS src, t.object AS dst FROM ${t("identities")} i
|
|
2
2
|
JOIN ${t("objects")} so ON so.id = i.object AND so.type = ?
|
|
3
|
-
JOIN ${
|
|
4
|
-
JOIN ${
|
|
5
|
-
WHERE ${
|
|
6
|
-
WHERE o.owner = ? AND o.name = ? AND o.type = 'document' AND o.deleted_at IS NULL AND d.source_path IS NOT NULL`).get(
|
|
3
|
+
JOIN ${b("identities")} t ON t.scheme = i.scheme AND t.external_id = i.external_id
|
|
4
|
+
JOIN ${b("objects")} tobj ON tobj.id = t.object AND tobj.type = so.type
|
|
5
|
+
WHERE ${E}`,e,e==="person"?n.targetPerson:i);for(const{src:$,dst:L}of f)$!==L&&m.object.set($,L)}const R=await O(o,`SELECT o.id, o.owner, o.name, o.created_at FROM ${t("objects")} o JOIN ${t("documents")} d ON d.object = o.id WHERE d.source_path IS NOT NULL`);for(const e of R){const E=await o.prepareUncached(`SELECT o.id FROM ${b("objects")} o JOIN ${b("documents")} d ON d.object = o.id
|
|
6
|
+
WHERE o.owner = ? AND o.name = ? AND o.type = 'document' AND o.deleted_at IS NULL AND d.source_path IS NOT NULL`).get(m.object.get(e.owner)??e.owner,e.name);if(E!==void 0){m.object.set(e.id,E.id);continue}const f=n.shippedBodies[e.id];if(f===void 0)throw new _("id_map","bundle_invalid",`shipped document ${e.name} (${e.id}) has no counterpart in the target and source.json has no body for it`);const $=await o.prepareUncached(`SELECT o.id FROM ${b("objects")} o JOIN ${b("identities")} i ON i.object = o.id
|
|
7
7
|
WHERE o.type = 'person' AND i.scheme = 'user' AND i.external_id = ?
|
|
8
8
|
UNION ALL SELECT o.id FROM ${t("objects")} o JOIN ${t("identities")} i ON i.object = o.id
|
|
9
|
-
WHERE o.type = 'person' AND i.scheme = 'user' AND i.external_id = ? LIMIT 1`).get(n.targetPerson,n.targetPerson);if($===void 0)throw new _("id_map","bundle_invalid",`no person object for ${n.targetPerson}; cannot import shipped document ${e.name}`);await
|
|
10
|
-
VALUES ('crtr/object', ?, 'acts_for', 'user', ?, '', 'crtr', ?) ON CONFLICT DO NOTHING`,e.id,i,e.created_at),await
|
|
11
|
-
FROM ${t("_idmap")} m WHERE m.kind = 'grant' AND d.adapter_json::jsonb ->> 'adapter' = 'cron_spawn' AND d.adapter_json::jsonb #>> '{principal,grant_id}' = m.source`),await
|
|
12
|
-
AND o.name <> ? AND (o.name = ? OR EXISTS (SELECT 1 FROM ${N(c,"objects")} t WHERE t.type = 'profile' AND t.name = o.name AND t.home_machine IS NULL AND t.id <> o.id))`,s,i,s,i),await
|
|
13
|
-
WHERE c.${
|
|
14
|
-
AND NOT EXISTS (SELECT 1 FROM ${N(c,
|
|
9
|
+
WHERE o.type = 'person' AND i.scheme = 'user' AND i.external_id = ? LIMIT 1`).get(n.targetPerson,n.targetPerson);if($===void 0)throw new _("id_map","bundle_invalid",`no person object for ${n.targetPerson}; cannot import shipped document ${e.name}`);await d(o,`UPDATE ${t("objects")} SET owner = ? WHERE id = ?`,$.id,e.id),await d(o,`DELETE FROM ${t("relations")} WHERE resource_type = 'crtr/object' AND resource_id = ? AND relation = 'reader' AND subject_type = 'user' AND subject_id = '*' AND subject_relation = ''`,e.id),await d(o,`INSERT INTO ${t("relations")} (resource_type, resource_id, relation, subject_type, subject_id, subject_relation, written_by, created_at)
|
|
10
|
+
VALUES ('crtr/object', ?, 'acts_for', 'user', ?, '', 'crtr', ?) ON CONFLICT DO NOTHING`,e.id,i,e.created_at),await d(o,`UPDATE ${t("documents")} SET source_path = NULL WHERE object = ?`,e.id),await d(o,`UPDATE ${t("revisions")} r SET body_hash = ? WHERE r.document = ? AND NOT EXISTS (SELECT 1 FROM ${t("revision_parents")} p WHERE p.parent = r.rev_id)`,f,e.id)}const s=await O(o,`SELECT id, sub, grantee FROM ${t("grants")} ORDER BY id`),r=[];for(const e of s){const E=await C(o,p,n.fleetRuntime,e.sub,e.grantee);E===void 0?r.push(e.grantee):m.grant.set(e.id,E)}if(r.length>0)throw F(r);await o.exec(`CREATE TABLE ${t("_idmap")} (kind text NOT NULL, source text NOT NULL, target text NOT NULL, PRIMARY KEY (kind, source))`);for(const[e,E]of[["object",m.object],["grant",m.grant]])for(const[f,$]of E)await d(o,`INSERT INTO ${t("_idmap")} (kind, source, target) VALUES (?, ?, ?)`,e,f,$);const u=`(SELECT source FROM ${t("_idmap")} WHERE kind = 'object')`;for(const[e,E]of Object.entries(S))await d(o,`DELETE FROM ${t(e)} WHERE ${E} IN ${u}`);await d(o,`DELETE FROM ${t("revision_parents")} WHERE child IN (SELECT rev_id FROM ${t("revisions")} WHERE document IN ${u})`),await d(o,`DELETE FROM ${t("revisions")} WHERE document IN ${u}`);for(const[e,E]of W(n.catalog))if(n.catalog.tables.has(e))for(const f of E)await w(o,t(e),f,"object",t("_idmap"));for(const[e,E]of M)await w(o,t(e),E,"grant",t("_idmap"));await d(o,`UPDATE ${t("daemon_actions")} d SET adapter_json = jsonb_set(d.adapter_json::jsonb, '{principal,grant_id}', to_jsonb(m.target))::text
|
|
11
|
+
FROM ${t("_idmap")} m WHERE m.kind = 'grant' AND d.adapter_json::jsonb ->> 'adapter' = 'cron_spawn' AND d.adapter_json::jsonb #>> '{principal,grant_id}' = m.source`),await d(o,`DELETE FROM ${t("objects")} WHERE id IN ${u}`),await d(o,`UPDATE ${t("objects")} SET name = ? WHERE type = 'person' AND name <> ? AND id IN (SELECT object FROM ${t("identities")} WHERE scheme = 'user' AND external_id = ?)`,i,i,n.targetPerson);for(const{name:e}of await O(o,`SELECT k.name FROM ${t("object_kinds")} k WHERE EXISTS (SELECT 1 FROM ${b("object_kinds")} t WHERE t.name = k.name)`))m.kind.set(e,e);return await d(o,`DELETE FROM ${t("object_kinds")} k WHERE EXISTS (SELECT 1 FROM ${b("object_kinds")} t WHERE t.name = k.name)`),m}l(Y,"rewriteIds");async function B(n){const{db:a,schema:o,target:c,targetPerson:p}=n,t=new Map,b=l(async(i,...R)=>await a.prepareUncached(i).get(...R),"row"),m=l(i=>d(a,`DELETE FROM ${N(o,"profiles")} WHERE id = ?`,i),"dropStaged");for(const{id:i}of await O(a,`SELECT id FROM ${N(o,"profiles")} ORDER BY id`)){let R=i===j?await b(`SELECT id, person FROM ${N(c,"profiles")} WHERE person = ? AND name = 'root'`,p):await b(`SELECT id, person FROM ${N(c,"profiles")} WHERE id = ? AND person = ?`,i,p);if(R===void 0){if(await b(`SELECT id, person FROM ${N(c,"profiles")} WHERE id = ?`,i)===void 0&&i!==j)continue;const u=`${i.replace(/-[0-9a-f]{8}$/,"")}-${g("sha256").update(`${p}\0${i}`).digest("hex").slice(0,8)}`,e=await b(`SELECT id, person FROM ${N(c,"profiles")} WHERE id = ?`,u);if(e!==void 0&&e.person!==p)throw new _("id_map","unique_conflict",`profiles ${u} is held by another person in the target`,{table:"profiles",values:[u]});R=e??{id:u,person:p},e===void 0?await d(a,`UPDATE ${N(o,"profiles")} SET id = ? WHERE id = ?`,u,i):await m(i)}else await m(i);const s=R.id;await d(a,`UPDATE ${N(o,"objects")} o SET name = ? WHERE o.type = 'profile' AND o.id IN (SELECT object FROM ${N(o,"identities")} WHERE scheme = 'profile' AND external_id = ?)
|
|
12
|
+
AND o.name <> ? AND (o.name = ? OR EXISTS (SELECT 1 FROM ${N(c,"objects")} t WHERE t.type = 'profile' AND t.name = o.name AND t.home_machine IS NULL AND t.id <> o.id))`,s,i,s,i),await d(a,`UPDATE ${N(o,"identities")} SET external_id = ? WHERE scheme = 'profile' AND external_id = ? AND object IN (SELECT id FROM ${N(o,"objects")} WHERE type = 'profile')`,s,i),s!==i&&t.set(i,s)}return t}l(B,"mapProfileIds");async function w(n,a,o,c,p){await d(n,`UPDATE ${a} t SET ${T(o)} = m.target FROM ${p} m WHERE m.kind = ? AND t.${T(o)} = m.source`,c)}l(w,"remap");async function X(n){const{db:a,schema:o,target:c,catalog:p}=n,t=l(s=>N(o,s),"S"),b={},m=l((s,r)=>{r>0&&(b[s]=(b[s]??0)+r)},"count");await a.exec(`CREATE TABLE ${t("_dropped")} (tbl text NOT NULL, key text NOT NULL, PRIMARY KEY (tbl, key))`);const i=`(SELECT id FROM ${t("objects")} WHERE home_machine IS NOT NULL)`;await d(a,`INSERT INTO ${t("_dropped")} SELECT 'objects', id FROM ${t("objects")} WHERE home_machine IS NOT NULL`);for(const[s,r]of Object.entries(S))m(s,await d(a,`DELETE FROM ${t(s)} WHERE ${r} IN ${i}`));for(m("objects",await d(a,`DELETE FROM ${t("objects")} WHERE home_machine IS NOT NULL`));;){let s=0;for(const r of p.foreignKeys){if(r.columns.length!==1||r.parentColumns.length!==1||!n.catalog.tables.has(r.table))continue;const u=p.tables.get(r.table),e=T(r.columns[0]),E=u.primaryKey.length===1?T(u.primaryKey[0]):null;E!==null&&await d(a,`INSERT INTO ${t("_dropped")} SELECT ?, ${E}::text FROM ${t(r.table)} WHERE ${e} IN (SELECT key FROM ${t("_dropped")} WHERE tbl = ?) ON CONFLICT DO NOTHING`,r.table,r.parent);const f=await d(a,`DELETE FROM ${t(r.table)} WHERE ${e} IN (SELECT key FROM ${t("_dropped")} WHERE tbl = ?)`,r.parent);m(r.table,f),s+=f}if(s===0)break}const R=`(SELECT key FROM ${t("_dropped")} WHERE tbl = 'objects')`;m("relations",await d(a,`DELETE FROM ${t("relations")} WHERE resource_id IN ${R} OR subject_id IN ${R}`));for(const s of p.foreignKeys){if(s.columns.length!==1||!p.tables.has(s.table))continue;const r=T(s.columns[0]),u=T(s.parentColumns[0]),e=await O(a,`SELECT DISTINCT c.${r}::text AS value FROM ${t(s.table)} c
|
|
13
|
+
WHERE c.${r} IS NOT NULL AND NOT EXISTS (SELECT 1 FROM ${t(s.parent)} p WHERE p.${u} = c.${r})
|
|
14
|
+
AND NOT EXISTS (SELECT 1 FROM ${N(c,s.parent)} p WHERE p.${u} = c.${r}) LIMIT 10`);if(e.length>0)throw new _("drop","bundle_invalid",`${s.table}.${s.columns[0]} names rows that exist nowhere: ${e.map(E=>E.value).join(", ")}`,{table:s.table,column:s.columns[0],values:e.map(E=>E.value)})}return b}l(X,"dropStubRows");export{I as OBJECT_ID_COLUMNS,X as dropStubRows,C as findFleetGrant,F as grantMissing,B as mapProfileIds,W as objectIdColumns,Y as rewriteIds,K as rewritePerson};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var Q=Object.defineProperty;var u=(e,i)=>Q(e,"name",{value:i,configurable:!0});import{zstdCompressSync as V}from"node:zlib";import{blobStore as Y}from"../../blobs/index.js";import{openDb as
|
|
1
|
+
var Q=Object.defineProperty;var u=(e,i)=>Q(e,"name",{value:i,configurable:!0});import{zstdCompressSync as V}from"node:zlib";import{blobStore as Y}from"../../blobs/index.js";import{openDb as S,withCanvasWrite as N}from"../../canvas/db.js";import{insertImportedRevisions as X}from"../../graph/documents.js";import{getById as Z}from"../../graph/objects.js";import{bundleKeys as v,decodeRows as x,rowKeys as ee,SEQ_TABLES as te}from"../bundle/layout.js";import{readCatalog as ae}from"./catalog.js";import{copyRows as ne,decodeKeys as C,encodeKeys as W}from"./copy.js";import{pruneStaged as ie,precheck as se,renameClashingProfiles as re,rewritePaths as oe,rewriteRequestPaths as de,takeRepoSyncedDocuments as pe}from"./prepare.js";import{boundSub as ce,checkSourcePerson as ue,checkStagedBlobKeys as fe,checkStagedPersons as le,checkStagedReferences as me,checkStagedRequestKeys as _e}from"./bind.js";import{deleteRunBlobs as we,moveRunBlobs as ge}from"./blobs.js";import{dropStubRows as be,findFleetGrant as he,grantMissing as ye,mapProfileIds as Ee,rewriteIds as Se,rewritePerson as ve}from"./rewrite.js";import{dropStaging as B,ImportLaneError as w,stage as Re,stagingSchema as Oe,targetSchema as Te}from"./stage.js";import{verifyRun as Pe}from"./verify.js";import{sandboxPathMap as ke,writeNodeFiles as je}from"./path-map.js";import{allStoreKeys as Ie,readPluginsStore as De,recordImportedActivations as Ae,writeStores as Me}from"./stores.js";import{publishImportedPlugins as Ne}from"./publish-plugins.js";import{COPIED_TABLES as Ce}from"../bundle/layout.js";import{ClaimLostError as We}from"../../../daemon/reconcilers/row-claim.js";const L=10*6e4,R=u(()=>new Date().toISOString(),"now"),O=u(async(e,i)=>{await(await S()).prepare("UPDATE import_runs SET step = ? WHERE run_id = ?").run(i,e)},"setStep");async function Be(e,i){const n=await e.get(v.source(i));if(n===null)throw new w("stage","bundle_invalid","source.json is missing");return JSON.parse(n.toString("utf8"))}u(Be,"readSource");async function Le(e,i,n,r,s,d){const t=await e.get(v.rows(n.run_id,"grants")),l=t===null?[]:x(t),m=[];for(const a of l){const c=ce(a.sub,r,n.person,"grants.sub");await he(i,s,d,c,a.grantee)===void 0&&m.push(a.grantee)}if(m.length===0)return!0;if(n.loaded_at===void 0||n.loaded_at===null)throw new w("stage","import_failed","a loading run has no loaded_at");if(Date.now()-Date.parse(n.loaded_at)>=L)throw ye(m);return!1}u(Le,"grantsReady");async function pt(e,i,n={}){const r=n.blobs??await Y(),s=await S(),d=Oe(e.run_id),t=u(async a=>{await i.assertOwned(),await O(e.run_id,a),await n.atStep?.(a)},"at");let l=e.state==="committed";const m=[];try{const a=await Be(r,e.run_id);if(e.source_kind==="machine"&&a.installId!==e.source_install_id)throw new w("stage","bundle_invalid",`source.json names install ${a.installId}, the run is for ${e.source_install_id}`);a.installId=e.source_install_id;const c=await Te(s),b=[...Ce],g=await ae(s,c,[...b,"grants"]);if(!l){const f={},P=[],k=[],j=n.fleetRuntime??process.env.CRTR_RUNTIME??null;if(await ue(s,c,a.person,e.person),!await Le(r,s,e,a.person,c,j)){await i.assertOwned(),await O(e.run_id,"waiting_for_grants");return}await t("publish-plugins");const y=await Ne(await De(r,e.run_id));if(y.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)>=L)throw new w("publish-plugins","directory_unavailable",`the directory did not answer for: ${y.unavailable.slice(0,10).join(", ")}; rerun the import once it is reachable`,{plugins:y.unavailable});await i.assertOwned(),await O(e.run_id,"waiting_for_directory");return}k.push(...y.refused),await t("stage");const K=await Re(s,e.run_id,a.counts,o=>ee(e.run_id,o,a),o=>r.get(o));for(const[o,p]of Object.entries(K))f[o]={staged:p,inserted:0,mapped:0,dropped:0};const _={db:s,schema:d,target:c,catalog:g,sourcePerson:a.person,targetPerson:e.person,fleetRuntime:j,shippedBodies:a.shippedBodies??{}};await t("bind-staged");for(const[o,p]of Object.entries(await le(_)))E(f,o,p);for(const[o,p]of Object.entries(await fe(_)))E(f,o,p);await t("rewrite-person"),await ve(_),await t("prune");const U=await ie(s,d,g,a),I=a.kind==="hosted"?ke(a.pathPrefixes??[]):[];await t("rewrite-paths"),await oe(s,d,I),await de(s,d),await _e(_);const F=await Ee(_);await re(s,d,c,a.installId,e.person),await t("rewrite-ids");const D=await Se(_,F);await t("drop");const J=await pe(s,d,c),q=await be(_);for(const[o,p]of Object.entries({...U}))E(f,o,p);for(const[o,p]of Object.entries(q))E(f,o,p);await me(_),await t("pre-check");const $=new Map([["messages",["seq"]],...te.map(o=>[o,["seq"]])]);await se(s,d,c,g,b,new Set,$),await t("blobs"),await ge(s,d,c,e.person,r,e.run_id,m),await t("copy"),await N(async o=>{await i.assertOwned();const p=await ne({db:o,runId:e.run_id,schema:d,target:c,catalog:g,source:a,person:e.person,idMap:D,pathMap:I}),A=await Ue(o,e.run_id,J);A>0&&(p.inserted.revisions=(p.inserted.revisions??0)+A),await je(o,d,e.run_id,a);const M=await Me({db:o,blobs:r,runId:e.run_id,person:e.person,objectMap:D.object});for(const[G,z]of Object.entries(M.inserted))p.inserted[G]=z.length;return P.push(...M.unresolvedPlugins),await o.prepare("UPDATE import_runs SET counts_json = ?, loaded_at = COALESCE(loaded_at, ?) WHERE run_id = ?").run(JSON.stringify({...Ke(f,p),unresolved_plugins:P,refused_plugins:k}),R(),e.run_id),p}),l=!0,await n.atStep?.("committed")}await t("verify");const h=await Pe(s,e.run_id,d,c,g,a.installId);if(await s.prepare("UPDATE import_runs SET verify_json = ? WHERE run_id = ?").run(JSON.stringify(h),e.run_id),!h.ok)throw new w("verify","verify_failed","the committed rows differ from the staged rows or an invariant failed",{differences:h.differences,invariants:h.invariants});await t("manifest");const T=v.manifest(e.run_id);await r.put(T,await Fe(e.run_id)),await B(s,e.run_id);for(const f of Ie(e.run_id))await r.delete(f);await we(r,e.run_id),await N(async f=>{await Ae(f,e.run_id,e.person),await f.prepare("UPDATE import_runs SET state = 'done', step = 'done', manifest_key = ?, finished_at = ? WHERE run_id = ?").run(T,R(),e.run_id)})}catch(a){if(a instanceof We)throw a;const c=He(a);if(await B(s,e.run_id).catch(()=>{}),!l)for(const b of m)await r.delete(b).catch(()=>{});await s.prepare("UPDATE import_runs SET state = 'failed', failure_json = ?, finished_at = ? WHERE run_id = ?").run(JSON.stringify(c),R(),e.run_id)}}u(pt,"processRun");function He(e){if(e instanceof w)return{step:e.step,code:e.code,message:e.message,...e.detail===void 0?{}:{detail:e.detail}};const i=e.code;return{step:"unknown",code:typeof i=="string"?i:"import_failed",message:e instanceof Error?e.message:String(e)}}u(He,"failureOf");function E(e,i,n){(e[i]??={staged:0,inserted:0,mapped:0,dropped:0}).dropped+=n}u(E,"addDropped");function Ke(e,i){for(const[n,r]of Object.entries(i.inserted))(e[n]??={staged:0,inserted:0,mapped:0,dropped:0}).inserted=r;for(const[n,r]of Object.entries(i.mapped))(e[n]??={staged:0,inserted:0,mapped:0,dropped:0}).mapped=r;return e}u(Ke,"withInserted");async function Ue(e,i,n){const r=new Set((await e.prepareUncached("SELECT rev_id FROM revisions WHERE rev_id IN (SELECT jsonb_array_elements_text(?::jsonb))").all(JSON.stringify(n.map(t=>t.rev_id)))).map(t=>t.rev_id)),s=n.filter(t=>!r.has(t.rev_id)),d=new Map;for(const t of n)d.set(t.document,[...d.get(t.document)??[],t]);for(const[t,l]of d){const m=await Z(e,t);m!==null&&await X(e,m,l.map(a=>({rev_id:a.rev_id,parents:a.parents,body_hash:a.body_hash,rationale:a.rationale,created_at:a.created_at})))}return await H(e,i,"revisions",s.map(t=>[t.rev_id])),await H(e,i,"revision_parents",s.flatMap(t=>t.parents.map(l=>[t.rev_id,l]))),s.length}u(Ue,"arrive");async function H(e,i,n,r){if(r.length===0)return;const s=await e.prepare("SELECT inserted_keys FROM import_manifest WHERE run_id = ? AND table_name = ?").get(i,n);s===void 0?await e.prepare("INSERT INTO import_manifest (run_id, table_name, inserted_keys) VALUES (?, ?, ?)").run(i,n,W(r)):await e.prepare("UPDATE import_manifest SET inserted_keys = ? WHERE run_id = ? AND table_name = ?").run(W([...C(s.inserted_keys),...r]),i,n)}u(H,"appendManifest");async function Fe(e){const n=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(n.map(r=>JSON.stringify({table:r.table_name,keys:C(r.inserted_keys)})).join(`
|
|
2
2
|
`)+`
|
|
3
3
|
`))}u(Fe,"manifestFile");export{L as GRANT_WAIT_MS,pt as processRun};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.611",
|
|
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.611",
|
|
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.611",
|
|
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.611",
|
|
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.611",
|
|
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.611",
|
|
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.611",
|
|
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.611",
|
|
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.611",
|
|
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.611",
|
|
11981
|
+
"@north-light/identity": "0.3.611"
|
|
11982
11982
|
}
|
|
11983
11983
|
},
|
|
11984
11984
|
"packages/crouter-sdk": {
|
|
11985
11985
|
"name": "@north-light/sdk",
|
|
11986
|
-
"version": "0.3.
|
|
11986
|
+
"version": "0.3.611",
|
|
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.611",
|
|
11990
|
+
"@north-light/identity": "0.3.611",
|
|
11991
|
+
"@north-light/plugin": "0.3.611",
|
|
11992
11992
|
"jose": "^6.2.1"
|
|
11993
11993
|
},
|
|
11994
11994
|
"bin": {
|