ente-cli 0.4.138 → 0.4.140
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/README.md +1 -1
- package/dist/SKILL.md +11 -11
- package/dist/cli.mjs +99 -28
- package/dist/cli.mjs.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -219,7 +219,7 @@ Every command supports `--json`. Run `ente --help` or `ente <group> --help`.
|
|
|
219
219
|
| Group | Commands |
|
|
220
220
|
|---|---|
|
|
221
221
|
| `auth` | `pair`, `login`, `status`, `whoami`, `logout`, `profiles`, `bind`, `unbind`, `bindings` |
|
|
222
|
-
| `entity` | `list`, `create`, `get`, `update` (`--name`, `--tag`, `--description`), `rename`, `archive`, `restore
|
|
222
|
+
| `entity` | `list`, `create`, `get`, `update` (`--name`, `--tag`, `--description`), `rename`, `archive`, `restore` / `pin` (`--role`; `--share-parents` plus the returned fingerprint — agent keys only into spaces where you are the sole member, otherwise a person approves in the app), `unpin`, `add-to-space`, `remove-from-space` (`--remove-from-activities` optional) |
|
|
223
223
|
| `activity` | `list`, `create`, `search`, `get`, `transcript` (`--grep`, `--context`), `update`, `delete`, `restore`, `message add`, `message delete`, `attachment upload` |
|
|
224
224
|
| `agenda` | `create-point`, `link-task` |
|
|
225
225
|
| `task` | `list`, `get`, `create`, `update`, `done`, `assign`, `unassign`, `set-assignees`, `clear-assignees` |
|
package/dist/SKILL.md
CHANGED
|
@@ -208,7 +208,7 @@ ente query "QM system export" [--space <name>] [--entity <name>] [--since <epoch
|
|
|
208
208
|
|
|
209
209
|
# Entities
|
|
210
210
|
ente entity list [--query <text>] [--field <label=value>] [--type person|org|project|topic|place|object] [--space <name>] [--limit <count>] [--projection compact|full] [--archived] [--json]
|
|
211
|
-
ente entity create "Jane Doe" --type person [--pin "Acme Corp"] [--alias "JD"] [--field '{"label":"E-Mail","type":"email","value":"jane@acme.com"}'] [--tag vip] [--description "CTO at Acme"] [--json]
|
|
211
|
+
ente entity create "Jane Doe" --type person [--pin "Acme Corp"] [--share-parents --parent-space-grant-fingerprint <token>] [--alias "JD"] [--field '{"label":"E-Mail","type":"email","value":"jane@acme.com"}'] [--tag vip] [--description "CTO at Acme"] [--json]
|
|
212
212
|
ente entity create "Leistungsphase 1" --type topic --space "Studio" --parent "Building A" [--parent-role "Mandant"] [--json]
|
|
213
213
|
ente entity duplicate <name-or-id> --space <space> [--name "New project"] [--include-exclusive-children] [--json]
|
|
214
214
|
ente entity get "Jane Doe" [--limit 20] [--hours-back <hours>] [--min-count 5] [--projection compact|full] [--json]
|
|
@@ -217,17 +217,17 @@ ente entity field add "Jane Doe" --label "Mobilnummer" --type phone --value "+49
|
|
|
217
217
|
ente entity field update <valueId> --value "new text" [--json]
|
|
218
218
|
ente entity field remove <valueId> [--json]
|
|
219
219
|
ente entity rename "Lorey Georg" "Georg Lorey" # change display name
|
|
220
|
-
ente entity pin "Jane Doe" "Acme Corp" [--role "student"] [--json]
|
|
220
|
+
ente entity pin "Jane Doe" "Acme Corp" [--role "student"] [--share-parents --parent-space-grant-fingerprint <token>] [--json]
|
|
221
221
|
ente entity unpin "Jane Doe" "Acme Corp" [--json]
|
|
222
|
-
ente entity add-to-space "Jane Doe" --space "Team" [--json]
|
|
222
|
+
ente entity add-to-space "Jane Doe" --space "Team" [--share-parents --parent-space-grant-fingerprint <token>] [--json]
|
|
223
223
|
ente entity remove-from-space "Jane Doe" --space "Team" [--remove-from-activities --cleanup-fingerprint FINGERPRINT] [--json]
|
|
224
224
|
ente pins list "Jane Doe" [--json] # relationships whose endpoints are accessible
|
|
225
225
|
ente entity archive "Old Project" [--json]
|
|
226
|
-
ente entity restore <entity-id> [--json]
|
|
226
|
+
ente entity restore <entity-id> [--share-parents --parent-space-grant-fingerprint <token>] [--json]
|
|
227
227
|
|
|
228
228
|
# Activities
|
|
229
229
|
ente activity list [--entity "Jane"] [--compact] [--cursor <nextCursor>] [--min-count 0] [--type note|conversation|meeting|call|message|task] [--field k=v ...] [--space "Work"] [--only-open] [--hours 168] [--limit 20] [--sort deadline|created] [--json]
|
|
230
|
-
ente activity create --type meeting --title "Call with Jane" --entity "Jane Doe" --entity "Acme Corp" --space "Work" [--content "…"] [--content-file ./notes.md] [--json]
|
|
230
|
+
ente activity create --type meeting --title "Call with Jane" --entity "Jane Doe" --entity "Acme Corp" --space "Work" [--content "…"] [--content-file ./notes.md] [--auto-link --entity-space-grant-fingerprint <token>] [--json]
|
|
231
231
|
ente activity search "quarterly review" [--entity "Acme"] [--type meeting] [--limit 20] [--projection compact|full] [--json]
|
|
232
232
|
ente activity get <activityId> [--projection compact|full] [--json] # public detail; use --projection full for full text and attachments
|
|
233
233
|
ente activity transcript <activityId> [--grep "Preis"] [--context 2] [--recording <id>] [--json] # transcript of the recording behind it
|
|
@@ -241,7 +241,7 @@ ente activity delete <activityId> [--json]
|
|
|
241
241
|
ente activity restore <activityId> [--json]
|
|
242
242
|
|
|
243
243
|
# Database lists (entity + typed columns; each row is a note/task activity; no date column type)
|
|
244
|
-
ente list create "<name>" --space "<space>" [--icon <topic-icon>] [--column "key[=Label]:text|number|boolean|single-select|multi-select[:opt,opt]"] [--pin "<parent>"] [--json]
|
|
244
|
+
ente list create "<name>" --space "<space>" [--icon <topic-icon>] [--column "key[=Label]:text|number|boolean|single-select|multi-select[:opt,opt]"] [--pin "<parent>" [--share-parents --parent-space-grant-fingerprint <token>]] [--json]
|
|
245
245
|
ente list add "<list>" [--space "<space>"] --title "…" [--attr k=v ...] [--key <textColumn>] [--content-file ./row.md] [--json] # --key = upsert by that cell
|
|
246
246
|
ente list update "<list>" <rowId> [--attr k=v ...] [--title "…"] [--json] # empty value clears a cell
|
|
247
247
|
ente list import "<list>" [--space "<space>"] --file rows.jsonl --key <textColumn> [--dry-run] [--concurrency 4] [--json] # {"title","fields":[{"label":"repo","value":"…"}],"content"} per line → created/updated/unchanged
|
|
@@ -604,9 +604,9 @@ ente feedback status <feedbackId> <status> # move to a board colum
|
|
|
604
604
|
## Limits & boundaries
|
|
605
605
|
|
|
606
606
|
- **Rename is supported**: `ente entity rename "<old>" "<new>"` (or `entity update <id> --name`).
|
|
607
|
-
- **Relationships are spaceless**, but access propagates upward through the active graph. Every active parent and ancestor must belong to every active child space. A pin, create `--pin`, restore or add-to-space that would add a parent to another space fails with `MISSING_PARENT_SPACE_ACCESS_CONFIRMATION_REQUIRED` and the grant list (parent → space). **
|
|
607
|
+
- **Relationships are spaceless**, but access propagates upward through the active graph. Every active parent and ancestor must belong to every active child space. A pin, create `--pin`, restore or add-to-space that would add a parent to another space fails with `MISSING_PARENT_SPACE_ACCESS_CONFIRMATION_REQUIRED` and the grant list (parent → space). **Solo-space rule (server-enforced):** an agent key may confirm the grants only when every target space has exactly one member — the user the key acts for (e.g. "Personal"); then retry with `--share-parents --parent-space-grant-fingerprint <grantFingerprint>`. If any target space has other members, the error carries `requiresPerson: true` and no fingerprint: only a person can approve, in the Ente app, so do not retry. Hand the person the click path: open the parent → „Untergeordnete Entität hinzufügen“ → „Vorhandene hinzufügen“ → pick the child → confirm „Freigeben und fortfahren“ (that dialog names the spaces the parent then joins). `FORBIDDEN: You need access to every child space…` is different: the child also lives in a space the person cannot reach (not a member, archived, or outside the key), so nobody can pin it there until that space is resolved.
|
|
608
608
|
- **Activity ownership stays inside its space.** An entity cannot leave a space while it owns activities there. Use `space change prepare --kind entity --action detach --source SPACE_ID --entity ENTITY_ID` and inspect every page before confirming the reviewed version. Mentions are preserved; another valid owner must remain.
|
|
609
|
-
- **Cross-space linking is bounded**: an activity can only link entities already in its target space. A failed write lists the missing entities.
|
|
609
|
+
- **Cross-space linking is bounded**: an activity can only link entities already in its target space. A failed write lists the missing entities and the grant fingerprint. Under the solo-space rule an agent key may retry with `--auto-link --entity-space-grant-fingerprint <token>` when the activity space's only member is the user it acts for; otherwise (`requiresPerson: true`) a person shares the entities in the Ente app.
|
|
610
610
|
- **Merging duplicates and adding an entity to a shared space are web-UI only** — there is no API endpoint. Run `ente guide limits` for the full rundown.
|
|
611
611
|
|
|
612
612
|
---
|
|
@@ -630,10 +630,10 @@ ente feedback status <feedbackId> <status> # move to a board colum
|
|
|
630
630
|
- **"Ambiguous match"**: multiple entities match — use the full Convex ID.
|
|
631
631
|
- **"No entity found"**: check spelling, try `ente search`.
|
|
632
632
|
- **"not in '<space>'" (cross-space)**: ask the person to add the entity to that space in the web UI; the CLI cannot.
|
|
633
|
-
- **`MISSING_PARENT_SPACE_ACCESS_CONFIRMATION_REQUIRED`**: a
|
|
633
|
+
- **`MISSING_PARENT_SPACE_ACCESS_CONFIRMATION_REQUIRED`**: with a `grantFingerprint` (solo space) retry with `--share-parents --parent-space-grant-fingerprint`; with `requiresPerson: true` a person approves in the app (see Limits).
|
|
634
634
|
- **"Cannot remove all entities"**: an activity must keep at least one entity.
|
|
635
635
|
|
|
636
|
-
Parent relationships are spaceless. Both entities must be accessible. Every active parent and ancestor must belong to every active child space. Commands that would expand parent access fail with the grant preview; only a person
|
|
636
|
+
Parent relationships are spaceless. Both entities must be accessible. Every active parent and ancestor must belong to every active child space. Commands that would expand parent access fail with the grant preview; an agent key confirms it only for solo spaces (see Limits), otherwise a person approves in the app. A parent cannot be removed from a space while an active child remains there.
|
|
637
637
|
|
|
638
638
|
## User mailbox processing
|
|
639
639
|
|
|
@@ -1030,7 +1030,7 @@ ente task update <id> --field '{"fieldId":"<field-id>","value":null}' --profile
|
|
|
1030
1030
|
ente task sync createActivity '{"spaceId":"<space-id>","entityIds":["<entity-id>"],"type":"task","externalKey":"fictional-1","fields":[{"label":"t3_thread","value":"t3code://threads/fictional/id"}]}' --profile ente-operator --json
|
|
1031
1031
|
```
|
|
1032
1032
|
|
|
1033
|
-
Write `--field` takes repeatable `label=value` pairs or typed JSON objects. List `--field` and `--attr` take `label=value` pairs. Field-enabled `activity create`/`task create` reject `--auto-link`; owners must already belong to the destination. Complete sharing separately. REST POST/PATCH `/api/external/activities` and MCP create/update take the same `fields` array. See `docs/activity-fields.md` for caps and examples.
|
|
1033
|
+
Write `--field` takes repeatable `label=value` pairs or typed JSON objects. List `--field` and `--attr` take `label=value` pairs. Field-enabled `activity create`/`task create` reject `--auto-link` and `--entity-space-grant-fingerprint`; owners must already belong to the destination. Complete sharing separately. REST POST/PATCH `/api/external/activities` and MCP create/update take the same `fields` array. See `docs/activity-fields.md` for caps and examples.
|
|
1034
1034
|
|
|
1035
1035
|
Activity definitions are shared across a space. Writers create an unmatched definition implicitly through `fields`; existing definitions validate subsequent values. Unknown single-select and multi-select values add options within the same limits. A scalar multi-select string is one literal selection, never delimiter-split. This does not create a Kanban column. Rename, merge, retype and option removal remain manager-only. Empty strings clear a field. Types include text, JSON, email, phone, URL, date, postal-address, salutation, job-title, number, boolean, single-select and multi-select. Text and JSON lookups compare stored strings exactly. Other types match normalized values; `Foo@X.com` finds `foo@x.com`.
|
|
1036
1036
|
|
package/dist/cli.mjs
CHANGED
|
@@ -28645,7 +28645,7 @@ function writeCommandError(stdout, stderr, json3, error62) {
|
|
|
28645
28645
|
`);
|
|
28646
28646
|
}
|
|
28647
28647
|
function withoutAgentFingerprint(data) {
|
|
28648
|
-
if (!("grantFingerprint" in data)) return data;
|
|
28648
|
+
if (!("grantFingerprint" in data) || data.requiresPerson !== true) return data;
|
|
28649
28649
|
const { grantFingerprint: _unusable, ...rest } = data;
|
|
28650
28650
|
return rest;
|
|
28651
28651
|
}
|
|
@@ -28724,7 +28724,7 @@ function parseOperationFieldPairs(operation, pairs) {
|
|
|
28724
28724
|
}
|
|
28725
28725
|
|
|
28726
28726
|
// ente/version.ts
|
|
28727
|
-
var VERSION = "0.4.
|
|
28727
|
+
var VERSION = "0.4.140";
|
|
28728
28728
|
|
|
28729
28729
|
// ente/branding.ts
|
|
28730
28730
|
var NPM_REGISTRY = "https://registry.npmjs.org";
|
|
@@ -42073,7 +42073,8 @@ var selector2 = external_exports.string().refine((value) => value.trim().length
|
|
|
42073
42073
|
var graphSelectors = external_exports.array(selector2).min(1).max(8192);
|
|
42074
42074
|
var graphCreateIntent = activityWriteInputs.createActivity.omit({ spaceId: true, entityIds: true }).extend({
|
|
42075
42075
|
space: selector2,
|
|
42076
|
-
entities: graphSelectors
|
|
42076
|
+
entities: graphSelectors,
|
|
42077
|
+
entitySpaceGrantFingerprint: external_exports.string().optional()
|
|
42077
42078
|
});
|
|
42078
42079
|
function graphConvert(field, convert) {
|
|
42079
42080
|
try {
|
|
@@ -42423,13 +42424,13 @@ function safePinError(error62) {
|
|
|
42423
42424
|
if (error62 instanceof Error && "data" in error62 && error62.data && typeof error62.data === "object" && "code" in error62.data && typeof error62.data.code === "string") return errorMessage(error62);
|
|
42424
42425
|
return "Relationship operation could not be confirmed; inspect it before retrying";
|
|
42425
42426
|
}
|
|
42426
|
-
async function pinToTargets(caller, entityId2, targets) {
|
|
42427
|
+
async function pinToTargets(caller, entityId2, targets, opts) {
|
|
42427
42428
|
const result = { succeeded: [], failures: [] };
|
|
42428
42429
|
if (targets.length === 0) return result;
|
|
42429
42430
|
let ids2 = [];
|
|
42430
42431
|
try {
|
|
42431
42432
|
graphInput(graphSelectors, targets);
|
|
42432
|
-
graphInput(relationshipAddInput.pick({ sourceEntityId: true }), { sourceEntityId: entityId2 });
|
|
42433
|
+
graphInput(relationshipAddInput.pick({ sourceEntityId: true, grantMissingParentAccess: true, parentSpaceGrantFingerprint: true }), { sourceEntityId: entityId2, grantMissingParentAccess: opts.shareParents, parentSpaceGrantFingerprint: opts.parentSpaceGrantFingerprint });
|
|
42433
42434
|
ids2 = await resolveEntitiesC(caller, targets);
|
|
42434
42435
|
} catch (exc) {
|
|
42435
42436
|
for (const target3 of targets) result.failures.push({ target: target3, error: `could not resolve target: ${safePinError(exc)}` });
|
|
@@ -42439,7 +42440,14 @@ async function pinToTargets(caller, entityId2, targets) {
|
|
|
42439
42440
|
const target3 = targets[i];
|
|
42440
42441
|
let returned = false;
|
|
42441
42442
|
try {
|
|
42442
|
-
const input2 = {
|
|
42443
|
+
const input2 = {
|
|
42444
|
+
sourceEntityId: entityId2,
|
|
42445
|
+
targetEntityId: ids2[i],
|
|
42446
|
+
...opts.shareParents ? {
|
|
42447
|
+
grantMissingParentAccess: true,
|
|
42448
|
+
...opts.parentSpaceGrantFingerprint ? { parentSpaceGrantFingerprint: opts.parentSpaceGrantFingerprint } : {}
|
|
42449
|
+
} : {}
|
|
42450
|
+
};
|
|
42443
42451
|
parseRelationshipRequest("managePins", { action: "add", ...input2 });
|
|
42444
42452
|
const raw = await caller.mutation(pinsCreate, input2);
|
|
42445
42453
|
returned = true;
|
|
@@ -42554,6 +42562,12 @@ var EntityCreate = class extends ClientCommand {
|
|
|
42554
42562
|
allowNonExclusiveChildren = options_exports.Boolean("--allow-non-exclusive-children", false, { description: "Allow this entity alongside a child\u2019s regular parent" });
|
|
42555
42563
|
exclusiveParent = options_exports.Boolean("--exclusive-parent", false, { description: "Deprecated compatibility option; ignored after parent-policy activation" });
|
|
42556
42564
|
pin = options_exports.Array("--pin", { description: "Pin to other entities (resolved by name)" });
|
|
42565
|
+
shareParents = options_exports.Boolean("--share-parents", false, {
|
|
42566
|
+
description: "Share pinned parents and ancestors into this entity's space when required (agent keys: only into spaces where you are the sole member)"
|
|
42567
|
+
});
|
|
42568
|
+
parentSpaceGrantFingerprint = options_exports.String("--parent-space-grant-fingerprint", {
|
|
42569
|
+
description: "Exact grantFingerprint returned by the confirmation-required error"
|
|
42570
|
+
});
|
|
42557
42571
|
alias = options_exports.Array("--alias", { description: "Alternative names" });
|
|
42558
42572
|
attr = options_exports.Array("--attr", { description: "Legacy; use --field instead" });
|
|
42559
42573
|
field = options_exports.Array("--field", { description: 'Repeat JSON {"label":"E-Mail","type":"email","value":"a@example.com"}' });
|
|
@@ -42583,7 +42597,10 @@ var EntityCreate = class extends ClientCommand {
|
|
|
42583
42597
|
if (this.description) {
|
|
42584
42598
|
await caller.mutation(entitiesSetDescriptionFromMarkdown, { entityId: entityId2, markdown: this.description });
|
|
42585
42599
|
}
|
|
42586
|
-
const pins = await pinToTargets(caller, entityId2, this.pin ?? []
|
|
42600
|
+
const pins = await pinToTargets(caller, entityId2, this.pin ?? [], {
|
|
42601
|
+
shareParents: this.shareParents,
|
|
42602
|
+
...this.parentSpaceGrantFingerprint ? { parentSpaceGrantFingerprint: this.parentSpaceGrantFingerprint } : {}
|
|
42603
|
+
});
|
|
42587
42604
|
const spaces = await spacesFooterFromMemberships(caller);
|
|
42588
42605
|
const jsonOut = { data: { entityId: entityId2 } };
|
|
42589
42606
|
if (pins.failures.length) {
|
|
@@ -42760,12 +42777,24 @@ var EntityRestore = class extends ProfileCommand {
|
|
|
42760
42777
|
description: "Restore an entity (and its cascade-trashed activities) from the trash"
|
|
42761
42778
|
});
|
|
42762
42779
|
nameOrId = options_exports.String();
|
|
42780
|
+
shareParents = options_exports.Boolean("--share-parents", false, {
|
|
42781
|
+
description: "Confirm parent and ancestor grants required to reactivate the entity (agent keys: only into spaces where you are the sole member)"
|
|
42782
|
+
});
|
|
42783
|
+
parentSpaceGrantFingerprint = options_exports.String("--parent-space-grant-fingerprint", {
|
|
42784
|
+
description: "Exact grantFingerprint returned by the confirmation-required error"
|
|
42785
|
+
});
|
|
42763
42786
|
async run() {
|
|
42764
42787
|
requireEntitySelector("restoreEntity", this.nameOrId, "entityId");
|
|
42765
|
-
parseEntityWriteRequest("restoreEntity", { entityId: "pending-entity-resolution" });
|
|
42788
|
+
parseEntityWriteRequest("restoreEntity", { entityId: "pending-entity-resolution", ...this.shareParents ? { grantMissingParentAccess: true, parentSpaceGrantFingerprint: this.parentSpaceGrantFingerprint } : {} });
|
|
42766
42789
|
const caller = await resolveCaller();
|
|
42767
42790
|
const entityId2 = await resolveEntityC(caller, this.nameOrId);
|
|
42768
|
-
projectEntityWriteResult("restoreEntity", await caller.mutation(entitiesRestoreEntity, {
|
|
42791
|
+
projectEntityWriteResult("restoreEntity", await caller.mutation(entitiesRestoreEntity, {
|
|
42792
|
+
entityId: entityId2,
|
|
42793
|
+
...this.shareParents ? {
|
|
42794
|
+
grantMissingParentAccess: true,
|
|
42795
|
+
...this.parentSpaceGrantFingerprint ? { parentSpaceGrantFingerprint: this.parentSpaceGrantFingerprint } : {}
|
|
42796
|
+
} : {}
|
|
42797
|
+
}));
|
|
42769
42798
|
const spaces = await spacesFooterFromMemberships(caller);
|
|
42770
42799
|
this.emitText(
|
|
42771
42800
|
jsonWithSpaces({ data: parsePublicCliEntityWriteResult("restoreEntity", { success: true, entityId: entityId2 }) }, spaces),
|
|
@@ -42781,6 +42810,12 @@ var EntityPin = class extends ProfileCommand {
|
|
|
42781
42810
|
role = options_exports.String("--role", {
|
|
42782
42811
|
description: "Optional child role at the parent (for example: student)"
|
|
42783
42812
|
});
|
|
42813
|
+
shareParents = options_exports.Boolean("--share-parents", false, {
|
|
42814
|
+
description: "Confirm sharing the parent and its ancestors into missing child spaces (agent keys: only into spaces where you are the sole member)"
|
|
42815
|
+
});
|
|
42816
|
+
parentSpaceGrantFingerprint = options_exports.String("--parent-space-grant-fingerprint", {
|
|
42817
|
+
description: "Exact grantFingerprint returned by the confirmation-required error"
|
|
42818
|
+
});
|
|
42784
42819
|
async run() {
|
|
42785
42820
|
graphInput(selector2, this.source);
|
|
42786
42821
|
graphInput(selector2, this.target);
|
|
@@ -42791,7 +42826,7 @@ var EntityPin = class extends ProfileCommand {
|
|
|
42791
42826
|
const sourceId = await resolveEntityC(caller, this.source);
|
|
42792
42827
|
const targetId = await resolveEntityC(caller, this.target);
|
|
42793
42828
|
progress.identifyEntity(sourceId);
|
|
42794
|
-
const payload = { sourceEntityId: sourceId, targetEntityId: targetId, ...this.role !== void 0 ? { role: normalizedRole ?? "" } : {} };
|
|
42829
|
+
const payload = { sourceEntityId: sourceId, targetEntityId: targetId, ...this.role !== void 0 ? { role: normalizedRole ?? "" } : {}, ...this.shareParents ? { grantMissingParentAccess: true, ...this.parentSpaceGrantFingerprint !== void 0 ? { parentSpaceGrantFingerprint: this.parentSpaceGrantFingerprint } : {} } : {} };
|
|
42795
42830
|
parseRelationshipRequest("managePins", { action: "add", ...payload });
|
|
42796
42831
|
const existing = graphResult(relationshipPublicList, await caller.query(pinsListBySource, { sourceEntityId: sourceId }));
|
|
42797
42832
|
const alreadyExists = existing.some((pin2) => pin2.targetEntityId === targetId);
|
|
@@ -42862,11 +42897,24 @@ var EntityAddToSpace = class extends ProfileCommand {
|
|
|
42862
42897
|
});
|
|
42863
42898
|
nameOrId = options_exports.String();
|
|
42864
42899
|
space = options_exports.String("--space", { required: true, description: "Space to add to (name or ID)" });
|
|
42900
|
+
shareParents = options_exports.Boolean("--share-parents", false, {
|
|
42901
|
+
description: "Confirm sharing this entity's parents and ancestors into the target space (agent keys: only into spaces where you are the sole member)"
|
|
42902
|
+
});
|
|
42903
|
+
parentSpaceGrantFingerprint = options_exports.String("--parent-space-grant-fingerprint", {
|
|
42904
|
+
description: "Exact grantFingerprint returned by the confirmation-required error"
|
|
42905
|
+
});
|
|
42865
42906
|
async run() {
|
|
42866
42907
|
const caller = await resolveCaller();
|
|
42867
42908
|
const entityId2 = await resolveEntityC(caller, this.nameOrId);
|
|
42868
42909
|
const spaceId2 = await resolveSpaceByNameC(caller, this.space);
|
|
42869
|
-
await caller.mutation(entitiesCreateEntitySpaceLink, {
|
|
42910
|
+
await caller.mutation(entitiesCreateEntitySpaceLink, {
|
|
42911
|
+
entityId: entityId2,
|
|
42912
|
+
spaceId: spaceId2,
|
|
42913
|
+
...this.shareParents ? {
|
|
42914
|
+
grantMissingParentAccess: true,
|
|
42915
|
+
...this.parentSpaceGrantFingerprint ? { parentSpaceGrantFingerprint: this.parentSpaceGrantFingerprint } : {}
|
|
42916
|
+
} : {}
|
|
42917
|
+
});
|
|
42870
42918
|
const spaces = await spacesFooterFromMemberships(caller);
|
|
42871
42919
|
this.emitText(
|
|
42872
42920
|
jsonWithSpaces({ data: { success: true } }, spaces),
|
|
@@ -43935,10 +43983,13 @@ var ActivityCreate = class extends ClientCommand {
|
|
|
43935
43983
|
tag = options_exports.Array("--tag", { description: "Tags (repeatable)" });
|
|
43936
43984
|
agentAssignee = options_exports.Array("--agent-assignee", { description: "Agent ID to assign to this task (repeatable; requires write access)" });
|
|
43937
43985
|
autoLink = options_exports.Boolean("--auto-link", false, { description: "Auto-link entities not in target space" });
|
|
43986
|
+
entitySpaceGrantFingerprint = options_exports.String("--entity-space-grant-fingerprint", {
|
|
43987
|
+
description: "Exact grant fingerprint returned by the confirmation-required error"
|
|
43988
|
+
});
|
|
43938
43989
|
field = options_exports.Array("--field", { description: "Field key=value or typed JSON: {label or fieldId, optional type, value}; repeat a label for a list (replaces the field), empty/null removes" });
|
|
43939
43990
|
async run() {
|
|
43940
43991
|
const fields4 = parseActivityFields(this.field);
|
|
43941
|
-
if (fields4 !== void 0 && this.autoLink) throw new Error("--field requires owners already in the destination space; complete sharing separately before using --field.");
|
|
43992
|
+
if (fields4 !== void 0 && (this.autoLink || this.entitySpaceGrantFingerprint !== void 0)) throw new Error("--field requires owners already in the destination space; complete sharing separately before using --field.");
|
|
43942
43993
|
const content = graphConvert("content", () => readContentOption(this.content, this.contentFile));
|
|
43943
43994
|
const sourceCreatedAt = this.sourceCreatedAt === void 0 ? void 0 : graphConvert("sourceCreatedAt", () => parseSourceCreatedAt(this.sourceCreatedAt, this.sourceCreatedAtTimezone));
|
|
43944
43995
|
const intent = graphInput(graphCreateIntent, {
|
|
@@ -43951,19 +44002,21 @@ var ActivityCreate = class extends ClientCommand {
|
|
|
43951
44002
|
tags: this.tag,
|
|
43952
44003
|
agentAssigneeIds: this.agentAssignee,
|
|
43953
44004
|
sourceCreatedAt,
|
|
43954
|
-
autoLinkPersonalSpace: this.autoLink
|
|
44005
|
+
autoLinkPersonalSpace: this.autoLink,
|
|
44006
|
+
entitySpaceGrantFingerprint: this.entitySpaceGrantFingerprint
|
|
43955
44007
|
});
|
|
43956
44008
|
const progress = graphProgress(this, "activity.create", ["create", ...sourceCreatedAt && fields4 === void 0 ? ["sourceCreatedAt"] : []]);
|
|
43957
44009
|
return progress.run(async () => {
|
|
43958
44010
|
const caller = await resolveCaller();
|
|
43959
44011
|
const entityIds = await resolveEntitiesC(caller, intent.entities);
|
|
43960
44012
|
const spaceId2 = await resolveSpaceByNameC(caller, intent.space);
|
|
43961
|
-
parseActivityWriteRequest("createActivity", { ...Object.fromEntries(Object.entries(intent).filter(([key]) => !["space", "entities"].includes(key))), spaceId: spaceId2, entityIds });
|
|
44013
|
+
parseActivityWriteRequest("createActivity", { ...Object.fromEntries(Object.entries(intent).filter(([key]) => !["space", "entities", "entitySpaceGrantFingerprint"].includes(key))), spaceId: spaceId2, entityIds });
|
|
43962
44014
|
const activityId2 = fields4 !== void 0 ? await progress.write("create", () => this.client().activityWrite("createActivity", { spaceId: spaceId2, entityIds, type: intent.type, title: intent.title, content, tags: intent.tags, agentAssigneeIds: intent.agentAssigneeIds, sourceCreatedAt, autoLinkPersonalSpace: intent.autoLinkPersonalSpace, fields: fields4 }), fieldCreateReceipt, "activityId") : await progress.write("create", () => caller.mutation(activitiesCreate, {
|
|
43963
44015
|
entityId: entityIds[0],
|
|
43964
44016
|
additionalEntities: entityIds.slice(1),
|
|
43965
44017
|
ownerSpaceId: spaceId2,
|
|
43966
44018
|
grantMissingEntityAccess: this.autoLink,
|
|
44019
|
+
...this.entitySpaceGrantFingerprint !== void 0 ? { entitySpaceGrantFingerprint: this.entitySpaceGrantFingerprint } : {},
|
|
43967
44020
|
type: intent.type,
|
|
43968
44021
|
title: intent.title,
|
|
43969
44022
|
...intent.agentAssigneeIds?.length ? { agentAssigneeIds: intent.agentAssigneeIds } : {},
|
|
@@ -44402,17 +44455,20 @@ var TaskCreate = class extends ClientCommand {
|
|
|
44402
44455
|
assignee = options_exports.Array("--assignee", { description: "Assignee user IDs or emails" });
|
|
44403
44456
|
assigneeEmail = options_exports.Array("--assignee-email", { description: "Assignee emails" });
|
|
44404
44457
|
autoLink = options_exports.Boolean("--auto-link", false, { description: "Auto-link entities not in target space" });
|
|
44458
|
+
entitySpaceGrantFingerprint = options_exports.String("--entity-space-grant-fingerprint", {
|
|
44459
|
+
description: "Exact grant fingerprint returned by the confirmation-required error"
|
|
44460
|
+
});
|
|
44405
44461
|
field = options_exports.Array("--field", { description: "Field key=value or typed JSON: {label or fieldId, optional type, value}; repeat a label for a list (replaces the field), empty/null removes" });
|
|
44406
44462
|
async run() {
|
|
44407
44463
|
const aliases = graphConvert("fields", () => parseFieldPairList(this.attr));
|
|
44408
44464
|
const fields4 = parseActivityFields(this.field, aliases);
|
|
44409
|
-
if (fields4 !== void 0 && this.autoLink) throw new Error("--field requires owners already in the destination space; complete sharing separately before using --field.");
|
|
44465
|
+
if (fields4 !== void 0 && (this.autoLink || this.entitySpaceGrantFingerprint !== void 0)) throw new Error("--field requires owners already in the destination space; complete sharing separately before using --field.");
|
|
44410
44466
|
if (this.noDeadline && this.deadline !== void 0) throw new Error("Use either --deadline or --no-deadline, not both.");
|
|
44411
44467
|
const deadline = this.noDeadline ? void 0 : graphConvert("deadline", () => this.deadline === void 0 ? defaultDeadline() : parseDeadline(this.deadline));
|
|
44412
44468
|
const sourceCreatedAt = this.sourceCreatedAt === void 0 ? void 0 : graphConvert("sourceCreatedAt", () => parseSourceCreatedAt(this.sourceCreatedAt, this.sourceCreatedAtTimezone));
|
|
44413
44469
|
const directAssigneeIds = (this.assignee ?? []).filter((value) => !value.includes("@"));
|
|
44414
44470
|
const emailAssignees = [...(this.assignee ?? []).filter((value) => value.includes("@")), ...this.assigneeEmail ?? []];
|
|
44415
|
-
const intent = graphInput(graphCreateIntent, { space: this.space, entities: this.entity, type: "task", title: this.title, deadline, fields: fields4, content: this.content, tags: this.tag, assigneeIds: directAssigneeIds, assigneeEmails: emailAssignees, sourceCreatedAt, autoLinkPersonalSpace: this.autoLink });
|
|
44471
|
+
const intent = graphInput(graphCreateIntent, { space: this.space, entities: this.entity, type: "task", title: this.title, deadline, fields: fields4, content: this.content, tags: this.tag, assigneeIds: directAssigneeIds, assigneeEmails: emailAssignees, sourceCreatedAt, autoLinkPersonalSpace: this.autoLink, entitySpaceGrantFingerprint: this.entitySpaceGrantFingerprint });
|
|
44416
44472
|
const progress = graphProgress(this, "task.create", ["create", ...sourceCreatedAt && fields4 === void 0 ? ["sourceCreatedAt"] : []]);
|
|
44417
44473
|
return progress.run(async () => {
|
|
44418
44474
|
const caller = await resolveCaller();
|
|
@@ -44420,12 +44476,13 @@ var TaskCreate = class extends ClientCommand {
|
|
|
44420
44476
|
const spaceId2 = await resolveSpaceByNameC(caller, intent.space);
|
|
44421
44477
|
const resolved = await resolveAssigneeEmailsToIds(caller, spaceId2, emailAssignees);
|
|
44422
44478
|
const assigneeIds = [.../* @__PURE__ */ new Set([...directAssigneeIds, ...resolved])];
|
|
44423
|
-
parseActivityWriteRequest("createActivity", { ...Object.fromEntries(Object.entries(intent).filter(([key]) => !["space", "entities"].includes(key))), spaceId: spaceId2, entityIds, assigneeIds });
|
|
44479
|
+
parseActivityWriteRequest("createActivity", { ...Object.fromEntries(Object.entries(intent).filter(([key]) => !["space", "entities", "entitySpaceGrantFingerprint"].includes(key))), spaceId: spaceId2, entityIds, assigneeIds });
|
|
44424
44480
|
const activityId2 = fields4 !== void 0 ? await progress.write("create", () => this.client().activityWrite("createActivity", { spaceId: spaceId2, entityIds, type: "task", title: intent.title, content: intent.content, deadline, fields: fields4, tags: intent.tags, assigneeIds, sourceCreatedAt, autoLinkPersonalSpace: intent.autoLinkPersonalSpace }), fieldCreateReceipt, "activityId") : await progress.write("create", () => caller.mutation(activitiesCreate2, {
|
|
44425
44481
|
entityId: entityIds[0],
|
|
44426
44482
|
additionalEntities: entityIds.slice(1),
|
|
44427
44483
|
ownerSpaceId: spaceId2,
|
|
44428
44484
|
grantMissingEntityAccess: this.autoLink,
|
|
44485
|
+
...this.entitySpaceGrantFingerprint !== void 0 ? { entitySpaceGrantFingerprint: this.entitySpaceGrantFingerprint } : {},
|
|
44429
44486
|
type: "task",
|
|
44430
44487
|
title: this.title,
|
|
44431
44488
|
...deadline !== void 0 ? { deadline } : {},
|
|
@@ -45580,6 +45637,12 @@ var ListCreate = class extends ProfileCommand {
|
|
|
45580
45637
|
description: `Topic icon from the web icon picker: ${entityCustomIconIds.join(", ")}`
|
|
45581
45638
|
});
|
|
45582
45639
|
pin = options_exports.Array("--pin", { description: "Pin the list under parent entities (resolved by name)" });
|
|
45640
|
+
shareParents = options_exports.Boolean("--share-parents", false, {
|
|
45641
|
+
description: "Share pinned parents and ancestors into the list's space when required (agent keys: only into spaces where you are the sole member)"
|
|
45642
|
+
});
|
|
45643
|
+
parentSpaceGrantFingerprint = options_exports.String("--parent-space-grant-fingerprint", {
|
|
45644
|
+
description: "Exact grantFingerprint returned by the confirmation-required error"
|
|
45645
|
+
});
|
|
45583
45646
|
async run() {
|
|
45584
45647
|
if (this.type !== "topic" && this.type !== "project") {
|
|
45585
45648
|
throw new Error(`--type must be 'topic' or 'project' (got '${this.type}').`);
|
|
@@ -45612,7 +45675,10 @@ var ListCreate = class extends ProfileCommand {
|
|
|
45612
45675
|
const args = parseDatabaseProtocolInput("entities:setCustomIcon", databaseConfigurationContracts.setCustomIcon.args, { id: entityId3, icon: icon2 });
|
|
45613
45676
|
await progress.write("icon", () => databaseWrite(() => caller.mutation(setCustomIcon, args)), (raw) => parseOperationResult("entities:setCustomIcon", databaseConfigurationContracts.setCustomIcon.result, raw));
|
|
45614
45677
|
}
|
|
45615
|
-
const pins2 = await progress.observe("pins", () => pinToTargets(caller, entityId3, this.pin ?? []
|
|
45678
|
+
const pins2 = await progress.observe("pins", () => pinToTargets(caller, entityId3, this.pin ?? [], {
|
|
45679
|
+
shareParents: this.shareParents,
|
|
45680
|
+
...this.parentSpaceGrantFingerprint ? { parentSpaceGrantFingerprint: this.parentSpaceGrantFingerprint } : {}
|
|
45681
|
+
}));
|
|
45616
45682
|
const data = { entityId: entityId3, name: this.name, type: this.type, columns, enabledTabs: DATABASE_LIST_TABS };
|
|
45617
45683
|
this.emitText(
|
|
45618
45684
|
pins2.failures.length ? {
|
|
@@ -49230,7 +49296,8 @@ Creating entities:
|
|
|
49230
49296
|
Copies shells, enabled bottom-bar tabs and their order, database columns/filters/sorts, grouping rules and calendar-sidebar preference.
|
|
49231
49297
|
Selected-child groups point to copied aggregation-enabled direct children; activities are excluded (maximum 100 entities).
|
|
49232
49298
|
ente entity create "Jane Doe" --type person --pin "Acme Corp" --alias "JD"
|
|
49233
|
-
#
|
|
49299
|
+
# Parent not yet in the new entity's space: --share-parents + fingerprint if you are
|
|
49300
|
+
# that space's only member; otherwise a person shares it in the app.
|
|
49234
49301
|
|
|
49235
49302
|
\u26A0 ALWAYS search before creating:
|
|
49236
49303
|
ente search "Jane Doe"
|
|
@@ -49251,8 +49318,10 @@ Pins (relationships):
|
|
|
49251
49318
|
# optional role; displays as Acme Corp \xB7 student
|
|
49252
49319
|
|
|
49253
49320
|
If the parent is missing from a space of the child, the command fails and lists the
|
|
49254
|
-
grants (parent -> space).
|
|
49255
|
-
parent
|
|
49321
|
+
grants (parent -> space). If every such space has you as its only member, retry with
|
|
49322
|
+
--share-parents --parent-space-grant-fingerprint <grantFingerprint>. Otherwise
|
|
49323
|
+
(requiresPerson) only a person can approve, in the Ente app: open the parent,
|
|
49324
|
+
"Add child" -> "Add existing", pick the child, confirm "Share and continue".
|
|
49256
49325
|
|
|
49257
49326
|
Pins are structural, not generic related-to links. When a durable direct
|
|
49258
49327
|
parent is known, pin the child to that parent (for example person -> org or
|
|
@@ -49266,7 +49335,7 @@ Attributes:
|
|
|
49266
49335
|
Archiving (trash):
|
|
49267
49336
|
ente entity archive "Old Project" # move to trash (soft delete)
|
|
49268
49337
|
ente entity list --archived # list trashed entities
|
|
49269
|
-
ente entity restore <entity-id>
|
|
49338
|
+
ente entity restore <entity-id> [--share-parents] # restore from trash`
|
|
49270
49339
|
},
|
|
49271
49340
|
tasks: {
|
|
49272
49341
|
title: "Tasks \u2014 Deadlines, Assignments",
|
|
@@ -49418,24 +49487,26 @@ Relationships are spaceless:
|
|
|
49418
49487
|
A parent relationship is visible when your key can access both entities,
|
|
49419
49488
|
even through different spaces. Every active parent and ancestor must also belong to
|
|
49420
49489
|
every space of its active children. Pinning or sharing that would add a parent to
|
|
49421
|
-
another space fails with the grant list
|
|
49422
|
-
|
|
49490
|
+
another space fails with the grant list. An agent key confirms it (--share-parents
|
|
49491
|
+
with the fingerprint) only when each target space has you as its sole member;
|
|
49492
|
+
otherwise a person approves it in the Ente app. A parent cannot leave a space
|
|
49423
49493
|
while an active child remains there. An entity also cannot leave a space while
|
|
49424
49494
|
it owns activities there. Use --remove-from-activities to remove those links in
|
|
49425
49495
|
one operation when every affected activity has another owner.
|
|
49426
49496
|
|
|
49427
49497
|
Cross-space activity linking \u2014 BOUNDED:
|
|
49428
49498
|
An activity can only link entities that are already in its target space.
|
|
49429
|
-
A failed write lists the missing entities
|
|
49430
|
-
|
|
49499
|
+
A failed write lists the missing entities and the grant fingerprint. If the space
|
|
49500
|
+
has you as its sole member, retry with --auto-link --entity-space-grant-fingerprint
|
|
49501
|
+
<token>; otherwise a person shares the entities in the Ente app.
|
|
49431
49502
|
|
|
49432
49503
|
Merging duplicates \u2014 UI ONLY:
|
|
49433
49504
|
The external API has no merge endpoint. To merge two entities, do it in the web
|
|
49434
49505
|
UI. \`entity rename\` lets you fix the surviving entity's display name afterward.
|
|
49435
49506
|
|
|
49436
49507
|
Adding an entity to a shared space \u2014 UI ONLY:
|
|
49437
|
-
|
|
49438
|
-
|
|
49508
|
+
An agent key adds an existing entity only to a space whose sole member is you
|
|
49509
|
+
(entity add-to-space). A space with other members needs a person in the web UI.`
|
|
49439
49510
|
}
|
|
49440
49511
|
};
|
|
49441
49512
|
var TOPIC_NAMES = Object.keys(TOPICS);
|