@dexto/agent-management 1.6.13 → 1.6.15
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/config/config-enrichment.cjs +24 -7
- package/dist/config/config-enrichment.d.ts +5 -0
- package/dist/config/config-enrichment.d.ts.map +1 -1
- package/dist/config/config-enrichment.js +24 -7
- package/dist/config/discover-prompts.cjs +7 -7
- package/dist/config/discover-prompts.d.ts +5 -3
- package/dist/config/discover-prompts.d.ts.map +1 -1
- package/dist/config/discover-prompts.js +7 -7
- package/dist/config/error-codes.cjs +1 -0
- package/dist/config/error-codes.d.ts +1 -0
- package/dist/config/error-codes.d.ts.map +1 -1
- package/dist/config/error-codes.js +1 -0
- package/dist/config/errors.cjs +12 -2
- package/dist/config/errors.d.ts +5 -0
- package/dist/config/errors.d.ts.map +1 -1
- package/dist/config/errors.js +12 -2
- package/dist/index.cjs +37 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -0
- package/dist/plugins/discover-skills.cjs +2 -0
- package/dist/plugins/discover-skills.d.ts +7 -5
- package/dist/plugins/discover-skills.d.ts.map +1 -1
- package/dist/plugins/discover-skills.js +2 -0
- package/dist/project-registry.cjs +380 -0
- package/dist/project-registry.d.ts +153 -0
- package/dist/project-registry.d.ts.map +1 -0
- package/dist/project-registry.js +329 -0
- package/dist/resolver.cjs +23 -2
- package/dist/resolver.d.ts.map +1 -1
- package/dist/resolver.js +26 -2
- package/dist/tool-factories/agent-spawner/factory.cjs +12 -0
- package/dist/tool-factories/agent-spawner/factory.d.ts.map +1 -1
- package/dist/tool-factories/agent-spawner/factory.js +12 -0
- package/dist/tool-factories/agent-spawner/runtime.cjs +189 -27
- package/dist/tool-factories/agent-spawner/runtime.d.ts +7 -1
- package/dist/tool-factories/agent-spawner/runtime.d.ts.map +1 -1
- package/dist/tool-factories/agent-spawner/runtime.js +189 -27
- package/dist/tool-factories/agent-spawner/schemas.cjs +6 -3
- package/dist/tool-factories/agent-spawner/schemas.d.ts +3 -2
- package/dist/tool-factories/agent-spawner/schemas.d.ts.map +1 -1
- package/dist/tool-factories/agent-spawner/schemas.js +6 -3
- package/dist/tool-factories/agent-spawner/spawn-agent-tool.cjs +4 -3
- package/dist/tool-factories/agent-spawner/spawn-agent-tool.d.ts.map +1 -1
- package/dist/tool-factories/agent-spawner/spawn-agent-tool.js +4 -3
- package/dist/utils/execution-context.cjs +61 -16
- package/dist/utils/execution-context.d.ts.map +1 -1
- package/dist/utils/execution-context.js +62 -17
- package/package.json +5 -5
|
@@ -37,6 +37,7 @@ module.exports = __toCommonJS(config_enrichment_exports);
|
|
|
37
37
|
var import_path = require("../utils/path.js");
|
|
38
38
|
var path = __toESM(require("path"), 1);
|
|
39
39
|
var import_discover_prompts = require("./discover-prompts.js");
|
|
40
|
+
var import_execution_context = require("../utils/execution-context.js");
|
|
40
41
|
var import_plugins = require("../plugins/index.js");
|
|
41
42
|
var import_discover_prompts2 = require("./discover-prompts.js");
|
|
42
43
|
function deriveAgentId(config, configPath) {
|
|
@@ -58,6 +59,20 @@ function deriveAgentId(config, configPath) {
|
|
|
58
59
|
}
|
|
59
60
|
return "coding-agent";
|
|
60
61
|
}
|
|
62
|
+
function resolveEnrichmentWorkspaceRoot(configPath, explicitWorkspaceRoot) {
|
|
63
|
+
if (explicitWorkspaceRoot) {
|
|
64
|
+
return path.resolve(explicitWorkspaceRoot);
|
|
65
|
+
}
|
|
66
|
+
if (configPath) {
|
|
67
|
+
const resolvedConfigDir = path.dirname(path.resolve(configPath));
|
|
68
|
+
const configProjectRoot = (0, import_execution_context.findDextoProjectRoot)(resolvedConfigDir);
|
|
69
|
+
if (configProjectRoot) {
|
|
70
|
+
return configProjectRoot;
|
|
71
|
+
}
|
|
72
|
+
return resolvedConfigDir;
|
|
73
|
+
}
|
|
74
|
+
return (0, import_execution_context.findDextoProjectRoot)() ?? process.cwd();
|
|
75
|
+
}
|
|
61
76
|
function enrichAgentConfig(config, configPath, options = {}) {
|
|
62
77
|
const opts = typeof options === "boolean" ? { isInteractiveCli: options } : options;
|
|
63
78
|
const {
|
|
@@ -65,11 +80,13 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
65
80
|
logLevel = "error",
|
|
66
81
|
skipPluginDiscovery = false,
|
|
67
82
|
bundledPlugins = [],
|
|
68
|
-
forceStoragePaths = false
|
|
83
|
+
forceStoragePaths = false,
|
|
84
|
+
workspaceRoot: explicitWorkspaceRoot
|
|
69
85
|
} = opts;
|
|
70
86
|
const agentId = deriveAgentId(config, configPath);
|
|
71
|
-
const
|
|
72
|
-
const
|
|
87
|
+
const workspaceRoot = resolveEnrichmentWorkspaceRoot(configPath, explicitWorkspaceRoot);
|
|
88
|
+
const dbPath = (0, import_path.getDextoPath)("database", `${agentId}.db`, workspaceRoot);
|
|
89
|
+
const blobPath = (0, import_path.getDextoPath)("blobs", agentId, workspaceRoot);
|
|
73
90
|
const enriched = {
|
|
74
91
|
...config,
|
|
75
92
|
agentId
|
|
@@ -111,7 +128,7 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
111
128
|
};
|
|
112
129
|
}
|
|
113
130
|
}
|
|
114
|
-
const discoveredPrompts = (0, import_discover_prompts.discoverCommandPrompts)();
|
|
131
|
+
const discoveredPrompts = (0, import_discover_prompts.discoverCommandPrompts)(workspaceRoot);
|
|
115
132
|
if (discoveredPrompts.length > 0) {
|
|
116
133
|
const existingPrompts = config.prompts ?? [];
|
|
117
134
|
const existingFilePaths = /* @__PURE__ */ new Set();
|
|
@@ -132,7 +149,7 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
132
149
|
existingPromptPaths.add(path.resolve(prompt.file));
|
|
133
150
|
}
|
|
134
151
|
}
|
|
135
|
-
const discoveredPlugins = (0, import_plugins.discoverClaudeCodePlugins)(
|
|
152
|
+
const discoveredPlugins = (0, import_plugins.discoverClaudeCodePlugins)(workspaceRoot, bundledPlugins);
|
|
136
153
|
for (const plugin of discoveredPlugins) {
|
|
137
154
|
const loaded = (0, import_plugins.loadClaudeCodePlugin)(plugin);
|
|
138
155
|
for (const warning of loaded.warnings) {
|
|
@@ -159,7 +176,7 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
159
176
|
};
|
|
160
177
|
}
|
|
161
178
|
}
|
|
162
|
-
const standaloneSkills = (0, import_plugins.discoverStandaloneSkills)();
|
|
179
|
+
const standaloneSkills = (0, import_plugins.discoverStandaloneSkills)(workspaceRoot);
|
|
163
180
|
for (const skill of standaloneSkills) {
|
|
164
181
|
const resolvedPath = path.resolve(skill.skillFile);
|
|
165
182
|
if (existingPromptPaths.has(resolvedPath)) {
|
|
@@ -177,7 +194,7 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
177
194
|
}
|
|
178
195
|
}
|
|
179
196
|
const shouldDiscoverAgentInstructions = config.agentFile?.discoverInCwd !== void 0 ? config.agentFile.discoverInCwd : true;
|
|
180
|
-
const instructionFile = shouldDiscoverAgentInstructions ? (0, import_discover_prompts.discoverAgentInstructionFile)() : null;
|
|
197
|
+
const instructionFile = shouldDiscoverAgentInstructions ? (0, import_discover_prompts.discoverAgentInstructionFile)(workspaceRoot) : null;
|
|
181
198
|
if (instructionFile) {
|
|
182
199
|
const fileContributor = {
|
|
183
200
|
id: "discovered-instructions",
|
|
@@ -41,6 +41,11 @@ export interface EnrichAgentConfigOptions {
|
|
|
41
41
|
* Useful when configs may be loaded from varying working directories.
|
|
42
42
|
*/
|
|
43
43
|
forceStoragePaths?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Explicit workspace root to use for workspace-scoped discovery (skills, AGENTS.md).
|
|
46
|
+
* When omitted, enrichment falls back to the selected config path and then the ambient cwd.
|
|
47
|
+
*/
|
|
48
|
+
workspaceRoot?: string | undefined;
|
|
44
49
|
}
|
|
45
50
|
/**
|
|
46
51
|
* 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;
|
|
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;AAWvD,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;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAuBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,WAAW,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,wBAAwB,GAAG,OAAY,GACjD,WAAW,CA6Pb"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getDextoPath } from "../utils/path.js";
|
|
2
2
|
import * as path from "path";
|
|
3
3
|
import { discoverCommandPrompts, discoverAgentInstructionFile } from "./discover-prompts.js";
|
|
4
|
+
import { findDextoProjectRoot } from "../utils/execution-context.js";
|
|
4
5
|
import {
|
|
5
6
|
discoverClaudeCodePlugins,
|
|
6
7
|
loadClaudeCodePlugin,
|
|
@@ -26,6 +27,20 @@ function deriveAgentId(config, configPath) {
|
|
|
26
27
|
}
|
|
27
28
|
return "coding-agent";
|
|
28
29
|
}
|
|
30
|
+
function resolveEnrichmentWorkspaceRoot(configPath, explicitWorkspaceRoot) {
|
|
31
|
+
if (explicitWorkspaceRoot) {
|
|
32
|
+
return path.resolve(explicitWorkspaceRoot);
|
|
33
|
+
}
|
|
34
|
+
if (configPath) {
|
|
35
|
+
const resolvedConfigDir = path.dirname(path.resolve(configPath));
|
|
36
|
+
const configProjectRoot = findDextoProjectRoot(resolvedConfigDir);
|
|
37
|
+
if (configProjectRoot) {
|
|
38
|
+
return configProjectRoot;
|
|
39
|
+
}
|
|
40
|
+
return resolvedConfigDir;
|
|
41
|
+
}
|
|
42
|
+
return findDextoProjectRoot() ?? process.cwd();
|
|
43
|
+
}
|
|
29
44
|
function enrichAgentConfig(config, configPath, options = {}) {
|
|
30
45
|
const opts = typeof options === "boolean" ? { isInteractiveCli: options } : options;
|
|
31
46
|
const {
|
|
@@ -33,11 +48,13 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
33
48
|
logLevel = "error",
|
|
34
49
|
skipPluginDiscovery = false,
|
|
35
50
|
bundledPlugins = [],
|
|
36
|
-
forceStoragePaths = false
|
|
51
|
+
forceStoragePaths = false,
|
|
52
|
+
workspaceRoot: explicitWorkspaceRoot
|
|
37
53
|
} = opts;
|
|
38
54
|
const agentId = deriveAgentId(config, configPath);
|
|
39
|
-
const
|
|
40
|
-
const
|
|
55
|
+
const workspaceRoot = resolveEnrichmentWorkspaceRoot(configPath, explicitWorkspaceRoot);
|
|
56
|
+
const dbPath = getDextoPath("database", `${agentId}.db`, workspaceRoot);
|
|
57
|
+
const blobPath = getDextoPath("blobs", agentId, workspaceRoot);
|
|
41
58
|
const enriched = {
|
|
42
59
|
...config,
|
|
43
60
|
agentId
|
|
@@ -79,7 +96,7 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
79
96
|
};
|
|
80
97
|
}
|
|
81
98
|
}
|
|
82
|
-
const discoveredPrompts = discoverCommandPrompts();
|
|
99
|
+
const discoveredPrompts = discoverCommandPrompts(workspaceRoot);
|
|
83
100
|
if (discoveredPrompts.length > 0) {
|
|
84
101
|
const existingPrompts = config.prompts ?? [];
|
|
85
102
|
const existingFilePaths = /* @__PURE__ */ new Set();
|
|
@@ -100,7 +117,7 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
100
117
|
existingPromptPaths.add(path.resolve(prompt.file));
|
|
101
118
|
}
|
|
102
119
|
}
|
|
103
|
-
const discoveredPlugins = discoverClaudeCodePlugins(
|
|
120
|
+
const discoveredPlugins = discoverClaudeCodePlugins(workspaceRoot, bundledPlugins);
|
|
104
121
|
for (const plugin of discoveredPlugins) {
|
|
105
122
|
const loaded = loadClaudeCodePlugin(plugin);
|
|
106
123
|
for (const warning of loaded.warnings) {
|
|
@@ -127,7 +144,7 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
127
144
|
};
|
|
128
145
|
}
|
|
129
146
|
}
|
|
130
|
-
const standaloneSkills = discoverStandaloneSkills();
|
|
147
|
+
const standaloneSkills = discoverStandaloneSkills(workspaceRoot);
|
|
131
148
|
for (const skill of standaloneSkills) {
|
|
132
149
|
const resolvedPath = path.resolve(skill.skillFile);
|
|
133
150
|
if (existingPromptPaths.has(resolvedPath)) {
|
|
@@ -145,7 +162,7 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
145
162
|
}
|
|
146
163
|
}
|
|
147
164
|
const shouldDiscoverAgentInstructions = config.agentFile?.discoverInCwd !== void 0 ? config.agentFile.discoverInCwd : true;
|
|
148
|
-
const instructionFile = shouldDiscoverAgentInstructions ? discoverAgentInstructionFile() : null;
|
|
165
|
+
const instructionFile = shouldDiscoverAgentInstructions ? discoverAgentInstructionFile(workspaceRoot) : null;
|
|
149
166
|
if (instructionFile) {
|
|
150
167
|
const fileContributor = {
|
|
151
168
|
id: "discovered-instructions",
|
|
@@ -36,10 +36,10 @@ var import_execution_context = require("../utils/execution-context.js");
|
|
|
36
36
|
var import_path = require("../utils/path.js");
|
|
37
37
|
var path = __toESM(require("path"), 1);
|
|
38
38
|
var import_fs = require("fs");
|
|
39
|
-
function discoverCommandPrompts() {
|
|
39
|
+
function discoverCommandPrompts(searchRoot) {
|
|
40
40
|
const prompts = [];
|
|
41
41
|
const seenFiles = /* @__PURE__ */ new Set();
|
|
42
|
-
const cwd = process.cwd();
|
|
42
|
+
const cwd = path.resolve(searchRoot ?? process.cwd());
|
|
43
43
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
44
44
|
const scanAndAdd = (dir) => {
|
|
45
45
|
if (!(0, import_fs.existsSync)(dir)) return;
|
|
@@ -52,13 +52,13 @@ function discoverCommandPrompts() {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
const context = (0, import_execution_context.getExecutionContext)();
|
|
55
|
+
const context = (0, import_execution_context.getExecutionContext)(cwd);
|
|
56
56
|
let localCommandsDir = null;
|
|
57
57
|
switch (context) {
|
|
58
58
|
case "dexto-source": {
|
|
59
59
|
const isDevMode = process.env.DEXTO_DEV_MODE === "true";
|
|
60
60
|
if (isDevMode) {
|
|
61
|
-
const sourceRoot = (0, import_execution_context.findDextoSourceRoot)();
|
|
61
|
+
const sourceRoot = (0, import_execution_context.findDextoSourceRoot)(cwd);
|
|
62
62
|
if (sourceRoot) {
|
|
63
63
|
localCommandsDir = path.join(sourceRoot, "commands");
|
|
64
64
|
}
|
|
@@ -66,7 +66,7 @@ function discoverCommandPrompts() {
|
|
|
66
66
|
break;
|
|
67
67
|
}
|
|
68
68
|
case "dexto-project": {
|
|
69
|
-
const projectRoot = (0, import_execution_context.findDextoProjectRoot)();
|
|
69
|
+
const projectRoot = (0, import_execution_context.findDextoProjectRoot)(cwd);
|
|
70
70
|
if (projectRoot) {
|
|
71
71
|
localCommandsDir = path.join(projectRoot, "commands");
|
|
72
72
|
}
|
|
@@ -104,8 +104,8 @@ function scanCommandsDirectory(dir) {
|
|
|
104
104
|
return files;
|
|
105
105
|
}
|
|
106
106
|
const AGENT_INSTRUCTION_FILES = ["agents.md", "claude.md", "gemini.md"];
|
|
107
|
-
function discoverAgentInstructionFile() {
|
|
108
|
-
const cwd =
|
|
107
|
+
function discoverAgentInstructionFile(searchDir) {
|
|
108
|
+
const cwd = path.resolve(searchDir);
|
|
109
109
|
let dirEntries;
|
|
110
110
|
try {
|
|
111
111
|
dirEntries = (0, import_fs.readdirSync)(cwd);
|
|
@@ -30,11 +30,12 @@ export interface FilePromptEntry {
|
|
|
30
30
|
/**
|
|
31
31
|
* Discovers command prompts from commands/ directories.
|
|
32
32
|
*
|
|
33
|
+
* @param searchRoot Optional workspace root to scope discovery to
|
|
33
34
|
* @returns Array of file prompt entries for discovered .md files
|
|
34
35
|
*/
|
|
35
|
-
export declare function discoverCommandPrompts(): FilePromptEntry[];
|
|
36
|
+
export declare function discoverCommandPrompts(searchRoot?: string): FilePromptEntry[];
|
|
36
37
|
/**
|
|
37
|
-
* Discovers agent instruction files from the
|
|
38
|
+
* Discovers agent instruction files from the provided directory.
|
|
38
39
|
*
|
|
39
40
|
* Looks for files in this order of priority (case-insensitive):
|
|
40
41
|
* 1. AGENTS.md (or agents.md, Agents.md, etc.)
|
|
@@ -43,7 +44,8 @@ export declare function discoverCommandPrompts(): FilePromptEntry[];
|
|
|
43
44
|
*
|
|
44
45
|
* Only the first found file is returned (we don't want multiple instruction files).
|
|
45
46
|
*
|
|
47
|
+
* @param searchDir Directory to search
|
|
46
48
|
* @returns The absolute path to the first found instruction file, or null if none found
|
|
47
49
|
*/
|
|
48
|
-
export declare function discoverAgentInstructionFile(): string | null;
|
|
50
|
+
export declare function discoverAgentInstructionFile(searchDir: string): string | null;
|
|
49
51
|
//# sourceMappingURL=discover-prompts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover-prompts.d.ts","sourceRoot":"","sources":["../../src/config/discover-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAWH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED
|
|
1
|
+
{"version":3,"file":"discover-prompts.d.ts","sourceRoot":"","sources":["../../src/config/discover-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAWH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,eAAe,EAAE,CAkF7E;AAiCD;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA0B7E"}
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
import { getDextoGlobalPath } from "../utils/path.js";
|
|
7
7
|
import * as path from "path";
|
|
8
8
|
import { existsSync, readdirSync } from "fs";
|
|
9
|
-
function discoverCommandPrompts() {
|
|
9
|
+
function discoverCommandPrompts(searchRoot) {
|
|
10
10
|
const prompts = [];
|
|
11
11
|
const seenFiles = /* @__PURE__ */ new Set();
|
|
12
|
-
const cwd = process.cwd();
|
|
12
|
+
const cwd = path.resolve(searchRoot ?? process.cwd());
|
|
13
13
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
14
14
|
const scanAndAdd = (dir) => {
|
|
15
15
|
if (!existsSync(dir)) return;
|
|
@@ -22,13 +22,13 @@ function discoverCommandPrompts() {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const context = getExecutionContext();
|
|
25
|
+
const context = getExecutionContext(cwd);
|
|
26
26
|
let localCommandsDir = null;
|
|
27
27
|
switch (context) {
|
|
28
28
|
case "dexto-source": {
|
|
29
29
|
const isDevMode = process.env.DEXTO_DEV_MODE === "true";
|
|
30
30
|
if (isDevMode) {
|
|
31
|
-
const sourceRoot = findDextoSourceRoot();
|
|
31
|
+
const sourceRoot = findDextoSourceRoot(cwd);
|
|
32
32
|
if (sourceRoot) {
|
|
33
33
|
localCommandsDir = path.join(sourceRoot, "commands");
|
|
34
34
|
}
|
|
@@ -36,7 +36,7 @@ function discoverCommandPrompts() {
|
|
|
36
36
|
break;
|
|
37
37
|
}
|
|
38
38
|
case "dexto-project": {
|
|
39
|
-
const projectRoot = findDextoProjectRoot();
|
|
39
|
+
const projectRoot = findDextoProjectRoot(cwd);
|
|
40
40
|
if (projectRoot) {
|
|
41
41
|
localCommandsDir = path.join(projectRoot, "commands");
|
|
42
42
|
}
|
|
@@ -74,8 +74,8 @@ function scanCommandsDirectory(dir) {
|
|
|
74
74
|
return files;
|
|
75
75
|
}
|
|
76
76
|
const AGENT_INSTRUCTION_FILES = ["agents.md", "claude.md", "gemini.md"];
|
|
77
|
-
function discoverAgentInstructionFile() {
|
|
78
|
-
const cwd =
|
|
77
|
+
function discoverAgentInstructionFile(searchDir) {
|
|
78
|
+
const cwd = path.resolve(searchDir);
|
|
79
79
|
let dirEntries;
|
|
80
80
|
try {
|
|
81
81
|
dirEntries = readdirSync(cwd);
|
|
@@ -27,6 +27,7 @@ var ConfigErrorCode = /* @__PURE__ */ ((ConfigErrorCode2) => {
|
|
|
27
27
|
ConfigErrorCode2["FILE_WRITE_ERROR"] = "config_file_write_error";
|
|
28
28
|
ConfigErrorCode2["PARSE_ERROR"] = "config_parse_error";
|
|
29
29
|
ConfigErrorCode2["NO_PROJECT_DEFAULT"] = "config_no_project_default";
|
|
30
|
+
ConfigErrorCode2["INVALID_PROJECT_PRIMARY"] = "config_invalid_project_primary";
|
|
30
31
|
ConfigErrorCode2["NO_GLOBAL_PREFERENCES"] = "config_no_global_preferences";
|
|
31
32
|
ConfigErrorCode2["SETUP_INCOMPLETE"] = "config_setup_incomplete";
|
|
32
33
|
ConfigErrorCode2["BUNDLED_NOT_FOUND"] = "config_bundled_not_found";
|
|
@@ -8,6 +8,7 @@ export declare enum ConfigErrorCode {
|
|
|
8
8
|
FILE_WRITE_ERROR = "config_file_write_error",
|
|
9
9
|
PARSE_ERROR = "config_parse_error",
|
|
10
10
|
NO_PROJECT_DEFAULT = "config_no_project_default",
|
|
11
|
+
INVALID_PROJECT_PRIMARY = "config_invalid_project_primary",
|
|
11
12
|
NO_GLOBAL_PREFERENCES = "config_no_global_preferences",
|
|
12
13
|
SETUP_INCOMPLETE = "config_setup_incomplete",
|
|
13
14
|
BUNDLED_NOT_FOUND = "config_bundled_not_found",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/config/error-codes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,eAAe;IAEvB,cAAc,0BAA0B;IACxC,eAAe,2BAA2B;IAC1C,gBAAgB,4BAA4B;IAG5C,WAAW,uBAAuB;IAGlC,kBAAkB,8BAA8B;IAChD,qBAAqB,iCAAiC;IACtD,gBAAgB,4BAA4B;IAC5C,iBAAiB,6BAA6B;IAC9C,eAAe,2BAA2B;CAC7C"}
|
|
1
|
+
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/config/error-codes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,eAAe;IAEvB,cAAc,0BAA0B;IACxC,eAAe,2BAA2B;IAC1C,gBAAgB,4BAA4B;IAG5C,WAAW,uBAAuB;IAGlC,kBAAkB,8BAA8B;IAChD,uBAAuB,mCAAmC;IAC1D,qBAAqB,iCAAiC;IACtD,gBAAgB,4BAA4B;IAC5C,iBAAiB,6BAA6B;IAC9C,eAAe,2BAA2B;CAC7C"}
|
|
@@ -4,6 +4,7 @@ var ConfigErrorCode = /* @__PURE__ */ ((ConfigErrorCode2) => {
|
|
|
4
4
|
ConfigErrorCode2["FILE_WRITE_ERROR"] = "config_file_write_error";
|
|
5
5
|
ConfigErrorCode2["PARSE_ERROR"] = "config_parse_error";
|
|
6
6
|
ConfigErrorCode2["NO_PROJECT_DEFAULT"] = "config_no_project_default";
|
|
7
|
+
ConfigErrorCode2["INVALID_PROJECT_PRIMARY"] = "config_invalid_project_primary";
|
|
7
8
|
ConfigErrorCode2["NO_GLOBAL_PREFERENCES"] = "config_no_global_preferences";
|
|
8
9
|
ConfigErrorCode2["SETUP_INCOMPLETE"] = "config_setup_incomplete";
|
|
9
10
|
ConfigErrorCode2["BUNDLED_NOT_FOUND"] = "config_bundled_not_found";
|
package/dist/config/errors.cjs
CHANGED
|
@@ -72,12 +72,22 @@ class ConfigError {
|
|
|
72
72
|
import_error_codes.ConfigErrorCode.NO_PROJECT_DEFAULT,
|
|
73
73
|
import_core.ErrorScope.CONFIG,
|
|
74
74
|
import_core.ErrorType.USER,
|
|
75
|
-
`No project
|
|
76
|
-
|
|
75
|
+
`No project agent found and no global preferences configured.
|
|
76
|
+
Set a primaryAgent in a workspace registry under agents/, create a single workspace agent under agents/, or run \`dexto setup\` to configure preferences.`,
|
|
77
77
|
{ projectPath },
|
|
78
78
|
"Run `dexto setup` or create a project-specific agent config"
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
|
+
static invalidProjectPrimary(registryPath, primaryAgent, reason) {
|
|
82
|
+
return new import_core.DextoRuntimeError(
|
|
83
|
+
import_error_codes.ConfigErrorCode.INVALID_PROJECT_PRIMARY,
|
|
84
|
+
import_core.ErrorScope.CONFIG,
|
|
85
|
+
import_core.ErrorType.USER,
|
|
86
|
+
`Invalid primaryAgent '${primaryAgent}' in ${registryPath}${reason ? `: ${reason}` : ""}`,
|
|
87
|
+
{ registryPath, primaryAgent, reason },
|
|
88
|
+
"Update the workspace registry so primaryAgent points to a valid workspace agent config"
|
|
89
|
+
);
|
|
90
|
+
}
|
|
81
91
|
static noGlobalPreferences() {
|
|
82
92
|
return new import_core.DextoRuntimeError(
|
|
83
93
|
import_error_codes.ConfigErrorCode.NO_GLOBAL_PREFERENCES,
|
package/dist/config/errors.d.ts
CHANGED
|
@@ -22,6 +22,11 @@ export declare class ConfigError {
|
|
|
22
22
|
static noProjectDefault(projectPath: string): DextoRuntimeError<{
|
|
23
23
|
projectPath: string;
|
|
24
24
|
}>;
|
|
25
|
+
static invalidProjectPrimary(registryPath: string, primaryAgent: string, reason?: string): DextoRuntimeError<{
|
|
26
|
+
registryPath: string;
|
|
27
|
+
primaryAgent: string;
|
|
28
|
+
reason: string | undefined;
|
|
29
|
+
}>;
|
|
25
30
|
static noGlobalPreferences(): DextoRuntimeError<{}>;
|
|
26
31
|
static setupIncomplete(): DextoRuntimeError<{}>;
|
|
27
32
|
static bundledNotFound(bundledPath: string): DextoRuntimeError<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/config/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAGvE;;;GAGG;AACH,qBAAa,WAAW;IAEpB,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM;;;IAWtC,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAWtD,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAYvD,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAYnD,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,MAAM;;;IAW3C,MAAM,CAAC,mBAAmB;IAW1B,MAAM,CAAC,eAAe;IAWtB,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM;;;IAW1C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM;;;CAUxC"}
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/config/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAGvE;;;GAGG;AACH,qBAAa,WAAW;IAEpB,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM;;;IAWtC,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAWtD,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAYvD,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAYnD,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,MAAM;;;IAW3C,MAAM,CAAC,qBAAqB,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;;;;;IAWxF,MAAM,CAAC,mBAAmB;IAW1B,MAAM,CAAC,eAAe;IAWtB,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM;;;IAW1C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM;;;CAUxC"}
|
package/dist/config/errors.js
CHANGED
|
@@ -49,12 +49,22 @@ class ConfigError {
|
|
|
49
49
|
ConfigErrorCode.NO_PROJECT_DEFAULT,
|
|
50
50
|
ErrorScope.CONFIG,
|
|
51
51
|
ErrorType.USER,
|
|
52
|
-
`No project
|
|
53
|
-
|
|
52
|
+
`No project agent found and no global preferences configured.
|
|
53
|
+
Set a primaryAgent in a workspace registry under agents/, create a single workspace agent under agents/, or run \`dexto setup\` to configure preferences.`,
|
|
54
54
|
{ projectPath },
|
|
55
55
|
"Run `dexto setup` or create a project-specific agent config"
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
+
static invalidProjectPrimary(registryPath, primaryAgent, reason) {
|
|
59
|
+
return new DextoRuntimeError(
|
|
60
|
+
ConfigErrorCode.INVALID_PROJECT_PRIMARY,
|
|
61
|
+
ErrorScope.CONFIG,
|
|
62
|
+
ErrorType.USER,
|
|
63
|
+
`Invalid primaryAgent '${primaryAgent}' in ${registryPath}${reason ? `: ${reason}` : ""}`,
|
|
64
|
+
{ registryPath, primaryAgent, reason },
|
|
65
|
+
"Update the workspace registry so primaryAgent points to a valid workspace agent config"
|
|
66
|
+
);
|
|
67
|
+
}
|
|
58
68
|
static noGlobalPreferences() {
|
|
59
69
|
return new DextoRuntimeError(
|
|
60
70
|
ConfigErrorCode.NO_GLOBAL_PREFERENCES,
|
package/dist/index.cjs
CHANGED
|
@@ -38,6 +38,9 @@ __export(index_exports, {
|
|
|
38
38
|
PluginManifestSchema: () => import_plugins.PluginManifestSchema,
|
|
39
39
|
PreferenceError: () => import_errors2.PreferenceError,
|
|
40
40
|
PreferenceErrorCode: () => import_errors2.PreferenceErrorCode,
|
|
41
|
+
ProjectRegistryEntrySchema: () => import_project_registry.ProjectRegistryEntrySchema,
|
|
42
|
+
ProjectRegistryError: () => import_project_registry.ProjectRegistryError,
|
|
43
|
+
ProjectRegistrySchema: () => import_project_registry.ProjectRegistrySchema,
|
|
41
44
|
RegistryError: () => import_errors.RegistryError,
|
|
42
45
|
RegistryErrorCode: () => import_error_codes.RegistryErrorCode,
|
|
43
46
|
SHARED_API_KEY_PROVIDERS: () => import_api_key_store.SHARED_API_KEY_PROVIDERS,
|
|
@@ -64,6 +67,8 @@ __export(index_exports, {
|
|
|
64
67
|
findDextoProjectRoot: () => import_execution_context.findDextoProjectRoot,
|
|
65
68
|
findDextoSourceRoot: () => import_execution_context.findDextoSourceRoot,
|
|
66
69
|
findPackageRoot: () => import_path.findPackageRoot,
|
|
70
|
+
findProjectRegistryPath: () => import_project_registry.findProjectRegistryPath,
|
|
71
|
+
findProjectRegistryPathSync: () => import_project_registry.findProjectRegistryPathSync,
|
|
67
72
|
formatSize: () => import_models.formatSize,
|
|
68
73
|
getActiveModel: () => import_models.getActiveModel,
|
|
69
74
|
getActiveModelId: () => import_models.getActiveModelId,
|
|
@@ -73,6 +78,7 @@ __export(index_exports, {
|
|
|
73
78
|
getCustomModel: () => import_custom_models.getCustomModel,
|
|
74
79
|
getCustomModelsPath: () => import_custom_models.getCustomModelsPath,
|
|
75
80
|
getDefaultImageStoreDir: () => import_image_store.getDefaultImageStoreDir,
|
|
81
|
+
getDefaultProjectRegistryEntry: () => import_project_registry.getDefaultProjectRegistryEntry,
|
|
76
82
|
getDextoApiKeyFromAuth: () => import_dexto_auth.getDextoApiKeyFromAuth,
|
|
77
83
|
getDextoEnvPath: () => import_path.getDextoEnvPath,
|
|
78
84
|
getDextoGlobalPath: () => import_path.getDextoGlobalPath,
|
|
@@ -97,6 +103,8 @@ __export(index_exports, {
|
|
|
97
103
|
getModelsDiskUsage: () => import_models.getModelsDiskUsage,
|
|
98
104
|
getPluginSearchPaths: () => import_plugins.getPluginSearchPaths,
|
|
99
105
|
getPrimaryApiKeyEnvVar: () => import_api_key_resolver.getPrimaryApiKeyEnvVar,
|
|
106
|
+
getProjectRegistryCandidatePaths: () => import_project_registry.getProjectRegistryCandidatePaths,
|
|
107
|
+
getProjectRegistryPath: () => import_project_registry.getProjectRegistryPath,
|
|
100
108
|
getProviderKeyStatus: () => import_api_key_store.getProviderKeyStatus,
|
|
101
109
|
getTotalInstalledSize: () => import_models.getTotalInstalledSize,
|
|
102
110
|
getUninstalledDefaults: () => import_plugins.getUninstalledDefaults,
|
|
@@ -112,6 +120,7 @@ __export(index_exports, {
|
|
|
112
120
|
isModelInstalled: () => import_models.isModelInstalled,
|
|
113
121
|
isPath: () => import_path.isPath,
|
|
114
122
|
isPluginInstalled: () => import_plugins.isPluginInstalled,
|
|
123
|
+
isProjectRegistryError: () => import_project_registry.isProjectRegistryError,
|
|
115
124
|
listAllMarketplacePlugins: () => import_plugins.listAllMarketplacePlugins,
|
|
116
125
|
listInstalledAgents: () => import_installation.listInstalledAgents,
|
|
117
126
|
listInstalledPlugins: () => import_plugins.listInstalledPlugins,
|
|
@@ -128,9 +137,13 @@ __export(index_exports, {
|
|
|
128
137
|
loadImageRegistry: () => import_image_store.loadImageRegistry,
|
|
129
138
|
loadModelPickerState: () => import_models.loadModelPickerState,
|
|
130
139
|
loadModelState: () => import_models.loadModelState,
|
|
140
|
+
loadProjectRegistry: () => import_project_registry.loadProjectRegistry,
|
|
141
|
+
loadProjectRegistrySync: () => import_project_registry.loadProjectRegistrySync,
|
|
131
142
|
modelFileExists: () => import_models.modelFileExists,
|
|
132
143
|
parseImageSpecifier: () => import_image_store.parseImageSpecifier,
|
|
133
144
|
pruneModelPickerState: () => import_models.pruneModelPickerState,
|
|
145
|
+
readProjectRegistry: () => import_project_registry.readProjectRegistry,
|
|
146
|
+
readProjectRegistrySync: () => import_project_registry.readProjectRegistrySync,
|
|
134
147
|
recordRecentModel: () => import_models.recordRecentModel,
|
|
135
148
|
registerManualModel: () => import_models.registerManualModel,
|
|
136
149
|
reloadAgentConfigFromFile: () => import_config.reloadAgentConfigFromFile,
|
|
@@ -143,9 +156,14 @@ __export(index_exports, {
|
|
|
143
156
|
resolveAgentPath: () => import_resolver.resolveAgentPath,
|
|
144
157
|
resolveApiKeyForProvider: () => import_api_key_resolver.resolveApiKeyForProvider,
|
|
145
158
|
resolveBundledScript: () => import_path.resolveBundledScript,
|
|
159
|
+
resolveDefaultProjectRegistryAgentPath: () => import_project_registry.resolveDefaultProjectRegistryAgentPath,
|
|
146
160
|
resolveFileLikeImageSpecifierToFileUrl: () => import_image_store.resolveFileLikeImageSpecifierToFileUrl,
|
|
147
161
|
resolveFileLikeImageSpecifierToPath: () => import_image_store.resolveFileLikeImageSpecifierToPath,
|
|
148
162
|
resolveImageEntryFileFromStore: () => import_image_store.resolveImageEntryFileFromStore,
|
|
163
|
+
resolveProjectRegistryAgentPath: () => import_project_registry.resolveProjectRegistryAgentPath,
|
|
164
|
+
resolveProjectRegistryEntry: () => import_project_registry.resolveProjectRegistryEntry,
|
|
165
|
+
resolveProjectRegistryEntryConfigPath: () => import_project_registry.resolveProjectRegistryEntryConfigPath,
|
|
166
|
+
resolveProjectRegistryEntryConfigPathSync: () => import_project_registry.resolveProjectRegistryEntryConfigPathSync,
|
|
149
167
|
saveAgentPreferences: () => import_loader2.saveAgentPreferences,
|
|
150
168
|
saveCustomModel: () => import_custom_models.saveCustomModel,
|
|
151
169
|
saveDextoInstalledPlugins: () => import_plugins.saveDextoInstalledPlugins,
|
|
@@ -188,6 +206,7 @@ var import_errors2 = require("./preferences/errors.js");
|
|
|
188
206
|
var import_resolver = require("./resolver.js");
|
|
189
207
|
var import_writer = require("./writer.js");
|
|
190
208
|
var import_AgentManager = require("./AgentManager.js");
|
|
209
|
+
var import_project_registry = require("./project-registry.js");
|
|
191
210
|
var import_installation = require("./installation.js");
|
|
192
211
|
var import_AgentFactory = require("./AgentFactory.js");
|
|
193
212
|
var import_agent_creation = require("./agent-creation.js");
|
|
@@ -228,6 +247,9 @@ var import_plugins = require("./plugins/index.js");
|
|
|
228
247
|
PluginManifestSchema,
|
|
229
248
|
PreferenceError,
|
|
230
249
|
PreferenceErrorCode,
|
|
250
|
+
ProjectRegistryEntrySchema,
|
|
251
|
+
ProjectRegistryError,
|
|
252
|
+
ProjectRegistrySchema,
|
|
231
253
|
RegistryError,
|
|
232
254
|
RegistryErrorCode,
|
|
233
255
|
SHARED_API_KEY_PROVIDERS,
|
|
@@ -254,6 +276,8 @@ var import_plugins = require("./plugins/index.js");
|
|
|
254
276
|
findDextoProjectRoot,
|
|
255
277
|
findDextoSourceRoot,
|
|
256
278
|
findPackageRoot,
|
|
279
|
+
findProjectRegistryPath,
|
|
280
|
+
findProjectRegistryPathSync,
|
|
257
281
|
formatSize,
|
|
258
282
|
getActiveModel,
|
|
259
283
|
getActiveModelId,
|
|
@@ -263,6 +287,7 @@ var import_plugins = require("./plugins/index.js");
|
|
|
263
287
|
getCustomModel,
|
|
264
288
|
getCustomModelsPath,
|
|
265
289
|
getDefaultImageStoreDir,
|
|
290
|
+
getDefaultProjectRegistryEntry,
|
|
266
291
|
getDextoApiKeyFromAuth,
|
|
267
292
|
getDextoEnvPath,
|
|
268
293
|
getDextoGlobalPath,
|
|
@@ -287,6 +312,8 @@ var import_plugins = require("./plugins/index.js");
|
|
|
287
312
|
getModelsDiskUsage,
|
|
288
313
|
getPluginSearchPaths,
|
|
289
314
|
getPrimaryApiKeyEnvVar,
|
|
315
|
+
getProjectRegistryCandidatePaths,
|
|
316
|
+
getProjectRegistryPath,
|
|
290
317
|
getProviderKeyStatus,
|
|
291
318
|
getTotalInstalledSize,
|
|
292
319
|
getUninstalledDefaults,
|
|
@@ -302,6 +329,7 @@ var import_plugins = require("./plugins/index.js");
|
|
|
302
329
|
isModelInstalled,
|
|
303
330
|
isPath,
|
|
304
331
|
isPluginInstalled,
|
|
332
|
+
isProjectRegistryError,
|
|
305
333
|
listAllMarketplacePlugins,
|
|
306
334
|
listInstalledAgents,
|
|
307
335
|
listInstalledPlugins,
|
|
@@ -318,9 +346,13 @@ var import_plugins = require("./plugins/index.js");
|
|
|
318
346
|
loadImageRegistry,
|
|
319
347
|
loadModelPickerState,
|
|
320
348
|
loadModelState,
|
|
349
|
+
loadProjectRegistry,
|
|
350
|
+
loadProjectRegistrySync,
|
|
321
351
|
modelFileExists,
|
|
322
352
|
parseImageSpecifier,
|
|
323
353
|
pruneModelPickerState,
|
|
354
|
+
readProjectRegistry,
|
|
355
|
+
readProjectRegistrySync,
|
|
324
356
|
recordRecentModel,
|
|
325
357
|
registerManualModel,
|
|
326
358
|
reloadAgentConfigFromFile,
|
|
@@ -333,9 +365,14 @@ var import_plugins = require("./plugins/index.js");
|
|
|
333
365
|
resolveAgentPath,
|
|
334
366
|
resolveApiKeyForProvider,
|
|
335
367
|
resolveBundledScript,
|
|
368
|
+
resolveDefaultProjectRegistryAgentPath,
|
|
336
369
|
resolveFileLikeImageSpecifierToFileUrl,
|
|
337
370
|
resolveFileLikeImageSpecifierToPath,
|
|
338
371
|
resolveImageEntryFileFromStore,
|
|
372
|
+
resolveProjectRegistryAgentPath,
|
|
373
|
+
resolveProjectRegistryEntry,
|
|
374
|
+
resolveProjectRegistryEntryConfigPath,
|
|
375
|
+
resolveProjectRegistryEntryConfigPathSync,
|
|
339
376
|
saveAgentPreferences,
|
|
340
377
|
saveCustomModel,
|
|
341
378
|
saveDextoInstalledPlugins,
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { PreferenceError, PreferenceErrorCode } from './preferences/errors.js';
|
|
|
10
10
|
export { resolveAgentPath, updateDefaultAgentPreference } from './resolver.js';
|
|
11
11
|
export { writeConfigFile, writeLLMPreferences, writePreferencesToAgent, type LLMOverrides, } from './writer.js';
|
|
12
12
|
export { AgentManager, type AgentMetadata } from './AgentManager.js';
|
|
13
|
+
export { ProjectRegistryEntrySchema, ProjectRegistrySchema, getProjectRegistryPath, getProjectRegistryCandidatePaths, findProjectRegistryPath, findProjectRegistryPathSync, readProjectRegistry, readProjectRegistrySync, loadProjectRegistry, loadProjectRegistrySync, getDefaultProjectRegistryEntry, resolveProjectRegistryEntryConfigPath, resolveProjectRegistryEntryConfigPathSync, resolveProjectRegistryEntry, resolveProjectRegistryAgentPath, resolveDefaultProjectRegistryAgentPath, ProjectRegistryError, isProjectRegistryError, type ProjectRegistryEntry, type ProjectRegistry, type ProjectRegistryErrorCode, } from './project-registry.js';
|
|
13
14
|
export { installBundledAgent, installCustomAgent, uninstallAgent, listInstalledAgents, type InstallOptions, } from './installation.js';
|
|
14
15
|
export { AgentFactory, type CreateAgentOptions } from './AgentFactory.js';
|
|
15
16
|
export { createDextoAgentFromConfig } from './agent-creation.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,EAAE,MAAM,yBAAyB,CAAC;AAG/E,OAAO,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAG/E,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,YAAY,GACpB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
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,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