@shundoo-ai/dsh-cosmic 1.0.12 → 1.0.14
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/package.json
CHANGED
|
@@ -152,7 +152,13 @@ DSH 会话界面只有 `write`/`edit` 工具**本轮**触碰过的文件才会
|
|
|
152
152
|
|
|
153
153
|
### 设置 ERP 登录信息(per-workspace,随时可切账号)
|
|
154
154
|
|
|
155
|
-
触发词:用户说「设置 erp 登录信息」「配置 erp」「切换 erp
|
|
155
|
+
触发词:用户说「设置 erp 登录信息」「配置 erp」「切换 erp 账号」「**重新登录 ERP**」「**刷新 AGENTS.md**」等。读写一律走 `erp-config.py`,**禁止 agent 手 edit JSON**。
|
|
156
|
+
|
|
157
|
+
> **两条路径,按用户意图选:**
|
|
158
|
+
> - 「设置 / 配置 / 切换 erp 账号」→ 走下面的**完整主流程**(选项目 → 补账号密码 → 登录 → 收尾)。
|
|
159
|
+
> - **「重新登录 ERP」且凭证已配好 → 走轻量路径**:**跳过**选项目与补账号密码,直接用工作区已保存的凭证登录(`do_auth`)——
|
|
160
|
+
> 但**收尾动作与完整流程完全一致**:登录成功后**同样必须执行第 5 步那两个动作**(拉项目模板 + 覆盖生成 `AGENTS.md`),
|
|
161
|
+
> **不得因为"只是重新登录"就省略**。若工作区**没有**凭证配置,则退回完整主流程。
|
|
156
162
|
|
|
157
163
|
**主流程(选项目 → 自动填连接信息 → 只补账号密码):**
|
|
158
164
|
|
|
@@ -160,9 +166,9 @@ DSH 会话界面只有 `write`/`edit` 工具**本轮**触碰过的文件才会
|
|
|
160
166
|
2. 用户选项目 → `erp-config.py apply --id <项目标识>`:从 preset `cosmic-build/skills/tenant.json` 取该项目的 url/tenantId/accountId/client_id/client_secret/x-acgw-identity 写入,**并清空 user/password**(切换项目 = 换身份,旧账号无意义)。
|
|
161
167
|
3. 读当前配置确认:`{VENV}/bin/python {PRESET}/skills/erp-analysis/scripts/erp-config.py read`(首次会自动从 preset 空模板生成;password/appSecret 已脱敏),把 read 结果列给用户(已设置显示当前值、未设置标「未设置」)——此时连接字段应为所选项目的值,user/password 为「未设置」。
|
|
162
168
|
4. 用户只补账号密码 → `erp-config.py write --user <账号> --password <密码>`。
|
|
163
|
-
5. 验证登录(`do_auth
|
|
169
|
+
5. 验证登录(`do_auth`)。**登录成功后必须接着执行下面两个动作,不得停在"登录成功"**(用户只说「重新登录 ERP」时同样要执行)——并列执行:
|
|
164
170
|
- `{PRESET}/skills/erp-analysis/scripts/pull_project_templates.py` — 拉取项目模板(按 baseUrl 反查项目,见 `references/template-distribution.md`)
|
|
165
|
-
- `{PRESET}/skills/erp-analysis/scripts/ensure_workspace_instructions.py` — 生成工作区 `AGENTS.md
|
|
171
|
+
- `{PRESET}/skills/erp-analysis/scripts/ensure_workspace_instructions.py` — 生成工作区 `AGENTS.md`:**每次都用最新模板覆盖**(可重复执行;**不会**因"已存在"而跳过)。脚本无认证依赖,也可单独运行。
|
|
166
172
|
|
|
167
173
|
**兜底(自定义,不走预设项目):**
|
|
168
174
|
|