ente-cli 0.4.72 → 0.4.73
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/SKILL.md +8 -0
- package/dist/cli.mjs +39 -3
- package/dist/cli.mjs.map +3 -3
- package/package.json +1 -1
package/dist/SKILL.md
CHANGED
|
@@ -157,6 +157,8 @@ ente query "QM system export" [--space <name>] [--entity <name>] [--since <epoch
|
|
|
157
157
|
# Entities
|
|
158
158
|
ente entity list [--query <text>] [--type person|org|project|topic|place|object] [--space <name>] [--limit 50] [--archived] [--json]
|
|
159
159
|
ente entity create "Jane Doe" --type person [--pin "Acme Corp"] [--share-parents --parent-space-grant-fingerprint <token>] [--alias "JD"] [--attr email=jane@acme.com] [--tag vip] [--description "CTO at Acme"] [--json]
|
|
160
|
+
ente entity create "Leistungsphase 1" --type topic --space "Studio" --parent "Building A" --exclusive-parent [--json]
|
|
161
|
+
ente entity duplicate <name-or-id> --space <space> [--name "New project"] [--include-exclusive-children] [--json]
|
|
160
162
|
ente entity get "Jane Doe" [--json]
|
|
161
163
|
ente entity update "Jane Doe" [--name "Jane A. Doe"] [--alias-add "Jane"] [--alias-remove "JD"] [--attr role=CEO] [--tag vip] [--description "…"] [--json]
|
|
162
164
|
ente entity rename "Lorey Georg" "Georg Lorey" # change display name
|
|
@@ -523,6 +525,12 @@ Optional schedules accept `intervalHours: 1 | 24` and
|
|
|
523
525
|
Published threads are native, durable, read-only activities. Their messages
|
|
524
526
|
appear individually in the timeline; graph content reads include bounded email
|
|
525
527
|
blocks. Use existing activity controls to correct thread space/owners.
|
|
528
|
+
## Entity creation and duplication
|
|
529
|
+
|
|
530
|
+
Entity duplication copies the type, name, description, email addresses and icon into the selected source space. It never copies activities or existing parents. `--include-exclusive-children` recursively recreates exclusive branches already in that space with exact child names, order and aggregation settings. Shared and archived children are excluded. The operation fails atomically above 100 entities including the root. Use parent context or an ID to distinguish same-named phases across projects.
|
|
531
|
+
|
|
532
|
+
`entity create --parent` atomically creates and attaches a child. Add `--exclusive-parent` to restrict it to that parent. The parent must already belong to the destination space; this path never shares it or its ancestors. Resolve same-named phases by parent context or ID. Do not combine `--parent` with `--pin`; `--pin` retains the older separate-link behavior.
|
|
533
|
+
|
|
526
534
|
## Reviewed space changes
|
|
527
535
|
|
|
528
536
|
`ente space change COMMAND --json` supports `prepare`, `status`, `items`,
|
package/dist/cli.mjs
CHANGED
|
@@ -3800,7 +3800,7 @@ async function runCli(cli2, argv, context) {
|
|
|
3800
3800
|
}
|
|
3801
3801
|
|
|
3802
3802
|
// ente/version.ts
|
|
3803
|
-
var VERSION = "0.4.
|
|
3803
|
+
var VERSION = "0.4.73";
|
|
3804
3804
|
|
|
3805
3805
|
// ente/branding.ts
|
|
3806
3806
|
var NPM_REGISTRY = "https://registry.npmjs.org";
|
|
@@ -11251,6 +11251,10 @@ var AuthProfiles = class extends BaseCommand {
|
|
|
11251
11251
|
};
|
|
11252
11252
|
var AUTH_COMMANDS = [AuthLogin, AuthPair, AuthStatus, AuthLogout, AuthProfiles];
|
|
11253
11253
|
|
|
11254
|
+
// ../packages/shared/src/entity-duplication.ts
|
|
11255
|
+
var MAX_DUPLICATED_ENTITIES = 100;
|
|
11256
|
+
var ENTITY_DUPLICATION_DESCRIPTION = `Duplicate an entity shell in a selected space it already belongs to. Copies type, name, description, email addresses and icon, without activities or existing parent links. Optionally recreates exclusive child branches in that same space with exact child names, order and aggregation settings. Shared and archived children are excluded. At most ${MAX_DUPLICATED_ENTITIES} entities including the root; oversized copies fail atomically.`;
|
|
11257
|
+
|
|
11254
11258
|
// ../packages/shared/src/entity-types.ts
|
|
11255
11259
|
var ENTITY_TYPE_VALUES = [
|
|
11256
11260
|
"person",
|
|
@@ -11733,6 +11737,7 @@ var PinsList = class extends ProfileCommand {
|
|
|
11733
11737
|
var PINS_COMMANDS = [PinsList];
|
|
11734
11738
|
|
|
11735
11739
|
// ente/commands/entity.ts
|
|
11740
|
+
var entitiesDuplicate = makeFunctionReference("entities:duplicate");
|
|
11736
11741
|
var entitiesCreate = makeFunctionReference("entities:create");
|
|
11737
11742
|
var entitiesFindById = makeFunctionReference(
|
|
11738
11743
|
"entities:findById"
|
|
@@ -11787,6 +11792,26 @@ function toActivityView(rich) {
|
|
|
11787
11792
|
shortId: rich.shortId
|
|
11788
11793
|
};
|
|
11789
11794
|
}
|
|
11795
|
+
var EntityDuplicate = class extends ProfileCommand {
|
|
11796
|
+
static paths = [["entity", "duplicate"]];
|
|
11797
|
+
static usage = Command.Usage({ category: "Entity", description: `Duplicate a shell without activities; optionally copy exclusive child branches (up to ${MAX_DUPLICATED_ENTITIES} entities)` });
|
|
11798
|
+
nameOrId = options_exports.String();
|
|
11799
|
+
space = options_exports.String("--space", { required: true, description: "Source and destination space (name or ID)" });
|
|
11800
|
+
name = options_exports.String("--name", { description: "Root copy name; children keep their exact names" });
|
|
11801
|
+
includeExclusiveChildren = options_exports.Boolean("--include-exclusive-children", false, { description: "Copy nested exclusive children in the selected space" });
|
|
11802
|
+
async run() {
|
|
11803
|
+
const caller = await resolveCaller();
|
|
11804
|
+
const entityId = await resolveEntityC(caller, this.nameOrId);
|
|
11805
|
+
const spaceId = await resolveSpaceByNameC(caller, this.space);
|
|
11806
|
+
const data = await caller.mutation(entitiesDuplicate, {
|
|
11807
|
+
entityId,
|
|
11808
|
+
spaceId,
|
|
11809
|
+
name: this.name,
|
|
11810
|
+
includeExclusiveChildren: this.includeExclusiveChildren
|
|
11811
|
+
});
|
|
11812
|
+
this.emitText({ data }, () => `Duplicated ${data.duplicatedCount} entities (${data.entityId})`);
|
|
11813
|
+
}
|
|
11814
|
+
};
|
|
11790
11815
|
var EntityList = class extends ClientCommand {
|
|
11791
11816
|
static paths = [["entity", "list"]];
|
|
11792
11817
|
static usage = Command.Usage({ category: "Entity", description: "List or search entities" });
|
|
@@ -11813,6 +11838,8 @@ var EntityCreate = class extends ProfileCommand {
|
|
|
11813
11838
|
name = options_exports.String();
|
|
11814
11839
|
type = options_exports.String("--type", { required: true, description: `Entity type (${ENTITY_TYPE_VALUES.join(", ")})` });
|
|
11815
11840
|
space = options_exports.String("--space", { required: true, description: "Space to create in (name or ID)" });
|
|
11841
|
+
parent = options_exports.String("--parent", { description: "Create and attach to this parent atomically (name or ID)" });
|
|
11842
|
+
exclusiveParent = options_exports.Boolean("--exclusive-parent", false, { description: "Restrict the new child to --parent" });
|
|
11816
11843
|
pin = options_exports.Array("--pin", { description: "Pin to other entities (resolved by name)" });
|
|
11817
11844
|
shareParents = options_exports.Boolean("--share-parents", false, {
|
|
11818
11845
|
description: "Share pinned parents and ancestors into this entity's space when required"
|
|
@@ -11827,11 +11854,15 @@ var EntityCreate = class extends ProfileCommand {
|
|
|
11827
11854
|
async run() {
|
|
11828
11855
|
const caller = await resolveCaller();
|
|
11829
11856
|
const spaceId = await resolveSpaceByNameC(caller, this.space);
|
|
11857
|
+
if (this.exclusiveParent && !this.parent) throw new Error("--exclusive-parent requires --parent.");
|
|
11858
|
+
if (this.parent && this.pin?.length) throw new Error("Use --parent for atomic child creation, or --pin for legacy parent linking, not both.");
|
|
11859
|
+
const parentEntityId = this.parent ? await resolveEntityC(caller, this.parent) : void 0;
|
|
11830
11860
|
const attributes = parseAttrs(this.attr);
|
|
11831
11861
|
const entityId = await caller.mutation(entitiesCreate, {
|
|
11832
11862
|
spaceId,
|
|
11833
11863
|
name: this.name,
|
|
11834
|
-
type: this.type
|
|
11864
|
+
type: this.type,
|
|
11865
|
+
...parentEntityId ? { parentEntityId, exclusiveParent: this.exclusiveParent } : {}
|
|
11835
11866
|
});
|
|
11836
11867
|
if (this.alias) for (const a of this.alias) await caller.mutation(entitiesAddAlias, { id: entityId, alias: a });
|
|
11837
11868
|
if (this.tag) for (const t of this.tag) await caller.mutation(entitiesAddTag, { id: entityId, tag: t });
|
|
@@ -12277,6 +12308,7 @@ var ENTITY_COMMANDS = [
|
|
|
12277
12308
|
EntityShowCorrection,
|
|
12278
12309
|
EntityList,
|
|
12279
12310
|
EntityCreate,
|
|
12311
|
+
EntityDuplicate,
|
|
12280
12312
|
EntityGet,
|
|
12281
12313
|
EntityUpdate,
|
|
12282
12314
|
EntityRename,
|
|
@@ -15995,7 +16027,7 @@ Commands:
|
|
|
15995
16027
|
ente search <query> Fuzzy search entities
|
|
15996
16028
|
ente ask <question> Natural-language answer (AI synthesis + citations)
|
|
15997
16029
|
ente query <question> Deterministic evidence retrieval (no synthesis)
|
|
15998
|
-
ente entity create|get|update|rename|archive|restore|pin|unpin
|
|
16030
|
+
ente entity create|get|update|duplicate|rename|archive|restore|pin|unpin
|
|
15999
16031
|
ente entity list [--archived]
|
|
16000
16032
|
ente pins list <entity> List pins for an entity
|
|
16001
16033
|
ente task list|get|create|update|done|assign|unassign|set-assignees|clear-assignees
|
|
@@ -16026,6 +16058,10 @@ Run \`ente guide <topic>\` for deep dives: entities, tasks, activities, search,
|
|
|
16026
16058
|
Create an entity when its identity or relationships will be useful later.
|
|
16027
16059
|
|
|
16028
16060
|
Creating entities:
|
|
16061
|
+
ente entity create "Leistungsphase 1" --type topic --space "Studio" --parent "Building A" --exclusive-parent
|
|
16062
|
+
Creates and attaches an exclusive child atomically; the parent must already be in that space.
|
|
16063
|
+
ente entity duplicate "Building A" --space "Studio" --name "Building B" --include-exclusive-children
|
|
16064
|
+
Copies shells and exclusive child branches without activities (maximum 100 entities).
|
|
16029
16065
|
ente entity create "Jane Doe" --type person --pin "Acme Corp" --alias "JD"
|
|
16030
16066
|
# Add --share-parents when the parent is not already in the new entity's space.
|
|
16031
16067
|
|