@elevasis/sdk 0.7.11 → 0.7.13
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 +1 -1
- package/dist/index.d.ts +54 -18
- package/dist/types/worker/adapters/lead.d.ts +1 -1
- package/dist/types/worker/adapters/llm.d.ts +6 -7
- package/dist/worker/index.js +1 -0
- package/package.json +1 -1
- package/reference/_navigation.md +4 -2
- package/reference/concepts.mdx +3 -21
- package/reference/framework/tutorial-system.mdx +16 -16
- package/reference/index.mdx +21 -64
- package/reference/platform-tools/adapters-integration.mdx +342 -0
- package/reference/platform-tools/adapters-platform.mdx +494 -0
- package/reference/platform-tools/index.mdx +23 -159
- package/reference/templates/index.mdx +47 -0
- package/reference/platform-tools/adapters.mdx +0 -907
package/dist/cli.cjs
CHANGED
|
@@ -43883,7 +43883,7 @@ function wrapAction(commandName, fn) {
|
|
|
43883
43883
|
// package.json
|
|
43884
43884
|
var package_default = {
|
|
43885
43885
|
name: "@elevasis/sdk",
|
|
43886
|
-
version: "0.7.
|
|
43886
|
+
version: "0.7.13",
|
|
43887
43887
|
description: "SDK for building Elevasis organization resources",
|
|
43888
43888
|
type: "module",
|
|
43889
43889
|
bin: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1570,6 +1570,8 @@ type Database = {
|
|
|
1570
1570
|
activities: {
|
|
1571
1571
|
Row: {
|
|
1572
1572
|
activity_type: string;
|
|
1573
|
+
actor_id: string | null;
|
|
1574
|
+
actor_type: string | null;
|
|
1573
1575
|
created_at: string;
|
|
1574
1576
|
description: string | null;
|
|
1575
1577
|
entity_id: string;
|
|
@@ -1584,6 +1586,8 @@ type Database = {
|
|
|
1584
1586
|
};
|
|
1585
1587
|
Insert: {
|
|
1586
1588
|
activity_type: string;
|
|
1589
|
+
actor_id?: string | null;
|
|
1590
|
+
actor_type?: string | null;
|
|
1587
1591
|
created_at?: string;
|
|
1588
1592
|
description?: string | null;
|
|
1589
1593
|
entity_id: string;
|
|
@@ -1598,6 +1602,8 @@ type Database = {
|
|
|
1598
1602
|
};
|
|
1599
1603
|
Update: {
|
|
1600
1604
|
activity_type?: string;
|
|
1605
|
+
actor_id?: string | null;
|
|
1606
|
+
actor_type?: string | null;
|
|
1601
1607
|
created_at?: string;
|
|
1602
1608
|
description?: string | null;
|
|
1603
1609
|
entity_id?: string;
|
|
@@ -3580,7 +3586,6 @@ interface ContactFilters {
|
|
|
3580
3586
|
openingLineIsNull?: boolean;
|
|
3581
3587
|
pipelineStatus?: Record<string, unknown>;
|
|
3582
3588
|
batchId?: string;
|
|
3583
|
-
excludeInvalidCompanies?: boolean;
|
|
3584
3589
|
contactStatus?: 'active' | 'invalid';
|
|
3585
3590
|
}
|
|
3586
3591
|
interface UpsertDealParams {
|
|
@@ -4752,21 +4757,36 @@ interface CreateCampaignParams {
|
|
|
4752
4757
|
name: string;
|
|
4753
4758
|
sequences?: Array<{
|
|
4754
4759
|
steps: Array<{
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
variants
|
|
4760
|
+
type?: string;
|
|
4761
|
+
delay?: number;
|
|
4762
|
+
variants: Array<{
|
|
4758
4763
|
subject: string;
|
|
4759
4764
|
body: string;
|
|
4765
|
+
v_disabled?: boolean;
|
|
4760
4766
|
}>;
|
|
4761
4767
|
}>;
|
|
4762
4768
|
}>;
|
|
4763
4769
|
email_list?: string[];
|
|
4770
|
+
campaign_schedule?: {
|
|
4771
|
+
schedules: Array<{
|
|
4772
|
+
name: string;
|
|
4773
|
+
timing: {
|
|
4774
|
+
from: string;
|
|
4775
|
+
to: string;
|
|
4776
|
+
};
|
|
4777
|
+
days: Record<string, boolean>;
|
|
4778
|
+
timezone: string;
|
|
4779
|
+
}>;
|
|
4780
|
+
};
|
|
4764
4781
|
daily_limit?: number;
|
|
4782
|
+
daily_max_leads?: number;
|
|
4765
4783
|
stop_on_reply?: boolean;
|
|
4766
4784
|
stop_on_auto_reply?: boolean;
|
|
4785
|
+
stop_for_company?: boolean;
|
|
4767
4786
|
track_opens?: boolean;
|
|
4768
4787
|
track_clicks?: boolean;
|
|
4769
4788
|
text_only?: boolean;
|
|
4789
|
+
first_email_text_only?: boolean;
|
|
4770
4790
|
}
|
|
4771
4791
|
/**
|
|
4772
4792
|
* Create campaign result
|
|
@@ -4890,7 +4910,7 @@ interface MailsoVerifyEmailResult {
|
|
|
4890
4910
|
}
|
|
4891
4911
|
|
|
4892
4912
|
interface FindCompanyEmailParams {
|
|
4893
|
-
domain
|
|
4913
|
+
domain: string;
|
|
4894
4914
|
company_name?: string;
|
|
4895
4915
|
email_type?: 'personal' | 'generic' | 'all';
|
|
4896
4916
|
}
|
|
@@ -4901,7 +4921,7 @@ interface FindCompanyEmailResult {
|
|
|
4901
4921
|
[key: string]: unknown;
|
|
4902
4922
|
}
|
|
4903
4923
|
interface FindPersonEmailParams {
|
|
4904
|
-
domain
|
|
4924
|
+
domain: string;
|
|
4905
4925
|
company_name?: string;
|
|
4906
4926
|
full_name?: string;
|
|
4907
4927
|
first_name?: string;
|
|
@@ -5992,6 +6012,14 @@ type LeadToolMap = {
|
|
|
5992
6012
|
params: Omit<BulkImportParams, 'organizationId'>;
|
|
5993
6013
|
result: BulkImportResult;
|
|
5994
6014
|
};
|
|
6015
|
+
deactivateContactsByCompany: {
|
|
6016
|
+
params: {
|
|
6017
|
+
companyId: string;
|
|
6018
|
+
};
|
|
6019
|
+
result: {
|
|
6020
|
+
deactivated: number;
|
|
6021
|
+
};
|
|
6022
|
+
};
|
|
5995
6023
|
upsertDeal: {
|
|
5996
6024
|
params: Omit<UpsertDealParams, 'organizationId'>;
|
|
5997
6025
|
result: AcqDeal;
|
|
@@ -6128,7 +6156,7 @@ type ApprovalToolMap = {
|
|
|
6128
6156
|
confirmationMessage?: string;
|
|
6129
6157
|
description?: string;
|
|
6130
6158
|
}>;
|
|
6131
|
-
context: unknown
|
|
6159
|
+
context: Record<string, unknown>;
|
|
6132
6160
|
description?: string;
|
|
6133
6161
|
priority?: number;
|
|
6134
6162
|
humanCheckpoint?: string;
|
|
@@ -6179,15 +6207,24 @@ type EmailToolMap = {
|
|
|
6179
6207
|
subject: string;
|
|
6180
6208
|
html?: string;
|
|
6181
6209
|
text?: string;
|
|
6182
|
-
userIds?: string[];
|
|
6183
|
-
targetRole?: string;
|
|
6184
|
-
targetAll?: boolean;
|
|
6185
6210
|
replyTo?: string;
|
|
6186
6211
|
tags?: Array<{
|
|
6187
6212
|
name: string;
|
|
6188
6213
|
value: string;
|
|
6189
6214
|
}>;
|
|
6190
|
-
}
|
|
6215
|
+
} & ({
|
|
6216
|
+
userIds: string[];
|
|
6217
|
+
targetRole?: never;
|
|
6218
|
+
targetAll?: never;
|
|
6219
|
+
} | {
|
|
6220
|
+
targetRole: string;
|
|
6221
|
+
userIds?: never;
|
|
6222
|
+
targetAll?: never;
|
|
6223
|
+
} | {
|
|
6224
|
+
targetAll: true;
|
|
6225
|
+
userIds?: never;
|
|
6226
|
+
targetRole?: never;
|
|
6227
|
+
});
|
|
6191
6228
|
result: {
|
|
6192
6229
|
sent: number;
|
|
6193
6230
|
failed: number;
|
|
@@ -6842,15 +6879,14 @@ declare class RegistryValidationError extends Error {
|
|
|
6842
6879
|
type LLMProvider = 'openai' | 'anthropic' | 'openrouter' | 'google';
|
|
6843
6880
|
/**
|
|
6844
6881
|
* SDK LLM generate params.
|
|
6845
|
-
* Extends LLMGenerateRequest with
|
|
6846
|
-
*
|
|
6847
|
-
* When omitted, the resource's default ModelConfig is used.
|
|
6882
|
+
* Extends LLMGenerateRequest with required provider/model for worker→platform dispatch.
|
|
6883
|
+
* Provider and model must always be specified explicitly — no implicit fallback.
|
|
6848
6884
|
*/
|
|
6849
6885
|
interface SDKLLMGenerateParams extends Omit<LLMGenerateRequest, 'signal' | 'responseSchema'> {
|
|
6850
|
-
/** LLM provider
|
|
6851
|
-
provider
|
|
6852
|
-
/** Model identifier — must be a supported LLMModel
|
|
6853
|
-
model
|
|
6886
|
+
/** LLM provider */
|
|
6887
|
+
provider: LLMProvider;
|
|
6888
|
+
/** Model identifier — must be a supported LLMModel */
|
|
6889
|
+
model: LLMModel;
|
|
6854
6890
|
/** JSON Schema for structured output (optional — omit for unstructured text) */
|
|
6855
6891
|
responseSchema?: unknown;
|
|
6856
6892
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Typed wrapper over platform.call() for acquisition lead management.
|
|
5
5
|
* Singleton export -- no credential needed (platform tool).
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* 37 methods covering lists, companies, contacts, deals, deal-sync, and enrichment operations.
|
|
8
8
|
* organizationId is injected server-side by the dispatcher -- never sent from the SDK.
|
|
9
9
|
*/
|
|
10
10
|
import { type TypedAdapter } from './create-adapter.js';
|
|
@@ -10,15 +10,14 @@ import type { LLMGenerateRequest, LLMGenerateResponse, LLMModel } from '../../ty
|
|
|
10
10
|
type LLMProvider = 'openai' | 'anthropic' | 'openrouter' | 'google';
|
|
11
11
|
/**
|
|
12
12
|
* SDK LLM generate params.
|
|
13
|
-
* Extends LLMGenerateRequest with
|
|
14
|
-
*
|
|
15
|
-
* When omitted, the resource's default ModelConfig is used.
|
|
13
|
+
* Extends LLMGenerateRequest with required provider/model for worker→platform dispatch.
|
|
14
|
+
* Provider and model must always be specified explicitly — no implicit fallback.
|
|
16
15
|
*/
|
|
17
16
|
export interface SDKLLMGenerateParams extends Omit<LLMGenerateRequest, 'signal' | 'responseSchema'> {
|
|
18
|
-
/** LLM provider
|
|
19
|
-
provider
|
|
20
|
-
/** Model identifier — must be a supported LLMModel
|
|
21
|
-
model
|
|
17
|
+
/** LLM provider */
|
|
18
|
+
provider: LLMProvider;
|
|
19
|
+
/** Model identifier — must be a supported LLMModel */
|
|
20
|
+
model: LLMModel;
|
|
22
21
|
/** JSON Schema for structured output (optional — omit for unstructured text) */
|
|
23
22
|
responseSchema?: unknown;
|
|
24
23
|
}
|
package/dist/worker/index.js
CHANGED
package/package.json
CHANGED
package/reference/_navigation.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SDK Reference Navigation
|
|
2
2
|
|
|
3
|
-
Auto-generated from reference file frontmatter.
|
|
3
|
+
Auto-generated from reference file frontmatter. 30 files indexed.
|
|
4
4
|
|
|
5
5
|
All paths are relative to `node_modules/@elevasis/sdk/reference/`.
|
|
6
6
|
|
|
@@ -39,7 +39,8 @@ All paths are relative to `node_modules/@elevasis/sdk/reference/`.
|
|
|
39
39
|
|
|
40
40
|
| Resource | Location | Description | When to Load |
|
|
41
41
|
| --- | --- | --- | --- |
|
|
42
|
-
|
|
|
42
|
+
| Integration Adapters | `platform-tools/adapters-integration.mdx` | Type-safe wrappers for third-party integrations -- Attio, Stripe, Notion, Google Sheets, Instantly, SignatureAPI, Resend, Dropbox, Apify, Gmail, Mailso, and Tomba -- with full autocomplete and compile-time checking | Using typed adapters for integration tools, or needs to know what integration adapter methods are available |
|
|
43
|
+
| Platform Adapters | `platform-tools/adapters-platform.mdx` | Type-safe singleton adapters for built-in platform services -- scheduler, storage, LLM, PDF, approval, notifications, acqDb, execution, and email -- no credentials required | Using platform service adapters (scheduler, storage, llm, pdf, approval, acqDb, notifications, execution, email) |
|
|
43
44
|
| Platform Tools | `platform-tools/index.mdx` | Access 70+ tools across integration adapters and platform services from your SDK workflows -- typed adapters, credential security model, and working code examples | Connecting to external services |
|
|
44
45
|
|
|
45
46
|
## Resources
|
|
@@ -56,6 +57,7 @@ All paths are relative to `node_modules/@elevasis/sdk/reference/`.
|
|
|
56
57
|
| --- | --- | --- | --- |
|
|
57
58
|
| Template: Data Enrichment | `templates/data-enrichment.mdx` | LLM-powered enrichment of existing database records -- read rows, enrich each with an LLM, write results back to Supabase | Applying the data-enrichment workflow template |
|
|
58
59
|
| Template: Email Sender | `templates/email-sender.mdx` | Transactional email via Resend with template support -- send styled emails to one or multiple recipients | Applying the email-sender workflow template |
|
|
60
|
+
| Templates | `templates/index.mdx` | Ready-to-use workflow templates for common automation patterns -- web scraping, data enrichment, email sending, lead scoring, PDF generation, text classification, and recurring jobs | (not specified) |
|
|
59
61
|
| Template: Lead Scorer | `templates/lead-scorer.mdx` | LLM-based lead scoring with Supabase storage -- receive a lead, score it with an LLM, store the result | Applying the lead-scorer workflow template |
|
|
60
62
|
| Template: PDF Generator | `templates/pdf-generator.mdx` | PDF generation from structured data with platform storage upload -- render a PDF from a template and upload to platform storage | Applying the pdf-generator workflow template |
|
|
61
63
|
| Template: Recurring Job | `templates/recurring-job.mdx` | Scheduler-triggered periodic workflow -- run a task on a schedule (daily, weekly, hourly, or custom cron) | Applying the recurring-job workflow template |
|
package/reference/concepts.mdx
CHANGED
|
@@ -92,29 +92,11 @@ type MyInput = z.infer<typeof myInput>;
|
|
|
92
92
|
|
|
93
93
|
## The Execution Model
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
Each execution creates an ephemeral worker thread from your deployed bundle. The platform validates input against your Zod schema, runs your handler, and returns the result. Workers are terminated immediately after completion -- there is no persistent server.
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
2. The platform creates a temporary server just for this execution
|
|
99
|
-
3. Your code runs on that server
|
|
100
|
-
4. The result is sent back
|
|
101
|
-
5. The temporary server is deleted
|
|
97
|
+
Key implications: files written to disk disappear after execution, logs appear only after the execution completes (no streaming), and each execution is fully isolated with no shared state between runs. Outbound network access is unrestricted. Memory is capped at 256MB per worker; execution timeout is 300s for workflows and 600s for agents.
|
|
102
98
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
| What You Might Expect | What Actually Happens | Why |
|
|
106
|
-
| --------------------------- | ------------------------------------- | ----------------------------- |
|
|
107
|
-
| Files I create persist | Files disappear after execution | The server is temporary |
|
|
108
|
-
| I can see logs in real-time | Logs appear after execution completes | No streaming from workers |
|
|
109
|
-
| My code runs on my computer | Your code runs on Elevasis servers | That is what "deploy" means |
|
|
110
|
-
| I can use unlimited memory | 256MB memory limit per execution | Prevents runaway processes |
|
|
111
|
-
| Executions share state | Each execution is independent | No shared memory between runs |
|
|
112
|
-
| I can call external APIs | Yes, outbound network is unrestricted | Workers have internet access |
|
|
113
|
-
|
|
114
|
-
### What "completed" vs "failed" Means
|
|
115
|
-
|
|
116
|
-
- **completed** -- Your code ran successfully and returned output
|
|
117
|
-
- **failed** -- Something went wrong: your code threw an error, timed out (300s default), or ran out of memory
|
|
99
|
+
For the complete execution lifecycle, concurrency model, observability, and resource limits, see [Runtime](runtime.mdx).
|
|
118
100
|
|
|
119
101
|
---
|
|
120
102
|
|
|
@@ -68,11 +68,11 @@ Assessed during `/meta init`. Two independent dimensions.
|
|
|
68
68
|
|
|
69
69
|
### automation dimension
|
|
70
70
|
|
|
71
|
-
| Level | Context Loading
|
|
72
|
-
| ---------- |
|
|
73
|
-
| `none` | Glossary, Workflow overview, Platform Tools Overview only. Skip Zod, Execution Model, Design Decisions.
|
|
74
|
-
| `low-code` | All concept sections. Zapier/Make mapping. `adapters.mdx` on-demand.
|
|
75
|
-
| `custom` | All docs listed per-lesson and per-module.
|
|
71
|
+
| Level | Context Loading | Delivery | Verification |
|
|
72
|
+
| ---------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
73
|
+
| `none` | Glossary, Workflow overview, Platform Tools Overview only. Skip Zod, Execution Model, Design Decisions. | Agent writes all code. No code shown to user. Analogies throughout. | CLI primary. Agent runs `elevasis-sdk exec` and narrates results. |
|
|
74
|
+
| `low-code` | All concept sections. Zapier/Make mapping. `adapters-integration.mdx` / `adapters-platform.mdx` on-demand. | Map to Zapier/Make equivalents. Show code with explanations. | CLI primary. |
|
|
75
|
+
| `custom` | All docs listed per-lesson and per-module. | Full technical content, code-first. | CLI primary. |
|
|
76
76
|
|
|
77
77
|
### platformNavigation dimension
|
|
78
78
|
|
|
@@ -153,17 +153,17 @@ Each lesson: (1) announce title and goal, (2) explain concept per skill level, (
|
|
|
153
153
|
|
|
154
154
|
Modules are available any time -- no core path prerequisite. After completing a module the full menu table is shown again.
|
|
155
155
|
|
|
156
|
-
| # | Module | Reference Docs
|
|
157
|
-
| --- | ---------------- |
|
|
158
|
-
| 11 | `hitl` | `command-center.mdx` (Command Queue)
|
|
159
|
-
| 12 | `schedules` | `command-center.mdx` (Task Scheduler)
|
|
160
|
-
| 13 | `notifications` | `adapters.mdx` (notifications, email)
|
|
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`
|
|
163
|
-
| 16 | `workflows` | `patterns.mdx` (store, logging, organization)
|
|
164
|
-
| 17 | `composition` | `command-center.mdx` (Command View), `patterns.mdx`
|
|
165
|
-
| 18 | `llm` | `adapters.mdx` (llm singleton)
|
|
166
|
-
| 19 | `agents` | `framework/agent.mdx`
|
|
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-platform.mdx` (notifications, email) | Notification + email steps. Alerts on completion. | `notifications` singleton, `email` singleton |
|
|
161
|
+
| 14 | `integrations` | `platform-tools/index.mdx` (Credential Security), `adapters-integration.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-platform.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 |
|
|
167
167
|
|
|
168
168
|
---
|
|
169
169
|
|
package/reference/index.mdx
CHANGED
|
@@ -6,6 +6,8 @@ loadWhen: "First session or new to the SDK"
|
|
|
6
6
|
|
|
7
7
|
`@elevasis/sdk` lets you build workflows, agents, and resources in TypeScript and deploy them to the Elevasis platform with a single command. The developer experience is Vercel-style: write TypeScript, validate locally, deploy -- the platform handles execution, tool access, and observability. You never manage infrastructure. Zod 4.1 is the only peer dependency.
|
|
8
8
|
|
|
9
|
+
Workflows are step-based automations with typed inputs and outputs. Agents are autonomous AI resources with access to platform tools. Both are defined in TypeScript, exported from a single entry point, and deployed with `elevasis-sdk deploy`. Resources appear in AI Studio immediately after a successful deploy.
|
|
10
|
+
|
|
9
11
|
## Quick Start
|
|
10
12
|
|
|
11
13
|
```bash
|
|
@@ -15,77 +17,28 @@ pnpm install
|
|
|
15
17
|
elevasis-sdk deploy
|
|
16
18
|
```
|
|
17
19
|
|
|
18
|
-
After `pnpm dlx @elevasis/sdk init`, your project is scaffolded with a working echo workflow, config file, TypeScript setup, and a `CLAUDE.md` that gives Claude Code full awareness of the SDK.
|
|
19
|
-
|
|
20
|
-
Here is a minimal workflow definition:
|
|
21
|
-
|
|
22
|
-
```ts
|
|
23
|
-
import type { WorkflowDefinition, OrganizationResources } from '@elevasis/sdk';
|
|
24
|
-
import { z } from 'zod';
|
|
25
|
-
|
|
26
|
-
const greetInput = z.object({ name: z.string() });
|
|
27
|
-
const greetOutput = z.object({ message: z.string() });
|
|
28
|
-
|
|
29
|
-
type GreetInput = z.infer<typeof greetInput>;
|
|
30
|
-
|
|
31
|
-
const greetWorkflow: WorkflowDefinition = {
|
|
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',
|
|
47
|
-
name: 'Build greeting',
|
|
48
|
-
description: 'Returns a greeting message',
|
|
49
|
-
handler: async (input) => {
|
|
50
|
-
const { name } = input as GreetInput;
|
|
51
|
-
return { message: `Hello, ${name}!` };
|
|
52
|
-
},
|
|
53
|
-
inputSchema: greetInput,
|
|
54
|
-
outputSchema: greetOutput,
|
|
55
|
-
next: null,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
entryPoint: 'greet',
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const org: OrganizationResources = {
|
|
62
|
-
workflows: [greetWorkflow],
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export default org;
|
|
66
|
-
```
|
|
20
|
+
After `pnpm dlx @elevasis/sdk init`, your project is scaffolded with a working echo workflow, config file, TypeScript setup, and a `CLAUDE.md` that gives Claude Code full awareness of the SDK.
|
|
67
21
|
|
|
68
22
|
## What You Can Build
|
|
69
23
|
|
|
70
|
-
- **Workflows** -- Step-based automation with typed inputs and outputs. Steps can be linear, conditional, or branching. Each step is a plain async function.
|
|
24
|
+
- **Workflows** -- Step-based automation with typed inputs and outputs. Steps can be linear, conditional, or branching. Each step is a plain async function. See [Resources](resources/index.mdx) for the complete definition API.
|
|
71
25
|
- **Agents** -- Autonomous AI resources with access to platform tools. Agents run in the worker runtime with full LLM access and platform tool support. Use `--async` when executing agents to avoid HTTP timeout limits on long-running runs.
|
|
72
26
|
|
|
73
27
|
## Platform Tools
|
|
74
28
|
|
|
75
|
-
Inside any workflow step, import
|
|
29
|
+
Inside any workflow step or agent, import from `@elevasis/sdk/worker` to call platform tools via typed adapters:
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { createAttioAdapter, scheduler, llm } from '@elevasis/sdk/worker'
|
|
76
33
|
|
|
77
|
-
|
|
78
|
-
|
|
34
|
+
const attio = createAttioAdapter('my-attio')
|
|
35
|
+
const records = await attio.listRecords({ object: 'deals' })
|
|
79
36
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
method: 'send',
|
|
83
|
-
params: { to: 'user@example.com', subject: 'Hello', body: 'World' },
|
|
84
|
-
credential: 'my-gmail-credential',
|
|
85
|
-
});
|
|
37
|
+
await scheduler.createSchedule({ ... })
|
|
38
|
+
const result = await llm.generate({ messages: [...] })
|
|
86
39
|
```
|
|
87
40
|
|
|
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.
|
|
41
|
+
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.
|
|
89
42
|
|
|
90
43
|
See [Platform Tools](platform-tools/index.mdx) for the full catalog.
|
|
91
44
|
|
|
@@ -104,7 +57,7 @@ See [Platform Tools](platform-tools/index.mdx) for the full catalog.
|
|
|
104
57
|
|
|
105
58
|
- [Resources](resources/index.mdx) - Workflow and agent definition patterns, Zod schemas, step types, and routing
|
|
106
59
|
- [Platform Tools](platform-tools/index.mdx) - Full catalog of 70+ tools, integration adapters, and credential management
|
|
107
|
-
- [
|
|
60
|
+
- [Credential Security](platform-tools/index.mdx#credential-security) - Three-layer credential model, HTTP tool patterns, and credential management
|
|
108
61
|
|
|
109
62
|
### Reference
|
|
110
63
|
|
|
@@ -114,6 +67,11 @@ See [Platform Tools](platform-tools/index.mdx) for the full catalog.
|
|
|
114
67
|
- [Deployment](deployment/index.mdx) - Deploy pipeline, versioning, bundle upload, and registry registration
|
|
115
68
|
- [Runtime](runtime.mdx) - Worker execution model, concurrency, timeouts, cancellation, resource limits, and v1 limitations
|
|
116
69
|
|
|
70
|
+
### Typed Adapters
|
|
71
|
+
|
|
72
|
+
- [Integration Adapters](platform-tools/adapters-integration.mdx) - All 12 integration adapters: Attio, Stripe, Notion, Google Sheets, Resend, and more
|
|
73
|
+
- [Platform Adapters](platform-tools/adapters-platform.mdx) - All 9 platform service adapters: scheduler, storage, llm, pdf, approval, and more
|
|
74
|
+
|
|
117
75
|
### Framework
|
|
118
76
|
|
|
119
77
|
- [Development Framework](framework/index.mdx) - How Claude Code helps you build: project structure, agent integration, memory, and documentation
|
|
@@ -122,10 +80,9 @@ See [Platform Tools](platform-tools/index.mdx) for the full catalog.
|
|
|
122
80
|
|
|
123
81
|
### More
|
|
124
82
|
|
|
125
|
-
- [Documentation](framework/index.mdx#resource-documentation) - Writing and deploying MDX documentation alongside your resources
|
|
126
83
|
- [Troubleshooting](troubleshooting.mdx) - Static error catalog for CLI, deployment, schema, and runtime failures
|
|
127
|
-
- [Roadmap](roadmap.mdx) - Planned features including
|
|
84
|
+
- [Roadmap](roadmap.mdx) - Planned features including error taxonomy, retry semantics, circuit breaker, and metrics
|
|
128
85
|
|
|
129
86
|
---
|
|
130
87
|
|
|
131
|
-
**Last Updated:** 2026-
|
|
88
|
+
**Last Updated:** 2026-03-19
|