@elevasis/sdk 1.8.2 → 1.8.3
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 +88 -39
- package/dist/types/worker/adapters/lead.d.ts +1 -1
- package/dist/worker/index.js +2 -0
- package/package.json +2 -2
- package/reference/_navigation.md +7 -1
- package/reference/_reference-manifest.json +14 -0
- package/reference/claude-config/logs/scaffold-registry-reminder.log +3 -0
- package/reference/claude-config/rules/agent-start-here.md +254 -254
- package/reference/claude-config/rules/frontend.md +43 -43
- package/reference/claude-config/rules/operations.md +64 -64
- package/reference/claude-config/rules/organization-model.md +42 -43
- package/reference/claude-config/rules/organization-os.md +107 -107
- package/reference/claude-config/rules/shared-types.md +2 -2
- package/reference/claude-config/rules/task-tracking.md +1 -1
- package/reference/claude-config/rules/ui.md +202 -202
- package/reference/claude-config/rules/vibe.md +202 -202
- package/reference/claude-config/skills/configure/SKILL.md +98 -98
- package/reference/claude-config/skills/configure/operations/codify-level-a.md +100 -100
- package/reference/claude-config/skills/configure/operations/codify-level-b.md +158 -158
- package/reference/claude-config/skills/configure/operations/customers.md +150 -150
- package/reference/claude-config/skills/configure/operations/features.md +162 -162
- package/reference/claude-config/skills/configure/operations/goals.md +147 -147
- package/reference/claude-config/skills/configure/operations/identity.md +133 -133
- package/reference/claude-config/skills/configure/operations/labels.md +128 -128
- package/reference/claude-config/skills/configure/operations/offerings.md +159 -159
- package/reference/claude-config/skills/configure/operations/roles.md +153 -153
- package/reference/claude-config/skills/configure/operations/techStack.md +139 -139
- package/reference/claude-config/skills/explore/SKILL.md +78 -78
- package/reference/claude-config/skills/git-sync/SKILL.md +126 -0
- package/reference/claude-config/skills/save/SKILL.md +183 -183
- package/reference/claude-config/skills/setup/SKILL.md +275 -275
- package/reference/claude-config/skills/sync/SKILL.md +10 -44
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -0
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -0
- package/reference/claude-config/sync-notes/README.md +43 -0
- package/reference/packages/core/src/README.md +39 -36
- package/reference/packages/core/src/business/README.md +52 -52
- package/reference/packages/core/src/organization-model/README.md +97 -97
- package/reference/packages/core/src/test-utils/README.md +42 -0
- package/reference/scaffold/core/organization-graph.mdx +272 -272
- package/reference/scaffold/core/organization-model.mdx +320 -320
- package/reference/scaffold/index.mdx +64 -64
- package/reference/scaffold/operations/propagation-pipeline.md +125 -104
- package/reference/scaffold/operations/scaffold-maintenance.md +122 -122
- package/reference/scaffold/operations/workflow-recipes.md +436 -436
- package/reference/scaffold/recipes/add-a-feature.md +158 -158
- package/reference/scaffold/recipes/add-a-resource.md +158 -158
- package/reference/scaffold/recipes/customize-organization-model.md +400 -400
- package/reference/scaffold/recipes/extend-a-base-entity.md +140 -140
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +158 -158
- package/reference/scaffold/recipes/index.md +32 -32
- package/reference/scaffold/reference/contracts.md +608 -607
- package/reference/scaffold/reference/feature-registry.md +2 -0
- package/reference/scaffold/reference/glossary.md +105 -105
- package/reference/scaffold/ui/composition-extensibility.mdx +1 -1
- package/reference/scaffold/ui/feature-flags-and-gating.md +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- @generated by scripts/monorepo/generate-scaffold-contracts.js — DO NOT EDIT -->
|
|
2
|
+
<!-- Regenerate: pnpm scaffold:sync -->
|
|
2
3
|
---
|
|
3
4
|
title: Reference Contracts
|
|
4
5
|
description: Auto-generated TypeScript contracts for SDK consumers. Do not edit manually.
|
|
@@ -396,194 +397,194 @@ export interface ElevasisFeaturesContextValue {
|
|
|
396
397
|
### `ResourceStatus`
|
|
397
398
|
|
|
398
399
|
```typescript
|
|
399
|
-
/**
|
|
400
|
-
* Resource Registry type definitions
|
|
400
|
+
/**
|
|
401
|
+
* Resource Registry type definitions
|
|
402
|
+
*/
|
|
403
|
+
|
|
404
|
+
import type { IntegrationType } from '../../execution/engine/tools/integration'
|
|
405
|
+
import type { ResourceDomain } from './domains'
|
|
406
|
+
|
|
407
|
+
// ============================================================================
|
|
408
|
+
// Core Resource Type Definitions
|
|
409
|
+
// ============================================================================
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Environment/deployment status for resources
|
|
401
413
|
*/
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
// Core Resource Type Definitions
|
|
408
|
-
// ============================================================================
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Environment/deployment status for resources
|
|
412
|
-
*/
|
|
413
|
-
export type ResourceStatus = 'dev' | 'prod'
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* All resource types in the platform
|
|
417
|
-
* Used as the discriminator field in ResourceDefinition
|
|
414
|
+
export type ResourceStatus = 'dev' | 'prod'
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* All resource types in the platform
|
|
418
|
+
* Used as the discriminator field in ResourceDefinition
|
|
418
419
|
*/
|
|
419
420
|
```
|
|
420
421
|
|
|
421
422
|
### `ResourceType`
|
|
422
423
|
|
|
423
424
|
```typescript
|
|
424
|
-
/**
|
|
425
|
-
* All resource types in the platform
|
|
426
|
-
* Used as the discriminator field in ResourceDefinition
|
|
425
|
+
/**
|
|
426
|
+
* All resource types in the platform
|
|
427
|
+
* Used as the discriminator field in ResourceDefinition
|
|
427
428
|
*/
|
|
428
|
-
export type ResourceType = 'agent' | 'workflow' | 'trigger' | 'integration' | 'external' | 'human'
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Executable resource types (subset of ResourceType)
|
|
432
|
-
* These resources can be directly executed by the execution engine
|
|
429
|
+
export type ResourceType = 'agent' | 'workflow' | 'trigger' | 'integration' | 'external' | 'human'
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Executable resource types (subset of ResourceType)
|
|
433
|
+
* These resources can be directly executed by the execution engine
|
|
433
434
|
*/
|
|
434
435
|
```
|
|
435
436
|
|
|
436
437
|
### `ExecutableResourceType`
|
|
437
438
|
|
|
438
439
|
```typescript
|
|
439
|
-
/**
|
|
440
|
-
* Executable resource types (subset of ResourceType)
|
|
441
|
-
* These resources can be directly executed by the execution engine
|
|
440
|
+
/**
|
|
441
|
+
* Executable resource types (subset of ResourceType)
|
|
442
|
+
* These resources can be directly executed by the execution engine
|
|
442
443
|
*/
|
|
443
|
-
export type ExecutableResourceType = 'workflow' | 'agent'
|
|
444
|
-
|
|
445
|
-
// ============================================================================
|
|
446
|
-
// Base Resource Interface
|
|
447
|
-
// ============================================================================
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* Base interface for ALL platform resources
|
|
451
|
-
* Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
|
|
444
|
+
export type ExecutableResourceType = 'workflow' | 'agent'
|
|
445
|
+
|
|
446
|
+
// ============================================================================
|
|
447
|
+
// Base Resource Interface
|
|
448
|
+
// ============================================================================
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Base interface for ALL platform resources
|
|
452
|
+
* Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
|
|
452
453
|
*/
|
|
453
454
|
```
|
|
454
455
|
|
|
455
456
|
### `ResourceDefinition`
|
|
456
457
|
|
|
457
458
|
```typescript
|
|
458
|
-
/**
|
|
459
|
-
* Base interface for ALL platform resources
|
|
460
|
-
* Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
|
|
459
|
+
/**
|
|
460
|
+
* Base interface for ALL platform resources
|
|
461
|
+
* Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
|
|
461
462
|
*/
|
|
462
|
-
export interface ResourceDefinition {
|
|
463
|
-
/** Unique resource identifier */
|
|
464
|
-
resourceId: string
|
|
465
|
-
|
|
466
|
-
/** Display name */
|
|
467
|
-
name: string
|
|
468
|
-
|
|
469
|
-
/** Purpose and functionality description */
|
|
470
|
-
description: string
|
|
471
|
-
|
|
472
|
-
/** Version for change tracking and evolution */
|
|
473
|
-
version: string
|
|
474
|
-
|
|
475
|
-
/** Resource type discriminator */
|
|
476
|
-
type: ResourceType
|
|
477
|
-
|
|
478
|
-
/** Environment/deployment status */
|
|
479
|
-
status: ResourceStatus
|
|
480
|
-
|
|
481
|
-
/** Domain tags for filtering and organization */
|
|
482
|
-
domains?: ResourceDomain[]
|
|
483
|
-
|
|
484
|
-
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
485
|
-
sessionCapable?: boolean
|
|
486
|
-
|
|
487
|
-
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
488
|
-
origin?: 'local' | 'remote'
|
|
489
|
-
|
|
490
|
-
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
491
|
-
archived?: boolean
|
|
463
|
+
export interface ResourceDefinition {
|
|
464
|
+
/** Unique resource identifier */
|
|
465
|
+
resourceId: string
|
|
466
|
+
|
|
467
|
+
/** Display name */
|
|
468
|
+
name: string
|
|
469
|
+
|
|
470
|
+
/** Purpose and functionality description */
|
|
471
|
+
description: string
|
|
472
|
+
|
|
473
|
+
/** Version for change tracking and evolution */
|
|
474
|
+
version: string
|
|
475
|
+
|
|
476
|
+
/** Resource type discriminator */
|
|
477
|
+
type: ResourceType
|
|
478
|
+
|
|
479
|
+
/** Environment/deployment status */
|
|
480
|
+
status: ResourceStatus
|
|
481
|
+
|
|
482
|
+
/** Domain tags for filtering and organization */
|
|
483
|
+
domains?: ResourceDomain[]
|
|
484
|
+
|
|
485
|
+
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
486
|
+
sessionCapable?: boolean
|
|
487
|
+
|
|
488
|
+
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
489
|
+
origin?: 'local' | 'remote'
|
|
490
|
+
|
|
491
|
+
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
492
|
+
archived?: boolean
|
|
492
493
|
}
|
|
493
494
|
```
|
|
494
495
|
|
|
495
496
|
### `DomainDefinition`
|
|
496
497
|
|
|
497
498
|
```typescript
|
|
498
|
-
/** Unique resource identifier */
|
|
499
|
-
resourceId: string
|
|
500
|
-
|
|
501
|
-
/** Display name */
|
|
502
|
-
name: string
|
|
503
|
-
|
|
504
|
-
/** Purpose and functionality description */
|
|
505
|
-
description: string
|
|
506
|
-
|
|
507
|
-
/** Version for change tracking and evolution */
|
|
508
|
-
version: string
|
|
509
|
-
|
|
510
|
-
/** Resource type discriminator */
|
|
511
|
-
type: ResourceType
|
|
512
|
-
|
|
513
|
-
/** Environment/deployment status */
|
|
514
|
-
status: ResourceStatus
|
|
515
|
-
|
|
516
|
-
/** Domain tags for filtering and organization */
|
|
517
|
-
domains?: ResourceDomain[]
|
|
518
|
-
|
|
519
|
-
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
520
|
-
sessionCapable?: boolean
|
|
521
|
-
|
|
522
|
-
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
523
|
-
origin?: 'local' | 'remote'
|
|
524
|
-
|
|
525
|
-
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
526
|
-
archived?: boolean
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
// ============================================================================
|
|
530
|
-
// Domain Definition Types
|
|
531
|
-
// ============================================================================
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Domain definition for Command View filtering
|
|
535
|
-
*
|
|
536
|
-
* Domains are organizational metadata for UI filtering/grouping.
|
|
537
|
-
* No execution impact - purely for visualization.
|
|
538
|
-
*
|
|
539
|
-
* @example
|
|
540
|
-
* {
|
|
541
|
-
* id: 'support',
|
|
542
|
-
* name: 'Customer Support',
|
|
543
|
-
* description: 'Ticket triage, knowledge base, escalations',
|
|
544
|
-
* color: 'green',
|
|
545
|
-
* icon: 'IconHeadset'
|
|
546
|
-
* }
|
|
499
|
+
/** Unique resource identifier */
|
|
500
|
+
resourceId: string
|
|
501
|
+
|
|
502
|
+
/** Display name */
|
|
503
|
+
name: string
|
|
504
|
+
|
|
505
|
+
/** Purpose and functionality description */
|
|
506
|
+
description: string
|
|
507
|
+
|
|
508
|
+
/** Version for change tracking and evolution */
|
|
509
|
+
version: string
|
|
510
|
+
|
|
511
|
+
/** Resource type discriminator */
|
|
512
|
+
type: ResourceType
|
|
513
|
+
|
|
514
|
+
/** Environment/deployment status */
|
|
515
|
+
status: ResourceStatus
|
|
516
|
+
|
|
517
|
+
/** Domain tags for filtering and organization */
|
|
518
|
+
domains?: ResourceDomain[]
|
|
519
|
+
|
|
520
|
+
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
521
|
+
sessionCapable?: boolean
|
|
522
|
+
|
|
523
|
+
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
524
|
+
origin?: 'local' | 'remote'
|
|
525
|
+
|
|
526
|
+
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
527
|
+
archived?: boolean
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
// ============================================================================
|
|
531
|
+
// Domain Definition Types
|
|
532
|
+
// ============================================================================
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Domain definition for Command View filtering
|
|
536
|
+
*
|
|
537
|
+
* Domains are organizational metadata for UI filtering/grouping.
|
|
538
|
+
* No execution impact - purely for visualization.
|
|
539
|
+
*
|
|
540
|
+
* @example
|
|
541
|
+
* {
|
|
542
|
+
* id: 'support',
|
|
543
|
+
* name: 'Customer Support',
|
|
544
|
+
* description: 'Ticket triage, knowledge base, escalations',
|
|
545
|
+
* color: 'green',
|
|
546
|
+
* icon: 'IconHeadset'
|
|
547
|
+
* }
|
|
547
548
|
*/
|
|
548
|
-
export interface DomainDefinition {
|
|
549
|
-
/** Unique identifier (e.g., 'support') */
|
|
550
|
-
id: string
|
|
551
|
-
/** Display name (e.g., 'Customer Support') */
|
|
552
|
-
name: string
|
|
553
|
-
/** Purpose description */
|
|
554
|
-
description: string
|
|
555
|
-
/** Optional Mantine color for UI (e.g., 'blue', 'green', 'orange') */
|
|
556
|
-
color?: string
|
|
557
|
-
/** Optional Tabler icon name (e.g., 'IconHeadset') */
|
|
558
|
-
icon?: string
|
|
549
|
+
export interface DomainDefinition {
|
|
550
|
+
/** Unique identifier (e.g., 'support') */
|
|
551
|
+
id: string
|
|
552
|
+
/** Display name (e.g., 'Customer Support') */
|
|
553
|
+
name: string
|
|
554
|
+
/** Purpose description */
|
|
555
|
+
description: string
|
|
556
|
+
/** Optional Mantine color for UI (e.g., 'blue', 'green', 'orange') */
|
|
557
|
+
color?: string
|
|
558
|
+
/** Optional Tabler icon name (e.g., 'IconHeadset') */
|
|
559
|
+
icon?: string
|
|
559
560
|
}
|
|
560
561
|
```
|
|
561
562
|
|
|
562
563
|
### `ResourceList`
|
|
563
564
|
|
|
564
565
|
```typescript
|
|
565
|
-
/** Unique identifier (e.g., 'support') */
|
|
566
|
-
id: string
|
|
567
|
-
/** Display name (e.g., 'Customer Support') */
|
|
568
|
-
name: string
|
|
569
|
-
/** Purpose description */
|
|
570
|
-
description: string
|
|
571
|
-
/** Optional Mantine color for UI (e.g., 'blue', 'green', 'orange') */
|
|
572
|
-
color?: string
|
|
573
|
-
/** Optional Tabler icon name (e.g., 'IconHeadset') */
|
|
574
|
-
icon?: string
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* Resource list for organization
|
|
579
|
-
* Returns ResourceDefinition metadata (not full definitions)
|
|
566
|
+
/** Unique identifier (e.g., 'support') */
|
|
567
|
+
id: string
|
|
568
|
+
/** Display name (e.g., 'Customer Support') */
|
|
569
|
+
name: string
|
|
570
|
+
/** Purpose description */
|
|
571
|
+
description: string
|
|
572
|
+
/** Optional Mantine color for UI (e.g., 'blue', 'green', 'orange') */
|
|
573
|
+
color?: string
|
|
574
|
+
/** Optional Tabler icon name (e.g., 'IconHeadset') */
|
|
575
|
+
icon?: string
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Resource list for organization
|
|
580
|
+
* Returns ResourceDefinition metadata (not full definitions)
|
|
580
581
|
*/
|
|
581
|
-
export interface ResourceList {
|
|
582
|
-
workflows: ResourceDefinition[]
|
|
583
|
-
agents: ResourceDefinition[]
|
|
584
|
-
total: number
|
|
585
|
-
organizationName: string
|
|
586
|
-
environment?: 'dev' | 'prod'
|
|
582
|
+
export interface ResourceList {
|
|
583
|
+
workflows: ResourceDefinition[]
|
|
584
|
+
agents: ResourceDefinition[]
|
|
585
|
+
total: number
|
|
586
|
+
organizationName: string
|
|
587
|
+
environment?: 'dev' | 'prod'
|
|
587
588
|
}
|
|
588
589
|
```
|
|
589
590
|
|
|
@@ -591,8 +592,8 @@ export interface ResourceList {
|
|
|
591
592
|
|
|
592
593
|
```typescript
|
|
593
594
|
/** Webhook provider identifiers */
|
|
594
|
-
export type WebhookProviderType = 'cal-com' | 'stripe' | 'signature-api' | 'instantly' | 'apify' | 'test'
|
|
595
|
-
|
|
595
|
+
export type WebhookProviderType = 'cal-com' | 'stripe' | 'signature-api' | 'instantly' | 'apify' | 'test'
|
|
596
|
+
|
|
596
597
|
/** Webhook trigger configuration */
|
|
597
598
|
```
|
|
598
599
|
|
|
@@ -600,490 +601,490 @@ export type WebhookProviderType = 'cal-com' | 'stripe' | 'signature-api' | 'inst
|
|
|
600
601
|
|
|
601
602
|
```typescript
|
|
602
603
|
/** Webhook trigger configuration */
|
|
603
|
-
export interface WebhookTriggerConfig {
|
|
604
|
-
/** Provider identifier */
|
|
605
|
-
provider: WebhookProviderType
|
|
606
|
-
/** Event type for documentation (not used for matching - workflow handles routing) */
|
|
607
|
-
event?: string
|
|
608
|
-
/** Optional filtering (e.g., specific form ID for Fillout) */
|
|
609
|
-
filter?: Record<string, string>
|
|
610
|
-
/** References credential in credentials table for per-org webhook secrets */
|
|
611
|
-
credentialName?: string
|
|
604
|
+
export interface WebhookTriggerConfig {
|
|
605
|
+
/** Provider identifier */
|
|
606
|
+
provider: WebhookProviderType
|
|
607
|
+
/** Event type for documentation (not used for matching - workflow handles routing) */
|
|
608
|
+
event?: string
|
|
609
|
+
/** Optional filtering (e.g., specific form ID for Fillout) */
|
|
610
|
+
filter?: Record<string, string>
|
|
611
|
+
/** References credential in credentials table for per-org webhook secrets */
|
|
612
|
+
credentialName?: string
|
|
612
613
|
}
|
|
613
614
|
```
|
|
614
615
|
|
|
615
616
|
### `ScheduleTriggerConfig`
|
|
616
617
|
|
|
617
618
|
```typescript
|
|
618
|
-
/** Provider identifier */
|
|
619
|
-
provider: WebhookProviderType
|
|
620
|
-
/** Event type for documentation (not used for matching - workflow handles routing) */
|
|
621
|
-
event?: string
|
|
622
|
-
/** Optional filtering (e.g., specific form ID for Fillout) */
|
|
623
|
-
filter?: Record<string, string>
|
|
624
|
-
/** References credential in credentials table for per-org webhook secrets */
|
|
625
|
-
credentialName?: string
|
|
626
|
-
}
|
|
627
|
-
|
|
619
|
+
/** Provider identifier */
|
|
620
|
+
provider: WebhookProviderType
|
|
621
|
+
/** Event type for documentation (not used for matching - workflow handles routing) */
|
|
622
|
+
event?: string
|
|
623
|
+
/** Optional filtering (e.g., specific form ID for Fillout) */
|
|
624
|
+
filter?: Record<string, string>
|
|
625
|
+
/** References credential in credentials table for per-org webhook secrets */
|
|
626
|
+
credentialName?: string
|
|
627
|
+
}
|
|
628
|
+
|
|
628
629
|
/** Schedule trigger configuration */
|
|
629
|
-
export interface ScheduleTriggerConfig {
|
|
630
|
-
/** Cron expression (e.g., '0 6 * * *') */
|
|
631
|
-
cron: string
|
|
632
|
-
/** Optional timezone (default: UTC) */
|
|
633
|
-
timezone?: string
|
|
630
|
+
export interface ScheduleTriggerConfig {
|
|
631
|
+
/** Cron expression (e.g., '0 6 * * *') */
|
|
632
|
+
cron: string
|
|
633
|
+
/** Optional timezone (default: UTC) */
|
|
634
|
+
timezone?: string
|
|
634
635
|
}
|
|
635
636
|
```
|
|
636
637
|
|
|
637
638
|
### `EventTriggerConfig`
|
|
638
639
|
|
|
639
640
|
```typescript
|
|
640
|
-
/** Cron expression (e.g., '0 6 * * *') */
|
|
641
|
-
cron: string
|
|
642
|
-
/** Optional timezone (default: UTC) */
|
|
643
|
-
timezone?: string
|
|
644
|
-
}
|
|
645
|
-
|
|
641
|
+
/** Cron expression (e.g., '0 6 * * *') */
|
|
642
|
+
cron: string
|
|
643
|
+
/** Optional timezone (default: UTC) */
|
|
644
|
+
timezone?: string
|
|
645
|
+
}
|
|
646
|
+
|
|
646
647
|
/** Event trigger configuration */
|
|
647
|
-
export interface EventTriggerConfig {
|
|
648
|
-
/** Internal event type */
|
|
649
|
-
eventType: string
|
|
650
|
-
/** Event source */
|
|
651
|
-
source?: string
|
|
648
|
+
export interface EventTriggerConfig {
|
|
649
|
+
/** Internal event type */
|
|
650
|
+
eventType: string
|
|
651
|
+
/** Event source */
|
|
652
|
+
source?: string
|
|
652
653
|
}
|
|
653
654
|
```
|
|
654
655
|
|
|
655
656
|
### `TriggerConfig`
|
|
656
657
|
|
|
657
658
|
```typescript
|
|
658
|
-
/** Internal event type */
|
|
659
|
-
eventType: string
|
|
660
|
-
/** Event source */
|
|
661
|
-
source?: string
|
|
662
|
-
}
|
|
663
|
-
|
|
659
|
+
/** Internal event type */
|
|
660
|
+
eventType: string
|
|
661
|
+
/** Event source */
|
|
662
|
+
source?: string
|
|
663
|
+
}
|
|
664
|
+
|
|
664
665
|
/** Union of all trigger configs */
|
|
665
|
-
export type TriggerConfig = WebhookTriggerConfig | ScheduleTriggerConfig | EventTriggerConfig
|
|
666
|
-
|
|
667
|
-
// ============================================================================
|
|
668
|
-
// Trigger Definition
|
|
669
|
-
// ============================================================================
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* Trigger metadata - entry points that initiate resource execution
|
|
673
|
-
*
|
|
674
|
-
* Triggers represent how executions start: webhooks from external services,
|
|
675
|
-
* scheduled cron jobs, platform events, or manual user actions.
|
|
676
|
-
*
|
|
677
|
-
* BREAKING CHANGES (2025-11-30):
|
|
678
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
679
|
-
* - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
|
|
680
|
-
* - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
|
|
681
|
-
* - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
|
|
682
|
-
* - triggers object now includes `externalResources` option
|
|
683
|
-
*
|
|
684
|
-
* @example
|
|
685
|
-
* // TriggerDefinition - metadata only
|
|
686
|
-
* {
|
|
687
|
-
* resourceId: 'trigger-new-order',
|
|
688
|
-
* type: 'trigger',
|
|
689
|
-
* triggerType: 'webhook',
|
|
690
|
-
* name: 'New Order',
|
|
691
|
-
* description: 'Webhook from Shopify on new orders',
|
|
692
|
-
* version: '1.0.0',
|
|
693
|
-
* status: 'prod',
|
|
694
|
-
* webhookPath: '/webhooks/shopify/orders'
|
|
695
|
-
* }
|
|
696
|
-
*
|
|
697
|
-
* // Relationships declared in ResourceRelationships (not on TriggerDefinition):
|
|
698
|
-
* // relationships: {
|
|
699
|
-
* // 'trigger-new-order': { triggers: { workflows: ['order-fulfillment-workflow'] } }
|
|
700
|
-
* // }
|
|
666
|
+
export type TriggerConfig = WebhookTriggerConfig | ScheduleTriggerConfig | EventTriggerConfig
|
|
667
|
+
|
|
668
|
+
// ============================================================================
|
|
669
|
+
// Trigger Definition
|
|
670
|
+
// ============================================================================
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Trigger metadata - entry points that initiate resource execution
|
|
674
|
+
*
|
|
675
|
+
* Triggers represent how executions start: webhooks from external services,
|
|
676
|
+
* scheduled cron jobs, platform events, or manual user actions.
|
|
677
|
+
*
|
|
678
|
+
* BREAKING CHANGES (2025-11-30):
|
|
679
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
680
|
+
* - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
|
|
681
|
+
* - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
|
|
682
|
+
* - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
|
|
683
|
+
* - triggers object now includes `externalResources` option
|
|
684
|
+
*
|
|
685
|
+
* @example
|
|
686
|
+
* // TriggerDefinition - metadata only
|
|
687
|
+
* {
|
|
688
|
+
* resourceId: 'trigger-new-order',
|
|
689
|
+
* type: 'trigger',
|
|
690
|
+
* triggerType: 'webhook',
|
|
691
|
+
* name: 'New Order',
|
|
692
|
+
* description: 'Webhook from Shopify on new orders',
|
|
693
|
+
* version: '1.0.0',
|
|
694
|
+
* status: 'prod',
|
|
695
|
+
* webhookPath: '/webhooks/shopify/orders'
|
|
696
|
+
* }
|
|
697
|
+
*
|
|
698
|
+
* // Relationships declared in ResourceRelationships (not on TriggerDefinition):
|
|
699
|
+
* // relationships: {
|
|
700
|
+
* // 'trigger-new-order': { triggers: { workflows: ['order-fulfillment-workflow'] } }
|
|
701
|
+
* // }
|
|
701
702
|
*/
|
|
702
703
|
```
|
|
703
704
|
|
|
704
705
|
### `TriggerDefinition`
|
|
705
706
|
|
|
706
707
|
```typescript
|
|
707
|
-
/**
|
|
708
|
-
* Trigger metadata - entry points that initiate resource execution
|
|
709
|
-
*
|
|
710
|
-
* Triggers represent how executions start: webhooks from external services,
|
|
711
|
-
* scheduled cron jobs, platform events, or manual user actions.
|
|
712
|
-
*
|
|
713
|
-
* BREAKING CHANGES (2025-11-30):
|
|
714
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
715
|
-
* - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
|
|
716
|
-
* - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
|
|
717
|
-
* - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
|
|
718
|
-
* - triggers object now includes `externalResources` option
|
|
719
|
-
*
|
|
720
|
-
* @example
|
|
721
|
-
* // TriggerDefinition - metadata only
|
|
722
|
-
* {
|
|
723
|
-
* resourceId: 'trigger-new-order',
|
|
724
|
-
* type: 'trigger',
|
|
725
|
-
* triggerType: 'webhook',
|
|
726
|
-
* name: 'New Order',
|
|
727
|
-
* description: 'Webhook from Shopify on new orders',
|
|
728
|
-
* version: '1.0.0',
|
|
729
|
-
* status: 'prod',
|
|
730
|
-
* webhookPath: '/webhooks/shopify/orders'
|
|
731
|
-
* }
|
|
732
|
-
*
|
|
733
|
-
* // Relationships declared in ResourceRelationships (not on TriggerDefinition):
|
|
734
|
-
* // relationships: {
|
|
735
|
-
* // 'trigger-new-order': { triggers: { workflows: ['order-fulfillment-workflow'] } }
|
|
736
|
-
* // }
|
|
708
|
+
/**
|
|
709
|
+
* Trigger metadata - entry points that initiate resource execution
|
|
710
|
+
*
|
|
711
|
+
* Triggers represent how executions start: webhooks from external services,
|
|
712
|
+
* scheduled cron jobs, platform events, or manual user actions.
|
|
713
|
+
*
|
|
714
|
+
* BREAKING CHANGES (2025-11-30):
|
|
715
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
716
|
+
* - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
|
|
717
|
+
* - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
|
|
718
|
+
* - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
|
|
719
|
+
* - triggers object now includes `externalResources` option
|
|
720
|
+
*
|
|
721
|
+
* @example
|
|
722
|
+
* // TriggerDefinition - metadata only
|
|
723
|
+
* {
|
|
724
|
+
* resourceId: 'trigger-new-order',
|
|
725
|
+
* type: 'trigger',
|
|
726
|
+
* triggerType: 'webhook',
|
|
727
|
+
* name: 'New Order',
|
|
728
|
+
* description: 'Webhook from Shopify on new orders',
|
|
729
|
+
* version: '1.0.0',
|
|
730
|
+
* status: 'prod',
|
|
731
|
+
* webhookPath: '/webhooks/shopify/orders'
|
|
732
|
+
* }
|
|
733
|
+
*
|
|
734
|
+
* // Relationships declared in ResourceRelationships (not on TriggerDefinition):
|
|
735
|
+
* // relationships: {
|
|
736
|
+
* // 'trigger-new-order': { triggers: { workflows: ['order-fulfillment-workflow'] } }
|
|
737
|
+
* // }
|
|
737
738
|
*/
|
|
738
|
-
export interface TriggerDefinition extends ResourceDefinition {
|
|
739
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
740
|
-
type: 'trigger'
|
|
741
|
-
|
|
742
|
-
/** Trigger mechanism type (renamed from 'type' to avoid collision with base type discriminator) */
|
|
743
|
-
triggerType: 'webhook' | 'schedule' | 'manual' | 'event'
|
|
744
|
-
|
|
745
|
-
/** Type-specific configuration */
|
|
746
|
-
config?: TriggerConfig
|
|
747
|
-
|
|
748
|
-
// Legacy fields (deprecated, use config instead)
|
|
749
|
-
/** For webhook triggers: path like '/webhooks/shopify/orders' */
|
|
750
|
-
webhookPath?: string
|
|
751
|
-
/** For schedule triggers: cron expression like '0 6 * * *' */
|
|
752
|
-
schedule?: string
|
|
753
|
-
/** For event triggers: event type like 'low-stock-alert' */
|
|
754
|
-
eventType?: string
|
|
755
|
-
|
|
756
|
-
// NOTE: What this trigger starts is declared in ResourceRelationships, not here
|
|
757
|
-
// This prevents duplication - triggers are forward-declared in relationships
|
|
739
|
+
export interface TriggerDefinition extends ResourceDefinition {
|
|
740
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
741
|
+
type: 'trigger'
|
|
742
|
+
|
|
743
|
+
/** Trigger mechanism type (renamed from 'type' to avoid collision with base type discriminator) */
|
|
744
|
+
triggerType: 'webhook' | 'schedule' | 'manual' | 'event'
|
|
745
|
+
|
|
746
|
+
/** Type-specific configuration */
|
|
747
|
+
config?: TriggerConfig
|
|
748
|
+
|
|
749
|
+
// Legacy fields (deprecated, use config instead)
|
|
750
|
+
/** For webhook triggers: path like '/webhooks/shopify/orders' */
|
|
751
|
+
webhookPath?: string
|
|
752
|
+
/** For schedule triggers: cron expression like '0 6 * * *' */
|
|
753
|
+
schedule?: string
|
|
754
|
+
/** For event triggers: event type like 'low-stock-alert' */
|
|
755
|
+
eventType?: string
|
|
756
|
+
|
|
757
|
+
// NOTE: What this trigger starts is declared in ResourceRelationships, not here
|
|
758
|
+
// This prevents duplication - triggers are forward-declared in relationships
|
|
758
759
|
}
|
|
759
760
|
```
|
|
760
761
|
|
|
761
762
|
### `IntegrationDefinition`
|
|
762
763
|
|
|
763
764
|
```typescript
|
|
764
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
765
|
-
type: 'trigger'
|
|
766
|
-
|
|
767
|
-
/** Trigger mechanism type (renamed from 'type' to avoid collision with base type discriminator) */
|
|
768
|
-
triggerType: 'webhook' | 'schedule' | 'manual' | 'event'
|
|
769
|
-
|
|
770
|
-
/** Type-specific configuration */
|
|
771
|
-
config?: TriggerConfig
|
|
772
|
-
|
|
773
|
-
// Legacy fields (deprecated, use config instead)
|
|
774
|
-
/** For webhook triggers: path like '/webhooks/shopify/orders' */
|
|
775
|
-
webhookPath?: string
|
|
776
|
-
/** For schedule triggers: cron expression like '0 6 * * *' */
|
|
777
|
-
schedule?: string
|
|
778
|
-
/** For event triggers: event type like 'low-stock-alert' */
|
|
779
|
-
eventType?: string
|
|
780
|
-
|
|
781
|
-
// NOTE: What this trigger starts is declared in ResourceRelationships, not here
|
|
782
|
-
// This prevents duplication - triggers are forward-declared in relationships
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
/**
|
|
786
|
-
* Integration metadata - external service connections
|
|
787
|
-
*
|
|
788
|
-
* References credentials table for actual connection. No connection status
|
|
789
|
-
* stored here (queried at runtime from credentials table).
|
|
790
|
-
*
|
|
791
|
-
* BREAKING CHANGES (2025-11-30):
|
|
792
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
793
|
-
* - Field renames: `id` -> `resourceId` (inherited)
|
|
794
|
-
* - New required field: `status` (inherited) - organizations must add status to all integrations
|
|
795
|
-
* - New required field: `version` (inherited) - organizations must add version to all integrations
|
|
796
|
-
* - New required field: `type: 'integration'` (inherited) - resource type discriminator
|
|
797
|
-
*
|
|
798
|
-
* @example
|
|
799
|
-
* {
|
|
800
|
-
* resourceId: 'integration-shopify-prod',
|
|
801
|
-
* type: 'integration',
|
|
802
|
-
* provider: 'shopify',
|
|
803
|
-
* credentialName: 'shopify-prod',
|
|
804
|
-
* name: 'Shopify Production',
|
|
805
|
-
* description: 'E-commerce platform',
|
|
806
|
-
* version: '1.0.0',
|
|
807
|
-
* status: 'prod'
|
|
808
|
-
* }
|
|
765
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
766
|
+
type: 'trigger'
|
|
767
|
+
|
|
768
|
+
/** Trigger mechanism type (renamed from 'type' to avoid collision with base type discriminator) */
|
|
769
|
+
triggerType: 'webhook' | 'schedule' | 'manual' | 'event'
|
|
770
|
+
|
|
771
|
+
/** Type-specific configuration */
|
|
772
|
+
config?: TriggerConfig
|
|
773
|
+
|
|
774
|
+
// Legacy fields (deprecated, use config instead)
|
|
775
|
+
/** For webhook triggers: path like '/webhooks/shopify/orders' */
|
|
776
|
+
webhookPath?: string
|
|
777
|
+
/** For schedule triggers: cron expression like '0 6 * * *' */
|
|
778
|
+
schedule?: string
|
|
779
|
+
/** For event triggers: event type like 'low-stock-alert' */
|
|
780
|
+
eventType?: string
|
|
781
|
+
|
|
782
|
+
// NOTE: What this trigger starts is declared in ResourceRelationships, not here
|
|
783
|
+
// This prevents duplication - triggers are forward-declared in relationships
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Integration metadata - external service connections
|
|
788
|
+
*
|
|
789
|
+
* References credentials table for actual connection. No connection status
|
|
790
|
+
* stored here (queried at runtime from credentials table).
|
|
791
|
+
*
|
|
792
|
+
* BREAKING CHANGES (2025-11-30):
|
|
793
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
794
|
+
* - Field renames: `id` -> `resourceId` (inherited)
|
|
795
|
+
* - New required field: `status` (inherited) - organizations must add status to all integrations
|
|
796
|
+
* - New required field: `version` (inherited) - organizations must add version to all integrations
|
|
797
|
+
* - New required field: `type: 'integration'` (inherited) - resource type discriminator
|
|
798
|
+
*
|
|
799
|
+
* @example
|
|
800
|
+
* {
|
|
801
|
+
* resourceId: 'integration-shopify-prod',
|
|
802
|
+
* type: 'integration',
|
|
803
|
+
* provider: 'shopify',
|
|
804
|
+
* credentialName: 'shopify-prod',
|
|
805
|
+
* name: 'Shopify Production',
|
|
806
|
+
* description: 'E-commerce platform',
|
|
807
|
+
* version: '1.0.0',
|
|
808
|
+
* status: 'prod'
|
|
809
|
+
* }
|
|
809
810
|
*/
|
|
810
|
-
export interface IntegrationDefinition extends ResourceDefinition {
|
|
811
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
812
|
-
type: 'integration'
|
|
813
|
-
|
|
814
|
-
/** Integration provider type */
|
|
815
|
-
provider: IntegrationType
|
|
816
|
-
/** References credentials table (e.g., 'shopify-prod', 'zendesk-api') */
|
|
817
|
-
credentialName: string
|
|
811
|
+
export interface IntegrationDefinition extends ResourceDefinition {
|
|
812
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
813
|
+
type: 'integration'
|
|
814
|
+
|
|
815
|
+
/** Integration provider type */
|
|
816
|
+
provider: IntegrationType
|
|
817
|
+
/** References credentials table (e.g., 'shopify-prod', 'zendesk-api') */
|
|
818
|
+
credentialName: string
|
|
818
819
|
}
|
|
819
820
|
```
|
|
820
821
|
|
|
821
822
|
### `RelationshipDeclaration`
|
|
822
823
|
|
|
823
824
|
```typescript
|
|
824
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
825
|
-
type: 'integration'
|
|
826
|
-
|
|
827
|
-
/** Integration provider type */
|
|
828
|
-
provider: IntegrationType
|
|
829
|
-
/** References credentials table (e.g., 'shopify-prod', 'zendesk-api') */
|
|
830
|
-
credentialName: string
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* Explicit resource relationship declaration
|
|
835
|
-
*
|
|
836
|
-
* Single-direction only - Command View derives reverse relationships.
|
|
837
|
-
* Agents/workflows declare what they trigger and use.
|
|
838
|
-
*
|
|
839
|
-
* @example
|
|
840
|
-
* {
|
|
841
|
-
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
842
|
-
* uses: { integrations: ['integration-shopify-prod', 'integration-postgres'] }
|
|
843
|
-
* }
|
|
825
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
826
|
+
type: 'integration'
|
|
827
|
+
|
|
828
|
+
/** Integration provider type */
|
|
829
|
+
provider: IntegrationType
|
|
830
|
+
/** References credentials table (e.g., 'shopify-prod', 'zendesk-api') */
|
|
831
|
+
credentialName: string
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Explicit resource relationship declaration
|
|
836
|
+
*
|
|
837
|
+
* Single-direction only - Command View derives reverse relationships.
|
|
838
|
+
* Agents/workflows declare what they trigger and use.
|
|
839
|
+
*
|
|
840
|
+
* @example
|
|
841
|
+
* {
|
|
842
|
+
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
843
|
+
* uses: { integrations: ['integration-shopify-prod', 'integration-postgres'] }
|
|
844
|
+
* }
|
|
844
845
|
*/
|
|
845
|
-
export interface RelationshipDeclaration {
|
|
846
|
-
/** Resources this resource triggers */
|
|
847
|
-
triggers?: {
|
|
848
|
-
/** Agent resourceIds this resource triggers */
|
|
849
|
-
agents?: string[]
|
|
850
|
-
/** Workflow resourceIds this resource triggers */
|
|
851
|
-
workflows?: string[]
|
|
852
|
-
}
|
|
853
|
-
/** Integrations this resource uses */
|
|
854
|
-
uses?: {
|
|
855
|
-
/** Integration IDs this resource uses */
|
|
856
|
-
integrations?: string[]
|
|
857
|
-
}
|
|
846
|
+
export interface RelationshipDeclaration {
|
|
847
|
+
/** Resources this resource triggers */
|
|
848
|
+
triggers?: {
|
|
849
|
+
/** Agent resourceIds this resource triggers */
|
|
850
|
+
agents?: string[]
|
|
851
|
+
/** Workflow resourceIds this resource triggers */
|
|
852
|
+
workflows?: string[]
|
|
853
|
+
}
|
|
854
|
+
/** Integrations this resource uses */
|
|
855
|
+
uses?: {
|
|
856
|
+
/** Integration IDs this resource uses */
|
|
857
|
+
integrations?: string[]
|
|
858
|
+
}
|
|
858
859
|
}
|
|
859
860
|
```
|
|
860
861
|
|
|
861
862
|
### `ResourceRelationships`
|
|
862
863
|
|
|
863
864
|
```typescript
|
|
864
|
-
/** Resources this resource triggers */
|
|
865
|
-
triggers?: {
|
|
866
|
-
/** Agent resourceIds this resource triggers */
|
|
867
|
-
agents?: string[]
|
|
868
|
-
/** Workflow resourceIds this resource triggers */
|
|
869
|
-
workflows?: string[]
|
|
870
|
-
}
|
|
871
|
-
/** Integrations this resource uses */
|
|
872
|
-
uses?: {
|
|
873
|
-
/** Integration IDs this resource uses */
|
|
874
|
-
integrations?: string[]
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
/**
|
|
879
|
-
* Resource relationships map
|
|
880
|
-
* Maps resourceId to its relationship declarations
|
|
881
|
-
*
|
|
882
|
-
* @example
|
|
883
|
-
* {
|
|
884
|
-
* 'order-processor-agent': {
|
|
885
|
-
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
886
|
-
* uses: { integrations: ['integration-shopify-prod'] }
|
|
887
|
-
* }
|
|
888
|
-
* }
|
|
865
|
+
/** Resources this resource triggers */
|
|
866
|
+
triggers?: {
|
|
867
|
+
/** Agent resourceIds this resource triggers */
|
|
868
|
+
agents?: string[]
|
|
869
|
+
/** Workflow resourceIds this resource triggers */
|
|
870
|
+
workflows?: string[]
|
|
871
|
+
}
|
|
872
|
+
/** Integrations this resource uses */
|
|
873
|
+
uses?: {
|
|
874
|
+
/** Integration IDs this resource uses */
|
|
875
|
+
integrations?: string[]
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Resource relationships map
|
|
881
|
+
* Maps resourceId to its relationship declarations
|
|
882
|
+
*
|
|
883
|
+
* @example
|
|
884
|
+
* {
|
|
885
|
+
* 'order-processor-agent': {
|
|
886
|
+
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
887
|
+
* uses: { integrations: ['integration-shopify-prod'] }
|
|
888
|
+
* }
|
|
889
|
+
* }
|
|
889
890
|
*/
|
|
890
|
-
export type ResourceRelationships = Record<string, RelationshipDeclaration>
|
|
891
|
-
|
|
892
|
-
// ============================================================================
|
|
893
|
-
// External Resource Types
|
|
894
|
-
// ============================================================================
|
|
895
|
-
|
|
896
|
-
/**
|
|
897
|
-
* External platform type
|
|
898
|
-
* Supported third-party automation platforms
|
|
891
|
+
export type ResourceRelationships = Record<string, RelationshipDeclaration>
|
|
892
|
+
|
|
893
|
+
// ============================================================================
|
|
894
|
+
// External Resource Types
|
|
895
|
+
// ============================================================================
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* External platform type
|
|
899
|
+
* Supported third-party automation platforms
|
|
899
900
|
*/
|
|
900
901
|
```
|
|
901
902
|
|
|
902
903
|
### `ExternalPlatform`
|
|
903
904
|
|
|
904
905
|
```typescript
|
|
905
|
-
/**
|
|
906
|
-
* External platform type
|
|
907
|
-
* Supported third-party automation platforms
|
|
906
|
+
/**
|
|
907
|
+
* External platform type
|
|
908
|
+
* Supported third-party automation platforms
|
|
908
909
|
*/
|
|
909
|
-
export type ExternalPlatform = 'n8n' | 'make' | 'zapier' | 'other'
|
|
910
|
-
|
|
911
|
-
/**
|
|
912
|
-
* External automation resource metadata
|
|
913
|
-
*
|
|
914
|
-
* Represents workflows/automations running on third-party platforms
|
|
915
|
-
* (n8n, Make, Zapier, etc.) for visualization in Command View.
|
|
916
|
-
*
|
|
917
|
-
* NOTE: This is metadata ONLY for visualization. No execution logic,
|
|
918
|
-
* no API integration with external platforms, no status syncing.
|
|
919
|
-
*
|
|
920
|
-
* BREAKING CHANGES (2025-11-30):
|
|
921
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
922
|
-
* - Field renames: `id` -> `resourceId` (inherited)
|
|
923
|
-
* - New required field: `version` (inherited) - organizations must add version to all external resources
|
|
924
|
-
* - New required field: `type: 'external'` (inherited) - resource type discriminator
|
|
925
|
-
* - REMOVED FIELD: `triggeredBy` - per relationship-consolidation design, all relationships are forward-only declarations
|
|
926
|
-
*
|
|
927
|
-
* @example
|
|
928
|
-
* {
|
|
929
|
-
* resourceId: 'external-n8n-order-sync',
|
|
930
|
-
* type: 'external',
|
|
931
|
-
* version: '1.0.0',
|
|
932
|
-
* platform: 'n8n',
|
|
933
|
-
* name: 'Shopify Order Sync',
|
|
934
|
-
* description: 'Legacy n8n workflow for syncing Shopify orders',
|
|
935
|
-
* status: 'prod',
|
|
936
|
-
* platformUrl: 'https://n8n.client.com/workflow/123',
|
|
937
|
-
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
938
|
-
* uses: { integrations: ['integration-shopify-prod'] }
|
|
939
|
-
* }
|
|
910
|
+
export type ExternalPlatform = 'n8n' | 'make' | 'zapier' | 'other'
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* External automation resource metadata
|
|
914
|
+
*
|
|
915
|
+
* Represents workflows/automations running on third-party platforms
|
|
916
|
+
* (n8n, Make, Zapier, etc.) for visualization in Command View.
|
|
917
|
+
*
|
|
918
|
+
* NOTE: This is metadata ONLY for visualization. No execution logic,
|
|
919
|
+
* no API integration with external platforms, no status syncing.
|
|
920
|
+
*
|
|
921
|
+
* BREAKING CHANGES (2025-11-30):
|
|
922
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
923
|
+
* - Field renames: `id` -> `resourceId` (inherited)
|
|
924
|
+
* - New required field: `version` (inherited) - organizations must add version to all external resources
|
|
925
|
+
* - New required field: `type: 'external'` (inherited) - resource type discriminator
|
|
926
|
+
* - REMOVED FIELD: `triggeredBy` - per relationship-consolidation design, all relationships are forward-only declarations
|
|
927
|
+
*
|
|
928
|
+
* @example
|
|
929
|
+
* {
|
|
930
|
+
* resourceId: 'external-n8n-order-sync',
|
|
931
|
+
* type: 'external',
|
|
932
|
+
* version: '1.0.0',
|
|
933
|
+
* platform: 'n8n',
|
|
934
|
+
* name: 'Shopify Order Sync',
|
|
935
|
+
* description: 'Legacy n8n workflow for syncing Shopify orders',
|
|
936
|
+
* status: 'prod',
|
|
937
|
+
* platformUrl: 'https://n8n.client.com/workflow/123',
|
|
938
|
+
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
939
|
+
* uses: { integrations: ['integration-shopify-prod'] }
|
|
940
|
+
* }
|
|
940
941
|
*/
|
|
941
942
|
```
|
|
942
943
|
|
|
943
944
|
### `ExternalResourceDefinition`
|
|
944
945
|
|
|
945
946
|
```typescript
|
|
946
|
-
/**
|
|
947
|
-
* External automation resource metadata
|
|
948
|
-
*
|
|
949
|
-
* Represents workflows/automations running on third-party platforms
|
|
950
|
-
* (n8n, Make, Zapier, etc.) for visualization in Command View.
|
|
951
|
-
*
|
|
952
|
-
* NOTE: This is metadata ONLY for visualization. No execution logic,
|
|
953
|
-
* no API integration with external platforms, no status syncing.
|
|
954
|
-
*
|
|
955
|
-
* BREAKING CHANGES (2025-11-30):
|
|
956
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
957
|
-
* - Field renames: `id` -> `resourceId` (inherited)
|
|
958
|
-
* - New required field: `version` (inherited) - organizations must add version to all external resources
|
|
959
|
-
* - New required field: `type: 'external'` (inherited) - resource type discriminator
|
|
960
|
-
* - REMOVED FIELD: `triggeredBy` - per relationship-consolidation design, all relationships are forward-only declarations
|
|
961
|
-
*
|
|
962
|
-
* @example
|
|
963
|
-
* {
|
|
964
|
-
* resourceId: 'external-n8n-order-sync',
|
|
965
|
-
* type: 'external',
|
|
966
|
-
* version: '1.0.0',
|
|
967
|
-
* platform: 'n8n',
|
|
968
|
-
* name: 'Shopify Order Sync',
|
|
969
|
-
* description: 'Legacy n8n workflow for syncing Shopify orders',
|
|
970
|
-
* status: 'prod',
|
|
971
|
-
* platformUrl: 'https://n8n.client.com/workflow/123',
|
|
972
|
-
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
973
|
-
* uses: { integrations: ['integration-shopify-prod'] }
|
|
974
|
-
* }
|
|
947
|
+
/**
|
|
948
|
+
* External automation resource metadata
|
|
949
|
+
*
|
|
950
|
+
* Represents workflows/automations running on third-party platforms
|
|
951
|
+
* (n8n, Make, Zapier, etc.) for visualization in Command View.
|
|
952
|
+
*
|
|
953
|
+
* NOTE: This is metadata ONLY for visualization. No execution logic,
|
|
954
|
+
* no API integration with external platforms, no status syncing.
|
|
955
|
+
*
|
|
956
|
+
* BREAKING CHANGES (2025-11-30):
|
|
957
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
958
|
+
* - Field renames: `id` -> `resourceId` (inherited)
|
|
959
|
+
* - New required field: `version` (inherited) - organizations must add version to all external resources
|
|
960
|
+
* - New required field: `type: 'external'` (inherited) - resource type discriminator
|
|
961
|
+
* - REMOVED FIELD: `triggeredBy` - per relationship-consolidation design, all relationships are forward-only declarations
|
|
962
|
+
*
|
|
963
|
+
* @example
|
|
964
|
+
* {
|
|
965
|
+
* resourceId: 'external-n8n-order-sync',
|
|
966
|
+
* type: 'external',
|
|
967
|
+
* version: '1.0.0',
|
|
968
|
+
* platform: 'n8n',
|
|
969
|
+
* name: 'Shopify Order Sync',
|
|
970
|
+
* description: 'Legacy n8n workflow for syncing Shopify orders',
|
|
971
|
+
* status: 'prod',
|
|
972
|
+
* platformUrl: 'https://n8n.client.com/workflow/123',
|
|
973
|
+
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
974
|
+
* uses: { integrations: ['integration-shopify-prod'] }
|
|
975
|
+
* }
|
|
975
976
|
*/
|
|
976
|
-
export interface ExternalResourceDefinition extends ResourceDefinition {
|
|
977
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
978
|
-
type: 'external'
|
|
979
|
-
|
|
980
|
-
/** Platform type */
|
|
981
|
-
platform: ExternalPlatform
|
|
982
|
-
|
|
983
|
-
// Optional platform-specific metadata
|
|
984
|
-
/** Link to external platform (e.g., n8n workflow editor URL) */
|
|
985
|
-
platformUrl?: string
|
|
986
|
-
/** Platform's internal ID/reference */
|
|
987
|
-
externalId?: string
|
|
988
|
-
|
|
989
|
-
/** What this external resource triggers (external -> internal) */
|
|
990
|
-
triggers?: {
|
|
991
|
-
/** Elevasis workflow resourceIds this external automation triggers */
|
|
992
|
-
workflows?: string[]
|
|
993
|
-
/** Elevasis agent resourceIds this external automation triggers */
|
|
994
|
-
agents?: string[]
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
/** Integrations this external resource uses (shared credentials) */
|
|
998
|
-
uses?: {
|
|
999
|
-
/** Integration IDs this external automation uses */
|
|
1000
|
-
integrations?: string[]
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
// NOTE: triggeredBy field removed - per relationship-consolidation design,
|
|
1004
|
-
// all relationships are forward-only declarations. Graph edges are built
|
|
1005
|
-
// from forward declarations only.
|
|
977
|
+
export interface ExternalResourceDefinition extends ResourceDefinition {
|
|
978
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
979
|
+
type: 'external'
|
|
980
|
+
|
|
981
|
+
/** Platform type */
|
|
982
|
+
platform: ExternalPlatform
|
|
983
|
+
|
|
984
|
+
// Optional platform-specific metadata
|
|
985
|
+
/** Link to external platform (e.g., n8n workflow editor URL) */
|
|
986
|
+
platformUrl?: string
|
|
987
|
+
/** Platform's internal ID/reference */
|
|
988
|
+
externalId?: string
|
|
989
|
+
|
|
990
|
+
/** What this external resource triggers (external -> internal) */
|
|
991
|
+
triggers?: {
|
|
992
|
+
/** Elevasis workflow resourceIds this external automation triggers */
|
|
993
|
+
workflows?: string[]
|
|
994
|
+
/** Elevasis agent resourceIds this external automation triggers */
|
|
995
|
+
agents?: string[]
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/** Integrations this external resource uses (shared credentials) */
|
|
999
|
+
uses?: {
|
|
1000
|
+
/** Integration IDs this external automation uses */
|
|
1001
|
+
integrations?: string[]
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
// NOTE: triggeredBy field removed - per relationship-consolidation design,
|
|
1005
|
+
// all relationships are forward-only declarations. Graph edges are built
|
|
1006
|
+
// from forward declarations only.
|
|
1006
1007
|
}
|
|
1007
1008
|
```
|
|
1008
1009
|
|
|
1009
1010
|
### `HumanCheckpointDefinition`
|
|
1010
1011
|
|
|
1011
1012
|
```typescript
|
|
1012
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
1013
|
-
type: 'external'
|
|
1014
|
-
|
|
1015
|
-
/** Platform type */
|
|
1016
|
-
platform: ExternalPlatform
|
|
1017
|
-
|
|
1018
|
-
// Optional platform-specific metadata
|
|
1019
|
-
/** Link to external platform (e.g., n8n workflow editor URL) */
|
|
1020
|
-
platformUrl?: string
|
|
1021
|
-
/** Platform's internal ID/reference */
|
|
1022
|
-
externalId?: string
|
|
1023
|
-
|
|
1024
|
-
/** What this external resource triggers (external -> internal) */
|
|
1025
|
-
triggers?: {
|
|
1026
|
-
/** Elevasis workflow resourceIds this external automation triggers */
|
|
1027
|
-
workflows?: string[]
|
|
1028
|
-
/** Elevasis agent resourceIds this external automation triggers */
|
|
1029
|
-
agents?: string[]
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
/** Integrations this external resource uses (shared credentials) */
|
|
1033
|
-
uses?: {
|
|
1034
|
-
/** Integration IDs this external automation uses */
|
|
1035
|
-
integrations?: string[]
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
// NOTE: triggeredBy field removed - per relationship-consolidation design,
|
|
1039
|
-
// all relationships are forward-only declarations. Graph edges are built
|
|
1040
|
-
// from forward declarations only.
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
/**
|
|
1044
|
-
* Human Checkpoint definition - human decision points in automation
|
|
1045
|
-
*
|
|
1046
|
-
* Represents where human judgment is deployed in the automation landscape.
|
|
1047
|
-
* Tasks with matching command_queue_group are routed to this checkpoint.
|
|
1048
|
-
*
|
|
1049
|
-
* BREAKING CHANGES (2025-11-30):
|
|
1050
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
1051
|
-
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1052
|
-
* - description is now REQUIRED (was optional) - organizations must add description to all human checkpoints
|
|
1053
|
-
* - New required field: `version` (inherited) - organizations must add version to all human checkpoints
|
|
1054
|
-
* - New required field: `type: 'human'` (inherited) - resource type discriminator
|
|
1055
|
-
*
|
|
1056
|
-
* @example
|
|
1057
|
-
* {
|
|
1058
|
-
* resourceId: 'sales-approval',
|
|
1059
|
-
* type: 'human',
|
|
1060
|
-
* name: 'Sales Approval Queue',
|
|
1061
|
-
* description: 'High-value order approvals for sales team',
|
|
1062
|
-
* version: '1.0.0',
|
|
1063
|
-
* status: 'prod',
|
|
1064
|
-
* requestedBy: { agents: ['order-processor-agent'] },
|
|
1065
|
-
* routesTo: { agents: ['order-fulfillment-agent'] }
|
|
1066
|
-
* }
|
|
1013
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
1014
|
+
type: 'external'
|
|
1015
|
+
|
|
1016
|
+
/** Platform type */
|
|
1017
|
+
platform: ExternalPlatform
|
|
1018
|
+
|
|
1019
|
+
// Optional platform-specific metadata
|
|
1020
|
+
/** Link to external platform (e.g., n8n workflow editor URL) */
|
|
1021
|
+
platformUrl?: string
|
|
1022
|
+
/** Platform's internal ID/reference */
|
|
1023
|
+
externalId?: string
|
|
1024
|
+
|
|
1025
|
+
/** What this external resource triggers (external -> internal) */
|
|
1026
|
+
triggers?: {
|
|
1027
|
+
/** Elevasis workflow resourceIds this external automation triggers */
|
|
1028
|
+
workflows?: string[]
|
|
1029
|
+
/** Elevasis agent resourceIds this external automation triggers */
|
|
1030
|
+
agents?: string[]
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/** Integrations this external resource uses (shared credentials) */
|
|
1034
|
+
uses?: {
|
|
1035
|
+
/** Integration IDs this external automation uses */
|
|
1036
|
+
integrations?: string[]
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
// NOTE: triggeredBy field removed - per relationship-consolidation design,
|
|
1040
|
+
// all relationships are forward-only declarations. Graph edges are built
|
|
1041
|
+
// from forward declarations only.
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* Human Checkpoint definition - human decision points in automation
|
|
1046
|
+
*
|
|
1047
|
+
* Represents where human judgment is deployed in the automation landscape.
|
|
1048
|
+
* Tasks with matching command_queue_group are routed to this checkpoint.
|
|
1049
|
+
*
|
|
1050
|
+
* BREAKING CHANGES (2025-11-30):
|
|
1051
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
|
|
1052
|
+
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1053
|
+
* - description is now REQUIRED (was optional) - organizations must add description to all human checkpoints
|
|
1054
|
+
* - New required field: `version` (inherited) - organizations must add version to all human checkpoints
|
|
1055
|
+
* - New required field: `type: 'human'` (inherited) - resource type discriminator
|
|
1056
|
+
*
|
|
1057
|
+
* @example
|
|
1058
|
+
* {
|
|
1059
|
+
* resourceId: 'sales-approval',
|
|
1060
|
+
* type: 'human',
|
|
1061
|
+
* name: 'Sales Approval Queue',
|
|
1062
|
+
* description: 'High-value order approvals for sales team',
|
|
1063
|
+
* version: '1.0.0',
|
|
1064
|
+
* status: 'prod',
|
|
1065
|
+
* requestedBy: { agents: ['order-processor-agent'] },
|
|
1066
|
+
* routesTo: { agents: ['order-fulfillment-agent'] }
|
|
1067
|
+
* }
|
|
1067
1068
|
*/
|
|
1068
|
-
export interface HumanCheckpointDefinition extends ResourceDefinition {
|
|
1069
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
1070
|
-
type: 'human'
|
|
1071
|
-
|
|
1072
|
-
/** Resources that create tasks for this checkpoint */
|
|
1073
|
-
requestedBy?: {
|
|
1074
|
-
/** Agent resourceIds that request approval here */
|
|
1075
|
-
agents?: string[]
|
|
1076
|
-
/** Workflow resourceIds that request approval here */
|
|
1077
|
-
workflows?: string[]
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
/** Resources that receive approved decisions */
|
|
1081
|
-
routesTo?: {
|
|
1082
|
-
/** Agent resourceIds that handle approved tasks */
|
|
1083
|
-
agents?: string[]
|
|
1084
|
-
/** Workflow resourceIds that handle approved tasks */
|
|
1085
|
-
workflows?: string[]
|
|
1086
|
-
}
|
|
1069
|
+
export interface HumanCheckpointDefinition extends ResourceDefinition {
|
|
1070
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
1071
|
+
type: 'human'
|
|
1072
|
+
|
|
1073
|
+
/** Resources that create tasks for this checkpoint */
|
|
1074
|
+
requestedBy?: {
|
|
1075
|
+
/** Agent resourceIds that request approval here */
|
|
1076
|
+
agents?: string[]
|
|
1077
|
+
/** Workflow resourceIds that request approval here */
|
|
1078
|
+
workflows?: string[]
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
/** Resources that receive approved decisions */
|
|
1082
|
+
routesTo?: {
|
|
1083
|
+
/** Agent resourceIds that handle approved tasks */
|
|
1084
|
+
agents?: string[]
|
|
1085
|
+
/** Workflow resourceIds that handle approved tasks */
|
|
1086
|
+
workflows?: string[]
|
|
1087
|
+
}
|
|
1087
1088
|
}
|
|
1088
1089
|
```
|
|
1089
1090
|
|
|
@@ -1092,44 +1093,44 @@ export interface HumanCheckpointDefinition extends ResourceDefinition {
|
|
|
1092
1093
|
### `DeploymentSpec`
|
|
1093
1094
|
|
|
1094
1095
|
```typescript
|
|
1095
|
-
/** Supabase Storage path: "{orgId}/{deploymentId}/bundle.js" */
|
|
1096
|
-
storagePath: string
|
|
1097
|
-
/** Deployment record ID */
|
|
1098
|
-
deploymentId: string
|
|
1099
|
-
/** OS temp path to bundle -- set after first download, used by worker threads */
|
|
1100
|
-
cachedTempPath?: string
|
|
1101
|
-
/** Platform tool name -> credential name mapping */
|
|
1102
|
-
toolCredentials?: Record<string, string>
|
|
1103
|
-
/** SDK version used to deploy this bundle */
|
|
1104
|
-
sdkVersion?: string
|
|
1105
|
-
/** Deployment version (semver) of the deployed bundle */
|
|
1106
|
-
deploymentVersion?: string
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
/**
|
|
1110
|
-
* Organization-specific resource collection
|
|
1111
|
-
*
|
|
1112
|
-
* Complete manifest of all automation resources for an organization.
|
|
1113
|
-
* Used by ResourceRegistry for discovery and Command View for visualization.
|
|
1096
|
+
/** Supabase Storage path: "{orgId}/{deploymentId}/bundle.js" */
|
|
1097
|
+
storagePath: string
|
|
1098
|
+
/** Deployment record ID */
|
|
1099
|
+
deploymentId: string
|
|
1100
|
+
/** OS temp path to bundle -- set after first download, used by worker threads */
|
|
1101
|
+
cachedTempPath?: string
|
|
1102
|
+
/** Platform tool name -> credential name mapping */
|
|
1103
|
+
toolCredentials?: Record<string, string>
|
|
1104
|
+
/** SDK version used to deploy this bundle */
|
|
1105
|
+
sdkVersion?: string
|
|
1106
|
+
/** Deployment version (semver) of the deployed bundle */
|
|
1107
|
+
deploymentVersion?: string
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Organization-specific resource collection
|
|
1112
|
+
*
|
|
1113
|
+
* Complete manifest of all automation resources for an organization.
|
|
1114
|
+
* Used by ResourceRegistry for discovery and Command View for visualization.
|
|
1114
1115
|
*/
|
|
1115
|
-
export interface DeploymentSpec {
|
|
1116
|
-
/** Deployment version (semver) */
|
|
1117
|
-
version: string
|
|
1118
|
-
/** Workflow definitions */
|
|
1119
|
-
workflows?: WorkflowDefinition[]
|
|
1120
|
-
/** Agent definitions */
|
|
1121
|
-
agents?: AgentDefinition[]
|
|
1122
|
-
|
|
1123
|
-
// Resource Manifest fields (optional for backwards compatibility)
|
|
1124
|
-
/** Trigger definitions - entry points that initiate executions */
|
|
1125
|
-
triggers?: TriggerDefinition[]
|
|
1126
|
-
/** Integration definitions - external service connections */
|
|
1127
|
-
integrations?: IntegrationDefinition[]
|
|
1128
|
-
/** Explicit relationship declarations between resources */
|
|
1129
|
-
relationships?: ResourceRelationships
|
|
1130
|
-
/** External automation resources (n8n, Make, Zapier, etc.) */
|
|
1131
|
-
externalResources?: ExternalResourceDefinition[]
|
|
1132
|
-
/** Human checkpoint definitions - human decision points in automation */
|
|
1133
|
-
humanCheckpoints?: HumanCheckpointDefinition[]
|
|
1116
|
+
export interface DeploymentSpec {
|
|
1117
|
+
/** Deployment version (semver) */
|
|
1118
|
+
version: string
|
|
1119
|
+
/** Workflow definitions */
|
|
1120
|
+
workflows?: WorkflowDefinition[]
|
|
1121
|
+
/** Agent definitions */
|
|
1122
|
+
agents?: AgentDefinition[]
|
|
1123
|
+
|
|
1124
|
+
// Resource Manifest fields (optional for backwards compatibility)
|
|
1125
|
+
/** Trigger definitions - entry points that initiate executions */
|
|
1126
|
+
triggers?: TriggerDefinition[]
|
|
1127
|
+
/** Integration definitions - external service connections */
|
|
1128
|
+
integrations?: IntegrationDefinition[]
|
|
1129
|
+
/** Explicit relationship declarations between resources */
|
|
1130
|
+
relationships?: ResourceRelationships
|
|
1131
|
+
/** External automation resources (n8n, Make, Zapier, etc.) */
|
|
1132
|
+
externalResources?: ExternalResourceDefinition[]
|
|
1133
|
+
/** Human checkpoint definitions - human decision points in automation */
|
|
1134
|
+
humanCheckpoints?: HumanCheckpointDefinition[]
|
|
1134
1135
|
}
|
|
1135
1136
|
```
|