@elevasis/sdk 1.30.1 → 1.31.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 +111 -5
- package/dist/index.d.ts +54 -5
- package/dist/index.js +40 -3
- package/dist/node/index.d.ts +1 -0
- package/dist/test-utils/index.d.ts +1 -0
- package/dist/test-utils/index.js +14 -2
- package/package.json +4 -4
- package/reference/claude-config/skills/om/SKILL.md +42 -25
- package/reference/claude-config/skills/om/operations/scaffold.md +1 -1
- package/reference/claude-config/sync-notes/2026-05-28-om-snapshot-sdk-workflow-config.md +33 -0
- package/reference/index.mdx +7 -3
- package/reference/sdk/concepts.mdx +1 -1
- package/reference/sdk/framework/agent.mdx +156 -156
- package/reference/sdk/framework/index.mdx +4 -4
- package/reference/sdk/framework/project-structure.mdx +280 -280
- package/reference/sdk/framework/resource-documentation.mdx +2 -2
- package/reference/sdk/getting-started.mdx +7 -7
- package/reference/sdk/index.mdx +2 -1
- package/reference/sdk/platform-tools/index.mdx +7 -7
- package/reference/sdk/resources/index.mdx +3 -3
- package/reference/sdk/templates/data-enrichment.mdx +162 -162
- package/reference/sdk/templates/lead-scorer.mdx +175 -175
- package/reference/sdk/templates/text-classifier.mdx +147 -147
package/dist/cli.cjs
CHANGED
|
@@ -39771,6 +39771,18 @@ var OrganizationModelDomainMetadataByDomainSchema = external_exports.object({
|
|
|
39771
39771
|
}).partial().default(DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA).transform((metadata) => ({ ...DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA, ...metadata }));
|
|
39772
39772
|
var OrganizationModelSchemaBase = external_exports.object({
|
|
39773
39773
|
version: external_exports.literal(1).default(1),
|
|
39774
|
+
/**
|
|
39775
|
+
* Deterministic SHA-256 hex hash of the full resolved model, excluding this
|
|
39776
|
+
* field itself and volatile domainMetadata.lastModified values.
|
|
39777
|
+
*
|
|
39778
|
+
* Stamped at deploy time by the platform OM assembly and persisted alongside
|
|
39779
|
+
* the snapshot in the DB. Compared at API boot to detect stale deployed
|
|
39780
|
+
* snapshots (primary gate: deploy; secondary backstop: boot).
|
|
39781
|
+
*
|
|
39782
|
+
* Optional — absent on models that predate Step 2 versioning or that have
|
|
39783
|
+
* not been stamped (e.g. tenant partial overrides before re-deploy).
|
|
39784
|
+
*/
|
|
39785
|
+
snapshotHash: external_exports.string().optional(),
|
|
39774
39786
|
domainMetadata: OrganizationModelDomainMetadataByDomainSchema,
|
|
39775
39787
|
branding: OrganizationModelBrandingSchema.default(DEFAULT_ORGANIZATION_MODEL_BRANDING),
|
|
39776
39788
|
navigation: OrganizationModelNavigationSchema,
|
|
@@ -41585,7 +41597,13 @@ function computeInterfaceReadiness(model, request) {
|
|
|
41585
41597
|
`System "${request.systemPath}" is missing.`,
|
|
41586
41598
|
{ ref: request.systemPath }
|
|
41587
41599
|
);
|
|
41588
|
-
return {
|
|
41600
|
+
return {
|
|
41601
|
+
ready: false,
|
|
41602
|
+
systemPath: request.systemPath,
|
|
41603
|
+
interfaceKey: request.interfaceKey,
|
|
41604
|
+
scopedResourceIds,
|
|
41605
|
+
issues
|
|
41606
|
+
};
|
|
41589
41607
|
}
|
|
41590
41608
|
if (systemInterface === void 0) {
|
|
41591
41609
|
addReadinessIssue(
|
|
@@ -41595,7 +41613,13 @@ function computeInterfaceReadiness(model, request) {
|
|
|
41595
41613
|
`System "${request.systemPath}" does not declare interface "${request.interfaceKey}".`,
|
|
41596
41614
|
{ path: readinessMarkerPath(request) }
|
|
41597
41615
|
);
|
|
41598
|
-
return {
|
|
41616
|
+
return {
|
|
41617
|
+
ready: false,
|
|
41618
|
+
systemPath: request.systemPath,
|
|
41619
|
+
interfaceKey: request.interfaceKey,
|
|
41620
|
+
scopedResourceIds,
|
|
41621
|
+
issues
|
|
41622
|
+
};
|
|
41599
41623
|
}
|
|
41600
41624
|
if (systemInterface.lifecycle !== "active") {
|
|
41601
41625
|
addReadinessIssue(
|
|
@@ -45608,7 +45632,7 @@ function wrapAction(commandName, fn) {
|
|
|
45608
45632
|
// package.json
|
|
45609
45633
|
var package_default = {
|
|
45610
45634
|
name: "@elevasis/sdk",
|
|
45611
|
-
version: "1.
|
|
45635
|
+
version: "1.31.0",
|
|
45612
45636
|
description: "SDK for building Elevasis organization resources",
|
|
45613
45637
|
type: "module",
|
|
45614
45638
|
bin: {
|
|
@@ -48381,6 +48405,15 @@ function governedBy(graph, nodeId2) {
|
|
|
48381
48405
|
}
|
|
48382
48406
|
return results;
|
|
48383
48407
|
}
|
|
48408
|
+
function listAllSystemsFlat(model) {
|
|
48409
|
+
return listAllSystems(model);
|
|
48410
|
+
}
|
|
48411
|
+
function listAllResources(model) {
|
|
48412
|
+
return Object.values(model.resources ?? {}).sort((a, b) => a.id.localeCompare(b.id));
|
|
48413
|
+
}
|
|
48414
|
+
function listAllRoles(model) {
|
|
48415
|
+
return Object.values(model.roles ?? {}).sort((a, b) => a.id.localeCompare(b.id));
|
|
48416
|
+
}
|
|
48384
48417
|
function parsePath(pathString) {
|
|
48385
48418
|
if (!pathString || typeof pathString !== "string") {
|
|
48386
48419
|
throw new Error("parsePath: path must be a non-empty string");
|
|
@@ -48431,11 +48464,20 @@ function parsePath(pathString) {
|
|
|
48431
48464
|
}
|
|
48432
48465
|
return { mount: "graph", args: [graphNodeId, verb] };
|
|
48433
48466
|
}
|
|
48467
|
+
if (first === "all-systems" && rest.length === 0) {
|
|
48468
|
+
return { mount: "all-systems", args: [] };
|
|
48469
|
+
}
|
|
48470
|
+
if (first === "all-resources" && rest.length === 0) {
|
|
48471
|
+
return { mount: "all-resources", args: [] };
|
|
48472
|
+
}
|
|
48473
|
+
if (first === "all-roles" && rest.length === 0) {
|
|
48474
|
+
return { mount: "all-roles", args: [] };
|
|
48475
|
+
}
|
|
48434
48476
|
if (segments.length === 1) {
|
|
48435
48477
|
return { mount: "node", args: [first] };
|
|
48436
48478
|
}
|
|
48437
48479
|
throw new Error(
|
|
48438
|
-
`parsePath: unrecognized path pattern "${pathString}". Supported: /by-system/<id>, /by-kind/<kind>, /by-owner/<id>, /graph/<nodeId>/governs, /graph/<nodeId>/governed-by, /<nodeId
|
|
48480
|
+
`parsePath: unrecognized path pattern "${pathString}". Supported: /by-system/<id>, /by-kind/<kind>, /by-owner/<id>, /graph/<nodeId>/governs, /graph/<nodeId>/governed-by, /<nodeId>, /all-systems, /all-resources, /all-roles`
|
|
48439
48481
|
);
|
|
48440
48482
|
}
|
|
48441
48483
|
function omSearch(model, query, options = {}) {
|
|
@@ -49099,9 +49141,37 @@ async function loadOrgModel(projectRoot) {
|
|
|
49099
49141
|
}
|
|
49100
49142
|
|
|
49101
49143
|
// src/cli/commands/knowledge/ls.ts
|
|
49144
|
+
function formatAllSystems(entries) {
|
|
49145
|
+
if (entries.length === 0) return "(no results)";
|
|
49146
|
+
const pathWidth = Math.max(...entries.map((e) => e.path.length), 4);
|
|
49147
|
+
const header = `${"PATH".padEnd(pathWidth)} LABEL`;
|
|
49148
|
+
const divider = "-".repeat(header.length + 20);
|
|
49149
|
+
const rows = entries.map((e) => {
|
|
49150
|
+
const label = e.system.label ?? e.system.title ?? e.path;
|
|
49151
|
+
return `${e.path.padEnd(pathWidth)} ${label}`;
|
|
49152
|
+
});
|
|
49153
|
+
return [header, divider, ...rows].join("\n");
|
|
49154
|
+
}
|
|
49155
|
+
function formatAllResources(resources) {
|
|
49156
|
+
if (resources.length === 0) return "(no results)";
|
|
49157
|
+
const idWidth = Math.max(...resources.map((r) => r.id.length), 4);
|
|
49158
|
+
const kindWidth = Math.max(...resources.map((r) => r.kind.length), 4);
|
|
49159
|
+
const header = `${"ID".padEnd(idWidth)} ${"KIND".padEnd(kindWidth)} TITLE`;
|
|
49160
|
+
const divider = "-".repeat(header.length + 20);
|
|
49161
|
+
const rows = resources.map((r) => `${r.id.padEnd(idWidth)} ${r.kind.padEnd(kindWidth)} ${r.title}`);
|
|
49162
|
+
return [header, divider, ...rows].join("\n");
|
|
49163
|
+
}
|
|
49164
|
+
function formatAllRoles(roles) {
|
|
49165
|
+
if (roles.length === 0) return "(no results)";
|
|
49166
|
+
const idWidth = Math.max(...roles.map((r) => r.id.length), 4);
|
|
49167
|
+
const header = `${"ID".padEnd(idWidth)} TITLE`;
|
|
49168
|
+
const divider = "-".repeat(header.length + 20);
|
|
49169
|
+
const rows = roles.map((r) => `${r.id.padEnd(idWidth)} ${r.title}`);
|
|
49170
|
+
return [header, divider, ...rows].join("\n");
|
|
49171
|
+
}
|
|
49102
49172
|
function registerKnowledgeLs(program3) {
|
|
49103
49173
|
program3.command("knowledge:ls <path>").alias("om:ls").description(
|
|
49104
|
-
"List knowledge nodes for a Knowledge Map path\n Examples:\n elevasis-sdk om:ls /by-kind/playbook\n elevasis-sdk om:ls /by-system/sales.crm\n elevasis-sdk om:ls /by-ontology/sales.crm:object/deal\n elevasis-sdk om:ls /by-owner/role.ops-lead\n elevasis-sdk om:ls /graph/knowledge.outreach-playbook/governs\n elevasis-sdk om:ls /graph/system:sales.crm/governed-by"
|
|
49174
|
+
"List knowledge nodes for a Knowledge Map path\n Examples:\n elevasis-sdk om:ls /by-kind/playbook\n elevasis-sdk om:ls /by-system/sales.crm\n elevasis-sdk om:ls /by-ontology/sales.crm:object/deal\n elevasis-sdk om:ls /by-owner/role.ops-lead\n elevasis-sdk om:ls /graph/knowledge.outreach-playbook/governs\n elevasis-sdk om:ls /graph/system:sales.crm/governed-by\n elevasis-sdk om:ls /all-systems\n elevasis-sdk om:ls /all-resources\n elevasis-sdk om:ls /all-roles"
|
|
49105
49175
|
).option("--json", "Print wrapped JSON envelope { path, mount, args, results }").option("--ids-only", "Print one ID per line (for piping)").action(
|
|
49106
49176
|
wrapAction("knowledge:ls", async (pathArg, options) => {
|
|
49107
49177
|
let parsed;
|
|
@@ -49114,6 +49184,42 @@ function registerKnowledgeLs(program3) {
|
|
|
49114
49184
|
}
|
|
49115
49185
|
const projectRoot = getProjectRoot();
|
|
49116
49186
|
const model = await loadOrgModel(projectRoot);
|
|
49187
|
+
if (parsed.mount === "all-systems") {
|
|
49188
|
+
const entries = listAllSystemsFlat(model);
|
|
49189
|
+
if (options.json) {
|
|
49190
|
+
process.stdout.write(formatJson({ path: pathArg, parsed, results: entries.map((e) => e.path) }) + "\n");
|
|
49191
|
+
} else if (options.idsOnly) {
|
|
49192
|
+
const out = entries.map((e) => e.path).join("\n");
|
|
49193
|
+
if (out) process.stdout.write(out + "\n");
|
|
49194
|
+
} else {
|
|
49195
|
+
process.stdout.write(formatAllSystems(entries) + "\n");
|
|
49196
|
+
}
|
|
49197
|
+
return;
|
|
49198
|
+
}
|
|
49199
|
+
if (parsed.mount === "all-resources") {
|
|
49200
|
+
const resources = listAllResources(model);
|
|
49201
|
+
if (options.json) {
|
|
49202
|
+
process.stdout.write(formatJson({ path: pathArg, parsed, results: resources.map((r) => r.id) }) + "\n");
|
|
49203
|
+
} else if (options.idsOnly) {
|
|
49204
|
+
const out = resources.map((r) => r.id).join("\n");
|
|
49205
|
+
if (out) process.stdout.write(out + "\n");
|
|
49206
|
+
} else {
|
|
49207
|
+
process.stdout.write(formatAllResources(resources) + "\n");
|
|
49208
|
+
}
|
|
49209
|
+
return;
|
|
49210
|
+
}
|
|
49211
|
+
if (parsed.mount === "all-roles") {
|
|
49212
|
+
const roles = listAllRoles(model);
|
|
49213
|
+
if (options.json) {
|
|
49214
|
+
process.stdout.write(formatJson({ path: pathArg, parsed, results: roles.map((r) => r.id) }) + "\n");
|
|
49215
|
+
} else if (options.idsOnly) {
|
|
49216
|
+
const out = roles.map((r) => r.id).join("\n");
|
|
49217
|
+
if (out) process.stdout.write(out + "\n");
|
|
49218
|
+
} else {
|
|
49219
|
+
process.stdout.write(formatAllRoles(roles) + "\n");
|
|
49220
|
+
}
|
|
49221
|
+
return;
|
|
49222
|
+
}
|
|
49117
49223
|
const graph = buildOrganizationGraph({ organizationModel: model });
|
|
49118
49224
|
const knowledgeNodes = Object.values(model.knowledge);
|
|
49119
49225
|
let results;
|
package/dist/index.d.ts
CHANGED
|
@@ -6441,7 +6441,7 @@ declare const ActivityEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
6441
6441
|
}, z.core.$strip>], "type">;
|
|
6442
6442
|
type ActivityEvent = z.infer<typeof ActivityEventSchema>;
|
|
6443
6443
|
|
|
6444
|
-
interface Action {
|
|
6444
|
+
interface Action$1 {
|
|
6445
6445
|
key: string;
|
|
6446
6446
|
label: string;
|
|
6447
6447
|
payloadSchema?: z.ZodTypeAny;
|
|
@@ -6457,7 +6457,7 @@ type DealActionInput = AcqDealRow & {
|
|
|
6457
6457
|
ownership?: 'us' | 'them' | null;
|
|
6458
6458
|
nextAction?: string | null;
|
|
6459
6459
|
};
|
|
6460
|
-
declare function deriveActions(deal: DealActionInput, actions?: ActionDef[]): Action[];
|
|
6460
|
+
declare function deriveActions(deal: DealActionInput, actions?: ActionDef[]): Action$1[];
|
|
6461
6461
|
|
|
6462
6462
|
declare const OntologyIdSchema: z.ZodString;
|
|
6463
6463
|
type OntologyId = z.infer<typeof OntologyIdSchema>;
|
|
@@ -6798,6 +6798,7 @@ type Link = z.infer<typeof LinkSchema>;
|
|
|
6798
6798
|
|
|
6799
6799
|
declare const OrganizationModelSchema$1: z.ZodObject<{
|
|
6800
6800
|
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
6801
|
+
snapshotHash: z.ZodOptional<z.ZodString>;
|
|
6801
6802
|
domainMetadata: z.ZodPipe<z.ZodDefault<z.ZodObject<{
|
|
6802
6803
|
branding: z.ZodOptional<z.ZodObject<{
|
|
6803
6804
|
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
@@ -7807,7 +7808,12 @@ type CrmApiOntologyValidationIndex = BusinessOntologyValidationIndexBase & {
|
|
|
7807
7808
|
crmPipelineCatalog: OntologyCatalogType;
|
|
7808
7809
|
};
|
|
7809
7810
|
type BusinessOntologyValidationIndex = LeadGenApiOntologyValidationIndex & CrmApiOntologyValidationIndex;
|
|
7810
|
-
type SystemInterfaceReadinessIssueFamily = 'SYSTEM_INTERFACE_MISSING' | 'SYSTEM_INTERFACE_DISABLED' | 'SYSTEM_INTERFACE_INVALID' | 'SYSTEM_INTERFACE_NOT_READY' | 'SYSTEM_BRIDGE_NOT_READY'
|
|
7811
|
+
type SystemInterfaceReadinessIssueFamily = 'SYSTEM_INTERFACE_MISSING' | 'SYSTEM_INTERFACE_DISABLED' | 'SYSTEM_INTERFACE_INVALID' | 'SYSTEM_INTERFACE_NOT_READY' | 'SYSTEM_BRIDGE_NOT_READY'
|
|
7812
|
+
/**
|
|
7813
|
+
* The deployed OM snapshot hash does not match the canonical source hash.
|
|
7814
|
+
* Redeploy with `pnpm operations:deploy` to refresh the snapshot.
|
|
7815
|
+
*/
|
|
7816
|
+
| 'STALE_OM_SNAPSHOT';
|
|
7811
7817
|
/**
|
|
7812
7818
|
* Legacy mixed acquisition index.
|
|
7813
7819
|
*
|
|
@@ -12383,6 +12389,27 @@ type OrganizationModelTopology = z.infer<typeof OmTopologyDomainSchema>
|
|
|
12383
12389
|
type OrganizationModelTopologyNodeRef = z.infer<typeof OmTopologyNodeRefSchema>
|
|
12384
12390
|
type OrganizationModelTopologyRelationship = z.infer<typeof OmTopologyRelationshipSchema>
|
|
12385
12391
|
|
|
12392
|
+
declare const ActionSchema = z.object({
|
|
12393
|
+
id: ActionIdSchema,
|
|
12394
|
+
/** Domain-map iteration order. Convention: multiples of 10 (10, 20, 30, ...) to allow easy insertion. */
|
|
12395
|
+
order: z.number(),
|
|
12396
|
+
label: LabelSchema,
|
|
12397
|
+
description: DescriptionSchema.optional(),
|
|
12398
|
+
scope: ActionScopeSchema.default('global'),
|
|
12399
|
+
resourceId: ActionResourceIdSchema.optional(),
|
|
12400
|
+
affects: z.array(EntityIdSchema.meta({ ref: 'entity' })).optional(),
|
|
12401
|
+
invocations: z.array(ActionInvocationSchema).default([]),
|
|
12402
|
+
knowledge: z
|
|
12403
|
+
.array(ModelIdSchema.meta({ ref: 'knowledge' }))
|
|
12404
|
+
.default([])
|
|
12405
|
+
.optional(),
|
|
12406
|
+
lifecycle: z
|
|
12407
|
+
.enum(['draft', 'beta', 'active', 'deprecated', 'archived'])
|
|
12408
|
+
.meta({ label: 'Lifecycle', color: 'teal' })
|
|
12409
|
+
.default('active')
|
|
12410
|
+
})
|
|
12411
|
+
type Action = z.infer<typeof ActionSchema>
|
|
12412
|
+
|
|
12386
12413
|
// CRM stage/state catalogs are model-owned (authored in @repo/elevasis-core
|
|
12387
12414
|
// canonicalOrganizationModel). The published core schema validates only the
|
|
12388
12415
|
// transport shape; closed-catalog membership is enforced by the caller/API
|
|
@@ -12421,6 +12448,28 @@ declare function withPlatformIntegrationResourceDescriptors(integrations: Integr
|
|
|
12421
12448
|
declare function projectTopologyRelationships(model: Pick<OrganizationModel, 'resources' | 'topology'>): ResourceRelationships;
|
|
12422
12449
|
declare function projectDeploymentSpec(options: ProjectDeploymentSpecOptions): DeploymentSpec;
|
|
12423
12450
|
|
|
12451
|
+
/**
|
|
12452
|
+
* Browser-safe generic workflow config helper.
|
|
12453
|
+
*
|
|
12454
|
+
* Promoted from @repo/elevasis-core so any workflow family (lead-gen, CRM, etc.)
|
|
12455
|
+
* can derive resourceId, actions, primaryAction, name, and description from
|
|
12456
|
+
* the canonical OM Resource descriptor without duplicating validation logic.
|
|
12457
|
+
*
|
|
12458
|
+
* This file intentionally imports NOTHING from @elevasis/sdk/worker or any
|
|
12459
|
+
* Node.js-only module. It is safe to import from browser bundlers (Vite, etc.).
|
|
12460
|
+
*/
|
|
12461
|
+
|
|
12462
|
+
type WorkflowResourceDescriptorMap = Record<string, OrganizationModelResourceEntry>;
|
|
12463
|
+
type WorkflowConfigActionRegistry = readonly Pick<Action, 'id' | 'resourceId'>[];
|
|
12464
|
+
declare function defineWorkflowConfig<const TResourceId extends string>(resourceId: TResourceId, descriptors: WorkflowResourceDescriptorMap, actionRegistry?: WorkflowConfigActionRegistry): {
|
|
12465
|
+
readonly name: string;
|
|
12466
|
+
readonly description: string;
|
|
12467
|
+
readonly buildActionKey?: string | undefined;
|
|
12468
|
+
readonly resourceId: TResourceId;
|
|
12469
|
+
readonly actions: string[];
|
|
12470
|
+
readonly primaryAction: string;
|
|
12471
|
+
};
|
|
12472
|
+
|
|
12424
12473
|
/**
|
|
12425
12474
|
* @elevasis/sdk - Types and utilities for building Elevasis organization resources
|
|
12426
12475
|
*
|
|
@@ -12431,5 +12480,5 @@ declare function projectDeploymentSpec(options: ProjectDeploymentSpecOptions): D
|
|
|
12431
12480
|
declare const ListBuilderStageKeySchema: z.ZodString;
|
|
12432
12481
|
type ListBuilderStageKey = z.infer<typeof ListBuilderStageKeySchema>;
|
|
12433
12482
|
|
|
12434
|
-
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, ContractRefResolutionError, CrmStageKeySchema, CrmStateKeySchema, EmailSchema, ExecutionError, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, bindResourceDescriptor, compileBusinessOntologyValidationIndex, concurrentPool, createLeadGenStageValidators, defineContract, defineResource, defineResourceOntology, defineResources, defineStep, defineTopology, defineTopologyRelationship, defineWorkflow, deriveActions, diagnosticOutput, integrationInput, isZodType, parseTopologyNodeRef, projectDeploymentSpec, projectTopologyRelationships, resolveContractRef, runDiagnostic, splitName, toSdkResourceDescriptor, topologyRef, topologyRelationship, validateDeclaredSystemInterfaceReadiness, validateResourceGovernance, withPlatformIntegrationResourceDescriptor, withPlatformIntegrationResourceDescriptors, withPlatformResourceDescriptor, withPlatformResourceDescriptors };
|
|
12435
|
-
export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqDealRow, AcqList, Action, ActionDef, ActivityEvent, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BuildPlanSnapshotStep, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, BusinessOntologyValidationIndex, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, ClickUpToolMap, CompanyFilters, ConcurrentPoolOptions, ConcurrentPoolResult, ConditionalNext, ContactFilters, Contract, ContractRefResolutionErrorCode, ContractRegistry, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, CrmStageKey, CrmStateKey, CrmToolMap, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DiagnosticOutput, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, IntegrationResourceDescriptorResolver, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadGenStageValidators, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListBuilderStageKey, ListBuilderStep, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, OrganizationModelIntegrationResourceEntry, OrganizationModelResourceEntry, OrganizationModelResourceOntologyBinding, OrganizationModelTopology, OrganizationModelTopologyNodeRef, OrganizationModelTopologyRelationship, OrganizationModelWorkflowResourceEntry, PaginatedResult, PaginationParams, PdfToolMap, ProcessingStageStatus, ProjectDeploymentSpecOptions, ProjectsToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResolvedContractRef, ResourceCategory, ResourceDefinition, ResourceLink, ResourceMetricsConfig, ResourceOntologyBindingResolver, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TransitionItemParams, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowLogger, WorkflowResourceDescriptorResolver, WorkflowStep, WriteSheetParams, WriteSheetResult };
|
|
12483
|
+
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, ContractRefResolutionError, CrmStageKeySchema, CrmStateKeySchema, EmailSchema, ExecutionError, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, bindResourceDescriptor, compileBusinessOntologyValidationIndex, concurrentPool, createLeadGenStageValidators, defineContract, defineResource, defineResourceOntology, defineResources, defineStep, defineTopology, defineTopologyRelationship, defineWorkflow, defineWorkflowConfig, deriveActions, diagnosticOutput, integrationInput, isZodType, parseTopologyNodeRef, projectDeploymentSpec, projectTopologyRelationships, resolveContractRef, runDiagnostic, splitName, toSdkResourceDescriptor, topologyRef, topologyRelationship, validateDeclaredSystemInterfaceReadiness, validateResourceGovernance, withPlatformIntegrationResourceDescriptor, withPlatformIntegrationResourceDescriptors, withPlatformResourceDescriptor, withPlatformResourceDescriptors };
|
|
12484
|
+
export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqDealRow, AcqList, Action$1 as Action, ActionDef, ActivityEvent, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BuildPlanSnapshotStep, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, BusinessOntologyValidationIndex, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, ClickUpToolMap, CompanyFilters, ConcurrentPoolOptions, ConcurrentPoolResult, ConditionalNext, ContactFilters, Contract, ContractRefResolutionErrorCode, ContractRegistry, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, CrmStageKey, CrmStateKey, CrmToolMap, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DiagnosticOutput, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, IntegrationResourceDescriptorResolver, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadGenStageValidators, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListBuilderStageKey, ListBuilderStep, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, OrganizationModelIntegrationResourceEntry, OrganizationModelResourceEntry, OrganizationModelResourceOntologyBinding, OrganizationModelTopology, OrganizationModelTopologyNodeRef, OrganizationModelTopologyRelationship, OrganizationModelWorkflowResourceEntry, PaginatedResult, PaginationParams, PdfToolMap, ProcessingStageStatus, ProjectDeploymentSpecOptions, ProjectsToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResolvedContractRef, ResourceCategory, ResourceDefinition, ResourceLink, ResourceMetricsConfig, ResourceOntologyBindingResolver, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TransitionItemParams, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowConfigActionRegistry, WorkflowDefinition, WorkflowLogger, WorkflowResourceDescriptorMap, WorkflowResourceDescriptorResolver, WorkflowStep, WriteSheetParams, WriteSheetResult };
|
package/dist/index.js
CHANGED
|
@@ -1964,7 +1964,13 @@ function computeInterfaceReadiness(model, request) {
|
|
|
1964
1964
|
`System "${request.systemPath}" is missing.`,
|
|
1965
1965
|
{ ref: request.systemPath }
|
|
1966
1966
|
);
|
|
1967
|
-
return {
|
|
1967
|
+
return {
|
|
1968
|
+
ready: false,
|
|
1969
|
+
systemPath: request.systemPath,
|
|
1970
|
+
interfaceKey: request.interfaceKey,
|
|
1971
|
+
scopedResourceIds,
|
|
1972
|
+
issues
|
|
1973
|
+
};
|
|
1968
1974
|
}
|
|
1969
1975
|
if (systemInterface === void 0) {
|
|
1970
1976
|
addReadinessIssue(
|
|
@@ -1974,7 +1980,13 @@ function computeInterfaceReadiness(model, request) {
|
|
|
1974
1980
|
`System "${request.systemPath}" does not declare interface "${request.interfaceKey}".`,
|
|
1975
1981
|
{ path: readinessMarkerPath(request) }
|
|
1976
1982
|
);
|
|
1977
|
-
return {
|
|
1983
|
+
return {
|
|
1984
|
+
ready: false,
|
|
1985
|
+
systemPath: request.systemPath,
|
|
1986
|
+
interfaceKey: request.interfaceKey,
|
|
1987
|
+
scopedResourceIds,
|
|
1988
|
+
issues
|
|
1989
|
+
};
|
|
1978
1990
|
}
|
|
1979
1991
|
if (systemInterface.lifecycle !== "active") {
|
|
1980
1992
|
addReadinessIssue(
|
|
@@ -6923,6 +6935,31 @@ function projectDeploymentSpec(options) {
|
|
|
6923
6935
|
...options.externalResources ? { externalResources: options.externalResources } : {}
|
|
6924
6936
|
};
|
|
6925
6937
|
}
|
|
6938
|
+
|
|
6939
|
+
// src/workflow-config.ts
|
|
6940
|
+
function defineWorkflowConfig(resourceId, descriptors, actionRegistry = []) {
|
|
6941
|
+
const descriptor = descriptors[resourceId];
|
|
6942
|
+
if (descriptor === void 0) {
|
|
6943
|
+
throw new Error(`Missing platform OM Resource descriptor for workflow "${resourceId}"`);
|
|
6944
|
+
}
|
|
6945
|
+
if (descriptor.kind !== "workflow") {
|
|
6946
|
+
throw new Error(`Platform OM Resource descriptor "${resourceId}" is not a workflow`);
|
|
6947
|
+
}
|
|
6948
|
+
const workflowDescriptor = descriptor;
|
|
6949
|
+
const ontology = workflowDescriptor.ontology;
|
|
6950
|
+
if (ontology?.primaryAction === void 0) {
|
|
6951
|
+
throw new Error(`Platform OM workflow Resource descriptor "${resourceId}" is missing ontology.primaryAction`);
|
|
6952
|
+
}
|
|
6953
|
+
const buildAction = actionRegistry.find((entry) => entry.resourceId === workflowDescriptor.id);
|
|
6954
|
+
return {
|
|
6955
|
+
resourceId: workflowDescriptor.id,
|
|
6956
|
+
actions: ontology.actions ?? [],
|
|
6957
|
+
primaryAction: ontology.primaryAction,
|
|
6958
|
+
...buildAction ? { buildActionKey: buildAction.id } : {},
|
|
6959
|
+
name: workflowDescriptor.title ?? workflowDescriptor.id,
|
|
6960
|
+
description: workflowDescriptor.description ?? ""
|
|
6961
|
+
};
|
|
6962
|
+
}
|
|
6926
6963
|
var ListBuilderStageKeySchema = z.string().min(1);
|
|
6927
6964
|
|
|
6928
|
-
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, ContractRefResolutionError, CrmStageKeySchema, CrmStateKeySchema, EmailSchema, ExecutionError, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, bindResourceDescriptor, compileBusinessOntologyValidationIndex, concurrentPool, createLeadGenStageValidators, defineContract, defineResource, defineResourceOntology, defineResources, defineStep, defineTopology, defineTopologyRelationship, defineWorkflow, deriveActions, diagnosticOutput, integrationInput, isZodType, parseTopologyNodeRef, projectDeploymentSpec, projectTopologyRelationships, resolveContractRef, runDiagnostic, splitName, toSdkResourceDescriptor, topologyRef, topologyRelationship, validateDeclaredSystemInterfaceReadiness, validateResourceGovernance, withPlatformIntegrationResourceDescriptor, withPlatformIntegrationResourceDescriptors, withPlatformResourceDescriptor, withPlatformResourceDescriptors };
|
|
6965
|
+
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, ContractRefResolutionError, CrmStageKeySchema, CrmStateKeySchema, EmailSchema, ExecutionError, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, bindResourceDescriptor, compileBusinessOntologyValidationIndex, concurrentPool, createLeadGenStageValidators, defineContract, defineResource, defineResourceOntology, defineResources, defineStep, defineTopology, defineTopologyRelationship, defineWorkflow, defineWorkflowConfig, deriveActions, diagnosticOutput, integrationInput, isZodType, parseTopologyNodeRef, projectDeploymentSpec, projectTopologyRelationships, resolveContractRef, runDiagnostic, splitName, toSdkResourceDescriptor, topologyRef, topologyRelationship, validateDeclaredSystemInterfaceReadiness, validateResourceGovernance, withPlatformIntegrationResourceDescriptor, withPlatformIntegrationResourceDescriptors, withPlatformResourceDescriptor, withPlatformResourceDescriptors };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1509,6 +1509,7 @@ type Link = z.infer<typeof LinkSchema>;
|
|
|
1509
1509
|
|
|
1510
1510
|
declare const OrganizationModelSchema$1: z.ZodObject<{
|
|
1511
1511
|
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
1512
|
+
snapshotHash: z.ZodOptional<z.ZodString>;
|
|
1512
1513
|
domainMetadata: z.ZodPipe<z.ZodDefault<z.ZodObject<{
|
|
1513
1514
|
branding: z.ZodOptional<z.ZodObject<{
|
|
1514
1515
|
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
@@ -5993,6 +5993,7 @@ type Link = z.infer<typeof LinkSchema>;
|
|
|
5993
5993
|
|
|
5994
5994
|
declare const OrganizationModelSchema: z.ZodObject<{
|
|
5995
5995
|
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
5996
|
+
snapshotHash: z.ZodOptional<z.ZodString>;
|
|
5996
5997
|
domainMetadata: z.ZodPipe<z.ZodDefault<z.ZodObject<{
|
|
5997
5998
|
branding: z.ZodOptional<z.ZodObject<{
|
|
5998
5999
|
version: z.ZodDefault<z.ZodLiteral<1>>;
|
package/dist/test-utils/index.js
CHANGED
|
@@ -9200,7 +9200,13 @@ function computeInterfaceReadiness(model, request) {
|
|
|
9200
9200
|
`System "${request.systemPath}" is missing.`,
|
|
9201
9201
|
{ ref: request.systemPath }
|
|
9202
9202
|
);
|
|
9203
|
-
return {
|
|
9203
|
+
return {
|
|
9204
|
+
ready: false,
|
|
9205
|
+
systemPath: request.systemPath,
|
|
9206
|
+
interfaceKey: request.interfaceKey,
|
|
9207
|
+
scopedResourceIds,
|
|
9208
|
+
issues
|
|
9209
|
+
};
|
|
9204
9210
|
}
|
|
9205
9211
|
if (systemInterface === void 0) {
|
|
9206
9212
|
addReadinessIssue(
|
|
@@ -9210,7 +9216,13 @@ function computeInterfaceReadiness(model, request) {
|
|
|
9210
9216
|
`System "${request.systemPath}" does not declare interface "${request.interfaceKey}".`,
|
|
9211
9217
|
{ path: readinessMarkerPath(request) }
|
|
9212
9218
|
);
|
|
9213
|
-
return {
|
|
9219
|
+
return {
|
|
9220
|
+
ready: false,
|
|
9221
|
+
systemPath: request.systemPath,
|
|
9222
|
+
interfaceKey: request.interfaceKey,
|
|
9223
|
+
scopedResourceIds,
|
|
9224
|
+
issues
|
|
9225
|
+
};
|
|
9214
9226
|
}
|
|
9215
9227
|
if (systemInterface.lifecycle !== "active") {
|
|
9216
9228
|
addReadinessIssue(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.0",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"tsup": "^8.0.0",
|
|
59
59
|
"typescript": "5.9.2",
|
|
60
60
|
"zod": "^4.1.0",
|
|
61
|
-
"@repo/core": "0.
|
|
62
|
-
"@repo/
|
|
63
|
-
"@repo/
|
|
61
|
+
"@repo/core": "0.40.0",
|
|
62
|
+
"@repo/eslint-config": "0.0.0",
|
|
63
|
+
"@repo/typescript-config": "0.0.0"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"lint": "eslint src --max-warnings 0",
|
|
@@ -93,13 +93,13 @@ Auto-invocation is driven by frontmatter `description`, `metadata.pathPatterns`,
|
|
|
93
93
|
Once invoked, classify the user's input into ONE of these buckets and dispatch the matching
|
|
94
94
|
primitive. When two buckets fit, prefer the higher one (more specific → more general).
|
|
95
95
|
|
|
96
|
-
| # | Bucket | Trigger
|
|
97
|
-
| --- | ------------------------------ |
|
|
98
|
-
| 1 | Named knowledge/role/policy id | User names `knowledge.<id>`, `role.<id>`, `policy.<id>` directly
|
|
99
|
-
| 2 | Named system | User names a system path (`sales.crm`, `sales.lead-gen`)
|
|
96
|
+
| # | Bucket | Trigger | Dispatch |
|
|
97
|
+
| --- | ------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- |
|
|
98
|
+
| 1 | Named knowledge/role/policy id | User names `knowledge.<id>`, `role.<id>`, `policy.<id>` directly | `om:cat <id>` for body, `om:describe <id>` for neighborhood |
|
|
99
|
+
| 2 | Named system | User names a system path (`sales.crm`, `sales.lead-gen`) | `om:describe <id>` |
|
|
100
100
|
| 3 | Named ontology id | Id contains `:object/`, `:action/`, `:event/`, `:catalog/`, `:interface/`, `:link/`, `:surface/` | `om:describe <id>` (or `om:ls /by-ontology/<id> --ids-only` then `om:cat` each) |
|
|
101
|
-
| 4 | Kind keyword | "playbooks", "strategies", "all references", "list policies"
|
|
102
|
-
| 5 | Free-text discovery | Anything else ("lead gen", "outreach", "what governs X?")
|
|
101
|
+
| 4 | Kind keyword | "playbooks", "strategies", "all references", "list policies" | `om:ls /by-kind/<kind> --ids-only` then `om:cat` each |
|
|
102
|
+
| 5 | Free-text discovery | Anything else ("lead gen", "outreach", "what governs X?") | `om:search "<query>"` then drill into top hit with `om:describe` |
|
|
103
103
|
|
|
104
104
|
On ambiguous input, default to **bucket 5 (search)** and surface the top hits. Codify and Toggle
|
|
105
105
|
intents are write paths -- see "Write Power" below.
|
|
@@ -110,15 +110,15 @@ intents are write paths -- see "Write Power" below.
|
|
|
110
110
|
|
|
111
111
|
All commands run with `pnpm exec elevasis-sdk <cmd>` (or the `om:` alias of the legacy `knowledge:` name).
|
|
112
112
|
|
|
113
|
-
| Command | Alias | Purpose
|
|
114
|
-
| ------------------ | -------------------- |
|
|
115
|
-
| `om:search <q>` | `knowledge:search` | Universal keyword search across all 6 OM surfaces
|
|
116
|
-
| `om:describe <id>` | `knowledge:describe` | Structured neighborhood view; kind auto-detected from id shape
|
|
117
|
-
| `om:cat <id>` | `knowledge:cat` | Raw MDX body of a knowledge node
|
|
118
|
-
| `om:ls <path>` | `knowledge:ls` | List
|
|
119
|
-
| `om:graph <id>` | `knowledge:graph` | Show outgoing + incoming graph edges
|
|
120
|
-
| `om:skills <id>` | `knowledge:skills` | Show callable invocations on graph neighbors
|
|
121
|
-
| `om:generate` | `knowledge:generate` | Regenerate `_generated/nodes.ts` from MDX sources
|
|
113
|
+
| Command | Alias | Purpose |
|
|
114
|
+
| ------------------ | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
115
|
+
| `om:search <q>` | `knowledge:search` | Universal keyword search across all 6 OM surfaces |
|
|
116
|
+
| `om:describe <id>` | `knowledge:describe` | Structured neighborhood view; kind auto-detected from id shape |
|
|
117
|
+
| `om:cat <id>` | `knowledge:cat` | Raw MDX body of a knowledge node |
|
|
118
|
+
| `om:ls <path>` | `knowledge:ls` | List by mount path. Enumeration: `/all-systems`, `/all-resources`, `/all-roles`. Scoped: `/by-system/`, `/by-kind/`, `/by-ontology/`, `/by-owner/`, `/graph/<id>/{governs,governed-by}` |
|
|
119
|
+
| `om:graph <id>` | `knowledge:graph` | Show outgoing + incoming graph edges |
|
|
120
|
+
| `om:skills <id>` | `knowledge:skills` | Show callable invocations on graph neighbors |
|
|
121
|
+
| `om:generate` | `knowledge:generate` | Regenerate `_generated/nodes.ts` from MDX sources |
|
|
122
122
|
|
|
123
123
|
Common flags: `--json`, `--ids-only`, `--limit <n>`, `--kinds <list>`.
|
|
124
124
|
|
|
@@ -148,7 +148,22 @@ pnpm exec elevasis-sdk om:describe sales.crm:object/deal
|
|
|
148
148
|
pnpm exec elevasis-sdk om:cat knowledge.outreach-playbook
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
###
|
|
151
|
+
### Top-level enumeration (drill-down entry point)
|
|
152
|
+
|
|
153
|
+
Start here when an agent needs to discover what this tenant's custom OM contains before
|
|
154
|
+
building on it -- list everything in a domain, then narrow with `om:describe` / `om:cat`:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
pnpm exec elevasis-sdk om:ls /all-systems # every System (path + label)
|
|
158
|
+
pnpm exec elevasis-sdk om:ls /all-resources # every resource (id, kind, title)
|
|
159
|
+
pnpm exec elevasis-sdk om:ls /all-roles # every role (id, title)
|
|
160
|
+
pnpm exec elevasis-sdk om:ls /all-systems --ids-only # pipe paths into om:describe
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
These resolve against this tenant's resolved model -- they enumerate the project's own custom
|
|
164
|
+
OM, not the platform's. Use `--json` for the wrapped envelope or `--ids-only` for piping.
|
|
165
|
+
|
|
166
|
+
### Scoped mount-path listings
|
|
152
167
|
|
|
153
168
|
```bash
|
|
154
169
|
pnpm exec elevasis-sdk om:ls /by-system/sales.crm
|
|
@@ -193,16 +208,18 @@ current task makes it relevant.
|
|
|
193
208
|
Use this map whenever the task asks what something is, where it lives, what governs it, or
|
|
194
209
|
what adjacent context may matter:
|
|
195
210
|
|
|
196
|
-
| Question | Start here
|
|
197
|
-
| ---------------------------------- |
|
|
198
|
-
| What Systems exist? | `om:ls /
|
|
199
|
-
| What
|
|
200
|
-
| What
|
|
201
|
-
| What
|
|
202
|
-
| What
|
|
211
|
+
| Question | Start here | Then inspect |
|
|
212
|
+
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
213
|
+
| What Systems exist? | `om:ls /all-systems` | System IDs, parentage, lifecycle, UI metadata, and content |
|
|
214
|
+
| What resources exist? | `om:ls /all-resources` | resource ids, kinds, owning System refs |
|
|
215
|
+
| What roles exist? | `om:ls /all-roles` | role ids, titles, responsibilities |
|
|
216
|
+
| What governs a System? | `om:describe <system-id>` or `om:ls /by-system/<id>` | system entry, governed knowledge, roles, policies, graph `governs` edges |
|
|
217
|
+
| What resources belong to a System? | the id-keyed `organizationModel.resources` map and `getResourcesForSystem(model, systemPath)` | use `{ includeDescendants: true }` only for parent-scope rollups |
|
|
218
|
+
| What can a System do? | system action refs and the actions domain | `action.resourceId`, invocation metadata, affected entities, policies |
|
|
219
|
+
| What data does it own? | entities domain | owning System refs, state catalogs, entity links, emitted/projected events |
|
|
203
220
|
| Is a platform API interface ready? | the System's `apiInterface` marker and `node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md` | matching convention-locked System path, cataloged `readinessProfile`, derived resource ontology bindings, and scoped topology grants |
|
|
204
|
-
| What UI surface exposes it? | `navigation.sidebar` plus `SystemModule` manifests
|
|
205
|
-
| What knowledge applies? | `om:ls /by-system/<id>` plus graph edges
|
|
221
|
+
| What UI surface exposes it? | `navigation.sidebar` plus `SystemModule` manifests | route files, surface targets, route-prefix modules, guards |
|
|
222
|
+
| What knowledge applies? | `om:ls /by-system/<id>` plus graph edges | `om:cat`, `om:graph`, `/graph/<id>/governed-by` |
|
|
206
223
|
|
|
207
224
|
Do not treat any one read as a complete system snapshot. The OM is a set of related domain maps;
|
|
208
225
|
follow the relationship that matches the work. Prefer structured helpers from
|
|
@@ -91,7 +91,7 @@ Re-run the command without `--dry-run`. The CLI:
|
|
|
91
91
|
Always run both gates after a scaffold write:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
pnpm -C operations check-types #
|
|
94
|
+
pnpm -C operations check-types # type-check only, no emit
|
|
95
95
|
pnpm -C operations check # elevasis-sdk resource validator (incl. conformance gate)
|
|
96
96
|
```
|
|
97
97
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# OM snapshot stamp + `@elevasis/sdk` workflow-config promotion + `om:ls` enumeration
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
The 2026-05-28 SDK ship train publishes two coordinated package bumps and propagates two template-authored changes:
|
|
6
|
+
|
|
7
|
+
- **`@elevasis/core` 0.40.0** — adds an optional `snapshotHash` field to the Organization Model schema (deploy-time + runtime OM snapshot-drift detection), a `STALE_OM_SNAPSHOT` validation member, and three new `@elevasis/core/knowledge` enumeration helpers (`listAllSystemsFlat`, `listAllResources`, `listAllRoles`).
|
|
8
|
+
- **`@elevasis/sdk` 1.31.0** — promotes the generic `defineWorkflowConfig(resourceId, descriptors, actionRegistry)` helper out of the private platform package into the published SDK barrel, and adds `om:ls /all-systems | /all-resources | /all-roles` enumeration mounts to the tenant `elevasis-sdk om:ls` CLI.
|
|
9
|
+
|
|
10
|
+
These change tenant-visible behavior (a new readiness diagnostic, new CLI mounts, and a new recommended deployment-binding pattern), so they cannot be left to silent dependency-baseline drift.
|
|
11
|
+
|
|
12
|
+
## Applies to
|
|
13
|
+
|
|
14
|
+
- All tenant SDK consumers depending on `@elevasis/core` and/or `@elevasis/sdk` (`external/nirvana-marketing`, and any project scaffolded from `external/_template`).
|
|
15
|
+
- New scaffolds: pick up the `operations/src/metadata.ts` convention seed and (after the post-publish template authoring lands) the `projectDeploymentSpec`-based `operations/src/index.ts`.
|
|
16
|
+
|
|
17
|
+
## Required actions
|
|
18
|
+
|
|
19
|
+
1. **Adopt the bumped baselines.** `core/package.json` → `@elevasis/core` `^0.40.0`; `operations/package.json` → `@elevasis/core` `^0.40.0` and `@elevasis/sdk` `^1.31.0`. (Handled by the package-cascade entries in `_external-sync-prep.json`; verify, do not hand-edit.)
|
|
20
|
+
2. **Redeploy operations after the bump** so the deployment writes a hash-stamped OM snapshot. Until you redeploy, the deployed snapshot carries no `snapshotHash` and the new drift diagnostic stays dormant. Stale-snapshot 503s now name the cause and the fix ("redeploy via `pnpm operations:deploy`") instead of the old opaque "not ready for this API surface".
|
|
21
|
+
3. **New enumeration CLI is available after the `@elevasis/sdk` bump:** `pnpm -C external/<project>/operations exec elevasis-sdk om:ls /all-systems` (also `/all-resources`, `/all-roles`; supports `--json` / `--ids-only`). The tenant `/om` skill documents the drill-down surface.
|
|
22
|
+
4. **Deployment-binding convention (informational for existing tenants; default for new scaffolds):** the template now deploys through `projectDeploymentSpec` with injected descriptor getters and derives per-workflow `config` via the promoted `defineWorkflowConfig`. `operations/src/**` is project-owned, so existing tenants are NOT auto-rewritten; adopt the pattern at your discretion. A typed `operations/src/metadata.ts` stub (triggers / integrations / human checkpoints) is seeded as the home for deployment mechanics.
|
|
23
|
+
|
|
24
|
+
## Verification
|
|
25
|
+
|
|
26
|
+
- `pnpm -C external/<project>/operations exec elevasis-sdk om:ls /all-systems` returns systems (not an empty list).
|
|
27
|
+
- After redeploy, the system-interface readiness probe no longer returns a stale-snapshot 503; a deliberate source/deploy mismatch now surfaces `STALE_OM_SNAPSHOT` with an actionable message.
|
|
28
|
+
- `pnpm sync:verify` and `pnpm external:verify-template-family` pass after the sync.
|
|
29
|
+
|
|
30
|
+
## Not handled by /git-sync
|
|
31
|
+
|
|
32
|
+
- The **operations redeploy** (action 2) is a deliberate deploy, not a file sync — `/git-sync` will not run it.
|
|
33
|
+
- **Adopting `projectDeploymentSpec` / wiring `metadata.ts`** in an existing tenant's `operations/src/**` (project-owned) is a manual, tenant-authored migration; the sync only seeds it into fresh scaffolds.
|