@elevasis/sdk 1.30.2 → 1.32.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.
@@ -9200,7 +9200,13 @@ function computeInterfaceReadiness(model, request) {
9200
9200
  `System "${request.systemPath}" is missing.`,
9201
9201
  { ref: request.systemPath }
9202
9202
  );
9203
- return { ready: false, systemPath: request.systemPath, interfaceKey: request.interfaceKey, scopedResourceIds, issues };
9203
+ return {
9204
+ ready: false,
9205
+ systemPath: request.systemPath,
9206
+ interfaceKey: request.interfaceKey,
9207
+ scopedResourceIds,
9208
+ issues
9209
+ };
9204
9210
  }
9205
9211
  if (systemInterface === void 0) {
9206
9212
  addReadinessIssue(
@@ -9210,7 +9216,13 @@ function computeInterfaceReadiness(model, request) {
9210
9216
  `System "${request.systemPath}" does not declare interface "${request.interfaceKey}".`,
9211
9217
  { path: readinessMarkerPath(request) }
9212
9218
  );
9213
- return { ready: false, systemPath: request.systemPath, interfaceKey: request.interfaceKey, scopedResourceIds, issues };
9219
+ return {
9220
+ ready: false,
9221
+ systemPath: request.systemPath,
9222
+ interfaceKey: request.interfaceKey,
9223
+ scopedResourceIds,
9224
+ issues
9225
+ };
9214
9226
  }
9215
9227
  if (systemInterface.lifecycle !== "active") {
9216
9228
  addReadinessIssue(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "1.30.2",
3
+ "version": "1.32.0",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -58,7 +58,7 @@
58
58
  "tsup": "^8.0.0",
59
59
  "typescript": "5.9.2",
60
60
  "zod": "^4.1.0",
61
- "@repo/core": "0.39.0",
61
+ "@repo/core": "0.41.0",
62
62
  "@repo/eslint-config": "0.0.0",
63
63
  "@repo/typescript-config": "0.0.0"
64
64
  },
@@ -93,13 +93,13 @@ Auto-invocation is driven by frontmatter `description`, `metadata.pathPatterns`,
93
93
  Once invoked, classify the user's input into ONE of these buckets and dispatch the matching
94
94
  primitive. When two buckets fit, prefer the higher one (more specific → more general).
95
95
 
96
- | # | Bucket | Trigger | Dispatch |
97
- | --- | ------------------------------ | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
98
- | 1 | Named knowledge/role/policy id | User names `knowledge.<id>`, `role.<id>`, `policy.<id>` directly | `om:cat <id>` for body, `om:describe <id>` for neighborhood |
99
- | 2 | Named system | User names a system path (`sales.crm`, `sales.lead-gen`) | `om:describe <id>` |
96
+ | # | Bucket | Trigger | Dispatch |
97
+ | --- | ------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- |
98
+ | 1 | Named knowledge/role/policy id | User names `knowledge.<id>`, `role.<id>`, `policy.<id>` directly | `om:cat <id>` for body, `om:describe <id>` for neighborhood |
99
+ | 2 | Named system | User names a system path (`sales.crm`, `sales.lead-gen`) | `om:describe <id>` |
100
100
  | 3 | Named ontology id | Id contains `:object/`, `:action/`, `:event/`, `:catalog/`, `:interface/`, `:link/`, `:surface/` | `om:describe <id>` (or `om:ls /by-ontology/<id> --ids-only` then `om:cat` each) |
101
- | 4 | Kind keyword | "playbooks", "strategies", "all references", "list policies" | `om:ls /by-kind/<kind> --ids-only` then `om:cat` each |
102
- | 5 | Free-text discovery | Anything else ("lead gen", "outreach", "what governs X?") | `om:search "<query>"` then drill into top hit with `om:describe` |
101
+ | 4 | Kind keyword | "playbooks", "strategies", "all references", "list policies" | `om:ls /by-kind/<kind> --ids-only` then `om:cat` each |
102
+ | 5 | Free-text discovery | Anything else ("lead gen", "outreach", "what governs X?") | `om:search "<query>"` then drill into top hit with `om:describe` |
103
103
 
104
104
  On ambiguous input, default to **bucket 5 (search)** and surface the top hits. Codify and Toggle
105
105
  intents are write paths -- see "Write Power" below.
@@ -110,15 +110,15 @@ intents are write paths -- see "Write Power" below.
110
110
 
111
111
  All commands run with `pnpm exec elevasis-sdk <cmd>` (or the `om:` alias of the legacy `knowledge:` name).
112
112
 
113
- | Command | Alias | Purpose |
114
- | ------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------- |
115
- | `om:search <q>` | `knowledge:search` | Universal keyword search across all 6 OM surfaces |
116
- | `om:describe <id>` | `knowledge:describe` | Structured neighborhood view; kind auto-detected from id shape |
117
- | `om:cat <id>` | `knowledge:cat` | Raw MDX body of a knowledge node |
118
- | `om:ls <path>` | `knowledge:ls` | List nodes by mount path (`/by-system/`, `/by-kind/`, `/by-ontology/`, `/by-owner/`, `/graph/<id>/{governs,governed-by}`) |
119
- | `om:graph <id>` | `knowledge:graph` | Show outgoing + incoming graph edges |
120
- | `om:skills <id>` | `knowledge:skills` | Show callable invocations on graph neighbors |
121
- | `om:generate` | `knowledge:generate` | Regenerate `_generated/nodes.ts` from MDX sources |
113
+ | Command | Alias | Purpose |
114
+ | ------------------ | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
115
+ | `om:search <q>` | `knowledge:search` | Universal keyword search across all 6 OM surfaces |
116
+ | `om:describe <id>` | `knowledge:describe` | Structured neighborhood view; kind auto-detected from id shape |
117
+ | `om:cat <id>` | `knowledge:cat` | Raw MDX body of a knowledge node |
118
+ | `om:ls <path>` | `knowledge:ls` | List by mount path. Enumeration: `/all-systems`, `/all-resources`, `/all-roles`. Scoped: `/by-system/`, `/by-kind/`, `/by-ontology/`, `/by-owner/`, `/graph/<id>/{governs,governed-by}` |
119
+ | `om:graph <id>` | `knowledge:graph` | Show outgoing + incoming graph edges |
120
+ | `om:skills <id>` | `knowledge:skills` | Show callable invocations on graph neighbors |
121
+ | `om:generate` | `knowledge:generate` | Regenerate `_generated/nodes.ts` from MDX sources |
122
122
 
123
123
  Common flags: `--json`, `--ids-only`, `--limit <n>`, `--kinds <list>`.
124
124
 
@@ -148,7 +148,22 @@ pnpm exec elevasis-sdk om:describe sales.crm:object/deal
148
148
  pnpm exec elevasis-sdk om:cat knowledge.outreach-playbook
149
149
  ```
150
150
 
151
- ### Mount-path listings
151
+ ### Top-level enumeration (drill-down entry point)
152
+
153
+ Start here when an agent needs to discover what this tenant's custom OM contains before
154
+ building on it -- list everything in a domain, then narrow with `om:describe` / `om:cat`:
155
+
156
+ ```bash
157
+ pnpm exec elevasis-sdk om:ls /all-systems # every System (path + label)
158
+ pnpm exec elevasis-sdk om:ls /all-resources # every resource (id, kind, title)
159
+ pnpm exec elevasis-sdk om:ls /all-roles # every role (id, title)
160
+ pnpm exec elevasis-sdk om:ls /all-systems --ids-only # pipe paths into om:describe
161
+ ```
162
+
163
+ These resolve against this tenant's resolved model -- they enumerate the project's own custom
164
+ OM, not the platform's. Use `--json` for the wrapped envelope or `--ids-only` for piping.
165
+
166
+ ### Scoped mount-path listings
152
167
 
153
168
  ```bash
154
169
  pnpm exec elevasis-sdk om:ls /by-system/sales.crm
@@ -193,16 +208,18 @@ current task makes it relevant.
193
208
  Use this map whenever the task asks what something is, where it lives, what governs it, or
194
209
  what adjacent context may matter:
195
210
 
196
- | Question | Start here | Then inspect |
197
- | ---------------------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
198
- | What Systems exist? | `om:ls /by-kind/system` or `core/config/organization-model.ts` | System IDs, parentage, lifecycle, UI metadata, and content |
199
- | What governs a System? | `om:describe <system-id>` or `om:ls /by-system/<id>` | system entry, governed knowledge, roles, policies, graph `governs` edges |
200
- | What resources belong to a System? | the id-keyed `organizationModel.resources` map and `getResourcesForSystem(model, systemPath)` | use `{ includeDescendants: true }` only for parent-scope rollups |
201
- | What can a System do? | system action refs and the actions domain | `action.resourceId`, invocation metadata, affected entities, policies |
202
- | What data does it own? | entities domain | owning System refs, state catalogs, entity links, emitted/projected events |
211
+ | Question | Start here | Then inspect |
212
+ | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
213
+ | What Systems exist? | `om:ls /all-systems` | System IDs, parentage, lifecycle, UI metadata, and content |
214
+ | What resources exist? | `om:ls /all-resources` | resource ids, kinds, owning System refs |
215
+ | What roles exist? | `om:ls /all-roles` | role ids, titles, responsibilities |
216
+ | What governs a System? | `om:describe <system-id>` or `om:ls /by-system/<id>` | system entry, governed knowledge, roles, policies, graph `governs` edges |
217
+ | What resources belong to a System? | the id-keyed `organizationModel.resources` map and `getResourcesForSystem(model, systemPath)` | use `{ includeDescendants: true }` only for parent-scope rollups |
218
+ | What can a System do? | system action refs and the actions domain | `action.resourceId`, invocation metadata, affected entities, policies |
219
+ | What data does it own? | entities domain | owning System refs, state catalogs, entity links, emitted/projected events |
203
220
  | Is a platform API interface ready? | the System's `apiInterface` marker and `node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md` | matching convention-locked System path, cataloged `readinessProfile`, derived resource ontology bindings, and scoped topology grants |
204
- | What UI surface exposes it? | `navigation.sidebar` plus `SystemModule` manifests | route files, surface targets, route-prefix modules, guards |
205
- | What knowledge applies? | `om:ls /by-system/<id>` plus graph edges | `om:cat`, `om:graph`, `/graph/<id>/governed-by` |
221
+ | What UI surface exposes it? | `navigation.sidebar` plus `SystemModule` manifests | route files, surface targets, route-prefix modules, guards |
222
+ | What knowledge applies? | `om:ls /by-system/<id>` plus graph edges | `om:cat`, `om:graph`, `/graph/<id>/governed-by` |
206
223
 
207
224
  Do not treat any one read as a complete system snapshot. The OM is a set of related domain maps;
208
225
  follow the relationship that matches the work. Prefer structured helpers from
@@ -91,7 +91,7 @@ Re-run the command without `--dry-run`. The CLI:
91
91
  Always run both gates after a scaffold write:
92
92
 
93
93
  ```bash
94
- pnpm -C operations check-types # tsc --noEmit
94
+ pnpm -C operations check-types # type-check only, no emit
95
95
  pnpm -C operations check # elevasis-sdk resource validator (incl. conformance gate)
96
96
  ```
97
97
 
@@ -0,0 +1,33 @@
1
+ # OM snapshot stamp + `@elevasis/sdk` workflow-config promotion + `om:ls` enumeration
2
+
3
+ ## Why this note exists
4
+
5
+ The 2026-05-28 SDK ship train publishes two coordinated package bumps and propagates two template-authored changes:
6
+
7
+ - **`@elevasis/core` 0.40.0** — adds an optional `snapshotHash` field to the Organization Model schema (deploy-time + runtime OM snapshot-drift detection), a `STALE_OM_SNAPSHOT` validation member, and three new `@elevasis/core/knowledge` enumeration helpers (`listAllSystemsFlat`, `listAllResources`, `listAllRoles`).
8
+ - **`@elevasis/sdk` 1.31.0** — promotes the generic `defineWorkflowConfig(resourceId, descriptors, actionRegistry)` helper out of the private platform package into the published SDK barrel, and adds `om:ls /all-systems | /all-resources | /all-roles` enumeration mounts to the tenant `elevasis-sdk om:ls` CLI.
9
+
10
+ These change tenant-visible behavior (a new readiness diagnostic, new CLI mounts, and a new recommended deployment-binding pattern), so they cannot be left to silent dependency-baseline drift.
11
+
12
+ ## Applies to
13
+
14
+ - All tenant SDK consumers depending on `@elevasis/core` and/or `@elevasis/sdk` (`external/nirvana-marketing`, and any project scaffolded from `external/_template`).
15
+ - New scaffolds: pick up the `operations/src/metadata.ts` convention seed and (after the post-publish template authoring lands) the `projectDeploymentSpec`-based `operations/src/index.ts`.
16
+
17
+ ## Required actions
18
+
19
+ 1. **Adopt the bumped baselines.** `core/package.json` → `@elevasis/core` `^0.40.0`; `operations/package.json` → `@elevasis/core` `^0.40.0` and `@elevasis/sdk` `^1.31.0`. (Handled by the package-cascade entries in `_external-sync-prep.json`; verify, do not hand-edit.)
20
+ 2. **Redeploy operations after the bump** so the deployment writes a hash-stamped OM snapshot. Until you redeploy, the deployed snapshot carries no `snapshotHash` and the new drift diagnostic stays dormant. Stale-snapshot 503s now name the cause and the fix ("redeploy via `pnpm operations:deploy`") instead of the old opaque "not ready for this API surface".
21
+ 3. **New enumeration CLI is available after the `@elevasis/sdk` bump:** `pnpm -C external/<project>/operations exec elevasis-sdk om:ls /all-systems` (also `/all-resources`, `/all-roles`; supports `--json` / `--ids-only`). The tenant `/om` skill documents the drill-down surface.
22
+ 4. **Deployment-binding convention (informational for existing tenants; default for new scaffolds):** the template now deploys through `projectDeploymentSpec` with injected descriptor getters and derives per-workflow `config` via the promoted `defineWorkflowConfig`. `operations/src/**` is project-owned, so existing tenants are NOT auto-rewritten; adopt the pattern at your discretion. A typed `operations/src/metadata.ts` stub (triggers / integrations / human checkpoints) is seeded as the home for deployment mechanics.
23
+
24
+ ## Verification
25
+
26
+ - `pnpm -C external/<project>/operations exec elevasis-sdk om:ls /all-systems` returns systems (not an empty list).
27
+ - After redeploy, the system-interface readiness probe no longer returns a stale-snapshot 503; a deliberate source/deploy mismatch now surfaces `STALE_OM_SNAPSHOT` with an actionable message.
28
+ - `pnpm sync:verify` and `pnpm external:verify-template-family` pass after the sync.
29
+
30
+ ## Not handled by /git-sync
31
+
32
+ - The **operations redeploy** (action 2) is a deliberate deploy, not a file sync — `/git-sync` will not run it.
33
+ - **Adopting `projectDeploymentSpec` / wiring `metadata.ts`** in an existing tenant's `operations/src/**` (project-owned) is a manual, tenant-authored migration; the sync only seeds it into fresh scaffolds.
@@ -0,0 +1,39 @@
1
+ # Client Source and OM Client Profiles
2
+
3
+ ## Why this note exists
4
+
5
+ The client-system release train adds first-class client source support across the platform and introduces top-level Organization Model client profiles in `@elevasis/core/organization-model`.
6
+
7
+ Template-derived projects need the updated package baselines and guidance before relying on the shared clients UI, SDK client commands, or OM client-profile helpers. Tenant-authored client profile content remains project-owned and is not auto-generated by sync.
8
+
9
+ ## Applies to
10
+
11
+ - Projects that use the shared `@elevasis/ui` clients feature.
12
+ - Projects that create or update clients through `elevasis-sdk client:create` or `elevasis-sdk client:update`.
13
+ - Projects that intentionally author real client profiles in `core/config/organization-model.ts`.
14
+ - Projects that deploy operations bundles against the updated `@elevasis/sdk` baseline.
15
+
16
+ ## Required actions
17
+
18
+ 1. Pull the package baseline updates from the prepared `/sdk ship` train.
19
+ 2. Use the first-class client `source` field for direct clients, for example `word_of_mouth`, instead of storing the primary source only in ad hoc metadata.
20
+ 3. If the project intentionally authors OM client profiles, key `organizationModel.clients` by the canonical production `public.clients.id`; the profile `id` must match the same UUID.
21
+ 4. Keep tenant-specific client profile records, prompts, branding, workspace links, and custom values project-owned. Do not copy Elevasis or another tenant's client profiles into this project.
22
+ 5. Treat `Organization > Clients` as the semantic home for real client profiles and `Systems > Client Management` as the operational platform system.
23
+
24
+ ## Verification
25
+
26
+ Run the checks that match the project surface:
27
+
28
+ ```bash
29
+ pnpm -C core check-types
30
+ pnpm -C operations check-types
31
+ pnpm -C operations check
32
+ pnpm -C ui check-types
33
+ ```
34
+
35
+ For projects that author OM client profiles, also run the project-local OM validation or deploy preflight before publishing operations resources.
36
+
37
+ ## Not handled by /git-sync
38
+
39
+ `/git-sync` can propagate the updated package baselines and this guidance, but it does not create tenant-specific `clients` rows, choose client source values, author OM client profile content, or decide whether a project should model a client profile at all. Maintainers must make those project-specific data and authoring decisions intentionally.
@@ -31,7 +31,7 @@ You do not need all three packages. A pure automation project needs only `@eleva
31
31
 
32
32
  ## Packages
33
33
 
34
- ### @elevasis/sdk (v1.28.1)
34
+ ### @elevasis/sdk (v1.30.2)
35
35
 
36
36
  The primary developer package. Provides the TypeScript API for defining workflows and agents, the `elevasis-sdk` CLI for validation and deployment, and typed worker adapters for 25 platform and integration tools.
37
37
 
@@ -41,7 +41,7 @@ The primary developer package. Provides the TypeScript API for defining workflow
41
41
 
42
42
  See [@elevasis/sdk](sdk/index.mdx) for the full group overview, getting started guide, CLI reference, adapter catalog, and more.
43
43
 
44
- ### @elevasis/core (v0.35.1)
44
+ ### @elevasis/core (v0.39.0)
45
45
 
46
46
  The shared contract layer. Exports Zod schemas and TypeScript types that are shared between the SDK, the UI, and the platform API. Useful when you need the typed contracts (organization model, entities, knowledge, auth) in a package that does not pull in the full SDK runtime.
47
47
 
@@ -51,7 +51,7 @@ The shared contract layer. Exports Zod schemas and TypeScript types that are sha
51
51
 
52
52
  See [@elevasis/core](core/index.mdx) for subpath details, browser/server split, and when to use it.
53
53
 
54
- ### @elevasis/ui (v2.39.1)
54
+ ### @elevasis/ui (v2.42.0)
55
55
 
56
56
  The shared React feature-shell. Provides an `ElevasisProvider` and manifest-backed feature modules that a host UI embeds. Many peer dependencies are optional -- pull only what the features you use require.
57
57
 
@@ -60,3 +60,7 @@ The shared React feature-shell. Provides an `ElevasisProvider` and manifest-back
60
60
  **Peer deps:** React 19, Mantine 8.2.7, TanStack Query, TanStack Router, Zod 4.1, Zustand 5, cytoscape (many optional)
61
61
 
62
62
  See [@elevasis/ui](ui/index.mdx) for the provider model, feature modules, peer dependency details, and when to use it.
63
+
64
+ ## Authoring Note
65
+
66
+ These pages have a dual surface. At SDK build time, `packages/sdk/scripts/copy-reference-docs.mjs` copies every `apps/docs/content/docs/sdk/**.mdx` into `packages/sdk/reference/`, which ships inside the npm package (`files: ["reference/"]`). The `external/_template/CLAUDE.md` points tenant-project agents at `node_modules/@elevasis/sdk/reference/` as their primary reference bundle. Drift in these docs does not just affect the public site -- it actively misleads every agent building a tenant project.
@@ -42,6 +42,60 @@ export type OrganizationModelDomainMetadataByDomain = z.infer<typeof Organizatio
42
42
  export type OrganizationModelBranding = z.infer<typeof OrganizationModelBrandingSchema>
43
43
  ```
44
44
 
45
+ ### `ClientProfile`
46
+
47
+ ```typescript
48
+ export type ClientProfile = z.infer<typeof ClientProfileSchema>
49
+ ```
50
+
51
+ ### `ClientProfileBranding`
52
+
53
+ ```typescript
54
+ export type ClientProfileBranding = z.infer<typeof ClientProfileBrandingSchema>
55
+ ```
56
+
57
+ ### `ClientProfileIdentity`
58
+
59
+ ```typescript
60
+ export type ClientProfileIdentity = z.infer<typeof ClientProfileIdentitySchema>
61
+ ```
62
+
63
+ ### `ClientProfileLinks`
64
+
65
+ ```typescript
66
+ export type ClientProfileLinks = z.infer<typeof ClientProfileLinksSchema>
67
+ ```
68
+
69
+ ### `ClientProfilePrompts`
70
+
71
+ ```typescript
72
+ export type ClientProfilePrompts = z.infer<typeof ClientProfilePromptsSchema>
73
+ ```
74
+
75
+ ### `ClientProfileSource`
76
+
77
+ ```typescript
78
+ export type ClientProfileSource = z.infer<typeof ClientProfileSourceSchema>
79
+ ```
80
+
81
+ ### `ClientProfileStatus`
82
+
83
+ ```typescript
84
+ export type ClientProfileStatus = z.infer<typeof ClientProfileStatusSchema>
85
+ ```
86
+
87
+ ### `ClientProfileWorkspace`
88
+
89
+ ```typescript
90
+ export type ClientProfileWorkspace = z.infer<typeof ClientProfileWorkspaceSchema>
91
+ ```
92
+
93
+ ### `OrganizationModelClients`
94
+
95
+ ```typescript
96
+ export type OrganizationModelClients = z.infer<typeof ClientProfilesDomainSchema>
97
+ ```
98
+
45
99
  ### `SalesPipeline`
46
100
 
47
101
  ```typescript
@@ -22,7 +22,7 @@ This page covers core Elevasis concepts in plain English. It is the teaching voc
22
22
  | Handler | The function inside a step that does the actual work. It receives input data and returns output data. |
23
23
  | Entry Point | The first step that runs when a workflow is executed. Every workflow must have one. |
24
24
  | Resource ID | A unique lowercase name for your resource (e.g., `lead-scorer`, `send-welcome-email`). Must be unique within your organization. |
25
- | Workspace | Your Elevasis project directory. Contains resources (workflows and agents), documentation, and optionally a database connection and custom apps. Created by `elevasis-sdk init`. |
25
+ | Workspace | Your Elevasis project directory. Contains resources (workflows and agents), documentation, and optionally a database connection and custom apps. |
26
26
  | Data Table | A table in your database (e.g., Supabase) that stores structured data your workflows can read and write. Defined in `data/schema.ts` as documentation for the agent. |
27
27
 
28
28
  ---