authoring-cli 0.1.31 → 0.1.33
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 +14 -10
- package/README.md +21 -11
- package/dist/index.js +24 -24
- package/package.json +1 -1
- package/skills/authoring-cli/SKILL.md +29 -18
package/package.json
CHANGED
|
@@ -31,20 +31,31 @@ of truth over anything below; commands and flags get added over time and this fi
|
|
|
31
31
|
authoring-cli
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
Every action needs task context,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
Every action needs task context, and the session must name it — there is **no shared "current
|
|
35
|
+
task"**. The login (cookie) in `<current working directory>/.authoring-cli/session.json` is shared
|
|
36
|
+
by everything run from that directory (`$AUTHORING_CLI_HOME` forces another location), so a task
|
|
37
|
+
selection stored there could be changed under a half-finished batch by any other session working
|
|
38
|
+
in the same directory. Selection therefore lives only in one of these:
|
|
39
|
+
|
|
40
|
+
- an explicit `--project <key> --task <key>` pair on the call — targets that task for that call only;
|
|
41
|
+
- a **context** — `--context <name>` on any command (or `AUTHORING_CLI_CONTEXT=<name>`). Run
|
|
42
|
+
`authoring-cli select-task --context 1069 --project <key> --task <key>` once, and every command
|
|
43
|
+
with `--context 1069` targets that task when `--project`/`--task` are omitted. Each context has its
|
|
44
|
+
own file, so `select-task` in one context can never move another's. Name a context after the task;
|
|
45
|
+
`authoring-cli contexts` lists them and flags a task held by two (their writes still contend for
|
|
46
|
+
the branch lock);
|
|
47
|
+
- a **pin** — `AUTHORING_CLI_TASK=<TASK-KEY>` in the process environment (project is derived from
|
|
48
|
+
the key, or set `AUTHORING_CLI_PROJECT`). Nothing on disk, so nothing can move it, and a command
|
|
49
|
+
given a different `--task` is refused, as is `select-task` on another task. Use it for batches.
|
|
50
|
+
|
|
51
|
+
With none of these, task-targeting commands fail and `select-task` refuses, rather than guessing —
|
|
52
|
+
an old selection left in `session.json` is ignored. In a batch script, pin the task (or pass
|
|
53
|
+
`--project`/`--task` on every call) and don't rely on `select-task`/`current-task` between calls.
|
|
54
|
+
|
|
55
|
+
`authoring-cli current-task` prints the task and whether it came from a pin or a context. Run it to
|
|
56
|
+
confirm what the CLI will target before committing to a sequence of edits. `authoring-cli projects`
|
|
57
|
+
and `authoring-cli tasks` list what's available to pick from; a session with no valid cookie needs
|
|
58
|
+
`authoring-cli login [production|uat|dev]` first.
|
|
48
59
|
|
|
49
60
|
**Every mutating command (concept/description/relationship/axiom create/update/delete and
|
|
50
61
|
`classify`) checks that the signed-in user is the task's Author — its assignee — before doing
|
|
@@ -89,8 +100,8 @@ rather than trusting the batch run's exit status alone. See `references/batch-au
|
|
|
89
100
|
"Driving a batch of mutating calls" for the fuller reasoning, including why a subagent's
|
|
90
101
|
self-reported summary isn't ground truth either.
|
|
91
102
|
|
|
92
|
-
The `--project`/`--task` flags are shown on the examples below for explicitness.
|
|
93
|
-
|
|
103
|
+
The `--project`/`--task` flags are shown on the examples below for explicitness. In a context or
|
|
104
|
+
pinned session you can omit them everywhere.
|
|
94
105
|
|
|
95
106
|
### Starting a new task
|
|
96
107
|
|
|
@@ -100,8 +111,8 @@ authoring-cli create-task --project <projectKey> --summary "<title>" [--descript
|
|
|
100
111
|
|
|
101
112
|
The server mints the task key — you don't supply it. It also returns the task's branch path, but
|
|
102
113
|
does not create that branch; `create-task` and `select-task` do, so a task is workable the moment
|
|
103
|
-
either one returns. The new task is selected
|
|
104
|
-
|
|
114
|
+
either one returns. The new task is selected into the active context (so pass `--context <name>`, or `--no-select`;
|
|
115
|
+
without either it refuses before creating anything, and a pinned session always needs `--no-select`).
|
|
105
116
|
|
|
106
117
|
It is assigned to you unless you pass `--assignee <username>` or `--unassigned`. That default is
|
|
107
118
|
deliberate rather than cosmetic: authoring-services doesn't infer an assignee from the session, and
|