@dexto/agent-management 1.6.0 → 1.6.2

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 (69) 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/config/config-enrichment.cjs +8 -3
  5. package/dist/config/config-enrichment.d.ts +6 -0
  6. package/dist/config/config-enrichment.d.ts.map +1 -1
  7. package/dist/config/config-enrichment.js +8 -3
  8. package/dist/index.cjs +3 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -0
  12. package/dist/models/custom-models.cjs +4 -3
  13. package/dist/models/custom-models.d.ts +26 -5
  14. package/dist/models/custom-models.d.ts.map +1 -1
  15. package/dist/models/custom-models.js +4 -3
  16. package/dist/preferences/loader.cjs +23 -8
  17. package/dist/preferences/loader.d.ts +7 -3
  18. package/dist/preferences/loader.d.ts.map +1 -1
  19. package/dist/preferences/loader.js +23 -8
  20. package/dist/preferences/schemas.cjs +47 -12
  21. package/dist/preferences/schemas.d.ts +92 -12
  22. package/dist/preferences/schemas.d.ts.map +1 -1
  23. package/dist/preferences/schemas.js +48 -8
  24. package/dist/registry/types.cjs +4 -0
  25. package/dist/registry/types.d.ts +8 -0
  26. package/dist/registry/types.d.ts.map +1 -1
  27. package/dist/registry/types.js +4 -0
  28. package/dist/runtime/AgentRuntime.cjs +23 -15
  29. package/dist/runtime/AgentRuntime.d.ts.map +1 -1
  30. package/dist/runtime/AgentRuntime.js +23 -15
  31. package/dist/runtime/approval-delegation.cjs +6 -3
  32. package/dist/runtime/approval-delegation.d.ts +2 -1
  33. package/dist/runtime/approval-delegation.d.ts.map +1 -1
  34. package/dist/runtime/approval-delegation.js +6 -3
  35. package/dist/runtime/schemas.cjs +1 -1
  36. package/dist/runtime/schemas.js +1 -1
  37. package/dist/runtime/types.d.ts +1 -1
  38. package/dist/runtime/types.d.ts.map +1 -1
  39. package/dist/tool-factories/agent-spawner/factory.cjs +63 -26
  40. package/dist/tool-factories/agent-spawner/factory.d.ts.map +1 -1
  41. package/dist/tool-factories/agent-spawner/factory.js +61 -24
  42. package/dist/tool-factories/agent-spawner/runtime.cjs +166 -15
  43. package/dist/tool-factories/agent-spawner/runtime.d.ts +8 -1
  44. package/dist/tool-factories/agent-spawner/runtime.d.ts.map +1 -1
  45. package/dist/tool-factories/agent-spawner/runtime.js +173 -17
  46. package/dist/tool-factories/agent-spawner/schemas.cjs +14 -2
  47. package/dist/tool-factories/agent-spawner/schemas.d.ts +10 -1
  48. package/dist/tool-factories/agent-spawner/schemas.d.ts.map +1 -1
  49. package/dist/tool-factories/agent-spawner/schemas.js +12 -2
  50. package/dist/tool-factories/agent-spawner/spawn-agent-tool.cjs +10 -1
  51. package/dist/tool-factories/agent-spawner/spawn-agent-tool.d.ts.map +1 -1
  52. package/dist/tool-factories/agent-spawner/spawn-agent-tool.js +10 -1
  53. package/dist/tool-factories/creator-tools/factory.cjs +434 -0
  54. package/dist/tool-factories/creator-tools/factory.d.ts +4 -0
  55. package/dist/tool-factories/creator-tools/factory.d.ts.map +1 -0
  56. package/dist/tool-factories/creator-tools/factory.js +407 -0
  57. package/dist/tool-factories/creator-tools/index.cjs +33 -0
  58. package/dist/tool-factories/creator-tools/index.d.ts +3 -0
  59. package/dist/tool-factories/creator-tools/index.d.ts.map +1 -0
  60. package/dist/tool-factories/creator-tools/index.js +10 -0
  61. package/dist/tool-factories/creator-tools/schemas.cjs +41 -0
  62. package/dist/tool-factories/creator-tools/schemas.d.ts +15 -0
  63. package/dist/tool-factories/creator-tools/schemas.d.ts.map +1 -0
  64. package/dist/tool-factories/creator-tools/schemas.js +16 -0
  65. package/dist/utils/path.cjs +10 -1
  66. package/dist/utils/path.d.ts +5 -2
  67. package/dist/utils/path.d.ts.map +1 -1
  68. package/dist/utils/path.js +10 -1
  69. package/package.json +6 -6
@@ -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
  }
@@ -64,7 +64,8 @@ function enrichAgentConfig(config, configPath, options = {}) {
64
64
  isInteractiveCli = false,
65
65
  logLevel = "error",
66
66
  skipPluginDiscovery = false,
67
- bundledPlugins = []
67
+ bundledPlugins = [],
68
+ forceStoragePaths = false
68
69
  } = opts;
69
70
  const agentId = deriveAgentId(config, configPath);
70
71
  const dbPath = (0, import_path.getDextoPath)("database", `${agentId}.db`);
@@ -94,15 +95,19 @@ function enrichAgentConfig(config, configPath, options = {}) {
94
95
  ...config.storage
95
96
  };
96
97
  if (config.storage.database?.type === "sqlite") {
98
+ const databasePath = typeof config.storage.database.path === "string" ? config.storage.database.path : void 0;
99
+ const shouldOverride = !databasePath || forceStoragePaths && !path.isAbsolute(databasePath);
97
100
  enriched.storage.database = {
98
101
  ...config.storage.database,
99
- path: config.storage.database.path || dbPath
102
+ path: shouldOverride ? dbPath : databasePath
100
103
  };
101
104
  }
102
105
  if (config.storage.blob?.type === "local") {
106
+ const blobStorePath = typeof config.storage.blob.storePath === "string" ? config.storage.blob.storePath : void 0;
107
+ const shouldOverride = !blobStorePath || forceStoragePaths && !path.isAbsolute(blobStorePath);
103
108
  enriched.storage.blob = {
104
109
  ...config.storage.blob,
105
- storePath: config.storage.blob.storePath || blobPath
110
+ storePath: shouldOverride ? blobPath : blobStorePath
106
111
  };
107
112
  }
108
113
  }
@@ -35,6 +35,12 @@ export interface EnrichAgentConfigOptions {
35
35
  * user/project plugins.
36
36
  */
37
37
  bundledPlugins?: string[];
38
+ /**
39
+ * When true, normalize relative storage paths (database/blob) to per-agent
40
+ * locations.
41
+ * Useful when configs may be loaded from varying working directories.
42
+ */
43
+ forceStoragePaths?: boolean;
38
44
  }
39
45
  /**
40
46
  * Enriches agent configuration with per-agent file paths and discovered commands.
@@ -1 +1 @@
1
- {"version":3,"file":"config-enrichment.d.ts","sourceRoot":"","sources":["../../src/config/config-enrichment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAUvD,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAE7F;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAoC9E;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,mGAAmG;IACnG,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,WAAW,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,wBAAwB,GAAG,OAAY,GACjD,WAAW,CA2Ob"}
1
+ {"version":3,"file":"config-enrichment.d.ts","sourceRoot":"","sources":["../../src/config/config-enrichment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAUvD,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAE7F;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAoC9E;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,mGAAmG;IACnG,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,WAAW,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,wBAAwB,GAAG,OAAY,GACjD,WAAW,CAwPb"}
@@ -32,7 +32,8 @@ function enrichAgentConfig(config, configPath, options = {}) {
32
32
  isInteractiveCli = false,
33
33
  logLevel = "error",
34
34
  skipPluginDiscovery = false,
35
- bundledPlugins = []
35
+ bundledPlugins = [],
36
+ forceStoragePaths = false
36
37
  } = opts;
37
38
  const agentId = deriveAgentId(config, configPath);
38
39
  const dbPath = getDextoPath("database", `${agentId}.db`);
@@ -62,15 +63,19 @@ function enrichAgentConfig(config, configPath, options = {}) {
62
63
  ...config.storage
63
64
  };
64
65
  if (config.storage.database?.type === "sqlite") {
66
+ const databasePath = typeof config.storage.database.path === "string" ? config.storage.database.path : void 0;
67
+ const shouldOverride = !databasePath || forceStoragePaths && !path.isAbsolute(databasePath);
65
68
  enriched.storage.database = {
66
69
  ...config.storage.database,
67
- path: config.storage.database.path || dbPath
70
+ path: shouldOverride ? dbPath : databasePath
68
71
  };
69
72
  }
70
73
  if (config.storage.blob?.type === "local") {
74
+ const blobStorePath = typeof config.storage.blob.storePath === "string" ? config.storage.blob.storePath : void 0;
75
+ const shouldOverride = !blobStorePath || forceStoragePaths && !path.isAbsolute(blobStorePath);
71
76
  enriched.storage.blob = {
72
77
  ...config.storage.blob,
73
- storePath: config.storage.blob.storePath || blobPath
78
+ storePath: shouldOverride ? blobPath : blobStorePath
74
79
  };
75
80
  }
76
81
  }
package/dist/index.cjs CHANGED
@@ -193,6 +193,7 @@ var import_custom_models = require("./models/custom-models.js");
193
193
  var import_models = require("./models/index.js");
194
194
  __reExport(index_exports, require("./runtime/index.js"), module.exports);
195
195
  __reExport(index_exports, require("./tool-factories/agent-spawner/index.js"), module.exports);
196
+ __reExport(index_exports, require("./tool-factories/creator-tools/index.js"), module.exports);
196
197
  var import_plugins = require("./plugins/index.js");
197
198
  // Annotate the CommonJS export names for ESM import in node:
198
199
  0 && (module.exports = {
@@ -342,5 +343,6 @@ var import_plugins = require("./plugins/index.js");
342
343
  writeLLMPreferences,
343
344
  writePreferencesToAgent,
344
345
  ...require("./runtime/index.js"),
345
- ...require("./tool-factories/agent-spawner/index.js")
346
+ ...require("./tool-factories/agent-spawner/index.js"),
347
+ ...require("./tool-factories/creator-tools/index.js")
346
348
  });
package/dist/index.d.ts CHANGED
@@ -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
-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yB,EACzB,oBAAoB,EAEpB,oBAAoB,EAEpB,uBAAuB,EACvB,eAAe,EAEf,oBAAoB,EACpB,4BAA4B,EAE5B,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,EAEjB,eAAe,EAEf,oBAAoB,EACpB,qBAAqB,EAErB,eAAe,EACf,WAAW,EAEX,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,4BAA4B,EAC5B,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAEhB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAE3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAChC,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -141,6 +141,7 @@ import {
141
141
  } from "./models/index.js";
142
142
  export * from "./runtime/index.js";
143
143
  export * from "./tool-factories/agent-spawner/index.js";
144
+ export * from "./tool-factories/creator-tools/index.js";
144
145
  import {
145
146
  discoverClaudeCodePlugins,
146
147
  getPluginSearchPaths,
@@ -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,C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AEG;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({
@@ -79,11 +79,22 @@ const PREFERENCES_FILE_HEADER = `# Dexto Global Preferences
79
79
  # Documentation: https://dexto.dev/docs/configuration/preferences
80
80
  #
81
81
  # Sound Notifications:
82
- # Dexto plays sounds for approval requests and task completion.
83
- # To customize sounds, place audio files in ~/.dexto/sounds/:
84
- # - approval.wav (or .mp3, .ogg, .aiff, .m4a) - played when tool approval is needed
85
- # - complete.wav (or .mp3, .ogg, .aiff, .m4a) - played when agent finishes a task
86
- # Set sounds.enabled: false to disable all sounds.
82
+ # Dexto plays sounds for CLI startup, approval requests, and task completion.
83
+ # Configure which events play sounds:
84
+ # sounds.enabled: true|false
85
+ # sounds.onStartup: true|false
86
+ # sounds.onApprovalRequired: true|false
87
+ # sounds.onTaskComplete: true|false
88
+ #
89
+ # Select sound files (paths are relative to ~/.dexto/sounds):
90
+ # sounds.startupSoundFile: builtins/startup.wav
91
+ # sounds.approvalSoundFile: builtins/coin.wav
92
+ # sounds.completeSoundFile: builtins/success.wav
93
+ #
94
+ # Tip: Use the /sounds overlay to preview and pick sounds.
95
+ #
96
+ # To use custom sounds, copy files into ~/.dexto/sounds/ (subfolders ok) and set the *SoundFile
97
+ # keys to a relative path. Supported audio formats vary by OS (Windows reliably supports .wav).
87
98
 
88
99
  `;
89
100
  const AGENT_PREFERENCES_FILE_HEADER = `# Dexto Agent Preferences
@@ -222,8 +233,8 @@ function createInitialPreferences(options) {
222
233
  if (options.baseURL) {
223
234
  llmConfig.baseURL = options.baseURL;
224
235
  }
225
- if (options.reasoningEffort) {
226
- llmConfig.reasoningEffort = options.reasoningEffort;
236
+ if (options.reasoning) {
237
+ llmConfig.reasoning = options.reasoning;
227
238
  }
228
239
  return {
229
240
  llm: llmConfig,
@@ -238,8 +249,12 @@ function createInitialPreferences(options) {
238
249
  },
239
250
  sounds: {
240
251
  enabled: options.sounds?.enabled ?? true,
252
+ onStartup: options.sounds?.onStartup ?? false,
253
+ ...options.sounds?.startupSoundFile ? { startupSoundFile: options.sounds.startupSoundFile } : {},
241
254
  onApprovalRequired: options.sounds?.onApprovalRequired ?? true,
242
- onTaskComplete: options.sounds?.onTaskComplete ?? true
255
+ ...options.sounds?.approvalSoundFile ? { approvalSoundFile: options.sounds.approvalSoundFile } : {},
256
+ onTaskComplete: options.sounds?.onTaskComplete ?? true,
257
+ ...options.sounds?.completeSoundFile ? { completeSoundFile: options.sounds.completeSoundFile } : {}
243
258
  }
244
259
  };
245
260
  }
@@ -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;
@@ -64,8 +64,12 @@ export interface CreatePreferencesOptions {
64
64
  /** Sound notification preferences */
65
65
  sounds?: {
66
66
  enabled?: boolean;
67
+ onStartup?: boolean;
68
+ startupSoundFile?: string;
67
69
  onApprovalRequired?: boolean;
70
+ approvalSoundFile?: string;
68
71
  onTaskComplete?: boolean;
72
+ completeSoundFile?: string;
69
73
  };
70
74
  }
71
75
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/preferences/loader.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAGH,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACzB,MAAM,cAAc,CAAC;AAItB;;;;;GAKG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,iBAAiB,CAAC,CA+BxE;AA2BD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAsB/D;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA4BrF;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACtC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,IAAI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AAG;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"}
@@ -39,11 +39,22 @@ const PREFERENCES_FILE_HEADER = `# Dexto Global Preferences
39
39
  # Documentation: https://dexto.dev/docs/configuration/preferences
40
40
  #
41
41
  # Sound Notifications:
42
- # Dexto plays sounds for approval requests and task completion.
43
- # To customize sounds, place audio files in ~/.dexto/sounds/:
44
- # - approval.wav (or .mp3, .ogg, .aiff, .m4a) - played when tool approval is needed
45
- # - complete.wav (or .mp3, .ogg, .aiff, .m4a) - played when agent finishes a task
46
- # Set sounds.enabled: false to disable all sounds.
42
+ # Dexto plays sounds for CLI startup, approval requests, and task completion.
43
+ # Configure which events play sounds:
44
+ # sounds.enabled: true|false
45
+ # sounds.onStartup: true|false
46
+ # sounds.onApprovalRequired: true|false
47
+ # sounds.onTaskComplete: true|false
48
+ #
49
+ # Select sound files (paths are relative to ~/.dexto/sounds):
50
+ # sounds.startupSoundFile: builtins/startup.wav
51
+ # sounds.approvalSoundFile: builtins/coin.wav
52
+ # sounds.completeSoundFile: builtins/success.wav
53
+ #
54
+ # Tip: Use the /sounds overlay to preview and pick sounds.
55
+ #
56
+ # To use custom sounds, copy files into ~/.dexto/sounds/ (subfolders ok) and set the *SoundFile
57
+ # keys to a relative path. Supported audio formats vary by OS (Windows reliably supports .wav).
47
58
 
48
59
  `;
49
60
  const AGENT_PREFERENCES_FILE_HEADER = `# Dexto Agent Preferences
@@ -182,8 +193,8 @@ function createInitialPreferences(options) {
182
193
  if (options.baseURL) {
183
194
  llmConfig.baseURL = options.baseURL;
184
195
  }
185
- if (options.reasoningEffort) {
186
- llmConfig.reasoningEffort = options.reasoningEffort;
196
+ if (options.reasoning) {
197
+ llmConfig.reasoning = options.reasoning;
187
198
  }
188
199
  return {
189
200
  llm: llmConfig,
@@ -198,8 +209,12 @@ function createInitialPreferences(options) {
198
209
  },
199
210
  sounds: {
200
211
  enabled: options.sounds?.enabled ?? true,
212
+ onStartup: options.sounds?.onStartup ?? false,
213
+ ...options.sounds?.startupSoundFile ? { startupSoundFile: options.sounds.startupSoundFile } : {},
201
214
  onApprovalRequired: options.sounds?.onApprovalRequired ?? true,
202
- onTaskComplete: options.sounds?.onTaskComplete ?? true
215
+ ...options.sounds?.approvalSoundFile ? { approvalSoundFile: options.sounds.approvalSoundFile } : {},
216
+ onTaskComplete: options.sounds?.onTaskComplete ?? true,
217
+ ...options.sounds?.completeSoundFile ? { completeSoundFile: options.sounds.completeSoundFile } : {}
203
218
  }
204
219
  };
205
220
  }
@@ -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)"),
@@ -85,13 +116,17 @@ const PreferenceSetupSchema = import_zod.z.object({
85
116
  }).strict();
86
117
  const PreferenceSoundsSchema = import_zod.z.object({
87
118
  enabled: import_zod.z.boolean().default(true).describe("Enable sound notifications (default: true)"),
119
+ onStartup: import_zod.z.boolean().default(false).describe("Play sound when the interactive CLI starts (default: false)"),
120
+ startupSoundFile: import_zod.z.string().min(1).optional().describe("Startup sound file path relative to ~/.dexto/sounds (optional)"),
88
121
  onApprovalRequired: import_zod.z.boolean().default(true).describe(
89
122
  "Play sound when tool approval is required (default: true when sounds enabled)"
90
123
  ),
91
- onTaskComplete: import_zod.z.boolean().default(true).describe("Play sound when agent task completes (default: true when sounds enabled)")
124
+ approvalSoundFile: import_zod.z.string().min(1).optional().describe("Approval sound file path relative to ~/.dexto/sounds (optional)"),
125
+ onTaskComplete: import_zod.z.boolean().default(true).describe("Play sound when agent task completes (default: true when sounds enabled)"),
126
+ completeSoundFile: import_zod.z.string().min(1).optional().describe("Completion sound file path relative to ~/.dexto/sounds (optional)")
92
127
  }).strict();
93
128
  const AgentToolPreferencesSchema = import_zod.z.object({
94
- 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)")
95
130
  }).strict();
96
131
  const AgentPreferencesSchema = import_zod.z.object({
97
132
  tools: AgentToolPreferencesSchema.default({ disabled: [] }).describe(