@elevasis/sdk 1.15.0 → 1.16.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 +2325 -124
- package/dist/index.d.ts +882 -794
- package/dist/index.js +170 -46
- package/dist/node/index.d.ts +69 -0
- package/dist/node/index.js +273 -0
- package/dist/test-utils/index.d.ts +857 -711
- package/dist/test-utils/index.js +2 -0
- package/dist/types/worker/adapters/lead.d.ts +1 -1
- package/dist/types/worker/platform.d.ts +2 -9
- package/dist/worker/index.js +1 -0
- package/package.json +12 -3
- package/reference/_navigation.md +23 -1
- package/reference/_reference-manifest.json +98 -0
- package/reference/claude-config/rules/agent-start-here.md +13 -0
- package/reference/claude-config/rules/organization-model.md +40 -40
- package/reference/claude-config/rules/organization-os.md +16 -16
- package/reference/claude-config/rules/ui.md +2 -6
- package/reference/claude-config/rules/vibe.md +13 -13
- package/reference/claude-config/skills/knowledge/SKILL.md +253 -0
- package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-a.md +100 -100
- package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-b.md +158 -158
- package/reference/claude-config/skills/knowledge/operations/customers.md +109 -0
- package/reference/claude-config/skills/knowledge/operations/features.md +113 -0
- package/reference/claude-config/skills/knowledge/operations/goals.md +118 -0
- package/reference/claude-config/skills/knowledge/operations/identity.md +93 -0
- package/reference/claude-config/skills/knowledge/operations/labels.md +89 -0
- package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -0
- package/reference/claude-config/skills/knowledge/operations/roles.md +99 -0
- package/reference/claude-config/skills/knowledge/operations/techStack.md +102 -0
- package/reference/claude-config/skills/run-ui/SKILL.md +73 -0
- package/reference/claude-config/skills/setup/SKILL.md +270 -270
- package/reference/claude-config/skills/tutorial/SKILL.md +249 -0
- package/reference/claude-config/skills/tutorial/progress-template.md +74 -0
- package/reference/claude-config/skills/tutorial/technical.md +1309 -0
- package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -0
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -0
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -0
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -0
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -0
- package/reference/deployment/index.mdx +5 -5
- package/reference/examples/organization-model.ts +40 -0
- package/reference/framework/index.mdx +1 -1
- package/reference/framework/tutorial-system.mdx +86 -173
- package/reference/packages/core/src/knowledge/README.md +32 -0
- package/reference/packages/ui/src/knowledge/README.md +31 -0
- package/reference/packages/ui/src/theme/presets/README.md +19 -0
- package/reference/scaffold/core/organization-model.mdx +1 -1
- package/reference/scaffold/recipes/add-a-feature.md +1 -1
- package/reference/scaffold/recipes/customize-crm-actions.md +3 -3
- package/reference/scaffold/recipes/customize-organization-model.md +3 -3
- package/reference/scaffold/recipes/extend-crm.md +12 -8
- package/reference/scaffold/recipes/extend-lead-gen.md +129 -20
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +1 -1
- package/reference/scaffold/recipes/index.md +6 -0
- package/reference/scaffold/reference/contracts.md +829 -595
- package/reference/scaffold/reference/feature-registry.md +2 -1
- package/reference/scaffold/ui/composition-extensibility.mdx +17 -0
- package/reference/claude-config/skills/configure/SKILL.md +0 -98
- package/reference/claude-config/skills/configure/operations/customers.md +0 -150
- package/reference/claude-config/skills/configure/operations/features.md +0 -162
- package/reference/claude-config/skills/configure/operations/goals.md +0 -147
- package/reference/claude-config/skills/configure/operations/identity.md +0 -133
- package/reference/claude-config/skills/configure/operations/labels.md +0 -128
- package/reference/claude-config/skills/configure/operations/offerings.md +0 -159
- package/reference/claude-config/skills/configure/operations/roles.md +0 -153
- package/reference/claude-config/skills/configure/operations/techStack.md +0 -139
|
@@ -30,29 +30,31 @@ Lead gen is a layered platform surface, not one component:
|
|
|
30
30
|
|
|
31
31
|
## Decision Table
|
|
32
32
|
|
|
33
|
-
| User wants | Start here
|
|
34
|
-
| --------------------------------------------------------------------------------- |
|
|
35
|
-
| Change lead-gen feature availability, labels, quick access, or pipeline semantics | `core/config/organization-model.ts` plus `core/config/organization-model.examples.ts`
|
|
36
|
-
| Add lead-gen sidebar nav or a lead-gen route | `@elevasis/ui/features/lead-gen` and `node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md`
|
|
37
|
-
| Wrap a shared lead-gen page with project chrome | `LeadGenOverviewPage`, `LeadGenListsPage`, `LeadGenListDetailPage`, `LeadGenCompaniesPage`, `LeadGenContactsPage`
|
|
38
|
-
| Build a custom campaign/list workspace | `useLists`, `useList`, `
|
|
39
|
-
| Render artifacts or list-member detail | `LeadGenListDetailPage`, `useArtifacts`, `useCreateArtifact`, `useListMember`
|
|
40
|
-
| Read or mutate lead-gen data inside a workflow | `acqDb` or `list` from `@elevasis/sdk/worker`
|
|
41
|
-
| Add a new persisted lead-gen field, artifact kind, or transition API | Platform/API migration work, not just scaffold work
|
|
33
|
+
| User wants | Start here | Notes |
|
|
34
|
+
| --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
35
|
+
| Change lead-gen feature availability, labels, quick access, or pipeline semantics | `core/config/organization-model.ts` plus `core/config/organization-model.examples.ts` | Treat this as Organization OS work. Use the project's configure ceremony if available. |
|
|
36
|
+
| Add lead-gen sidebar nav or a lead-gen route | `@elevasis/ui/features/lead-gen` and `node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md` | Prefer manifest/sidebar composition. Do not fork shared source first. |
|
|
37
|
+
| Wrap a shared lead-gen page with project chrome | `LeadGenOverviewPage`, `LeadGenListsPage`, `LeadGenListDetailPage`, `ListBuilderPage`, `LeadGenCompaniesPage`, `LeadGenContactsPage` | Keep route files thin and put project-specific behavior in local feature modules. |
|
|
38
|
+
| Build a custom campaign/list workspace | `ListBuilderPage`, `useLists`, `useList`, `useListProgress`, `useListExecutions`, `useWorkflowExecution`, `useExecutionSSE` from `@elevasis/ui` | Use the shared builder when possible; otherwise compose hooks for platform data and workflow execution. |
|
|
39
|
+
| Render artifacts or list-member detail | `LeadGenListDetailPage`, `useArtifacts`, `useCreateArtifact`, `useListMember` | Artifacts are a substrate primitive. Keep vertical-specific rendering local until there are repeated use cases. |
|
|
40
|
+
| Read or mutate lead-gen data inside a workflow | `acqDb` or `list` from `@elevasis/sdk/worker` | `organizationId` is injected server-side by the platform dispatcher. Do not pass it from workflow code. |
|
|
41
|
+
| Add a new persisted lead-gen field, artifact kind, or transition API | Platform/API migration work, not just scaffold work | Update DB, core schemas/types, API service/handlers, hooks, docs, and scaffold contracts together. |
|
|
42
42
|
|
|
43
43
|
## Published Lead-Gen Surfaces
|
|
44
44
|
|
|
45
|
-
| Surface | Import from | Use for
|
|
46
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- |
|
|
47
|
-
| `leadGenManifest`, `LEAD_GEN_ITEMS`, `LeadGenSidebar`, `LeadGenSidebarTop`, `LeadGenSidebarMiddle` | `@elevasis/ui/features/lead-gen` | Feature registration and sidebar composition
|
|
48
|
-
| `LeadGenOverviewPage`, `LeadGenListsPage`, `LeadGenListDetailPage`, `LeadGenCompaniesPage`, `LeadGenContactsPage`
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
45
|
+
| Surface | Import from | Use for |
|
|
46
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
47
|
+
| `leadGenManifest`, `LEAD_GEN_ITEMS`, `LeadGenSidebar`, `LeadGenSidebarTop`, `LeadGenSidebarMiddle` | `@elevasis/ui/features/lead-gen` | Feature registration and sidebar composition |
|
|
48
|
+
| `LeadGenOverviewPage`, `LeadGenListsPage`, `LeadGenListDetailPage`, `ListBuilderPage`, `LeadGenCompaniesPage`, `LeadGenContactsPage` | `@elevasis/ui/features/lead-gen` | Shared lead-gen pages you can route to or wrap |
|
|
49
|
+
| `ListActionsProvider`, `useListActions`, `ListBuilderWorkflow`, `ListBuilderRegistry`, `LeadGenCapabilityKey` | `@elevasis/ui/features/lead-gen` | List Builder workflow registry, slot-based field contracts, and project-owned action wiring |
|
|
50
|
+
| `LeadGenRouteShell`, `CompanyDetailModal`, `ContactDetailModal`, `LIST_TEMPLATE_OPTIONS`, `buildListConfig` | `@elevasis/ui/features/lead-gen` | Route shell helpers, detail modals, and list creation config helpers |
|
|
51
|
+
| `useLists`, `useList`, `useListsTelemetry`, `useListProgress`, `useListExecutions`, `useCreateList`, `useUpdateList`, `useUpdateListConfig`, `useDeleteList` | `@elevasis/ui/hooks` | Headless list and telemetry data access |
|
|
52
|
+
| `useWorkflowExecution`, `useExecutionSSE`, `useAddCompaniesToList`, `useRemoveCompaniesFromList`, `useAddContactsToList` | `@elevasis/ui/hooks` | List Builder workflow triggering, live execution tailing, and list membership mutations |
|
|
53
|
+
| `useCompanies`, `useCompany`, `useContacts`, `useContact` | `@elevasis/ui/hooks` | Acquisition company/contact data access |
|
|
54
|
+
| `useArtifacts`, `useCreateArtifact`, `useListMembers`, `useListMember` | `@elevasis/ui/hooks` | Lead-gen substrate data access |
|
|
55
|
+
| `useTransitionList`, `useTransitionListMember`, `useTransitionListCompany`, `useDeriveActions` | `@elevasis/ui/hooks` | Stateful transition mutations and contextual action derivation |
|
|
56
|
+
| `ElevasisUIProvider`, `ElevasisCoreProvider`, `useElevasisServices` | `@elevasis/ui/provider` | Provider setup, API access, organization context, and `listActions` registry injection |
|
|
57
|
+
| `acqDb`, `list` | `@elevasis/sdk/worker` | Workflow-side acquisition and list-scoped platform adapters |
|
|
56
58
|
|
|
57
59
|
Read the generated contracts before changing typed boundaries:
|
|
58
60
|
|
|
@@ -135,6 +137,113 @@ function ListDetailRoute() {
|
|
|
135
137
|
|
|
136
138
|
Use the same wrapping pattern for `LeadGenOverviewPage`, `LeadGenCompaniesPage`, and `LeadGenContactsPage`.
|
|
137
139
|
|
|
140
|
+
For the real-time List Builder workspace, add a thin route that passes the route param into `ListBuilderPage`:
|
|
141
|
+
|
|
142
|
+
```tsx
|
|
143
|
+
import { createFileRoute } from '@tanstack/react-router'
|
|
144
|
+
import { ListBuilderPage } from '@elevasis/ui/features/lead-gen'
|
|
145
|
+
|
|
146
|
+
export const Route = createFileRoute('/lead-gen/list-builder/$listId')({
|
|
147
|
+
component: ListBuilderRoute
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
function ListBuilderRoute() {
|
|
151
|
+
const { listId } = Route.useParams()
|
|
152
|
+
return <ListBuilderPage listId={listId} />
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Register project workflow actions at the provider boundary. The shared UI owns the contract; each project owns workflow ids, capability keys, default inputs, and field components.
|
|
157
|
+
|
|
158
|
+
Each registry entry declares a Zod `schema` and a `layout` of declarative field hints (`StepConfigLayout<Input>`). The shared `StepConfigForm` renders the layout, validates against the schema, and wires `value`/`onChange` for you — no per-action React components. The List Builder right column renders the form as `Configuration | Advanced | Runs` tabs with a sticky action footer; `RunWorkflowModal` renders the same form inline. Omit the `advanced:` section when a step has none.
|
|
159
|
+
|
|
160
|
+
Available field component variants: `textinput`, `textarea`, `numberinput`, `switch`, `segmented`, `select`, `multiselect`, `tags`, `json`. Field hints support `label`, `description`, `placeholder`, `min`/`max`/`step` (numbers), `options` (selects), and `when: (values) => boolean` for conditional visibility.
|
|
161
|
+
|
|
162
|
+
```tsx
|
|
163
|
+
import * as z from 'zod'
|
|
164
|
+
import { type ListBuilderRegistry } from '@elevasis/ui/features/lead-gen'
|
|
165
|
+
import type { StepConfigLayout } from '@elevasis/ui/components/forms'
|
|
166
|
+
import { ElevasisUIProvider } from '@elevasis/ui/provider'
|
|
167
|
+
|
|
168
|
+
const companyCleanupInputSchema = z.object({
|
|
169
|
+
listId: z.string().uuid(),
|
|
170
|
+
targetDescription: z.string(),
|
|
171
|
+
dryRun: z.boolean().default(true),
|
|
172
|
+
batchSize: z.number().int().min(1).default(20),
|
|
173
|
+
mode: z.enum(['mock', 'live']).default('live')
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
type CompanyCleanupInput = z.infer<typeof companyCleanupInputSchema>
|
|
177
|
+
|
|
178
|
+
const companyCleanupLayout: StepConfigLayout<CompanyCleanupInput> = {
|
|
179
|
+
sections: [
|
|
180
|
+
{
|
|
181
|
+
id: 'configuration',
|
|
182
|
+
fields: [
|
|
183
|
+
{
|
|
184
|
+
path: 'targetDescription',
|
|
185
|
+
component: 'textarea',
|
|
186
|
+
label: 'Target description',
|
|
187
|
+
placeholder: 'independent veterinary clinics in Orange County'
|
|
188
|
+
},
|
|
189
|
+
{ path: 'dryRun', component: 'switch', label: 'Dry run' }
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
advanced: {
|
|
194
|
+
id: 'advanced',
|
|
195
|
+
fields: [
|
|
196
|
+
{ path: 'batchSize', component: 'numberinput', label: 'Batch size', min: 1 },
|
|
197
|
+
{
|
|
198
|
+
path: 'mode',
|
|
199
|
+
component: 'segmented',
|
|
200
|
+
options: [
|
|
201
|
+
{ value: 'mock', label: 'Mock' },
|
|
202
|
+
{ value: 'live', label: 'Live' }
|
|
203
|
+
],
|
|
204
|
+
when: () => import.meta.env.DEV
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const listActions: ListBuilderRegistry = [
|
|
211
|
+
{
|
|
212
|
+
resourceId: 'lgn-company-cleanup-workflow',
|
|
213
|
+
workflowId: 'lgn-company-cleanup-workflow',
|
|
214
|
+
capabilityKey: 'lead-gen.company.cleanup',
|
|
215
|
+
label: 'Company Cleanup',
|
|
216
|
+
description: 'Normalize and clean company records for the list.',
|
|
217
|
+
category: 'utility',
|
|
218
|
+
stagesAffected: ['populated'],
|
|
219
|
+
schema: companyCleanupInputSchema,
|
|
220
|
+
layout: companyCleanupLayout,
|
|
221
|
+
defaultInput: (list) => ({
|
|
222
|
+
listId: list.id,
|
|
223
|
+
targetDescription: '',
|
|
224
|
+
dryRun: true,
|
|
225
|
+
batchSize: 20
|
|
226
|
+
})
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
|
|
230
|
+
export function App() {
|
|
231
|
+
return (
|
|
232
|
+
<ElevasisUIProvider listActions={listActions} {...providerProps}>
|
|
233
|
+
{children}
|
|
234
|
+
</ElevasisUIProvider>
|
|
235
|
+
)
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Author the `schema` in a browser-safe sibling file (no Node-only imports) so it can be reused by the workflow runtime AND the UI form. See `apollo-import-schema.ts` in the platform for the canonical split pattern.
|
|
240
|
+
|
|
241
|
+
Per-section split rule (operator-grade vs power-user):
|
|
242
|
+
|
|
243
|
+
- **Configuration:** target/limit, dry-run toggle, mode (preview/finalize), and any field an operator changes between runs.
|
|
244
|
+
- **Advanced:** concurrency, batch size, timeouts, credential names, workflow chaining, dev-only mode toggles. Omit the `advanced:` key entirely when a step has none.
|
|
245
|
+
- **`defaultInput`:** seeds the form before the user touches anything; must include `listId: list.id`.
|
|
246
|
+
|
|
138
247
|
## 3. Build a Custom Campaign Workspace
|
|
139
248
|
|
|
140
249
|
When the project needs custom layout or vertical-specific rendering, use the hooks directly:
|
|
@@ -34,6 +34,12 @@ You want to build on the shared lead-gen system without forking it: add lead-gen
|
|
|
34
34
|
**[Customize CRM Actions](customize-crm-actions.md)**
|
|
35
35
|
You want to add, hide, or replace CRM deal action buttons, configure the shared `crmActions` provider path, or call a project-owned workflow from custom UI when server-side action dispatch constraints require it. Covers `ActionDef`, `DEFAULT_CRM_ACTIONS`, provider wiring, and the current v1 boundary for custom action dispatch.
|
|
36
36
|
|
|
37
|
+
**[Customize Knowledge Browser](customize-knowledge-browser.md)**
|
|
38
|
+
You want to mount, extend, or replace the default Knowledge Browser. Covers the three customization tiers (default manifest mount, sidebar composition via `KnowledgeSidebarMiddle` + `KNOWLEDGE_ITEMS`, and direct query access via `@elevasis/core/knowledge`), the one-line `vite.config.ts` plugin add (`knowledgePlugin()` from `@elevasis/ui/vite-plugin-knowledge`), and the CSS import requirement.
|
|
39
|
+
|
|
40
|
+
**[Query the Knowledge Graph](query-the-knowledge-graph.md)**
|
|
41
|
+
You want to browse, inspect, or traverse the OrganizationModel knowledge graph from the command line. Covers the three verbs (`knowledge:ls`, `knowledge:cat`, `knowledge:graph`), all five mount axes (`/by-feature/`, `/by-kind/`, `/by-owner/`, `/graph/.../governs/`, `/graph/.../governed-by/`), dual-CLI invocation patterns (`elevasis-sdk` for external projects, `elevasis` for the monorepo), and the Windows/MSYS PowerShell gotcha.
|
|
42
|
+
|
|
37
43
|
---
|
|
38
44
|
|
|
39
45
|
## Reference docs these recipes link into
|