@elevasis/sdk 1.47.0 → 1.49.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 +1034 -319
- package/dist/index.d.ts +687 -49
- package/dist/index.js +297 -47
- package/dist/node/index.d.ts +110 -26
- package/dist/test-utils/index.d.ts +649 -36
- package/dist/test-utils/index.js +275 -45
- package/dist/worker/index.d.ts +687 -53
- package/dist/worker/index.js +121 -6
- package/package.json +2 -2
- package/reference/_navigation.md +7 -6
- package/reference/_reference-manifest.json +12 -2
- package/reference/core/index.mdx +6 -4
- package/reference/index.mdx +11 -5
- package/reference/packages/core/src/README.md +46 -44
- package/reference/packages/core/src/content/README.md +13 -12
- 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/ui.md +1 -1
- package/reference/rules/vibe-intents.md +19 -16
- package/reference/rules/vibe.md +32 -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 +172 -30
- package/reference/scaffold/reference/glossary.md +2 -2
- package/reference/scaffold/reference/system-interface-capabilities.md +26 -6
- package/reference/sdk/cli-management.mdx +246 -41
- package/reference/sdk/cli.mdx +103 -64
- package/reference/sdk/define-builders.mdx +1 -1
- package/reference/sdk/deployment/command-center.mdx +2 -2
- package/reference/sdk/deployment/index.mdx +1 -1
- package/reference/sdk/exports.mdx +4 -4
- package/reference/sdk/framework/agent.mdx +4 -3
- package/reference/sdk/framework/index.mdx +1 -1
- package/reference/sdk/framework/project-structure.mdx +34 -23
- package/reference/sdk/framework/tutorial-system.mdx +1 -1
- package/reference/sdk/getting-started.mdx +25 -52
- package/reference/sdk/index.mdx +3 -3
- package/reference/sdk/platform-tools/adapters-integration.mdx +1 -1
- package/reference/sdk/platform-tools/adapters-platform.mdx +5 -5
- package/reference/sdk/platform-tools/type-safety.mdx +1 -1
- package/reference/sdk/resources/patterns.mdx +10 -11
- package/reference/sdk/resources/types.mdx +15 -9
- package/reference/sdk/templates/data-enrichment.mdx +1 -1
- package/reference/sdk/templates/email-sender.mdx +1 -1
- package/reference/sdk/templates/index.mdx +47 -47
- package/reference/sdk/templates/lead-scorer.mdx +1 -1
- package/reference/sdk/templates/pdf-generator.mdx +42 -24
- package/reference/sdk/templates/recurring-job.mdx +20 -15
- package/reference/sdk/templates/text-classifier.mdx +1 -1
- package/reference/sdk/templates/web-scraper.mdx +9 -5
- package/reference/ui/exports.mdx +1 -1
- package/reference/ui/index.mdx +2 -2
|
@@ -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, skill, and
|
|
3
|
+
description: elevasis-sdk management commands -- project, note, acquisition, client, agent, session, queue, schedule, om, ui, skill, content, and grant 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 `
|
|
8
|
+
Every command family on this page -- `project`, `note`, `error`, `acquisition`, `client`, `agent`, `session`, `queue`, `schedule`, `om:doctor`, `request`, `content`, and `grant` -- 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
|
|
|
@@ -61,6 +61,8 @@ This CLI family is SDK-first, but it is not semantically standalone. It operates
|
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
63
|
elevasis-sdk project:list
|
|
64
|
+
elevasis-sdk project:resolve "Website Refresh"
|
|
65
|
+
elevasis-sdk project:work "Website Refresh"
|
|
64
66
|
elevasis-sdk project:get <id>
|
|
65
67
|
elevasis-sdk project:create --name "Website Refresh" --kind client_engagement
|
|
66
68
|
elevasis-sdk project:update <id> --status completed
|
|
@@ -69,7 +71,9 @@ elevasis-sdk project:delete <id>
|
|
|
69
71
|
|
|
70
72
|
**Behavior:**
|
|
71
73
|
|
|
72
|
-
- `project:list` filters by `--kind
|
|
74
|
+
- `project:list` filters by `--kind`, `--status`, `--search`, and `--client` (a UUID or fuzzy client name, resolved through the same client-lookup helper `client:resolve` exposes)
|
|
75
|
+
- `project:resolve <query>` resolves a project ID from a UUID, exact name, or search query and prints the ID (or the full record with `--pretty`) -- the same resolution logic used internally wherever a project command accepts a fuzzy identifier
|
|
76
|
+
- `project:work <query>` (alias `project:open`) resolves a project and prints a lifecycle-aware work brief combining the project record and its notes; `--json` renders the structured brief instead of the formatted one
|
|
73
77
|
- `project:get` returns a single project
|
|
74
78
|
- `project:create` and `project:update` operate on `/api/external/projects`
|
|
75
79
|
|
|
@@ -188,6 +192,22 @@ elevasis-sdk request:get <id>
|
|
|
188
192
|
| `--pretty` | Human-readable output instead of raw JSON |
|
|
189
193
|
| `--api-url <url>` | Override the API base URL |
|
|
190
194
|
|
|
195
|
+
**Write-back commands** (amend or withdraw a request you filed):
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
elevasis-sdk request:update <id> --input '{"project_id":"<uuid>"}'
|
|
199
|
+
elevasis-sdk request:delete <id>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
`request:update` calls `PATCH /api/external/requests/:id` to backfill fields (for example `project_id` / `task_id` on rows filed before those were populated) -- the payload is validated against `UpdateRequestInputSchema`. `status` is not writable through this command; it is the platform's answer to the request, so poll `request:get` to read it instead. `request:delete` calls `DELETE /api/external/requests/:id` and is permanent -- the row is removed, not archived. Use `request:update` to amend a request instead of deleting and resubmitting.
|
|
203
|
+
|
|
204
|
+
| Flag | Description |
|
|
205
|
+
| --------------------------- | --------------------------------------------------------------------------- |
|
|
206
|
+
| `-i, --input <json>` | Fields to change, as a JSON object (update: required unless `--input-file`) |
|
|
207
|
+
| `-f, --input-file <path>` | Read the changed fields from a JSON file instead of `--input` |
|
|
208
|
+
| `--pretty` | Human-readable output instead of raw JSON |
|
|
209
|
+
| `--api-url <url>` | Override the API base URL |
|
|
210
|
+
|
|
191
211
|
---
|
|
192
212
|
|
|
193
213
|
### Shared Flags
|
|
@@ -363,6 +383,31 @@ The following invariants govern the Notes feature and are relevant when building
|
|
|
363
383
|
|
|
364
384
|
---
|
|
365
385
|
|
|
386
|
+
## elevasis-sdk error:\*
|
|
387
|
+
|
|
388
|
+
Resolve execution errors surfaced by the observability layer -- mark one error, or every error tied to a single execution, as resolved.
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
elevasis-sdk error resolve <errorId>
|
|
392
|
+
elevasis-sdk error resolve-execution <executionId>
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
- `error resolve <errorId>` -- calls `PATCH /api/external/observability/errors/:errorId/resolve` and marks that one error resolved
|
|
396
|
+
- `error resolve-execution <executionId>` -- calls `PATCH /api/external/observability/errors/execution/:executionId/resolve` and marks every error tied to that execution resolved in one call
|
|
397
|
+
|
|
398
|
+
These are space-separated subcommands under the `error` group (`error resolve`, not `error:resolve`), unlike every other domain on this page.
|
|
399
|
+
|
|
400
|
+
**Flags:**
|
|
401
|
+
|
|
402
|
+
| Flag | Description |
|
|
403
|
+
| ------------------- | ---------------------------------------------------- |
|
|
404
|
+
| `--prod` | Target production (overrides `NODE_ENV=development`) |
|
|
405
|
+
| `--api-url <url>` | Override the API base URL |
|
|
406
|
+
|
|
407
|
+
**Implementation:** `packages/sdk/src/cli/commands/error/`
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
366
411
|
## elevasis-sdk acquisition:\*
|
|
367
412
|
|
|
368
413
|
Read-only access to acquisition lists and CRM deals. The acquisition CLI scope is intentionally read-only; mutating commands are deferred.
|
|
@@ -375,7 +420,7 @@ elevasis-sdk acquisition:list:get <id>
|
|
|
375
420
|
elevasis-sdk acquisition:list:status
|
|
376
421
|
```
|
|
377
422
|
|
|
378
|
-
- `acquisition:list:list` -- list
|
|
423
|
+
- `acquisition:list:list` -- list acquisition lists for the organization; filters: `--status` (`draft | enriching | launched | closing | archived`), `--batch`, `--vertical`, `--limit`, `--offset`
|
|
379
424
|
- `acquisition:list:get <id>` -- get full detail for a single acquisition list by UUID
|
|
380
425
|
- `acquisition:list:status` -- summarize counts and progress across all lists
|
|
381
426
|
|
|
@@ -387,7 +432,7 @@ elevasis-sdk acquisition:deal:get <id>
|
|
|
387
432
|
elevasis-sdk acquisition:deal:status
|
|
388
433
|
```
|
|
389
434
|
|
|
390
|
-
- `acquisition:deal:list` -- list
|
|
435
|
+
- `acquisition:deal:list` -- list CRM deals visible to the organization; filters: `--stage`, `--list <id>`, `--batch`, `--stale-since <iso>`, `--search`, `--limit`, `--offset`
|
|
391
436
|
- `acquisition:deal:get <id>` -- get a single deal record
|
|
392
437
|
- `acquisition:deal:status` -- summarize deal pipeline counts
|
|
393
438
|
|
|
@@ -446,12 +491,18 @@ Full CRUD management for client records. The `client:*` family covers create, re
|
|
|
446
491
|
|
|
447
492
|
```bash
|
|
448
493
|
elevasis-sdk client:list
|
|
494
|
+
elevasis-sdk client:resolve "Acme"
|
|
449
495
|
elevasis-sdk client:get <id>
|
|
496
|
+
elevasis-sdk client:status
|
|
450
497
|
elevasis-sdk client:create --name "Acme Corp"
|
|
451
498
|
elevasis-sdk client:update <id> --name "Acme Corp Updated"
|
|
452
499
|
elevasis-sdk client:delete <id>
|
|
453
500
|
```
|
|
454
501
|
|
|
502
|
+
- `client:resolve <query>` resolves a client ID from a UUID, exact name, or search query and prints the ID (or the full record with `--pretty`) -- the same resolution `client:update`, `client:delete`, and `project:create --client` use internally
|
|
503
|
+
- `client:status` summarizes the client portfolio: totals by status and linked-record counts (deals, projects, companies, contacts)
|
|
504
|
+
- `client:update` supports `--clear-source-deal`, `--clear-primary-company`, and `--clear-primary-contact` to null out those links; each is mutually exclusive with its corresponding set flag
|
|
505
|
+
|
|
455
506
|
**Flags:**
|
|
456
507
|
|
|
457
508
|
| Flag | Description |
|
|
@@ -459,7 +510,7 @@ elevasis-sdk client:delete <id>
|
|
|
459
510
|
| `--pretty` | Human-readable terminal output instead of raw JSON |
|
|
460
511
|
| `--api-url <url>` | Override the API base URL |
|
|
461
512
|
|
|
462
|
-
**Implementation:** `packages/sdk/src/cli/commands/` (client family)
|
|
513
|
+
**Implementation:** `packages/sdk/src/cli/commands/client/` (client family)
|
|
463
514
|
|
|
464
515
|
---
|
|
465
516
|
|
|
@@ -472,19 +523,22 @@ elevasis-sdk agent:list
|
|
|
472
523
|
elevasis-sdk agent:get <id>
|
|
473
524
|
```
|
|
474
525
|
|
|
475
|
-
- `agent:list` -- list
|
|
476
|
-
- `agent:get <id>` -- get metadata and
|
|
526
|
+
- `agent:list` -- list resources for the organization, filtered client-side to `resourceType: 'agent'`
|
|
527
|
+
- `agent:get <id>` -- get metadata and organization-model linkage for a specific agent
|
|
477
528
|
|
|
478
|
-
**API routes:** `GET /api/external/agents
|
|
529
|
+
**API routes:** `GET /api/external/resources` (filtered to agents), `GET /api/external/resources/:id/definition`
|
|
479
530
|
|
|
480
531
|
**Flags:**
|
|
481
532
|
|
|
482
|
-
| Flag | Description
|
|
483
|
-
| ------------------- |
|
|
484
|
-
| `--
|
|
485
|
-
| `--
|
|
533
|
+
| Flag | Description |
|
|
534
|
+
| ------------------- | -------------------------------------------------------- |
|
|
535
|
+
| `--json` | Output raw JSON instead of the default formatted display |
|
|
536
|
+
| `--prod` | Target production (overrides `NODE_ENV=development`) |
|
|
537
|
+
| `--api-url <url>` | Override the API base URL |
|
|
538
|
+
|
|
539
|
+
Note the direction: `agent:*` defaults to a formatted display and opts into JSON with `--json`, the opposite convention from the `--pretty`-to-opt-into-formatted commands elsewhere on this page.
|
|
486
540
|
|
|
487
|
-
**Implementation:** `packages/sdk/src/cli/commands/`
|
|
541
|
+
**Implementation:** `packages/sdk/src/cli/commands/agent/`
|
|
488
542
|
|
|
489
543
|
---
|
|
490
544
|
|
|
@@ -607,13 +661,26 @@ elevasis-sdk queue:status --pretty
|
|
|
607
661
|
| `--pretty` | Human-readable output instead of raw JSON |
|
|
608
662
|
| `--api-url <url>` | Override the API base URL |
|
|
609
663
|
|
|
610
|
-
**Shared flags (`queue:get`, `queue:expire
|
|
664
|
+
**Shared flags (`queue:get`, `queue:expire`):**
|
|
611
665
|
|
|
612
666
|
| Flag | Description |
|
|
613
667
|
| ------------------- | ----------------------------------------- |
|
|
614
668
|
| `--pretty` | Human-readable output instead of raw JSON |
|
|
615
669
|
| `--api-url <url>` | Override the API base URL |
|
|
616
670
|
|
|
671
|
+
**`queue:status` filter flags:**
|
|
672
|
+
|
|
673
|
+
`queue:status` shares the checkpoint/status view rather than the task list, so it takes its own subset of filters, not the shared flags above:
|
|
674
|
+
|
|
675
|
+
| Flag | Description |
|
|
676
|
+
| --------------------------- | --------------------------------------------------------------------- |
|
|
677
|
+
| `--time-range <range>` | Filter by created time range: `1h`, `24h`, `7d`, `30d` |
|
|
678
|
+
| `--priority-min <number>` | Minimum priority, 1-10 |
|
|
679
|
+
| `--priority-max <number>` | Maximum priority, 1-10 |
|
|
680
|
+
| `--status <status>` | Filter checkpoint totals by status: `pending`, `completed`, `expired` |
|
|
681
|
+
| `--pretty` | Human-readable output instead of raw JSON |
|
|
682
|
+
| `--api-url <url>` | Override the API base URL |
|
|
683
|
+
|
|
617
684
|
**Auth:** Calls `/api/external/command-queue/*` with API-key auth.
|
|
618
685
|
|
|
619
686
|
---
|
|
@@ -678,12 +745,22 @@ At least one field must be provided. `--description` and `--clear-description` a
|
|
|
678
745
|
|
|
679
746
|
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.
|
|
680
747
|
|
|
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`, `
|
|
748
|
+
**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`.
|
|
682
749
|
|
|
683
750
|
- `knowledge:ls <path>` -- list nodes/edges for the mount; default output is an id + summary table, `--json` returns `{ path, mount, args, results }`.
|
|
684
751
|
- `knowledge:cat <id>` -- render a node's `body` MDX to stdout; `--json` returns the full node object (body, links, owners, timestamps).
|
|
685
752
|
- `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.
|
|
753
|
+
- `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. `om:doctor` also asks the API about the deployed readiness snapshot and merges those diagnostics in, unless `--skip-deployed` is passed; it degrades to `NOT RUN` rather than failing when there is no key or no server reachable.
|
|
754
|
+
|
|
755
|
+
**`om:doctor` flags:**
|
|
756
|
+
|
|
757
|
+
| Flag | Description |
|
|
758
|
+
| ------------------------ | ------------------------------------------------------------ |
|
|
759
|
+
| `--scope <systemPath>` | Limit diagnostics to a system path and its descendants |
|
|
760
|
+
| `--skip-deployed` | Structural checks only -- do not ask the API about readiness |
|
|
761
|
+
| `--json` | Output as a grouped JSON envelope |
|
|
762
|
+
| `--prod` | Target production (overrides `NODE_ENV=development`) |
|
|
763
|
+
| `--api-url <url>` | Override the API base URL |
|
|
687
764
|
|
|
688
765
|
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.
|
|
689
766
|
|
|
@@ -697,14 +774,14 @@ elevasis-sdk knowledge:search <query>
|
|
|
697
774
|
elevasis-sdk knowledge:describe <nodeId>
|
|
698
775
|
elevasis-sdk knowledge:skills <nodeId>
|
|
699
776
|
elevasis-sdk knowledge:generate
|
|
700
|
-
elevasis-sdk om:doctor --
|
|
777
|
+
elevasis-sdk om:doctor --scope sales.crm
|
|
701
778
|
```
|
|
702
779
|
|
|
703
780
|
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`.
|
|
704
781
|
|
|
705
782
|
### knowledge:search
|
|
706
783
|
|
|
707
|
-
Universal keyword search across the entire Organization Model (systems, resources, knowledge, ontology, roles
|
|
784
|
+
Universal keyword search across the entire Organization Model (systems, resources, knowledge, ontology, roles). Alias: `om:search`.
|
|
708
785
|
|
|
709
786
|
```bash
|
|
710
787
|
elevasis-sdk knowledge:search <query> [--limit <n>] [--kinds <list>] [--json] [--ids-only]
|
|
@@ -914,6 +991,8 @@ elevasis-sdk content:queue
|
|
|
914
991
|
elevasis-sdk content:pipeline
|
|
915
992
|
elevasis-sdk content:pipeline <pipelineId>
|
|
916
993
|
elevasis-sdk content:distributions --pipeline-id short-form-repurpose
|
|
994
|
+
elevasis-sdk content:source-assets --kind transcript
|
|
995
|
+
elevasis-sdk content:source-asset <sourceAssetId>
|
|
917
996
|
```
|
|
918
997
|
|
|
919
998
|
- `content:list` -- list content items. Filters: `--status`, `--pillar`, `--pipeline-id`, `--client-id`, `--reviewed-by`, `--search` (matches title), `--limit`, `--offset`.
|
|
@@ -922,12 +1001,14 @@ elevasis-sdk content:distributions --pipeline-id short-form-repurpose
|
|
|
922
1001
|
- `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
1002
|
- `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
1003
|
- `content:distributions` -- list distribution rows (one per platform/format target per item). Filters: `--content-item-id`, `--pipeline-id`, `--platform`, `--status`, `--limit`, `--offset`.
|
|
1004
|
+
- `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.
|
|
1005
|
+
- `content:source-asset <sourceAssetId>` -- one source asset in full, payload included. This is how you read back text you just created.
|
|
925
1006
|
|
|
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`.
|
|
1007
|
+
**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`.
|
|
927
1008
|
|
|
928
1009
|
### content:review
|
|
929
1010
|
|
|
930
|
-
|
|
1011
|
+
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.
|
|
931
1012
|
|
|
932
1013
|
**Synopsis:**
|
|
933
1014
|
|
|
@@ -970,33 +1051,157 @@ elevasis-sdk content:review 3f9c1e20-... --step clip-selection --approve --user
|
|
|
970
1051
|
elevasis-sdk content:review 3f9c1e20-... --step copy-generation --reject --user ops@acme.com --reason "Off-brand tone" --pretty
|
|
971
1052
|
```
|
|
972
1053
|
|
|
1054
|
+
### content:source-asset:create
|
|
1055
|
+
|
|
1056
|
+
The namespace's second write command. It exists for a caller no other channel serves: an agent
|
|
1057
|
+
working from a terminal with an API key. A deployed workflow already creates source assets through
|
|
1058
|
+
`content.createSourceAsset` in the worker tool map, and a person uses the Command Center; a terminal
|
|
1059
|
+
agent can reach neither, and before this command `content_source_assets` was unreachable for it with
|
|
1060
|
+
no workaround.
|
|
1061
|
+
|
|
1062
|
+
**Synopsis:**
|
|
1063
|
+
|
|
1064
|
+
```
|
|
1065
|
+
elevasis-sdk content:source-asset:create --kind <kind> --title <title> (--text <value> | --url <url>)
|
|
1066
|
+
[--field <key>] [--duration <seconds>] [--storage-path <path>]
|
|
1067
|
+
[--metadata <json> | --metadata-file <path>] [--item <itemId>]
|
|
1068
|
+
```
|
|
1069
|
+
|
|
1070
|
+
A source asset holds its content in one of two places, and the flags mirror that exactly: `--text` is
|
|
1071
|
+
inline content and lands in `payload`, `--url` is a reference and lands in `externalUrl`. They are
|
|
1072
|
+
mutually exclusive because an asset is one shape or the other.
|
|
1073
|
+
|
|
1074
|
+
**There is still no file upload.** `--storage-path` records a path a caller already knows about (for
|
|
1075
|
+
example one written by a Dropbox intake flow elsewhere) -- it writes the `storage_path` column, the
|
|
1076
|
+
same column the worker adapter's `content.createSourceAsset` already sets freely, but it does not write
|
|
1077
|
+
bytes to storage itself. `/api/storage` has no external mirror. A file lives wherever it already lives;
|
|
1078
|
+
this flag just lets the CLI-created asset point at it, alongside or instead of `--url`.
|
|
1079
|
+
|
|
1080
|
+
**Flags:**
|
|
1081
|
+
|
|
1082
|
+
| Flag | Description |
|
|
1083
|
+
| -------------------------- | ------------------------------------------------------------------------------------- |
|
|
1084
|
+
| `--kind <kind>` | Required. Source asset kind, validated against the org model catalog |
|
|
1085
|
+
| `--title <title>` | Required. Human-readable title (1-500 chars) |
|
|
1086
|
+
| `--text <value>` | Inline text, or `@path` to read a local file. Mutually exclusive with `--url` |
|
|
1087
|
+
| `--field <key>` | Payload field the `--text` content is written to (default: the `--kind` value) |
|
|
1088
|
+
| `--url <url>` | External URL the asset references. Mutually exclusive with `--text` |
|
|
1089
|
+
| `--duration <seconds>` | Duration in seconds, for time-based referenced media |
|
|
1090
|
+
| `--storage-path <path>` | Storage path the asset references (1-2000 chars) |
|
|
1091
|
+
| `--metadata <json>` | Arbitrary metadata as a JSON object string. Mutually exclusive with `--metadata-file` |
|
|
1092
|
+
| `--metadata-file <path>` | Path to a JSON file containing metadata. Mutually exclusive with `--metadata` |
|
|
1093
|
+
| `--item <itemId>` | Link the new asset to this content item after creating it |
|
|
1094
|
+
| `--prod` | Target production (overrides `NODE_ENV=development`) |
|
|
1095
|
+
| `--api-url <url>` | Override the API base URL |
|
|
1096
|
+
| `--pretty` | Human-readable output instead of raw JSON |
|
|
1097
|
+
|
|
1098
|
+
**`--text` accepts `@path` to read a local file**, the same convention as `exec --input`. Anything not
|
|
1099
|
+
starting with `@` is the literal value. The CLI refuses content over 500KB locally rather than sending
|
|
1100
|
+
it for the server to reject -- that is `CONTENT_PAYLOAD_MAX_BYTES`, enforced by
|
|
1101
|
+
`ContentPayloadEnvelopeSchema`.
|
|
1102
|
+
|
|
1103
|
+
**The payload key defaults to the `--kind` value.** `--kind transcript` writes `payload.transcript`,
|
|
1104
|
+
matching what the Organization Model's `content:catalog/source-asset-kind` declares for that kind.
|
|
1105
|
+
Pass `--field` when a kind's declared field is named differently. A wrong key writes successfully and
|
|
1106
|
+
produces an asset no producer can read, so check the kind's declaration if unsure.
|
|
1107
|
+
|
|
1108
|
+
**An unlisted kind is legal and writes unvalidated.** URL-referencing kinds typically have no catalog
|
|
1109
|
+
entry at all -- the catalog declares payload fields, and a reference kind has none, so its URL is
|
|
1110
|
+
validated by `UrlSchema` on the request body instead. The consequence worth knowing: nothing can
|
|
1111
|
+
express "kind `youtube-video` requires `externalUrl`."
|
|
1112
|
+
|
|
1113
|
+
**Examples:**
|
|
1114
|
+
|
|
1115
|
+
```bash
|
|
1116
|
+
# Inline text from a local file
|
|
1117
|
+
elevasis-sdk content:source-asset:create --kind transcript --title "Episode 12" --text @transcript.txt --pretty
|
|
1118
|
+
|
|
1119
|
+
# A reference, linked to an item in the same invocation
|
|
1120
|
+
elevasis-sdk content:source-asset:create --kind youtube-video --title "The talk" \
|
|
1121
|
+
--url https://youtu.be/abc --duration 3600 --item 3f9c1e20-... --pretty
|
|
1122
|
+
```
|
|
1123
|
+
|
|
1124
|
+
Posts to `POST /api/external/content/source-assets`, then `PATCH /api/external/content/items/:itemId`
|
|
1125
|
+
when `--item` is given. The link is a second call on purpose: the asset exists either way, so a failed
|
|
1126
|
+
link leaves a usable row to retry against rather than losing the content just written.
|
|
1127
|
+
|
|
1128
|
+
**That `PATCH` is a link, not a general item update** -- `sourceAssetId` is the only field it accepts,
|
|
1129
|
+
and any other field is a 400. Editing an item's title, body, status, or pillar is producer work
|
|
1130
|
+
through `content.updateItem`, or a person's work in the Command Center. There is also no update or
|
|
1131
|
+
delete for a source asset: correct a bad one by creating a replacement and re-linking.
|
|
1132
|
+
|
|
973
1133
|
**Implementation:** `packages/sdk/src/cli/commands/content/`
|
|
974
1134
|
|
|
975
1135
|
---
|
|
976
1136
|
|
|
1137
|
+
## elevasis-sdk grant:\*
|
|
1138
|
+
|
|
1139
|
+
Manage public and code-gated agent access grants -- the surface that exposes a deployed agent at a shareable public URL (`/public/agents/<slug>`) without requiring a signed-in Command Center user.
|
|
1140
|
+
|
|
1141
|
+
```bash
|
|
1142
|
+
elevasis-sdk grant:list
|
|
1143
|
+
elevasis-sdk grant:create --resource <resourceId> [--slug <slug>] [--mode public|code] [--code <code>]
|
|
1144
|
+
elevasis-sdk grant:update <slug> [--mode public|code] [--max-turns <n>] [--branding <json>]
|
|
1145
|
+
elevasis-sdk grant:disable <slug>
|
|
1146
|
+
```
|
|
1147
|
+
|
|
1148
|
+
- `grant:list` -- list grants; `--resource-id` filters to one agent, `--include-disabled` includes disabled grants
|
|
1149
|
+
- `grant:create` -- create a grant for `--resource`; `--slug` defaults to a normalized form of the resource ID; `--mode code` requires `--code`
|
|
1150
|
+
- `grant:update <slug>` -- update mutable fields (mode, code, origins, expiry, limits, branding, capture fields, tool policy); at least one field is required
|
|
1151
|
+
- `grant:disable <slug>` -- disable a grant without deleting it (there is no `grant:delete` or `grant:enable`)
|
|
1152
|
+
|
|
1153
|
+
**Flags:**
|
|
1154
|
+
|
|
1155
|
+
| Flag | Description |
|
|
1156
|
+
| --------------------------- | -------------------------------------------------------------- |
|
|
1157
|
+
| `--resource <id>` | Agent resource ID to expose (create: required) |
|
|
1158
|
+
| `--slug <slug>` | Public slug; defaults to a normalized `--resource` |
|
|
1159
|
+
| `--mode <mode>` | Access mode: `public` (default) or `code` |
|
|
1160
|
+
| `--code <code>` | Access code, required when `--mode code` |
|
|
1161
|
+
| `--origins <origins>` | Comma-separated allowed origins; omit for any origin |
|
|
1162
|
+
| `--expires-at <iso>` | ISO timestamp when the grant expires |
|
|
1163
|
+
| `--max-turns <number>` | Maximum turns per public session |
|
|
1164
|
+
| `--max-sessions <number>` | Maximum sessions per visitor |
|
|
1165
|
+
| `--branding <json>` | Branding metadata JSON object |
|
|
1166
|
+
| `--capture-fields <json>` | Capture fields JSON array |
|
|
1167
|
+
| `--tool-policy <json>` | Tool policy JSON object |
|
|
1168
|
+
| `--public-base-url <url>` | Base URL used to print the full public URL alongside the grant |
|
|
1169
|
+
| `--resource-id <id>` | Filter by agent resource ID (list only) |
|
|
1170
|
+
| `--include-disabled` | Include disabled grants (list only) |
|
|
1171
|
+
| `--prod` | Target production (overrides `NODE_ENV=development`) |
|
|
1172
|
+
| `--api-url <url>` | Override the API base URL |
|
|
1173
|
+
| `--json` | Output as JSON |
|
|
1174
|
+
|
|
1175
|
+
**API routes:** `GET /api/external/agent-access-grants`, `POST /api/external/agent-access-grants`, `PATCH /api/external/agent-access-grants/:slug`, `POST /api/external/agent-access-grants/:slug/disable`.
|
|
1176
|
+
|
|
1177
|
+
**Implementation:** `packages/sdk/src/cli/commands/grant/`
|
|
1178
|
+
|
|
1179
|
+
---
|
|
1180
|
+
|
|
977
1181
|
## Appendix: Domain Status
|
|
978
1182
|
|
|
979
1183
|
Current status of all SDK CLI domains. Domains marked `deferred` have no CLI commands yet.
|
|
980
1184
|
|
|
981
|
-
| Domain | CLI surface
|
|
982
|
-
| ----------- |
|
|
983
|
-
| platform | top-level SDK commands
|
|
984
|
-
| project | `project:*`
|
|
985
|
-
| knowledge | `knowledge:*`
|
|
986
|
-
| creds | `creds *` nested Commander group
|
|
987
|
-
| ui | `ui:*`
|
|
988
|
-
| request | `request:submit`, `request:list`, `request:get`
|
|
989
|
-
| error | `error resolve`, `error resolve-execution`
|
|
990
|
-
| acquisition | `acquisition:list:*`, `acquisition:deal:*`
|
|
991
|
-
| client | `client:*`
|
|
992
|
-
| agent | `agent:list`, `agent:get`
|
|
993
|
-
| session | `session:create`, `session:turn`, `session:messages`, `session:list`, `session:get`, `session:end`
|
|
994
|
-
| queue | `queue:list`, `queue:get`, `queue:select`, `queue:expire`, `queue:status`
|
|
995
|
-
| schedule | `schedule:list`, `schedule:get`, `schedule:create`, `schedule:update`
|
|
996
|
-
| skill | `skill:scaffold`, `skill:check-coverage`
|
|
997
|
-
| content | `content:list`, `content:get`, `content:board`, `content:queue`, `content:pipeline`, `content:distributions`, `content:review` | `/api/external/content*`
|
|
998
|
-
|
|
|
999
|
-
|
|
|
1185
|
+
| Domain | CLI surface | API surface | Status |
|
|
1186
|
+
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------- |
|
|
1187
|
+
| platform | top-level SDK commands | mixed platform APIs | implemented |
|
|
1188
|
+
| project | `project:*` | `apps/api/src/projects/` | implemented |
|
|
1189
|
+
| knowledge | `knowledge:*` | file/generated knowledge data | implemented |
|
|
1190
|
+
| creds | `creds *` nested Commander group | credentials API | implemented |
|
|
1191
|
+
| ui | `ui:*` | local project file edits | implemented |
|
|
1192
|
+
| request | `request:submit`, `request:list`, `request:get`, `request:update`, `request:delete` | requests API | implemented read/write scope |
|
|
1193
|
+
| error | `error resolve`, `error resolve-execution` | execution error APIs | partial |
|
|
1194
|
+
| acquisition | `acquisition:list:*`, `acquisition:deal:*` | `/api/external/acquisition/lists*`, `/api/external/deals*` | implemented read-only scope |
|
|
1195
|
+
| client | `client:*` | `/api/external/clients` | implemented read/write scope |
|
|
1196
|
+
| agent | `agent:list`, `agent:get` | `/api/external/resources` (filtered), `/api/external/resources/:id/definition` | implemented read-only scope |
|
|
1197
|
+
| session | `session:create`, `session:turn`, `session:messages`, `session:list`, `session:get`, `session:end` | `/api/external/sessions*` | implemented multi-turn scope |
|
|
1198
|
+
| queue | `queue:list`, `queue:get`, `queue:select`, `queue:expire`, `queue:status` | `/api/external/command-queue*` | implemented |
|
|
1199
|
+
| schedule | `schedule:list`, `schedule:get`, `schedule:create`, `schedule:update`, `schedule:pause`, `schedule:resume`, `schedule:cancel` | `/api/external/task-scheduler/schedules*` | implemented |
|
|
1200
|
+
| skill | `skill:scaffold`, `skill:check-coverage` | local CLI catalog and `.claude/registries/skill-coverage.json` | implemented developer tooling |
|
|
1201
|
+
| 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 |
|
|
1202
|
+
| grant | `grant:list`, `grant:create`, `grant:update`, `grant:disable` | `/api/external/agent-access-grants*` | implemented read/write scope |
|
|
1203
|
+
| seo | none | not scoped here | deferred |
|
|
1204
|
+
| monitoring | none | not scoped here | deferred |
|
|
1000
1205
|
|
|
1001
1206
|
### Promotion Criteria
|
|
1002
1207
|
|
|
@@ -1009,4 +1214,4 @@ A domain should meet all four criteria before gaining a `*:list` / `*:get` surfa
|
|
|
1009
1214
|
|
|
1010
1215
|
---
|
|
1011
1216
|
|
|
1012
|
-
**Last Updated:** 2026-08-
|
|
1217
|
+
**Last Updated:** 2026-08-17
|