@elevasis/sdk 1.41.1 → 1.43.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 CHANGED
@@ -41159,6 +41159,18 @@ var ExecutionError = class extends Error {
41159
41159
  }
41160
41160
  };
41161
41161
 
41162
+ // ../core/src/execution/engine/llm/errors.ts
41163
+ var ModelConfigError = class extends ExecutionError {
41164
+ constructor(message, field2, model, context) {
41165
+ super(message, { ...context, field: field2, model });
41166
+ this.field = field2;
41167
+ this.model = model;
41168
+ }
41169
+ type = "model_config_error";
41170
+ severity = "warning";
41171
+ category = "validation";
41172
+ };
41173
+
41162
41174
  // ../core/src/execution/engine/llm/model-info.ts
41163
41175
  var GPT5OptionsSchema = external_exports.object({
41164
41176
  reasoning_effort: external_exports.enum(["minimal", "low", "medium", "high"]).optional(),
@@ -41199,19 +41211,6 @@ var OpenRouterConfigSchema = external_exports.object({
41199
41211
  topP: external_exports.number().min(0).max(1).optional(),
41200
41212
  modelOptions: OpenRouterOptionsSchema.optional()
41201
41213
  });
41202
- var GoogleOptionsSchema = external_exports.object({
41203
- /** Thinking level for Gemini 3 models (controls reasoning depth) */
41204
- thinkingLevel: external_exports.enum(["minimal", "low", "medium", "high"]).optional()
41205
- });
41206
- var GoogleConfigSchema = external_exports.object({
41207
- model: external_exports.enum(["gemini-3-flash-preview", "gemini-3.1-flash-lite-preview"]),
41208
- provider: external_exports.literal("google"),
41209
- apiKey: external_exports.string(),
41210
- temperature: external_exports.number().min(0).max(2).optional(),
41211
- maxOutputTokens: external_exports.number().min(500).optional(),
41212
- topP: external_exports.number().min(0).max(1).optional(),
41213
- modelOptions: GoogleOptionsSchema.optional()
41214
- });
41215
41214
  var AnthropicOptionsSchema = external_exports.object({}).strict();
41216
41215
  var AnthropicStandardConfigSchema = external_exports.object({
41217
41216
  model: external_exports.enum(["claude-haiku-4-5-20251001", "claude-haiku-4-5"]),
@@ -41305,31 +41304,6 @@ var MODEL_INFO = {
41305
41304
  category: "standard",
41306
41305
  configSchema: OpenRouterConfigSchema
41307
41306
  },
41308
- // Google Gemini Models (direct SDK access via @google/genai)
41309
- "gemini-3-flash-preview": {
41310
- inputCostPer1M: 50,
41311
- // $0.50 per 1M tokens
41312
- outputCostPer1M: 300,
41313
- // $3.00 per 1M tokens
41314
- minTokens: 4e3,
41315
- recommendedTokens: 8e3,
41316
- maxTokens: 1e6,
41317
- // 1M context window
41318
- category: "standard",
41319
- configSchema: GoogleConfigSchema
41320
- },
41321
- "gemini-3.1-flash-lite-preview": {
41322
- inputCostPer1M: 25,
41323
- // $0.25 per 1M tokens
41324
- outputCostPer1M: 150,
41325
- // $1.50 per 1M tokens
41326
- minTokens: 4e3,
41327
- recommendedTokens: 8e3,
41328
- maxTokens: 1e6,
41329
- // 1M context window
41330
- category: "standard",
41331
- configSchema: GoogleConfigSchema
41332
- },
41333
41307
  // Anthropic Claude Models (direct SDK access via @anthropic-ai/sdk)
41334
41308
  "claude-opus-5": {
41335
41309
  inputCostPer1M: 500,
@@ -41386,29 +41360,18 @@ var MODEL_INFO = {
41386
41360
  configSchema: AnthropicConfigSchema
41387
41361
  }
41388
41362
  };
41363
+ var MODEL_KEYS_BY_SPECIFICITY = Object.keys(MODEL_INFO).sort((a, b) => b.length - a.length);
41389
41364
  function getModelInfo(model) {
41390
41365
  if (model in MODEL_INFO) {
41391
41366
  return MODEL_INFO[model];
41392
41367
  }
41393
- for (const [knownModel, info] of Object.entries(MODEL_INFO)) {
41368
+ for (const knownModel of MODEL_KEYS_BY_SPECIFICITY) {
41394
41369
  if (model.startsWith(knownModel)) {
41395
- return info;
41370
+ return MODEL_INFO[knownModel];
41396
41371
  }
41397
41372
  }
41398
41373
  return void 0;
41399
41374
  }
41400
-
41401
- // ../core/src/execution/engine/llm/errors.ts
41402
- var ModelConfigError = class extends ExecutionError {
41403
- constructor(message, field2, model, context) {
41404
- super(message, { ...context, field: field2, model });
41405
- this.field = field2;
41406
- this.model = model;
41407
- }
41408
- type = "model_config_error";
41409
- severity = "warning";
41410
- category = "validation";
41411
- };
41412
41375
  function validateModelConfig(config3) {
41413
41376
  const model = config3.model;
41414
41377
  if (!model) {
@@ -44718,7 +44681,6 @@ function serializeDefinition(definition, options) {
44718
44681
  const opts = {
44719
44682
  redactSecrets: true,
44720
44683
  includeToolSchemas: true,
44721
- includeKnowledgeMap: true,
44722
44684
  ...options
44723
44685
  };
44724
44686
  const context = {
@@ -44743,7 +44705,6 @@ function deepSerialize(value, ctx) {
44743
44705
  return value.map((item) => deepSerialize(item, ctx)).filter((item) => item !== void 0);
44744
44706
  }
44745
44707
  if (isToolObject(value)) return serializeTool(value, ctx);
44746
- if (isKnowledgeMapObject(value)) return serializeKnowledgeMap(value, ctx);
44747
44708
  if (isNextConfigObject(value)) return serializeNextConfig(value, ctx);
44748
44709
  return serializeObject(value, ctx);
44749
44710
  }
@@ -44779,22 +44740,6 @@ function serializeTool(tool, ctx) {
44779
44740
  }
44780
44741
  return result;
44781
44742
  }
44782
- function serializeKnowledgeMap(km, ctx) {
44783
- if (!ctx.includeKnowledgeMap) return void 0;
44784
- const nodes = km.nodes || {};
44785
- const nodeEntries = Object.entries(nodes).map(([id, node]) => ({
44786
- id,
44787
- description: node.description,
44788
- loaded: node.loaded || false,
44789
- hasPrompt: Boolean(node.prompt)
44790
- // load function automatically omitted
44791
- // prompt content omitted (too large for structure metadata)
44792
- }));
44793
- return {
44794
- nodeCount: nodeEntries.length,
44795
- nodes: nodeEntries
44796
- };
44797
- }
44798
44743
  function serializeNextConfig(nextConfig, _context) {
44799
44744
  if (!nextConfig) return null;
44800
44745
  if (nextConfig.type === StepType.LINEAR) {
@@ -44851,9 +44796,6 @@ function isZodSchema(value) {
44851
44796
  function isToolObject(value) {
44852
44797
  return value && typeof value === "object" && "name" in value && "description" in value && "execute" in value;
44853
44798
  }
44854
- function isKnowledgeMapObject(value) {
44855
- return value && typeof value === "object" && "nodes" in value && typeof value.nodes === "object";
44856
- }
44857
44799
  function isNextConfigObject(value) {
44858
44800
  return value && typeof value === "object" && "type" in value && (value.type === StepType.LINEAR || value.type === StepType.CONDITIONAL);
44859
44801
  }
@@ -44967,7 +44909,6 @@ function serializeOrganization(resources) {
44967
44909
  modelProvider: agent.modelConfig.provider,
44968
44910
  modelId: agent.modelConfig.model,
44969
44911
  toolCount: agent.tools.length,
44970
- hasKnowledgeMap: agent.knowledgeMap !== void 0,
44971
44912
  hasMemory: agent.config.memoryPreferences !== void 0,
44972
44913
  sessionCapable: agent.config.sessionCapable ?? false
44973
44914
  });
@@ -45834,7 +45775,7 @@ function wrapAction(commandName, fn) {
45834
45775
  // package.json
45835
45776
  var package_default = {
45836
45777
  name: "@elevasis/sdk",
45837
- version: "1.41.1",
45778
+ version: "1.43.0",
45838
45779
  description: "SDK for building Elevasis organization resources",
45839
45780
  type: "module",
45840
45781
  bin: {