@elevasis/sdk 0.5.20 → 0.5.23

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
@@ -43873,7 +43873,7 @@ async function apiDelete(endpoint, apiUrl = resolveApiUrl()) {
43873
43873
  // package.json
43874
43874
  var package_default = {
43875
43875
  name: "@elevasis/sdk",
43876
- version: "0.5.20",
43876
+ version: "0.5.23",
43877
43877
  description: "SDK for building Elevasis organization resources",
43878
43878
  type: "module",
43879
43879
  bin: {
@@ -45210,7 +45210,7 @@ var import_path3 = require("path");
45210
45210
  var import_promises2 = require("fs/promises");
45211
45211
 
45212
45212
  // src/cli/commands/templates/core/workspace.ts
45213
- var TEMPLATE_VERSION = 31;
45213
+ var TEMPLATE_VERSION = 32;
45214
45214
  function configTemplate() {
45215
45215
  return `import type { ElevasConfig } from '@elevasis/sdk'
45216
45216
 
@@ -46980,6 +46980,7 @@ This file is yours. The other \`.claude/rules/\` files are SDK-owned and updated
46980
46980
  - \`memory-conventions.md\` -- memory system structure and pruning
46981
46981
  - \`project-map.md\` -- auto-generated project map conventions
46982
46982
  - \`task-tracking.md\` -- in-progress task conventions
46983
+ - \`logging.md\` -- context.logger usage, console.log prohibition, logging standard
46983
46984
 
46984
46985
  ## When to Add a Rule
46985
46986
 
@@ -47119,6 +47120,77 @@ When all plan steps are marked COMPLETE, **suggest** completing the task -- neve
47119
47120
  - Completed tasks move OUT of \`docs/in-progress/\` to \`docs/<relevant-dir>/\`
47120
47121
  `;
47121
47122
  }
47123
+ function claudeLoggingRuleTemplate() {
47124
+ return `---
47125
+ description: Logging conventions for workflow and agent handlers
47126
+ paths:
47127
+ - src/**
47128
+ ---
47129
+
47130
+ # Logging
47131
+
47132
+ ## Always Use \`context.logger\` in Handlers
47133
+
47134
+ **Never use \`console.log\`, \`console.warn\`, or \`console.error\` in step/agent handlers.**
47135
+ The platform does not capture \`console.*\` output \u2014 it will not appear in execution logs.
47136
+
47137
+ \`\`\`typescript
47138
+ // \u274C WRONG \u2014 invisible in Command Center
47139
+ handler: async (rawInput) => {
47140
+ console.log('Processing...')
47141
+ }
47142
+
47143
+ // \u2705 CORRECT \u2014 visible in Command Center
47144
+ handler: async (rawInput, context) => {
47145
+ context.logger.info('Processing...')
47146
+ }
47147
+ \`\`\`
47148
+
47149
+ ## Logger Methods
47150
+
47151
+ \`\`\`typescript
47152
+ context.logger.debug('Verbose detail \u2014 shown in debug mode only')
47153
+ context.logger.info('Normal progress messages')
47154
+ context.logger.warn('Non-fatal issue \u2014 skipped, retried, partial result')
47155
+ context.logger.error('Fatal error or unexpected failure')
47156
+ \`\`\`
47157
+
47158
+ ## Extensive Logging Standard
47159
+
47160
+ Every handler should log:
47161
+
47162
+ 1. **Entry** \u2014 step name + key input params (category, count, domain, etc.)
47163
+ 2. **Progress** \u2014 inside loops: per-item status (processed, skipped, failed)
47164
+ 3. **Decisions** \u2014 idempotency skips, early exits, conditional branches
47165
+ 4. **Summary** \u2014 counts at the end (X processed, Y skipped, Z errors)
47166
+
47167
+ \`\`\`typescript
47168
+ handler: async (rawInput, context) => {
47169
+ const data = rawInput as SomeType
47170
+ context.logger.info(\`[step-name] Starting \u2014 \${data.items.length} items\`)
47171
+
47172
+ let processed = 0, skipped = 0
47173
+ for (const item of data.items) {
47174
+ if (item.alreadyDone) {
47175
+ skipped++
47176
+ context.logger.info(\`[step-name] Skipping \${item.name} \u2014 already complete\`)
47177
+ continue
47178
+ }
47179
+ // ...
47180
+ processed++
47181
+ context.logger.info(\`[step-name] Processed \${item.name}\`)
47182
+ }
47183
+
47184
+ context.logger.info(\`[step-name] Done \u2014 \${processed} processed, \${skipped} skipped\`)
47185
+ }
47186
+ \`\`\`
47187
+
47188
+ ## Warnings vs Errors
47189
+
47190
+ - \`warn\`: skipped item, not found in DB, LLM timeout on one domain (processing continues)
47191
+ - \`error\`: step-level failures that propagate as thrown errors (log before throwing if possible)
47192
+ `;
47193
+ }
47122
47194
  function claudePostEditValidateHookTemplate() {
47123
47195
  return `#!/usr/bin/env node
47124
47196
  // post-edit-validate.mjs
@@ -47498,7 +47570,8 @@ function getManagedTemplates(ctx = {}) {
47498
47570
  ".claude/rules/docs-authoring.md": claudeDocsAuthoringRuleTemplate,
47499
47571
  ".claude/rules/memory-conventions.md": claudeMemoryConventionsRuleTemplate,
47500
47572
  ".claude/rules/project-map.md": claudeProjectMapRuleTemplate,
47501
- ".claude/rules/task-tracking.md": claudeTaskTrackingRuleTemplate
47573
+ ".claude/rules/task-tracking.md": claudeTaskTrackingRuleTemplate,
47574
+ ".claude/rules/logging.md": claudeLoggingRuleTemplate
47502
47575
  };
47503
47576
  }
47504
47577
 
@@ -47713,6 +47786,7 @@ var MANAGED_FILES = [
47713
47786
  ".claude/rules/memory-conventions.md",
47714
47787
  ".claude/rules/project-map.md",
47715
47788
  ".claude/rules/task-tracking.md",
47789
+ ".claude/rules/logging.md",
47716
47790
  ".claude/scripts/statusline-command.js"
47717
47791
  ];
47718
47792
  var SCAFFOLD_FILES = [...INIT_ONLY_FILES, ...MANAGED_FILES];
@@ -47784,6 +47858,7 @@ function registerInitCommand(program3) {
47784
47858
  ".claude/rules/memory-conventions.md": claudeMemoryConventionsRuleTemplate(),
47785
47859
  ".claude/rules/project-map.md": claudeProjectMapRuleTemplate(),
47786
47860
  ".claude/rules/task-tracking.md": claudeTaskTrackingRuleTemplate(),
47861
+ ".claude/rules/logging.md": claudeLoggingRuleTemplate(),
47787
47862
  ".claude/scripts/statusline-command.js": claudeStatuslineScriptTemplate()
47788
47863
  };
47789
47864
  if (options2.ui) {
package/dist/index.d.ts CHANGED
@@ -51,7 +51,7 @@ declare const PaginationSchema: z.ZodObject<{
51
51
  /**
52
52
  * Export type helpers for domain schemas
53
53
  */
54
- type PaginationParams$1 = z.infer<typeof PaginationSchema>;
54
+ type PaginationParams = z.infer<typeof PaginationSchema>;
55
55
 
56
56
  /**
57
57
  * Workflow-specific logging types and utilities
@@ -1176,82 +1176,64 @@ type Database = {
1176
1176
  acq_companies: {
1177
1177
  Row: {
1178
1178
  attio_company_id: string | null;
1179
- business_description: string | null;
1180
- business_type: string | null;
1181
- company_values: string | null;
1182
- core_offerings: string[] | null;
1179
+ batch_id: string | null;
1180
+ category: string | null;
1183
1181
  created_at: string;
1184
1182
  domain: string | null;
1185
- enrichment_status: Json | null;
1183
+ enrichment_data: Json | null;
1186
1184
  founded_year: number | null;
1187
1185
  id: string;
1188
1186
  linkedin_url: string | null;
1189
1187
  location_city: string | null;
1190
1188
  location_state: string | null;
1191
- mission_vision: string | null;
1192
1189
  name: string;
1193
1190
  num_employees: number | null;
1194
1191
  organization_id: string;
1195
- other_segments: string[] | null;
1196
- primary_segment: string | null;
1197
- recent_web_posts: Json | null;
1192
+ pipeline_status: Json;
1193
+ segment: string | null;
1198
1194
  source: string | null;
1199
- target_audience: string | null;
1200
- unique_attributes: string | null;
1201
1195
  updated_at: string;
1202
1196
  website: string | null;
1203
1197
  };
1204
1198
  Insert: {
1205
1199
  attio_company_id?: string | null;
1206
- business_description?: string | null;
1207
- business_type?: string | null;
1208
- company_values?: string | null;
1209
- core_offerings?: string[] | null;
1200
+ batch_id?: string | null;
1201
+ category?: string | null;
1210
1202
  created_at?: string;
1211
1203
  domain?: string | null;
1212
- enrichment_status?: Json | null;
1204
+ enrichment_data?: Json | null;
1213
1205
  founded_year?: number | null;
1214
1206
  id?: string;
1215
1207
  linkedin_url?: string | null;
1216
1208
  location_city?: string | null;
1217
1209
  location_state?: string | null;
1218
- mission_vision?: string | null;
1219
1210
  name: string;
1220
1211
  num_employees?: number | null;
1221
1212
  organization_id: string;
1222
- other_segments?: string[] | null;
1223
- primary_segment?: string | null;
1224
- recent_web_posts?: Json | null;
1213
+ pipeline_status?: Json;
1214
+ segment?: string | null;
1225
1215
  source?: string | null;
1226
- target_audience?: string | null;
1227
- unique_attributes?: string | null;
1228
1216
  updated_at?: string;
1229
1217
  website?: string | null;
1230
1218
  };
1231
1219
  Update: {
1232
1220
  attio_company_id?: string | null;
1233
- business_description?: string | null;
1234
- business_type?: string | null;
1235
- company_values?: string | null;
1236
- core_offerings?: string[] | null;
1221
+ batch_id?: string | null;
1222
+ category?: string | null;
1237
1223
  created_at?: string;
1238
1224
  domain?: string | null;
1239
- enrichment_status?: Json | null;
1225
+ enrichment_data?: Json | null;
1240
1226
  founded_year?: number | null;
1241
1227
  id?: string;
1242
1228
  linkedin_url?: string | null;
1243
1229
  location_city?: string | null;
1244
1230
  location_state?: string | null;
1245
- mission_vision?: string | null;
1246
1231
  name?: string;
1247
1232
  num_employees?: number | null;
1248
1233
  organization_id?: string;
1249
- other_segments?: string[] | null;
1250
- primary_segment?: string | null;
1251
- recent_web_posts?: Json | null;
1234
+ pipeline_status?: Json;
1235
+ segment?: string | null;
1252
1236
  source?: string | null;
1253
- target_audience?: string | null;
1254
- unique_attributes?: string | null;
1255
1237
  updated_at?: string;
1256
1238
  website?: string | null;
1257
1239
  };
@@ -1268,88 +1250,79 @@ type Database = {
1268
1250
  acq_contacts: {
1269
1251
  Row: {
1270
1252
  attio_person_id: string | null;
1253
+ batch_id: string | null;
1271
1254
  brochure_first_viewed_at: string | null;
1272
1255
  brochure_view_count: number;
1273
1256
  company_id: string | null;
1274
1257
  created_at: string;
1275
1258
  email: string;
1276
1259
  email_valid: string | null;
1277
- enrichment_status: Json | null;
1260
+ enrichment_data: Json;
1278
1261
  filter_reason: string | null;
1279
1262
  first_name: string | null;
1280
1263
  headline: string | null;
1281
1264
  id: string;
1282
1265
  last_name: string | null;
1283
- li_activity: Json | null;
1284
- li_education: string | null;
1285
- li_past_experience: string | null;
1286
- li_summary: string | null;
1287
1266
  linkedin_url: string | null;
1288
1267
  nurture: boolean;
1289
1268
  opening_line: string | null;
1290
1269
  organization_id: string;
1270
+ pipeline_status: Json;
1291
1271
  qualification: string | null;
1292
1272
  source: string | null;
1293
1273
  source_id: string | null;
1294
- status: string | null;
1295
1274
  title: string | null;
1296
1275
  updated_at: string;
1297
1276
  };
1298
1277
  Insert: {
1299
1278
  attio_person_id?: string | null;
1279
+ batch_id?: string | null;
1300
1280
  brochure_first_viewed_at?: string | null;
1301
1281
  brochure_view_count?: number;
1302
1282
  company_id?: string | null;
1303
1283
  created_at?: string;
1304
1284
  email: string;
1305
1285
  email_valid?: string | null;
1306
- enrichment_status?: Json | null;
1286
+ enrichment_data?: Json;
1307
1287
  filter_reason?: string | null;
1308
1288
  first_name?: string | null;
1309
1289
  headline?: string | null;
1310
1290
  id?: string;
1311
1291
  last_name?: string | null;
1312
- li_activity?: Json | null;
1313
- li_education?: string | null;
1314
- li_past_experience?: string | null;
1315
- li_summary?: string | null;
1316
1292
  linkedin_url?: string | null;
1317
1293
  nurture?: boolean;
1318
1294
  opening_line?: string | null;
1319
1295
  organization_id: string;
1296
+ pipeline_status?: Json;
1320
1297
  qualification?: string | null;
1321
1298
  source?: string | null;
1322
1299
  source_id?: string | null;
1323
- status?: string | null;
1324
1300
  title?: string | null;
1325
1301
  updated_at?: string;
1326
1302
  };
1327
1303
  Update: {
1328
1304
  attio_person_id?: string | null;
1305
+ batch_id?: string | null;
1329
1306
  brochure_first_viewed_at?: string | null;
1330
1307
  brochure_view_count?: number;
1331
1308
  company_id?: string | null;
1332
1309
  created_at?: string;
1333
1310
  email?: string;
1334
1311
  email_valid?: string | null;
1335
- enrichment_status?: Json | null;
1312
+ enrichment_data?: Json;
1336
1313
  filter_reason?: string | null;
1337
1314
  first_name?: string | null;
1338
1315
  headline?: string | null;
1339
1316
  id?: string;
1340
1317
  last_name?: string | null;
1341
- li_activity?: Json | null;
1342
- li_education?: string | null;
1343
- li_past_experience?: string | null;
1344
- li_summary?: string | null;
1345
1318
  linkedin_url?: string | null;
1346
1319
  nurture?: boolean;
1347
1320
  opening_line?: string | null;
1348
1321
  organization_id?: string;
1322
+ pipeline_status?: Json;
1349
1323
  qualification?: string | null;
1350
1324
  source?: string | null;
1351
1325
  source_id?: string | null;
1352
- status?: string | null;
1353
1326
  title?: string | null;
1354
1327
  updated_at?: string;
1355
1328
  };
@@ -2841,10 +2814,6 @@ type Database = {
2841
2814
  };
2842
2815
  Returns: boolean;
2843
2816
  };
2844
- is_platform_admin: {
2845
- Args: never;
2846
- Returns: boolean;
2847
- };
2848
2817
  link_workos_membership_on_accept: {
2849
2818
  Args: {
2850
2819
  p_email: string;
@@ -3269,42 +3238,93 @@ declare class ResourceRegistry {
3269
3238
  }
3270
3239
 
3271
3240
  /**
3272
- * Represents a web post from company website scraping.
3273
- * Used for recent blog posts, news, or announcements.
3241
+ * Tracks pipeline status for a company across all processing stages.
3274
3242
  */
3275
- interface WebPost {
3276
- /** ISO date string of when the post was published */
3277
- date: string;
3278
- /** Title of the web post */
3279
- title: string;
3280
- /** Brief summary of the post content */
3281
- summary: string;
3282
- /** AI-generated insight about the post's relevance */
3283
- aiInsight?: string;
3243
+ interface CompanyPipelineStatus {
3244
+ acquired: boolean;
3245
+ enrichment: {
3246
+ [source: string]: {
3247
+ status: 'pending' | 'complete' | 'failed' | 'skipped';
3248
+ completedAt?: string;
3249
+ error?: string;
3250
+ };
3251
+ };
3284
3252
  }
3285
3253
  /**
3286
- * Represents a LinkedIn activity item from a contact's profile.
3287
- * Used for personalization and understanding engagement.
3254
+ * Tracks pipeline status for a contact across all processing stages.
3288
3255
  */
3289
- interface LinkedInActivity {
3290
- /** ISO date string of the activity */
3291
- date: string;
3292
- /** Content of the LinkedIn post or activity */
3293
- content: string;
3256
+ interface ContactPipelineStatus {
3257
+ enrichment: {
3258
+ [source: string]: {
3259
+ status: 'pending' | 'complete' | 'failed' | 'skipped';
3260
+ completedAt?: string;
3261
+ error?: string;
3262
+ };
3263
+ };
3264
+ personalization: {
3265
+ status: 'pending' | 'complete' | 'failed' | 'skipped';
3266
+ completedAt?: string;
3267
+ };
3268
+ outreach: {
3269
+ status: 'pending' | 'sent' | 'replied' | 'bounced' | 'opted-out';
3270
+ sentAt?: string;
3271
+ channel?: string;
3272
+ campaignId?: string;
3273
+ };
3274
+ }
3275
+ /**
3276
+ * Enrichment data collected for a company from various sources.
3277
+ */
3278
+ interface CompanyEnrichmentData {
3279
+ googleMaps?: {
3280
+ placeId?: string;
3281
+ totalScore?: number;
3282
+ reviewsCount?: number;
3283
+ address?: string;
3284
+ phone?: string;
3285
+ categoryName?: string;
3286
+ googleMapsUrl?: string;
3287
+ scrapedAt?: string;
3288
+ };
3289
+ websiteCrawl?: {
3290
+ services?: string[];
3291
+ specialties?: string[];
3292
+ staff?: Array<{
3293
+ name: string;
3294
+ title?: string;
3295
+ email?: string;
3296
+ }>;
3297
+ emailCount?: number;
3298
+ crawledAt?: string;
3299
+ };
3300
+ website?: {
3301
+ missionVision?: string;
3302
+ uniqueAttributes?: string;
3303
+ coreOfferings?: string;
3304
+ targetAudience?: string;
3305
+ companyValues?: string;
3306
+ businessDescription?: string;
3307
+ recentPosts?: Array<{
3308
+ date?: string;
3309
+ title?: string;
3310
+ summary?: string;
3311
+ aiInsight?: string;
3312
+ }>;
3313
+ };
3294
3314
  }
3295
3315
  /**
3296
- * Tracks the status of various enrichment processes.
3297
- * Each field represents a different enrichment source.
3316
+ * Enrichment data collected for a contact from various sources.
3298
3317
  */
3299
- interface EnrichmentStatus {
3300
- /** Website scraping enrichment status */
3301
- website?: 'pending' | 'complete' | 'failed';
3302
- /** LinkedIn profile enrichment status */
3303
- linkedin?: 'pending' | 'complete' | 'failed';
3304
- /** Email validation enrichment status */
3305
- email?: 'pending' | 'complete' | 'failed';
3306
- /** AI personalization enrichment status */
3307
- personalization?: 'pending' | 'complete' | 'failed';
3318
+ interface ContactEnrichmentData {
3319
+ linkedin?: {
3320
+ summary?: string;
3321
+ pastExperience?: string;
3322
+ education?: string;
3323
+ activity?: Array<{
3324
+ date?: string;
3325
+ content?: string;
3326
+ }>;
3327
+ };
3308
3328
  }
3309
3329
  /**
3310
3330
  * Acquisition list for organizing contacts and companies.
@@ -3333,18 +3353,12 @@ interface AcqCompany {
3333
3353
  foundedYear: number | null;
3334
3354
  locationCity: string | null;
3335
3355
  locationState: string | null;
3336
- missionVision: string | null;
3337
- uniqueAttributes: string | null;
3338
- coreOfferings: string[] | null;
3339
- targetAudience: string | null;
3340
- companyValues: string | null;
3341
- businessDescription: string | null;
3342
- recentWebPosts: WebPost[] | null;
3343
- businessType: string | null;
3344
- primarySegment: string | null;
3345
- otherSegments: string[] | null;
3346
- enrichmentStatus: EnrichmentStatus | null;
3356
+ category: string | null;
3357
+ segment: string | null;
3358
+ pipelineStatus: CompanyPipelineStatus | null;
3359
+ enrichmentData: CompanyEnrichmentData | null;
3347
3360
  source: string | null;
3361
+ batchId: string | null;
3348
3362
  createdAt: Date;
3349
3363
  updatedAt: Date;
3350
3364
  }
@@ -3364,18 +3378,16 @@ interface AcqContact {
3364
3378
  linkedinUrl: string | null;
3365
3379
  title: string | null;
3366
3380
  headline: string | null;
3367
- liSummary: string | null;
3368
- liPastExperience: string | null;
3369
- liEducation: string | null;
3370
- liActivity: LinkedInActivity[] | null;
3371
3381
  qualification: 'qualified' | 'disqualified' | 'pending' | null;
3372
3382
  filterReason: string | null;
3373
3383
  openingLine: string | null;
3374
3384
  source: string | null;
3375
3385
  sourceId: string | null;
3376
- enrichmentStatus: EnrichmentStatus | null;
3386
+ pipelineStatus: ContactPipelineStatus | null;
3387
+ enrichmentData: ContactEnrichmentData | null;
3377
3388
  /** Attio Person record ID - set when contact responds and is added to CRM */
3378
3389
  attioPersonId: string | null;
3390
+ batchId: string | null;
3379
3391
  createdAt: Date;
3380
3392
  updatedAt: Date;
3381
3393
  }
@@ -3387,10 +3399,6 @@ interface AcqContact {
3387
3399
  * Implementation: apps/api/src/acquisition/lead-service.ts (LeadService class)
3388
3400
  */
3389
3401
 
3390
- interface PaginationParams {
3391
- limit: number;
3392
- offset: number;
3393
- }
3394
3402
  interface PaginatedResult<T> {
3395
3403
  data: T[];
3396
3404
  total: number;
@@ -3417,6 +3425,7 @@ interface CreateCompanyParams {
3417
3425
  locationCity?: string;
3418
3426
  locationState?: string;
3419
3427
  source?: string;
3428
+ batchId?: string;
3420
3429
  }
3421
3430
  interface UpdateCompanyParams {
3422
3431
  name?: string;
@@ -3427,26 +3436,23 @@ interface UpdateCompanyParams {
3427
3436
  foundedYear?: number;
3428
3437
  locationCity?: string;
3429
3438
  locationState?: string;
3430
- missionVision?: string;
3431
- uniqueAttributes?: string;
3432
- coreOfferings?: string[];
3433
- targetAudience?: string;
3434
- companyValues?: string;
3435
- businessDescription?: string;
3436
- recentWebPosts?: unknown[];
3437
- businessType?: string;
3438
- primarySegment?: string;
3439
- otherSegments?: string[];
3440
- enrichmentStatus?: Record<string, string>;
3439
+ category?: string;
3440
+ segment?: string;
3441
+ pipelineStatus?: Record<string, unknown>;
3442
+ enrichmentData?: Record<string, unknown>;
3441
3443
  source?: string;
3442
3444
  /** Attio Company record ID - set when company is added to CRM. Pass null to clear. */
3443
3445
  attioCompanyId?: string | null;
3446
+ batchId?: string;
3444
3447
  }
3445
3448
  type UpsertCompanyParams = CreateCompanyParams;
3446
3449
  interface CompanyFilters {
3447
- primarySegment?: string;
3448
- businessType?: string;
3449
- enrichmentStatus?: string;
3450
+ domain?: string;
3451
+ website?: string;
3452
+ segment?: string;
3453
+ category?: string;
3454
+ pipelineStatus?: Record<string, unknown>;
3455
+ batchId?: string;
3450
3456
  }
3451
3457
  interface CreateContactParams {
3452
3458
  organizationId: string;
@@ -3458,6 +3464,7 @@ interface CreateContactParams {
3458
3464
  title?: string;
3459
3465
  source?: string;
3460
3466
  sourceId?: string;
3467
+ batchId?: string;
3461
3468
  }
3462
3469
  interface UpdateContactParams {
3463
3470
  companyId?: string;
@@ -3467,15 +3474,11 @@ interface UpdateContactParams {
3467
3474
  linkedinUrl?: string;
3468
3475
  title?: string;
3469
3476
  headline?: string;
3470
- liSummary?: string;
3471
- liPastExperience?: string;
3472
- liEducation?: string;
3473
- liActivity?: unknown[];
3474
3477
  qualification?: 'qualified' | 'disqualified' | 'pending';
3475
3478
  filterReason?: string;
3476
3479
  openingLine?: string;
3477
- enrichmentStatus?: Record<string, string>;
3478
- status?: 'active' | 'bounced' | 'unsubscribed';
3480
+ pipelineStatus?: Record<string, unknown>;
3481
+ enrichmentData?: Record<string, unknown>;
3479
3482
  /** Attio Person record ID - set when contact responds and is added to CRM. Pass null to clear. */
3480
3483
  attioPersonId?: string | null;
3481
3484
  }
@@ -3484,6 +3487,8 @@ interface ContactFilters {
3484
3487
  listId?: string;
3485
3488
  qualification?: 'qualified' | 'disqualified' | 'pending';
3486
3489
  openingLineIsNull?: boolean;
3490
+ pipelineStatus?: Record<string, unknown>;
3491
+ batchId?: string;
3487
3492
  }
3488
3493
  interface UpsertDealParams {
3489
3494
  organizationId: string;
@@ -3997,6 +4002,33 @@ interface GetDatasetItemsResult {
3997
4002
  items: unknown[];
3998
4003
  totalCount: number;
3999
4004
  }
4005
+ /**
4006
+ * Webhook configuration for actor run notifications
4007
+ */
4008
+ interface ApifyWebhookConfig {
4009
+ eventTypes: string[];
4010
+ requestUrl: string;
4011
+ payloadTemplate?: string;
4012
+ headersTemplate?: string;
4013
+ }
4014
+ /**
4015
+ * Start actor parameters (async, no polling)
4016
+ */
4017
+ interface StartActorParams {
4018
+ actorId: string;
4019
+ input?: Record<string, unknown>;
4020
+ webhooks?: ApifyWebhookConfig[];
4021
+ timeoutSecs?: number;
4022
+ maxItems?: number;
4023
+ }
4024
+ /**
4025
+ * Start actor result (immediate, no waiting)
4026
+ */
4027
+ interface StartActorResult {
4028
+ status: 'STARTED';
4029
+ runId: string;
4030
+ datasetId: string;
4031
+ }
4000
4032
 
4001
4033
  /**
4002
4034
  * Shared Dropbox param/result types (browser-safe)
@@ -4418,6 +4450,228 @@ interface AddToCampaignResult {
4418
4450
  added_count: number;
4419
4451
  errors?: string[];
4420
4452
  }
4453
+ /**
4454
+ * List campaigns parameters
4455
+ */
4456
+ interface ListCampaignsParams {
4457
+ limit?: number;
4458
+ starting_after?: string;
4459
+ search?: string;
4460
+ status?: string;
4461
+ }
4462
+ /**
4463
+ * List campaigns result
4464
+ */
4465
+ interface ListCampaignsResult {
4466
+ campaigns: Array<{
4467
+ id: string;
4468
+ name: string;
4469
+ status: string;
4470
+ created_at: string;
4471
+ [key: string]: unknown;
4472
+ }>;
4473
+ next_starting_after?: string;
4474
+ }
4475
+ /**
4476
+ * Get campaign parameters
4477
+ */
4478
+ interface GetCampaignParams {
4479
+ campaign_id: string;
4480
+ }
4481
+ /**
4482
+ * Get campaign result
4483
+ */
4484
+ interface GetCampaignResult {
4485
+ id: string;
4486
+ name: string;
4487
+ status: string;
4488
+ sequences: unknown[];
4489
+ created_at: string;
4490
+ [key: string]: unknown;
4491
+ }
4492
+ /**
4493
+ * Update campaign parameters
4494
+ */
4495
+ interface UpdateCampaignParams {
4496
+ campaign_id: string;
4497
+ name?: string;
4498
+ sequences?: unknown;
4499
+ email_list?: string[];
4500
+ daily_limit?: number;
4501
+ stop_on_reply?: boolean;
4502
+ track_opens?: boolean;
4503
+ track_clicks?: boolean;
4504
+ [key: string]: unknown;
4505
+ }
4506
+ /**
4507
+ * Update campaign result
4508
+ */
4509
+ interface UpdateCampaignResult {
4510
+ success: boolean;
4511
+ campaign_id: string;
4512
+ }
4513
+ /**
4514
+ * Pause campaign parameters
4515
+ */
4516
+ interface PauseCampaignParams {
4517
+ campaign_id: string;
4518
+ }
4519
+ /**
4520
+ * Pause campaign result
4521
+ */
4522
+ interface PauseCampaignResult {
4523
+ success: boolean;
4524
+ campaign_id: string;
4525
+ }
4526
+ /**
4527
+ * Activate campaign parameters
4528
+ */
4529
+ interface ActivateCampaignParams {
4530
+ campaign_id: string;
4531
+ }
4532
+ /**
4533
+ * Activate campaign result
4534
+ */
4535
+ interface ActivateCampaignResult {
4536
+ success: boolean;
4537
+ campaign_id: string;
4538
+ }
4539
+ /**
4540
+ * Get campaign analytics parameters
4541
+ */
4542
+ interface GetCampaignAnalyticsParams {
4543
+ campaign_id: string;
4544
+ start_date?: string;
4545
+ end_date?: string;
4546
+ }
4547
+ /**
4548
+ * Get campaign analytics result
4549
+ */
4550
+ interface GetCampaignAnalyticsResult {
4551
+ campaign_id: string;
4552
+ sent: number;
4553
+ opened: number;
4554
+ unique_opened: number;
4555
+ replied: number;
4556
+ unique_replied: number;
4557
+ bounced: number;
4558
+ unsubscribed: number;
4559
+ [key: string]: unknown;
4560
+ }
4561
+ /**
4562
+ * Get step analytics parameters
4563
+ */
4564
+ interface GetStepAnalyticsParams {
4565
+ campaign_id: string;
4566
+ }
4567
+ /**
4568
+ * Get step analytics result
4569
+ */
4570
+ interface GetStepAnalyticsResult {
4571
+ steps: Array<{
4572
+ step: string;
4573
+ variant: string;
4574
+ sent: number;
4575
+ opened: number;
4576
+ unique_opened: number;
4577
+ replies: number;
4578
+ unique_replies: number;
4579
+ }>;
4580
+ }
4581
+ /**
4582
+ * Bulk add leads parameters
4583
+ */
4584
+ interface BulkAddLeadsParams {
4585
+ campaign_id: string;
4586
+ leads: Array<{
4587
+ email: string;
4588
+ first_name?: string;
4589
+ last_name?: string;
4590
+ company_name?: string;
4591
+ website?: string;
4592
+ custom_variables?: Record<string, string>;
4593
+ }>;
4594
+ }
4595
+ /**
4596
+ * Bulk add leads result
4597
+ */
4598
+ interface BulkAddLeadsResult {
4599
+ success: boolean;
4600
+ added_count: number;
4601
+ failed_count: number;
4602
+ errors?: Array<{
4603
+ email: string;
4604
+ error: string;
4605
+ }>;
4606
+ }
4607
+ /**
4608
+ * Get account health parameters
4609
+ */
4610
+ interface GetAccountHealthParams {
4611
+ limit?: number;
4612
+ starting_after?: string;
4613
+ }
4614
+ /**
4615
+ * Get account health result
4616
+ */
4617
+ interface GetAccountHealthResult {
4618
+ accounts: Array<{
4619
+ id: string;
4620
+ email: string;
4621
+ status: string;
4622
+ warmup_enabled: boolean;
4623
+ health_score?: number;
4624
+ [key: string]: unknown;
4625
+ }>;
4626
+ next_starting_after?: string;
4627
+ }
4628
+ /**
4629
+ * Create inbox test parameters
4630
+ */
4631
+ interface CreateInboxTestParams {
4632
+ email_account: string;
4633
+ subject?: string;
4634
+ body?: string;
4635
+ }
4636
+ /**
4637
+ * Create inbox test result
4638
+ */
4639
+ interface CreateInboxTestResult {
4640
+ success: boolean;
4641
+ test_id: string;
4642
+ status: string;
4643
+ }
4644
+ /**
4645
+ * Create campaign parameters
4646
+ */
4647
+ interface CreateCampaignParams {
4648
+ name: string;
4649
+ sequences?: Array<{
4650
+ steps: Array<{
4651
+ subject: string;
4652
+ body: string;
4653
+ variants?: Array<{
4654
+ subject: string;
4655
+ body: string;
4656
+ }>;
4657
+ }>;
4658
+ }>;
4659
+ email_list?: string[];
4660
+ daily_limit?: number;
4661
+ stop_on_reply?: boolean;
4662
+ stop_on_auto_reply?: boolean;
4663
+ track_opens?: boolean;
4664
+ track_clicks?: boolean;
4665
+ text_only?: boolean;
4666
+ }
4667
+ /**
4668
+ * Create campaign result
4669
+ */
4670
+ interface CreateCampaignResult {
4671
+ success: boolean;
4672
+ campaign_id: string;
4673
+ name: string;
4674
+ }
4421
4675
 
4422
4676
  /**
4423
4677
  * Shared Mailso param/result types (browser-safe)
@@ -5181,6 +5435,10 @@ type ApifyToolMap = {
5181
5435
  params: GetDatasetItemsParams;
5182
5436
  result: GetDatasetItemsResult;
5183
5437
  };
5438
+ startActor: {
5439
+ params: StartActorParams;
5440
+ result: StartActorResult;
5441
+ };
5184
5442
  };
5185
5443
  type GmailToolMap = {
5186
5444
  sendEmail: {
@@ -5237,6 +5495,50 @@ type InstantlyToolMap = {
5237
5495
  params: AddToCampaignParams;
5238
5496
  result: AddToCampaignResult;
5239
5497
  };
5498
+ listCampaigns: {
5499
+ params: ListCampaignsParams;
5500
+ result: ListCampaignsResult;
5501
+ };
5502
+ getCampaign: {
5503
+ params: GetCampaignParams;
5504
+ result: GetCampaignResult;
5505
+ };
5506
+ updateCampaign: {
5507
+ params: UpdateCampaignParams;
5508
+ result: UpdateCampaignResult;
5509
+ };
5510
+ pauseCampaign: {
5511
+ params: PauseCampaignParams;
5512
+ result: PauseCampaignResult;
5513
+ };
5514
+ activateCampaign: {
5515
+ params: ActivateCampaignParams;
5516
+ result: ActivateCampaignResult;
5517
+ };
5518
+ getCampaignAnalytics: {
5519
+ params: GetCampaignAnalyticsParams;
5520
+ result: GetCampaignAnalyticsResult;
5521
+ };
5522
+ getStepAnalytics: {
5523
+ params: GetStepAnalyticsParams;
5524
+ result: GetStepAnalyticsResult;
5525
+ };
5526
+ bulkAddLeads: {
5527
+ params: BulkAddLeadsParams;
5528
+ result: BulkAddLeadsResult;
5529
+ };
5530
+ getAccountHealth: {
5531
+ params: GetAccountHealthParams;
5532
+ result: GetAccountHealthResult;
5533
+ };
5534
+ createInboxTest: {
5535
+ params: CreateInboxTestParams;
5536
+ result: CreateInboxTestResult;
5537
+ };
5538
+ createCampaign: {
5539
+ params: CreateCampaignParams;
5540
+ result: CreateCampaignResult;
5541
+ };
5240
5542
  };
5241
5543
  type MailsoToolMap = {
5242
5544
  verifyEmail: {
@@ -5286,9 +5588,7 @@ type LeadToolMap = {
5286
5588
  result: AcqCompany | null;
5287
5589
  };
5288
5590
  listCompanies: {
5289
- params: {
5290
- filters?: CompanyFilters;
5291
- };
5591
+ params: CompanyFilters;
5292
5592
  result: AcqCompany[];
5293
5593
  };
5294
5594
  deleteCompany: {
@@ -5324,9 +5624,9 @@ type LeadToolMap = {
5324
5624
  result: AcqContact | null;
5325
5625
  };
5326
5626
  listContacts: {
5327
- params: {
5328
- filters?: ContactFilters;
5329
- pagination?: PaginationParams;
5627
+ params: ContactFilters & {
5628
+ limit?: number;
5629
+ offset?: number;
5330
5630
  };
5331
5631
  result: PaginatedResult<AcqContact>;
5332
5632
  };
@@ -5422,6 +5722,14 @@ type LeadToolMap = {
5422
5722
  params: Omit<DeleteDealParams, 'organizationId'>;
5423
5723
  result: void;
5424
5724
  };
5725
+ mergeEnrichmentData: {
5726
+ params: {
5727
+ id: string;
5728
+ table: 'acq_companies' | 'acq_contacts';
5729
+ data: Record<string, unknown>;
5730
+ };
5731
+ result: void;
5732
+ };
5425
5733
  };
5426
5734
  type PdfToolMap = {
5427
5735
  render: {
@@ -5874,7 +6182,7 @@ interface ResourceList {
5874
6182
  environment?: 'dev' | 'prod';
5875
6183
  }
5876
6184
  /** Webhook provider identifiers */
5877
- type WebhookProviderType = 'cal-com' | 'fillout' | 'stripe' | 'signature-api' | 'instantly' | 'test';
6185
+ type WebhookProviderType = 'cal-com' | 'fillout' | 'stripe' | 'signature-api' | 'instantly' | 'test' | 'apify';
5878
6186
  /** Webhook trigger configuration */
5879
6187
  interface WebhookTriggerConfig {
5880
6188
  /** Provider identifier */
@@ -6159,6 +6467,31 @@ declare class RegistryValidationError extends Error {
6159
6467
  constructor(orgName: string, resourceId: string | null, field: string | null, message: string);
6160
6468
  }
6161
6469
 
6470
+ /**
6471
+ * LLM Platform Tool Adapter
6472
+ *
6473
+ * Typed wrapper over platform.call() for LLM generation.
6474
+ * Singleton export -- no credential needed (platform tool).
6475
+ *
6476
+ * Types are shared with the server-side LLM engine via @repo/core/execution.
6477
+ */
6478
+
6479
+ type LLMProvider = 'openai' | 'anthropic' | 'openrouter' | 'google';
6480
+ /**
6481
+ * SDK LLM generate params.
6482
+ * Extends LLMGenerateRequest with optional typed provider/model for worker→platform dispatch.
6483
+ * When provided, these override the resource-level model config server-side.
6484
+ * When omitted, the resource's default ModelConfig is used.
6485
+ */
6486
+ interface SDKLLMGenerateParams extends Omit<LLMGenerateRequest, 'signal' | 'responseSchema'> {
6487
+ /** LLM provider — typed to prevent invalid provider strings */
6488
+ provider?: LLMProvider;
6489
+ /** Model identifier — must be a supported LLMModel when provided */
6490
+ model?: LLMModel;
6491
+ /** JSON Schema for structured output (optional — omit for unstructured text) */
6492
+ responseSchema?: unknown;
6493
+ }
6494
+
6162
6495
  type ResourceStatus = 'dev' | 'prod';
6163
6496
  /**
6164
6497
  * Project configuration for an external developer project.
@@ -6202,4 +6535,4 @@ declare class ToolingError extends ExecutionError {
6202
6535
  }
6203
6536
 
6204
6537
  export { ExecutionError, RegistryValidationError, ResourceRegistry, StepType, ToolingError };
6205
- export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqList, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, ApifyToolMap, AppendBlocksParams, AppendBlocksResult, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePageParams, CreatePageResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, DeleteBlocksParams, DeleteBlocksResult, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeletePageParams, DeletePageResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DomainDefinition, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAllPagesResult, ListAttributesParams, ListAttributesResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, MailsoToolMap, MailsoVerifyEmailParams, MailsoVerifyEmailResult, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, NotionToolMap, OrganizationResources, PageWithChildren, PaginatedResult, PaginationParams$1 as PaginationParams, PdfToolMap, QueryRecordsParams, QueryRecordsResult, ReadPageParams, ReadPageResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceDefinition, ResourceDomain, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, SyncDealStageParams, TaskSchedule, TaskScheduleConfig, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateBlocksParams, UpdateBlocksResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePageTitleParams, UpdatePageTitleResult, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };
6538
+ export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqList, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, ApifyToolMap, ApifyWebhookConfig, AppendBlocksParams, AppendBlocksResult, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePageParams, CreatePageResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, DeleteBlocksParams, DeleteBlocksResult, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeletePageParams, DeletePageResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DomainDefinition, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAllPagesResult, ListAttributesParams, ListAttributesResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, MailsoToolMap, MailsoVerifyEmailParams, MailsoVerifyEmailResult, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, NotionToolMap, OrganizationResources, PageWithChildren, PaginatedResult, PaginationParams, PdfToolMap, QueryRecordsParams, QueryRecordsResult, ReadPageParams, ReadPageResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceDefinition, ResourceDomain, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, SyncDealStageParams, TaskSchedule, TaskScheduleConfig, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateBlocksParams, UpdateBlocksResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePageTitleParams, UpdatePageTitleResult, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };
package/dist/templates.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
 
3
3
  // src/cli/commands/templates/core/workspace.ts
4
- var TEMPLATE_VERSION = 31;
4
+ var TEMPLATE_VERSION = 32;
5
5
  function configTemplate() {
6
6
  return `import type { ElevasConfig } from '@elevasis/sdk'
7
7
 
@@ -1744,6 +1744,77 @@ When all plan steps are marked COMPLETE, **suggest** completing the task -- neve
1744
1744
  - Completed tasks move OUT of \`docs/in-progress/\` to \`docs/<relevant-dir>/\`
1745
1745
  `;
1746
1746
  }
1747
+ function claudeLoggingRuleTemplate() {
1748
+ return `---
1749
+ description: Logging conventions for workflow and agent handlers
1750
+ paths:
1751
+ - src/**
1752
+ ---
1753
+
1754
+ # Logging
1755
+
1756
+ ## Always Use \`context.logger\` in Handlers
1757
+
1758
+ **Never use \`console.log\`, \`console.warn\`, or \`console.error\` in step/agent handlers.**
1759
+ The platform does not capture \`console.*\` output \u2014 it will not appear in execution logs.
1760
+
1761
+ \`\`\`typescript
1762
+ // \u274C WRONG \u2014 invisible in Command Center
1763
+ handler: async (rawInput) => {
1764
+ console.log('Processing...')
1765
+ }
1766
+
1767
+ // \u2705 CORRECT \u2014 visible in Command Center
1768
+ handler: async (rawInput, context) => {
1769
+ context.logger.info('Processing...')
1770
+ }
1771
+ \`\`\`
1772
+
1773
+ ## Logger Methods
1774
+
1775
+ \`\`\`typescript
1776
+ context.logger.debug('Verbose detail \u2014 shown in debug mode only')
1777
+ context.logger.info('Normal progress messages')
1778
+ context.logger.warn('Non-fatal issue \u2014 skipped, retried, partial result')
1779
+ context.logger.error('Fatal error or unexpected failure')
1780
+ \`\`\`
1781
+
1782
+ ## Extensive Logging Standard
1783
+
1784
+ Every handler should log:
1785
+
1786
+ 1. **Entry** \u2014 step name + key input params (category, count, domain, etc.)
1787
+ 2. **Progress** \u2014 inside loops: per-item status (processed, skipped, failed)
1788
+ 3. **Decisions** \u2014 idempotency skips, early exits, conditional branches
1789
+ 4. **Summary** \u2014 counts at the end (X processed, Y skipped, Z errors)
1790
+
1791
+ \`\`\`typescript
1792
+ handler: async (rawInput, context) => {
1793
+ const data = rawInput as SomeType
1794
+ context.logger.info(\`[step-name] Starting \u2014 \${data.items.length} items\`)
1795
+
1796
+ let processed = 0, skipped = 0
1797
+ for (const item of data.items) {
1798
+ if (item.alreadyDone) {
1799
+ skipped++
1800
+ context.logger.info(\`[step-name] Skipping \${item.name} \u2014 already complete\`)
1801
+ continue
1802
+ }
1803
+ // ...
1804
+ processed++
1805
+ context.logger.info(\`[step-name] Processed \${item.name}\`)
1806
+ }
1807
+
1808
+ context.logger.info(\`[step-name] Done \u2014 \${processed} processed, \${skipped} skipped\`)
1809
+ }
1810
+ \`\`\`
1811
+
1812
+ ## Warnings vs Errors
1813
+
1814
+ - \`warn\`: skipped item, not found in DB, LLM timeout on one domain (processing continues)
1815
+ - \`error\`: step-level failures that propagate as thrown errors (log before throwing if possible)
1816
+ `;
1817
+ }
1747
1818
  function claudePostEditValidateHookTemplate() {
1748
1819
  return `#!/usr/bin/env node
1749
1820
  // post-edit-validate.mjs
@@ -2105,7 +2176,8 @@ function getManagedTemplates(ctx = {}) {
2105
2176
  ".claude/rules/docs-authoring.md": claudeDocsAuthoringRuleTemplate,
2106
2177
  ".claude/rules/memory-conventions.md": claudeMemoryConventionsRuleTemplate,
2107
2178
  ".claude/rules/project-map.md": claudeProjectMapRuleTemplate,
2108
- ".claude/rules/task-tracking.md": claudeTaskTrackingRuleTemplate
2179
+ ".claude/rules/task-tracking.md": claudeTaskTrackingRuleTemplate,
2180
+ ".claude/rules/logging.md": claudeLoggingRuleTemplate
2109
2181
  };
2110
2182
  }
2111
2183
 
@@ -9,6 +9,6 @@ import type { InstantlyToolMap } from '../../types/index.js';
9
9
  * Create a typed Instantly adapter bound to a specific credential.
10
10
  *
11
11
  * @param credential - Credential name as configured in the command center
12
- * @returns Object with 5 typed methods for Instantly email outreach operations
12
+ * @returns Object with 16 typed methods for Instantly email outreach operations
13
13
  */
14
14
  export declare function createInstantlyAdapter(credential: string): import("./create-adapter.js").TypedAdapter<InstantlyToolMap>;
@@ -6,7 +6,22 @@
6
6
  *
7
7
  * Types are shared with the server-side LLM engine via @repo/core/execution.
8
8
  */
9
- import type { LLMGenerateRequest, LLMGenerateResponse } from '../../types/index.js';
9
+ import type { LLMGenerateRequest, LLMGenerateResponse, LLMModel } from '../../types/index.js';
10
+ type LLMProvider = 'openai' | 'anthropic' | 'openrouter' | 'google';
11
+ /**
12
+ * SDK LLM generate params.
13
+ * Extends LLMGenerateRequest with optional typed provider/model for worker→platform dispatch.
14
+ * When provided, these override the resource-level model config server-side.
15
+ * When omitted, the resource's default ModelConfig is used.
16
+ */
17
+ export interface SDKLLMGenerateParams extends Omit<LLMGenerateRequest, 'signal' | 'responseSchema'> {
18
+ /** LLM provider — typed to prevent invalid provider strings */
19
+ provider?: LLMProvider;
20
+ /** Model identifier — must be a supported LLMModel when provided */
21
+ model?: LLMModel;
22
+ /** JSON Schema for structured output (optional — omit for unstructured text) */
23
+ responseSchema?: unknown;
24
+ }
10
25
  /**
11
26
  * Typed LLM adapter for structured output generation.
12
27
  *
@@ -19,6 +34,8 @@ import type { LLMGenerateRequest, LLMGenerateResponse } from '../../types/index.
19
34
  * import { llm } from '@elevasis/sdk/worker'
20
35
  *
21
36
  * const response = await llm.generate({
37
+ * provider: 'anthropic',
38
+ * model: 'claude-sonnet-4-5',
22
39
  * messages: [{ role: 'user', content: 'Summarize this document...' }],
23
40
  * responseSchema: { type: 'object', properties: { summary: { type: 'string' } } },
24
41
  * })
@@ -26,5 +43,6 @@ import type { LLMGenerateRequest, LLMGenerateResponse } from '../../types/index.
26
43
  * ```
27
44
  */
28
45
  export declare const llm: {
29
- generate: <T = unknown>(params: Omit<LLMGenerateRequest, "signal">) => Promise<LLMGenerateResponse<T>>;
46
+ generate: <T = unknown>(params: SDKLLMGenerateParams) => Promise<LLMGenerateResponse<T>>;
30
47
  };
48
+ export {};
@@ -3284,7 +3284,7 @@ function timeoutError(operation) {
3284
3284
  }
3285
3285
 
3286
3286
  // ../core/src/platform/constants/timeouts.ts
3287
- var DEFAULT_TOOL_TIMEOUT = 6e5;
3287
+ var DEFAULT_TOOL_TIMEOUT = 18e5;
3288
3288
 
3289
3289
  // ../core/src/execution/engine/agent/actions/executor.ts
3290
3290
  async function executeToolCall(iterationContext, action) {
@@ -4685,8 +4685,8 @@ var platform = {
4685
4685
  credential: options.credential
4686
4686
  };
4687
4687
  return new Promise((resolve, reject) => {
4688
- const timeoutMs = 6e5;
4689
- const timeoutLabel = "600s";
4688
+ const timeoutMs = 18e5;
4689
+ const timeoutLabel = "1800s";
4690
4690
  const timer = setTimeout(() => {
4691
4691
  pendingCalls.delete(id);
4692
4692
  reject(
@@ -4788,7 +4788,17 @@ function createAdapter(tool, methods, credential) {
4788
4788
  for (const method of methods) {
4789
4789
  adapter[method] = (params) => platform.call({ tool, method, params: params ?? {}, credential });
4790
4790
  }
4791
- return adapter;
4791
+ const registeredMethods = new Set(methods);
4792
+ return new Proxy(adapter, {
4793
+ get(target, prop, receiver) {
4794
+ if (typeof prop === "string" && !registeredMethods.has(prop) && !(prop in target)) {
4795
+ throw new Error(
4796
+ `${tool}.${prop} is not a registered method. Available: ${[...registeredMethods].join(", ")}. Add '${prop}' to createAdapter('${tool}', [...]) in the SDK adapter.`
4797
+ );
4798
+ }
4799
+ return Reflect.get(target, prop, receiver);
4800
+ }
4801
+ });
4792
4802
  }
4793
4803
 
4794
4804
  // src/worker/adapters/attio.ts
@@ -4811,7 +4821,7 @@ function createAttioAdapter(credential) {
4811
4821
  }
4812
4822
 
4813
4823
  // src/worker/adapters/apify.ts
4814
- var METHODS2 = ["runActor", "getDatasetItems"];
4824
+ var METHODS2 = ["runActor", "getDatasetItems", "startActor"];
4815
4825
  function createApifyAdapter(credential) {
4816
4826
  return createAdapter("apify", METHODS2, credential);
4817
4827
  }
@@ -4859,7 +4869,18 @@ var METHODS6 = [
4859
4869
  "removeFromSubsequence",
4860
4870
  "getEmails",
4861
4871
  "updateInterestStatus",
4862
- "addToCampaign"
4872
+ "addToCampaign",
4873
+ "listCampaigns",
4874
+ "getCampaign",
4875
+ "updateCampaign",
4876
+ "pauseCampaign",
4877
+ "activateCampaign",
4878
+ "getCampaignAnalytics",
4879
+ "getStepAnalytics",
4880
+ "bulkAddLeads",
4881
+ "getAccountHealth",
4882
+ "createInboxTest",
4883
+ "createCampaign"
4863
4884
  ];
4864
4885
  function createInstantlyAdapter(credential) {
4865
4886
  return createAdapter("instantly", METHODS6, credential);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "0.5.20",
3
+ "version": "0.5.23",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -32,11 +32,6 @@
32
32
  "dist/types/templates.d.ts",
33
33
  "reference/"
34
34
  ],
35
- "scripts": {
36
- "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.core-dts.json && tsc -p tsconfig.build.json && tsup && rollup -c rollup.dts.config.mjs && esbuild src/cli/index.ts --bundle --platform=node --outfile=dist/cli.cjs --format=cjs --external:esbuild --external:jiti --banner:js=\"#!/usr/bin/env node\" && node scripts/copy-reference-docs.mjs && node scripts/generate-navigation.mjs",
37
- "check-types": "tsc --noEmit",
38
- "test:bundle": "pnpm build && vitest run --config vitest.bundle.config.ts"
39
- },
40
35
  "dependencies": {
41
36
  "esbuild": "^0.25.0",
42
37
  "jiti": "^2.0.0"
@@ -45,8 +40,6 @@
45
40
  "zod": "^4.1.0"
46
41
  },
47
42
  "devDependencies": {
48
- "@repo/core": "workspace:*",
49
- "@repo/typescript-config": "workspace:*",
50
43
  "@types/node": "^22.0.0",
51
44
  "chalk": "^5.3.0",
52
45
  "commander": "^11.0.0",
@@ -57,6 +50,13 @@
57
50
  "rollup-plugin-dts": "^6.3.0",
58
51
  "tsup": "^8.0.0",
59
52
  "typescript": "5.9.2",
60
- "zod": "^4.1.0"
53
+ "zod": "^4.1.0",
54
+ "@repo/core": "0.0.0",
55
+ "@repo/typescript-config": "0.0.0"
56
+ },
57
+ "scripts": {
58
+ "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.core-dts.json && tsc -p tsconfig.build.json && tsup && rollup -c rollup.dts.config.mjs && esbuild src/cli/index.ts --bundle --platform=node --outfile=dist/cli.cjs --format=cjs --external:esbuild --external:jiti --banner:js=\"#!/usr/bin/env node\" && node scripts/copy-reference-docs.mjs && node scripts/generate-navigation.mjs",
59
+ "check-types": "tsc --noEmit",
60
+ "test:bundle": "pnpm build && vitest run --config vitest.bundle.config.ts"
61
61
  }
62
- }
62
+ }