authoring-cli 0.1.32 → 0.1.34
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/HELP.md +17 -7
- package/README.md +17 -8
- package/dist/index.js +24 -24
- package/package.json +1 -1
- package/skills/authoring-cli/SKILL.md +32 -20
- package/skills/authoring-cli/references/batch-authoring.md +8 -0
package/HELP.md
CHANGED
|
@@ -20,9 +20,17 @@ If you already have a still-valid session stored from a previous `login` (same e
|
|
|
20
20
|
### 3. Select a Task
|
|
21
21
|
```bash
|
|
22
22
|
authoring-cli tasks --mine
|
|
23
|
-
authoring-cli select-task --project PROJ --task PROJ-123
|
|
23
|
+
authoring-cli select-task --context PROJ-123 --project PROJ --task PROJ-123
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
A context name (`--context`) is required so two sessions in the same folder can never move each other's task. Export it once per terminal so the commands below need no extra flags (or add `--context PROJ-123` to each one):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
export AUTHORING_CLI_CONTEXT=PROJ-123
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
For scripts and batches, pin the task instead: `export AUTHORING_CLI_TASK=PROJ-123` — a pinned session refuses to act on any other task.
|
|
33
|
+
|
|
26
34
|
### 4. Start Authoring
|
|
27
35
|
```bash
|
|
28
36
|
authoring-cli create-concept --fsn "Hepatic structure" --parent 64572001
|
|
@@ -125,8 +133,9 @@ authoring-cli validate-review-concepts
|
|
|
125
133
|
### Task Management
|
|
126
134
|
- `authoring-cli projects` — List available projects
|
|
127
135
|
- `authoring-cli tasks [--project PROJECT] [--mine] [--status STATUS] [--summary]` — List tasks
|
|
128
|
-
- `authoring-cli select-task --project PROJECT --task TASK` — Select a task
|
|
129
|
-
- `authoring-cli current-task` — Show
|
|
136
|
+
- `authoring-cli select-task --context NAME --project PROJECT --task TASK` — Select a task for a context
|
|
137
|
+
- `authoring-cli current-task` — Show this session's task (pin or context)
|
|
138
|
+
- `authoring-cli contexts` — List contexts and their tasks
|
|
130
139
|
- `authoring-cli create-task --project PROJECT --summary "TITLE"` — Create a task
|
|
131
140
|
- `authoring-cli recover-task --project PROJECT [--task TASK]` — Recover deleted tasks (there is no delete-task command — delete a task in the Authoring Workbench UI)
|
|
132
141
|
|
|
@@ -201,8 +210,9 @@ authoring-cli validate-review-concepts
|
|
|
201
210
|
- If your session expires during use, you'll get a `401 Unauthorized` error — run `authoring-cli login` again
|
|
202
211
|
|
|
203
212
|
### Task Selection
|
|
204
|
-
-
|
|
205
|
-
-
|
|
213
|
+
- Every session must name its task: pass `--context <name>` (after `select-task --context <name> ...`), pin it with `AUTHORING_CLI_TASK=<TASK-KEY>`, or pass `--project`/`--task` on each command. There is no shared "last selected task" — it could be changed by another session in the same folder
|
|
214
|
+
- A pinned session refuses a different `--task` or a `select-task` on another task
|
|
215
|
+
- Use `authoring-cli current-task` to see what's targeted and `authoring-cli contexts` to see every context
|
|
206
216
|
- Selecting a task creates its branch if it doesn't exist yet
|
|
207
217
|
|
|
208
218
|
### Validation & Classification
|
|
@@ -238,7 +248,7 @@ authoring-cli validate-review-concepts
|
|
|
238
248
|
## Best Practices
|
|
239
249
|
|
|
240
250
|
### Before Starting
|
|
241
|
-
1. Run `authoring-cli login` and select your task
|
|
251
|
+
1. Run `authoring-cli login` and select your task into a context (`select-task --context <name> ...`)
|
|
242
252
|
2. Check the task status and any existing concepts: `authoring-cli get-concepts-for-review`
|
|
243
253
|
3. Review project-specific metadata: `authoring-cli projects --json`
|
|
244
254
|
|
|
@@ -321,4 +331,4 @@ A: Run commands in sequence, using `--json` output to parse results. The authori
|
|
|
321
331
|
A: Run `authoring-cli login` again to get a fresh session.
|
|
322
332
|
|
|
323
333
|
**Q: Can I target multiple projects at once?**
|
|
324
|
-
A:
|
|
334
|
+
A: Each session works on one task, but you can have several open in the same folder: give each its own context (`select-task --context PROJ2-456 --project PROJ2 --task PROJ2-456`) and add `--context PROJ2-456` to its commands. Selections in different contexts never interfere.
|
package/README.md
CHANGED
|
@@ -98,13 +98,20 @@ authoring-cli tasks --project PROJ # everyone's ta
|
|
|
98
98
|
authoring-cli tasks --project PROJ --mine # just yours, in PROJ
|
|
99
99
|
authoring-cli tasks --project PROJ --mine --status "In Progress" # ...and only In Progress
|
|
100
100
|
authoring-cli tasks --summary # counts by project/assignee/status
|
|
101
|
-
authoring-cli select-task --project PROJ --task PROJ-123
|
|
102
|
-
authoring-cli current-task
|
|
101
|
+
authoring-cli select-task --context PROJ-123 --project PROJ --task PROJ-123
|
|
102
|
+
authoring-cli current-task --context PROJ-123
|
|
103
|
+
authoring-cli contexts
|
|
103
104
|
```
|
|
104
105
|
|
|
105
106
|
`--mine` resolves "yours" server-side via authoring-services' own `my-tasks` endpoint rather than by matching names locally. Without it, `--project` lists every assignee's tasks and adds an assignee column so you can tell them apart. `--status` matches case-insensitively. `--summary` prints counts instead of one line per task, so a long list doesn't have to be tallied by eye. `projects`, `tasks` and `recover-task` all take `--json` as well.
|
|
106
107
|
|
|
107
|
-
|
|
108
|
+
**Every session must say which task it works on** — there is no workspace-wide "current task", because a selection stored in the shared session file could be changed by any other session working in the same directory, silently redirecting edits meant for one task onto another. Instead:
|
|
109
|
+
|
|
110
|
+
- `--context <name>` (or `AUTHORING_CLI_CONTEXT=<name>`) names a selection of its own. `select-task --context 1069 ...` stores the task in that context only; later commands with `--context 1069` and no `--project`/`--task` target it. Several tasks can be open in the same folder at once, each in its own context, and `select-task` in one never touches another. `authoring-cli contexts` lists them (and flags one task held by two contexts, which would contend for the branch lock); `contexts --remove <name>` deletes a stale one.
|
|
111
|
+
- `AUTHORING_CLI_TASK=<TASK-KEY>` (project derived from the key, or set `AUTHORING_CLI_PROJECT`) **pins** the process to a task with no file involved. A command given a different `--task`, or `select-task` on a different task, is refused. Best for scripts and agent batches.
|
|
112
|
+
- `--project`/`--task` on a command targets that task for that call only.
|
|
113
|
+
|
|
114
|
+
With none of these, task-targeting commands fail and `select-task`/`create-task`/`recover-task` (unless `--no-select`) refuse, rather than guess. **There is no default task:** a selection left in `session.json` by an older version is discarded when the file is read, and nothing is ever stored there. The login cookie stays shared by all contexts, and `select-task` never rewrites it.
|
|
108
115
|
|
|
109
116
|
Selecting a task also **creates its branch** if it doesn't have one yet. A task still in status `New` has no branch — that's the moment the Authoring Workbench would create it, so `select-task` does the same, and the first edit afterwards doesn't 404.
|
|
110
117
|
|
|
@@ -116,7 +123,7 @@ authoring-cli recover-task --project PROJ # list PROJ's deleted tasks
|
|
|
116
123
|
authoring-cli recover-task --project PROJ --task PROJ-123
|
|
117
124
|
```
|
|
118
125
|
|
|
119
|
-
`create-task` assigns the task to you and selects it (`--assignee`/`--unassigned`
|
|
126
|
+
`create-task` assigns the task to you and selects it into the active `--context` (`--assignee`/`--unassigned` override the assignee; without a context, or in a pinned session, pass `--no-select`).
|
|
120
127
|
|
|
121
128
|
There is no `delete-task` command: deleting the wrong task is easy to get wrong and hard to notice at the moment it matters, so that decision is left to a human in the Authoring Workbench UI rather than something scriptable here. Deleting a task there moves it to status `Deleted` but **leaves the branch and everything authored on it alone** — which is what makes `recover-task` a real undo rather than a re-creation: it takes the task back out of `Deleted` with its content intact and selects it again, regardless of whether the deletion happened in the UI or (from before this command existed) via this CLI.
|
|
122
129
|
|
|
@@ -126,9 +133,10 @@ There is no `delete-task` command: deleting the wrong task is easy to get wrong
|
|
|
126
133
|
|---|---|
|
|
127
134
|
| `projects` | List the projects available to you |
|
|
128
135
|
| `tasks` | List tasks, filtered by project/assignee/status, or summarized |
|
|
129
|
-
| `create-task` | Create a task and select it |
|
|
130
|
-
| `select-task` | Set the task
|
|
131
|
-
| `
|
|
136
|
+
| `create-task` | Create a task and select it into the active context |
|
|
137
|
+
| `select-task` | Set the task a context targets (creating its branch if needed); needs `--context` or a matching pin |
|
|
138
|
+
| `contexts` | List named contexts and the task each holds |
|
|
139
|
+
| `current-task` | Print this session's task and whether it is pinned or from a context |
|
|
132
140
|
| `recover-task` | List a project's deleted tasks, or bring one back (there is no `delete-task` — use the Authoring Workbench UI) |
|
|
133
141
|
| `create-concept` | Create a new concept |
|
|
134
142
|
| `get-concept` | Fetch a concept by ID |
|
|
@@ -164,7 +172,8 @@ Run the CLI with no arguments for the full usage text, including every flag.
|
|
|
164
172
|
|
|
165
173
|
```bash
|
|
166
174
|
authoring-cli login
|
|
167
|
-
|
|
175
|
+
export AUTHORING_CLI_CONTEXT=hepatic-synonyms # name this session's context once
|
|
176
|
+
authoring-cli create-task --project PROJ --summary "Add hepatic synonyms" # selects it into that context
|
|
168
177
|
authoring-cli get-concept --id 64572001
|
|
169
178
|
authoring-cli add-description --id 64572001 --term "Hepatic structure" --type SYNONYM
|
|
170
179
|
authoring-cli validate-review-concepts
|