@vybestack/llxprt-code-settings 0.10.0-nightly.260613.1adad3b34
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/.last_build +0 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/src/__tests__/SettingsService.test.d.ts +12 -0
- package/dist/src/__tests__/SettingsService.test.js +231 -0
- package/dist/src/__tests__/SettingsService.test.js.map +1 -0
- package/dist/src/__tests__/settingsRegistry.test.d.ts +15 -0
- package/dist/src/__tests__/settingsRegistry.test.js +471 -0
- package/dist/src/__tests__/settingsRegistry.test.js.map +1 -0
- package/dist/src/__tests__/settingsServiceInstance.test.d.ts +13 -0
- package/dist/src/__tests__/settingsServiceInstance.test.js +60 -0
- package/dist/src/__tests__/settingsServiceInstance.test.js.map +1 -0
- package/dist/src/index.d.ts +15 -0
- package/dist/src/index.js +14 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/profiles/ProfileManager.d.ts +91 -0
- package/dist/src/profiles/ProfileManager.js +328 -0
- package/dist/src/profiles/ProfileManager.js.map +1 -0
- package/dist/src/profiles/__tests__/ProfileManager.test.d.ts +12 -0
- package/dist/src/profiles/__tests__/ProfileManager.test.js +294 -0
- package/dist/src/profiles/__tests__/ProfileManager.test.js.map +1 -0
- package/dist/src/profiles/types.d.ts +196 -0
- package/dist/src/profiles/types.js +48 -0
- package/dist/src/profiles/types.js.map +1 -0
- package/dist/src/settings/SettingsService.d.ts +59 -0
- package/dist/src/settings/SettingsService.js +289 -0
- package/dist/src/settings/SettingsService.js.map +1 -0
- package/dist/src/settings/settingsRegistry.d.ts +72 -0
- package/dist/src/settings/settingsRegistry.js +1469 -0
- package/dist/src/settings/settingsRegistry.js.map +1 -0
- package/dist/src/settings/settingsServiceInstance.d.ts +21 -0
- package/dist/src/settings/settingsServiceInstance.js +34 -0
- package/dist/src/settings/settingsServiceInstance.js.map +1 -0
- package/dist/src/storage/Storage.d.ts +8 -0
- package/dist/src/storage/Storage.js +9 -0
- package/dist/src/storage/Storage.js.map +1 -0
- package/dist/src/storage/__tests__/Storage.test.d.ts +11 -0
- package/dist/src/storage/__tests__/Storage.test.js +160 -0
- package/dist/src/storage/__tests__/Storage.test.js.map +1 -0
- package/dist/src/types.d.ts +16 -0
- package/dist/src/types.js +16 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @plan PLAN-20260608-ISSUE1588.P05
|
|
3
|
+
*
|
|
4
|
+
* ProfileManager — migrated from core.
|
|
5
|
+
* Explicit temporary duplicate; core copy remains until P09.
|
|
6
|
+
*
|
|
7
|
+
* Settings-owned: uses settings-owned profile types, not core imports.
|
|
8
|
+
*/
|
|
9
|
+
import type { Profile, LoadBalancerProfile, StandardProfile } from './types.js';
|
|
10
|
+
interface ProfileSettingsServiceLike {
|
|
11
|
+
exportForProfile?: () => Promise<{
|
|
12
|
+
defaultProvider: string;
|
|
13
|
+
providers: Record<string, Record<string, unknown>>;
|
|
14
|
+
tools?: {
|
|
15
|
+
allowed?: unknown[];
|
|
16
|
+
disabled?: unknown[];
|
|
17
|
+
};
|
|
18
|
+
}>;
|
|
19
|
+
setCurrentProfileName?: (profileName: string | null) => void;
|
|
20
|
+
importFromProfile?: (profileData: unknown) => Promise<void>;
|
|
21
|
+
set?: (key: string, value: unknown) => void;
|
|
22
|
+
}
|
|
23
|
+
type PersistableProfile = Profile | {
|
|
24
|
+
version: number;
|
|
25
|
+
provider: string;
|
|
26
|
+
model: string;
|
|
27
|
+
modelParams: Record<string, unknown>;
|
|
28
|
+
ephemeralSettings: Record<string, unknown>;
|
|
29
|
+
type?: 'standard';
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Manages saving and loading of configuration profiles.
|
|
33
|
+
* Profiles are stored in ~/.llxprt/profiles/<profileName>.json
|
|
34
|
+
*/
|
|
35
|
+
export declare class ProfileManager {
|
|
36
|
+
private profilesDir;
|
|
37
|
+
/**
|
|
38
|
+
* @param profilesDir Optional custom directory for testing. If not provided, uses ~/.llxprt/profiles.
|
|
39
|
+
*/
|
|
40
|
+
constructor(profilesDir?: string);
|
|
41
|
+
/**
|
|
42
|
+
* Save the current configuration to a profile.
|
|
43
|
+
* @param profileName The name of the profile to save
|
|
44
|
+
* @param profile The profile configuration to save
|
|
45
|
+
*/
|
|
46
|
+
saveProfile(profileName: string, profile: PersistableProfile): Promise<void>;
|
|
47
|
+
saveLoadBalancerProfile(name: string, profile: LoadBalancerProfile): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Validate that a load-balancer profile's references are valid.
|
|
50
|
+
* Extracted from loadProfile to reduce method complexity.
|
|
51
|
+
*/
|
|
52
|
+
private validateLoadBalancerReferences;
|
|
53
|
+
/**
|
|
54
|
+
* Load a profile configuration.
|
|
55
|
+
* @param profileName The name of the profile to load
|
|
56
|
+
* @returns The loaded profile configuration
|
|
57
|
+
*/
|
|
58
|
+
loadProfile(profileName: string): Promise<Profile>;
|
|
59
|
+
/**
|
|
60
|
+
* List all available profile names.
|
|
61
|
+
* @returns Array of profile names (without .json extension)
|
|
62
|
+
*/
|
|
63
|
+
listProfiles(): Promise<string[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Delete a profile.
|
|
66
|
+
* @param profileName The name of the profile to delete
|
|
67
|
+
*/
|
|
68
|
+
deleteProfile(profileName: string): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Check if a profile exists.
|
|
71
|
+
* @param profileName The name of the profile to check
|
|
72
|
+
* @returns True if the profile exists
|
|
73
|
+
*/
|
|
74
|
+
profileExists(profileName: string): Promise<boolean>;
|
|
75
|
+
/**
|
|
76
|
+
* Save current settings to a profile through SettingsService
|
|
77
|
+
* @param profileName The name of the profile to save
|
|
78
|
+
*/
|
|
79
|
+
save(profileName: string, settingsService: ProfileSettingsServiceLike): Promise<void>;
|
|
80
|
+
private convertProfileToSettingsData;
|
|
81
|
+
private applyToolSettings;
|
|
82
|
+
private applyReasoningSettings;
|
|
83
|
+
load(profileName: string, settingsService: ProfileSettingsServiceLike): Promise<void>;
|
|
84
|
+
applyLoadedProfile(profileName: string, profile: StandardProfile, settingsService: ProfileSettingsServiceLike): Promise<void>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Re-export profile interfaces for backward compatibility with P03/P04 test imports.
|
|
88
|
+
* These were previously stub interfaces in this file.
|
|
89
|
+
*/
|
|
90
|
+
export type { Profile as ProfileLike } from './types.js';
|
|
91
|
+
export type { LoadBalancerProfile as LoadBalancerProfileLike } from './types.js';
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @plan PLAN-20260608-ISSUE1588.P05
|
|
3
|
+
*
|
|
4
|
+
* ProfileManager — migrated from core.
|
|
5
|
+
* Explicit temporary duplicate; core copy remains until P09.
|
|
6
|
+
*
|
|
7
|
+
* Settings-owned: uses settings-owned profile types, not core imports.
|
|
8
|
+
*/
|
|
9
|
+
import { isLoadBalancerProfile } from './types.js';
|
|
10
|
+
import fs from 'fs/promises';
|
|
11
|
+
import os from 'os';
|
|
12
|
+
import path from 'path';
|
|
13
|
+
function stringOrDefault(value, fallback) {
|
|
14
|
+
return typeof value === 'string' ? value : fallback;
|
|
15
|
+
}
|
|
16
|
+
function optionalNumber(value) {
|
|
17
|
+
return typeof value === 'number' ? value : undefined;
|
|
18
|
+
}
|
|
19
|
+
function optionalString(value) {
|
|
20
|
+
return typeof value === 'string' ? value : undefined;
|
|
21
|
+
}
|
|
22
|
+
function optionalBoolean(value) {
|
|
23
|
+
return typeof value === 'boolean' ? value : undefined;
|
|
24
|
+
}
|
|
25
|
+
const PROMPT_CACHING_VALUES = new Set(['off', '5m', '1h', '24h']);
|
|
26
|
+
function optionalPromptCaching(value) {
|
|
27
|
+
return typeof value === 'string' && PROMPT_CACHING_VALUES.has(value)
|
|
28
|
+
? value
|
|
29
|
+
: undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Manages saving and loading of configuration profiles.
|
|
33
|
+
* Profiles are stored in ~/.llxprt/profiles/<profileName>.json
|
|
34
|
+
*/
|
|
35
|
+
export class ProfileManager {
|
|
36
|
+
profilesDir;
|
|
37
|
+
/**
|
|
38
|
+
* @param profilesDir Optional custom directory for testing. If not provided, uses ~/.llxprt/profiles.
|
|
39
|
+
*/
|
|
40
|
+
constructor(profilesDir) {
|
|
41
|
+
this.profilesDir =
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- intentional falsy coalescing: empty string should use default path
|
|
43
|
+
profilesDir || path.join(os.homedir(), '.llxprt', 'profiles');
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Save the current configuration to a profile.
|
|
47
|
+
* @param profileName The name of the profile to save
|
|
48
|
+
* @param profile The profile configuration to save
|
|
49
|
+
*/
|
|
50
|
+
async saveProfile(profileName, profile) {
|
|
51
|
+
await fs.mkdir(this.profilesDir, { recursive: true });
|
|
52
|
+
const filePath = path.join(this.profilesDir, `${profileName}.json`);
|
|
53
|
+
await fs.writeFile(filePath, JSON.stringify(profile, null, 2), 'utf8');
|
|
54
|
+
}
|
|
55
|
+
async saveLoadBalancerProfile(name, profile) {
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- BN4-C-P01: preserve defensive runtime boundary guard despite current static types.
|
|
57
|
+
if (profile.version !== 1) {
|
|
58
|
+
throw new Error('unsupported profile version');
|
|
59
|
+
}
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- BN4-C-P01: preserve defensive runtime boundary guard despite current static types.
|
|
61
|
+
if (profile.profiles == null || profile.profiles.length === 0) {
|
|
62
|
+
throw new Error(`LoadBalancer profile '${name}' must reference at least one profile`);
|
|
63
|
+
}
|
|
64
|
+
const availableProfiles = await this.listProfiles();
|
|
65
|
+
for (const referencedProfile of profile.profiles) {
|
|
66
|
+
if (!availableProfiles.includes(referencedProfile)) {
|
|
67
|
+
throw new Error(`LoadBalancer profile '${name}' references non-existent profile '${referencedProfile}'`);
|
|
68
|
+
}
|
|
69
|
+
const referencedProfilePath = path.join(this.profilesDir, `${referencedProfile}.json`);
|
|
70
|
+
const referencedContent = await fs.readFile(referencedProfilePath, 'utf8');
|
|
71
|
+
const referencedProfileData = JSON.parse(referencedContent);
|
|
72
|
+
if (isLoadBalancerProfile(referencedProfileData)) {
|
|
73
|
+
throw new Error(`LoadBalancer profile '${name}' cannot reference another LoadBalancer profile '${referencedProfile}'`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
await fs.mkdir(this.profilesDir, { recursive: true });
|
|
77
|
+
const filePath = path.join(this.profilesDir, `${name}.json`);
|
|
78
|
+
await fs.writeFile(filePath, JSON.stringify(profile, null, 2), 'utf8');
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Validate that a load-balancer profile's references are valid.
|
|
82
|
+
* Extracted from loadProfile to reduce method complexity.
|
|
83
|
+
*/
|
|
84
|
+
async validateLoadBalancerReferences(profileName, profile) {
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- BN4-C-P01: preserve defensive runtime boundary guard despite current static types.
|
|
86
|
+
if (profile.version !== 1) {
|
|
87
|
+
throw new Error('unsupported profile version');
|
|
88
|
+
}
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- BN4-C-P01: preserve defensive runtime boundary guard despite current static types.
|
|
90
|
+
if (profile.profiles == null || profile.profiles.length === 0) {
|
|
91
|
+
throw new Error(`LoadBalancer profile '${profileName}' must reference at least one profile`);
|
|
92
|
+
}
|
|
93
|
+
const availableProfiles = await this.listProfiles();
|
|
94
|
+
for (const referencedProfile of profile.profiles) {
|
|
95
|
+
if (!availableProfiles.includes(referencedProfile)) {
|
|
96
|
+
throw new Error(`LoadBalancer profile '${profileName}' references non-existent profile '${referencedProfile}'`);
|
|
97
|
+
}
|
|
98
|
+
const referencedProfilePath = path.join(this.profilesDir, `${referencedProfile}.json`);
|
|
99
|
+
const referencedContent = await fs.readFile(referencedProfilePath, 'utf8');
|
|
100
|
+
const referencedProfileData = JSON.parse(referencedContent);
|
|
101
|
+
if (isLoadBalancerProfile(referencedProfileData)) {
|
|
102
|
+
throw new Error(`LoadBalancer profile '${profileName}' cannot reference another LoadBalancer profile '${referencedProfile}'`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Load a profile configuration.
|
|
108
|
+
* @param profileName The name of the profile to load
|
|
109
|
+
* @returns The loaded profile configuration
|
|
110
|
+
*/
|
|
111
|
+
async loadProfile(profileName) {
|
|
112
|
+
const filePath = path.join(this.profilesDir, `${profileName}.json`);
|
|
113
|
+
try {
|
|
114
|
+
const content = await fs.readFile(filePath, 'utf8');
|
|
115
|
+
const profile = JSON.parse(content);
|
|
116
|
+
if (isLoadBalancerProfile(profile)) {
|
|
117
|
+
await this.validateLoadBalancerReferences(profileName, profile);
|
|
118
|
+
return profile;
|
|
119
|
+
}
|
|
120
|
+
const profileRecord = profile;
|
|
121
|
+
const profileVersion = profileRecord.version;
|
|
122
|
+
const profileProvider = profileRecord.provider;
|
|
123
|
+
const profileModel = profileRecord.model;
|
|
124
|
+
if (
|
|
125
|
+
// eslint-disable-next-line sonarjs/expression-complexity -- Existing structure is intentionally preserved; refactoring this boundary is outside the lint slice.
|
|
126
|
+
profileVersion == null ||
|
|
127
|
+
profileVersion === 0 ||
|
|
128
|
+
(typeof profileVersion === 'number' && Number.isNaN(profileVersion)) ||
|
|
129
|
+
profileVersion === false ||
|
|
130
|
+
typeof profileProvider !== 'string' ||
|
|
131
|
+
profileProvider === '' ||
|
|
132
|
+
typeof profileModel !== 'string' ||
|
|
133
|
+
profileModel === '' ||
|
|
134
|
+
profileRecord.modelParams == null ||
|
|
135
|
+
profileRecord.ephemeralSettings == null) {
|
|
136
|
+
throw new Error('missing required fields');
|
|
137
|
+
}
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- BN4-C-P01: preserve defensive runtime boundary guard despite current static types.
|
|
139
|
+
if (profile.version !== 1) {
|
|
140
|
+
throw new Error('unsupported profile version');
|
|
141
|
+
}
|
|
142
|
+
return profile;
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
if (error instanceof Error && error.message.includes('ENOENT')) {
|
|
146
|
+
throw new Error(`Profile '${profileName}' not found`);
|
|
147
|
+
}
|
|
148
|
+
if (error instanceof SyntaxError) {
|
|
149
|
+
throw new Error(`Profile '${profileName}' is corrupted`);
|
|
150
|
+
}
|
|
151
|
+
if (error instanceof Error &&
|
|
152
|
+
error.message === 'missing required fields') {
|
|
153
|
+
throw new Error(`Profile '${profileName}' is invalid: missing required fields`);
|
|
154
|
+
}
|
|
155
|
+
throw error;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* List all available profile names.
|
|
160
|
+
* @returns Array of profile names (without .json extension)
|
|
161
|
+
*/
|
|
162
|
+
async listProfiles() {
|
|
163
|
+
try {
|
|
164
|
+
await fs.mkdir(this.profilesDir, { recursive: true });
|
|
165
|
+
const files = await fs.readdir(this.profilesDir);
|
|
166
|
+
const profileNames = files
|
|
167
|
+
.filter((file) => file.endsWith('.json'))
|
|
168
|
+
.map((file) => file.slice(0, -5));
|
|
169
|
+
return profileNames;
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return [];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Delete a profile.
|
|
177
|
+
* @param profileName The name of the profile to delete
|
|
178
|
+
*/
|
|
179
|
+
async deleteProfile(profileName) {
|
|
180
|
+
const filePath = path.join(this.profilesDir, `${profileName}.json`);
|
|
181
|
+
try {
|
|
182
|
+
await fs.unlink(filePath);
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
if (error instanceof Error && error.message.includes('ENOENT')) {
|
|
186
|
+
throw new Error(`Profile '${profileName}' not found`);
|
|
187
|
+
}
|
|
188
|
+
throw error;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Check if a profile exists.
|
|
193
|
+
* @param profileName The name of the profile to check
|
|
194
|
+
* @returns True if the profile exists
|
|
195
|
+
*/
|
|
196
|
+
async profileExists(profileName) {
|
|
197
|
+
const filePath = path.join(this.profilesDir, `${profileName}.json`);
|
|
198
|
+
try {
|
|
199
|
+
await fs.access(filePath);
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Save current settings to a profile through SettingsService
|
|
208
|
+
* @param profileName The name of the profile to save
|
|
209
|
+
*/
|
|
210
|
+
async save(profileName, settingsService) {
|
|
211
|
+
if (typeof settingsService.exportForProfile !== 'function') {
|
|
212
|
+
throw new Error('SettingsService does not support profile export');
|
|
213
|
+
}
|
|
214
|
+
const settingsData = await settingsService.exportForProfile();
|
|
215
|
+
const defaultProvider = settingsData.defaultProvider;
|
|
216
|
+
const providerSettings = settingsData.providers[defaultProvider];
|
|
217
|
+
const profile = {
|
|
218
|
+
version: 1,
|
|
219
|
+
provider: defaultProvider,
|
|
220
|
+
model: stringOrDefault(providerSettings.model, 'default'),
|
|
221
|
+
modelParams: {
|
|
222
|
+
temperature: optionalNumber(providerSettings.temperature),
|
|
223
|
+
max_tokens: optionalNumber(providerSettings.maxTokens),
|
|
224
|
+
},
|
|
225
|
+
ephemeralSettings: {
|
|
226
|
+
'base-url': optionalString(providerSettings['base-url']),
|
|
227
|
+
'auth-key': optionalString(providerSettings['auth-key']),
|
|
228
|
+
'auth-keyfile': optionalString(providerSettings['auth-keyfile']),
|
|
229
|
+
'prompt-caching': optionalPromptCaching(providerSettings['prompt-caching']),
|
|
230
|
+
'include-folder-structure': optionalBoolean(providerSettings['include-folder-structure']),
|
|
231
|
+
'tool-format': optionalString(providerSettings.toolFormat),
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
const toolsAllowed = Array.isArray(settingsData.tools?.allowed)
|
|
235
|
+
? settingsData.tools.allowed.map((name) => String(name))
|
|
236
|
+
: [];
|
|
237
|
+
const toolsDisabled = Array.isArray(settingsData.tools?.disabled)
|
|
238
|
+
? settingsData.tools.disabled.map((name) => String(name))
|
|
239
|
+
: [];
|
|
240
|
+
profile.ephemeralSettings['tools.allowed'] = toolsAllowed;
|
|
241
|
+
profile.ephemeralSettings['tools.disabled'] = toolsDisabled;
|
|
242
|
+
profile.ephemeralSettings['disabled-tools'] = toolsDisabled;
|
|
243
|
+
if (typeof settingsService.setCurrentProfileName === 'function') {
|
|
244
|
+
settingsService.setCurrentProfileName(profileName);
|
|
245
|
+
}
|
|
246
|
+
await this.saveProfile(profileName, profile);
|
|
247
|
+
}
|
|
248
|
+
convertProfileToSettingsData(profile) {
|
|
249
|
+
return {
|
|
250
|
+
defaultProvider: profile.provider,
|
|
251
|
+
providers: {
|
|
252
|
+
[profile.provider]: {
|
|
253
|
+
enabled: true,
|
|
254
|
+
model: profile.model,
|
|
255
|
+
temperature: profile.modelParams.temperature,
|
|
256
|
+
maxTokens: profile.modelParams.max_tokens,
|
|
257
|
+
'base-url': profile.ephemeralSettings['base-url'],
|
|
258
|
+
'auth-key': profile.ephemeralSettings['auth-key'],
|
|
259
|
+
'auth-keyfile': profile.ephemeralSettings['auth-keyfile'],
|
|
260
|
+
'prompt-caching': profile.ephemeralSettings['prompt-caching'],
|
|
261
|
+
'include-folder-structure': profile.ephemeralSettings['include-folder-structure'],
|
|
262
|
+
toolFormat: profile.ephemeralSettings['tool-format'],
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
tools: {
|
|
266
|
+
allowed: Array.isArray(profile.ephemeralSettings['tools.allowed'])
|
|
267
|
+
? [...profile.ephemeralSettings['tools.allowed']]
|
|
268
|
+
: [],
|
|
269
|
+
disabled: Array.isArray(profile.ephemeralSettings['tools.disabled'])
|
|
270
|
+
? [...profile.ephemeralSettings['tools.disabled']]
|
|
271
|
+
: // eslint-disable-next-line sonarjs/no-nested-conditional -- Existing structure is intentionally preserved; refactoring this boundary is outside the lint slice.
|
|
272
|
+
Array.isArray(profile.ephemeralSettings['disabled-tools'])
|
|
273
|
+
? [...profile.ephemeralSettings['disabled-tools']]
|
|
274
|
+
: [],
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
applyToolSettings(settingsData, settingsService) {
|
|
279
|
+
const allowedList = Array.isArray(settingsData.tools.allowed)
|
|
280
|
+
? settingsData.tools.allowed
|
|
281
|
+
: [];
|
|
282
|
+
const disabledList = Array.isArray(settingsData.tools.disabled)
|
|
283
|
+
? settingsData.tools.disabled
|
|
284
|
+
: [];
|
|
285
|
+
if (settingsService.set) {
|
|
286
|
+
settingsService.set('tools.allowed', allowedList);
|
|
287
|
+
settingsService.set('tools.disabled', disabledList);
|
|
288
|
+
settingsService.set('disabled-tools', disabledList);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
applyReasoningSettings(profile, settingsService) {
|
|
292
|
+
const reasoningSettings = profile.ephemeralSettings;
|
|
293
|
+
const reasoningKeys = [
|
|
294
|
+
'reasoning.enabled',
|
|
295
|
+
'reasoning.includeInContext',
|
|
296
|
+
'reasoning.includeInResponse',
|
|
297
|
+
'reasoning.format',
|
|
298
|
+
'reasoning.stripFromContext',
|
|
299
|
+
'reasoning.effort',
|
|
300
|
+
'reasoning.maxTokens',
|
|
301
|
+
];
|
|
302
|
+
for (const key of reasoningKeys) {
|
|
303
|
+
if (reasoningSettings[key] !== undefined && settingsService.set) {
|
|
304
|
+
settingsService.set(key, reasoningSettings[key]);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
async load(profileName, settingsService) {
|
|
309
|
+
const profile = await this.loadProfile(profileName);
|
|
310
|
+
if (isLoadBalancerProfile(profile)) {
|
|
311
|
+
throw new Error(`LoadBalancer profile '${profileName}' cannot be loaded directly into SettingsService`);
|
|
312
|
+
}
|
|
313
|
+
await this.applyLoadedProfile(profileName, profile, settingsService);
|
|
314
|
+
}
|
|
315
|
+
async applyLoadedProfile(profileName, profile, settingsService) {
|
|
316
|
+
const settingsData = this.convertProfileToSettingsData(profile);
|
|
317
|
+
if (typeof settingsService.setCurrentProfileName === 'function') {
|
|
318
|
+
settingsService.setCurrentProfileName(profileName);
|
|
319
|
+
}
|
|
320
|
+
if (typeof settingsService.importFromProfile !== 'function') {
|
|
321
|
+
throw new Error('SettingsService does not support profile import');
|
|
322
|
+
}
|
|
323
|
+
await settingsService.importFromProfile(settingsData);
|
|
324
|
+
this.applyToolSettings(settingsData, settingsService);
|
|
325
|
+
this.applyReasoningSettings(profile, settingsService);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
//# sourceMappingURL=ProfileManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileManager.js","sourceRoot":"","sources":["../../../src/profiles/ProfileManager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAwBxB,SAAS,eAAe,CAAC,KAAc,EAAE,QAAgB;IACvD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AACtD,CAAC;AAED,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,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
|
+
* Behavioral TDD tests for ProfileManager.
|
|
6
|
+
*
|
|
7
|
+
* These tests verify real temp filesystem JSON and path behavior.
|
|
8
|
+
* They use actual temp directories and verify file content.
|
|
9
|
+
* Tests fail against stubs because methods throw instead of performing
|
|
10
|
+
* real filesystem operations.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|