@elevasis/sdk 1.44.3 → 1.45.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 +991 -650
- package/dist/index.d.ts +1045 -509
- package/dist/index.js +738 -688
- package/dist/node/index.d.ts +105 -97
- package/dist/test-utils/index.d.ts +42 -28
- package/dist/test-utils/index.js +514 -783
- package/dist/worker/index.d.ts +12112 -0
- package/dist/worker/index.js +121 -182
- package/package.json +6 -9
- package/reference/_navigation.md +151 -21
- package/reference/_reference-manifest.json +186 -4
- package/reference/claude-config.md +8 -0
- package/reference/core/index.mdx +3 -3
- package/reference/examples/organization-model.ts +117 -111
- package/reference/index.mdx +4 -4
- 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 +15 -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 +111 -97
- package/reference/scaffold/core/organization-model.mdx +234 -214
- package/reference/scaffold/operations/propagation-pipeline.md +1 -1
- package/reference/scaffold/operations/scaffold-maintenance.md +19 -18
- package/reference/scaffold/operations/workflow-recipes.md +71 -19
- 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 +25 -10
- 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-crm.md +16 -11
- package/reference/scaffold/recipes/extend-lead-gen.md +25 -7
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +160 -118
- package/reference/scaffold/recipes/index.md +2 -2
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +23 -23
- package/reference/scaffold/reference/contracts.md +12 -1
- package/reference/scaffold/reference/glossary.md +3 -3
- package/reference/scaffold/reference/system-interface-capabilities.md +5 -4
- package/reference/scaffold/ui/composition-extensibility.mdx +271 -232
- package/reference/scaffold/ui/feature-flags-and-gating.md +14 -6
- package/reference/scaffold/ui/feature-shell.mdx +279 -62
- package/reference/scaffold/ui/recipes.md +229 -197
- package/reference/sdk/cli-management.mdx +77 -29
- 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 +49 -119
- 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/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/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
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: UI Recipes
|
|
3
|
-
description: Current recipes for adding pages, system-gated routes, system components, theme tokens, Organization Model sidebar entries, and executable resources.
|
|
4
|
-
---
|
|
1
|
+
---
|
|
2
|
+
title: UI Recipes
|
|
3
|
+
description: Current recipes for adding pages, system-gated routes, system components, theme tokens, Organization Model sidebar entries, and executable resources.
|
|
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
|
-
# UI Recipes
|
|
10
|
-
|
|
11
|
-
## 1. Add a Top-Level Page
|
|
12
|
-
|
|
13
|
-
Create `ui/src/routes/my-system.index.tsx`:
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
import { createFileRoute } from '@tanstack/react-router'
|
|
17
|
-
import { ProtectedRoute } from '@/features/auth'
|
|
18
|
-
import { AppShellContentContainer, AppTopbarAdjusterWrapper, PageContainer } from '@elevasis/ui/layout'
|
|
19
|
-
import { MySystemPage } from '@/features/my-system/components/MySystemPage'
|
|
20
|
-
|
|
21
|
-
export const Route = createFileRoute('/my-system/')({
|
|
22
|
-
component: MySystemRouteComponent
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
function MySystemRouteComponent() {
|
|
26
|
-
return (
|
|
27
|
-
<ProtectedRoute>
|
|
28
|
-
<AppTopbarAdjusterWrapper>
|
|
29
|
-
<AppShellContentContainer>
|
|
30
|
-
<PageContainer>
|
|
31
|
-
<MySystemPage />
|
|
32
|
-
</PageContainer>
|
|
33
|
-
</AppShellContentContainer>
|
|
34
|
-
</AppTopbarAdjusterWrapper>
|
|
35
|
-
</ProtectedRoute>
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Add the sidebar entry as a system node in `core/config/organization-model.ts`:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
8
|
+
|
|
9
|
+
# UI Recipes
|
|
10
|
+
|
|
11
|
+
## 1. Add a Top-Level Page
|
|
12
|
+
|
|
13
|
+
Create `ui/src/routes/my-system.index.tsx`:
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { createFileRoute } from '@tanstack/react-router'
|
|
17
|
+
import { ProtectedRoute } from '@/features/auth'
|
|
18
|
+
import { AppShellContentContainer, AppTopbarAdjusterWrapper, PageContainer } from '@elevasis/ui/layout'
|
|
19
|
+
import { MySystemPage } from '@/features/my-system/components/MySystemPage'
|
|
20
|
+
|
|
21
|
+
export const Route = createFileRoute('/my-system/')({
|
|
22
|
+
component: MySystemRouteComponent
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
function MySystemRouteComponent() {
|
|
26
|
+
return (
|
|
27
|
+
<ProtectedRoute>
|
|
28
|
+
<AppTopbarAdjusterWrapper>
|
|
29
|
+
<AppShellContentContainer>
|
|
30
|
+
<PageContainer>
|
|
31
|
+
<MySystemPage />
|
|
32
|
+
</PageContainer>
|
|
33
|
+
</AppShellContentContainer>
|
|
34
|
+
</AppTopbarAdjusterWrapper>
|
|
35
|
+
</ProtectedRoute>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Add the sidebar entry as a system node in `core/config/organization-model.ts`:
|
|
41
|
+
|
|
42
|
+
`systems` is an id-keyed record, not an array, and `order` is required on every entry:
|
|
43
|
+
|
|
44
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
systems: {
|
|
48
|
+
mySystem: {
|
|
49
|
+
id: 'my-system',
|
|
50
|
+
order: 50,
|
|
51
|
+
label: 'My System',
|
|
52
|
+
lifecycle: 'active',
|
|
53
|
+
ui: { path: '/my-system', icon: 'star' }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
TanStack Router derives the path from the filename. Sidebar placement is authored in `navigation.sidebar`, not on the System entry — `enabled`, `path`, `icon`, and `uiPosition` survive as top-level compatibility fields but are not the authoring surface. Use `lifecycle` for enablement and `ui.path` for route matching.
|
|
59
|
+
|
|
59
60
|
## 2. Add an Access-Gated Page
|
|
60
61
|
|
|
61
62
|
Wrap the route with `AccessGuard` and use the same system path as the org model node.
|
|
@@ -70,7 +71,7 @@ function MySystemRouteComponent() {
|
|
|
70
71
|
<AppTopbarAdjusterWrapper>
|
|
71
72
|
<AppShellContentContainer>
|
|
72
73
|
<PageContainer>
|
|
73
|
-
<MySystemPage />
|
|
74
|
+
<MySystemPage />
|
|
74
75
|
</PageContainer>
|
|
75
76
|
</AppShellContentContainer>
|
|
76
77
|
</AppTopbarAdjusterWrapper>
|
|
@@ -81,144 +82,175 @@ function MySystemRouteComponent() {
|
|
|
81
82
|
```
|
|
82
83
|
|
|
83
84
|
Set `lifecycle` to an inactive state in the system node to hide or deny access by default. Use `AccessKeys.platformAdmin` with `AccessGuard` for platform-admin-only pages.
|
|
84
|
-
|
|
85
|
-
## 3. Add a Nested Page
|
|
86
|
-
|
|
87
|
-
Create a layout file for the section and child route files under the same directory.
|
|
88
|
-
|
|
89
|
-
```tsx
|
|
90
|
-
import { createFileRoute, Outlet } from '@tanstack/react-router'
|
|
91
|
-
import { ProtectedRoute } from '@/features/auth'
|
|
92
|
-
|
|
93
|
-
export const Route = createFileRoute('/reporting')({
|
|
94
|
-
component: ReportingLayoutComponent
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
function ReportingLayoutComponent() {
|
|
98
|
-
return (
|
|
99
|
-
<ProtectedRoute>
|
|
100
|
-
<Outlet />
|
|
101
|
-
</ProtectedRoute>
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Add dotted system nodes for the sidebar hierarchy:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
85
|
+
|
|
86
|
+
## 3. Add a Nested Page
|
|
87
|
+
|
|
88
|
+
Create a layout file for the section and child route files under the same directory.
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import { createFileRoute, Outlet } from '@tanstack/react-router'
|
|
92
|
+
import { ProtectedRoute } from '@/features/auth'
|
|
93
|
+
|
|
94
|
+
export const Route = createFileRoute('/reporting')({
|
|
95
|
+
component: ReportingLayoutComponent
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
function ReportingLayoutComponent() {
|
|
99
|
+
return (
|
|
100
|
+
<ProtectedRoute>
|
|
101
|
+
<Outlet />
|
|
102
|
+
</ProtectedRoute>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Add dotted system nodes for the sidebar hierarchy:
|
|
108
|
+
|
|
109
|
+
Nest child Systems under the parent's own `systems` record rather than flattening dotted ids into one map:
|
|
110
|
+
|
|
111
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
systems: {
|
|
115
|
+
reporting: {
|
|
116
|
+
id: 'reporting',
|
|
117
|
+
order: 60,
|
|
118
|
+
label: 'Reporting',
|
|
119
|
+
lifecycle: 'active',
|
|
120
|
+
systems: {
|
|
121
|
+
overview: {
|
|
122
|
+
id: 'reporting.overview',
|
|
123
|
+
order: 10,
|
|
124
|
+
label: 'Overview',
|
|
125
|
+
lifecycle: 'active',
|
|
126
|
+
parentSystemId: 'reporting',
|
|
127
|
+
ui: { path: '/reporting/overview' }
|
|
128
|
+
},
|
|
129
|
+
reports: {
|
|
130
|
+
id: 'reporting.reports',
|
|
131
|
+
order: 20,
|
|
132
|
+
label: 'Reports',
|
|
133
|
+
lifecycle: 'active',
|
|
134
|
+
parentSystemId: 'reporting',
|
|
135
|
+
ui: { path: '/reporting/reports' }
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Containers omit `ui.path`; leaves provide it.
|
|
143
|
+
|
|
144
|
+
## 4. Add a System-Scoped Component
|
|
145
|
+
|
|
146
|
+
Use `ui/src/features/<name>/` when logic is shared across routes or owns local state.
|
|
147
|
+
|
|
148
|
+
```text
|
|
149
|
+
ui/src/features/reporting/
|
|
150
|
+
components/
|
|
151
|
+
ReportingOverviewPage.tsx
|
|
152
|
+
ReportCard.tsx
|
|
153
|
+
hooks/
|
|
154
|
+
useReports.ts
|
|
155
|
+
utils/
|
|
156
|
+
formatReportDate.ts
|
|
157
|
+
types.ts
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Use `@/*` imports for app-local cross-system imports and keep route layout concerns in route files.
|
|
161
|
+
|
|
162
|
+
## 5. Change Theme Tokens
|
|
163
|
+
|
|
164
|
+
Edit `ui/src/config/theme.ts`.
|
|
165
|
+
|
|
166
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
default: {
|
|
170
|
+
label: 'Default',
|
|
171
|
+
description: 'Project brand theme',
|
|
172
|
+
colors: ['#2563eb', '#080808', '#f2f2f5'],
|
|
173
|
+
dark: {
|
|
174
|
+
primary: '#2563eb',
|
|
175
|
+
primaryContrast: '#ffffff',
|
|
176
|
+
background: '#050507',
|
|
177
|
+
surface: '#0f0f14',
|
|
178
|
+
surfaceHover: '#1a1a22',
|
|
179
|
+
text: '#ffffff',
|
|
180
|
+
textDimmed: '#b0b0c0',
|
|
181
|
+
textSubtle: '#888898',
|
|
182
|
+
border: 'rgba(255, 255, 255, 0.07)'
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
All tokens flow into CSS variables. Change `defaultPreset` to alter the initial preset for new users.
|
|
188
|
+
|
|
189
|
+
## 6. Execute a Resource from a Surface
|
|
190
|
+
|
|
191
|
+
Declare the resource descriptor in the Organization Model, then derive runtime metadata from that descriptor:
|
|
192
|
+
|
|
193
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
// core/config/organization-model.ts
|
|
197
|
+
import { defineResources } from '@elevasis/core/organization-model'
|
|
198
|
+
|
|
199
|
+
export const resourceDescriptors = defineResources({
|
|
200
|
+
writeNote: {
|
|
201
|
+
id: 'write-note',
|
|
202
|
+
kind: 'workflow',
|
|
203
|
+
systemPath: 'sales',
|
|
204
|
+
ownerRoleId: 'role-sales-ops',
|
|
205
|
+
status: 'active',
|
|
206
|
+
codeRefs: [
|
|
207
|
+
{
|
|
208
|
+
path: 'operations/src/write-note/index.ts',
|
|
209
|
+
role: 'entrypoint',
|
|
210
|
+
symbol: 'writeNoteWorkflow'
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
|
|
216
|
+
// operations/src/write-note/index.ts
|
|
217
|
+
config: {
|
|
218
|
+
resource: resourceDescriptors.writeNote,
|
|
219
|
+
resourceId: resourceDescriptors.writeNote.id,
|
|
220
|
+
name: 'Write Note',
|
|
221
|
+
type: resourceDescriptors.writeNote.kind,
|
|
222
|
+
version: '1.0.0',
|
|
223
|
+
status: 'prod',
|
|
224
|
+
category: 'production'
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Render the deployed workflow with `RunResourceButton`:
|
|
229
|
+
|
|
230
|
+
```tsx
|
|
231
|
+
import { RunResourceButton } from '@elevasis/ui/components'
|
|
232
|
+
import { writeNoteInputSchema } from '@core/types'
|
|
233
|
+
|
|
234
|
+
export function DealPanel({ dealId }: { dealId: string }) {
|
|
235
|
+
return (
|
|
236
|
+
<RunResourceButton
|
|
237
|
+
resourceId="write-note"
|
|
238
|
+
resourceType="workflow"
|
|
239
|
+
label="Write Note"
|
|
240
|
+
getInput={() => ({
|
|
241
|
+
schema: writeNoteInputSchema,
|
|
242
|
+
defaults: { dealId }
|
|
243
|
+
})}
|
|
244
|
+
/>
|
|
245
|
+
)
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
`resourceDescriptors.writeNote.id` is the single authored ID. `RunResourceButton` still receives the deployed runtime ID. `codeRefs` on the OM `ResourceEntry` point agents and operators at implementation files. `config.resourceId` / `type` / `category` above are runtime deployment-registry fields, not part of the OM `ResourceEntry` schema -- `links[].nodeId` and `category` are runtime filter overlays for Command Center faceted filtering, not OM resource identity. The canonical OM attachment is `resource.systemPath`.
|
|
250
|
+
|
|
251
|
+
## Cross-References
|
|
252
|
+
|
|
253
|
+
- `./feature-flags-and-gating.md` -- system and admin access model
|
|
254
|
+
- `./feature-shell.mdx` -- provider and sidebar derivation
|
|
255
|
+
- `./customization.md` -- system sidebar customization
|
|
256
|
+
- `ui/src/config/README.md` -- theme, background, and loader config
|
|
@@ -416,7 +416,22 @@ JWT-gated routes at the original unprefixed paths remain for the Command Center.
|
|
|
416
416
|
|
|
417
417
|
Full CRUD management for client records. The `client:*` family covers create, read, update, and delete operations at `/api/external/clients`.
|
|
418
418
|
|
|
419
|
-
|
|
419
|
+
**Field definitions** (`ClientProfileSchema` in `@elevasis/core/organization-model`):
|
|
420
|
+
|
|
421
|
+
| Field | Shape |
|
|
422
|
+
| -------------- | ---------------------------------------------------------------------------------------------- |
|
|
423
|
+
| `id` | UUID |
|
|
424
|
+
| `slug` | stable model id |
|
|
425
|
+
| `name` | display label |
|
|
426
|
+
| `status` | `active | onboarding | paused | completed | churned` (default `onboarding`) |
|
|
427
|
+
| `source` | optional lowercase source key |
|
|
428
|
+
| `identity` | `organizationName`, `shortName`, `clientBrief`, `geographicFocus[]`, `timeZone` |
|
|
429
|
+
| `branding` | `voice`, `tagline`, `values[]` |
|
|
430
|
+
| `workspace` | `kind` (`external-project | internal-project | none`), `owner`, `projectId`, `workspacePath` |
|
|
431
|
+
| `links` | `projectIds[]`, `primaryCompanyId`, `primaryContactId`, `sourceDealId` |
|
|
432
|
+
| `prompts` | `defaultContext` |
|
|
433
|
+
| `config` | free-form JSON record |
|
|
434
|
+
| `customValues` | free-form JSON record |
|
|
420
435
|
|
|
421
436
|
**Quick reference:**
|
|
422
437
|
|
|
@@ -506,12 +521,12 @@ must be exposed as a separate explicit command.
|
|
|
506
521
|
|
|
507
522
|
**`session:turn` flags:**
|
|
508
523
|
|
|
509
|
-
| Flag | Description
|
|
510
|
-
| --------------------------- |
|
|
511
|
-
| `-i, --input <json>` | Turn input as JSON
|
|
512
|
-
| `-f, --input-file <path>` | Read turn input from a JSON file
|
|
513
|
-
| `--json` | Output as JSON
|
|
514
|
-
| `--api-url <url>` | Override the API base URL
|
|
524
|
+
| Flag | Description |
|
|
525
|
+
| --------------------------- | -------------------------------- |
|
|
526
|
+
| `-i, --input <json>` | Turn input as JSON |
|
|
527
|
+
| `-f, --input-file <path>` | Read turn input from a JSON file |
|
|
528
|
+
| `--json` | Output as JSON |
|
|
529
|
+
| `--api-url <url>` | Override the API base URL |
|
|
515
530
|
|
|
516
531
|
**`session:messages` flags:**
|
|
517
532
|
|
|
@@ -547,7 +562,7 @@ must be exposed as a separate explicit command.
|
|
|
547
562
|
|
|
548
563
|
## elevasis-sdk queue:\*
|
|
549
564
|
|
|
550
|
-
Manage HITL command queue tasks.
|
|
565
|
+
Manage HITL command queue tasks.
|
|
551
566
|
|
|
552
567
|
**Quick reference:**
|
|
553
568
|
|
|
@@ -583,13 +598,42 @@ elevasis-sdk queue:status --pretty
|
|
|
583
598
|
| `--pretty` | Human-readable output instead of raw JSON |
|
|
584
599
|
| `--api-url <url>` | Override the API base URL |
|
|
585
600
|
|
|
601
|
+
**Shared flags (`queue:get`, `queue:expire`, `queue:status`):**
|
|
602
|
+
|
|
603
|
+
| Flag | Description |
|
|
604
|
+
| ------------------- | ----------------------------------------- |
|
|
605
|
+
| `--pretty` | Human-readable output instead of raw JSON |
|
|
606
|
+
| `--api-url <url>` | Override the API base URL |
|
|
607
|
+
|
|
586
608
|
**Auth:** Calls `/api/external/command-queue/*` with API-key auth.
|
|
587
609
|
|
|
588
610
|
---
|
|
589
611
|
|
|
590
612
|
## elevasis-sdk schedule:\*
|
|
591
613
|
|
|
592
|
-
Manage recurring, relative, and absolute task schedules.
|
|
614
|
+
Manage recurring, relative, and absolute task schedules. `schedule:create` and `schedule:update --schedule-config` accept raw JSON; the CLI does not parse natural-language or shorthand cron flags.
|
|
615
|
+
|
|
616
|
+
**`--schedule-config` JSON shapes:**
|
|
617
|
+
|
|
618
|
+
```json
|
|
619
|
+
// recurring, fixed interval
|
|
620
|
+
{ "type": "recurring", "interval": "weekly", "time": "09:00", "timezone": "America/Los_Angeles", "payload": {} }
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
```json
|
|
624
|
+
// recurring, cron expression
|
|
625
|
+
{ "type": "recurring", "cron": "0 9 * * 1", "timezone": "America/Los_Angeles", "payload": {} }
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
```json
|
|
629
|
+
// relative to an anchor time
|
|
630
|
+
{ "type": "relative", "anchorAt": "2026-06-01T00:00:00Z", "payload": {} }
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
```json
|
|
634
|
+
// absolute, one or more fixed run times
|
|
635
|
+
{ "type": "absolute", "items": [{ "runAt": "2026-06-01T09:00:00Z", "payload": {}, "label": "Launch" }] }
|
|
636
|
+
```
|
|
593
637
|
|
|
594
638
|
**Quick reference:**
|
|
595
639
|
|
|
@@ -623,9 +667,13 @@ At least one field must be provided. `--description` and `--clear-description` a
|
|
|
623
667
|
|
|
624
668
|
## elevasis-sdk om:\*
|
|
625
669
|
|
|
626
|
-
Knowledge map inspection. The `om:*` (Organization Model) commands expose knowledge graph traversal via the CLI.
|
|
670
|
+
Knowledge map inspection. The `om:*` (Organization Model) commands expose knowledge graph traversal via the CLI. `om:*` and `knowledge:*` are aliases of the same subcommands.
|
|
671
|
+
|
|
672
|
+
**Path axes for `knowledge:ls` / `om:ls`:** `/by-system/<id>`, `/by-ontology/<ontologyId>`, `/by-kind/<kind>`, `/by-owner/<ownerId>`, `/by-domain/<domain>` (enumerate all items in a domain: `clients`, `roles`, `policies`, `customers`, `offerings`, `goals`), `/by-item/<domain>/<itemId>` (single domain-item profile), `/graph/<nodeId>/governs`, `/graph/<nodeId>/governed-by`, `/<nodeId>` (single node), `/all-systems`, `/all-resources`, `/all-roles`.
|
|
627
673
|
|
|
628
|
-
|
|
674
|
+
- `knowledge:ls <path>` -- list nodes/edges for the mount; default output is an id + summary table, `--json` returns `{ path, mount, args, results }`.
|
|
675
|
+
- `knowledge:cat <id>` -- render a node's `body` MDX to stdout; `--json` returns the full node object (body, links, owners, timestamps).
|
|
676
|
+
- `knowledge:graph <id>` -- show outgoing + incoming edges grouped by edge kind.
|
|
629
677
|
|
|
630
678
|
In tenant projects, SDK read commands load `core/config/organization-model.ts` through the SDK's layout-aware TypeScript loader. The temporary bundle and dependency resolution are anchored at the package root that owns SDK dependencies, so hoisted pnpm workspaces resolve `esbuild` and `@elevasis/core` correctly. Missing org-model files still return the default model; malformed files or files with no usable export emit diagnostics. `knowledge:generate` / `om:generate` is the exception because it reads MDX and codegen inputs directly.
|
|
631
679
|
|
|
@@ -761,25 +809,25 @@ The same coverage gate runs inside `elevasis-sdk check` when the coverage regist
|
|
|
761
809
|
|
|
762
810
|
Current status of all SDK CLI domains. Domains marked `deferred` have no CLI commands yet.
|
|
763
811
|
|
|
764
|
-
| Domain | CLI surface
|
|
765
|
-
| ----------- |
|
|
766
|
-
| platform | top-level SDK commands
|
|
767
|
-
| project | `project:*`
|
|
768
|
-
| knowledge | `knowledge:*`
|
|
769
|
-
| creds | `creds *` nested Commander group
|
|
770
|
-
| ui | `ui:*`
|
|
771
|
-
| request | `request:submit`, `request:list`, `request:get`
|
|
772
|
-
| error | `error resolve`, `error resolve-execution`
|
|
773
|
-
| acquisition | `acquisition:list:*`, `acquisition:deal:*`
|
|
774
|
-
| client | `client:*`
|
|
775
|
-
| agent | `agent:list`, `agent:get`
|
|
812
|
+
| Domain | CLI surface | API surface | Status |
|
|
813
|
+
| ----------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ----------------------------- |
|
|
814
|
+
| platform | top-level SDK commands | mixed platform APIs | implemented |
|
|
815
|
+
| project | `project:*` | `apps/api/src/projects/` | implemented |
|
|
816
|
+
| knowledge | `knowledge:*` | file/generated knowledge data | implemented |
|
|
817
|
+
| creds | `creds *` nested Commander group | credentials API | implemented |
|
|
818
|
+
| ui | `ui:*` | local project file edits | implemented |
|
|
819
|
+
| request | `request:submit`, `request:list`, `request:get` | requests API | implemented read/write scope |
|
|
820
|
+
| error | `error resolve`, `error resolve-execution` | execution error APIs | partial |
|
|
821
|
+
| acquisition | `acquisition:list:*`, `acquisition:deal:*` | `/api/external/acquisition/lists*`, `/api/external/deals*` | implemented read-only scope |
|
|
822
|
+
| client | `client:*` | `/api/external/clients` | implemented read/write scope |
|
|
823
|
+
| agent | `agent:list`, `agent:get` | `/api/external/agents*` | implemented read-only scope |
|
|
776
824
|
| session | `session:create`, `session:turn`, `session:messages`, `session:list`, `session:get`, `session:end` | `/api/external/sessions*` | implemented multi-turn scope |
|
|
777
|
-
| queue | `queue:list`, `queue:get`, `queue:select`, `queue:expire`, `queue:status`
|
|
778
|
-
| schedule | `schedule:list`, `schedule:get`, `schedule:create`, `schedule:update`
|
|
779
|
-
| skill | `skill:scaffold`, `skill:check-coverage`
|
|
780
|
-
| content | none
|
|
781
|
-
| seo | none
|
|
782
|
-
| monitoring | none
|
|
825
|
+
| queue | `queue:list`, `queue:get`, `queue:select`, `queue:expire`, `queue:status` | `/api/external/command-queue*` | implemented |
|
|
826
|
+
| schedule | `schedule:list`, `schedule:get`, `schedule:create`, `schedule:update` | `/api/external/task-scheduler/schedules*` | implemented |
|
|
827
|
+
| skill | `skill:scaffold`, `skill:check-coverage` | local CLI catalog and `.claude/registries/skill-coverage.json` | implemented developer tooling |
|
|
828
|
+
| content | none | not scoped here | deferred |
|
|
829
|
+
| seo | none | not scoped here | deferred |
|
|
830
|
+
| monitoring | none | not scoped here | deferred |
|
|
783
831
|
|
|
784
832
|
### Promotion Criteria
|
|
785
833
|
|
|
@@ -75,6 +75,8 @@ The Elevasis SDK uses [Zod](https://zod.dev) for schema definition. Zod is a Typ
|
|
|
75
75
|
|
|
76
76
|
`z.infer` creates a TypeScript type from a schema so the type system can check your code. You define the schema once and get both runtime validation and compile-time checking. Without it, you would have to define the same shape twice -- once as a Zod schema and once as a TypeScript type.
|
|
77
77
|
|
|
78
|
+
{/* doc-snippet:skip: illustrative excerpt -- omits `import { z } from 'zod'` since the point is z.infer's behavior, not a runnable module */}
|
|
79
|
+
|
|
78
80
|
```ts
|
|
79
81
|
const myInput = z.object({ name: z.string(), age: z.number() });
|
|
80
82
|
type MyInput = z.infer<typeof myInput>;
|