@elevasis/sdk 1.45.0 → 1.47.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 (40) hide show
  1. package/dist/cli.cjs +36454 -31490
  2. package/dist/index.d.ts +964 -358
  3. package/dist/index.js +59 -59
  4. package/dist/node/index.d.ts +0 -84
  5. package/dist/node/index.js +2 -2
  6. package/dist/test-utils/index.d.ts +993 -301
  7. package/dist/test-utils/index.js +177 -134
  8. package/dist/worker/index.d.ts +1043 -277
  9. package/dist/worker/index.js +74 -35
  10. package/package.json +2 -2
  11. package/reference/_navigation.md +12 -3
  12. package/reference/_reference-manifest.json +42 -0
  13. package/reference/core/exports.mdx +2 -0
  14. package/reference/packages/core/src/business/README.md +4 -1
  15. package/reference/packages/core/src/content/README.md +24 -0
  16. package/reference/packages/core/src/organization-model/README.md +148 -149
  17. package/reference/packages/core/src/organization-model/readiness/README.md +42 -0
  18. package/reference/packages/ui/src/features/README.md +28 -28
  19. package/reference/rules/shared-types.md +21 -0
  20. package/reference/scaffold/core/organization-graph.mdx +2 -3
  21. package/reference/scaffold/core/organization-model.mdx +2 -6
  22. package/reference/scaffold/operations/propagation-pipeline.md +15 -16
  23. package/reference/scaffold/operations/scaffold-maintenance.md +3 -2
  24. package/reference/scaffold/operations/workflow-recipes.md +2 -2
  25. package/reference/scaffold/recipes/customize-crm-actions.md +5 -5
  26. package/reference/scaffold/recipes/extend-content.md +301 -0
  27. package/reference/scaffold/recipes/extend-lead-gen.md +14 -16
  28. package/reference/scaffold/recipes/index.md +4 -1
  29. package/reference/scaffold/reference/contracts.md +18 -55
  30. package/reference/scaffold/reference/feature-registry.md +3 -0
  31. package/reference/scaffold/reference/glossary.md +1 -1
  32. package/reference/scaffold/ui/customization.md +2 -2
  33. package/reference/scaffold/ui/feature-shell.mdx +1 -3
  34. package/reference/sdk/cli-management.mdx +199 -30
  35. package/reference/sdk/cli.mdx +90 -13
  36. package/reference/sdk/framework/agent.mdx +6 -0
  37. package/reference/sdk/platform-tools/adapters-platform.mdx +3 -1
  38. package/reference/sdk/platform-tools/index.mdx +0 -2
  39. package/reference/sdk/resources/patterns.mdx +14 -6
  40. package/reference/ui/exports.mdx +1 -0
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  title: CLI Management Commands
3
- description: elevasis-sdk management commands -- project, note, acquisition, client, agent, session, queue, schedule, om, ui, and skill subcommand families
3
+ description: elevasis-sdk management commands -- project, note, acquisition, client, agent, session, queue, schedule, om, ui, skill, and content subcommand families
4
4
  ---
5
5
 
6
6
  This page covers the domain management commands for `elevasis-sdk`. For core SDK commands (check, deploy, exec, resources, executions, describe, creds, rename), see [CLI Reference](cli.mdx).
7
7
 
8
+ Every command family on this page -- `project`, `note`, `acquisition`, `client`, `agent`, `session`, `queue`, `schedule`, `om:doctor`, `request`, and `content` -- also accepts `--prod` to target production, overriding `NODE_ENV=development` (live as of `@elevasis/sdk` 1.45.0). See [CLI Reference's Global Flags](cli.mdx#global-flags) for the full description; per-command flag tables below list `--api-url` and other command-specific flags only, not `--prod` or `--json`.
9
+
8
10
  ---
9
11
 
10
12
  ## JSON-valued options
@@ -94,10 +96,16 @@ elevasis-sdk project:task:get <id>
94
96
  elevasis-sdk project:task:create --project <id> --title "Implement API"
95
97
  elevasis-sdk project:task:create --project <id> --title "Implement API" --checklist @json:tmp/task-checklist.json
96
98
  elevasis-sdk project:task:update <id> --status in_progress
99
+ elevasis-sdk project:task:update <id> --parent <parent-task-id>
100
+ elevasis-sdk project:task:update <id> --clear-milestone
97
101
  elevasis-sdk project:task:update <id> --checklist @json:tmp/task-checklist.json
98
102
  elevasis-sdk project:task:delete <id>
99
103
  ```
100
104
 
105
+ `milestone_id` and `parent_task_id` are nullable, and `--clear-milestone` / `--clear-parent` are how they are set to null. Each is mutually exclusive with its set-flag and exits `CONFLICTING_FLAGS` if both are passed, matching `project:update --client` / `--clear-client`. An empty string does **not** clear either one -- `--milestone ""` fails UUID validation rather than detaching.
106
+
107
+ `--sequence <n>` on `project:milestone:create` and `project:milestone:update` writes the display order that `project:milestone:list` sorts by. It takes a non-negative integer and rejects anything else with `INVALID_SEQUENCE` before the request is sent.
108
+
101
109
  Task commands also expose agent-oriented resume state:
102
110
 
103
111
  ```bash
@@ -186,9 +194,9 @@ elevasis-sdk request:get <id>
186
194
 
187
195
  Most `project:*` commands support:
188
196
 
189
- | Flag | Description |
190
- | ----------------- | -------------------------------------------------- |
191
- | `--pretty` | Human-readable terminal output instead of raw JSON |
197
+ | Flag | Description |
198
+ | ------------------- | -------------------------------------------------- |
199
+ | `--pretty` | Human-readable terminal output instead of raw JSON |
192
200
  | `--api-url <url>` | Override the API base URL |
193
201
 
194
202
  For exact required flags and accepted enum values, see the command source under `packages/sdk/src/cli/commands/project/`.
@@ -229,7 +237,7 @@ elevasis-sdk note:create --content <text>
229
237
  | Flag | Description |
230
238
  | ------------------------- | ----------------------------------------------------------------------------------------- |
231
239
  | `--content <text>` | Required. The note body text |
232
- | `--user <email>` | Target user email. Defaults to the API key owner when omitted |
240
+ | `--user <email>` | **Required.** Target user email |
233
241
  | `--title <text>` | Optional note title |
234
242
  | `--priority <priority>` | Priority level: `low`, `normal` (default), `high`, or `urgent` |
235
243
  | `--pinned` | Pin the note to the top of the panel |
@@ -240,8 +248,9 @@ elevasis-sdk note:create --content <text>
240
248
  **Behavior:**
241
249
 
242
250
  - Posts to `POST /api/external/user-notes`
243
- - When `--user` is omitted the note is created for the identity bound to the API key (the caller)
244
- - When `--user` is provided the platform resolves the email to a Supabase user UUID and verifies the resolved user is an active member of the calling organization before writing
251
+ - `--user` is **not optional in practice**: the CLI omits `user_email` from the body when the flag is absent, and `ExternalCreateUserNoteBodySchema` requires it, so the call returns 400
252
+ - There is no "API key owner" to default to. An API key is org-wide and its actor is the key itself, not a person -- defaulting would write a note into some human's private space they never asked for. See `.claude/rules/actor-attribution.md`
253
+ - The platform resolves the email to a Supabase user UUID and verifies the resolved user is an active member of the calling organization before writing
245
254
  - External agent-created notes are always private; org-shared visibility is a signed-in UI capability, not a broadcast CLI mode
246
255
  - The `--source` flag is recorded as the `source` column in `user_notes`; agent runtimes should pass their resource ID here so users can see which workflow created the note
247
256
  - Priority `normal` produces no badge in the UI; `high` renders orange, `urgent` renders red, `low` renders dimmed gray
@@ -249,8 +258,8 @@ elevasis-sdk note:create --content <text>
249
258
  **Examples:**
250
259
 
251
260
  ```bash
252
- # Create a note for the API key owner
253
- elevasis-sdk note:create --content "Deal X has stalled -- follow up needed"
261
+ # Create a note for a named user
262
+ elevasis-sdk note:create --content "Deal X has stalled -- follow up needed" --user ops@acme.com
254
263
 
255
264
  # Create a high-priority pinned note for a specific user
256
265
  elevasis-sdk note:create \
@@ -667,13 +676,14 @@ At least one field must be provided. `--description` and `--clear-description` a
667
676
 
668
677
  ## elevasis-sdk om:\*
669
678
 
670
- Knowledge map inspection. The `om:*` (Organization Model) commands expose knowledge graph traversal via the CLI. `om:*` and `knowledge:*` are aliases of the same subcommands.
679
+ Knowledge graph inspection, plus an Organization Model write surface (`om:scaffold:*`, `om:rename`, `om:deprecate`). The `om:*` (Organization Model) commands expose knowledge graph traversal via the CLI. `om:*` and `knowledge:*` are aliases of the same subcommands for the read-only surface described below -- the write commands are registered under `om:*` only, with no `knowledge:*` alias.
671
680
 
672
681
  **Path axes for `knowledge:ls` / `om:ls`:** `/by-system/<id>`, `/by-ontology/<ontologyId>`, `/by-kind/<kind>`, `/by-owner/<ownerId>`, `/by-domain/<domain>` (enumerate all items in a domain: `clients`, `roles`, `policies`, `customers`, `offerings`, `goals`), `/by-item/<domain>/<itemId>` (single domain-item profile), `/graph/<nodeId>/governs`, `/graph/<nodeId>/governed-by`, `/<nodeId>` (single node), `/all-systems`, `/all-resources`, `/all-roles`.
673
682
 
674
683
  - `knowledge:ls <path>` -- list nodes/edges for the mount; default output is an id + summary table, `--json` returns `{ path, mount, args, results }`.
675
684
  - `knowledge:cat <id>` -- render a node's `body` MDX to stdout; `--json` returns the full node object (body, links, owners, timestamps).
676
685
  - `knowledge:graph <id>` -- show outgoing + incoming edges grouped by edge kind.
686
+ - `om:doctor` -- validate Organization Model integrity against published `@elevasis/core/organization-model` primitives. This is a deliberately reduced 3-check command: two of the monorepo platform CLI's five checks assert monorepo-only paths that do not exist in a tenant project, so they are not ported. `--json` output includes `checksRun: 3` so a caller can tell it apart from the platform CLI's 5-check version.
677
687
 
678
688
  In tenant projects, SDK read commands load `core/config/organization-model.ts` through the SDK's layout-aware TypeScript loader. The temporary bundle and dependency resolution are anchored at the package root that owns SDK dependencies, so hoisted pnpm workspaces resolve `esbuild` and `@elevasis/core` correctly. Missing org-model files still return the default model; malformed files or files with no usable export emit diagnostics. `knowledge:generate` / `om:generate` is the exception because it reads MDX and codegen inputs directly.
679
689
 
@@ -687,6 +697,7 @@ elevasis-sdk knowledge:search <query>
687
697
  elevasis-sdk knowledge:describe <nodeId>
688
698
  elevasis-sdk knowledge:skills <nodeId>
689
699
  elevasis-sdk knowledge:generate
700
+ elevasis-sdk om:doctor --org <OrgName>
690
701
  ```
691
702
 
692
703
  These are registered as `knowledge:*` subcommands on `elevasis-sdk`. Both the SDK CLI (`elevasis-sdk knowledge:*`) and the platform CLI (`elevasis knowledge:*`) call the same query functions in `@repo/core/knowledge/queries`.
@@ -763,6 +774,81 @@ elevasis-sdk knowledge:generate [--source <path>] [--output <path>] [--flags-out
763
774
  elevasis-sdk om:generate
764
775
  ```
765
776
 
777
+ ### om:scaffold:\*
778
+
779
+ Six scaffolders that splice new Organization Model entries into project source files: `om:scaffold:system`, `om:scaffold:resource`, `om:scaffold:role`, `om:scaffold:knowledge`, `om:scaffold:ontology`, `om:scaffold:fill`. There is no `knowledge:scaffold:*` alias.
780
+
781
+ ```bash
782
+ elevasis-sdk om:scaffold:system --id sales.pipeline --title "Sales Pipeline" --kind operational
783
+ elevasis-sdk om:scaffold:resource --id lead-discovery-workflow --system-path sales.pipeline --title "Lead Discovery"
784
+ elevasis-sdk om:scaffold:role --id ops-lead --title "Ops Lead" --responsibility "Own weekly pipeline review"
785
+ elevasis-sdk om:scaffold:knowledge --id outreach-playbook --kind playbook --system-path sales.pipeline
786
+ elevasis-sdk om:scaffold:ontology --id deal --system-path sales.pipeline --kind object
787
+ elevasis-sdk om:scaffold:fill --gaps tmp/conformance-gaps.json
788
+ ```
789
+
790
+ **Default is dry-run.** Every `om:scaffold:*` command previews its change and writes nothing unless `--write` is passed (the one exception, `om:scaffold:ontology`, never writes at all -- see below). This inverted from earlier behavior, where these commands applied by default. An existing invocation that does not pass `--write` now only previews and silently stops applying -- this is the single most important thing to know about this command family.
791
+
792
+ **`--dry-run` is not a flag on any `om:scaffold:*` command.** It exists only as a deprecated programmatic/TypeScript option consumed internally by the handler functions; passing `--dry-run` on the command line is an unrecognized-option error. `om:rename` and `om:deprecate`, documented in the next section, are different commands with their own real `--dry-run` flag -- do not carry that convention over here.
793
+
794
+ **Splice targets:**
795
+
796
+ | Subcommand | Writes |
797
+ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
798
+ | `om:scaffold:system` | Splices `core/config/organization-model/systems.ts` |
799
+ | `om:scaffold:resource` | Splices `core/config/organization-model/systems.ts` -- **known-broken, see below** |
800
+ | `om:scaffold:role` | Splices `core/config/organization-model/profile.ts` |
801
+ | `om:scaffold:knowledge` | Writes a new `core/config/knowledge/nodes/<id>.mdx` file (no splice) |
802
+ | `om:scaffold:ontology` | Print-only by design -- writes nothing, and carries no `--write` flag |
803
+ | `om:scaffold:fill` | Writes new `core/config/organization-model/api-interfaces/<systemPath>.ts` const files and splices the import + field into `systems.ts` |
804
+
805
+ **`om:scaffold:resource` is currently non-functional against all three real project layouts.** Its splice anchor never received the anchor-scoping fix that landed for `om:scaffold:role` on 2026-08-11, so it still searches for the resource-descriptors closing brace unscoped -- in a real file that closing-brace shape recurs, and it splices into the wrong one, producing invalid TypeScript. The command's own post-write validation catches this and rolls the file back, so it fails safely, but it does not currently produce a usable result. Do not rely on it until the anchor fix ships.
806
+
807
+ **Common flag:**
808
+
809
+ | Flag | Description |
810
+ | --------- | ---------------------------------------------------------------------------- |
811
+ | `--write` | Apply the change. Default (omitted) is a dry-run preview -- no files written |
812
+
813
+ `om:scaffold:ontology` has no `--write` flag; it is always print-only. Each subcommand also has its own identifying flags (`--id`, `--title`, `--system-path`, and so on) -- omit any of them to be prompted interactively. `om:scaffold:fill` is the exception: it is non-interactive and requires `--gaps <path>` pointing at a conformance-gap JSON file.
814
+
815
+ ### om:rename / om:deprecate
816
+
817
+ Plan or apply an Organization Model system rename cascade, or a lifecycle transition (deprecate/archive). Neither has a `knowledge:*` alias.
818
+
819
+ ```bash
820
+ elevasis-sdk om:rename sales.crm sales.pipeline
821
+ elevasis-sdk om:rename sales.crm sales.pipeline --write
822
+
823
+ elevasis-sdk om:deprecate sales.crm --to deprecated
824
+ elevasis-sdk om:deprecate sales.crm --to archived --force --confirm archive:sales.crm --write
825
+ ```
826
+
827
+ **Unlike `om:scaffold:*`, both commands default to preview via a real `--dry-run` flag, not the absence of `--write`.** `--write` applies the edit, regenerates knowledge nodes when needed, and runs `om:doctor`. The two conventions on this page name their default state differently -- `om:scaffold:*` has no flag describing its default at all, while `om:rename` / `om:deprecate` spell it out with `--dry-run` -- so do not assume one family's flag shape from the other.
828
+
829
+ `om:rename` cannot re-parent a system: root-to-nested or nested-to-root moves must be done by hand.
830
+
831
+ **`om:rename <oldPath> <newPath>` flags:**
832
+
833
+ | Flag | Description |
834
+ | ----------- | ------------------------------------------------------------------------ |
835
+ | `--dry-run` | Preview only (default) |
836
+ | `--write` | Apply edits, regenerate knowledge nodes when needed, and run `om:doctor` |
837
+ | `--json` | Output JSON |
838
+
839
+ **`om:deprecate <systemPath>` flags:**
840
+
841
+ | Flag | Description |
842
+ | --------------------- | -------------------------------------------------------------------------- |
843
+ | `--to <lifecycle>` | Target lifecycle: `deprecated` or `archived`. Default: `deprecated` |
844
+ | `--dry-run` | Preview only (default) |
845
+ | `--write` | Apply the lifecycle edit and run `om:doctor` |
846
+ | `--force` | Allow archiving despite live dependents when paired with exact `--confirm` |
847
+ | `--confirm <token>` | Exact archive confirmation token: `archive:<systemPath>` |
848
+ | `--json` | Output JSON |
849
+
850
+ **Implementation:** `packages/sdk/src/cli/commands/om/rename.ts`, `packages/sdk/src/cli/commands/om/deprecate.ts` -- registered in `packages/sdk/src/cli/index.ts`
851
+
766
852
  ---
767
853
 
768
854
  ## elevasis-sdk ui:use-local / ui:use-published
@@ -805,29 +891,112 @@ The same coverage gate runs inside `elevasis-sdk check` when the coverage regist
805
891
 
806
892
  ---
807
893
 
894
+ ## elevasis-sdk content:\*
895
+
896
+ Read and review access to the content platform: content items, their attempts and distributions, the pipeline step contracts they move through, and the one write this namespace owns -- clearing an open `queued` review gate. Producing content -- creating items, recording attempts, opening distributions -- is workflow-side work through the `content` adapter from `@elevasis/sdk/worker`; see `packages/sdk/docs/scaffold/recipes/extend-content.md`. This namespace is the operator surface for the pipeline that adapter feeds, not a second way to write to it.
897
+
898
+ Matches the DB-backed namespaces documented above (`project:`, `client:`, `note:`, `queue:`, `schedule:`): pretty-printed JSON by default, `--pretty` for human-readable output.
899
+
900
+ ### Command Boundary
901
+
902
+ - `content:*` is the operator surface for the **content platform System** -- pipelines, items, attempts, and distributions, as documented in `packages/sdk/docs/scaffold/recipes/extend-content.md`. It reads the state a producer workflow is moving an item through, and it clears the review gates a human has to sign off on.
903
+ - `content:*` is **not** the Organization Model's own `System.content` field. That is a generic, retired bridge input every System carries for compatibility and has nothing to do with the content platform System documented here, despite sharing a name.
904
+ - `content:*` is **not** the acquisition domain's own material -- deals, companies, and CRM records reached through `acquisition:*` and `client:*`. A content item can be _about_ an acquisition client (`clientId` on the item), but the content platform does not read or write acquisition records, and `acquisition:*` does not read or write content items.
905
+ - `content:board` renders the same columns, gates, and waiting counts the Command Center board shows, and it is the **same** placement rule rather than a second copy of it. It was deferred until 2026-08-15 because `packages/sdk` has no `@elevasis/ui` dependency and so could not reach `deriveContentBoard`; the fix was to move that helper and `getContentItemIdentity` into `@repo/core/content`, which `@repo/ui` now re-exports. Duplicating the rule inside the CLI was rejected outright -- two copies of a placement rule diverge, which is exactly what happened to the open-review-gate predicate before it was consolidated into `review-gates.ts`.
906
+
907
+ ### Reads
908
+
909
+ ```bash
910
+ elevasis-sdk content:list --status queued --pipeline-id short-form-repurpose
911
+ elevasis-sdk content:get <itemId>
912
+ elevasis-sdk content:board <pipelineId> --pretty
913
+ elevasis-sdk content:queue
914
+ elevasis-sdk content:pipeline
915
+ elevasis-sdk content:pipeline <pipelineId>
916
+ elevasis-sdk content:distributions --pipeline-id short-form-repurpose
917
+ ```
918
+
919
+ - `content:list` -- list content items. Filters: `--status`, `--pillar`, `--pipeline-id`, `--client-id`, `--reviewed-by`, `--search` (matches title), `--limit`, `--offset`.
920
+ - `content:get <itemId>` -- one item plus its full attempt history and its distributions, in a single response. Each attempt carries a `sourceExecutionId`, so this call is the item's execution lineage in one hop -- feed any id straight into `elevasis-sdk execution` / `pnpm exec elevasis execution`.
921
+ - `content:board <pipelineId>` -- one pipeline rendered as columns: each declared step in `order`, each card at the first step its `processingState` has not recorded as `success`, and a gate with a waiting count on every `live` or `queued` step. Two buckets sit outside the columns: `done` (every declared step succeeded) and `unplaced` (the item's `processingState` names only steps the pipeline no longer declares). Unplaced items are never folded into column 1, so a non-empty bucket is a real signal that the step catalog moved underneath live items. `--limit` defaults to 100, the API's page ceiling for this route, and the command reports a **partial** board rather than truncating silently when a pipeline holds more items than one page.
922
+ - `content:queue` -- items sitting on an open `queued`-gate review. Each row prints the item, the `stepKey` of the gate it is waiting on, and the attempt that opened it. This is the list `content:review` reads from -- see "Why `--step` is required" below.
923
+ - `content:pipeline [id]` -- with no id, lists pipeline templates; with an id, returns that pipeline's step contract (step keys and review modes). Read from the **deployed** Organization Model snapshot, not a local project model -- a model edit that has not been redeployed produces a stale-snapshot 503 that looks like a code bug.
924
+ - `content:distributions` -- list distribution rows (one per platform/format target per item). Filters: `--content-item-id`, `--pipeline-id`, `--platform`, `--status`, `--limit`, `--offset`.
925
+
926
+ **API routes:** `GET /api/external/content/items`, `/api/external/content/items/:itemId`, `/api/external/content/queue`, `/api/external/content/pipelines`, `/api/external/content/pipelines/:id`, `/api/external/content/distributions`.
927
+
928
+ ### content:review
929
+
930
+ The one write command in this namespace. Everything else that writes to an item -- creating it, recording an attempt, opening a distribution -- is producer work through the `content` worker adapter, not a CLI command.
931
+
932
+ **Synopsis:**
933
+
934
+ ```
935
+ elevasis-sdk content:review <itemId> --step <key> (--approve | --reject) --user <email>
936
+ [--feedback <text>] [--reason <text>]
937
+ [--prod] [--api-url <url>] [--pretty]
938
+ ```
939
+
940
+ **Flags:**
941
+
942
+ | Flag | Description |
943
+ | --------------------- | ----------------------------------------------------- |
944
+ | `--step <key>` | Required. The `stepKey` of the `queued` gate to clear |
945
+ | `--approve` | Approve the item at that step |
946
+ | `--reject` | Reject the item at that step. Requires `--reason` |
947
+ | `--user <email>` | Required. The acting reviewer's email |
948
+ | `--feedback <text>` | Optional reviewer feedback, recorded on the review |
949
+ | `--reason <text>` | Rejection reason. Required when `--reject` is used |
950
+ | `--api-url <url>` | Override the API base URL |
951
+ | `--pretty` | Human-readable output instead of raw JSON |
952
+
953
+ `--approve` and `--reject` are mutually exclusive; exactly one is required.
954
+
955
+ **Behavior:**
956
+
957
+ Posts to `POST /api/external/content/items/:itemId/review`.
958
+
959
+ **Why `--step` is required.** Nothing makes a `queued` gate pause the pipeline -- a producer workflow can keep moving an item forward while an earlier step's review is still open, so a single item can have several `queued` gates open at the same time. A live run found exactly that: one item ended up with three open gates at once, and resolving the target server-side (by "most recent step-keyed attempt") cleared a step that was not a gate at all. There is no safe way to infer which gate a caller means, so the caller names it. The operator flow is `content:queue` to see which gates are open and each one's `stepKey`, then `content:review <itemId> --step <that key>` to clear the one intended.
960
+
961
+ **Why `--user` is required.** API keys have no owner -- there is no signed-in user on the API-key path -- and both `content_items.reviewed_by` and `content_item_attempts.created_by` are real foreign keys to `users`. The reviewer's identity has to come from somewhere, so the caller supplies it: `--user` names an email, which must resolve to an active member of the API key's organization.
962
+
963
+ **Examples:**
964
+
965
+ ```bash
966
+ # Approve a clip-selection gate
967
+ elevasis-sdk content:review 3f9c1e20-... --step clip-selection --approve --user ops@acme.com --pretty
968
+
969
+ # Reject with a reason
970
+ elevasis-sdk content:review 3f9c1e20-... --step copy-generation --reject --user ops@acme.com --reason "Off-brand tone" --pretty
971
+ ```
972
+
973
+ **Implementation:** `packages/sdk/src/cli/commands/content/`
974
+
975
+ ---
976
+
808
977
  ## Appendix: Domain Status
809
978
 
810
979
  Current status of all SDK CLI domains. Domains marked `deferred` have no CLI commands yet.
811
980
 
812
- | Domain | CLI surface | API surface | Status |
813
- | ----------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ----------------------------- |
814
- | platform | top-level SDK commands | mixed platform APIs | implemented |
815
- | project | `project:*` | `apps/api/src/projects/` | implemented |
816
- | knowledge | `knowledge:*` | file/generated knowledge data | implemented |
817
- | creds | `creds *` nested Commander group | credentials API | implemented |
818
- | ui | `ui:*` | local project file edits | implemented |
819
- | request | `request:submit`, `request:list`, `request:get` | requests API | implemented read/write scope |
820
- | error | `error resolve`, `error resolve-execution` | execution error APIs | partial |
821
- | acquisition | `acquisition:list:*`, `acquisition:deal:*` | `/api/external/acquisition/lists*`, `/api/external/deals*` | implemented read-only scope |
822
- | client | `client:*` | `/api/external/clients` | implemented read/write scope |
823
- | agent | `agent:list`, `agent:get` | `/api/external/agents*` | implemented read-only scope |
824
- | session | `session:create`, `session:turn`, `session:messages`, `session:list`, `session:get`, `session:end` | `/api/external/sessions*` | implemented multi-turn scope |
825
- | queue | `queue:list`, `queue:get`, `queue:select`, `queue:expire`, `queue:status` | `/api/external/command-queue*` | implemented |
826
- | schedule | `schedule:list`, `schedule:get`, `schedule:create`, `schedule:update` | `/api/external/task-scheduler/schedules*` | implemented |
827
- | skill | `skill:scaffold`, `skill:check-coverage` | local CLI catalog and `.claude/registries/skill-coverage.json` | implemented developer tooling |
828
- | content | none | not scoped here | deferred |
829
- | seo | none | not scoped here | deferred |
830
- | monitoring | none | not scoped here | deferred |
981
+ | Domain | CLI surface | API surface | Status |
982
+ | ----------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | ------------------------------------- |
983
+ | platform | top-level SDK commands | mixed platform APIs | implemented |
984
+ | project | `project:*` | `apps/api/src/projects/` | implemented |
985
+ | knowledge | `knowledge:*` | file/generated knowledge data | implemented |
986
+ | creds | `creds *` nested Commander group | credentials API | implemented |
987
+ | ui | `ui:*` | local project file edits | implemented |
988
+ | request | `request:submit`, `request:list`, `request:get` | requests API | implemented read/write scope |
989
+ | error | `error resolve`, `error resolve-execution` | execution error APIs | partial |
990
+ | acquisition | `acquisition:list:*`, `acquisition:deal:*` | `/api/external/acquisition/lists*`, `/api/external/deals*` | implemented read-only scope |
991
+ | client | `client:*` | `/api/external/clients` | implemented read/write scope |
992
+ | agent | `agent:list`, `agent:get` | `/api/external/agents*` | implemented read-only scope |
993
+ | session | `session:create`, `session:turn`, `session:messages`, `session:list`, `session:get`, `session:end` | `/api/external/sessions*` | implemented multi-turn scope |
994
+ | queue | `queue:list`, `queue:get`, `queue:select`, `queue:expire`, `queue:status` | `/api/external/command-queue*` | implemented |
995
+ | schedule | `schedule:list`, `schedule:get`, `schedule:create`, `schedule:update` | `/api/external/task-scheduler/schedules*` | implemented |
996
+ | skill | `skill:scaffold`, `skill:check-coverage` | local CLI catalog and `.claude/registries/skill-coverage.json` | implemented developer tooling |
997
+ | content | `content:list`, `content:get`, `content:board`, `content:queue`, `content:pipeline`, `content:distributions`, `content:review` | `/api/external/content*` | implemented read + review-write scope |
998
+ | seo | none | not scoped here | deferred |
999
+ | monitoring | none | not scoped here | deferred |
831
1000
 
832
1001
  ### Promotion Criteria
833
1002
 
@@ -840,4 +1009,4 @@ A domain should meet all four criteria before gaining a `*:list` / `*:get` surfa
840
1009
 
841
1010
  ---
842
1011
 
843
- **Last Updated:** 2026-05-19
1012
+ **Last Updated:** 2026-08-14
@@ -39,11 +39,7 @@ elevasis-sdk check
39
39
  - Relationship declarations referencing non-existent resources
40
40
  - Exits with code 0 on success, code 1 on validation failure
41
41
 
42
- **Flags:**
43
-
44
- | Flag | Description |
45
- | ------------------- | ------------------------- |
46
- | `--api-url <url>` | Override the API base URL |
42
+ `check` declares no `--api-url` flag -- it validates project source locally and never calls the API, so there is no base URL to override.
47
43
 
48
44
  **Example output (success):**
49
45
 
@@ -88,10 +84,10 @@ elevasis-sdk deploy
88
84
 
89
85
  **Flags:**
90
86
 
91
- | Flag | Description |
92
- | ------------------- | ------------------------------------------------------------------------- |
93
- | `--api-url <url>` | Override the API base URL (default: production) |
94
- | `--prod` | Force production target, overriding `NODE_ENV=development` (internal use) |
87
+ | Flag | Description |
88
+ | ------------------- | ---------------------------------------------------------- |
89
+ | `--api-url <url>` | Override the API base URL (default: production) |
90
+ | `--prod` | Force production target, overriding `NODE_ENV=development` |
95
91
 
96
92
  **Environment variables:**
97
93
 
@@ -320,6 +316,84 @@ elevasis-sdk execution onboard-client exec_abc001
320
316
 
321
317
  ---
322
318
 
319
+ ## elevasis-sdk execution:cancel
320
+
321
+ Cancel a running execution.
322
+
323
+ **Synopsis:**
324
+
325
+ ```
326
+ elevasis-sdk execution:cancel <resourceId> <executionId>
327
+ ```
328
+
329
+ **Behavior:**
330
+
331
+ - Calls `POST /api/external/executions/:resourceId/:executionId/cancel`
332
+ - The result reports which method was used: an in-memory signal if the execution's worker process is still reachable, or a database fallback if not
333
+ - A 409 response means the execution is not in a running state -- it already finished. That is a normal race, not a command failure
334
+
335
+ **Flags:**
336
+
337
+ | Flag | Description |
338
+ | ------------------- | ---------------------------------------------------- |
339
+ | `--prod` | Target production (overrides `NODE_ENV=development`) |
340
+ | `--api-url <url>` | Override the API base URL |
341
+ | `--json` | Output raw JSON response |
342
+
343
+ **Example:**
344
+
345
+ ```bash
346
+ elevasis-sdk execution:cancel my-workflow 9c47c944-67eb-4c84-98cb-bb951d05ede3
347
+ ```
348
+
349
+ ```
350
+ Execution cancelled
351
+ Resource: my-workflow
352
+ Execution ID: 9c47c944-67eb-4c84-98cb-bb951d05ede3
353
+ Method: in-memory signal
354
+ ```
355
+
356
+ **Implementation:** `packages/sdk/src/cli/commands/execution-cancel.ts`, registered in `packages/sdk/src/cli/index.ts`
357
+
358
+ ---
359
+
360
+ ## elevasis-sdk executions:delete
361
+
362
+ Delete a resource's execution history (destructive).
363
+
364
+ **Synopsis:**
365
+
366
+ ```
367
+ elevasis-sdk executions:delete <resourceId> [--force]
368
+ ```
369
+
370
+ **Behavior:**
371
+
372
+ - Calls `DELETE /api/external/executions/:resourceId`
373
+ - Requires a typed `DELETE` confirmation at an interactive prompt unless `--force` is passed
374
+ - `--resource-status <status>` (`dev` or `prod`) scopes the delete to runs from one deployment lane only
375
+ - `--json` without `--force` is a hard error -- it throws `executions:delete requires --force when --json is set`, because a JSON caller is assumed non-interactive and there is nothing to answer the confirmation prompt
376
+
377
+ **Flags:**
378
+
379
+ | Flag | Description |
380
+ | ------------------------------ | ------------------------------------------------------------ |
381
+ | `--prod` | Target production (overrides `NODE_ENV=development`) |
382
+ | `--api-url <url>` | Override the API base URL |
383
+ | `--resource-status <status>` | Only delete runs from this deployment lane (`dev` | `prod`) |
384
+ | `--force` | Skip the typed confirmation prompt |
385
+ | `--json` | Output raw JSON response |
386
+
387
+ **Example:**
388
+
389
+ ```bash
390
+ elevasis-sdk executions:delete my-workflow --force
391
+ ```
392
+
393
+ **Implementation:** `packages/sdk/src/cli/commands/executions-delete.ts`, registered in `packages/sdk/src/cli/index.ts`
394
+
395
+ ---
396
+
323
397
  ## elevasis-sdk deployments
324
398
 
325
399
  List all deployments for your organization.
@@ -541,7 +615,8 @@ elevasis-sdk cli [domain] [--format markdown|json]
541
615
  | --------------------- | ----------------------------------------------------------- |
542
616
  | `--domain <domain>` | Filter output to one domain (alternative to positional arg) |
543
617
  | `--format <format>` | Output format: `markdown` (default) or `json` |
544
- | `--api-url <url>` | Override the API base URL |
618
+
619
+ `cli` declares no `--api-url` flag -- it walks the locally registered Commander command graph and never calls the API.
545
620
 
546
621
  **Examples:**
547
622
 
@@ -579,7 +654,7 @@ Check that your Elevasis project is correctly configured.
579
654
  **Synopsis:**
580
655
 
581
656
  ```
582
- elevasis-sdk doctor [--verbose]
657
+ elevasis-sdk doctor [--verbose] [--prod]
583
658
  ```
584
659
 
585
660
  **Behavior:**
@@ -596,6 +671,7 @@ Runs four sequential checks and reports `[OK]` / `[FAIL]` / `[WARN]` for each. E
596
671
  | Flag | Description |
597
672
  | ----------- | ------------------------------------------------------------------- |
598
673
  | `--verbose` | Print full paths, response bodies, and error details for each check |
674
+ | `--prod` | Report against production (overrides `NODE_ENV=development`) |
599
675
 
600
676
  **Example output (all passing):**
601
677
 
@@ -623,14 +699,15 @@ These flags are accepted by all commands:
623
699
  | ------------------- | --------------------------------------------------------------------------------------------------- |
624
700
  | `--api-url <url>` | Override the API base URL. Priority: flag > `ELEVASIS_API_URL` env var > `NODE_ENV`-based default |
625
701
  | `--json` | Output raw JSON (available on most commands) |
702
+ | `--prod` | Target production, overriding `NODE_ENV=development` |
626
703
 
627
704
  **API base URL resolution:**
628
705
 
629
706
  - Production (default): `https://api.elevasis.io`
630
707
  - Development (`NODE_ENV=development`): `http://localhost:<port>`
631
708
  - Override: set `ELEVASIS_API_URL` or pass `--api-url`
632
- - Force production: pass `--prod` on `deploy` (overrides `NODE_ENV=development`)
709
+ - Force production: pass `--prod` after the command name on any authenticated command (overrides `NODE_ENV=development`). Live as of `@elevasis/sdk` 1.45.0; `--api-url https://api.elevasis.io` is the equivalent form on older installs.
633
710
 
634
711
  ---
635
712
 
636
- **Last Updated:** 2026-05-19
713
+ **Last Updated:** 2026-08-12
@@ -67,6 +67,12 @@ There is no `/meta`, `/docs`, or `/work` skill. The template's own boundary guid
67
67
 
68
68
  **`/git-sync`** -- Pulls the latest template changes, checks the installed `@elevasis/sdk` version against the declared range, reinstalls if the dependency baseline changed, and runs baseline verification (`ui check-types`, `ui build`, `operations check`, `operations check-types`). It stops after verifying -- it never auto-reconciles template drift or overwrites project-owned files. Release guidance is not delivered here; it ships inside the `@elevasis/sdk` reference bundle, which is always current for your installed version.
69
69
 
70
+ On a green verification it also **bumps your app version**. The literal lives in `ui/src/config/app-version.ts` (exported as `APP_VERSION`, consumed by `ui/src/config/app-config.ts` and rendered in the topbar), and the agent picks the segment by judging the whole run: **minor** for new capability or a changed `@elevasis/*` dependency baseline, **patch** for everything else. **Major is never automatic** -- if a run genuinely looks major the report says so and leaves the version alone.
71
+
72
+ The gate is **outgoing commits**, checked with `git rev-list --count @{u}..HEAD` before the bump commit is written. Nothing deploys off a run with nothing to push, so a pull-only run reports `Version: unchanged (nothing to push)` while a run with local commits and an empty pull does bump. The bump lands as its own `chore(ui): bump app version to x.y.z` commit and is not pushed. It is skipped when there is no upstream, when the pull or verification failed, when the project has no `ui/src/config/app-version.ts`, and inside the template itself.
73
+
74
+ `app-version.ts` is a separate file from `app-config.ts` deliberately. It is registered `never-touch` / `verify-only`, so the sync engine protects your value; folding it back into `app-config.ts` -- a critical manual-merge surface -- would flag every project as behind the template on every sync for a difference that is working as intended.
75
+
70
76
  **`/tutorial`** -- Persona-aware onboarding; see [Tutorial System](tutorial-system.mdx) for the full lesson breakdown.
71
77
 
72
78
  ## The Ambient Vibe Layer
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Platform Adapters"
3
- description: "Auto-generated table of all 12 platform (singleton, no credential) adapters exported from @elevasis/sdk/worker, derived from static analysis of the adapter source files."
3
+ description: "Auto-generated table of all 14 platform (singleton, no credential) adapters exported from @elevasis/sdk/worker, derived from static analysis of the adapter source files."
4
4
  ---
5
5
 
6
6
  {/* @generated by .claude/_gen/sync-sdk-adapters.ts — DO NOT EDIT */}
@@ -22,3 +22,5 @@ Platform adapters are singletons — import them directly, no credential require
22
22
  | Approval | `approval` | `create`, `deleteByMetadata` | Approval — create and manage HITL (human-in-the-loop) tasks. |
23
23
  | Execution | `execution` | `trigger`, `triggerAsync` | Execution — trigger other workflows or agents within the same organization. |
24
24
  | Email | `email` | `send` | Email — send platform emails (from notifications@elevasis.io) to organization members. |
25
+ | Artifacts | `artifacts` | `listArtifacts`, `createArtifact`, `getActive` | Artifacts — org-scoped governing-document store for rules documents, idea banks, and ICP docs. |
26
+ | Content | `content` | `createItem`, `getItem`, `listItems`, `updateItem`, `createAttempt`, `listAttempts`, `updateAttempt`, `createSourceAsset`, `getSourceAsset`, `listSourceAssets`, `updateSourceAsset`, `createDistribution`, `updateDistribution` | Content — create and query content_items/content_item_attempts/content_distributions rows for the content pipeline. |
@@ -191,8 +191,6 @@ const qualified = await platform.call({
191
191
 
192
192
  **Credential setup:** Create a credential with provider `supabase` -- config fields are `url` and `serviceRoleKey`. Workflows always use the service role key (server-side, no RLS).
193
193
 
194
- **`/database init`:** Guided setup that stores your Supabase credential, generates `data/schema.ts`, and creates `docs/database.mdx`.
195
-
196
194
  ---
197
195
 
198
196
  ## Documentation
@@ -449,7 +449,7 @@ The platform's HITL mechanism works in two parts: your workflow code creates an
449
449
 
450
450
  ### Creating approval tasks
451
451
 
452
- Call `approval.create()` from any workflow step to pause execution and emit a task to the Command Queue:
452
+ Call `approval.create()` from any workflow step to emit a task to the Command Queue. It does **not** pause or suspend the step -- it inserts a row into `command_queue` and returns `{ id }`, and the workflow keeps running to completion:
453
453
 
454
454
  {/* doc-snippet:skip: illustrative excerpt -- dealId/proposalUrl are shorthand for values from the enclosing step handler's input, not a standalone compilable file */}
455
455
 
@@ -458,19 +458,27 @@ import { approval } from '@elevasis/sdk/worker'
458
458
 
459
459
  const task = await approval.create({
460
460
  actions: [
461
- { id: 'approve', label: 'Approve', type: 'primary' },
461
+ {
462
+ id: 'approve',
463
+ label: 'Approve',
464
+ type: 'primary',
465
+ target: { resourceType: 'workflow', resourceId: 'send-proposal' },
466
+ },
462
467
  { id: 'reject', label: 'Reject', type: 'danger' },
463
468
  ],
464
469
  context: { dealId, proposalUrl },
465
470
  description: 'Review proposal before sending',
466
471
  })
467
472
 
468
- if (task.actionId === 'approve') {
469
- // continue with approved path
470
- }
473
+ // task is only `{ id: string }` -- the new command_queue row's id.
474
+ // There is no `task.actionId` to branch on here.
471
475
  ```
472
476
 
473
- The workflow step suspends at `approval.create()` and resumes only after a reviewer submits an action. See [Platform Adapters](../platform-tools/adapters-platform.mdx) for the full `approval.create()` reference.
477
+ **There is no resumption.** This workflow step -- and the whole workflow -- runs to completion and terminates normally right after `approval.create()` returns. When a reviewer later submits an action from the Command Queue, the API starts a **brand-new execution** of the workflow named in that action's `target`, with input `{ ...task.context, actionId, actionPayload }`. The original execution is not revived and cannot be branched on.
478
+
479
+ The consequence for anything you write: state your workflow needs once the reviewer's decision comes back cannot live in a local variable -- the process holding it already exited. Put everything the follow-up execution needs into `context` (it comes back verbatim as part of that execution's input), or persist it somewhere the new execution can look up by id.
480
+
481
+ See [Platform Adapters](../platform-tools/adapters-platform.mdx) for the full `approval.create()` reference.
474
482
 
475
483
  ### Built-in Command Center handling
476
484
 
@@ -20,6 +20,7 @@ description: "Auto-generated catalog of all published @elevasis/ui subpath expor
20
20
  | `@elevasis/ui/organization` | Organization | Foundation | Published organization shell, store, and helper surface. |
21
21
  | `@elevasis/ui/features/auth` | Features Auth | Features | Published auth feature surface for downstream shells. |
22
22
  | `@elevasis/ui/features/clients` | Features Clients | Features | Published clients feature surface for downstream shells. |
23
+ | `@elevasis/ui/features/content` | Features Content | Features | Published, data-free content review card surface (ContentReviewCard and its sub-components) for downstream shells. |
23
24
  | `@elevasis/ui/features/crm` | Features CRM | Features | Published CRM feature surface for downstream shells. |
24
25
  | `@elevasis/ui/features/dashboard` | Features Dashboard | Features | Published dashboard feature surface for downstream shells. |
25
26
  | `@elevasis/ui/features/delivery` | Features Delivery | Features | Published delivery feature surface for downstream shells. |