@elevasis/core 0.10.0 → 0.11.1
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/index.d.ts +69 -159
- package/dist/index.js +324 -613
- package/dist/organization-model/index.d.ts +69 -159
- package/dist/organization-model/index.js +324 -613
- package/dist/test-utils/index.d.ts +192 -45
- package/dist/test-utils/index.js +260 -600
- package/package.json +1 -1
- package/src/__tests__/template-core-compatibility.test.ts +73 -91
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +94 -182
- package/src/auth/multi-tenancy/index.ts +20 -17
- package/src/auth/multi-tenancy/memberships/api-schemas.ts +142 -126
- package/src/auth/multi-tenancy/memberships/index.ts +26 -22
- package/src/auth/multi-tenancy/permissions.test.ts +42 -0
- package/src/auth/multi-tenancy/permissions.ts +104 -0
- package/src/organization-model/README.md +102 -97
- package/src/organization-model/__tests__/defaults.test.ts +19 -6
- package/src/organization-model/__tests__/domains/resource-mappings.test.ts +24 -93
- package/src/organization-model/__tests__/graph.test.ts +82 -894
- package/src/organization-model/__tests__/resolve.test.ts +59 -690
- package/src/organization-model/__tests__/schema.test.ts +83 -407
- package/src/organization-model/contracts.ts +4 -3
- package/src/organization-model/defaults.ts +277 -141
- package/src/organization-model/domains/features.ts +31 -22
- package/src/organization-model/domains/navigation.ts +27 -20
- package/src/organization-model/foundation.ts +42 -54
- package/src/organization-model/graph/build.ts +42 -217
- package/src/organization-model/graph/index.ts +4 -4
- package/src/organization-model/graph/link.ts +10 -0
- package/src/organization-model/graph/schema.ts +21 -16
- package/src/organization-model/graph/types.ts +10 -10
- package/src/organization-model/helpers.ts +74 -0
- package/src/organization-model/index.ts +7 -7
- package/src/organization-model/organization-graph.mdx +89 -272
- package/src/organization-model/organization-model.mdx +152 -320
- package/src/organization-model/published.ts +20 -19
- package/src/organization-model/resolve.ts +8 -33
- package/src/organization-model/schema.ts +63 -205
- package/src/organization-model/types.ts +12 -11
- package/src/platform/constants/versions.ts +3 -3
- package/src/platform/registry/__tests__/command-view.test.ts +6 -5
- package/src/platform/registry/__tests__/resource-link.test.ts +30 -0
- package/src/platform/registry/__tests__/resource-registry.integration.test.ts +15 -15
- package/src/platform/registry/command-view.ts +10 -12
- package/src/platform/registry/index.ts +93 -93
- package/src/platform/registry/resource-link.ts +32 -0
- package/src/platform/registry/resource-registry.ts +917 -876
- package/src/platform/registry/serialization.ts +56 -73
- package/src/platform/registry/serialized-types.ts +17 -12
- package/src/platform/registry/types.ts +14 -43
- package/src/reference/_generated/contracts.md +94 -182
- package/src/reference/glossary.md +71 -105
- package/src/scaffold-registry/__tests__/index.test.ts +125 -1
- package/src/scaffold-registry/__tests__/schema.test.ts +48 -20
- package/src/scaffold-registry/index.ts +236 -188
- package/src/scaffold-registry/schema.ts +47 -22
- package/src/supabase/database.types.ts +2880 -2719
- package/src/test-utils/fixtures/memberships.ts +82 -80
- package/src/platform/registry/domains.ts +0 -165
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest'
|
|
2
|
-
import {
|
|
2
|
+
import { PROJECTS_FEATURE_ID } from '../organization-model/published'
|
|
3
3
|
import {
|
|
4
4
|
getOrganizationSurface,
|
|
5
5
|
homeLabel,
|
|
@@ -13,95 +13,77 @@ describe('template core compatibility', () => {
|
|
|
13
13
|
expect(foundationOrganizationModel.navigation.quickAccessSurfaceIds).toEqual(quickAccessSurfaceIds)
|
|
14
14
|
expect(foundationOrganizationModel.version).toBe(1)
|
|
15
15
|
expect(foundationOrganizationModel.navigation.defaultSurfaceId).toBe('operations')
|
|
16
|
-
expect(getOrganizationSurface('operations')).toMatchObject({
|
|
17
|
-
id: 'operations',
|
|
18
|
-
label: 'Organization Graph',
|
|
19
|
-
path: '/operations',
|
|
20
|
-
surfaceType: 'graph'
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
it('projects legacy template aliases with canonical navigation metadata', () => {
|
|
16
|
+
expect(getOrganizationSurface('operations')).toMatchObject({
|
|
17
|
+
id: 'operations',
|
|
18
|
+
label: 'Organization Graph',
|
|
19
|
+
path: '/operations',
|
|
20
|
+
surfaceType: 'graph'
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
expect(getOrganizationSurface('operations.graph')).toMatchObject({
|
|
24
|
+
id: 'operations.graph',
|
|
25
|
+
label: 'Organization Graph',
|
|
26
|
+
path: '/operations',
|
|
27
|
+
surfaceType: 'graph'
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it('projects legacy template aliases with canonical navigation metadata', () => {
|
|
34
32
|
const legacySurfaces = [
|
|
35
33
|
{
|
|
36
|
-
id: 'operations',
|
|
37
|
-
label: 'Organization Graph',
|
|
38
|
-
surfaceType: 'graph',
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
expectedIcon: '
|
|
61
|
-
expectedPath: '/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
it('maps grouped core features onto the legacy template feature vocabulary', () => {
|
|
95
|
-
const features = foundationOrganizationModel.features as Array<{ id: string; label: string; enabled: boolean }>
|
|
96
|
-
const featureById = (id: string) => features.find((f) => f.id === id)
|
|
97
|
-
|
|
98
|
-
expect(featureById('crm')?.enabled).toBe(true)
|
|
99
|
-
expect(featureById('lead-gen')?.enabled).toBe(true)
|
|
100
|
-
expect(featureById('projects')?.enabled).toBe(true)
|
|
101
|
-
expect(featureById('operations')?.enabled).toBe(true)
|
|
102
|
-
|
|
103
|
-
expect(featureById('crm')?.label).toBe('CRM')
|
|
104
|
-
expect(featureById('lead-gen')?.label).toBe('Lead Gen')
|
|
105
|
-
expect(featureById('projects')?.label).toBe('Projects')
|
|
106
|
-
})
|
|
107
|
-
})
|
|
34
|
+
id: 'operations',
|
|
35
|
+
label: 'Organization Graph',
|
|
36
|
+
surfaceType: 'graph',
|
|
37
|
+
expectedIcon: 'operations',
|
|
38
|
+
expectedPath: '/operations',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: PROJECTS_FEATURE_ID,
|
|
42
|
+
label: 'Projects',
|
|
43
|
+
surfaceType: 'list',
|
|
44
|
+
expectedIcon: 'projects',
|
|
45
|
+
expectedPath: '/projects',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'lead-gen',
|
|
49
|
+
label: 'Lead Gen',
|
|
50
|
+
surfaceType: 'list',
|
|
51
|
+
expectedIcon: 'lead-gen',
|
|
52
|
+
expectedPath: '/lead-gen',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'crm',
|
|
56
|
+
label: 'CRM',
|
|
57
|
+
surfaceType: 'graph',
|
|
58
|
+
expectedIcon: 'crm',
|
|
59
|
+
expectedPath: '/crm',
|
|
60
|
+
}
|
|
61
|
+
] as const
|
|
62
|
+
|
|
63
|
+
expect(getOrganizationSurface('operations.graph')).toBeDefined()
|
|
64
|
+
|
|
65
|
+
for (const surface of legacySurfaces) {
|
|
66
|
+
expect(getOrganizationSurface(surface.id)).toMatchObject({
|
|
67
|
+
id: surface.id,
|
|
68
|
+
label: surface.label,
|
|
69
|
+
path: surface.expectedPath,
|
|
70
|
+
surfaceType: surface.surfaceType,
|
|
71
|
+
icon: surface.expectedIcon
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
it('maps grouped core features onto the legacy template feature vocabulary', () => {
|
|
77
|
+
const features = foundationOrganizationModel.features as Array<{ id: string; label: string; enabled: boolean }>
|
|
78
|
+
const featureById = (id: string) => features.find((f) => f.id === id)
|
|
79
|
+
|
|
80
|
+
expect(featureById('sales.crm')?.enabled).toBe(true)
|
|
81
|
+
expect(featureById('sales.lead-gen')?.enabled).toBe(true)
|
|
82
|
+
expect(featureById('projects')?.enabled).toBe(true)
|
|
83
|
+
expect(featureById('operations')?.enabled).toBe(true)
|
|
84
|
+
|
|
85
|
+
expect(featureById('sales.crm')?.label).toBe('CRM')
|
|
86
|
+
expect(featureById('sales.lead-gen')?.label).toBe('Lead Gen')
|
|
87
|
+
expect(featureById('projects')?.label).toBe('Projects')
|
|
88
|
+
})
|
|
89
|
+
})
|
|
@@ -45,22 +45,28 @@ export type OrganizationModelProjects = z.infer<typeof OrganizationModelProjects
|
|
|
45
45
|
export type OrganizationModelFeature = z.infer<typeof FeatureSchema>
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
### `
|
|
48
|
+
### `NodeIdPath`
|
|
49
49
|
|
|
50
50
|
```typescript
|
|
51
|
-
export type
|
|
51
|
+
export type NodeIdPath = z.infer<typeof NodeIdPathSchema>
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
### `
|
|
54
|
+
### `NodeIdString`
|
|
55
55
|
|
|
56
56
|
```typescript
|
|
57
|
-
export type
|
|
57
|
+
export type NodeIdString = z.infer<typeof NodeIdStringSchema>
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
### `
|
|
60
|
+
### `OrganizationModelNavigation`
|
|
61
61
|
|
|
62
62
|
```typescript
|
|
63
|
-
export type
|
|
63
|
+
export type OrganizationModelNavigation = z.infer<typeof OrganizationModelNavigationSchema>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `OrganizationModelSurface`
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
export type OrganizationModelSurface = z.infer<typeof SurfaceDefinitionSchema>
|
|
64
70
|
```
|
|
65
71
|
|
|
66
72
|
### `OrganizationModelTechStackEntry`
|
|
@@ -179,64 +185,42 @@ export type DeepPartial<T> = T extends Array<infer U> ? Array<DeepPartial<U>> :
|
|
|
179
185
|
|
|
180
186
|
## Feature System
|
|
181
187
|
|
|
182
|
-
### `
|
|
188
|
+
### `FeatureSidebarComponent`
|
|
183
189
|
|
|
184
190
|
```typescript
|
|
185
|
-
export
|
|
186
|
-
|
|
187
|
-
link: string
|
|
188
|
-
featureKey?: string
|
|
189
|
-
onClick?: () => void
|
|
190
|
-
links?: FeatureNavLink[]
|
|
191
|
-
}
|
|
191
|
+
export type FeatureSidebarComponent = ComponentType
|
|
192
|
+
export type FeatureIconComponent = ComponentType<{ size?: number;
|
|
192
193
|
```
|
|
193
194
|
|
|
194
|
-
### `
|
|
195
|
+
### `FeatureIconComponent`
|
|
195
196
|
|
|
196
197
|
```typescript
|
|
197
|
-
export
|
|
198
|
-
label: string
|
|
199
|
-
icon: ComponentType
|
|
200
|
-
link?: string
|
|
201
|
-
featureKey?: string
|
|
202
|
-
requiresAdmin?: boolean
|
|
203
|
-
dataOnboardingTourId?: string
|
|
204
|
-
links?: FeatureNavLink[]
|
|
205
|
-
}
|
|
198
|
+
export type FeatureIconComponent = ComponentType<{ size?: number;
|
|
206
199
|
```
|
|
207
200
|
|
|
208
|
-
### `
|
|
201
|
+
### `FeatureSidebarWidthResolver`
|
|
209
202
|
|
|
210
203
|
```typescript
|
|
211
|
-
export type
|
|
204
|
+
export type FeatureSidebarWidthResolver = number | ((context: { currentPath: string }) => number)
|
|
212
205
|
```
|
|
213
206
|
|
|
214
207
|
### `FeatureModule`
|
|
215
208
|
|
|
216
209
|
```typescript
|
|
217
210
|
export interface FeatureModule {
|
|
218
|
-
/** Unique stable identifier for this feature
|
|
211
|
+
/** Unique stable identifier for this feature module. */
|
|
219
212
|
key: string
|
|
220
|
-
/**
|
|
213
|
+
/** Organization Model feature id this module presents. */
|
|
221
214
|
featureId: string
|
|
222
|
-
/**
|
|
223
|
-
* Capability identifiers contributed by this feature.
|
|
224
|
-
* Merged into `ResolvedFeatureSemantics.capabilityIds` at resolution time.
|
|
225
|
-
* Not queried at runtime — kept for semantic graph completeness so that
|
|
226
|
-
* capability membership is fully represented in the resolved model even when
|
|
227
|
-
* a surface does not declare it directly.
|
|
228
|
-
*/
|
|
215
|
+
/** Capability identifiers contributed by this feature module. */
|
|
229
216
|
capabilityIds?: string[]
|
|
230
|
-
/**
|
|
231
|
-
|
|
232
|
-
/** Sidebar component rendered when
|
|
217
|
+
/** Icon used when this feature node appears in shell navigation. */
|
|
218
|
+
icon?: FeatureIconComponent
|
|
219
|
+
/** Sidebar component rendered when this feature's subtree route is active. */
|
|
233
220
|
sidebar?: FeatureSidebarComponent
|
|
234
|
-
/**
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Operations-only bridge surface connecting this feature to the organization graph.
|
|
238
|
-
* Ignored by all other features. Only one manifest in the registry should set this.
|
|
239
|
-
*/
|
|
221
|
+
/** Optional shell sidebar width override. Defaults to 250px. */
|
|
222
|
+
sidebarWidth?: FeatureSidebarWidthResolver
|
|
223
|
+
/** Operations-only bridge connecting this feature to the organization graph node. */
|
|
240
224
|
organizationGraph?: OrganizationGraphFeatureBridge
|
|
241
225
|
}
|
|
242
226
|
```
|
|
@@ -255,8 +239,6 @@ export interface ResolvedFeatureAccess {
|
|
|
255
239
|
```typescript
|
|
256
240
|
export interface ResolvedFeatureSemantics {
|
|
257
241
|
capabilityIds: string[]
|
|
258
|
-
surfaceIds: string[]
|
|
259
|
-
surfaces: OrganizationModelSurface[]
|
|
260
242
|
}
|
|
261
243
|
```
|
|
262
244
|
|
|
@@ -269,25 +251,11 @@ export interface ResolvedFeatureModule extends FeatureModule {
|
|
|
269
251
|
}
|
|
270
252
|
```
|
|
271
253
|
|
|
272
|
-
### `
|
|
273
|
-
|
|
274
|
-
```typescript
|
|
275
|
-
export type ShellNavPlacement = 'primary' | 'bottom'
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### `ShellNavSource`
|
|
279
|
-
|
|
280
|
-
```typescript
|
|
281
|
-
export type ShellNavSource = 'app' | 'feature'
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### `ResolvedShellNavItem`
|
|
254
|
+
### `ResolvedShellFeature`
|
|
285
255
|
|
|
286
256
|
```typescript
|
|
287
|
-
export interface
|
|
288
|
-
|
|
289
|
-
source: ShellNavSource
|
|
290
|
-
featureId?: string
|
|
257
|
+
export interface ResolvedShellFeature extends OrganizationModelFeature {
|
|
258
|
+
iconComponent?: FeatureIconComponent
|
|
291
259
|
}
|
|
292
260
|
```
|
|
293
261
|
|
|
@@ -295,16 +263,16 @@ export interface ResolvedShellNavItem extends FeatureNavEntry {
|
|
|
295
263
|
|
|
296
264
|
```typescript
|
|
297
265
|
export interface ResolvedShellModel {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
266
|
+
features: readonly ResolvedShellFeature[]
|
|
267
|
+
findByPath: (path: string) => ResolvedShellFeature | undefined
|
|
268
|
+
findById: (id: string) => ResolvedShellFeature | undefined
|
|
269
|
+
childrenOf: (id: string) => ResolvedShellFeature[]
|
|
270
|
+
ancestorsOf: (id: string) => ResolvedShellFeature[]
|
|
271
|
+
parentOf: (id: string) => ResolvedShellFeature | undefined
|
|
272
|
+
topLevel: () => ResolvedShellFeature[]
|
|
273
|
+
uiPositionFor: (id: string) => OrganizationModelFeature['uiPosition'] | undefined
|
|
274
|
+
requiresAdminFor: (id: string) => boolean
|
|
275
|
+
devOnlyFor: (id: string) => boolean
|
|
308
276
|
}
|
|
309
277
|
```
|
|
310
278
|
|
|
@@ -321,8 +289,7 @@ export interface ResolvedShellRouteMatch {
|
|
|
321
289
|
status: ShellRouteMatchStatus
|
|
322
290
|
path: string
|
|
323
291
|
feature?: ResolvedFeatureModule
|
|
324
|
-
|
|
325
|
-
navLink?: FeatureNavLink
|
|
292
|
+
node?: ResolvedShellFeature
|
|
326
293
|
}
|
|
327
294
|
```
|
|
328
295
|
|
|
@@ -338,7 +305,7 @@ export interface ShellRuntime {
|
|
|
338
305
|
|
|
339
306
|
```typescript
|
|
340
307
|
export interface OrganizationGraphFeatureBridge {
|
|
341
|
-
|
|
308
|
+
featureId: string
|
|
342
309
|
}
|
|
343
310
|
```
|
|
344
311
|
|
|
@@ -347,10 +314,8 @@ export interface OrganizationGraphFeatureBridge {
|
|
|
347
314
|
```typescript
|
|
348
315
|
export interface OrganizationGraphContextValue {
|
|
349
316
|
available: boolean
|
|
350
|
-
surfaceId?: string
|
|
351
|
-
surfacePath?: string
|
|
352
|
-
surfaceType?: OrganizationModelSurface['surfaceType']
|
|
353
317
|
featureId?: string
|
|
318
|
+
featurePath?: string
|
|
354
319
|
}
|
|
355
320
|
```
|
|
356
321
|
|
|
@@ -360,7 +325,6 @@ export interface OrganizationGraphContextValue {
|
|
|
360
325
|
export interface ElevasisFeaturesProviderProps {
|
|
361
326
|
features: FeatureModule[]
|
|
362
327
|
organizationModel?: OrganizationModel
|
|
363
|
-
appShellOverrides?: AppShellOverrides
|
|
364
328
|
timeRange?: TimeRange
|
|
365
329
|
operationsApiUrl?: string
|
|
366
330
|
operationsSSEManager?: SSEConnectionManagerLike
|
|
@@ -401,8 +365,8 @@ export interface ElevasisFeaturesContextValue {
|
|
|
401
365
|
* Resource Registry type definitions
|
|
402
366
|
*/
|
|
403
367
|
|
|
404
|
-
import type { IntegrationType } from '../../execution/engine/tools/integration'
|
|
405
|
-
import type {
|
|
368
|
+
import type { IntegrationType } from '../../execution/engine/tools/integration'
|
|
369
|
+
import type { ResourceCategory, ResourceLink } from './resource-link'
|
|
406
370
|
|
|
407
371
|
// ============================================================================
|
|
408
372
|
// Core Resource Type Definitions
|
|
@@ -479,8 +443,11 @@ export interface ResourceDefinition {
|
|
|
479
443
|
/** Environment/deployment status */
|
|
480
444
|
status: ResourceStatus
|
|
481
445
|
|
|
482
|
-
/**
|
|
483
|
-
|
|
446
|
+
/** Graph links to Organization Model nodes */
|
|
447
|
+
links?: ResourceLink[]
|
|
448
|
+
|
|
449
|
+
/** Infrastructure category for filtering */
|
|
450
|
+
category?: ResourceCategory
|
|
484
451
|
|
|
485
452
|
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
486
453
|
sessionCapable?: boolean
|
|
@@ -493,7 +460,7 @@ export interface ResourceDefinition {
|
|
|
493
460
|
}
|
|
494
461
|
```
|
|
495
462
|
|
|
496
|
-
### `
|
|
463
|
+
### `ResourceList`
|
|
497
464
|
|
|
498
465
|
```typescript
|
|
499
466
|
/** Unique resource identifier */
|
|
@@ -514,8 +481,11 @@ export interface ResourceDefinition {
|
|
|
514
481
|
/** Environment/deployment status */
|
|
515
482
|
status: ResourceStatus
|
|
516
483
|
|
|
517
|
-
/**
|
|
518
|
-
|
|
484
|
+
/** Graph links to Organization Model nodes */
|
|
485
|
+
links?: ResourceLink[]
|
|
486
|
+
|
|
487
|
+
/** Infrastructure category for filtering */
|
|
488
|
+
category?: ResourceCategory
|
|
519
489
|
|
|
520
490
|
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
521
491
|
sessionCapable?: boolean
|
|
@@ -527,57 +497,9 @@ export interface ResourceDefinition {
|
|
|
527
497
|
archived?: boolean
|
|
528
498
|
}
|
|
529
499
|
|
|
530
|
-
|
|
531
|
-
|
|
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
|
-
* }
|
|
548
|
-
*/
|
|
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
|
|
560
|
-
}
|
|
561
|
-
```
|
|
562
|
-
|
|
563
|
-
### `ResourceList`
|
|
564
|
-
|
|
565
|
-
```typescript
|
|
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)
|
|
500
|
+
/**
|
|
501
|
+
* Resource list for organization
|
|
502
|
+
* Returns ResourceDefinition metadata (not full definitions)
|
|
581
503
|
*/
|
|
582
504
|
export interface ResourceList {
|
|
583
505
|
workflows: ResourceDefinition[]
|
|
@@ -676,7 +598,7 @@ export type TriggerConfig = WebhookTriggerConfig | ScheduleTriggerConfig | Event
|
|
|
676
598
|
* scheduled cron jobs, platform events, or manual user actions.
|
|
677
599
|
*
|
|
678
600
|
* BREAKING CHANGES (2025-11-30):
|
|
679
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status,
|
|
601
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
680
602
|
* - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
|
|
681
603
|
* - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
|
|
682
604
|
* - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
|
|
@@ -712,7 +634,7 @@ export type TriggerConfig = WebhookTriggerConfig | ScheduleTriggerConfig | Event
|
|
|
712
634
|
* scheduled cron jobs, platform events, or manual user actions.
|
|
713
635
|
*
|
|
714
636
|
* BREAKING CHANGES (2025-11-30):
|
|
715
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status,
|
|
637
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
716
638
|
* - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
|
|
717
639
|
* - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
|
|
718
640
|
* - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
|
|
@@ -790,7 +712,7 @@ export interface TriggerDefinition extends ResourceDefinition {
|
|
|
790
712
|
* stored here (queried at runtime from credentials table).
|
|
791
713
|
*
|
|
792
714
|
* BREAKING CHANGES (2025-11-30):
|
|
793
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status,
|
|
715
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
794
716
|
* - Field renames: `id` -> `resourceId` (inherited)
|
|
795
717
|
* - New required field: `status` (inherited) - organizations must add status to all integrations
|
|
796
718
|
* - New required field: `version` (inherited) - organizations must add version to all integrations
|
|
@@ -919,7 +841,7 @@ export type ExternalPlatform = 'n8n' | 'make' | 'zapier' | 'other'
|
|
|
919
841
|
* no API integration with external platforms, no status syncing.
|
|
920
842
|
*
|
|
921
843
|
* BREAKING CHANGES (2025-11-30):
|
|
922
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status,
|
|
844
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
923
845
|
* - Field renames: `id` -> `resourceId` (inherited)
|
|
924
846
|
* - New required field: `version` (inherited) - organizations must add version to all external resources
|
|
925
847
|
* - New required field: `type: 'external'` (inherited) - resource type discriminator
|
|
@@ -954,7 +876,7 @@ export type ExternalPlatform = 'n8n' | 'make' | 'zapier' | 'other'
|
|
|
954
876
|
* no API integration with external platforms, no status syncing.
|
|
955
877
|
*
|
|
956
878
|
* BREAKING CHANGES (2025-11-30):
|
|
957
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status,
|
|
879
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
958
880
|
* - Field renames: `id` -> `resourceId` (inherited)
|
|
959
881
|
* - New required field: `version` (inherited) - organizations must add version to all external resources
|
|
960
882
|
* - New required field: `type: 'external'` (inherited) - resource type discriminator
|
|
@@ -1048,7 +970,7 @@ export interface ExternalResourceDefinition extends ResourceDefinition {
|
|
|
1048
970
|
* Tasks with matching command_queue_group are routed to this checkpoint.
|
|
1049
971
|
*
|
|
1050
972
|
* BREAKING CHANGES (2025-11-30):
|
|
1051
|
-
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status,
|
|
973
|
+
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
1052
974
|
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1053
975
|
* - description is now REQUIRED (was optional) - organizations must add description to all human checkpoints
|
|
1054
976
|
* - New required field: `version` (inherited) - organizations must add version to all human checkpoints
|
|
@@ -1093,44 +1015,34 @@ export interface HumanCheckpointDefinition extends ResourceDefinition {
|
|
|
1093
1015
|
### `DeploymentSpec`
|
|
1094
1016
|
|
|
1095
1017
|
```typescript
|
|
1096
|
-
/**
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
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.
|
|
1018
|
+
/** Always undefined for system resources; present for API compatibility with RemoteOrgConfig consumers */
|
|
1019
|
+
sdkVersion?: never
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Organization-specific resource collection
|
|
1024
|
+
*
|
|
1025
|
+
* Complete manifest of all automation resources for an organization.
|
|
1026
|
+
* Used by ResourceRegistry for discovery and Command View for visualization.
|
|
1115
1027
|
*/
|
|
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[]
|
|
1028
|
+
export interface DeploymentSpec {
|
|
1029
|
+
/** Deployment version (semver) */
|
|
1030
|
+
version: string
|
|
1031
|
+
/** Workflow definitions */
|
|
1032
|
+
workflows?: WorkflowDefinition[]
|
|
1033
|
+
/** Agent definitions */
|
|
1034
|
+
agents?: AgentDefinition[]
|
|
1035
|
+
|
|
1036
|
+
// Resource Manifest fields (optional for backwards compatibility)
|
|
1037
|
+
/** Trigger definitions - entry points that initiate executions */
|
|
1038
|
+
triggers?: TriggerDefinition[]
|
|
1039
|
+
/** Integration definitions - external service connections */
|
|
1040
|
+
integrations?: IntegrationDefinition[]
|
|
1041
|
+
/** Explicit relationship declarations between resources */
|
|
1042
|
+
relationships?: ResourceRelationships
|
|
1043
|
+
/** External automation resources (n8n, Make, Zapier, etc.) */
|
|
1044
|
+
externalResources?: ExternalResourceDefinition[]
|
|
1045
|
+
/** Human checkpoint definitions - human decision points in automation */
|
|
1046
|
+
humanCheckpoints?: HumanCheckpointDefinition[]
|
|
1135
1047
|
}
|
|
1136
1048
|
```
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
// Config types
|
|
2
|
-
export * from './types'
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
export * from './
|
|
6
|
-
|
|
7
|
-
//
|
|
8
|
-
export * from './
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
export * from './
|
|
12
|
-
|
|
13
|
-
//
|
|
14
|
-
export * from './
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
export * from './
|
|
1
|
+
// Config types
|
|
2
|
+
export * from './types'
|
|
3
|
+
|
|
4
|
+
// Permission catalog (canonical PERMISSIONS constant + types)
|
|
5
|
+
export * from './permissions'
|
|
6
|
+
|
|
7
|
+
// Organization types
|
|
8
|
+
export * from './organizations/index'
|
|
9
|
+
|
|
10
|
+
// User types
|
|
11
|
+
export * from './users/index'
|
|
12
|
+
|
|
13
|
+
// Membership types
|
|
14
|
+
export * from './memberships/index'
|
|
15
|
+
|
|
16
|
+
// Invitation types
|
|
17
|
+
export * from './invitations/index'
|
|
18
|
+
|
|
19
|
+
// Credentials types
|
|
20
|
+
export * from './credentials/index'
|