archgraph-argo 0.8.0 → 0.8.1
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.
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "公众号发布:将 ArchGraph 项目的文章(洞察报告、官宣介绍、开发者社区等)撰写为符合微信公众号格式的 Markdown,并通过 wechat-public-cli 创建草稿、跟进公众号后台手动发布流程。Use when: 发布公众号文章、创建公众号草稿、微信公众平台、wechat、公众号发布员、撰写 .wechat.md 文章。"
|
|
3
|
+
name: "公众号发布员"
|
|
4
|
+
model: "Qwen3.7-Plus"
|
|
5
|
+
tools: [read, edit, search, execute]
|
|
6
|
+
user-invocable: true
|
|
7
|
+
argument-hint: "要发布的文章主题或源文档路径"
|
|
8
|
+
---
|
|
9
|
+
你是 ArchGraph 项目的「公众号发布员」,专职把项目文章发布到微信公众号。
|
|
10
|
+
|
|
11
|
+
## 职责
|
|
12
|
+
1. 阅读源内容(洞察报告、官宣介绍、开发者社区等文档),提炼并撰写为符合微信公众号格式的 Markdown 文章。
|
|
13
|
+
2. 通过本地 wechat-public-cli 创建公众号草稿。
|
|
14
|
+
3. 返回草稿 media_id,并说明公众号后台手动发布的跟进步骤。
|
|
15
|
+
|
|
16
|
+
## 约束
|
|
17
|
+
- 只用 `wechat:draft` 创建草稿。**禁止**运行 `wechat:publish` / `wechat:sendall` / `freepublish`:本公众号是个人未认证订阅号(appid wxdf79e7cb44995aa3),这些 API 永远返回 48001 api unauthorized,只能登录公众号后台「草稿箱」手动发布。
|
|
18
|
+
- 文章内容必须基于仓库内已有文档,不得凭空编造。
|
|
19
|
+
- 不得打印或泄露 `wechat-public.config.json` 中的 appid/secret 等凭据。
|
|
20
|
+
- 发布前需确认当前公网 IP 已加入公众号后台 IP 白名单(否则 token 刷新报 40164)。
|
|
21
|
+
|
|
22
|
+
## 工作方法
|
|
23
|
+
1. 定位源文档,并参考 `docs/*.wechat.md` 既有文章的格式与文风。
|
|
24
|
+
2. 撰写 `docs/<主题>.wechat.md`,YAML frontmatter 至少含 `title` / `author` / `digest`,并按需含 `banner_path`(相对文章目录)、`open_comment`、`source_url`。
|
|
25
|
+
3. 若 `tests/wechat-article.test.js` 尚无对应验收用例,先补一条 GIVEN-WHEN-THEN 用例,再运行 `node --test tests/wechat-article.test.js` 通过。
|
|
26
|
+
4. 创建草稿(banner_path 相对文章文件目录解析):
|
|
27
|
+
```powershell
|
|
28
|
+
node "d:\Projects\_tools\wechat-cli-src\obsidian-wechat-public-platform-master\dist\wechat-public-cli.js" wechat:draft --file "<文章绝对路径>" --config "d:\Projects\archgraph\wechat-public.config.json" --css "d:\Projects\_tools\wechat-cli-src\obsidian-wechat-public-platform-master\custom.css"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 输出格式
|
|
32
|
+
返回:文章路径、草稿 media_id(或确切失败原因)、状态(草稿已创建 / BLOCKED)。并提醒:API 发布不可用,需在公众号后台「草稿箱」手动发布。
|
package/install-argo.ps1
CHANGED
|
@@ -8,6 +8,9 @@ param(
|
|
|
8
8
|
[string]$OpenCodeSkillsRoot = "$env:USERPROFILE\.config\opencode\skills",
|
|
9
9
|
[string]$OpenCodeAgentsPath = "$env:USERPROFILE\.config\opencode\AGENTS.md",
|
|
10
10
|
[string]$OpenCodeConfigPath = "$env:USERPROFILE\.config\opencode\opencode.json",
|
|
11
|
+
[string]$CopilotAgentsRoot = "$env:USERPROFILE\.copilot\agents",
|
|
12
|
+
[string]$CursorAgentsRoot = "$env:USERPROFILE\.cursor\agents",
|
|
13
|
+
[string]$OpenCodeAgentsRoot = "$env:USERPROFILE\.config\opencode\agents",
|
|
11
14
|
[switch]$SkipEnv,
|
|
12
15
|
[switch]$SkipDeps,
|
|
13
16
|
[switch]$SkipMcp,
|
|
@@ -24,6 +27,24 @@ function Copy-Tree {
|
|
|
24
27
|
Copy-Item -Recurse -Force -Path (Join-Path $Source '*') -Destination $Destination
|
|
25
28
|
}
|
|
26
29
|
|
|
30
|
+
function Copy-Agents {
|
|
31
|
+
param(
|
|
32
|
+
[string]$Source,
|
|
33
|
+
[string]$Destination,
|
|
34
|
+
[switch]$AsMd
|
|
35
|
+
)
|
|
36
|
+
New-Item -ItemType Directory -Force -Path $Destination | Out-Null
|
|
37
|
+
$files = @(Get-ChildItem -Path (Join-Path $Source '*.agent.md') -ErrorAction SilentlyContinue)
|
|
38
|
+
foreach ($file in $files) {
|
|
39
|
+
if ($AsMd) {
|
|
40
|
+
$targetName = ($file.BaseName -replace '\.agent$', '') + '.md'
|
|
41
|
+
} else {
|
|
42
|
+
$targetName = $file.Name
|
|
43
|
+
}
|
|
44
|
+
Copy-Item -Force -Path $file.FullName -Destination (Join-Path $Destination $targetName)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
27
48
|
function Write-McpConfig {
|
|
28
49
|
param(
|
|
29
50
|
[string]$Path,
|
|
@@ -107,46 +128,56 @@ Write-Host '==> Deploying Argo toolchain'
|
|
|
107
128
|
|
|
108
129
|
$schemaSrc = Join-Path $argoDir 'schema'
|
|
109
130
|
$schemaDest = Join-Path $ArgoRoot 'schema'
|
|
110
|
-
Write-Host "[1/
|
|
131
|
+
Write-Host "[1/12] argo\schema -> $schemaDest"
|
|
111
132
|
Copy-Tree -Source $schemaSrc -Destination $schemaDest
|
|
112
133
|
|
|
113
134
|
$scriptsSrc = Join-Path $argoDir 'scripts'
|
|
114
135
|
$scriptsDest = Join-Path $ArgoRoot 'scripts'
|
|
115
|
-
Write-Host "[2/
|
|
136
|
+
Write-Host "[2/12] argo\scripts -> $scriptsDest"
|
|
116
137
|
Copy-Tree -Source $scriptsSrc -Destination $scriptsDest
|
|
117
138
|
|
|
118
139
|
$defaultsSrc = Join-Path $argoDir 'defaults'
|
|
119
140
|
$defaultsDest = Join-Path $ArgoRoot 'defaults'
|
|
120
|
-
Write-Host "[3/
|
|
141
|
+
Write-Host "[3/12] argo\defaults -> $defaultsDest"
|
|
121
142
|
Copy-Tree -Source $defaultsSrc -Destination $defaultsDest
|
|
122
143
|
|
|
123
144
|
$skillSrc = Join-Path (Join-Path $argoDir 'skills') 'argo-init'
|
|
124
145
|
$skillDest = Join-Path $SkillsRoot 'argo-init'
|
|
125
|
-
Write-Host "[4/
|
|
146
|
+
Write-Host "[4/12] argo\skills\argo-init -> $skillDest"
|
|
126
147
|
Copy-Tree -Source $skillSrc -Destination $skillDest
|
|
127
148
|
|
|
128
149
|
$ruleSrc = Join-Path (Join-Path $argoDir 'rules') 'archgraph.instructions.md'
|
|
129
150
|
$ruleDest = Join-Path $PromptsRoot 'archgraph.instructions.md'
|
|
130
|
-
Write-Host "[5/
|
|
151
|
+
Write-Host "[5/12] argo\rules\archgraph.instructions.md -> $ruleDest"
|
|
131
152
|
New-Item -ItemType Directory -Force -Path $PromptsRoot | Out-Null
|
|
132
153
|
Copy-Item -Force -Path $ruleSrc -Destination $ruleDest
|
|
133
154
|
|
|
134
155
|
$depsSrc = Join-Path $argoDir 'package.json'
|
|
135
156
|
$depsDest = Join-Path $ArgoRoot 'package.json'
|
|
136
|
-
Write-Host "[6/
|
|
157
|
+
Write-Host "[6/12] argo\package.json -> $depsDest"
|
|
137
158
|
Copy-Item -Force -Path $depsSrc -Destination $depsDest
|
|
138
159
|
|
|
139
160
|
$cursorSkillDest = Join-Path $CursorSkillsRoot 'argo-init'
|
|
140
|
-
Write-Host "[7/
|
|
161
|
+
Write-Host "[7/12] argo\skills\argo-init -> $cursorSkillDest (Cursor)"
|
|
141
162
|
Copy-Tree -Source $skillSrc -Destination $cursorSkillDest
|
|
142
163
|
|
|
143
164
|
$openCodeSkillDest = Join-Path $OpenCodeSkillsRoot 'argo-init'
|
|
144
|
-
Write-Host "[8/
|
|
165
|
+
Write-Host "[8/12] argo\skills\argo-init -> $openCodeSkillDest (OpenCode)"
|
|
145
166
|
Copy-Tree -Source $skillSrc -Destination $openCodeSkillDest
|
|
146
167
|
|
|
147
|
-
Write-Host "[9/
|
|
168
|
+
Write-Host "[9/12] argo\rules\archgraph.instructions.md -> $OpenCodeAgentsPath (OpenCode global AGENTS.md)"
|
|
148
169
|
Add-AgentsRule -AgentsPath $OpenCodeAgentsPath -RulePath $ruleSrc
|
|
149
170
|
|
|
171
|
+
$agentsSrc = Join-Path $argoDir 'agents'
|
|
172
|
+
Write-Host "[10/12] argo\agents -> $CopilotAgentsRoot (Copilot user-level)"
|
|
173
|
+
Copy-Agents -Source $agentsSrc -Destination $CopilotAgentsRoot
|
|
174
|
+
|
|
175
|
+
Write-Host "[11/12] argo\agents -> $CursorAgentsRoot (Cursor user-level, renamed to .md)"
|
|
176
|
+
Copy-Agents -Source $agentsSrc -Destination $CursorAgentsRoot -AsMd
|
|
177
|
+
|
|
178
|
+
Write-Host "[12/12] argo\agents -> $OpenCodeAgentsRoot (OpenCode user-level, renamed to .md)"
|
|
179
|
+
Copy-Agents -Source $agentsSrc -Destination $OpenCodeAgentsRoot -AsMd
|
|
180
|
+
|
|
150
181
|
if ($SkipDeps) {
|
|
151
182
|
Write-Host 'Skipped dependency install (-SkipDeps).'
|
|
152
183
|
} elseif (Get-Command npm -ErrorAction SilentlyContinue) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archgraph-argo",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Deploy the ArchGraph ARGO toolchain, skills, and rules (schema, scripts, argo-init skill, global rule) with one command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"argo/scripts",
|
|
11
11
|
"argo/schema",
|
|
12
12
|
"argo/defaults",
|
|
13
|
+
"argo/agents",
|
|
13
14
|
"argo/skills/argo-init",
|
|
14
15
|
"argo/rules",
|
|
15
16
|
"argo/package.json",
|