@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,326 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Memory System
|
|
3
|
-
description: Cross-session project knowledge stored in .claude/memory/ -- deployment state, environment, decisions, and error patterns that persist between Claude Code sessions
|
|
4
|
-
loadWhen: "Working with agent memory or session state"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
The memory system gives Claude Code a structured knowledge base for your project that survives across sessions. Deployment history, discovered credentials, architectural decisions, and error patterns are all written to `.claude/memory/` as the project evolves -- so the agent never starts from scratch.
|
|
8
|
-
|
|
9
|
-
The `memory/` directory is gitignored and personal to each developer. The `profile/` subdirectory is created by `/meta init` during first-run setup. All other topics are created by the agent as the project evolves.
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Without project memory, the agent starts every session with only the context of the current conversation. It cannot remember that you already deployed yesterday, that a particular credential is configured, or that you encountered and solved a specific TypeScript error last week.
|
|
14
|
-
|
|
15
|
-
With project memory, the agent loads a root index at session start, sees what has been recorded, and can retrieve detail on demand. Error patterns are matched before diagnosis. Deployment state is available before deploying again. The agent can say "I've seen this before -- here's the fix" instead of repeating the same diagnostic process.
|
|
16
|
-
|
|
17
|
-
## Architecture
|
|
18
|
-
|
|
19
|
-
Memory is organized as a hierarchical index tree. Every directory has an `index.md` that maps to its children -- either content files or subdirectories with their own indexes.
|
|
20
|
-
|
|
21
|
-
**The invariant:** A reader always starts at the root index and drills down. The agent reads `memory/index.md` at session start. It reads individual topic files on demand when the user asks about that topic or the agent is about to perform an action in that domain.
|
|
22
|
-
|
|
23
|
-
**The scaling rule:** When a content file outgrows a single document, it graduates into a subdirectory:
|
|
24
|
-
|
|
25
|
-
1. `topic.md` becomes `topic/index.md` + sub-files
|
|
26
|
-
2. The parent index updates its link from `topic.md` to `topic/index.md`
|
|
27
|
-
3. The new sub-index maps to the sub-files
|
|
28
|
-
|
|
29
|
-
This pattern is recursive. Subdirectories can split further as needed. The agent applies its own judgment about when a file has grown past usefulness as a single document.
|
|
30
|
-
|
|
31
|
-
### Starting Structure
|
|
32
|
-
|
|
33
|
-
After `/meta init` and a first deployment, the structure looks like this:
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
.claude/memory/
|
|
37
|
-
├── index.md # Root index -- read at session start
|
|
38
|
-
├── profile/ # Developer profile (created by /meta init)
|
|
39
|
-
│ ├── index.md # Profile summary with links to sub-files
|
|
40
|
-
│ ├── identity.md # Organization, industry, goals, integrations
|
|
41
|
-
│ ├── skills.md # Skill dimensions and Growth Log
|
|
42
|
-
│ └── preferences.md # Verbosity, guidance style, interaction patterns
|
|
43
|
-
├── deployment-state.md # Deploy IDs, resource inventory, org info
|
|
44
|
-
├── environment.md # Credentials, API keys, env vars
|
|
45
|
-
├── decisions.md # Architectural decisions and patterns
|
|
46
|
-
└── errors/ # Subdirectory -- multiple categories
|
|
47
|
-
├── index.md # Error category summary with counts
|
|
48
|
-
├── deploy.md # Deployment error patterns
|
|
49
|
-
├── runtime.md # Runtime execution error patterns
|
|
50
|
-
└── typescript.md # Type and build error patterns
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Profile tracking starts as a subdirectory because it has natural sub-topics from day one (identity, skills, preferences). Error tracking starts as a subdirectory because it naturally spans multiple categories. Other topics start as flat files.
|
|
54
|
-
|
|
55
|
-
### Grown Structure
|
|
56
|
-
|
|
57
|
-
As a project matures, other topics may split:
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
.claude/memory/
|
|
61
|
-
├── index.md
|
|
62
|
-
├── environment.md
|
|
63
|
-
├── decisions.md
|
|
64
|
-
├── deployment-state/ # Grew large enough to split
|
|
65
|
-
│ ├── index.md
|
|
66
|
-
│ ├── resources.md
|
|
67
|
-
│ └── history.md
|
|
68
|
-
└── errors/
|
|
69
|
-
├── index.md
|
|
70
|
-
├── deploy.md
|
|
71
|
-
├── typescript.md
|
|
72
|
-
└── runtime/ # Runtime errors grew further
|
|
73
|
-
├── index.md
|
|
74
|
-
├── lead-scorer.md
|
|
75
|
-
└── email-sender.md
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Memory Topics
|
|
79
|
-
|
|
80
|
-
### Developer Profile
|
|
81
|
-
|
|
82
|
-
The `profile/` directory stores the developer's personal context -- organization details, skill levels, goals, and interaction preferences. It is created during `/meta init` guided setup and is the first thing the root index links to.
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
.claude/memory/profile/
|
|
86
|
-
├── index.md # Profile summary with links to sub-files
|
|
87
|
-
├── identity.md # Organization, industry, goals, integrations
|
|
88
|
-
├── skills.md # Skill dimensions and Growth Log
|
|
89
|
-
└── preferences.md # Verbosity, guidance style, interaction patterns
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
**`identity.md`** records the organization name, industry, size, project goals, and known tool integrations. Example:
|
|
93
|
-
|
|
94
|
-
```markdown
|
|
95
|
-
# Identity
|
|
96
|
-
|
|
97
|
-
| Field | Value |
|
|
98
|
-
| --- | --- |
|
|
99
|
-
| Organization | Acme Corp |
|
|
100
|
-
| Industry | E-commerce |
|
|
101
|
-
| Size | 10-50 |
|
|
102
|
-
|
|
103
|
-
## Project Goals
|
|
104
|
-
|
|
105
|
-
- Automate lead scoring from Attio CRM
|
|
106
|
-
- Send follow-up emails via Resend
|
|
107
|
-
- Weekly pipeline reports
|
|
108
|
-
|
|
109
|
-
## Known Integrations
|
|
110
|
-
|
|
111
|
-
- Attio (CRM)
|
|
112
|
-
- Resend (email)
|
|
113
|
-
- Google Sheets (reporting)
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**`skills.md`** stores four skill dimensions as structured values so the Adaptive Guidance rules in [Interaction Guidance](interaction-guidance.mdx) can apply them consistently. It also tracks a Growth Log so the agent can detect when a level upgrade is warranted. Example:
|
|
117
|
-
|
|
118
|
-
```markdown
|
|
119
|
-
# Skills
|
|
120
|
-
|
|
121
|
-
| Dimension | Level | Since |
|
|
122
|
-
| --- | --- | --- |
|
|
123
|
-
| platformNavigation | oriented | 2026-02-25 |
|
|
124
|
-
| apiIntegration | basic | 2026-02-25 |
|
|
125
|
-
| automation | low-code | 2026-02-25 |
|
|
126
|
-
| domainExpertise | high | 2026-02-25 |
|
|
127
|
-
|
|
128
|
-
## Growth Log
|
|
129
|
-
|
|
130
|
-
| Date | Observation | Dimension | Change |
|
|
131
|
-
| --- | --- | --- | --- |
|
|
132
|
-
| 2026-03-01 | Navigated to Execution Logs and filtered by resource without direction | platformNavigation | none -> oriented |
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Valid levels per dimension:
|
|
136
|
-
|
|
137
|
-
- `platformNavigation`: none / oriented / comfortable
|
|
138
|
-
- `apiIntegration`: none / basic / proficient
|
|
139
|
-
- `automation`: none / low-code / custom
|
|
140
|
-
- `domainExpertise`: high / low
|
|
141
|
-
|
|
142
|
-
**`preferences.md`** stores verbosity and proactive guidance settings. Example:
|
|
143
|
-
|
|
144
|
-
```markdown
|
|
145
|
-
# Preferences
|
|
146
|
-
|
|
147
|
-
| Setting | Value |
|
|
148
|
-
| --- | --- |
|
|
149
|
-
| Verbosity | detailed |
|
|
150
|
-
| Proactive guidance | yes |
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Root Index
|
|
154
|
-
|
|
155
|
-
`memory/index.md` is the only file read at session start. It lists all topics with their last-updated dates, giving the agent enough context to know what has been recorded without loading any detail.
|
|
156
|
-
|
|
157
|
-
```markdown
|
|
158
|
-
# Project Memory
|
|
159
|
-
|
|
160
|
-
Agent-maintained cross-session knowledge base. Updated automatically.
|
|
161
|
-
|
|
162
|
-
| Entry | Topic | Last Updated |
|
|
163
|
-
| --- | --- | --- |
|
|
164
|
-
| [profile/](profile/index.md) | Developer profile (skills, identity, preferences) | 2026-02-25 |
|
|
165
|
-
| [deployment-state.md](deployment-state.md) | Deploy history, resource inventory, org info | 2026-02-25 |
|
|
166
|
-
| [environment.md](environment.md) | Credentials, API keys, env vars | 2026-02-25 |
|
|
167
|
-
| [decisions.md](decisions.md) | Architectural decisions and patterns | 2026-02-26 |
|
|
168
|
-
| [errors/](errors/index.md) | Error patterns by category | 2026-02-26 |
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
Subdirectory entries link to their `index.md` rather than the directory itself.
|
|
172
|
-
|
|
173
|
-
### Deployment State
|
|
174
|
-
|
|
175
|
-
`deployment-state.md` tracks the most recent deploy and resource inventory. The agent updates it after every successful deployment.
|
|
176
|
-
|
|
177
|
-
```markdown
|
|
178
|
-
# Deployment State
|
|
179
|
-
|
|
180
|
-
## Latest Deploy
|
|
181
|
-
|
|
182
|
-
| Field | Value |
|
|
183
|
-
| --- | --- |
|
|
184
|
-
| Date | 2026-02-26 |
|
|
185
|
-
| Deploy ID | dep_abc123 |
|
|
186
|
-
| Resource count | 2 |
|
|
187
|
-
| Organization | acme-corp |
|
|
188
|
-
|
|
189
|
-
## Resources
|
|
190
|
-
|
|
191
|
-
- `echo` (workflow, dev) -- echoes input, starter resource
|
|
192
|
-
- `lead-scorer` (workflow, prod) -- scores leads from Attio
|
|
193
|
-
|
|
194
|
-
## Deploy History
|
|
195
|
-
|
|
196
|
-
| Date | Deploy ID | Resources | Status |
|
|
197
|
-
| --- | --- | --- | --- |
|
|
198
|
-
| 2026-02-26 | dep_abc123 | 2 | success |
|
|
199
|
-
| 2026-02-25 | dep_xyz789 | 1 | success |
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Environment
|
|
203
|
-
|
|
204
|
-
`environment.md` records discovered credentials and environment variable status. The agent updates it when credentials are confirmed via the command center or deployment output.
|
|
205
|
-
|
|
206
|
-
### Decisions
|
|
207
|
-
|
|
208
|
-
`decisions.md` captures architectural choices as a table: which tools were chosen, what patterns were established, and why. The agent adds a row when the user makes a significant decision during development.
|
|
209
|
-
|
|
210
|
-
## Error Tracking
|
|
211
|
-
|
|
212
|
-
Error tracking is the first memory topic to outgrow a flat file. It starts as a subdirectory with one file per error category.
|
|
213
|
-
|
|
214
|
-
### Error Index
|
|
215
|
-
|
|
216
|
-
`errors/index.md` provides a high-level summary of known error patterns by category. The agent reads this file (via the root index) at session start.
|
|
217
|
-
|
|
218
|
-
```markdown
|
|
219
|
-
# Error Patterns
|
|
220
|
-
|
|
221
|
-
Error pattern tracking by category. Updated when errors are diagnosed and resolved.
|
|
222
|
-
|
|
223
|
-
| Entry | Category | Patterns | Total Occurrences | Last Seen |
|
|
224
|
-
| --- | --- | --- | --- | --- |
|
|
225
|
-
| [deploy.md](deploy.md) | Deployment | 2 | 3 | 2026-02-26 |
|
|
226
|
-
| [runtime.md](runtime.md) | Runtime | 1 | 1 | 2026-02-26 |
|
|
227
|
-
| [typescript.md](typescript.md) | TypeScript | 1 | 2 | 2026-02-25 |
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
- **Patterns** -- count of unique error patterns in the category file
|
|
231
|
-
- **Total Occurrences** -- sum of all occurrences across patterns
|
|
232
|
-
- **Last Seen** -- most recent date any error in this category was seen
|
|
233
|
-
|
|
234
|
-
### Category Files
|
|
235
|
-
|
|
236
|
-
Each category file is a table of known error patterns with resolutions:
|
|
237
|
-
|
|
238
|
-
```markdown
|
|
239
|
-
# Deploy Errors
|
|
240
|
-
|
|
241
|
-
| Last Seen | Error | Resolution | Occurrences |
|
|
242
|
-
| --- | --- | --- | --- |
|
|
243
|
-
| 2026-02-25 | `ELEVASIS_PLATFORM_KEY not set` | Added key to `.env` | 2 |
|
|
244
|
-
| 2026-02-26 | `Schema validation: missing outputSchema` | Added Zod output schema to workflow | 1 |
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
Runtime errors include the resource name since the same error in different resources may have different causes:
|
|
248
|
-
|
|
249
|
-
```markdown
|
|
250
|
-
# Runtime Errors
|
|
251
|
-
|
|
252
|
-
| Last Seen | Resource | Error | Resolution | Occurrences |
|
|
253
|
-
| --- | --- | --- | --- | --- |
|
|
254
|
-
| 2026-02-26 | lead-scorer | `PlatformToolError: credential not found` | Set credential via `elevasis-sdk env set` | 1 |
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
### Error Resolution Flow
|
|
258
|
-
|
|
259
|
-
When the agent encounters an error, it follows this sequence:
|
|
260
|
-
|
|
261
|
-
1. Checks `memory/errors/index.md` (already loaded via root index) for a matching category
|
|
262
|
-
2. If the relevant category has known patterns, reads the category file
|
|
263
|
-
3. If a match exists, applies the known resolution immediately -- "I've seen this before, here's the fix"
|
|
264
|
-
4. If no match exists, diagnoses normally, then logs the new pattern
|
|
265
|
-
|
|
266
|
-
When the agent logs a resolved error:
|
|
267
|
-
|
|
268
|
-
1. Reads the relevant category file (e.g., `memory/errors/deploy.md`)
|
|
269
|
-
2. If the pattern already exists, increments `Occurrences` and updates `Last Seen`
|
|
270
|
-
3. If it is a new pattern, adds a new row
|
|
271
|
-
4. Updates the error index: recalculates `Patterns`, `Total Occurrences`, and `Last Seen`
|
|
272
|
-
5. If the category file does not exist yet, creates it and adds a row to the error index
|
|
273
|
-
|
|
274
|
-
## Scaling Rule
|
|
275
|
-
|
|
276
|
-
When a file has grown past usefulness as a single document -- too many rows to scan, too many unrelated concerns, or too much context to load for a targeted lookup -- split it into a subdirectory.
|
|
277
|
-
|
|
278
|
-
**Before split:**
|
|
279
|
-
|
|
280
|
-
```
|
|
281
|
-
memory/
|
|
282
|
-
├── index.md
|
|
283
|
-
└── deployment-state.md # entry: deployment-state.md
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
**After split:**
|
|
287
|
-
|
|
288
|
-
```
|
|
289
|
-
memory/
|
|
290
|
-
├── index.md # entry updated: deployment-state/ -> deployment-state/index.md
|
|
291
|
-
└── deployment-state/
|
|
292
|
-
├── index.md
|
|
293
|
-
├── resources.md
|
|
294
|
-
└── history.md
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
The parent index link changes from `deployment-state.md` to `deployment-state/index.md`. The new sub-index maps to the sub-files. The agent applies this pattern at every depth level.
|
|
298
|
-
|
|
299
|
-
## Maintenance
|
|
300
|
-
|
|
301
|
-
### Pruning
|
|
302
|
-
|
|
303
|
-
Keep content useful, not exhaustive:
|
|
304
|
-
|
|
305
|
-
- Keep the most recent ~20 entries in tables that grow over time (deploy history, error patterns)
|
|
306
|
-
- Drop patterns that have not recurred in 30 or more days unless the resolution was non-obvious
|
|
307
|
-
- Summarize if patterns are worth preserving but detail is not
|
|
308
|
-
|
|
309
|
-
### Index Hygiene
|
|
310
|
-
|
|
311
|
-
- If a file exists but is not in its parent index, add it
|
|
312
|
-
- If an index references a missing file, remove the row
|
|
313
|
-
|
|
314
|
-
The agent self-heals on read. Index hygiene is applied as part of normal session operation.
|
|
315
|
-
|
|
316
|
-
### Promotion
|
|
317
|
-
|
|
318
|
-
If an error pattern recurs 3 or more times, promote it to a rule in the `CLAUDE.md` Rules section. Rules prevent errors rather than diagnosing them.
|
|
319
|
-
|
|
320
|
-
## Relationship to Claude Code Auto-Memory
|
|
321
|
-
|
|
322
|
-
Claude Code's auto-memory (`MEMORY.md`) and project memory (`.claude/memory/`) are complementary -- both should be active. Auto-memory captures organic discoveries; project memory captures structured project state that `CLAUDE.md` explicitly instructs the agent to record.
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
**Last Updated:** 2026-02-25
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Resource Documentation
|
|
3
|
-
description: How docs ship alongside code in the Elevasis SDK -- directory structure, frontmatter schema, size limits, deploy behavior, and the /docs command
|
|
4
|
-
loadWhen: "Working with resource documentation or the /docs command"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
`elevasis-sdk deploy` ships your code and your documentation atomically -- one command, no version drift. Documentation files live in a `docs/` directory at your project root and render in the Elevasis platform UI for operators using your resources.
|
|
8
|
-
|
|
9
|
-
## Directory Structure
|
|
10
|
-
|
|
11
|
-
Create `.mdx` files inside a `docs/` directory at your project root. Your Elevasis SDK project includes a starter structure:
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
my-project/
|
|
15
|
-
├── docs/
|
|
16
|
-
│ └── index.mdx # Resource overview (included by default)
|
|
17
|
-
├── src/
|
|
18
|
-
│ └── index.ts # Resource definitions
|
|
19
|
-
└── elevasis.config.ts
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
A missing `docs/` directory is silently ignored -- documentation is optional. If the directory exists, its contents are included in the deploy payload alongside resource schemas.
|
|
23
|
-
|
|
24
|
-
## Frontmatter Schema
|
|
25
|
-
|
|
26
|
-
```yaml
|
|
27
|
-
---
|
|
28
|
-
title: string # Page title (required)
|
|
29
|
-
description: string # Short description (optional)
|
|
30
|
-
order: number # Sort order within directory (optional, default: 0)
|
|
31
|
-
---
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Naming Conventions
|
|
35
|
-
|
|
36
|
-
- `docs/index.md` is the root page and is always rendered first
|
|
37
|
-
- Nested directories create sections: `docs/guides/getting-started.mdx`
|
|
38
|
-
- File names become URL slugs: `setup-guide.mdx` renders at `/docs/setup-guide`
|
|
39
|
-
- Arbitrary nesting is supported -- no depth limit
|
|
40
|
-
|
|
41
|
-
## Size Limits
|
|
42
|
-
|
|
43
|
-
- 100KB per file
|
|
44
|
-
- 1MB total across all files in a deployment
|
|
45
|
-
|
|
46
|
-
These limits are enforced by the CLI before the deploy request is sent. Validation errors include the file name and size.
|
|
47
|
-
|
|
48
|
-
## Deploy Behavior
|
|
49
|
-
|
|
50
|
-
When you run `elevasis-sdk deploy`:
|
|
51
|
-
|
|
52
|
-
1. The CLI scans `docs/` recursively for `.mdx` files
|
|
53
|
-
2. Each file's frontmatter (title, description, order) is parsed and stripped from the content
|
|
54
|
-
3. Total size is validated against the 1MB limit and individual files against 100KB
|
|
55
|
-
4. The documentation array is included in the deploy metadata alongside your resource schemas
|
|
56
|
-
|
|
57
|
-
Documentation and code ship in the same transaction. There is no separate upload step and no way for documentation to drift out of sync with the deployed version.
|
|
58
|
-
|
|
59
|
-
## The /docs Command
|
|
60
|
-
|
|
61
|
-
The `/docs` command manages the permanent `docs/` tree in your project. It operates on everything in `docs/` except `docs/in-progress/` (owned by `/work`) and auto-generated files (`project-map.mdx`, `resource-map.mdx`).
|
|
62
|
-
|
|
63
|
-
**Browse (default):** Running `/docs` with no arguments scans `docs/` recursively and presents a numbered list of user-maintained docs. Pick a number to read and discuss the doc, or say "create" or "verify."
|
|
64
|
-
|
|
65
|
-
**Create:** `/docs create [description]` runs an interview-driven flow. It asks what you want to document, determines placement, scans `src/` to pre-populate from code, and creates the file with appropriate sections.
|
|
66
|
-
|
|
67
|
-
Section templates by doc type:
|
|
68
|
-
|
|
69
|
-
- **Resource guide:** Overview, Input/Output, How It Works, Platform Tools Used, Configuration
|
|
70
|
-
- **Integration guide:** Overview, Setup (credentials), Data Model, Usage Patterns, Troubleshooting
|
|
71
|
-
- **Architecture notes:** Context, Decision, Consequences, Alternatives Considered
|
|
72
|
-
- **Process doc:** Purpose, Prerequisites, Steps, Recovery
|
|
73
|
-
|
|
74
|
-
**Verify:** `/docs verify [file?]` checks docs against current code interactively. Without an argument, it scans all user-maintained docs, cross-references resource IDs, schema fields, and platform tools against `src/`, and offers to fix or create docs for undocumented resources.
|
|
75
|
-
|
|
76
|
-
## Command Routing Reference
|
|
77
|
-
|
|
78
|
-
| Scenario | Command |
|
|
79
|
-
| --------------------------------------- | ----------------------------------------------------- |
|
|
80
|
-
| Starting new work | `/work` (auto-detects new work from your description) |
|
|
81
|
-
| Resuming yesterday's work | `/work` (auto-resumes if one task is in-progress) |
|
|
82
|
-
| Browsing what docs exist | `/docs` |
|
|
83
|
-
| Creating a reference doc (not a task) | `/docs create` |
|
|
84
|
-
| Checking if docs match current code | `/docs verify` |
|
|
85
|
-
| Full maintenance pipeline (8 steps) | `/meta fix` |
|
|
86
|
-
| Deploying code and auto-generating maps | `/meta deploy` |
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
**Last Updated:** 2026-03-06
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Roadmap
|
|
3
|
-
description: Planned SDK features -- error taxonomy, retry semantics, circuit breaker, metrics, alerting, and resource lifecycle extensions
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
**Status:** Mixed -- some features below are implemented, others remain planned. Each section notes its current status.
|
|
7
|
-
|
|
8
|
-
For currently implemented behavior, see [Runtime](runtime.mdx).
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Structured Error Taxonomy
|
|
13
|
-
|
|
14
|
-
**Status: Partially implemented.** The runtime has a structured error hierarchy (`ExecutionError`, `PlatformToolError`, `ToolingError`) with error codes and context fields. The taxonomy below describes a planned _redesign_ that is not yet implemented.
|
|
15
|
-
|
|
16
|
-
The current runtime reports errors as plain strings. A future SDK version will introduce a structured error taxonomy. All SDK errors will extend `ResourceError`, the base class for errors surfaced through the execution protocol.
|
|
17
|
-
|
|
18
|
-
Every error carries: `message` (string), `code` (string enum), `details` (optional structured data), and `retryable` (boolean).
|
|
19
|
-
|
|
20
|
-
**Error types:**
|
|
21
|
-
|
|
22
|
-
- **`ResourceError`** -- Base class for all SDK errors
|
|
23
|
-
- **`ValidationError`** -- Input or output schema validation failed. Thrown automatically when Zod `.parse()` fails. Code: `VALIDATION_ERROR`. Not retryable.
|
|
24
|
-
- **`StepError`** -- A workflow step handler threw. Includes `stepId` and `stepName`. Code: `STEP_ERROR`. Retryable (transient failures may succeed on retry).
|
|
25
|
-
- **`ToolError`** -- A tool execution failed. Includes `toolName`. Code: `TOOL_ERROR`. Retryability depends on the underlying error.
|
|
26
|
-
- **`TimeoutError`** -- Execution exceeded the deadline. Code: `TIMEOUT`. Retryable.
|
|
27
|
-
- **`CancellationError`** -- Execution was cancelled by the platform or user. Code: `CANCELLED`. Not retryable.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Retry Semantics
|
|
32
|
-
|
|
33
|
-
**Status: Planned.**
|
|
34
|
-
|
|
35
|
-
Retries are platform-side only -- workers are ephemeral and never retry internally.
|
|
36
|
-
|
|
37
|
-
- **Configuration:** Per-resource via `maxRetries` (default: 0) and `backoffStrategy` (exponential with jitter)
|
|
38
|
-
- **Retryable conditions:** Worker crash or timeout (worker terminated by `AbortSignal`)
|
|
39
|
-
- **Non-retryable conditions:** Worker reports `status: 'failed'` (handler ran and returned an error -- application logic, not infrastructure failure), user cancellation
|
|
40
|
-
- **Idempotency:** On retry, the same `executionId` is reused. Design handlers to be idempotent where possible.
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Workflow Step Failure
|
|
45
|
-
|
|
46
|
-
**Status: Planned.** The current runtime uses fail-fast behavior: when a step handler throws, the worker logs a `step-failed` context entry and re-throws the original error unchanged. The `onError` callback, `completedSteps`, and `partialOutput` features described below are not yet implemented.
|
|
47
|
-
|
|
48
|
-
Default behavior is fail-fast: when a step throws, the workflow fails immediately.
|
|
49
|
-
|
|
50
|
-
- **Error handler:** Optional `onError` callback per step. The callback receives the error and can return a recovery value or rethrow to propagate the failure.
|
|
51
|
-
- **Partial output:** Steps completed before the failure are included in the error response. The platform receives: `failedStepId`, `completedSteps[]` (IDs of successfully completed steps), and `partialOutput` (the last successful step's output).
|
|
52
|
-
|
|
53
|
-
**Proposed step error response format** (not yet implemented -- subject to change):
|
|
54
|
-
|
|
55
|
-
```json
|
|
56
|
-
{
|
|
57
|
-
"status": "failed",
|
|
58
|
-
"error": {
|
|
59
|
-
"code": "STEP_ERROR",
|
|
60
|
-
"message": "Email delivery failed: invalid address",
|
|
61
|
-
"stepId": "send-welcome",
|
|
62
|
-
"stepName": "Send Welcome Email"
|
|
63
|
-
},
|
|
64
|
-
"completedSteps": ["validate"],
|
|
65
|
-
"partialOutput": { "clientName": "Jane", "isValid": true }
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Agent Failure Modes
|
|
72
|
-
|
|
73
|
-
**Status: Planned.** Agent execution runs in ephemeral worker threads with full tool calling support via `PostMessageLLMAdapter`. The current runtime uses fail-fast behavior for all agent error paths; the richer failure handling described below is not yet implemented.
|
|
74
|
-
|
|
75
|
-
**Current behavior:** Any unhandled error from the agent (including `AgentMaxIterationsError` thrown by `@repo/core` when the iteration limit is reached) propagates out of the worker and is reported as a failed execution. The worker sends: `{ type: 'result', status: 'failed', error: 'ErrorName: message', logs, metrics: { durationMs } }`. There is no graceful termination, partial output, or retry logic in the worker itself.
|
|
76
|
-
|
|
77
|
-
**Planned improvements:**
|
|
78
|
-
|
|
79
|
-
- **Max iterations reached:** Instead of throwing, the agent returns the best output produced so far, plus a warning flag (`maxIterationsReached: true`). This becomes a graceful termination rather than a failure.
|
|
80
|
-
- **Tool crash:** Tool errors are caught by the SDK runtime, formatted as a tool result, and sent back to the LLM. The LLM decides whether to retry, try a different approach, or give up.
|
|
81
|
-
- **Model refusal:** If the model refuses the prompt, the SDK retries once with an adjusted system prompt. If the retry also refuses, the agent fails with `code: 'MODEL_REFUSAL'`.
|
|
82
|
-
- **Model API error:** Network errors, rate limits, or server errors from the model provider. The SDK retries with exponential backoff (3 attempts, 1s/2s/4s), then fails with `code: 'MODEL_ERROR'`.
|
|
83
|
-
- **Agent error response includes:** `iterationCount` (LLM iterations completed), `toolCallHistory` (array of tool calls made), `lastModelResponse` (final response from the LLM before failure).
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## Circuit Breaker
|
|
88
|
-
|
|
89
|
-
**Status: Planned.**
|
|
90
|
-
|
|
91
|
-
The platform will implement a circuit breaker to prevent runaway failures:
|
|
92
|
-
|
|
93
|
-
- **Trip condition:** 5 consecutive failures on the same resource within a 10-minute window
|
|
94
|
-
- **Action:** Pause executions for 60 seconds. New execution requests for that resource return `503` with: "Resource temporarily unavailable (circuit breaker tripped)"
|
|
95
|
-
- **Auto-recovery:** After the 60-second pause, the next execution attempt is allowed through. If it succeeds, the circuit breaker resets. If it fails, the pause extends (120s, then 240s, capped at 5 minutes).
|
|
96
|
-
- **Alerting:** You are notified via webhook callback or email when the circuit breaker trips. Configurable per organization.
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Metrics
|
|
101
|
-
|
|
102
|
-
**Status: Planned.**
|
|
103
|
-
|
|
104
|
-
### Auto-Collected
|
|
105
|
-
|
|
106
|
-
The SDK runtime and platform will automatically collect these metrics for every execution:
|
|
107
|
-
|
|
108
|
-
- `execution_duration_ms` -- Total wall-clock time from request received to result sent
|
|
109
|
-
- `step_duration_ms` -- Per-step timing for workflows (array of `{ stepId, durationMs }`)
|
|
110
|
-
- `iteration_count` -- Number of LLM loop iterations for agents
|
|
111
|
-
- `ai_token_usage` -- Token counts per model call: `{ prompt_tokens, completion_tokens, total_tokens }`
|
|
112
|
-
- `ai_cost_usd` -- Calculated from model pricing multiplied by token usage
|
|
113
|
-
- `tool_call_count` -- Total number of tool invocations during the execution
|
|
114
|
-
- `tool_call_duration_ms` -- Per-tool timing (array of `{ toolName, durationMs }`)
|
|
115
|
-
- `error_count` -- Number of errors encountered (including recovered errors)
|
|
116
|
-
|
|
117
|
-
### Cost Attribution
|
|
118
|
-
|
|
119
|
-
Metrics are aggregated at multiple levels:
|
|
120
|
-
|
|
121
|
-
- **Per-execution:** Total AI spend and total duration
|
|
122
|
-
- **Per-resource:** Aggregated over configurable time periods (daily, weekly, monthly)
|
|
123
|
-
- **Per-organization:** Total platform cost (execution time + AI spend + managed hosting compute)
|
|
124
|
-
- **Visibility:** Platform dashboard and the CLI via `elevasis-sdk executions <resourceId>`
|
|
125
|
-
|
|
126
|
-
### Developer-Defined Metrics
|
|
127
|
-
|
|
128
|
-
A future SDK version will support custom metrics emitted from your handlers:
|
|
129
|
-
|
|
130
|
-
- `sdk.metrics.counter('custom_name', value)` -- Increment a counter
|
|
131
|
-
- `sdk.metrics.gauge('queue_depth', value)` -- Set a point-in-time gauge value
|
|
132
|
-
- Custom metrics are stored alongside auto-collected metrics and queryable through the same APIs
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Alerting
|
|
137
|
-
|
|
138
|
-
**Status: Planned.**
|
|
139
|
-
|
|
140
|
-
Developer-configurable alerts for production monitoring:
|
|
141
|
-
|
|
142
|
-
- **Error rate threshold:** Notify when more than X% of executions fail within Y minutes
|
|
143
|
-
- **Latency percentile:** Notify when p95 execution duration exceeds a threshold
|
|
144
|
-
- **Cost budget:** Notify when daily or weekly AI spend exceeds a configured limit
|
|
145
|
-
- **Channel:** Webhook callback to a developer-provided URL (integrates with Slack, PagerDuty, and similar services via webhook)
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Resource Lifecycle Extensions
|
|
150
|
-
|
|
151
|
-
**Status: Planned.**
|
|
152
|
-
|
|
153
|
-
### Deprecation Status
|
|
154
|
-
|
|
155
|
-
Beyond the current `dev` and `prod` statuses, two additional statuses are planned:
|
|
156
|
-
|
|
157
|
-
- **`deprecated`** -- Marked via the platform UI. Existing executions continue working. New executions show a warning: "This resource is deprecated." The resource still appears in the platform and can still be triggered.
|
|
158
|
-
- **`offline`** -- Set automatically when a deployment is unregistered (for example, after a failed deploy or explicit deletion). Clears automatically on the next successful deploy. No executions are accepted while a resource is offline.
|
|
159
|
-
|
|
160
|
-
Deprecation requires no automatic removal -- the developer must explicitly delete the resource to remove it.
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
**Last Updated:** 2026-03-08
|