siluzan-cso-cli 1.1.17-beta.1 → 1.1.17

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 CHANGED
@@ -46,7 +46,7 @@
46
46
  在**用户的目标项目根目录**执行(根据用户使用的助手选择 `--ai`):
47
47
 
48
48
  ```bash
49
- npm install -g siluzan-cso-cli@beta
49
+ npm install -g siluzan-cso-cli
50
50
  siluzan-cso init --ai cursor # 写入 Cursor(默认)
51
51
  siluzan-cso init --ai cursor,claude # 同时写入多个平台
52
52
  siluzan-cso init --ai all # 写入所有支持的平台
@@ -54,7 +54,6 @@ siluzan-cso init -d /path/to/skills # 写入自定义目录
54
54
  siluzan-cso init --force # 强制覆盖已存在文件
55
55
  ```
56
56
 
57
- > **注意**:当前为测试版(1.1.17-beta.1),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-cso-cli`。
58
57
 
59
58
  | 助手 | 建议 `--ai` |
60
59
  | ----------------------- | ------------------------------------ |
package/dist/index.js CHANGED
@@ -1939,11 +1939,11 @@ var require_semver2 = __commonJS({
1939
1939
  import { Command, Option } from "commander";
1940
1940
 
1941
1941
  // src/config/defaults.ts
1942
- var BUILD_ENV = "test";
1943
- var DEFAULT_API_BASE = "https://api-ci.siluzan.com";
1944
- var DEFAULT_CSO_BASE = "https://cso-ci.siluzan.com";
1945
- var DEFAULT_WEB_BASE = "https://www-ci.siluzan.com";
1946
- var DEFAULT_AGENT_BASE = "https://agent-ci.mysiluzan.com";
1942
+ var BUILD_ENV = "production";
1943
+ var DEFAULT_API_BASE = "https://api.siluzan.com";
1944
+ var DEFAULT_CSO_BASE = "https://cso.siluzan.com";
1945
+ var DEFAULT_WEB_BASE = "https://www.siluzan.com";
1946
+ var DEFAULT_AGENT_BASE = "https://agent.mysiluzan.com";
1947
1947
 
1948
1948
  // src/commands/init.ts
1949
1949
  import * as fs2 from "fs/promises";
@@ -212,6 +212,6 @@ siluzan-cso rag query -q "产品 卖点 故事" --tags "产品资产库"
212
212
 
213
213
  > 无对应 CLI 命令的模块,或需要引导用户在网页端查看数据时,查阅 `references/web-pages.md` 获取完整页面清单与链接。
214
214
 
215
- URL 格式:`https://www-ci.siluzan.com/v3/foreign_trade/cso/{页面}`
215
+ URL 格式:`https://www.siluzan.com/v3/foreign_trade/cso/{页面}`
216
216
 
217
217
  常用页面:`task`(任务管理)· `postVideo`(发布页)· `ManageAccounts`(账号管理)· `planning`(AI 内容规划)· `table`(绩效报表)· `Workdata`(作品数据)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "slug": "siluzan-cso",
3
- "version": "1.1.17-beta.1",
4
- "publishedAt": 1778229754485,
3
+ "version": "1.1.17",
4
+ "publishedAt": 1778231305160,
5
5
  "homepage": "https://www.siluzan.com",
6
6
  "source": "https://dev.azure.com/jack4it/Sammamish/_git/siluzan-skill",
7
7
  "requiredBinaries": [
@@ -207,7 +207,7 @@ siluzan-cso publish -c publish-config.json
207
207
 
208
208
  > 查询发布状态、处理失败项 → 参见 `references/task.md`
209
209
 
210
- 前往 CSO 任务管理页面查看进度:`https://www-ci.siluzan.com/v3/foreign_trade/cso/task`
210
+ 前往 CSO 任务管理页面查看进度:`https://www.siluzan.com/v3/foreign_trade/cso/task`
211
211
 
212
212
  ---
213
213
 
@@ -1,5 +1,5 @@
1
1
  # rag:RAG 知识库检索
2
- 知识库管理页面在https://www-ci.siluzan.com/knowledge-base/
2
+ 知识库管理页面在https://www.siluzan.com/knowledge-base/
3
3
 
4
4
  用于写稿、产品知识问答、三库素材提取等场景;凡回答依赖「本企业已入库素材」且不应凭模型记忆编造时,优先走 RAG。
5
5
 
@@ -3,7 +3,7 @@
3
3
  ## 安装 CLI
4
4
 
5
5
  ```bash
6
- npm install -g siluzan-cso-cli@beta
6
+ npm install -g siluzan-cso-cli
7
7
  ```
8
8
 
9
9
  环境要求:Node.js 18+
@@ -44,7 +44,7 @@ siluzan-cso config set --token <Token> # 备用:设置 JWT Token
44
44
 
45
45
  > **⚠️ 不要使用 `config set --token <token>` 的方式。** 该方式会将 Token 明文写入 shell history(`~/.bash_history`、`~/.zsh_history`、PowerShell 历史),存在凭证泄露风险。推荐使用 `siluzan-cso login` 交互式输入。
46
46
 
47
- API Key 获取入口:`https://www-ci.siluzan.com/v3/foreign_trade/settings/apiKeyManagement`
47
+ API Key 获取入口:`https://www.siluzan.com/v3/foreign_trade/settings/apiKeyManagement`
48
48
 
49
49
  ### 通过环境变量传入凭据(CI/CD 推荐)
50
50
 
@@ -81,8 +81,8 @@ siluzan-cso config show
81
81
 
82
82
  ```
83
83
  构建环境 : production
84
- apiBaseUrl : https://api-ci.siluzan.com
85
- csoBaseUrl : https://cso-ci.siluzan.com
84
+ apiBaseUrl : https://api.siluzan.com
85
+ csoBaseUrl : https://cso.siluzan.com
86
86
  apiKey : abcd****1234
87
87
  ```
88
88
 
@@ -1,7 +1,7 @@
1
1
  # web-pages — CSO 后台页面速查
2
2
 
3
3
  > 当需要引导用户前往网页端查看数据或执行操作时,使用本文件中的页面链接。
4
- > URL 格式:`https://www-ci.siluzan.com/v3/foreign_trade/cso/{页面路径}`
4
+ > URL 格式:`https://www.siluzan.com/v3/foreign_trade/cso/{页面路径}`
5
5
 
6
6
  ---
7
7
 
@@ -11,9 +11,9 @@
11
11
 
12
12
  | 页面 | 完整链接 | 功能说明 |
13
13
  | -------- | --------------------------------------------------------- | ---------------------------------------------------- |
14
- | 账号管理 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/ManageAccounts` | 绑定/授权/查看媒体账号列表、账号状态、Token 到期时间 |
15
- | 账号分组 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/AccountGroup` | 新建分组、管理分组内账号 |
16
- | 重点账号 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/KeyAccounts` | 配置重点关注账号、数据备份 |
14
+ | 账号管理 | `https://www.siluzan.com/v3/foreign_trade/cso/ManageAccounts` | 绑定/授权/查看媒体账号列表、账号状态、Token 到期时间 |
15
+ | 账号分组 | `https://www.siluzan.com/v3/foreign_trade/cso/AccountGroup` | 新建分组、管理分组内账号 |
16
+ | 重点账号 | `https://www.siluzan.com/v3/foreign_trade/cso/KeyAccounts` | 配置重点关注账号、数据备份 |
17
17
 
18
18
  ---
19
19
 
@@ -21,10 +21,10 @@
21
21
 
22
22
  | 页面 | 完整链接 | 功能说明 |
23
23
  | -------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
24
- | 发布作品 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/postVideo?contentType=1` | 矩阵发布视频、图文、草稿管理、话题组 contentType=1 是视频,contentType=2是图文 |
24
+ | 发布作品 | `https://www.siluzan.com/v3/foreign_trade/cso/postVideo?contentType=1` | 矩阵发布视频、图文、草稿管理、话题组 contentType=1 是视频,contentType=2是图文 |
25
25
 
26
- | 发布日历 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/publishCalendar` | 日历视图规划发布任务、创建/编辑发布任务 |
27
- | 营销日历 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/marketingCalendar` | 营销节点日历、跳转创建发布任务 |
26
+ | 发布日历 | `https://www.siluzan.com/v3/foreign_trade/cso/publishCalendar` | 日历视图规划发布任务、创建/编辑发布任务 |
27
+ | 营销日历 | `https://www.siluzan.com/v3/foreign_trade/cso/marketingCalendar` | 营销节点日历、跳转创建发布任务 |
28
28
 
29
29
  ---
30
30
 
@@ -32,10 +32,10 @@
32
32
 
33
33
  | 页面 | 完整链接 | 功能说明 |
34
34
  | -------- | ------------------------------------------------------- | ----------------------------------------- |
35
- | 任务列表 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/task` | 发布任务列表、状态筛选、任务详情抽屉 |
36
- | 视频管理 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/VideoMgr` | 已发布视频/图文列表、删除、重发、评论查看 |
37
- | 视频搬家 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/relocation` | 将视频搬运到其他平台 |
38
- | 搬家记录 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/MovingRecord` | 搬家任务列表与执行状态 |
35
+ | 任务列表 | `https://www.siluzan.com/v3/foreign_trade/cso/task` | 发布任务列表、状态筛选、任务详情抽屉 |
36
+ | 视频管理 | `https://www.siluzan.com/v3/foreign_trade/cso/VideoMgr` | 已发布视频/图文列表、删除、重发、评论查看 |
37
+ | 视频搬家 | `https://www.siluzan.com/v3/foreign_trade/cso/relocation` | 将视频搬运到其他平台 |
38
+ | 搬家记录 | `https://www.siluzan.com/v3/foreign_trade/cso/MovingRecord` | 搬家任务列表与执行状态 |
39
39
 
40
40
  ---
41
41
 
@@ -43,9 +43,9 @@
43
43
 
44
44
  | 页面 | 完整链接 | 功能说明 |
45
45
  | -------- | ------------------------------------------------------ | --------------------------------------- |
46
- | 私信管理 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/letter` | 按渠道/时间查看与处理私信(多平台 Tab) |
47
- | 评论管理 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/comment` | 收到的评论列表、回复、账号组筛选 |
48
- | 智能互动 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/interaction` | 私信欢迎语、自动回复规则配置 |
46
+ | 私信管理 | `https://www.siluzan.com/v3/foreign_trade/cso/letter` | 按渠道/时间查看与处理私信(多平台 Tab) |
47
+ | 评论管理 | `https://www.siluzan.com/v3/foreign_trade/cso/comment` | 收到的评论列表、回复、账号组筛选 |
48
+ | 智能互动 | `https://www.siluzan.com/v3/foreign_trade/cso/interaction` | 私信欢迎语、自动回复规则配置 |
49
49
 
50
50
  ---
51
51
 
@@ -53,9 +53,9 @@
53
53
 
54
54
  | 页面 | 完整链接 | 功能说明 |
55
55
  | -------- | ------------------------------------------------------ | -------------------------------------------------------------------- |
56
- | 作品数据 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/Workdata` | 作品维度统计、图表、明细(对应 CLI `report fetch`) |
57
- | 账户数据 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/accountdata` | 账户维度汇总数据、趋势图表 |
58
- | 绩效报表 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/table` | 多维度绩效报表、PDF 导出(对应 CLI `report fetch/records/download`) |
56
+ | 作品数据 | `https://www.siluzan.com/v3/foreign_trade/cso/Workdata` | 作品维度统计、图表、明细(对应 CLI `report fetch`) |
57
+ | 账户数据 | `https://www.siluzan.com/v3/foreign_trade/cso/accountdata` | 账户维度汇总数据、趋势图表 |
58
+ | 绩效报表 | `https://www.siluzan.com/v3/foreign_trade/cso/table` | 多维度绩效报表、PDF 导出(对应 CLI `report fetch/records/download`) |
59
59
 
60
60
  ---
61
61
 
@@ -63,10 +63,10 @@
63
63
 
64
64
  | 页面 | 完整链接 | 功能说明 |
65
65
  | -------- | ------------------------------------------------------ | -------------------------------------------------------------- |
66
- | 内容规划 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/planning` | AI 内容规划列表、生成规划、企业维度筛选(对应 CLI `planning`) |
67
- | 营销首页 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/ContentHome` | 工作台总览:账号数、视频数、最新评论与视频 |
66
+ | 内容规划 | `https://www.siluzan.com/v3/foreign_trade/cso/planning` | AI 内容规划列表、生成规划、企业维度筛选(对应 CLI `planning`) |
67
+ | 营销首页 | `https://www.siluzan.com/v3/foreign_trade/cso/ContentHome` | 工作台总览:账号数、视频数、最新评论与视频 |
68
68
 
69
- | 话题组 | `https://www-ci.siluzan.com/v3/foreign_trade/cso/TopicGroup` | 话题组维护、话题内容管理 |
69
+ | 话题组 | `https://www.siluzan.com/v3/foreign_trade/cso/TopicGroup` | 话题组维护、话题内容管理 |
70
70
 
71
71
  ---
72
72
 
@@ -10,12 +10,14 @@ $ErrorActionPreference = 'Stop'
10
10
  $PKG_NAME = 'siluzan-cso-cli'
11
11
  $CLI_BIN = 'siluzan-cso'
12
12
  $SKILL_LABEL = 'Siluzan CSO'
13
- $INSTALL_CMD = 'npm install -g siluzan-cso-cli@beta'
14
- $WEB_BASE = 'https://www-ci.siluzan.com'
13
+ $INSTALL_CMD = 'npm install -g siluzan-cso-cli'
14
+ $WEB_BASE = 'https://www.siluzan.com'
15
15
 
16
16
  # -- Constants ----------------------------------------------------------------
17
- $NODE_MAJOR_MIN = 18
18
- $NPM_MIRROR = 'https://registry.npmmirror.com'
17
+ $NODE_MAJOR_MIN = 18
18
+ $NPM_MIRROR = 'https://registry.npmmirror.com'
19
+ # Git for Windows installer (mirrored on Siluzan CDN; bump version here when needed)
20
+ $GIT_INSTALLER_URL = 'https://staticpn.siluzan.com/assets/git/Git-2.54.0-64-bit.exe'
19
21
 
20
22
  # -- Helpers ------------------------------------------------------------------
21
23
  function Write-Info { param([string]$Msg) Write-Host "[OK] $Msg" -ForegroundColor Green }
@@ -80,6 +82,85 @@ function Install-NodeFallback {
80
82
  throw 'Node.js is required'
81
83
  }
82
84
 
85
+ # -- Git for Windows ----------------------------------------------------------
86
+ # Some agent clients (Cursor / Claude Code / etc.) have known quirks running
87
+ # PowerShell or cmd commands. We install Git for Windows ahead of time so the
88
+ # user always has a Git Bash fallback to run the equivalent bash installer
89
+ # (`bash <(curl -fsSL .../install.sh)`) when the PowerShell channel misbehaves.
90
+ function Test-GitInstalled {
91
+ return $null -ne (Get-Command git -ErrorAction SilentlyContinue)
92
+ }
93
+
94
+ function Test-IsAdmin {
95
+ try {
96
+ $id = [Security.Principal.WindowsIdentity]::GetCurrent()
97
+ $principal = New-Object Security.Principal.WindowsPrincipal($id)
98
+ return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
99
+ } catch {
100
+ return $false
101
+ }
102
+ }
103
+
104
+ function Install-Git {
105
+ $tmpFile = Join-Path $env:TEMP 'siluzan-git-installer.exe'
106
+
107
+ Write-Info "Downloading Git for Windows: $GIT_INSTALLER_URL"
108
+ try {
109
+ $prevProgress = $ProgressPreference
110
+ $ProgressPreference = 'SilentlyContinue'
111
+ Invoke-WebRequest -Uri $GIT_INSTALLER_URL -OutFile $tmpFile -UseBasicParsing
112
+ $ProgressPreference = $prevProgress
113
+ } catch {
114
+ Write-Warn "Git installer download failed: $($_.Exception.Message)"
115
+ return $false
116
+ }
117
+
118
+ if (-not (Test-Path $tmpFile)) {
119
+ Write-Warn 'Git installer file not found after download'
120
+ return $false
121
+ }
122
+
123
+ # Inno Setup silent flags. When not admin we point /DIR to %LOCALAPPDATA% so
124
+ # the installer doesn't try to write to Program Files (which would trigger UAC
125
+ # or just fail). The installer auto-detects ALLUSERS vs CURRENTUSER mode based
126
+ # on whether the current process is elevated, so we don't pass /CURRENTUSER
127
+ # explicitly (not all Git for Windows builds accept that flag).
128
+ $installArgs = @('/VERYSILENT', '/NORESTART', '/NOCANCEL', '/SP-', '/CLOSEAPPLICATIONS', '/RESTARTAPPLICATIONS')
129
+ if (Test-IsAdmin) {
130
+ Write-Info 'Installing Git for Windows system-wide (admin detected)...'
131
+ } else {
132
+ $userDir = Join-Path $env:LOCALAPPDATA 'Programs\Git'
133
+ Write-Info "Installing Git for Windows for current user: $userDir"
134
+ $installArgs += @("/DIR=$userDir")
135
+ }
136
+
137
+ try {
138
+ Start-Process -FilePath $tmpFile -ArgumentList $installArgs -Wait -NoNewWindow
139
+ } catch {
140
+ Write-Warn "Git installer launch failed: $($_.Exception.Message)"
141
+ Remove-Item $tmpFile -ErrorAction SilentlyContinue
142
+ return $false
143
+ }
144
+ Remove-Item $tmpFile -ErrorAction SilentlyContinue
145
+
146
+ Refresh-Path
147
+ if (-not (Test-GitInstalled)) {
148
+ # 安装器有时不会立刻刷新 PATH,按已知路径手动补一次
149
+ $candidates = @(
150
+ (Join-Path $env:LOCALAPPDATA 'Programs\Git\cmd'),
151
+ (Join-Path $env:ProgramFiles 'Git\cmd')
152
+ )
153
+ foreach ($p in $candidates) {
154
+ if (Test-Path (Join-Path $p 'git.exe')) {
155
+ $env:Path = "$p;$env:Path"
156
+ break
157
+ }
158
+ }
159
+ }
160
+
161
+ return Test-GitInstalled
162
+ }
163
+
83
164
  # -- Main ---------------------------------------------------------------------
84
165
  function Main {
85
166
  Write-Host ''
@@ -87,10 +168,6 @@ function Main {
87
168
  Write-Host "| $SKILL_LABEL -- Install |" -ForegroundColor White
88
169
  Write-Host '+---------------------------------------------+' -ForegroundColor White
89
170
  Write-Host ''
90
- Write-Warn 'Windows note: some agent clients may fail when running PowerShell/cmd commands.'
91
- Write-Host ' If this install fails unexpectedly, install Git for Windows and rerun the Bash installer in Git Bash:' -ForegroundColor DarkGray
92
- Write-Host ' https://git-scm.com/download/win' -ForegroundColor DarkGray
93
- Write-Host ''
94
171
 
95
172
  # Step 1: Environment check
96
173
  Write-Step 'Step 1/4: Environment check'
@@ -123,6 +200,23 @@ function Main {
123
200
  }
124
201
  Write-Info 'npm ready'
125
202
 
203
+ # Git for Windows: pre-install as a Bash fallback path for agent clients
204
+ # whose PowerShell/cmd channel is unreliable. Failure here is non-fatal.
205
+ if (Test-GitInstalled) {
206
+ Write-Info 'Git for Windows already installed (Git Bash fallback ready)'
207
+ } else {
208
+ Write-Warn 'Git for Windows not found, installing as Bash fallback for agent clients...'
209
+ $gitOk = $false
210
+ try { $gitOk = Install-Git } catch { Write-Warn "Git install error: $($_.Exception.Message)" }
211
+ if ($gitOk) {
212
+ Write-Info 'Git for Windows installed (Git Bash fallback ready)'
213
+ } else {
214
+ Write-Warn 'Git for Windows install was skipped or failed; CLI install will continue.'
215
+ Write-Host ' If your agent later fails to run PowerShell commands, install Git manually:' -ForegroundColor DarkGray
216
+ Write-Host " $GIT_INSTALLER_URL" -ForegroundColor DarkGray
217
+ }
218
+ }
219
+
126
220
  $currentRegistry = ''
127
221
  try { $currentRegistry = (npm config get registry 2>$null).Trim() } catch {}
128
222
  if ($currentRegistry -ne $NPM_MIRROR -and $currentRegistry -ne "$NPM_MIRROR/") {
@@ -164,6 +258,11 @@ function Main {
164
258
  Write-Host ''
165
259
  Write-Host " Update CLI & Skill files: $CLI_BIN update"
166
260
  Write-Host ''
261
+ if (Test-GitInstalled) {
262
+ Write-Host ' Tip: if your agent client has trouble running PowerShell/cmd commands later,' -ForegroundColor DarkGray
263
+ Write-Host ' open Git Bash and re-run the equivalent bash installer instead.' -ForegroundColor DarkGray
264
+ Write-Host ''
265
+ }
167
266
  Write-Info "Need help? Visit $WEB_BASE"
168
267
  Write-Host ''
169
268
  }
@@ -10,8 +10,8 @@ set -euo pipefail
10
10
  readonly PKG_NAME="siluzan-cso-cli"
11
11
  readonly CLI_BIN="siluzan-cso"
12
12
  readonly SKILL_LABEL="Siluzan CSO"
13
- readonly INSTALL_CMD="npm install -g siluzan-cso-cli@beta"
14
- readonly WEB_BASE="https://www-ci.siluzan.com"
13
+ readonly INSTALL_CMD="npm install -g siluzan-cso-cli"
14
+ readonly WEB_BASE="https://www.siluzan.com"
15
15
 
16
16
  # -- Constants ----------------------------------------------------------------
17
17
  readonly NODE_MAJOR_MIN=18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siluzan-cso-cli",
3
- "version": "1.1.17-beta.1",
3
+ "version": "1.1.17",
4
4
  "description": "Siluzan platform AI Skill CLI — multi-platform content publishing (video/image-text) for Cursor, Claude Code, and OpenClaw.",
5
5
  "keywords": [
6
6
  "ai-skill",