@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.
- package/README.md +132 -0
- package/dist/commands/configure.d.ts +2 -0
- package/dist/commands/configure.d.ts.map +1 -0
- package/dist/commands/configure.js +15 -0
- package/dist/commands/configure.js.map +1 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +19 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list-outputs.d.ts +2 -0
- package/dist/commands/list-outputs.d.ts.map +1 -0
- package/dist/commands/list-outputs.js +28 -0
- package/dist/commands/list-outputs.js.map +1 -0
- package/dist/commands/load-config.d.ts +2 -0
- package/dist/commands/load-config.d.ts.map +1 -0
- package/dist/commands/load-config.js +132 -0
- package/dist/commands/load-config.js.map +1 -0
- package/dist/commands/load-memory.d.ts +2 -0
- package/dist/commands/load-memory.d.ts.map +1 -0
- package/dist/commands/load-memory.js +21 -0
- package/dist/commands/load-memory.js.map +1 -0
- package/dist/commands/save-output.d.ts +2 -0
- package/dist/commands/save-output.d.ts.map +1 -0
- package/dist/commands/save-output.js +38 -0
- package/dist/commands/save-output.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/auth.d.ts +10 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +54 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/memory.d.ts +3 -0
- package/dist/lib/memory.d.ts.map +1 -0
- package/dist/lib/memory.js +40 -0
- package/dist/lib/memory.js.map +1 -0
- package/dist/lib/output.d.ts +4 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +78 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/paths.d.ts +11 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/paths.js +21 -0
- package/dist/lib/paths.js.map +1 -0
- package/dist/lib/project.d.ts +2 -0
- package/dist/lib/project.d.ts.map +1 -0
- package/dist/lib/project.js +109 -0
- package/dist/lib/project.js.map +1 -0
- package/dist/lib/settings.d.ts +2 -0
- package/dist/lib/settings.d.ts.map +1 -0
- package/dist/lib/settings.js +531 -0
- package/dist/lib/settings.js.map +1 -0
- package/dist/types.d.ts +45 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +50 -0
- package/scripts/postinstall.js +43 -0
- package/skills/fix.md +210 -0
- package/skills/init.md +69 -0
- package/skills/query.md +217 -0
- package/skills/settings.md +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Synaphex — Multi-Agent AI Pipeline for Code
|
|
2
|
+
|
|
3
|
+
A **Claude Code skill** (plugin) that brings a 5-stage AI agent pipeline directly into your IDE:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Task
|
|
7
|
+
↓
|
|
8
|
+
[Examiner] → Context Analysis
|
|
9
|
+
↓
|
|
10
|
+
[Researcher] → Best Practices (optional in /fix mode)
|
|
11
|
+
↓
|
|
12
|
+
[Coder] → Production-Ready Implementation
|
|
13
|
+
↓
|
|
14
|
+
[Questioner] → Critical Review & Improvements
|
|
15
|
+
↓
|
|
16
|
+
[Reviewer] → Final Quality Gate
|
|
17
|
+
↓
|
|
18
|
+
Output (Markdown + JSON)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Works across **Claude.ai**, **VS Code**, **JetBrains**, and any IDE running Claude Code.
|
|
22
|
+
|
|
23
|
+
## Requirements
|
|
24
|
+
|
|
25
|
+
- **Node.js 18+** (or higher)
|
|
26
|
+
- Check: `node --version`
|
|
27
|
+
- If using nvm: `nvm use 18` (or 20, 22, etc.)
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g @ceyhunbilir/synaphex
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This installs three Claude Code skills:
|
|
36
|
+
- `/synaphex/init <project>` — Create a new project
|
|
37
|
+
- `/synaphex/query <task>` — Full 5-stage pipeline
|
|
38
|
+
- `/synaphex/fix <task>` — Quick fix (optional Researcher)
|
|
39
|
+
|
|
40
|
+
## Quick Start
|
|
41
|
+
|
|
42
|
+
### 1. Initialize a project
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
/synaphex/init my-project
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Creates `~/.claude/projects/my-project/` with config, memory, and outputs.
|
|
49
|
+
|
|
50
|
+
### 2. Run a full pipeline
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
/synaphex/query implement retry logic for HTTP requests
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 3. Run a quick fix
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
/synaphex/fix add null check to the API handler
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Asks if you want to skip the research phase.
|
|
63
|
+
|
|
64
|
+
## Project Structure
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
~/.claude/projects/<project>/
|
|
68
|
+
├── config.md ← LLM provider & model
|
|
69
|
+
├── memory/ ← project context (preserved)
|
|
70
|
+
└── outputs/ ← pipeline results
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Configuration
|
|
74
|
+
|
|
75
|
+
Edit `~/.claude/projects/<project>/config.md` to change LLM provider, or use:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
synaphex configure <project>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This opens an interactive CLI to configure:
|
|
82
|
+
- **LLM Provider** — Claude, OpenAI, or Gemini
|
|
83
|
+
- **Model** — Select from presets or enter custom
|
|
84
|
+
- **Agent Settings** — Customize each of the 5 agents (focus, depth, instructions)
|
|
85
|
+
|
|
86
|
+
## Troubleshooting
|
|
87
|
+
|
|
88
|
+
### "synaphex: command not found"
|
|
89
|
+
|
|
90
|
+
You may have Node 10 as your default. Check your Node version:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
node --version
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If it's below 18, upgrade:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Using nvm
|
|
100
|
+
nvm use 18 # or higher (18, 20, 22, etc.)
|
|
101
|
+
|
|
102
|
+
# Then reinstall
|
|
103
|
+
npm install -g @ceyhunbilir/synaphex
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### npm errors during install
|
|
107
|
+
|
|
108
|
+
If you get permission errors, use nvm to manage Node versions instead of system-wide npm:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Set Node 20 as default
|
|
112
|
+
nvm alias default 20
|
|
113
|
+
nvm use 20
|
|
114
|
+
|
|
115
|
+
# Then install
|
|
116
|
+
npm install -g @ceyhunbilir/synaphex
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Documentation
|
|
120
|
+
|
|
121
|
+
- **User Guide** — You're reading it! This covers installation and basic usage.
|
|
122
|
+
- **[Technical Docs](project/)** — For contributors and maintainers:
|
|
123
|
+
- [VERSIONING.md](project/VERSIONING.md) — Version strategy and commit conventions
|
|
124
|
+
- [WORKFLOW_GUIDE.md](project/WORKFLOW_GUIDE.md) — Detailed user workflows
|
|
125
|
+
- [IMPLEMENTATION_SUMMARY.md](project/IMPLEMENTATION_SUMMARY.md) — Architecture and design
|
|
126
|
+
- [DEVELOPMENT.md](project/DEVELOPMENT.md) — Development setup and testing
|
|
127
|
+
|
|
128
|
+
See [project/INDEX.md](project/INDEX.md) for a complete index.
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
MIT
|
|
@@ -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,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleConfigure = void 0;
|
|
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
|
+
exports.handleConfigure = handleConfigure;
|
|
15
|
+
//# sourceMappingURL=configure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../src/commands/configure.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AAE7C,KAAK,UAAU,eAAe,CAAC,WAAmB;IACvD,IAAI;QACF,MAAM,IAAA,4BAAc,EAAC,WAAW,CAAC,CAAC;KACnC;IAAC,OAAO,GAAG,EAAE;QACZ,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;KACjB;AACH,CAAC;AAPD,0CAOC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAEA,wBAAsB,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAY7D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.init = void 0;
|
|
4
|
+
const project_1 = require("../lib/project");
|
|
5
|
+
async function init(projectName) {
|
|
6
|
+
if (!projectName || !projectName.trim()) {
|
|
7
|
+
console.error('Error: project name is required');
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
await (0, project_1.initializeProject)(projectName.trim());
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
console.error('Error initializing project:', error instanceof Error ? error.message : error);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.init = init;
|
|
19
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;AAAA,4CAAmD;AAE5C,KAAK,UAAU,IAAI,CAAC,WAAmB;IAC5C,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE;QACvC,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,IAAI;QACF,MAAM,IAAA,2BAAiB,EAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;KAC7C;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC7F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC;AAZD,oBAYC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-outputs.d.ts","sourceRoot":"","sources":["../../src/commands/list-outputs.ts"],"names":[],"mappings":"AAEA,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB1E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleListOutputs = void 0;
|
|
4
|
+
const output_1 = require("../lib/output");
|
|
5
|
+
async function handleListOutputs(projectName) {
|
|
6
|
+
if (!projectName || !projectName.trim()) {
|
|
7
|
+
console.error('Error: project name is required');
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const outputs = await (0, output_1.listOutputs)(projectName.trim());
|
|
12
|
+
if (outputs.length === 0) {
|
|
13
|
+
console.log('No pipeline outputs found.');
|
|
14
|
+
process.exit(0);
|
|
15
|
+
}
|
|
16
|
+
console.log(`Pipeline outputs for project "${projectName}":\n`);
|
|
17
|
+
outputs.forEach((output) => {
|
|
18
|
+
console.log(` - ${output}`);
|
|
19
|
+
});
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
console.error('Error listing outputs:', error instanceof Error ? error.message : error);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.handleListOutputs = handleListOutputs;
|
|
28
|
+
//# sourceMappingURL=list-outputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-outputs.js","sourceRoot":"","sources":["../../src/commands/list-outputs.ts"],"names":[],"mappings":";;;AAAA,0CAA4C;AAErC,KAAK,UAAU,iBAAiB,CAAC,WAAmB;IACzD,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE;QACvC,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,IAAI;QACF,MAAM,OAAO,GAAG,MAAM,IAAA,oBAAW,EAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QAEtD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YACxB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;YAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;QAED,OAAO,CAAC,GAAG,CAAC,iCAAiC,WAAW,MAAM,CAAC,CAAC;QAChE,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACzB,OAAO,CAAC,GAAG,CAAC,OAAO,MAAM,EAAE,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC;AAxBD,8CAwBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-config.d.ts","sourceRoot":"","sources":["../../src/commands/load-config.ts"],"names":[],"mappings":"AA4FA,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyCzE"}
|
|
@@ -0,0 +1,132 @@
|
|
|
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.handleLoadConfig = void 0;
|
|
27
|
+
const fs = __importStar(require("fs-extra"));
|
|
28
|
+
const paths_js_1 = require("../lib/paths.js");
|
|
29
|
+
function parseConfigFile(content) {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
32
|
+
if (!match) {
|
|
33
|
+
throw new Error('Invalid config file format');
|
|
34
|
+
}
|
|
35
|
+
const frontmatterText = match[1];
|
|
36
|
+
const frontmatter = {
|
|
37
|
+
project: '',
|
|
38
|
+
created_at: new Date().toISOString(),
|
|
39
|
+
};
|
|
40
|
+
const lines = frontmatterText.split('\n');
|
|
41
|
+
let inAgents = false;
|
|
42
|
+
let currentAgent = null;
|
|
43
|
+
const agents = {};
|
|
44
|
+
for (const line of lines) {
|
|
45
|
+
if (line.startsWith('agents:')) {
|
|
46
|
+
inAgents = true;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (inAgents && line.match(/^ \w+:/)) {
|
|
50
|
+
currentAgent = (_b = (_a = line.match(/^\s*(\w+):/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : null;
|
|
51
|
+
if (currentAgent) {
|
|
52
|
+
agents[currentAgent] = {
|
|
53
|
+
provider: 'claude',
|
|
54
|
+
model: 'claude-opus-4-5',
|
|
55
|
+
auth_mode: 'api_key',
|
|
56
|
+
focus: '',
|
|
57
|
+
depth: 'standard',
|
|
58
|
+
custom_instructions: '',
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (inAgents && currentAgent && line.includes(':')) {
|
|
64
|
+
const [key, ...valueParts] = line.split(':');
|
|
65
|
+
const trimmedKey = key.trim();
|
|
66
|
+
const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
|
|
67
|
+
if (trimmedKey === 'focus' || trimmedKey === 'custom_instructions' || trimmedKey === 'provider' || trimmedKey === 'model' || trimmedKey === 'auth_mode') {
|
|
68
|
+
agents[currentAgent][trimmedKey] = value;
|
|
69
|
+
}
|
|
70
|
+
else if (trimmedKey === 'depth') {
|
|
71
|
+
agents[currentAgent][trimmedKey] = value;
|
|
72
|
+
}
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (!inAgents && line.includes(':')) {
|
|
76
|
+
const [key, ...valueParts] = line.split(':');
|
|
77
|
+
const trimmedKey = key.trim();
|
|
78
|
+
const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
|
|
79
|
+
if (trimmedKey === 'project')
|
|
80
|
+
frontmatter.project = value;
|
|
81
|
+
if (trimmedKey === 'created_at')
|
|
82
|
+
frontmatter.created_at = value;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (Object.keys(agents).length > 0) {
|
|
86
|
+
frontmatter.agents = {
|
|
87
|
+
examiner: agents.examiner || { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
|
|
88
|
+
researcher: agents.researcher || { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
|
|
89
|
+
coder: agents.coder || { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
|
|
90
|
+
questioner: agents.questioner || { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
|
|
91
|
+
reviewer: agents.reviewer || { provider: 'claude', model: 'claude-opus-4-5', auth_mode: 'api_key', focus: '', depth: 'standard', custom_instructions: '' },
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
return frontmatter;
|
|
95
|
+
}
|
|
96
|
+
async function handleLoadConfig(projectName) {
|
|
97
|
+
const configPath = paths_js_1.Paths.config(projectName);
|
|
98
|
+
if (!fs.existsSync(configPath)) {
|
|
99
|
+
console.error(`Error: Project '${projectName}' not found.`);
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
const content = fs.readFileSync(configPath, 'utf-8');
|
|
104
|
+
const config = parseConfigFile(content);
|
|
105
|
+
console.log(`=== Agent Customizations for ${projectName} ===\n`);
|
|
106
|
+
if (!config.agents || Object.keys(config.agents).length === 0) {
|
|
107
|
+
console.log('No agent customizations configured.\n');
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const agentNames = ['examiner', 'researcher', 'coder', 'questioner', 'reviewer'];
|
|
111
|
+
for (const agentName of agentNames) {
|
|
112
|
+
const agent = config.agents[agentName];
|
|
113
|
+
if (!agent)
|
|
114
|
+
continue;
|
|
115
|
+
const displayName = agentName.charAt(0).toUpperCase() + agentName.slice(1);
|
|
116
|
+
console.log(`${displayName}:`);
|
|
117
|
+
console.log(` Provider: ${agent.provider}`);
|
|
118
|
+
console.log(` Model: ${agent.model}`);
|
|
119
|
+
console.log(` Auth: ${agent.auth_mode}`);
|
|
120
|
+
console.log(` Focus: ${agent.focus || '(none)'}`);
|
|
121
|
+
console.log(` Depth: ${agent.depth}`);
|
|
122
|
+
console.log(` Custom instructions: ${agent.custom_instructions ? agent.custom_instructions : '(none)'}`);
|
|
123
|
+
console.log();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
console.error(`Error reading config: ${err instanceof Error ? err.message : String(err)}`);
|
|
128
|
+
process.exit(1);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.handleLoadConfig = handleLoadConfig;
|
|
132
|
+
//# sourceMappingURL=load-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-config.js","sourceRoot":"","sources":["../../src/commands/load-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,8CAAwC;AAcxC,SAAS,eAAe,CAAC,OAAe;;IACtC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;IACrD,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;KAC/C;IAED,MAAM,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,WAAW,GAAsB;QACrC,OAAO,EAAE,EAAE;QACX,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACrC,CAAC;IAEF,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,YAAY,GAAkB,IAAI,CAAC;IACvC,MAAM,MAAM,GAGR,EAAE,CAAC;IAEP,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC9B,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS;SACV;QAED,IAAI,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;YACrC,YAAY,GAAG,MAAA,MAAA,I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WAAW,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC3E,OAAO,CAAC,GAAG,CAAC,GAAG,WAAW,GAAG,CAAC,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;YACvC,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,CAAC,KAAK,IAAI,QAAQ,EAAE,CAAC,CAAC;YACnD,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;YACvC,OAAO,CAAC,GAAG,CACT,0BAA0B,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAC7F,CAAC;YACF,OAAO,CAAC,GAAG,EAAE,CAAC;SACf;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,CAAC,KAAK,CAAC,yBAAyB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC;AAzCD,4CAyCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-memory.d.ts","sourceRoot":"","sources":["../../src/commands/load-memory.ts"],"names":[],"mappings":"AAEA,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAczE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleLoadMemory = void 0;
|
|
4
|
+
const memory_1 = require("../lib/memory");
|
|
5
|
+
async function handleLoadMemory(projectName) {
|
|
6
|
+
if (!projectName || !projectName.trim()) {
|
|
7
|
+
console.error('Error: project name is required');
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const memory = await (0, memory_1.loadMemory)(projectName.trim());
|
|
12
|
+
process.stdout.write(memory);
|
|
13
|
+
process.exit(0);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
console.error('Error loading memory:', error instanceof Error ? error.message : error);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.handleLoadMemory = handleLoadMemory;
|
|
21
|
+
//# sourceMappingURL=load-memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-memory.js","sourceRoot":"","sources":["../../src/commands/load-memory.ts"],"names":[],"mappings":";;;AAAA,0CAA2C;AAEpC,KAAK,UAAU,gBAAgB,CAAC,WAAmB;IACxD,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE;QACvC,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAU,EAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QACpD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACvF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC;AAdD,4CAcC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-output.d.ts","sourceRoot":"","sources":["../../src/commands/save-output.ts"],"names":[],"mappings":"AAGA,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiCzE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleSaveOutput = void 0;
|
|
4
|
+
const output_1 = require("../lib/output");
|
|
5
|
+
async function handleSaveOutput(projectName) {
|
|
6
|
+
if (!projectName || !projectName.trim()) {
|
|
7
|
+
console.error('Error: project name is required');
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
// Read JSON from stdin
|
|
12
|
+
let jsonStr = '';
|
|
13
|
+
process.stdin.on('data', (chunk) => {
|
|
14
|
+
jsonStr += chunk.toString();
|
|
15
|
+
});
|
|
16
|
+
process.stdin.on('end', async () => {
|
|
17
|
+
try {
|
|
18
|
+
const output = JSON.parse(jsonStr);
|
|
19
|
+
await (0, output_1.saveOutput)(projectName.trim(), output);
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
console.error('Error parsing JSON:', error instanceof Error ? error.message : error);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
process.stdin.on('error', (error) => {
|
|
28
|
+
console.error('Error reading stdin:', error);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
console.error('Error:', error instanceof Error ? error.message : error);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.handleSaveOutput = handleSaveOutput;
|
|
38
|
+
//# sourceMapping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OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;KACJ;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC;AAjCD,4CAiCC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const init_1 = require("./commands/init");
|
|
6
|
+
const save_output_1 = require("./commands/save-output");
|
|
7
|
+
const load_memory_1 = require("./commands/load-memory");
|
|
8
|
+
const list_outputs_1 = require("./commands/list-outputs");
|
|
9
|
+
const configure_1 = require("./commands/configure");
|
|
10
|
+
const load_config_1 = require("./commands/load-config");
|
|
11
|
+
const program = new commander_1.Command();
|
|
12
|
+
program
|
|
13
|
+
.name('synaphex')
|
|
14
|
+
.description('Multi-agent AI pipeline for code analysis, generation, and improvement')
|
|
15
|
+
.version('1.0.0');
|
|
16
|
+
program
|
|
17
|
+
.command('init-project <name>')
|
|
18
|
+
.description('Initialize a new Synaphex project at ~/.claude/projects/<name>')
|
|
19
|
+
.action(init_1.init);
|
|
20
|
+
program
|
|
21
|
+
.command('save-output <project>')
|
|
22
|
+
.description('Save pipeline output (reads JSON from stdin)')
|
|
23
|
+
.action(save_output_1.handleSaveOutput);
|
|
24
|
+
program
|
|
25
|
+
.command('load-memory <project>')
|
|
26
|
+
.description('Load and output project memory files')
|
|
27
|
+
.action(load_memory_1.handleLoadMemory);
|
|
28
|
+
program
|
|
29
|
+
.command('list-outputs <project>')
|
|
30
|
+
.description('List all pipeline outputs for a project')
|
|
31
|
+
.action(list_outputs_1.handleListOutputs);
|
|
32
|
+
program
|
|
33
|
+
.command('configure <project>')
|
|
34
|
+
.description('Interactive CLI to configure provider and model settings')
|
|
35
|
+
.action(configure_1.handleConfigure);
|
|
36
|
+
program
|
|
37
|
+
.command('load-config <project>')
|
|
38
|
+
.description('Load and output project agent customizations')
|
|
39
|
+
.action(load_config_1.handleLoadConfig);
|
|
40
|
+
program.parse(process.argv);
|
|
41
|
+
if (!process.argv.slice(2).length) {
|
|
42
|
+
program.outputHelp();
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AACvD,wDAA0D;AAE1D,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;KACJ,OAAO,CAAC,uBAAuB,CAAC;KAChC,WAAW,CAAC,8CAA8C,CAAC;KAC3D,MAAM,CAAC,8BAAgB,CAAC,CAAC;AAE5B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE;IACjC,OAAO,CAAC,UAAU,EAAE,CAAC;CACtB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface AuthCheckResult {
|
|
2
|
+
installed: boolean;
|
|
3
|
+
authorized: boolean;
|
|
4
|
+
identity?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function isVSCodeExtension(): boolean;
|
|
8
|
+
export declare function checkCLIAuth(provider: string): AuthCheckResult;
|
|
9
|
+
export declare function getAuthInstruction(provider: string): string;
|
|
10
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/lib/auth.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CAoC9D;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI3D"}
|
package/dist/lib/auth.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAuthInstruction = exports.checkCLIAuth = exports.isVSCodeExtension = void 0;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
function isVSCodeExtension() {
|
|
6
|
+
return !!(process.env.VSCODE_PID || process.env.TERM_PROGRAM === 'vscode');
|
|
7
|
+
}
|
|
8
|
+
exports.isVSCodeExtension = isVSCodeExtension;
|
|
9
|
+
function checkCLIAuth(provider) {
|
|
10
|
+
if (provider === 'claude') {
|
|
11
|
+
try {
|
|
12
|
+
(0, child_process_1.execSync)('claude -p "synaphex-auth-check" 2>&1', { timeout: 10000, stdio: 'pipe' });
|
|
13
|
+
return { installed: true, authorized: true };
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
const msg = String(e);
|
|
17
|
+
if (msg.includes('ENOENT')) {
|
|
18
|
+
return { installed: false, authorized: false, error: 'claude CLI not found' };
|
|
19
|
+
}
|
|
20
|
+
return { installed: true, authorized: false, error: 'not authorized' };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (provider === 'claude_vscode') {
|
|
24
|
+
if (isVSCodeExtension()) {
|
|
25
|
+
return { installed: true, authorized: true, identity: 'Claude Code extension' };
|
|
26
|
+
}
|
|
27
|
+
return { installed: false, authorized: false, error: 'Not running in VSCode with Claude Code extension' };
|
|
28
|
+
}
|
|
29
|
+
if (provider === 'copilot') {
|
|
30
|
+
try {
|
|
31
|
+
const out = (0, child_process_1.execSync)('gh auth status 2>&1', { timeout: 5000, stdio: 'pipe' }).toString();
|
|
32
|
+
const match = out.match(/account (\S+)/);
|
|
33
|
+
return { installed: true, authorized: true, identity: match === null || match === void 0 ? void 0 : match[1] };
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
const msg = String(e);
|
|
37
|
+
if (msg.includes('ENOENT')) {
|
|
38
|
+
return { installed: false, authorized: false, error: 'gh CLI not found' };
|
|
39
|
+
}
|
|
40
|
+
return { installed: true, authorized: false, error: 'not authorized' };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return { installed: true, authorized: true };
|
|
44
|
+
}
|
|
45
|
+
exports.checkCLIAuth = checkCLIAuth;
|
|
46
|
+
function getAuthInstruction(provider) {
|
|
47
|
+
if (provider === 'claude')
|
|
48
|
+
return 'claude (login when prompted)';
|
|
49
|
+
if (provider === 'copilot')
|
|
50
|
+
return 'gh auth login';
|
|
51
|
+
return '';
|
|
52
|
+
}
|
|
53
|
+
exports.getAuthInstruction = getAuthInstruction;
|
|
54
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/lib/auth.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AASzC,SAAgB,iBAAiB;IAC/B,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC;AAC7E,CAAC;AAFD,8CAEC;AAED,SAAgB,YAAY,CAAC,QAAgB;IAC3C,IAAI,QAAQ,KAAK,QAAQ,EAAE;QACzB,IAAI;YACF,IAAA,wBAAQ,EAAC,sCAAsC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;YACpF,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;SAC9C;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACtB,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;gBAC1B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,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