authoring-cli 0.1.13 → 0.1.17
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 +5 -5
- package/README.md +13 -9
- package/dist/index.js +21 -6058
- package/package.json +1 -1
- package/skills/authoring-cli/SKILL.md +16 -18
package/HELP.md
CHANGED
|
@@ -126,8 +126,7 @@ authoring-cli validate-review-concepts
|
|
|
126
126
|
- `authoring-cli select-task --project PROJECT --task TASK` — Select a task
|
|
127
127
|
- `authoring-cli current-task` — Show currently selected task
|
|
128
128
|
- `authoring-cli create-task --project PROJECT --summary "TITLE"` — Create a task
|
|
129
|
-
- `authoring-cli
|
|
130
|
-
- `authoring-cli recover-task --project PROJECT [--task TASK]` — Recover deleted tasks
|
|
129
|
+
- `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)
|
|
131
130
|
|
|
132
131
|
### Concept Management
|
|
133
132
|
- `authoring-cli create-concept --fsn "FSN" --parent SCTID [--tag TAG] [--pt PT]` — Create concept
|
|
@@ -192,8 +191,9 @@ authoring-cli validate-review-concepts
|
|
|
192
191
|
## Tips & Troubleshooting
|
|
193
192
|
|
|
194
193
|
### Session Management
|
|
195
|
-
- Your session is stored in
|
|
196
|
-
- Set `AUTHORING_CLI_HOME` to store
|
|
194
|
+
- Your session is stored in `<current working directory>/.authoring-cli/session.json` by default — not under your home directory, so it stays confined to whichever directory/workspace you run the CLI from; `login`'s own output always names exactly where it landed
|
|
195
|
+
- Set `AUTHORING_CLI_HOME` to store it somewhere else instead — the session file is then `$AUTHORING_CLI_HOME/session.json`
|
|
196
|
+
- If the working directory isn't writable, commands fail with a clear message rather than silently storing the session somewhere else — set `AUTHORING_CLI_HOME` in that case
|
|
197
197
|
- If you have multiple Chrome profiles, specify which one: `authoring-cli login --chrome-profile "Work Profile"`
|
|
198
198
|
- If your session expires during use, you'll get a `401 Unauthorized` error — run `authoring-cli login` again
|
|
199
199
|
|
|
@@ -297,7 +297,7 @@ https://github.com/snomed/authoring-cli
|
|
|
297
297
|
## FAQ
|
|
298
298
|
|
|
299
299
|
**Q: Can I use this on Windows or Linux?**
|
|
300
|
-
A: The CLI runs on any Node.js 24+ environment
|
|
300
|
+
A: The CLI runs on any Node.js 24+ environment. Automatic session capture during login works on macOS with Chrome, and on Linux with Chromium/Chrome (including a Termux:X11 proot-distro Debian on Android — `apt install chromium sqlite3`, and open the Termux:X11 app by hand once so `login` has a display to draw its sign-in window on). On Windows and any other unsupported platform, `login` will fail with a clear message. You can manually pass endpoints and a session cookie using flags, but that's not yet implemented.
|
|
301
301
|
|
|
302
302
|
**Q: How do I use this with an AI agent?**
|
|
303
303
|
A: Install the bundled authoring skill (`authoring-cli install-skill`), then invoke `/authoring-cli` in Claude Code or Codex. The skill teaches the agent about Snowstorm constraints and SNOMED CT modeling rules.
|
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ authoring-cli login dev
|
|
|
64
64
|
|
|
65
65
|
Each environment supplies all three endpoints — IMS at the base host, the terminology server at `snowstorm/snomed-ct/` under it, authoring-services at `authoring-services/` — plus that environment's IMS session cookie name.
|
|
66
66
|
|
|
67
|
-
Opens Chrome to your organization's real IMS login page (password, SSO, Google — whatever IMS itself supports)
|
|
67
|
+
Opens Chrome to your organization's real IMS login page (password, SSO, Google — whatever IMS itself supports). After you complete login there, the session is captured automatically by watching that Chrome profile's own cookie jar for a fresh session cookie — no copy/paste, and no dependence on IMS's `serviceReferer` redirect actually reaching back to the CLI (that redirect, when it does land, only shows a friendly "you're signed in" page — it's not required for sign-in to complete). If you're already signed in to that environment in Chrome, the existing session is reused and no browser opens at all.
|
|
68
68
|
|
|
69
69
|
Login prints the endpoints it actually used and where each came from, so a forgotten flag silently falling back to a different environment is visible rather than invisible:
|
|
70
70
|
|
|
@@ -75,11 +75,15 @@ Signed in as Jane Doe. (reused an existing Chrome session — no browser opened.
|
|
|
75
75
|
Authoring services: https://authoring.ihtsdotools.org/authoring-services/ (production)
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
**Current support**: automatic session capture works on **macOS with Google Chrome**
|
|
78
|
+
**Current support**: automatic session capture works on **macOS with Google Chrome**, and on **Linux with Chromium/Chrome** — including a Termux:X11 proot-distro Debian on Android, where `login` auto-starts Termux:X11's own backend (`termux-x11 :1 &`) if nothing is already serving a display (the Termux:X11 **app** itself still needs to have been opened by hand at least once). On any other OS/browser combination, `login` fails immediately with a message naming the unsupported combination, rather than hanging or failing silently.
|
|
79
79
|
|
|
80
|
-
`logout` deletes the locally stored session
|
|
80
|
+
`logout` deletes the locally stored session. It does not sign you out of IMS in Chrome, so a subsequent `login` will reuse that browser session.
|
|
81
81
|
|
|
82
|
-
By default the session lives under
|
|
82
|
+
By default the session lives at `<current working directory>/.authoring-cli/session.json` — **not** under your home directory. `authoring-cli` is commonly driven by an AI agent whose filesystem access is confined to one workspace directory, so this means the session simply lands inside whatever workspace the caller is already scoped to, with nothing to configure and nothing touched outside it. Run it by hand from a consistent directory and you get the same persistence across commands as before; run it from a different directory and it's a fresh session there — the same way e.g. `git` keeps per-repo config alongside the repo rather than in `$HOME`. `login`'s own output always names exactly where the session file landed.
|
|
83
|
+
|
|
84
|
+
There's deliberately no automatic fallback to `~/.authoring-cli` if the working directory isn't writable — that used to be the default, but a fallback that silently reads whatever session happens to already exist under the real home directory turned out to be actively dangerous: a leftover session there (from another project, or from before this default existed) would otherwise leak into any brand-new workspace that never signed in at all, silently acting on the wrong project instead of reporting "not signed in". If the working directory genuinely isn't writable, `login`/`select-task`/etc. fail with a clear message rather than landing somewhere unexpected.
|
|
85
|
+
|
|
86
|
+
Set `AUTHORING_CLI_HOME` to force a specific location instead — e.g. a shared session across multiple directories, or an explicit path when the working directory can't be used. It takes priority over the default, and every command reads/writes the session through the same path, so setting it once (e.g. exported alongside the agent's launch environment) covers `login`, `select-task`, and everything else with no per-command flag.
|
|
83
87
|
|
|
84
88
|
Optional flags, for a deployment the named environments don't cover: `--ims-endpoint`, `--terminology-server-endpoint`, `--authoring-services-endpoint` (each overrides just that one value of the selected environment), `--cookie-name <name>` (override the IMS session cookie name), `--chrome-profile <name>` (target a specific Chrome profile by its display name or directory name if you have more than one).
|
|
85
89
|
|
|
@@ -102,16 +106,17 @@ Once a task is selected, every action command below applies to it automatically
|
|
|
102
106
|
|
|
103
107
|
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.
|
|
104
108
|
|
|
105
|
-
### Creating
|
|
109
|
+
### Creating and recovering tasks
|
|
106
110
|
|
|
107
111
|
```bash
|
|
108
112
|
authoring-cli create-task --project PROJ --summary "Model secondary disorders"
|
|
109
|
-
authoring-cli delete-task # the selected task, unless --project/--task given
|
|
110
113
|
authoring-cli recover-task --project PROJ # list PROJ's deleted tasks
|
|
111
114
|
authoring-cli recover-task --project PROJ --task PROJ-123
|
|
112
115
|
```
|
|
113
116
|
|
|
114
|
-
`create-task` assigns the task to you and selects it (`--assignee`/`--unassigned` and `--no-select` override that).
|
|
117
|
+
`create-task` assigns the task to you and selects it (`--assignee`/`--unassigned` and `--no-select` override that).
|
|
118
|
+
|
|
119
|
+
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.
|
|
115
120
|
|
|
116
121
|
## Authoring actions
|
|
117
122
|
|
|
@@ -122,8 +127,7 @@ authoring-cli recover-task --project PROJ --task PROJ-123
|
|
|
122
127
|
| `create-task` | Create a task and select it |
|
|
123
128
|
| `select-task` | Set the task later commands target (creating its branch if needed) |
|
|
124
129
|
| `current-task` | Print the locally selected task |
|
|
125
|
-
| `
|
|
126
|
-
| `recover-task` | List a project's deleted tasks, or bring one back |
|
|
130
|
+
| `recover-task` | List a project's deleted tasks, or bring one back (there is no `delete-task` — use the Authoring Workbench UI) |
|
|
127
131
|
| `create-concept` | Create a new concept |
|
|
128
132
|
| `get-concept` | Fetch a concept by ID |
|
|
129
133
|
| `search-concepts` | Search by term or ECL expression |
|