@elevasis/sdk 1.21.0 → 1.22.1
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 +1239 -173
- package/dist/index.d.ts +1752 -464
- package/dist/index.js +3477 -143
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +19 -1
- package/dist/test-utils/index.d.ts +1188 -127
- package/dist/test-utils/index.js +3359 -152
- package/dist/worker/index.js +3148 -80
- package/package.json +2 -2
- package/reference/claude-config/hooks/post-edit-validate.mjs +98 -98
- package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +188 -188
- package/reference/claude-config/hooks/tool-failure-recovery.mjs +73 -73
- package/reference/claude-config/registries/graph-skills.json +4 -4
- package/reference/claude-config/registries/knowledge-flags.json +0 -2
- package/reference/claude-config/rules/active-change-index.md +80 -80
- package/reference/claude-config/rules/agent-start-here.md +277 -277
- package/reference/claude-config/rules/deployment.md +57 -57
- package/reference/claude-config/rules/error-handling.md +56 -56
- package/reference/claude-config/rules/execution.md +40 -40
- package/reference/claude-config/rules/frontend.md +4 -4
- package/reference/claude-config/rules/observability.md +31 -31
- package/reference/claude-config/rules/operations.md +29 -17
- package/reference/claude-config/rules/organization-model.md +113 -81
- package/reference/claude-config/rules/organization-os.md +115 -113
- package/reference/claude-config/rules/package-taxonomy.md +33 -33
- package/reference/claude-config/rules/platform.md +42 -42
- package/reference/claude-config/rules/shared-types.md +49 -46
- package/reference/claude-config/rules/task-tracking.md +47 -47
- package/reference/claude-config/rules/ui.md +200 -200
- package/reference/claude-config/rules/vibe.md +235 -235
- package/reference/claude-config/scripts/statusline-command.js +18 -18
- package/reference/claude-config/settings.json +34 -34
- package/reference/claude-config/skills/deploy/{SKILL.md → skill.md} +156 -156
- package/reference/claude-config/skills/dsp/SKILL.md +66 -66
- package/reference/claude-config/skills/elevasis/SKILL.md +235 -235
- package/reference/claude-config/skills/explore/SKILL.md +6 -6
- package/reference/claude-config/skills/git-sync/SKILL.md +126 -126
- package/reference/claude-config/skills/knowledge/SKILL.md +314 -299
- package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +100 -100
- package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +159 -159
- package/reference/claude-config/skills/knowledge/operations/customers.md +109 -109
- package/reference/claude-config/skills/knowledge/operations/features.md +76 -76
- package/reference/claude-config/skills/knowledge/operations/goals.md +118 -118
- package/reference/claude-config/skills/knowledge/operations/identity.md +93 -93
- package/reference/claude-config/skills/knowledge/operations/labels.md +94 -94
- package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -109
- package/reference/claude-config/skills/knowledge/operations/roles.md +99 -99
- package/reference/claude-config/skills/knowledge/operations/techStack.md +30 -30
- package/reference/claude-config/skills/project/SKILL.md +1088 -1088
- package/reference/claude-config/skills/run-ui/SKILL.md +73 -73
- package/reference/claude-config/skills/save/SKILL.md +3 -3
- package/reference/claude-config/skills/setup/SKILL.md +275 -275
- package/reference/claude-config/skills/status/SKILL.md +59 -59
- package/reference/claude-config/skills/submit-request/SKILL.md +180 -180
- package/reference/claude-config/skills/sync/SKILL.md +47 -47
- package/reference/claude-config/skills/tutorial/SKILL.md +259 -259
- package/reference/claude-config/skills/tutorial/progress-template.md +74 -74
- package/reference/claude-config/skills/tutorial/technical.md +1303 -1303
- package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -890
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -27
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -30
- package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +73 -73
- package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -86
- package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -55
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +97 -97
- package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +112 -112
- package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +93 -93
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -58
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -56
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -71
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -59
- package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +42 -42
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -60
- package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +37 -37
- package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -34
- package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -38
- package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -32
- package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -33
- package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -69
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -30
- package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +45 -0
- package/reference/claude-config/sync-notes/README.md +43 -43
- package/reference/cli.mdx +808 -808
- package/reference/concepts.mdx +146 -146
- package/reference/deployment/api.mdx +297 -297
- package/reference/deployment/command-center.mdx +209 -209
- package/reference/deployment/index.mdx +195 -195
- package/reference/deployment/provided-features.mdx +107 -107
- package/reference/deployment/ui-execution.mdx +250 -250
- package/reference/examples/organization-model.ts +171 -84
- package/reference/framework/agent.mdx +156 -156
- package/reference/framework/index.mdx +195 -195
- package/reference/framework/interaction-guidance.mdx +182 -182
- package/reference/framework/memory.mdx +326 -326
- package/reference/framework/project-structure.mdx +282 -282
- package/reference/framework/tutorial-system.mdx +135 -135
- package/reference/getting-started.mdx +142 -142
- package/reference/index.mdx +106 -106
- package/reference/packages/core/src/README.md +14 -14
- package/reference/packages/core/src/business/README.md +2 -2
- package/reference/packages/core/src/knowledge/README.md +32 -32
- package/reference/packages/core/src/organization-model/README.md +149 -149
- package/reference/packages/core/src/test-utils/README.md +37 -37
- package/reference/packages/ui/src/api/README.md +18 -18
- package/reference/packages/ui/src/app/README.md +24 -24
- package/reference/packages/ui/src/auth/README.md +18 -18
- package/reference/packages/ui/src/components/README.md +24 -24
- package/reference/packages/ui/src/execution/README.md +16 -16
- package/reference/packages/ui/src/features/README.md +28 -28
- package/reference/packages/ui/src/graph/README.md +16 -16
- package/reference/packages/ui/src/hooks/README.md +23 -23
- package/reference/packages/ui/src/initialization/README.md +19 -19
- package/reference/packages/ui/src/knowledge/README.md +31 -31
- package/reference/packages/ui/src/organization/README.md +18 -18
- package/reference/packages/ui/src/profile/README.md +19 -19
- package/reference/packages/ui/src/provider/README.md +32 -32
- package/reference/packages/ui/src/router/README.md +18 -18
- package/reference/packages/ui/src/sse/README.md +13 -13
- package/reference/packages/ui/src/test-utils/README.md +7 -7
- package/reference/packages/ui/src/theme/README.md +23 -23
- package/reference/packages/ui/src/theme/presets/README.md +19 -19
- package/reference/packages/ui/src/types/README.md +16 -16
- package/reference/packages/ui/src/utils/README.md +18 -18
- package/reference/packages/ui/src/zustand/README.md +18 -18
- package/reference/platform-tools/adapters-integration.mdx +301 -301
- package/reference/platform-tools/adapters-platform.mdx +553 -553
- package/reference/platform-tools/index.mdx +217 -217
- package/reference/platform-tools/type-safety.mdx +82 -82
- package/reference/resources/index.mdx +349 -349
- package/reference/resources/patterns.mdx +449 -449
- package/reference/resources/types.mdx +116 -116
- package/reference/roadmap.mdx +165 -165
- package/reference/runtime.mdx +173 -173
- package/reference/scaffold/core/organization-graph.mdx +110 -90
- package/reference/scaffold/core/organization-model.mdx +225 -213
- package/reference/scaffold/index.mdx +67 -67
- package/reference/scaffold/operations/propagation-pipeline.md +77 -77
- package/reference/scaffold/operations/scaffold-maintenance.md +12 -12
- package/reference/scaffold/operations/workflow-recipes.md +138 -138
- package/reference/scaffold/recipes/add-a-feature.md +307 -85
- package/reference/scaffold/recipes/add-a-resource.md +137 -103
- package/reference/scaffold/recipes/customize-knowledge-browser.md +5 -5
- package/reference/scaffold/recipes/customize-organization-model.md +275 -138
- package/reference/scaffold/recipes/extend-a-base-entity.md +8 -8
- package/reference/scaffold/recipes/extend-crm.md +3 -3
- package/reference/scaffold/recipes/extend-lead-gen.md +394 -394
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +118 -118
- package/reference/scaffold/recipes/index.md +46 -46
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +197 -170
- package/reference/scaffold/reference/contracts.md +2136 -2093
- package/reference/scaffold/reference/glossary.md +76 -76
- package/reference/scaffold/ui/composition-extensibility.mdx +233 -233
- package/reference/scaffold/ui/customization.md +243 -243
- package/reference/scaffold/ui/feature-flags-and-gating.md +46 -46
- package/reference/scaffold/ui/feature-shell.mdx +72 -72
- package/reference/scaffold/ui/recipes.md +221 -214
- package/reference/spine/spine-primer.md +96 -96
- package/reference/templates/index.mdx +47 -47
- package/reference/troubleshooting.mdx +223 -223
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Deployment workflow -- check-first, dev vs prod, version bumping, common errors
|
|
3
|
-
paths:
|
|
4
|
-
- operations/**
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Deployment
|
|
8
|
-
|
|
9
|
-
## Always Check Before Deploy
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
pnpm -C operations run check # Validate resource definitions
|
|
13
|
-
pnpm -C operations run check-types # TypeScript type-check
|
|
14
|
-
pnpm -C operations run deploy # Deploy to dev (only after both pass)
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
`check` catches duplicate resource IDs, OM descriptor/code mismatches, invalid step chains, broken relationships, and schema serialization issues. Same validation runs during deploy -- if `check` passes, deploy validation will pass.
|
|
18
|
-
|
|
19
|
-
## Dev vs Prod
|
|
20
|
-
|
|
21
|
-
| Command | Target | When |
|
|
22
|
-
| ------------------------------------ | ----------------- | ----------------------- |
|
|
23
|
-
| `pnpm -C operations run deploy` | Local dev API | Development and testing |
|
|
24
|
-
| `pnpm -C operations run deploy:prod` | `api.elevasis.io` | Production release |
|
|
25
|
-
|
|
26
|
-
Always test in dev first, verify with `elevasis-sdk exec`, then deploy to prod.
|
|
27
|
-
|
|
28
|
-
## Version Bumping
|
|
29
|
-
|
|
30
|
-
Deploy accepts `--major`, `--minor`, `--patch` flags to bump the deployment version. The bumped version is written back to `src/index.ts`. Bump on contract changes (input/output schema modifications).
|
|
31
|
-
|
|
32
|
-
## What Gets Deployed
|
|
33
|
-
|
|
34
|
-
1. **Bundle:** esbuild compiles `src/index.ts` + all dependencies into a single self-contained CJS file. No `node_modules` needed at runtime.
|
|
35
|
-
2. **Metadata:** Resource definitions, OM Resources descriptor bindings, Zod schemas (converted to JSON Schema), relationships, triggers.
|
|
36
|
-
|
|
37
|
-
## Environment
|
|
38
|
-
|
|
39
|
-
- `ELEVASIS_PLATFORM_KEY` in `.env` is required for CLI auth
|
|
40
|
-
- `.env` is never included in the bundle -- it stays local
|
|
41
|
-
- Integration credentials live in Command Center, not `.env`
|
|
42
|
-
|
|
43
|
-
## Common Errors
|
|
44
|
-
|
|
45
|
-
| Error | Fix |
|
|
46
|
-
| ---------------------------------------- | ------------------------------------------------------- |
|
|
47
|
-
| `401: Invalid API key` | Check `ELEVASIS_PLATFORM_KEY` in `.env` |
|
|
48
|
-
| `Duplicate resource ID` | Fix the duplicated OM Resource descriptor ID, then derive runtime `resourceId` from that descriptor |
|
|
49
|
-
| `Missing OM Resource descriptor` | Add the descriptor to `core/config/organization-model.ts` under `resources
|
|
50
|
-
| `Step references non-existent next step` | Fix the `next:` field in the step chain |
|
|
51
|
-
| `Schema serialization failed` | Simplify the Zod schema (warning, still deploys) |
|
|
52
|
-
| `No default export found` | `src/index.ts` must `export default` a `DeploymentSpec` |
|
|
53
|
-
| `Documentation file exceeds 100KB` | Split the `.md` file |
|
|
54
|
-
|
|
55
|
-
## Deployment Replaces Previous
|
|
56
|
-
|
|
57
|
-
Only one deployment can be `active` at a time. Deploying again automatically marks the previous deployment as `stopped`. Resources become executable immediately after deploy succeeds.
|
|
1
|
+
---
|
|
2
|
+
description: Deployment workflow -- check-first, dev vs prod, version bumping, common errors
|
|
3
|
+
paths:
|
|
4
|
+
- operations/**
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Deployment
|
|
8
|
+
|
|
9
|
+
## Always Check Before Deploy
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm -C operations run check # Validate resource definitions
|
|
13
|
+
pnpm -C operations run check-types # TypeScript type-check
|
|
14
|
+
pnpm -C operations run deploy # Deploy to dev (only after both pass)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`check` catches duplicate resource IDs, OM descriptor/code mismatches, invalid step chains, broken relationships, and schema serialization issues. Same validation runs during deploy -- if `check` passes, deploy validation will pass.
|
|
18
|
+
|
|
19
|
+
## Dev vs Prod
|
|
20
|
+
|
|
21
|
+
| Command | Target | When |
|
|
22
|
+
| ------------------------------------ | ----------------- | ----------------------- |
|
|
23
|
+
| `pnpm -C operations run deploy` | Local dev API | Development and testing |
|
|
24
|
+
| `pnpm -C operations run deploy:prod` | `api.elevasis.io` | Production release |
|
|
25
|
+
|
|
26
|
+
Always test in dev first, verify with `elevasis-sdk exec`, then deploy to prod.
|
|
27
|
+
|
|
28
|
+
## Version Bumping
|
|
29
|
+
|
|
30
|
+
Deploy accepts `--major`, `--minor`, `--patch` flags to bump the deployment version. The bumped version is written back to `src/index.ts`. Bump on contract changes (input/output schema modifications).
|
|
31
|
+
|
|
32
|
+
## What Gets Deployed
|
|
33
|
+
|
|
34
|
+
1. **Bundle:** esbuild compiles `src/index.ts` + all dependencies into a single self-contained CJS file. No `node_modules` needed at runtime.
|
|
35
|
+
2. **Metadata:** Resource definitions, OM Resources descriptor bindings, Zod schemas (converted to JSON Schema), relationships, triggers.
|
|
36
|
+
|
|
37
|
+
## Environment
|
|
38
|
+
|
|
39
|
+
- `ELEVASIS_PLATFORM_KEY` in `.env` is required for CLI auth
|
|
40
|
+
- `.env` is never included in the bundle -- it stays local
|
|
41
|
+
- Integration credentials live in Command Center, not `.env`
|
|
42
|
+
|
|
43
|
+
## Common Errors
|
|
44
|
+
|
|
45
|
+
| Error | Fix |
|
|
46
|
+
| ---------------------------------------- | ------------------------------------------------------- |
|
|
47
|
+
| `401: Invalid API key` | Check `ELEVASIS_PLATFORM_KEY` in `.env` |
|
|
48
|
+
| `Duplicate resource ID` | Fix the duplicated OM Resource descriptor ID, then derive runtime `resourceId` from that descriptor |
|
|
49
|
+
| `Missing OM Resource descriptor` | Add the descriptor to `core/config/organization-model.ts` under the id-keyed `resources` map |
|
|
50
|
+
| `Step references non-existent next step` | Fix the `next:` field in the step chain |
|
|
51
|
+
| `Schema serialization failed` | Simplify the Zod schema (warning, still deploys) |
|
|
52
|
+
| `No default export found` | `src/index.ts` must `export default` a `DeploymentSpec` |
|
|
53
|
+
| `Documentation file exceeds 100KB` | Split the `.md` file |
|
|
54
|
+
|
|
55
|
+
## Deployment Replaces Previous
|
|
56
|
+
|
|
57
|
+
Only one deployment can be `active` at a time. Deploying again automatically marks the previous deployment as `stopped`. Resources become executable immediately after deploy succeeds.
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Error handling -- ExecutionError vs PlatformToolError, retry logic, no auto-retry
|
|
3
|
-
paths:
|
|
4
|
-
- operations/**
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Error Handling
|
|
8
|
-
|
|
9
|
-
## Error Types
|
|
10
|
-
|
|
11
|
-
Two error classes from `@elevasis/sdk`:
|
|
12
|
-
|
|
13
|
-
**`ExecutionError`** -- base class for workflow/step failures.
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import { ExecutionError } from '@elevasis/sdk'
|
|
17
|
-
|
|
18
|
-
throw new ExecutionError('Payment processing failed', {
|
|
19
|
-
context: { invoiceId: '123', amount: 500 }
|
|
20
|
-
})
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
**`PlatformToolError`** -- thrown by `platform.call()` and typed adapters.
|
|
24
|
-
|
|
25
|
-
```typescript
|
|
26
|
-
import { PlatformToolError } from '@elevasis/sdk'
|
|
27
|
-
|
|
28
|
-
try {
|
|
29
|
-
await attio.createRecord({ ... })
|
|
30
|
-
} catch (err) {
|
|
31
|
-
if (err instanceof PlatformToolError && err.retryable) {
|
|
32
|
-
// Transient error (rate limit, timeout, network) -- safe to retry
|
|
33
|
-
} else {
|
|
34
|
-
// Permanent error (invalid credentials, bad input) -- don't retry
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## No Auto-Retry
|
|
40
|
-
|
|
41
|
-
The platform does NOT automatically retry failed steps. Your handler is responsible for retry logic. Check `PlatformToolError.retryable` to decide whether retrying is safe.
|
|
42
|
-
|
|
43
|
-
## Error Visibility
|
|
44
|
-
|
|
45
|
-
- Unhandled exceptions in handlers surface directly to CLI output and AI Studio.
|
|
46
|
-
- Use `context.logger.error()` to log errors -- `console.error()` is NOT captured by the platform.
|
|
47
|
-
- Write clear, descriptive error messages -- they're the primary debugging signal for end users.
|
|
48
|
-
|
|
49
|
-
## Common PlatformToolError Codes
|
|
50
|
-
|
|
51
|
-
| Code | Retryable | Cause |
|
|
52
|
-
| --------------------- | --------- | --------------------------------- |
|
|
53
|
-
| `rate_limit_exceeded` | Yes | Integration API rate limit hit |
|
|
54
|
-
| `timeout_error` | Yes | Integration call timed out |
|
|
55
|
-
| `credentials_invalid` | No | Credential not found or expired |
|
|
56
|
-
| `validation_error` | No | Invalid parameters passed to tool |
|
|
1
|
+
---
|
|
2
|
+
description: Error handling -- ExecutionError vs PlatformToolError, retry logic, no auto-retry
|
|
3
|
+
paths:
|
|
4
|
+
- operations/**
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Error Handling
|
|
8
|
+
|
|
9
|
+
## Error Types
|
|
10
|
+
|
|
11
|
+
Two error classes from `@elevasis/sdk`:
|
|
12
|
+
|
|
13
|
+
**`ExecutionError`** -- base class for workflow/step failures.
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { ExecutionError } from '@elevasis/sdk'
|
|
17
|
+
|
|
18
|
+
throw new ExecutionError('Payment processing failed', {
|
|
19
|
+
context: { invoiceId: '123', amount: 500 }
|
|
20
|
+
})
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**`PlatformToolError`** -- thrown by `platform.call()` and typed adapters.
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { PlatformToolError } from '@elevasis/sdk'
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
await attio.createRecord({ ... })
|
|
30
|
+
} catch (err) {
|
|
31
|
+
if (err instanceof PlatformToolError && err.retryable) {
|
|
32
|
+
// Transient error (rate limit, timeout, network) -- safe to retry
|
|
33
|
+
} else {
|
|
34
|
+
// Permanent error (invalid credentials, bad input) -- don't retry
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## No Auto-Retry
|
|
40
|
+
|
|
41
|
+
The platform does NOT automatically retry failed steps. Your handler is responsible for retry logic. Check `PlatformToolError.retryable` to decide whether retrying is safe.
|
|
42
|
+
|
|
43
|
+
## Error Visibility
|
|
44
|
+
|
|
45
|
+
- Unhandled exceptions in handlers surface directly to CLI output and AI Studio.
|
|
46
|
+
- Use `context.logger.error()` to log errors -- `console.error()` is NOT captured by the platform.
|
|
47
|
+
- Write clear, descriptive error messages -- they're the primary debugging signal for end users.
|
|
48
|
+
|
|
49
|
+
## Common PlatformToolError Codes
|
|
50
|
+
|
|
51
|
+
| Code | Retryable | Cause |
|
|
52
|
+
| --------------------- | --------- | --------------------------------- |
|
|
53
|
+
| `rate_limit_exceeded` | Yes | Integration API rate limit hit |
|
|
54
|
+
| `timeout_error` | Yes | Integration call timed out |
|
|
55
|
+
| `credentials_invalid` | No | Credential not found or expired |
|
|
56
|
+
| `validation_error` | No | Invalid parameters passed to tool |
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Execution model -- timeouts, memory, concurrency, org isolation, runtime constraints
|
|
3
|
-
paths:
|
|
4
|
-
- operations/**
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Execution Model
|
|
8
|
-
|
|
9
|
-
## Runtime Environment
|
|
10
|
-
|
|
11
|
-
Each execution runs in an isolated Node.js worker thread spawned from the deployed bundle. Workers are ephemeral -- created on execution start, terminated on completion. No state persists between executions.
|
|
12
|
-
|
|
13
|
-
## Constraints
|
|
14
|
-
|
|
15
|
-
| Constraint | Workflows | Agents |
|
|
16
|
-
| ---------- | ------------------------------- | ----------------------------------------------------- |
|
|
17
|
-
| Timeout | 300s (5 min) | 600s (10 min, configurable via `constraints.timeout`) |
|
|
18
|
-
| Memory | 256MB hard limit | 256MB hard limit |
|
|
19
|
-
| Disk | None (no persistent filesystem) | None |
|
|
20
|
-
|
|
21
|
-
- Platform enforces timeouts -- no handler code needed, worker terminates automatically.
|
|
22
|
-
- Memory overflow crashes the worker. Other tenants are unaffected.
|
|
23
|
-
- For long-running tasks, break work into multiple steps or use agents with extended timeout.
|
|
24
|
-
|
|
25
|
-
## Concurrency
|
|
26
|
-
|
|
27
|
-
Concurrent executions for the same organization run in completely separate workers with zero shared state. No locking, no race conditions between executions.
|
|
28
|
-
|
|
29
|
-
## Organization Isolation
|
|
30
|
-
|
|
31
|
-
- `organizationId` is injected server-side from the JWT context -- workers never see it.
|
|
32
|
-
- Storage paths are automatically org-prefixed.
|
|
33
|
-
- Resource IDs are scoped per organization (not global).
|
|
34
|
-
- External developers cannot access other organizations' data by construction.
|
|
35
|
-
|
|
36
|
-
No developer action needed for multi-tenancy -- the platform handles it.
|
|
37
|
-
|
|
38
|
-
## Cancellation
|
|
39
|
-
|
|
40
|
-
The platform can cancel in-flight executions. The worker terminates immediately with no cleanup handler.
|
|
1
|
+
---
|
|
2
|
+
description: Execution model -- timeouts, memory, concurrency, org isolation, runtime constraints
|
|
3
|
+
paths:
|
|
4
|
+
- operations/**
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Execution Model
|
|
8
|
+
|
|
9
|
+
## Runtime Environment
|
|
10
|
+
|
|
11
|
+
Each execution runs in an isolated Node.js worker thread spawned from the deployed bundle. Workers are ephemeral -- created on execution start, terminated on completion. No state persists between executions.
|
|
12
|
+
|
|
13
|
+
## Constraints
|
|
14
|
+
|
|
15
|
+
| Constraint | Workflows | Agents |
|
|
16
|
+
| ---------- | ------------------------------- | ----------------------------------------------------- |
|
|
17
|
+
| Timeout | 300s (5 min) | 600s (10 min, configurable via `constraints.timeout`) |
|
|
18
|
+
| Memory | 256MB hard limit | 256MB hard limit |
|
|
19
|
+
| Disk | None (no persistent filesystem) | None |
|
|
20
|
+
|
|
21
|
+
- Platform enforces timeouts -- no handler code needed, worker terminates automatically.
|
|
22
|
+
- Memory overflow crashes the worker. Other tenants are unaffected.
|
|
23
|
+
- For long-running tasks, break work into multiple steps or use agents with extended timeout.
|
|
24
|
+
|
|
25
|
+
## Concurrency
|
|
26
|
+
|
|
27
|
+
Concurrent executions for the same organization run in completely separate workers with zero shared state. No locking, no race conditions between executions.
|
|
28
|
+
|
|
29
|
+
## Organization Isolation
|
|
30
|
+
|
|
31
|
+
- `organizationId` is injected server-side from the JWT context -- workers never see it.
|
|
32
|
+
- Storage paths are automatically org-prefixed.
|
|
33
|
+
- Resource IDs are scoped per organization (not global).
|
|
34
|
+
- External developers cannot access other organizations' data by construction.
|
|
35
|
+
|
|
36
|
+
No developer action needed for multi-tenancy -- the platform handles it.
|
|
37
|
+
|
|
38
|
+
## Cancellation
|
|
39
|
+
|
|
40
|
+
The platform can cancel in-flight executions. The worker terminates immediately with no cleanup handler.
|
|
@@ -17,8 +17,8 @@ paths:
|
|
|
17
17
|
## Silent-Break Gotchas
|
|
18
18
|
|
|
19
19
|
- Route files vs layout files: `operations.tsx` is a layout (renders `<Outlet />`), `operations/my-page.index.tsx` is a page. Confusing the two breaks routing silently
|
|
20
|
-
- `core/` cannot import React or `@elevasis/sdk/worker` -- it is runtime-agnostic shared types and organization configuration only
|
|
21
|
-
- `@/*` resolves to `ui/src/*`, `@core/*` resolves to `core/*` -- never import from `operations/` (separate runtime)
|
|
20
|
+
- `core/` cannot import React or `@elevasis/sdk/worker` -- it is runtime-agnostic shared types and organization configuration only
|
|
21
|
+
- `@/*` resolves to `ui/src/*`, `@core/*` resolves to `core/*` -- never import from `operations/` (separate runtime)
|
|
22
22
|
|
|
23
23
|
## Stack Constraints
|
|
24
24
|
|
|
@@ -36,8 +36,8 @@ When building pages that display external data, use published `@elevasis/ui` com
|
|
|
36
36
|
## Detailed Reference
|
|
37
37
|
|
|
38
38
|
- `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- add a page, add a nav item, theme tokens, feature-scoped components, route patterns (static, nested, dynamic)
|
|
39
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` -- `systemKey` / `SystemGuard` / `AdminGuard` model
|
|
39
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` -- `systemKey` / `SystemGuard` / `AdminGuard` model
|
|
40
40
|
- `node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md` -- sidebar composition via manifest overrides
|
|
41
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` -- TypeScript shapes (`SystemModule`, `NavItem`, `OrganizationModel`)
|
|
41
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` -- TypeScript shapes (`SystemModule`, `NavItem`, `OrganizationModel`)
|
|
42
42
|
- `ui/src/config/theme.ts` -- theme configuration and CSS variable definitions
|
|
43
43
|
- `ui/src/config/nav-items.ts` -- sidebar navigation entries
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Observability -- context.logger API, execution inspection, step-level context
|
|
3
|
-
paths:
|
|
4
|
-
- operations/**
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Observability
|
|
8
|
-
|
|
9
|
-
## Safety Invariants
|
|
10
|
-
|
|
11
|
-
- Use `context.logger` for all logging in step handlers -- `console.*` is NOT captured by the platform
|
|
12
|
-
- Log levels: `debug` (verbose), `info` (normal progress), `warn` (non-fatal, processing continues), `error` (fatal, processing stops)
|
|
13
|
-
- Step lifecycle events (started, completed, failed, route taken) are auto-logged by the SDK worker -- no handler code needed
|
|
14
|
-
|
|
15
|
-
## Key Rules
|
|
16
|
-
|
|
17
|
-
- Every handler should log at: entry (step name + key params), decisions (skips, branches), progress (per-item in loops), summary (counts at end)
|
|
18
|
-
- Error messages in handlers surface as the execution's error message -- write for humans, not machines
|
|
19
|
-
- String values truncated at 200 characters in logs
|
|
20
|
-
- 30-day log retention (includes logs from deleted resources)
|
|
21
|
-
|
|
22
|
-
## Inspecting Executions
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
pnpm elevasis-sdk execution <resourceId> <executionId>
|
|
26
|
-
pnpm elevasis-sdk executions <resourceId>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Detailed Reference
|
|
30
|
-
|
|
31
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- full logging patterns and handler examples
|
|
1
|
+
---
|
|
2
|
+
description: Observability -- context.logger API, execution inspection, step-level context
|
|
3
|
+
paths:
|
|
4
|
+
- operations/**
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Observability
|
|
8
|
+
|
|
9
|
+
## Safety Invariants
|
|
10
|
+
|
|
11
|
+
- Use `context.logger` for all logging in step handlers -- `console.*` is NOT captured by the platform
|
|
12
|
+
- Log levels: `debug` (verbose), `info` (normal progress), `warn` (non-fatal, processing continues), `error` (fatal, processing stops)
|
|
13
|
+
- Step lifecycle events (started, completed, failed, route taken) are auto-logged by the SDK worker -- no handler code needed
|
|
14
|
+
|
|
15
|
+
## Key Rules
|
|
16
|
+
|
|
17
|
+
- Every handler should log at: entry (step name + key params), decisions (skips, branches), progress (per-item in loops), summary (counts at end)
|
|
18
|
+
- Error messages in handlers surface as the execution's error message -- write for humans, not machines
|
|
19
|
+
- String values truncated at 200 characters in logs
|
|
20
|
+
- 30-day log retention (includes logs from deleted resources)
|
|
21
|
+
|
|
22
|
+
## Inspecting Executions
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pnpm elevasis-sdk execution <resourceId> <executionId>
|
|
26
|
+
pnpm elevasis-sdk executions <resourceId>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Detailed Reference
|
|
30
|
+
|
|
31
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- full logging patterns and handler examples
|
|
@@ -12,16 +12,16 @@ paths:
|
|
|
12
12
|
|
|
13
13
|
The `operations/` directory contains platform resources and deployment metadata that deploy to the Elevasis platform. It is a standalone TypeScript project with its own `package.json`, `tsconfig.json`, and dependencies.
|
|
14
14
|
|
|
15
|
-
**Discovering deployed resources:** Read `operations/src/index.ts` for deployment assembly and `core/config/organization-model.ts` for the OM Resources descriptor catalog. Run `pnpm elevasis-sdk project:list --pretty` against the live DB for the deployed surface.
|
|
15
|
+
**Discovering deployed resources:** Read `operations/src/index.ts` for deployment assembly and `core/config/organization-model.ts` for the OM Resources descriptor catalog. Run `pnpm elevasis-sdk project:list --pretty` against the live DB for the deployed surface.
|
|
16
16
|
|
|
17
17
|
## Echo Workflow (Starter Example)
|
|
18
18
|
|
|
19
19
|
**Location:** `operations/src/example/echo.ts`
|
|
20
20
|
|
|
21
|
-
The echo workflow accepts a message string and returns it unchanged. Its purpose is the wiring, not the logic: input and output schemas are defined in `core/types/index.ts` and imported by both the workflow and the frontend.
|
|
21
|
+
The echo workflow accepts a message string and returns it unchanged. Its purpose is the wiring, not the logic: input and output schemas are defined in `core/types/index.ts` and imported by both the workflow and the frontend.
|
|
22
22
|
|
|
23
23
|
```
|
|
24
|
-
core/types/index.ts -- defines echoInputSchema, echoOutputSchema
|
|
24
|
+
core/types/index.ts -- defines echoInputSchema, echoOutputSchema
|
|
25
25
|
operations/src/example/echo.ts -- imports schemas for workflow contract
|
|
26
26
|
ui/src/routes/ -- imports schemas for form validation and display
|
|
27
27
|
```
|
|
@@ -30,15 +30,19 @@ The workflow is registered in `operations/src/index.ts` as part of the `example`
|
|
|
30
30
|
|
|
31
31
|
## Adding a New Workflow
|
|
32
32
|
|
|
33
|
-
1. **Define the descriptor in `core/config/organization-model.ts`** -- Add the OM Resource descriptor under `resources
|
|
34
|
-
|
|
35
|
-
2. **
|
|
36
|
-
|
|
37
|
-
3. **
|
|
38
|
-
|
|
39
|
-
4. **
|
|
40
|
-
|
|
41
|
-
5. **
|
|
33
|
+
1. **Define the descriptor in `core/config/organization-model.ts`** -- Add the OM Resource descriptor under the id-keyed `resources` map so identity, System membership, owner role, and governance status are authored once.
|
|
34
|
+
|
|
35
|
+
2. **Model the semantic surface** -- Add durable business nouns, verbs, catalogs, links, events, and surfaces to the owning System's `ontology`; bind executable Resources through `resource.ontology.actions` and optional `resource.ontology.primaryAction`; add system-local defaults/settings to `System.config`; add explanatory or governing material to `knowledge`; and keep transient DTOs and handler internals out of the OM. Top-level `entities`, top-level `actions`, and `System.content` are compatibility mirrors only when current published consumers still need them.
|
|
36
|
+
|
|
37
|
+
3. **Define the contract in `core/types/`** -- Add Zod schemas and inferred types to `core/types/index.ts` (or a new file under `core/types/`). Use `core/types/entities.ts` when workflows operate on project-specific entity contracts.
|
|
38
|
+
|
|
39
|
+
4. **Implement the workflow in `operations/src/`** -- Create a new directory under `operations/src/` for the feature. Import the descriptor, derive runtime `resourceId`, `type`, `name`, and `description` from it, export the workflow from its `index.ts`, and register it in `operations/src/index.ts`.
|
|
40
|
+
|
|
41
|
+
5. **Add the UI in `ui/src/routes/`** -- Create a new route file. Use TanStack Query to call the workflow execution endpoint. Import schemas from `@core/types` for validation and type inference. Read OM resources, ontology, knowledge, and graph data where possible instead of creating page-local semantic registries.
|
|
42
|
+
|
|
43
|
+
6. **Update rules when the pattern persists** -- If the workflow introduces a reusable adapter pattern, checkpoint/schedule convention, domain vocabulary, or workflow family behavior that future agents must follow, update this rule or add a scoped rule under `.claude/rules/` in the same change.
|
|
44
|
+
|
|
45
|
+
7. **Deploy and verify:**
|
|
42
46
|
|
|
43
47
|
```bash
|
|
44
48
|
pnpm -C operations check # validate resource definitions
|
|
@@ -47,14 +51,14 @@ pnpm -C operations deploy # deploy to dev
|
|
|
47
51
|
|
|
48
52
|
## Resource Registry
|
|
49
53
|
|
|
50
|
-
`operations/src/index.ts` default-exports a `DeploymentSpec` with `version`, `organizationModel`, `workflows`, `agents`, and optional
|
|
54
|
+
`operations/src/index.ts` default-exports a `DeploymentSpec` with `version`, `organizationModel`, `workflows`, `agents`, and optional deployment mechanics such as `triggers`, `integrations`, `relationships`, `humanCheckpoints`, and `externalResources`. Durable operational wiring belongs in `organizationModel.topology.relationships`; deployment mechanics, credentials, provider webhook details, and per-run state stay outside the OM. Each feature group exports `workflows` and `agents` arrays from its own `index.ts`, spread into the top-level spec. `DeploymentSpec` assembles deployable behavior; it should not be treated as a second resource identity catalog.
|
|
51
55
|
|
|
52
56
|
When you need breadth first, read:
|
|
53
57
|
|
|
54
|
-
- `operations/src/README.md` for the source boundary and drill-down guidance
|
|
55
|
-
- `core/config/organization-model.ts` for descriptor identity and governance metadata
|
|
56
|
-
- `operations/src/index.ts` for deployment assembly
|
|
57
|
-
- `pnpm elevasis-sdk project:list --pretty` for the live deployed surface
|
|
58
|
+
- `operations/src/README.md` for the source boundary and drill-down guidance
|
|
59
|
+
- `core/config/organization-model.ts` for descriptor identity and governance metadata
|
|
60
|
+
- `operations/src/index.ts` for deployment assembly
|
|
61
|
+
- `pnpm elevasis-sdk project:list --pretty` for the live deployed surface
|
|
58
62
|
|
|
59
63
|
## Commands
|
|
60
64
|
|
|
@@ -66,3 +70,11 @@ When you need breadth first, read:
|
|
|
66
70
|
| `pnpm -C operations deploy:prod` | Deploy to production |
|
|
67
71
|
|
|
68
72
|
Always run `check` before `deploy`.
|
|
73
|
+
|
|
74
|
+
## Rule Updates
|
|
75
|
+
|
|
76
|
+
When developing resources, workflows, agents, integrations, checkpoints, schedules, or recurring operational conventions, keep `.claude/rules/` current.
|
|
77
|
+
|
|
78
|
+
- Update `operations.md` for package-wide operations invariants.
|
|
79
|
+
- Add a scoped rule for domain-specific workflow families whose conventions should autoload for future edits.
|
|
80
|
+
- Do not bury durable operational rules only in task notes or chat context.
|