@ceyhunbilir/synaphex 1.0.0

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 (63) hide show
  1. package/README.md +132 -0
  2. package/dist/commands/configure.d.ts +2 -0
  3. package/dist/commands/configure.d.ts.map +1 -0
  4. package/dist/commands/configure.js +15 -0
  5. package/dist/commands/configure.js.map +1 -0
  6. package/dist/commands/init.d.ts +2 -0
  7. package/dist/commands/init.d.ts.map +1 -0
  8. package/dist/commands/init.js +19 -0
  9. package/dist/commands/init.js.map +1 -0
  10. package/dist/commands/list-outputs.d.ts +2 -0
  11. package/dist/commands/list-outputs.d.ts.map +1 -0
  12. package/dist/commands/list-outputs.js +28 -0
  13. package/dist/commands/list-outputs.js.map +1 -0
  14. package/dist/commands/load-config.d.ts +2 -0
  15. package/dist/commands/load-config.d.ts.map +1 -0
  16. package/dist/commands/load-config.js +132 -0
  17. package/dist/commands/load-config.js.map +1 -0
  18. package/dist/commands/load-memory.d.ts +2 -0
  19. package/dist/commands/load-memory.d.ts.map +1 -0
  20. package/dist/commands/load-memory.js +21 -0
  21. package/dist/commands/load-memory.js.map +1 -0
  22. package/dist/commands/save-output.d.ts +2 -0
  23. package/dist/commands/save-output.d.ts.map +1 -0
  24. package/dist/commands/save-output.js +38 -0
  25. package/dist/commands/save-output.js.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +44 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/lib/auth.d.ts +10 -0
  31. package/dist/lib/auth.d.ts.map +1 -0
  32. package/dist/lib/auth.js +54 -0
  33. package/dist/lib/auth.js.map +1 -0
  34. package/dist/lib/memory.d.ts +3 -0
  35. package/dist/lib/memory.d.ts.map +1 -0
  36. package/dist/lib/memory.js +40 -0
  37. package/dist/lib/memory.js.map +1 -0
  38. package/dist/lib/output.d.ts +4 -0
  39. package/dist/lib/output.d.ts.map +1 -0
  40. package/dist/lib/output.js +78 -0
  41. package/dist/lib/output.js.map +1 -0
  42. package/dist/lib/paths.d.ts +11 -0
  43. package/dist/lib/paths.d.ts.map +1 -0
  44. package/dist/lib/paths.js +21 -0
  45. package/dist/lib/paths.js.map +1 -0
  46. package/dist/lib/project.d.ts +2 -0
  47. package/dist/lib/project.d.ts.map +1 -0
  48. package/dist/lib/project.js +109 -0
  49. package/dist/lib/project.js.map +1 -0
  50. package/dist/lib/settings.d.ts +2 -0
  51. package/dist/lib/settings.d.ts.map +1 -0
  52. package/dist/lib/settings.js +531 -0
  53. package/dist/lib/settings.js.map +1 -0
  54. package/dist/types.d.ts +45 -0
  55. package/dist/types.d.ts.map +1 -0
  56. package/dist/types.js +3 -0
  57. package/dist/types.js.map +1 -0
  58. package/package.json +50 -0
  59. package/scripts/postinstall.js +43 -0
  60. package/skills/fix.md +210 -0
  61. package/skills/init.md +69 -0
  62. package/skills/query.md +217 -0
  63. package/skills/settings.md +43 -0
@@ -0,0 +1,531 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.runSettingsCLI = void 0;
27
+ const fs = __importStar(require("fs-extra"));
28
+ const readline = __importStar(require("readline"));
29
+ const paths_js_1 = require("./paths.js");
30
+ const auth_js_1 = require("./auth.js");
31
+ const PROVIDERS = {
32
+ claude: {
33
+ name: 'claude',
34
+ description: 'Anthropic Claude',
35
+ auth_modes: ['api_key', 'cli', 'vscode_extension'],
36
+ api_key_env: 'ANTHROPIC_API_KEY',
37
+ cli_command: 'claude',
38
+ models: ['claude-opus-4-5', 'claude-sonnet-4-5', 'claude-haiku-4-5-20251001'],
39
+ },
40
+ gemini: {
41
+ name: 'gemini',
42
+ description: 'Google Gemini',
43
+ auth_modes: ['api_key'],
44
+ api_key_env: 'GEMINI_API_KEY',
45
+ models: ['gemini-2.5-pro', 'gemini-1.5-pro', 'gemini-1.5-flash'],
46
+ },
47
+ copilot: {
48
+ name: 'copilot',
49
+ description: 'GitHub Copilot',
50
+ auth_modes: ['cli'],
51
+ cli_command: 'gh',
52
+ models: ['copilot'],
53
+ },
54
+ };
55
+ const AGENT_NAMES = ['examiner', 'researcher', 'coder', 'questioner', 'reviewer'];
56
+ function parseConfigFile(content) {
57
+ var _a, _b;
58
+ const match = content.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
59
+ if (!match) {
60
+ throw new Error('Invalid config file format');
61
+ }
62
+ const frontmatterText = match[1];
63
+ const body = match[2];
64
+ // Simple YAML parser for our specific structure
65
+ const frontmatter = {
66
+ project: '',
67
+ created_at: new Date().toISOString(),
68
+ agents: {
69
+ examiner: { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
70
+ researcher: { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
71
+ coder: { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
72
+ questioner: { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
73
+ reviewer: { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
74
+ },
75
+ };
76
+ const lines = frontmatterText.split('\n');
77
+ let inAgents = false;
78
+ let currentAgent = null;
79
+ const agents = {};
80
+ for (const line of lines) {
81
+ if (line.startsWith('agents:')) {
82
+ inAgents = true;
83
+ continue;
84
+ }
85
+ if (inAgents && line.match(/^ \w+:/)) {
86
+ currentAgent = (_b = (_a = line.match(/^\s*(\w+):/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : null;
87
+ if (currentAgent) {
88
+ agents[currentAgent] = {
89
+ provider: 'claude',
90
+ model: 'claude-opus-4-5',
91
+ auth_mode: 'api_key',
92
+ focus: '',
93
+ depth: 'standard',
94
+ custom_instructions: '',
95
+ };
96
+ }
97
+ continue;
98
+ }
99
+ if (inAgents && currentAgent && line.includes(':')) {
100
+ const [key, ...valueParts] = line.split(':');
101
+ const trimmedKey = key.trim();
102
+ const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
103
+ if (trimmedKey === 'focus' || trimmedKey === 'custom_instructions' || trimmedKey === 'auth_mode') {
104
+ agents[currentAgent][trimmedKey] = value;
105
+ }
106
+ else if (trimmedKey === 'depth') {
107
+ agents[currentAgent][trimmedKey] = value;
108
+ }
109
+ else if (trimmedKey === 'provider') {
110
+ agents[currentAgent][trimmedKey] = value;
111
+ }
112
+ else if (trimmedKey === 'model') {
113
+ agents[currentAgent][trimmedKey] = value;
114
+ }
115
+ continue;
116
+ }
117
+ if (!inAgents && line.includes(':')) {
118
+ const [key, ...valueParts] = line.split(':');
119
+ const trimmedKey = key.trim();
120
+ const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
121
+ if (trimmedKey === 'project')
122
+ frontmatter.project = value;
123
+ if (trimmedKey === 'created_at')
124
+ frontmatter.created_at = value;
125
+ }
126
+ }
127
+ if (Object.keys(agents).length > 0) {
128
+ frontmatter.agents = {
129
+ examiner: agents.examiner || { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
130
+ researcher: agents.researcher || { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
131
+ coder: agents.coder || { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
132
+ questioner: agents.questioner || { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
133
+ reviewer: agents.reviewer || { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
134
+ };
135
+ }
136
+ return { frontmatter, body };
137
+ }
138
+ function buildConfigFile(frontmatter, body) {
139
+ const agentsYaml = `
140
+ agents:
141
+ examiner:
142
+ provider: ${frontmatter.agents.examiner.provider}
143
+ model: ${frontmatter.agents.examiner.model}
144
+ auth_mode: ${frontmatter.agents.examiner.auth_mode}
145
+ focus: "${frontmatter.agents.examiner.focus}"
146
+ depth: ${frontmatter.agents.examiner.depth}
147
+ custom_instructions: "${frontmatter.agents.examiner.custom_instructions}"
148
+ researcher:
149
+ provider: ${frontmatter.agents.researcher.provider}
150
+ model: ${frontmatter.agents.researcher.model}
151
+ auth_mode: ${frontmatter.agents.researcher.auth_mode}
152
+ focus: "${frontmatter.agents.researcher.focus}"
153
+ depth: ${frontmatter.agents.researcher.depth}
154
+ custom_instructions: "${frontmatter.agents.researcher.custom_instructions}"
155
+ coder:
156
+ provider: ${frontmatter.agents.coder.provider}
157
+ model: ${frontmatter.agents.coder.model}
158
+ auth_mode: ${frontmatter.agents.coder.auth_mode}
159
+ focus: "${frontmatter.agents.coder.focus}"
160
+ depth: ${frontmatter.agents.coder.depth}
161
+ custom_instructions: "${frontmatter.agents.coder.custom_instructions}"
162
+ questioner:
163
+ provider: ${frontmatter.agents.questioner.provider}
164
+ model: ${frontmatter.agents.questioner.model}
165
+ auth_mode: ${frontmatter.agents.questioner.auth_mode}
166
+ focus: "${frontmatter.agents.questioner.focus}"
167
+ depth: ${frontmatter.agents.questioner.depth}
168
+ custom_instructions: "${frontmatter.agents.questioner.custom_instructions}"
169
+ reviewer:
170
+ provider: ${frontmatter.agents.reviewer.provider}
171
+ model: ${frontmatter.agents.reviewer.model}
172
+ auth_mode: ${frontmatter.agents.reviewer.auth_mode}
173
+ focus: "${frontmatter.agents.reviewer.focus}"
174
+ depth: ${frontmatter.agents.reviewer.depth}
175
+ custom_instructions: "${frontmatter.agents.reviewer.custom_instructions}"`;
176
+ const fm = `---
177
+ project: ${frontmatter.project}
178
+ created_at: ${frontmatter.created_at}${agentsYaml}
179
+ ---
180
+
181
+ ${body}`;
182
+ return fm;
183
+ }
184
+ function question(rl, prompt) {
185
+ return new Promise((resolve) => {
186
+ rl.question(prompt, (answer) => {
187
+ resolve(answer.trim());
188
+ });
189
+ });
190
+ }
191
+ function clearScreen() {
192
+ console.clear();
193
+ }
194
+ async function showAgentSelectionScreen(rl) {
195
+ clearScreen();
196
+ console.log('╔══════════════════════════════════════════════════════╗');
197
+ console.log('║ SYNAPHEX SETTINGS — Agent Selection ║');
198
+ console.log('╚══════════════════════════════════════════════════════╝\n');
199
+ const agents = [
200
+ ' 1) EXAMINER',
201
+ ' 2) RESEARCHER',
202
+ ' 3) CODER',
203
+ ' 4) QUESTIONER',
204
+ ' 5) REVIEWER',
205
+ ];
206
+ console.log(agents.join('\n'));
207
+ console.log(' ─────────────────────────────────────────────────────\n');
208
+ const answer = await question(rl, 'Select [1-5, q to exit]: ');
209
+ const choice = parseInt(answer, 10);
210
+ if (choice >= 1 && choice <= 5) {
211
+ return AGENT_NAMES[choice - 1];
212
+ }
213
+ if (answer.toLowerCase() === 'q') {
214
+ return null;
215
+ }
216
+ console.log('\nInvalid option.');
217
+ await new Promise(resolve => setTimeout(resolve, 1000));
218
+ return await showAgentSelectionScreen(rl);
219
+ }
220
+ async function selectProvider(rl, currentProvider) {
221
+ const providers = Object.keys(PROVIDERS);
222
+ const providerList = providers.map((key, idx) => {
223
+ const config = PROVIDERS[key];
224
+ return `${idx + 1}) ${config.name}`;
225
+ });
226
+ console.log(` Providers: ${providerList.join(' ')}`);
227
+ const answer = await question(rl, ' Select: ');
228
+ const idx = parseInt(answer, 10) - 1;
229
+ if (idx >= 0 && idx < providers.length) {
230
+ return providers[idx];
231
+ }
232
+ return currentProvider;
233
+ }
234
+ async function selectModel(rl, provider, currentModel) {
235
+ const providerConfig = PROVIDERS[provider];
236
+ if (!providerConfig) {
237
+ return currentModel;
238
+ }
239
+ const modelList = providerConfig.models.map((m, idx) => `${idx + 1}) ${m}`);
240
+ modelList.push(`${providerConfig.models.length + 1}) custom`);
241
+ console.log(` Models: ${modelList.join(' ')}`);
242
+ const answer = await question(rl, ' Select: ');
243
+ const idx = parseInt(answer, 10) - 1;
244
+ if (idx >= 0 && idx < providerConfig.models.length) {
245
+ return providerConfig.models[idx];
246
+ }
247
+ if (idx === providerConfig.models.length) {
248
+ const customModel = await question(rl, ' Enter custom model name: ');
249
+ if (customModel) {
250
+ return customModel;
251
+ }
252
+ }
253
+ return currentModel;
254
+ }
255
+ async function selectDepth(rl, currentDepth) {
256
+ console.log(' Depth: 1) quick 2) standard 3) deep');
257
+ const answer = await question(rl, ' Select: ');
258
+ const idx = parseInt(answer, 10);
259
+ if (idx === 1)
260
+ return 'quick';
261
+ if (idx === 3)
262
+ return 'deep';
263
+ return 'standard';
264
+ }
265
+ async function selectFocus(rl, currentFocus) {
266
+ const options = [
267
+ '1) security',
268
+ '2) performance',
269
+ '3) simplicity',
270
+ '4) reliability',
271
+ '5) custom',
272
+ '6) clear (none)',
273
+ ];
274
+ console.log(` Focus: ${options.join(' ')}`);
275
+ const answer = await question(rl, ' Select: ');
276
+ const idx = parseInt(answer, 10);
277
+ switch (idx) {
278
+ case 1: return 'security';
279
+ case 2: return 'performance';
280
+ case 3: return 'simplicity';
281
+ case 4: return 'reliability';
282
+ case 5: {
283
+ // Custom focus - show inline input with clear preview
284
+ clearScreen();
285
+ console.log('╔══════════════════════════════════════════════════════╗');
286
+ console.log('║ CUSTOM FOCUS ║');
287
+ console.log('╚══════════════════════════════════════════════════════╝\n');
288
+ console.log(' Examples: scalability, maintainability, debugging\n');
289
+ const custom = await question(rl, ' Enter focus: ');
290
+ return custom || currentFocus;
291
+ }
292
+ case 6: return '';
293
+ default: return currentFocus;
294
+ }
295
+ }
296
+ async function selectInstructions(rl, currentInstructions) {
297
+ const options = [
298
+ '1) add instructions',
299
+ '2) clear instructions',
300
+ ];
301
+ console.log(` Instructions: ${options.join(' ')}`);
302
+ const answer = await question(rl, ' Select: ');
303
+ const idx = parseInt(answer, 10);
304
+ switch (idx) {
305
+ case 1: {
306
+ clearScreen();
307
+ console.log('╔══════════════════════════════════════════════════════╗');
308
+ console.log('║ CUSTOM INSTRUCTIONS ║');
309
+ console.log('╚══════════════════════════════════════════════════════╝\n');
310
+ console.log(' Examples: prioritize edge cases, use async/await\n');
311
+ const custom = await question(rl, ' Enter instructions: ');
312
+ return custom || currentInstructions;
313
+ }
314
+ case 2: return '';
315
+ default: return currentInstructions;
316
+ }
317
+ }
318
+ async function selectAuthMode(rl, provider, currentMode) {
319
+ const providerConfig = PROVIDERS[provider];
320
+ if (!providerConfig) {
321
+ return currentMode;
322
+ }
323
+ const modes = providerConfig.auth_modes;
324
+ const modeList = modes.map((m, idx) => {
325
+ let desc = 'unknown';
326
+ if (m === 'api_key')
327
+ desc = providerConfig.api_key_env || 'env var';
328
+ else if (m === 'cli')
329
+ desc = providerConfig.cli_command || 'CLI';
330
+ else if (m === 'vscode_extension')
331
+ desc = 'Claude Code extension';
332
+ return `${idx + 1}) ${m} (${desc})`;
333
+ });
334
+ console.log(` Auth: ${modeList.join(' ')}`);
335
+ const answer = await question(rl, ' Select: ');
336
+ const idx = parseInt(answer, 10) - 1;
337
+ if (idx >= 0 && idx < modes.length) {
338
+ const selectedMode = modes[idx];
339
+ // If vscode_extension mode selected, check if in VSCode
340
+ if (selectedMode === 'vscode_extension') {
341
+ const checkResult = (0, auth_js_1.checkCLIAuth)('claude_vscode');
342
+ if (!checkResult.authorized) {
343
+ console.log(` ✗ ${checkResult.error}`);
344
+ const retryAnswer = await question(rl, ' Press Enter to retry or any key to cancel: ');
345
+ if (retryAnswer === '') {
346
+ return await selectAuthMode(rl, provider, currentMode);
347
+ }
348
+ else {
349
+ return currentMode;
350
+ }
351
+ }
352
+ else {
353
+ console.log(` ✓ ${checkResult.identity}`);
354
+ return 'vscode_extension';
355
+ }
356
+ }
357
+ // If CLI mode selected, check auth
358
+ if (selectedMode === 'cli') {
359
+ const checkResult = (0, auth_js_1.checkCLIAuth)(provider);
360
+ if (!checkResult.authorized) {
361
+ console.log(` ✗ ${provider} CLI not authorized.`);
362
+ console.log(` To authorize: ${(0, auth_js_1.getAuthInstruction)(provider)}`);
363
+ const retryAnswer = await question(rl, ' Press Enter to retry or any key to cancel: ');
364
+ if (retryAnswer === '') {
365
+ // Retry the check
366
+ const retryResult = (0, auth_js_1.checkCLIAuth)(provider);
367
+ if (retryResult.authorized) {
368
+ if (retryResult.identity)
369
+ console.log(` ✓ Authorized as: ${retryResult.identity}`);
370
+ return 'cli';
371
+ }
372
+ else {
373
+ console.log(` Still not authorized. Canceling.`);
374
+ return currentMode;
375
+ }
376
+ }
377
+ else {
378
+ return currentMode;
379
+ }
380
+ }
381
+ else {
382
+ if (checkResult.identity) {
383
+ console.log(` ✓ ${provider} CLI: authorized as ${checkResult.identity}`);
384
+ }
385
+ else {
386
+ console.log(` ✓ ${provider} CLI: authorized`);
387
+ }
388
+ return 'cli';
389
+ }
390
+ }
391
+ return selectedMode;
392
+ }
393
+ return currentMode;
394
+ }
395
+ async function showAgentSettingsScreen(rl, projectName, agentName, agentConfig) {
396
+ const displayName = agentName.charAt(0).toUpperCase() + agentName.slice(1).toUpperCase();
397
+ let config = { ...agentConfig };
398
+ let done = false;
399
+ while (!done) {
400
+ clearScreen();
401
+ console.log('╔══════════════════════════════════════════════════════╗');
402
+ console.log(`║ ${displayName.padEnd(48)} SETTINGS ║`);
403
+ console.log('╚══════════════════════════════════════════════════════╝\n');
404
+ console.log(` 1) Provider : ${config.provider}`);
405
+ console.log(` 2) Auth : ${config.auth_mode}`);
406
+ console.log(` 3) Model : ${config.model}`);
407
+ console.log(` 4) Focus : ${config.focus || '(none)'}`);
408
+ console.log(` 5) Depth : ${config.depth}`);
409
+ console.log(` 6) Instructions : ${config.custom_instructions ? '(set)' : '(none)'}`);
410
+ console.log('\n ─────────────────────────────────────────────────────');
411
+ console.log(' s) Save & Back');
412
+ console.log(' q) Quit without saving\n');
413
+ const answer = await question(rl, 'Select [1-6, s, q]: ');
414
+ switch (answer.toLowerCase()) {
415
+ case '1': {
416
+ const newProvider = await selectProvider(rl, config.provider);
417
+ config.provider = newProvider;
418
+ break;
419
+ }
420
+ case '2': {
421
+ const newAuthMode = await selectAuthMode(rl, config.provider, config.auth_mode);
422
+ config.auth_mode = newAuthMode;
423
+ break;
424
+ }
425
+ case '3': {
426
+ const newModel = await selectModel(rl, config.provider, config.model);
427
+ config.model = newModel;
428
+ break;
429
+ }
430
+ case '4': {
431
+ const focus = await selectFocus(rl, config.focus);
432
+ config.focus = focus;
433
+ break;
434
+ }
435
+ case '5': {
436
+ const depth = await selectDepth(rl, config.depth);
437
+ config.depth = depth;
438
+ break;
439
+ }
440
+ case '6': {
441
+ const instructions = await selectInstructions(rl, config.custom_instructions);
442
+ config.custom_instructions = instructions;
443
+ break;
444
+ }
445
+ case 's': {
446
+ return config;
447
+ }
448
+ case 'q': {
449
+ return null;
450
+ }
451
+ default:
452
+ console.log('Invalid option.');
453
+ await new Promise(resolve => setTimeout(resolve, 1000));
454
+ }
455
+ }
456
+ return null;
457
+ }
458
+ async function runSettingsCLI(projectName) {
459
+ const configPath = paths_js_1.Paths.config(projectName);
460
+ // Verify project exists
461
+ if (!fs.existsSync(configPath)) {
462
+ console.error(`Error: Project '${projectName}' not found.`);
463
+ console.error(`Create it first with: /synaphex/init ${projectName}`);
464
+ process.exit(1);
465
+ }
466
+ // Read current config
467
+ let config;
468
+ let body;
469
+ try {
470
+ const content = fs.readFileSync(configPath, 'utf-8');
471
+ const parsed = parseConfigFile(content);
472
+ config = parsed.frontmatter;
473
+ body = parsed.body;
474
+ }
475
+ catch (err) {
476
+ console.error(`Error reading config: ${err instanceof Error ? err.message : String(err)}`);
477
+ process.exit(1);
478
+ }
479
+ // Open readline interface
480
+ const rl = readline.createInterface({
481
+ input: process.stdin,
482
+ output: process.stdout,
483
+ });
484
+ try {
485
+ let selecting = true;
486
+ let unsavedChanges = false;
487
+ while (selecting) {
488
+ // Screen 1: Agent selection
489
+ const selectedAgent = await showAgentSelectionScreen(rl);
490
+ if (!selectedAgent) {
491
+ selecting = false;
492
+ }
493
+ else {
494
+ // Screen 2: Agent settings
495
+ const updated = await showAgentSettingsScreen(rl, projectName, selectedAgent, config.agents[selectedAgent]);
496
+ if (updated !== null) {
497
+ // User clicked "Save & Back"
498
+ config.agents[selectedAgent] = updated;
499
+ unsavedChanges = true;
500
+ }
501
+ else {
502
+ // User clicked "Quit without saving" - exit completely
503
+ selecting = false;
504
+ }
505
+ }
506
+ }
507
+ // Final save if there were unsaved changes
508
+ if (unsavedChanges) {
509
+ clearScreen();
510
+ console.log('╔══════════════════════════════════════════════════════╗');
511
+ console.log('║ SYNAPHEX SETTINGS — Save ║');
512
+ console.log('╚══════════════════════════════════════════════════════╝\n');
513
+ const confirm = await question(rl, 'Save all changes? (y/n): ');
514
+ if (confirm.toLowerCase() === 'y' || confirm.toLowerCase() === 'yes') {
515
+ const updatedContent = buildConfigFile(config, body);
516
+ fs.writeFileSync(configPath, updatedContent, 'utf-8');
517
+ clearScreen();
518
+ console.log('✓ Settings saved successfully!');
519
+ }
520
+ else {
521
+ clearScreen();
522
+ console.log('✗ Changes discarded.');
523
+ }
524
+ }
525
+ }
526
+ finally {
527
+ rl.close();
528
+ }
529
+ }
530
+ exports.runSettingsCLI = runSettingsCLI;
531
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/lib/settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,mDAAqC;AACrC,yCAAmC;AAEnC,uCAA6D;AAW7D,MAAM,SAAS,GAAmC;IAChD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kBAAkB;QAC/B,UAAU,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,kBAAkB,CAAC;QAClD,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE,QAAQ;QACrB,MAAM,EAAE,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,2BAA2B,CAAC;KAC9E;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,CAAC,SAAS,CAAC;QACvB,WAAW,EAAE,gBAAgB;QAC7B,MAAM,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,CAAC;KACjE;IACD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gBAAgB;QAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;QACnB,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,CAAC,SAAS,CAAC;KACpB;CACF,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,CAAU,CAAC;AAQ3F,SAAS,eAAe,CAAC,OAAe;;IACtC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACjE,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,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C,CAAC;aACrC;SACF;KACF;YAAS;QACR,EAAE,CAAC,KAAK,EAAE,CAAC;KACZ;AACH,CAAC;AA7ED,wCA6EC"}
@@ -0,0 +1,45 @@
1
+ export interface AgentConfig {
2
+ provider: 'claude' | 'gemini' | 'copilot';
3
+ model: string;
4
+ auth_mode: 'api_key' | 'cli' | 'vscode_extension';
5
+ focus: string;
6
+ depth: 'quick' | 'standard' | 'deep';
7
+ custom_instructions: string;
8
+ }
9
+ export interface AgentsConfig {
10
+ examiner: AgentConfig;
11
+ researcher: AgentConfig;
12
+ coder: AgentConfig;
13
+ questioner: AgentConfig;
14
+ reviewer: AgentConfig;
15
+ }
16
+ export interface ProjectConfig {
17
+ project: string;
18
+ created_at: string;
19
+ agents?: AgentsConfig;
20
+ }
21
+ export interface PipelineStages {
22
+ examiner?: string;
23
+ researcher?: string;
24
+ coder?: string;
25
+ questioner?: string;
26
+ reviewer?: string;
27
+ }
28
+ export interface PipelineOutput {
29
+ run_id: string;
30
+ command: 'query' | 'fix';
31
+ task: string;
32
+ skip_researcher: boolean;
33
+ timestamp: string;
34
+ stages: PipelineStages;
35
+ }
36
+ export interface MemoryEntry {
37
+ title: string;
38
+ file: string;
39
+ summary: string;
40
+ }
41
+ export interface MemoryIndex {
42
+ project: string;
43
+ entries: MemoryEntry[];
44
+ }
45
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,SAAS,GAAG,KAAK,GAAG,kBAAkB,CAAC;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IACrC,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,WAAW,CAAC;IACtB,UAAU,EAAE,WAAW,CAAC;IACxB,KAAK,EAAE,WAAW,CAAC;IACnB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,WAAW,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,GAAG,KAAK,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}