@elevasis/sdk 1.34.0 → 1.34.1

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.
@@ -0,0 +1,237 @@
1
+ ---
2
+ name: build
3
+ description: Guided Codify-ceremony runbook for building a new Organization Model System end to end in a tenant project — shell, ontology, resources, topology, knowledge node, and verify.
4
+ allowed-tools: Read, Glob, Grep, Bash
5
+ ---
6
+
7
+ # /om build (Tenant)
8
+
9
+ Intent-driven runbook for authoring a complete Organization Model System in this tenant project.
10
+ The **primary entry is intent**: `/om` routes free-text build intent here via `promptSignals` and
11
+ the 5-bucket classifier whenever you describe a system you want to build. Manual `/om build` is a
12
+ supported secondary entry.
13
+
14
+ Every write runs through the Codify ceremony (snapshot → propose → confirm → write → validate →
15
+ rollback). See the "Write Power" section in `SKILL.md` for the ceremony steps.
16
+
17
+ **Tenant authoring files** (split layout):
18
+
19
+ - `core/config/organization-model/systems.ts` — System entries and system-owned resources
20
+ - `core/config/organization-model/navigation.ts` — sidebar wiring
21
+ - `core/config/knowledge/nodes/` — knowledge node MDX files
22
+
23
+ ---
24
+
25
+ ## Phase 0 — Capture Intent
26
+
27
+ Before writing anything, extract:
28
+
29
+ 1. **System name and dotted path** (`parent.child` format, e.g. `sales.crm`).
30
+ 2. **Kind**: `product`, `operational`, `platform`, or `diagnostic`.
31
+ 3. **What it does** — one sentence. This becomes the `description`.
32
+ 4. **What it owns** — objects, actions, catalogs, events (these become `system.ontology` entries).
33
+ 5. **What it calls or reacts to** — other systems, triggers, human checkpoints.
34
+ 6. **Whether it needs a UI route** — yes/no determines whether `system.ui` is authored.
35
+ 7. **Whether it adopts a platform API interface** — yes/no determines whether `system.apiInterface`
36
+ is authored (see "API Interface Readiness" in `SKILL.md`).
37
+
38
+ Run a pre-flight read to ground id choices in current model state:
39
+
40
+ ```bash
41
+ pnpm elevasis-sdk om:ls /all-systems
42
+ ```
43
+
44
+ ---
45
+
46
+ ## Phase 1 — System Shell (Codify Level-A)
47
+
48
+ Use `om:scaffold:system` (dry-run first) or the Codify Level-A ceremony to add the `SystemEntry`
49
+ to `core/config/organization-model/systems.ts`.
50
+
51
+ **Dry-run:**
52
+
53
+ ```bash
54
+ pnpm elevasis-sdk om:scaffold:system --dry-run
55
+ ```
56
+
57
+ Minimum fields: `id`, `order`, `label`. Optional at this stage: `description`, `kind`,
58
+ `lifecycle`, `responsibleRoleId`.
59
+
60
+ **Validate after write:**
61
+
62
+ ```bash
63
+ pnpm -C operations check-types
64
+ pnpm -C operations check
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Phase 2 — Ontology (`system.ontology`)
70
+
71
+ Add owned ontology kinds inside the `ontology` field of the `SystemEntry` in `systems.ts`.
72
+
73
+ Valid scope keys: `objectTypes`, `linkTypes`, `actionTypes`, `catalogTypes`, `eventTypes`,
74
+ `interfaceTypes`, `valueTypes`, `sharedProperties`, `groups`, `endpoints`.
75
+
76
+ All ids use the canonical format: `system.path:kind/local-id`
77
+ (e.g. `sales.crm:object/deal`, `sales.crm:action/qualify-lead`).
78
+
79
+ Apply via the Codify Level-A ceremony — read, propose diff, confirm, write, validate.
80
+
81
+ **Validate after write:**
82
+
83
+ ```bash
84
+ pnpm -C operations check-types
85
+ pnpm -C operations check
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Phase 3 — Resources (Codify Level-A + scaffold)
91
+
92
+ Add resource entries to `systems.ts` (or the split `resources` section if your project uses one).
93
+ Each resource carries `systemPath` (canonical system attachment) and `ontology` bindings.
94
+
95
+ Use `om:scaffold:resource` for guided creation, or Codify Level-A for manual addition.
96
+
97
+ **Dry-run:**
98
+
99
+ ```bash
100
+ pnpm elevasis-sdk om:scaffold:resource --dry-run --system-path <your.system>
101
+ ```
102
+
103
+ Key invariants:
104
+
105
+ - `resource.systemPath` is the canonical attachment for `getResourcesForSystem()`.
106
+ - Choose `systemPath` based on the business capability the resource operates, not its kind.
107
+ - `primaryAction` must be a member of `resource.ontology.actions`.
108
+
109
+ **Validate after write:**
110
+
111
+ ```bash
112
+ pnpm -C operations check-types
113
+ pnpm -C operations check
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Phase 4 — Topology (optional)
119
+
120
+ If the system reacts to events, calls other systems, or requires human checkpoints, author
121
+ topology relationships. In a tenant project, topology lives alongside the System entries in
122
+ `systems.ts` (or a dedicated `topology` field if your project uses the split layout with a
123
+ separate topology section).
124
+
125
+ Canonical relationship kinds:
126
+
127
+ - `triggers` — event, webhook, or schedule fires a resource handler
128
+ - `uses` — this system calls another system or integration
129
+ - `approval` — a step requires human checkpoint before continuing
130
+
131
+ Cross-system API handoff requires a `uses` edge with `systemInterfaceGrant` metadata — see the
132
+ "API Interface Readiness" section in `SKILL.md`.
133
+
134
+ Apply via Codify Level-A ceremony. Validate after each topology write.
135
+
136
+ ---
137
+
138
+ ## Phase 5 — Knowledge Node (optional)
139
+
140
+ Author a governing knowledge node to make the system searchable via `/om` and surfaced in the
141
+ knowledge browser.
142
+
143
+ Use `om:scaffold:knowledge` for guided creation:
144
+
145
+ ```bash
146
+ pnpm elevasis-sdk om:scaffold:knowledge --dry-run --system-path <your.system> --kind playbook
147
+ ```
148
+
149
+ MDX frontmatter shape:
150
+
151
+ ```mdx
152
+ ---
153
+ id: knowledge.my-system-playbook
154
+ kind: playbook
155
+ label: My System Playbook
156
+ description: Rules and patterns for operating My System.
157
+ governs:
158
+ - my.system
159
+ ---
160
+ ```
161
+
162
+ After authoring, regenerate the knowledge index:
163
+
164
+ ```bash
165
+ pnpm elevasis-sdk om:generate
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Phase 6 — UI and Navigation (optional)
171
+
172
+ If the system needs a sidebar entry, author `system.ui` and add a navigation surface entry.
173
+
174
+ `system.ui` fields: `path`, `surfaces[]`, `icon`, `order`. Apply via Codify Level-A.
175
+
176
+ Navigation wiring lives in `core/config/organization-model/navigation.ts`. Add the system's
177
+ path to the relevant sidebar section. Validate after the navigation write.
178
+
179
+ ---
180
+
181
+ ## Phase 7 — apiInterface (API-backed systems only)
182
+
183
+ `system.apiInterface` is adopt-only in tenant projects. Only add it when the system adopts a
184
+ platform-provided API capability from the installed `@elevasis/core` / `@elevasis/sdk` version.
185
+ Use only readiness profiles listed in
186
+ `node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md`.
187
+
188
+ The profile also fixes the required System path — do not invent a profile or repoint a cataloged
189
+ profile to a custom path.
190
+
191
+ Apply via Codify Level-A after confirming the readiness profile with the user:
192
+
193
+ ```bash
194
+ pnpm -C operations check-types
195
+ pnpm -C operations check # conformance gate fires here if the marker is incomplete
196
+ ```
197
+
198
+ ---
199
+
200
+ ## Phase 8 — Full Verify
201
+
202
+ Run both validation gates once all phases are done:
203
+
204
+ ```bash
205
+ pnpm -C operations check-types
206
+ pnpm -C operations check
207
+ ```
208
+
209
+ If the conformance gate reports a gaps file, apply it:
210
+
211
+ ```bash
212
+ pnpm elevasis-sdk om:scaffold:fill --gaps .elevasis/conformance-gaps.json --dry-run
213
+ ```
214
+
215
+ ---
216
+
217
+ ## Quick Reference
218
+
219
+ | Phase | OM Slot | Authoring File | Ceremony |
220
+ | ----- | --------------------------------- | --------------------------------- | ----------------------- |
221
+ | 1 | `systems` map | `systems.ts` | Scaffold or Level-A |
222
+ | 2 | `system.ontology.<scope>` | `systems.ts` | Level-A |
223
+ | 3 | resources + `resource.systemPath` | `systems.ts` | Scaffold or Level-A |
224
+ | 4 | topology relationships | `systems.ts` / topology section | Level-A |
225
+ | 5 | `system.governedByKnowledge[]` | `knowledge/nodes/<path>/<id>.mdx` | Scaffold or Level-A |
226
+ | 6 | `system.ui` + navigation surfaces | `systems.ts` + `navigation.ts` | Level-A |
227
+ | 7 | `system.apiInterface` | `systems.ts` | Level-A (adopt-only) |
228
+ | 8 | — | — | `check` + `check-types` |
229
+
230
+ ---
231
+
232
+ ## Cross-Links
233
+
234
+ - Codify Level-A ceremony: `.claude/skills/om/operations/codify-level-a.md`
235
+ - Scaffold (guided new entries): `.claude/skills/om/operations/scaffold.md`
236
+ - API interface readiness: "API Interface Readiness" section in `.claude/skills/om/SKILL.md`
237
+ - Platform narrative guide + worked examples: `node_modules/@elevasis/sdk/reference/guides/building-systems.md` (if present)
@@ -0,0 +1,47 @@
1
+ # /om build system scaffold added to tenant template
2
+
3
+ ## Why this note exists
4
+
5
+ The monorepo added a guided `/om build` operation (Steps 2-3 of the Building-Systems Scaffold
6
+ task) that sequences the full platform runbook for authoring an Organization Model System end
7
+ to end. This train mirrors a thinner, Codify-ceremony-framed variant of that operation into the
8
+ tenant template. Tenant projects author OM via the Codify ceremony (not the platform PR-review
9
+ runbook), so the tenant variant is scoped accordingly.
10
+
11
+ Changes in this train:
12
+
13
+ - New operation file `.claude/skills/om/operations/build.md` (Codify-framed, 8 phases).
14
+ - `metadata.promptSignals` in `.claude/skills/om/SKILL.md` extended with four build-intent
15
+ phrases: `build a system`, `design a system`, `create a system that`, `system architecture`.
16
+ - `## Operations` table added to `.claude/skills/om/SKILL.md` with the `build` EXECUTE row.
17
+ - Build-intent routing branch added to the Decision Tree section of `SKILL.md` so free-text
18
+ build intent routes to `/om build` before the 5-bucket read/write buckets.
19
+
20
+ ## Applies to
21
+
22
+ - All template-derived projects that ship the `om` skill (`.claude/skills/om/SKILL.md`).
23
+ - Any project where an agent might express intent to build or design a new System.
24
+
25
+ ## Required actions
26
+
27
+ 1. Pull template changes so the new `build.md` operation file and the updated `SKILL.md` are
28
+ present in `.claude/skills/om/`.
29
+ 2. No package baseline bumps required -- this is a pure agent-scaffold change (no published
30
+ package version involved).
31
+ 3. No `pnpm install` needed unless the `/git-sync` pull also brings unrelated baseline changes.
32
+
33
+ ## Verification
34
+
35
+ - `.claude/skills/om/operations/build.md` is present.
36
+ - `.claude/skills/om/SKILL.md` contains the `build` row in the `## Operations` table.
37
+ - `.claude/skills/om/SKILL.md` `metadata.promptSignals.phrases` includes `build a system`,
38
+ `design a system`, `create a system that`, and `system architecture`.
39
+ - Saying "build a system for lead gen" in chat triggers `/om` and routes to `/om build` without
40
+ requiring the explicit `/om build` subcommand.
41
+
42
+ ## Not handled by /git-sync
43
+
44
+ - No dependency bumps or `pnpm install` required for this change alone.
45
+ - Any project-local documentation that references how to add a new System should be updated by
46
+ the maintainer to point at `/om build` as the guided entry point rather than manual Codify
47
+ Level-A alone.
@@ -0,0 +1,76 @@
1
+ # Knowledge Base "Page Not Found" hardening (KB `$nodeId` route)
2
+
3
+ ## Why this note exists
4
+
5
+ The Knowledge Base detail route (`ui/src/routes/knowledge/$nodeId.tsx`) could render a
6
+ terminal full-pane **"Page Not Found"** screen for node ids it could not resolve. Two
7
+ distinct gaps caused it:
8
+
9
+ 1. **No `folder:` branch.** Selecting a KB **folder** node (e.g. the `KNOWLEDGE > All`
10
+ folder) navigates to `/knowledge/folder:knowledge:all`. The route matched none of the
11
+ `domain:` / `group:` / `item:` prefixes, resolved to no graph node, and fell through to
12
+ a bare `<PageNotFound />`. The folder routing (`folder:` → `FolderDetailView`) was
13
+ missing from the template route entirely.
14
+ 2. **Two hard-404 landmines.** The `!group` and `!node` fall-through branches returned
15
+ `<PageNotFound />`, so any stale bookmark, renamed ontology id, or snapshot drift
16
+ dead-ended the whole content pane.
17
+
18
+ This train delivers the hardened route that **always renders browsable content** for any
19
+ node id. There is **no package bump** — the fix consumes only `@elevasis/ui` exports your
20
+ project already has at `@2.49.0+` (`KnowledgeBrowser`, `buildKnowledgeOmTreeData`,
21
+ `findKnowledgeTreeNodeByValue`, `KnowledgeTreeNodeData`).
22
+
23
+ ## Applies to
24
+
25
+ - Every template-derived project whose `ui/src/routes/knowledge/$nodeId.tsx` is still the
26
+ pre-fix version (no `folder:` branch, bare `PageNotFound` returns). If your KB renders
27
+ "Page Not Found" when the `All` (or any) folder node is selected, you are affected.
28
+ - No action is required for projects that have already customized this route to handle
29
+ folders and avoid hard 404s — the sync is a `merge-baseline` that **preserves your local
30
+ route edits** (`external-sync-feature-route-baseline`, `sync_lane_severity:
31
+ optional-feature-selection`).
32
+
33
+ ## Required actions
34
+
35
+ `/git-sync` / `/external sync` delivers the hardened route as a baseline merge and surfaces
36
+ this note. The route is project-owned baseline content under the route-preservation lane,
37
+ so it is **merged, not force-overwritten** — review the merge if you carry local
38
+ customizations.
39
+
40
+ 1. **Pull and review.** Run `/git-sync` (or `/external sync`) and review the merge into
41
+ `ui/src/routes/knowledge/$nodeId.tsx`. Accept the two changes: the new `folder:` →
42
+ `FolderDetailView` branch, and the replacement of both `<PageNotFound />` returns with a
43
+ `KnowledgeNodeFallback` (a subtle "not available" `Alert` plus the full
44
+ `KnowledgeBrowser`).
45
+ 2. **No dependency change.** `@elevasis/ui` does **not** need bumping for this fix; the
46
+ required exports are already published. Do not add a package bump to this sync.
47
+ 3. **Type-check, then boot.** Run `pnpm -C ui lint` (`tsc --noEmit`), then start the UI.
48
+
49
+ ## Verification
50
+
51
+ ```bash
52
+ # 1. The route must no longer return a bare PageNotFound
53
+ grep -n "PageNotFound" ui/src/routes/knowledge/$nodeId.tsx
54
+ # Expect: no terminal `return <PageNotFound />` in the content branches
55
+ # (a folder: branch + KnowledgeNodeFallback should be present instead)
56
+
57
+ # 2. Required @elevasis/ui exports are present at your installed version
58
+ grep -n "KnowledgeBrowser\|buildKnowledgeOmTreeData\|findKnowledgeTreeNodeByValue" \
59
+ ui/src/routes/knowledge/$nodeId.tsx
60
+
61
+ # 3. Template-family coherence
62
+ pnpm -C ui lint
63
+ ```
64
+
65
+ In the running app, select the `KNOWLEDGE > All` folder node (and any other folder/group
66
+ node): the content pane must render browsable Knowledge content, never a full-pane
67
+ "Page Not Found".
68
+
69
+ ## Not handled by /git-sync
70
+
71
+ - `/git-sync` / `/external sync` deliver and merge the route baseline plus this note, but
72
+ they do **not** redeploy your UI. Reaching your live app requires your own UI **redeploy**
73
+ after the sync merge is accepted.
74
+ - Local customizations to `ui/src/routes/knowledge/$nodeId.tsx` are preserved by the
75
+ `merge-baseline` lane — if you maintain a forked KB route, reconcile the `folder:` branch
76
+ and the `KnowledgeNodeFallback` into your version by hand rather than discarding your edits.
@@ -0,0 +1,75 @@
1
+ # Agent Sessions and public agent chat route
2
+
3
+ ## Why this note exists
4
+
5
+ This train makes `Agent Sessions` the canonical internal full-page chat surface and
6
+ introduces the browser-safe public agent chat substrate. Public browser clients use
7
+ platform-issued access grants and short-lived capability tokens; they must not call
8
+ server-to-server session APIs with platform API keys.
9
+
10
+ The shared public chat UI is published from `@elevasis/ui/features/public-agent-chat`.
11
+ The tenant route is authored after the UI package publish, then propagated through the
12
+ strict manifest sync.
13
+
14
+ The template Organization Model now also declares the `operations-sessions` navigation
15
+ surface (`/operations/sessions`). That lets template-derived tenants inherit the
16
+ standard Agent Sessions page or opt into the same surface from their own OM navigation
17
+ without hand-authoring a route.
18
+
19
+ ## Applies to
20
+
21
+ - Template-derived projects that want public or code-gated agent chat links.
22
+ - Projects syncing the template route baseline after the `@elevasis/ui` package baseline
23
+ is bumped.
24
+ - Projects that want the internal Agent Sessions page exposed through OM-authored
25
+ navigation.
26
+
27
+ ## Required actions
28
+
29
+ 1. Accept the package baseline updates for `@elevasis/core` and `@elevasis/ui`.
30
+ 2. Accept the new public chat route baseline once it appears in
31
+ `ui/src/routes/chat.$slug.tsx` and any root-shell adjustment needed to keep that route
32
+ outside the authenticated app shell.
33
+ 3. If your project customizes `core/config/organization-model/navigation.ts`, merge the
34
+ `operations-sessions` surface into the Operations group:
35
+
36
+ ```ts
37
+ 'operations-sessions': {
38
+ type: 'surface',
39
+ label: 'Agent Sessions',
40
+ path: '/operations/sessions',
41
+ surfaceType: 'list',
42
+ order: 30
43
+ }
44
+ ```
45
+
46
+ 4. Run the project UI install and typecheck/build after sync:
47
+
48
+ ```bash
49
+ pnpm -C ui install
50
+ pnpm -C ui check-types
51
+ pnpm -C ui build
52
+ ```
53
+
54
+ 5. Configure platform-side public agent access grants before sharing a public chat URL.
55
+
56
+ ## Verification
57
+
58
+ After sync, verify the OM exposes the Agent Sessions navigation surface:
59
+
60
+ ```bash
61
+ grep -n "operations-sessions\\|Agent Sessions\\|/operations/sessions" core/config/organization-model/navigation.ts
62
+ pnpm -C core test
63
+ ```
64
+
65
+ ## Security notes
66
+
67
+ - Browser code must use the public grant/capability-token flow.
68
+ - Do not expose `ELEVASIS_PLATFORM_KEY` or operations API keys in browser code.
69
+ - Public turns use the public WebSocket route backed by a capability token.
70
+
71
+ ## Not handled by /git-sync
72
+
73
+ `/git-sync` does not create production access grants, choose which agents are public,
74
+ merge project-owned OM customizations automatically, or redeploy tenant UIs. Those are
75
+ project/operator decisions after the code and package baselines are accepted.
@@ -0,0 +1,42 @@
1
+ # SDK CLI `om:*` tenant Organization Model loader fix
2
+
3
+ ## Why this note exists
4
+
5
+ The `@elevasis/sdk` CLI `om:*` read commands could return an empty model in standard
6
+ template-derived pnpm-workspace projects even when `core/config/organization-model.ts`
7
+ contained real systems and resources. The loader resolved `esbuild` and external
8
+ package imports from the project root, but template projects install SDK runtime
9
+ dependencies under `operations/`.
10
+
11
+ This train publishes an SDK loader fix. Tenant source does not need to change, but
12
+ `operations/package.json` must pick up the new `@elevasis/sdk` baseline.
13
+
14
+ ## Applies to
15
+
16
+ - Template-derived projects that run `elevasis-sdk om:ls`, `om:search`, `om:describe`,
17
+ `om:cat`, `om:graph`, or `om:skills` from `operations/`.
18
+ - Projects whose `om:*` output is unexpectedly empty despite a valid
19
+ `core/config/organization-model.ts`.
20
+
21
+ ## Required actions
22
+
23
+ 1. Accept the `operations/package.json` `@elevasis/sdk` baseline bump delivered by
24
+ `/external sync`.
25
+ 2. Run the operations install after the sync so the published CLI binary is updated.
26
+
27
+ ## Verification
28
+
29
+ Verify the tenant model loads from the published CLI:
30
+
31
+ ```bash
32
+ pnpm -C operations exec elevasis-sdk om:ls /all-systems
33
+ ```
34
+
35
+ The command should list the tenant's authored systems instead of returning an empty
36
+ result.
37
+
38
+ ## Not handled by /git-sync
39
+
40
+ `/git-sync` pulls template guidance into a derived project. It does not publish the SDK,
41
+ install dependencies inside every standalone project, or redeploy any project. Run the
42
+ project-local install and deployment steps after accepting the sync.
@@ -21,6 +21,26 @@ elevasis-sdk project:task:save <id> --current-state "Updated" --files-modified @
21
21
 
22
22
  Use `@json:<path>` for generated payloads, nested objects, arrays, or Windows shells. Inline JSON remains supported for small values.
23
23
 
24
+ ### Passing JSON arguments across shells
25
+
26
+ Agents launch `elevasis-sdk` from either bash or PowerShell, so JSON quoting guidance must hold for both. A JSON argument crosses two parsers before the CLI sees it:
27
+
28
+ 1. **The outer shell** (bash or PowerShell) -- decides whether embedded `"` survive.
29
+ 2. **The pnpm run-script layer** -- `pnpm elevasis-sdk ...` is an npm run-script. On Windows, pnpm runs scripts through `cmd.exe /c`, which re-parses arguments. `pnpm exec elevasis-sdk` and direct bin calls do not add this layer.
30
+
31
+ Each shell fails at a different layer, so a single inline-quoting fix does not cover both.
32
+
33
+ - **bash** preserves embedded double quotes, so inline JSON survives the shell itself. The failure is the `pnpm <run-script>` wrapper's `cmd.exe` re-parse: `cmd` treats `( ) & < > | ^ %` as metacharacters, and a value containing them aborts with `<X> was unexpected at this time.` before the CLI runs. Keep inline JSON ASCII and metacharacter-free, or bypass the run-script layer with the direct exec form (`pnpm -C operations exec elevasis-sdk ...`).
34
+ - **Windows PowerShell 5.1** strips embedded double quotes when calling a native exe (`node`, `pnpm`), with or without pnpm. The stop-parsing token `--%` and backslash-escaped quotes both fail. There is no reliable inline-JSON route. PowerShell 7+ fixes this class via `$PSNativeCommandArgumentPassing = 'Standard'`.
35
+
36
+ **Cross-shell rule:** file-based input is shell-agnostic -- only a path crosses the shell boundary. Prefer `@json:<path>` (or `-f` / `--input-file` for `exec` and `request:submit`) for any non-trivial JSON, and write the file with an editor rather than a shell heredoc.
37
+
38
+ | Shell | Inline JSON | Why | Use instead |
39
+ | -------------- | --------------------------------------- | --------------------------------------------- | ------------------------------------ |
40
+ | bash | OK if values avoid `( ) & < > | ^ %` | run-script `cmd.exe` re-parses metacharacters | direct exec form, or `@json:<path>` |
41
+ | PowerShell 5.1 | Never reliable | strips embedded `"`; `--%` and `\"` both fail | `@json:<path>` |
42
+ | either | n/a | path arguments avoid all JSON shell escaping | `@json:<path>` + editor-written file |
43
+
24
44
  ---
25
45
 
26
46
  ## elevasis-sdk project:\*
@@ -446,21 +466,65 @@ elevasis-sdk agent:get <id>
446
466
 
447
467
  ## elevasis-sdk session:\*
448
468
 
449
- Inspect and manage agent sessions.
469
+ Create, operate, inspect, and export multi-turn agent sessions. Use `elevasis-sdk exec`
470
+ for one-off workflow or agent execution; use `elevasis-sdk session:*` when the deployed
471
+ agent is `sessionCapable` and needs transcript persistence across turns.
450
472
 
451
473
  ```bash
474
+ elevasis-sdk session:create <resourceId>
475
+ elevasis-sdk session:turn <id> -f tmp/turn-1.json
476
+ elevasis-sdk session:messages <id>
452
477
  elevasis-sdk session:list
453
478
  elevasis-sdk session:get <id>
454
479
  elevasis-sdk session:end <id>
455
480
  ```
456
481
 
482
+ - `session:create <resourceId>` -- create a session for a session-capable deployed agent
483
+ - `session:turn <id>` -- execute a turn in an active session; pass input with `--input`
484
+ or `--input-file`
485
+ - `session:messages <id>` -- export the full transcript by default; use `--page` for a
486
+ single paginated API read
457
487
  - `session:list` -- list sessions for the organization; supports filtering by resource ID, user ID, and limit
458
- - `session:get <id>` -- get full session detail including messages and events
488
+ - `session:get <id>` -- get session state and metadata
459
489
  - `session:end <id>` -- gracefully end an active session
460
490
 
461
- **API routes:** `GET /api/external/sessions`, `/api/external/sessions/:id`, `DELETE /api/external/sessions/:id`
491
+ **API routes:** `POST /api/external/sessions`, `GET /api/external/sessions`,
492
+ `GET /api/external/sessions/:id`, `POST /api/external/sessions/:id/turns`,
493
+ `GET /api/external/sessions/:id/messages`, `POST /api/external/sessions/:id/end`
494
+
495
+ Hard deletion is intentionally not part of `session:end`; any destructive delete surface
496
+ must be exposed as a separate explicit command.
497
+
498
+ **`session:create` flags:**
499
+
500
+ | Flag | Description |
501
+ | --------------------- | ------------------------------ |
502
+ | `--user-id <id>` | Optional user ID for session |
503
+ | `--metadata <json>` | Optional session metadata JSON |
504
+ | `--json` | Output as JSON |
505
+ | `--api-url <url>` | Override the API base URL |
506
+
507
+ **`session:turn` flags:**
508
+
509
+ | Flag | Description |
510
+ | --------------------------- | -------------------------------------------- |
511
+ | `-i, --input <json>` | Turn input as JSON |
512
+ | `-f, --input-file <path>` | Read turn input from a JSON file |
513
+ | `--json` | Output as JSON |
514
+ | `--api-url <url>` | Override the API base URL |
515
+
516
+ **`session:messages` flags:**
517
+
518
+ | Flag | Description |
519
+ | --------------------- | ----------------------------------------------------------- |
520
+ | `--limit <limit>` | Messages per API page; default comes from the API |
521
+ | `--cursor <cursor>` | Message index cursor to start after |
522
+ | `--page` | Fetch one API page for debugging instead of all pages |
523
+ | `--all` | Fetch all pages; this is the default transcript export mode |
524
+ | `--json` | Output as JSON |
525
+ | `--api-url <url>` | Override the API base URL |
462
526
 
463
- **`session:list` filter flags:**
527
+ **`session:list` flags:**
464
528
 
465
529
  | Flag | Description |
466
530
  | ---------------------- | ------------------------------------ |
@@ -695,25 +759,25 @@ The same coverage gate runs inside `elevasis-sdk check` when the coverage regist
695
759
 
696
760
  Current status of all SDK CLI domains. Domains marked `deferred` have no CLI commands yet.
697
761
 
698
- | Domain | CLI surface | API surface | Status |
699
- | ----------- | ------------------------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------- |
700
- | platform | top-level SDK commands | mixed platform APIs | implemented |
701
- | project | `project:*` | `apps/api/src/projects/` | implemented |
702
- | knowledge | `knowledge:*` | file/generated knowledge data | implemented |
703
- | creds | `creds *` nested Commander group | credentials API | implemented |
704
- | ui | `ui:*` | local project file edits | implemented |
705
- | request | `request:submit`, `request:list`, `request:get` | requests API | implemented read/write scope |
706
- | error | `error resolve`, `error resolve-execution` | execution error APIs | partial |
707
- | acquisition | `acquisition:list:*`, `acquisition:deal:*` | `/api/external/acquisition/lists*`, `/api/external/deals*` | implemented read-only scope |
708
- | client | `client:*` | `/api/external/clients` | implemented read/write scope |
709
- | agent | `agent:list`, `agent:get` | `/api/external/agents*` | implemented read-only scope |
710
- | session | `session:list`, `session:get`, `session:end` | `/api/external/sessions*` | implemented management scope |
711
- | queue | `queue:list`, `queue:get`, `queue:select`, `queue:expire`, `queue:status` | `/api/external/command-queue*` | implemented |
712
- | schedule | `schedule:list`, `schedule:get`, `schedule:create`, `schedule:update` | `/api/external/task-scheduler/schedules*` | implemented |
762
+ | Domain | CLI surface | API surface | Status |
763
+ | ----------- | ------------------------------------------------------------------------- | -------------------------------------------------------------- | ----------------------------- |
764
+ | platform | top-level SDK commands | mixed platform APIs | implemented |
765
+ | project | `project:*` | `apps/api/src/projects/` | implemented |
766
+ | knowledge | `knowledge:*` | file/generated knowledge data | implemented |
767
+ | creds | `creds *` nested Commander group | credentials API | implemented |
768
+ | ui | `ui:*` | local project file edits | implemented |
769
+ | request | `request:submit`, `request:list`, `request:get` | requests API | implemented read/write scope |
770
+ | error | `error resolve`, `error resolve-execution` | execution error APIs | partial |
771
+ | acquisition | `acquisition:list:*`, `acquisition:deal:*` | `/api/external/acquisition/lists*`, `/api/external/deals*` | implemented read-only scope |
772
+ | client | `client:*` | `/api/external/clients` | implemented read/write scope |
773
+ | agent | `agent:list`, `agent:get` | `/api/external/agents*` | implemented read-only scope |
774
+ | session | `session:create`, `session:turn`, `session:messages`, `session:list`, `session:get`, `session:end` | `/api/external/sessions*` | implemented multi-turn scope |
775
+ | queue | `queue:list`, `queue:get`, `queue:select`, `queue:expire`, `queue:status` | `/api/external/command-queue*` | implemented |
776
+ | schedule | `schedule:list`, `schedule:get`, `schedule:create`, `schedule:update` | `/api/external/task-scheduler/schedules*` | implemented |
713
777
  | skill | `skill:scaffold`, `skill:check-coverage` | local CLI catalog and `.claude/registries/skill-coverage.json` | implemented developer tooling |
714
- | content | none | not scoped here | deferred |
715
- | seo | none | not scoped here | deferred |
716
- | monitoring | none | not scoped here | deferred |
778
+ | content | none | not scoped here | deferred |
779
+ | seo | none | not scoped here | deferred |
780
+ | monitoring | none | not scoped here | deferred |
717
781
 
718
782
  ### Promotion Criteria
719
783
 
@@ -25,6 +25,7 @@ description: "Auto-generated catalog of all published @elevasis/ui subpath expor
25
25
  | `@elevasis/ui/features/delivery` | Features Delivery | Features | Published delivery feature surface for downstream shells. |
26
26
  | `@elevasis/ui/features/lead-gen` | Features Lead Gen | Features | Published lead generation feature surface for downstream shells. |
27
27
  | `@elevasis/ui/features/operations` | Features Operations | Features | Published operations feature surface for downstream shells. |
28
+ | `@elevasis/ui/features/public-agent-chat` | Features Public Agent Chat | Features | Published public agent chat surface for downstream shells. |
28
29
  | `@elevasis/ui/features/monitoring` | Features Monitoring | Features | Published monitoring feature surface for downstream shells. |
29
30
  | `@elevasis/ui/features/monitoring/requests` | Features Monitoring Requests | Features | Published submitted-requests list, detail, and triage surface for downstream shells. |
30
31
  | `@elevasis/ui/features/seo` | Features SEO | Features | Published SEO feature surface for downstream shells. |