@elevasis/sdk 1.46.0 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +816 -107
- package/dist/index.d.ts +166 -2
- package/dist/index.js +23 -7
- package/dist/node/index.d.ts +2 -2
- package/dist/test-utils/index.d.ts +166 -2
- package/dist/test-utils/index.js +48 -9
- package/dist/worker/index.d.ts +213 -10
- package/dist/worker/index.js +14 -2
- package/package.json +2 -2
- package/reference/_navigation.md +5 -4
- package/reference/_reference-manifest.json +11 -1
- package/reference/packages/core/src/content/README.md +15 -10
- package/reference/packages/core/src/organization-model/README.md +9 -6
- package/reference/rules/content.md +27 -0
- package/reference/rules/organization-model.md +9 -3
- package/reference/rules/organization-os.md +2 -2
- package/reference/rules/vibe-intents.md +18 -15
- package/reference/rules/vibe.md +12 -12
- package/reference/scaffold/recipes/add-a-feature.md +1 -1
- package/reference/scaffold/recipes/customize-organization-model.md +2 -2
- package/reference/scaffold/recipes/extend-content.md +167 -68
- package/reference/scaffold/reference/glossary.md +2 -2
- package/reference/scaffold/reference/system-interface-capabilities.md +26 -6
- package/reference/sdk/cli-management.mdx +175 -29
- package/reference/sdk/platform-tools/adapters-platform.mdx +5 -5
- package/reference/sdk/platform-tools/index.mdx +0 -2
- package/reference/sdk/resources/patterns.mdx +14 -6
|
@@ -1,11 +1,11 @@
|
|
|
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
|
|
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`, and `
|
|
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
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -237,7 +237,7 @@ elevasis-sdk note:create --content <text>
|
|
|
237
237
|
| Flag | Description |
|
|
238
238
|
| ------------------------- | ----------------------------------------------------------------------------------------- |
|
|
239
239
|
| `--content <text>` | Required. The note body text |
|
|
240
|
-
| `--user <email>` | Target user email
|
|
240
|
+
| `--user <email>` | **Required.** Target user email |
|
|
241
241
|
| `--title <text>` | Optional note title |
|
|
242
242
|
| `--priority <priority>` | Priority level: `low`, `normal` (default), `high`, or `urgent` |
|
|
243
243
|
| `--pinned` | Pin the note to the top of the panel |
|
|
@@ -248,8 +248,9 @@ elevasis-sdk note:create --content <text>
|
|
|
248
248
|
**Behavior:**
|
|
249
249
|
|
|
250
250
|
- Posts to `POST /api/external/user-notes`
|
|
251
|
-
-
|
|
252
|
-
-
|
|
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
|
|
253
254
|
- External agent-created notes are always private; org-shared visibility is a signed-in UI capability, not a broadcast CLI mode
|
|
254
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
|
|
255
256
|
- Priority `normal` produces no badge in the UI; `high` renders orange, `urgent` renders red, `low` renders dimmed gray
|
|
@@ -257,8 +258,8 @@ elevasis-sdk note:create --content <text>
|
|
|
257
258
|
**Examples:**
|
|
258
259
|
|
|
259
260
|
```bash
|
|
260
|
-
# Create a note for
|
|
261
|
-
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
|
|
262
263
|
|
|
263
264
|
# Create a high-priority pinned note for a specific user
|
|
264
265
|
elevasis-sdk note:create \
|
|
@@ -677,7 +678,7 @@ At least one field must be provided. `--description` and `--clear-description` a
|
|
|
677
678
|
|
|
678
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.
|
|
679
680
|
|
|
680
|
-
**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`, `
|
|
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`, `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`.
|
|
681
682
|
|
|
682
683
|
- `knowledge:ls <path>` -- list nodes/edges for the mount; default output is an id + summary table, `--json` returns `{ path, mount, args, results }`.
|
|
683
684
|
- `knowledge:cat <id>` -- render a node's `body` MDX to stdout; `--json` returns the full node object (body, links, owners, timestamps).
|
|
@@ -703,7 +704,7 @@ These are registered as `knowledge:*` subcommands on `elevasis-sdk`. Both the SD
|
|
|
703
704
|
|
|
704
705
|
### knowledge:search
|
|
705
706
|
|
|
706
|
-
Universal keyword search across the entire Organization Model (systems, resources, knowledge, ontology, roles
|
|
707
|
+
Universal keyword search across the entire Organization Model (systems, resources, knowledge, ontology, roles). Alias: `om:search`.
|
|
707
708
|
|
|
708
709
|
```bash
|
|
709
710
|
elevasis-sdk knowledge:search <query> [--limit <n>] [--kinds <list>] [--json] [--ids-only]
|
|
@@ -890,29 +891,174 @@ The same coverage gate runs inside `elevasis-sdk check` when the coverage regist
|
|
|
890
891
|
|
|
891
892
|
---
|
|
892
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
|
+
elevasis-sdk content:source-assets --kind transcript
|
|
918
|
+
elevasis-sdk content:source-asset <sourceAssetId>
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
- `content:list` -- list content items. Filters: `--status`, `--pillar`, `--pipeline-id`, `--client-id`, `--reviewed-by`, `--search` (matches title), `--limit`, `--offset`.
|
|
922
|
+
- `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`.
|
|
923
|
+
- `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.
|
|
924
|
+
- `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.
|
|
925
|
+
- `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.
|
|
926
|
+
- `content:distributions` -- list distribution rows (one per platform/format target per item). Filters: `--content-item-id`, `--pipeline-id`, `--platform`, `--status`, `--limit`, `--offset`.
|
|
927
|
+
- `content:source-assets` -- list source assets, the raw material items are derived from. Filters: `--kind`, `--limit`, `--offset`. `--pretty` omits payloads, which can run to hundreds of kilobytes.
|
|
928
|
+
- `content:source-asset <sourceAssetId>` -- one source asset in full, payload included. This is how you read back text you just created.
|
|
929
|
+
|
|
930
|
+
**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`, `/api/external/content/source-assets`, `/api/external/content/source-assets/:sourceAssetId`.
|
|
931
|
+
|
|
932
|
+
### content:review
|
|
933
|
+
|
|
934
|
+
One of two write commands 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.
|
|
935
|
+
|
|
936
|
+
**Synopsis:**
|
|
937
|
+
|
|
938
|
+
```
|
|
939
|
+
elevasis-sdk content:review <itemId> --step <key> (--approve | --reject) --user <email>
|
|
940
|
+
[--feedback <text>] [--reason <text>]
|
|
941
|
+
[--prod] [--api-url <url>] [--pretty]
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
**Flags:**
|
|
945
|
+
|
|
946
|
+
| Flag | Description |
|
|
947
|
+
| --------------------- | ----------------------------------------------------- |
|
|
948
|
+
| `--step <key>` | Required. The `stepKey` of the `queued` gate to clear |
|
|
949
|
+
| `--approve` | Approve the item at that step |
|
|
950
|
+
| `--reject` | Reject the item at that step. Requires `--reason` |
|
|
951
|
+
| `--user <email>` | Required. The acting reviewer's email |
|
|
952
|
+
| `--feedback <text>` | Optional reviewer feedback, recorded on the review |
|
|
953
|
+
| `--reason <text>` | Rejection reason. Required when `--reject` is used |
|
|
954
|
+
| `--api-url <url>` | Override the API base URL |
|
|
955
|
+
| `--pretty` | Human-readable output instead of raw JSON |
|
|
956
|
+
|
|
957
|
+
`--approve` and `--reject` are mutually exclusive; exactly one is required.
|
|
958
|
+
|
|
959
|
+
**Behavior:**
|
|
960
|
+
|
|
961
|
+
Posts to `POST /api/external/content/items/:itemId/review`.
|
|
962
|
+
|
|
963
|
+
**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.
|
|
964
|
+
|
|
965
|
+
**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.
|
|
966
|
+
|
|
967
|
+
**Examples:**
|
|
968
|
+
|
|
969
|
+
```bash
|
|
970
|
+
# Approve a clip-selection gate
|
|
971
|
+
elevasis-sdk content:review 3f9c1e20-... --step clip-selection --approve --user ops@acme.com --pretty
|
|
972
|
+
|
|
973
|
+
# Reject with a reason
|
|
974
|
+
elevasis-sdk content:review 3f9c1e20-... --step copy-generation --reject --user ops@acme.com --reason "Off-brand tone" --pretty
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
### content:source-asset:create
|
|
978
|
+
|
|
979
|
+
The namespace's second write command. It exists for a caller no other channel serves: an agent
|
|
980
|
+
working from a terminal with an API key. A deployed workflow already creates source assets through
|
|
981
|
+
`content.createSourceAsset` in the worker tool map, and a person uses the Command Center; a terminal
|
|
982
|
+
agent can reach neither, and before this command `content_source_assets` was unreachable for it with
|
|
983
|
+
no workaround.
|
|
984
|
+
|
|
985
|
+
**Synopsis:**
|
|
986
|
+
|
|
987
|
+
```
|
|
988
|
+
elevasis-sdk content:source-asset:create --kind <kind> --title <title> (--text <value> | --url <url>)
|
|
989
|
+
[--field <key>] [--duration <seconds>] [--item <itemId>]
|
|
990
|
+
```
|
|
991
|
+
|
|
992
|
+
A source asset holds its content in one of two places, and the flags mirror that exactly: `--text` is
|
|
993
|
+
inline content and lands in `payload`, `--url` is a reference and lands in `externalUrl`. They are
|
|
994
|
+
mutually exclusive because an asset is one shape or the other.
|
|
995
|
+
|
|
996
|
+
**There is no file upload, deliberately.** `storage_path` on the table is written by nothing, and
|
|
997
|
+
`/api/storage` has no external mirror. A file lives wherever it already lives and the asset points at
|
|
998
|
+
it with `--url`.
|
|
999
|
+
|
|
1000
|
+
**`--text` accepts `@path` to read a local file**, the same convention as `exec --input`. Anything not
|
|
1001
|
+
starting with `@` is the literal value. The CLI refuses content over 500KB locally rather than sending
|
|
1002
|
+
it for the server to reject -- that is `CONTENT_PAYLOAD_MAX_BYTES`, enforced by
|
|
1003
|
+
`ContentPayloadEnvelopeSchema`.
|
|
1004
|
+
|
|
1005
|
+
**The payload key defaults to the `--kind` value.** `--kind transcript` writes `payload.transcript`,
|
|
1006
|
+
matching what the Organization Model's `content:catalog/source-asset-kind` declares for that kind.
|
|
1007
|
+
Pass `--field` when a kind's declared field is named differently. A wrong key writes successfully and
|
|
1008
|
+
produces an asset no producer can read, so check the kind's declaration if unsure.
|
|
1009
|
+
|
|
1010
|
+
**An unlisted kind is legal and writes unvalidated.** URL-referencing kinds typically have no catalog
|
|
1011
|
+
entry at all -- the catalog declares payload fields, and a reference kind has none, so its URL is
|
|
1012
|
+
validated by `UrlSchema` on the request body instead. The consequence worth knowing: nothing can
|
|
1013
|
+
express "kind `youtube-video` requires `externalUrl`."
|
|
1014
|
+
|
|
1015
|
+
**Examples:**
|
|
1016
|
+
|
|
1017
|
+
```bash
|
|
1018
|
+
# Inline text from a local file
|
|
1019
|
+
elevasis-sdk content:source-asset:create --kind transcript --title "Episode 12" --text @transcript.txt --pretty
|
|
1020
|
+
|
|
1021
|
+
# A reference, linked to an item in the same invocation
|
|
1022
|
+
elevasis-sdk content:source-asset:create --kind youtube-video --title "The talk" \
|
|
1023
|
+
--url https://youtu.be/abc --duration 3600 --item 3f9c1e20-... --pretty
|
|
1024
|
+
```
|
|
1025
|
+
|
|
1026
|
+
Posts to `POST /api/external/content/source-assets`, then `PATCH /api/external/content/items/:itemId`
|
|
1027
|
+
when `--item` is given. The link is a second call on purpose: the asset exists either way, so a failed
|
|
1028
|
+
link leaves a usable row to retry against rather than losing the content just written.
|
|
1029
|
+
|
|
1030
|
+
**That `PATCH` is a link, not a general item update** -- `sourceAssetId` is the only field it accepts,
|
|
1031
|
+
and any other field is a 400. Editing an item's title, body, status, or pillar is producer work
|
|
1032
|
+
through `content.updateItem`, or a person's work in the Command Center. There is also no update or
|
|
1033
|
+
delete for a source asset: correct a bad one by creating a replacement and re-linking.
|
|
1034
|
+
|
|
1035
|
+
**Implementation:** `packages/sdk/src/cli/commands/content/`
|
|
1036
|
+
|
|
1037
|
+
---
|
|
1038
|
+
|
|
893
1039
|
## Appendix: Domain Status
|
|
894
1040
|
|
|
895
1041
|
Current status of all SDK CLI domains. Domains marked `deferred` have no CLI commands yet.
|
|
896
1042
|
|
|
897
|
-
| Domain | CLI surface
|
|
898
|
-
| ----------- |
|
|
899
|
-
| platform | top-level SDK commands
|
|
900
|
-
| project | `project:*`
|
|
901
|
-
| knowledge | `knowledge:*`
|
|
902
|
-
| creds | `creds *` nested Commander group
|
|
903
|
-
| ui | `ui:*`
|
|
904
|
-
| request | `request:submit`, `request:list`, `request:get`
|
|
905
|
-
| error | `error resolve`, `error resolve-execution`
|
|
906
|
-
| acquisition | `acquisition:list:*`, `acquisition:deal:*`
|
|
907
|
-
| client | `client:*`
|
|
908
|
-
| agent | `agent:list`, `agent:get`
|
|
909
|
-
| session | `session:create`, `session:turn`, `session:messages`, `session:list`, `session:get`, `session:end`
|
|
910
|
-
| queue | `queue:list`, `queue:get`, `queue:select`, `queue:expire`, `queue:status`
|
|
911
|
-
| schedule | `schedule:list`, `schedule:get`, `schedule:create`, `schedule:update`
|
|
912
|
-
| skill | `skill:scaffold`, `skill:check-coverage`
|
|
913
|
-
| content |
|
|
914
|
-
| seo | none
|
|
915
|
-
| monitoring | none
|
|
1043
|
+
| Domain | CLI surface | API surface | Status |
|
|
1044
|
+
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
1045
|
+
| platform | top-level SDK commands | mixed platform APIs | implemented |
|
|
1046
|
+
| project | `project:*` | `apps/api/src/projects/` | implemented |
|
|
1047
|
+
| knowledge | `knowledge:*` | file/generated knowledge data | implemented |
|
|
1048
|
+
| creds | `creds *` nested Commander group | credentials API | implemented |
|
|
1049
|
+
| ui | `ui:*` | local project file edits | implemented |
|
|
1050
|
+
| request | `request:submit`, `request:list`, `request:get`, `request:update`, `request:delete` | requests API | implemented read/write scope |
|
|
1051
|
+
| error | `error resolve`, `error resolve-execution` | execution error APIs | partial |
|
|
1052
|
+
| acquisition | `acquisition:list:*`, `acquisition:deal:*` | `/api/external/acquisition/lists*`, `/api/external/deals*` | implemented read-only scope |
|
|
1053
|
+
| client | `client:*` | `/api/external/clients` | implemented read/write scope |
|
|
1054
|
+
| agent | `agent:list`, `agent:get` | `/api/external/agents*` | implemented read-only scope |
|
|
1055
|
+
| session | `session:create`, `session:turn`, `session:messages`, `session:list`, `session:get`, `session:end` | `/api/external/sessions*` | implemented multi-turn scope |
|
|
1056
|
+
| queue | `queue:list`, `queue:get`, `queue:select`, `queue:expire`, `queue:status` | `/api/external/command-queue*` | implemented |
|
|
1057
|
+
| schedule | `schedule:list`, `schedule:get`, `schedule:create`, `schedule:update` | `/api/external/task-scheduler/schedules*` | implemented |
|
|
1058
|
+
| skill | `skill:scaffold`, `skill:check-coverage` | local CLI catalog and `.claude/registries/skill-coverage.json` | implemented developer tooling |
|
|
1059
|
+
| content | `content:list`, `content:get`, `content:board`, `content:queue`, `content:pipeline`, `content:distributions`, `content:review`, `content:source-assets`, `content:source-asset`, `content:source-asset:create` | `/api/external/content*` | implemented read + review-write + source-asset-create scope |
|
|
1060
|
+
| seo | none | not scoped here | deferred |
|
|
1061
|
+
| monitoring | none | not scoped here | deferred |
|
|
916
1062
|
|
|
917
1063
|
### Promotion Criteria
|
|
918
1064
|
|
|
@@ -925,4 +1071,4 @@ A domain should meet all four criteria before gaining a `*:list` / `*:get` surfa
|
|
|
925
1071
|
|
|
926
1072
|
---
|
|
927
1073
|
|
|
928
|
-
**Last Updated:** 2026-08-
|
|
1074
|
+
**Last Updated:** 2026-08-14
|
|
@@ -11,16 +11,16 @@ Platform adapters are singletons — import them directly, no credential require
|
|
|
11
11
|
| Adapter | Export | Methods | Description |
|
|
12
12
|
| --- | --- | --- | --- |
|
|
13
13
|
| Scheduler | `scheduler` | `createSchedule`, `updateAnchor`, `deleteSchedule`, `findByIdempotencyKey`, `deleteScheduleByIdempotencyKey`, `listSchedules`, `getSchedule`, `cancelSchedule`, `cancelSchedulesByMetadata`, `cancelScheduleByIdempotencyKey` | Scheduler — create, update, cancel, and query task schedules. |
|
|
14
|
-
| Llm | `llm` | `generate` | LLM — generate structured or unstructured text via OpenAI, Anthropic,
|
|
14
|
+
| Llm | `llm` | `generate` | LLM — generate structured or unstructured text via OpenAI, Anthropic, or OpenRouter. |
|
|
15
15
|
| Storage | `storage` | `upload`, `download`, `createSignedUrl`, `delete`, `list` | Storage — upload, download, list, delete files, and create signed URLs in org-scoped buckets. |
|
|
16
16
|
| Notifications | `notifications` | `create` | Notifications — send in-platform notifications to team members. |
|
|
17
|
-
| AcqDb | `acqDb` | `listLists`, `createList`, `updateList`, `deleteList`, `addContactsToList`, `addCompaniesToList`, `updateCompanyStage`, `updateContactStage`, `createCompany`, `upsertCompany`, `updateCompany`, `getCompany`, `listCompanies`, `deleteCompany`, `createContact`, `upsertContact`, `updateContact`, `getContact`, `getContactByEmail`, `listContacts`, `deleteContact`, `bulkImportContacts`, `bulkImportCompanies`, `deactivateContactsByCompany`, `upsertDeal`, `getDealByEmail`, `getDealByEnvelopeId`, `updateDealEnvelopeId`, `getDealById`, `getContactById`, `getCompanyById`, `updateDiscoveryData`, `updateProposalData`, `markProposalSent`, `markProposalReviewed`, `updateCloseLostReason`, `updateFees`, `cacheInstantlyThreadIds`, `transitionItem`, `setContactNurture`, `cancelSchedulesAndHitlByEmail`, `cancelHitlByDealId`, `clearDealFields`, `deleteDeal`, `recordDealActivity`, `setDealStateKey`, `transitionDeal`, `loadDeal`, `createDealNote`, `listDealNotes`, `createDealTask`, `listDealTasks`, `listDealTasksDue`, `completeDealTask`, `mergeEnrichmentData`, `upsertSocialPosts` | AcqDb — full acquisition database: lists, companies, contacts, deals, notes, tasks, and enrichment. |
|
|
17
|
+
| AcqDb | `acqDb` | `listLists`, `createList`, `updateList`, `deleteList`, `addContactsToList`, `addCompaniesToList`, `updateCompanyStage`, `updateContactStage`, `clearCompanyStages`, `clearContactStages`, `createCompany`, `upsertCompany`, `updateCompany`, `getCompany`, `listCompanies`, `deleteCompany`, `createContact`, `upsertContact`, `updateContact`, `getContact`, `getContactByEmail`, `listContacts`, `deleteContact`, `bulkImportContacts`, `bulkImportCompanies`, `deactivateContactsByCompany`, `upsertDeal`, `getDealByEmail`, `getDealByEnvelopeId`, `updateDealEnvelopeId`, `getDealById`, `getContactById`, `getCompanyById`, `listDeals`, `getDealPipelineAnalytics`, `updateDiscoveryData`, `updateProposalData`, `markProposalSent`, `markProposalReviewed`, `updateCloseLostReason`, `updateFees`, `cacheInstantlyThreadIds`, `transitionItem`, `setContactNurture`, `cancelSchedulesAndHitlByEmail`, `cancelHitlByDealId`, `clearDealFields`, `deleteDeal`, `recordDealActivity`, `setDealStateKey`, `transitionDeal`, `loadDeal`, `createDealNote`, `listDealNotes`, `createDealTask`, `listDealTasks`, `listDealTasksDue`, `completeDealTask`, `mergeEnrichmentData`, `upsertSocialPosts` | AcqDb — full acquisition database: lists, companies, contacts, deals, notes, tasks, and enrichment. |
|
|
18
18
|
| Projects | `projects` | `listProjects`, `getProject`, `createProject`, `updateProject`, `deleteProject`, `listMilestones`, `createMilestone`, `updateMilestone`, `deleteMilestone`, `listTasks`, `getTask`, `createTask`, `updateTask`, `deleteTask`, `mergeTaskResumeContext`, `listNotes`, `createNote`, `updateNote`, `deleteNote` | Projects — manage delivery projects, milestones, tasks, notes, and resume context. |
|
|
19
19
|
| Crm | `crm` | `getRecentActivity`, `listDeals`, `getDeal`, `getDealByEmail`, `createDealNote`, `listDealNotes`, `createDealTask`, `listDealTasks`, `listDealTasksDue`, `completeDealTask`, `recordActivity`, `deleteDeal` | CRM — read and update deals, notes, tasks, activity, and stage transitions. |
|
|
20
|
-
| List | `list` | `getConfig`, `recordExecution`, `updateCompanyStage`, `updateContactStage`, `listPendingCompanyIds`, `listPendingContactIds` | List — list-scoped workflow execution tracking and stage updates. |
|
|
20
|
+
| List | `list` | `getConfig`, `recordExecution`, `updateCompanyStage`, `updateContactStage`, `clearCompanyStages`, `clearContactStages`, `listPendingCompanyIds`, `listPendingContactIds` | List — list-scoped workflow execution tracking and stage updates. |
|
|
21
21
|
| Pdf | `pdf` | `render`, `renderToBuffer` | PDF — render PDF documents from structured page definitions. |
|
|
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
|
|
26
|
-
| Content | `content` | `createItem`, `getItem`, `listItems`, `updateItem`, `createAttempt`, `listAttempts`, `createDistribution`, `updateDistribution` | Content — create and
|
|
25
|
+
| Artifacts | `artifacts` | `listArtifacts`, `createArtifact`, `getActive` | Artifacts — org-scoped governing-document store, keyed by owner and kind, for acquisition's audits, proposals, and ICP docs. |
|
|
26
|
+
| Content | `content` | `createItem`, `getItem`, `listItems`, `updateItem`, `createAttempt`, `listAttempts`, `updateAttempt`, `createSourceAsset`, `getSourceAsset`, `listSourceAssets`, `updateSourceAsset`, `createDistribution`, `updateDistribution` | Content — create, read, and update content_items/content_item_attempts/content_distributions/content_source_assets 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
|
|
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
|
-
{
|
|
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
|
-
|
|
469
|
-
|
|
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
|
-
|
|
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
|
|