authoring-cli 0.1.12 → 0.1.16

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 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 delete-task [--project PROJECT --task TASK]` — Delete a task
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,7 +191,9 @@ authoring-cli validate-review-concepts
192
191
  ## Tips & Troubleshooting
193
192
 
194
193
  ### Session Management
195
- - Your session is stored in `~/.authoring-cli/session.json`
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
196
197
  - If you have multiple Chrome profiles, specify which one: `authoring-cli login --chrome-profile "Work Profile"`
197
198
  - If your session expires during use, you'll get a `401 Unauthorized` error — run `authoring-cli login` again
198
199
 
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) via IMS's `serviceReferer` redirect mechanism. After you complete login there, the session is captured automatically — no copy/paste. If you're already signed in to that environment in Chrome, the existing session is reused and no browser opens at all.
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
 
@@ -77,7 +77,13 @@ Signed in as Jane Doe. (reused an existing Chrome session — no browser opened.
77
77
 
78
78
  **Current support**: automatic session capture works on **macOS with Google Chrome** only. On any other OS/browser combination, `login` fails immediately with a message naming the unsupported combination, rather than hanging or failing silently. Support for other platforms/browsers is possible future work.
79
79
 
80
- `logout` deletes the locally stored session (`~/.authoring-cli/session.json`). It does not sign you out of IMS in Chrome, so a subsequent `login` will reuse that browser 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
+
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.
81
87
 
82
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).
83
89
 
@@ -100,16 +106,17 @@ Once a task is selected, every action command below applies to it automatically
100
106
 
101
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.
102
108
 
103
- ### Creating, deleting and recovering tasks
109
+ ### Creating and recovering tasks
104
110
 
105
111
  ```bash
106
112
  authoring-cli create-task --project PROJ --summary "Model secondary disorders"
107
- authoring-cli delete-task # the selected task, unless --project/--task given
108
113
  authoring-cli recover-task --project PROJ # list PROJ's deleted tasks
109
114
  authoring-cli recover-task --project PROJ --task PROJ-123
110
115
  ```
111
116
 
112
- `create-task` assigns the task to you and selects it (`--assignee`/`--unassigned` and `--no-select` override that). `delete-task` moves the task to status `Deleted` and clears the local selection, 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.
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.
113
120
 
114
121
  ## Authoring actions
115
122
 
@@ -120,8 +127,7 @@ authoring-cli recover-task --project PROJ --task PROJ-123
120
127
  | `create-task` | Create a task and select it |
121
128
  | `select-task` | Set the task later commands target (creating its branch if needed) |
122
129
  | `current-task` | Print the locally selected task |
123
- | `delete-task` | Move a task to `Deleted`, leaving its branch content intact |
124
- | `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) |
125
131
  | `create-concept` | Create a new concept |
126
132
  | `get-concept` | Fetch a concept by ID |
127
133
  | `search-concepts` | Search by term or ECL expression |