@elevasis/sdk 0.5.13 → 0.5.15
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 +745 -409
- package/dist/index.d.ts +32 -0
- package/dist/index.js +68 -0
- package/dist/templates.js +254 -37
- package/dist/worker/index.js +3 -7
- package/package.json +1 -1
- package/reference/cli.mdx +568 -505
- package/reference/concepts.mdx +4 -43
- package/reference/deployment/api.mdx +297 -297
- package/reference/deployment/command-center.mdx +9 -12
- package/reference/deployment/index.mdx +7 -7
- package/reference/framework/agent.mdx +6 -18
- package/reference/framework/interaction-guidance.mdx +182 -182
- package/reference/framework/memory.mdx +3 -24
- package/reference/framework/project-structure.mdx +277 -298
- package/reference/framework/tutorial-system.mdx +13 -44
- package/reference/getting-started.mdx +152 -148
- package/reference/index.mdx +28 -14
- package/reference/platform-tools/adapters.mdx +868 -1072
- package/reference/platform-tools/index.mdx +3 -3
- package/reference/resources/index.mdx +339 -341
- package/reference/resources/patterns.mdx +355 -354
- package/reference/resources/types.mdx +207 -207
- package/reference/roadmap.mdx +163 -147
- package/reference/runtime.mdx +2 -25
- package/reference/troubleshooting.mdx +223 -210
|
@@ -3,11 +3,7 @@ title: Tutorial System
|
|
|
3
3
|
description: Reference for the SDK tutorial system -- 21-item menu across 4 sections, skill-level adaptation rules, progress tracking format, and per-lesson module contents
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
**Template Version:** 27
|
|
9
|
-
|
|
10
|
-
The tutorial system is emitted to `external/<project>/.claude/commands/tutorial.md` during `elevasis-sdk init` or `elevasis-sdk update`. Users invoke it with `/tutorial` from Claude Code.
|
|
6
|
+
The tutorial system is available via the `/tutorial` slash command in Claude Code. It is scaffolded by `elevasis-sdk init` and updated by `elevasis-sdk update`.
|
|
11
7
|
|
|
12
8
|
---
|
|
13
9
|
|
|
@@ -149,7 +145,7 @@ Each lesson: (1) announce title and goal, (2) explain concept per skill level, (
|
|
|
149
145
|
**Lesson 10 -- Going to Production**
|
|
150
146
|
|
|
151
147
|
- `automation: none` -- "Draft vs live." Create Recurring schedule in Task Scheduler.
|
|
152
|
-
- `automation: low-code or custom` -- Change `status: dev` -> `
|
|
148
|
+
- `automation: low-code or custom` -- Change `status: dev` -> `prod`. Cover `try/catch`, `ExecutionError`, `PlatformToolError`. CLI monitoring: `elevasis-sdk executions`.
|
|
153
149
|
|
|
154
150
|
---
|
|
155
151
|
|
|
@@ -157,17 +153,17 @@ Each lesson: (1) announce title and goal, (2) explain concept per skill level, (
|
|
|
157
153
|
|
|
158
154
|
Modules are available any time -- no core path prerequisite. After completing a module the full menu table is shown again.
|
|
159
155
|
|
|
160
|
-
| # | Module | Reference Docs | Build
|
|
161
|
-
| --- | ---------------- | ---------------------------------------------------------------- |
|
|
162
|
-
| 11 | `hitl` | `command-center.mdx` (Command Queue) | Approval gate with `approval.
|
|
163
|
-
| 12 | `schedules` | `command-center.mdx` (Task Scheduler) | All three schedule types: Recurring, Relative, Absolute. `scheduler` adapter for in-workflow.
|
|
164
|
-
| 13 | `notifications` | `adapters.mdx` (notifications, email) | Notification + email steps. Alerts on completion.
|
|
165
|
-
| 14 | `integrations` | `platform-tools/index.mdx` (Credential Security), `adapters.mdx` | Real adapter from `identity.md`. Full end-to-end with OAuth or API key credential.
|
|
166
|
-
| 15 | `error-handling` | `patterns.mdx` (error handling), `troubleshooting.mdx` | Workflow demonstrating all three error types. `try/catch`, `context.logger`, recovery.
|
|
167
|
-
| 16 | `workflows` | `patterns.mdx` (store, logging, organization) | Refactor with `context.store`, `context.logger`, domain directories. Advanced schema patterns.
|
|
168
|
-
| 17 | `composition` | `command-center.mdx` (Command View), `patterns.mdx` | Two workflows: first triggers second with `execution.trigger()`. Declare relationship.
|
|
169
|
-
| 18 | `llm` | `adapters.mdx` (llm singleton) | `llm.generate()` with structured output. Model selection and temperature.
|
|
170
|
-
| 19 | `agents` | `
|
|
156
|
+
| # | Module | Reference Docs | Build | Key Concepts |
|
|
157
|
+
| --- | ---------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
|
|
158
|
+
| 11 | `hitl` | `command-center.mdx` (Command Queue) | Approval gate with `approval.create()`. Full lifecycle: trigger -> Command Queue -> approve/reject -> resume. | `approval` adapter, pending state, Command Queue UI |
|
|
159
|
+
| 12 | `schedules` | `command-center.mdx` (Task Scheduler) | All three schedule types: Recurring, Relative, Absolute. `scheduler` adapter for in-workflow. | Cron syntax, schedule types, Task Scheduler UI |
|
|
160
|
+
| 13 | `notifications` | `adapters.mdx` (notifications, email) | Notification + email steps. Alerts on completion. | `notifications` singleton, `email` singleton |
|
|
161
|
+
| 14 | `integrations` | `platform-tools/index.mdx` (Credential Security), `adapters.mdx` | Real adapter from `identity.md`. Full end-to-end with OAuth or API key credential. | Adapter pattern, credential scoping, external call error handling |
|
|
162
|
+
| 15 | `error-handling` | `patterns.mdx` (error handling), `troubleshooting.mdx` | Workflow demonstrating all three error types. `try/catch`, `context.logger`, recovery. | `ExecutionError`, `PlatformToolError`, `ToolingError` |
|
|
163
|
+
| 16 | `workflows` | `patterns.mdx` (store, logging, organization) | Refactor with `context.store`, `context.logger`, domain directories. Advanced schema patterns. | `context.store`, `context.logger`, schema depth |
|
|
164
|
+
| 17 | `composition` | `command-center.mdx` (Command View), `patterns.mdx` | Two workflows: first triggers second with `execution.trigger()`. Declare relationship. | `execution.trigger`, relationship declarations, Command View edges |
|
|
165
|
+
| 18 | `llm` | `adapters.mdx` (llm singleton) | `llm.generate()` with structured output. Model selection and temperature. | `llm` singleton, structured output, temperature |
|
|
166
|
+
| 19 | `agents` | `framework/agent.mdx` | Agent definition with tools. LLM tool calling. Agent vs workflow comparison. | Agent definition, tool registration, execution trace |
|
|
171
167
|
|
|
172
168
|
---
|
|
173
169
|
|
|
@@ -221,33 +217,6 @@ Last Session: YYYY-MM-DD
|
|
|
221
217
|
- Strong automation background, slow on TypeScript syntax
|
|
222
218
|
```
|
|
223
219
|
|
|
224
|
-
**Backward compatibility:** Missing `Completed Modules` section treated as empty. Old files with `Completed MF Lessons` map entries to items 2-4 and 20-21 by title match.
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
## Implementation Files
|
|
229
|
-
|
|
230
|
-
| File | Role |
|
|
231
|
-
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
232
|
-
| `packages/sdk/src/cli/commands/templates/core/claude.ts` | `claudeTutorialCommandTemplate()` -- full tutorial prompt; `claudeMdTemplate()` -- Platform Navigation guidance; `claudeMetaCommandTemplate()` -- onboarding assessment |
|
|
233
|
-
| `packages/sdk/src/cli/commands/templates/core/workspace.ts` | `TEMPLATE_VERSION = 27` |
|
|
234
|
-
| `packages/sdk/src/cli/commands/init.ts` | `TEMPLATE_CHANGELOG` -- version history (v1-v27) |
|
|
235
|
-
| `apps/docs/content/docs/sdk/framework/interaction-guidance.mdx` | Skill dimensions: automation, platformNavigation |
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## Template Version History (Recent)
|
|
240
|
-
|
|
241
|
-
| Version | Change |
|
|
242
|
-
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
243
|
-
| 27 | 4-section menu redesign: INTRODUCTION (1-4), CORE CONCEPTS (5-10), ADVANCED MODULES (11-19), ADVANCED WORKSPACE (20-21); MF1-MF3 moved to front as items 2-4 |
|
|
244
|
-
| 23 | Flat 21-item menu table; module gating removed; error-handling moved to position 12 |
|
|
245
|
-
| 22 | `/docs` command re-introduced; MF3 covers `/work` and `/docs` together |
|
|
246
|
-
| 20 | `/work` comprehensive rewrite -- list-then-pick, interview-based create, intelligent placement |
|
|
247
|
-
| 19 | Menu-driven entry; Meta-Framework track (MF1-MF5) with skill-adaptive variants |
|
|
248
|
-
| 18 | Skill-adaptive lesson variants; Command Center UI integrated; Platform Navigation dimension |
|
|
249
|
-
| 16 | Module system; single `/tutorial` invocation; phase tracking |
|
|
250
|
-
|
|
251
220
|
---
|
|
252
221
|
|
|
253
222
|
**Last Updated:** 2026-03-05
|
|
@@ -1,148 +1,152 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Getting Started
|
|
3
|
-
description: Install the Elevasis SDK, scaffold a project, and run your first deployment
|
|
4
|
-
loadWhen: "Setting up a new project or onboarding"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
**Prerequisites:** Node.js 20+ and pnpm (`npm install -g pnpm`).
|
|
8
|
-
|
|
9
|
-
## Create a Project
|
|
10
|
-
|
|
11
|
-
Scaffold a new project and install dependencies:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
pnpm dlx @elevasis/sdk init my-project
|
|
15
|
-
cd my-project
|
|
16
|
-
pnpm install
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
`pnpm dlx` downloads the SDK temporarily to run `elevasis-sdk init`, which scaffolds your project with a working echo workflow, TypeScript config, and Claude Code integration. `pnpm install` then installs the SDK and its dependencies locally -- after that, all `elevasis-sdk` commands work directly via the scripts in `package.json` or `pnpm exec elevasis-sdk <command>`.
|
|
20
|
-
|
|
21
|
-
The command scaffolds
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
my-project/
|
|
25
|
-
├── CLAUDE.md # Project instructions for Claude Code
|
|
26
|
-
├── .claude/
|
|
27
|
-
│ ├── settings.json # autoCompact: false
|
|
28
|
-
│ ├── commands/
|
|
29
|
-
│ │ ├── docs.md # Documentation lifecycle
|
|
30
|
-
│ │ ├── meta.md # Project lifecycle (init, fix, deploy, health)
|
|
31
|
-
│ │ ├── tutorial.md # Progressive learning
|
|
32
|
-
│ │ └── work.md # Task tracking
|
|
33
|
-
│ ├──
|
|
34
|
-
│ │ └──
|
|
35
|
-
│
|
|
36
|
-
│
|
|
37
|
-
│
|
|
38
|
-
│
|
|
39
|
-
│
|
|
40
|
-
│ ├──
|
|
41
|
-
│
|
|
42
|
-
├──
|
|
43
|
-
│
|
|
44
|
-
│
|
|
45
|
-
│
|
|
46
|
-
|
|
47
|
-
│ ├──
|
|
48
|
-
│
|
|
49
|
-
│ │
|
|
50
|
-
│ └──
|
|
51
|
-
│
|
|
52
|
-
├──
|
|
53
|
-
│
|
|
54
|
-
│ └──
|
|
55
|
-
│ └── .gitkeep #
|
|
56
|
-
├──
|
|
57
|
-
├──
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
├── .
|
|
61
|
-
├── .
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
1
|
+
---
|
|
2
|
+
title: Getting Started
|
|
3
|
+
description: Install the Elevasis SDK, scaffold a project, and run your first deployment
|
|
4
|
+
loadWhen: "Setting up a new project or onboarding"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Prerequisites:** Node.js 20+ and pnpm (`npm install -g pnpm`).
|
|
8
|
+
|
|
9
|
+
## Create a Project
|
|
10
|
+
|
|
11
|
+
Scaffold a new project and install dependencies:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm dlx @elevasis/sdk init my-project
|
|
15
|
+
cd my-project
|
|
16
|
+
pnpm install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`pnpm dlx` downloads the SDK temporarily to run `elevasis-sdk init`, which scaffolds your project with a working echo workflow, TypeScript config, and Claude Code integration. `pnpm install` then installs the SDK and its dependencies locally -- after that, all `elevasis-sdk` commands work directly via the scripts in `package.json` or `pnpm exec elevasis-sdk <command>`.
|
|
20
|
+
|
|
21
|
+
The command scaffolds 30 files covering configuration, source, documentation, and Claude Code integration:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
my-project/
|
|
25
|
+
├── CLAUDE.md # Project instructions for Claude Code
|
|
26
|
+
├── .claude/
|
|
27
|
+
│ ├── settings.json # autoCompact: false
|
|
28
|
+
│ ├── commands/
|
|
29
|
+
│ │ ├── docs.md # Documentation lifecycle
|
|
30
|
+
│ │ ├── meta.md # Project lifecycle (init, fix, deploy, health)
|
|
31
|
+
│ │ ├── tutorial.md # Progressive learning
|
|
32
|
+
│ │ └── work.md # Task tracking
|
|
33
|
+
│ ├── hooks/
|
|
34
|
+
│ │ └── enforce-sdk-boundary.mjs # Blocks destructive commands (auto-loaded)
|
|
35
|
+
│ ├── scripts/
|
|
36
|
+
│ │ └── statusline-command.js # Dynamic status line script
|
|
37
|
+
│ ├── skills/
|
|
38
|
+
│ │ └── creds/SKILL.md # Credential management (auto-triggers)
|
|
39
|
+
│ └── rules/
|
|
40
|
+
│ ├── sdk-patterns.md # SDK imports, structure, runtime (auto-loaded)
|
|
41
|
+
│ ├── docs-authoring.md # MDX conventions (auto-loaded)
|
|
42
|
+
│ ├── memory-conventions.md # Memory system conventions (auto-loaded)
|
|
43
|
+
│ ├── project-map.md # Project map conventions (auto-loaded)
|
|
44
|
+
│ ├── task-tracking.md # Task tracking conventions (auto-loaded)
|
|
45
|
+
│ └── workspace-patterns.md # Project-specific patterns (you add these)
|
|
46
|
+
├── src/
|
|
47
|
+
│ ├── index.ts # Registry entry point (aggregates domain barrels)
|
|
48
|
+
│ ├── operations/
|
|
49
|
+
│ │ ├── index.ts # Domain barrel (exports workflows + agents)
|
|
50
|
+
│ │ └── platform-status.ts # Platform status workflow (real API example)
|
|
51
|
+
│ ├── example/
|
|
52
|
+
│ │ ├── index.ts # Domain barrel (exports workflows + agents)
|
|
53
|
+
│ │ └── echo.ts # Starter workflow (replace with your own)
|
|
54
|
+
│ └── shared/
|
|
55
|
+
│ └── .gitkeep # Cross-domain shared utilities
|
|
56
|
+
├── docs/
|
|
57
|
+
│ ├── index.mdx # Starter documentation page
|
|
58
|
+
│ └── in-progress/
|
|
59
|
+
│ └── .gitkeep # Work-in-progress docs directory
|
|
60
|
+
├── elevasis.config.ts # Config with templateVersion and options
|
|
61
|
+
├── package.json # check-types + deploy scripts
|
|
62
|
+
├── tsconfig.json # TypeScript config (app-focused)
|
|
63
|
+
├── pnpm-workspace.yaml # Standalone project workspace
|
|
64
|
+
├── .env # API key only
|
|
65
|
+
├── .npmrc # auto-install-peers
|
|
66
|
+
└── .gitignore # Excludes worker temp file, claude files
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The scaffolded `elevasis.config.ts` includes a `templateVersion` field that tracks which template generation your project uses. Leave it as-is -- it is managed automatically by `elevasis-sdk update`:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import type { ElevasConfig } from '@elevasis/sdk'
|
|
73
|
+
|
|
74
|
+
export default {
|
|
75
|
+
templateVersion: 27,
|
|
76
|
+
} satisfies ElevasConfig
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Set Up Your API Key
|
|
80
|
+
|
|
81
|
+
Open `.env` and set your API key:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
ELEVASIS_PLATFORM_KEY=sk_your_key_here
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The `.env` file is gitignored -- never commit it.
|
|
88
|
+
|
|
89
|
+
**Note:** Do not add `NODE_ENV` to your `.env`. The SDK treats `undefined` as production by default, which means your project connects to the hosted Elevasis API. Adding `NODE_ENV=development` is the most common setup mistake.
|
|
90
|
+
|
|
91
|
+
### Guided Setup with Claude Code
|
|
92
|
+
|
|
93
|
+
After scaffolding, open the project in Claude Code. The agent detects that the project is new and automatically walks you through setup: installing dependencies, configuring `.env`, creating your developer profile in `.claude/memory/`, and optionally running your first deploy. No commands needed -- just answer the questions.
|
|
94
|
+
|
|
95
|
+
If the automatic setup doesn't trigger, you can start it manually with `/meta init`.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## First Deployment
|
|
100
|
+
|
|
101
|
+
Validate your resources and deploy:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
elevasis-sdk check # Validate resource definitions
|
|
105
|
+
elevasis-sdk deploy # Bundle and deploy to the platform
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`elevasis-sdk check` runs validation without deploying. Fix any errors it reports before running `elevasis-sdk deploy`.
|
|
109
|
+
|
|
110
|
+
`elevasis-sdk deploy` bundles your `src/` code and `docs/` documentation into a single deployment transaction. Both ship atomically -- there is no separate upload step for documentation.
|
|
111
|
+
|
|
112
|
+
After a successful deploy, confirm the resources are live:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
elevasis-sdk resources # List deployed resources
|
|
116
|
+
elevasis-sdk deployments # Show deployment history
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## First Execution
|
|
122
|
+
|
|
123
|
+
Execute the scaffolded echo workflow to verify end-to-end connectivity:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
elevasis-sdk exec echo --input '{"message": "hello"}'
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
View the execution result:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
elevasis-sdk executions echo # Execution history
|
|
133
|
+
elevasis-sdk execution echo \<execution-id\> # Full detail for one execution
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Replace `<execution-id>` with the ID returned from the executions list.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Next Steps
|
|
141
|
+
|
|
142
|
+
- **Open in Claude Code** -- Setup runs automatically on first session (installs deps, configures `.env`, creates your developer profile)
|
|
143
|
+
- [Development Framework](framework/index.mdx) -- How Claude Code helps you build
|
|
144
|
+
- [Resources](resources/index.mdx) -- Define workflows and agents
|
|
145
|
+
- [CLI Reference](cli.mdx) -- Full command reference with flags
|
|
146
|
+
- [Deployment](deployment/index.mdx) -- Deployment lifecycle and environment variables
|
|
147
|
+
|
|
148
|
+
When a new SDK version is released, run `/meta fix` in Claude Code for an interactive upgrade that includes SDK update, drift repair, and documentation verification. Alternatively, run `elevasis-sdk update` from the terminal to update managed files (CLAUDE.md, slash commands, `.gitignore`) without agent interaction. To update the SDK package itself, run `pnpm update @elevasis/sdk`.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
**Last Updated:** 2026-02-27
|
package/reference/index.mdx
CHANGED
|
@@ -20,35 +20,49 @@ After `pnpm dlx @elevasis/sdk init`, your project is scaffolded with a working e
|
|
|
20
20
|
Here is a minimal workflow definition:
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
-
import { WorkflowDefinition, OrganizationResources } from '@elevasis/sdk';
|
|
23
|
+
import type { WorkflowDefinition, OrganizationResources } from '@elevasis/sdk';
|
|
24
24
|
import { z } from 'zod';
|
|
25
25
|
|
|
26
26
|
const greetInput = z.object({ name: z.string() });
|
|
27
27
|
const greetOutput = z.object({ message: z.string() });
|
|
28
28
|
|
|
29
29
|
type GreetInput = z.infer<typeof greetInput>;
|
|
30
|
-
type GreetOutput = z.infer<typeof greetOutput>;
|
|
31
30
|
|
|
32
31
|
const greetWorkflow: WorkflowDefinition = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
config: {
|
|
33
|
+
resourceId: 'greet',
|
|
34
|
+
name: 'Greet',
|
|
35
|
+
type: 'workflow',
|
|
36
|
+
description: 'Returns a greeting for the given name',
|
|
37
|
+
version: '1.0.0',
|
|
38
|
+
status: 'dev',
|
|
39
|
+
},
|
|
40
|
+
contract: {
|
|
41
|
+
inputSchema: greetInput,
|
|
42
|
+
outputSchema: greetOutput,
|
|
43
|
+
},
|
|
44
|
+
steps: {
|
|
45
|
+
greet: {
|
|
46
|
+
id: 'greet',
|
|
40
47
|
name: 'Build greeting',
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
description: 'Returns a greeting message',
|
|
49
|
+
handler: async (input) => {
|
|
50
|
+
const { name } = input as GreetInput;
|
|
51
|
+
return { message: `Hello, ${name}!` };
|
|
43
52
|
},
|
|
53
|
+
inputSchema: greetInput,
|
|
54
|
+
outputSchema: greetOutput,
|
|
44
55
|
next: null,
|
|
45
56
|
},
|
|
46
|
-
|
|
57
|
+
},
|
|
58
|
+
entryPoint: 'greet',
|
|
47
59
|
};
|
|
48
60
|
|
|
49
|
-
|
|
61
|
+
const org: OrganizationResources = {
|
|
50
62
|
workflows: [greetWorkflow],
|
|
51
63
|
};
|
|
64
|
+
|
|
65
|
+
export default org;
|
|
52
66
|
```
|
|
53
67
|
|
|
54
68
|
## What You Can Build
|
|
@@ -71,7 +85,7 @@ const result = await platform.call({
|
|
|
71
85
|
});
|
|
72
86
|
```
|
|
73
87
|
|
|
74
|
-
The platform exposes 70+ tools across
|
|
88
|
+
The platform exposes 70+ tools across 12 integration adapters -- Gmail, Stripe, Google Sheets, Notion, and more. Credentials are managed server-side; API keys never cross the execution boundary. LLM calls are also available via `platform.call({ tool: 'llm', ... })` with API keys resolved from platform environment variables.
|
|
75
89
|
|
|
76
90
|
See [Platform Tools](platform-tools/index.mdx) for the full catalog.
|
|
77
91
|
|