@elevasis/sdk 1.29.0 → 1.30.0
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 +1608 -594
- package/dist/index.d.ts +87 -1
- package/dist/index.js +30 -25
- package/dist/node/index.d.ts +84 -1
- package/dist/test-utils/index.d.ts +84 -1
- package/dist/test-utils/index.js +242 -23
- package/dist/worker/index.js +1 -0
- package/package.json +2 -2
- package/reference/claude-config/rules/topbar-actions.md +70 -0
- package/reference/claude-config/skills/om/SKILL.md +18 -1
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
- package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +45 -45
- package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +52 -52
- package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +33 -33
- package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +32 -32
- package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +43 -43
- package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +40 -40
- package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +61 -61
- package/reference/claude-config/sync-notes/2026-05-23-branding-names-to-identity.md +49 -49
- package/reference/claude-config/sync-notes/2026-05-23-lead-gen-manage-access.md +31 -31
- package/reference/claude-config/sync-notes/2026-05-23-om-deployment-drift-detection.md +42 -42
- package/reference/claude-config/sync-notes/2026-05-23-om-full-model-deploy-contract.md +33 -33
- package/reference/claude-config/sync-notes/2026-05-23-ui-sdk-package-fixes.md +37 -37
- package/reference/claude-config/sync-notes/2026-05-24-platform-invite-router-core-baseline.md +28 -28
- package/reference/claude-config/sync-notes/2026-05-24-system-interface-readiness.md +43 -43
- package/reference/claude-config/sync-notes/2026-05-25-invitation-login-loader.md +26 -0
- package/reference/claude-config/sync-notes/2026-05-25-om-topbar-requests.md +33 -0
- package/reference/claude-config/sync-notes/2026-05-25-system-interface-profile-registry-and-substrate.md +35 -0
- package/reference/claude-config/sync-notes/2026-05-25-tenant-om-scaffold-cli.md +49 -0
- package/reference/claude-config/sync-notes/2026-05-25-vibe-operate-intent.md +47 -0
- package/reference/examples/organization-model.ts +18 -0
- package/reference/rules/organization-model.md +4 -1
- package/reference/rules/organization-os.md +7 -1
- package/reference/rules/ui.md +207 -207
- package/reference/rules/vibe.md +52 -18
- package/reference/scaffold/index.mdx +9 -7
- package/reference/scaffold/operations/scaffold-maintenance.md +14 -4
- package/reference/scaffold/reference/contracts.md +423 -338
- package/reference/scaffold/reference/glossary.md +14 -2
- package/reference/scaffold/reference/system-interface-capabilities.md +50 -0
- /package/reference/claude-config/skills/deploy/{skill.md → SKILL.md} +0 -0
|
@@ -138,6 +138,18 @@ export type OrganizationModelSidebarSurfaceNode = Extract<OrganizationModelSideb
|
|
|
138
138
|
export type OrganizationModelSidebarGroupNode = Extract<OrganizationModelSidebarNode, { type: 'group' }>
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
+
### `OrganizationModelTopbarActionNode`
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
export type OrganizationModelTopbarActionNode = z.infer<typeof TopbarActionNodeSchema>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### `OrganizationModelTopbarSection`
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
export type OrganizationModelTopbarSection = z.infer<typeof TopbarSectionSchema>
|
|
151
|
+
```
|
|
152
|
+
|
|
141
153
|
### `OrganizationModelTechStackEntry`
|
|
142
154
|
|
|
143
155
|
```typescript
|
|
@@ -848,6 +860,57 @@ export interface ShellRuntime {
|
|
|
848
860
|
}
|
|
849
861
|
```
|
|
850
862
|
|
|
863
|
+
### `ResolvedTopbarAction`
|
|
864
|
+
|
|
865
|
+
```typescript
|
|
866
|
+
/**
|
|
867
|
+
* A resolved topbar action — the OM node after gating/filtering, with icon resolved
|
|
868
|
+
* from the semantic icon registry. Passed to `TopbarActionModule.render`.
|
|
869
|
+
*/
|
|
870
|
+
export interface ResolvedTopbarAction {
|
|
871
|
+
id: string
|
|
872
|
+
label: string
|
|
873
|
+
tooltip?: string
|
|
874
|
+
icon: TablerIconComponent
|
|
875
|
+
order: number
|
|
876
|
+
}
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
### `TopbarActionModule`
|
|
880
|
+
|
|
881
|
+
```typescript
|
|
882
|
+
/**
|
|
883
|
+
* A topbar action module — binds a registry key to UI behavior (a render callback).
|
|
884
|
+
* The key must match `navigation.topbar[id]`. The OM supplies data + visibility;
|
|
885
|
+
* the module supplies behavior.
|
|
886
|
+
*/
|
|
887
|
+
export interface TopbarActionModule {
|
|
888
|
+
/** Stable key that matches the `id` of a `navigation.topbar` node. */
|
|
889
|
+
key: string
|
|
890
|
+
/** Render the topbar action. Receives the resolved OM node (icon pre-resolved). */
|
|
891
|
+
render: (ctx: { node: ResolvedTopbarAction }) => ReactNode
|
|
892
|
+
}
|
|
893
|
+
```
|
|
894
|
+
|
|
895
|
+
### `ResolvedTopbarActionEntry`
|
|
896
|
+
|
|
897
|
+
```typescript
|
|
898
|
+
/** A joined entry emitted by `getTopbarActions`: resolved OM node + module behavior. */
|
|
899
|
+
export interface ResolvedTopbarActionEntry {
|
|
900
|
+
node: ResolvedTopbarAction
|
|
901
|
+
render: TopbarActionModule['render']
|
|
902
|
+
}
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
### `TopbarActionsProjectionOptions`
|
|
906
|
+
|
|
907
|
+
```typescript
|
|
908
|
+
export interface TopbarActionsProjectionOptions {
|
|
909
|
+
isPlatformAdmin?: boolean
|
|
910
|
+
isDev?: boolean
|
|
911
|
+
}
|
|
912
|
+
```
|
|
913
|
+
|
|
851
914
|
### `OrganizationGraphSystemBridge`
|
|
852
915
|
|
|
853
916
|
```typescript
|
|
@@ -871,6 +934,8 @@ export interface OrganizationGraphContextValue {
|
|
|
871
934
|
```typescript
|
|
872
935
|
export interface ElevasisSystemsProviderProps {
|
|
873
936
|
systems?: SystemModule[]
|
|
937
|
+
/** Registered topbar action modules. OM node presence controls visibility; module supplies behavior. */
|
|
938
|
+
topbarActions?: TopbarActionModule[]
|
|
874
939
|
organizationModel?: ElevasisOrganizationModel
|
|
875
940
|
timeRange?: TimeRange
|
|
876
941
|
operationsApiUrl?: string
|
|
@@ -889,6 +954,8 @@ export interface ElevasisSystemsContextValue {
|
|
|
889
954
|
shellModel: ResolvedShellModel
|
|
890
955
|
shellRuntime: ShellRuntime
|
|
891
956
|
getSidebarLinks: (options?: ShellSidebarProjectionOptions) => ShellSidebarLinkGroup[]
|
|
957
|
+
/** Returns the list of topbar actions visible to the current user, in order. */
|
|
958
|
+
getTopbarActions: (options?: TopbarActionsProjectionOptions) => ResolvedTopbarActionEntry[]
|
|
892
959
|
enabledResolvedSystems: ResolvedSystemModule[]
|
|
893
960
|
resolvedSystems: ResolvedSystemModule[]
|
|
894
961
|
organizationGraph: OrganizationGraphContextValue
|
|
@@ -909,29 +976,29 @@ export interface ElevasisSystemsContextValue {
|
|
|
909
976
|
### `ResourceStatus`
|
|
910
977
|
|
|
911
978
|
```typescript
|
|
912
|
-
/**
|
|
913
|
-
* Environment/deployment status for resources
|
|
914
|
-
*/
|
|
979
|
+
/**
|
|
980
|
+
* Environment/deployment status for resources
|
|
981
|
+
*/
|
|
915
982
|
export type ResourceStatus = 'dev' | 'prod'
|
|
916
983
|
```
|
|
917
984
|
|
|
918
985
|
### `ResourceType`
|
|
919
986
|
|
|
920
987
|
```typescript
|
|
921
|
-
/**
|
|
922
|
-
* All resource types in the platform
|
|
923
|
-
* Used as the discriminator field in ResourceDefinition
|
|
924
|
-
*/
|
|
988
|
+
/**
|
|
989
|
+
* All resource types in the platform
|
|
990
|
+
* Used as the discriminator field in ResourceDefinition
|
|
991
|
+
*/
|
|
925
992
|
export type ResourceType = 'agent' | 'workflow' | 'trigger' | 'integration' | 'external' | 'human'
|
|
926
993
|
```
|
|
927
994
|
|
|
928
995
|
### `ExecutableResourceType`
|
|
929
996
|
|
|
930
997
|
```typescript
|
|
931
|
-
/**
|
|
932
|
-
* Executable resource types (subset of ResourceType)
|
|
933
|
-
* These resources can be directly executed by the execution engine
|
|
934
|
-
*/
|
|
998
|
+
/**
|
|
999
|
+
* Executable resource types (subset of ResourceType)
|
|
1000
|
+
* These resources can be directly executed by the execution engine
|
|
1001
|
+
*/
|
|
935
1002
|
export type ExecutableResourceType = 'workflow' | 'agent'
|
|
936
1003
|
```
|
|
937
1004
|
|
|
@@ -944,52 +1011,52 @@ export type ResourceSystemSummary = Pick<SystemEntry, 'id' | 'title' | 'descript
|
|
|
944
1011
|
### `ResourceDefinition`
|
|
945
1012
|
|
|
946
1013
|
```typescript
|
|
947
|
-
/**
|
|
948
|
-
* Base interface for ALL platform resources
|
|
949
|
-
* Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
|
|
950
|
-
*/
|
|
951
|
-
export interface ResourceDefinition {
|
|
952
|
-
/** Unique resource identifier */
|
|
953
|
-
resourceId: string
|
|
954
|
-
|
|
955
|
-
/** Display name */
|
|
956
|
-
name: string
|
|
957
|
-
|
|
958
|
-
/** Purpose and functionality description */
|
|
959
|
-
description: string
|
|
960
|
-
|
|
961
|
-
/** Version for change tracking and evolution */
|
|
962
|
-
version: string
|
|
963
|
-
|
|
964
|
-
/** Resource type discriminator */
|
|
965
|
-
type: ResourceType
|
|
966
|
-
|
|
967
|
-
/** Environment/deployment status */
|
|
968
|
-
status: ResourceStatus
|
|
969
|
-
|
|
970
|
-
/** Graph links to Organization Model nodes */
|
|
971
|
-
links?: ResourceLink[]
|
|
972
|
-
|
|
973
|
-
/** Infrastructure category for filtering */
|
|
974
|
-
category?: ResourceCategory
|
|
975
|
-
|
|
976
|
-
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
977
|
-
sessionCapable?: boolean
|
|
978
|
-
|
|
979
|
-
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
980
|
-
origin?: 'local' | 'remote'
|
|
981
|
-
|
|
982
|
-
/** OM System membership — dot-separated system path (e.g. "sys.lead-gen"), when backed by a Resource descriptor */
|
|
983
|
-
systemPath?: string
|
|
984
|
-
|
|
985
|
-
/** Display metadata for the owning OM System */
|
|
986
|
-
system?: ResourceSystemSummary
|
|
987
|
-
|
|
988
|
-
/** Governance lifecycle status from the OM Resource descriptor */
|
|
989
|
-
governanceStatus?: ResourceGovernanceStatus
|
|
990
|
-
|
|
991
|
-
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
992
|
-
archived?: boolean
|
|
1014
|
+
/**
|
|
1015
|
+
* Base interface for ALL platform resources
|
|
1016
|
+
* Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
|
|
1017
|
+
*/
|
|
1018
|
+
export interface ResourceDefinition {
|
|
1019
|
+
/** Unique resource identifier */
|
|
1020
|
+
resourceId: string
|
|
1021
|
+
|
|
1022
|
+
/** Display name */
|
|
1023
|
+
name: string
|
|
1024
|
+
|
|
1025
|
+
/** Purpose and functionality description */
|
|
1026
|
+
description: string
|
|
1027
|
+
|
|
1028
|
+
/** Version for change tracking and evolution */
|
|
1029
|
+
version: string
|
|
1030
|
+
|
|
1031
|
+
/** Resource type discriminator */
|
|
1032
|
+
type: ResourceType
|
|
1033
|
+
|
|
1034
|
+
/** Environment/deployment status */
|
|
1035
|
+
status: ResourceStatus
|
|
1036
|
+
|
|
1037
|
+
/** Graph links to Organization Model nodes */
|
|
1038
|
+
links?: ResourceLink[]
|
|
1039
|
+
|
|
1040
|
+
/** Infrastructure category for filtering */
|
|
1041
|
+
category?: ResourceCategory
|
|
1042
|
+
|
|
1043
|
+
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
1044
|
+
sessionCapable?: boolean
|
|
1045
|
+
|
|
1046
|
+
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
1047
|
+
origin?: 'local' | 'remote'
|
|
1048
|
+
|
|
1049
|
+
/** OM System membership — dot-separated system path (e.g. "sys.lead-gen"), when backed by a Resource descriptor */
|
|
1050
|
+
systemPath?: string
|
|
1051
|
+
|
|
1052
|
+
/** Display metadata for the owning OM System */
|
|
1053
|
+
system?: ResourceSystemSummary
|
|
1054
|
+
|
|
1055
|
+
/** Governance lifecycle status from the OM Resource descriptor */
|
|
1056
|
+
governanceStatus?: ResourceGovernanceStatus
|
|
1057
|
+
|
|
1058
|
+
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
1059
|
+
archived?: boolean
|
|
993
1060
|
}
|
|
994
1061
|
```
|
|
995
1062
|
|
|
@@ -1002,371 +1069,389 @@ export type RuntimeResourceDescriptor = Extract<ResourceEntry, { kind: 'workflow
|
|
|
1002
1069
|
### `DescriptorBackedResourceDefinition`
|
|
1003
1070
|
|
|
1004
1071
|
```typescript
|
|
1005
|
-
export type DescriptorBackedResourceDefinition<
|
|
1006
|
-
TResource extends RuntimeResourceDescriptor = RuntimeResourceDescriptor
|
|
1007
|
-
> = Omit<ResourceDefinition, 'resourceId' | 'type'> & {
|
|
1008
|
-
/** OM descriptor that owns canonical identity and governance metadata. */
|
|
1009
|
-
resource: TResource
|
|
1010
|
-
resourceId?: never
|
|
1011
|
-
type?: never
|
|
1072
|
+
export type DescriptorBackedResourceDefinition<
|
|
1073
|
+
TResource extends RuntimeResourceDescriptor = RuntimeResourceDescriptor
|
|
1074
|
+
> = Omit<ResourceDefinition, 'resourceId' | 'type'> & {
|
|
1075
|
+
/** OM descriptor that owns canonical identity and governance metadata. */
|
|
1076
|
+
resource: TResource
|
|
1077
|
+
resourceId?: never
|
|
1078
|
+
type?: never
|
|
1012
1079
|
}
|
|
1013
1080
|
```
|
|
1014
1081
|
|
|
1015
1082
|
### `BoundResourceDefinition`
|
|
1016
1083
|
|
|
1017
1084
|
```typescript
|
|
1018
|
-
export type BoundResourceDefinition<TResource extends RuntimeResourceDescriptor = RuntimeResourceDescriptor> = Omit<
|
|
1019
|
-
DescriptorBackedResourceDefinition<TResource>,
|
|
1020
|
-
'resource'
|
|
1021
|
-
> &
|
|
1022
|
-
ResourceDefinition & {
|
|
1023
|
-
resource: TResource
|
|
1024
|
-
resourceId: TResource['id']
|
|
1025
|
-
type: TResource['kind']
|
|
1085
|
+
export type BoundResourceDefinition<TResource extends RuntimeResourceDescriptor = RuntimeResourceDescriptor> = Omit<
|
|
1086
|
+
DescriptorBackedResourceDefinition<TResource>,
|
|
1087
|
+
'resource'
|
|
1088
|
+
> &
|
|
1089
|
+
ResourceDefinition & {
|
|
1090
|
+
resource: TResource
|
|
1091
|
+
resourceId: TResource['id']
|
|
1092
|
+
type: TResource['kind']
|
|
1026
1093
|
}
|
|
1027
1094
|
```
|
|
1028
1095
|
|
|
1029
1096
|
### `ResourceList`
|
|
1030
1097
|
|
|
1031
1098
|
```typescript
|
|
1032
|
-
/**
|
|
1033
|
-
* Resource list for organization
|
|
1034
|
-
* Returns ResourceDefinition metadata (not full definitions)
|
|
1035
|
-
*/
|
|
1036
|
-
export interface ResourceList {
|
|
1037
|
-
workflows: ResourceDefinition[]
|
|
1038
|
-
agents: ResourceDefinition[]
|
|
1039
|
-
total: number
|
|
1040
|
-
organizationName: string
|
|
1041
|
-
environment?: 'dev' | 'prod'
|
|
1099
|
+
/**
|
|
1100
|
+
* Resource list for organization
|
|
1101
|
+
* Returns ResourceDefinition metadata (not full definitions)
|
|
1102
|
+
*/
|
|
1103
|
+
export interface ResourceList {
|
|
1104
|
+
workflows: ResourceDefinition[]
|
|
1105
|
+
agents: ResourceDefinition[]
|
|
1106
|
+
total: number
|
|
1107
|
+
organizationName: string
|
|
1108
|
+
environment?: 'dev' | 'prod'
|
|
1042
1109
|
}
|
|
1043
1110
|
```
|
|
1044
1111
|
|
|
1045
1112
|
### `WebhookProviderType`
|
|
1046
1113
|
|
|
1047
1114
|
```typescript
|
|
1048
|
-
/** Webhook provider identifiers */
|
|
1115
|
+
/** Webhook provider identifiers */
|
|
1049
1116
|
export type WebhookProviderType = 'cal-com' | 'stripe' | 'signature-api' | 'instantly' | 'apify' | 'test'
|
|
1050
1117
|
```
|
|
1051
1118
|
|
|
1052
1119
|
### `WebhookTriggerConfig`
|
|
1053
1120
|
|
|
1054
1121
|
```typescript
|
|
1055
|
-
/** Webhook trigger configuration */
|
|
1056
|
-
export interface WebhookTriggerConfig {
|
|
1057
|
-
/** Provider identifier */
|
|
1058
|
-
provider: WebhookProviderType
|
|
1059
|
-
/** Event type for documentation (not used for matching - workflow handles routing) */
|
|
1060
|
-
event?: string
|
|
1061
|
-
/** Optional filtering (e.g., specific form ID for Fillout) */
|
|
1062
|
-
filter?: Record<string, string>
|
|
1063
|
-
/** References credential in credentials table for per-org webhook secrets */
|
|
1064
|
-
credentialName?: string
|
|
1122
|
+
/** Webhook trigger configuration */
|
|
1123
|
+
export interface WebhookTriggerConfig {
|
|
1124
|
+
/** Provider identifier */
|
|
1125
|
+
provider: WebhookProviderType
|
|
1126
|
+
/** Event type for documentation (not used for matching - workflow handles routing) */
|
|
1127
|
+
event?: string
|
|
1128
|
+
/** Optional filtering (e.g., specific form ID for Fillout) */
|
|
1129
|
+
filter?: Record<string, string>
|
|
1130
|
+
/** References credential in credentials table for per-org webhook secrets */
|
|
1131
|
+
credentialName?: string
|
|
1065
1132
|
}
|
|
1066
1133
|
```
|
|
1067
1134
|
|
|
1068
1135
|
### `ScheduleTriggerConfig`
|
|
1069
1136
|
|
|
1070
1137
|
```typescript
|
|
1071
|
-
/** Schedule trigger configuration */
|
|
1072
|
-
export interface ScheduleTriggerConfig {
|
|
1073
|
-
/** Cron expression (e.g., '0 6 * * *') */
|
|
1074
|
-
cron: string
|
|
1075
|
-
/** Optional timezone (default: UTC) */
|
|
1076
|
-
timezone?: string
|
|
1138
|
+
/** Schedule trigger configuration */
|
|
1139
|
+
export interface ScheduleTriggerConfig {
|
|
1140
|
+
/** Cron expression (e.g., '0 6 * * *') */
|
|
1141
|
+
cron: string
|
|
1142
|
+
/** Optional timezone (default: UTC) */
|
|
1143
|
+
timezone?: string
|
|
1077
1144
|
}
|
|
1078
1145
|
```
|
|
1079
1146
|
|
|
1080
1147
|
### `EventTriggerConfig`
|
|
1081
1148
|
|
|
1082
1149
|
```typescript
|
|
1083
|
-
/** Event trigger configuration */
|
|
1084
|
-
export interface EventTriggerConfig {
|
|
1085
|
-
/** Internal event type */
|
|
1086
|
-
eventType: string
|
|
1087
|
-
/** Event source */
|
|
1088
|
-
source?: string
|
|
1150
|
+
/** Event trigger configuration */
|
|
1151
|
+
export interface EventTriggerConfig {
|
|
1152
|
+
/** Internal event type */
|
|
1153
|
+
eventType: string
|
|
1154
|
+
/** Event source */
|
|
1155
|
+
source?: string
|
|
1089
1156
|
}
|
|
1090
1157
|
```
|
|
1091
1158
|
|
|
1092
1159
|
### `TriggerConfig`
|
|
1093
1160
|
|
|
1094
1161
|
```typescript
|
|
1095
|
-
/** Union of all trigger configs */
|
|
1162
|
+
/** Union of all trigger configs */
|
|
1096
1163
|
export type TriggerConfig = WebhookTriggerConfig | ScheduleTriggerConfig | EventTriggerConfig
|
|
1097
1164
|
```
|
|
1098
1165
|
|
|
1099
1166
|
### `TriggerDefinition`
|
|
1100
1167
|
|
|
1101
1168
|
```typescript
|
|
1102
|
-
/**
|
|
1103
|
-
* Trigger metadata - entry points that initiate resource execution
|
|
1104
|
-
*
|
|
1105
|
-
* Triggers represent how executions start: webhooks from external services,
|
|
1106
|
-
* scheduled cron jobs, platform events, or manual user actions.
|
|
1107
|
-
*
|
|
1108
|
-
* BREAKING CHANGES (2025-11-30):
|
|
1109
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
1110
|
-
* - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
|
|
1111
|
-
* - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
|
|
1112
|
-
* - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
|
|
1113
|
-
* - triggers object now includes `externalResources` option
|
|
1114
|
-
*
|
|
1115
|
-
* @example
|
|
1116
|
-
* // TriggerDefinition - metadata only
|
|
1117
|
-
* {
|
|
1118
|
-
* resourceId: 'trigger-new-order',
|
|
1119
|
-
* type: 'trigger',
|
|
1120
|
-
* triggerType: 'webhook',
|
|
1121
|
-
* name: 'New Order',
|
|
1122
|
-
* description: 'Webhook from Shopify on new orders',
|
|
1123
|
-
* version: '1.0.0',
|
|
1124
|
-
* status: 'prod',
|
|
1125
|
-
* webhookPath: '/webhooks/shopify/orders'
|
|
1126
|
-
* }
|
|
1127
|
-
*
|
|
1128
|
-
* // Relationships declared in ResourceRelationships (not on TriggerDefinition):
|
|
1129
|
-
* // relationships: {
|
|
1130
|
-
* // 'trigger-new-order': { triggers: { workflows: ['order-fulfillment-workflow'] } }
|
|
1131
|
-
* // }
|
|
1132
|
-
*/
|
|
1133
|
-
export interface TriggerDefinition extends ResourceDefinition {
|
|
1134
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
1135
|
-
type: 'trigger'
|
|
1136
|
-
|
|
1137
|
-
/** Trigger mechanism type (renamed from 'type' to avoid collision with base type discriminator) */
|
|
1138
|
-
triggerType: 'webhook' | 'schedule' | 'manual' | 'event'
|
|
1139
|
-
|
|
1140
|
-
/** Type-specific configuration */
|
|
1141
|
-
config?: TriggerConfig
|
|
1142
|
-
|
|
1143
|
-
// Legacy fields (deprecated, use config instead)
|
|
1144
|
-
/** For webhook triggers: path like '/webhooks/shopify/orders' */
|
|
1145
|
-
webhookPath?: string
|
|
1146
|
-
/** For schedule triggers: cron expression like '0 6 * * *' */
|
|
1147
|
-
schedule?: string
|
|
1148
|
-
/** For event triggers: event type like 'low-stock-alert' */
|
|
1149
|
-
eventType?: string
|
|
1150
|
-
|
|
1151
|
-
// NOTE: What this trigger starts is declared in ResourceRelationships, not here
|
|
1152
|
-
// This prevents duplication - triggers are forward-declared in relationships
|
|
1169
|
+
/**
|
|
1170
|
+
* Trigger metadata - entry points that initiate resource execution
|
|
1171
|
+
*
|
|
1172
|
+
* Triggers represent how executions start: webhooks from external services,
|
|
1173
|
+
* scheduled cron jobs, platform events, or manual user actions.
|
|
1174
|
+
*
|
|
1175
|
+
* BREAKING CHANGES (2025-11-30):
|
|
1176
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
1177
|
+
* - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
|
|
1178
|
+
* - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
|
|
1179
|
+
* - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
|
|
1180
|
+
* - triggers object now includes `externalResources` option
|
|
1181
|
+
*
|
|
1182
|
+
* @example
|
|
1183
|
+
* // TriggerDefinition - metadata only
|
|
1184
|
+
* {
|
|
1185
|
+
* resourceId: 'trigger-new-order',
|
|
1186
|
+
* type: 'trigger',
|
|
1187
|
+
* triggerType: 'webhook',
|
|
1188
|
+
* name: 'New Order',
|
|
1189
|
+
* description: 'Webhook from Shopify on new orders',
|
|
1190
|
+
* version: '1.0.0',
|
|
1191
|
+
* status: 'prod',
|
|
1192
|
+
* webhookPath: '/webhooks/shopify/orders'
|
|
1193
|
+
* }
|
|
1194
|
+
*
|
|
1195
|
+
* // Relationships declared in ResourceRelationships (not on TriggerDefinition):
|
|
1196
|
+
* // relationships: {
|
|
1197
|
+
* // 'trigger-new-order': { triggers: { workflows: ['order-fulfillment-workflow'] } }
|
|
1198
|
+
* // }
|
|
1199
|
+
*/
|
|
1200
|
+
export interface TriggerDefinition extends ResourceDefinition {
|
|
1201
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
1202
|
+
type: 'trigger'
|
|
1203
|
+
|
|
1204
|
+
/** Trigger mechanism type (renamed from 'type' to avoid collision with base type discriminator) */
|
|
1205
|
+
triggerType: 'webhook' | 'schedule' | 'manual' | 'event'
|
|
1206
|
+
|
|
1207
|
+
/** Type-specific configuration */
|
|
1208
|
+
config?: TriggerConfig
|
|
1209
|
+
|
|
1210
|
+
// Legacy fields (deprecated, use config instead)
|
|
1211
|
+
/** For webhook triggers: path like '/webhooks/shopify/orders' */
|
|
1212
|
+
webhookPath?: string
|
|
1213
|
+
/** For schedule triggers: cron expression like '0 6 * * *' */
|
|
1214
|
+
schedule?: string
|
|
1215
|
+
/** For event triggers: event type like 'low-stock-alert' */
|
|
1216
|
+
eventType?: string
|
|
1217
|
+
|
|
1218
|
+
// NOTE: What this trigger starts is declared in ResourceRelationships, not here
|
|
1219
|
+
// This prevents duplication - triggers are forward-declared in relationships
|
|
1153
1220
|
}
|
|
1154
1221
|
```
|
|
1155
1222
|
|
|
1156
1223
|
### `IntegrationDefinition`
|
|
1157
1224
|
|
|
1158
1225
|
```typescript
|
|
1159
|
-
/**
|
|
1160
|
-
* Integration metadata - external service connections
|
|
1161
|
-
*
|
|
1162
|
-
* References credentials table for actual connection. No connection status
|
|
1163
|
-
* stored here (queried at runtime from credentials table).
|
|
1164
|
-
*
|
|
1165
|
-
* BREAKING CHANGES (2025-11-30):
|
|
1166
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
1167
|
-
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1168
|
-
* - New required field: `status` (inherited) - organizations must add status to all integrations
|
|
1169
|
-
* - New required field: `version` (inherited) - organizations must add version to all integrations
|
|
1170
|
-
* - New required field: `type: 'integration'` (inherited) - resource type discriminator
|
|
1171
|
-
*
|
|
1172
|
-
* @example
|
|
1173
|
-
* {
|
|
1174
|
-
* resourceId: 'integration-shopify-prod',
|
|
1175
|
-
* type: 'integration',
|
|
1176
|
-
* provider: 'shopify',
|
|
1177
|
-
* credentialName: 'shopify-prod',
|
|
1178
|
-
* name: 'Shopify Production',
|
|
1179
|
-
* description: 'E-commerce platform',
|
|
1180
|
-
* version: '1.0.0',
|
|
1181
|
-
* status: 'prod'
|
|
1182
|
-
* }
|
|
1183
|
-
*/
|
|
1184
|
-
export interface IntegrationDefinition extends ResourceDefinition {
|
|
1185
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
1186
|
-
type: 'integration'
|
|
1187
|
-
|
|
1188
|
-
/** OM descriptor that owns canonical identity and governance metadata. */
|
|
1189
|
-
resource?: Extract<ResourceEntry, { kind: 'integration' }>
|
|
1190
|
-
|
|
1191
|
-
/** Integration provider type */
|
|
1192
|
-
provider: IntegrationType
|
|
1193
|
-
/** References credentials table (e.g., 'shopify-prod', 'zendesk-api') */
|
|
1194
|
-
credentialName: string
|
|
1226
|
+
/**
|
|
1227
|
+
* Integration metadata - external service connections
|
|
1228
|
+
*
|
|
1229
|
+
* References credentials table for actual connection. No connection status
|
|
1230
|
+
* stored here (queried at runtime from credentials table).
|
|
1231
|
+
*
|
|
1232
|
+
* BREAKING CHANGES (2025-11-30):
|
|
1233
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
1234
|
+
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1235
|
+
* - New required field: `status` (inherited) - organizations must add status to all integrations
|
|
1236
|
+
* - New required field: `version` (inherited) - organizations must add version to all integrations
|
|
1237
|
+
* - New required field: `type: 'integration'` (inherited) - resource type discriminator
|
|
1238
|
+
*
|
|
1239
|
+
* @example
|
|
1240
|
+
* {
|
|
1241
|
+
* resourceId: 'integration-shopify-prod',
|
|
1242
|
+
* type: 'integration',
|
|
1243
|
+
* provider: 'shopify',
|
|
1244
|
+
* credentialName: 'shopify-prod',
|
|
1245
|
+
* name: 'Shopify Production',
|
|
1246
|
+
* description: 'E-commerce platform',
|
|
1247
|
+
* version: '1.0.0',
|
|
1248
|
+
* status: 'prod'
|
|
1249
|
+
* }
|
|
1250
|
+
*/
|
|
1251
|
+
export interface IntegrationDefinition extends ResourceDefinition {
|
|
1252
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
1253
|
+
type: 'integration'
|
|
1254
|
+
|
|
1255
|
+
/** OM descriptor that owns canonical identity and governance metadata. */
|
|
1256
|
+
resource?: Extract<ResourceEntry, { kind: 'integration' }>
|
|
1257
|
+
|
|
1258
|
+
/** Integration provider type */
|
|
1259
|
+
provider: IntegrationType
|
|
1260
|
+
/** References credentials table (e.g., 'shopify-prod', 'zendesk-api') */
|
|
1261
|
+
credentialName: string
|
|
1195
1262
|
}
|
|
1196
1263
|
```
|
|
1197
1264
|
|
|
1198
1265
|
### `RelationshipDeclaration`
|
|
1199
1266
|
|
|
1200
1267
|
```typescript
|
|
1201
|
-
/**
|
|
1202
|
-
* Explicit resource relationship declaration
|
|
1203
|
-
*
|
|
1204
|
-
* Single-direction only - Command View derives reverse relationships.
|
|
1205
|
-
* Agents/workflows declare what they trigger and use.
|
|
1206
|
-
*
|
|
1207
|
-
* @example
|
|
1208
|
-
* {
|
|
1209
|
-
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
1210
|
-
* uses: { integrations: ['integration-shopify-prod', 'integration-postgres'] }
|
|
1211
|
-
* }
|
|
1212
|
-
*/
|
|
1213
|
-
export interface RelationshipDeclaration {
|
|
1214
|
-
/** Resources this resource triggers */
|
|
1215
|
-
triggers?: {
|
|
1216
|
-
/** Agent resourceIds this resource triggers */
|
|
1217
|
-
agents?: string[]
|
|
1218
|
-
/** Workflow resourceIds this resource triggers */
|
|
1219
|
-
workflows?: string[]
|
|
1220
|
-
}
|
|
1221
|
-
/** Integrations this resource uses */
|
|
1222
|
-
uses?: {
|
|
1223
|
-
/** Integration IDs this resource uses */
|
|
1224
|
-
integrations?: string[]
|
|
1225
|
-
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Explicit resource relationship declaration
|
|
1270
|
+
*
|
|
1271
|
+
* Single-direction only - Command View derives reverse relationships.
|
|
1272
|
+
* Agents/workflows declare what they trigger and use.
|
|
1273
|
+
*
|
|
1274
|
+
* @example
|
|
1275
|
+
* {
|
|
1276
|
+
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
1277
|
+
* uses: { integrations: ['integration-shopify-prod', 'integration-postgres'] }
|
|
1278
|
+
* }
|
|
1279
|
+
*/
|
|
1280
|
+
export interface RelationshipDeclaration {
|
|
1281
|
+
/** Resources this resource triggers */
|
|
1282
|
+
triggers?: {
|
|
1283
|
+
/** Agent resourceIds this resource triggers */
|
|
1284
|
+
agents?: string[]
|
|
1285
|
+
/** Workflow resourceIds this resource triggers */
|
|
1286
|
+
workflows?: string[]
|
|
1287
|
+
}
|
|
1288
|
+
/** Integrations this resource uses */
|
|
1289
|
+
uses?: {
|
|
1290
|
+
/** Integration IDs this resource uses */
|
|
1291
|
+
integrations?: string[]
|
|
1292
|
+
}
|
|
1226
1293
|
}
|
|
1227
1294
|
```
|
|
1228
1295
|
|
|
1229
1296
|
### `ResourceRelationships`
|
|
1230
1297
|
|
|
1231
1298
|
```typescript
|
|
1232
|
-
/**
|
|
1233
|
-
* Resource relationships map
|
|
1234
|
-
* Maps resourceId to its relationship declarations
|
|
1235
|
-
*
|
|
1236
|
-
* @example
|
|
1237
|
-
* {
|
|
1238
|
-
* 'order-processor-agent': {
|
|
1239
|
-
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
1240
|
-
* uses: { integrations: ['integration-shopify-prod'] }
|
|
1241
|
-
* }
|
|
1242
|
-
* }
|
|
1243
|
-
*/
|
|
1299
|
+
/**
|
|
1300
|
+
* Resource relationships map
|
|
1301
|
+
* Maps resourceId to its relationship declarations
|
|
1302
|
+
*
|
|
1303
|
+
* @example
|
|
1304
|
+
* {
|
|
1305
|
+
* 'order-processor-agent': {
|
|
1306
|
+
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
1307
|
+
* uses: { integrations: ['integration-shopify-prod'] }
|
|
1308
|
+
* }
|
|
1309
|
+
* }
|
|
1310
|
+
*/
|
|
1244
1311
|
export type ResourceRelationships = Record<string, RelationshipDeclaration>
|
|
1245
1312
|
```
|
|
1246
1313
|
|
|
1247
1314
|
### `ExternalPlatform`
|
|
1248
1315
|
|
|
1249
1316
|
```typescript
|
|
1250
|
-
/**
|
|
1251
|
-
* External platform type
|
|
1252
|
-
* Supported third-party automation platforms
|
|
1253
|
-
*/
|
|
1317
|
+
/**
|
|
1318
|
+
* External platform type
|
|
1319
|
+
* Supported third-party automation platforms
|
|
1320
|
+
*/
|
|
1254
1321
|
export type ExternalPlatform = 'n8n' | 'make' | 'zapier' | 'other'
|
|
1255
1322
|
```
|
|
1256
1323
|
|
|
1257
1324
|
### `ExternalResourceDefinition`
|
|
1258
1325
|
|
|
1259
1326
|
```typescript
|
|
1260
|
-
/**
|
|
1261
|
-
* External automation resource metadata
|
|
1262
|
-
*
|
|
1263
|
-
* Represents workflows/automations running on third-party platforms
|
|
1264
|
-
* (n8n, Make, Zapier, etc.) for visualization in Command View.
|
|
1265
|
-
*
|
|
1266
|
-
* NOTE: This is metadata ONLY for visualization. No execution logic,
|
|
1267
|
-
* no API integration with external platforms, no status syncing.
|
|
1268
|
-
*
|
|
1269
|
-
* BREAKING CHANGES (2025-11-30):
|
|
1270
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
1271
|
-
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1272
|
-
* - New required field: `version` (inherited) - organizations must add version to all external resources
|
|
1273
|
-
* - New required field: `type: 'external'` (inherited) - resource type discriminator
|
|
1274
|
-
* - REMOVED FIELD: `triggeredBy` - per relationship-consolidation design, all relationships are forward-only declarations
|
|
1275
|
-
*
|
|
1276
|
-
* @example
|
|
1277
|
-
* {
|
|
1278
|
-
* resourceId: 'external-n8n-order-sync',
|
|
1279
|
-
* type: 'external',
|
|
1280
|
-
* version: '1.0.0',
|
|
1281
|
-
* platform: 'n8n',
|
|
1282
|
-
* name: 'Shopify Order Sync',
|
|
1283
|
-
* description: 'Legacy n8n workflow for syncing Shopify orders',
|
|
1284
|
-
* status: 'prod',
|
|
1285
|
-
* platformUrl: 'https://n8n.client.com/workflow/123',
|
|
1286
|
-
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
1287
|
-
* uses: { integrations: ['integration-shopify-prod'] }
|
|
1288
|
-
* }
|
|
1289
|
-
*/
|
|
1290
|
-
export interface ExternalResourceDefinition extends ResourceDefinition {
|
|
1291
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
1292
|
-
type: 'external'
|
|
1293
|
-
|
|
1294
|
-
/** Platform type */
|
|
1295
|
-
platform: ExternalPlatform
|
|
1296
|
-
|
|
1297
|
-
// Optional platform-specific metadata
|
|
1298
|
-
/** Link to external platform (e.g., n8n workflow editor URL) */
|
|
1299
|
-
platformUrl?: string
|
|
1300
|
-
/** Platform's internal ID/reference */
|
|
1301
|
-
externalId?: string
|
|
1302
|
-
|
|
1303
|
-
/** What this external resource triggers (external -> internal) */
|
|
1304
|
-
triggers?: {
|
|
1305
|
-
/** Elevasis workflow resourceIds this external automation triggers */
|
|
1306
|
-
workflows?: string[]
|
|
1307
|
-
/** Elevasis agent resourceIds this external automation triggers */
|
|
1308
|
-
agents?: string[]
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
/** Integrations this external resource uses (shared credentials) */
|
|
1312
|
-
uses?: {
|
|
1313
|
-
/** Integration IDs this external automation uses */
|
|
1314
|
-
integrations?: string[]
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
// NOTE: triggeredBy field removed - per relationship-consolidation design,
|
|
1318
|
-
// all relationships are forward-only declarations. Graph edges are built
|
|
1319
|
-
// from forward declarations only.
|
|
1327
|
+
/**
|
|
1328
|
+
* External automation resource metadata
|
|
1329
|
+
*
|
|
1330
|
+
* Represents workflows/automations running on third-party platforms
|
|
1331
|
+
* (n8n, Make, Zapier, etc.) for visualization in Command View.
|
|
1332
|
+
*
|
|
1333
|
+
* NOTE: This is metadata ONLY for visualization. No execution logic,
|
|
1334
|
+
* no API integration with external platforms, no status syncing.
|
|
1335
|
+
*
|
|
1336
|
+
* BREAKING CHANGES (2025-11-30):
|
|
1337
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
1338
|
+
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1339
|
+
* - New required field: `version` (inherited) - organizations must add version to all external resources
|
|
1340
|
+
* - New required field: `type: 'external'` (inherited) - resource type discriminator
|
|
1341
|
+
* - REMOVED FIELD: `triggeredBy` - per relationship-consolidation design, all relationships are forward-only declarations
|
|
1342
|
+
*
|
|
1343
|
+
* @example
|
|
1344
|
+
* {
|
|
1345
|
+
* resourceId: 'external-n8n-order-sync',
|
|
1346
|
+
* type: 'external',
|
|
1347
|
+
* version: '1.0.0',
|
|
1348
|
+
* platform: 'n8n',
|
|
1349
|
+
* name: 'Shopify Order Sync',
|
|
1350
|
+
* description: 'Legacy n8n workflow for syncing Shopify orders',
|
|
1351
|
+
* status: 'prod',
|
|
1352
|
+
* platformUrl: 'https://n8n.client.com/workflow/123',
|
|
1353
|
+
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
1354
|
+
* uses: { integrations: ['integration-shopify-prod'] }
|
|
1355
|
+
* }
|
|
1356
|
+
*/
|
|
1357
|
+
export interface ExternalResourceDefinition extends ResourceDefinition {
|
|
1358
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
1359
|
+
type: 'external'
|
|
1360
|
+
|
|
1361
|
+
/** Platform type */
|
|
1362
|
+
platform: ExternalPlatform
|
|
1363
|
+
|
|
1364
|
+
// Optional platform-specific metadata
|
|
1365
|
+
/** Link to external platform (e.g., n8n workflow editor URL) */
|
|
1366
|
+
platformUrl?: string
|
|
1367
|
+
/** Platform's internal ID/reference */
|
|
1368
|
+
externalId?: string
|
|
1369
|
+
|
|
1370
|
+
/** What this external resource triggers (external -> internal) */
|
|
1371
|
+
triggers?: {
|
|
1372
|
+
/** Elevasis workflow resourceIds this external automation triggers */
|
|
1373
|
+
workflows?: string[]
|
|
1374
|
+
/** Elevasis agent resourceIds this external automation triggers */
|
|
1375
|
+
agents?: string[]
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
/** Integrations this external resource uses (shared credentials) */
|
|
1379
|
+
uses?: {
|
|
1380
|
+
/** Integration IDs this external automation uses */
|
|
1381
|
+
integrations?: string[]
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
// NOTE: triggeredBy field removed - per relationship-consolidation design,
|
|
1385
|
+
// all relationships are forward-only declarations. Graph edges are built
|
|
1386
|
+
// from forward declarations only.
|
|
1387
|
+
}
|
|
1388
|
+
```
|
|
1389
|
+
|
|
1390
|
+
### `ApiInterfaceConformanceGap`
|
|
1391
|
+
|
|
1392
|
+
```typescript
|
|
1393
|
+
/**
|
|
1394
|
+
* Describes a system that has API-backed resources but lacks an `apiInterface`
|
|
1395
|
+
* declaration. Used by `detectMissingApiInterfaceDeclarations` as the return
|
|
1396
|
+
* payload that drives both CLI warnings and scaffold fill-mode input.
|
|
1397
|
+
*/
|
|
1398
|
+
export interface ApiInterfaceConformanceGap {
|
|
1399
|
+
/** Dot-separated system path (e.g. "sales.lead-gen"). */
|
|
1400
|
+
systemPath: string
|
|
1401
|
+
/** Resource IDs in this system that have non-empty ontology bindings. */
|
|
1402
|
+
resourceIds: string[]
|
|
1403
|
+
/** Human-readable description of the gap. */
|
|
1404
|
+
message: string
|
|
1320
1405
|
}
|
|
1321
1406
|
```
|
|
1322
1407
|
|
|
1323
1408
|
### `HumanCheckpointDefinition`
|
|
1324
1409
|
|
|
1325
1410
|
```typescript
|
|
1326
|
-
/**
|
|
1327
|
-
* Human Checkpoint definition - human decision points in automation
|
|
1328
|
-
*
|
|
1329
|
-
* Represents where human judgment is deployed in the automation landscape.
|
|
1330
|
-
* Tasks with matching command_queue_group are routed to this checkpoint.
|
|
1331
|
-
*
|
|
1332
|
-
* BREAKING CHANGES (2025-11-30):
|
|
1333
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
1334
|
-
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1335
|
-
* - description is now REQUIRED (was optional) - organizations must add description to all human checkpoints
|
|
1336
|
-
* - New required field: `version` (inherited) - organizations must add version to all human checkpoints
|
|
1337
|
-
* - New required field: `type: 'human'` (inherited) - resource type discriminator
|
|
1338
|
-
*
|
|
1339
|
-
* @example
|
|
1340
|
-
* {
|
|
1341
|
-
* resourceId: 'sales-approval',
|
|
1342
|
-
* type: 'human',
|
|
1343
|
-
* name: 'Sales Approval Queue',
|
|
1344
|
-
* description: 'High-value order approvals for sales team',
|
|
1345
|
-
* version: '1.0.0',
|
|
1346
|
-
* status: 'prod',
|
|
1347
|
-
* requestedBy: { agents: ['order-processor-agent'] },
|
|
1348
|
-
* routesTo: { agents: ['order-fulfillment-agent'] }
|
|
1349
|
-
* }
|
|
1350
|
-
*/
|
|
1351
|
-
export interface HumanCheckpointDefinition extends ResourceDefinition {
|
|
1352
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
1353
|
-
type: 'human'
|
|
1354
|
-
|
|
1355
|
-
/** Resources that create tasks for this checkpoint */
|
|
1356
|
-
requestedBy?: {
|
|
1357
|
-
/** Agent resourceIds that request approval here */
|
|
1358
|
-
agents?: string[]
|
|
1359
|
-
/** Workflow resourceIds that request approval here */
|
|
1360
|
-
workflows?: string[]
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
/** Resources that receive approved decisions */
|
|
1364
|
-
routesTo?: {
|
|
1365
|
-
/** Agent resourceIds that handle approved tasks */
|
|
1366
|
-
agents?: string[]
|
|
1367
|
-
/** Workflow resourceIds that handle approved tasks */
|
|
1368
|
-
workflows?: string[]
|
|
1369
|
-
}
|
|
1411
|
+
/**
|
|
1412
|
+
* Human Checkpoint definition - human decision points in automation
|
|
1413
|
+
*
|
|
1414
|
+
* Represents where human judgment is deployed in the automation landscape.
|
|
1415
|
+
* Tasks with matching command_queue_group are routed to this checkpoint.
|
|
1416
|
+
*
|
|
1417
|
+
* BREAKING CHANGES (2025-11-30):
|
|
1418
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
1419
|
+
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1420
|
+
* - description is now REQUIRED (was optional) - organizations must add description to all human checkpoints
|
|
1421
|
+
* - New required field: `version` (inherited) - organizations must add version to all human checkpoints
|
|
1422
|
+
* - New required field: `type: 'human'` (inherited) - resource type discriminator
|
|
1423
|
+
*
|
|
1424
|
+
* @example
|
|
1425
|
+
* {
|
|
1426
|
+
* resourceId: 'sales-approval',
|
|
1427
|
+
* type: 'human',
|
|
1428
|
+
* name: 'Sales Approval Queue',
|
|
1429
|
+
* description: 'High-value order approvals for sales team',
|
|
1430
|
+
* version: '1.0.0',
|
|
1431
|
+
* status: 'prod',
|
|
1432
|
+
* requestedBy: { agents: ['order-processor-agent'] },
|
|
1433
|
+
* routesTo: { agents: ['order-fulfillment-agent'] }
|
|
1434
|
+
* }
|
|
1435
|
+
*/
|
|
1436
|
+
export interface HumanCheckpointDefinition extends ResourceDefinition {
|
|
1437
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
1438
|
+
type: 'human'
|
|
1439
|
+
|
|
1440
|
+
/** Resources that create tasks for this checkpoint */
|
|
1441
|
+
requestedBy?: {
|
|
1442
|
+
/** Agent resourceIds that request approval here */
|
|
1443
|
+
agents?: string[]
|
|
1444
|
+
/** Workflow resourceIds that request approval here */
|
|
1445
|
+
workflows?: string[]
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
/** Resources that receive approved decisions */
|
|
1449
|
+
routesTo?: {
|
|
1450
|
+
/** Agent resourceIds that handle approved tasks */
|
|
1451
|
+
agents?: string[]
|
|
1452
|
+
/** Workflow resourceIds that handle approved tasks */
|
|
1453
|
+
workflows?: string[]
|
|
1454
|
+
}
|
|
1370
1455
|
}
|
|
1371
1456
|
```
|
|
1372
1457
|
|