@elevasis/sdk 1.47.0 → 1.48.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 +297 -93
- package/dist/index.d.ts +2 -2
- package/dist/index.js +23 -7
- package/dist/node/index.d.ts +2 -2
- package/dist/test-utils/index.d.ts +2 -2
- package/dist/test-utils/index.js +35 -7
- package/dist/worker/index.d.ts +24 -14
- package/dist/worker/index.js +6 -0
- package/package.json +4 -4
- package/reference/_navigation.md +3 -2
- package/reference/_reference-manifest.json +11 -1
- package/reference/packages/core/src/organization-model/README.md +9 -6
- package/reference/rules/content.md +27 -0
- package/reference/rules/organization-model.md +9 -3
- package/reference/rules/organization-os.md +2 -2
- package/reference/rules/vibe-intents.md +18 -15
- package/reference/rules/vibe.md +12 -12
- package/reference/scaffold/recipes/add-a-feature.md +1 -1
- package/reference/scaffold/recipes/customize-organization-model.md +2 -2
- package/reference/scaffold/recipes/extend-content.md +91 -28
- package/reference/scaffold/reference/glossary.md +2 -2
- package/reference/scaffold/reference/system-interface-capabilities.md +26 -6
- package/reference/sdk/cli-management.mdx +85 -23
- package/reference/sdk/platform-tools/adapters-platform.mdx +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -7276,7 +7276,7 @@ declare const OntologyScopeSchema: z.ZodDefault<z.ZodObject<{
|
|
|
7276
7276
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7277
7277
|
route: z.ZodOptional<z.ZodString>;
|
|
7278
7278
|
}, z.core.$loose>>>>;
|
|
7279
|
-
}, z.core.$
|
|
7279
|
+
}, z.core.$strict>>;
|
|
7280
7280
|
type OntologyObjectType = z.infer<typeof OntologyObjectTypeSchema>;
|
|
7281
7281
|
type OntologyLinkType = z.infer<typeof OntologyLinkTypeSchema>;
|
|
7282
7282
|
type OntologyActionType = z.infer<typeof OntologyActionTypeSchema>;
|
|
@@ -8648,7 +8648,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
8648
8648
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8649
8649
|
route: z.ZodOptional<z.ZodString>;
|
|
8650
8650
|
}, z.core.$loose>>>>;
|
|
8651
|
-
}, z.core.$
|
|
8651
|
+
}, z.core.$strict>>>;
|
|
8652
8652
|
resources: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8653
8653
|
id: z.ZodString;
|
|
8654
8654
|
order: z.ZodDefault<z.ZodNumber>;
|
package/dist/index.js
CHANGED
|
@@ -114,7 +114,7 @@ var OntologyScopeSchema = z.object({
|
|
|
114
114
|
sharedProperties: z.record(OntologyIdSchema, OntologySharedPropertySchema).default({}).optional(),
|
|
115
115
|
groups: z.record(OntologyIdSchema, OntologyGroupSchema).default({}).optional(),
|
|
116
116
|
endpoints: z.record(OntologyIdSchema, OntologyEndpointTypeSchema).default({}).optional()
|
|
117
|
-
}).default({});
|
|
117
|
+
}).strict().default({});
|
|
118
118
|
var SCOPE_KIND = {
|
|
119
119
|
objectTypes: "object",
|
|
120
120
|
linkTypes: "link",
|
|
@@ -612,29 +612,45 @@ var SystemUiSchema = z.object({
|
|
|
612
612
|
path: PathSchema,
|
|
613
613
|
surfaces: ReferenceIdsSchema,
|
|
614
614
|
icon: IconNameSchema.optional()
|
|
615
|
-
});
|
|
615
|
+
}).strict();
|
|
616
616
|
var SystemInterfaceKeySchema = ModelIdSchema;
|
|
617
617
|
var SystemInterfaceLifecycleSchema = z.enum(["draft", "active", "disabled", "deprecated", "archived"]).meta({ label: "System interface lifecycle", color: "teal" });
|
|
618
618
|
var SYSTEM_INTERFACE_PROFILES = [
|
|
619
619
|
{
|
|
620
620
|
systemPath: "sales.lead-gen",
|
|
621
621
|
interfaceKey: "api",
|
|
622
|
-
readinessProfile: "sales.lead-gen.api"
|
|
622
|
+
readinessProfile: "sales.lead-gen.api",
|
|
623
|
+
validation: "built-in"
|
|
623
624
|
},
|
|
624
625
|
{
|
|
625
626
|
systemPath: "sales.crm",
|
|
626
627
|
interfaceKey: "api",
|
|
627
|
-
readinessProfile: "sales.crm.api"
|
|
628
|
+
readinessProfile: "sales.crm.api",
|
|
629
|
+
validation: "built-in"
|
|
628
630
|
},
|
|
629
631
|
{
|
|
630
632
|
systemPath: "sales.lead-gen",
|
|
631
633
|
interfaceKey: "crm-handoff",
|
|
632
|
-
readinessProfile: "sales.lead-gen.crm-handoff"
|
|
634
|
+
readinessProfile: "sales.lead-gen.crm-handoff",
|
|
635
|
+
validation: "built-in"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
// Gated by `CONTENT_API_INTERFACE` in `apps/api/src/business/content/organization-model.ts`,
|
|
639
|
+
// which every `/api/content/*` and `/api/external/content/*` route asserts. Contract-validated
|
|
640
|
+
// rather than built-in because the required step catalog is per-adopter: Elevasis declares
|
|
641
|
+
// `content:catalog/long-form-to-shorts-steps`, a tenant declares its own.
|
|
642
|
+
systemPath: "content",
|
|
643
|
+
interfaceKey: "api",
|
|
644
|
+
readinessProfile: "content.api",
|
|
645
|
+
validation: "contract"
|
|
633
646
|
}
|
|
634
647
|
];
|
|
635
|
-
|
|
648
|
+
SYSTEM_INTERFACE_PROFILES.map(
|
|
636
649
|
(profile) => profile.readinessProfile
|
|
637
650
|
);
|
|
651
|
+
var BUILT_IN_VALIDATED_PROFILE_IDS = SYSTEM_INTERFACE_PROFILES.filter(
|
|
652
|
+
(profile) => profile.validation === "built-in"
|
|
653
|
+
).map((profile) => profile.readinessProfile);
|
|
638
654
|
var SystemInterfaceReadinessProfileSchema = z.string().trim().min(1);
|
|
639
655
|
var SystemInterfaceResourceScopeSchema = z.array(ModelIdSchema).default([]);
|
|
640
656
|
var SystemApiInterfaceReadinessContractSchema = z.object({
|
|
@@ -673,7 +689,7 @@ var SystemApiInterfaceSchema = z.object({
|
|
|
673
689
|
}).strict();
|
|
674
690
|
var _customProfileIds = /* @__PURE__ */ new Set();
|
|
675
691
|
function isReservedPlatformProfileId(profileId) {
|
|
676
|
-
return
|
|
692
|
+
return BUILT_IN_VALIDATED_PROFILE_IDS.includes(profileId);
|
|
677
693
|
}
|
|
678
694
|
function lookupReadinessProfile(profileId) {
|
|
679
695
|
if (isReservedPlatformProfileId(profileId) || getBuiltInReadinessProfile(profileId) !== void 0) {
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1622,7 +1622,7 @@ declare const OntologyScopeSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1622
1622
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1623
1623
|
route: z.ZodOptional<z.ZodString>;
|
|
1624
1624
|
}, z.core.$loose>>>>;
|
|
1625
|
-
}, z.core.$
|
|
1625
|
+
}, z.core.$strict>>;
|
|
1626
1626
|
type OntologyScope = z.infer<typeof OntologyScopeSchema>;
|
|
1627
1627
|
|
|
1628
1628
|
declare const SystemApiInterfaceSchema: z.ZodObject<{
|
|
@@ -2269,7 +2269,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
2269
2269
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2270
2270
|
route: z.ZodOptional<z.ZodString>;
|
|
2271
2271
|
}, z.core.$loose>>>>;
|
|
2272
|
-
}, z.core.$
|
|
2272
|
+
}, z.core.$strict>>>;
|
|
2273
2273
|
resources: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2274
2274
|
id: z.ZodString;
|
|
2275
2275
|
order: z.ZodDefault<z.ZodNumber>;
|
|
@@ -6480,7 +6480,7 @@ declare const OntologyScopeSchema: z.ZodDefault<z.ZodObject<{
|
|
|
6480
6480
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6481
6481
|
route: z.ZodOptional<z.ZodString>;
|
|
6482
6482
|
}, z.core.$loose>>>>;
|
|
6483
|
-
}, z.core.$
|
|
6483
|
+
}, z.core.$strict>>;
|
|
6484
6484
|
type OntologyScope = z.infer<typeof OntologyScopeSchema>;
|
|
6485
6485
|
|
|
6486
6486
|
declare const SystemApiInterfaceSchema: z.ZodObject<{
|
|
@@ -7127,7 +7127,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
7127
7127
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7128
7128
|
route: z.ZodOptional<z.ZodString>;
|
|
7129
7129
|
}, z.core.$loose>>>>;
|
|
7130
|
-
}, z.core.$
|
|
7130
|
+
}, z.core.$strict>>>;
|
|
7131
7131
|
resources: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7132
7132
|
id: z.ZodString;
|
|
7133
7133
|
order: z.ZodDefault<z.ZodNumber>;
|
package/dist/test-utils/index.js
CHANGED
|
@@ -8541,6 +8541,8 @@ createAdapter("acqDb", [
|
|
|
8541
8541
|
"addCompaniesToList",
|
|
8542
8542
|
"updateCompanyStage",
|
|
8543
8543
|
"updateContactStage",
|
|
8544
|
+
"clearCompanyStages",
|
|
8545
|
+
"clearContactStages",
|
|
8544
8546
|
// Company operations
|
|
8545
8547
|
"createCompany",
|
|
8546
8548
|
"upsertCompany",
|
|
@@ -8567,6 +8569,8 @@ createAdapter("acqDb", [
|
|
|
8567
8569
|
"getDealById",
|
|
8568
8570
|
"getContactById",
|
|
8569
8571
|
"getCompanyById",
|
|
8572
|
+
"listDeals",
|
|
8573
|
+
"getDealPipelineAnalytics",
|
|
8570
8574
|
// Deal transitions
|
|
8571
8575
|
"updateDiscoveryData",
|
|
8572
8576
|
"updateProposalData",
|
|
@@ -8644,6 +8648,8 @@ createAdapter("list", [
|
|
|
8644
8648
|
"recordExecution",
|
|
8645
8649
|
"updateCompanyStage",
|
|
8646
8650
|
"updateContactStage",
|
|
8651
|
+
"clearCompanyStages",
|
|
8652
|
+
"clearContactStages",
|
|
8647
8653
|
"listPendingCompanyIds",
|
|
8648
8654
|
"listPendingContactIds"
|
|
8649
8655
|
]);
|
|
@@ -8777,7 +8783,7 @@ var OntologyScopeSchema = z.object({
|
|
|
8777
8783
|
sharedProperties: z.record(OntologyIdSchema, OntologySharedPropertySchema).default({}).optional(),
|
|
8778
8784
|
groups: z.record(OntologyIdSchema, OntologyGroupSchema).default({}).optional(),
|
|
8779
8785
|
endpoints: z.record(OntologyIdSchema, OntologyEndpointTypeSchema).default({}).optional()
|
|
8780
|
-
}).default({});
|
|
8786
|
+
}).strict().default({});
|
|
8781
8787
|
var SCOPE_KIND = {
|
|
8782
8788
|
objectTypes: "object",
|
|
8783
8789
|
linkTypes: "link",
|
|
@@ -9030,29 +9036,45 @@ var SystemUiSchema = z.object({
|
|
|
9030
9036
|
path: PathSchema,
|
|
9031
9037
|
surfaces: ReferenceIdsSchema,
|
|
9032
9038
|
icon: IconNameSchema.optional()
|
|
9033
|
-
});
|
|
9039
|
+
}).strict();
|
|
9034
9040
|
var SystemInterfaceKeySchema = ModelIdSchema;
|
|
9035
9041
|
var SystemInterfaceLifecycleSchema = z.enum(["draft", "active", "disabled", "deprecated", "archived"]).meta({ label: "System interface lifecycle", color: "teal" });
|
|
9036
9042
|
var SYSTEM_INTERFACE_PROFILES = [
|
|
9037
9043
|
{
|
|
9038
9044
|
systemPath: "sales.lead-gen",
|
|
9039
9045
|
interfaceKey: "api",
|
|
9040
|
-
readinessProfile: "sales.lead-gen.api"
|
|
9046
|
+
readinessProfile: "sales.lead-gen.api",
|
|
9047
|
+
validation: "built-in"
|
|
9041
9048
|
},
|
|
9042
9049
|
{
|
|
9043
9050
|
systemPath: "sales.crm",
|
|
9044
9051
|
interfaceKey: "api",
|
|
9045
|
-
readinessProfile: "sales.crm.api"
|
|
9052
|
+
readinessProfile: "sales.crm.api",
|
|
9053
|
+
validation: "built-in"
|
|
9046
9054
|
},
|
|
9047
9055
|
{
|
|
9048
9056
|
systemPath: "sales.lead-gen",
|
|
9049
9057
|
interfaceKey: "crm-handoff",
|
|
9050
|
-
readinessProfile: "sales.lead-gen.crm-handoff"
|
|
9058
|
+
readinessProfile: "sales.lead-gen.crm-handoff",
|
|
9059
|
+
validation: "built-in"
|
|
9060
|
+
},
|
|
9061
|
+
{
|
|
9062
|
+
// Gated by `CONTENT_API_INTERFACE` in `apps/api/src/business/content/organization-model.ts`,
|
|
9063
|
+
// which every `/api/content/*` and `/api/external/content/*` route asserts. Contract-validated
|
|
9064
|
+
// rather than built-in because the required step catalog is per-adopter: Elevasis declares
|
|
9065
|
+
// `content:catalog/long-form-to-shorts-steps`, a tenant declares its own.
|
|
9066
|
+
systemPath: "content",
|
|
9067
|
+
interfaceKey: "api",
|
|
9068
|
+
readinessProfile: "content.api",
|
|
9069
|
+
validation: "contract"
|
|
9051
9070
|
}
|
|
9052
9071
|
];
|
|
9053
|
-
|
|
9072
|
+
SYSTEM_INTERFACE_PROFILES.map(
|
|
9054
9073
|
(profile) => profile.readinessProfile
|
|
9055
9074
|
);
|
|
9075
|
+
var BUILT_IN_VALIDATED_PROFILE_IDS = SYSTEM_INTERFACE_PROFILES.filter(
|
|
9076
|
+
(profile) => profile.validation === "built-in"
|
|
9077
|
+
).map((profile) => profile.readinessProfile);
|
|
9056
9078
|
var SystemInterfaceReadinessProfileSchema = z.string().trim().min(1);
|
|
9057
9079
|
var SystemInterfaceResourceScopeSchema = z.array(ModelIdSchema).default([]);
|
|
9058
9080
|
var SystemApiInterfaceReadinessContractSchema = z.object({
|
|
@@ -9090,7 +9112,7 @@ var SystemApiInterfaceSchema = z.object({
|
|
|
9090
9112
|
readinessContract: SystemApiInterfaceReadinessContractSchema.optional()
|
|
9091
9113
|
}).strict();
|
|
9092
9114
|
function isReservedPlatformProfileId(profileId) {
|
|
9093
|
-
return
|
|
9115
|
+
return BUILT_IN_VALIDATED_PROFILE_IDS.includes(profileId);
|
|
9094
9116
|
}
|
|
9095
9117
|
function isBuiltInReadinessProfile(profileId) {
|
|
9096
9118
|
return isReservedPlatformProfileId(profileId) || getBuiltInReadinessProfile(profileId) !== void 0;
|
|
@@ -27635,6 +27657,8 @@ var mockAcqDb = (overrides) => createMockAdapter(
|
|
|
27635
27657
|
"addCompaniesToList",
|
|
27636
27658
|
"updateCompanyStage",
|
|
27637
27659
|
"updateContactStage",
|
|
27660
|
+
"clearCompanyStages",
|
|
27661
|
+
"clearContactStages",
|
|
27638
27662
|
"createCompany",
|
|
27639
27663
|
"upsertCompany",
|
|
27640
27664
|
"updateCompany",
|
|
@@ -27658,6 +27682,8 @@ var mockAcqDb = (overrides) => createMockAdapter(
|
|
|
27658
27682
|
"getDealById",
|
|
27659
27683
|
"getContactById",
|
|
27660
27684
|
"getCompanyById",
|
|
27685
|
+
"listDeals",
|
|
27686
|
+
"getDealPipelineAnalytics",
|
|
27661
27687
|
"updateDiscoveryData",
|
|
27662
27688
|
"updateProposalData",
|
|
27663
27689
|
"markProposalSent",
|
|
@@ -27734,6 +27760,8 @@ var mockList = (overrides) => createMockAdapter(
|
|
|
27734
27760
|
"recordExecution",
|
|
27735
27761
|
"updateCompanyStage",
|
|
27736
27762
|
"updateContactStage",
|
|
27763
|
+
"clearCompanyStages",
|
|
27764
|
+
"clearContactStages",
|
|
27737
27765
|
"listPendingCompanyIds",
|
|
27738
27766
|
"listPendingContactIds"
|
|
27739
27767
|
],
|
package/dist/worker/index.d.ts
CHANGED
|
@@ -6654,7 +6654,7 @@ declare const OntologyScopeSchema: z.ZodDefault<z.ZodObject<{
|
|
|
6654
6654
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6655
6655
|
route: z.ZodOptional<z.ZodString>;
|
|
6656
6656
|
}, z.core.$loose>>>>;
|
|
6657
|
-
}, z.core.$
|
|
6657
|
+
}, z.core.$strict>>;
|
|
6658
6658
|
type OntologyScope = z.infer<typeof OntologyScopeSchema>;
|
|
6659
6659
|
|
|
6660
6660
|
declare const SystemApiInterfaceSchema: z.ZodObject<{
|
|
@@ -7301,7 +7301,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
7301
7301
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7302
7302
|
route: z.ZodOptional<z.ZodString>;
|
|
7303
7303
|
}, z.core.$loose>>>>;
|
|
7304
|
-
}, z.core.$
|
|
7304
|
+
}, z.core.$strict>>>;
|
|
7305
7305
|
resources: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7306
7306
|
id: z.ZodString;
|
|
7307
7307
|
order: z.ZodDefault<z.ZodNumber>;
|
|
@@ -12539,7 +12539,7 @@ declare const notifications: TypedAdapter<NotificationToolMap>;
|
|
|
12539
12539
|
* Typed wrapper over platform.call() for acquisition lead management.
|
|
12540
12540
|
* Singleton export -- no credential needed (platform tool).
|
|
12541
12541
|
*
|
|
12542
|
-
*
|
|
12542
|
+
* 60 methods covering lists, companies, contacts, deals, list-stage updates, deal-sync, deal notes, deal tasks, enrichment, and social monitoring operations.
|
|
12543
12543
|
* organizationId is injected server-side by the dispatcher -- never sent from the SDK.
|
|
12544
12544
|
*/
|
|
12545
12545
|
|
|
@@ -12613,9 +12613,9 @@ declare const list: TypedAdapter<ListToolMap>;
|
|
|
12613
12613
|
/**
|
|
12614
12614
|
* Artifacts Platform Tool Adapter
|
|
12615
12615
|
*
|
|
12616
|
-
* Focused wrapper for the org-scoped governing-document store
|
|
12617
|
-
*
|
|
12618
|
-
* (platform tool).
|
|
12616
|
+
* Focused wrapper for the org-scoped governing-document store, keyed by
|
|
12617
|
+
* owner and kind, for acquisition's audits, proposals, and ICP docs.
|
|
12618
|
+
* Singleton export -- no credential needed (platform tool).
|
|
12619
12619
|
*
|
|
12620
12620
|
* `kind` convention: any artifact written for the content pipeline (an
|
|
12621
12621
|
* `ownerKind: 'organization'` document -- a selection brief, an idea bank,
|
|
@@ -12645,13 +12645,23 @@ declare const artifacts: TypedAdapter<ArtifactsToolMap>;
|
|
|
12645
12645
|
* Decision 4, enforced by omission).
|
|
12646
12646
|
*
|
|
12647
12647
|
* `createAttempt.sourceExecutionId` is `string | null | undefined` on the
|
|
12648
|
-
* underlying `ContentToolMap
|
|
12649
|
-
*
|
|
12650
|
-
*
|
|
12651
|
-
*
|
|
12652
|
-
* `context.executionId
|
|
12653
|
-
*
|
|
12654
|
-
*
|
|
12648
|
+
* underlying `ContentToolMap`, and this adapter narrows it to a **required
|
|
12649
|
+
* key with a nullable value**: the caller must supply it, but may supply
|
|
12650
|
+
* `null`. Requiring the key is the SDK-layer analog of `organizationId` never
|
|
12651
|
+
* appearing in the params type at all -- a worker always has its own
|
|
12652
|
+
* `context.executionId`, so a producer cannot silently forget it, which is
|
|
12653
|
+
* what the step-state model's write-at-start/patch-at-end contract depends on
|
|
12654
|
+
* (see `mock-pipeline-shared.ts`).
|
|
12655
|
+
*
|
|
12656
|
+
* Permitting `null` is what makes a backfill expressible. The narrowing was
|
|
12657
|
+
* briefly `sourceExecutionId: string`, which excluded the one-time import of
|
|
12658
|
+
* records that have no execution behind them and never will -- core's
|
|
12659
|
+
* `CreateContentItemAttemptRequestSchema` types it `UuidSchema.nullable().optional()`
|
|
12660
|
+
* and the DB column is nullable, so the restriction was an SDK compile-time
|
|
12661
|
+
* guard rather than a data constraint, and the API already accepts null
|
|
12662
|
+
* (`reviewItem` writes a review attempt with `sourceExecutionId: null`).
|
|
12663
|
+
* Passing `null` states "no execution, and never will be"; it is not an
|
|
12664
|
+
* invitation to invent an execution id to satisfy the type.
|
|
12655
12665
|
*
|
|
12656
12666
|
* `createAttempt.status` is a real field on `ContentToolMap` -- a producer
|
|
12657
12667
|
* starting a step sends `'running'` and the dispatcher forwards it. It was
|
|
@@ -12663,7 +12673,7 @@ declare const artifacts: TypedAdapter<ArtifactsToolMap>;
|
|
|
12663
12673
|
/** The content adapter's public shape -- `TypedAdapter<ContentToolMap>` with `createAttempt` narrowed. */
|
|
12664
12674
|
type ContentAdapter = Omit<TypedAdapter<ContentToolMap>, 'createAttempt'> & {
|
|
12665
12675
|
createAttempt: (params: Omit<ContentToolMap['createAttempt']['params'], 'sourceExecutionId'> & {
|
|
12666
|
-
sourceExecutionId: string;
|
|
12676
|
+
sourceExecutionId: string | null;
|
|
12667
12677
|
}) => Promise<ContentToolMap['createAttempt']['result']>;
|
|
12668
12678
|
};
|
|
12669
12679
|
/**
|
package/dist/worker/index.js
CHANGED
|
@@ -6700,6 +6700,8 @@ var acqDb = createAdapter("acqDb", [
|
|
|
6700
6700
|
"addCompaniesToList",
|
|
6701
6701
|
"updateCompanyStage",
|
|
6702
6702
|
"updateContactStage",
|
|
6703
|
+
"clearCompanyStages",
|
|
6704
|
+
"clearContactStages",
|
|
6703
6705
|
// Company operations
|
|
6704
6706
|
"createCompany",
|
|
6705
6707
|
"upsertCompany",
|
|
@@ -6726,6 +6728,8 @@ var acqDb = createAdapter("acqDb", [
|
|
|
6726
6728
|
"getDealById",
|
|
6727
6729
|
"getContactById",
|
|
6728
6730
|
"getCompanyById",
|
|
6731
|
+
"listDeals",
|
|
6732
|
+
"getDealPipelineAnalytics",
|
|
6729
6733
|
// Deal transitions
|
|
6730
6734
|
"updateDiscoveryData",
|
|
6731
6735
|
"updateProposalData",
|
|
@@ -6803,6 +6807,8 @@ var list = createAdapter("list", [
|
|
|
6803
6807
|
"recordExecution",
|
|
6804
6808
|
"updateCompanyStage",
|
|
6805
6809
|
"updateContactStage",
|
|
6810
|
+
"clearCompanyStages",
|
|
6811
|
+
"clearContactStages",
|
|
6806
6812
|
"listPendingCompanyIds",
|
|
6807
6813
|
"listPendingContactIds"
|
|
6808
6814
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.48.0",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"tsup": "^8.0.0",
|
|
56
56
|
"typescript": "5.9.2",
|
|
57
57
|
"zod": "^4.1.0",
|
|
58
|
-
"@repo/core": "0.
|
|
59
|
-
"@repo/
|
|
60
|
-
"@repo/
|
|
58
|
+
"@repo/core": "0.63.0",
|
|
59
|
+
"@repo/typescript-config": "0.0.0",
|
|
60
|
+
"@repo/eslint-config": "0.0.0"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"lint": "eslint src --max-warnings 0",
|
package/reference/_navigation.md
CHANGED
|
@@ -210,7 +210,7 @@ Universal scaffold documentation for all SDK projects. Source locations are co-l
|
|
|
210
210
|
|
|
211
211
|
The bundled agent-rule corpus. Locations are relative to this file -- the `reference/` root of the installed `@elevasis/sdk` package -- so every row resolves offline in a cloned project with no monorepo.
|
|
212
212
|
|
|
213
|
-
Agent rules indexed:
|
|
213
|
+
Agent rules indexed: 19.
|
|
214
214
|
|
|
215
215
|
### Core Config
|
|
216
216
|
|
|
@@ -226,6 +226,7 @@ Agent rules indexed: 18.
|
|
|
226
226
|
| Operations | `rules/operations.md` | Platform workflows, agents, resource definitions, and deployment for the operations/ surface | Editing anything under `operations/` -- workflows, agents, or resource definitions. |
|
|
227
227
|
| Platform | `rules/platform.md` | Platform conventions -- SDK workflows, agents, deployment, resource registry | Authoring a workflow or agent definition, or registering a resource in the registry. |
|
|
228
228
|
| Deployment | `rules/deployment.md` | Deployment workflow -- check-first, dev vs prod, version bumping, common errors | Before any deploy -- a plain `run deploy` targets production by default. |
|
|
229
|
+
| Content | `rules/content.md` | Building the content System behind the shipped pipeline, item, and distribution routes -- which recipe to read, and the catalog vocabulary that is model-owned rather than coded | Editing anything under `ui/src/routes/content/` -- items, pipelines, distributions, or a review gate. |
|
|
229
230
|
| Execution Model | `rules/execution.md` | Execution model -- timeouts, memory, concurrency, org isolation, runtime constraints | Hitting a timeout, memory ceiling, concurrency limit, or org-isolation question at runtime. |
|
|
230
231
|
| Agent Runtime | `rules/agent-runtime.md` | Agent runtime behavior -- iteration response shape, session memory and replay, prose normalization, and why a redeploy is what makes a platform fix live | Debugging an agent turn -- a missing reply, a corrupted one, a session that forgot, or an unenforced schema. |
|
|
231
232
|
| Error Handling | `rules/error-handling.md` | Error handling -- ExecutionError vs PlatformToolError, retry logic, no auto-retry | Writing or debugging a step handler that throws, catches, or retries. |
|
|
@@ -235,7 +236,7 @@ Agent rules indexed: 18.
|
|
|
235
236
|
|
|
236
237
|
| Rule | Location | Description | When to Load |
|
|
237
238
|
| --- | --- | --- | --- |
|
|
238
|
-
| Organization OS | `rules/organization-os.md` | Organization OS orientation -- what the semantic contract layer is, which surface owns what, and where the full reference docs live; concrete edit rules live in organization-model.md | Before an org-model change, to see how Systems, ontology, resources,
|
|
239
|
+
| Organization OS | `rules/organization-os.md` | Organization OS orientation -- what the semantic contract layer is, which surface owns what, and where the full reference docs live; concrete edit rules live in organization-model.md | Before an org-model change, to see how Systems, ontology, resources, roles, and knowledge relate. |
|
|
239
240
|
| Package Taxonomy | `rules/package-taxonomy.md` | Package taxonomy (consumer view) -- external projects consume the published @elevasis/* surface only; workspace-internal @repo/elevasis-* packages are not installable here | Adding a dependency, or resolving an `@elevasis/*` import or subpath question. |
|
|
240
241
|
| Active Change Index | `rules/active-change-index.md` | Which bundled references to load for platform areas under active change, and how to resolve drift between the bundled snapshot and live platform behavior | Before trusting a stable scaffold doc in a fast-moving area -- lists what in-progress work overrides. |
|
|
241
242
|
|
|
@@ -949,6 +949,16 @@
|
|
|
949
949
|
"sourcePath": "packages/sdk/docs/agent-rules/deployment.md",
|
|
950
950
|
"referencePath": "rules/deployment.md"
|
|
951
951
|
},
|
|
952
|
+
{
|
|
953
|
+
"packageName": "@elevasis/sdk",
|
|
954
|
+
"title": "Content",
|
|
955
|
+
"description": "Building the content System behind the shipped pipeline, item, and distribution routes -- which recipe to read, and the catalog vocabulary that is model-owned rather than coded",
|
|
956
|
+
"group": "Operations",
|
|
957
|
+
"order": 4,
|
|
958
|
+
"loadWhen": "Editing anything under `ui/src/routes/content/` -- items, pipelines, distributions, or a review gate.",
|
|
959
|
+
"sourcePath": "packages/sdk/docs/agent-rules/content.md",
|
|
960
|
+
"referencePath": "rules/content.md"
|
|
961
|
+
},
|
|
952
962
|
{
|
|
953
963
|
"packageName": "@elevasis/sdk",
|
|
954
964
|
"title": "Execution Model",
|
|
@@ -995,7 +1005,7 @@
|
|
|
995
1005
|
"description": "Organization OS orientation -- what the semantic contract layer is, which surface owns what, and where the full reference docs live; concrete edit rules live in organization-model.md",
|
|
996
1006
|
"group": "Orientation",
|
|
997
1007
|
"order": 1,
|
|
998
|
-
"loadWhen": "Before an org-model change, to see how Systems, ontology, resources,
|
|
1008
|
+
"loadWhen": "Before an org-model change, to see how Systems, ontology, resources, roles, and knowledge relate.",
|
|
999
1009
|
"sourcePath": "packages/sdk/docs/agent-rules/organization-os.md",
|
|
1000
1010
|
"referencePath": "rules/organization-os.md"
|
|
1001
1011
|
},
|
|
@@ -35,24 +35,27 @@ The model is versioned and currently validates against `version: 1`.
|
|
|
35
35
|
Top-level fields:
|
|
36
36
|
|
|
37
37
|
- `version`
|
|
38
|
+
- `snapshotHash`
|
|
38
39
|
- `domainMetadata`
|
|
39
40
|
- `branding`
|
|
40
41
|
- `navigation`
|
|
41
|
-
- `sales`
|
|
42
|
-
- `prospecting`
|
|
43
|
-
- `projects`
|
|
44
42
|
- `identity`
|
|
43
|
+
- `clients`
|
|
45
44
|
- `customers`
|
|
46
45
|
- `offerings`
|
|
47
46
|
- `roles`
|
|
48
47
|
- `goals`
|
|
49
48
|
- `systems`
|
|
49
|
+
- `ontology`
|
|
50
50
|
- `resources`
|
|
51
|
-
- `
|
|
52
|
-
- `
|
|
51
|
+
- `topology`
|
|
52
|
+
- `actions`
|
|
53
|
+
- `entities`
|
|
53
54
|
- `knowledge`
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
`sales`, `prospecting`, `projects`, `statuses`, and `policies` were removed from the top-level contract; do not author against them.
|
|
57
|
+
|
|
58
|
+
The pure collection domains are id-keyed maps: `systems`, `roles`, `goals`, `clients`, `customers`, `offerings`, `resources`, `actions`, `entities`, and `knowledge`. `ontology` is an `OntologyScope` object (not an id-keyed map at the top level) and `topology` is a relationships record. The map key must match the entry `id` for id-keyed domains. Entries carry `order` for deterministic ordered views; use `listDomain(record)` when order matters.
|
|
56
59
|
|
|
57
60
|
Resource identity is authored in `resources`. Runtime workflows, agents, integrations, and scripts import those descriptors, derive `resourceId` and kind from them, and attach executable behavior in operations code.
|
|
58
61
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Building the content System behind the shipped pipeline, item, and distribution routes -- which recipe to read, and the catalog vocabulary that is model-owned rather than coded
|
|
3
|
+
paths:
|
|
4
|
+
- ui/src/routes/content.tsx
|
|
5
|
+
- ui/src/routes/content/**
|
|
6
|
+
---
|
|
7
|
+
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
8
|
+
<!-- Regenerate: pnpm scaffold:sync -->
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Content
|
|
12
|
+
|
|
13
|
+
- **These routes render and do nothing until the System behind them is built.** Unlike CRM and lead-gen, `content` has no entry yet in `core/config/organization-model/systems.ts` -- the routes gate on `accessKey="content"` with no System, ontology, or resources behind it on a fresh project.
|
|
14
|
+
- **One recipe covers this surface and no other rule names it.** `extend-content.md` covers the System, its pipeline/step/status/pillar/platform catalogs, and the `content` workflow adapter. Read it before authoring.
|
|
15
|
+
- **A pipeline is data, not code.** Pipelines and their ordered steps are catalog records (`content:catalog/pipeline`, `content:catalog/{pipelineId}-steps`); adding one is an org-model edit plus one workflow per step, never a shared-UI or route change.
|
|
16
|
+
- **Pipeline, step, status, and pillar vocabulary is model-owned, never a local constant.** Copying catalog entries into a `const` is architecturally excluded -- every project owns its own model, so the copy rots silently. Read catalog entries from the resolved model.
|
|
17
|
+
- **`apiInterface` is adopt-only here.** Content uses the flat `system.apiInterface` marker on the `content` System path; readiness is derived from scoped resources, ontology bindings, and required catalogs -- never invent a readiness profile.
|
|
18
|
+
|
|
19
|
+
## Related Rules
|
|
20
|
+
|
|
21
|
+
- **organization-model.md** -- authoring the System, its ontology catalogs, and the resource descriptors
|
|
22
|
+
- **operations.md** -- registering the per-step workflows so they actually deploy
|
|
23
|
+
- **ui.md** -- the navigation and surface declarations these pages bind to
|
|
24
|
+
|
|
25
|
+
## References
|
|
26
|
+
|
|
27
|
+
- `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-content.md` -- the System, catalog model, and content workflow adapter build recipe
|
|
@@ -11,7 +11,7 @@ paths:
|
|
|
11
11
|
|
|
12
12
|
# Organization Model Edit Guide
|
|
13
13
|
|
|
14
|
-
`core/config/organization-model.ts` is the single source of truth for this project's organizational identity -- it encodes customers, offerings, roles, goals, Systems, ontology,
|
|
14
|
+
`core/config/organization-model.ts` is the single source of truth for this project's organizational identity -- it encodes customers, offerings, roles, goals, Systems, ontology, Knowledge, config, and Resources descriptors that agents, workflows, and the UI shell all consume at runtime. This rule owns the edit rules for that file; `organization-os.md` is the orientation and reference index around it.
|
|
15
15
|
|
|
16
16
|
New semantic authoring should start in system-colocated `ontology` scopes. Top-level `entities` and top-level `actions` remain compatibility mirrors while published consumers finish moving to compiled ontology indexes. `System.content` is retired.
|
|
17
17
|
|
|
@@ -53,7 +53,7 @@ Bare `/om` runs the layered flow (identity → customers → offerings → roles
|
|
|
53
53
|
- `System.config` owns system-local JSON settings and defaults.
|
|
54
54
|
- `resources` own executable workflow/agent descriptors, `systemPath`, owners, governance status, code references, and runtime implementation links. Resource identity is authored once in the id-keyed `resources` map; operations imports those descriptors and derives runtime `resourceId` / `type` while assembling the `DeploymentSpec`.
|
|
55
55
|
- `resource.ontology.actions` describes the ontology actions a Resource performs, `resource.ontology.primaryAction` names the default/selectable action when a Resource has one, and `resource.ontology` also describes reads, writes, catalog use, and emitted events.
|
|
56
|
-
- `topology.relationships` owns durable operational wiring between Systems, Resources, ontology nodes,
|
|
56
|
+
- `topology.relationships` owns durable operational wiring between Systems, Resources, ontology nodes, roles, triggers, checkpoints, and external resources. Keep credential values, provider webhook mechanics, deployment environment settings, execution logs, and per-run scheduler state outside the OM.
|
|
57
57
|
- `knowledge` owns long-form playbooks, strategies, references, and governance context.
|
|
58
58
|
- Top-level `entities` and top-level `actions` are compatibility mirrors only. Keep them aligned when current published consumers still need them, rather than inventing a separate source of truth, but do not treat them as the primary authoring surface.
|
|
59
59
|
|
|
@@ -63,7 +63,13 @@ Do not add `sales.actions` to the org model -- the v1 server-side override surfa
|
|
|
63
63
|
|
|
64
64
|
## `System.apiInterface`
|
|
65
65
|
|
|
66
|
-
`System.apiInterface` is an adopt-only marker for platform-provided API capabilities, with derived readiness requirements. Use only cataloged profiles from `scaffold/reference/system-interface-capabilities.md`, on their convention-locked System paths
|
|
66
|
+
`System.apiInterface` is an adopt-only marker for platform-provided API capabilities, with derived readiness requirements. Use only cataloged profiles from `scaffold/reference/system-interface-capabilities.md`, on their convention-locked System paths -- `sales.lead-gen`, `sales.crm`, and `content`. Satisfy readiness through ontology/resources/catalogs/topology authoring. A System that adopts no cataloged capability does not declare `apiInterface` and must not invent a readiness profile; route that behavior through workflows/operations and the OM layers this project owns.
|
|
67
|
+
|
|
68
|
+
**Why the catalog is closed, and why that is not a ceiling.** A `readinessProfile` is not a label you choose -- it names a capability the platform API actually gates a route on, so only the platform can mint one. `SystemInterfaceReadinessProfileSchema` accepts any non-empty string, but that permissiveness lives at the schema layer and is not a statement that any id is meaningful: an uncataloged id names no route, so the System computes as **ready** and every call still fails. That is strictly worse than a missing marker, which at least reports `missing-interface`. If your project needs an API capability that is not cataloged, that is a platform request -- adding a route and a catalog entry -- not something to work around locally by inventing an id.
|
|
69
|
+
|
|
70
|
+
**Adopting `content`.** `content.api` gates every `/api/content/*` and `/api/external/content/*` route. It is cataloged and adoptable, and unlike the three `sales.*` profiles it is **contract-validated**: its structural requirements differ per project (each declares its own pipeline step catalog), so a System adopting it MUST declare a `readinessContract` alongside it. Omitting the contract produces `missing-readiness-contract` at deploy preflight.
|
|
71
|
+
|
|
72
|
+
`registerBuiltInReadinessProfile` is **not** available to you as an extension point, despite what older guidance said. It mutates an in-process registry, and the readiness assertion that gates the API runs in the API process -- a registration made from your worker is never seen by it. `readinessContract` is your route to structural readiness.
|
|
67
73
|
|
|
68
74
|
A System with no `apiInterface` is the designed opt-out for a capability this project does not use. That absence is silent by construction and is NOT a defect -- never "fix" it by adding a marker. The anomaly is a stub marker with `resourceIds: []`, which the deploy gate rejects.
|
|
69
75
|
|
|
@@ -7,7 +7,7 @@ description: Organization OS orientation -- what the semantic contract layer is,
|
|
|
7
7
|
|
|
8
8
|
# Organization OS
|
|
9
9
|
|
|
10
|
-
Organization OS is the semantic contract layer defining how organizations, Systems, Actions, ontology, resources,
|
|
10
|
+
Organization OS is the semantic contract layer defining how organizations, Systems, Actions, ontology, resources, roles, goals, knowledge, and runtime surfaces relate. This project consumes it through published `@elevasis/core` / `@elevasis/sdk` configuration and does not maintain the upstream schema.
|
|
11
11
|
|
|
12
12
|
**This rule is orientation and an index only.** The concrete edit rules -- the `/om` ceremony and its gates, `System.apiInterface` versus ontology `interface` records, resource identity and `systemPath` attachment, the ontology/config/knowledge authoring boundary, and validation -- live in `organization-model.md`. Read that rule before changing anything under `core/config/`; never author org-model changes from this rule alone.
|
|
13
13
|
|
|
@@ -26,7 +26,7 @@ Organization OS is the semantic contract layer defining how organizations, Syste
|
|
|
26
26
|
|
|
27
27
|
- **Platform configuration:** `systems`, `branding`, `navigation`
|
|
28
28
|
- **Organizational reality:** `identity`, `customers`, `offerings`, `roles`, `goals`
|
|
29
|
-
- **Governance:** `resources
|
|
29
|
+
- **Governance:** `resources` and resource-to-System relationships
|
|
30
30
|
- **Ontology, config, and knowledge:** `System.ontology` owns durable semantic contracts (object types, action types, catalog types, link types, event types, interfaces, surfaces). `System.config` owns system-local JSON settings and defaults. `knowledge` is a flat id-keyed map of playbooks, strategies, and references that explain or govern systems and ontology records.
|
|
31
31
|
|
|
32
32
|
`System.apiInterface` is a flat, adopt-only System field marking a platform-provided API capability -- not an ontology record and not a general extension point. Its authoring rules, readiness requirements, and opt-out semantics are owned by `organization-model.md`.
|