omics-os 0.0.1 → 1.3.1

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 (82) hide show
  1. package/LICENSE +664 -0
  2. package/README.md +384 -4
  3. package/package.json +34 -12
  4. package/packages/cli/dist/index.js +154 -0
  5. package/packages/cloud-client/dist/agents.d.ts +20 -0
  6. package/packages/cloud-client/dist/agents.js +69 -0
  7. package/packages/cloud-client/dist/apiClient.d.ts +44 -0
  8. package/packages/cloud-client/dist/apiClient.js +368 -0
  9. package/packages/cloud-client/dist/auth.d.ts +76 -0
  10. package/packages/cloud-client/dist/auth.js +463 -0
  11. package/packages/cloud-client/dist/biovault/approval.d.ts +40 -0
  12. package/packages/cloud-client/dist/biovault/approval.js +38 -0
  13. package/packages/cloud-client/dist/biovault/assurance.d.ts +10 -0
  14. package/packages/cloud-client/dist/biovault/assurance.js +14 -0
  15. package/packages/cloud-client/dist/biovault/client.d.ts +76 -0
  16. package/packages/cloud-client/dist/biovault/client.js +212 -0
  17. package/packages/cloud-client/dist/biovault/compat.d.ts +29 -0
  18. package/packages/cloud-client/dist/biovault/compat.js +90 -0
  19. package/packages/cloud-client/dist/biovault/entries.d.ts +143 -0
  20. package/packages/cloud-client/dist/biovault/entries.js +359 -0
  21. package/packages/cloud-client/dist/biovault/errors.d.ts +18 -0
  22. package/packages/cloud-client/dist/biovault/errors.js +90 -0
  23. package/packages/cloud-client/dist/biovault/fields.d.ts +7 -0
  24. package/packages/cloud-client/dist/biovault/fields.js +42 -0
  25. package/packages/cloud-client/dist/biovault/identity.d.ts +10 -0
  26. package/packages/cloud-client/dist/biovault/identity.js +43 -0
  27. package/packages/cloud-client/dist/biovault/index.d.ts +15 -0
  28. package/packages/cloud-client/dist/biovault/index.js +16 -0
  29. package/packages/cloud-client/dist/biovault/instructionMatch.d.ts +32 -0
  30. package/packages/cloud-client/dist/biovault/instructionMatch.js +118 -0
  31. package/packages/cloud-client/dist/biovault/pending.d.ts +41 -0
  32. package/packages/cloud-client/dist/biovault/pending.js +208 -0
  33. package/packages/cloud-client/dist/biovault/preCommit.d.ts +10 -0
  34. package/packages/cloud-client/dist/biovault/preCommit.js +10 -0
  35. package/packages/cloud-client/dist/biovault/provenance.d.ts +45 -0
  36. package/packages/cloud-client/dist/biovault/provenance.js +55 -0
  37. package/packages/cloud-client/dist/biovault/vendor/packageDeliveryV1.generated.d.ts +3981 -0
  38. package/packages/cloud-client/dist/biovault/vendor/packageDeliveryV1.generated.js +3632 -0
  39. package/packages/cloud-client/dist/biovault/vendor/runV1.generated.d.ts +2326 -0
  40. package/packages/cloud-client/dist/biovault/vendor/runV1.generated.js +491 -0
  41. package/packages/cloud-client/dist/biovault/wireShape.d.ts +25 -0
  42. package/packages/cloud-client/dist/biovault/wireShape.js +88 -0
  43. package/packages/cloud-client/dist/bootstrap.d.ts +4 -0
  44. package/packages/cloud-client/dist/bootstrap.js +19 -0
  45. package/packages/cloud-client/dist/config.d.ts +44 -0
  46. package/packages/cloud-client/dist/config.js +309 -0
  47. package/packages/cloud-client/dist/credentials.d.ts +96 -0
  48. package/packages/cloud-client/dist/credentials.js +395 -0
  49. package/packages/cloud-client/dist/editor.d.ts +77 -0
  50. package/packages/cloud-client/dist/editor.js +278 -0
  51. package/packages/cloud-client/dist/errors.d.ts +27 -0
  52. package/packages/cloud-client/dist/errors.js +102 -0
  53. package/packages/cloud-client/dist/exports.d.ts +19 -0
  54. package/packages/cloud-client/dist/exports.js +85 -0
  55. package/packages/cloud-client/dist/featureFlags.d.ts +10 -0
  56. package/packages/cloud-client/dist/featureFlags.js +36 -0
  57. package/packages/cloud-client/dist/files.d.ts +35 -0
  58. package/packages/cloud-client/dist/files.js +109 -0
  59. package/packages/cloud-client/dist/index.d.ts +29 -0
  60. package/packages/cloud-client/dist/index.js +22 -0
  61. package/packages/cloud-client/dist/multipartUpload.d.ts +99 -0
  62. package/packages/cloud-client/dist/multipartUpload.js +624 -0
  63. package/packages/cloud-client/dist/projects.d.ts +42 -0
  64. package/packages/cloud-client/dist/projects.js +119 -0
  65. package/packages/cloud-client/dist/resources.d.ts +8 -0
  66. package/packages/cloud-client/dist/resources.js +26 -0
  67. package/packages/cloud-client/dist/sessions.d.ts +67 -0
  68. package/packages/cloud-client/dist/sessions.js +187 -0
  69. package/packages/cloud-client/dist/templates.d.ts +4 -0
  70. package/packages/cloud-client/dist/templates.js +12 -0
  71. package/packages/cloud-client/dist/types.d.ts +431 -0
  72. package/packages/cloud-client/dist/types.js +94 -0
  73. package/packages/cloud-client/dist/uploads.d.ts +93 -0
  74. package/packages/cloud-client/dist/uploads.js +61 -0
  75. package/packages/cloud-client/dist/vault.d.ts +20 -0
  76. package/packages/cloud-client/dist/vault.js +43 -0
  77. package/packages/cloud-client/dist/vectorSearch.d.ts +3 -0
  78. package/packages/cloud-client/dist/vectorSearch.js +12 -0
  79. package/packages/tui/dist/lobster.mjs +273 -0
  80. package/skills/omics-os-cloud/SKILL.md +24 -0
  81. package/skills/omics-os-lobster/SKILL.md +24 -0
  82. package/bin/omics-os.js +0 -5
package/README.md CHANGED
@@ -1,6 +1,386 @@
1
- # omics-os
1
+ <div align="center">
2
+ <img alt="Lobster AI Banner" src="https://raw.githubusercontent.com/the-omics-os/lobster/main/docs/assets/banner.png" width="700">
3
+ </div>
2
4
 
3
- The command-line client for Omics-OS Cloud and Lobster AI.
5
+ <br/>
4
6
 
5
- **Not released yet.** Version 0.0.1 only holds the package name and does nothing.
6
- Until the first release, use `@omicsos/lobster`: https://docs.omics-os.com
7
+ <div align="center">
8
+ <table border="0" cellspacing="6" cellpadding="0" style="border: none; background: transparent;">
9
+ <tr>
10
+ <td style="border: none; background: transparent;"><a href="https://www.npmjs.com/package/omics-os"><img src="https://img.shields.io/badge/npm-omics--os-black?style=for-the-badge&logo=npm" alt="npm"></a></td>
11
+ <td style="border: none; background: transparent;"><a href="https://app.omics-os.com"><img src="https://img.shields.io/badge/cloud-Omics--OS-blue?style=for-the-badge&logo=googlecloud" alt="Cloud"></a></td>
12
+ <td style="border: none; background: transparent;"><a href="https://docs.omics-os.com"><img src="https://img.shields.io/badge/docs-omics--os.com-black?style=for-the-badge&logo=readthedocs" alt="Docs"></a></td>
13
+ <td style="border: none; background: transparent;"><a href="https://pypi.org/project/lobster-ai/"><img src="https://img.shields.io/badge/PyPI-lobster--ai-black?style=for-the-badge&logo=pypi" alt="PyPI"></a></td>
14
+ </tr>
15
+ </table>
16
+ </div>
17
+
18
+ <br/>
19
+
20
+ <div align="center">
21
+ <b>Terminal client for <a href="https://omics-os.com">Omics-OS Cloud</a> — The Operating System for Biology.</b><br/>
22
+ <sub>Multi-agent bioinformatics on Omics-OS Cloud. Single-cell, proteomics, genomics, metabolomics, and more.</sub>
23
+ </div>
24
+
25
+ <br/>
26
+
27
+ ---
28
+
29
+ # Quickstart
30
+
31
+ **1. Install:**
32
+
33
+ Coming from `@omicsos/lobster` 0.4? Run `npm uninstall -g @omicsos/lobster` first: both packages install the `lobster-cli` command.
34
+ ```bash
35
+ npm install -g omics-os
36
+ ```
37
+
38
+ **2. Authenticate:**
39
+ ```bash
40
+ omics-os login
41
+ ```
42
+
43
+ **3. Ask anything:**
44
+ ```bash
45
+ omics-os lobster query "Find differentially expressed genes in BRCA vs normal tissue" --stream
46
+ ```
47
+
48
+ <br/>
49
+
50
+ # CLI Reference
51
+
52
+ **Cloud queries** — single-turn analysis on Omics-OS Cloud:
53
+ ```bash
54
+ omics-os lobster query "your question" # Run, wait, print result
55
+ omics-os lobster query "your question" --stream # Stream text as it arrives
56
+ omics-os lobster query "your question" --json # Machine-readable output
57
+ omics-os lobster query "..." --session-id latest # Continue previous session
58
+ ```
59
+
60
+ **Interactive cloud chat** — full session with the Ink TUI:
61
+ ```bash
62
+ omics-os lobster chat # New session
63
+ omics-os lobster chat --session-id <uuid> # Resume session
64
+ omics-os lobster chat --help # All chat options
65
+ ```
66
+
67
+ **Local engine chat (experimental)** — the same chat UI on a Lobster AI engine on your machine:
68
+ ```bash
69
+ omics-os lobster chat --backend local [--workspace DIR] [--provider NAME] [--model ID]
70
+ ```
71
+ Experimental: if this program or the Cloud worker restarts while Lobster is waiting for your decision, the run is lost and must be re-run from the last question.
72
+
73
+ It needs a Lobster AI engine with `lobster agent --stdio` (`lobster-ai` on `PATH` or in `~/.local/bin`, or set `OMICS_OS_LOBSTER_BIN=<path>` to name one); the first candidate that answers the engine's handshake is used. If none does, it prints one line naming each path tried and why, and exits 1. `omics-os doctor` lists the candidates and the one chat would use. No Omics-OS credential is passed to the engine. Without `--provider`, the engine picks its LLM provider from, in order: the workspace config, `~/.config/lobster/providers.json`, then `LOBSTER_LLM_PROVIDER`. In the chat, Ctrl+C twice cancels a running reply; `/exit` (or Ctrl+C when idle) quits.
74
+
75
+ **Engine-only verbs** — `omics-os lobster --help` lists the Lobster AI verbs that run on Omics-OS Cloud (`query`, `chat`, `agents list`, `agents info`) and names the rest at the bottom (for example `lobster dashboard`, `lobster init`, `lobster status`): those run only in the local engine, with its own `lobster` command.
76
+
77
+ **Local Lobster AI** — the open-source Python engine is a separate install with its own `lobster` command:
78
+ ```bash
79
+ uv tool install lobster-ai # then: lobster chat, lobster init
80
+ ```
81
+
82
+ **Setup & auth:**
83
+ ```bash
84
+ omics-os login # Browser OAuth or --api-key
85
+ omics-os status # Account, organisation, tier
86
+ omics-os -V # Version, Node.js, Cloud endpoint, lobster-ai
87
+ ```
88
+
89
+ <br/>
90
+
91
+ # Commands
92
+
93
+ ### Sessions
94
+
95
+ | Command | Description |
96
+ |---------|-------------|
97
+ | `omics-os lobster session create [--project <id>] [--name <name>]` | Start a session; with `--project`, the project's files are copied in when it starts (files uploaded later are not) and any that were not are listed |
98
+ | `omics-os lobster session list` | List recent sessions |
99
+ | `omics-os lobster session info <id>` | Show session details |
100
+ | `omics-os lobster session archive <id>` | Soft-delete a session |
101
+ | `omics-os lobster session delete <id> [--force]` | Permanently delete |
102
+ | `omics-os lobster session share <id>` | Create shareable URL |
103
+ | `omics-os lobster session cancel <id>` | Ask the server to stop the current reply; prints its answer, exits 1 if nothing was cancelled |
104
+
105
+ **Sharing (`session share`).** Only sessions in a personal project can be shared by link. Whoever opens the link must be logged in to Omics-OS Cloud. A session in an organisation project stays inside the organisation: members assigned to the project open it in Omics-OS Cloud.
106
+
107
+ ### Projects
108
+
109
+ | Command | Description |
110
+ |---------|-------------|
111
+ | `omics-os lobster projects create <name> [--description <text>]` | Create a project. Logged in with `--tenant`, it belongs to that organisation and you own it; otherwise it is a personal project. The output says which. Only organisation projects take `omics-os upload`. |
112
+
113
+ ### Files
114
+
115
+ | Command | Description |
116
+ |---------|-------------|
117
+ | `omics-os lobster files list <session-id>` | List workspace files |
118
+ | `omics-os lobster files upload <session-id> <path>` | Upload local file |
119
+ | `omics-os lobster files download <session-id> <key> [dest]` | Download file |
120
+ | `omics-os lobster files delete <session-id> <key>` | Delete file |
121
+ | `omics-os lobster files load <session-id> <path>` | Load into session context |
122
+
123
+ Session uploads take files up to 2 GiB; larger files go to a project with `omics-os upload`. Downloads are written to disk as they arrive, so large files do not fill memory.
124
+
125
+ ### Upload
126
+
127
+ `omics-os upload` sends files and whole folders into a project's data on Omics-OS Cloud, straight to storage, in parts, each at its path. A file appears in the project once it is complete. It is made for large instrument output and for connections that drop. A single file can be up to 48.8 TiB (the storage limit), within your organisation's per-file limit.
128
+
129
+ When we set up a project for you, we send you the command ready to paste. It looks like this and works unchanged in Command Prompt, PowerShell, zsh and bash:
130
+
131
+ ```bash
132
+ omics-os upload "<folder>" --project <project-id>
133
+ ```
134
+
135
+ | Command | Description |
136
+ |---------|-------------|
137
+ | `omics-os upload <paths...> --project <id>` | Upload files and folders; a folder keeps its own name and subfolders (`run1/pod5_pass/barcode01/a.pod5`) |
138
+ | `omics-os upload <paths...> --project <id> --include "*.pod5"` | Only files matching the pattern (repeatable) |
139
+ | `omics-os upload <paths...> --project <id> --dry-run` | List the files and the total size; send nothing |
140
+ | `omics-os upload <paths...> --project <id> --concurrency <n>` | Parts sent at once, 1-16 (default 4) |
141
+ | `omics-os upload <paths...> --project <id> --replace` | Overwrite a different file already in the project at the same path (the old version is kept for 30 days) |
142
+ | `omics-os --json upload <paths...> --project <id>` | `{project_id, files: [{path, size_bytes, outcome, relative_path, version_id}], totals}` for scripts |
143
+
144
+ - **Resume.** Stopped, cut off or closed the laptop? Run the same command again: a file can be resumed for 7 days from the start of its upload. The 7 days count per file, so a run of many files never runs out; only one very large file on a slow connection can (see below). Finished files are skipped, and a partly sent file continues from its last finished part. A file is recognised by its path, its size and a fingerprint of its first and last 8 MiB. If its modification time changed, the parts already sent are read again and compared first, so a changed file starts over. A file rewritten during the upload is not completed. Ctrl-C exits with code 130 and prints the command to run again.
145
+ - **Very large single files.** An unfinished upload is removed 7 days after it started, and the next run starts that file again. Largest single file that fits in 7 days at about 75 % of the line speed: 20 Mbit/s ~1.1 TB, 50 Mbit/s ~2.8 TB, 100 Mbit/s ~5.7 TB, 500 Mbit/s ~28 TB, 1 Gbit/s and faster: the 48.8 TiB limit. A larger file on a slower line: split it, or upload from a faster connection.
146
+ - **Same path.** A file already in the project with the same path, size and fingerprint is skipped. A different file at the same path is not overwritten: that file fails with a hint and the others go on. Run again with `--replace` to overwrite it, or to cancel your own unfinished upload of an earlier version of the file; files already in the project are still skipped.
147
+ - **Storage quota.** When your organisation reaches its storage quota, no further file is started: files already started finish, and the rest are listed as not started.
148
+ - **Checks.** Storage checks the checksum of every part on arrival.
149
+ - **Delete.** To delete files from a project, use the web app.
150
+ - **Sessions.** Start a session on the project after uploading: `omics-os lobster session create --project <project-id>`. The project's files are copied in when the session starts, and the command lists any it did not copy (raw sequencing files such as `.pod5` and `.fastq.gz` are never copied); the agent cannot read those in that session.
151
+ - **Skipped.** Empty files and links are skipped and listed; links are not followed.
152
+ - **Exit codes.** 0 all files done, 1 any file failed, 2 usage error, 130 stopped with Ctrl-C.
153
+ - **Windows.** If PowerShell refuses to run `omics-os` because of its execution policy, run `omics-os.cmd` instead, with the same arguments.
154
+
155
+ ### BioVault
156
+
157
+ Running plans remains subject to your organisation's availability and the server's policy/capacity checks.
158
+
159
+ **API keys can start billable runs, like a CLI login.** Creating or editing a draft is not approval to start it.
160
+
161
+ | Command | Description |
162
+ |---------|-------------|
163
+ | `omics-os biovault features` | Check run availability |
164
+ | `omics-os biovault draft new [--output FILE]` | Write a local starter; never starts a run |
165
+ | `omics-os biovault draft create --file FILE` | Create a server draft |
166
+ | `omics-os biovault draft export ENTRY --output FILE` | Export editable fields with the current revision |
167
+ | `omics-os biovault draft apply ENTRY --file FILE [--yes]` | Apply a whole replacement; `--yes` acknowledges omissions, not a billable start |
168
+ | `omics-os biovault draft edit ENTRY` | Edit with `VISUAL`/`EDITOR` in a terminal |
169
+ | `omics-os biovault draft show ENTRY` | Review the checked plan; `--config`, `--prompt`, `--checks` or `--execute-command` are mutually exclusive |
170
+ | `omics-os biovault draft list` | List drafts |
171
+ | `omics-os biovault draft literature add ENTRY FILE.ris --expect-revision N` | Register literature on an existing draft |
172
+ | `omics-os biovault draft literature remove ENTRY FILE_ID --expect-revision N` | Remove registered literature |
173
+ | `omics-os biovault draft discard ENTRY [--yes]` | Discard a planning draft; does not cancel a run |
174
+ | `omics-os biovault runs [--status S] [--outcome O] [--limit N] [--cursor C]` | List supported dataset runs |
175
+ | `omics-os biovault run start ENTRY [--yes --review FILE]` | Explicitly approve a billable plan |
176
+ | `omics-os biovault run recover ENTRY [--forget --yes]` | Read an earlier start's outcome; never resends it |
177
+ | `omics-os biovault run cancel JOB [--yes]` | Record a cancellation fence; cleanup can remain pending |
178
+ | `omics-os biovault run show JOB [--watch]` | Read status; watching never cancels |
179
+ | `omics-os biovault run prompt JOB` | Read the approved prompt |
180
+ | `omics-os biovault run samples JOB [--limit N] [--cursor C]` | Read samples |
181
+ | `omics-os biovault run package JOB` | Read package metadata, not bytes |
182
+ | `omics-os biovault run problems JOB [--status resolved\|unresolved] [--severity info\|warning\|blocking]` | Read problems; also accepts limit/cursor |
183
+ | `omics-os biovault run decisions JOB [--limit N] [--cursor C]` | Read inclusion/matching decisions |
184
+ | `omics-os biovault run download JOB --dest DIR [--path P] [--force]` | Download selected/all manifest files into an existing directory |
185
+ | `omics-os biovault run download JOB --dest DIR --archive [--force]` | Download the optional ZIP; cannot combine with `--path` |
186
+
187
+ `ENTRY`, `JOB`, `FILE_ID`, and `N` above are placeholders for returned IDs/revisions, not literal values. Pagination limits are integers 1–100; `--path` and `--confirm-default PATH` are repeatable. `--confirm-default` on create/apply acknowledges only the named configuration defaults, never execution. The server validates configuration; unknown keys and wrong types are not silently repaired. Apply is whole replacement: omitted fields can return to defaults. Omitted or empty `literature_decisions` preserves existing decisions; register RIS files before applying their zero-based per-file decisions.
188
+
189
+ #### Review, then explicitly start
190
+
191
+ The starter has an **empty question, intent and node list, and no limits**. It is **not execution-ready**: do not blindly copy it into a start. Edit it to a meaningful question/intent, valid known selection IDs/roles, and finite cost/storage limits within the current GEO, human bulk RNA-seq scope. Review the server's normalised plan and checks; explicitly acknowledge defaults you intend. Resolve Blocking checks before proceeding. This is a workflow template, not a pre-approved scientific plan.
192
+
193
+ ```bash
194
+ set -e # Stop on any failed step; never continue from an unknown start outcome
195
+ omics-os biovault features
196
+ omics-os biovault draft new --output starter.json
197
+ vi starter.json # USER EDIT: question, intent, known nodes/roles, scope, limits
198
+ omics-os --json biovault draft create --file starter.json > created.json
199
+ ENTRY=$(jq -er '.entry_id' created.json)
200
+ omics-os biovault draft export "$ENTRY" --output run.json
201
+ vi run.json # USER EDIT: retain expected_revision; review defaults and limits
202
+ omics-os biovault draft apply "$ENTRY" --file run.json --yes
203
+
204
+ # Review the full plan BEFORE producing the execution tuple
205
+ omics-os biovault draft show "$ENTRY"
206
+ omics-os biovault draft show "$ENTRY" --config
207
+ omics-os biovault draft show "$ENTRY" --prompt
208
+ omics-os biovault draft show "$ENTRY" --checks
209
+ omics-os biovault draft show "$ENTRY" --execute-command > review.json
210
+
211
+ # BILLABLE: run only after you explicitly approve this exact fresh plan
212
+ omics-os --json biovault run start "$ENTRY" --yes --review review.json > started.json
213
+ JOB=$(jq -er '.job_id' started.json)
214
+ omics-os biovault run show "$JOB" --watch
215
+ # Download only if completed with a published complete/partial folder
216
+ mkdir -p dataset-folder
217
+ omics-os biovault run download "$JOB" --dest dataset-folder
218
+ ```
219
+
220
+ If either stdin or stdout is non-TTY, start requires **both `--yes` and `--review FILE`**. The review is exactly seven fields: four digests, revision, turn generation and prompt version; all must match the freshly read ready snapshot. A stale/extra/missing field refuses locally. `--json` alone is **not consent**. Interactive start displays the requested model, limits and revision, warns **“This starts a billable run.”**, and defaults to **No** (`[y/N]`). Approval accepted means approval was accepted, not that execution is already running.
221
+
222
+ Start captures the authenticated actor and organisation; an organisation is required. Before its single start POST, it saves a durable private **0600** pending record under the npm credential directory with an exclusive per-entry mutex. **Any existing record blocks another start with zero start POSTs.** There is no auto-resend or second-start recovery. Unknown outcomes exit **8** and keep the record. A signal after the start request was sent, before its outcome is known, keeps the record. If the draft was already started or has changed, run start sends nothing and clears its local record; if that cleanup fails, it keeps the record with a warning. Once an outcome is proven, a late signal/local retirement problem does not erase the known result.
223
+
224
+ Use `omics-os biovault run recover "$ENTRY"` manually after uncertainty. Recovery only reads the server, never starts a run. It can confirm accepted, different-plan, discarded or superseded outcomes; the latter three return **5**. Pending/unknown stays **8**. `--forget --yes` removes only an unresolved local record after comparison, **not** a possible server run; that run may still exist or the original request may still land. Records from another login, oversized/nonregular files and stale mutexes are not automatically deleted; follow the reported login/path instruction rather than blindly removing history. Policy pre-commit refusals return **6** and capacity refusals **7**; other ambiguous start failures retain the record.
225
+
226
+ Watching polls until **settled**, not merely a terminal-looking status: failed can await terminal settlement; cancelled can await cleanup. Ctrl-C stops watching (**130**) and sends no cancellation. Cancel reports **“Cancellation recorded. No evidence will be published for this run.”**; cleanup may remain pending (**7**). It does not promise immediate compute or billing cessation. Inspect problems/decisions for a failed run; the CLI prints “Run failed” and only a server-supplied explanation.
227
+
228
+ The destination must be a directory you own that other users cannot write to. These pathname checks protect against other local users, not interference by the same user or root; they are not a race-proof descriptor-relative guarantee.
229
+
230
+ run download is supported on macOS and Linux. On Windows, use WSL.
231
+
232
+ Download accepts only **completed, published complete or partial folders**; failed/cancelled runs have no download. Byte counts and SHA-256 are checked against the manifest, **not scientific correctness**. Transfers are streamed and size-bounded; signed URLs are never printed or sent Omics credentials. An existing destination directory with no symlink ancestors is required; overwrites require `--force`. Files already saved remain saved if a later transfer fails: the final report lists completed, failed and not-attempted files.
233
+
234
+ Costs distinguish **spent**, **provisional**, and **up to** an in-flight reservation/upper bound. A reservation is not spend; unresolved cost is unavailable. Review limits, not an assumed price or immediate cancellation saving.
235
+
236
+ #### Legacy compatibility
237
+
238
+ `vault jobs` lists legacy jobs; `job-status` reads either supported v1 or legacy status; `vault cancel` aliases `run cancel`. `search`, `evidence` and `export` remain legacy evidence commands and may not work with a CLI login. **`vault ask` is closed**: even `ask --help` refuses locally (exit 2, no HTTP) and points to `draft new`. Legacy evidence search is not the dataset-run workflow.
239
+
240
+ ### Vector Search (Ontology Matching)
241
+
242
+ | Command | Description |
243
+ |---------|-------------|
244
+ | `omics-os lobster vector search "T cell exhaustion"` | Semantic ontology search |
245
+ | `omics-os lobster vector search "..." --collections mondo,uberon` | Filter collections |
246
+
247
+ ### Exports & Editor
248
+
249
+ | Command | Description |
250
+ |---------|-------------|
251
+ | `omics-os lobster export <session-id> --type report` | Export session as report/pipeline/slidedeck |
252
+ | `omics-os editor generate <session-id>` | Generate LaTeX artifacts |
253
+ | `omics-os editor compile <session-id>` | Compile the editor project and save the PDF (`--output`, default `output.pdf`) |
254
+ | `omics-os editor download <session-id>` | Download project ZIP |
255
+
256
+ <br/>
257
+
258
+ # Architecture
259
+
260
+ ```
261
+ omics-os (npm)
262
+ ├── packages/cli Commander: omics-os <surface> <verb>
263
+ ├── packages/tui React Ink chat, started by `omics-os lobster chat`
264
+ ├── packages/core Lobster protocol v1 and the engine command list (bundled, not published)
265
+ └── packages/cloud-client Typed Omics-OS Cloud API client
266
+ │
267
+ ▼
268
+ Omics-OS Cloud (app.omics-os.com)
269
+ ```
270
+
271
+ `omics-os` starts the Python engine only for `omics-os lobster chat --backend local`, as `lobster agent --stdio`. Lobster AI (`pip`/`uv` package `lobster-ai`) runs locally with its own `lobster` command; its `lobster cloud chat` hands over to the chat client.
272
+
273
+ **Upgrading from `@omicsos/lobster` 0.4:** the commands moved under surfaces. `lobster cloud vault …` is `omics-os biovault …`, `lobster cloud editor …` is `omics-os editor …`, `lobster cloud login|status|profiles|use` is `omics-os login|status|profiles|use`, and the session verbs (`query`, `chat`, `session`, `files`, `export`, `agents`, `vector`) are under `omics-os lobster …`. The package also installs a `lobster-cli` command that keeps the 0.4 grammar for older `lobster-ai` releases. If `omics-os` was installed over 0.4 with `--force`, uninstalling 0.4 afterwards also removes `lobster-cli`.
274
+
275
+ <br/>
276
+
277
+ <details>
278
+ <summary><b>Global options</b></summary>
279
+
280
+ Available on all commands:
281
+
282
+ | Flag | Effect |
283
+ |------|--------|
284
+ | `--json` | Machine-readable JSON output |
285
+ | `--endpoint <url>` | Override API endpoint |
286
+ | `--no-color` | Disable ANSI colors |
287
+ | `--verbose` | Print API requests (method, path, status, request ID) to stderr; cloud chat and file transfers are not included |
288
+ | `-V, --version` | Show CLI + Python + cloud info |
289
+
290
+ </details>
291
+
292
+ <details>
293
+ <summary><b>Authentication</b></summary>
294
+
295
+ `omics-os` stores logins in `~/.config/omics-os/credentials.json` (mode `0600`). Lobster AI (Python) reads the same file to use Omics-OS Cloud models. The file format is not a public interface.
296
+
297
+ **OAuth (default):**
298
+ ```bash
299
+ omics-os login # Opens browser, receives one-time code via localhost callback
300
+ ```
301
+
302
+ **API key:**
303
+ ```bash
304
+ omics-os --endpoint https://app.omics-os.com/api/v1 login --api-key omk_...
305
+ ```
306
+
307
+ **Environment variable (CI/CD):**
308
+ ```bash
309
+ export OMICS_OS_API_KEY=omk_...
310
+ omics-os --profile default lobster query "..." --json
311
+ ```
312
+
313
+ An environment key takes precedence: `OMICS_OS_API_KEY` (the same name the Lobster AI engine reads; it wins over the older `OMICSOS_API_KEY`, which still works here, and if both are set with different values the CLI says so). The local engine reads only `OMICS_OS_API_KEY`: the older name is never passed to it. Then come the legacy `LOBSTER_TOKEN` fallback (`LOBSTER_CLOUD_TOKEN` is read by `omics-os lobster chat`), explicit command credentials, and stored credentials. Stored CLI logins refresh automatically; explicit/environment tokens are used directly, not automatically refreshed. Browser login uses first-party `omc_`/`omr_` CLI credentials and a one-time browser handoff, not stored Cognito refresh tokens.
314
+
315
+ API keys can be revoked. CLI logins (`omc_`) expire and can be revoked.
316
+
317
+ **Profiles and tenants:**
318
+ ```bash
319
+ omics-os login --tenant acme # Normal browser authorisation for your tenant
320
+ omics-os profiles # Inspect saved profile names
321
+ omics-os --profile acme biovault features
322
+ omics-os use default # Select the platform profile again
323
+ ```
324
+ Tenant browser login saves a platform `default` profile and a tenant profile, then makes the tenant profile active. Both hold the same account, so a tenant login replaces any platform login saved before. If you use a different platform account on the same computer, run `omics-os login` again afterwards and choose the platform; the tenant profile stays, and `omics-os use <tenant>` selects it again. `--profile` does not change where a login is saved. `--profile` is a global option (`omics-os --profile NAME …`); `--tenant` belongs to `login`. Stored credentials attach only to trusted Omics-OS/local-development origins, including trusted explicit endpoints; an endpoint override is the API base, for example `https://app.omics-os.com/api/v1`.
325
+
326
+ API keys are not accepted on tenant subdomains; use `omics-os login --tenant <slug>`.
327
+
328
+ Requests are rate-limited per IP address, so users behind one network share the limit. Use the platform `default` profile/endpoint for API-key CI, and coordinate requests from workers sharing a network.
329
+
330
+ </details>
331
+
332
+ <details>
333
+ <summary><b>Session continuity</b></summary>
334
+
335
+ Every cloud query creates or continues a session:
336
+ ```bash
337
+ # New session (auto-created)
338
+ omics-os lobster query "Load BRCA dataset from GEO"
339
+
340
+ # Continue most recent session
341
+ omics-os lobster query "Now run differential expression" --session-id latest
342
+
343
+ # Resume specific session
344
+ omics-os lobster query "Show results" --session-id 4a8f2c1d-...
345
+ ```
346
+
347
+ Sessions persist server-side. View and manage them at [app.omics-os.com](https://app.omics-os.com).
348
+
349
+ </details>
350
+
351
+ <details>
352
+ <summary><b>Non-interactive / CI usage</b></summary>
353
+
354
+ ```bash
355
+ # JSON output for parsing
356
+ omics-os lobster query "List top 10 DEGs" --json | jq '.response'
357
+
358
+ # With explicit API key (platform profile, not a tenant)
359
+ OMICS_OS_API_KEY=omk_... omics-os --profile default lobster query "..." --json
360
+
361
+ # Check exit codes
362
+ omics-os lobster query "..." --json
363
+ # 0 = success, 1 = error, 130 = cancelled (Ctrl-C, or `omics-os lobster session cancel`).
364
+ # A cancel the server reports adds "cancelled": true and any partial "response" to the
365
+ # JSON; a local Ctrl-C keeps the shorter {"success": false, "error": ...} form.
366
+ ```
367
+
368
+ </details>
369
+
370
+ <br/>
371
+
372
+ # Links
373
+
374
+ <div align="center">
375
+ <a href="https://app.omics-os.com">Omics-OS Cloud</a> &nbsp;·&nbsp;
376
+ <a href="https://docs.omics-os.com">Documentation</a> &nbsp;·&nbsp;
377
+ <a href="https://github.com/the-omics-os/lobster">GitHub (engine)</a> &nbsp;·&nbsp;
378
+ <a href="https://pypi.org/project/lobster-ai/">PyPI</a> &nbsp;·&nbsp;
379
+ <a href="https://lobsterbio.com">Lobster AI</a>
380
+ </div>
381
+
382
+ <br/>
383
+
384
+ <div align="center">
385
+ <sub>AGPL-3.0-or-later · Made by <a href="https://omics-os.com">Omics-OS</a></sub>
386
+ </div>
package/package.json CHANGED
@@ -1,18 +1,40 @@
1
1
  {
2
2
  "name": "omics-os",
3
- "version": "0.0.1",
4
- "description": "Omics-OS command-line client. Not released yet: this version only holds the name.",
5
- "bin": {
6
- "omics-os": "bin/omics-os.js"
7
- },
8
- "files": [
9
- "bin/omics-os.js",
10
- "README.md"
11
- ],
3
+ "version": "1.3.1",
4
+ "description": "Omics-OS Cloud command line: sign in, run Lobster AI sessions, BioVault, editor and playground from the terminal.",
12
5
  "author": "Kevin Yar <kevin.yar@omics-os.com>",
13
6
  "license": "AGPL-3.0-or-later",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/the-omics-os/lobster-cli.git"
10
+ },
14
11
  "homepage": "https://omics-os.com",
15
- "keywords": [
16
- "omics-os"
17
- ]
12
+ "type": "module",
13
+ "files": [
14
+ "packages/cli/dist",
15
+ "packages/tui/dist",
16
+ "packages/cloud-client/dist",
17
+ "skills",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "workspaces": [
22
+ "packages/*",
23
+ "shared"
24
+ ],
25
+ "bin": {
26
+ "omics-os": "./packages/cli/dist/index.js",
27
+ "lobster-cli": "./packages/cli/dist/index.js"
28
+ },
29
+ "scripts": {
30
+ "build": "npm run build -w packages/core && npm run build -w packages/cloud-client && npm run build -w packages/cli && npm run build -w packages/tui",
31
+ "typecheck": "npm run typecheck --workspaces --if-present",
32
+ "test": "npm run test --workspaces --if-present",
33
+ "dev": "npm run dev --workspace=packages/tui",
34
+ "clean": "rm -rf packages/*/dist",
35
+ "prepublishOnly": "npm run build"
36
+ },
37
+ "engines": {
38
+ "node": ">=22"
39
+ }
18
40
  }