@dexto/agent-management 1.6.1 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/agent-creation.cjs +2 -1
  2. package/dist/agent-creation.d.ts.map +1 -1
  3. package/dist/agent-creation.js +2 -1
  4. package/dist/index.cjs +5 -1
  5. package/dist/index.d.ts +2 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +3 -0
  8. package/dist/models/custom-models.cjs +4 -3
  9. package/dist/models/custom-models.d.ts +26 -5
  10. package/dist/models/custom-models.d.ts.map +1 -1
  11. package/dist/models/custom-models.js +4 -3
  12. package/dist/preferences/loader.cjs +2 -2
  13. package/dist/preferences/loader.d.ts +3 -3
  14. package/dist/preferences/loader.d.ts.map +1 -1
  15. package/dist/preferences/loader.js +2 -2
  16. package/dist/preferences/schemas.cjs +42 -11
  17. package/dist/preferences/schemas.d.ts +60 -12
  18. package/dist/preferences/schemas.d.ts.map +1 -1
  19. package/dist/preferences/schemas.js +43 -7
  20. package/dist/tool-factories/agent-spawner/runtime.cjs +48 -1
  21. package/dist/tool-factories/agent-spawner/runtime.d.ts +3 -1
  22. package/dist/tool-factories/agent-spawner/runtime.d.ts.map +1 -1
  23. package/dist/tool-factories/agent-spawner/runtime.js +54 -2
  24. package/dist/tool-factories/agent-spawner/schemas.cjs +12 -0
  25. package/dist/tool-factories/agent-spawner/schemas.d.ts +9 -0
  26. package/dist/tool-factories/agent-spawner/schemas.d.ts.map +1 -1
  27. package/dist/tool-factories/agent-spawner/schemas.js +10 -0
  28. package/dist/tool-factories/creator-tools/factory.cjs +434 -0
  29. package/dist/tool-factories/creator-tools/factory.d.ts +4 -0
  30. package/dist/tool-factories/creator-tools/factory.d.ts.map +1 -0
  31. package/dist/tool-factories/creator-tools/factory.js +407 -0
  32. package/dist/tool-factories/creator-tools/index.cjs +33 -0
  33. package/dist/tool-factories/creator-tools/index.d.ts +3 -0
  34. package/dist/tool-factories/creator-tools/index.d.ts.map +1 -0
  35. package/dist/tool-factories/creator-tools/index.js +10 -0
  36. package/dist/tool-factories/creator-tools/schemas.cjs +41 -0
  37. package/dist/tool-factories/creator-tools/schemas.d.ts +15 -0
  38. package/dist/tool-factories/creator-tools/schemas.d.ts.map +1 -0
  39. package/dist/tool-factories/creator-tools/schemas.js +16 -0
  40. package/dist/utils/path.cjs +7 -1
  41. package/dist/utils/path.d.ts +8 -0
  42. package/dist/utils/path.d.ts.map +1 -1
  43. package/dist/utils/path.js +6 -1
  44. package/package.json +5 -5
@@ -81,11 +81,12 @@ async function createDextoAgentFromConfig(options) {
81
81
  }
82
82
  const validatedConfig = import_agent_config.AgentConfigSchema.parse(enrichedConfig);
83
83
  const services = await (0, import_agent_config.resolveServicesFromConfig)(validatedConfig, image);
84
+ const mergedOverrides = overrides ? { ...overrides } : void 0;
84
85
  return new import_core.DextoAgent(
85
86
  (0, import_agent_config.toDextoAgentOptions)({
86
87
  config: validatedConfig,
87
88
  services,
88
- overrides
89
+ overrides: mergedOverrides
89
90
  })
90
91
  );
91
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"agent-creation.d.ts","sourceRoot":"","sources":["../src/agent-creation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,qBAAqB,CAAC;AASnE,OAAO,EAAE,UAAU,EAAU,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAqB,KAAK,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAGrF,KAAK,iCAAiC,GAAG;IACrC,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,aAAa,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACrD,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,YAAY,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACtC,SAAS,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACrD,CAAC;AA0DF,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,iCAAiC,GAC3C,OAAO,CAAC,UAAU,CAAC,CAmCrB"}
1
+ {"version":3,"file":"agent-creation.d.ts","sourceRoot":"","sources":["../src/agent-creation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,qBAAqB,CAAC;AASnE,OAAO,EAAE,UAAU,EAAU,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAqB,KAAK,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAGrF,KAAK,iCAAiC,GAAG;IACrC,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,aAAa,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACrD,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,YAAY,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACtC,SAAS,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACrD,CAAC;AA0DF,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,iCAAiC,GAC3C,OAAO,CAAC,UAAU,CAAC,CAsCrB"}
@@ -65,11 +65,12 @@ async function createDextoAgentFromConfig(options) {
65
65
  }
66
66
  const validatedConfig = AgentConfigSchema.parse(enrichedConfig);
67
67
  const services = await resolveServicesFromConfig(validatedConfig, image);
68
+ const mergedOverrides = overrides ? { ...overrides } : void 0;
68
69
  return new DextoAgent(
69
70
  toDextoAgentOptions({
70
71
  config: validatedConfig,
71
72
  services,
72
- overrides
73
+ overrides: mergedOverrides
73
74
  })
74
75
  );
75
76
  }
package/dist/index.cjs CHANGED
@@ -74,6 +74,7 @@ __export(index_exports, {
74
74
  getDextoEnvPath: () => import_path.getDextoEnvPath,
75
75
  getDextoGlobalPath: () => import_path.getDextoGlobalPath,
76
76
  getDextoInstalledPluginsPath: () => import_plugins.getDextoInstalledPluginsPath,
77
+ getDextoPackageRoot: () => import_path.getDextoPackageRoot,
77
78
  getDextoPath: () => import_path.getDextoPath,
78
79
  getDownloadQueue: () => import_models.getDownloadQueue,
79
80
  getExecutionContext: () => import_execution_context.getExecutionContext,
@@ -193,6 +194,7 @@ var import_custom_models = require("./models/custom-models.js");
193
194
  var import_models = require("./models/index.js");
194
195
  __reExport(index_exports, require("./runtime/index.js"), module.exports);
195
196
  __reExport(index_exports, require("./tool-factories/agent-spawner/index.js"), module.exports);
197
+ __reExport(index_exports, require("./tool-factories/creator-tools/index.js"), module.exports);
196
198
  var import_plugins = require("./plugins/index.js");
197
199
  // Annotate the CommonJS export names for ESM import in node:
198
200
  0 && (module.exports = {
@@ -251,6 +253,7 @@ var import_plugins = require("./plugins/index.js");
251
253
  getDextoEnvPath,
252
254
  getDextoGlobalPath,
253
255
  getDextoInstalledPluginsPath,
256
+ getDextoPackageRoot,
254
257
  getDextoPath,
255
258
  getDownloadQueue,
256
259
  getExecutionContext,
@@ -342,5 +345,6 @@ var import_plugins = require("./plugins/index.js");
342
345
  writeLLMPreferences,
343
346
  writePreferencesToAgent,
344
347
  ...require("./runtime/index.js"),
345
- ...require("./tool-factories/agent-spawner/index.js")
348
+ ...require("./tool-factories/agent-spawner/index.js"),
349
+ ...require("./tool-factories/creator-tools/index.js")
346
350
  });
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@ export { installBundledAgent, installCustomAgent, uninstallAgent, listInstalledA
14
14
  export { AgentFactory, type CreateAgentOptions } from './AgentFactory.js';
15
15
  export { createDextoAgentFromConfig } from './agent-creation.js';
16
16
  export { getDefaultImageStoreDir, getImageRegistryPath, getImagePackagesDir, getImagePackageInstallDir, loadImageRegistry, saveImageRegistry, parseImageSpecifier, isFileLikeImageSpecifier, resolveFileLikeImageSpecifierToPath, resolveFileLikeImageSpecifierToFileUrl, resolveImageEntryFileFromStore, setActiveImageVersion, removeImageFromStore, type ImageRegistryFile, type ImageSpecifierParts, } from './images/image-store.js';
17
- export { getDextoPath, getDextoGlobalPath, getDextoEnvPath, copyDirectory, isPath, findPackageRoot, resolveBundledScript, ensureDextoGlobalDirectory, } from './utils/path.js';
17
+ export { getDextoPackageRoot, getDextoPath, getDextoGlobalPath, getDextoEnvPath, copyDirectory, isPath, findPackageRoot, resolveBundledScript, ensureDextoGlobalDirectory, } from './utils/path.js';
18
18
  export { getExecutionContext, findDextoSourceRoot, findDextoProjectRoot, type ExecutionContext, } from './utils/execution-context.js';
19
19
  export { walkUpDirectories } from './utils/fs-walk.js';
20
20
  export { updateEnvFile } from './utils/env-file.js';
@@ -27,5 +27,6 @@ export { loadCustomModels, saveCustomModel, deleteCustomModel, getCustomModel, g
27
27
  export { getModelsDirectory, getModelFilePath, getModelDirectory, getModelStatePath, getModelTempDirectory, ensureModelsDirectory, ensureModelDirectory, modelFileExists, getModelFileSize, deleteModelDirectory, listModelDirectories, getModelsDiskUsage, formatSize, type ModelSource, type InstalledModel, type ModelState, loadModelState, saveModelState, addInstalledModel, removeInstalledModel, getInstalledModel, getAllInstalledModels, isModelInstalled, updateModelLastUsed, setActiveModel, getActiveModelId, getActiveModel, addToDownloadQueue, removeFromDownloadQueue, getDownloadQueue, syncStateWithFilesystem, getTotalInstalledSize, getInstalledModelCount, registerManualModel, } from './models/index.js';
28
28
  export * from './runtime/index.js';
29
29
  export * from './tool-factories/agent-spawner/index.js';
30
+ export * from './tool-factories/creator-tools/index.js';
30
31
  export { discoverClaudeCodePlugins, getPluginSearchPaths, loadClaudeCodePlugin, validatePluginDirectory, tryLoadManifest, listInstalledPlugins, getDextoInstalledPluginsPath, installPluginFromPath, loadDextoInstalledPlugins, saveDextoInstalledPlugins, isPluginInstalled, uninstallPlugin, PluginManifestSchema, PluginMCPConfigSchema, PluginErrorCode, PluginError, DEFAULT_MARKETPLACES, addMarketplace, removeMarketplace, updateMarketplace, listMarketplaces, listAllMarketplacePlugins, installPluginFromMarketplace, getUninstalledDefaults, isDefaultMarketplace, MarketplaceErrorCode, MarketplaceError, type PluginManifest, type DiscoveredPlugin, type PluginCommand, type PluginMCPConfig, type LoadedPlugin, type PluginInstallScope, type InstalledPluginEntry, type InstalledPluginsFile, type ListedPlugin, type PluginValidationResult, type PluginInstallResult, type PluginUninstallResult, type ValidatedPluginManifest, type ValidatedPluginMCPConfig, type InstallPluginOptions, type UninstallPluginOptions, type MarketplaceEntry, type MarketplacePlugin, type MarketplaceAddResult, type MarketplaceUpdateResult, type MarketplaceInstallResult, } from './plugins/index.js';
31
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACrF,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EACH,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAChC,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EACH,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,mBAAmB,E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B,EACtB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAChC,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -49,6 +49,7 @@ import {
49
49
  removeImageFromStore
50
50
  } from "./images/image-store.js";
51
51
  import {
52
+ getDextoPackageRoot,
52
53
  getDextoPath,
53
54
  getDextoGlobalPath,
54
55
  getDextoEnvPath,
@@ -141,6 +142,7 @@ import {
141
142
  } from "./models/index.js";
142
143
  export * from "./runtime/index.js";
143
144
  export * from "./tool-factories/agent-spawner/index.js";
145
+ export * from "./tool-factories/creator-tools/index.js";
144
146
  import {
145
147
  discoverClaudeCodePlugins,
146
148
  getPluginSearchPaths,
@@ -226,6 +228,7 @@ export {
226
228
  getDextoEnvPath,
227
229
  getDextoGlobalPath,
228
230
  getDextoInstalledPluginsPath,
231
+ getDextoPackageRoot,
229
232
  getDextoPath,
230
233
  getDownloadQueue,
231
234
  getExecutionContext,
@@ -65,9 +65,10 @@ const CustomModelSchema = import_zod.z.object({
65
65
  // File path for local GGUF models. Required when provider is 'local'.
66
66
  // Stores the absolute path to the .gguf file on disk.
67
67
  filePath: import_zod.z.string().optional(),
68
- // OpenAI reasoning effort level for reasoning-capable models (o1, o3, codex, gpt-5.x).
69
- // Controls how many reasoning tokens the model generates before producing a response.
70
- reasoningEffort: import_zod.z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional()
68
+ reasoning: import_zod.z.object({
69
+ variant: import_zod.z.string().trim().min(1),
70
+ budgetTokens: import_zod.z.number().int().positive().optional()
71
+ }).strict().optional()
71
72
  }).superRefine((data, ctx) => {
72
73
  if ((data.provider === "openai-compatible" || data.provider === "litellm") && !data.baseURL) {
73
74
  ctx.addIssue({
@@ -34,13 +34,25 @@ export declare const CustomModelSchema: z.ZodEffects<z.ZodObject<{
34
34
  maxOutputTokens: z.ZodOptional<z.ZodNumber>;
35
35
  apiKey: z.ZodOptional<z.ZodString>;
36
36
  filePath: z.ZodOptional<z.ZodString>;
37
- reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
37
+ reasoning: z.ZodOptional<z.ZodObject<{
38
+ variant: z.ZodString;
39
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
40
+ }, "strict", z.ZodTypeAny, {
41
+ variant: string;
42
+ budgetTokens?: number | undefined;
43
+ }, {
44
+ variant: string;
45
+ budgetTokens?: number | undefined;
46
+ }>>;
38
47
  }, "strip", z.ZodTypeAny, {
39
48
  name: string;
40
49
  provider: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
41
50
  apiKey?: string | undefined;
42
51
  baseURL?: string | undefined;
43
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
52
+ reasoning?: {
53
+ variant: string;
54
+ budgetTokens?: number | undefined;
55
+ } | undefined;
44
56
  filePath?: string | undefined;
45
57
  displayName?: string | undefined;
46
58
  maxInputTokens?: number | undefined;
@@ -50,7 +62,10 @@ export declare const CustomModelSchema: z.ZodEffects<z.ZodObject<{
50
62
  provider?: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
51
63
  apiKey?: string | undefined;
52
64
  baseURL?: string | undefined;
53
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
65
+ reasoning?: {
66
+ variant: string;
67
+ budgetTokens?: number | undefined;
68
+ } | undefined;
54
69
  filePath?: string | undefined;
55
70
  displayName?: string | undefined;
56
71
  maxInputTokens?: number | undefined;
@@ -60,7 +75,10 @@ export declare const CustomModelSchema: z.ZodEffects<z.ZodObject<{
60
75
  provider: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
61
76
  apiKey?: string | undefined;
62
77
  baseURL?: string | undefined;
63
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
78
+ reasoning?: {
79
+ variant: string;
80
+ budgetTokens?: number | undefined;
81
+ } | undefined;
64
82
  filePath?: string | undefined;
65
83
  displayName?: string | undefined;
66
84
  maxInputTokens?: number | undefined;
@@ -70,7 +88,10 @@ export declare const CustomModelSchema: z.ZodEffects<z.ZodObject<{
70
88
  provider?: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
71
89
  apiKey?: string | undefined;
72
90
  baseURL?: string | undefined;
73
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
91
+ reasoning?: {
92
+ variant: string;
93
+ budgetTokens?: number | undefined;
94
+ } | undefined;
74
95
  filePath?: string | undefined;
75
96
  displayName?: string | undefined;
76
97
  maxInputTokens?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"custom-models.d.ts","sourceRoot":"","sources":["../../src/models/custom-models.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,2CAA2C;AAC3C,eAAO,MAAM,sBAAsB,wHAUzB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CxB,CAAC;AAEP,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAO7D;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAmB/D;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBvE;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUtE;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAG9E"}
1
+ {"version":3,"file":"custom-models.d.ts","sourceRoot":"","sources":["../../src/models/custom-models.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,2CAA2C;AAC3C,eAAO,MAAM,sBAAsB,wHAUzB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDxB,CAAC;AAEP,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAO7D;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAmB/D;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBvE;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUtE;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAG9E"}
@@ -26,9 +26,10 @@ const CustomModelSchema = z.object({
26
26
  // File path for local GGUF models. Required when provider is 'local'.
27
27
  // Stores the absolute path to the .gguf file on disk.
28
28
  filePath: z.string().optional(),
29
- // OpenAI reasoning effort level for reasoning-capable models (o1, o3, codex, gpt-5.x).
30
- // Controls how many reasoning tokens the model generates before producing a response.
31
- reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional()
29
+ reasoning: z.object({
30
+ variant: z.string().trim().min(1),
31
+ budgetTokens: z.number().int().positive().optional()
32
+ }).strict().optional()
32
33
  }).superRefine((data, ctx) => {
33
34
  if ((data.provider === "openai-compatible" || data.provider === "litellm") && !data.baseURL) {
34
35
  ctx.addIssue({
@@ -233,8 +233,8 @@ function createInitialPreferences(options) {
233
233
  if (options.baseURL) {
234
234
  llmConfig.baseURL = options.baseURL;
235
235
  }
236
- if (options.reasoningEffort) {
237
- llmConfig.reasoningEffort = options.reasoningEffort;
236
+ if (options.reasoning) {
237
+ llmConfig.reasoning = options.reasoning;
238
238
  }
239
239
  return {
240
240
  llm: llmConfig,
@@ -1,4 +1,4 @@
1
- import type { LLMProvider } from '@dexto/core';
1
+ import type { LLMProvider, LLMReasoningConfig } from '@dexto/core';
2
2
  import { type AgentPreferences, type GlobalPreferences } from './schemas.js';
3
3
  /**
4
4
  * Load global preferences from ~/.dexto/preferences.yml
@@ -54,8 +54,8 @@ export interface CreatePreferencesOptions {
54
54
  defaultAgent?: string;
55
55
  defaultMode?: 'cli' | 'web' | 'server' | 'discord' | 'telegram' | 'mcp';
56
56
  baseURL?: string;
57
- /** Reasoning effort for OpenAI reasoning models (o1, o3, codex, gpt-5.x) */
58
- reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
57
+ /** Reasoning configuration (tuning only; display is controlled separately). */
58
+ reasoning?: LLMReasoningConfig;
59
59
  setupCompleted?: boolean;
60
60
  /** Whether API key setup was skipped and needs to be configured later */
61
61
  apiKeyPending?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/preferences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;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qCAAqC;IACrC,MAAM,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CACL;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,wBAAwB,GAAG,iBAAiB,CAgD7F;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,GAAG,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CACzC,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,iBAAiB,CAAC,CA4B5B"}
@@ -193,8 +193,8 @@ function createInitialPreferences(options) {
193
193
  if (options.baseURL) {
194
194
  llmConfig.baseURL = options.baseURL;
195
195
  }
196
- if (options.reasoningEffort) {
197
- llmConfig.reasoningEffort = options.reasoningEffort;
196
+ if (options.reasoning) {
197
+ llmConfig.reasoning = options.reasoning;
198
198
  }
199
199
  return {
200
200
  llm: llmConfig,
@@ -29,13 +29,10 @@ __export(schemas_exports, {
29
29
  module.exports = __toCommonJS(schemas_exports);
30
30
  var import_zod = require("zod");
31
31
  var import_core = require("@dexto/core");
32
- var import_core2 = require("@dexto/core");
33
- var import_core3 = require("@dexto/core");
34
32
  var import_error_codes = require("./error-codes.js");
35
- var import_core4 = require("@dexto/core");
36
33
  const PreferenceLLMSchema = import_zod.z.object({
37
- provider: import_zod.z.enum(import_core2.LLM_PROVIDERS).describe("LLM provider (openai, anthropic, google, etc.)"),
38
- model: import_core3.NonEmptyTrimmed.describe("Model name for the provider"),
34
+ provider: import_zod.z.enum(import_core.LLM_PROVIDERS).describe("LLM provider (openai, anthropic, google, etc.)"),
35
+ model: import_core.NonEmptyTrimmed.describe("Model name for the provider"),
39
36
  apiKey: import_zod.z.string().regex(
40
37
  /^\$[A-Z_][A-Z0-9_]*$/,
41
38
  "Must be environment variable reference (e.g., $OPENAI_API_KEY)"
@@ -43,9 +40,14 @@ const PreferenceLLMSchema = import_zod.z.object({
43
40
  "Environment variable reference for API key (optional for local providers like Ollama)"
44
41
  ),
45
42
  baseURL: import_zod.z.string().url("Must be a valid URL (e.g., http://localhost:11434/v1)").optional().describe("Custom base URL for providers that support it (openai-compatible, litellm)"),
46
- reasoningEffort: import_zod.z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional().describe(
47
- "Reasoning effort level for OpenAI reasoning models (o1, o3, codex, gpt-5.x). Auto-detected if not set."
48
- )
43
+ reasoning: import_zod.z.object({
44
+ variant: import_zod.z.string().trim().min(1).describe(
45
+ "Reasoning variant. Use a model/provider-native variant from the active reasoning profile."
46
+ ),
47
+ budgetTokens: import_zod.z.number().int().positive().optional().describe(
48
+ "Advanced escape hatch for budget-based providers (e.g., Anthropic/Gemini/Bedrock/OpenRouter)."
49
+ )
50
+ }).strict().optional().describe("Reasoning configuration (tuning only; display is controlled separately).")
49
51
  }).strict().superRefine((data, ctx) => {
50
52
  const skipModelValidation = (0, import_core.acceptsAnyModel)(data.provider) || (0, import_core.supportsCustomModels)(data.provider);
51
53
  if (!skipModelValidation && !(0, import_core.isValidProviderModel)(data.provider, data.model)) {
@@ -57,7 +59,7 @@ const PreferenceLLMSchema = import_zod.z.object({
57
59
  params: {
58
60
  code: import_error_codes.PreferenceErrorCode.MODEL_INCOMPATIBLE,
59
61
  scope: "preference",
60
- type: import_core4.ErrorType.USER
62
+ type: import_core.ErrorType.USER
61
63
  }
62
64
  });
63
65
  }
@@ -69,10 +71,39 @@ const PreferenceLLMSchema = import_zod.z.object({
69
71
  params: {
70
72
  code: import_error_codes.PreferenceErrorCode.INVALID_PREFERENCE_VALUE,
71
73
  scope: "preference",
72
- type: import_core4.ErrorType.USER
74
+ type: import_core.ErrorType.USER
73
75
  }
74
76
  });
75
77
  }
78
+ if (data.reasoning) {
79
+ const profile = (0, import_core.getReasoningProfile)(data.provider, data.model);
80
+ const variant = data.reasoning.variant;
81
+ const budgetTokens = data.reasoning.budgetTokens;
82
+ if (!(0, import_core.supportsReasoningVariant)(profile, variant)) {
83
+ ctx.addIssue({
84
+ code: import_zod.z.ZodIssueCode.custom,
85
+ path: ["reasoning", "variant"],
86
+ message: `Reasoning variant '${variant}' is not supported for provider '${data.provider}' model '${data.model}'. Supported: ${profile.variants.map((entry) => entry.id).join(", ")}`,
87
+ params: {
88
+ code: import_error_codes.PreferenceErrorCode.INVALID_PREFERENCE_VALUE,
89
+ scope: "preference",
90
+ type: import_core.ErrorType.USER
91
+ }
92
+ });
93
+ }
94
+ if (typeof budgetTokens === "number" && !profile.supportsBudgetTokens) {
95
+ ctx.addIssue({
96
+ code: import_zod.z.ZodIssueCode.custom,
97
+ path: ["reasoning", "budgetTokens"],
98
+ message: `Reasoning budgetTokens are not supported for provider '${data.provider}' model '${data.model}'. Remove reasoning.budgetTokens to use provider defaults.`,
99
+ params: {
100
+ code: import_error_codes.PreferenceErrorCode.INVALID_PREFERENCE_VALUE,
101
+ scope: "preference",
102
+ type: import_core.ErrorType.USER
103
+ }
104
+ });
105
+ }
106
+ }
76
107
  });
77
108
  const PreferenceDefaultsSchema = import_zod.z.object({
78
109
  defaultAgent: import_zod.z.string().min(1).describe("Default agent name for global CLI usage (required)"),
@@ -95,7 +126,7 @@ const PreferenceSoundsSchema = import_zod.z.object({
95
126
  completeSoundFile: import_zod.z.string().min(1).optional().describe("Completion sound file path relative to ~/.dexto/sounds (optional)")
96
127
  }).strict();
97
128
  const AgentToolPreferencesSchema = import_zod.z.object({
98
- disabled: import_zod.z.array(import_core3.NonEmptyTrimmed).default([]).describe("Tool names disabled for this agent (default: none)")
129
+ disabled: import_zod.z.array(import_core.NonEmptyTrimmed).default([]).describe("Tool names disabled for this agent (default: none)")
99
130
  }).strict();
100
131
  const AgentPreferencesSchema = import_zod.z.object({
101
132
  tools: AgentToolPreferencesSchema.default({ disabled: [] }).describe(
@@ -4,31 +4,52 @@ export declare const PreferenceLLMSchema: z.ZodEffects<z.ZodObject<{
4
4
  model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
5
5
  apiKey: z.ZodOptional<z.ZodString>;
6
6
  baseURL: z.ZodOptional<z.ZodString>;
7
- reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
7
+ reasoning: z.ZodOptional<z.ZodObject<{
8
+ variant: z.ZodString;
9
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
10
+ }, "strict", z.ZodTypeAny, {
11
+ variant: string;
12
+ budgetTokens?: number | undefined;
13
+ }, {
14
+ variant: string;
15
+ budgetTokens?: number | undefined;
16
+ }>>;
8
17
  }, "strict", z.ZodTypeAny, {
9
18
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
10
19
  model: string;
11
20
  apiKey?: string | undefined;
12
21
  baseURL?: string | undefined;
13
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
22
+ reasoning?: {
23
+ variant: string;
24
+ budgetTokens?: number | undefined;
25
+ } | undefined;
14
26
  }, {
15
27
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
16
28
  model: string;
17
29
  apiKey?: string | undefined;
18
30
  baseURL?: string | undefined;
19
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
31
+ reasoning?: {
32
+ variant: string;
33
+ budgetTokens?: number | undefined;
34
+ } | undefined;
20
35
  }>, {
21
36
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
22
37
  model: string;
23
38
  apiKey?: string | undefined;
24
39
  baseURL?: string | undefined;
25
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
40
+ reasoning?: {
41
+ variant: string;
42
+ budgetTokens?: number | undefined;
43
+ } | undefined;
26
44
  }, {
27
45
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
28
46
  model: string;
29
47
  apiKey?: string | undefined;
30
48
  baseURL?: string | undefined;
31
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
49
+ reasoning?: {
50
+ variant: string;
51
+ budgetTokens?: number | undefined;
52
+ } | undefined;
32
53
  }>;
33
54
  export declare const PreferenceDefaultsSchema: z.ZodObject<{
34
55
  defaultAgent: z.ZodString;
@@ -108,31 +129,52 @@ export declare const GlobalPreferencesSchema: z.ZodObject<{
108
129
  model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
109
130
  apiKey: z.ZodOptional<z.ZodString>;
110
131
  baseURL: z.ZodOptional<z.ZodString>;
111
- reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
132
+ reasoning: z.ZodOptional<z.ZodObject<{
133
+ variant: z.ZodString;
134
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
135
+ }, "strict", z.ZodTypeAny, {
136
+ variant: string;
137
+ budgetTokens?: number | undefined;
138
+ }, {
139
+ variant: string;
140
+ budgetTokens?: number | undefined;
141
+ }>>;
112
142
  }, "strict", z.ZodTypeAny, {
113
143
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
114
144
  model: string;
115
145
  apiKey?: string | undefined;
116
146
  baseURL?: string | undefined;
117
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
147
+ reasoning?: {
148
+ variant: string;
149
+ budgetTokens?: number | undefined;
150
+ } | undefined;
118
151
  }, {
119
152
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
120
153
  model: string;
121
154
  apiKey?: string | undefined;
122
155
  baseURL?: string | undefined;
123
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
156
+ reasoning?: {
157
+ variant: string;
158
+ budgetTokens?: number | undefined;
159
+ } | undefined;
124
160
  }>, {
125
161
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
126
162
  model: string;
127
163
  apiKey?: string | undefined;
128
164
  baseURL?: string | undefined;
129
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
165
+ reasoning?: {
166
+ variant: string;
167
+ budgetTokens?: number | undefined;
168
+ } | undefined;
130
169
  }, {
131
170
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
132
171
  model: string;
133
172
  apiKey?: string | undefined;
134
173
  baseURL?: string | undefined;
135
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
174
+ reasoning?: {
175
+ variant: string;
176
+ budgetTokens?: number | undefined;
177
+ } | undefined;
136
178
  }>;
137
179
  defaults: z.ZodObject<{
138
180
  defaultAgent: z.ZodString;
@@ -188,7 +230,10 @@ export declare const GlobalPreferencesSchema: z.ZodObject<{
188
230
  model: string;
189
231
  apiKey?: string | undefined;
190
232
  baseURL?: string | undefined;
191
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
233
+ reasoning?: {
234
+ variant: string;
235
+ budgetTokens?: number | undefined;
236
+ } | undefined;
192
237
  };
193
238
  defaults: {
194
239
  defaultAgent: string;
@@ -214,7 +259,10 @@ export declare const GlobalPreferencesSchema: z.ZodObject<{
214
259
  model: string;
215
260
  apiKey?: string | undefined;
216
261
  baseURL?: string | undefined;
217
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
262
+ reasoning?: {
263
+ variant: string;
264
+ budgetTokens?: number | undefined;
265
+ } | undefined;
218
266
  };
219
267
  defaults: {
220
268
  defaultAgent: string;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/preferences/schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;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ustomModels,
7
- supportsBaseURL
7
+ supportsBaseURL,
8
+ getReasoningProfile,
9
+ supportsReasoningVariant,
10
+ LLM_PROVIDERS,
11
+ NonEmptyTrimmed,
12
+ ErrorType
8
13
  } from "@dexto/core";
9
- import { LLM_PROVIDERS } from "@dexto/core";
10
- import { NonEmptyTrimmed } from "@dexto/core";
11
14
  import { PreferenceErrorCode } from "./error-codes.js";
12
- import { ErrorType } from "@dexto/core";
13
15
  const PreferenceLLMSchema = z.object({
14
16
  provider: z.enum(LLM_PROVIDERS).describe("LLM provider (openai, anthropic, google, etc.)"),
15
17
  model: NonEmptyTrimmed.describe("Model name for the provider"),
@@ -20,9 +22,14 @@ const PreferenceLLMSchema = z.object({
20
22
  "Environment variable reference for API key (optional for local providers like Ollama)"
21
23
  ),
22
24
  baseURL: z.string().url("Must be a valid URL (e.g., http://localhost:11434/v1)").optional().describe("Custom base URL for providers that support it (openai-compatible, litellm)"),
23
- reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional().describe(
24
- "Reasoning effort level for OpenAI reasoning models (o1, o3, codex, gpt-5.x). Auto-detected if not set."
25
- )
25
+ reasoning: z.object({
26
+ variant: z.string().trim().min(1).describe(
27
+ "Reasoning variant. Use a model/provider-native variant from the active reasoning profile."
28
+ ),
29
+ budgetTokens: z.number().int().positive().optional().describe(
30
+ "Advanced escape hatch for budget-based providers (e.g., Anthropic/Gemini/Bedrock/OpenRouter)."
31
+ )
32
+ }).strict().optional().describe("Reasoning configuration (tuning only; display is controlled separately).")
26
33
  }).strict().superRefine((data, ctx) => {
27
34
  const skipModelValidation = acceptsAnyModel(data.provider) || supportsCustomModels(data.provider);
28
35
  if (!skipModelValidation && !isValidProviderModel(data.provider, data.model)) {
@@ -50,6 +57,35 @@ const PreferenceLLMSchema = z.object({
50
57
  }
51
58
  });
52
59
  }
60
+ if (data.reasoning) {
61
+ const profile = getReasoningProfile(data.provider, data.model);
62
+ const variant = data.reasoning.variant;
63
+ const budgetTokens = data.reasoning.budgetTokens;
64
+ if (!supportsReasoningVariant(profile, variant)) {
65
+ ctx.addIssue({
66
+ code: z.ZodIssueCode.custom,
67
+ path: ["reasoning", "variant"],
68
+ message: `Reasoning variant '${variant}' is not supported for provider '${data.provider}' model '${data.model}'. Supported: ${profile.variants.map((entry) => entry.id).join(", ")}`,
69
+ params: {
70
+ code: PreferenceErrorCode.INVALID_PREFERENCE_VALUE,
71
+ scope: "preference",
72
+ type: ErrorType.USER
73
+ }
74
+ });
75
+ }
76
+ if (typeof budgetTokens === "number" && !profile.supportsBudgetTokens) {
77
+ ctx.addIssue({
78
+ code: z.ZodIssueCode.custom,
79
+ path: ["reasoning", "budgetTokens"],
80
+ message: `Reasoning budgetTokens are not supported for provider '${data.provider}' model '${data.model}'. Remove reasoning.budgetTokens to use provider defaults.`,
81
+ params: {
82
+ code: PreferenceErrorCode.INVALID_PREFERENCE_VALUE,
83
+ scope: "preference",
84
+ type: ErrorType.USER
85
+ }
86
+ });
87
+ }
88
+ }
53
89
  });
54
90
  const PreferenceDefaultsSchema = z.object({
55
91
  defaultAgent: z.string().min(1).describe("Default agent name for global CLI usage (required)"),