ekwo-os 0.15.0 → 0.16.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.
Files changed (42) hide show
  1. package/README.md +24 -4
  2. package/dist/assets/expected-objects.json +907 -2
  3. package/dist/assets/migrations/20261019140000_a_pair_by_name_weighs_its_words.sql +270 -0
  4. package/dist/assets/migrations/20261019161437_a_return_settles_what_it_carries.sql +207 -0
  5. package/dist/assets/migrations/20261019170000_a_line_carries_what_its_format_asks.sql +287 -0
  6. package/dist/assets/migrations/20261020000000_schema_version_0_16_0.sql +39 -0
  7. package/dist/assets/modules/crm/module.json +12 -0
  8. package/dist/assets/modules/crm/supabase/migrations/20261019175503_crm.sql +1097 -0
  9. package/dist/assets/seed/39_pack_my.sql +5 -3
  10. package/dist/books.d.ts +2 -2
  11. package/dist/books.d.ts.map +1 -1
  12. package/dist/books.js +9 -1
  13. package/dist/books.js.map +1 -1
  14. package/dist/cli.d.ts.map +1 -1
  15. package/dist/cli.js +11 -2
  16. package/dist/cli.js.map +1 -1
  17. package/dist/cloud-offer.d.ts +33 -0
  18. package/dist/cloud-offer.d.ts.map +1 -0
  19. package/dist/cloud-offer.js +61 -0
  20. package/dist/cloud-offer.js.map +1 -0
  21. package/dist/commands/company.d.ts.map +1 -1
  22. package/dist/commands/company.js +4 -0
  23. package/dist/commands/company.js.map +1 -1
  24. package/dist/commands/document.js +1 -0
  25. package/dist/commands/document.js.map +1 -1
  26. package/dist/commands/einvoice.js +7 -2
  27. package/dist/commands/einvoice.js.map +1 -1
  28. package/dist/commands/init.d.ts.map +1 -1
  29. package/dist/commands/init.js +4 -0
  30. package/dist/commands/init.js.map +1 -1
  31. package/dist/pack/read.d.ts +19 -0
  32. package/dist/pack/read.d.ts.map +1 -1
  33. package/dist/pack/read.js +50 -1
  34. package/dist/pack/read.js.map +1 -1
  35. package/dist/profiles.d.ts +3 -0
  36. package/dist/profiles.d.ts.map +1 -1
  37. package/dist/profiles.js +2 -2
  38. package/dist/profiles.js.map +1 -1
  39. package/dist/schema.d.ts +1 -1
  40. package/dist/schema.js +1 -1
  41. package/package.json +3 -3
  42. package/schema/output.1.json +2 -1
package/README.md CHANGED
@@ -48,7 +48,7 @@ You need Node 20 or later. No Supabase CLI, no Docker.
48
48
  the language.
49
49
 
50
50
  4. **Sign in** as that administrator and start booking — in the web
51
- application, [Ekwo Cloud](https://cloud.ekwo.ai), which opens your own
51
+ application, [Ekwo Cloud](https://cloud.ekwo.ai/signup?src=cli), which opens your own
52
52
  instance; through an AI agent and the [MCP server](../mcp/README.md); from
53
53
  this command line; or through the REST API Supabase generates.
54
54
 
@@ -168,7 +168,7 @@ project reports what was already there and creates nothing a second time.
168
168
  | `ekwo use <company>` | Picks the company the next commands run on. |
169
169
  | `ekwo whoami` | Who you are on which instance, the companies you can see, and what you may do on the one in use. |
170
170
  | `ekwo contact add` / `list` | A customer or a supplier, and finding one again. |
171
- | `ekwo contact duplicates` | The pairs of contacts that are probably one party, strongest first, through `suggest_duplicate_contacts()`: which one to keep, a score, and the evidence — the same VAT or registration number, the same bank account, the same words of the name. Writes nothing. |
171
+ | `ekwo contact duplicates` | The pairs of contacts that are probably one party, strongest first, through `suggest_duplicate_contacts()`: which one to keep, a score, and the evidence — the same VAT or registration number, the same bank account, the words of the name weighed by how few contacts carry them. Writes nothing. |
172
172
  | `ekwo contact merge <keep> <absorb>` | One party created twice — two spellings, two imports — joined through `merge_contacts()`: everything that names the second, posted lines and issued documents included, names the first; the first takes the fields it left empty; the second is retired, never deleted, and named by nothing again. By name or id. |
173
173
  | `ekwo doc new` / `doc line add` | A draft document — any kind, with `--type` — and one more line on it. A draft books nothing. `ekwo invoice` is the old name of `ekwo doc`, kept as an alias. |
174
174
  | `ekwo post <document>` | Books it, through `post_document()`. `--dry-run` shows the entry the database would write and writes nothing. |
@@ -186,7 +186,7 @@ project reports what was already there and creates nothing a second time.
186
186
  | `ekwo proof stamp` / `upgrade` / `verify` | The sha256 of a filed file — a declaration, the annual accounts of a financial year, a document — committed to Bitcoin through the public OpenTimestamps calendars; only the hash leaves. `upgrade` completes the pending proofs of the company and is made to run on a schedule; `verify` checks a file against its proof and the block it names, and `--out` writes the `.ots` file any verifier reads. See [`docs/filing-proofs.md`](../../docs/filing-proofs.md). |
187
187
  | `ekwo einvoice validate` / `issue` / `status` / `list` | The electronic invoice of a posted sale, in the format its country pack declares, through the `einvoicing` module: `validate` writes it and names the rules it breaks (exit 1 if any), `issue` keeps it and with `--send --to <directory>` writes it to that folder, `status --refresh` follows it. See [`modules/einvoicing`](../../modules/einvoicing/README.md). |
188
188
  | `ekwo einvoice fiscalise` / `fiscalisation` | The fiscal record a country's fiscalisation regime requires for every invoice — VERI*FACTU is one — written by the brick its pack names and chained after the last record of the invoicing system described by `--system <file>` (or `EKWO_FISCAL_SYSTEM`); `--dry-run` writes it and chains nothing, a record that breaks a rule is never chained (exit 1). `fiscalisation` walks each chain, and names the records still to send and the posted sales without a record. |
189
- | `ekwo einvoice clearance <document> submitted\|validated\|rejected\|cancelled` | Under a clearance regime — the authority validates every invoice before it is issued — records what happened to a posted sale: its submission (`--reference`, `--issue`), the authority's validation (`--identifier`, `--validated-at`, `--verification-url`), a rejection by the authority or the buyer (`--reason`, `--by`), its cancellation (`--reason`), each `--at` a moment, `--detail <file>` the answer as JSON. It dials nobody; the database refuses a transition that cannot have happened, and a window of the pack that has closed. `fiscalisation` then counts the sales validated, waiting, rejected and cancelled. |
189
+ | `ekwo einvoice clearance <document> submitted\|validated\|rejected\|cancelled` | Under a clearance regime — the authority validates every invoice before it is issued — records what happened to a posted sale: its submission (`--reference`, `--issue`), the authority's validation (`--identifier`, `--validated-at`, `--verification-url` — or, where the pack builds the link, `--detail` and `--environment`), a rejection by the authority or the buyer (`--reason`, `--by`), its cancellation (`--reason`), each `--at` a moment, `--detail <file>` the answer as JSON. It dials nobody; the database refuses a transition that cannot have happened, and a window of the pack that has closed. `fiscalisation` then counts the sales validated, waiting, rejected and cancelled. |
190
190
  | `ekwo peppol validate <file>` / `lookup <participant>` | The Peppol network, with no installation and no sign-in. `validate` reads a UBL invoice or credit note as it arrived and names the rules it breaks — the arithmetic of EN 16931 and the electronic addresses of both parties — with exit 1 if any; nothing is booked. `lookup` checks a participant identifier (`0208:0999999922`, `iso6523-actorid-upis::…` or a symbolic scheme) and asks the DNS of the Service Metadata Locator whether it is registered, and with which Service Metadata Publisher; `--test` asks the acceptance network. Exit 0 only for a registered participant. See [`@ekwo-ai/peppol-ubl`](../formats/peppol-ubl/README.md#participant-identifiers-and-the-sml). |
191
191
 
192
192
  There is no `eject`, because there is nothing to eject from. The schema is in
@@ -482,6 +482,7 @@ Every command takes `--json`; see [what a command answers](#what-a-command-answe
482
482
  | `EKWO_CONFIG_DIR` | Where profiles and sessions are kept. |
483
483
  | `EKWO_REGISTRY_URL` | `--registry-url`. Default `https://api.ekwo.ai/v1/registrations`. |
484
484
  | `EKWO_NO_REGISTER_INVITE` | Set to `1` to hide the invitation to register that `ekwo init` and `ekwo status` show on an installation that is not registered. The MCP server reads it too. |
485
+ | `EKWO_NO_CLOUD_OFFER` | Set to `1` to hide the one line offering a free Ekwo Cloud account. The MCP server reads it too. See [An Ekwo Cloud account](#an-ekwo-cloud-account-optional). |
485
486
  | `NO_COLOR` | Plain output. |
486
487
 
487
488
  See [`.env.example`](../../.env.example) at the root of the repository.
@@ -528,7 +529,7 @@ exactly six fields:
528
529
  "organization": "My Organisation",
529
530
  "country": "<cc>",
530
531
  "edition": "community",
531
- "schema_version": "0.15.0",
532
+ "schema_version": "0.16.0",
532
533
  "contact_email": "you@example.com"
533
534
  }
534
535
  ```
@@ -538,6 +539,25 @@ by your own database and is not a licence key. A failed announcement is a soft
538
539
  message, not a failed install: `ekwo register` retries it. `ekwo unregister`
539
540
  clears the local fields.
540
541
 
542
+ ## An Ekwo Cloud account (optional)
543
+
544
+ Everything above works without an account, and always will. A free account on
545
+ [Ekwo Cloud](https://cloud.ekwo.ai/signup?src=cli) — an address and a
546
+ six-digit code, no password to invent — adds the web application on the same
547
+ books, a nightly backup of every company you link, and one connector URL,
548
+ `https://mcp.ekwo.ai/mcp`, for your AI agent, approved in your browser, instead
549
+ of a key and a password in a file.
550
+
551
+ The command line says so in one line, at two moments: at the end of an
552
+ `ekwo init` that succeeded, and after a first `ekwo company export`. Each
553
+ moment once for you: it is remembered in `settings.json`, in your
554
+ configuration directory beside your profiles, and nothing is sent to Ekwo to
555
+ show it or to remember it. The line is never shown under `--json`, when the
556
+ output is not a terminal, or in CI (`CI` set). `EKWO_NO_CLOUD_OFFER=1` hides
557
+ it, and so does `"cloud_offer": false` in that `settings.json`, for good. The
558
+ MCP server carries the same words in its instructions; see
559
+ [its README](../mcp/README.md#what-an-agent-reads-first).
560
+
541
561
  ## Testing it against a real project
542
562
 
543
563
  The test suite runs against Postgres compiled to WebAssembly. To exercise the