ente-cli 0.4.124 → 0.4.126
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 +42 -7
- package/dist/SKILL.md +19 -0
- package/dist/cli.mjs +1226 -686
- package/dist/cli.mjs.map +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,17 +5,50 @@ relationship manager and knowledge graph (people, orgs, projects, topics, places
|
|
|
5
5
|
notes/calls/tasks/conversations logged against them).
|
|
6
6
|
|
|
7
7
|
TypeScript, built on [clipanion](https://clipanion.dev/), bundled with esbuild
|
|
8
|
-
into a single self-contained file, published to npm
|
|
8
|
+
into a single self-contained file, published to npm. It talks
|
|
9
9
|
to ente's external REST API (`/api/external/*`) with a static Bearer API key.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm i -g ente-cli
|
|
15
|
-
# Ivo's registry remains available with the same package and version:
|
|
16
|
-
npm i -g ente-cli --registry https://gitea.i.ivo-zilkenat.de/api/packages/ivo.zilkenat/npm
|
|
14
|
+
npm i -g ente-cli --registry https://registry.npmjs.org
|
|
17
15
|
```
|
|
18
16
|
|
|
17
|
+
## Update
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
ente update # npm i -g ente-cli@latest --registry https://registry.npmjs.org
|
|
21
|
+
ente update --dry-run # print the install command only
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`ente update` always passes the npm registry explicitly, so an `.npmrc` that
|
|
25
|
+
points elsewhere cannot redirect it.
|
|
26
|
+
|
|
27
|
+
### Moving from Ivo's Gitea registry
|
|
28
|
+
|
|
29
|
+
CLIs installed from Ivo's Gitea registry move to npm with `ente update`. The CLI
|
|
30
|
+
recognises such an install offline (from npm's local cache index) and, in an
|
|
31
|
+
interactive terminal, asks once a day before a command: "Move to npm now?
|
|
32
|
+
[Y/n]". Yes runs the same install and then continues with the command. Scripts,
|
|
33
|
+
agents, CI and `--json` runs are never asked and never self-install; they get a
|
|
34
|
+
once-a-day stderr notice instead. `ENTE_CLI_NO_UPDATE_PROMPT=1` turns the
|
|
35
|
+
question into that notice. If your `~/.npmrc` sets `registry=` to Gitea, a plain
|
|
36
|
+
`npm i -g ente-cli` would still use Gitea; `ente update` says so and shows how
|
|
37
|
+
to remove the line (`npm config delete registry`). It never edits your `.npmrc`.
|
|
38
|
+
|
|
39
|
+
`ente update` and `ente --version` never contact the ente server. Once a day the
|
|
40
|
+
CLI prints an "Update available" notice to stderr (never into `--json` stdout)
|
|
41
|
+
when the npm registry has a newer release.
|
|
42
|
+
|
|
43
|
+
Every request identifies the CLI with `X-Ente-CLI-Version` and
|
|
44
|
+
`X-Ente-CLI-Compatibility`. When the server no longer supports the installed
|
|
45
|
+
CLI it answers HTTP 426 with error code `CLI_UPGRADE_REQUIRED`; the CLI prints
|
|
46
|
+
one message naming the update command and exits with code **3** (`--json`
|
|
47
|
+
prints a JSON `error` object on stdout). Run `ente update`, then retry. CLIs
|
|
48
|
+
released before this gate (0.4.124 and older) cannot exchange their key at
|
|
49
|
+
`/cli/token` any more; update them with
|
|
50
|
+
`npm i -g ente-cli --registry https://registry.npmjs.org`.
|
|
51
|
+
|
|
19
52
|
## Setup
|
|
20
53
|
|
|
21
54
|
Connect a normal CLI profile with browser approval. Replace the site URL and
|
|
@@ -152,6 +185,7 @@ ente agenda create-point --activity <activityId> --title "Decisions" --content="
|
|
|
152
185
|
ente agenda link-task --point <agendaPointId> --task "#12"
|
|
153
186
|
# Agendas work on every activity type; --meeting remains an alias for --activity.
|
|
154
187
|
ente activity message add <activityId> --content "Decision: ship the smaller scope first."
|
|
188
|
+
ente activity message delete <messageId> --json # only a message you (or, for an agent key, this agent) authored
|
|
155
189
|
ente activity content read <activityId> --json
|
|
156
190
|
ente activity content edit <activityId> --expected-version 42 --operations-file edits.json --json
|
|
157
191
|
ente canvas boards <entityId>
|
|
@@ -186,7 +220,7 @@ Every command supports `--json`. Run `ente --help` or `ente <group> --help`.
|
|
|
186
220
|
|---|---|
|
|
187
221
|
| `auth` | `pair`, `login`, `status`, `whoami`, `logout`, `profiles`, `bind`, `unbind`, `bindings` |
|
|
188
222
|
| `entity` | `list`, `create`, `get`, `update` (`--name`, `--tag`, `--description`), `rename`, `archive`, `restore` (`--share-parents` plus the returned grant fingerprint), `pin` (`--role`, optional confirmed parent grants), `unpin`, `add-to-space`, `remove-from-space` (`--remove-from-activities` optional) |
|
|
189
|
-
| `activity` | `list`, `create`, `search`, `get`, `transcript` (`--grep`, `--context`), `update`, `delete`, `restore`, `message add`, `attachment upload` |
|
|
223
|
+
| `activity` | `list`, `create`, `search`, `get`, `transcript` (`--grep`, `--context`), `update`, `delete`, `restore`, `message add`, `message delete`, `attachment upload` |
|
|
190
224
|
| `agenda` | `create-point`, `link-task` |
|
|
191
225
|
| `task` | `list`, `get`, `create`, `update`, `done`, `assign`, `unassign`, `set-assignees`, `clear-assignees` |
|
|
192
226
|
| `list` | `create` (`--column`, `--pin`), `add` (`--key` upsert), `update` (`--attr`, `--title`), `import` (JSONL upsert by `--key`, `--dry-run`), `show` (`--all`, `--cursor`, `--where`, `--view`), `column add`, `column remove` |
|
|
@@ -359,8 +393,9 @@ CLI without installing dependencies.
|
|
|
359
393
|
|
|
360
394
|
Publishing is automatic: a push to `main` touching `cli/**` or the publish
|
|
361
395
|
workflow selects a version above both registries, tests and packs once, then
|
|
362
|
-
publishes identical bytes to npm and
|
|
363
|
-
|
|
396
|
+
publishes identical bytes to npm and, while remaining Gitea installs migrate,
|
|
397
|
+
to Ivo's Gitea registry. npm uses GitHub OIDC; Gitea keeps the existing package
|
|
398
|
+
token. Install and update instructions name npm only. See `.github/workflows/publish-cli.yml` and
|
|
364
399
|
`docs/cli-architecture.md` for setup and retry instructions.
|
|
365
400
|
|
|
366
401
|
## Architecture
|
package/dist/SKILL.md
CHANGED
|
@@ -114,8 +114,16 @@ Verify server access with `ente entity list --limit 1 --json`.
|
|
|
114
114
|
Install / upgrade the CLI from npm:
|
|
115
115
|
```bash
|
|
116
116
|
npm i -g ente-cli --registry https://registry.npmjs.org
|
|
117
|
+
ente update # newer CLIs: the same global install, always from npm
|
|
117
118
|
```
|
|
118
119
|
|
|
120
|
+
A CLI installed from Ivo's legacy Gitea registry moves to npm with `ente update`.
|
|
121
|
+
Interactive terminals are asked once a day; agent and `--json` runs only see a
|
|
122
|
+
stderr notice and are never changed underneath you.
|
|
123
|
+
|
|
124
|
+
Exit code 3 with error code `CLI_UPGRADE_REQUIRED` means the server no longer
|
|
125
|
+
supports this CLI: run `ente update` (or the npm command above), then retry.
|
|
126
|
+
|
|
119
127
|
---
|
|
120
128
|
|
|
121
129
|
## Important Notes
|
|
@@ -227,6 +235,7 @@ ente activity update <activityId> [--title "…"] [--content "…"] [--deadline
|
|
|
227
235
|
ente activity content read <activityId> [--cursor <cursor> --expected-version <version>] [--max-blocks 20] [--max-characters 12000] [--json]
|
|
228
236
|
ente activity content edit <activityId> --expected-version <version> --operations-file ./operations.json [--json]
|
|
229
237
|
ente activity message add <activityId> (--content "…" | --content-file ./update.md) [--json]
|
|
238
|
+
ente activity message delete <messageId> [--json] # permanent; an agent key deletes only its own agent's messages
|
|
230
239
|
ente activity attachment upload <activityId> ./file.pdf [--name "Contract.pdf"] [--json]
|
|
231
240
|
ente activity delete <activityId> [--json]
|
|
232
241
|
ente activity restore <activityId> [--json]
|
|
@@ -992,6 +1001,16 @@ Entity exact-value lookup: `ente entity list --field "External ID=Case=ID"`. The
|
|
|
992
1001
|
|
|
993
1002
|
Activity field lookup uses the server index: `ente activity list --type task --field "t3_thread=t3code://threads/<env>/<id>" --profile ente-operator`. For the credential's own agent queue, use `ente agent tasks list --field "t3_thread=t3code://threads/<env>/<id>" --profile ente-operator`. `--attr` is an alias for `--field` on these two commands. Repeat the option for AND matching (at most ten filters). The first `=` separates label and value, preserving subsequent equals signs. Activity list also accepts `--space` and `--entity` to narrow the indexed result. History cursors and `--min-count` cannot be combined with a field lookup.
|
|
994
1003
|
|
|
1004
|
+
Activity writes accept `fields: [{label | fieldId, type?, value}]` through REST/MCP and `task sync createActivity|updateActivity`. Exactly one selector is required. `value: null` removes; number/boolean use typed JSON values, multi-select accepts string arrays, JSON uses serialized JSON strings. Existing types cannot be changed by a value write; unknown labels and select options follow writer rules. Do not address one field in both `attributes` and `fields`, or repeat selectors. Writes preserve original legacy key spelling and existing delegation/idempotency rules. Typed writes require first verified readiness; later re-verification only closes indexed reads. Invalid typed fields use `ACTIVITY_FIELD_VALUE_INVALID` (`INVALID_INPUT`), caps use `ACTIVITY_FIELD_LIMIT_EXCEEDED`. Serialized JSON `null` and blank JSON strings reject explicitly because compatibility storage cannot retain them; transport `null` clears.
|
|
1005
|
+
|
|
1006
|
+
```sh
|
|
1007
|
+
ente activity update <id> --field '{"label":"estimate","type":"number","value":3}' --profile ente-operator --json
|
|
1008
|
+
ente task update <id> --field '{"fieldId":"<field-id>","value":null}' --profile ente-operator --json
|
|
1009
|
+
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
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
Write `--field` takes repeatable JSON objects; list `--field` still takes `label=value`. 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-migration.md` for caps and examples.
|
|
1013
|
+
|
|
995
1014
|
Activity definitions are shared across a space. Writers create definitions implicitly through the compatibility `attributes` write. Before first verified readiness, legacy attributes retain their existing write behavior; incompatible provisional projections defer and keep lookup closed. After first readiness, existing definitions validate subsequent values, including during later re-verification. Invalid typed writes reject atomically with `ACTIVITY_FIELD_VALUE_INVALID` (`FAILED_PRECONDITION`); vocabulary/byte caps use `ACTIVITY_FIELD_LIMIT_EXCEEDED` (`LIMIT_EXCEEDED`). Empty or whitespace-only strings clear a canonical value while preserving the legacy cell. A string in a multi-select field is one literal selection, never delimiter-split, and adds its option implicitly within existing limits. Unknown single-select values also add an option implicitly for every writer within the same limits. This does not create a Kanban column. Renaming, merging and removing options remain manager-only. Case/separator aliases share a definition; the compatibility attributes view retains the original stored key spelling. Historical select options remain valid even if the current board omits them. See `docs/activity-fields-migration.md` for the bounds and bridge procedure. Types include text, JSON, email, phone, URL, date, postal-address, salutation, job-title, number, boolean, single-select and multi-select. Text and JSON match the stored string exactly, including case and whitespace. All other types match their normalized value; `Foo@X.com` finds `foo@x.com`. JSON lookup values use serialized JSON, so a JSON string is written as `"value"`.
|
|
996
1015
|
|
|
997
1016
|
REST `GET /api/external/activities` and `/api/external/tasks` accept URL-encoded JSON `field={"label":"t3_thread","value":"Case=ID"}`, or an array for AND. MCP `listActivities`/`activities_list`, `listTasks`/`tasks_list`, and `agent_tasks` (`operation: "list"`) use the same field shape. List/get results include `fields` (value ID, definition ID, label, type and stored string) once verification completes. `fieldIndexReady: false` withholds this array before verification. Indexed lookups fail with `ACTIVITY_FIELD_INDEX_NOT_READY` until the deployment's backfill is verified; do not replace this failure with a client scan. Candidate and output budgets fail explicitly instead of returning an incomplete field result. Legacy `attributes` remains the read/write compatibility view through phase 4.
|