sp-rag 0.4.0 → 0.5.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 +25 -19
- package/dist/cli.js +17 -7
- package/dist/lib/skill.js +119 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# `sp-rag`
|
|
2
2
|
|
|
3
|
-
CLI
|
|
3
|
+
CLI để setup nhanh SP-RAG theo hướng dev-friendly:
|
|
4
4
|
|
|
5
5
|
- lưu cấu hình mặc định để dev không phải nhớ lại URL, client, alias
|
|
6
6
|
- cài MCP config đúng format cho từng client
|
|
7
|
-
- cài skill
|
|
7
|
+
- cài native skill / rule / custom agent cho từng IDE khi có convention ổn định
|
|
8
8
|
- kiểm tra nhanh health và observability của stack
|
|
9
9
|
- gọi sync codegraph/GitNexus theo branch hoặc `commit_sha`
|
|
10
10
|
- đọc docs đã render
|
|
@@ -17,7 +17,7 @@ CLI cho setup nhanh SP-RAG theo hướng dev-friendly:
|
|
|
17
17
|
## Trạng thái package
|
|
18
18
|
|
|
19
19
|
- package npm public: `sp-rag`
|
|
20
|
-
- version đang publish: `0.
|
|
20
|
+
- version đang publish: `0.5.0`
|
|
21
21
|
- binary public: `sp-rag`
|
|
22
22
|
|
|
23
23
|
## Cài từ source trong monorepo
|
|
@@ -34,11 +34,13 @@ node dist/index.js doctor
|
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
npx sp-rag@latest install --client codex --mcp-token <token truy cập MCP> --doctor
|
|
37
|
+
npx sp-rag@latest install --client cursor --scope project --cwd D:/Webs/seo-booster --mcp-token <token truy cập MCP>
|
|
38
|
+
npx sp-rag@latest install --client vscode --scope project --cwd D:/Webs/seo-booster --mcp-token <token truy cập MCP>
|
|
37
39
|
npx sp-rag@latest token add --token <token truy cập MCP> --client codex
|
|
38
|
-
npx sp-rag@latest mcp add
|
|
40
|
+
npx sp-rag@latest mcp add antigravity --mcp-token <token truy cập MCP>
|
|
39
41
|
npx sp-rag@latest mcp add opencode --scope project --cwd D:/Webs/seo-booster --mcp-token <token truy cập MCP>
|
|
40
|
-
npx sp-rag@latest skill install --skill-client
|
|
41
|
-
npx sp-rag@latest skill install --skill-client
|
|
42
|
+
npx sp-rag@latest skill install --skill-client cursor --scope project --cwd D:/Webs/seo-booster
|
|
43
|
+
npx sp-rag@latest skill install --skill-client vscode --scope project --cwd D:/Webs/seo-booster
|
|
42
44
|
```
|
|
43
45
|
|
|
44
46
|
Tương đương bằng `npm`:
|
|
@@ -59,15 +61,18 @@ npm exec --yes sp-rag@latest token add -- --token <token truy cập MCP> --clien
|
|
|
59
61
|
|
|
60
62
|
## Skill client được hỗ trợ
|
|
61
63
|
|
|
62
|
-
- `codex`
|
|
63
|
-
- `claude-code`
|
|
64
|
-
- `antigravity`
|
|
65
|
-
- `opencode`
|
|
64
|
+
- `codex` -> `SKILL.md`
|
|
65
|
+
- `claude-code` -> `SKILL.md`
|
|
66
|
+
- `antigravity` -> `SKILL.md`
|
|
67
|
+
- `opencode` -> `SKILL.md`
|
|
68
|
+
- `cursor` -> `.cursor/rules/sp-rag.mdc`
|
|
69
|
+
- `vscode` -> `.github/agents/sp-rag.agent.md` hoặc `~/.copilot/agents/sp-rag.agent.md`
|
|
66
70
|
|
|
67
71
|
Ghi chú:
|
|
68
72
|
|
|
69
|
-
- `cursor` và `vscode` chỉ cài MCP config, không auto-cài skill mặc định
|
|
70
73
|
- generated skill luôn được render bằng tiếng Anh
|
|
74
|
+
- `cursor` hiện nên dùng `scope project` cho rule `.mdc`
|
|
75
|
+
- `vscode` hỗ trợ cả `scope project` lẫn `scope global`
|
|
71
76
|
- nếu không muốn lưu token literal vào file config client, dùng `sp-rag mcp add --auth-env-var SP_RAG_MCP_TOKEN`
|
|
72
77
|
|
|
73
78
|
## Path mặc định quan trọng
|
|
@@ -84,14 +89,17 @@ Ghi chú:
|
|
|
84
89
|
- `opencode` project: `opencode.json`
|
|
85
90
|
- `opencode` global: `~/.config/opencode/opencode.json`
|
|
86
91
|
|
|
87
|
-
### Skill
|
|
92
|
+
### Skill / rule / custom agent
|
|
88
93
|
|
|
89
94
|
- `codex`: `~/.codex/skills/sp-rag/SKILL.md`
|
|
90
95
|
- `claude-code`: `~/.claude/skills/sp-rag/SKILL.md`
|
|
91
96
|
- `antigravity`: `~/.gemini/antigravity/skills/sp-rag/SKILL.md`
|
|
92
97
|
- `opencode`: `~/.config/opencode/skills/sp-rag/SKILL.md`
|
|
98
|
+
- `cursor` project: `.cursor/rules/sp-rag.mdc`
|
|
99
|
+
- `vscode` project: `.github/agents/sp-rag.agent.md`
|
|
100
|
+
- `vscode` global: `~/.copilot/agents/sp-rag.agent.md`
|
|
93
101
|
|
|
94
|
-
## Luồng
|
|
102
|
+
## Luồng khuyên dùng cho dev mới
|
|
95
103
|
|
|
96
104
|
```bash
|
|
97
105
|
sp-rag install --client codex --mcp-token <token truy cập MCP> --doctor
|
|
@@ -106,9 +114,8 @@ sp-rag mcp add antigravity --mcp-token <token truy cập MCP>
|
|
|
106
114
|
sp-rag mcp add vscode --scope project --cwd D:/Webs/seo-booster --mcp-token <token truy cập MCP>
|
|
107
115
|
sp-rag mcp add opencode --scope project --cwd D:/Webs/seo-booster --mcp-token <token truy cập MCP>
|
|
108
116
|
sp-rag skill install
|
|
109
|
-
sp-rag skill install --skill-client
|
|
110
|
-
sp-rag skill install --skill-client
|
|
111
|
-
sp-rag skill install --skill-client opencode
|
|
117
|
+
sp-rag skill install --skill-client cursor --scope project --cwd D:/Webs/seo-booster
|
|
118
|
+
sp-rag skill install --skill-client vscode --scope project --cwd D:/Webs/seo-booster
|
|
112
119
|
sp-rag eval run --file ./examples/eval-suite.sample.json
|
|
113
120
|
```
|
|
114
121
|
|
|
@@ -131,9 +138,8 @@ sp-rag mcp add antigravity --mcp-token <token truy cập MCP>
|
|
|
131
138
|
sp-rag mcp add vscode --scope project --cwd D:/Webs/seo-booster --mcp-token <token truy cập MCP>
|
|
132
139
|
sp-rag mcp add opencode --scope project --cwd D:/Webs/seo-booster --mcp-token <token truy cập MCP>
|
|
133
140
|
sp-rag skill install
|
|
134
|
-
sp-rag skill install --skill-client
|
|
135
|
-
sp-rag skill install --skill-client
|
|
136
|
-
sp-rag skill install --skill-client opencode
|
|
141
|
+
sp-rag skill install --skill-client cursor --scope project --cwd D:/Webs/seo-booster
|
|
142
|
+
sp-rag skill install --skill-client vscode --scope project --cwd D:/Webs/seo-booster
|
|
137
143
|
sp-rag eval run --file ./examples/eval-suite.sample.json
|
|
138
144
|
sp-rag update setup --client codex
|
|
139
145
|
```
|
package/dist/cli.js
CHANGED
|
@@ -56,19 +56,28 @@ function supportedSkillClient(value) {
|
|
|
56
56
|
if (!value) {
|
|
57
57
|
return undefined;
|
|
58
58
|
}
|
|
59
|
-
if (value === 'codex' ||
|
|
59
|
+
if (value === 'codex' ||
|
|
60
|
+
value === 'cursor' ||
|
|
61
|
+
value === 'claude-code' ||
|
|
62
|
+
value === 'antigravity' ||
|
|
63
|
+
value === 'vscode' ||
|
|
64
|
+
value === 'opencode') {
|
|
60
65
|
return value;
|
|
61
66
|
}
|
|
62
|
-
throw new Error('Skill client phải là codex, claude-code, antigravity hoặc opencode.');
|
|
67
|
+
throw new Error('Skill client phải là codex, cursor, claude-code, antigravity, vscode hoặc opencode.');
|
|
63
68
|
}
|
|
64
69
|
function defaultSkillClientForMcpClient(client) {
|
|
65
70
|
switch (client) {
|
|
66
71
|
case 'codex':
|
|
67
72
|
return 'codex';
|
|
73
|
+
case 'cursor':
|
|
74
|
+
return 'cursor';
|
|
68
75
|
case 'claude-code':
|
|
69
76
|
return 'claude-code';
|
|
70
77
|
case 'antigravity':
|
|
71
78
|
return 'antigravity';
|
|
79
|
+
case 'vscode':
|
|
80
|
+
return 'vscode';
|
|
72
81
|
case 'opencode':
|
|
73
82
|
return 'opencode';
|
|
74
83
|
default:
|
|
@@ -128,8 +137,8 @@ function helpText() {
|
|
|
128
137
|
return `sp-rag - CLI cho setup, MCP, codegraph, eval và skill của SP-RAG
|
|
129
138
|
|
|
130
139
|
Lệnh chính:
|
|
131
|
-
sp-rag install [--base-url URL] [--mcp-url URL] [--client codex|cursor|claude-code|antigravity|vscode|opencode] [--skill-client codex|claude-code|antigravity|opencode] [--scope global|project] [--mcp-token TOKEN] [--auth-env-var ENV_VAR] [--target-dir PATH]
|
|
132
|
-
sp-rag init [--base-url URL] [--mcp-url URL] [--client codex|cursor|claude-code|antigravity|vscode|opencode] [--skill-client codex|claude-code|antigravity|opencode] [--scope global|project] [--auth-env-var ENV_VAR] [--target-dir PATH]
|
|
140
|
+
sp-rag install [--base-url URL] [--mcp-url URL] [--client codex|cursor|claude-code|antigravity|vscode|opencode] [--skill-client codex|cursor|claude-code|antigravity|vscode|opencode] [--scope global|project] [--mcp-token TOKEN] [--auth-env-var ENV_VAR] [--target-dir PATH]
|
|
141
|
+
sp-rag init [--base-url URL] [--mcp-url URL] [--client codex|cursor|claude-code|antigravity|vscode|opencode] [--skill-client codex|cursor|claude-code|antigravity|vscode|opencode] [--scope global|project] [--auth-env-var ENV_VAR] [--target-dir PATH]
|
|
133
142
|
sp-rag token add --token TOKEN [--client codex|cursor|claude-code|antigravity|vscode|opencode] [--scope global|project] [--cwd PATH]
|
|
134
143
|
sp-rag config show
|
|
135
144
|
sp-rag doctor [--base-url URL]
|
|
@@ -141,9 +150,9 @@ Lệnh chính:
|
|
|
141
150
|
sp-rag codegraph sync [--base-url URL] [--branch BRANCH] [--commit-sha SHA] [--force] [--webhook-token TOKEN] [--gitlab-job-token TOKEN]
|
|
142
151
|
sp-rag docs get <public|function|dev> [--base-url URL] [--format md|json|html]
|
|
143
152
|
sp-rag mcp add <codex|cursor|claude-code|antigravity|vscode|opencode> [--url URL] [--scope global|project] [--auth-env-var ENV_VAR] [--mcp-token TOKEN]
|
|
144
|
-
sp-rag skill install [--skill-client codex|claude-code|antigravity|opencode] [--cwd PATH] [--target-dir PATH] [--mcp-url URL] [--docs-url URL]
|
|
153
|
+
sp-rag skill install [--skill-client codex|cursor|claude-code|antigravity|vscode|opencode] [--scope global|project] [--cwd PATH] [--target-dir PATH] [--mcp-url URL] [--docs-url URL]
|
|
145
154
|
sp-rag eval run --file eval-suite.json [--base-url URL]
|
|
146
|
-
sp-rag update setup [--client codex|cursor|claude-code|antigravity|vscode|opencode] [--skill-client codex|claude-code|antigravity|opencode] [--scope global|project] [--url URL] [--auth-env-var ENV_VAR] [--target-dir PATH]
|
|
155
|
+
sp-rag update setup [--client codex|cursor|claude-code|antigravity|vscode|opencode] [--skill-client codex|cursor|claude-code|antigravity|vscode|opencode] [--scope global|project] [--url URL] [--auth-env-var ENV_VAR] [--target-dir PATH]
|
|
147
156
|
`;
|
|
148
157
|
}
|
|
149
158
|
function buildCliConfig(defaults) {
|
|
@@ -308,6 +317,7 @@ async function runSkillInstall(parsed, defaults) {
|
|
|
308
317
|
const result = await installSkill({
|
|
309
318
|
client,
|
|
310
319
|
cwd: optionString(parsed, 'cwd'),
|
|
320
|
+
scope: supportedScope(optionString(parsed, 'scope')) ?? defaults.defaultScope,
|
|
311
321
|
targetDir: optionString(parsed, 'target-dir') ?? defaults.skillTargetDir,
|
|
312
322
|
serverAlias: optionString(parsed, 'server-alias') ?? defaults.serverAlias,
|
|
313
323
|
mcpUrl: optionString(parsed, 'mcp-url') ?? defaults.mcpUrl,
|
|
@@ -481,7 +491,7 @@ export async function runCli(argv) {
|
|
|
481
491
|
return 0;
|
|
482
492
|
}
|
|
483
493
|
if (group === 'version') {
|
|
484
|
-
process.stdout.write('sp-rag 0.
|
|
494
|
+
process.stdout.write('sp-rag 0.5.0\n');
|
|
485
495
|
return 0;
|
|
486
496
|
}
|
|
487
497
|
process.stdout.write(helpText());
|
package/dist/lib/skill.js
CHANGED
|
@@ -1,31 +1,64 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
4
|
-
|
|
4
|
+
function clientLabel(client) {
|
|
5
5
|
switch (client) {
|
|
6
6
|
case 'codex':
|
|
7
|
-
return
|
|
7
|
+
return 'Codex';
|
|
8
8
|
case 'claude-code':
|
|
9
|
-
return
|
|
9
|
+
return 'Claude Code';
|
|
10
10
|
case 'antigravity':
|
|
11
|
-
return
|
|
11
|
+
return 'Antigravity';
|
|
12
12
|
case 'opencode':
|
|
13
|
-
return
|
|
13
|
+
return 'OpenCode';
|
|
14
|
+
case 'cursor':
|
|
15
|
+
return 'Cursor';
|
|
16
|
+
case 'vscode':
|
|
17
|
+
return 'VS Code';
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
|
-
function
|
|
20
|
+
function normalizeScope(client, scope) {
|
|
21
|
+
if (scope) {
|
|
22
|
+
return scope;
|
|
23
|
+
}
|
|
24
|
+
switch (client) {
|
|
25
|
+
case 'cursor':
|
|
26
|
+
return 'project';
|
|
27
|
+
case 'vscode':
|
|
28
|
+
return 'project';
|
|
29
|
+
default:
|
|
30
|
+
return 'global';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function requireProjectCwd(client, cwd) {
|
|
34
|
+
if (!cwd?.trim()) {
|
|
35
|
+
throw new Error(`${client} cần --cwd hoặc --target-dir để cài skill theo project.`);
|
|
36
|
+
}
|
|
37
|
+
return path.resolve(cwd);
|
|
38
|
+
}
|
|
39
|
+
export function defaultSkillDir(client = 'codex', cwd, scope) {
|
|
40
|
+
const normalizedScope = normalizeScope(client, scope);
|
|
17
41
|
switch (client) {
|
|
18
42
|
case 'codex':
|
|
19
|
-
return '
|
|
43
|
+
return path.join(os.homedir(), '.codex', 'skills', 'sp-rag');
|
|
20
44
|
case 'claude-code':
|
|
21
|
-
return '
|
|
45
|
+
return path.join(os.homedir(), '.claude', 'skills', 'sp-rag');
|
|
22
46
|
case 'antigravity':
|
|
23
|
-
return '
|
|
47
|
+
return path.join(os.homedir(), '.gemini', 'antigravity', 'skills', 'sp-rag');
|
|
24
48
|
case 'opencode':
|
|
25
|
-
return '
|
|
49
|
+
return path.join(os.homedir(), '.config', 'opencode', 'skills', 'sp-rag');
|
|
50
|
+
case 'cursor':
|
|
51
|
+
if (normalizedScope !== 'project') {
|
|
52
|
+
throw new Error('Cursor rule hiện chỉ nên cài ở scope project qua .cursor/rules.');
|
|
53
|
+
}
|
|
54
|
+
return path.join(requireProjectCwd(client, cwd), '.cursor', 'rules');
|
|
55
|
+
case 'vscode':
|
|
56
|
+
return normalizedScope === 'project'
|
|
57
|
+
? path.join(requireProjectCwd(client, cwd), '.github', 'agents')
|
|
58
|
+
: path.join(os.homedir(), '.copilot', 'agents');
|
|
26
59
|
}
|
|
27
60
|
}
|
|
28
|
-
|
|
61
|
+
function renderSkillMarkdown(context) {
|
|
29
62
|
return `---
|
|
30
63
|
name: sp-rag
|
|
31
64
|
description: Use SP-RAG whenever the user asks about this codebase, internal business domain, rendered docs, import inventory, or codegraph sync status. Prefer MCP-backed evidence before answering from memory.
|
|
@@ -33,10 +66,10 @@ description: Use SP-RAG whenever the user asks about this codebase, internal bus
|
|
|
33
66
|
|
|
34
67
|
# SP-RAG
|
|
35
68
|
|
|
36
|
-
Target client: ${clientLabel(
|
|
37
|
-
Default MCP server alias: \`${
|
|
38
|
-
MCP URL: \`${
|
|
39
|
-
Docs URL: \`${
|
|
69
|
+
Target client: ${clientLabel(context.client)}
|
|
70
|
+
Default MCP server alias: \`${context.serverAlias}\`
|
|
71
|
+
MCP URL: \`${context.mcpUrl}\`
|
|
72
|
+
Docs URL: \`${context.docsUrl}\`
|
|
40
73
|
|
|
41
74
|
## When To Use This Skill
|
|
42
75
|
|
|
@@ -60,6 +93,72 @@ Docs URL: \`${options.docsUrl}\`
|
|
|
60
93
|
- When rendered docs already answer the question, cite or summarize those docs instead of rewriting everything from scratch.
|
|
61
94
|
`;
|
|
62
95
|
}
|
|
96
|
+
function renderCursorRule(context) {
|
|
97
|
+
return `---
|
|
98
|
+
description: Use SP-RAG when the request is about this codebase, internal business workflows, rendered docs, import inventory, or codegraph sync status.
|
|
99
|
+
globs:
|
|
100
|
+
alwaysApply: false
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
# SP-RAG
|
|
104
|
+
|
|
105
|
+
- Prefer the \`${context.serverAlias}\` MCP server at \`${context.mcpUrl}\` before answering from memory.
|
|
106
|
+
- Use rendered docs from \`${context.docsUrl}\` when documentation already answers the question.
|
|
107
|
+
- For architecture, domain, entities, relations, and business workflow questions, query MCP first and only then synthesize the answer.
|
|
108
|
+
- For freshness or operational questions, check sync status, recent runs, and metrics before assuming the graph is current.
|
|
109
|
+
- Only trigger codegraph sync when the user explicitly asks for it or stale evidence is the confirmed blocker.
|
|
110
|
+
- If the evidence may be stale, say so clearly.
|
|
111
|
+
`;
|
|
112
|
+
}
|
|
113
|
+
function renderVsCodeAgent(context) {
|
|
114
|
+
return `---
|
|
115
|
+
name: SP-RAG
|
|
116
|
+
description: Use this custom agent whenever the request is about this codebase, internal business workflows, rendered docs, import inventory, or codegraph sync status.
|
|
117
|
+
tools: ['${context.serverAlias}/*']
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
You are the SP-RAG custom agent for this workspace.
|
|
121
|
+
|
|
122
|
+
Use the \`${context.serverAlias}\` MCP server at \`${context.mcpUrl}\` and the rendered docs URL \`${context.docsUrl}\` as your grounded source of truth.
|
|
123
|
+
|
|
124
|
+
## Recommended Workflow
|
|
125
|
+
|
|
126
|
+
1. Start with \`healthz\` if connectivity or freshness is uncertain.
|
|
127
|
+
2. Use \`query_context\` for architecture, domain, entities, relations, and workflow questions.
|
|
128
|
+
3. Use \`get_rendered_docs\` when public, function, or dev docs may already answer the question.
|
|
129
|
+
4. Use \`get_sync_status\`, \`get_sync_runs\`, or \`get_sync_metrics\` for freshness, incident review, or operational debugging.
|
|
130
|
+
5. Trigger codegraph sync only when the user explicitly requests a refresh or stale evidence is the confirmed blocker.
|
|
131
|
+
|
|
132
|
+
## Guardrails
|
|
133
|
+
|
|
134
|
+
- Prefer MCP-grounded evidence before answering from memory.
|
|
135
|
+
- When evidence may be stale, say so clearly and mention that a refresh might be needed.
|
|
136
|
+
- Do not trigger sync or import actions unless the workflow truly requires it.
|
|
137
|
+
- When rendered docs already answer the question, summarize those docs instead of rewriting everything from scratch.
|
|
138
|
+
`;
|
|
139
|
+
}
|
|
140
|
+
function renderSkillArtifact(context) {
|
|
141
|
+
switch (context.client) {
|
|
142
|
+
case 'cursor':
|
|
143
|
+
return {
|
|
144
|
+
fileName: 'sp-rag.mdc',
|
|
145
|
+
content: renderCursorRule(context),
|
|
146
|
+
};
|
|
147
|
+
case 'vscode':
|
|
148
|
+
return {
|
|
149
|
+
fileName: 'sp-rag.agent.md',
|
|
150
|
+
content: renderVsCodeAgent(context),
|
|
151
|
+
};
|
|
152
|
+
default:
|
|
153
|
+
return {
|
|
154
|
+
fileName: 'SKILL.md',
|
|
155
|
+
content: renderSkillMarkdown(context),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
export function renderSkill(options) {
|
|
160
|
+
return renderSkillArtifact(options).content;
|
|
161
|
+
}
|
|
63
162
|
export function renderCodexSkill(options) {
|
|
64
163
|
return renderSkill({
|
|
65
164
|
client: 'codex',
|
|
@@ -68,16 +167,17 @@ export function renderCodexSkill(options) {
|
|
|
68
167
|
}
|
|
69
168
|
export async function installSkill(options = {}) {
|
|
70
169
|
const client = options.client ?? 'codex';
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
const
|
|
170
|
+
const scope = normalizeScope(client, options.scope);
|
|
171
|
+
const targetDir = path.resolve(options.targetDir ?? defaultSkillDir(client, options.cwd, scope));
|
|
172
|
+
const artifact = renderSkillArtifact({
|
|
74
173
|
client,
|
|
75
174
|
serverAlias: options.serverAlias?.trim() || 'sp-rag',
|
|
76
175
|
mcpUrl: options.mcpUrl?.trim() || 'https://sp-rag.secomapp.com/mcp',
|
|
77
176
|
docsUrl: options.docsUrl?.trim() || 'https://sp-rag.secomapp.com/codegraph/docs/public?format=md',
|
|
78
177
|
});
|
|
178
|
+
const filePath = path.join(targetDir, artifact.fileName);
|
|
79
179
|
await mkdir(targetDir, { recursive: true });
|
|
80
|
-
await writeFile(filePath, content, 'utf8');
|
|
180
|
+
await writeFile(filePath, artifact.content, 'utf8');
|
|
81
181
|
return {
|
|
82
182
|
client,
|
|
83
183
|
path: filePath,
|