@anybuild-ai/ab 0.6.0 → 0.8.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 (122) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +184 -7
  3. package/dist/api/entity-api.d.ts +2 -0
  4. package/dist/api/entity-api.d.ts.map +1 -1
  5. package/dist/api/entity-api.js +9 -0
  6. package/dist/api/entity-api.js.map +1 -1
  7. package/dist/cli.js +0 -0
  8. package/dist/commands/api-key.d.ts.map +1 -1
  9. package/dist/commands/api-key.js +498 -20
  10. package/dist/commands/api-key.js.map +1 -1
  11. package/dist/commands/index.d.ts.map +1 -1
  12. package/dist/commands/index.js +4 -0
  13. package/dist/commands/index.js.map +1 -1
  14. package/dist/commands/mail.d.ts +3 -0
  15. package/dist/commands/mail.d.ts.map +1 -0
  16. package/dist/commands/mail.js +99 -0
  17. package/dist/commands/mail.js.map +1 -0
  18. package/dist/commands/status.d.ts.map +1 -1
  19. package/dist/commands/status.js +9 -1
  20. package/dist/commands/status.js.map +1 -1
  21. package/dist/commands/user.d.ts +3 -0
  22. package/dist/commands/user.d.ts.map +1 -0
  23. package/dist/commands/user.js +254 -0
  24. package/dist/commands/user.js.map +1 -0
  25. package/dist/config/types.d.ts +2 -2
  26. package/dist/export/import-batch.d.ts +17 -1
  27. package/dist/export/import-batch.d.ts.map +1 -1
  28. package/dist/export/import-batch.js +167 -17
  29. package/dist/export/import-batch.js.map +1 -1
  30. package/dist/export/not-exported.d.ts +23 -0
  31. package/dist/export/not-exported.d.ts.map +1 -0
  32. package/dist/export/not-exported.js +49 -0
  33. package/dist/export/not-exported.js.map +1 -0
  34. package/dist/export/path-based-status.d.ts +3 -2
  35. package/dist/export/path-based-status.d.ts.map +1 -1
  36. package/dist/export/path-based-status.js +4 -3
  37. package/dist/export/path-based-status.js.map +1 -1
  38. package/dist/export/resource-files.d.ts +21 -0
  39. package/dist/export/resource-files.d.ts.map +1 -0
  40. package/dist/export/resource-files.js +62 -0
  41. package/dist/export/resource-files.js.map +1 -0
  42. package/dist/export/schema-json.d.ts +8 -1
  43. package/dist/export/schema-json.d.ts.map +1 -1
  44. package/dist/export/schema-json.js +123 -1
  45. package/dist/export/schema-json.js.map +1 -1
  46. package/dist/export/status.d.ts +2 -0
  47. package/dist/export/status.d.ts.map +1 -1
  48. package/dist/export/status.js +58 -15
  49. package/dist/export/status.js.map +1 -1
  50. package/dist/export/sync.d.ts.map +1 -1
  51. package/dist/export/sync.js +39 -0
  52. package/dist/export/sync.js.map +1 -1
  53. package/dist/export/types.d.ts +26 -0
  54. package/dist/export/types.d.ts.map +1 -1
  55. package/dist/export/working-dirs.d.ts +42 -1
  56. package/dist/export/working-dirs.d.ts.map +1 -1
  57. package/dist/export/working-dirs.js +141 -3
  58. package/dist/export/working-dirs.js.map +1 -1
  59. package/dist/export/working-tree-validation.d.ts +1 -1
  60. package/dist/export/working-tree-validation.d.ts.map +1 -1
  61. package/dist/export/working-tree-validation.js +25 -4
  62. package/dist/export/working-tree-validation.js.map +1 -1
  63. package/dist/identity/identity-api.d.ts +6 -0
  64. package/dist/identity/identity-api.d.ts.map +1 -0
  65. package/dist/identity/identity-api.js +57 -0
  66. package/dist/identity/identity-api.js.map +1 -0
  67. package/dist/router.d.ts.map +1 -1
  68. package/dist/router.js +3 -1
  69. package/dist/router.js.map +1 -1
  70. package/package.json +1 -1
  71. package/dist/api/factory.d.ts +0 -8
  72. package/dist/api/factory.d.ts.map +0 -1
  73. package/dist/api/factory.js +0 -9
  74. package/dist/api/factory.js.map +0 -1
  75. package/dist/api/index.d.ts +0 -4
  76. package/dist/api/index.d.ts.map +0 -1
  77. package/dist/api/index.js +0 -3
  78. package/dist/api/index.js.map +0 -1
  79. package/dist/api/stub.d.ts +0 -7
  80. package/dist/api/stub.d.ts.map +0 -1
  81. package/dist/api/stub.js +0 -30
  82. package/dist/api/stub.js.map +0 -1
  83. package/dist/api/types.d.ts +0 -16
  84. package/dist/api/types.d.ts.map +0 -1
  85. package/dist/api/types.js +0 -2
  86. package/dist/api/types.js.map +0 -1
  87. package/dist/artifacts/baseline-types.d.ts +0 -10
  88. package/dist/artifacts/baseline-types.d.ts.map +0 -1
  89. package/dist/artifacts/baseline-types.js +0 -2
  90. package/dist/artifacts/baseline-types.js.map +0 -1
  91. package/dist/artifacts/baseline.d.ts +0 -4
  92. package/dist/artifacts/baseline.d.ts.map +0 -1
  93. package/dist/artifacts/baseline.js +0 -55
  94. package/dist/artifacts/baseline.js.map +0 -1
  95. package/dist/artifacts/canonical-json.d.ts +0 -3
  96. package/dist/artifacts/canonical-json.d.ts.map +0 -1
  97. package/dist/artifacts/canonical-json.js +0 -13
  98. package/dist/artifacts/canonical-json.js.map +0 -1
  99. package/dist/artifacts/disk.d.ts +0 -6
  100. package/dist/artifacts/disk.d.ts.map +0 -1
  101. package/dist/artifacts/disk.js +0 -45
  102. package/dist/artifacts/disk.js.map +0 -1
  103. package/dist/artifacts/hash-content.d.ts +0 -4
  104. package/dist/artifacts/hash-content.d.ts.map +0 -1
  105. package/dist/artifacts/hash-content.js +0 -14
  106. package/dist/artifacts/hash-content.js.map +0 -1
  107. package/dist/artifacts/locations.d.ts +0 -3
  108. package/dist/artifacts/locations.d.ts.map +0 -1
  109. package/dist/artifacts/locations.js +0 -9
  110. package/dist/artifacts/locations.js.map +0 -1
  111. package/dist/artifacts/pull.d.ts +0 -4
  112. package/dist/artifacts/pull.d.ts.map +0 -1
  113. package/dist/artifacts/pull.js +0 -36
  114. package/dist/artifacts/pull.js.map +0 -1
  115. package/dist/artifacts/status.d.ts +0 -7
  116. package/dist/artifacts/status.d.ts.map +0 -1
  117. package/dist/artifacts/status.js +0 -47
  118. package/dist/artifacts/status.js.map +0 -1
  119. package/dist/export/checksum-diagnostics.d.ts +0 -7
  120. package/dist/export/checksum-diagnostics.d.ts.map +0 -1
  121. package/dist/export/checksum-diagnostics.js +0 -43
  122. package/dist/export/checksum-diagnostics.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0
4
+
5
+ - Writable `be/identity/providers/<provider_id>.json` (sign-in providers: `kind` `google`, `microsoft` or `oidc`, `client_id`, `issuer`, `tenant`, `scopes`, `trust_email`, `label`). Create/update/delete on push; a file never holds the client secret; delete is refused while a portal still offers the provider. Portals and Liquid sites turn providers on with `ui_application_settings.sign_in.providers`; the portal push prints the redirect URIs to register.
6
+ - `anybuild api-key identity-provider <be/identity/providers/file.json>` stores a pushed provider's client secret in this environment (hidden prompt, or one line on stdin). Security administrators only. Never shown again, never in files.
7
+ - Push prints the server's `info` lines, for example `Rebuilt site(s): …` and `Translations published; rebuilt: …`.
8
+ - Translation files also list the platform texts the application uses (`"platform": true`); a value replaces the platform's translation for this application only.
9
+ - Writable `be/mail/templates/<template_id>.json` (mail templates: `subject`, `html`, optional `text`, `variables` with sample values; Liquid — plain `{{ placeholder }}` HTML is enough) and `be/mail/providers/<provider_id>.json` (mail providers: `kind` `smtp`, `settings` `{ host, port, secure, account }`, `from_address`, `from_name`, `reply_to`, `is_default`). The file name is the key. Create/update/delete on push, sent after web routes; push renders each template with its sample values and refuses one that does not render; a provider file never holds a password (refused). Templates override the built-in account mails (`account.login_code`, `account.recover_password`, `account.verify`, …) or are the application's own (`order.confirmed`), sent with `api.mail.send({ template: '<template id>', to, data })` from PLV8 or Node (by the template's own application's default provider unless `provider: '<provider id>'`; templates and providers are global — any application may use another's).
10
+ - `anybuild api-key mail-provider <be/mail/providers/file.json>` stores a pushed provider's password / API key in this environment (hidden prompt, or one line on stdin). Security administrators only (`identity/key`). Never shown again, never in files.
11
+ - `anybuild mail templates` lists the templates the application can use and where each comes from (application, environment, built-in); `anybuild mail send-test [<template_id>] --to <address> [--provider <id>] [--locale <tag>]` sends one with its sample values. Host routes `POST /api/cli/v1/mail/test` and `POST /api/cli/v1/mail/templates` (one `web_routes` record `POST /api/cli/v1/mail/*` → cli_integration, secured like `import/files`).
12
+ - Portal files (LitElement and Liquid) carry an optional top-level `session` block: `ttl_seconds`, `sliding`, `lockout` (`attempts`, `window_minutes`, `lock_minutes`) and `remember_me_ttl` — the portal's session and login policy, set on push (a block that leaves a value out resets it; no block keeps what is stored) and pulled only when it differs from the defaults (12 h, sliding, no lockout, no remember me). Liquid sites: `ui_application_settings.site.members` turns on member login (built-in `member_login` / `member_logout` forms, `"session": "member"` actions, `GET /_site/me`); see `meta/ui/liquid/RULES.md` (Members). Server-side; no CLI change.
13
+ - Writable `be/web_routes/*.json`: the application's own HTTP routes (webhooks, feeds, custom APIs under `/api/`), named `<method>_<path slug>.json` (`*` method → `any_`, a final `*` in the path → `_all`). `access` is `public`, `api` (API key and/or token) or `webhook` (`run_as` service account, `allowed_ips`, token/HMAC headers, `"hmac": true|false`). Create/update/delete on push, sent last so the functions they run are applied first; validate runs the server checks. Routes generated from entity `endpoints` and other applications' routes are never pulled or changed. Catalog `meta/be/catalog/web_routes.json`, rules `meta/be/web_routes/RULES.md`.
14
+ - `anybuild api-key webhook <be/web_routes/file.json> --token | --hmac` sets a new webhook token (only its hash is stored) or HMAC secret for a pushed route and prints it once. Security administrators only (same `identity/key` host route). Secrets never appear in files, pull or status; push and validate warn while one is missing.
15
+ - Writable `resources/images/<name>.json` and `resources/files/<name>.json`: files shipped with the application (a logo, a price list). Each is a JSON file (`id`, `is_public`, images also `variations`) with its binary next to it under the same name (`logo.json` + `logo.png`); the name is the file name. Push uploads the binary with the JSON, pull writes both, and status uses one checksum over the JSON and the binary. A binary without its JSON, or two binaries with the same name, is refused.
16
+ - Site actions (`ui/actions/`) and every `ui/content/<kind>/` folder (for example `groups`, the member groups) are tracked and pushed with the site content.
17
+ - Pull no longer stops when the server cannot export a file: it skips the file, prints a warning and records it in `.ab/not-exported.json`. `status` lists such files under "Not exported by the server" instead of Deleted, and push does not delete them on the server. A file leaves the list as soon as a later pull exports it.
18
+ - Push order puts every backend change before the UI: backend code (in chunks), schema (auto-increments, field types, entities, views), UI code and templates (in chunks), navigation, portals, site content, translations, AnyInput profiles, scenarios, scenario tests, scheduled jobs, web routes, then mail templates, mail providers and sign-in providers. Resources go with the UI files. Site content (`ui/page_types`, `ui/content/*`, `ui/actions`) goes in one request after portals: the content publish gate checks it against the site's live settings, so a portal change in the same push (for example new locales) is live first, and a menu and the page it links are checked together.
19
+ - Translations are an application artefact: `ui/translations/<iso>.json` (one per language the application's portals use) lists every text of the application's widgets, navigation and site content with its translation (`value: ""` = not translated yet), pulled and pushed like any file. A push replaces that language's translations with the file, after site content, then publishes the catalogs once for the application. A push that adds or retires texts writes the updated translation files back (where unchanged locally). The push conflict check covers translations only (`translation_checksum` in the manifest, sent as `base_translation_checksum`), so new untranslated texts never conflict. Recorded in Push History and packaged (`import_translations`, then a catalog publish).
20
+ - `ui/liquid/{layouts,pages,blocks,snippets}/*.liquid` (Liquid site templates) are tracked like backend files: by path, with identity from the same `const __meta = { thing_id: … }` block (inside a `{% comment %}`). `status` checks only the file type and `__meta`; `validate` and `push` have the server check syntax, references and kinds. Files the server stores in canonical form are written back after push.
21
+
22
+ ## 0.7.0
23
+
24
+ - Writable `be/scheduled_jobs/*.json` (cron jobs): create/update/delete on push. A job runs a PLV8 function or a Node module. Push takes the version live, which registers cron; delete unschedules it. `run_as` is the user the job runs as. Sent after function files in the same push.
25
+ - `anybuild user roles | list | show | create | activate | deactivate | role` maintains users with the login session. The server rejects the call unless that user is a security administrator. `create --kind person` reads the password from a hidden prompt and fails without a terminal. `create --kind service` has no password.
26
+ - `anybuild api-key create --name <name> [--user <user_id>] [--expires <iso>] [--unscoped] [--scope <METHOD> <path> …] [--use] [--allow-writes | --read-only]` creates a key. Omitted `--user` is `ai_agent`. The secret is printed once. `--use` stores it for `anybuild api` with no prompt; writes stay off unless `--allow-writes`.
27
+ - `anybuild api-key list [--user <user_id>]` and `anybuild api-key revoke <api_key_id>` list and revoke keys. They never print a secret.
28
+ - `anybuild api-key scope list | add | remove` changes route scopes. The target is the stored key unless `--id <api_key_id>` is set. `add` and `remove` take one or more `METHOD path` pairs (same path form as `anybuild api`, including a template such as `my_app/invoice(*)`). An unscoped key already reaches every route, so these commands report that and do not change it.
29
+ - Host routes, secured and token-only (not API-key auth): `POST /api/cli/v1/identity/user`, `POST /api/cli/v1/identity/key`, `POST /api/cli/v1/identity/scope`.
30
+
3
31
  ## 0.6.0
4
32
 
5
33
  - `anybuild create <url>/<application_id> [--name <display name>] [--debug] [directory]` creates a blank application on the host (same URL shape as clone) and clones it locally. `--name` is optional and defaults to the application_id. Rejects if that id already exists (clone it instead). No `--force`.
package/README.md CHANGED
@@ -63,8 +63,12 @@ A normal **pull** only downloads files whose last snapshot (`.ab/file-state.json
63
63
  anybuild pull --force be/views/transport_events.json
64
64
  ```
65
65
 
66
+ If the server cannot export a file, pull skips it with a warning instead of stopping. `status` lists it under **Not exported by the server** (not as Deleted), and push leaves it alone on the server. The server log has the reason; once it is fixed there, the next pull downloads the file.
67
+
66
68
  If a push includes **deletions**, the CLI lists them and asks for confirmation. Pass `--yes` (or `-y`) to skip the prompt (required in non-interactive / CI use).
67
69
 
70
+ A push goes in this order, so what a file depends on is live before it: backend code (in chunks), schema (auto-increments, field types, entities, views), UI code, templates and resources (in chunks), navigation, portals, site content (`ui/page_types`, `ui/content/*`, `ui/actions`, in one request), translations (`ui/translations`, in one request), AnyInput profiles, scenarios, scenario tests, scheduled jobs, web routes, then mail templates, mail providers and sign-in providers. Site content goes after portals because the publish gate checks it against the site's live settings: a portal change in the same push (new locales, say) is live first, and a menu and the page it links are checked together.
71
+
68
72
  Pass `-m` / `--message` to record an optional note on the server **Push History** for that command (one history row even when the upload is split into several HTTP batches). `validate` does not write history. Older CLI versions omit the note and still apply files.
69
73
 
70
74
  ## Working trees
@@ -76,30 +80,60 @@ Pass `-m` / `--message` to record an optional note on the server **Push History*
76
80
  | `ui/lit/components/` | Custom Lit widgets (`.js`) and theme JSON |
77
81
  | `ui/navigation/` | Navigation instance JSON |
78
82
  | `ui/portals/` | Portal (`ui_application`) JSON |
83
+ | `ui/liquid/{layouts,pages,blocks,snippets}/` | Liquid site templates (`.liquid`, with a `__meta` block). Format: `meta/ui/liquid/RULES.md` |
84
+ | `ui/page_types/` | Page types of a Liquid site (layout and regions) |
85
+ | `ui/content/{pages,menus,globals,groups}/` | Site content: composed pages, menus, globals, member groups. Published through the site's publish gate |
86
+ | `ui/actions/` | Site actions (forms and buttons that run a command). Format: `meta/ui/liquid/RULES.md` |
87
+ | `ui/translations/` | The application's translations, one file per language (`<iso>.json`). See [Translations](#translations) |
79
88
  | `be/plv8/` | PLV8 functions (`.js`) |
80
89
  | `be/node/` | Node modules (`.js`) |
81
90
  | `be/entities/` | Entity authoring JSON |
82
91
  | `be/views/` | Custom view authoring JSON |
83
92
  | `be/auto_increments/` | Auto-increment sequence JSON |
84
93
  | `be/field_types/` | Current-application field type JSON (storage and lookups) |
94
+ | `be/scheduled_jobs/` | Scheduled job (cron) JSON. Runs a PLV8 function or a Node module |
95
+ | `be/web_routes/` | The application's own HTTP routes (webhooks, feeds, custom APIs under `/api/`), named `<method>_<path>.json`. Routes generated from entity `endpoints` are not here |
85
96
  | `be/scenarios/` | AnyInput scenarios (readable JSON) |
86
97
  | `be/capability_profiles/` | AnyInput capability profiles (`<type>.<name>.json`) |
87
98
  | `be/scenario_tests/` | AnyInput scenario test suites (`<suite_id>.json`), run with `anybuild test scenarios` |
99
+ | `be/mail/templates/` | Mail templates (`<template_id>.json`: `subject`, `html`, optional `text`, `variables` with sample values). Override the built-in account mails or are the application's own. See [Mail](#mail) |
100
+ | `be/mail/providers/` | Mail providers (`<provider_id>.json`, SMTP). Never hold a password. See [Mail](#mail) |
101
+ | `be/identity/providers/` | Sign-in providers (`<provider_id>.json`: Google, Microsoft or another OpenID Connect provider). Never hold the client secret. See [Sign-in providers](#sign-in-providers) |
102
+ | `resources/images/`, `resources/files/` | Files shipped with the application (a logo, a price list): `<name>.json` with the binary next to it under the same name (`logo.json` + `logo.png`). See [Resources](#resources) |
88
103
 
89
104
  `meta/` is **read-only** (catalogs, generated schema dumps, default entity widgets, AI rule files). Do not put source entity/view JSON there.
90
105
 
91
- **Entities, views, auto-increments, field types, navigation, and portals**
106
+ **Entities, views, auto-increments, field types, scheduled jobs, navigation, and portals**
92
107
 
93
- - Files are simple JSON (`id` = thing UUID; `entity_id` / `view_id` / `auto_increment_id` / `field_id` / `navigation_id` / `application_id` stay inside the file as labels). View **sources** use target `id` (thing UUID), not `entity_id` / `view_id`, so they can point at objects in other applications. Format: `AGENTS.md` plus `meta/be/entities/RULES.md`, `meta/be/views/RULES.md`, `meta/be/auto_increments/RULES.md`, `meta/be/field_types/RULES.md`, `meta/ui/navigation/RULES.md`, and `meta/ui/portals/RULES.md` after clone/pull.
108
+ - Files are simple JSON (`id` = thing UUID; `entity_id` / `view_id` / `auto_increment_id` / `field_id` / `job_id` / `navigation_id` / `application_id` stay inside the file as labels). View **sources** use target `id` (thing UUID), not `entity_id` / `view_id`, so they can point at objects in other applications. Format: `AGENTS.md` plus `meta/be/entities/RULES.md`, `meta/be/views/RULES.md`, `meta/be/auto_increments/RULES.md`, `meta/be/field_types/RULES.md`, `meta/be/scheduled_jobs/RULES.md`, `meta/be/web_routes/RULES.md`, `meta/ui/navigation/RULES.md`, and `meta/ui/portals/RULES.md` after clone/pull.
94
109
  - New views are always **code mode** (SQL + named sources).
95
110
  - Custom **designer** views export as the same JSON. Editing one and pushing **converts it to code** on the server. Untouched designer views stay designer.
96
111
  - Default entity/component views are **not** under `be/views/` (they stay in `meta/`).
97
112
  - Default entity widgets (autogenerated list/create/edit) are **not** under `ui/lit/components/` (they stay in `meta/ui/lit/components/`). After pull, delete leftover copies from `ui/lit/components/` if they still appear as Added.
98
- - If two records share the same `entity_id` / `view_id` / `auto_increment_id` / `field_id` / `navigation_id` / `application_id`, files are `slug.json` and `slug.<thing_id>.json`. Push does **not** rename the live id from the filename.
99
- - Schema apply is one POST: auto-increments, then storage field types, then entities, then lookup field types, then views (source views before dependents). Each file saves and builds together. In a mixed push the order is widgets, then navigation, then portals, then auto-increments, then field types / schema.
113
+ - If two records share the same `entity_id` / `view_id` / `auto_increment_id` / `field_id` / `job_id` / `navigation_id` / `application_id`, files are `slug.json` and `slug.<thing_id>.json`. Push does **not** rename the live id from the filename.
114
+ - Schema apply is one POST: auto-increments, then storage field types, then entities, then lookup field types, then views (source views before dependents). Each file saves and builds together. In a mixed push the order is the one in [Workflow](#workflow): backend code, then schema, then UI, navigation, portals and site content, then AnyInput; scheduled jobs are the last POST, so a PLV8 or Node module in the same push already exists.
100
115
  - After a schema, navigation, or portal push, run **`anybuild pull`**. Catalogs under `meta/be/catalog/` refresh only on pull.
101
116
 
102
- Checksums: `.json` under `ui/lit`, `ui/navigation`, `ui/portals`, `be/entities`, `be/views`, `be/auto_increments`, and `be/field_types` uses canonical JSON; other files use raw UTF-8.
117
+ Checksums: `.json` under `ui/lit`, `ui/navigation`, `ui/portals`, `ui/page_types`, `ui/content`, `ui/actions`, `ui/translations`, `be/entities`, `be/views`, `be/auto_increments`, `be/field_types`, `be/scheduled_jobs`, `be/web_routes`, `be/mail`, `be/identity/providers`, `be/scenarios`, `be/capability_profiles`, and `be/scenario_tests` uses canonical JSON; a resource's checksum covers its JSON and its binary; other files use raw UTF-8.
118
+
119
+ ### Resources
120
+
121
+ Images and files that belong to the application (a logo, a price list, a hero picture) live under `resources/images/` and `resources/files/`, so they travel with the application to every environment.
122
+
123
+ ```
124
+ resources/images/logo.json resources/images/logo.png
125
+ resources/files/price-list.json resources/files/price-list.pdf
126
+ ```
127
+
128
+ ```json
129
+ { "id": "<new uuid>", "is_public": true }
130
+ ```
131
+
132
+ - `id` is the record's thing id on every environment; pages, blocks and code refer to the resource by it. The name is the file name.
133
+ - Images may set `variations` (the sizes made on upload); leaving it out gives the platform's default sizes, `[]` gives none.
134
+ - Push uploads the binary with the JSON; pull writes both. Changing either one shows the resource as Modified.
135
+ - Keep exactly one binary next to each JSON file. A binary without its JSON is refused.
136
+ - Delete both files and push to delete the resource (push asks for confirmation, as for other deletions).
103
137
 
104
138
  ## Commands
105
139
 
@@ -117,6 +151,15 @@ Checksums: `.json` under `ui/lit`, `ui/navigation`, `ui/portals`, `be/entities`,
117
151
  | `anybuild api <GET\|POST\|PATCH\|DELETE> <path> [--data <json> \| --data-file <file>]` | Call an entity endpoint (OData) of the project's host with the stored API key. `<path>` is relative to `/api/`. Body to stdout, status line to stderr, exit code 1 on HTTP errors |
118
152
  | `anybuild api-key set [--allow-writes \| --read-only]` | Store an API key for the project's host (hidden prompt, terminal only). Checks the key first; asks whether writes are allowed (default no) |
119
153
  | `anybuild api-key show` / `remove` | Show which key is stored (never the secret) / forget it |
154
+ | `anybuild api-key create --name <name> [--user <user_id>] [--scope <METHOD> <path> …] [--use]` | Create a key with the login session (security administrator). Omitted `--user` is `ai_agent`. Prints the secret once. `--use` stores it; writes stay off unless `--allow-writes`. Also `--expires`, `--unscoped` |
155
+ | `anybuild api-key list [--user <user_id>]` / `revoke <api_key_id>` | List a user's keys (default `ai_agent`) / revoke one. Never prints a secret |
156
+ | `anybuild api-key scope list \| add \| remove` | List or change what the stored key may call (`--id <api_key_id>` picks another). An unscoped key may already call everything |
157
+ | `anybuild api-key webhook <be/web_routes/file.json> --token \| --hmac` | Set a new token or HMAC secret for a pushed webhook route (security administrator). Prints it once |
158
+ | `anybuild api-key mail-provider <be/mail/providers/file.json>` | Store the password or API key of a pushed mail provider in this environment (security administrator). Hidden prompt or one line on stdin; never shown again |
159
+ | `anybuild api-key identity-provider <be/identity/providers/file.json>` | Store the client secret of a pushed sign-in provider in this environment (security administrator). Hidden prompt or one line on stdin; never shown again |
160
+ | `anybuild mail templates` | List the mail templates the application can use and where each comes from (application, environment, built-in) |
161
+ | `anybuild mail send-test [<template_id>] --to <address> [--provider <id>] [--locale <tag>]` | Send one template (default `mail.test`) with its sample values. Push the template or provider first |
162
+ | `anybuild user roles \| list \| show \| create \| activate \| deactivate \| role` | Maintain users with the login session. The server rejects the call unless that user is a security administrator |
120
163
 
121
164
  Also: `anybuild help`, `anybuild -v` / `--version`.
122
165
 
@@ -129,6 +172,56 @@ A suite (`be/scenario_tests/<suite_id>.json`) lists requests (one message or a s
129
172
  - Suites are pushed and pulled like scenarios (push checks scenario and slot names, outcomes, and that no test message copies a scenario example).
130
173
  - Allowed for users whose role is a system designer, while the application is in development mode in that environment.
131
174
 
175
+ ### Translations
176
+
177
+ The application's translations are files like any other: `ui/translations/<iso>.json`, one per language that a portal of the application uses (its `i18n.locales` in `ui/portals/<id>.json`, English excepted: English is the source). A file lists **every** text of the application's own widgets, navigation and site content: `this.localize()` texts in Lit widgets, Liquid `{{ 'Text' | t }}` strings, block texts, page titles and descriptions, menu labels and globals. It also lists the platform texts the application uses (see below). Entity data (multilanguage fields) is translated separately, through the platform's data translation.
178
+
179
+ ```json
180
+ {
181
+ "id": "<file id, from pull>",
182
+ "language": "pt",
183
+ "items": [
184
+ { "source": "All rights reserved", "used_in": "Site Layout", "value": "Todos os direitos reservados" },
185
+ { "source": "Checkout", "scenario": "cart", "used_in": "Cart widget", "value": "" },
186
+ { "source": "Welcome", "unique": true, "reference_id": "<widget thing_id>", "used_in": "Home page", "value": "Bem-vindo" }
187
+ ]
188
+ }
189
+ ```
190
+
191
+ - `value: ""` means not translated yet: fill it in and push. `used_in` (where the text is used) is information only; push ignores it.
192
+ - Keep `source`, `scenario`, `unique` and `reference_id` as pulled; the English text is the key.
193
+ - The file is the **whole set** for that language: emptying a value (or removing the entry) removes that translation.
194
+ - New texts appear in the file when they are pushed (a widget, template or content push): the push writes the updated translation files back, unless you have edited your copy since the last pull (then pull after pushing your edits). Texts no longer used drop out.
195
+ - **Push** imports the files after site content, then publishes the catalogs once for the application (Lit portals and Liquid sites pick the translations up; sites are rebuilt). With `--debug`, push prints the written / removed / unchanged counts and the files it refreshed. An entry whose text the application does not use is skipped with a warning.
196
+ - **Conflicts** are about translations only: a push is rejected when a translation changed on the server since your last pull (on the platform's translation page, or another push). New or removed untranslated texts never cause a conflict. On a conflict, pull, redo your changes and push.
197
+ - A file cannot be deleted by push; a language's file appears when a portal adds the language to `i18n.locales` (push the portal, then pull) and disappears when no portal uses it.
198
+ - There is no separate rebuild or publish command: push prints what it applied, for example `Rebuilt site(s): …` or `Translations published; rebuilt: …`.
199
+ - Pushes of translation files are recorded in Push History and packaged like other files (package step: the platform `import_translations` action with the file, then one catalog publish per push).
200
+ - The file also lists the **platform texts** the application uses (buttons, account forms, error messages), marked `"platform": true`. Leave them empty to keep the platform's translation; fill one in to replace it for this application only. Unique platform texts cannot be changed.
201
+ - Push and build output of a Liquid site say per locale how many texts are not translated yet (`Translations (pt): …`) and which pages and routes have no path in a locale (`Not in pt: …`).
202
+
203
+ ### Mail
204
+
205
+ - `be/mail/templates/<template_id>.json` holds `subject`, `html`, optional `text` (Liquid; plain `{{ placeholder }}` HTML is enough) and `variables` with sample values. Push renders each template with its samples and refuses one that does not render.
206
+ - A template with a built-in id (`account.login_code`, `account.recover_password`, `account.verify`, `account.sign_in_connect`, …) replaces that account mail; any other id is the application's own, sent with `api.mail.send({ template: '<template_id>', to, data })` from PLV8 or Node.
207
+ - `be/mail/providers/<provider_id>.json` describes an SMTP provider (`kind`, `settings` `{ host, port, secure, account }`, `from_address`, `from_name`, `reply_to`, `is_default`). The file never holds the password: after the push a security administrator runs `anybuild api-key mail-provider be/mail/providers/<file>.json`.
208
+ - `anybuild mail templates` shows which templates the application can use; `anybuild mail send-test` sends one to check it.
209
+ - Secrets are not copied when the application is packaged to another environment: set them there too.
210
+
211
+ ### Sign-in providers
212
+
213
+ Portals (LitElement) and Liquid sites can offer sign-in with Google, Microsoft or another OpenID Connect provider.
214
+
215
+ 1. Describe the provider in `be/identity/providers/<provider_id>.json` (`kind` `google`, `microsoft` or `oidc`, `client_id`, and for the others `issuer` / `tenant`, `scopes`, `label`). The file never holds the client secret. Format: `AGENTS.md` ("Sign-in providers") after clone/pull.
216
+ 2. Push it, then a security administrator stores the secret:
217
+ ```bash
218
+ anybuild api-key identity-provider be/identity/providers/google.json
219
+ ```
220
+ 3. Turn it on per portal or site: `"ui_application_settings": { "sign_in": { "providers": ["google"] } }` in the portal file. A Liquid site sets its own options under `members.sign_in` (see `meta/ui/liquid/RULES.md`).
221
+ 4. Pushing the portal prints the redirect URIs to register with the provider.
222
+
223
+ A provider cannot be deleted while a portal still offers it. Secrets are not copied when the application is packaged to another environment: run step 2 there too.
224
+
132
225
  ### Calling entity endpoints
133
226
 
134
227
  Entities with endpoints are served as an OData API under `/api/<path>`. `anybuild api` calls them for testing and seeding, for you or for an AI agent working in the project.
@@ -155,7 +248,91 @@ Good to know:
155
248
 
156
249
  - The key belongs to the host, not to one project: every project on that host on this machine uses it.
157
250
  - To replace the key or change the write setting, run `anybuild api-key set` again.
158
- - When you are done: `anybuild api-key remove`, then revoke the key on the Identities page.
251
+ - When you are done: `anybuild api-key remove`, then `anybuild api-key revoke <api_key_id>` (or revoke it on the Identities page).
252
+
253
+ #### Users, keys, and scopes
254
+
255
+ These commands use the login of a security administrator. Run them inside a project directory (the folder that contains `.ab/`). Anyone else is rejected.
256
+
257
+ Two different logins are involved:
258
+
259
+ - The **signed-in user** is the administrator. That login creates users, creates and revokes keys, and changes what a key is allowed to call.
260
+ - The **stored API key** is what `anybuild api` sends. `api-key scope` changes that key unless you pass `--id <api_key_id>`. The key itself does not have to belong to an administrator.
261
+
262
+ ##### Users
263
+
264
+ ```bash
265
+ anybuild user roles
266
+ anybuild user list
267
+ anybuild user show someone@example.com
268
+ anybuild user create --id someone@example.com --role "Regular User" --kind person
269
+ anybuild user create --id billing-bot --role "Regular User" --kind service
270
+ anybuild user role someone@example.com "Security Administrator"
271
+ anybuild user deactivate someone@example.com
272
+ anybuild user activate someone@example.com
273
+ ```
274
+
275
+ - `user roles` prints `role_id`, `role_name`, and whether the role is a security administrator or a system designer. The first column is the role id you pass to `create` and `role`. Quote it when it contains a space (`"Security Administrator"`).
276
+ - `user list` and `user show` print `user_id`, kind (`person` or `service`), role name, and whether the user is active.
277
+ - A **person** needs an email as `--id`. The password is typed at a hidden `Password:` prompt. There is no password flag, and the command fails when stdin is not a terminal. `--first` and `--last` are optional.
278
+ - A **service** account takes `--id` and `--role` only. It has no password. `--first` and `--last` are rejected.
279
+ - `user role` replaces the user's single role. `activate` and `deactivate` change whether the account can be used.
280
+
281
+ ##### API keys
282
+
283
+ `api-key create` and `api-key list` use the predefined user `ai_agent` when `--user` is omitted. If that user is missing or inactive, the command fails. Do not create `ai_agent` from the CLI. `--user <user_id>` selects someone else.
284
+
285
+ ```bash
286
+ anybuild api-key create --name agent --user someone@example.com \
287
+ --scope GET 'my_app/invoice' --scope GET 'my_app/invoice(*)'
288
+ anybuild api-key list --user someone@example.com
289
+ anybuild api-key revoke <api_key_id>
290
+ ```
291
+
292
+ - `create` prints the secret once, on stdout (`odk_<api_key_id>_<secret>`). It is not shown again. Progress stays on stderr.
293
+ - `--use` stores that secret for `anybuild api` with no prompt. Writes stay off unless `--allow-writes`. `--read-only` is the explicit alternative and applies only together with `--use`. Allowing save, submit, or delete on the key is not enough for `anybuild api` to send those calls: the stored key must also have writes turned on. `anybuild api-key set --allow-writes` does that, and asks for the secret again.
294
+ - `--expires <iso>` sets an expiry. `--unscoped` lets the key call every open endpoint, and cannot be combined with `--scope`.
295
+ - `list` prints `api_key_id`, name, whether the key is unscoped, and expiry. It never prints a secret. `revoke` takes that `api_key_id`, not the secret. Revoking does not forget a key already stored on this machine; `anybuild api-key remove` does that.
296
+
297
+ ##### What a key is allowed to call
298
+
299
+ A key is allowed to call specific actions on an entity: read, save, submit, and delete. Each action is named with the same method and path you would pass to `anybuild api`. The path is `<app>/<entity>`. Quote a path that contains `(*)`.
300
+
301
+ `(*)` means one existing record. Without it, the path means the list of records. Submit is the same path with `/submit` added.
302
+
303
+ | You want the key to | Pass these |
304
+ | --- | --- |
305
+ | Read the list and one record | `GET my_app/invoice` and `GET 'my_app/invoice(*)'` |
306
+ | Save a new record and change one | `POST my_app/invoice` and `PATCH 'my_app/invoice(*)'` |
307
+ | Submit the list and one record | `POST my_app/invoice/submit` and `POST 'my_app/invoice(*)/submit'` |
308
+ | Delete one record | `DELETE 'my_app/invoice(*)'` |
309
+
310
+ The entity must already be open for that action. If it is not, the command fails and names the missing call.
311
+
312
+ `scope list`, `scope add`, and `scope remove` change the stored key. `--id <api_key_id>` picks another key, using the id from `api-key list` (not the secret). `add` and `remove` take one or more method-and-path pairs. `remove` fails if the key was not allowed to make that call. The command then prints what the key is allowed to call.
313
+
314
+ ```bash
315
+ anybuild api-key scope list
316
+ anybuild api-key scope add \
317
+ GET my_app/invoice GET 'my_app/invoice(*)' \
318
+ POST my_app/invoice PATCH 'my_app/invoice(*)' \
319
+ POST my_app/invoice/submit POST 'my_app/invoice(*)/submit' \
320
+ DELETE 'my_app/invoice(*)'
321
+ anybuild api-key scope remove --id <api_key_id> DELETE 'my_app/invoice(*)'
322
+ ```
323
+
324
+ An unscoped key may already call every open endpoint. `scope list` says so, and `scope add` / `scope remove` leave the key unchanged.
325
+
326
+ #### Webhook secrets
327
+
328
+ A route in `be/web_routes/` with `"access": "webhook"` refuses every call until it has a token (and, with `"hmac": true`, an HMAC secret). Secrets are never in files. After the route is pushed, a security administrator runs, inside the project:
329
+
330
+ ```bash
331
+ anybuild api-key webhook be/web_routes/post_webhooks_store_hours.json --token
332
+ anybuild api-key webhook be/web_routes/post_webhooks_store_hours.json --hmac
333
+ ```
334
+
335
+ Each prints the new secret once, to give to the calling system; the previous one stops working. Only the token's hash is stored. `--hmac` needs `"hmac": true` pushed first; `"hmac": false` and a push removes the HMAC secret. Secrets are not copied when the application is packaged to another environment: run the commands there too. Callers send the token in `X-Webhook-Token` (or the route's `token_header`) and sign with `X-Webhook-Timestamp: <unix seconds>` and `X-Webhook-Signature: v1=<hex HMAC-SHA256(secret, "<timestamp>.<raw body>")>`. Push and validate warn while a secret is missing. See `meta/be/web_routes/RULES.md`.
159
336
 
160
337
  #### Calling
161
338
 
@@ -193,7 +370,7 @@ Run project commands (`pull`, `push`, `status`, `validate`) from inside a cloned
193
370
  ## Security
194
371
 
195
372
  - Sessions and API keys live in `~/.ab/` with restrictive file permissions on Unix. Do not share or commit that folder.
196
- - `anybuild api-key set` only runs in a terminal (hidden input), so a key is always stored by a person. The CLI never prints a stored key.
373
+ - `anybuild api-key set` only runs in a terminal (hidden input). `api-key create` prints a new secret once; `show` never prints a stored key. `create --use` stores that key without a prompt, with writes off unless `--allow-writes`.
197
374
  - On shared machines, run `anybuild logout <host-url>` when done.
198
375
  - Avoid `--debug` in shared or CI logs.
199
376
 
@@ -6,6 +6,8 @@ export declare function isWriteMethod(method: ApiMethod): boolean;
6
6
  export declare function isValidApiKey(value: string): boolean;
7
7
  /** odk_<key id>_… — the key id is not secret, the rest is never shown. */
8
8
  export declare function maskApiKey(value: string): string;
9
+ /** The public id between `odk_` and the secret. It is not a secret. */
10
+ export declare function apiKeyId(value: string): string;
9
11
  /**
10
12
  * The URL is always `<api_url>/api/<path>` of the project, so a stored key is only ever sent to that host.
11
13
  * `path` may be given with or without the leading `/api/`; it may carry a query string.
@@ -1 +1 @@
1
- {"version":3,"file":"entity-api.d.ts","sourceRoot":"","sources":["../../src/api/entity-api.ts"],"names":[],"mappings":"AAGA,8GAA8G;AAC9G,eAAO,MAAM,WAAW,6CAA8C,CAAC;AACvE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAMrD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CASnE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAExD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM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AK,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,uEAAuE;AACvE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO9C;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CA2BhE;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CASlE;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAsB,aAAa,CACjC,OAAO,EAAE;IACP,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,EACD,SAAS,GAAE,OAAO,KAAa,GAC9B,OAAO,CAAC,aAAa,CAAC,CA8CxB;AAED,4FAA4F;AAC5F,wBAAgB,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAYxD;AAED,sDAAsD;AACtD,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAYtE"}
@@ -23,6 +23,15 @@ export function maskApiKey(value) {
23
23
  const match = /^(odk_[A-Za-z0-9-]+)_/.exec(value);
24
24
  return match ? `${match[1]}_…` : "odk_…";
25
25
  }
26
+ /** The public id between `odk_` and the secret. It is not a secret. */
27
+ export function apiKeyId(value) {
28
+ const match = /^odk_([A-Za-z0-9-]+)_[A-Za-z0-9_-]+$/.exec(value);
29
+ const id = match?.[1];
30
+ if (!id) {
31
+ throw new AbCliError("CONFIG", "That is not an Anybuild API key (expected odk_<id>_<secret>).");
32
+ }
33
+ return id;
34
+ }
26
35
  /**
27
36
  * The URL is always `<api_url>/api/<path>` of the project, so a stored key is only ever sent to that host.
28
37
  * `path` may be given with or without the leading `/api/`; it may carry a query string.
@@ -1 +1 @@
1
- {"version":3,"file":"entity-api.js","sourceRoot":"","sources":["../../src/api/entity-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEvD,8GAA8G;AAC9G,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAGvE,MAAM,UAAU,GAAG,OAAO,CAAC;AAC3B,MAAM,eAAe,GAAG,oCAAoC,CAAC;AAC7D,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAEnC,MAAM,UAAU,cAAc,CAAC,KAAyB;IACtD,MAAM,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAClD,IAAI,CAAE,WAAiC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACzD,MAAM,IAAI,UAAU,CAClB,QAAQ,EACR,yBAAyB,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,CACvF,CAAC;IACJ,CAAC;IACD,OAAO,MAAmB,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAiB;IAC7C,OAAO,MAAM,KAAK,KAAK,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAO,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC;AAED,0EAA0E;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C,IAAI,KAAK,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE;gBACjD,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;QAC3B,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,WAAW;IACb,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/dist/cli.js CHANGED
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"api-key.d.ts","sourceRoot":"","sources":["../../src/commands/api-key.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA0GjD,eAAO,MAAM,MAAM,EAAE,cAoBpB,CAAC"}
1
+ {"version":3,"file":"api-key.d.ts","sourceRoot":"","sources":["../../src/commands/api-key.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAukBjD,eAAO,MAAM,MAAM,EAAE,cAkDpB,CAAC"}