@elevasis/sdk 1.11.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.
Files changed (38) hide show
  1. package/dist/cli.cjs +31 -8
  2. package/dist/index.d.ts +345 -48
  3. package/dist/index.js +210 -8
  4. package/dist/test-utils/index.d.ts +216 -40
  5. package/dist/test-utils/index.js +4756 -125
  6. package/dist/types/worker/adapters/llm.d.ts +1 -1
  7. package/dist/worker/index.js +10 -4
  8. package/package.json +2 -2
  9. package/reference/claude-config/rules/agent-start-here.md +14 -14
  10. package/reference/claude-config/skills/configure/SKILL.md +3 -3
  11. package/reference/claude-config/skills/setup/SKILL.md +6 -6
  12. package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -0
  13. package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +101 -0
  14. package/reference/cli.mdx +57 -0
  15. package/reference/examples/organization-model.ts +3 -0
  16. package/reference/packages/core/src/organization-model/README.md +1 -0
  17. package/reference/scaffold/core/organization-graph.mdx +5 -2
  18. package/reference/scaffold/core/organization-model.mdx +6 -0
  19. package/reference/scaffold/index.mdx +3 -0
  20. package/reference/scaffold/operations/propagation-pipeline.md +4 -1
  21. package/reference/scaffold/operations/scaffold-maintenance.md +3 -0
  22. package/reference/scaffold/operations/workflow-recipes.md +13 -10
  23. package/reference/scaffold/recipes/add-a-feature.md +3 -0
  24. package/reference/scaffold/recipes/add-a-resource.md +3 -0
  25. package/reference/scaffold/recipes/customize-organization-model.md +3 -0
  26. package/reference/scaffold/recipes/extend-a-base-entity.md +11 -8
  27. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +3 -0
  28. package/reference/scaffold/recipes/index.md +3 -0
  29. package/reference/scaffold/reference/contracts.md +62 -304
  30. package/reference/scaffold/reference/feature-registry.md +5 -2
  31. package/reference/scaffold/reference/glossary.md +3 -0
  32. package/reference/scaffold/ui/composition-extensibility.mdx +3 -0
  33. package/reference/scaffold/ui/customization.md +3 -0
  34. package/reference/scaffold/ui/feature-flags-and-gating.md +3 -0
  35. package/reference/scaffold/ui/feature-shell.mdx +3 -0
  36. package/reference/scaffold/ui/recipes.md +3 -0
  37. package/reference/claude-config/logs/pre-edit-vibe-gate.log +0 -40
  38. package/reference/claude-config/logs/scaffold-registry-reminder.log +0 -38
package/dist/cli.cjs CHANGED
@@ -39670,6 +39670,12 @@ var ResourceRegistry = class {
39670
39670
  * Static and remote resources coexist in the same org.
39671
39671
  */
39672
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();
39673
39679
  /**
39674
39680
  * Validates registry on construction
39675
39681
  * - Checks for duplicate resourceIds within organizations
@@ -39717,7 +39723,9 @@ var ResourceRegistry = class {
39717
39723
  if (!existingOrg) return void 0;
39718
39724
  const remoteIds = this.getRemoteResourceIds(orgName);
39719
39725
  if (remoteIds.size === 0) return existingOrg;
39720
- const relationships = existingOrg.relationships ? Object.fromEntries(Object.entries(existingOrg.relationships).filter(([resourceId]) => !remoteIds.has(resourceId))) : void 0;
39726
+ const relationships = existingOrg.relationships ? Object.fromEntries(
39727
+ Object.entries(existingOrg.relationships).filter(([resourceId]) => !remoteIds.has(resourceId))
39728
+ ) : void 0;
39721
39729
  return {
39722
39730
  ...existingOrg,
39723
39731
  version: existingOrg.version ?? "0.0.0",
@@ -40027,18 +40035,33 @@ var ResourceRegistry = class {
40027
40035
  }
40028
40036
  }
40029
40037
  /**
40030
- * Get remote configuration for a specific resource
40038
+ * Get remote configuration for a specific resource.
40031
40039
  *
40032
- * Returns the RemoteOrgConfig if the resource was registered at runtime,
40033
- * or null if it's a static resource or doesn't exist.
40034
- * Used by the execution coordinator to branch between local and worker execution.
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.
40035
40043
  *
40036
40044
  * @param orgName - Organization name
40037
40045
  * @param resourceId - Resource ID
40038
- * @returns Remote config or null
40046
+ * @returns Remote or System config, or null
40039
40047
  */
40040
40048
  getRemoteConfig(orgName, resourceId) {
40041
- return this.remoteResources.get(`${orgName}/${resourceId}`) ?? null;
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);
40042
40065
  }
40043
40066
  /**
40044
40067
  * Check if an organization has any remote (externally deployed) resources
@@ -40458,7 +40481,7 @@ function wrapAction(commandName, fn) {
40458
40481
  // package.json
40459
40482
  var package_default = {
40460
40483
  name: "@elevasis/sdk",
40461
- version: "1.11.0",
40484
+ version: "1.12.0",
40462
40485
  description: "SDK for building Elevasis organization resources",
40463
40486
  type: "module",
40464
40487
  bin: {