@north-light/cli 0.3.774 → 0.3.776
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/builtin-memory/internal/agent-shaping.md +12 -1
- package/dist/commands/profile/new.js +1 -1
- package/dist/commands/profile/project.js +1 -1
- package/dist/core/permissions/evaluator.js +2 -2
- package/dist/core/profiles/select.js +18 -17
- package/package.json +3 -3
- package/packages/crouter-api/package.json +1 -1
- package/packages/crouter-identity/package.json +1 -1
- package/packages/crouter-plugin/package.json +3 -3
- package/runtime.lock.json +14 -14
|
@@ -65,7 +65,18 @@ A profile is a stable **agent identity** — itself an owner object: a fixed id,
|
|
|
65
65
|
|
|
66
66
|
Every project path in the purview puts the repos enclosing it into the view of every node under the profile, whatever directory that node works in: their documents are listed and readable, and are delivered at boot and workspace-open when a rule of theirs matches, after the repos enclosing the node's own cwd. A rule's `if: {repo}` holds for any of those repos, so a repo-conditioned rule fires for every node of the profile; use `cwd` to condition on where the node works. `crtr profile project add` starts the added repos at a `preview` limit. The profile's delivery limit per owner caps how much of a repo's documents reach automatic boot and workspace-open context, whether the repo is in view through the cwd or the project list: give `content` to the repos whose front doors the profile's nodes should operate inside, `preview` or `name` to a project the profile must know exists but rarely enters, and `none` to purview held for config, plugins, and deliberate reads alone. Key a limit by repo handle, or `repo:<handle>` when another owner (such as a profile) shares that handle; the profile's own documents are never capped. It is a delivery dial, not an access one: `crtr canvas read` and `file-read`/`command` rules still reach those documents.
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
### Reuse a profile, widen it, or create one
|
|
69
|
+
|
|
70
|
+
Adding a directory to a profile is not free: every node of the profile then carries that repo's documents at boot and fires its repo-conditioned rules, wherever the node works. Decide by asking whose documents should reach whom.
|
|
71
|
+
|
|
72
|
+
| Situation | Do this |
|
|
73
|
+
|---|---|
|
|
74
|
+
| The new directory's work shares the profile's conventions, people, and stance (another repo of the same product, a worktree, a sibling service) | Add it: `crtr profile project add <profile> --dir <path>` |
|
|
75
|
+
| The profile's nodes only occasionally need the repo — to read its docs or resolve its config — but not its front door | Add it, then lower its delivery: `crtr profile project limit` at `name` (knows it exists) or `none` (config and deliberate reads only) |
|
|
76
|
+
| The work has its own conventions, and its documents would be noise to the profile's nodes (or theirs to it) | Create a profile: `crtr profile new --name <name> --project <path>` |
|
|
77
|
+
| One-off work in a directory you will not return to | Run under an existing profile without adding the directory |
|
|
78
|
+
|
|
79
|
+
Do not create one profile per repo: a profile spanning several related directories is what lets one profile-owned document reach every node working anywhere in that bundle. **The profile as owner** is where cross-repo conventions and your stance toward that body of work belong (see the owners below). A cloud dev profile is defined by the repositories its sandbox checks out (`profile new --repo`, `profile environment`) rather than by local folders; the same reuse-or-create rule applies to which repositories belong together.
|
|
69
80
|
|
|
70
81
|
## Owners — who owns a document sets its reach
|
|
71
82
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var f=Object.defineProperty;var n=(e,t)=>f(e,"name",{value:t,configurable:!0});import{defineLeaf as c}from"../../core/command.js";import{usage as s}from"../../core/errors.js";import{resolveExistingProjectDir as
|
|
1
|
+
var f=Object.defineProperty;var n=(e,t)=>f(e,"name",{value:t,configurable:!0});import{defineLeaf as c}from"../../core/command.js";import{usage as s}from"../../core/errors.js";import{resolveExistingProjectDir as h}from"../../core/profiles/project-dir.js";import{cliClient as d}from"../api-client.js";import{resolveMetaPairs as u}from"./meta.js";const k=c({name:"new",description:"create a new profile",whenToUse:"you are establishing a new agent identity \u2014 a stable id, a display name, and its own documents (a profile owns documents like any other owner). Create one only for a distinct body of work whose conventions and documents would be noise to every existing profile; if an existing profile's documents and stance already fit the work, add the directory to it with `profile project add` instead \u2014 not one profile per repo. Use `--repo` for a cloud sandbox profile and `--project` for a folder on this machine. Pass at most one initial project directory here (the parser has no repeatable-flag support); use `profile project add` afterward for every additional one. Use `--root` (no name) to provision the canonical stable root profile \u2014 the default identity a home falls back to \u2014 idempotently, without spawning a node.",help:{name:"profile new",summary:"create a profile of the caller's app in the scoped store, with its own app directory",params:[{kind:"flag",name:"name",type:"string",required:!1,constraint:"Display name for the profile. Also slugified into the stable profile id \u2014 the id never changes on later rename. Required unless `--root` is given; mutually exclusive with `--root`."},{kind:"flag",name:"root",type:"bool",required:!1,constraint:"Provision the canonical stable root profile (fixed id `root-00000000`, name `root`) \u2014 the fallback default identity for a home \u2014 instead of a fresh named one. Idempotent: re-running returns the existing root. Node-free (no `node new --root` needed). Mutually exclusive with `--name`/`--project`/`--repo`/`--default-kind`/`--meta`."},{kind:"flag",name:"project",type:"path",required:!1,constraint:"One initial project directory. Must already exist and be a directory; resolved to its absolute real path before storing. Creates a purview relationship: the repos enclosing it join the view of every node of the profile, with no delivery limit (`profile project add` starts them at `preview`). Singular \u2014 add more with `crtr profile project add` after creation."},{kind:"flag",name:"repo",type:"string",required:!1,repeatable:!0,constraint:"GitHub repository `owner/name` (repeat per repository). Makes a cloud dev profile: a Blaxel sandbox environment with 4096 MB whose recipe checks out these repositories at `/work/<name>`. Cloud only; mutually exclusive with `--project`. The GitHub App must be installed on each repository."},{kind:"flag",name:"default-kind",type:"string",required:!1,constraint:"Installed persona kind for node creates under this profile that omit --kind. Defaults to general when omitted; the daemon validates it against its installed kind registry."},{kind:"flag",name:"meta",type:"string",required:!1,repeatable:!0,constraint:"KEY=VALUE metadata entry (repeat per entry). KEY starts with a letter or digit, followed by letters, digits, `_`, or `-`. Each entry reaches every broker launched under the profile as `CRTR_PROFILE_META_<KEY>` env; readable back via `profile show` \u2014 not for secrets (those go to `profile env`)."}],output:[{name:"profile_id",type:"string",required:!0,constraint:"Stable directory id (`<slug>-<shortid>`). Pass this, or the name, to every other `profile` verb and to `--profile` elsewhere."},{name:"profile_path",type:"string",required:!0,constraint:"Absolute path to the profile directory, `<app space>/profiles/<id>`: its settings root. Documents the profile owns are canvas documents, read with `crtr canvas read`, not files here."},{name:"projects",type:"ProfileProject[]",required:!0,constraint:"Explicit `{path}` project relationships in manifest order. `path` defines purview and puts the repos enclosing it in the view of every node of the profile. Empty when --project was omitted."},{name:"app",type:"string",required:!0,constraint:"The app that owns this profile."},{name:"default_kind",type:"string",required:!0,constraint:"Default persona kind for node creates that omit --kind; `general` when none is stored."},{name:"metadata",type:"object",required:!0,constraint:"Stored metadata map; empty when --meta was omitted."},{name:"created_at",type:"string",required:!0,constraint:"ISO 8601 creation timestamp."}],outputKind:"object",effects:["Creates a profile row owned by the caller's app (the terminal app for a person) and its directory under that app's space. A name the caller's app already holds is refused."]},run:n(async e=>{const t=e.name,r=e.project,a=e.defaultKind,i=u(e.meta,"meta"),p=e.root===!0,o=e.repo??[];if(p){if(t!==void 0||r!==void 0||o.length>0||a!==void 0||Object.keys(i).length>0)throw s("`--root` provisions the canonical stable root profile and takes no `--name`/`--project`/`--repo`/`--default-kind`/`--meta`.");return l(await d().ensureProfile("root"))}if(o.length>0&&r!==void 0)throw s("`--repo` and `--project` are mutually exclusive: a dev profile works in sandbox checkouts, not local directories.");if(t===void 0)throw s("provide `--name <name>` to create a profile, or `--root` to provision the stable root profile.");return l(await d().createProfile({name:t,...r!==void 0?{projects:[{path:h(r)}]}:{},...o.length>0?{repositories:o}:{},...a!==void 0?{default_kind:a}:{},...Object.keys(i).length>0?{metadata:i}:{}}))},"run")});function l(e){return{profile_id:e.id,profile_path:e.profile_path,projects:e.projects,app:e.app,default_kind:e.default_kind,metadata:e.metadata,created_at:e.created_at}}n(l,"newProfileOutput");export{k as newLeaf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=Object.defineProperty;var t=(e,r)=>p(e,"name",{value:r,configurable:!0});import{defineLeaf as i,defineBranch as l}from"../../core/command.js";import{resolve as c}from"node:path";import{resolveExistingProjectDir as h}from"../../core/profiles/project-dir.js";import{usage as f}from"../../core/errors.js";import{cliClient as n}from"../api-client.js";import{resolveProfileViaDaemon as a}from"./daemon-profiles.js";import{PROFILE_PROJECT_MEMORY_VALUES as m}from"../../api/dto/profiles.js";const u=i({name:"add",description:"add a project to a profile's purview",whenToUse:"a profile needs purview over another project directory \u2014 extend it after creation.",help:{name:"profile project add",summary:"add a project relationship to a profile, deduped by real path",params:[{kind:"positional",name:"profile",required:!0,constraint:"Profile id or manifest name; a close-enough name resolves to the nearest profile, reported on stderr."},{kind:"flag",name:"dir",type:"path",required:!1,constraint:"Directory to add; exactly one of `--dir` and `--repo`. Must exist and be a directory; resolved to its absolute real path before storing. The repo its checkout identifies as is stored with it; a folder no repo identifies keeps the path only. A path already on the profile keeps its position and nothing changes."},{kind:"flag",name:"repo",type:"string",required:!1,constraint:"Repo handle to add with no folder; exactly one of `--dir` and `--repo`. Must name a repo you may read. A node with no checkout (a sandbox) still gets that repo's documents."}],output:[{name:"profile_id",type:"string",required:!0,constraint:"Stable directory id."},{name:"projects",type:"ProfileProject[]",required:!0,constraint:"The updated `{repo?, path?}` entries in profile order. `path` defines purview for config; `repo` is the repo object id whose documents join the view."}],outputKind:"object",effects:["Appends a new project relationship (a folder, with the repo it identifies as, or a repo alone) to the profile row. Purview follows `path` for config, and every repo enclosing `path` joins the view of every node of the profile: its documents are readable, listed, and delivered at boot and workspace-open. Each such repo starts at a `preview` delivery limit unless the profile already limits that handle (change it with `profile project limit`). Running brokers discover the updated projects on their next scope read."]},run:t(async e=>{const{id:r}=await a(e.profile),o=e.dir,s=e.repo;if(o===void 0==(s===void 0))throw f("pass exactly one of --dir and --repo",{next:"Use --dir <directory> for a folder or --repo <handle> for a repo with no folder."});const d=await n().updateProfile(r,{add_project:o!==void 0?{path:h(o)}:{repo:s}});return{profile_id:d.id,projects:d.projects}},"run")}),w=i({name:"remove",description:"remove a project relationship from a profile's purview",whenToUse:"a profile no longer needs purview over one of its listed project directories \u2014 narrow it back. Works even if the directory itself was since deleted.",help:{name:"profile project remove",summary:"remove a project directory from a profile's manifest",params:[{kind:"positional",name:"profile",required:!0,constraint:"Profile id or manifest name; a close-enough name resolves to the nearest profile, reported on stderr."},{kind:"flag",name:"dir",type:"path",required:!0,constraint:"Directory to remove, matched against the stored project `path`. Does not require the directory to still exist on disk. The profile's app home does not change."}],output:[{name:"profile_id",type:"string",required:!0,constraint:"Stable directory id."},{name:"projects",type:"ProfileProject[]",required:!0,constraint:"The updated `{path}` relationships in profile order."}],outputKind:"object",effects:["Removes a project relationship from the profile row. This narrows purview and drops the path's repos from the view of the profile's nodes (unless a node's cwd is inside them); delivery limits are left in place. Running brokers discover the updated projects on their next scope read."]},run:t(async e=>{const{id:r}=await a(e.profile),o=await n().updateProfile(r,{remove_project:c(e.dir)});return{profile_id:o.id,projects:o.projects}},"run")}),y=i({name:"limit",description:"set how much of one owner's documents automatic delivery may disclose",whenToUse:"a profile's nodes should get less of one owner's documents (a repo, `user`, an app, a plugin) at boot and workspace-open \u2014 or that limit should be lifted.",help:{name:"profile project limit",summary:"set a profile's automatic delivery limit for one owner handle",params:[{kind:"positional",name:"profile",required:!0,constraint:"Profile id or manifest name; a close-enough name resolves to the nearest profile, reported on stderr."},{kind:"flag",name:"owner",type:"string",required:!0,constraint:"Owner the limit applies to. A bare handle (`crouter`, `user`) matches an owner of any type holding that handle. `<type>:<handle>` names one owner exactly \u2014 `repo:crouter`, `profile:work`, `app:terminal`, `person:user` \u2014 and wins over a bare key; use it when a repo and another owner share a handle. A profile's own documents are never capped, whichever key matches."},{kind:"flag",name:"level",type:"enum",choices:[...m],required:!0,constraint:"Maximum automatic delivery of this owner's documents at boot and workspace-open: `none`, `name`, `preview`, or `content`. `content` is no limit and removes the entry. Does not change explicit `crtr canvas read` access."}],output:[{name:"profile_id",type:"string",required:!0,constraint:"Stable directory id."},{name:"delivery_limits",type:"object",required:!0,constraint:"The profile\u2019s limits after the change, keyed by owner handle or `<type>:<handle>`; an owner not listed is not limited."}],outputKind:"object",effects:["Sets or removes one entry in the profile's `delivery_limits`. It caps only automatic `boot` and `workspace-open` delivery; a node's own documents and its own profile's documents are never capped. A `<type>:<handle>` key (for example `repo:crouter`) names one owner exactly and wins over a bare handle key."]},run:t(async e=>{const{id:r}=await a(e.profile),o=await n().updateProfile(r,{set_delivery_limit:{owner:e.owner,level:e.level}});return{profile_id:o.id,delivery_limits:o.delivery_limits}},"run")}),q=l({name:"project",description:"manage a profile's project purview and automatic delivery limits",whenToUse:"changing a profile\u2019s project purview after creation, or limiting how much of one owner's documents its nodes get automatically.",help:{name:"profile project",summary:"manage project purview and per-owner automatic delivery limits",model:"Each `{path}` relationship widens purview: the profile resolves config from `path`, and every node of the profile sees the repos enclosing `path` in addition to the repos enclosing its own cwd (cwd repos first, then projects in manifest order). Rule `if: {repo}` conditions hold for any of those repos (cwd repos and project repos); `--owner repo` stays with the cwd's repos, while a node may change a project repo's documents when its file permissions allow writing that checkout. `add` appends a new real path and starts its repos at a `preview` limit; `remove` narrows purview. `limit` sets the profile's `delivery_limits` entry for one owner handle, which caps automatic boot and workspace-open delivery of that owner's documents, whether the repo is in view through the cwd or the project list; explicit reads are not capped. Purview and delivery limits are both independent of a per-cwd default pin (`crtr profile default`)."},children:[u,w,y]});export{q as projectBranch};
|
|
1
|
+
var p=Object.defineProperty;var t=(e,r)=>p(e,"name",{value:r,configurable:!0});import{defineLeaf as i,defineBranch as l}from"../../core/command.js";import{resolve as c}from"node:path";import{resolveExistingProjectDir as h}from"../../core/profiles/project-dir.js";import{usage as f}from"../../core/errors.js";import{cliClient as n}from"../api-client.js";import{resolveProfileViaDaemon as a}from"./daemon-profiles.js";import{PROFILE_PROJECT_MEMORY_VALUES as m}from"../../api/dto/profiles.js";const u=i({name:"add",description:"add a project to a profile's purview",whenToUse:"a profile needs purview over another project directory \u2014 extend it after creation. Add a directory when its work shares the profile's conventions and documents; every node of the profile then carries that repo's documents and fires its repo-conditioned rules, so when the profile only needs the repo in reach, follow with `profile project limit` at `name` or `none`, and when the work has its own conventions, create a separate profile with `profile new` instead.",help:{name:"profile project add",summary:"add a project relationship to a profile, deduped by real path",params:[{kind:"positional",name:"profile",required:!0,constraint:"Profile id or manifest name; a close-enough name resolves to the nearest profile, reported on stderr."},{kind:"flag",name:"dir",type:"path",required:!1,constraint:"Directory to add; exactly one of `--dir` and `--repo`. Must exist and be a directory; resolved to its absolute real path before storing. The repo its checkout identifies as is stored with it; a folder no repo identifies keeps the path only. A path already on the profile keeps its position and nothing changes."},{kind:"flag",name:"repo",type:"string",required:!1,constraint:"Repo handle to add with no folder; exactly one of `--dir` and `--repo`. Must name a repo you may read. A node with no checkout (a sandbox) still gets that repo's documents."}],output:[{name:"profile_id",type:"string",required:!0,constraint:"Stable directory id."},{name:"projects",type:"ProfileProject[]",required:!0,constraint:"The updated `{repo?, path?}` entries in profile order. `path` defines purview for config; `repo` is the repo object id whose documents join the view."}],outputKind:"object",effects:["Appends a new project relationship (a folder, with the repo it identifies as, or a repo alone) to the profile row. Purview follows `path` for config, and every repo enclosing `path` joins the view of every node of the profile: its documents are readable, listed, and delivered at boot and workspace-open. Each such repo starts at a `preview` delivery limit unless the profile already limits that handle (change it with `profile project limit`). Running brokers discover the updated projects on their next scope read."]},run:t(async e=>{const{id:r}=await a(e.profile),o=e.dir,s=e.repo;if(o===void 0==(s===void 0))throw f("pass exactly one of --dir and --repo",{next:"Use --dir <directory> for a folder or --repo <handle> for a repo with no folder."});const d=await n().updateProfile(r,{add_project:o!==void 0?{path:h(o)}:{repo:s}});return{profile_id:d.id,projects:d.projects}},"run")}),w=i({name:"remove",description:"remove a project relationship from a profile's purview",whenToUse:"a profile no longer needs purview over one of its listed project directories \u2014 narrow it back. Works even if the directory itself was since deleted.",help:{name:"profile project remove",summary:"remove a project directory from a profile's manifest",params:[{kind:"positional",name:"profile",required:!0,constraint:"Profile id or manifest name; a close-enough name resolves to the nearest profile, reported on stderr."},{kind:"flag",name:"dir",type:"path",required:!0,constraint:"Directory to remove, matched against the stored project `path`. Does not require the directory to still exist on disk. The profile's app home does not change."}],output:[{name:"profile_id",type:"string",required:!0,constraint:"Stable directory id."},{name:"projects",type:"ProfileProject[]",required:!0,constraint:"The updated `{path}` relationships in profile order."}],outputKind:"object",effects:["Removes a project relationship from the profile row. This narrows purview and drops the path's repos from the view of the profile's nodes (unless a node's cwd is inside them); delivery limits are left in place. Running brokers discover the updated projects on their next scope read."]},run:t(async e=>{const{id:r}=await a(e.profile),o=await n().updateProfile(r,{remove_project:c(e.dir)});return{profile_id:o.id,projects:o.projects}},"run")}),y=i({name:"limit",description:"set how much of one owner's documents automatic delivery may disclose",whenToUse:"a profile's nodes should get less of one owner's documents (a repo, `user`, an app, a plugin) at boot and workspace-open \u2014 or that limit should be lifted.",help:{name:"profile project limit",summary:"set a profile's automatic delivery limit for one owner handle",params:[{kind:"positional",name:"profile",required:!0,constraint:"Profile id or manifest name; a close-enough name resolves to the nearest profile, reported on stderr."},{kind:"flag",name:"owner",type:"string",required:!0,constraint:"Owner the limit applies to. A bare handle (`crouter`, `user`) matches an owner of any type holding that handle. `<type>:<handle>` names one owner exactly \u2014 `repo:crouter`, `profile:work`, `app:terminal`, `person:user` \u2014 and wins over a bare key; use it when a repo and another owner share a handle. A profile's own documents are never capped, whichever key matches."},{kind:"flag",name:"level",type:"enum",choices:[...m],required:!0,constraint:"Maximum automatic delivery of this owner's documents at boot and workspace-open: `none`, `name`, `preview`, or `content`. `content` is no limit and removes the entry. Does not change explicit `crtr canvas read` access."}],output:[{name:"profile_id",type:"string",required:!0,constraint:"Stable directory id."},{name:"delivery_limits",type:"object",required:!0,constraint:"The profile\u2019s limits after the change, keyed by owner handle or `<type>:<handle>`; an owner not listed is not limited."}],outputKind:"object",effects:["Sets or removes one entry in the profile's `delivery_limits`. It caps only automatic `boot` and `workspace-open` delivery; a node's own documents and its own profile's documents are never capped. A `<type>:<handle>` key (for example `repo:crouter`) names one owner exactly and wins over a bare handle key."]},run:t(async e=>{const{id:r}=await a(e.profile),o=await n().updateProfile(r,{set_delivery_limit:{owner:e.owner,level:e.level}});return{profile_id:o.id,delivery_limits:o.delivery_limits}},"run")}),q=l({name:"project",description:"manage a profile's project purview and automatic delivery limits",whenToUse:"changing a profile\u2019s project purview after creation, or limiting how much of one owner's documents its nodes get automatically.",help:{name:"profile project",summary:"manage project purview and per-owner automatic delivery limits",model:"Each `{path}` relationship widens purview: the profile resolves config from `path`, and every node of the profile sees the repos enclosing `path` in addition to the repos enclosing its own cwd (cwd repos first, then projects in manifest order). Rule `if: {repo}` conditions hold for any of those repos (cwd repos and project repos); `--owner repo` stays with the cwd's repos, while a node may change a project repo's documents when its file permissions allow writing that checkout. `add` appends a new real path and starts its repos at a `preview` limit; `remove` narrows purview. `limit` sets the profile's `delivery_limits` entry for one owner handle, which caps automatic boot and workspace-open delivery of that owner's documents, whether the repo is in view through the cwd or the project list; explicit reads are not capped. Purview and delivery limits are both independent of a per-cwd default pin (`crtr profile default`)."},children:[u,w,y]});export{q as projectBranch};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
1
|
+
var x=Object.defineProperty;var c=(s,e)=>x(s,"name",{value:e,configurable:!0});import{parsePrincipal as I}from"@north-light/identity";import{isCloudRole as _,personIdAsync as k}from"../canvas/person.js";import{requestPersonId as H}from"../canvas/person-state.js";import{OBJECT_TYPE as W,GROUP_TYPE as w}from"./builtin.js";import{ceilingFrag as M,resolveCeiling as U}from"./ceiling.js";import{compilePermission as S}from"./compile.js";import{PermissionError as j}from"./errors.js";import{loadDefinitions as y}from"./schemas.js";import{TRUE as D,and as F,f as d,or as P,raw as u}from"./sql.js";const q=["read","edit","message","use","share"],v={read:"read",use:"read",edit:"write",share:"write",message:"message"},f=c(s=>s.replace(/^user:/,""),"bareUser"),E=c(s=>{const e=I(s);return e?.kind==="user"?f(e.namespace):null},"personSub");async function J(s,e){const n=await O(s,e);if(n!==null)return n;const t=e.class==="app"&&e.sub===void 0;if(e.class==="app"&&!(t&&!_()))throw new j(403,"no_person","an app reader that names no person acts for no one");return f(await k())}c(J,"userOf");async function O(s,e){if(e.class==="person"){const o=await s.prepare("SELECT external_id FROM identities WHERE object = ? AND scheme = 'user'").get(e.person.id);return o===void 0?null:f(o.external_id)}if(e.class==="app")return e.sub===void 0?null:E(e.sub);if(e.class==="object"&&e.sub!==void 0||e.class==="node"&&e.sub!==void 0)return E(e.sub);const n=e.class==="node"?e.node.id:e.object.id,t=await s.prepare("SELECT sub FROM nodes WHERE node_id = ?").get(n);return t?.sub==null?null:E(t.sub)}c(O,"namedUserOf");async function $(s,e){const n=[e,"*"],t=await s.prepareUncached(`WITH RECURSIVE g(id) AS (
|
|
2
2
|
SELECT resource_id FROM relations WHERE resource_type = ? AND relation = 'member' AND subject_type = 'user' AND subject_id = ANY(?::text[])
|
|
3
3
|
UNION
|
|
4
4
|
SELECT r.resource_id FROM relations r JOIN g ON r.subject_type = ? AND r.subject_id = g.id AND r.subject_relation = 'member'
|
|
5
5
|
WHERE r.resource_type = ? AND r.relation = 'member')
|
|
6
|
-
SELECT id FROM g`).all(w,n,w,w);return{userIds:n,groupIds:t.map(o=>o.id)}}c(
|
|
6
|
+
SELECT id FROM g`).all(w,n,w,w);return{userIds:n,groupIds:t.map(o=>o.id)}}c($,"subjectSet");const p=new WeakMap,ie=c(s=>(p.has(s)||p.set(s,null),s),"shareReads");function Y(s,e){const n=p.get(e);if(n)return n;const t=(async()=>{const o=_()&&(H()===void 0||G(e))?await O(s,e):await J(s,e);return{reader:e,userId:o,subjects:o===null?{userIds:["*"],groupIds:[]}:await $(s,o),defs:await y(s)}})();return n===null&&(p.set(e,t),t.catch(()=>p.set(e,null))),t}c(Y,"resolveReader");const B=c(s=>"subjects"in s,"isEval"),G=c(s=>s.class==="app"&&s.sub!==void 0&&I(s.sub)?.kind==="app","appActsAsApp");async function V(s,e,n,t="o",o={}){if(!q.includes(n))throw new j(400,"unknown_permission",`unknown permission ${n}`);const r=B(e)?e:await Y(s,e),{defs:a}=r,m=u(`${t}.id`),b=S(a,r.subjects,W,n,m),N=n==="read"?P([b,u(`${t}.type = 'app'`)]):b,h=r.reader.class==="person"?null:r.reader.app.id,C=r.reader.class==="app"&&r.reader.place===void 0&&h!==null?await K(s,h):new Set,l=[];for(const[i,R]of a){if(i.startsWith("crtr/")||i==="user"||i==="app"||!(n in R.permissions)&&!(n in R.relations))continue;const L=i.split("/")[0];l.push(d`WHEN ${u(t)}.schema_type = ${i} THEN ${C.has(L)?D:S(a,r.subjects,i,n,m)}`)}const g=l.length===0?d`(CASE WHEN ${u(t)}.schema_type IS NULL THEN ${N} ELSE FALSE END)`:d`(CASE WHEN ${u(t)}.schema_type IS NULL THEN ${N} ${{sql:l.map(i=>i.sql).join(" "),params:l.flatMap(i=>i.params)}} ELSE FALSE END)`,A=await z(s,r,v[n],o);return A===null?g:F([M(A,t),g])}c(V,"permits");const T=new WeakMap;function z(s,e,n,t={}){let o=T.get(e.reader);o===void 0&&T.set(e.reader,o=new Map);const r=`${n} ${t.verb??""} ${e.userId} ${e.subjects.groupIds.join(",")}`;let a=o.get(r);return a===void 0&&(a=U(s,e.reader,e.userId,n,t),o.set(r,a),a.catch(()=>o.delete(r))),a}c(z,"ceilingOf");async function K(s,e){const n=await s.prepare("SELECT s.namespace FROM schemas s JOIN identities i ON i.external_id = s.app AND i.scheme = 'app' WHERE i.object = ?").all(e);return new Set(n.map(t=>t.namespace))}c(K,"ownNamespaceTypes");async function ue(s,e,n,t,o={}){const r=await V(s,e,n,"o",o);return(await s.prepareUncached(`SELECT ${r.sql} AS ok FROM objects o WHERE o.id = ?`).get(...r.params,t))?.ok===!0}c(ue,"check");async function pe(s,e,n,t){const o=await $(s,f(e)),r=await y(s),a=S(r,o,t.type,n,d`${t.id}::text`);return(await s.prepareUncached(`SELECT ${a.sql} AS ok`).get(...a.params))?.ok===!0}c(pe,"checkUser");export{q as PERMISSIONS,z as ceilingOf,ue as check,pe as checkUser,V as permits,Y as resolveReader,ie as shareReads,$ as subjectSet,J as userOf};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
var se=Object.defineProperty;var
|
|
1
|
+
var se=Object.defineProperty;var a=(t,e)=>se(t,"name",{value:e,configurable:!0});import{projectPaths as P}from"../../api/dto/profiles.js";import{spawnSync as ae}from"node:child_process";import{existsSync as le,realpathSync as ce}from"node:fs";import{basename as fe,join as ue,resolve as pe,sep as A}from"node:path";import{appendRotatingRecord as de}from"../log.js";import{crtrHome as me}from"../canvas/paths.js";import{createInterface as M}from"node:readline/promises";import{emitKeypressEvents as E}from"node:readline";import{listProfiles as k,loadProfileManifest as he,resolveProfileOperand as $e,updateProfileLastUsed as D,createProfile as we,addProfileProject as O,ensureRootProfile as j,ROOT_PROFILE_ID as L}from"./manifest.js";import{getDefaultProfileId as ge,setDefaultProfileId as Ie,clearDefaultProfile as N}from"./default-binding.js";import{tildify as v}from"../fs-utils.js";import{stdoutColor as T}from"../output.js";import{inTmux as ye}from"../runtime/placement-tmux.js";import{surfaceTmuxStyleArgs as xe}from"../runtime/surface-bg.js";import{formatBinding as w,matchesTerminalInput as Pe,resolveUserKeybindings as ve}from"../keybindings/index.js";const be=["crtr.profile.menu.abort","crtr.profile.menu.up","crtr.profile.menu.down","crtr.profile.menu.select","crtr.profile.menu.accept-default","crtr.profile.menu.slot.1","crtr.profile.menu.slot.2","crtr.profile.menu.slot.3","crtr.profile.menu.slot.4","crtr.profile.menu.slot.5","crtr.profile.menu.slot.6","crtr.profile.menu.slot.7","crtr.profile.menu.slot.8","crtr.profile.menu.slot.9","crtr.profile.menu.create","crtr.profile.menu.search-existing","crtr.profile.menu.use-root","crtr.profile.menu.set-default","crtr.profile.menu.add-directory","crtr.profile.menu.unpin","crtr.profile.menu.manage"],Me=["crtr.profile.search.abort","crtr.profile.search.back","crtr.profile.search.pick","crtr.profile.search.up","crtr.profile.search.down","crtr.profile.search.delete"];function Y(t,e){return{input:e.ctrl===!0||e.meta===!0?e.name??t:t,upArrow:e.name==="up",downArrow:e.name==="down",return:e.name==="return"||e.name==="enter",escape:e.name==="escape",backspace:e.name==="backspace",ctrl:e.ctrl,meta:e.meta,shift:e.shift}}a(Y,"profileRawInput");function B(t,e,r){return e.find(n=>Pe(t,n,r))??null}a(B,"firstProfileMatch");function Te(t,e){return B(t,be,e)}a(Te,"resolveProfileMenuAction");function _e(t,e){return B(t,Me,e)}a(_e,"resolveProfileSearchAction");function W(t){const e=pe(t);if(!le(e))return e;try{return ce(e)}catch{return e}}a(W,"resolveCwd");function F(t,e){return!!(t===e||t.startsWith(e+A)||e.startsWith(t+A))}a(F,"projectCovers");function H(t,e){return P(t.manifest.projects).some(r=>F(e,r))}a(H,"profileCoversCwd");function _(t,e){return t===null?!1:e===null?!0:t>e}a(_,"isMoreRecent");function U(t){return t.reduce((e,r)=>_(r.manifest.last_used_at,e.manifest.last_used_at)?r:e)}a(U,"pickMostRecent");function K(t){const e=W(t),r=k().filter(o=>H(o,e)),n=r.filter(o=>P(o.manifest.projects).includes(e)),i=ge(e),s=i===null?null:r.find(o=>o.profileId===i)??null;return{covering:r,exact:n,pinnedId:i,pinned:s}}a(K,"profileSelectionState");function Ze(t){const{covering:e,exact:r,pinned:n}=K(t);if(n!==null)return n.profileId;if(r.length===1)return r[0].profileId;const i=r.length>0?r:e;return i.length>0?U(i).profileId:L}a(Ze,"selectProfileForCwdReadOnly");function q(){return!!process.stdin.isTTY&&!!process.stdout.isTTY}a(q,"isInteractive");const $=T.dim,x=T.bold,y=T.cyan;function Re(t){return y(x(t))}a(Re,"key");function G(t){if(t===null)return"never used";const e=Date.parse(t);if(Number.isNaN(e))return"used recently";const r=Math.max(0,Math.floor((Date.now()-e)/1e3));if(r<60)return"used just now";const n=Math.floor(r/60);if(n<60)return`used ${n}m ago`;const i=Math.floor(n/60);if(i<24)return`used ${i}h ago`;const s=Math.floor(i/24);if(s<30)return`used ${s}d ago`;const o=Math.floor(s/30);return o<12?`used ${o}mo ago`:`used ${Math.floor(o/12)}y ago`}a(G,"relativeUsed");function Ce(t,e){const r=e!==void 0?` ${$(e)}
|
|
2
2
|
`:"";process.stdout.write(`
|
|
3
3
|
${x(t)}
|
|
4
4
|
${r}
|
|
5
|
-
`)}
|
|
6
|
-
`),n=r.length-1;let i=0;for(let s=0;s<n;s++){const o=r[s].replace(Ae,"").length;e>0&&o>e&&(i+=Math.ceil(o/e)-1)}return n+i}
|
|
5
|
+
`)}a(Ce,"writeHeader");function Se(t){const e=P(t.manifest.projects),r=e.length,n=e[0];return n===void 0?G(t.manifest.last_used_at):r>1?`${v(n)} \xB7 ${r} dirs total`:v(n)}a(Se,"purviewSummary");const J=y("\u25B8"),z=a(t=>t>0?`\x1B[${t}A\r`:"","cursorUp"),Q="\x1B[0J",Ae=/\u001b\[[0-9;]*m/g;function V(t){const e=process.stdout.columns??80,r=t.split(`
|
|
6
|
+
`),n=r.length-1;let i=0;for(let s=0;s<n;s++){const o=r[s].replace(Ae,"").length;e>0&&o>e&&(i+=Math.ceil(o/e)-1)}return n+i}a(V,"blockRows");function Ee(t,e,r,n,i,s){let o=`
|
|
7
7
|
${x(e)}
|
|
8
8
|
`;r!==void 0&&(o+=` ${$(r)}
|
|
9
9
|
`),o+=`
|
|
10
|
-
`;let
|
|
10
|
+
`;let l=0;for(const[d,h]of n.entries()){const c=h.bindingId===void 0?++l:0,m=h.bindingId!==void 0?w(t,h.bindingId):c<=9?w(t,`crtr.profile.menu.slot.${c}`):"",u=d===i?J:" ",p=h.detail!==""?" "+$(h.detail):"",f=h.isDefault?" "+y("\xB7 "+(h.defaultText??"default")):"";o+=` ${u} ${Re(m)} ${h.label}${p}${f}
|
|
11
11
|
`}return s!==void 0&&(o+=`
|
|
12
12
|
${$(s)}
|
|
13
13
|
`),o+=`
|
|
14
|
-
${$(`${
|
|
15
|
-
`,o}
|
|
16
|
-
`),process.exit(130)),f==="crtr.profile.menu.up"){o=(o-1+n.length)%n.length,h();return}if(f==="crtr.profile.menu.down"){o=(o+1)%n.length,h();return}if(f==="crtr.profile.menu.select"){c(),
|
|
17
|
-
`),!1)}
|
|
14
|
+
${$(`${w(t,"crtr.profile.menu.up")}/${w(t,"crtr.profile.menu.down")} move ${w(t,"crtr.profile.menu.select")} select ${w(t,"crtr.profile.menu.accept-default")} default ${w(t,"crtr.profile.menu.abort")} quit`)}
|
|
15
|
+
`,o}a(Ee,"renderMenu");function X(t,e,r,n,i={}){const s=[];n.forEach((l,d)=>{l.bindingId===void 0&&s.push(d)});let o=i.initialIndex??0;return new Promise(l=>{let d=0;const h=a(()=>{const u=Ee(t,e,r,n,o,i.hint);process.stdout.write((d>0?z(d)+Q:"")+u),d=V(u)},"draw"),c=a(()=>{process.stdin.off("keypress",m),process.stdin.isTTY&&process.stdin.setRawMode(!1),process.stdin.pause()},"cleanup"),m=a((u,p)=>{const f=Te(t,Y(u,p));if(f==="crtr.profile.menu.abort"&&(c(),process.stdout.write(`
|
|
16
|
+
`),process.exit(130)),f==="crtr.profile.menu.up"){o=(o-1+n.length)%n.length,h();return}if(f==="crtr.profile.menu.down"){o=(o+1)%n.length,h();return}if(f==="crtr.profile.menu.select"){c(),l({index:o});return}if(f==="crtr.profile.menu.accept-default"){c(),l({index:i.initialIndex??0});return}if(f?.startsWith("crtr.profile.menu.slot.")){const I=Number.parseInt(f.slice(-1),10);I>=1&&I<=s.length&&(o=s[I-1],h());return}const g=n.findIndex(I=>I.bindingId!==void 0&&I.bindingId===f);if(g>=0){c(),l({index:g});return}f!==null&&i.actionBindingIds?.includes(f)===!0&&(c(),l({index:o,action:f}))},"onKey");E(process.stdin),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.on("keypress",m),h()})}a(X,"runMenu");function Z(t){return ye()?(ae("tmux",["display-popup","-E","-T"," profiles ","-w","90%","-h","85%","-d",t,...xe(),"crtr sys settings --page profiles"],{stdio:"inherit"}),!0):(process.stdout.write(` ${$("the profile manager needs tmux \u2014 run `crtr sys settings` instead")}
|
|
17
|
+
`),!1)}a(Z,"openProfileManager");const R=Symbol("profile-manager-ran");function ee(t){return` ${y("\u203A")} ${$(t)} `}a(ee,"caret");function ke(t){return`crtr: no profile covers ${t}, and this session is non-interactive \u2014 using the root profile.
|
|
18
18
|
Run \`crtr profile new --name <name> --project ${t}\` to create a dedicated profile, or pass --profile <id-or-name> next time.
|
|
19
|
-
`}
|
|
20
|
-
`)
|
|
21
|
-
`),
|
|
19
|
+
`}a(ke,"rootProfileMessage");async function De(t,e){const r=M({input:process.stdin,output:process.stdout});try{Ce(`Profile "${t.manifest.name}" doesn't cover this directory`),await te(r,t,e)}finally{r.close()}}a(De,"promptAddDirToProfile");async function te(t,e,r){process.stdout.write(` ${$(`adding means every "${e.manifest.name}" node also loads this repo's documents; say no for one-off work, or make a separate profile if this work has its own conventions`)}
|
|
20
|
+
`);const n=(await t.question(ee(`add this directory to "${e.manifest.name}"? [Y/n]`))).trim().toLowerCase();n==="n"||n==="no"||(await O(e.profileId,r),process.stdout.write(` ${y("\u2713")} ${$(`added this directory to "${e.manifest.name}"`)}
|
|
21
|
+
`))}a(te,"offerAddDirToProfile");async function Oe(t){const e=[...k()].filter(s=>s.profileId!==L).sort((s,o)=>_(s.manifest.last_used_at,o.manifest.last_used_at)?-1:1);if(e.length===0)return process.stdout.write(` ${$("no existing profiles to select")}
|
|
22
|
+
`),null;let r="",n=0;const i=a(()=>r===""?e:e.filter(s=>s.manifest.name.toLowerCase().includes(r)||P(s.manifest.projects).some(o=>v(o).toLowerCase().includes(r))),"matchesOf");return new Promise(s=>{let o=0;const l=a(()=>{const c=i();n>=c.length&&(n=Math.max(0,c.length-1));let m=`
|
|
22
23
|
${x("Select an existing profile")}
|
|
23
24
|
`;if(m+=` ${$("across every profile, not just this directory")}
|
|
24
25
|
|
|
@@ -26,10 +27,10 @@ Run \`crtr profile new --name <name> --project ${t}\` to create a dedicated prof
|
|
|
26
27
|
`;else{const u=Math.max(...c.map(p=>p.manifest.name.length));c.forEach((p,f)=>{m+=` ${f===n?J:" "} ${x(p.manifest.name.padEnd(u))} ${$(Se(p))}
|
|
27
28
|
`})}m+=`
|
|
28
29
|
${y("\u203A")} ${r}${$("\u2588")}
|
|
29
|
-
`,m+=` ${$(`type to filter ${
|
|
30
|
-
`,process.stdout.write((o>0?z(o)+Q:"")+m),o=V(m)},"draw"),d=
|
|
31
|
-
`),process.exit(130)),u==="crtr.profile.search.back"){d(),s(null);return}const p=i();if(u==="crtr.profile.search.pick"){p.length>0&&(d(),s(p[n].profileId));return}if(u==="crtr.profile.search.up"){p.length>0&&(n=(n-1+p.length)%p.length,
|
|
32
|
-
`),s}
|
|
30
|
+
`,m+=` ${$(`type to filter ${w(t,"crtr.profile.search.up")}/${w(t,"crtr.profile.search.down")} move ${w(t,"crtr.profile.search.pick")} pick ${w(t,"crtr.profile.search.back")} back`)}
|
|
31
|
+
`,process.stdout.write((o>0?z(o)+Q:"")+m),o=V(m)},"draw"),d=a(()=>{process.stdin.off("keypress",h),process.stdin.isTTY&&process.stdin.setRawMode(!1),process.stdin.pause()},"cleanup"),h=a((c,m)=>{const u=_e(t,Y(c,m));if(u==="crtr.profile.search.abort"&&(d(),process.stdout.write(`
|
|
32
|
+
`),process.exit(130)),u==="crtr.profile.search.back"){d(),s(null);return}const p=i();if(u==="crtr.profile.search.pick"){p.length>0&&(d(),s(p[n].profileId));return}if(u==="crtr.profile.search.up"){p.length>0&&(n=(n-1+p.length)%p.length,l());return}if(u==="crtr.profile.search.down"){p.length>0&&(n=(n+1)%p.length,l());return}if(u==="crtr.profile.search.delete"){r=r.slice(0,-1),n=0,l();return}c!==void 0&&c.length===1&&c>=" "&&m.ctrl!==!0&&(r+=c.toLowerCase(),n=0,l())},"onKey");E(process.stdin),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.on("keypress",h),l()})}a(Oe,"promptSelectExistingProfile");async function re(t,e){const r=fe(e)||"profile",n=(await t.question(ee(`name the new profile [${r}]`))).trim(),i=n!==""?n:r,s=(await we(i,[{path:e}])).profileId;return process.stdout.write(` ${y("\u2713")} ${$(`created profile "${i}"`)}
|
|
33
|
+
`),s}a(re,"createProfileHere");async function je(t,e){const r=[{label:"create a profile here",detail:"",bindingId:"crtr.profile.menu.create"},{label:"select an existing profile",detail:"",bindingId:"crtr.profile.menu.search-existing"},{label:$("use the root profile"),detail:"",bindingId:"crtr.profile.menu.use-root",isDefault:!0}];for(;;){const n=await X(e,"No profile covers this directory",void 0,r,{initialIndex:2,actionBindingIds:["crtr.profile.menu.manage"],hint:`${w(e,"crtr.profile.menu.manage")}=manage profiles`});if(n.action==="crtr.profile.menu.manage"){if(Z(t))return R;continue}if(n.index===0){const i=M({input:process.stdin,output:process.stdout});try{return await re(i,t)}finally{i.close()}}if(n.index===1){const i=await Oe(e);if(i===null)continue;const s=he(i),o=M({input:process.stdin,output:process.stdout});try{await te(o,s,t)}finally{o.close()}return s.profileId}return(await j()).profileId}}a(je,"promptCreateOrRoot");async function C(t,e,r,n,i){const s=[...t].sort((f,g)=>_(f.manifest.last_used_at,g.manifest.last_used_at)?-1:1),o=n!==null?s.find(f=>f.profileId===n)??null:null,l=o!==null?[o,...s.filter(f=>f!==o)]:s,d=Math.max(...l.map(f=>f.manifest.name.length)),h=l.map((f,g)=>{const I=P(f.manifest.projects),b=I.length,ne=r?`${G(f.manifest.last_used_at)}${b>1?` \xB7 ${b} dirs total`:""}`:(()=>{const S=I.find(ie=>F(e,ie))??I[0];return b>1?`matches ${v(S)} \xB7 ${b} dirs total`:`matches ${v(S)}`})(),oe=o!==null&&l[0]===o?"default (pinned)":"default";return{label:x(f.manifest.name.padEnd(d)),detail:ne,isDefault:g===0,defaultText:oe}});h.push({label:$("create a new profile here"),detail:"",bindingId:"crtr.profile.menu.create"});const c=["crtr.profile.menu.set-default","crtr.profile.menu.manage"];r||c.push("crtr.profile.menu.add-directory"),o!==null&&c.push("crtr.profile.menu.unpin");const m=[`${w(i,"crtr.profile.menu.set-default")}=set default`];r||m.push(`${w(i,"crtr.profile.menu.add-directory")}=add dir here`),o!==null&&m.push(`${w(i,"crtr.profile.menu.unpin")}=unpin`),m.push(`${w(i,"crtr.profile.menu.manage")}=manage profiles`);const u=await X(i,r?"Choose a profile":"Select a profile",r?"Several profiles claim this directory as their project":"This directory falls under existing profile(s)",h,{actionBindingIds:c,hint:m.join(" ")});if(u.action==="crtr.profile.menu.manage")return Z(e)?R:await C(t,e,r,n,i);if(u.index>=l.length){const f=M({input:process.stdin,output:process.stdout});try{return await re(f,e)}finally{f.close()}}const p=l[u.index];return u.action==="crtr.profile.menu.unpin"?(await N(e),process.stdout.write(` ${y("\u2713")} ${$("cleared the default for this directory")}
|
|
33
34
|
`),p.profileId):(u.action==="crtr.profile.menu.set-default"?(await Ie(e,p.profileId),process.stdout.write(` ${y("\u2713")} ${$(`"${p.manifest.name}" is now the default here`)}
|
|
34
|
-
`)):u.action==="crtr.profile.menu.add-directory"&&(await
|
|
35
|
-
`)),p.profileId)}
|
|
35
|
+
`)):u.action==="crtr.profile.menu.add-directory"&&(await O(p.profileId,e),process.stdout.write(` ${y("\u2713")} ${$(`added this directory to "${p.manifest.name}"`)}
|
|
36
|
+
`)),p.profileId)}a(C,"promptPickProfileOrCreate");async function et(t,e,r=!1,n=!0){const i=a(async l=>{n?await D(l):D(l).catch(d=>de(ue(me(),"attach-invariants.log"),`${new Date().toISOString()} profile.last_used ${l} ${String(d).replaceAll(/[\r\n]/g," ")}`))},"touch"),s=W(t),o=ve();if(e!=null&&e!==""){const l=$e(e);return!H(l,s)&&q()&&await De(l,s),await i(l.profileId),l.profileId}for(;;){const{covering:l,exact:d,pinnedId:h,pinned:c}=K(s);if(h!==null&&c===null&&await N(s),c!==null&&!r)return await i(c.profileId),c.profileId;if(!r&&c===null&&d.length===1)return await i(d[0].profileId),d[0].profileId;if(!q()){const p=d.length>0?d:l;if(p.length>0){const g=U(p);return await i(g.profileId),g.profileId}const f=await j();return process.stderr.write(ke(s)),f.profileId}const m=c!==null?c.profileId:null,u=d.length>1?await C(d,s,!0,m,o):l.length>0?await C(l,s,!1,m,o):await je(s,o);if(u!==R)return await i(u),u}}a(et,"selectProfileForCwd");export{H as profileCoversCwd,Te as resolveProfileMenuAction,_e as resolveProfileSearchAction,et as selectProfileForCwd,Ze as selectProfileForCwdReadOnly};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.776",
|
|
4
4
|
"description": "crtr — agent runtime with memory, plugins, and marketplaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -157,8 +157,8 @@
|
|
|
157
157
|
},
|
|
158
158
|
"license": "UNLICENSED",
|
|
159
159
|
"dependencies": {
|
|
160
|
-
"@north-light/identity": "0.3.
|
|
161
|
-
"@north-light/plugin": "0.3.
|
|
160
|
+
"@north-light/identity": "0.3.776",
|
|
161
|
+
"@north-light/plugin": "0.3.776",
|
|
162
162
|
"@earendil-works/chord": "1.5.2",
|
|
163
163
|
"@earendil-works/pi-agent-core": "1.5.2",
|
|
164
164
|
"@earendil-works/pi-ai": "1.5.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/api",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.776",
|
|
4
4
|
"description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/api/index.js",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/plugin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.776",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"postpack": "node ../../scripts/pack-minify.mjs postpack packages/crouter-plugin"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@north-light/api": "0.3.
|
|
31
|
-
"@north-light/identity": "0.3.
|
|
30
|
+
"@north-light/api": "0.3.776",
|
|
31
|
+
"@north-light/identity": "0.3.776"
|
|
32
32
|
},
|
|
33
33
|
"license": "UNLICENSED",
|
|
34
34
|
"publishConfig": {
|
package/runtime.lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.776",
|
|
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.776",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "UNLICENSED",
|
|
12
12
|
"workspaces": [
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@milkdown/preset-gfm": "^7.22.3",
|
|
29
29
|
"@milkdown/prose": "^7.22.3",
|
|
30
30
|
"@milkdown/utils": "^7.22.3",
|
|
31
|
-
"@north-light/identity": "0.3.
|
|
32
|
-
"@north-light/plugin": "0.3.
|
|
31
|
+
"@north-light/identity": "0.3.776",
|
|
32
|
+
"@north-light/plugin": "0.3.776",
|
|
33
33
|
"cron-parser": "^5.6.0",
|
|
34
34
|
"esbuild": "0.28.2",
|
|
35
35
|
"jose": "^6.2.12",
|
|
@@ -11902,17 +11902,17 @@
|
|
|
11902
11902
|
},
|
|
11903
11903
|
"packages/crouter-api": {
|
|
11904
11904
|
"name": "@north-light/api",
|
|
11905
|
-
"version": "0.3.
|
|
11905
|
+
"version": "0.3.776",
|
|
11906
11906
|
"license": "UNLICENSED"
|
|
11907
11907
|
},
|
|
11908
11908
|
"packages/crouter-env-docker": {
|
|
11909
11909
|
"name": "@north-light/env-docker",
|
|
11910
|
-
"version": "0.3.
|
|
11910
|
+
"version": "0.3.776",
|
|
11911
11911
|
"license": "UNLICENSED"
|
|
11912
11912
|
},
|
|
11913
11913
|
"packages/crouter-identity": {
|
|
11914
11914
|
"name": "@north-light/identity",
|
|
11915
|
-
"version": "0.3.
|
|
11915
|
+
"version": "0.3.776",
|
|
11916
11916
|
"license": "UNLICENSED",
|
|
11917
11917
|
"dependencies": {
|
|
11918
11918
|
"jose": "^6.2.1"
|
|
@@ -11920,21 +11920,21 @@
|
|
|
11920
11920
|
},
|
|
11921
11921
|
"packages/crouter-plugin": {
|
|
11922
11922
|
"name": "@north-light/plugin",
|
|
11923
|
-
"version": "0.3.
|
|
11923
|
+
"version": "0.3.776",
|
|
11924
11924
|
"license": "UNLICENSED",
|
|
11925
11925
|
"dependencies": {
|
|
11926
|
-
"@north-light/api": "0.3.
|
|
11927
|
-
"@north-light/identity": "0.3.
|
|
11926
|
+
"@north-light/api": "0.3.776",
|
|
11927
|
+
"@north-light/identity": "0.3.776"
|
|
11928
11928
|
}
|
|
11929
11929
|
},
|
|
11930
11930
|
"packages/crouter-sdk": {
|
|
11931
11931
|
"name": "@north-light/sdk",
|
|
11932
|
-
"version": "0.3.
|
|
11932
|
+
"version": "0.3.776",
|
|
11933
11933
|
"license": "UNLICENSED",
|
|
11934
11934
|
"dependencies": {
|
|
11935
|
-
"@north-light/api": "0.3.
|
|
11936
|
-
"@north-light/identity": "0.3.
|
|
11937
|
-
"@north-light/plugin": "0.3.
|
|
11935
|
+
"@north-light/api": "0.3.776",
|
|
11936
|
+
"@north-light/identity": "0.3.776",
|
|
11937
|
+
"@north-light/plugin": "0.3.776",
|
|
11938
11938
|
"jose": "^6.2.1"
|
|
11939
11939
|
},
|
|
11940
11940
|
"bin": {
|