authoring-cli 0.1.30 → 0.1.32

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.
Files changed (3) hide show
  1. package/HELP.md +4 -4
  2. package/README.md +6 -4
  3. package/package.json +1 -1
package/HELP.md CHANGED
@@ -13,9 +13,9 @@ npm install -g authoring-cli
13
13
  ```bash
14
14
  authoring-cli login
15
15
  ```
16
- This opens Chrome to your organization's login page, always in one dedicated "authoring-cli" Chrome profile stored in its own directory (`~/.authoring-cli-chrome`, created automatically the first time) — entirely separate from your everyday Chrome data, not just a different profile inside it. Once you sign in, your session is captured automatically. This is the *only* profile `login` ever reads or writes cookies for — there's no flag to point it at a different (e.g. your everyday) profile instead, so there is never any ambiguity about which Chrome window/session the CLI is actually looking at.
16
+ If you already have a still-valid session stored from a previous `login` (same environment), this is instant with no browser involved at all. Otherwise it opens Chrome to your organization's login page, always in one dedicated "authoring-cli" Chrome profile stored in its own directory (`~/.authoring-cli-chrome`, created automatically the first time) — entirely separate from your everyday Chrome data, not just a different profile inside it. Once you sign in, your session is captured automatically. This is the *only* profile `login` ever reads or writes cookies for — there's no flag to point it at a different (e.g. your everyday) profile instead, so there is never any ambiguity about which Chrome window/session the CLI is actually looking at.
17
17
 
18
- **Important:** because this profile is separate, it opens its own Chrome window and (the first time) starts out *not* signed in — even if you already have a different Chrome window open and signed in. Sign in inside the window `login` just opened, not whichever Chrome window happened to be in front already; the command's own output names the profile ("Opening Chrome (profile \"authoring-cli\") ...") so you can check its avatar in Chrome's top-right corner. Signing in to the wrong window is the most common cause of `login` waiting out its full timeout and then failing with "Not signed in" on every subsequent command — if that happens, retry and make sure you type your credentials into the new window the command opens.
18
+ **Important:** because this profile is separate, it opens its own Chrome window and (the first time) starts out *not* signed in — even if you already have a different Chrome window open and signed in. Sign in inside the window `login` just opened, not whichever Chrome window happened to be in front already; the command's own output names the profile ("Opening Chrome (profile \"authoring-cli\") ..."). Signing in to the wrong window is one cause of `login` waiting out its full timeout and then failing with "Not signed in" on every subsequent command — if that happens, retry and make sure you type your credentials into the new window the command opens. If automatic capture keeps failing for another reason (e.g. Chrome's own cookie-encryption format changed in a way this tool doesn't recognize yet), `authoring-cli login --cookie <value>` bypasses browser automation entirely: copy the session cookie's raw Value from a signed-in browser's own DevTools (Application/Storage tab → Cookies) and pass it directly.
19
19
 
20
20
  ### 3. Select a Task
21
21
  ```bash
@@ -119,7 +119,7 @@ authoring-cli validate-review-concepts
119
119
  ## Command Reference
120
120
 
121
121
  ### Authentication
122
- - `authoring-cli login [environment]` — Sign in (environment: production, uat, dev)
122
+ - `authoring-cli login [environment] [--cookie <value>]` — Sign in (environment: production, uat, dev; `--cookie` pastes a session cookie Value from DevTools to skip browser automation entirely)
123
123
  - `authoring-cli logout` — Sign out and remove stored session
124
124
 
125
125
  ### Task Management
@@ -300,7 +300,7 @@ https://github.com/snomed/authoring-cli
300
300
  ## FAQ
301
301
 
302
302
  **Q: Can I use this on Windows or Linux?**
303
- 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`; `login` auto-starts both the Termux:X11 app and its backend so there's no manual open-once step, provided Termux has been granted Android's "Draw over other apps" permission — a one-time device setting under Settings → Apps → Termux that can't be requested from inside the proot; without it, open the Termux:X11 app by hand once instead so `login` has a display to draw its sign-in window on). `login` doesn't require any Chrome profile to already exist — it opens (and creates, if needed) a dedicated "authoring-cli" profile, so a fresh machine or CI image that has never launched Chrome before still works on the very first run. 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.
303
+ 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`; `login` auto-starts both the Termux:X11 app and its backend so there's no manual open-once step, provided Termux has been granted Android's "Draw over other apps" permission — a one-time device setting under Settings → Apps → Termux that can't be requested from inside the proot; without it, open the Termux:X11 app by hand once instead so `login` has a display to draw its sign-in window on). `login` doesn't require any Chrome profile to already exist — it opens (and creates, if needed) a dedicated "authoring-cli" profile, so a fresh machine or CI image that has never launched Chrome before still works on the very first run. On Windows and any other unsupported platform, `login` will fail with a clear message — but you can still sign in there using `authoring-cli login --cookie <value>` with a session cookie copied from any signed-in browser's DevTools, which needs no Chrome automation at all.
304
304
 
305
305
  **Q: How do I use this with an AI agent?**
306
306
  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,18 +64,20 @@ 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). 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.
67
+ If a previous `login` already stored a still-valid session for this exact environment, that's reused directly — one check against IMS, no Chrome involved at all. Otherwise it checks whether the dedicated Chrome profile already has a valid session (no browser opens either, in that case), and failing that 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 — primarily by reading it straight from Chrome's own DevTools Protocol (no file decryption involved, so it keeps working regardless of how Chrome encrypts cookies on disk), with a decrypt-based fallback for the rare case that isn't available. 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).
68
+
69
+ If automatic capture ever can't complete (e.g. an unsupported platform, or Chrome's own cookie storage format changes in a way this tool doesn't recognize yet), `--cookie <value>` bypasses it entirely: copy the session cookie's raw Value from a signed-in browser's own DevTools (Application/Storage tab → Cookies) and pass it directly — `authoring-cli login production --cookie <value>`.
68
70
 
69
71
  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
72
 
71
73
  ```
72
- Signed in as Jane Doe. (reused an existing Chrome session — no browser opened.)
74
+ Signed in as Jane Doe. (reused the already-stored session — no Chrome involved at all.)
73
75
  IMS: https://authoring.ihtsdotools.org/ (production)
74
76
  Terminology server: https://authoring.ihtsdotools.org/snowstorm/snomed-ct/ (production)
75
77
  Authoring services: https://authoring.ihtsdotools.org/authoring-services/ (production)
76
78
  ```
77
79
 
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 both halves of Termux:X11's GUI stack if nothing is already serving a display: its backend process (`termux-x11 :1 &`) and, best-effort, the Termux:X11 **app** itself — no manual open-once needed, *provided* Termux has been granted Android's "Draw over other apps" permission (Settings → Apps → Termux), a one-time device setting that can't itself be requested from inside the proot. Without that permission granted, the app-start step silently does nothing and the app still needs to already be open by hand, same as before. On any other OS/browser combination, `login` fails immediately with a message naming the unsupported combination, rather than hanging or failing silently.
80
+ **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 both halves of Termux:X11's GUI stack if nothing is already serving a display: its backend process (`termux-x11 :1 &`) and, best-effort, the Termux:X11 **app** itself — no manual open-once needed, *provided* Termux has been granted Android's "Draw over other apps" permission (Settings → Apps → Termux), a one-time device setting that can't itself be requested from inside the proot. Without that permission granted, the app-start step silently does nothing and the app still needs to already be open by hand, same as before. On any other OS/browser combination, automatic capture fails immediately with a message naming the unsupported combination, rather than hanging or failing silently — `login --cookie <value>` still works there, since it doesn't touch Chrome automation at all.
79
81
 
80
82
  `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
83
 
@@ -85,7 +87,7 @@ There's deliberately no automatic fallback to `~/.authoring-cli` if the working
85
87
 
86
88
  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.
87
89
 
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). `login` always signs in through one dedicated "authoring-cli" Chrome profile — never your everyday browsing profile — with no flag to point it at a different one; this keeps the profile it opens, reads an existing cookie from, and polls for a fresh one always the same, so there's never a question of which Chrome window to sign in to.
90
+ 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). `--cookie <value>` is different — it's the manual fallback described above, not an endpoint override: pass the session cookie's raw Value and `login` skips Chrome automation entirely. `login` always signs in through one dedicated "authoring-cli" Chrome profile — never your everyday browsing profile — with no flag to point it at a different one; this keeps the profile it opens, reads an existing cookie from, and polls for a fresh one always the same, so there's never a question of which Chrome window to sign in to.
89
91
 
90
92
  ## Pick a project and task
91
93
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authoring-cli",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "description": "CLI for SNOMED CT authoring against authoring-services",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {