@ceyhunbilir/synaphex 1.0.3 → 1.0.6
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/commands/configure.d.ts +2 -0
- package/dist/commands/configure.d.ts.map +1 -0
- package/dist/commands/configure.js +14 -0
- package/dist/commands/configure.js.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/settings.d.ts +2 -0
- package/dist/lib/settings.d.ts.map +1 -0
- package/dist/lib/settings.js +203 -0
- package/dist/lib/settings.js.map +1 -0
- package/package.json +1 -1
- package/skills/settings.md +66 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../src/commands/configure.ts"],"names":[],"mappings":"AAEA,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOxE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleConfigure = handleConfigure;
|
|
4
|
+
const settings_js_1 = require("../lib/settings.js");
|
|
5
|
+
async function handleConfigure(projectName) {
|
|
6
|
+
try {
|
|
7
|
+
await (0, settings_js_1.runSettingsCLI)(projectName);
|
|
8
|
+
}
|
|
9
|
+
catch (err) {
|
|
10
|
+
console.error(`Error: ${err instanceof Error ? err.message : String(err)}`);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=configure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../src/commands/configure.ts"],"names":[],"mappings":";;AAEA,0CAOC;AATD,oDAAoD;AAE7C,KAAK,UAAU,eAAe,CAAC,WAAmB;IACvD,IAAI,CAAC;QACH,MAAM,IAAA,4BAAc,EAAC,WAAW,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ const init_1 = require("./commands/init");
|
|
|
6
6
|
const save_output_1 = require("./commands/save-output");
|
|
7
7
|
const load_memory_1 = require("./commands/load-memory");
|
|
8
8
|
const list_outputs_1 = require("./commands/list-outputs");
|
|
9
|
+
const configure_1 = require("./commands/configure");
|
|
9
10
|
const program = new commander_1.Command();
|
|
10
11
|
program
|
|
11
12
|
.name('synaphex')
|
|
@@ -27,6 +28,10 @@ program
|
|
|
27
28
|
.command('list-outputs <project>')
|
|
28
29
|
.description('List all pipeline outputs for a project')
|
|
29
30
|
.action(list_outputs_1.handleListOutputs);
|
|
31
|
+
program
|
|
32
|
+
.command('configure <project>')
|
|
33
|
+
.description('Interactive CLI to configure provider and model settings')
|
|
34
|
+
.action(configure_1.handleConfigure);
|
|
30
35
|
program.parse(process.argv);
|
|
31
36
|
if (!process.argv.slice(2).length) {
|
|
32
37
|
program.outputHelp();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,0CAAuC;AACvC,wDAA0D;AAC1D,wDAA0D;AAC1D,0DAA4D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,0CAAuC;AACvC,wDAA0D;AAC1D,wDAA0D;AAC1D,0DAA4D;AAC5D,oDAAuD;AAEvD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,wEAAwE,CAAC;KACrF,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,qBAAqB,CAAC;KAC9B,WAAW,CAAC,gEAAgE,CAAC;KAC7E,MAAM,CAAC,WAAI,CAAC,CAAC;AAEhB,OAAO;KACJ,OAAO,CAAC,uBAAuB,CAAC;KAChC,WAAW,CAAC,8CAA8C,CAAC;KAC3D,MAAM,CAAC,8BAAgB,CAAC,CAAC;AAE5B,OAAO;KACJ,OAAO,CAAC,uBAAuB,CAAC;KAChC,WAAW,CAAC,sCAAsC,CAAC;KACnD,MAAM,CAAC,8BAAgB,CAAC,CAAC;AAE5B,OAAO;KACJ,OAAO,CAAC,wBAAwB,CAAC;KACjC,WAAW,CAAC,yCAAyC,CAAC;KACtD,MAAM,CAAC,gCAAiB,CAAC,CAAC;AAE7B,OAAO;KACJ,OAAO,CAAC,qBAAqB,CAAC;KAC9B,WAAW,CAAC,0DAA0D,CAAC;KACvE,MAAM,CAAC,2BAAe,CAAC,CAAC;AAE3B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/lib/settings.ts"],"names":[],"mappings":"AAoKA,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA6DvE"}
|
|
@@ -0,0 +1,203 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.runSettingsCLI = runSettingsCLI;
|
|
37
|
+
const fs = __importStar(require("fs-extra"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const readline = __importStar(require("readline"));
|
|
40
|
+
const paths_js_1 = require("./paths.js");
|
|
41
|
+
const PROVIDERS = {
|
|
42
|
+
claude: {
|
|
43
|
+
name: 'claude',
|
|
44
|
+
description: 'Anthropic Claude (requires ANTHROPIC_API_KEY)',
|
|
45
|
+
models: ['claude-opus-4-5', 'claude-sonnet-4-5', 'claude-haiku-4-5'],
|
|
46
|
+
},
|
|
47
|
+
openai: {
|
|
48
|
+
name: 'openai',
|
|
49
|
+
description: 'OpenAI / Copilot (requires OPENAI_API_KEY)',
|
|
50
|
+
models: ['gpt-4o', 'gpt-4-turbo', 'gpt-4'],
|
|
51
|
+
},
|
|
52
|
+
gemini: {
|
|
53
|
+
name: 'gemini',
|
|
54
|
+
description: 'Google Gemini (requires GEMINI_API_KEY)',
|
|
55
|
+
models: ['gemini-1.5-pro', 'gemini-1.5-flash', 'gemini-pro'],
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
function parseConfigFile(content) {
|
|
59
|
+
const match = content.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
|
|
60
|
+
if (!match) {
|
|
61
|
+
throw new Error('Invalid config file format');
|
|
62
|
+
}
|
|
63
|
+
const frontmatterText = match[1];
|
|
64
|
+
const body = match[2];
|
|
65
|
+
const frontmatter = {};
|
|
66
|
+
frontmatterText.split('\n').forEach((line) => {
|
|
67
|
+
const [key, ...valueParts] = line.split(':');
|
|
68
|
+
if (key && valueParts.length > 0) {
|
|
69
|
+
frontmatter[key.trim()] = valueParts.join(':').trim();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
frontmatter: {
|
|
74
|
+
project: frontmatter.project || '',
|
|
75
|
+
provider: frontmatter.provider || 'claude',
|
|
76
|
+
model: frontmatter.model || 'claude-opus-4-5',
|
|
77
|
+
created_at: frontmatter.created_at || new Date().toISOString(),
|
|
78
|
+
},
|
|
79
|
+
body,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function buildConfigFile(frontmatter, body) {
|
|
83
|
+
const fm = `---
|
|
84
|
+
project: ${frontmatter.project}
|
|
85
|
+
provider: ${frontmatter.provider}
|
|
86
|
+
model: ${frontmatter.model}
|
|
87
|
+
created_at: ${frontmatter.created_at}
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
${body}`;
|
|
91
|
+
return fm;
|
|
92
|
+
}
|
|
93
|
+
function question(rl, prompt) {
|
|
94
|
+
return new Promise((resolve) => {
|
|
95
|
+
rl.question(prompt, (answer) => {
|
|
96
|
+
resolve(answer.trim());
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
async function selectProvider(rl, currentProvider) {
|
|
101
|
+
console.log('\n=== Select Provider ===\n');
|
|
102
|
+
const providerList = Object.entries(PROVIDERS).map(([_, config], idx) => ` ${idx + 1}) ${config.name.padEnd(10)} (${config.description})`);
|
|
103
|
+
console.log(providerList.join('\n'));
|
|
104
|
+
const answer = await question(rl, `\nEnter number [1-3] (press Enter to keep '${currentProvider}'): `);
|
|
105
|
+
if (!answer) {
|
|
106
|
+
return currentProvider;
|
|
107
|
+
}
|
|
108
|
+
const idx = parseInt(answer, 10) - 1;
|
|
109
|
+
const providers = Object.keys(PROVIDERS);
|
|
110
|
+
if (idx >= 0 && idx < providers.length) {
|
|
111
|
+
return providers[idx];
|
|
112
|
+
}
|
|
113
|
+
console.log('Invalid choice. Keeping current provider.');
|
|
114
|
+
return currentProvider;
|
|
115
|
+
}
|
|
116
|
+
async function selectModel(rl, provider, currentModel) {
|
|
117
|
+
console.log('\n=== Select Model ===\n');
|
|
118
|
+
const providerConfig = PROVIDERS[provider];
|
|
119
|
+
if (!providerConfig) {
|
|
120
|
+
return currentModel;
|
|
121
|
+
}
|
|
122
|
+
const modelList = providerConfig.models.map((m, idx) => {
|
|
123
|
+
const isRecommended = idx === 0 ? ' (recommended)' : '';
|
|
124
|
+
return ` ${idx + 1}) ${m}${isRecommended}`;
|
|
125
|
+
});
|
|
126
|
+
const customIdx = providerConfig.models.length + 1;
|
|
127
|
+
modelList.push(` ${customIdx}) Enter custom model...`);
|
|
128
|
+
console.log(modelList.join('\n'));
|
|
129
|
+
const answer = await question(rl, `\nEnter number [1-${customIdx}] (press Enter to keep '${currentModel}'): `);
|
|
130
|
+
if (!answer) {
|
|
131
|
+
return currentModel;
|
|
132
|
+
}
|
|
133
|
+
const idx = parseInt(answer, 10) - 1;
|
|
134
|
+
if (idx >= 0 && idx < providerConfig.models.length) {
|
|
135
|
+
return providerConfig.models[idx];
|
|
136
|
+
}
|
|
137
|
+
if (idx === providerConfig.models.length) {
|
|
138
|
+
// Custom model
|
|
139
|
+
const customModel = await question(rl, 'Enter custom model name: ');
|
|
140
|
+
if (customModel) {
|
|
141
|
+
return customModel;
|
|
142
|
+
}
|
|
143
|
+
return currentModel;
|
|
144
|
+
}
|
|
145
|
+
console.log('Invalid choice. Keeping current model.');
|
|
146
|
+
return currentModel;
|
|
147
|
+
}
|
|
148
|
+
async function runSettingsCLI(projectName) {
|
|
149
|
+
const configPath = paths_js_1.Paths.config(projectName);
|
|
150
|
+
// Verify project exists
|
|
151
|
+
if (!fs.existsSync(configPath)) {
|
|
152
|
+
console.error(`Error: Project '${projectName}' not found.`);
|
|
153
|
+
console.error(`Create it first with: /synaphex/init ${projectName}`);
|
|
154
|
+
process.exit(1);
|
|
155
|
+
}
|
|
156
|
+
// Read current config
|
|
157
|
+
let config;
|
|
158
|
+
let body;
|
|
159
|
+
try {
|
|
160
|
+
const content = fs.readFileSync(configPath, 'utf-8');
|
|
161
|
+
const parsed = parseConfigFile(content);
|
|
162
|
+
config = parsed.frontmatter;
|
|
163
|
+
body = parsed.body;
|
|
164
|
+
}
|
|
165
|
+
catch (err) {
|
|
166
|
+
console.error(`Error reading config: ${err instanceof Error ? err.message : String(err)}`);
|
|
167
|
+
process.exit(1);
|
|
168
|
+
}
|
|
169
|
+
// Open readline interface
|
|
170
|
+
const rl = readline.createInterface({
|
|
171
|
+
input: process.stdin,
|
|
172
|
+
output: process.stdout,
|
|
173
|
+
});
|
|
174
|
+
try {
|
|
175
|
+
console.log(`\n=== Synaphex Settings: ${projectName} ===\n`);
|
|
176
|
+
console.log(`Current settings:`);
|
|
177
|
+
console.log(` Provider: ${config.provider}`);
|
|
178
|
+
console.log(` Model : ${config.model}`);
|
|
179
|
+
// Provider selection
|
|
180
|
+
const newProvider = await selectProvider(rl, config.provider);
|
|
181
|
+
config.provider = newProvider;
|
|
182
|
+
// Model selection
|
|
183
|
+
const newModel = await selectModel(rl, newProvider, config.model);
|
|
184
|
+
config.model = newModel;
|
|
185
|
+
// Confirmation
|
|
186
|
+
console.log(`\n=== Updated Settings ===`);
|
|
187
|
+
console.log(` Provider: ${config.provider}`);
|
|
188
|
+
console.log(` Model : ${config.model}`);
|
|
189
|
+
const confirm = await question(rl, '\nSave changes? (y/n): ');
|
|
190
|
+
if (confirm.toLowerCase() === 'y' || confirm.toLowerCase() === 'yes') {
|
|
191
|
+
const updatedContent = buildConfigFile(config, body);
|
|
192
|
+
fs.writeFileSync(configPath, updatedContent, 'utf-8');
|
|
193
|
+
console.log(`\n✓ Settings saved to ${path.relative(process.cwd(), configPath)}`);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
console.log('\n✗ Changes discarded.');
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
finally {
|
|
200
|
+
rl.close();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/lib/settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoKA,wCA6DC;AAjOD,6CAA+B;AAC/B,2CAA6B;AAC7B,mDAAqC;AACrC,yCAAmC;AAQnC,MAAM,SAAS,GAAmC;IAChD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,+CAA+C;QAC5D,MAAM,EAAE,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,CAAC;KACrE;IACD,MAAM,EAA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,OAAO,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,yBAAyB,CAAC,CAAC;QAE9D,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,GAAG,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE,CAAC;YACrE,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACrD,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;YACtD,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;QACnF,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Configure LLM provider and model for a Synaphex project via interactive CLI"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Synaphex Settings
|
|
6
|
+
|
|
7
|
+
I'll open the interactive settings CLI for project: **$ARGUMENTS**
|
|
8
|
+
|
|
9
|
+
Run this command in your terminal:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
synaphex configure $ARGUMENTS
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This opens an interactive prompt where you can select:
|
|
16
|
+
- **Provider** — claude, openai, or gemini
|
|
17
|
+
- **Model** — preset choices or enter a custom model name
|
|
18
|
+
|
|
19
|
+
Your settings are saved to `~/.claude/projects/$ARGUMENTS/config.md`.
|
|
20
|
+
|
|
21
|
+
## Supported Providers
|
|
22
|
+
|
|
23
|
+
### Claude (Anthropic)
|
|
24
|
+
- **Claude Opus 4.5** — Most capable, recommended for complex tasks
|
|
25
|
+
- **Claude Sonnet 4.5** — Balanced speed and capability
|
|
26
|
+
- **Claude Haiku 4.5** — Fast and efficient for simple tasks
|
|
27
|
+
|
|
28
|
+
Requires: `ANTHROPIC_API_KEY` environment variable
|
|
29
|
+
|
|
30
|
+
### OpenAI
|
|
31
|
+
- **GPT-4o** — Latest OpenAI model
|
|
32
|
+
- **GPT-4 Turbo** — High-performance reasoning
|
|
33
|
+
- **GPT-4** — Stable, widely-used model
|
|
34
|
+
|
|
35
|
+
Requires: `OPENAI_API_KEY` environment variable
|
|
36
|
+
|
|
37
|
+
### Google Gemini
|
|
38
|
+
- **Gemini 1.5 Pro** — Best performance
|
|
39
|
+
- **Gemini 1.5 Flash** — Fast responses
|
|
40
|
+
- **Gemini Pro** — Balanced capability
|
|
41
|
+
|
|
42
|
+
Requires: `GEMINI_API_KEY` environment variable
|
|
43
|
+
|
|
44
|
+
## Custom Models
|
|
45
|
+
|
|
46
|
+
If the preset models don't include your preferred model, you can enter a custom model name. This is useful if:
|
|
47
|
+
- You have access to a fine-tuned version of a model
|
|
48
|
+
- A new model was released that isn't in the presets
|
|
49
|
+
- You want to use a local model via an API-compatible service
|
|
50
|
+
|
|
51
|
+
## After Configuration
|
|
52
|
+
|
|
53
|
+
Your project is now configured with your chosen provider and model. You can now run:
|
|
54
|
+
|
|
55
|
+
- **`/synaphex/query <task>`** — Full 5-stage pipeline
|
|
56
|
+
- **`/synaphex/fix <task>`** — Fast pipeline with optional research skip
|
|
57
|
+
|
|
58
|
+
## Updating Settings
|
|
59
|
+
|
|
60
|
+
Run this command anytime to reconfigure your provider or model:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
synaphex configure <project>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The interactive CLI preserves your current settings as defaults, so you only need to enter a new value if you want to change it.
|