@elevasis/sdk 1.44.3 → 1.46.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 +35026 -30226
- package/dist/index.d.ts +1786 -808
- package/dist/index.js +789 -739
- package/dist/node/index.d.ts +105 -181
- package/dist/node/index.js +2 -2
- package/dist/test-utils/index.d.ts +901 -359
- package/dist/test-utils/index.js +587 -824
- package/dist/worker/index.d.ts +12685 -0
- package/dist/worker/index.js +188 -216
- package/package.json +4 -7
- package/reference/_navigation.md +161 -22
- package/reference/_reference-manifest.json +228 -4
- package/reference/claude-config.md +8 -0
- package/reference/core/exports.mdx +2 -0
- package/reference/core/index.mdx +3 -3
- package/reference/examples/organization-model.ts +117 -111
- package/reference/index.mdx +4 -4
- package/reference/packages/core/src/business/README.md +4 -1
- package/reference/packages/core/src/content/README.md +19 -0
- package/reference/packages/core/src/organization-model/README.md +148 -149
- package/reference/packages/core/src/organization-model/readiness/README.md +42 -0
- package/reference/packages/ui/src/features/README.md +28 -28
- package/reference/rules/active-change-index.md +40 -54
- package/reference/rules/agent-runtime.md +81 -0
- package/reference/rules/agent-start-here.md +71 -163
- package/reference/rules/deployment.md +33 -10
- package/reference/rules/error-handling.md +26 -0
- package/reference/rules/execution.md +13 -0
- package/reference/rules/frontend.md +10 -3
- package/reference/rules/observability.md +9 -1
- package/reference/rules/operations.md +26 -17
- package/reference/rules/organization-model.md +74 -88
- package/reference/rules/organization-os.md +71 -88
- package/reference/rules/package-taxonomy.md +11 -2
- package/reference/rules/platform.md +13 -7
- package/reference/rules/shared-types.md +36 -0
- package/reference/rules/task-tracking.md +30 -5
- package/reference/rules/ui.md +145 -3
- package/reference/rules/vibe-intents.md +271 -0
- package/reference/rules/vibe.md +17 -243
- package/reference/scaffold/core/organization-graph.mdx +112 -99
- package/reference/scaffold/core/organization-model.mdx +231 -215
- package/reference/scaffold/operations/propagation-pipeline.md +16 -17
- package/reference/scaffold/operations/scaffold-maintenance.md +22 -20
- package/reference/scaffold/operations/workflow-recipes.md +72 -20
- package/reference/scaffold/recipes/add-a-feature.md +156 -146
- package/reference/scaffold/recipes/add-a-resource.md +123 -117
- package/reference/scaffold/recipes/customize-crm-actions.md +28 -13
- package/reference/scaffold/recipes/customize-knowledge-browser.md +52 -117
- package/reference/scaffold/recipes/customize-organization-model.md +161 -149
- package/reference/scaffold/recipes/extend-a-base-entity.md +156 -140
- package/reference/scaffold/recipes/extend-content.md +265 -0
- package/reference/scaffold/recipes/extend-crm.md +16 -11
- package/reference/scaffold/recipes/extend-lead-gen.md +37 -21
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +160 -118
- package/reference/scaffold/recipes/index.md +6 -3
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +23 -23
- package/reference/scaffold/reference/contracts.md +30 -56
- package/reference/scaffold/reference/feature-registry.md +3 -0
- package/reference/scaffold/reference/glossary.md +4 -4
- package/reference/scaffold/reference/system-interface-capabilities.md +5 -4
- package/reference/scaffold/ui/composition-extensibility.mdx +271 -232
- package/reference/scaffold/ui/customization.md +2 -2
- package/reference/scaffold/ui/feature-flags-and-gating.md +14 -6
- package/reference/scaffold/ui/feature-shell.mdx +277 -62
- package/reference/scaffold/ui/recipes.md +229 -197
- package/reference/sdk/cli-management.mdx +166 -33
- package/reference/sdk/cli.mdx +90 -13
- package/reference/sdk/concepts.mdx +2 -0
- package/reference/sdk/define-builders.mdx +76 -0
- package/reference/sdk/deployment/command-center.mdx +6 -2
- package/reference/sdk/deployment/execution-reference.mdx +64 -186
- package/reference/sdk/deployment/index.mdx +2 -0
- package/reference/sdk/exports.mdx +4 -4
- package/reference/sdk/framework/agent.mdx +52 -116
- package/reference/sdk/framework/index.mdx +46 -65
- package/reference/sdk/framework/project-structure.mdx +150 -205
- package/reference/sdk/framework/tutorial-system.mdx +2 -2
- package/reference/sdk/human-in-the-loop.mdx +152 -0
- package/reference/sdk/index.mdx +6 -7
- package/reference/sdk/platform-tools/adapters-platform.mdx +3 -1
- package/reference/sdk/platform-tools/index.mdx +12 -0
- package/reference/sdk/platform-tools/type-safety.mdx +4 -0
- package/reference/sdk/project-deployment-spec.mdx +131 -0
- package/reference/sdk/resources/index.mdx +21 -7
- package/reference/sdk/resources/patterns.mdx +54 -24
- package/reference/sdk/resources/types.mdx +7 -4
- package/reference/sdk/templates/data-enrichment.mdx +7 -3
- package/reference/sdk/templates/email-sender.mdx +139 -135
- package/reference/sdk/templates/lead-scorer.mdx +5 -1
- package/reference/sdk/templates/pdf-generator.mdx +155 -151
- package/reference/sdk/templates/recurring-job.mdx +195 -189
- package/reference/sdk/templates/text-classifier.mdx +4 -0
- package/reference/sdk/templates/web-scraper.mdx +139 -135
- package/reference/spine/spine-primer.md +135 -96
- package/reference/ui/exports.mdx +1 -0
- package/reference/ui/index.mdx +14 -7
- package/dist/types/worker/adapters/anymailfinder.d.ts +0 -14
- package/dist/types/worker/adapters/apify.d.ts +0 -14
- package/dist/types/worker/adapters/approval.d.ts +0 -23
- package/dist/types/worker/adapters/attio.d.ts +0 -22
- package/dist/types/worker/adapters/clickup.d.ts +0 -22
- package/dist/types/worker/adapters/create-adapter.d.ts +0 -41
- package/dist/types/worker/adapters/crm.d.ts +0 -20
- package/dist/types/worker/adapters/dropbox.d.ts +0 -14
- package/dist/types/worker/adapters/email.d.ts +0 -25
- package/dist/types/worker/adapters/execution.d.ts +0 -22
- package/dist/types/worker/adapters/gmail.d.ts +0 -14
- package/dist/types/worker/adapters/google-sheets.d.ts +0 -14
- package/dist/types/worker/adapters/index.d.ts +0 -33
- package/dist/types/worker/adapters/instantly.d.ts +0 -14
- package/dist/types/worker/adapters/lead.d.ts +0 -28
- package/dist/types/worker/adapters/list.d.ts +0 -9
- package/dist/types/worker/adapters/llm.d.ts +0 -45
- package/dist/types/worker/adapters/millionverifier.d.ts +0 -14
- package/dist/types/worker/adapters/notification.d.ts +0 -28
- package/dist/types/worker/adapters/pdf.d.ts +0 -22
- package/dist/types/worker/adapters/projects.d.ts +0 -20
- package/dist/types/worker/adapters/resend.d.ts +0 -14
- package/dist/types/worker/adapters/scheduler.d.ts +0 -25
- package/dist/types/worker/adapters/signature-api.d.ts +0 -14
- package/dist/types/worker/adapters/storage.d.ts +0 -33
- package/dist/types/worker/adapters/stripe.d.ts +0 -14
- package/dist/types/worker/adapters/tomba.d.ts +0 -14
- package/dist/types/worker/index.d.ts +0 -60
- package/dist/types/worker/platform.d.ts +0 -90
- package/dist/types/worker/utils.d.ts +0 -9
- package/reference/claude-config/Overview.md +0 -230
- package/reference/claude-config/hooks/post-edit-validate.mjs +0 -98
- package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +0 -187
- package/reference/claude-config/hooks/tool-failure-recovery.mjs +0 -73
- package/reference/claude-config/registries/graph-skills.json +0 -4
- package/reference/claude-config/registries/knowledge-flags.json +0 -154
- package/reference/claude-config/registries/skill-coverage.json +0 -20
- package/reference/claude-config/rules/active-change-index.md +0 -22
- package/reference/claude-config/rules/agent-start-here.md +0 -22
- package/reference/claude-config/rules/deployment.md +0 -22
- package/reference/claude-config/rules/error-handling.md +0 -22
- package/reference/claude-config/rules/execution.md +0 -22
- package/reference/claude-config/rules/frontend.md +0 -22
- package/reference/claude-config/rules/observability.md +0 -22
- package/reference/claude-config/rules/operations.md +0 -22
- package/reference/claude-config/rules/organization-model.md +0 -22
- package/reference/claude-config/rules/organization-os.md +0 -22
- package/reference/claude-config/rules/package-taxonomy.md +0 -22
- package/reference/claude-config/rules/platform.md +0 -22
- package/reference/claude-config/rules/shared-types.md +0 -22
- package/reference/claude-config/rules/task-tracking.md +0 -22
- package/reference/claude-config/rules/topbar-actions.md +0 -70
- package/reference/claude-config/rules/ui.md +0 -22
- package/reference/claude-config/rules/vibe.md +0 -22
- package/reference/claude-config/scripts/statusline-command.js +0 -18
- package/reference/claude-config/settings.json +0 -30
- package/reference/claude-config/skills/client/SKILL.md +0 -201
- package/reference/claude-config/skills/deploy/SKILL.md +0 -159
- package/reference/claude-config/skills/dsp/SKILL.md +0 -66
- package/reference/claude-config/skills/elevasis/SKILL.md +0 -251
- package/reference/claude-config/skills/explore/SKILL.md +0 -78
- package/reference/claude-config/skills/git-sync/SKILL.md +0 -166
- package/reference/claude-config/skills/om/SKILL.md +0 -475
- package/reference/claude-config/skills/om/operations/build.md +0 -237
- package/reference/claude-config/skills/om/operations/codify-level-a.md +0 -109
- package/reference/claude-config/skills/om/operations/codify-level-b.md +0 -159
- package/reference/claude-config/skills/om/operations/customers.md +0 -114
- package/reference/claude-config/skills/om/operations/features.md +0 -88
- package/reference/claude-config/skills/om/operations/goals.md +0 -123
- package/reference/claude-config/skills/om/operations/identity.md +0 -97
- package/reference/claude-config/skills/om/operations/labels.md +0 -110
- package/reference/claude-config/skills/om/operations/offerings.md +0 -114
- package/reference/claude-config/skills/om/operations/roles.md +0 -104
- package/reference/claude-config/skills/om/operations/scaffold.md +0 -163
- package/reference/claude-config/skills/om/operations/techStack.md +0 -38
- package/reference/claude-config/skills/project/SKILL.md +0 -1114
- package/reference/claude-config/skills/run-ui/SKILL.md +0 -73
- package/reference/claude-config/skills/save/SKILL.md +0 -183
- package/reference/claude-config/skills/setup/SKILL.md +0 -290
- package/reference/claude-config/skills/status/SKILL.md +0 -59
- package/reference/claude-config/skills/submit-request/SKILL.md +0 -180
- package/reference/claude-config/skills/sync/SKILL.md +0 -47
- package/reference/claude-config/skills/tutorial/SKILL.md +0 -259
- package/reference/claude-config/skills/tutorial/progress-template.md +0 -74
- package/reference/claude-config/skills/tutorial/technical.md +0 -1303
- package/reference/claude-config/skills/tutorial/vibe-coder.md +0 -890
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +0 -27
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +0 -30
- package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +0 -73
- package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +0 -86
- package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +0 -55
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +0 -97
- package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +0 -112
- package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +0 -93
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +0 -58
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +0 -56
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +0 -71
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +0 -83
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +0 -59
- package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +0 -42
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +0 -60
- package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +0 -37
- package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +0 -34
- package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +0 -38
- package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +0 -32
- package/reference/claude-config/sync-notes/2026-05-09-command-system.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +0 -69
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +0 -30
- package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +0 -45
- package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +0 -52
- package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +0 -32
- package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +0 -43
- package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +0 -40
- package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +0 -61
- package/reference/claude-config/sync-notes/2026-05-23-branding-names-to-identity.md +0 -49
- package/reference/claude-config/sync-notes/2026-05-23-lead-gen-manage-access.md +0 -31
- package/reference/claude-config/sync-notes/2026-05-23-om-deployment-drift-detection.md +0 -42
- package/reference/claude-config/sync-notes/2026-05-23-om-full-model-deploy-contract.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-23-ui-sdk-package-fixes.md +0 -37
- package/reference/claude-config/sync-notes/2026-05-24-platform-invite-router-core-baseline.md +0 -28
- package/reference/claude-config/sync-notes/2026-05-24-system-interface-readiness.md +0 -43
- package/reference/claude-config/sync-notes/2026-05-25-invitation-login-loader.md +0 -26
- package/reference/claude-config/sync-notes/2026-05-25-om-topbar-requests.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-25-system-interface-profile-registry-and-substrate.md +0 -35
- package/reference/claude-config/sync-notes/2026-05-25-tenant-om-scaffold-cli.md +0 -49
- package/reference/claude-config/sync-notes/2026-05-25-vibe-operate-intent.md +0 -47
- package/reference/claude-config/sync-notes/2026-05-28-om-snapshot-sdk-workflow-config.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-30-client-source-and-om-profiles.md +0 -39
- package/reference/claude-config/sync-notes/2026-06-02-knowledge-nested-group-routing.md +0 -27
- package/reference/claude-config/sync-notes/2026-06-02-nest-projects-under-platform.md +0 -45
- package/reference/claude-config/sync-notes/2026-06-03-skill-autogen-and-client-skill.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-04-scaffold-registry-lane-severity.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-05-appearance-app-mode-decouple.md +0 -29
- package/reference/claude-config/sync-notes/2026-06-05-ontology-endpoint-rename-and-knowledge-browser-ui.md +0 -86
- package/reference/claude-config/sync-notes/2026-06-06-om-build-systems-scaffold.md +0 -47
- package/reference/claude-config/sync-notes/2026-06-06-om-item-copy-references.md +0 -50
- package/reference/claude-config/sync-notes/2026-06-08-knowledge-base-page-not-found-fix.md +0 -76
- package/reference/claude-config/sync-notes/2026-06-09-agent-sessions-public-agent-chat-route.md +0 -75
- package/reference/claude-config/sync-notes/2026-06-09-sdk-cli-load-org-model-resolution.md +0 -42
- package/reference/claude-config/sync-notes/2026-06-12-agent-grants-visualizer-operations.md +0 -30
- package/reference/claude-config/sync-notes/2026-06-14-session-ux-and-project-cli-json.md +0 -33
- package/reference/claude-config/sync-notes/2026-06-14-shared-session-conversation-view.md +0 -26
- package/reference/claude-config/sync-notes/2026-06-15-session-chat-zero-wiring.md +0 -46
- package/reference/claude-config/sync-notes/2026-06-17-agent-session-ux-features.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-25-shared-page-scroll-contract-guard.md +0 -52
- package/reference/claude-config/sync-notes/2026-06-26-leadgen-overview-om-telemetry.md +0 -47
- package/reference/claude-config/sync-notes/2026-07-21-agent-scaffold-hardening.md +0 -75
- package/reference/claude-config/sync-notes/2026-07-23-agent-session-memory.md +0 -49
- package/reference/claude-config/sync-notes/2026-07-23-workos-org-marker.md +0 -50
- package/reference/claude-config/sync-notes/2026-07-24-claude-5-models-and-session-surface-fixes.md +0 -116
- package/reference/claude-config/sync-notes/2026-07-27-agent-strict-output-and-turn-drift.md +0 -73
- package/reference/claude-config/sync-notes/2026-07-28-agent-reply-is-its-own-field.md +0 -84
- package/reference/claude-config/sync-notes/2026-07-30-login-screen-and-member-provisioning-state.md +0 -114
- package/reference/claude-config/sync-notes/2026-08-02-auth-guard-defaults-and-truncation-fix.md +0 -122
- package/reference/claude-config/sync-notes/2026-08-03-agent-prose-escape-normalization.md +0 -88
- package/reference/claude-config/sync-notes/2026-08-03-cli-gateway-errors-and-request-timeout.md +0 -120
- package/reference/claude-config/sync-notes/README.md +0 -43
- package/reference/sdk/framework/interaction-guidance.mdx +0 -182
- package/reference/sdk/framework/memory.mdx +0 -326
- package/reference/sdk/framework/resource-documentation.mdx +0 -90
- package/reference/sdk/roadmap.mdx +0 -164
|
@@ -18,6 +18,8 @@ Every workflow is a `WorkflowDefinition` object with four top-level keys: `confi
|
|
|
18
18
|
|
|
19
19
|
### Config
|
|
20
20
|
|
|
21
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
22
|
+
|
|
21
23
|
```typescript
|
|
22
24
|
import { resourceDescriptors } from '@core/config/organization-model'
|
|
23
25
|
|
|
@@ -37,6 +39,8 @@ config: {
|
|
|
37
39
|
|
|
38
40
|
### Contract
|
|
39
41
|
|
|
42
|
+
<!-- doc-snippet:skip: omits `import { z } from 'zod'` for brevity -- shown as it would appear in core/types/index.ts -->
|
|
43
|
+
|
|
40
44
|
```typescript
|
|
41
45
|
// core/types/index.ts -- shared with frontend
|
|
42
46
|
export const emailNotificationInputSchema = z.object({
|
|
@@ -58,6 +62,8 @@ export type EmailNotificationInput = z.infer<typeof emailNotificationInputSchema
|
|
|
58
62
|
export type EmailNotificationOutput = z.infer<typeof emailNotificationOutputSchema>
|
|
59
63
|
```
|
|
60
64
|
|
|
65
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
66
|
+
|
|
61
67
|
```typescript
|
|
62
68
|
// operations/src/email-notification/index.ts
|
|
63
69
|
import { emailNotificationInputSchema, emailNotificationOutputSchema } from '@core/types'
|
|
@@ -76,6 +82,8 @@ contract: {
|
|
|
76
82
|
|
|
77
83
|
**Entity-backed workflows:** for workflows that operate on a domain entity, reference the entity contract rather than redeclaring it.
|
|
78
84
|
|
|
85
|
+
<!-- doc-snippet:skip: omits `import { z } from 'zod'` for brevity -- shown as it would appear in core/types/index.ts -->
|
|
86
|
+
|
|
79
87
|
```typescript
|
|
80
88
|
// core/types/index.ts
|
|
81
89
|
import { BaseDealSchema } from '@elevasis/core/entities'
|
|
@@ -95,6 +103,8 @@ export type CloseDealInput = z.infer<typeof closeDealInputSchema>
|
|
|
95
103
|
|
|
96
104
|
Each step is a `WorkflowStep` with: `id`, `name`, `description`, `handler`, `inputSchema`, `outputSchema`, and `next`.
|
|
97
105
|
|
|
106
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
107
|
+
|
|
98
108
|
```typescript
|
|
99
109
|
import { StepType } from '@elevasis/sdk'
|
|
100
110
|
|
|
@@ -146,6 +156,8 @@ The platform starts execution here. For single-step workflows, `entryPoint` poin
|
|
|
146
156
|
|
|
147
157
|
Declare `interface.form` to auto-generate an execution form in AI Studio and Command Center:
|
|
148
158
|
|
|
159
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
160
|
+
|
|
149
161
|
```typescript
|
|
150
162
|
interface: {
|
|
151
163
|
form: {
|
|
@@ -187,6 +199,8 @@ Available methods: `create`.
|
|
|
187
199
|
|
|
188
200
|
Generate text or structured output using a language model.
|
|
189
201
|
|
|
202
|
+
<!-- doc-snippet:skip: illustrative excerpt -- `input` is the step handler's validated input, shown in scope for readability -->
|
|
203
|
+
|
|
190
204
|
```typescript
|
|
191
205
|
import { llm } from '@elevasis/sdk/worker'
|
|
192
206
|
|
|
@@ -203,6 +217,8 @@ const summary = response.output as string
|
|
|
203
217
|
|
|
204
218
|
For structured output, pass a JSON Schema as `responseSchema`:
|
|
205
219
|
|
|
220
|
+
<!-- doc-snippet:skip: continues from the `llm` import and `input` scope shown above -->
|
|
221
|
+
|
|
206
222
|
```typescript
|
|
207
223
|
const response = await llm.generate({
|
|
208
224
|
provider: 'anthropic',
|
|
@@ -222,6 +238,8 @@ Available methods: `generate`.
|
|
|
222
238
|
|
|
223
239
|
Upload and retrieve files scoped to the organization. All paths are automatically prefixed with the organization's storage prefix server-side.
|
|
224
240
|
|
|
241
|
+
<!-- doc-snippet:skip: illustrative excerpt -- `logData` stands in for whatever data the caller is persisting -->
|
|
242
|
+
|
|
225
243
|
```typescript
|
|
226
244
|
import { storage } from '@elevasis/sdk/worker'
|
|
227
245
|
|
|
@@ -253,6 +271,8 @@ Available methods: `upload`, `download`, `createSignedUrl`, `delete`, `list`.
|
|
|
253
271
|
|
|
254
272
|
Schedule future or recurring workflow executions.
|
|
255
273
|
|
|
274
|
+
<!-- doc-snippet:skip: illustrative excerpt -- `context` is the step handler's ExecutionContext, shown in scope for readability -->
|
|
275
|
+
|
|
256
276
|
```typescript
|
|
257
277
|
import { scheduler } from '@elevasis/sdk/worker'
|
|
258
278
|
|
|
@@ -272,6 +292,8 @@ Available methods: `createSchedule`, `updateAnchor`, `deleteSchedule`, `getSched
|
|
|
272
292
|
|
|
273
293
|
**Note on other adapters:** Integration adapters (`createResendAdapter`, `createAttioAdapter`, etc.) follow a factory pattern -- bind a credential once, use the instance for all calls:
|
|
274
294
|
|
|
295
|
+
<!-- doc-snippet:skip: illustrative excerpt -- `input` is the step handler's validated input, shown in scope for readability -->
|
|
296
|
+
|
|
275
297
|
```typescript
|
|
276
298
|
import { createResendAdapter } from '@elevasis/sdk/worker'
|
|
277
299
|
|
|
@@ -293,14 +315,17 @@ See `operations/node_modules/@elevasis/sdk/reference/` for the full adapter refe
|
|
|
293
315
|
|
|
294
316
|
Use this pattern in React components and hooks. `apiRequest` automatically attaches the auth token and org context.
|
|
295
317
|
|
|
318
|
+
<!-- doc-snippet:skip: `./api` is a real published @elevasis/ui subpath (verified in ui/node_modules/@elevasis/ui package.json exports); `@/lib/constants/api` is the ui/ project's own path alias. Neither resolves in the doc-snippet check project (external/_template/operations), which is not the ui/ project and does not depend on @elevasis/ui -->
|
|
319
|
+
|
|
296
320
|
```typescript
|
|
297
321
|
// ui/src/features/notifications/hooks/useSendEmailNotification.ts
|
|
298
322
|
import { useMutation } from '@tanstack/react-query'
|
|
299
|
-
import { useApiClient } from '
|
|
323
|
+
import { useApiClient } from '@elevasis/ui/api'
|
|
324
|
+
import { API_URL } from '@/lib/constants/api'
|
|
300
325
|
import type { EmailNotificationInput, EmailNotificationOutput } from '@core/types'
|
|
301
326
|
|
|
302
327
|
export function useSendEmailNotification() {
|
|
303
|
-
const { apiRequest } = useApiClient()
|
|
328
|
+
const { apiRequest } = useApiClient(API_URL)
|
|
304
329
|
|
|
305
330
|
return useMutation({
|
|
306
331
|
mutationFn: async (input: EmailNotificationInput) => {
|
|
@@ -347,6 +372,8 @@ function SendNotificationButton() {
|
|
|
347
372
|
|
|
348
373
|
For async execution (long-running workflows), use `/execute-async` instead:
|
|
349
374
|
|
|
375
|
+
<!-- doc-snippet:skip: continues from the `mutationFn` body above -- the `return` here is inside that function, not shown as standalone code -->
|
|
376
|
+
|
|
350
377
|
```typescript
|
|
351
378
|
return apiRequest<{ executionId: string }>('/execute-async', {
|
|
352
379
|
method: 'POST',
|
|
@@ -365,10 +392,10 @@ From the project root, use the platform CLI for manual invocations, testing, and
|
|
|
365
392
|
|
|
366
393
|
```bash
|
|
367
394
|
# Describe the schema before executing
|
|
368
|
-
pnpm
|
|
395
|
+
pnpm elevasis-sdk describe Elevasis/email-notification
|
|
369
396
|
|
|
370
397
|
# Execute synchronously
|
|
371
|
-
pnpm
|
|
398
|
+
pnpm elevasis-sdk exec Elevasis/email-notification --input '{
|
|
372
399
|
"recipientEmail": "user@example.com",
|
|
373
400
|
"recipientName": "Jane Smith",
|
|
374
401
|
"subject": "Hello",
|
|
@@ -376,16 +403,16 @@ pnpm exec elevasis exec Elevasis/email-notification --input '{
|
|
|
376
403
|
}'
|
|
377
404
|
|
|
378
405
|
# Execute asynchronously (for long-running workflows)
|
|
379
|
-
pnpm
|
|
406
|
+
pnpm elevasis-sdk exec Elevasis/email-notification --async --input '{...}'
|
|
380
407
|
|
|
381
408
|
# View a specific execution
|
|
382
|
-
pnpm
|
|
409
|
+
pnpm elevasis-sdk execution Elevasis/email-notification <executionId>
|
|
383
410
|
```
|
|
384
411
|
|
|
385
|
-
The `--prod` flag targets `https://api.elevasis.io` and goes **
|
|
412
|
+
The `--prod` flag targets `https://api.elevasis.io` and goes **after** the command name -- the SDK CLI parses it as a per-command Commander option, not a global flag (`.claude/rules/cli-cwd-invariant.md`):
|
|
386
413
|
|
|
387
414
|
```bash
|
|
388
|
-
pnpm
|
|
415
|
+
pnpm elevasis-sdk exec Elevasis/email-notification --prod --input '{...}'
|
|
389
416
|
```
|
|
390
417
|
|
|
391
418
|
---
|
|
@@ -407,25 +434,44 @@ operations/src/
|
|
|
407
434
|
index.ts # WorkflowDefinition for 'email-notification'
|
|
408
435
|
```
|
|
409
436
|
|
|
410
|
-
Top-level registry (`operations/src/index.ts`):
|
|
437
|
+
Top-level registry (`operations/src/index.ts`) is assembled with the published `projectDeploymentSpec()` helper, not a hand-rolled object literal -- it binds each workflow's OM Resource descriptor (`resource`, `resourceId`, `type`) and projects topology relationships internally:
|
|
438
|
+
|
|
439
|
+
<!-- doc-snippet:skip: real-file excerpt with relative imports to project-local feature-group barrels, not a standalone compilable file -->
|
|
411
440
|
|
|
412
441
|
```typescript
|
|
413
|
-
import type
|
|
414
|
-
import {
|
|
442
|
+
import { projectDeploymentSpec, type DeploymentSpec } from '@elevasis/sdk'
|
|
443
|
+
import {
|
|
444
|
+
canonicalOrganizationModel,
|
|
445
|
+
getTemplateAgentResourceDescriptor,
|
|
446
|
+
getTemplateWorkflowResourceDescriptor
|
|
447
|
+
} from '@core/config/organization-model'
|
|
415
448
|
import * as example from './example/index.js'
|
|
416
449
|
import * as emailNotification from './email-notification/exports.js'
|
|
417
450
|
|
|
418
|
-
|
|
451
|
+
// Fails loudly if an integration workflow ships without an OM Resource descriptor.
|
|
452
|
+
function getIntegrationResourceDescriptor(resourceId: string): never {
|
|
453
|
+
throw new Error(`No integration OM Resource descriptor for "${resourceId}".`)
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
const deploymentSpec: DeploymentSpec = projectDeploymentSpec({
|
|
419
457
|
version: '0.1.0',
|
|
420
|
-
organizationModel,
|
|
458
|
+
organizationModel: canonicalOrganizationModel,
|
|
421
459
|
workflows: [...example.workflows, ...emailNotification.workflows],
|
|
422
|
-
agents: [...example.agents, ...emailNotification.agents]
|
|
423
|
-
|
|
424
|
-
|
|
460
|
+
agents: [...example.agents, ...emailNotification.agents],
|
|
461
|
+
getWorkflowResourceDescriptor: getTemplateWorkflowResourceDescriptor,
|
|
462
|
+
getAgentResourceDescriptor: getTemplateAgentResourceDescriptor,
|
|
463
|
+
getIntegrationResourceDescriptor
|
|
464
|
+
})
|
|
465
|
+
|
|
466
|
+
export default deploymentSpec
|
|
425
467
|
```
|
|
426
468
|
|
|
469
|
+
Pass `canonicalOrganizationModel` (the resolved `OrganizationModel`), not the `organizationModel` export -- that export wraps the canonical model with a template-local `navigation` projection shaped for the UI shell and does not satisfy `DeploymentSpec['organizationModel']`.
|
|
470
|
+
|
|
427
471
|
Feature group barrel (e.g., `email-notification/exports.ts`):
|
|
428
472
|
|
|
473
|
+
<!-- doc-snippet:skip: real-file excerpt with a relative import to the sibling workflow file, not a standalone compilable file -->
|
|
474
|
+
|
|
429
475
|
```typescript
|
|
430
476
|
import { emailNotification } from './index.js'
|
|
431
477
|
import type { WorkflowDefinition } from '@elevasis/sdk'
|
|
@@ -440,7 +486,7 @@ export const agents: never[] = []
|
|
|
440
486
|
2. Create `operations/src/<feature>/index.ts` with the `WorkflowDefinition`, deriving `config.resourceId` and `config.type` from the descriptor.
|
|
441
487
|
3. Create `operations/src/<feature>/exports.ts` with `workflows` and `agents` arrays.
|
|
442
488
|
4. Import the group barrel in `operations/src/index.ts` and spread into `workflows`/`agents`.
|
|
443
|
-
5. Run `pnpm -C operations check` to validate descriptor/code alignment, then `pnpm -C operations deploy` to publish.
|
|
489
|
+
5. Run `pnpm -C operations check` to validate descriptor/code alignment, then `pnpm -C operations run deploy` to publish.
|
|
444
490
|
|
|
445
491
|
**Note:** Use `.js` extensions in imports even though the source is TypeScript. The TypeScript compiler and esbuild bundler both require this for ESM interoperability.
|
|
446
492
|
|
|
@@ -452,6 +498,8 @@ Package-owned test helpers are the stable way to test custom downstream code. Do
|
|
|
452
498
|
|
|
453
499
|
After the bundled package release lands, use these public subpaths:
|
|
454
500
|
|
|
501
|
+
<!-- doc-snippet:skip: `./test-utils` is a real published @elevasis/ui subpath (verified in ui/node_modules/@elevasis/ui package.json exports); this doc-snippet check project (external/_template/operations) does not depend on @elevasis/ui -->
|
|
502
|
+
|
|
455
503
|
```typescript
|
|
456
504
|
import { makeProject } from '@elevasis/core/test-utils'
|
|
457
505
|
import { renderWithProviders, mockAuthenticatedUser } from '@elevasis/ui/test-utils'
|
|
@@ -462,6 +510,8 @@ import { assertResourceRegistry, mockNotifications, runWorkflow } from '@elevasi
|
|
|
462
510
|
|
|
463
511
|
Use `runWorkflow` for project-owned workflows. This tests the workflow contract, step execution, and parsed output without deploying.
|
|
464
512
|
|
|
513
|
+
<!-- doc-snippet:skip: real-file excerpt with a relative import to the sibling workflow file, not a standalone compilable file -->
|
|
514
|
+
|
|
465
515
|
```typescript
|
|
466
516
|
import { describe, expect, it } from 'vitest'
|
|
467
517
|
import { runWorkflow, mockNotifications } from '@elevasis/sdk/test-utils'
|
|
@@ -470,9 +520,9 @@ import type { EmailNotificationOutput } from '@core/types'
|
|
|
470
520
|
|
|
471
521
|
describe('emailNotification workflow', () => {
|
|
472
522
|
it('runs the notify step with a mocked notification adapter', async () => {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
523
|
+
// NotificationToolMap['create'].result is `void` -- there is nothing to
|
|
524
|
+
// return from a mocked notification, so no override is needed here.
|
|
525
|
+
const notifications = mockNotifications()
|
|
476
526
|
|
|
477
527
|
const result = await runWorkflow<EmailNotificationOutput>(
|
|
478
528
|
emailNotification,
|
|
@@ -495,6 +545,8 @@ describe('emailNotification workflow', () => {
|
|
|
495
545
|
|
|
496
546
|
Use `assertResourceRegistry` for a project-owned `operations/src/index.ts` manifest. Keep assertions generic unless the project intentionally owns a fixed workflow list.
|
|
497
547
|
|
|
548
|
+
<!-- doc-snippet:skip: real-file excerpt with a relative import to the project's own operations/src/index.ts, not a standalone compilable file -->
|
|
549
|
+
|
|
498
550
|
```typescript
|
|
499
551
|
import { describe, expect, it } from 'vitest'
|
|
500
552
|
import { assertResourceRegistry } from '@elevasis/sdk/test-utils'
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Add an OM-Backed System
|
|
3
|
-
description: Add a system through the Organization Model, runtime resource descriptors, UI wiring, and alignment tests.
|
|
4
|
-
---
|
|
1
|
+
---
|
|
2
|
+
title: Add an OM-Backed System
|
|
3
|
+
description: Add a system through the Organization Model, runtime resource descriptors, UI wiring, and alignment tests.
|
|
4
|
+
---
|
|
5
5
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
6
6
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
# Add an OM-Backed System
|
|
10
|
-
|
|
11
|
-
Use this recipe when a project needs a new bounded system with semantic model entries, executable resources, and optional UI presence. The correct shape is model-first: define the Organization Model boundary, then attach workflows, agents, routes, and tests to the same IDs.
|
|
12
|
-
|
|
8
|
+
|
|
9
|
+
# Add an OM-Backed System
|
|
10
|
+
|
|
11
|
+
Use this recipe when a project needs a new bounded system with semantic model entries, executable resources, and optional UI presence. The correct shape is model-first: define the Organization Model boundary, then attach workflows, agents, routes, and tests to the same IDs.
|
|
12
|
+
|
|
13
13
|
Do not create a second identity catalog in operations or UI code. System IDs, resource IDs, and ontology IDs should come from the Organization Model.
|
|
14
|
-
|
|
15
|
-
## 1. Add the System
|
|
16
|
-
|
|
14
|
+
|
|
15
|
+
## 1. Add the System
|
|
16
|
+
|
|
17
17
|
Edit `core/config/organization-model.ts` and add the system to the `systems` override. Use nested `systems` plus dotted IDs for hierarchy.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
|
|
19
|
+
<!-- doc-snippet:skip: illustrative excerpt -- `defineOrganizationModel` is imported from `@elevasis/core/organization-model` elsewhere in the real file, not shown here -->
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
const organizationOverride = defineOrganizationModel({
|
|
23
|
+
systems: {
|
|
24
|
+
operations: {
|
|
25
|
+
id: 'operations',
|
|
26
|
+
order: 10,
|
|
27
|
+
label: 'Operations',
|
|
28
|
+
description: 'Operational work orchestration.',
|
|
29
|
+
kind: 'operational',
|
|
30
|
+
lifecycle: 'active',
|
|
29
31
|
ui: {
|
|
30
32
|
path: '/operations',
|
|
31
33
|
surfaces: []
|
|
@@ -56,6 +58,8 @@ If the local project already uses recursive `subsystems`, treat that as compatib
|
|
|
56
58
|
|
|
57
59
|
Add ontology object types only for stable business objects the system owns. Object types are semantic contracts; they are not every DTO, provider payload, or workflow step shape.
|
|
58
60
|
|
|
61
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
62
|
+
|
|
59
63
|
```ts
|
|
60
64
|
systems: {
|
|
61
65
|
operations: {
|
|
@@ -92,6 +96,8 @@ Use ontology `linkTypes` when the object has durable relationships to other mode
|
|
|
92
96
|
|
|
93
97
|
Add ontology action types for verbs that operators, policies, Command View, or agents should reason about.
|
|
94
98
|
|
|
99
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
100
|
+
|
|
95
101
|
```ts
|
|
96
102
|
systems: {
|
|
97
103
|
operations: {
|
|
@@ -129,6 +135,8 @@ Runtime availability, payload schemas, prioritization, and side effects stay in
|
|
|
129
135
|
|
|
130
136
|
Use `System.ontology.catalogTypes` for pipelines, stages, templates, template steps, status flows, status entries, and small config vocabularies owned by the system.
|
|
131
137
|
|
|
138
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
139
|
+
|
|
132
140
|
```ts
|
|
133
141
|
systems: {
|
|
134
142
|
operations: {
|
|
@@ -166,16 +174,16 @@ systems: {
|
|
|
166
174
|
|
|
167
175
|
Do not use catalog entries as an action registry. If a template step invokes a canonical action, store the action ID in the catalog entry metadata and keep the action contract in `actionTypes`.
|
|
168
176
|
|
|
169
|
-
`System.content
|
|
170
|
-
|
|
171
|
-
## 5. Add Resource Descriptors
|
|
172
|
-
|
|
173
|
-
Resources are governed descriptors for executable workflows, agents, integrations, and scripts. Operations imports them and derives runtime identity from them.
|
|
174
|
-
|
|
175
|
-
```ts
|
|
176
|
-
import { defineResources } from '@elevasis/core/organization-model'
|
|
177
|
-
|
|
178
|
-
export const resourceDescriptors = defineResources({
|
|
177
|
+
`System.content` is **retired**. `SystemEntrySchema` is strict and has no `content` key, so authoring one fails validation — a core test asserts the rejection. Local catalogs and schemas belong in `System.ontology.catalogTypes`; system-local settings belong in `System.config`.
|
|
178
|
+
|
|
179
|
+
## 5. Add Resource Descriptors
|
|
180
|
+
|
|
181
|
+
Resources are governed descriptors for executable workflows, agents, integrations, and scripts. Operations imports them and derives runtime identity from them.
|
|
182
|
+
|
|
183
|
+
```ts
|
|
184
|
+
import { defineResources } from '@elevasis/core/organization-model'
|
|
185
|
+
|
|
186
|
+
export const resourceDescriptors = defineResources({
|
|
179
187
|
approveReviewItem: {
|
|
180
188
|
id: 'approve-review-item-workflow',
|
|
181
189
|
title: 'Approve review item',
|
|
@@ -186,15 +194,15 @@ export const resourceDescriptors = defineResources({
|
|
|
186
194
|
ownerRoleId: 'role-ops-lead',
|
|
187
195
|
status: 'active',
|
|
188
196
|
codeRefs: [
|
|
189
|
-
{
|
|
190
|
-
path: 'operations/src/review/approve-review-item/index.ts',
|
|
191
|
-
role: 'entrypoint',
|
|
192
|
-
symbol: 'approveReviewItemWorkflow'
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
path: 'operations/src/review/approve-review-item/approve-review-item.test.ts',
|
|
196
|
-
role: 'test'
|
|
197
|
-
}
|
|
197
|
+
{
|
|
198
|
+
path: 'operations/src/review/approve-review-item/index.ts',
|
|
199
|
+
role: 'entrypoint',
|
|
200
|
+
symbol: 'approveReviewItemWorkflow'
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
path: 'operations/src/review/approve-review-item/approve-review-item.test.ts',
|
|
204
|
+
role: 'test'
|
|
205
|
+
}
|
|
198
206
|
],
|
|
199
207
|
ontology: {
|
|
200
208
|
actions: ['operations.review:action/review-item.approve'],
|
|
@@ -210,19 +218,21 @@ export const resourceDescriptors = defineResources({
|
|
|
210
218
|
Use descriptor `title` and `description` for executable display metadata.
|
|
211
219
|
|
|
212
220
|
Use nested `resource.ontology` bindings for the semantic actions, objects, catalogs, and events a Resource performs, reads, writes, uses, or emits. `resource.ontology.primaryAction` is the default/selectable ontology action and must be included in `resource.ontology.actions`. Top-level resource `emits` remains readable for bridge-era descriptors, but new descriptors should keep event bindings in `resource.ontology.emits`.
|
|
213
|
-
|
|
214
|
-
Use `codeRefs` as repo-relative breadcrumbs for agents and operators. They point from the governed Resource descriptor to implementation files; they do not define resource identity, System membership, runtime topology, or graph links.
|
|
215
|
-
|
|
216
|
-
## 6. Bind Runtime to the Descriptor
|
|
217
|
-
|
|
221
|
+
|
|
222
|
+
Use `codeRefs` as repo-relative breadcrumbs for agents and operators. They point from the governed Resource descriptor to implementation files; they do not define resource identity, System membership, runtime topology, or graph links.
|
|
223
|
+
|
|
224
|
+
## 6. Bind Runtime to the Descriptor
|
|
225
|
+
|
|
218
226
|
Workflow and agent code owns schemas, handlers, steps, and runtime behavior. It should import the descriptor and derive `resourceId`, `type`, and display metadata from it.
|
|
219
|
-
|
|
220
|
-
|
|
227
|
+
|
|
228
|
+
<!-- doc-snippet:skip: illustrative excerpt -- `resourceDescriptors` names the project's own resource-descriptors export from step 5 (this template's is `templateResourceDescriptors`), and `inputSchema`/`outputSchema`/`steps` are shown unimported for readability -->
|
|
229
|
+
|
|
230
|
+
```ts
|
|
221
231
|
import type { WorkflowDefinition } from '@elevasis/sdk'
|
|
222
232
|
import { organizationModel, resourceDescriptors } from '@core/config/organization-model'
|
|
223
|
-
|
|
224
|
-
export const approveReviewItemWorkflow: WorkflowDefinition = {
|
|
225
|
-
config: {
|
|
233
|
+
|
|
234
|
+
export const approveReviewItemWorkflow: WorkflowDefinition = {
|
|
235
|
+
config: {
|
|
226
236
|
resource: resourceDescriptors.approveReviewItem,
|
|
227
237
|
resourceId: resourceDescriptors.approveReviewItem.id,
|
|
228
238
|
name: resourceDescriptors.approveReviewItem.title,
|
|
@@ -232,113 +242,113 @@ export const approveReviewItemWorkflow: WorkflowDefinition = {
|
|
|
232
242
|
status: 'dev',
|
|
233
243
|
category: 'production'
|
|
234
244
|
},
|
|
235
|
-
contract: {
|
|
236
|
-
inputSchema,
|
|
237
|
-
outputSchema
|
|
238
|
-
},
|
|
239
|
-
steps,
|
|
240
|
-
entryPoint: 'approve'
|
|
241
|
-
}
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
Register runtime resources in the deployment assembly, usually `operations/src/index.ts`:
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
contract: {
|
|
246
|
+
inputSchema,
|
|
247
|
+
outputSchema
|
|
248
|
+
},
|
|
249
|
+
steps,
|
|
250
|
+
entryPoint: 'approve'
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Register runtime resources in the deployment assembly, usually `operations/src/index.ts`:
|
|
255
|
+
|
|
256
|
+
<!-- doc-snippet:skip: illustrative excerpt -- `organizationModel` and `approveReviewItemWorkflow` are shown unimported here for readability -->
|
|
257
|
+
|
|
258
|
+
```ts
|
|
247
259
|
export const org = {
|
|
248
260
|
version: '0.1.0',
|
|
249
261
|
organizationModel,
|
|
250
262
|
workflows: [approveReviewItemWorkflow],
|
|
251
263
|
agents: [],
|
|
252
|
-
relationships: {
|
|
253
|
-
'approve-review-item-workflow': {
|
|
254
|
-
uses: { integrations: ['email'] }
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
```
|
|
259
|
-
|
|
264
|
+
relationships: {
|
|
265
|
+
'approve-review-item-workflow': {
|
|
266
|
+
uses: { integrations: ['email'] }
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
260
272
|
Use `organizationModel.topology.relationships` for durable execution topology. The initial topology relationship kinds are `triggers`, `uses`, and `approval`; use `systemPath` and `resource.ontology` for semantic binding. Existing compatibility graph links can stay readable while old consumers migrate.
|
|
261
|
-
|
|
262
|
-
## 7. Add UI Wiring
|
|
263
|
-
|
|
264
|
-
If the system needs UI, add shell wiring after the OM IDs are stable.
|
|
265
|
-
|
|
266
|
-
1. Create a `SystemModule` manifest with `systemId` equal to the OM System ID.
|
|
267
|
-
2. Register the manifest in the project manifest array.
|
|
268
|
-
3. Add TanStack routes whose paths match the system or sidebar surface path.
|
|
269
|
-
4. Wrap pages in
|
|
273
|
+
|
|
274
|
+
## 7. Add UI Wiring
|
|
275
|
+
|
|
276
|
+
If the system needs UI, add shell wiring after the OM IDs are stable.
|
|
277
|
+
|
|
278
|
+
1. Create a `SystemModule` manifest with `systemId` equal to the OM System ID.
|
|
279
|
+
2. Register the manifest in the project manifest array.
|
|
280
|
+
3. Add TanStack routes whose paths match the system or sidebar surface path.
|
|
281
|
+
4. Wrap pages in `ProtectedRoute`, then nest `AccessGuard` inside it. `SystemGuard` is retired and does not exist in `@elevasis/ui` — an import of it will not compile.
|
|
270
282
|
5. Query OM resources, compiled ontology indexes, compatibility actions, and graph data where possible instead of hardcoding a page-local registry.
|
|
271
|
-
|
|
272
|
-
```tsx
|
|
273
|
-
import type { SystemModule } from '@elevasis/ui/provider'
|
|
274
|
-
import { IconClipboardCheck } from '@tabler/icons-react'
|
|
275
|
-
import { ReviewSidebar } from './sidebar'
|
|
276
|
-
|
|
277
|
-
export const reviewManifest: SystemModule = {
|
|
278
|
-
key: 'operations.review',
|
|
279
|
-
systemId: 'operations.review',
|
|
280
|
-
icon: IconClipboardCheck,
|
|
281
|
-
sidebar: ReviewSidebar
|
|
282
|
-
}
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
```tsx
|
|
286
|
-
import { createFileRoute, Outlet } from '@tanstack/react-router'
|
|
287
|
-
import {
|
|
288
|
-
|
|
289
|
-
export const Route = createFileRoute('/operations/review')({
|
|
290
|
-
component: ReviewLayout
|
|
291
|
-
})
|
|
292
|
-
|
|
293
|
-
function ReviewLayout() {
|
|
294
|
-
return (
|
|
295
|
-
<ProtectedRoute>
|
|
296
|
-
<
|
|
297
|
-
<Outlet />
|
|
298
|
-
</
|
|
299
|
-
</ProtectedRoute>
|
|
300
|
-
)
|
|
301
|
-
}
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
## 8. Test Alignment
|
|
305
|
-
|
|
306
|
-
Add tests for the boundaries you changed:
|
|
307
|
-
|
|
308
|
-
- OM config tests for systems, ontology object/action/catalog records,
|
|
283
|
+
|
|
284
|
+
```tsx
|
|
285
|
+
import type { SystemModule } from '@elevasis/ui/provider'
|
|
286
|
+
import { IconClipboardCheck } from '@tabler/icons-react'
|
|
287
|
+
import { ReviewSidebar } from './sidebar'
|
|
288
|
+
|
|
289
|
+
export const reviewManifest: SystemModule = {
|
|
290
|
+
key: 'operations.review',
|
|
291
|
+
systemId: 'operations.review',
|
|
292
|
+
icon: IconClipboardCheck,
|
|
293
|
+
sidebar: ReviewSidebar
|
|
294
|
+
}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
```tsx
|
|
298
|
+
import { createFileRoute, Outlet } from '@tanstack/react-router'
|
|
299
|
+
import { AccessGuard, ProtectedRoute } from '@elevasis/ui/features/auth'
|
|
300
|
+
|
|
301
|
+
export const Route = createFileRoute('/operations/review')({
|
|
302
|
+
component: ReviewLayout
|
|
303
|
+
})
|
|
304
|
+
|
|
305
|
+
function ReviewLayout() {
|
|
306
|
+
return (
|
|
307
|
+
<ProtectedRoute>
|
|
308
|
+
<AccessGuard accessKey="operations.review">
|
|
309
|
+
<Outlet />
|
|
310
|
+
</AccessGuard>
|
|
311
|
+
</ProtectedRoute>
|
|
312
|
+
)
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
## 8. Test Alignment
|
|
317
|
+
|
|
318
|
+
Add tests for the boundaries you changed:
|
|
319
|
+
|
|
320
|
+
- OM config tests for systems, ontology object/action/catalog records, and resources.
|
|
309
321
|
- Runtime registry tests that deployed workflows import descriptors and keep `resourceId`, `type`, title, description, and `resource.ontology.primaryAction` aligned.
|
|
310
|
-
- UI tests or type checks for route, manifest, and guard wiring.
|
|
322
|
+
- UI tests or type checks for route, manifest, and guard wiring.
|
|
311
323
|
- Graph or knowledge tests when new ontology records, resources, compatibility content nodes, or emitted events should appear in Command View.
|
|
312
|
-
- Scaffold sync when new docs or generated scaffold references are affected.
|
|
313
|
-
|
|
314
|
-
```bash
|
|
315
|
-
pnpm -C core test
|
|
316
|
-
pnpm -C operations check-types
|
|
324
|
+
- Scaffold sync when new docs or generated scaffold references are affected.
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
pnpm -C core test
|
|
328
|
+
pnpm -C operations check-types
|
|
317
329
|
pnpm -C ui check-types
|
|
318
330
|
pnpm knowledge:generate
|
|
319
|
-
pnpm
|
|
320
|
-
pnpm scaffold:verify
|
|
321
|
-
pnpm verify:scaffold-reference
|
|
331
|
+
pnpm check
|
|
322
332
|
```
|
|
323
|
-
|
|
324
|
-
## Finish Checklist
|
|
325
|
-
|
|
326
|
-
- The System exists once in the OM.
|
|
333
|
+
|
|
334
|
+
## Finish Checklist
|
|
335
|
+
|
|
336
|
+
- The System exists once in the OM.
|
|
327
337
|
- Ontology object types represent durable business nouns, not transient data shapes.
|
|
328
338
|
- Ontology action types represent stable business verbs.
|
|
329
339
|
- Ontology catalog types contain local vocabularies such as pipelines, stages, templates, and status flows.
|
|
330
|
-
-
|
|
331
|
-
- Each executable workflow or agent has an OM Resource descriptor with `systemPath`.
|
|
340
|
+
- No new `System.content` is authored — it is retired and the strict System schema rejects it.
|
|
341
|
+
- Each executable workflow or agent has an OM Resource descriptor with `systemPath`.
|
|
332
342
|
- Executable Resources use descriptor `title` / `description`, `resource.ontology.actions`, and `resource.ontology.primaryAction`.
|
|
333
|
-
- `codeRefs` point to useful entrypoints, handlers, schemas, tests, docs, or config.
|
|
334
|
-
- Runtime assembly imports descriptors and derives identity from them.
|
|
335
|
-
- UI routes, manifests, and guards use the same System ID.
|
|
336
|
-
- Tests prove OM, runtime, and UI stay aligned.
|
|
337
|
-
|
|
338
|
-
## Related References
|
|
339
|
-
|
|
340
|
-
- [Add a Resource](add-a-resource.md)
|
|
341
|
-
- [Customize organization-model.ts](customize-organization-model.md)
|
|
342
|
-
- [Gate by System or Admin](gate-by-feature-or-admin.md)
|
|
343
|
-
- [Organization Model](../core/organization-model.mdx)
|
|
344
|
-
- [System Shell and Provider](../ui/feature-shell.mdx)
|
|
343
|
+
- `codeRefs` point to useful entrypoints, handlers, schemas, tests, docs, or config.
|
|
344
|
+
- Runtime assembly imports descriptors and derives identity from them.
|
|
345
|
+
- UI routes, manifests, and guards use the same System ID.
|
|
346
|
+
- Tests prove OM, runtime, and UI stay aligned.
|
|
347
|
+
|
|
348
|
+
## Related References
|
|
349
|
+
|
|
350
|
+
- [Add a Resource](add-a-resource.md)
|
|
351
|
+
- [Customize organization-model.ts](customize-organization-model.md)
|
|
352
|
+
- [Gate by System or Admin](gate-by-feature-or-admin.md)
|
|
353
|
+
- [Organization Model](../core/organization-model.mdx)
|
|
354
|
+
- [System Shell and Provider](../ui/feature-shell.mdx)
|