@elevasis/sdk 1.36.4 → 1.37.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 +213 -77
- package/dist/index.d.ts +93 -7
- package/dist/index.js +78 -32
- package/dist/node/index.d.ts +6 -5
- package/dist/test-utils/index.d.ts +6 -5
- package/dist/test-utils/index.js +67 -31
- package/dist/worker/index.js +7 -11
- package/package.json +2 -2
- package/reference/claude-config/skills/project/SKILL.md +22 -0
- package/reference/claude-config/sync-notes/2026-06-14-session-ux-and-project-cli-json.md +33 -0
- package/reference/claude-config/sync-notes/2026-06-14-shared-session-conversation-view.md +26 -0
- package/reference/claude-config/sync-notes/2026-06-15-session-chat-zero-wiring.md +46 -0
- package/reference/claude-config/sync-notes/2026-06-17-agent-session-ux-features.md +34 -0
- package/reference/rules/vibe.md +1 -0
- package/reference/scaffold/recipes/extend-lead-gen.md +492 -332
- package/reference/scaffold/reference/contracts.md +14 -21
|
@@ -256,6 +256,28 @@ Organization scoping is handled server-side via `ELEVASIS_PLATFORM_KEY`. No org
|
|
|
256
256
|
|
|
257
257
|
---
|
|
258
258
|
|
|
259
|
+
## Output Flags
|
|
260
|
+
|
|
261
|
+
All `project:*` commands support three output modes via flags:
|
|
262
|
+
|
|
263
|
+
| Flag | Behavior | Use when |
|
|
264
|
+
| ----------- | -------------------------- | --------------------------------------------------- |
|
|
265
|
+
| _(no flag)_ | Raw JSON (legacy default) | Existing scripts that parse default stdout |
|
|
266
|
+
| `--json` | Clean JSON via `printJson` | Agent automation — the preferred machine-parse flag |
|
|
267
|
+
| `--pretty` | Human-readable text | Interactive / debugging output |
|
|
268
|
+
|
|
269
|
+
**Canonical machine-parse recipe:**
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
pnpm -s elevasis-sdk project:task:list --project <uuid> --json
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
The `-s` / `--silent` flag suppresses the pnpm lifecycle preamble (`> project@... elevasis-sdk ...`) so stdout is pure JSON with no wrapper noise. Use `--json` and `-s` together for all agent automation.
|
|
276
|
+
|
|
277
|
+
**Defensive parse fallback** (if any wrapper noise remains): slice from the first `{` or `[` to the last `}` or `]` before calling `JSON.parse`.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
259
281
|
## Database Schema
|
|
260
282
|
|
|
261
283
|
### Tables
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Session UX fixes + project CLI `--json`
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
This train bumps both `@elevasis/ui` and `@elevasis/sdk` with several tenant-facing changes beyond the shared `SessionConversationView` adoption (see the companion `2026-06-14-shared-session-conversation-view.md` note):
|
|
6
|
+
|
|
7
|
+
- **Lazy agent-session creation** (`@elevasis/ui`) — the Agent Sessions surface and the public agent-chat surface no longer create a `sessions` row on open/mount. The row is created on the first message-send ("create-on-first-turn"), so opened-then-abandoned chats no longer leave phantom "0 turns" rows.
|
|
8
|
+
- **Agent Sessions list refresh-after-delete fix** (`@elevasis/ui`) — a query-key factory bug (`sessionsKeys.sessions` appended a literal `undefined`) broke partial-match invalidation, so delete/create/archive left the list stale until a manual reload. Fixed; the list now refreshes automatically.
|
|
9
|
+
- **Project milestone progress badge fix** (`@elevasis/ui`) — the `/projects` milestone header badge counted the milestone's own (empty) checklist, showing `0/0 COMPLETE`. It now counts completed child tasks, with a checklist fallback for task-free milestones.
|
|
10
|
+
- **`project:*` CLI `--json` flag** (`@elevasis/sdk`) — every `project:*` command (project/task/milestone/note) now accepts `--json` for clean machine-parseable output, matching `grant:*`/`session:*`. The `/project` skill SKILL.md gains an Output Flags reference and the canonical `pnpm -s elevasis-sdk … --json` parse recipe (auto-propagated as a managed `.claude` write).
|
|
11
|
+
|
|
12
|
+
## Applies to
|
|
13
|
+
|
|
14
|
+
- All template-derived projects that expose the agent-sessions page (`ui/src/features/operations/sessions/`) or the public agent-chat surface.
|
|
15
|
+
- All projects that drive work via the `elevasis-sdk project:*` CLI or surface the `/projects` delivery page.
|
|
16
|
+
|
|
17
|
+
## Required actions
|
|
18
|
+
|
|
19
|
+
- Bump `@elevasis/ui` to `^2.55.0` and `@elevasis/sdk` to `^1.36.5` (or later) and install. The ship train's `external-sync` stage does this automatically via the package-cascade baselines — manual `pnpm update` is not required.
|
|
20
|
+
- No source changes are required to receive the lazy-session, delete-refresh, or milestone-badge fixes — they ship inside `@elevasis/ui`.
|
|
21
|
+
- Agents may now invoke `pnpm -s elevasis-sdk project:<cmd> … --json` for clean JSON; the propagated `/project` SKILL.md Output Flags table documents the parse recipe.
|
|
22
|
+
|
|
23
|
+
## Verification
|
|
24
|
+
|
|
25
|
+
- `pnpm -C ui check-types` passes against `@elevasis/ui@^2.55.0`.
|
|
26
|
+
- Open an agent-session chat without sending → no new `sessions` row appears in the list; send one message → exactly one row with `1 turn`.
|
|
27
|
+
- Delete a session → the list refreshes without a manual reload.
|
|
28
|
+
- `pnpm -s elevasis-sdk project:task:list --project <id> --json` exits 0 with parseable JSON and no `unknown option` error.
|
|
29
|
+
|
|
30
|
+
## Not handled by /git-sync
|
|
31
|
+
|
|
32
|
+
- `/git-sync` surfaces this note and pulls the propagated `/project` SKILL.md baseline, but it does not run the `@elevasis/ui` / `@elevasis/sdk` install for you when reconciling manually outside the ship train.
|
|
33
|
+
- The lazy-session change does NOT retroactively clean up pre-existing "0 turns" rows; those are left in place by design.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Shared Session ConversationView
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
`@elevasis/ui` now ships a shared `SessionConversationView` component (WebSocket-backed session-detail chat body). The template's session-detail page previously filled the `renderConversationView` slot with a local stub (`ui/src/features/assistant/components/ConversationView.tsx`) that returned `null`, so the agent-sessions chat page (`/operations/sessions/$sessionId`) rendered blank and the `DISCONNECTED` badge never cleared. The template `SessionChatPage` now renders the shared component directly, so derived projects get a working session chat with no local implementation.
|
|
6
|
+
|
|
7
|
+
## Applies to
|
|
8
|
+
|
|
9
|
+
- All template-derived projects that expose the agent-sessions page (`ui/src/features/operations/sessions/SessionChatPage.tsx`).
|
|
10
|
+
- Any project still carrying the `null`-returning `ConversationView` stub in `ui/src/features/assistant/components/`.
|
|
11
|
+
|
|
12
|
+
## Required actions
|
|
13
|
+
|
|
14
|
+
- Bump `@elevasis/ui` to `^2.55.0` (or later) in `ui/package.json` and install. (The ship train's `external-sync` stage does this automatically via the package-cascade baseline; manual `pnpm update` is not required.)
|
|
15
|
+
- Adopt the new `SessionChatPage` slot wiring: render `<SessionConversationView apiUrl={API_URL} sessionId={...} ... />` from `@elevasis/ui/features/operations`, reading `API_URL` from `@/lib/constants/api`, instead of the local `ConversationView` stub.
|
|
16
|
+
- The local `ConversationView` stub is now unused by the session page. It remains a generic placeholder for an AI-assistant feature; keep it only if you are building such a feature, otherwise it can be removed.
|
|
17
|
+
|
|
18
|
+
## Verification
|
|
19
|
+
|
|
20
|
+
- `pnpm -C ui check-types` passes against `@elevasis/ui@^2.55.0`.
|
|
21
|
+
- The session-detail chat page renders history + live messages and the `DISCONNECTED` badge clears (connects) once `apiUrl` is wired.
|
|
22
|
+
|
|
23
|
+
## Not handled by /git-sync
|
|
24
|
+
|
|
25
|
+
- `/git-sync` surfaces this note and pulls the template `SessionChatPage` baseline, but it does not delete the now-unused local `ConversationView` stub. Remove it manually if you do not intend to build an assistant feature.
|
|
26
|
+
- `/git-sync` does not run the `@elevasis/ui` install for you; run the install after the baseline bump if you are reconciling manually outside the ship train.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Session Chat Zero-Wiring Default Slot
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
`@elevasis/ui` (>= 2.56.0) makes `SessionChatPage`'s `renderConversationView` slot
|
|
6
|
+
optional and self-defaulting: when omitted, the page renders the shared
|
|
7
|
+
`SessionConversationView` itself, resolving `apiUrl` from the service context
|
|
8
|
+
(now exposed on `ElevasisServiceContextValue`). The template `SessionChatPage`
|
|
9
|
+
now mounts the shared page with NO slot, and the orphan null-stub
|
|
10
|
+
`ui/src/features/assistant/components/ConversationView.tsx` is deleted. Projects
|
|
11
|
+
that omit the slot get a working session chat out of the box; customization stays
|
|
12
|
+
opt-in via the same prop. Backward-compatible: hosts that still pass the slot are
|
|
13
|
+
unaffected.
|
|
14
|
+
|
|
15
|
+
## Applies to
|
|
16
|
+
|
|
17
|
+
- All template-derived projects with the agent-sessions page
|
|
18
|
+
(`ui/src/features/operations/sessions/SessionChatPage.tsx`).
|
|
19
|
+
- Any project still wiring a local `ConversationView` stub
|
|
20
|
+
(`ui/src/features/assistant/components/ConversationView.tsx`) -> these render
|
|
21
|
+
a blank chat with a stuck `DISCONNECTED` badge until reconciled.
|
|
22
|
+
|
|
23
|
+
## Required actions
|
|
24
|
+
|
|
25
|
+
- Bump `@elevasis/ui` to `^2.56.0` (or later) and install. (The ship train's
|
|
26
|
+
`external-sync` stage does this automatically via the package-cascade baseline;
|
|
27
|
+
manual `pnpm update` is not required.)
|
|
28
|
+
- Drop the explicit `renderConversationView={...}` slot from your
|
|
29
|
+
`SessionChatPage.tsx` and remove the local stub import, relying on the new
|
|
30
|
+
default. (To keep a custom body, keep passing the slot.)
|
|
31
|
+
- Delete the now-unused local null-stub
|
|
32
|
+
`ui/src/features/assistant/components/ConversationView.tsx`.
|
|
33
|
+
|
|
34
|
+
## Verification
|
|
35
|
+
|
|
36
|
+
- `pnpm -C ui check-types` passes against `@elevasis/ui@^2.56.0`.
|
|
37
|
+
- The session-detail chat page (`/operations/sessions/$sessionId`) renders
|
|
38
|
+
history + live messages and the `DISCONNECTED` badge clears, with NO slot wired.
|
|
39
|
+
|
|
40
|
+
## Not handled by /git-sync
|
|
41
|
+
|
|
42
|
+
- `/git-sync` surfaces this note and pulls the template `SessionChatPage`
|
|
43
|
+
baseline, but the diverged tenant copy is preserved (merge-managed) -- you must
|
|
44
|
+
manually drop the explicit slot.
|
|
45
|
+
- `/git-sync` does NOT delete the local `ConversationView` stub
|
|
46
|
+
(`delete_policy: none`); remove it manually.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Agent session UX features (End Conversation, intake form, session naming)
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
This train bumps `@elevasis/core` and `@elevasis/ui` with three tenant-facing agent-session features that ship entirely inside the published packages (no template source edit, package-cascade-only):
|
|
6
|
+
|
|
7
|
+
- **End Conversation** (`@elevasis/ui`) — both the internal Agent Sessions surface (`features/operations/sessions/SessionDetailsPanel`) and the public agent-chat surface (`features/public-agent-chat/PublicAgentChat`) now render an "End conversation" control. Ending preserves history and blocks new turns (distinct from Delete, which removes). The public composer locks out after end with a "This conversation has ended" placeholder.
|
|
8
|
+
- **Welcome intake form** (`@elevasis/ui` + `@elevasis/core`) — the public chat intro screen renders an optional intake form driven by the grant's `capture_fields` column (now typed as `CaptureField[]` in `@elevasis/core`'s public-agent-chat schema). Collected values flow into `session.metadata`. All fields are optional.
|
|
9
|
+
- **Session naming from intake** (`@elevasis/ui` + platform API) — sessions are titled from the collected `name` (server-side, with a first-user-message fallback), and the Agent Sessions list now renders `session.title` as the row label.
|
|
10
|
+
|
|
11
|
+
The session `session:end` / `session:ended` WebSocket messages, the internal `POST /sessions/:id/end` route, and server-side title derivation live in the Elevasis-deployed platform API — tenants receive that behavior automatically; the package bump only delivers the frontend.
|
|
12
|
+
|
|
13
|
+
## Applies to
|
|
14
|
+
|
|
15
|
+
- All template-derived projects that expose the Agent Sessions page (`ui/src/features/operations/sessions/`) or the public agent-chat surface (`ui/src/features/public-agent-chat/`).
|
|
16
|
+
- Projects that configure public agent grants and want to collect intake fields (Name plus arbitrary configurable fields) on the public intro screen.
|
|
17
|
+
|
|
18
|
+
## Required actions
|
|
19
|
+
|
|
20
|
+
- Bump `@elevasis/core` to `^0.52.0` and `@elevasis/ui` to `^2.59.0` (or later) and install. The ship train's `external-sync` stage does this automatically via the package-cascade baselines — manual `pnpm update` is not required.
|
|
21
|
+
- No source changes are required to receive End Conversation, the intake form, or title-in-list — they ship inside `@elevasis/ui` / `@elevasis/core`.
|
|
22
|
+
- To enable an intake form on a public agent, populate the grant's `capture_fields` (array of `{ key, label, type?, required? }`). There is no Command Center editor for `capture_fields` yet — configure it via a grant write. Leaving `capture_fields` empty renders the intro exactly as before (no form).
|
|
23
|
+
|
|
24
|
+
## Verification
|
|
25
|
+
|
|
26
|
+
- `pnpm -C ui check-types` passes against `@elevasis/ui@^2.59.0`.
|
|
27
|
+
- Open the public agent chat for a grant with `capture_fields` set → the intro renders the configured fields; entering a name and starting the session titles the session by that name in the Agent Sessions list.
|
|
28
|
+
- With no `capture_fields` → the intro renders unchanged; the session is titled from the first user message.
|
|
29
|
+
- Click "End conversation" on either the public header or the internal session detail panel → the session ends, history is preserved, and a new turn is rejected ("Session has ended").
|
|
30
|
+
|
|
31
|
+
## Not handled by /git-sync
|
|
32
|
+
|
|
33
|
+
- `/git-sync` surfaces this note and pulls the propagated package baselines, but it does not run the `@elevasis/core` / `@elevasis/ui` install for you when reconciling manually outside the ship train.
|
|
34
|
+
- The intake/title and End features depend on the Elevasis-deployed platform API (`session:end` handling, `/sessions/:id/end`, server-side title derivation). They are not part of a tenant's own backend and require no tenant action — but they only work once the platform API carrying them is deployed.
|
package/reference/rules/vibe.md
CHANGED
|
@@ -270,3 +270,4 @@ Layers 2 (Public API), 3 (UI Shell Runtime), 5 (Toolkit), and 6 (Graph) require
|
|
|
270
270
|
- Vibe is not a skill. It lives in this rule file + CLAUDE.md + the PreToolUse hook -- not in `.claude/skills/`.
|
|
271
271
|
- Vibe does not own the codify ceremony. `/om` owns draft, confirm, write, and typecheck for both Level A and Level B codify pipelines (decision #21 -- Codify ceremony delegated to `/om`). Vibe detects intent and hands off.
|
|
272
272
|
- Vibe is not active in the monorepo. If working inside the monorepo (not an `external/` project), this ambient routing does not apply.
|
|
273
|
+
- Vibe does not flip **public agent exposure**. Making a deployed agent reachable on the public internet (the `agent_access_grants` row behind `/public/agents/:slug`, managed via `grant:create` / `grant:update` / `grant:disable` or the Resource-page public/private toggle) is a **security boundary deliberately kept out of ambient routing** — a non-technical user describing their business must never be able to expose an agent by accident. This is a deliberate non-route, not an unhandled gap: do NOT classify "make my agent public" / "put the interview online" as Toggle (which is System on/off) and do NOT auto-execute. Surface the `grant:*` CLI or the Resource-page toggle in plain language and require explicit confirmation.
|