@elevasis/sdk 0.7.10 → 0.7.12

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 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.10",
43886
+ version: "0.7.12",
43887
43887
  description: "SDK for building Elevasis organization resources",
43888
43888
  type: "module",
43889
43889
  bin: {
package/dist/index.d.ts CHANGED
@@ -1273,7 +1273,6 @@ type Database = {
1273
1273
  opening_line: string | null;
1274
1274
  organization_id: string;
1275
1275
  pipeline_status: Json;
1276
- qualification: string | null;
1277
1276
  source: string | null;
1278
1277
  source_id: string | null;
1279
1278
  status: string;
@@ -1300,7 +1299,6 @@ type Database = {
1300
1299
  opening_line?: string | null;
1301
1300
  organization_id: string;
1302
1301
  pipeline_status?: Json;
1303
- qualification?: string | null;
1304
1302
  source?: string | null;
1305
1303
  source_id?: string | null;
1306
1304
  status?: string;
@@ -1327,7 +1325,6 @@ type Database = {
1327
1325
  opening_line?: string | null;
1328
1326
  organization_id?: string;
1329
1327
  pipeline_status?: Json;
1330
- qualification?: string | null;
1331
1328
  source?: string | null;
1332
1329
  source_id?: string | null;
1333
1330
  status?: string;
@@ -3464,7 +3461,6 @@ interface AcqContact {
3464
3461
  linkedinUrl: string | null;
3465
3462
  title: string | null;
3466
3463
  headline: string | null;
3467
- qualification: 'qualified' | 'disqualified' | 'pending' | null;
3468
3464
  filterReason: string | null;
3469
3465
  openingLine: string | null;
3470
3466
  source: string | null;
@@ -3570,7 +3566,6 @@ interface UpdateContactParams {
3570
3566
  linkedinUrl?: string;
3571
3567
  title?: string;
3572
3568
  headline?: string;
3573
- qualification?: 'qualified' | 'disqualified' | 'pending';
3574
3569
  filterReason?: string;
3575
3570
  openingLine?: string;
3576
3571
  pipelineStatus?: Record<string, unknown>;
@@ -3582,7 +3577,6 @@ interface UpdateContactParams {
3582
3577
  type UpsertContactParams = CreateContactParams;
3583
3578
  interface ContactFilters {
3584
3579
  listId?: string;
3585
- qualification?: 'qualified' | 'disqualified' | 'pending';
3586
3580
  openingLineIsNull?: boolean;
3587
3581
  pipelineStatus?: Record<string, unknown>;
3588
3582
  batchId?: string;
@@ -4758,21 +4752,36 @@ interface CreateCampaignParams {
4758
4752
  name: string;
4759
4753
  sequences?: Array<{
4760
4754
  steps: Array<{
4761
- subject: string;
4762
- body: string;
4763
- variants?: Array<{
4755
+ type?: string;
4756
+ delay?: number;
4757
+ variants: Array<{
4764
4758
  subject: string;
4765
4759
  body: string;
4760
+ v_disabled?: boolean;
4766
4761
  }>;
4767
4762
  }>;
4768
4763
  }>;
4769
4764
  email_list?: string[];
4765
+ campaign_schedule?: {
4766
+ schedules: Array<{
4767
+ name: string;
4768
+ timing: {
4769
+ from: string;
4770
+ to: string;
4771
+ };
4772
+ days: Record<string, boolean>;
4773
+ timezone: string;
4774
+ }>;
4775
+ };
4770
4776
  daily_limit?: number;
4777
+ daily_max_leads?: number;
4771
4778
  stop_on_reply?: boolean;
4772
4779
  stop_on_auto_reply?: boolean;
4780
+ stop_for_company?: boolean;
4773
4781
  track_opens?: boolean;
4774
4782
  track_clicks?: boolean;
4775
4783
  text_only?: boolean;
4784
+ first_email_text_only?: boolean;
4776
4785
  }
4777
4786
  /**
4778
4787
  * Create campaign result
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "0.7.10",
3
+ "version": "0.7.12",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  # SDK Reference Navigation
2
2
 
3
- Auto-generated from reference file frontmatter. 28 files indexed.
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
- | Typed Adapters | `platform-tools/adapters.mdx` | Type-safe wrappers over platform.call() for all integrations and platform tools -- Attio, Stripe, Notion, Google Sheets, and more -- with full autocomplete, compile-time checking, and zero boilerplate | Using typed adapters instead of raw platform.call(), or needs to know what adapter methods are available |
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 |
@@ -92,29 +92,11 @@ type MyInput = z.infer<typeof myInput>;
92
92
 
93
93
  ## The Execution Model
94
94
 
95
- ### What Happens When You Run a Workflow
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
- 1. A request arrives at the Elevasis platform (someone runs `elevasis-sdk exec` or a schedule triggers)
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
- ### Practical Implications
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 | 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.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. |
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 | 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 |
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
 
@@ -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. After `elevasis-sdk deploy`, your resources appear in AI Studio and are available to run immediately.
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. Workflows are the primary resource type and are fully supported.
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 `platform` from `@elevasis/sdk/worker` to call platform tools:
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
- ```ts
78
- import { platform } from '@elevasis/sdk/worker';
34
+ const attio = createAttioAdapter('my-attio')
35
+ const records = await attio.listRecords({ object: 'deals' })
79
36
 
80
- const result = await platform.call({
81
- tool: 'gmail',
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. LLM calls are also available via `platform.call({ tool: 'llm', ... })` with API keys resolved from platform environment variables.
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
- - [Platform Tools](platform-tools/index.mdx#credential-security) - Three-layer credential model, HTTP tool patterns, and credential management
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 agent execution, streaming logs, and SDK testing utilities
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-02-25
88
+ **Last Updated:** 2026-03-19