@elevasis/sdk 1.10.0 → 1.12.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 +52 -149
- package/dist/index.d.ts +468 -198
- package/dist/index.js +225 -147
- package/dist/test-utils/index.d.ts +272 -99
- package/dist/test-utils/index.js +4756 -125
- package/dist/types/worker/adapters/llm.d.ts +1 -1
- package/dist/worker/index.js +14 -6
- package/package.json +2 -2
- package/reference/claude-config/rules/agent-start-here.md +14 -14
- package/reference/claude-config/skills/configure/SKILL.md +3 -3
- package/reference/claude-config/skills/setup/SKILL.md +6 -6
- package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -0
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +101 -0
- package/reference/cli.mdx +57 -0
- package/reference/deployment/provided-features.mdx +40 -267
- package/reference/examples/organization-model.ts +99 -564
- package/reference/packages/core/src/organization-model/README.md +102 -97
- package/reference/resources/types.mdx +72 -163
- package/reference/scaffold/core/organization-graph.mdx +92 -272
- package/reference/scaffold/core/organization-model.mdx +155 -320
- package/reference/scaffold/index.mdx +3 -0
- package/reference/scaffold/operations/propagation-pipeline.md +4 -1
- package/reference/scaffold/operations/scaffold-maintenance.md +3 -0
- package/reference/scaffold/operations/workflow-recipes.md +13 -10
- package/reference/scaffold/recipes/add-a-feature.md +105 -158
- package/reference/scaffold/recipes/add-a-resource.md +88 -158
- package/reference/scaffold/recipes/customize-organization-model.md +144 -400
- package/reference/scaffold/recipes/extend-a-base-entity.md +11 -8
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +117 -158
- package/reference/scaffold/recipes/index.md +3 -0
- package/reference/scaffold/reference/contracts.md +107 -435
- package/reference/scaffold/reference/feature-registry.md +11 -8
- package/reference/scaffold/reference/glossary.md +74 -105
- package/reference/scaffold/ui/composition-extensibility.mdx +3 -0
- package/reference/scaffold/ui/customization.md +3 -0
- package/reference/scaffold/ui/feature-flags-and-gating.md +29 -231
- package/reference/scaffold/ui/feature-shell.mdx +53 -219
- package/reference/scaffold/ui/recipes.md +65 -397
- package/reference/claude-config/logs/pre-edit-vibe-gate.log +0 -40
- package/reference/claude-config/logs/scaffold-registry-reminder.log +0 -38
package/dist/cli.cjs
CHANGED
|
@@ -36610,126 +36610,6 @@ var DateRangeSchema = external_exports.object({
|
|
|
36610
36610
|
endDate: external_exports.string().datetime()
|
|
36611
36611
|
});
|
|
36612
36612
|
|
|
36613
|
-
// ../core/src/platform/registry/domains.ts
|
|
36614
|
-
var DOMAINS = {
|
|
36615
|
-
// Business domains
|
|
36616
|
-
INBOUND_PIPELINE: "inbound-pipeline",
|
|
36617
|
-
LEAD_GEN_PIPELINE: "lead-gen-pipeline",
|
|
36618
|
-
SUPPORT: "support",
|
|
36619
|
-
CLIENT_SUPPORT: "client-support",
|
|
36620
|
-
DELIVERY: "delivery",
|
|
36621
|
-
OPERATIONS: "operations",
|
|
36622
|
-
FINANCE: "finance",
|
|
36623
|
-
EXECUTIVE: "executive",
|
|
36624
|
-
INSTANTLY: "instantly",
|
|
36625
|
-
// Technical domains
|
|
36626
|
-
TESTING: "testing",
|
|
36627
|
-
INTERNAL: "internal",
|
|
36628
|
-
INTEGRATION: "integration",
|
|
36629
|
-
UTILITY: "utility",
|
|
36630
|
-
DIAGNOSTIC: "diagnostic"
|
|
36631
|
-
};
|
|
36632
|
-
var INBOUND_PIPELINE_DOMAIN = {
|
|
36633
|
-
id: DOMAINS.INBOUND_PIPELINE,
|
|
36634
|
-
name: "Inbound Pipeline",
|
|
36635
|
-
description: "End-to-end inbound client acquisition from first reply to onboarding",
|
|
36636
|
-
color: "blue"
|
|
36637
|
-
};
|
|
36638
|
-
var LEAD_GEN_PIPELINE_DOMAIN = {
|
|
36639
|
-
id: DOMAINS.LEAD_GEN_PIPELINE,
|
|
36640
|
-
name: "Lead Gen Pipeline",
|
|
36641
|
-
description: "Lead scraping, enrichment, qualification, and personalization",
|
|
36642
|
-
color: "cyan"
|
|
36643
|
-
};
|
|
36644
|
-
var SUPPORT_DOMAIN = {
|
|
36645
|
-
id: DOMAINS.SUPPORT,
|
|
36646
|
-
name: "Customer Support",
|
|
36647
|
-
description: "Ticket triage, knowledge base, escalations",
|
|
36648
|
-
color: "green"
|
|
36649
|
-
};
|
|
36650
|
-
var CLIENT_SUPPORT_DOMAIN = {
|
|
36651
|
-
id: DOMAINS.CLIENT_SUPPORT,
|
|
36652
|
-
name: "Client Support",
|
|
36653
|
-
description: "Client change requests, bug reports, and feature requests",
|
|
36654
|
-
color: "teal"
|
|
36655
|
-
};
|
|
36656
|
-
var DELIVERY_DOMAIN = {
|
|
36657
|
-
id: DOMAINS.DELIVERY,
|
|
36658
|
-
name: "Client Delivery",
|
|
36659
|
-
description: "Project execution and milestone tracking",
|
|
36660
|
-
color: "orange"
|
|
36661
|
-
};
|
|
36662
|
-
var OPERATIONS_DOMAIN = {
|
|
36663
|
-
id: DOMAINS.OPERATIONS,
|
|
36664
|
-
name: "Operations",
|
|
36665
|
-
description: "Internal business operations and administration",
|
|
36666
|
-
color: "violet"
|
|
36667
|
-
};
|
|
36668
|
-
var FINANCE_DOMAIN = {
|
|
36669
|
-
id: DOMAINS.FINANCE,
|
|
36670
|
-
name: "Finance",
|
|
36671
|
-
description: "Billing, invoicing, and financial operations",
|
|
36672
|
-
color: "pink"
|
|
36673
|
-
};
|
|
36674
|
-
var EXECUTIVE_DOMAIN = {
|
|
36675
|
-
id: DOMAINS.EXECUTIVE,
|
|
36676
|
-
name: "Executive Operations",
|
|
36677
|
-
description: "High-level business orchestration and decision-making",
|
|
36678
|
-
color: "indigo"
|
|
36679
|
-
};
|
|
36680
|
-
var TESTING_DOMAIN = {
|
|
36681
|
-
id: DOMAINS.TESTING,
|
|
36682
|
-
name: "Testing",
|
|
36683
|
-
description: "Test resources and development workflows",
|
|
36684
|
-
color: "gray"
|
|
36685
|
-
};
|
|
36686
|
-
var INTERNAL_DOMAIN = {
|
|
36687
|
-
id: DOMAINS.INTERNAL,
|
|
36688
|
-
name: "Internal",
|
|
36689
|
-
description: "Internal platform resources",
|
|
36690
|
-
color: "dark"
|
|
36691
|
-
};
|
|
36692
|
-
var INTEGRATION_DOMAIN = {
|
|
36693
|
-
id: DOMAINS.INTEGRATION,
|
|
36694
|
-
name: "Integration",
|
|
36695
|
-
description: "External service integrations",
|
|
36696
|
-
color: "teal"
|
|
36697
|
-
};
|
|
36698
|
-
var INSTANTLY_DOMAIN = {
|
|
36699
|
-
id: DOMAINS.INSTANTLY,
|
|
36700
|
-
name: "Instantly Toolkit",
|
|
36701
|
-
description: "Instantly campaign creation, analytics, and optimization",
|
|
36702
|
-
color: "lime"
|
|
36703
|
-
};
|
|
36704
|
-
var UTILITY_DOMAIN = {
|
|
36705
|
-
id: DOMAINS.UTILITY,
|
|
36706
|
-
name: "Utility",
|
|
36707
|
-
description: "Utility workflows for maintenance and diagnostics",
|
|
36708
|
-
color: "grape"
|
|
36709
|
-
};
|
|
36710
|
-
var DIAGNOSTIC_DOMAIN = {
|
|
36711
|
-
id: DOMAINS.DIAGNOSTIC,
|
|
36712
|
-
name: "Diagnostic",
|
|
36713
|
-
description: "Diagnostic workflows for testing integrations and services",
|
|
36714
|
-
color: "yellow"
|
|
36715
|
-
};
|
|
36716
|
-
var DOMAIN_MAP = {
|
|
36717
|
-
[DOMAINS.INBOUND_PIPELINE]: INBOUND_PIPELINE_DOMAIN,
|
|
36718
|
-
[DOMAINS.LEAD_GEN_PIPELINE]: LEAD_GEN_PIPELINE_DOMAIN,
|
|
36719
|
-
[DOMAINS.SUPPORT]: SUPPORT_DOMAIN,
|
|
36720
|
-
[DOMAINS.CLIENT_SUPPORT]: CLIENT_SUPPORT_DOMAIN,
|
|
36721
|
-
[DOMAINS.DELIVERY]: DELIVERY_DOMAIN,
|
|
36722
|
-
[DOMAINS.OPERATIONS]: OPERATIONS_DOMAIN,
|
|
36723
|
-
[DOMAINS.FINANCE]: FINANCE_DOMAIN,
|
|
36724
|
-
[DOMAINS.EXECUTIVE]: EXECUTIVE_DOMAIN,
|
|
36725
|
-
[DOMAINS.TESTING]: TESTING_DOMAIN,
|
|
36726
|
-
[DOMAINS.INTERNAL]: INTERNAL_DOMAIN,
|
|
36727
|
-
[DOMAINS.INSTANTLY]: INSTANTLY_DOMAIN,
|
|
36728
|
-
[DOMAINS.INTEGRATION]: INTEGRATION_DOMAIN,
|
|
36729
|
-
[DOMAINS.UTILITY]: UTILITY_DOMAIN,
|
|
36730
|
-
[DOMAINS.DIAGNOSTIC]: DIAGNOSTIC_DOMAIN
|
|
36731
|
-
};
|
|
36732
|
-
|
|
36733
36613
|
// ../core/src/platform/registry/reserved.ts
|
|
36734
36614
|
var RESERVED_RESOURCE_IDS = /* @__PURE__ */ new Set(["command-center-assistant"]);
|
|
36735
36615
|
var SYSTEM_RESOURCE_IDS = Array.from(RESERVED_RESOURCE_IDS);
|
|
@@ -39570,16 +39450,6 @@ function serializeAllOrganizations(registry2) {
|
|
|
39570
39450
|
}
|
|
39571
39451
|
return cache;
|
|
39572
39452
|
}
|
|
39573
|
-
function deriveDomainDefinitions(resources) {
|
|
39574
|
-
const domainIds = /* @__PURE__ */ new Set();
|
|
39575
|
-
resources.workflows?.forEach((w) => w.config.domains?.forEach((d) => domainIds.add(d)));
|
|
39576
|
-
resources.agents?.forEach((a) => a.config.domains?.forEach((d) => domainIds.add(d)));
|
|
39577
|
-
resources.triggers?.forEach((t) => t.domains?.forEach((d) => domainIds.add(d)));
|
|
39578
|
-
resources.integrations?.forEach((i) => i.domains?.forEach((d) => domainIds.add(d)));
|
|
39579
|
-
resources.externalResources?.forEach((e) => e.domains?.forEach((d) => domainIds.add(d)));
|
|
39580
|
-
resources.humanCheckpoints?.forEach((h) => h.domains?.forEach((d) => domainIds.add(d)));
|
|
39581
|
-
return Array.from(domainIds).map((id) => DOMAIN_MAP[id]);
|
|
39582
|
-
}
|
|
39583
39453
|
function serializeOrganization(resources) {
|
|
39584
39454
|
const workflowDefinitions = /* @__PURE__ */ new Map();
|
|
39585
39455
|
const workflowResources = [];
|
|
@@ -39594,7 +39464,9 @@ function serializeOrganization(resources) {
|
|
|
39594
39464
|
description: workflow.config.description,
|
|
39595
39465
|
version: workflow.config.version,
|
|
39596
39466
|
type: "workflow",
|
|
39597
|
-
status: workflow.config.status
|
|
39467
|
+
status: workflow.config.status,
|
|
39468
|
+
links: workflow.config.links,
|
|
39469
|
+
category: workflow.config.category
|
|
39598
39470
|
});
|
|
39599
39471
|
commandViewWorkflows.push({
|
|
39600
39472
|
resourceId,
|
|
@@ -39603,7 +39475,8 @@ function serializeOrganization(resources) {
|
|
|
39603
39475
|
version: workflow.config.version,
|
|
39604
39476
|
type: "workflow",
|
|
39605
39477
|
status: workflow.config.status,
|
|
39606
|
-
|
|
39478
|
+
links: workflow.config.links,
|
|
39479
|
+
category: workflow.config.category,
|
|
39607
39480
|
stepCount: Object.keys(workflow.steps).length,
|
|
39608
39481
|
entryPoint: workflow.entryPoint
|
|
39609
39482
|
});
|
|
@@ -39621,7 +39494,9 @@ function serializeOrganization(resources) {
|
|
|
39621
39494
|
description: agent.config.description,
|
|
39622
39495
|
version: agent.config.version,
|
|
39623
39496
|
type: "agent",
|
|
39624
|
-
status: agent.config.status
|
|
39497
|
+
status: agent.config.status,
|
|
39498
|
+
links: agent.config.links,
|
|
39499
|
+
category: agent.config.category
|
|
39625
39500
|
});
|
|
39626
39501
|
commandViewAgents.push({
|
|
39627
39502
|
resourceId,
|
|
@@ -39630,7 +39505,8 @@ function serializeOrganization(resources) {
|
|
|
39630
39505
|
version: agent.config.version,
|
|
39631
39506
|
type: "agent",
|
|
39632
39507
|
status: agent.config.status,
|
|
39633
|
-
|
|
39508
|
+
links: agent.config.links,
|
|
39509
|
+
category: agent.config.category,
|
|
39634
39510
|
modelProvider: agent.modelConfig.provider,
|
|
39635
39511
|
modelId: agent.modelConfig.model,
|
|
39636
39512
|
toolCount: agent.tools.length,
|
|
@@ -39644,7 +39520,6 @@ function serializeOrganization(resources) {
|
|
|
39644
39520
|
const integrations = resources.integrations ?? [];
|
|
39645
39521
|
const externalResources = resources.externalResources ?? [];
|
|
39646
39522
|
const humanCheckpoints = resources.humanCheckpoints ?? [];
|
|
39647
|
-
const domainDefinitions = deriveDomainDefinitions(resources);
|
|
39648
39523
|
return {
|
|
39649
39524
|
version: resources.version,
|
|
39650
39525
|
resources: {
|
|
@@ -39663,8 +39538,7 @@ function serializeOrganization(resources) {
|
|
|
39663
39538
|
integrations,
|
|
39664
39539
|
externalResources,
|
|
39665
39540
|
humanCheckpoints,
|
|
39666
|
-
edges
|
|
39667
|
-
domainDefinitions
|
|
39541
|
+
edges
|
|
39668
39542
|
},
|
|
39669
39543
|
triggers,
|
|
39670
39544
|
integrations,
|
|
@@ -39796,6 +39670,12 @@ var ResourceRegistry = class {
|
|
|
39796
39670
|
* Static and remote resources coexist in the same org.
|
|
39797
39671
|
*/
|
|
39798
39672
|
remoteResources = /* @__PURE__ */ new Map();
|
|
39673
|
+
/**
|
|
39674
|
+
* System configs for first-class platform resources.
|
|
39675
|
+
* Key: "orgName/resourceId", Value: SystemConfig.
|
|
39676
|
+
* Registered at startup alongside registerStaticResources().
|
|
39677
|
+
*/
|
|
39678
|
+
systemConfigs = /* @__PURE__ */ new Map();
|
|
39799
39679
|
/**
|
|
39800
39680
|
* Validates registry on construction
|
|
39801
39681
|
* - Checks for duplicate resourceIds within organizations
|
|
@@ -39843,7 +39723,9 @@ var ResourceRegistry = class {
|
|
|
39843
39723
|
if (!existingOrg) return void 0;
|
|
39844
39724
|
const remoteIds = this.getRemoteResourceIds(orgName);
|
|
39845
39725
|
if (remoteIds.size === 0) return existingOrg;
|
|
39846
|
-
const relationships = existingOrg.relationships ? Object.fromEntries(
|
|
39726
|
+
const relationships = existingOrg.relationships ? Object.fromEntries(
|
|
39727
|
+
Object.entries(existingOrg.relationships).filter(([resourceId]) => !remoteIds.has(resourceId))
|
|
39728
|
+
) : void 0;
|
|
39847
39729
|
return {
|
|
39848
39730
|
...existingOrg,
|
|
39849
39731
|
version: existingOrg.version ?? "0.0.0",
|
|
@@ -39922,7 +39804,8 @@ var ResourceRegistry = class {
|
|
|
39922
39804
|
version: def.config.version,
|
|
39923
39805
|
type: def.config.type,
|
|
39924
39806
|
status: def.config.status,
|
|
39925
|
-
|
|
39807
|
+
links: def.config.links,
|
|
39808
|
+
category: def.config.category,
|
|
39926
39809
|
origin: this.remoteResources.has(`${organizationName}/${def.config.resourceId}`) ? "remote" : "local"
|
|
39927
39810
|
})).filter((resource) => !environment || resource.status === environment);
|
|
39928
39811
|
const agents = (orgResources.agents || []).map((def) => ({
|
|
@@ -39932,7 +39815,8 @@ var ResourceRegistry = class {
|
|
|
39932
39815
|
version: def.config.version,
|
|
39933
39816
|
type: def.config.type,
|
|
39934
39817
|
status: def.config.status,
|
|
39935
|
-
|
|
39818
|
+
links: def.config.links,
|
|
39819
|
+
category: def.config.category,
|
|
39936
39820
|
sessionCapable: def.config.sessionCapable ?? false,
|
|
39937
39821
|
origin: this.remoteResources.has(`${organizationName}/${def.config.resourceId}`) ? "remote" : "local"
|
|
39938
39822
|
})).filter((resource) => !environment || resource.status === environment);
|
|
@@ -40151,18 +40035,33 @@ var ResourceRegistry = class {
|
|
|
40151
40035
|
}
|
|
40152
40036
|
}
|
|
40153
40037
|
/**
|
|
40154
|
-
* Get remote configuration for a specific resource
|
|
40038
|
+
* Get remote configuration for a specific resource.
|
|
40155
40039
|
*
|
|
40156
|
-
* Returns
|
|
40157
|
-
* or null
|
|
40158
|
-
* Used by the execution coordinator to
|
|
40040
|
+
* Returns RemoteOrgConfig for externally-deployed resources, SystemConfig for
|
|
40041
|
+
* first-class platform resources, or null for static in-process resources.
|
|
40042
|
+
* Used by the execution coordinator to determine the execution path.
|
|
40159
40043
|
*
|
|
40160
40044
|
* @param orgName - Organization name
|
|
40161
40045
|
* @param resourceId - Resource ID
|
|
40162
|
-
* @returns Remote config or null
|
|
40046
|
+
* @returns Remote or System config, or null
|
|
40163
40047
|
*/
|
|
40164
40048
|
getRemoteConfig(orgName, resourceId) {
|
|
40165
|
-
|
|
40049
|
+
const key = `${orgName}/${resourceId}`;
|
|
40050
|
+
return this.remoteResources.get(key) ?? this.systemConfigs.get(key) ?? null;
|
|
40051
|
+
}
|
|
40052
|
+
/**
|
|
40053
|
+
* Register a System config for a first-class platform resource.
|
|
40054
|
+
*
|
|
40055
|
+
* Called at startup alongside registerStaticResources() so that
|
|
40056
|
+
* getRemoteConfig('system', resourceId) returns truthy and the execution
|
|
40057
|
+
* coordinator routes the resource through the worker-thread path.
|
|
40058
|
+
*
|
|
40059
|
+
* @param orgName - Organization name (typically 'system')
|
|
40060
|
+
* @param resourceId - Resource ID
|
|
40061
|
+
* @param config - SystemConfig with kind:'static' and moduleId
|
|
40062
|
+
*/
|
|
40063
|
+
registerSystemConfig(orgName, resourceId, config3) {
|
|
40064
|
+
this.systemConfigs.set(`${orgName}/${resourceId}`, config3);
|
|
40166
40065
|
}
|
|
40167
40066
|
/**
|
|
40168
40067
|
* Check if an organization has any remote (externally deployed) resources
|
|
@@ -40582,7 +40481,7 @@ function wrapAction(commandName, fn) {
|
|
|
40582
40481
|
// package.json
|
|
40583
40482
|
var package_default = {
|
|
40584
40483
|
name: "@elevasis/sdk",
|
|
40585
|
-
version: "1.
|
|
40484
|
+
version: "1.12.0",
|
|
40586
40485
|
description: "SDK for building Elevasis organization resources",
|
|
40587
40486
|
type: "module",
|
|
40588
40487
|
bin: {
|
|
@@ -40683,7 +40582,8 @@ function extractResourceMetadata(resource, schemaWarnings) {
|
|
|
40683
40582
|
version: resource.config.version,
|
|
40684
40583
|
status: resource.config.status,
|
|
40685
40584
|
description: resource.config.description,
|
|
40686
|
-
|
|
40585
|
+
links: resource.config.links,
|
|
40586
|
+
category: resource.config.category
|
|
40687
40587
|
};
|
|
40688
40588
|
if (resource.contract.inputSchema) {
|
|
40689
40589
|
try {
|
|
@@ -41471,7 +41371,10 @@ function registerDescribeCommand(program3) {
|
|
|
41471
41371
|
if (config3.description) console.log(source_default.gray("Description:"), config3.description);
|
|
41472
41372
|
console.log(source_default.gray("Version:"), config3.version);
|
|
41473
41373
|
console.log(source_default.gray("Status:"), config3.status);
|
|
41474
|
-
if (config3.
|
|
41374
|
+
if (config3.category) console.log(source_default.gray("Category:"), config3.category);
|
|
41375
|
+
if (config3.links?.length) {
|
|
41376
|
+
console.log(source_default.gray("Links:"), config3.links.map((link) => `${link.kind} ${link.nodeId}`).join(", "));
|
|
41377
|
+
}
|
|
41475
41378
|
console.log();
|
|
41476
41379
|
const inputSchema = contract?.inputSchema;
|
|
41477
41380
|
const outputSchema = contract?.outputSchema;
|