@dexto/agent-management 1.6.12 → 1.6.14
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/models/model-picker-state.cjs +5 -2
- package/dist/models/model-picker-state.d.ts +22 -0
- package/dist/models/model-picker-state.d.ts.map +1 -1
- package/dist/models/model-picker-state.js +5 -2
- package/dist/preferences/schemas.cjs +3 -1
- package/dist/preferences/schemas.d.ts +2 -2
- package/dist/preferences/schemas.d.ts.map +1 -1
- package/dist/preferences/schemas.js +4 -1
- package/dist/registry/types.d.ts +2 -2
- package/dist/utils/execution-context.cjs +44 -0
- package/dist/utils/execution-context.d.ts.map +1 -1
- package/dist/utils/execution-context.js +45 -1
- package/package.json +5 -5
|
@@ -50,7 +50,8 @@ const MODEL_PICKER_RECENTS_LIMIT = 10;
|
|
|
50
50
|
const MODEL_PICKER_FAVORITES_LIMIT = 100;
|
|
51
51
|
const ModelPickerModelSchema = import_zod.z.object({
|
|
52
52
|
provider: import_zod.z.enum(import_core.LLM_PROVIDERS),
|
|
53
|
-
model: import_zod.z.string().trim().min(1)
|
|
53
|
+
model: import_zod.z.string().trim().min(1),
|
|
54
|
+
baseURL: import_zod.z.string().trim().min(1).optional()
|
|
54
55
|
}).strict();
|
|
55
56
|
const ModelPickerEntrySchema = ModelPickerModelSchema.extend({
|
|
56
57
|
updatedAt: import_zod.z.string().datetime()
|
|
@@ -107,11 +108,13 @@ function createEntry(input) {
|
|
|
107
108
|
return {
|
|
108
109
|
provider: input.model.provider,
|
|
109
110
|
model: input.model.model,
|
|
111
|
+
...input.model.baseURL ? { baseURL: input.model.baseURL } : {},
|
|
110
112
|
updatedAt: input.updatedAt
|
|
111
113
|
};
|
|
112
114
|
}
|
|
113
115
|
function toModelPickerKey(input) {
|
|
114
|
-
|
|
116
|
+
const key = `${input.provider}|${input.model}`;
|
|
117
|
+
return input.baseURL ? `${key}|${input.baseURL}` : key;
|
|
115
118
|
}
|
|
116
119
|
function pruneModelPickerState(input) {
|
|
117
120
|
const recents = input.state.recents.filter(
|
|
@@ -6,56 +6,68 @@ export declare const MODEL_PICKER_FAVORITES_LIMIT = 100;
|
|
|
6
6
|
declare const ModelPickerModelSchema: z.ZodObject<{
|
|
7
7
|
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
8
8
|
model: z.ZodString;
|
|
9
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
9
10
|
}, "strict", z.ZodTypeAny, {
|
|
10
11
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
11
12
|
model: string;
|
|
13
|
+
baseURL?: string | undefined;
|
|
12
14
|
}, {
|
|
13
15
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
14
16
|
model: string;
|
|
17
|
+
baseURL?: string | undefined;
|
|
15
18
|
}>;
|
|
16
19
|
declare const ModelPickerEntrySchema: z.ZodObject<{
|
|
17
20
|
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
18
21
|
model: z.ZodString;
|
|
22
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
19
23
|
} & {
|
|
20
24
|
updatedAt: z.ZodString;
|
|
21
25
|
}, "strict", z.ZodTypeAny, {
|
|
22
26
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
23
27
|
model: string;
|
|
24
28
|
updatedAt: string;
|
|
29
|
+
baseURL?: string | undefined;
|
|
25
30
|
}, {
|
|
26
31
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
27
32
|
model: string;
|
|
28
33
|
updatedAt: string;
|
|
34
|
+
baseURL?: string | undefined;
|
|
29
35
|
}>;
|
|
30
36
|
declare const ModelPickerStateSchema: z.ZodObject<{
|
|
31
37
|
version: z.ZodLiteral<1>;
|
|
32
38
|
recents: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
33
39
|
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
34
40
|
model: z.ZodString;
|
|
41
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
35
42
|
} & {
|
|
36
43
|
updatedAt: z.ZodString;
|
|
37
44
|
}, "strict", z.ZodTypeAny, {
|
|
38
45
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
39
46
|
model: string;
|
|
40
47
|
updatedAt: string;
|
|
48
|
+
baseURL?: string | undefined;
|
|
41
49
|
}, {
|
|
42
50
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
43
51
|
model: string;
|
|
44
52
|
updatedAt: string;
|
|
53
|
+
baseURL?: string | undefined;
|
|
45
54
|
}>, "many">>;
|
|
46
55
|
favorites: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
47
56
|
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
48
57
|
model: z.ZodString;
|
|
58
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
49
59
|
} & {
|
|
50
60
|
updatedAt: z.ZodString;
|
|
51
61
|
}, "strict", z.ZodTypeAny, {
|
|
52
62
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
53
63
|
model: string;
|
|
54
64
|
updatedAt: string;
|
|
65
|
+
baseURL?: string | undefined;
|
|
55
66
|
}, {
|
|
56
67
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
57
68
|
model: string;
|
|
58
69
|
updatedAt: string;
|
|
70
|
+
baseURL?: string | undefined;
|
|
59
71
|
}>, "many">>;
|
|
60
72
|
}, "strict", z.ZodTypeAny, {
|
|
61
73
|
version: 1;
|
|
@@ -63,11 +75,13 @@ declare const ModelPickerStateSchema: z.ZodObject<{
|
|
|
63
75
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
64
76
|
model: string;
|
|
65
77
|
updatedAt: string;
|
|
78
|
+
baseURL?: string | undefined;
|
|
66
79
|
}[];
|
|
67
80
|
favorites: {
|
|
68
81
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
69
82
|
model: string;
|
|
70
83
|
updatedAt: string;
|
|
84
|
+
baseURL?: string | undefined;
|
|
71
85
|
}[];
|
|
72
86
|
}, {
|
|
73
87
|
version: 1;
|
|
@@ -75,33 +89,40 @@ declare const ModelPickerStateSchema: z.ZodObject<{
|
|
|
75
89
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
76
90
|
model: string;
|
|
77
91
|
updatedAt: string;
|
|
92
|
+
baseURL?: string | undefined;
|
|
78
93
|
}[] | undefined;
|
|
79
94
|
favorites?: {
|
|
80
95
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
81
96
|
model: string;
|
|
82
97
|
updatedAt: string;
|
|
98
|
+
baseURL?: string | undefined;
|
|
83
99
|
}[] | undefined;
|
|
84
100
|
}>;
|
|
85
101
|
declare const SetFavoriteModelsInputSchema: z.ZodObject<{
|
|
86
102
|
favorites: z.ZodArray<z.ZodObject<{
|
|
87
103
|
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
88
104
|
model: z.ZodString;
|
|
105
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
89
106
|
}, "strict", z.ZodTypeAny, {
|
|
90
107
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
91
108
|
model: string;
|
|
109
|
+
baseURL?: string | undefined;
|
|
92
110
|
}, {
|
|
93
111
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
94
112
|
model: string;
|
|
113
|
+
baseURL?: string | undefined;
|
|
95
114
|
}>, "many">;
|
|
96
115
|
}, "strict", z.ZodTypeAny, {
|
|
97
116
|
favorites: {
|
|
98
117
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
99
118
|
model: string;
|
|
119
|
+
baseURL?: string | undefined;
|
|
100
120
|
}[];
|
|
101
121
|
}, {
|
|
102
122
|
favorites: {
|
|
103
123
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
104
124
|
model: string;
|
|
125
|
+
baseURL?: string | undefined;
|
|
105
126
|
}[];
|
|
106
127
|
}>;
|
|
107
128
|
export type ModelPickerModel = z.output<typeof ModelPickerModelSchema>;
|
|
@@ -111,6 +132,7 @@ export type SetFavoriteModelsInput = z.output<typeof SetFavoriteModelsInputSchem
|
|
|
111
132
|
export declare function toModelPickerKey(input: {
|
|
112
133
|
provider: LLMProvider;
|
|
113
134
|
model: string;
|
|
135
|
+
baseURL?: string | undefined;
|
|
114
136
|
}): string;
|
|
115
137
|
export declare function pruneModelPickerState(input: {
|
|
116
138
|
state: ModelPickerState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-picker-state.d.ts","sourceRoot":"","sources":["../../src/models/model-picker-state.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,QAAA,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"model-picker-state.d.ts","sourceRoot":"","sources":["../../src/models/model-picker-state.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,QAAA,MAAM,sBAAsB;;;;;;;;;;;;EAMf,CAAC;AAEd,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;EAEjB,CAAC;AAEZ,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMf,CAAC;AAEd,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;EAIrB,CAAC;AAEd,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACvE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAC;AA8DnF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACpC,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,GAAG,MAAM,CAGT;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IACzC,KAAK,EAAE,gBAAgB,CAAC;IACxB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B,GAAG,gBAAgB,CAenB;AAED,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAkBtE;AAED,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAajF;AAED,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAkB1F;AAED,wBAAsB,mBAAmB,CACrC,KAAK,EAAE,gBAAgB,GACxB,OAAO,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC,CA+B3D;AAED,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAoBhG"}
|
|
@@ -8,7 +8,8 @@ const MODEL_PICKER_RECENTS_LIMIT = 10;
|
|
|
8
8
|
const MODEL_PICKER_FAVORITES_LIMIT = 100;
|
|
9
9
|
const ModelPickerModelSchema = z.object({
|
|
10
10
|
provider: z.enum(LLM_PROVIDERS),
|
|
11
|
-
model: z.string().trim().min(1)
|
|
11
|
+
model: z.string().trim().min(1),
|
|
12
|
+
baseURL: z.string().trim().min(1).optional()
|
|
12
13
|
}).strict();
|
|
13
14
|
const ModelPickerEntrySchema = ModelPickerModelSchema.extend({
|
|
14
15
|
updatedAt: z.string().datetime()
|
|
@@ -65,11 +66,13 @@ function createEntry(input) {
|
|
|
65
66
|
return {
|
|
66
67
|
provider: input.model.provider,
|
|
67
68
|
model: input.model.model,
|
|
69
|
+
...input.model.baseURL ? { baseURL: input.model.baseURL } : {},
|
|
68
70
|
updatedAt: input.updatedAt
|
|
69
71
|
};
|
|
70
72
|
}
|
|
71
73
|
function toModelPickerKey(input) {
|
|
72
|
-
|
|
74
|
+
const key = `${input.provider}|${input.model}`;
|
|
75
|
+
return input.baseURL ? `${key}|${input.baseURL}` : key;
|
|
73
76
|
}
|
|
74
77
|
function pruneModelPickerState(input) {
|
|
75
78
|
const recents = input.state.recents.filter(
|
|
@@ -39,7 +39,9 @@ const PreferenceLLMSchema = import_zod.z.object({
|
|
|
39
39
|
).optional().describe(
|
|
40
40
|
"Environment variable reference for API key (optional for local providers like Ollama)"
|
|
41
41
|
),
|
|
42
|
-
baseURL:
|
|
42
|
+
baseURL: import_core.OptionalURL.describe(
|
|
43
|
+
"Custom base URL for providers that support it (openai-compatible, litellm, Codex)"
|
|
44
|
+
),
|
|
43
45
|
reasoning: import_zod.z.object({
|
|
44
46
|
variant: import_zod.z.string().trim().min(1).describe(
|
|
45
47
|
"Reasoning variant. Use a model/provider-native variant from the active reasoning profile."
|
|
@@ -3,7 +3,7 @@ export declare const PreferenceLLMSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3
3
|
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
4
4
|
model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
5
5
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
6
|
-
baseURL: z.ZodOptional<z.ZodString
|
|
6
|
+
baseURL: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string | undefined, string>>;
|
|
7
7
|
reasoning: z.ZodOptional<z.ZodObject<{
|
|
8
8
|
variant: z.ZodString;
|
|
9
9
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -128,7 +128,7 @@ export declare const GlobalPreferencesSchema: z.ZodObject<{
|
|
|
128
128
|
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
129
129
|
model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
130
130
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
131
|
-
baseURL: z.ZodOptional<z.ZodString
|
|
131
|
+
baseURL: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string | undefined, string>>;
|
|
132
132
|
reasoning: z.ZodOptional<z.ZodObject<{
|
|
133
133
|
variant: z.ZodString;
|
|
134
134
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/preferences/schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuH1B,CAAC;AAEP,eAAO,MAAM,wBAAwB;;;;;;;;;EAYxB,CAAC;AAEd,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAYrB,CAAC;AAEd,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;EAiCtB,CAAC;AAEd,eAAO,MAAM,0BAA0B;;;;;;EAO1B,CAAC;AAEd,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;EAMtB,CAAC;AAEd,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcvB,CAAC;AAGd,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACjE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC3E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACrE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACvE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC/E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACvE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
supportsReasoningVariant,
|
|
10
10
|
LLM_PROVIDERS,
|
|
11
11
|
NonEmptyTrimmed,
|
|
12
|
+
OptionalURL,
|
|
12
13
|
ErrorType
|
|
13
14
|
} from "@dexto/core";
|
|
14
15
|
import { PreferenceErrorCode } from "./error-codes.js";
|
|
@@ -21,7 +22,9 @@ const PreferenceLLMSchema = z.object({
|
|
|
21
22
|
).optional().describe(
|
|
22
23
|
"Environment variable reference for API key (optional for local providers like Ollama)"
|
|
23
24
|
),
|
|
24
|
-
baseURL:
|
|
25
|
+
baseURL: OptionalURL.describe(
|
|
26
|
+
"Custom base URL for providers that support it (openai-compatible, litellm, Codex)"
|
|
27
|
+
),
|
|
25
28
|
reasoning: z.object({
|
|
26
29
|
variant: z.string().trim().min(1).describe(
|
|
27
30
|
"Reasoning variant. Use a model/provider-native variant from the active reasoning profile."
|
package/dist/registry/types.d.ts
CHANGED
|
@@ -72,7 +72,6 @@ export declare const RegistrySchema: z.ZodObject<{
|
|
|
72
72
|
enabled?: boolean | undefined;
|
|
73
73
|
}>>;
|
|
74
74
|
}, "strict", z.ZodTypeAny, {
|
|
75
|
-
version: string;
|
|
76
75
|
agents: Record<string, {
|
|
77
76
|
id: string;
|
|
78
77
|
name: string;
|
|
@@ -84,8 +83,8 @@ export declare const RegistrySchema: z.ZodObject<{
|
|
|
84
83
|
main?: string | undefined;
|
|
85
84
|
enabled?: boolean | undefined;
|
|
86
85
|
}>;
|
|
87
|
-
}, {
|
|
88
86
|
version: string;
|
|
87
|
+
}, {
|
|
89
88
|
agents: Record<string, {
|
|
90
89
|
id: string;
|
|
91
90
|
name: string;
|
|
@@ -97,6 +96,7 @@ export declare const RegistrySchema: z.ZodObject<{
|
|
|
97
96
|
main?: string | undefined;
|
|
98
97
|
enabled?: boolean | undefined;
|
|
99
98
|
}>;
|
|
99
|
+
version: string;
|
|
100
100
|
}>;
|
|
101
101
|
export type Registry = z.output<typeof RegistrySchema>;
|
|
102
102
|
type RawRegistry = {
|
|
@@ -36,6 +36,43 @@ module.exports = __toCommonJS(execution_context_exports);
|
|
|
36
36
|
var import_fs_walk = require("./fs-walk.js");
|
|
37
37
|
var import_fs = require("fs");
|
|
38
38
|
var path = __toESM(require("path"), 1);
|
|
39
|
+
const FORCED_PROJECT_ROOT_MARKERS = [
|
|
40
|
+
path.join(".dexto", "deploy.json"),
|
|
41
|
+
path.join(".dexto", "cloud", "bootstrap.json"),
|
|
42
|
+
"coding-agent.yml",
|
|
43
|
+
"coding-agent.yaml",
|
|
44
|
+
path.join("agents", "agent-registry.json"),
|
|
45
|
+
path.join("agents", "coding-agent.yml"),
|
|
46
|
+
path.join("agents", "coding-agent.yaml"),
|
|
47
|
+
path.join("agents", "coding-agent", "coding-agent.yml"),
|
|
48
|
+
path.join("agents", "coding-agent", "coding-agent.yaml"),
|
|
49
|
+
path.join("src", "dexto", "agents", "coding-agent.yml"),
|
|
50
|
+
path.join("src", "dexto", "agents", "coding-agent.yaml")
|
|
51
|
+
];
|
|
52
|
+
function hasForcedProjectRootMarker(dirPath) {
|
|
53
|
+
return FORCED_PROJECT_ROOT_MARKERS.some(
|
|
54
|
+
(relativePath) => (0, import_fs.existsSync)(path.join(dirPath, relativePath))
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
function getForcedProjectRoot() {
|
|
58
|
+
const value = process.env.DEXTO_PROJECT_ROOT?.trim();
|
|
59
|
+
if (!value) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
const resolved = path.resolve(value);
|
|
64
|
+
if (!(0, import_fs.statSync)(resolved).isDirectory()) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
const root = (0, import_fs.realpathSync)(resolved);
|
|
68
|
+
if (isDextoProjectDirectory(root) || isDextoSourceDirectory(root) || hasForcedProjectRootMarker(root)) {
|
|
69
|
+
return root;
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
} catch {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
39
76
|
function isDextoSourceDirectory(dirPath) {
|
|
40
77
|
const packageJsonPath = path.join(dirPath, "package.json");
|
|
41
78
|
try {
|
|
@@ -66,9 +103,16 @@ function findDextoSourceRoot(startPath = process.cwd()) {
|
|
|
66
103
|
return (0, import_fs_walk.walkUpDirectories)(startPath, isDextoSourceDirectory);
|
|
67
104
|
}
|
|
68
105
|
function findDextoProjectRoot(startPath = process.cwd()) {
|
|
106
|
+
const forcedProjectRoot = getForcedProjectRoot();
|
|
107
|
+
if (forcedProjectRoot) {
|
|
108
|
+
return forcedProjectRoot;
|
|
109
|
+
}
|
|
69
110
|
return (0, import_fs_walk.walkUpDirectories)(startPath, isDextoProjectDirectory);
|
|
70
111
|
}
|
|
71
112
|
function getExecutionContext(startPath = process.cwd()) {
|
|
113
|
+
if (getForcedProjectRoot()) {
|
|
114
|
+
return "dexto-project";
|
|
115
|
+
}
|
|
72
116
|
if (findDextoSourceRoot(startPath)) {
|
|
73
117
|
return "dexto-source";
|
|
74
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-context.d.ts","sourceRoot":"","sources":["../../src/utils/execution-context.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,eAAe,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"execution-context.d.ts","sourceRoot":"","sources":["../../src/utils/execution-context.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,eAAe,GAAG,YAAY,CAAC;AA+F/E;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAEpF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAMrF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,GAAE,MAAsB,GAAG,gBAAgB,CAiBvF"}
|
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
import { walkUpDirectories } from "./fs-walk.js";
|
|
2
|
-
import { readFileSync } from "fs";
|
|
2
|
+
import { existsSync, readFileSync, realpathSync, statSync } from "fs";
|
|
3
3
|
import * as path from "path";
|
|
4
|
+
const FORCED_PROJECT_ROOT_MARKERS = [
|
|
5
|
+
path.join(".dexto", "deploy.json"),
|
|
6
|
+
path.join(".dexto", "cloud", "bootstrap.json"),
|
|
7
|
+
"coding-agent.yml",
|
|
8
|
+
"coding-agent.yaml",
|
|
9
|
+
path.join("agents", "agent-registry.json"),
|
|
10
|
+
path.join("agents", "coding-agent.yml"),
|
|
11
|
+
path.join("agents", "coding-agent.yaml"),
|
|
12
|
+
path.join("agents", "coding-agent", "coding-agent.yml"),
|
|
13
|
+
path.join("agents", "coding-agent", "coding-agent.yaml"),
|
|
14
|
+
path.join("src", "dexto", "agents", "coding-agent.yml"),
|
|
15
|
+
path.join("src", "dexto", "agents", "coding-agent.yaml")
|
|
16
|
+
];
|
|
17
|
+
function hasForcedProjectRootMarker(dirPath) {
|
|
18
|
+
return FORCED_PROJECT_ROOT_MARKERS.some(
|
|
19
|
+
(relativePath) => existsSync(path.join(dirPath, relativePath))
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function getForcedProjectRoot() {
|
|
23
|
+
const value = process.env.DEXTO_PROJECT_ROOT?.trim();
|
|
24
|
+
if (!value) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
try {
|
|
28
|
+
const resolved = path.resolve(value);
|
|
29
|
+
if (!statSync(resolved).isDirectory()) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const root = realpathSync(resolved);
|
|
33
|
+
if (isDextoProjectDirectory(root) || isDextoSourceDirectory(root) || hasForcedProjectRootMarker(root)) {
|
|
34
|
+
return root;
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
} catch {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
4
41
|
function isDextoSourceDirectory(dirPath) {
|
|
5
42
|
const packageJsonPath = path.join(dirPath, "package.json");
|
|
6
43
|
try {
|
|
@@ -31,9 +68,16 @@ function findDextoSourceRoot(startPath = process.cwd()) {
|
|
|
31
68
|
return walkUpDirectories(startPath, isDextoSourceDirectory);
|
|
32
69
|
}
|
|
33
70
|
function findDextoProjectRoot(startPath = process.cwd()) {
|
|
71
|
+
const forcedProjectRoot = getForcedProjectRoot();
|
|
72
|
+
if (forcedProjectRoot) {
|
|
73
|
+
return forcedProjectRoot;
|
|
74
|
+
}
|
|
34
75
|
return walkUpDirectories(startPath, isDextoProjectDirectory);
|
|
35
76
|
}
|
|
36
77
|
function getExecutionContext(startPath = process.cwd()) {
|
|
78
|
+
if (getForcedProjectRoot()) {
|
|
79
|
+
return "dexto-project";
|
|
80
|
+
}
|
|
37
81
|
if (findDextoSourceRoot(startPath)) {
|
|
38
82
|
return "dexto-source";
|
|
39
83
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexto/agent-management",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"yaml": "^2.7.1",
|
|
18
18
|
"zod": "^3.25.0",
|
|
19
|
-
"@dexto/agent-config": "1.6.
|
|
20
|
-
"@dexto/core": "1.6.
|
|
21
|
-
"@dexto/orchestration": "1.6.
|
|
22
|
-
"@dexto/tools-builtins": "1.6.
|
|
19
|
+
"@dexto/agent-config": "1.6.14",
|
|
20
|
+
"@dexto/core": "1.6.14",
|
|
21
|
+
"@dexto/orchestration": "1.6.14",
|
|
22
|
+
"@dexto/tools-builtins": "1.6.14"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^22.13.5"
|