@elevasis/sdk 1.10.0 → 1.12.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.
Files changed (40) hide show
  1. package/dist/cli.cjs +52 -149
  2. package/dist/index.d.ts +468 -198
  3. package/dist/index.js +225 -147
  4. package/dist/test-utils/index.d.ts +272 -99
  5. package/dist/test-utils/index.js +4756 -125
  6. package/dist/types/worker/adapters/llm.d.ts +1 -1
  7. package/dist/worker/index.js +14 -6
  8. package/package.json +2 -2
  9. package/reference/claude-config/rules/agent-start-here.md +14 -14
  10. package/reference/claude-config/skills/configure/SKILL.md +3 -3
  11. package/reference/claude-config/skills/setup/SKILL.md +6 -6
  12. package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -0
  13. package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +101 -0
  14. package/reference/cli.mdx +57 -0
  15. package/reference/deployment/provided-features.mdx +40 -267
  16. package/reference/examples/organization-model.ts +99 -564
  17. package/reference/packages/core/src/organization-model/README.md +102 -97
  18. package/reference/resources/types.mdx +72 -163
  19. package/reference/scaffold/core/organization-graph.mdx +92 -272
  20. package/reference/scaffold/core/organization-model.mdx +155 -320
  21. package/reference/scaffold/index.mdx +3 -0
  22. package/reference/scaffold/operations/propagation-pipeline.md +4 -1
  23. package/reference/scaffold/operations/scaffold-maintenance.md +3 -0
  24. package/reference/scaffold/operations/workflow-recipes.md +13 -10
  25. package/reference/scaffold/recipes/add-a-feature.md +105 -158
  26. package/reference/scaffold/recipes/add-a-resource.md +88 -158
  27. package/reference/scaffold/recipes/customize-organization-model.md +144 -400
  28. package/reference/scaffold/recipes/extend-a-base-entity.md +11 -8
  29. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +117 -158
  30. package/reference/scaffold/recipes/index.md +3 -0
  31. package/reference/scaffold/reference/contracts.md +107 -435
  32. package/reference/scaffold/reference/feature-registry.md +11 -8
  33. package/reference/scaffold/reference/glossary.md +74 -105
  34. package/reference/scaffold/ui/composition-extensibility.mdx +3 -0
  35. package/reference/scaffold/ui/customization.md +3 -0
  36. package/reference/scaffold/ui/feature-flags-and-gating.md +29 -231
  37. package/reference/scaffold/ui/feature-shell.mdx +53 -219
  38. package/reference/scaffold/ui/recipes.md +65 -397
  39. package/reference/claude-config/logs/pre-edit-vibe-gate.log +0 -40
  40. package/reference/claude-config/logs/scaffold-registry-reminder.log +0 -38
@@ -1,97 +1,102 @@
1
- # Organization Model
2
-
3
- The organization model is the published semantic contract that maps a tenant's product shape to domain surfaces, features, and navigation.
4
-
5
- Use this module when you need to resolve or validate an organization's contract before wiring UI shells, routing, or domain-specific capability checks.
6
-
7
- ## Published Exports
8
-
9
- The public entry point exposes:
10
-
11
- - `OrganizationModelSchema`
12
- - `DEFAULT_ORGANIZATION_MODEL`
13
- - `defineOrganizationModel`
14
- - `resolveOrganizationModel`
15
- - `PROJECTS_FEATURE_ID`
16
- - `PROJECTS_INDEX_SURFACE_ID`
17
- - `PROJECTS_VIEW_CAPABILITY_ID`
18
- - `OrganizationModel` and the supporting domain types
19
-
20
- Import it from the published subpath:
21
-
22
- ```ts
23
- import {
24
- DEFAULT_ORGANIZATION_MODEL,
25
- PROJECTS_VIEW_CAPABILITY_ID,
26
- defineOrganizationModel,
27
- PROJECTS_FEATURE_ID,
28
- PROJECTS_INDEX_SURFACE_ID,
29
- resolveOrganizationModel,
30
- type OrganizationModel
31
- } from '@elevasis/core/organization-model'
32
- ```
33
-
34
- ## Contract Shape
35
-
36
- The model is versioned and currently validates against `version: 1`.
37
-
38
- Top-level fields:
39
-
40
- - `version` - schema version for the resolved contract.
41
- - `branding` - organization branding defaults and overrides.
42
- - `features` - unified feature entries that combine enablement, labels, and semantic references.
43
- - `navigation` - navigation model for the product shell.
44
- - `sales` - sales pipeline and relationship management.
45
- - `prospecting` - lists, companies, and contacts.
46
- - `projects` - projects, milestones, and tasks.
47
- - `identity`, `customers`, `offerings`, `roles`, `goals` - reality domains (2026-04 expansion).
48
- - `statuses` - unified status registry across delivery / hitl / execution / request / schedule.
49
- - `operations` - catalog of stateful runtime entities (HITL queue, sessions, executions, notifications, schedules).
50
- - `resourceMappings` - cross-surface resource mappings (includes techStack subsection).
51
-
52
- ## Default Feature Set
53
-
54
- The default model includes eight feature IDs:
55
-
56
- - `sales` - deal pipeline and relationship management.
57
- - `prospecting` - lists, companies, and contacts.
58
- - `projects` - projects, milestones, and tasks.
59
- - `operations` - organization graph and command-view surfaces.
60
- - `monitoring` - monitoring surfaces.
61
- - `settings` - organization settings.
62
- - `seo` - SEO surfaces (disabled by default).
63
- - `configure` - `/configure` skill entry point (external projects).
64
-
65
- ## Project Bridge Constants
66
-
67
- The organization-model surface exports a narrow set of canonical IDs for the shared Projects bridge:
68
-
69
- - `PROJECTS_FEATURE_ID` -> `projects`
70
- - `PROJECTS_INDEX_SURFACE_ID` -> `projects.index`
71
- - `PROJECTS_VIEW_CAPABILITY_ID` -> `delivery.projects.view`
72
-
73
- Use these when wiring shared UI manifests, template adapters, or other consumers that need to agree on the same Projects contract without repeating raw literals.
74
-
75
- ## Resolution Semantics
76
-
77
- - `defineOrganizationModel()` is a typed helper. It does not validate or merge anything by itself.
78
- - `resolveOrganizationModel()` deep-merges a partial override into the default model, then validates the result with `OrganizationModelSchema`.
79
- - Plain objects merge recursively.
80
- - Arrays replace the default value instead of merging element-by-element.
81
- - If `navigation.surfaces` is replaced without also supplying `navigation.groups`, inherited default groups are dropped when they no longer point at declared surfaces.
82
- - Missing fields fall back to `DEFAULT_ORGANIZATION_MODEL`.
83
-
84
- ## Referential Integrity
85
-
86
- - `navigation.defaultSurfaceId` must point at a declared navigation surface.
87
- - Every navigation group `surfaceId` must resolve to a declared surface.
88
- - Feature, surface, and resource-mapping IDs must resolve to declared counterparts; dangling references fail validation.
89
- - Feature-to-surface and feature/surface-to-resource links are validated in both directions so one-sided declarations fail during resolution.
90
- - Feature-bearing surfaces validate `featureId` against the canonical feature set.
91
-
92
- ## Practical Guidance
93
-
94
- - Use `resolveOrganizationModel()` when you need a runtime-safe model for rendering or policy checks.
95
- - Use `defineOrganizationModel()` when authoring a static partial model in source.
96
- - Treat feature IDs such as `sales`, `prospecting`, and `projects` as the canonical shell-level contract in new organization-model authoring.
97
- - Keep feature IDs, surface IDs, and capability IDs stable because downstream UI and policy code depend on them.
1
+ # Organization Model
2
+
3
+ The organization model is the published semantic contract that maps a tenant's product shape to flat feature hierarchy, shell navigation, business semantics, and graph bindings.
4
+
5
+ Use this module when resolving or validating an organization's contract before wiring UI shells, routing, feature gates, or domain-specific capability checks.
6
+
7
+ ## Published Exports
8
+
9
+ The public entry point exposes:
10
+
11
+ - `OrganizationModelSchema`
12
+ - `FeatureSchema`
13
+ - `DEFAULT_ORGANIZATION_MODEL`
14
+ - `defineOrganizationModel`
15
+ - `resolveOrganizationModel`
16
+ - `createFoundationOrganizationModel`
17
+ - node ID and feature helper types
18
+ - `OrganizationModel` and supporting domain types
19
+
20
+ Import it from the published subpath:
21
+
22
+ ```ts
23
+ import {
24
+ DEFAULT_ORGANIZATION_MODEL,
25
+ createFoundationOrganizationModel,
26
+ defineOrganizationModel,
27
+ resolveOrganizationModel,
28
+ type OrganizationModel
29
+ } from '@elevasis/core/organization-model'
30
+ ```
31
+
32
+ ## Contract Shape
33
+
34
+ The model is versioned and currently validates against `version: 1`.
35
+
36
+ Top-level fields:
37
+
38
+ - `version`
39
+ - `branding`
40
+ - `features`
41
+ - `navigation`
42
+ - `sales`
43
+ - `prospecting`
44
+ - `projects`
45
+ - `identity`
46
+ - `customers`
47
+ - `offerings`
48
+ - `roles`
49
+ - `goals`
50
+ - `statuses`
51
+ - `operations`
52
+
53
+ Resources bind to the graph from deployment metadata through `links` and `category`.
54
+
55
+ ## Feature Set
56
+
57
+ Feature hierarchy is authored as a flat array. Dotted IDs define parent/child relationships:
58
+
59
+ ```ts
60
+ features: [
61
+ { id: 'dashboard', label: 'Dashboard', enabled: true, path: '/', uiPosition: 'sidebar-primary' },
62
+ { id: 'sales', label: 'Sales', enabled: true, uiPosition: 'sidebar-primary' },
63
+ { id: 'sales.crm', label: 'CRM', enabled: true, path: '/crm' },
64
+ { id: 'operations.resources', label: 'Resources', enabled: true, path: '/operations/resources' }
65
+ ]
66
+ ```
67
+
68
+ Containers omit `path`; leaves provide `path`. `uiPosition`, `requiresAdmin`, and `devOnly` inherit from ancestors.
69
+ Development-only features remain in the contract with `enabled: true` and `devOnly: true`; shell consumers hide them and guard their paths outside development mode.
70
+
71
+ ## Graph IDs
72
+
73
+ Cross-collection links use kind-prefixed IDs:
74
+
75
+ - `feature:sales.crm`
76
+ - `integration:instantly`
77
+ - `resource:lead-import`
78
+ - `capability:operations.queue.review`
79
+
80
+ ## Resolution Semantics
81
+
82
+ - `defineOrganizationModel()` is a typed helper.
83
+ - `resolveOrganizationModel()` deep-merges a partial override into the default model, then validates it.
84
+ - `createFoundationOrganizationModel()` resolves the canonical model and returns UI-facing helper outputs.
85
+ - Plain objects merge recursively.
86
+ - Arrays replace the default value.
87
+ - Missing fields fall back to `DEFAULT_ORGANIZATION_MODEL`.
88
+
89
+ ## Referential Integrity
90
+
91
+ - Feature IDs must be unique.
92
+ - Child feature IDs require ancestor feature nodes.
93
+ - Container features omit `path`.
94
+ - Leaf features provide `path`.
95
+ - Resource links are validated against graph node IDs during registry registration.
96
+
97
+ ## Practical Guidance
98
+
99
+ - Use `resolveOrganizationModel()` when you need a runtime-safe model.
100
+ - Use `defineOrganizationModel()` when authoring static overrides.
101
+ - Keep feature IDs stable because shell routing, gating, breadcrumbs, and docs depend on them.
102
+ - Put semantic resource relationships on resource metadata, not on feature nodes.
@@ -1,23 +1,19 @@
1
1
  ---
2
2
  title: SDK Types
3
- description: Complete type reference for @elevasis/sdk -- package exports, re-exported platform types, ElevasConfig interface, StepHandler context, and runtime values
3
+ description: Type reference for @elevasis/sdk package exports, resource metadata, platform types, ElevasConfig, StepHandler context, and runtime values.
4
4
  loadWhen: "Looking up type signatures or SDK exports"
5
5
  ---
6
6
 
7
- `@elevasis/sdk` is published to the public npm registry. It bundles all platform types from `@repo/core` into a single self-contained type declaration file with zero internal monorepo references. External developers install the package and get full TypeScript support without any monorepo tooling.
7
+ `@elevasis/sdk` bundles platform types into a self-contained package for external projects.
8
8
 
9
9
  ```bash
10
10
  pnpm add @elevasis/sdk zod
11
11
  ```
12
12
 
13
- Zod is a peer dependency and must be installed separately.
14
-
15
- ---
13
+ Zod is a peer dependency.
16
14
 
17
15
  ## Package Exports
18
16
 
19
- The package exposes two subpaths:
20
-
21
17
  ```json
22
18
  {
23
19
  "exports": {
@@ -27,181 +23,94 @@ The package exposes two subpaths:
27
23
  }
28
24
  ```
29
25
 
30
- - `@elevasis/sdk` -- all types plus runtime values (`StepType`, `ExecutionError`, `ToolingError`)
31
- - `@elevasis/sdk/worker` -- worker runtime module (`startWorker`, `platform`, `PlatformToolError`)
32
-
33
- ---
34
-
35
- ## Type Re-exports
36
-
37
- All types come from the platform core. The SDK re-exports them grouped by source domain:
38
-
39
- ### Platform Types
40
-
41
- | Type | Description |
42
- | ----------------------- | ----------------------------------------------- |
43
- | `ResourceDefinition` | Base interface for all resource types |
44
- | `ResourceType` | Enum: `'workflow' | 'agent'` |
45
- | `ResourceStatus` | Enum: `'dev' | 'prod'` |
46
- | `ResourceDomain` | Domain classification for a resource |
47
- | `DomainDefinition` | Structure for grouping resources by domain |
48
- | `DeploymentSpec` | Top-level export shape: `{ workflows, agents }` |
49
- | `TriggerDefinition` | Base for trigger configuration |
50
- | `IntegrationDefinition` | Integration configuration structure |
51
- | `WebhookProviderType` | Supported webhook providers |
52
- | `WebhookTriggerConfig` | Webhook trigger configuration |
53
- | `ScheduleTriggerConfig` | Cron/schedule trigger configuration |
54
- | `EventTriggerConfig` | Internal event trigger configuration |
55
- | `TriggerConfig` | Union of all trigger config types |
56
-
57
- ### Execution Types
58
-
59
- | Type | Description |
60
- | ---------------------- | -------------------------------------------------------------------------------- |
61
- | `WorkflowDefinition` | Complete workflow definition including config, contract, steps, entryPoint |
62
- | `WorkflowStep` | Individual step definition with type, handler, and next routing |
63
- | `WorkflowConfig` | Metadata block: name, description, status |
64
- | `StepHandler` | Function type: `(input: unknown, context: StepContext) => Promise<unknown>` |
65
- | `NextConfig` | Union of `LinearNext` and `ConditionalNext` |
66
- | `LinearNext` | `{ type: 'linear', target: string }` -- fixed next step |
67
- | `ConditionalNext` | `{ type: 'conditional', routes: Route[], default: string }` -- branching routing |
68
- | `StepType` | Runtime enum: `LINEAR | CONDITIONAL` (also a runtime value -- see below) |
69
- | `AgentDefinition` | Complete agent definition including config, agentConfig, tools |
70
- | `AgentConfig` | Agent metadata: name, description, status |
71
- | `AgentConstraints` | Execution limits for agents |
72
- | `Tool` | Tool definition for agent use |
73
- | `ToolExecutionOptions` | Options passed when a tool executes |
74
- | `ToolingErrorType` | Enum of tool error categories |
75
- | `ToolingError` | Error class for tool execution failures (also a runtime value -- see below) |
76
- | `ExecutionError` | Error class for execution-level failures (also a runtime value -- see below) |
77
- | `Contract` | Input/output Zod schema pair |
78
- | `ExecutionContext` | Runtime context passed to step handlers |
79
- | `ExecutionMetadata` | Metadata about a running execution |
80
- | `LLMModel` | Model identifier: provider + model name |
81
- | `ModelConfig` | Full model configuration including temperature and token limits |
82
- | `ExecutionInterface` | Interface for triggering and inspecting executions |
83
-
84
- ### Form and Metrics Types
85
-
86
- | Type | Description |
87
- | ----------------------- | ------------------------------------------ |
88
- | `FormField` | Individual form field definition |
89
- | `FormSchema` | Collection of form fields |
90
- | `FormFieldType` | Enum of supported field types |
91
- | `ResourceMetricsConfig` | Observability configuration for a resource |
26
+ - `@elevasis/sdk` -- resource, workflow, agent, trigger, deployment, and execution types plus runtime errors.
27
+ - `@elevasis/sdk/worker` -- worker runtime module, platform adapters, and worker helpers.
28
+
29
+ ## Platform Types
30
+
31
+ | Type | Description |
32
+ | --- | --- |
33
+ | `ResourceDefinition` | Base interface for resource definitions |
34
+ | `ResourceType` | Resource kind such as `workflow`, `agent`, `trigger`, `integration`, `external`, or `human_checkpoint` |
35
+ | `ResourceStatus` | Resource lifecycle status such as `dev` or `prod` |
36
+ | `ResourceLink` | Graph link `{ nodeId, kind }` binding a resource to an Organization Model node |
37
+ | `ResourceCategory` | Operational category: `production`, `diagnostic`, `internal`, or `testing` |
38
+ | `DeploymentSpec` | Top-level export shape: `{ workflows, agents, triggers, integrations, humanCheckpoints, externalResources, relationships }` |
39
+ | `TriggerDefinition` | Base for trigger configuration |
40
+ | `IntegrationDefinition` | Integration configuration structure |
41
+ | `WebhookProviderType` | Supported webhook providers |
42
+ | `WebhookTriggerConfig` | Webhook trigger configuration |
43
+ | `ScheduleTriggerConfig` | Cron/schedule trigger configuration |
44
+ | `EventTriggerConfig` | Internal event trigger configuration |
45
+ | `TriggerConfig` | Union of all trigger config types |
46
+
47
+ Resource metadata uses graph links:
48
+
49
+ ```ts
50
+ config: {
51
+ resourceId: 'lead-import',
52
+ name: 'Lead Import',
53
+ type: 'workflow',
54
+ version: '1.0.0',
55
+ status: 'prod',
56
+ links: [{ nodeId: 'feature:sales.lead-gen', kind: 'operates-on' }],
57
+ category: 'production'
58
+ }
59
+ ```
92
60
 
93
- ---
61
+ ## Execution Types
62
+
63
+ | Type | Description |
64
+ | --- | --- |
65
+ | `WorkflowDefinition` | Complete workflow definition including config, contract, steps, and entryPoint |
66
+ | `WorkflowStep` | Individual step definition with type, handler, and next routing |
67
+ | `WorkflowConfig` | Metadata block: name, description, status, links, category |
68
+ | `StepHandler` | Function type: `(input: unknown, context: StepContext) => Promise<unknown>` |
69
+ | `NextConfig` | Union of `LinearNext` and `ConditionalNext` |
70
+ | `LinearNext` | Fixed next step routing |
71
+ | `ConditionalNext` | Branching step routing |
72
+ | `StepType` | Runtime enum for step routing |
73
+ | `AgentDefinition` | Complete agent definition including config, agentConfig, and tools |
74
+ | `ExecutionContext` | Runtime context passed to step handlers |
75
+ | `ExecutionMetadata` | Metadata about a running execution |
76
+ | `ExecutionInterface` | Interface for triggering and inspecting executions |
94
77
 
95
78
  ## ElevasConfig
96
79
 
97
- `ElevasConfig` is the only type defined by the SDK itself (not re-exported from the platform). It configures SDK behavior via `elevasis.config.ts` in your project root.
98
-
99
- ```typescript
80
+ ```ts
100
81
  export interface ElevasConfig {
101
82
  defaultStatus?: ResourceStatus
102
83
  dev?: { port?: number }
103
84
  }
104
85
  ```
105
86
 
106
- | Field | Type | Default | Description |
107
- | --------------- | ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
108
- | `defaultStatus` | `'dev' | 'prod'` | `'prod'` | Default status applied to all resources that do not set their own `config.status`. Set to `'dev'` to keep resources inactive while building. |
109
- | `dev.port` | `number` | `3001` | Local port for the development worker process. Change this if port 3001 conflicts with another service. |
110
-
111
- Usage:
112
-
113
- ```typescript
114
- import type { ElevasConfig } from '@elevasis/sdk';
115
-
116
- const config: ElevasConfig = {
117
- defaultStatus: 'dev',
118
- dev: { port: 3002 },
119
- };
120
-
121
- export default config;
122
- ```
123
-
124
- ---
87
+ | Field | Type | Default | Description |
88
+ | --- | --- | --- | --- |
89
+ | `defaultStatus` | `'dev' | 'prod'` | `'prod'` | Default status applied when resources do not set `config.status` |
90
+ | `dev.port` | `number` | `3001` | Local worker development port |
125
91
 
126
92
  ## StepHandler Context
127
93
 
128
- `StepHandler` accepts two parameters: `input` (validated by your contract schema) and `context` (runtime metadata). The `context` parameter is not optional in the type definition, but TypeScript allows you to omit it in your handler function -- writing `async (input) => { ... }` works without error.
129
-
130
- ```typescript
131
- import type { StepHandler, ExecutionContext } from '@elevasis/sdk';
94
+ ```ts
95
+ import type { StepHandler, ExecutionContext } from '@elevasis/sdk'
132
96
 
133
97
  const handler: StepHandler = async (input, context: ExecutionContext) => {
134
- const { executionId, organizationId, resourceId, logger, store } = context;
135
-
136
- logger.info('Processing', { executionId, resourceId });
137
-
138
- await store.set('checkpoint', JSON.stringify({ step: 'started' }));
139
-
140
- return { done: true };
141
- };
142
- ```
98
+ context.logger.info('Processing', {
99
+ executionId: context.executionId,
100
+ resourceId: context.resourceId
101
+ })
143
102
 
144
- ### ExecutionContext Fields
145
-
146
- | Field | Type | Description |
147
- | ---------------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
148
- | `executionId` | `string` | Unique identifier for this execution run |
149
- | `organizationId` | `string` | Your organization identifier |
150
- | `resourceId` | `string` | Identifier of the executing workflow or agent |
151
- | `logger` | `Logger` | Structured logger -- messages appear in the Elevasis dashboard under the execution |
152
- | `store` | `Store` | Key-value store scoped to the current execution. Useful for passing data between steps or checkpointing progress. |
153
-
154
- ---
155
-
156
- ## Runtime Values
157
-
158
- Three runtime values are exported from `@elevasis/sdk` as JavaScript values (not just types). They are defined directly in the SDK package to avoid pulling in the full platform execution engine.
159
-
160
- ### StepType
161
-
162
- An enum used to configure step routing in multi-step workflows.
163
-
164
- ```typescript
165
- import { StepType } from '@elevasis/sdk';
166
-
167
- // StepType.LINEAR -- fixed next step via { target: 'stepName' }
168
- // StepType.CONDITIONAL -- branching via { type: 'conditional', routes: [...], default: 'stepName' }
169
- ```
170
-
171
- ### ToolingError
172
-
173
- Thrown by platform tool calls when a tool fails. Use this class to distinguish tool failures from general errors in `try/catch` blocks.
174
-
175
- ```typescript
176
- import { ToolingError } from '@elevasis/sdk';
177
-
178
- try {
179
- const result = await platform.call({ ... });
180
- } catch (err) {
181
- if (err instanceof ToolingError) {
182
- // tool-specific failure -- check err.type for category
183
- console.error('Tool failed:', err.type, err.message);
184
- } else {
185
- throw err; // re-throw unexpected errors
186
- }
103
+ await context.store.set('checkpoint', JSON.stringify({ step: 'started' }))
104
+ return { done: true }
187
105
  }
188
106
  ```
189
107
 
190
- ### ExecutionError
191
-
192
- Represents a failure at the execution level (distinct from a tool-level failure). Throw this from a step handler to signal that the execution should be marked as failed with a structured error message.
108
+ ## Runtime Values
193
109
 
194
- ```typescript
195
- import { ExecutionError } from '@elevasis/sdk';
110
+ Runtime exports include:
196
111
 
197
- const handler = async (input) => {
198
- if (!input.userId) {
199
- throw new ExecutionError('userId is required', { code: 'MISSING_INPUT' });
200
- }
201
- return { result: 'ok' };
202
- };
203
- ```
204
-
205
- ---
112
+ - `StepType`
113
+ - `ToolingError`
114
+ - `ExecutionError`
206
115
 
207
- **Last Updated:** 2026-02-25
116
+ Use `ToolingError` for platform adapter failures and `ExecutionError` for execution-level failures that should be surfaced in run history.