@elevasis/sdk 1.47.0 → 1.49.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 +1034 -319
- package/dist/index.d.ts +687 -49
- package/dist/index.js +297 -47
- package/dist/node/index.d.ts +110 -26
- package/dist/test-utils/index.d.ts +649 -36
- package/dist/test-utils/index.js +275 -45
- package/dist/worker/index.d.ts +687 -53
- package/dist/worker/index.js +121 -6
- package/package.json +2 -2
- package/reference/_navigation.md +7 -6
- package/reference/_reference-manifest.json +12 -2
- package/reference/core/index.mdx +6 -4
- package/reference/index.mdx +11 -5
- package/reference/packages/core/src/README.md +46 -44
- package/reference/packages/core/src/content/README.md +13 -12
- 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/ui.md +1 -1
- package/reference/rules/vibe-intents.md +19 -16
- package/reference/rules/vibe.md +32 -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 +172 -30
- package/reference/scaffold/reference/glossary.md +2 -2
- package/reference/scaffold/reference/system-interface-capabilities.md +26 -6
- package/reference/sdk/cli-management.mdx +246 -41
- package/reference/sdk/cli.mdx +103 -64
- package/reference/sdk/define-builders.mdx +1 -1
- package/reference/sdk/deployment/command-center.mdx +2 -2
- package/reference/sdk/deployment/index.mdx +1 -1
- package/reference/sdk/exports.mdx +4 -4
- package/reference/sdk/framework/agent.mdx +4 -3
- package/reference/sdk/framework/index.mdx +1 -1
- package/reference/sdk/framework/project-structure.mdx +34 -23
- package/reference/sdk/framework/tutorial-system.mdx +1 -1
- package/reference/sdk/getting-started.mdx +25 -52
- package/reference/sdk/index.mdx +3 -3
- package/reference/sdk/platform-tools/adapters-integration.mdx +1 -1
- package/reference/sdk/platform-tools/adapters-platform.mdx +5 -5
- package/reference/sdk/platform-tools/type-safety.mdx +1 -1
- package/reference/sdk/resources/patterns.mdx +10 -11
- package/reference/sdk/resources/types.mdx +15 -9
- package/reference/sdk/templates/data-enrichment.mdx +1 -1
- package/reference/sdk/templates/email-sender.mdx +1 -1
- package/reference/sdk/templates/index.mdx +47 -47
- package/reference/sdk/templates/lead-scorer.mdx +1 -1
- package/reference/sdk/templates/pdf-generator.mdx +42 -24
- package/reference/sdk/templates/recurring-job.mdx +20 -15
- package/reference/sdk/templates/text-classifier.mdx +1 -1
- package/reference/sdk/templates/web-scraper.mdx +9 -5
- package/reference/ui/exports.mdx +1 -1
- package/reference/ui/index.mdx +2 -2
package/dist/worker/index.js
CHANGED
|
@@ -2749,6 +2749,12 @@ function buildReasoningRequest(iterationContext) {
|
|
|
2749
2749
|
capabilities
|
|
2750
2750
|
};
|
|
2751
2751
|
}
|
|
2752
|
+
|
|
2753
|
+
// ../core/src/execution/engine/llm/types.ts
|
|
2754
|
+
function extractMessageText(content2) {
|
|
2755
|
+
if (typeof content2 === "string") return content2;
|
|
2756
|
+
return content2.filter((part) => part.type === "text").map((part) => part.text).join("\n");
|
|
2757
|
+
}
|
|
2752
2758
|
var ToolCallActionSchema = z.object({
|
|
2753
2759
|
type: z.literal("tool-call"),
|
|
2754
2760
|
id: z.string().optional(),
|
|
@@ -2818,6 +2824,19 @@ var GPT5ConfigSchema = z.object({
|
|
|
2818
2824
|
topP: z.number().min(0).max(1).optional(),
|
|
2819
2825
|
modelOptions: GPT5OptionsSchema.optional()
|
|
2820
2826
|
});
|
|
2827
|
+
var GPT56OptionsSchema = z.object({
|
|
2828
|
+
reasoning_effort: z.enum(["none", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
2829
|
+
verbosity: z.enum(["low", "medium", "high"]).optional()
|
|
2830
|
+
});
|
|
2831
|
+
var GPT56ConfigSchema = z.object({
|
|
2832
|
+
model: z.enum(["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"]),
|
|
2833
|
+
provider: z.enum(["openai"]),
|
|
2834
|
+
apiKey: z.string(),
|
|
2835
|
+
temperature: z.literal(1).optional(),
|
|
2836
|
+
maxOutputTokens: z.number().min(4e3).optional(),
|
|
2837
|
+
topP: z.number().min(0).max(1).optional(),
|
|
2838
|
+
modelOptions: GPT56OptionsSchema.optional()
|
|
2839
|
+
});
|
|
2821
2840
|
var MockConfigSchema = z.object({
|
|
2822
2841
|
model: z.enum(["mock"]),
|
|
2823
2842
|
provider: z.enum(["mock"]),
|
|
@@ -2870,9 +2889,12 @@ var AnthropicConfigSchema = z.discriminatedUnion("model", [
|
|
|
2870
2889
|
AnthropicClaude5ConfigSchema,
|
|
2871
2890
|
AnthropicStandardConfigSchema
|
|
2872
2891
|
]);
|
|
2892
|
+
var GPT56_CACHE_READ_RATE_MULTIPLIER = 0.1;
|
|
2893
|
+
var CACHE_CREATION_RATE_MULTIPLIER = 1.25;
|
|
2873
2894
|
var MODEL_INFO = {
|
|
2874
2895
|
// OpenAI GPT-5 (Reasoning Models)
|
|
2875
2896
|
"gpt-5": {
|
|
2897
|
+
provider: "openai",
|
|
2876
2898
|
inputCostPer1M: 125,
|
|
2877
2899
|
// $1.25 per 1M tokens
|
|
2878
2900
|
outputCostPer1M: 1e3,
|
|
@@ -2886,6 +2908,7 @@ var MODEL_INFO = {
|
|
|
2886
2908
|
configSchema: GPT5ConfigSchema
|
|
2887
2909
|
},
|
|
2888
2910
|
"gpt-5.4-mini": {
|
|
2911
|
+
provider: "openai",
|
|
2889
2912
|
inputCostPer1M: 75,
|
|
2890
2913
|
// $0.75 per 1M tokens
|
|
2891
2914
|
outputCostPer1M: 450,
|
|
@@ -2899,6 +2922,7 @@ var MODEL_INFO = {
|
|
|
2899
2922
|
configSchema: GPT5ConfigSchema
|
|
2900
2923
|
},
|
|
2901
2924
|
"gpt-5.4-nano": {
|
|
2925
|
+
provider: "openai",
|
|
2902
2926
|
inputCostPer1M: 20,
|
|
2903
2927
|
// $0.20 per 1M tokens
|
|
2904
2928
|
outputCostPer1M: 125,
|
|
@@ -2910,8 +2934,60 @@ var MODEL_INFO = {
|
|
|
2910
2934
|
category: "standard",
|
|
2911
2935
|
configSchema: GPT5ConfigSchema
|
|
2912
2936
|
},
|
|
2937
|
+
// OpenAI GPT-5.6 family (GA 2026-07-09). All three tiers share 1.05M context, 128K max output,
|
|
2938
|
+
// image input, tool use, structured outputs, and prompt caching -- they differ in reasoning depth
|
|
2939
|
+
// and price, not capability. The bare `gpt-5.6` alias is deliberately unregistered; see OpenAIModel.
|
|
2940
|
+
"gpt-5.6-sol": {
|
|
2941
|
+
provider: "openai",
|
|
2942
|
+
inputCostPer1M: 500,
|
|
2943
|
+
// $5.00 per 1M tokens
|
|
2944
|
+
outputCostPer1M: 3e3,
|
|
2945
|
+
// $30.00 per 1M tokens
|
|
2946
|
+
minTokens: 4e3,
|
|
2947
|
+
recommendedTokens: 8e3,
|
|
2948
|
+
maxTokens: 105e4,
|
|
2949
|
+
// 1.05M context window
|
|
2950
|
+
maxOutputTokens: 128e3,
|
|
2951
|
+
category: "reasoning",
|
|
2952
|
+
configSchema: GPT56ConfigSchema,
|
|
2953
|
+
cacheReadRateMultiplier: GPT56_CACHE_READ_RATE_MULTIPLIER,
|
|
2954
|
+
cacheCreationRateMultiplier: CACHE_CREATION_RATE_MULTIPLIER
|
|
2955
|
+
},
|
|
2956
|
+
"gpt-5.6-terra": {
|
|
2957
|
+
provider: "openai",
|
|
2958
|
+
inputCostPer1M: 250,
|
|
2959
|
+
// $2.50 per 1M tokens
|
|
2960
|
+
outputCostPer1M: 1500,
|
|
2961
|
+
// $15.00 per 1M tokens
|
|
2962
|
+
minTokens: 4e3,
|
|
2963
|
+
recommendedTokens: 8e3,
|
|
2964
|
+
maxTokens: 105e4,
|
|
2965
|
+
// 1.05M context window
|
|
2966
|
+
maxOutputTokens: 128e3,
|
|
2967
|
+
category: "standard",
|
|
2968
|
+
configSchema: GPT56ConfigSchema,
|
|
2969
|
+
cacheReadRateMultiplier: GPT56_CACHE_READ_RATE_MULTIPLIER,
|
|
2970
|
+
cacheCreationRateMultiplier: CACHE_CREATION_RATE_MULTIPLIER
|
|
2971
|
+
},
|
|
2972
|
+
"gpt-5.6-luna": {
|
|
2973
|
+
provider: "openai",
|
|
2974
|
+
inputCostPer1M: 100,
|
|
2975
|
+
// $1.00 per 1M tokens
|
|
2976
|
+
outputCostPer1M: 600,
|
|
2977
|
+
// $6.00 per 1M tokens
|
|
2978
|
+
minTokens: 4e3,
|
|
2979
|
+
recommendedTokens: 8e3,
|
|
2980
|
+
maxTokens: 105e4,
|
|
2981
|
+
// 1.05M context window
|
|
2982
|
+
maxOutputTokens: 128e3,
|
|
2983
|
+
category: "standard",
|
|
2984
|
+
configSchema: GPT56ConfigSchema,
|
|
2985
|
+
cacheReadRateMultiplier: GPT56_CACHE_READ_RATE_MULTIPLIER,
|
|
2986
|
+
cacheCreationRateMultiplier: CACHE_CREATION_RATE_MULTIPLIER
|
|
2987
|
+
},
|
|
2913
2988
|
// Mock model for testing
|
|
2914
2989
|
mock: {
|
|
2990
|
+
provider: "mock",
|
|
2915
2991
|
inputCostPer1M: 0,
|
|
2916
2992
|
// Free for tests
|
|
2917
2993
|
outputCostPer1M: 0,
|
|
@@ -2925,6 +3001,7 @@ var MODEL_INFO = {
|
|
|
2925
3001
|
},
|
|
2926
3002
|
// OpenRouter Models (via openrouter.ai)
|
|
2927
3003
|
"openrouter/z-ai/glm-5": {
|
|
3004
|
+
provider: "openrouter",
|
|
2928
3005
|
inputCostPer1M: 72,
|
|
2929
3006
|
// $0.72 per 1M tokens
|
|
2930
3007
|
outputCostPer1M: 230,
|
|
@@ -2938,6 +3015,7 @@ var MODEL_INFO = {
|
|
|
2938
3015
|
},
|
|
2939
3016
|
// Anthropic Claude Models (direct SDK access via @anthropic-ai/sdk)
|
|
2940
3017
|
"claude-opus-5": {
|
|
3018
|
+
provider: "anthropic",
|
|
2941
3019
|
inputCostPer1M: 500,
|
|
2942
3020
|
// $5.00 per 1M tokens
|
|
2943
3021
|
outputCostPer1M: 2500,
|
|
@@ -2951,6 +3029,7 @@ var MODEL_INFO = {
|
|
|
2951
3029
|
configSchema: AnthropicConfigSchema
|
|
2952
3030
|
},
|
|
2953
3031
|
"claude-sonnet-5": {
|
|
3032
|
+
provider: "anthropic",
|
|
2954
3033
|
// List pricing. An introductory rate of $2.00/$10.00 runs through 2026-08-31; encoding the
|
|
2955
3034
|
// temporary rate would make historical cost analytics wrong once it lapses.
|
|
2956
3035
|
inputCostPer1M: 300,
|
|
@@ -2966,6 +3045,7 @@ var MODEL_INFO = {
|
|
|
2966
3045
|
configSchema: AnthropicConfigSchema
|
|
2967
3046
|
},
|
|
2968
3047
|
"claude-haiku-4-5-20251001": {
|
|
3048
|
+
provider: "anthropic",
|
|
2969
3049
|
inputCostPer1M: 100,
|
|
2970
3050
|
// $1.00 per 1M tokens
|
|
2971
3051
|
outputCostPer1M: 500,
|
|
@@ -2979,6 +3059,7 @@ var MODEL_INFO = {
|
|
|
2979
3059
|
configSchema: AnthropicConfigSchema
|
|
2980
3060
|
},
|
|
2981
3061
|
"claude-haiku-4-5": {
|
|
3062
|
+
provider: "anthropic",
|
|
2982
3063
|
inputCostPer1M: 100,
|
|
2983
3064
|
// $1.00 per 1M tokens
|
|
2984
3065
|
outputCostPer1M: 500,
|
|
@@ -2998,7 +3079,7 @@ function getModelInfo(model) {
|
|
|
2998
3079
|
return MODEL_INFO[model];
|
|
2999
3080
|
}
|
|
3000
3081
|
for (const knownModel of MODEL_KEYS_BY_SPECIFICITY) {
|
|
3001
|
-
if (model.startsWith(knownModel)) {
|
|
3082
|
+
if (model.startsWith(`${knownModel}-`)) {
|
|
3002
3083
|
return MODEL_INFO[knownModel];
|
|
3003
3084
|
}
|
|
3004
3085
|
}
|
|
@@ -3349,7 +3430,9 @@ async function callLLMForAgentIteration(adapter, request) {
|
|
|
3349
3430
|
message: request.capabilities.message,
|
|
3350
3431
|
memoryOps: request.capabilities.memoryOps,
|
|
3351
3432
|
historyTurns: request.conversationHistory?.length ?? 0,
|
|
3352
|
-
|
|
3433
|
+
// `preview` reads text; `extractMessageText` is the identity function for the plain-string case
|
|
3434
|
+
// this always was, and drops image parts (nothing to preview) rather than stringify them.
|
|
3435
|
+
messages: messages.map((m) => ({ role: m.role, ...preview(extractMessageText(m.content)) }))
|
|
3353
3436
|
});
|
|
3354
3437
|
let acceptedOutput;
|
|
3355
3438
|
const response = await adapter.generate({
|
|
@@ -3372,7 +3455,10 @@ async function callLLMForAgentIteration(adapter, request) {
|
|
|
3372
3455
|
// Same text the real request was billed for -- `estimateTokens`'s bias is a property of the
|
|
3373
3456
|
// heuristic itself, not of which text it measures, so this is what calibrates the correction
|
|
3374
3457
|
// `MemoryManager` applies to its own (much smaller) slice of the same request.
|
|
3375
|
-
|
|
3458
|
+
// Same text-only reasoning as the `preview` call above -- an image part contributes no text
|
|
3459
|
+
// tokens to this estimate (the real request's image token cost is a separate, provider-billed
|
|
3460
|
+
// line item this heuristic was never calibrated against).
|
|
3461
|
+
estimatedRequestTokens: estimateTokens(messages.map((m) => extractMessageText(m.content)).join(""))
|
|
3376
3462
|
};
|
|
3377
3463
|
} catch (error) {
|
|
3378
3464
|
flowLog("agent.iteration.validationFailed", {
|
|
@@ -3410,7 +3496,7 @@ async function callLLMForAgentCompletion(adapter, request) {
|
|
|
3410
3496
|
return {
|
|
3411
3497
|
output: response.output,
|
|
3412
3498
|
usage: response.usage,
|
|
3413
|
-
estimatedRequestTokens: estimateTokens(messages.map((m) => m.content).join(""))
|
|
3499
|
+
estimatedRequestTokens: estimateTokens(messages.map((m) => extractMessageText(m.content)).join(""))
|
|
3414
3500
|
};
|
|
3415
3501
|
}
|
|
3416
3502
|
|
|
@@ -6537,10 +6623,17 @@ function createClickUpAdapter(credential) {
|
|
|
6537
6623
|
// src/worker/adapters/dropbox.ts
|
|
6538
6624
|
var METHODS4 = [
|
|
6539
6625
|
"uploadFile",
|
|
6540
|
-
"createFolder"
|
|
6626
|
+
"createFolder",
|
|
6627
|
+
"listFolder",
|
|
6628
|
+
"getMetadata",
|
|
6629
|
+
"getTemporaryLink",
|
|
6630
|
+
"createSharedLink",
|
|
6631
|
+
"download",
|
|
6632
|
+
"getThumbnail",
|
|
6633
|
+
"getThumbnailBatch"
|
|
6541
6634
|
];
|
|
6542
6635
|
function createDropboxAdapter(credential) {
|
|
6543
|
-
return createAdapter("dropbox", METHODS4, credential);
|
|
6636
|
+
return createAdapter("dropbox", [...METHODS4], credential);
|
|
6544
6637
|
}
|
|
6545
6638
|
|
|
6546
6639
|
// src/worker/adapters/gmail.ts
|
|
@@ -6700,6 +6793,8 @@ var acqDb = createAdapter("acqDb", [
|
|
|
6700
6793
|
"addCompaniesToList",
|
|
6701
6794
|
"updateCompanyStage",
|
|
6702
6795
|
"updateContactStage",
|
|
6796
|
+
"clearCompanyStages",
|
|
6797
|
+
"clearContactStages",
|
|
6703
6798
|
// Company operations
|
|
6704
6799
|
"createCompany",
|
|
6705
6800
|
"upsertCompany",
|
|
@@ -6726,6 +6821,8 @@ var acqDb = createAdapter("acqDb", [
|
|
|
6726
6821
|
"getDealById",
|
|
6727
6822
|
"getContactById",
|
|
6728
6823
|
"getCompanyById",
|
|
6824
|
+
"listDeals",
|
|
6825
|
+
"getDealPipelineAnalytics",
|
|
6729
6826
|
// Deal transitions
|
|
6730
6827
|
"updateDiscoveryData",
|
|
6731
6828
|
"updateProposalData",
|
|
@@ -6803,6 +6900,8 @@ var list = createAdapter("list", [
|
|
|
6803
6900
|
"recordExecution",
|
|
6804
6901
|
"updateCompanyStage",
|
|
6805
6902
|
"updateContactStage",
|
|
6903
|
+
"clearCompanyStages",
|
|
6904
|
+
"clearContactStages",
|
|
6806
6905
|
"listPendingCompanyIds",
|
|
6807
6906
|
"listPendingContactIds"
|
|
6808
6907
|
]);
|
|
@@ -6820,6 +6919,10 @@ var METHODS14 = [
|
|
|
6820
6919
|
"getItem",
|
|
6821
6920
|
"listItems",
|
|
6822
6921
|
"updateItem",
|
|
6922
|
+
"addItemSourceAsset",
|
|
6923
|
+
"removeItemSourceAsset",
|
|
6924
|
+
"reorderItemSourceAssets",
|
|
6925
|
+
"updateItemSourceAsset",
|
|
6823
6926
|
"createAttempt",
|
|
6824
6927
|
"listAttempts",
|
|
6825
6928
|
"updateAttempt",
|
|
@@ -6827,6 +6930,8 @@ var METHODS14 = [
|
|
|
6827
6930
|
"getSourceAsset",
|
|
6828
6931
|
"listSourceAssets",
|
|
6829
6932
|
"updateSourceAsset",
|
|
6933
|
+
"getDistribution",
|
|
6934
|
+
"listDistributions",
|
|
6830
6935
|
"createDistribution",
|
|
6831
6936
|
"updateDistribution"
|
|
6832
6937
|
];
|
|
@@ -7235,6 +7340,16 @@ function startWorker(org) {
|
|
|
7235
7340
|
// real tier rather than silently passing on an absent one.
|
|
7236
7341
|
systemPrompt: a.config.systemPrompt,
|
|
7237
7342
|
securityLevel: a.config.securityLevel,
|
|
7343
|
+
// Wave 2b / Decision 2: redacted model config (no `apiKey`) so the platform can re-run
|
|
7344
|
+
// `validateAgentGrammar` and the token-floor check against what the org actually deployed
|
|
7345
|
+
// instead of only ever seeing the platform's own placeholder stub config. `apiKey` is
|
|
7346
|
+
// deliberately excluded -- this manifest crosses into apps/api's process and is logged.
|
|
7347
|
+
modelConfig: a.modelConfig ? {
|
|
7348
|
+
model: a.modelConfig.model,
|
|
7349
|
+
provider: a.modelConfig.provider,
|
|
7350
|
+
temperature: a.modelConfig.temperature,
|
|
7351
|
+
maxOutputTokens: a.modelConfig.maxOutputTokens
|
|
7352
|
+
} : void 0,
|
|
7238
7353
|
status: a.config.status,
|
|
7239
7354
|
description: a.config.description,
|
|
7240
7355
|
version: a.config.version,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.49.0",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"tsup": "^8.0.0",
|
|
56
56
|
"typescript": "5.9.2",
|
|
57
57
|
"zod": "^4.1.0",
|
|
58
|
-
"@repo/core": "0.
|
|
58
|
+
"@repo/core": "0.64.0",
|
|
59
59
|
"@repo/eslint-config": "0.0.0",
|
|
60
60
|
"@repo/typescript-config": "0.0.0"
|
|
61
61
|
},
|
package/reference/_navigation.md
CHANGED
|
@@ -162,7 +162,7 @@ Package entries indexed: 64.
|
|
|
162
162
|
| --- | --- | --- | --- |
|
|
163
163
|
| Theme | `packages/ui/src/theme/README.md` | Published theme entry for downstream applications. | (not specified) |
|
|
164
164
|
| Graph | `packages/ui/src/graph/README.md` | Published graph helper and visualization entry. | (not specified) |
|
|
165
|
-
| Theme Presets | `packages/ui/src/theme/presets/README.md` |
|
|
165
|
+
| Theme Presets | `packages/ui/src/theme/presets/README.md` | Published THEME_PRESETS tuple, ThemePresetName union, and ThemePresetEnum Zod enum, defined locally and kept manually aligned with the canonical list in packages/core/src/auth/multi-tenancy/theme-presets.ts. | (not specified) |
|
|
166
166
|
| Knowledge | `packages/ui/src/knowledge/README.md` | Published knowledge browser primitives: Browser, Tree, NodeList, NodeView, SearchBar, MDX provider, and the generated KNOWLEDGE_BODIES map. | (not specified) |
|
|
167
167
|
|
|
168
168
|
---
|
|
@@ -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
|
|
|
@@ -280,7 +281,7 @@ Docs-site pages indexed: 38.
|
|
|
280
281
|
|
|
281
282
|
| Page | Location | Description |
|
|
282
283
|
| --- | --- | --- |
|
|
283
|
-
| CLI Management Commands | `sdk/cli-management.mdx` | elevasis-sdk management commands -- project, note, acquisition, client, agent, session, queue, schedule, om, ui, skill, and
|
|
284
|
+
| CLI Management Commands | `sdk/cli-management.mdx` | elevasis-sdk management commands -- project, note, acquisition, client, agent, session, queue, schedule, om, ui, skill, content, and grant subcommand families |
|
|
284
285
|
| CLI Reference | `sdk/cli.mdx` | Core elevasis-sdk CLI commands -- validate, deploy, execute, inspect resources, manage credentials, rename, and enumerate the command catalog |
|
|
285
286
|
| Concepts Reference | `sdk/concepts.mdx` | Plain-English explanations of Elevasis SDK concepts -- glossary, workflow analogies, Zod schemas, execution model, platform tools, and design decisions |
|
|
286
287
|
| When to Reach for the define* Builders | `sdk/define-builders.mdx` | defineWorkflow, defineStep, defineContract, defineResource, and defineTopology exist for two different reasons -- this page teaches which reason applies before you pick a builder over a plain object literal. |
|
|
@@ -294,7 +295,7 @@ Docs-site pages indexed: 38.
|
|
|
294
295
|
| Tutorial System | `sdk/framework/tutorial-system.mdx` | The /tutorial skill in the external project scaffold -- two-track onboarding (vibe-coder and technical), gate question, track persistence, and escape hatch |
|
|
295
296
|
| Getting Started | `sdk/getting-started.mdx` | Set up your Elevasis SDK project and run your first deployment |
|
|
296
297
|
| Human-in-the-Loop (HITL) Workflows | `sdk/human-in-the-loop.mdx` | How a workflow step opens an approval task, how it reaches the command queue, and how selecting an action resumes work -- the story that connects the approval adapter, checkpoint metadata, and the queue CLI. |
|
|
297
|
-
|
|
|
298
|
+
| @elevasis/sdk | `sdk/index.mdx` | Build and deploy workflows, agents, and resources with the Elevasis SDK |
|
|
298
299
|
| Integration Adapters | `sdk/platform-tools/adapters-integration.mdx` | Auto-generated table of all 13 integration (credential-bound) adapters exported from @elevasis/sdk/worker, derived from static analysis of the adapter source files. |
|
|
299
300
|
| Platform Adapters | `sdk/platform-tools/adapters-platform.mdx` | Auto-generated table of all 14 platform (singleton, no credential) adapters exported from @elevasis/sdk/worker, derived from static analysis of the adapter source files. |
|
|
300
301
|
| Platform Tools | `sdk/platform-tools/index.mdx` | Access 25 adapters (13 integration + 12 platform) from your SDK workflows -- typed adapters, credential security model, and working code examples |
|
|
@@ -308,7 +309,7 @@ Docs-site pages indexed: 38.
|
|
|
308
309
|
| Template: Email Sender | `sdk/templates/email-sender.mdx` | Transactional email via Resend with template support -- send styled emails to one or multiple recipients |
|
|
309
310
|
| Templates | `sdk/templates/index.mdx` | Ready-to-use workflow templates for common automation patterns -- web scraping, data enrichment, email sending, lead scoring, PDF generation, text classification, and recurring jobs |
|
|
310
311
|
| Template: Lead Scorer | `sdk/templates/lead-scorer.mdx` | LLM-based lead scoring with Supabase storage -- receive a lead, score it with an LLM, store the result |
|
|
311
|
-
| Template: PDF Generator | `sdk/templates/pdf-generator.mdx` | PDF generation from structured data with platform storage upload -- render a PDF from
|
|
312
|
+
| Template: PDF Generator | `sdk/templates/pdf-generator.mdx` | PDF generation from structured data with platform storage upload -- render a PDF from typed content blocks and upload to platform storage |
|
|
312
313
|
| Template: Recurring Job | `sdk/templates/recurring-job.mdx` | Scheduler-triggered periodic workflow -- run a task on a schedule (daily, weekly, hourly, or custom cron) |
|
|
313
314
|
| Template: Text Classifier | `sdk/templates/text-classifier.mdx` | Multi-label text classification with structured output -- classify text into predefined categories using an LLM with JSON output |
|
|
314
315
|
| Template: Web Scraper | `sdk/templates/web-scraper.mdx` | Apify-based web scraper that stores results in Supabase -- fetch structured data from any website via Apify actors |
|
|
@@ -875,7 +875,7 @@
|
|
|
875
875
|
"subpath": "./theme/presets",
|
|
876
876
|
"kind": "subpath",
|
|
877
877
|
"title": "Theme Presets",
|
|
878
|
-
"description": "
|
|
878
|
+
"description": "Published THEME_PRESETS tuple, ThemePresetName union, and ThemePresetEnum Zod enum, defined locally and kept manually aligned with the canonical list in packages/core/src/auth/multi-tenancy/theme-presets.ts.",
|
|
879
879
|
"group": "Visual",
|
|
880
880
|
"order": 2,
|
|
881
881
|
"sourcePath": "packages/ui/src/theme/presets/index.ts",
|
|
@@ -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
|
},
|
package/reference/core/index.mdx
CHANGED
|
@@ -15,11 +15,13 @@ The default export and most subpaths are browser-safe. No Node.js-specific runti
|
|
|
15
15
|
|
|
16
16
|
## Published Subpaths
|
|
17
17
|
|
|
18
|
-
`@elevasis/core` ships
|
|
18
|
+
`@elevasis/core` ships eight published subpaths:
|
|
19
19
|
|
|
20
20
|
- **`.`** (default) -- base schemas, shared utilities, and the root contract surface. Browser-safe.
|
|
21
21
|
- **`./auth`** -- auth contract types: session shapes, membership, role definitions, and WorkOS integration contracts.
|
|
22
22
|
- **`./organization-model`** -- the organization model (OM) schema: system definitions, resource metadata, and the org-model graph types used by the platform's AI routing layer.
|
|
23
|
+
- **`./organization-model/readiness`** -- readiness profiles and the system-interface readiness contract used to gate a System's API surface.
|
|
24
|
+
- **`./content`** -- content pipeline schemas: items, distributions, pipeline step contracts, and review-gate types.
|
|
23
25
|
- **`./entities`** -- entity schemas: typed definitions for leads, clients, deals, contacts, and other CRM-adjacent records.
|
|
24
26
|
- **`./knowledge`** -- knowledge graph schemas: document types, embedding metadata, and retrieval contract types.
|
|
25
27
|
- **`./test-utils`** -- Zod-based test fixtures and factory helpers. Not for production use.
|
|
@@ -36,7 +38,7 @@ import { parsePath, bySystem } from "@elevasis/core/knowledge";
|
|
|
36
38
|
|
|
37
39
|
The default export and all named subpaths above are browser-safe -- they contain only Zod schemas, TypeScript types, and pure utility functions. There are no Node.js-specific APIs, filesystem access, or server-side dependencies in the published surface.
|
|
38
40
|
|
|
39
|
-
The broader workspace `exports` (~40 paths in `packages/core`) are internal to the monorepo and not part of the published surface. Only the
|
|
41
|
+
The broader workspace `exports` (~40 paths in `packages/core`) are internal to the monorepo and not part of the published surface. Only the eight subpaths listed above are available to tenant projects.
|
|
40
42
|
|
|
41
43
|
## When To Use @elevasis/core Directly
|
|
42
44
|
|
|
@@ -53,6 +55,6 @@ Most tenant projects install `@elevasis/sdk`, which includes `@elevasis/core` as
|
|
|
53
55
|
|
|
54
56
|
For advanced use cases -- writing custom validators, extending the org model, or building a server that enforces the same contracts the platform uses -- import from `@elevasis/core` subpaths directly rather than going through the SDK layer.
|
|
55
57
|
|
|
56
|
-
##
|
|
58
|
+
## Documentation
|
|
57
59
|
|
|
58
|
-
|
|
60
|
+
- [Export Catalog](exports.mdx) - Generated table of all published subpath exports derived from the reference manifest
|
package/reference/index.mdx
CHANGED
|
@@ -31,9 +31,9 @@ You do not need all three packages. A pure automation project needs only `@eleva
|
|
|
31
31
|
|
|
32
32
|
## Packages
|
|
33
33
|
|
|
34
|
-
### @elevasis/sdk (v1.
|
|
34
|
+
### @elevasis/sdk (v1.48.0)
|
|
35
35
|
|
|
36
|
-
The primary developer package. Provides the TypeScript API for defining workflows and agents, the `elevasis-sdk` CLI for validation and deployment, and typed worker adapters for
|
|
36
|
+
The primary developer package. Provides the TypeScript API for defining workflows and agents, the `elevasis-sdk` CLI for validation and deployment, and typed worker adapters for 27 platform and integration tools.
|
|
37
37
|
|
|
38
38
|
**Install:** `pnpm add @elevasis/sdk`
|
|
39
39
|
|
|
@@ -41,17 +41,17 @@ The primary developer package. Provides the TypeScript API for defining workflow
|
|
|
41
41
|
|
|
42
42
|
See [@elevasis/sdk](sdk/index.mdx) for the full group overview, getting started guide, CLI reference, adapter catalog, and more.
|
|
43
43
|
|
|
44
|
-
### @elevasis/core (v0.
|
|
44
|
+
### @elevasis/core (v0.63.0)
|
|
45
45
|
|
|
46
46
|
The shared contract layer. Exports Zod schemas and TypeScript types that are shared between the SDK, the UI, and the platform API. Useful when you need the typed contracts (organization model, entities, knowledge, auth) in a package that does not pull in the full SDK runtime.
|
|
47
47
|
|
|
48
48
|
**Install:** `pnpm add @elevasis/core`
|
|
49
49
|
|
|
50
|
-
**Published subpaths:** `.` (default), `./auth`, `./test-utils`, `./organization-model`, `./entities`, `./knowledge`
|
|
50
|
+
**Published subpaths:** `.` (default), `./auth`, `./test-utils`, `./organization-model`, `./organization-model/readiness`, `./content`, `./entities`, `./knowledge`
|
|
51
51
|
|
|
52
52
|
See [@elevasis/core](core/index.mdx) for subpath details, browser/server split, and when to use it.
|
|
53
53
|
|
|
54
|
-
### @elevasis/ui (v2.
|
|
54
|
+
### @elevasis/ui (v2.72.0)
|
|
55
55
|
|
|
56
56
|
The shared React feature-shell. Provides `ElevasisCoreProvider` / `ElevasisSystemsProvider` and manifest-backed feature modules that a host UI embeds. Many peer dependencies are optional -- pull only what the features you use require.
|
|
57
57
|
|
|
@@ -61,6 +61,12 @@ The shared React feature-shell. Provides `ElevasisCoreProvider` / `ElevasisSyste
|
|
|
61
61
|
|
|
62
62
|
See [@elevasis/ui](ui/index.mdx) for the provider model, feature modules, peer dependency details, and when to use it.
|
|
63
63
|
|
|
64
|
+
## Documentation
|
|
65
|
+
|
|
66
|
+
- [@elevasis/sdk](sdk/index.mdx) - Runtime, resource definitions, CLI, worker adapters, deployment, and framework
|
|
67
|
+
- [@elevasis/core](core/index.mdx) - Shared Zod schemas, organization model, knowledge graph, and auth contracts
|
|
68
|
+
- [@elevasis/ui](ui/index.mdx) - React feature-shell, provider model, and manifest-backed feature modules
|
|
69
|
+
|
|
64
70
|
## Authoring Note
|
|
65
71
|
|
|
66
72
|
These pages have a dual surface. At SDK build time, `packages/sdk/scripts/copy-reference-docs.mjs` copies every `apps/docs/content/docs/sdk/**.mdx` into `packages/sdk/reference/`, which ships inside the npm package (`files: ["reference/"]`). The `external/_template/CLAUDE.md` points tenant-project agents at `operations/node_modules/@elevasis/sdk/reference/` as their primary reference bundle. Drift in these docs does not just affect the public site -- it actively misleads every agent building a tenant project.
|
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
# @elevasis/core
|
|
2
|
-
|
|
3
|
-
Published browser-safe shared contracts for the Elevasis platform.
|
|
4
|
-
|
|
5
|
-
This package is the source of truth for shared types, schemas, and contract helpers that are safe to consume from apps and other packages. In this repo the source package is named `@repo/core`, but these docs describe the published `@elevasis/core` surface.
|
|
6
|
-
|
|
7
|
-
## Import Rules
|
|
8
|
-
|
|
9
|
-
- Use `@elevasis/core` (root export) for browser-safe shared types and schemas.
|
|
10
|
-
- Use `@elevasis/core/organization-model` for the semantic contract layer.
|
|
11
|
-
- Use `@elevasis/core/entities` for the published base entity contracts.
|
|
12
|
-
- Use `@elevasis/core/
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
- `./
|
|
22
|
-
- `./
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `@
|
|
27
|
-
- `@
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- `@repo/core/
|
|
32
|
-
- `@repo/core/
|
|
33
|
-
- `@repo/core/
|
|
34
|
-
- `@repo/core/
|
|
35
|
-
- `@repo/core/
|
|
36
|
-
- `@repo/core/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- For
|
|
1
|
+
# @elevasis/core
|
|
2
|
+
|
|
3
|
+
Published browser-safe shared contracts for the Elevasis platform.
|
|
4
|
+
|
|
5
|
+
This package is the source of truth for shared types, schemas, and contract helpers that are safe to consume from apps and other packages. In this repo the source package is named `@repo/core`, but these docs describe the published `@elevasis/core` surface.
|
|
6
|
+
|
|
7
|
+
## Import Rules
|
|
8
|
+
|
|
9
|
+
- Use `@elevasis/core` (root export) for browser-safe shared types and schemas.
|
|
10
|
+
- Use `@elevasis/core/organization-model` for the semantic contract layer, and `@elevasis/core/organization-model/readiness` for readiness profile and contract types.
|
|
11
|
+
- Use `@elevasis/core/auth` for multi-tenancy types, `@elevasis/core/content` for content metadata types, and `@elevasis/core/entities` for the published base entity contracts.
|
|
12
|
+
- Use `@elevasis/core/knowledge` for the published knowledge contracts.
|
|
13
|
+
- Use `@elevasis/core/test-utils` for shared test fixtures, mocks, and test helpers.
|
|
14
|
+
- Paths like `@elevasis/core/server`, `@elevasis/core/platform`, and `@elevasis/core/supabase` are internal monorepo paths (`@repo/core/...`) and are NOT available to external consumers.
|
|
15
|
+
|
|
16
|
+
## Published Surface Groups
|
|
17
|
+
|
|
18
|
+
The published `@elevasis/core` npm package exposes these subpaths (the authoritative list is `publishConfig.exports` in `packages/core/package.json`):
|
|
19
|
+
|
|
20
|
+
- `.` (`@elevasis/core`) - browser-safe shared types, schemas, and constants.
|
|
21
|
+
- `./auth` (`@elevasis/core/auth`) - multi-tenancy types for organizations, users, memberships, invitations, and credentials.
|
|
22
|
+
- `./content` (`@elevasis/core/content`) - published content metadata types.
|
|
23
|
+
- `./entities` (`@elevasis/core/entities`) - published base entity contracts generic over project metadata extensions.
|
|
24
|
+
- `./knowledge` (`@elevasis/core/knowledge`) - published knowledge graph contracts.
|
|
25
|
+
- `./organization-model` (`@elevasis/core/organization-model`) - the semantic contract layer for CRM, lead gen, delivery, features, branding, and navigation.
|
|
26
|
+
- `./organization-model/readiness` (`@elevasis/core/organization-model/readiness`) - readiness profile and contract types for the organization model.
|
|
27
|
+
- `./test-utils` (`@elevasis/core/test-utils`) - test fixtures, mocks, and helpers for downstream automated tests.
|
|
28
|
+
|
|
29
|
+
Within the monorepo, the internal `@repo/core` package exposes additional subpaths that are NOT published, for use by `apps/` and other packages:
|
|
30
|
+
|
|
31
|
+
- `@repo/core/server` - Node.js-only helpers and services.
|
|
32
|
+
- `@repo/core/platform` - shared constants, utilities, registry, SSE, and API types.
|
|
33
|
+
- `@repo/core/execution` - workflow, agent, scheduler, and execution-interface contracts.
|
|
34
|
+
- `@repo/core/commands` - command queue types and schemas.
|
|
35
|
+
- `@repo/core/operations` - sessions, notifications, observability, activities, triggers, and debug logs.
|
|
36
|
+
- `@repo/core/supabase` - generated database types and helpers.
|
|
37
|
+
- `@repo/core/integrations/...` - OAuth and credential contracts.
|
|
38
|
+
- `@repo/core/projects/api-schemas` - project management request and response schemas.
|
|
39
|
+
|
|
40
|
+
Other `@repo/core/*` subpaths remain monorepo-only unless they are explicitly listed above in the published `@elevasis/core` surface.
|
|
41
|
+
|
|
42
|
+
## When To Read Deeper
|
|
43
|
+
|
|
44
|
+
- For the organization model contract, start with [organization-model/README.md](./organization-model/README.md).
|
|
45
|
+
- For test utilities, read [test-utils/README.md](./test-utils/README.md).
|
|
46
|
+
- For credentials, read [auth/multi-tenancy/credentials/README.md](./auth/multi-tenancy/credentials/README.md) if you are working in source. The runtime helpers are server-only.
|