@oalo-ai/cli 0.7.0 → 0.9.0

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.
@@ -0,0 +1,106 @@
1
+ import { OaloChannel } from "../channel.js";
2
+ import { resolve as resolveConfig, controlPlane, HOW_TO_CONNECT } from "../config.js";
3
+ import { dim } from "../events.js";
4
+
5
+ const VALID_MODES = ["standard", "zdr", "local_only"];
6
+
7
+ /**
8
+ * `oalo privacy`: view or update the workspace's Privacy Mode and PII Vault.
9
+ *
10
+ * oalo privacy [--json]
11
+ * oalo privacy set --mode standard|zdr|local_only [--scrub-pii on|off] [--cloud-embeddings on|off] [--cloud-jobs on|off] [--json]
12
+ */
13
+ export async function privacy(flags, rest, opts = {}) {
14
+ const sub = rest[1];
15
+ if (sub && sub !== "get" && sub !== "set") {
16
+ return fail("usage: oalo privacy [set --mode standard|zdr|local_only [--scrub-pii on|off] [--cloud-embeddings on|off] [--cloud-jobs on|off]] [--json]", 2, flags);
17
+ }
18
+
19
+ const cfg = resolveConfig(flags);
20
+ const { url, token } = controlPlane(cfg);
21
+ if (!url || !token) return fail(`oalo privacy needs a CLI token.\n\n${HOW_TO_CONNECT}`, 2, flags);
22
+
23
+ const ch = (opts.channel || ((o) => new OaloChannel(o)))({ url, token });
24
+ try {
25
+ await ch.connect();
26
+
27
+ if (sub === "set") {
28
+ const params = {};
29
+ if (flags.mode !== undefined) {
30
+ const mode = String(flags.mode).trim().toLowerCase();
31
+ if (!VALID_MODES.includes(mode)) {
32
+ return fail(`--mode must be one of ${VALID_MODES.join(", ")} (got ${flags.mode})`, 2, flags);
33
+ }
34
+ params.privacy_mode = mode;
35
+ }
36
+ if (flags["scrub-pii"] !== undefined) {
37
+ const val = parseBoolFlag(flags["scrub-pii"], "--scrub-pii");
38
+ if (val === null) return fail("--scrub-pii must be on or off", 2, flags);
39
+ params.scrub_pii = val;
40
+ }
41
+ if (flags["cloud-embeddings"] !== undefined) {
42
+ const val = parseBoolFlag(flags["cloud-embeddings"], "--cloud-embeddings");
43
+ if (val === null) return fail("--cloud-embeddings must be on or off", 2, flags);
44
+ params.allow_cloud_embeddings = val;
45
+ }
46
+ if (flags["cloud-jobs"] !== undefined) {
47
+ const val = parseBoolFlag(flags["cloud-jobs"], "--cloud-jobs");
48
+ if (val === null) return fail("--cloud-jobs must be on or off", 2, flags);
49
+ params.allow_cloud_background_jobs = val;
50
+ }
51
+
52
+ if (Object.keys(params).length === 0) {
53
+ return fail("pass at least one setting: --mode standard|zdr|local_only, --scrub-pii on|off, --cloud-embeddings on|off, or --cloud-jobs on|off", 2, flags);
54
+ }
55
+
56
+ const r = await ch.call("privacy:set", params);
57
+ if (flags.json) return void console.log(JSON.stringify(r, null, 2));
58
+ printPolicy(r.policy, true);
59
+ return;
60
+ }
61
+
62
+ const r = await ch.call("privacy:get", {});
63
+ if (flags.json) return void console.log(JSON.stringify(r, null, 2));
64
+ printPolicy(r.policy, false, r.can_manage);
65
+ } catch (e) {
66
+ return fail(e.message, 1, flags);
67
+ } finally {
68
+ ch.close();
69
+ }
70
+ }
71
+
72
+ function parseBoolFlag(v) {
73
+ if (v === true) return true;
74
+ if (v === false) return false;
75
+ const s = String(v).trim().toLowerCase();
76
+ if (["on", "true", "yes", "1"].includes(s)) return true;
77
+ if (["off", "false", "no", "0"].includes(s)) return false;
78
+ return null;
79
+ }
80
+
81
+ function printPolicy(p, updated, canManage) {
82
+ const mode = p?.privacy_mode || "standard";
83
+ const label =
84
+ mode === "local_only"
85
+ ? "local_only (only local byo-* models via `oalo serve`; cloud embeddings, cloud Whisper, and hosted background jobs disabled)"
86
+ : mode === "zdr"
87
+ ? "zdr (Zero Data Retention: only AWS Bedrock bedrock/* and local byo-* models permitted)"
88
+ : "standard (all hosted models and cloud services enabled)";
89
+
90
+ console.log(`${updated ? "Privacy policy updated:" : "Workspace privacy policy:"}`);
91
+ console.log(` mode: ${label}`);
92
+ console.log(` pii vault scrub: ${p?.scrub_pii ? "on (SSNs, Luhn cards, emails, phones, IPs tokenized before LLM calls)" : "off"}`);
93
+ console.log(` cloud embeddings: ${p?.allow_cloud_embeddings === false ? "off" : "on"}`);
94
+ console.log(` cloud jobs: ${p?.allow_cloud_background_jobs === false ? "off" : "on"}`);
95
+ if (canManage === false) {
96
+ console.log(dim("Only workspace admins can change privacy settings."));
97
+ } else if (!updated) {
98
+ console.log(dim("Change with: oalo privacy set --mode zdr --scrub-pii on"));
99
+ }
100
+ }
101
+
102
+ function fail(msg, code, flags) {
103
+ if (flags?.json) console.log(JSON.stringify({ error: msg }));
104
+ else console.error(msg);
105
+ process.exitCode = code;
106
+ }
@@ -1,25 +1,25 @@
1
1
  {
2
- "version": "0.7.0",
2
+ "version": "0.9.0",
3
3
  "targets": {
4
4
  "darwin-arm64": {
5
5
  "file": "oalo-coord-darwin-arm64.gz",
6
- "sha256": "e689f1a38178d13cc1a10f4d50ce15927da58ca7484e3e963d82bcb73e581893",
7
- "bytes": 24874385
6
+ "sha256": "c7221f4c21ea649c018e6df4a03b3fedab79f83efc5cad2b625533a847f4084b",
7
+ "bytes": 24877357
8
8
  },
9
9
  "darwin-x64": {
10
10
  "file": "oalo-coord-darwin-x64.gz",
11
- "sha256": "c9d7a43b292de653526cd73139e97f5683b5f5cf4fb07392439fdbe32a2e5f81",
12
- "bytes": 27013652
11
+ "sha256": "162190e941cca9cdea1375513442f8dc65401d38a68025599efec90a0c470ea9",
12
+ "bytes": 27015849
13
13
  },
14
14
  "linux-x64": {
15
15
  "file": "oalo-coord-linux-x64.gz",
16
- "sha256": "dad3c5e0dd9a794c200ec2824fbf7a3786700b96f9c46ad18a53b873db645983",
17
- "bytes": 36905376
16
+ "sha256": "d70d6b7fbd1a21ee401e867bac4c89c1324c8daef7180c63603f83ae88091601",
17
+ "bytes": 36908210
18
18
  },
19
19
  "linux-arm64": {
20
20
  "file": "oalo-coord-linux-arm64.gz",
21
- "sha256": "e58aeadf446af3d09806e6525e2edc29888337dd84592e863e82545ed96eb352",
22
- "bytes": 37145971
21
+ "sha256": "181b13cd8d19e9aca9a3305206b910eebd50c48609b4b440508c452169fc36cb",
22
+ "bytes": 37148904
23
23
  }
24
24
  }
25
25
  }
package/src/help.js CHANGED
@@ -221,6 +221,10 @@ export const COMMANDS = [
221
221
  { flag: "--types", desc: "push, CSV only: turn plain numbers, true/false and empty cells into numbers, booleans and null. Off by default so ids like 007 stay text." },
222
222
  { flag: "--from N", desc: "push: skip the first N records, to resume a push that stopped." },
223
223
  { flag: "--new-ids", desc: "push: let the server make ids for records without one. A re-send then adds copies." },
224
+ { flag: "--anonymize", desc: "push: anonymize PII columns locally before upload (default mode: pseudonymize)." },
225
+ { flag: "--anonymize-mode <mode>", desc: "push: client-side PII mode: pseudonymize (deterministic HMAC), mask, drop, or scrub (inline free text)." },
226
+ { flag: "--anonymize-fields <a,b>", desc: "push: comma-separated fields to anonymize (defaults to standard PII columns like email, phone, ssn, dob, address)." },
227
+ { flag: "--salt-file <path>", desc: "push: local HMAC salt file for deterministic pseudonymize joins (default ~/.oalo/anonymize.salt, mode 0600)." },
224
228
  { flag: "--dry-run", desc: "push: parse, check the model exists, show the first row, write nothing." },
225
229
  { flag: "--fields a,b", desc: "vectorize: the fields (a model's) or columns (a plain table's) whose text bots search. Turns it on, and embeds the existing rows." },
226
230
  { flag: "--where <filter>", desc: "vectorize, models only: embed only matching rows. `status in active,draft`, `status not in archived`, `status = active`, `status != archived`, `cover present`, `cover absent`." },
@@ -284,20 +288,27 @@ export const COMMANDS = [
284
288
  },
285
289
  {
286
290
  name: "db",
287
- summary: "Read an env's tables with SQL (your app's own included), dump all of an env's data as plain SQL to keep or take anywhere, or load an existing Postgres database into an env.",
288
- env: "query and tables: --env dev|prod, else the project's env, else dev. dump: --env, default prod, whatever the project's env is. restore: --env is required.",
291
+ summary: "Read tables with SQL (including isolated app schemas), inspect schemas and cross-app grants, share one app's tables with another app, dump an env as SQL, or restore an existing Postgres database.",
292
+ env: "query and tables: --env dev|prod, else the project's env, else dev. dump: --env, default prod, whatever the project's env is. restore: --env is required. schemas, grant and revoke cover both dev and prod.",
289
293
  usage: [
290
- 'oalo db query "<sql>" [--env dev|prod] [--limit <n>] [--json]',
291
- "oalo db tables [--env dev|prod]",
292
- "oalo db dump [--env dev|prod] [--out <file.sql>] [--force]",
293
- "oalo db restore <file> --env dev|prod [--schema <name>] [--check] [--yes]",
294
- "oalo db restore --from-env <VAR> --env dev|prod [--schema <name>] [--check] [--yes]",
294
+ 'oalo db query "<sql>" [--env dev|prod] [--app <slug>] [--limit <n>] [--json]',
295
+ "oalo db tables [--env dev|prod] [--app <slug>]",
296
+ "oalo db schemas [--json]",
297
+ "oalo db grant <owner-app|workspace> --to <grantee-app> [--read-only]",
298
+ "oalo db revoke <owner-app|workspace> --from <grantee-app>",
299
+ "oalo db dump [--env dev|prod] [--app <slug>] [--out <file.sql>] [--force]",
300
+ "oalo db restore <file> --env dev|prod [--app <slug>] [--schema <name>] [--check] [--yes]",
301
+ "oalo db restore --from-env <VAR> --env dev|prod [--app <slug>] [--schema <name>] [--check] [--yes]",
295
302
  ],
296
303
  flags: [
297
304
  { flag: "--env dev|prod", desc: "query, tables: which env. Default the project's, else dev. dump: which env's data. Default prod. restore: which env the data goes into, always on the command line." },
305
+ { flag: "--app <slug>", desc: "Target a specific server app's isolated schema (`app_<slug>_dev` / `app_<slug>_prod`) instead of the shared workspace schema (`dev` / `prod`)." },
306
+ { flag: "--to <grantee-app>", desc: "grant: the app slug receiving SQL access to the owner's schema." },
307
+ { flag: "--from <grantee-app>", desc: "revoke: the app slug whose access to the owner's schema is removed." },
308
+ { flag: "--read-only", desc: "grant: allow SELECT only (default is read/write: SELECT, INSERT, UPDATE, DELETE)." },
298
309
  { flag: "--limit <n>", desc: "query: rows to show. Default 100, at most 1000." },
299
- { flag: "--json", desc: "query: {columns, rows, truncated} as JSON." },
300
- { flag: "--out <file.sql>", desc: "Where to write it. Default <workspace>-<env>-<date>.sql here." },
310
+ { flag: "--json", desc: "query, schemas, grant, revoke: structured JSON output." },
311
+ { flag: "--out <file.sql>", desc: "Where to write it. Default <workspace>-[<app>-]<env>-<date>.sql here." },
301
312
  { flag: "--force", desc: "Replace the file if it exists." },
302
313
  { flag: "--from-env <VAR>", desc: "restore: copy from a running database instead of a file. VAR is the environment variable that holds its postgres:// or postgresql:// URL. Only its host is ever shown." },
303
314
  { flag: "--schema <name>", desc: "restore: the source schema to load. Default public, or the only one when there's just one." },
@@ -305,12 +316,14 @@ export const COMMANDS = [
305
316
  { flag: "--yes", desc: "restore: go ahead with prod without asking. Needed for prod when there's no terminal to ask at." },
306
317
  ],
307
318
  notes: [
308
- "query reads only: one statement (SELECT, WITH, TABLE, VALUES, EXPLAIN or SHOW), run as your app's database login in a read-only transaction that is rolled back, with a 10 second limit. It sees what your app sees at DATABASE_URL: the env's tables, not the platform's. `oalo data` is for Oalo models; this is for any table, your app's own included. Available to workspace admins and members with Developer access.",
309
- "dump is workspace admins only: it holds every member's data. Restore it into any Postgres with psql -f.",
319
+ "New imported/created server apps get isolated schemas (`app_<slug>_dev` and `app_<slug>_prod`) with their own Postgres login, so multiple apps can each keep their own `products`, `orders`, `users` or ORM migrations without colliding. Existing shared apps stay in `dev`/`prod`.",
320
+ "Sharing data across apps without duplication: (1) for shared business data (users, CRM, commerce, Oalo models), have both apps call Oalo's Sync/platform APIs with their injected `OALO_URL` and `OALO_SYNC_TOKEN`; (2) when App B needs direct SQL read/write on App A's app-specific tables, run `oalo db grant <app-a> --to <app-b>` (or `--read-only`). Postgres grants privileges on current and future tables in both dev and prod, and App B receives `APP_SCHEMA_<APP_A>` and `OALO_SHARED_SCHEMAS` in its environment so it can query `\"${process.env.APP_SCHEMA_<APP_A>}\".<table>` without hardcoding dev/prod. Pass `workspace` as the owner to grant direct SQL access to the workspace's `dev`/`prod` schema.",
321
+ "query reads only: one statement (SELECT, WITH, TABLE, VALUES, EXPLAIN or SHOW), run as the env's (or `--app`'s) database login in a read-only transaction that is rolled back, with a 10 second limit. `oalo data` is for Oalo models; this is for any table, your app's own included. Available to workspace admins and members with Developer access.",
322
+ "dump is workspace admins only: without `--app`, it dumps the workspace schema plus every isolated app schema for that env; with `--app <slug>`, it dumps only that app's schema. Restore it into any Postgres with psql -f.",
310
323
  "Your code is in git (oalo deploy --pull); this is the data. Together they are everything you need to run your apps elsewhere.",
311
- "restore loads a dump file made by pg_dump (like Heroku's latest.dump), up to 10 GB, or copies from a database URL. Admins only, and one restore at a time per Base.",
312
- "The tables land in the env's schema, owned by the app's database login, so its Procfile `release:` migrations can alter them. Your app reads them at DATABASE_URL.",
313
- "It's refused if a table name already exists there, and the names are listed. A failed restore leaves the env as it was.",
324
+ "restore loads a dump file made by pg_dump (like Heroku's latest.dump), up to 10 GB, or copies from a database URL. Admins only, and one restore at a time per Base. Pass `--app <slug>` to restore directly into an isolated server app's schema.",
325
+ "The tables land in the target schema, owned by the app's database login, so its Procfile `release:` migrations can alter them. Your app reads them at DATABASE_URL.",
326
+ "It's refused if a table name already exists there, and the names are listed. A failed restore leaves the target schema as it was.",
314
327
  "The URL is never a flag value, since that stays in your shell history. Put it in a variable and pass --from-env VAR.",
315
328
  "Run it with --check first. prod asks before it writes; without a terminal it needs --yes. Stop writes to the old database before the copy: writes made after it starts are lost.",
316
329
  ],
@@ -588,7 +601,8 @@ export const COMMANDS = [
588
601
  "<bot> is the bot's public id (bot_...), as `oalo bots` prints it.",
589
602
  "A source is a table made searchable with `oalo data vectorize <table> --fields ...`. A bot always searches its own knowledge base (documents) too. knowledge lists those documents, and which have priority.",
590
603
  "The same as ticking a table in the bot's Knowledge pane in the dashboard, with the same access as there.",
591
- "settings go through the dashboard's own actions, with the same checks and access. A change sets only the settings it names: the model without the provider keeps the provider, one limit keeps the others, one context.* key keeps the rest of the context config.",
604
+ "settings go through the dashboard's own actions, with the same checks and access. A change sets only the settings it names: the model without the provider keeps the provider (except a provider/model id with a slash, which automatically sets provider=opencode), one limit keeps the others, one context.* key keeps the rest of the context config.",
605
+ "Pick a bot's model with `oalo bots settings <bot> set model=<tier-or-id>`, for example `balanced`, `google/gemini-4-argon`, `bedrock/us.amazon.ergo-1.0`, `openrouter/thinkingmachines/inkling-2-mini`, `openrouter/deepseek/deepseek-v4.1-flash`, `claude-sonnet-4-6`, or a `byo-...` own model. Run `oalo docs ai-steps-and-providers` for the full hosted model table.",
592
606
  "Every setting is described in `man oalo` (BOT SETTINGS) and by `oalo bots settings --explain`.",
593
607
  "The knowledge graph links a bot's passages: each document's sections, and the sections like each other, so a match can bring in related ones and the topics above it. A bot has none until `oalo bots graph <bot> --build`. graph shows its size and whether links are labeled; how answers use it is in settings (graph_retrieval, ancestor_preload_depth, graph_classify_edges). Markdown front matter's related: list links pages by name.",
594
608
  ],
@@ -920,18 +934,101 @@ export const COMMANDS = [
920
934
  },
921
935
  {
922
936
  name: "crm",
923
- summary: "Bulk-import CRM contacts from a CSV file with email/phone deduplication and optional tags.",
924
- usage: ["oalo crm import <file.csv> [--tags a,b] [--dry-run] [--json]"],
937
+ summary: "Bulk-import CRM contacts from a CSV file with email/phone deduplication, optional client-side PII anonymization, and tags.",
938
+ usage: ["oalo crm import <file.csv> [--tags a,b] [--anonymize] [--anonymize-mode pseudonymize|mask|drop|scrub] [--anonymize-fields a,b] [--salt-file <path>] [--dry-run] [--json]"],
925
939
  flags: [
926
940
  { flag: "--tags <a,b>", desc: "Comma-separated tags to apply to every imported contact." },
941
+ { flag: "--anonymize", desc: "Anonymize PII columns locally before upload (default mode: pseudonymize)." },
942
+ { flag: "--anonymize-mode <mode>", desc: "Client-side PII mode: pseudonymize (deterministic HMAC), mask, drop, or scrub (inline free text)." },
943
+ { flag: "--anonymize-fields <a,b>", desc: "Comma-separated fields to anonymize (defaults to standard PII columns like email, phone, ssn, dob, address)." },
944
+ { flag: "--salt-file <path>", desc: "Local HMAC salt file for deterministic pseudonymize joins (default ~/.oalo/anonymize.salt, mode 0600)." },
927
945
  { flag: "--dry-run", desc: "Parse the CSV locally and preview the first 5 rows without writing." },
928
946
  { flag: "--json", desc: "Print JSON output." },
929
947
  ],
930
948
  notes: [
931
949
  "Reads standard CSV headers (`email`, `phone`, `name`, `first_name`, `last_name`, `tags`, `company`, etc.) and upserts via `crm:import_contacts`, deduplicating by email/phone/external_ref.",
950
+ "With `--anonymize`, transformations happen in memory on your machine before any row is uploaded to Oalo.",
932
951
  ],
933
952
  exits: { 0: "done", 1: "refused or failed", 2: "bad arguments, unreadable file, or no CLI token" },
934
953
  },
954
+ {
955
+ name: "privacy",
956
+ summary: "View or set the workspace Privacy Mode (standard, zdr, local_only) and LLM-boundary PII Vault scrubbing.",
957
+ usage: [
958
+ "oalo privacy [--json]",
959
+ "oalo privacy set --mode standard|zdr|local_only [--scrub-pii on|off] [--cloud-embeddings on|off] [--cloud-jobs on|off] [--json]",
960
+ ],
961
+ flags: [
962
+ { flag: "--mode <mode>", desc: "set: workspace privacy tier: standard, zdr (Zero Data Retention: Bedrock and local byo-* only), or local_only (only local byo-* models, no cloud embeddings or cloud background jobs)." },
963
+ { flag: "--scrub-pii <on|off>", desc: "set: deterministically replace SSNs, Luhn credit cards, emails, phones, and IPv4 addresses with tokens before hosted LLM calls." },
964
+ { flag: "--cloud-embeddings <on|off>", desc: "set: allow or disable cloud embeddings (always off in local_only mode)." },
965
+ { flag: "--cloud-jobs <on|off>", desc: "set: allow or disable cloud background LLM jobs such as Whisper transcription and summaries (always off in local_only mode)." },
966
+ { flag: "--json", desc: "Print JSON output." },
967
+ ],
968
+ notes: [
969
+ "Workspace admins can change the policy; all members can inspect it.",
970
+ "Calls inherit the workspace privacy mode and can only raise privacy (never downgrade a zdr or local_only workspace).",
971
+ "For client-side anonymization before import, pass `--anonymize` to `oalo data push` or `oalo crm import`.",
972
+ ],
973
+ exits: { 0: "done", 1: "refused or failed", 2: "bad arguments or no CLI token" },
974
+ },
975
+ {
976
+ name: "calls",
977
+ summary: "Manage Oalo Calls (1-on-1 video rooms, live classes, and Forthwith sessions): list, inspect, share recordings, and verify SHA-256 notarization.",
978
+ usage: [
979
+ "oalo calls list [--kind external|one_on_one|live_class] [--status live|ended] [--json]",
980
+ "oalo calls show <call-id> [--json]",
981
+ "oalo calls share <call-id> --on | --off [--json]",
982
+ "oalo calls verify <call-id> [--json]",
983
+ ],
984
+ flags: [
985
+ { flag: "--kind <kind>", desc: "list: filter by call kind (external, one_on_one, live_class)." },
986
+ { flag: "--status <status>", desc: "list: filter by status (live, ended)." },
987
+ { flag: "--on", desc: "share: allow verified call participants to view the recording and notarized transcript." },
988
+ { flag: "--off", desc: "share: restrict the recording and transcript to the host only." },
989
+ { flag: "--json", desc: "Print JSON output." },
990
+ ],
991
+ notes: [
992
+ "Oalo Calls is the video room, recording, and SHA-256 notarization platform. For the live real-time assistant on external Zoom, Meet, or Teams calls, run `oalo forthwith`.",
993
+ "Note: `oalo call` (singular) calls a raw Base event; `oalo calls` (plural) manages video and external calls.",
994
+ ],
995
+ exits: { 0: "done", 1: "failed or verification mismatch", 2: "bad arguments or no CLI token" },
996
+ },
997
+ {
998
+ name: "forthwith",
999
+ summary: "Forthwith: Oalo's real-time call assistant for Zoom, Meet, Teams, or phone calls with Pre-Call Dossier, private whispers, and SHA-256 notarization.",
1000
+ usage: [
1001
+ "oalo forthwith start [--title <text>] [--contact <ref>] [--booking <id>] [--privacy standard|zdr|local_only] [--local] [--offline] [--stt-cmd <cmd>] [--speaker <name>] [--scrub-pii] [--no-telemetry] [--out <file>] [--json]",
1002
+ "oalo forthwith list [--kind external|one_on_one|live_class] [--status live|ended] [--json]",
1003
+ "oalo forthwith show <call-id> [--json]",
1004
+ "oalo forthwith share <call-id> --on | --off [--json]",
1005
+ "oalo forthwith verify <call-id> [--json]",
1006
+ ],
1007
+ flags: [
1008
+ { flag: "--title <text>", desc: "start: call title (default: External call)." },
1009
+ { flag: "--contact <ref>", desc: "start: contact email, phone, or external ref to preload into the minute-0 Pre-Call Dossier." },
1010
+ { flag: "--booking <id>", desc: "start: link the call to a calendar booking id." },
1011
+ { flag: "--privacy <mode>", desc: "start: call privacy tier (standard, zdr, local_only); cannot downgrade workspace policy." },
1012
+ { flag: "--local", desc: "start: shorthand for --privacy local_only (keeps AI evaluation on local byo-* models)." },
1013
+ { flag: "--offline", desc: "start: strictly local zero-egress capture with local SHA-256 notarization and no network calls." },
1014
+ { flag: "--stt-cmd <cmd>", desc: "start: local speech-to-text command whose stdout lines stream as live transcript turns (for example local whisper-stream)." },
1015
+ { flag: "--speaker <name>", desc: "start: default speaker label for stdin or STT lines without a `Name: text` prefix." },
1016
+ { flag: "--scrub-pii", desc: "start: scrub SSNs, Luhn cards, emails, phones, and IPs locally before sending transcript lines." },
1017
+ { flag: "--no-telemetry", desc: "Disable CLI update notices and telemetry (same as OALO_NO_TELEMETRY=1)." },
1018
+ { flag: "--out <file>", desc: "start with --offline: save the locally notarized transcript JSON file (mode 0600)." },
1019
+ { flag: "--kind <kind>", desc: "list: filter by call kind (external, one_on_one, live_class)." },
1020
+ { flag: "--status <status>", desc: "list: filter by status (live, ended)." },
1021
+ { flag: "--on", desc: "share: allow verified call participants to view the recording and notarized transcript." },
1022
+ { flag: "--off", desc: "share: restrict the recording and transcript to the host only." },
1023
+ { flag: "--json", desc: "Print JSON (or NDJSON event stream during start)." },
1024
+ ],
1025
+ notes: [
1026
+ "During a live session, type `/ask <question>` for an instant private whisper card, `/share <title> | <content> [| <url>]` to push an attendee card, `/brief` to re-print the Pre-Call Dossier, or `/end` to finish and notarize the call.",
1027
+ "Lines prefixed with `Name: utterance` automatically tag the speaker; other lines use `--speaker`.",
1028
+ "Use `--offline --scrub-pii --no-telemetry` for zero-egress local transcription and local SHA-256 notarization.",
1029
+ ],
1030
+ exits: { 0: "done", 1: "failed or verification mismatch", 2: "bad arguments or no CLI token" },
1031
+ },
935
1032
  {
936
1033
  name: "flows",
937
1034
  summary: "Turn a chat flow on or off, or delete it, by bot and flow name, without pulling and pushing it.",
@@ -1307,6 +1404,7 @@ export const ENV_VARS = [
1307
1404
  { name: "OALO_HOME", desc: "Relocate the credential store (CI, containers, tests)." },
1308
1405
  { name: "OALO_AGENT_HARNESS", desc: "Default headless agent harness for coord up, ralph, race, review, swarm, auto." },
1309
1406
  { name: "OALO_DEBUG", desc: "Log channel transport activity to stderr." },
1407
+ { name: "OALO_NO_TELEMETRY", desc: "Set to 1 to suppress CLI update notices and telemetry." },
1310
1408
  { name: "NO_COLOR", desc: "Disable colour in tail output." },
1311
1409
  ];
1312
1410
 
package/src/index.js CHANGED
@@ -41,6 +41,9 @@ import { serve } from "./commands/serve.js";
41
41
  import { usage } from "./commands/usage.js";
42
42
  import { inbox } from "./commands/inbox.js";
43
43
  import { crm } from "./commands/crm.js";
44
+ import { privacy } from "./commands/privacy.js";
45
+ import { calls } from "./commands/calls.js";
46
+ import { forthwith } from "./commands/forthwith.js";
44
47
  import { ralph } from "./commands/ralph.js";
45
48
  import { race } from "./commands/race.js";
46
49
  import { review } from "./commands/review.js";
@@ -89,10 +92,13 @@ if ((flags.version || cmd === "version") && !flags.help) {
89
92
  } else if (!COMMANDS.some((c) => c.name === cmd)) {
90
93
  finish(`unknown command: ${cmd}\n\n${overview()}`, 2, process.stderr);
91
94
  } else {
95
+ if (flags["no-telemetry"]) process.env.OALO_NO_TELEMETRY = "1";
96
+
92
97
  // A project whose installed skill is from another CLI version hears about
93
98
  // it once (stderr, so piped output and --json stay clean). Not under mcp,
94
- // whose stdio is the protocol, nor where the skill is being written.
95
- if (cmd && !["mcp", "skill", "link", "help"].includes(cmd)) {
99
+ // whose stdio is the protocol, nor where the skill is being written, nor
100
+ // when OALO_NO_TELEMETRY=1 is set.
101
+ if (cmd && !["mcp", "skill", "link", "help"].includes(cmd) && process.env.OALO_NO_TELEMETRY !== "1") {
96
102
  try {
97
103
  const notice = skillNotice();
98
104
  if (notice) console.error(dim(notice));
@@ -208,6 +214,15 @@ async function dispatch(cmd) {
208
214
  case "crm":
209
215
  await crm(flags, rest);
210
216
  break;
217
+ case "privacy":
218
+ await privacy(flags, rest);
219
+ break;
220
+ case "calls":
221
+ await calls(flags, rest);
222
+ break;
223
+ case "forthwith":
224
+ await forthwith(flags, rest);
225
+ break;
211
226
  case "ralph":
212
227
  await ralph(flags, rest);
213
228
  break;
@@ -17,7 +17,7 @@ export const TOOL_GROUPS = {
17
17
  "look around": ["oalo_describe", "oalo_list_apps", "oalo_list_bots", "oalo_get_bot", "oalo_list_loops", "oalo_docs", "oalo_jobs"],
18
18
  "chat flows": ["oalo_node_catalog", "oalo_list_flows", "oalo_get_flow", "oalo_lint_flow", "oalo_save_flow", "oalo_set_flow_enabled", "oalo_delete_flow", "oalo_test_conversation", "oalo_flow_runs", "oalo_get_conversation"],
19
19
  "loops (workflows)": ["oalo_get_loop", "oalo_lint_loop", "oalo_save_loop", "oalo_loop_triggers", "oalo_test_loop", "oalo_loop_runs", "oalo_set_loop_enabled", "oalo_run_loop_now", "oalo_delete_loop", "oalo_emit", "oalo_loop_docs"],
20
- "data": ["oalo_list_models", "oalo_create_model", "oalo_read_rows", "oalo_write_rows", "oalo_promote_model", "oalo_db_query", "oalo_query_metrics", "oalo_sync_routes", "oalo_list_dashboards", "oalo_save_dashboard_widget", "oalo_sources"],
20
+ "data": ["oalo_list_models", "oalo_create_model", "oalo_read_rows", "oalo_write_rows", "oalo_promote_model", "oalo_db_query", "oalo_db_schemas", "oalo_query_metrics", "oalo_sync_routes", "oalo_list_dashboards", "oalo_save_dashboard_widget", "oalo_sources"],
21
21
  "code tools": ["oalo_list_functions", "oalo_generate_tool", "oalo_get_tool_source", "oalo_save_tool_source", "oalo_tool_templates", "oalo_bot_tools"],
22
22
  "apps": ["oalo_app_logs", "oalo_releases", "oalo_incidents", "oalo_secrets"],
23
23
  "channels and sales": ["oalo_widgets", "oalo_wa_templates", "oalo_rehearse_inbound", "oalo_pipelines"],
package/src/mcp/tools.js CHANGED
@@ -204,8 +204,15 @@ export const TOOLS = [
204
204
  max_iterations: { type: "number" },
205
205
  max_cost_usd: { type: "number" },
206
206
  session_mode: { type: "string", enum: ["recursive", "persistent"] },
207
- provider: { type: "string", enum: ["anthropic", "opencode"] },
208
- model: { type: "string" },
207
+ provider: {
208
+ type: "string",
209
+ enum: ["anthropic", "opencode"],
210
+ description: "Default AI provider (opencode covers Gemini, Amazon Bedrock, OpenRouter/Thinking Machines/DeepSeek/Qwen/MiniMax/Llama, GLM, OpenAI, and own models; anthropic is Claude). Auto-selected when model contains '/'.",
211
+ },
212
+ model: {
213
+ type: "string",
214
+ description: "Default AI model tier (cheap, balanced, max) or concrete id (e.g. google/gemini-4-argon, bedrock/us.amazon.ergo-1.0, openrouter/thinkingmachines/inkling-2-mini, openrouter/deepseek/deepseek-v4-pro, claude-sonnet-4-6).",
215
+ },
209
216
  base_version: { type: "number", description: "The `version` from oalo_get_loop. Enables the conflict check." },
210
217
  strict: { type: "boolean", description: "Refuse the save on any error-level lint finding (default true)." },
211
218
  },
@@ -748,20 +755,26 @@ export const TOOLS = [
748
755
  {
749
756
  name: "oalo_db_query",
750
757
  description:
751
- "One read-only SQL statement against an env's tables, as the app's own database login sees them (the server apps' own tables and the Oalo models; not the platform's). Use it to check rows an app wrote to its own table, which oalo_read_rows can't see (it reads Oalo models only). SELECT, WITH, TABLE, VALUES, EXPLAIN or SHOW; run in a read-only transaction that is rolled back, 10 second limit. List the tables with: select relname from pg_class c join pg_namespace n on n.oid = c.relnamespace where n.nspname = current_schema() and relkind = 'r'. Workspace admins and members with Developer access. Rows can hold customers' details: never repeat those. Read-only.",
758
+ "One read-only SQL statement against an env's (or isolated app's) tables, as the app's own database login sees them (the server app's own tables and/or Oalo models; not the platform's). Pass `app` (slug) to target an isolated server app's dedicated schema (`app_<slug>_<env>`). Use it to check rows an app wrote to its own table, which oalo_read_rows can't see (it reads Oalo models only). SELECT, WITH, TABLE, VALUES, EXPLAIN or SHOW; run in a read-only transaction that is rolled back, 10 second limit. List the tables with: select relname from pg_class c join pg_namespace n on n.oid = c.relnamespace where n.nspname = current_schema() and relkind = 'r'. Workspace admins and members with Developer access. Rows can hold customers' details: never repeat those. Read-only.",
752
759
  inputSchema: S(
753
760
  {
754
761
  sql: { type: "string", description: "One statement" },
755
762
  env: { type: "string", enum: ["dev", "prod"], description: "dev (staging, the default) or prod (live)" },
763
+ app: { type: "string", description: "Optional app slug for an isolated server app (`app_<slug>_<env>`)" },
756
764
  limit: { type: "integer", description: "Rows, default 100, at most 1000" },
757
765
  },
758
766
  ["sql"],
759
767
  ),
760
- run: async (_oalo, { sql, env, limit }, ctx) => {
768
+ run: async (_oalo, { sql, env, app, limit }, ctx) => {
761
769
  const res = await fetch(`${String(ctx.url).replace(/\/$/, "")}/api/cli/v1/db/query`, {
762
770
  method: "POST",
763
771
  headers: { authorization: `Bearer ${ctx.token}`, "content-type": "application/json" },
764
- body: JSON.stringify({ sql, env: env === "prod" ? "prod" : "dev", ...(limit ? { limit } : {}) }),
772
+ body: JSON.stringify({
773
+ sql,
774
+ env: env === "prod" ? "prod" : "dev",
775
+ ...(app ? { app } : {}),
776
+ ...(limit ? { limit } : {}),
777
+ }),
765
778
  });
766
779
  const body = await res.json().catch(() => ({}));
767
780
  if (res.status === 404) throw new Error("this workspace doesn't have db queries yet (it comes with a newer Base)");
@@ -769,6 +782,20 @@ export const TOOLS = [
769
782
  return body;
770
783
  },
771
784
  },
785
+ {
786
+ name: "oalo_db_schemas",
787
+ description:
788
+ "List the workspace's Postgres schemas (`dev`, `prod`), every isolated server app's dedicated schemas (`app_<slug>_dev`, `app_<slug>_prod`), and any active cross-app schema grants (`oalo db grant <owner> --to <grantee>`). Call this before `oalo_db_query` or before wiring one app to read/write another app's tables so you know the exact schema names and injected `APP_SCHEMA_<OWNER>` env vars. Read-only.",
789
+ inputSchema: S({}),
790
+ run: async (_oalo, _args, ctx) => {
791
+ const res = await fetch(`${String(ctx.url).replace(/\/$/, "")}/api/cli/v1/db/schemas`, {
792
+ headers: { authorization: `Bearer ${ctx.token}` },
793
+ });
794
+ const body = await res.json().catch(() => ({}));
795
+ if (!res.ok) throw new Error(body?.error?.message || `could not list schemas (HTTP ${res.status})`);
796
+ return body;
797
+ },
798
+ },
772
799
  {
773
800
  name: "oalo_query_metrics",
774
801
  description: