@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.
package/man/oalo.1 CHANGED
@@ -1,4 +1,4 @@
1
- .TH OALO 1 "" "oalo 0.7.0" "OALO CLI"
1
+ .TH OALO 1 "" "oalo 0.9.0" "OALO CLI"
2
2
  .SH NAME
3
3
  oalo \- wire a local app into your Oalo workspace
4
4
  .SH SYNOPSIS
@@ -354,6 +354,18 @@ push: skip the first N records, to resume a push that stopped.
354
354
  \fB\-\-new\-ids\fR
355
355
  push: let the server make ids for records without one. A re\-send then adds copies.
356
356
  .TP
357
+ \fB\-\-anonymize\fR
358
+ push: anonymize PII columns locally before upload (default mode: pseudonymize).
359
+ .TP
360
+ \fB\-\-anonymize\-mode <mode>\fR
361
+ push: client\-side PII mode: pseudonymize (deterministic HMAC), mask, drop, or scrub (inline free text).
362
+ .TP
363
+ \fB\-\-anonymize\-fields <a,b>\fR
364
+ push: comma\-separated fields to anonymize (defaults to standard PII columns like email, phone, ssn, dob, address).
365
+ .TP
366
+ \fB\-\-salt\-file <path>\fR
367
+ push: local HMAC salt file for deterministic pseudonymize joins (default ~/.oalo/anonymize.salt, mode 0600).
368
+ .TP
357
369
  \fB\-\-dry\-run\fR
358
370
  push: parse, check the model exists, show the first row, write nothing.
359
371
  .TP
@@ -452,32 +464,50 @@ Each one says what was seen: which process, how many restarts, a memory kill wit
452
464
  .PP
453
465
  Exit codes: 0 no open incident; 1 an incident is open, or the request failed; 2 bad arguments or no CLI token.
454
466
  .SS db
455
- 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.
467
+ 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.
456
468
  .PP
457
- \fBEnv:\fR 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.
469
+ \fBEnv:\fR 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.
458
470
  .PP
459
- \fBoalo db query "<sql>" [\-\-env dev|prod] [\-\-limit <n>] [\-\-json]\fR
471
+ \fBoalo db query "<sql>" [\-\-env dev|prod] [\-\-app <slug>] [\-\-limit <n>] [\-\-json]\fR
472
+ .br
473
+ \fBoalo db tables [\-\-env dev|prod] [\-\-app <slug>]\fR
474
+ .br
475
+ \fBoalo db schemas [\-\-json]\fR
460
476
  .br
461
- \fBoalo db tables [\-\-env dev|prod]\fR
477
+ \fBoalo db grant <owner\-app|workspace> \-\-to <grantee\-app> [\-\-read\-only]\fR
462
478
  .br
463
- \fBoalo db dump [\-\-env dev|prod] [\-\-out <file.sql>] [\-\-force]\fR
479
+ \fBoalo db revoke <owner\-app|workspace> \-\-from <grantee\-app>\fR
464
480
  .br
465
- \fBoalo db restore <file> \-\-env dev|prod [\-\-schema <name>] [\-\-check] [\-\-yes]\fR
481
+ \fBoalo db dump [\-\-env dev|prod] [\-\-app <slug>] [\-\-out <file.sql>] [\-\-force]\fR
466
482
  .br
467
- \fBoalo db restore \-\-from\-env <VAR> \-\-env dev|prod [\-\-schema <name>] [\-\-check] [\-\-yes]\fR
483
+ \fBoalo db restore <file> \-\-env dev|prod [\-\-app <slug>] [\-\-schema <name>] [\-\-check] [\-\-yes]\fR
484
+ .br
485
+ \fBoalo db restore \-\-from\-env <VAR> \-\-env dev|prod [\-\-app <slug>] [\-\-schema <name>] [\-\-check] [\-\-yes]\fR
468
486
  .br
469
487
  .TP
470
488
  \fB\-\-env dev|prod\fR
471
489
  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.
472
490
  .TP
491
+ \fB\-\-app <slug>\fR
492
+ Target a specific server app's isolated schema (\fBapp_<slug>_dev\fR / \fBapp_<slug>_prod\fR) instead of the shared workspace schema (\fBdev\fR / \fBprod\fR).
493
+ .TP
494
+ \fB\-\-to <grantee\-app>\fR
495
+ grant: the app slug receiving SQL access to the owner's schema.
496
+ .TP
497
+ \fB\-\-from <grantee\-app>\fR
498
+ revoke: the app slug whose access to the owner's schema is removed.
499
+ .TP
500
+ \fB\-\-read\-only\fR
501
+ grant: allow SELECT only (default is read/write: SELECT, INSERT, UPDATE, DELETE).
502
+ .TP
473
503
  \fB\-\-limit <n>\fR
474
504
  query: rows to show. Default 100, at most 1000.
475
505
  .TP
476
506
  \fB\-\-json\fR
477
- query: {columns, rows, truncated} as JSON.
507
+ query, schemas, grant, revoke: structured JSON output.
478
508
  .TP
479
509
  \fB\-\-out <file.sql>\fR
480
- Where to write it. Default <workspace>\-<env>\-<date>.sql here.
510
+ Where to write it. Default <workspace>\-[<app>\-]<env>\-<date>.sql here.
481
511
  .TP
482
512
  \fB\-\-force\fR
483
513
  Replace the file if it exists.
@@ -494,17 +524,21 @@ restore: do everything but the write, and report what would happen. Nothing is w
494
524
  \fB\-\-yes\fR
495
525
  restore: go ahead with prod without asking. Needed for prod when there's no terminal to ask at.
496
526
  .IP \(bu 2
497
- 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. \fBoalo data\fR is for Oalo models; this is for any table, your app's own included. Available to workspace admins and members with Developer access.
527
+ New imported/created server apps get isolated schemas (\fBapp_<slug>_dev\fR and \fBapp_<slug>_prod\fR) with their own Postgres login, so multiple apps can each keep their own \fBproducts\fR, \fBorders\fR, \fBusers\fR or ORM migrations without colliding. Existing shared apps stay in \fBdev\fR/\fBprod\fR.
528
+ .IP \(bu 2
529
+ 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 \fBOALO_URL\fR and \fBOALO_SYNC_TOKEN\fR; (2) when App B needs direct SQL read/write on App A's app\-specific tables, run \fBoalo db grant <app\-a> \-\-to <app\-b>\fR (or \fB\-\-read\-only\fR). Postgres grants privileges on current and future tables in both dev and prod, and App B receives \fBAPP_SCHEMA_<APP_A>\fR and \fBOALO_SHARED_SCHEMAS\fR in its environment so it can query \fB"${process.env.APP_SCHEMA_<APP_A>}".<table>\fR without hardcoding dev/prod. Pass \fBworkspace\fR as the owner to grant direct SQL access to the workspace's \fBdev\fR/\fBprod\fR schema.
530
+ .IP \(bu 2
531
+ query reads only: one statement (SELECT, WITH, TABLE, VALUES, EXPLAIN or SHOW), run as the env's (or \fB\-\-app\fR's) database login in a read\-only transaction that is rolled back, with a 10 second limit. \fBoalo data\fR is for Oalo models; this is for any table, your app's own included. Available to workspace admins and members with Developer access.
498
532
  .IP \(bu 2
499
- dump is workspace admins only: it holds every member's data. Restore it into any Postgres with psql \-f.
533
+ dump is workspace admins only: without \fB\-\-app\fR, it dumps the workspace schema plus every isolated app schema for that env; with \fB\-\-app <slug>\fR, it dumps only that app's schema. Restore it into any Postgres with psql \-f.
500
534
  .IP \(bu 2
501
535
  Your code is in git (oalo deploy \-\-pull); this is the data. Together they are everything you need to run your apps elsewhere.
502
536
  .IP \(bu 2
503
- 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.
537
+ 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 \fB\-\-app <slug>\fR to restore directly into an isolated server app's schema.
504
538
  .IP \(bu 2
505
- The tables land in the env's schema, owned by the app's database login, so its Procfile \fBrelease:\fR migrations can alter them. Your app reads them at DATABASE_URL.
539
+ The tables land in the target schema, owned by the app's database login, so its Procfile \fBrelease:\fR migrations can alter them. Your app reads them at DATABASE_URL.
506
540
  .IP \(bu 2
507
- It's refused if a table name already exists there, and the names are listed. A failed restore leaves the env as it was.
541
+ 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.
508
542
  .IP \(bu 2
509
543
  The URL is never a flag value, since that stays in your shell history. Put it in a variable and pass \-\-from\-env VAR.
510
544
  .IP \(bu 2
@@ -1001,7 +1035,9 @@ A source is a table made searchable with \fBoalo data vectorize <table> \-\-fiel
1001
1035
  .IP \(bu 2
1002
1036
  The same as ticking a table in the bot's Knowledge pane in the dashboard, with the same access as there.
1003
1037
  .IP \(bu 2
1004
- 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.
1038
+ 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.
1039
+ .IP \(bu 2
1040
+ Pick a bot's model with \fBoalo bots settings <bot> set model=<tier\-or\-id>\fR, for example \fBbalanced\fR, \fBgoogle/gemini\-4\-argon\fR, \fBbedrock/us.amazon.ergo\-1.0\fR, \fBopenrouter/thinkingmachines/inkling\-2\-mini\fR, \fBopenrouter/deepseek/deepseek\-v4.1\-flash\fR, \fBclaude\-sonnet\-4\-6\fR, or a \fBbyo\-...\fR own model. Run \fBoalo docs ai\-steps\-and\-providers\fR for the full hosted model table.
1005
1041
  .IP \(bu 2
1006
1042
  Every setting is described in \fBman oalo\fR (BOT SETTINGS) and by \fBoalo bots settings \-\-explain\fR.
1007
1043
  .IP \(bu 2
@@ -1539,14 +1575,26 @@ Saved replies (\fBoalo inbox replies\fR) are org\-wide \fB/\fR quick replies ava
1539
1575
  .PP
1540
1576
  Exit codes: 0 done; 1 refused or failed; 2 bad arguments or no CLI token.
1541
1577
  .SS crm
1542
- Bulk\-import CRM contacts from a CSV file with email/phone deduplication and optional tags.
1578
+ Bulk\-import CRM contacts from a CSV file with email/phone deduplication, optional client\-side PII anonymization, and tags.
1543
1579
  .PP
1544
- \fBoalo crm import <file.csv> [\-\-tags a,b] [\-\-dry\-run] [\-\-json]\fR
1580
+ \fBoalo crm import <file.csv> [\-\-tags a,b] [\-\-anonymize] [\-\-anonymize\-mode pseudonymize|mask|drop|scrub] [\-\-anonymize\-fields a,b] [\-\-salt\-file <path>] [\-\-dry\-run] [\-\-json]\fR
1545
1581
  .br
1546
1582
  .TP
1547
1583
  \fB\-\-tags <a,b>\fR
1548
1584
  Comma\-separated tags to apply to every imported contact.
1549
1585
  .TP
1586
+ \fB\-\-anonymize\fR
1587
+ Anonymize PII columns locally before upload (default mode: pseudonymize).
1588
+ .TP
1589
+ \fB\-\-anonymize\-mode <mode>\fR
1590
+ Client\-side PII mode: pseudonymize (deterministic HMAC), mask, drop, or scrub (inline free text).
1591
+ .TP
1592
+ \fB\-\-anonymize\-fields <a,b>\fR
1593
+ Comma\-separated fields to anonymize (defaults to standard PII columns like email, phone, ssn, dob, address).
1594
+ .TP
1595
+ \fB\-\-salt\-file <path>\fR
1596
+ Local HMAC salt file for deterministic pseudonymize joins (default ~/.oalo/anonymize.salt, mode 0600).
1597
+ .TP
1550
1598
  \fB\-\-dry\-run\fR
1551
1599
  Parse the CSV locally and preview the first 5 rows without writing.
1552
1600
  .TP
@@ -1554,8 +1602,141 @@ Parse the CSV locally and preview the first 5 rows without writing.
1554
1602
  Print JSON output.
1555
1603
  .IP \(bu 2
1556
1604
  Reads standard CSV headers (\fBemail\fR, \fBphone\fR, \fBname\fR, \fBfirst_name\fR, \fBlast_name\fR, \fBtags\fR, \fBcompany\fR, etc.) and upserts via \fBcrm:import_contacts\fR, deduplicating by email/phone/external_ref.
1605
+ .IP \(bu 2
1606
+ With \fB\-\-anonymize\fR, transformations happen in memory on your machine before any row is uploaded to Oalo.
1557
1607
  .PP
1558
1608
  Exit codes: 0 done; 1 refused or failed; 2 bad arguments, unreadable file, or no CLI token.
1609
+ .SS privacy
1610
+ View or set the workspace Privacy Mode (standard, zdr, local_only) and LLM\-boundary PII Vault scrubbing.
1611
+ .PP
1612
+ \fBoalo privacy [\-\-json]\fR
1613
+ .br
1614
+ \fBoalo privacy set \-\-mode standard|zdr|local_only [\-\-scrub\-pii on|off] [\-\-cloud\-embeddings on|off] [\-\-cloud\-jobs on|off] [\-\-json]\fR
1615
+ .br
1616
+ .TP
1617
+ \fB\-\-mode <mode>\fR
1618
+ 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).
1619
+ .TP
1620
+ \fB\-\-scrub\-pii <on|off>\fR
1621
+ set: deterministically replace SSNs, Luhn credit cards, emails, phones, and IPv4 addresses with tokens before hosted LLM calls.
1622
+ .TP
1623
+ \fB\-\-cloud\-embeddings <on|off>\fR
1624
+ set: allow or disable cloud embeddings (always off in local_only mode).
1625
+ .TP
1626
+ \fB\-\-cloud\-jobs <on|off>\fR
1627
+ set: allow or disable cloud background LLM jobs such as Whisper transcription and summaries (always off in local_only mode).
1628
+ .TP
1629
+ \fB\-\-json\fR
1630
+ Print JSON output.
1631
+ .IP \(bu 2
1632
+ Workspace admins can change the policy; all members can inspect it.
1633
+ .IP \(bu 2
1634
+ Calls inherit the workspace privacy mode and can only raise privacy (never downgrade a zdr or local_only workspace).
1635
+ .IP \(bu 2
1636
+ For client\-side anonymization before import, pass \fB\-\-anonymize\fR to \fBoalo data push\fR or \fBoalo crm import\fR.
1637
+ .PP
1638
+ Exit codes: 0 done; 1 refused or failed; 2 bad arguments or no CLI token.
1639
+ .SS calls
1640
+ Manage Oalo Calls (1\-on\-1 video rooms, live classes, and Forthwith sessions): list, inspect, share recordings, and verify SHA\-256 notarization.
1641
+ .PP
1642
+ \fBoalo calls list [\-\-kind external|one_on_one|live_class] [\-\-status live|ended] [\-\-json]\fR
1643
+ .br
1644
+ \fBoalo calls show <call\-id> [\-\-json]\fR
1645
+ .br
1646
+ \fBoalo calls share <call\-id> \-\-on | \-\-off [\-\-json]\fR
1647
+ .br
1648
+ \fBoalo calls verify <call\-id> [\-\-json]\fR
1649
+ .br
1650
+ .TP
1651
+ \fB\-\-kind <kind>\fR
1652
+ list: filter by call kind (external, one_on_one, live_class).
1653
+ .TP
1654
+ \fB\-\-status <status>\fR
1655
+ list: filter by status (live, ended).
1656
+ .TP
1657
+ \fB\-\-on\fR
1658
+ share: allow verified call participants to view the recording and notarized transcript.
1659
+ .TP
1660
+ \fB\-\-off\fR
1661
+ share: restrict the recording and transcript to the host only.
1662
+ .TP
1663
+ \fB\-\-json\fR
1664
+ Print JSON output.
1665
+ .IP \(bu 2
1666
+ 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 \fBoalo forthwith\fR.
1667
+ .IP \(bu 2
1668
+ Note: \fBoalo call\fR (singular) calls a raw Base event; \fBoalo calls\fR (plural) manages video and external calls.
1669
+ .PP
1670
+ Exit codes: 0 done; 1 failed or verification mismatch; 2 bad arguments or no CLI token.
1671
+ .SS forthwith
1672
+ Forthwith: Oalo's real\-time call assistant for Zoom, Meet, Teams, or phone calls with Pre\-Call Dossier, private whispers, and SHA\-256 notarization.
1673
+ .PP
1674
+ \fBoalo 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]\fR
1675
+ .br
1676
+ \fBoalo forthwith list [\-\-kind external|one_on_one|live_class] [\-\-status live|ended] [\-\-json]\fR
1677
+ .br
1678
+ \fBoalo forthwith show <call\-id> [\-\-json]\fR
1679
+ .br
1680
+ \fBoalo forthwith share <call\-id> \-\-on | \-\-off [\-\-json]\fR
1681
+ .br
1682
+ \fBoalo forthwith verify <call\-id> [\-\-json]\fR
1683
+ .br
1684
+ .TP
1685
+ \fB\-\-title <text>\fR
1686
+ start: call title (default: External call).
1687
+ .TP
1688
+ \fB\-\-contact <ref>\fR
1689
+ start: contact email, phone, or external ref to preload into the minute\-0 Pre\-Call Dossier.
1690
+ .TP
1691
+ \fB\-\-booking <id>\fR
1692
+ start: link the call to a calendar booking id.
1693
+ .TP
1694
+ \fB\-\-privacy <mode>\fR
1695
+ start: call privacy tier (standard, zdr, local_only); cannot downgrade workspace policy.
1696
+ .TP
1697
+ \fB\-\-local\fR
1698
+ start: shorthand for \-\-privacy local_only (keeps AI evaluation on local byo\-* models).
1699
+ .TP
1700
+ \fB\-\-offline\fR
1701
+ start: strictly local zero\-egress capture with local SHA\-256 notarization and no network calls.
1702
+ .TP
1703
+ \fB\-\-stt\-cmd <cmd>\fR
1704
+ start: local speech\-to\-text command whose stdout lines stream as live transcript turns (for example local whisper\-stream).
1705
+ .TP
1706
+ \fB\-\-speaker <name>\fR
1707
+ start: default speaker label for stdin or STT lines without a \fBName: text\fR prefix.
1708
+ .TP
1709
+ \fB\-\-scrub\-pii\fR
1710
+ start: scrub SSNs, Luhn cards, emails, phones, and IPs locally before sending transcript lines.
1711
+ .TP
1712
+ \fB\-\-no\-telemetry\fR
1713
+ Disable CLI update notices and telemetry (same as OALO_NO_TELEMETRY=1).
1714
+ .TP
1715
+ \fB\-\-out <file>\fR
1716
+ start with \-\-offline: save the locally notarized transcript JSON file (mode 0600).
1717
+ .TP
1718
+ \fB\-\-kind <kind>\fR
1719
+ list: filter by call kind (external, one_on_one, live_class).
1720
+ .TP
1721
+ \fB\-\-status <status>\fR
1722
+ list: filter by status (live, ended).
1723
+ .TP
1724
+ \fB\-\-on\fR
1725
+ share: allow verified call participants to view the recording and notarized transcript.
1726
+ .TP
1727
+ \fB\-\-off\fR
1728
+ share: restrict the recording and transcript to the host only.
1729
+ .TP
1730
+ \fB\-\-json\fR
1731
+ Print JSON (or NDJSON event stream during start).
1732
+ .IP \(bu 2
1733
+ During a live session, type \fB/ask <question>\fR for an instant private whisper card, \fB/share <title> | <content> [| <url>]\fR to push an attendee card, \fB/brief\fR to re\-print the Pre\-Call Dossier, or \fB/end\fR to finish and notarize the call.
1734
+ .IP \(bu 2
1735
+ Lines prefixed with \fBName: utterance\fR automatically tag the speaker; other lines use \fB\-\-speaker\fR.
1736
+ .IP \(bu 2
1737
+ Use \fB\-\-offline \-\-scrub\-pii \-\-no\-telemetry\fR for zero\-egress local transcription and local SHA\-256 notarization.
1738
+ .PP
1739
+ Exit codes: 0 done; 1 failed or verification mismatch; 2 bad arguments or no CLI token.
1559
1740
  .SS flows
1560
1741
  Turn a chat flow on or off, or delete it, by bot and flow name, without pulling and pushing it.
1561
1742
  .PP
@@ -2258,12 +2439,12 @@ Values: true or false. Default: false.
2258
2439
  .SS model
2259
2440
  .TP
2260
2441
  \fBmodel\fR
2261
- The AI model this bot answers with. default: the workspace's default model.
2442
+ The AI model this bot answers with: a tier (cheap, balanced, max), a hosted id (for example google/gemini\-4\-argon, bedrock/us.amazon.ergo\-1.0, openrouter/thinkingmachines/inkling\-2\-mini, openrouter/deepseek/deepseek\-v4\-pro, openrouter/deepseek/deepseek\-v4.1\-flash, claude\-sonnet\-4\-6), or an own model id (byo\-...). Any provider/model id with a slash automatically sets provider=opencode. default: the workspace's default model. See \fBoalo docs ai\-steps\-and\-providers\fR for the full list.
2262
2443
  .br
2263
2444
  Values: text, or default. Default: default.
2264
2445
  .TP
2265
2446
  \fBprovider\fR
2266
- How the model is reached: anthropic directly, or opencode (for models from other providers). default: anthropic.
2447
+ How the model is reached: opencode (Gemini, Amazon Bedrock, Thinking Machines, DeepSeek, Qwen, GLM, MiniMax, Llama, OpenAI, and own models; default) or anthropic (Claude directly). Setting a provider/model id automatically picks opencode.
2267
2448
  .br
2268
2449
  Values: anthropic | opencode, or default. Default: default.
2269
2450
  .TP
@@ -2390,6 +2571,9 @@ Default headless agent harness for coord up, ralph, race, review, swarm, auto.
2390
2571
  \fBOALO_DEBUG\fR
2391
2572
  Log channel transport activity to stderr.
2392
2573
  .TP
2574
+ \fBOALO_NO_TELEMETRY\fR
2575
+ Set to 1 to suppress CLI update notices and telemetry.
2576
+ .TP
2393
2577
  \fBNO_COLOR\fR
2394
2578
  Disable colour in tail output.
2395
2579
  .SH SEE ALSO
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oalo-ai/cli",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Wire a local app into your OALO workspace: link a token, generate typed bindings, and serve the build surface over MCP.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oalo",
3
3
  "description": "Work on an Oalo workspace from Claude Code: edit chat flows, loops and code tools, deploy and migrate apps, inspect and self-heal runtime errors, and run test conversations with a bot.",
4
- "version": "0.4.0",
4
+ "version": "0.6.0",
5
5
  "author": { "name": "Oalo" },
6
6
  "mcpServers": {
7
7
  "oalo": {
@@ -191,14 +191,17 @@ oalo data push orders_mirror orders.csv --id-field order_no --dry-run # chec
191
191
  oalo data push orders_mirror orders.csv --id-field order_no # upsert into dev
192
192
  oalo data list orders_mirror --limit 5 # look at what landed
193
193
  oalo data promote orders_mirror # copy dev rows to prod, when the person wants it live
194
- oalo db tables # every table in the env, your app's own included
195
- oalo db query "select * from quotes order by id desc limit 5" # read any of them (read-only; MCP: oalo_db_query)
194
+ oalo db schemas # list workspace + isolated app schemas and cross-app grants (MCP: oalo_db_schemas)
195
+ oalo db tables [--app <slug>] # tables in workspace dev/prod or an isolated app's schema
196
+ oalo db query "select * from quotes order by id desc limit 5" [--app <slug>] # read-only SQL (MCP: oalo_db_query)
197
+ oalo db grant <owner-app|workspace> --to <grantee-app> [--read-only] # let one server app read/write another app's tables
198
+ oalo db revoke <owner-app|workspace> --from <grantee-app> # remove cross-app SQL access
196
199
  oalo data routes # the Sync API's endpoints, scopes and limits
197
200
  ```
198
201
 
199
202
  Over MCP: `oalo_list_models`, `oalo_create_model`, `oalo_read_rows`,
200
203
  `oalo_write_rows` (env required; prod needs `confirm`), `oalo_promote_model`,
201
- `oalo_sync_routes`.
204
+ `oalo_db_schemas`, `oalo_db_query`, `oalo_sync_routes`.
202
205
 
203
206
  1. **Look before you create.** Reuse a model that exists (`oalo data models`).
204
207
  Use `--owned-by <field>` only when each app user owns their rows.
@@ -208,11 +211,21 @@ Over MCP: `oalo_list_models`, `oalo_create_model`, `oalo_read_rows`,
208
211
  at once, so writing there needs `--env prod` and the person's go-ahead. A
209
212
  draft bot reads dev and a published one prod, so load rows where the bot
210
213
  you're testing reads them (rule 9).
211
- 4. **For an app's own server** (mirroring its database into Oalo, reading data
212
- out): a server app hosted on Oalo already has `OALO_URL` and
213
- `OALO_SYNC_TOKEN` in its environment, locked to its own env's data. Use
214
- them: there is no token to make. For a server hosted elsewhere, the person
215
- runs `oalo tokens create --name <what> --scope write:<table>` themselves (it
214
+ 4. **Sharing data across apps without duplication:**
215
+ - **Shared business data** (users, CRM, commerce, Oalo models): both apps use
216
+ their injected `OALO_URL` and `OALO_SYNC_TOKEN` (already in every hosted
217
+ server app's env; no token to make). For a server hosted elsewhere, the
218
+ person runs `oalo tokens create --name <what> --scope write:<table>`.
219
+ - **App-specific Postgres tables:** new server apps get isolated schemas
220
+ (`app_<slug>_dev` / `app_<slug>_prod`) so table names like `products`,
221
+ `orders`, `users`, or `_prisma_migrations` never collide. Check
222
+ `oalo db schemas` first. When App B needs to read or modify App A's SQL
223
+ tables directly, run `oalo db grant <app-a> --to <app-b>` (add `--read-only`
224
+ for SELECT-only). App B automatically gets `APP_SCHEMA_<APP_A>` and
225
+ `OALO_SHARED_SCHEMAS` in its env so it can run schema-qualified SQL
226
+ (`"${process.env.APP_SCHEMA_<APP_A>}".<table>`) across dev and prod cleanly.
227
+ Oalo workflows and code tools (`db_query`) already have holistic access
228
+ across all app schemas and `workspace.*` in one query.
216
229
  prints the token once) and stores it in that host's secrets. Don't run it
217
230
  yourself: the token would land in your context. The app calls
218
231
  `/api/sync/v1`; `oalo docs sync-rest-api` explains it and `oalo data routes`
@@ -473,6 +486,8 @@ oalo bots knowledge bot_ABC --add products # let the bot search it
473
486
  oalo bots tools bot_ABC --add order_status # let it call a tool
474
487
  oalo bots graph bot_ABC [--build] [--search "<q>"] [--export f.json] [--import f.json] [--resync] [--reset --yes]
475
488
  oalo bots settings --explain model # what each setting does
489
+ oalo bots settings bot_ABC set model=bedrock/us.amazon.ergo-1.0 --dry-run
490
+ oalo bots settings bot_ABC set model=openrouter/thinkingmachines/inkling-2-mini --dry-run
476
491
  oalo bots settings bot_ABC set <key>=<value> --dry-run
477
492
  oalo channels # WhatsApp, Instagram, email, web chat: which bot answers
478
493
  ```
@@ -482,7 +497,13 @@ oalo channels # WhatsApp, Instagram, emai
482
497
  isn't searchable. The rows must be in the env the bot reads: dev while it's
483
498
  a draft, prod once published (`oalo bots` shows its status).
484
499
  2. **Read a setting with `--explain` before changing it.** Don't guess keys or
485
- values.
500
+ values. For AI models (bots, flow `agent_prompt`/`collect` nodes, and loop
501
+ definitions or `agent_prompt` nodes), pass a tier (`cheap`, `balanced`,
502
+ `max`) or a hosted model id such as `google/gemini-4-argon`,
503
+ `bedrock/us.amazon.ergo-1.0`, `openrouter/thinkingmachines/inkling-2-mini`,
504
+ `openrouter/deepseek/deepseek-v4.1-flash`, or `claude-sonnet-4-6` (any
505
+ `provider/model` id automatically routes through OpenCode). Run `oalo docs
506
+ ai-steps-and-providers` for the complete model table and vision support.
486
507
  3. **A published bot is live for customers.** `set` on one shows the change and
487
508
  saves nothing unless you pass `--yes`: show the person the `--dry-run` and
488
509
  use `--yes` only when they say so.
@@ -539,6 +560,33 @@ oalo crm import contacts.csv --tags vip,latam [--dry-run] [--json]
539
560
 
540
561
  Operational trigger events available in `trigger_catalog` for error workflows and alerts: `loop.failed`, `bot.cap_reached`, `guardrail.triggered`, and `conversation.transferred`. Inbound WhatsApp/Instagram voice notes are auto-transcribed via Whisper before the bot turn.
541
562
 
563
+ ## Calls, `oalo forthwith`, Privacy Mode & PII Anonymization
564
+
565
+ ```sh
566
+ # Workspace Privacy Mode (standard | zdr | local_only) and LLM-boundary PII Vault scrubbing
567
+ oalo privacy [--json]
568
+ oalo privacy set --mode zdr --scrub-pii on [--json]
569
+ oalo privacy set --mode local_only [--json]
570
+
571
+ # Client-side PII anonymization BEFORE upload (pseudonymize | mask | drop | scrub)
572
+ oalo data push patients patients.csv --anonymize --anonymize-mode pseudonymize [--anonymize-fields email,phone,ssn]
573
+ oalo crm import contacts.csv --anonymize --anonymize-mode mask [--dry-run]
574
+
575
+ # Forthwith: live local call assistant for Zoom/Meet/Teams/phone (Pre-Call Dossier, private whispers, SHA-256 notarization)
576
+ oalo forthwith start --title "Renewal Call" --contact ana@clinic.org [--privacy zdr] [--scrub-pii] [--stt-cmd "whisper-stream"]
577
+ oalo forthwith start --title "Private Consult" --offline --scrub-pii --no-telemetry --out consult.json
578
+
579
+ # Oalo Calls management (list, inspect, toggle participant recording sharing, verify SHA-256 digest)
580
+ oalo calls list [--kind external|one_on_one|live_class] [--json]
581
+ oalo calls show <call-id> [--json]
582
+ oalo calls share <call-id> --on | --off
583
+ oalo calls verify <call-id> [--json]
584
+ ```
585
+
586
+ - `privacy_mode = zdr` restricts hosted AI calls to Zero-Data-Retention providers (`bedrock/*`) and local `byo-*` models; `local_only` permits only local `byo-*` models via `oalo serve` and disables cloud embeddings, cloud Whisper, and cloud background jobs. Calls inherit workspace privacy and can never downgrade it.
587
+ - `--anonymize` runs in memory on the local machine before upload (`pseudonymize` uses a local `0600` HMAC salt so cross-table joins remain intact). Set `OALO_NO_TELEMETRY=1` (or `--no-telemetry`) to suppress CLI update notices.
588
+ - Call lifecycle workflow trigger events in `trigger_catalog`: `call.started`, `call.ended`, and `call.transcribed`. Read `oalo docs video-calls-and-classes`, `oalo docs call-copilot-and-forthwith`, and `oalo docs pii-and-privacy-mode`.
589
+
542
590
  ## Several agents on one repo
543
591
 
544
592
  When the person wants to coordinate agents across a repo (no Oalo workspace
@@ -312,7 +312,7 @@
312
312
  {
313
313
  "clear_word": "default",
314
314
  "default": null,
315
- "doc": "The AI model this bot answers with. default: the workspace's default model.",
315
+ "doc": "The AI model this bot answers with: a tier (cheap, balanced, max), a hosted id (for example google/gemini-4-argon, bedrock/us.amazon.ergo-1.0, openrouter/thinkingmachines/inkling-2-mini, openrouter/deepseek/deepseek-v4-pro, openrouter/deepseek/deepseek-v4.1-flash, claude-sonnet-4-6), or an own model id (byo-...). Any provider/model id with a slash automatically sets provider=opencode. default: the workspace's default model. See `oalo docs ai-steps-and-providers` for the full list.",
316
316
  "effect": null,
317
317
  "group": "model",
318
318
  "key": "model",
@@ -322,7 +322,7 @@
322
322
  {
323
323
  "clear_word": "default",
324
324
  "default": null,
325
- "doc": "How the model is reached: anthropic directly, or opencode (for models from other providers). default: anthropic.",
325
+ "doc": "How the model is reached: opencode (Gemini, Amazon Bedrock, Thinking Machines, DeepSeek, Qwen, GLM, MiniMax, Llama, OpenAI, and own models; default) or anthropic (Claude directly). Setting a provider/model id automatically picks opencode.",
326
326
  "effect": null,
327
327
  "group": "model",
328
328
  "key": "provider",
@@ -0,0 +1,23 @@
1
+ import { forthwith } from "./forthwith.js";
2
+
3
+ /**
4
+ * `oalo calls`: manage Oalo Calls (1-on-1 video rooms, live classes, and
5
+ * Forthwith external calls): list, inspect, toggle participant recording
6
+ * sharing, and verify SHA-256 notarization digests.
7
+ *
8
+ * oalo calls list [--kind external|one_on_one|live_class] [--status live|ended] [--json]
9
+ * oalo calls show <call-id> [--json]
10
+ * oalo calls share <call-id> --on | --off [--json]
11
+ * oalo calls verify <call-id> [--json]
12
+ */
13
+ export async function calls(flags, rest, opts = {}) {
14
+ const sub = rest[1] || "list";
15
+ if (!["list", "show", "share", "verify"].includes(sub)) {
16
+ const msg = "usage: oalo calls list | show <call-id> | share <call-id> --on|--off | verify <call-id>";
17
+ if (flags?.json) console.log(JSON.stringify({ error: msg }));
18
+ else console.error(msg);
19
+ process.exitCode = 2;
20
+ return;
21
+ }
22
+ return await forthwith(flags, ["forthwith", sub, ...rest.slice(2)], opts);
23
+ }
@@ -2,17 +2,18 @@ import { readFileSync } from "node:fs";
2
2
  import { OaloChannel } from "../channel.js";
3
3
  import { resolve as resolveConfig, controlPlane, HOW_TO_CONNECT } from "../config.js";
4
4
  import { dim } from "../events.js";
5
+ import { anonymizeRows, parseAnonymizeFlags } from "../privacy/anonymize.js";
5
6
 
6
7
  /**
7
8
  * `oalo crm`: CRM contact import (`crm:import_contacts`).
8
9
  *
9
- * oalo crm import <file.csv> [--tags tag1,tag2] [--dry-run] [--json]
10
+ * oalo crm import <file.csv> [--tags tag1,tag2] [--anonymize] [--anonymize-mode pseudonymize|mask|drop|scrub] [--anonymize-fields a,b] [--salt-file path] [--dry-run] [--json]
10
11
  */
11
12
  export async function crm(flags, rest, opts = {}) {
12
13
  const sub = rest[1];
13
14
  const filePath = rest[2];
14
15
  if (sub !== "import" || !filePath) {
15
- return fail("usage: oalo crm import <file.csv> [--tags a,b] [--dry-run] [--json]", 2, flags);
16
+ return fail("usage: oalo crm import <file.csv> [--tags a,b] [--anonymize] [--dry-run] [--json]", 2, flags);
16
17
  }
17
18
 
18
19
  let csvText;
@@ -22,18 +23,35 @@ export async function crm(flags, rest, opts = {}) {
22
23
  return fail(`could not read ${filePath}: ${e.message}`, 2, flags);
23
24
  }
24
25
 
25
- const rows = parseContactsCsv(csvText);
26
+ let rows = parseContactsCsv(csvText);
26
27
  if (!rows.length) {
27
28
  return fail("no contact rows found in CSV (expected a header row with email, phone, or name)", 2, flags);
28
29
  }
29
30
 
31
+ let anonStats = null;
32
+ try {
33
+ const anonOpts = parseAnonymizeFlags(flags);
34
+ if (anonOpts) {
35
+ const res = anonymizeRows(rows, anonOpts);
36
+ rows = res.rows;
37
+ anonStats = res.stats;
38
+ console.error(
39
+ dim(
40
+ `anonymized locally (${anonStats.mode}): ${anonStats.valuesTransformed} value(s) across ${anonStats.fieldsTouched.length ? anonStats.fieldsTouched.join(", ") : "no matching fields"} before upload`,
41
+ ),
42
+ );
43
+ }
44
+ } catch (e) {
45
+ return fail(e.message, 2, flags);
46
+ }
47
+
30
48
  const tags =
31
49
  typeof flags.tags === "string"
32
50
  ? flags.tags.split(",").map((t) => t.trim()).filter(Boolean)
33
51
  : [];
34
52
 
35
53
  if (flags["dry-run"]) {
36
- if (flags.json) return void console.log(JSON.stringify({ dry_run: true, count: rows.length, tags, preview: rows.slice(0, 5) }, null, 2));
54
+ if (flags.json) return void console.log(JSON.stringify({ dry_run: true, count: rows.length, tags, anonymized: anonStats, preview: rows.slice(0, 5) }, null, 2));
37
55
  console.log(`dry run: ${rows.length} contact row(s) ready to import${tags.length ? ` with tags [${tags.join(", ")}]` : ""}`);
38
56
  for (const r of rows.slice(0, 5)) console.log(` ${dim(JSON.stringify(r))}`);
39
57
  return;
@@ -5,6 +5,7 @@ import { resolve as resolveConfig, controlPlane, readToken, HOW_TO_CONNECT } fro
5
5
  import { requireFeature } from "../server.js";
6
6
  import { ApiError } from "../api.js";
7
7
  import { dim } from "../events.js";
8
+ import { anonymizeRows, parseAnonymizeFlags } from "../privacy/anonymize.js";
8
9
  import {
9
10
  parseRecords,
10
11
  toRows,
@@ -380,7 +381,21 @@ async function push(flags, rest, cfg) {
380
381
  });
381
382
  const { rows, missing } = toRows(records, { idField, newIds: !!flags["new-ids"] });
382
383
  const from = Number(flags.from || 0);
383
- const todo = rows.slice(from);
384
+ let todo = rows.slice(from);
385
+
386
+ // Client-side PII anonymization runs locally BEFORE anything is uploaded.
387
+ const anonOpts = parseAnonymizeFlags(flags);
388
+ let anonStats = null;
389
+ if (anonOpts) {
390
+ const res = anonymizeRows(todo, anonOpts);
391
+ todo = res.rows;
392
+ anonStats = res.stats;
393
+ console.error(
394
+ dim(
395
+ `anonymized locally (${anonStats.mode}): ${anonStats.valuesTransformed} value(s) across ${anonStats.fieldsTouched.length ? anonStats.fieldsTouched.join(", ") : "no matching fields"} before upload`,
396
+ ),
397
+ );
398
+ }
384
399
 
385
400
  if (missing.length) {
386
401
  console.error(`${missing.length} record${missing.length === 1 ? "" : "s"} have no ${idField} and will be skipped (first: #${missing[0].index + 1}). ` +
@@ -395,7 +410,7 @@ async function push(flags, rest, cfg) {
395
410
  }
396
411
 
397
412
  if (flags["dry-run"]) {
398
- out(flags, { table, env, rows: todo.length, skipped: missing.length, first: todo[0] ?? null }, () => {
413
+ out(flags, { table, env, rows: todo.length, skipped: missing.length, anonymized: anonStats, first: todo[0] ?? null }, () => {
399
414
  console.log(`${todo.length} rows would be upserted into ${table} in ${read.serverUrl} (${env}), by ${idField}.`);
400
415
  if (todo[0]) console.log(dim(`first: ${JSON.stringify(todo[0])}`));
401
416
  console.log(dim("dry run: nothing was written"));