@whyshu/argent-engine 0.8.0-rc.7 → 0.8.0-rc.9
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/MANIFEST.json +17 -16
- package/engine/VERSION +1 -1
- package/engine/core/contracts/argent.contracts.json +2 -2
- package/engine/core/contracts/verbs.schema.json +64 -1
- package/engine/core/lib/contract.mjs +30 -0
- package/engine/core/mcp/server.mjs +171 -2
- package/engine/scripts/build-doc-index.mjs +68 -0
- package/engine/scripts/capability-packs.lock.json +24 -24
- package/engine/scripts/check-docs-drift.mjs +51 -4
- package/engine/scripts/ci-run.sh +2 -2
- package/engine/scripts/doc-status.mjs +212 -0
- package/engine/scripts/flow-requirements.json +4 -4
- package/engine/scripts/ml-ads.mjs +181 -0
- package/engine/scripts/ml-oauth-setup.mjs +1 -1
- package/engine/scripts/orchestrator.py +4 -4
- package/engine/scripts/s1-audit.mjs +4 -1
- package/engine/scripts/ziniao-auth-probe.sh +5 -5
- package/engine/version.mjs +1 -1
- package/engine/verticals/_engine-words.baseline.txt +16 -2
- package/package.json +1 -1
- package/engine/scripts/huangwei-preflight.sh +0 -42
- package/engine/scripts/publish-release-0.8.0-rc.4.sh +0 -18
- package/engine/scripts/verify-release-0.8.0-rc.4.sh +0 -16
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ml-ads.mjs —— Mercado Ads(Product Ads)**只读**效果报告 CLI。
|
|
4
|
+
*
|
|
5
|
+
* ## 干什么
|
|
6
|
+
* 用与日报同一条授权链(`~/.dsh/argent/ml-api-stores.json`)逐店拉广告数据,输出:
|
|
7
|
+
* 花费 / 广告销售额 / ROAS / ACoS / 点击 / CTR / CPC / 广告单量,
|
|
8
|
+
* 外加**告警**(ACoS 超标、烧钱零转化、ROAS 过低)和活动级下钻。
|
|
9
|
+
*
|
|
10
|
+
* ## 用法
|
|
11
|
+
* node scripts/ml-ads.mjs # 全部已授权店铺 · 近 7 个完整自然日
|
|
12
|
+
* node scripts/ml-ads.mjs --store 1店 # 店铺子串过滤
|
|
13
|
+
* node scripts/ml-ads.mjs --days 30 # 回溯天数(MELI 上限 90)
|
|
14
|
+
* node scripts/ml-ads.mjs --to 2026-10-16 # 指定结束日(站点本地)
|
|
15
|
+
* node scripts/ml-ads.mjs --detail # 附「花钱最多 / ACoS 超标」活动
|
|
16
|
+
* node scripts/ml-ads.mjs --json # 结构化输出(stdout 纯 JSON)
|
|
17
|
+
* node scripts/ml-ads.mjs --lines # 只输出中文卡片行(给日报/角色回复用)
|
|
18
|
+
* node scripts/ml-ads.mjs --list # 只列每店广告主,不拉活动
|
|
19
|
+
* node scripts/ml-ads.mjs --acos-bad 30 --min-spend 200 # 告警阈值
|
|
20
|
+
*
|
|
21
|
+
* ## 只读纪律
|
|
22
|
+
* · 只发 GET(`/advertising/...`);⛔ 不改预算/暂停/调价,也不写任何客户数据;
|
|
23
|
+
* · 唯一写盘 = token 轮换回写(MELI refresh_token 是轮换制,不写回下次必 429):
|
|
24
|
+
* 原子写(tmp + rename)、保持 600;
|
|
25
|
+
* · API 基址:`ML_API_BASE` → 默认平台地址(引擎 lib 里⛔不含域名,只在本 CLI 注入)。
|
|
26
|
+
*/
|
|
27
|
+
import { readFileSync, writeFileSync, renameSync, existsSync, mkdirSync, chmodSync } from 'node:fs'
|
|
28
|
+
import { join, dirname } from 'node:path'
|
|
29
|
+
import { fileURLToPath } from 'node:url'
|
|
30
|
+
import { resolveDataDir } from './lib/argent-datadir.mjs'
|
|
31
|
+
import {
|
|
32
|
+
loadEnvFile, refreshStoreToken, apiGet as coreApiGet,
|
|
33
|
+
SITE_TZ, SITE_CURRENCY, fallbackSite, startOfLocalDayUTC, localDateStr, matchStores,
|
|
34
|
+
} from './lib/daily-report-core.mjs'
|
|
35
|
+
import {
|
|
36
|
+
fetchAdsReport, classifyAdsAlerts, adsCardLines, fmtMoney, ADS_ALERT_DEFAULTS,
|
|
37
|
+
} from './lib/ml-ads-core.mjs'
|
|
38
|
+
|
|
39
|
+
const API_BASE = () => process.env.ML_API_BASE || 'https://api.mercadolibre.com'
|
|
40
|
+
|
|
41
|
+
const args = process.argv.slice(2)
|
|
42
|
+
const argVal = (n) => { const i = args.indexOf(n); return i >= 0 && args[i + 1] ? args[i + 1] : null }
|
|
43
|
+
const has = (n) => args.includes(n)
|
|
44
|
+
|
|
45
|
+
if (has('-h') || has('--help')) {
|
|
46
|
+
console.log(`Mercado Ads 只读报告
|
|
47
|
+
|
|
48
|
+
用法: node scripts/ml-ads.mjs [选项]
|
|
49
|
+
--store <名或uid> 店铺过滤(名称子串 / uid 全等,与日报同一判据)
|
|
50
|
+
--days <n> 回溯天数,默认 7(MELI 上限 90)
|
|
51
|
+
--to <YYYY-MM-DD> 结束日(站点本地),默认「昨天」
|
|
52
|
+
--detail 附活动级下钻(花钱最多 + ACoS 超标)
|
|
53
|
+
--list 只列出每店广告主(1 请求/店)
|
|
54
|
+
--json 结构化 JSON(stdout)
|
|
55
|
+
--lines 中文卡片行(给日报分区/角色回复复用)
|
|
56
|
+
--acos-warn <n> ACoS 黄色阈值,默认 ${ADS_ALERT_DEFAULTS.acosWarn}
|
|
57
|
+
--acos-bad <n> ACoS 红色阈值,默认 ${ADS_ALERT_DEFAULTS.acosBad}
|
|
58
|
+
--min-spend <n> 告警最小花费(本币),默认 ${ADS_ALERT_DEFAULTS.minSpend}
|
|
59
|
+
--env <path> daily-report.env 路径
|
|
60
|
+
退出码: 0 正常 | 1 用法/取数失败 | 2 全部店铺失败`)
|
|
61
|
+
process.exit(0)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const DATA_DIR = resolveDataDir({ env: process.env }).dir
|
|
65
|
+
const ENV_PATH = argVal('--env') || join(DATA_DIR, 'daily-report.env')
|
|
66
|
+
const STORES_PATH = process.env.ML_API_STORES_JSON || join(DATA_DIR, 'ml-api-stores.json')
|
|
67
|
+
const env = loadEnvFile(ENV_PATH)
|
|
68
|
+
const doc = existsSync(STORES_PATH) ? JSON.parse(readFileSync(STORES_PATH, 'utf8')) : { stores: [] }
|
|
69
|
+
const stores = doc.stores || []
|
|
70
|
+
|
|
71
|
+
const persistStores = () => {
|
|
72
|
+
try {
|
|
73
|
+
mkdirSync(dirname(STORES_PATH), { recursive: true })
|
|
74
|
+
const tmp = `${STORES_PATH}.tmp`
|
|
75
|
+
writeFileSync(tmp, JSON.stringify({ stores }, null, 2) + '\n', { mode: 0o600 })
|
|
76
|
+
renameSync(tmp, STORES_PATH)
|
|
77
|
+
chmodSync(STORES_PATH, 0o600)
|
|
78
|
+
} catch (e) { console.error(`✗ token 写回失败:${e.message}`) }
|
|
79
|
+
}
|
|
80
|
+
const apiGet = (path, token) => coreApiGet(path, token, { base: API_BASE() })
|
|
81
|
+
|
|
82
|
+
const alertOpts = {
|
|
83
|
+
acosWarn: Number(argVal('--acos-warn') || ADS_ALERT_DEFAULTS.acosWarn),
|
|
84
|
+
acosBad: Number(argVal('--acos-bad') || ADS_ALERT_DEFAULTS.acosBad),
|
|
85
|
+
minSpend: Number(argVal('--min-spend') || ADS_ALERT_DEFAULTS.minSpend),
|
|
86
|
+
minRoas: ADS_ALERT_DEFAULTS.minRoas,
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const FLAG_JSON = has('--json')
|
|
90
|
+
const FLAG_LINES = has('--lines')
|
|
91
|
+
const FLAG_DETAIL = has('--detail')
|
|
92
|
+
const FLAG_LIST = has('--list')
|
|
93
|
+
const days = Math.max(1, Math.min(90, Number(argVal('--days') || 7)))
|
|
94
|
+
const toArg = argVal('--to')
|
|
95
|
+
|
|
96
|
+
const now = new Date()
|
|
97
|
+
const picked = matchStores(stores, (argVal('--store') || '').split(',').map((x) => x.trim()).filter(Boolean))
|
|
98
|
+
if (!picked.length) {
|
|
99
|
+
console.error(`✗ 没有匹配到店铺(已授权 ${stores.length} 家)`)
|
|
100
|
+
process.exit(1)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const results = []
|
|
104
|
+
for (const store of picked) {
|
|
105
|
+
const site = fallbackSite(store.site)
|
|
106
|
+
const tz = SITE_TZ[site]
|
|
107
|
+
const todayStart = startOfLocalDayUTC(tz, now)
|
|
108
|
+
const toMs = toArg ? startOfLocalDayUTC(tz, new Date(`${toArg}T12:00:00Z`)) : todayStart - 86400000
|
|
109
|
+
const fromMs = toMs - (days - 1) * 86400000
|
|
110
|
+
const dateFrom = localDateStr(tz, new Date(fromMs))
|
|
111
|
+
const dateTo = localDateStr(tz, new Date(toMs))
|
|
112
|
+
const row = { store: store.name, site, uid: store.user_id, currency: SITE_CURRENCY[site] || '', dateFrom, dateTo }
|
|
113
|
+
try {
|
|
114
|
+
const token = await refreshStoreToken(env, store, { onRotate: persistStores })
|
|
115
|
+
if (FLAG_LIST) {
|
|
116
|
+
const adv = await apiGet('/advertising/advertisers?product_id=PADS', token)
|
|
117
|
+
row.advertisers = (adv.advertisers || []).map((a) => ({ advertiser_id: a.advertiser_id, site: a.site_id, name: a.advertiser_name }))
|
|
118
|
+
results.push(row)
|
|
119
|
+
continue
|
|
120
|
+
}
|
|
121
|
+
const report = await fetchAdsReport({ apiGet, token, site, dateFrom, dateTo })
|
|
122
|
+
row.report = report
|
|
123
|
+
row.alerts = classifyAdsAlerts(report.totals, alertOpts)
|
|
124
|
+
results.push(row)
|
|
125
|
+
} catch (e) {
|
|
126
|
+
row.error = String(e.message || e)
|
|
127
|
+
results.push(row)
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// ── 输出 ───────────────────────────────────────────────────
|
|
132
|
+
const ok = results.filter((r) => !r.error)
|
|
133
|
+
if (!ok.length) {
|
|
134
|
+
if (FLAG_JSON) console.log(JSON.stringify({ results }, null, 2))
|
|
135
|
+
else for (const r of results) console.error(`✗ ${r.store}:${r.error}`)
|
|
136
|
+
process.exit(2)
|
|
137
|
+
}
|
|
138
|
+
if (FLAG_JSON) { console.log(JSON.stringify({ generatedAt: now.toISOString(), days, results }, null, 2)); process.exit(0) }
|
|
139
|
+
|
|
140
|
+
if (FLAG_LINES) {
|
|
141
|
+
for (const r of ok) {
|
|
142
|
+
const lines = adsCardLines(r.report, { currency: r.currency, alertOpts })
|
|
143
|
+
console.log(`### ${r.store}`)
|
|
144
|
+
console.log(lines.join('\n'))
|
|
145
|
+
}
|
|
146
|
+
process.exit(0)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (FLAG_LIST) {
|
|
150
|
+
for (const r of results) {
|
|
151
|
+
if (r.error) { console.log(`${r.store}: ✗ ${r.error}`); continue }
|
|
152
|
+
console.log(`${r.store}(${r.site}):` + (r.advertisers.length ? r.advertisers.map((a) => `${a.advertiser_id}(${a.site})`).join(', ') : '无广告主'))
|
|
153
|
+
}
|
|
154
|
+
process.exit(0)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const hdr = ['店铺', '站点', '花费', '销售额', 'ROAS', 'ACoS', '点击', 'CTR', '广告单量', '活动']
|
|
158
|
+
let text = `## 📣 Mercado Ads · ${ok[0].dateFrom} ~ ${ok[0].dateTo}(近 ${days} 天)\n\n`
|
|
159
|
+
text += '| ' + hdr.join(' | ') + ' |\n|' + hdr.map(() => '---').join('|') + '|\n'
|
|
160
|
+
const allAlerts = []
|
|
161
|
+
for (const r of results) {
|
|
162
|
+
if (r.error) { text += `| ${r.store} | ${r.site} | — | — | — | — | — | — | — | ✗ ${r.error.slice(0, 40)} |\n`; continue }
|
|
163
|
+
const t = r.report.totals
|
|
164
|
+
const c = r.currency ? r.currency + ' ' : ''
|
|
165
|
+
text += `| ${r.store} | ${r.site} | ${c}${fmtMoney(t.cost)} | ${c}${fmtMoney(t.amount)} | ${t.roas} | ${t.acos}% | ${t.clicks} | ${t.ctr}% | ${t.units} | ${t.campaigns} |\n`
|
|
166
|
+
for (const a of r.alerts) allAlerts.push({ store: r.store, ...a })
|
|
167
|
+
if (FLAG_DETAIL) {
|
|
168
|
+
for (const a of r.report.advertisers) {
|
|
169
|
+
const top = [...(a.topCampaigns.top || [])]
|
|
170
|
+
for (const cp of top) text += `| ↳ ${r.store}·${cp.name.slice(0, 24)} | ${a.advertiserId} | ${c}${fmtMoney(cp.cost)} | ${c}${fmtMoney(cp.amount)} | ${cp.roas} | ${cp.acos}% | ${cp.clicks} | — | ${cp.units} | — |\n`
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
text += '\n'
|
|
175
|
+
if (allAlerts.length) {
|
|
176
|
+
text += '### ⚠️ 告警\n'
|
|
177
|
+
for (const a of allAlerts) text += `- ${a.level === 'red' ? '🔴' : '🟡'} **${a.store}**:${a.text}\n`
|
|
178
|
+
} else {
|
|
179
|
+
text += '✅ 无告警(ACoS 与 ROAS 均在阈值内)\n'
|
|
180
|
+
}
|
|
181
|
+
console.log(text)
|
|
@@ -49,7 +49,7 @@ const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url))
|
|
|
49
49
|
// 其他站点域名实测被拦(403),后续逐个站点验证后更新此表。
|
|
50
50
|
const AUTH_HOSTS = {
|
|
51
51
|
MLM: 'auth.mercadolibre.com.mx',
|
|
52
|
-
MLB: 'auth.
|
|
52
|
+
MLB: 'auth.mercadolivre.com.br', // 2026-10-17 实测修正:巴西站点域名是 mercadolivre(auth.mercadolibre.com.br 无 DNS)
|
|
53
53
|
MLA: 'auth.mercadolibre.com.ar',
|
|
54
54
|
MLC: 'auth.mercadolibre.cl',
|
|
55
55
|
MCO: 'auth.mercadolibre.com.co',
|
|
@@ -1643,10 +1643,10 @@ def wd_list_stores(cfg: Config, creds: dict[str, str]) -> list[dict[str, Any]]:
|
|
|
1643
1643
|
"""getBrowserList → 与 stores.json 三方一致校验(storeName/storeId 逐项比对)。
|
|
1644
1644
|
|
|
1645
1645
|
**只对 stores.json 登记的店做严格校验**:缺店 / storeId 不一致 ⇒ 抛 WebDriverError
|
|
1646
|
-
|
|
1646
|
+
(说明客户端那边改名/删店/重建过,必须人工对齐)。
|
|
1647
1647
|
|
|
1648
|
-
|
|
1649
|
-
**正常现象,只 warn 不抛错**(2026-11-01 客户机实测:多 3
|
|
1648
|
+
客户端里**多出来**的店(Shopee/TikTok 等不归本流程管的店、或人工新建还没登记的店)是
|
|
1649
|
+
**正常现象,只 warn 不抛错**(2026-11-01 客户机实测:多 3 个非本流程店铺 ⇒ 授权探针把
|
|
1650
1650
|
"名单不一致"误判成"授权链路不可用",每 12h 推两条遥测告警。改名场景仍会由"缺店"
|
|
1651
1651
|
一侧判红,所以这条降级不会放过真故障)。
|
|
1652
1652
|
"""
|
|
@@ -1675,7 +1675,7 @@ def wd_list_stores(cfg: Config, creds: dict[str, str]) -> list[dict[str, Any]]:
|
|
|
1675
1675
|
fresh = [n for n in extra if n not in _EXTRA_WD_STORES_WARNED]
|
|
1676
1676
|
if fresh:
|
|
1677
1677
|
_EXTRA_WD_STORES_WARNED.update(fresh)
|
|
1678
|
-
print(f"⚠️
|
|
1678
|
+
print(f"⚠️ 客户端有 {len(extra)} 个店铺不在 stores.json(不纳入本流程,忽略):"
|
|
1679
1679
|
+ "、".join(extra)
|
|
1680
1680
|
+ "|若其中确有本流程的店 ⇒ 补 stores.json(否则该店永远不会被调度)",
|
|
1681
1681
|
file=sys.stderr, flush=True)
|
|
@@ -6,7 +6,10 @@ import { readdirSync, readFileSync, statSync } from 'node:fs'
|
|
|
6
6
|
import { join, relative, dirname } from 'node:path'
|
|
7
7
|
import { fileURLToPath } from 'node:url'
|
|
8
8
|
const REPO = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
9
|
-
|
|
9
|
+
// `archive/` 与 `attic` 同义:**退役留存件**(git 历史外的人工归档),不是运行期代码,
|
|
10
|
+
// 2026-11-01 清债时把三个一次性运维/发布脚本移进去 —— 它们硬编码旧数据目录,但永远不会被执行。
|
|
11
|
+
const SKIP = new Set(['.git', 'node_modules', 'dist', '__pycache__', 'attic', '.venv',
|
|
12
|
+
'docs', 'patches', 'tests', 'archive'])
|
|
10
13
|
const RE = /\.dsh\/argent|~\/\.dsh|\$HOME\/\.dsh|\$\{HOME\}\/\.dsh/
|
|
11
14
|
function walk(dir, out = []) {
|
|
12
15
|
for (const e of readdirSync(dir)) {
|
|
@@ -179,7 +179,7 @@ case "$wd_out$cred_out" in
|
|
|
179
179
|
esac
|
|
180
180
|
|
|
181
181
|
# 失败**性质**分开判:`名单不一致` 与 `授权/登录失效` 的处置完全不同。
|
|
182
|
-
# 2026-11-01
|
|
182
|
+
# 2026-11-01 客户机实测:客户端里多 3 个非本流程店铺(Shopee/TikTok)⇒ `wd_list_stores` 三方校验失败
|
|
183
183
|
# ⇒ 本探针把它写成"授权链路不可用",每 12h 推两条遥测告警(而授权链路其实 statusCode=0 全正常)。
|
|
184
184
|
_cred_kind=""
|
|
185
185
|
case "$cred_out" in
|
|
@@ -263,7 +263,7 @@ _gui_mode=0
|
|
|
263
263
|
case "$client_mode" in *GUI*) _gui_mode=1 ;; esac
|
|
264
264
|
{
|
|
265
265
|
if [ "$_cred_kind" = "store-mismatch" ]; then
|
|
266
|
-
echo "❌
|
|
266
|
+
echo "❌ **店铺名单与 stores.json 不一致** ⇒ 需要人工核对"
|
|
267
267
|
echo " 这**不是**授权/登录失效(applyAuth 已成功、客户端登录态正常);是两边的店铺清单对不上。"
|
|
268
268
|
elif [ "$_gui_mode" = "1" ] && case "$wd_out" in *FAIL*) true ;; *) false ;; esac; then
|
|
269
269
|
echo "❌ 紫鸟**当前是 GUI 模式**(人工打开过客户端)⇒ 常驻 WebDriver 模式被顶掉,IPC 不存在"
|
|
@@ -282,7 +282,7 @@ case "$client_mode" in *GUI*) _gui_mode=1 ;; esac
|
|
|
282
282
|
*) if [ "$_cred_kind" = "store-mismatch" ]; then
|
|
283
283
|
echo " ⇒ 判定:**名单不一致**(上面 AUTH 那行已逐项列出差异)"
|
|
284
284
|
echo " 处置:本流程要用的店 ⇒ 补 stores.json;不归本流程的店(Shopee/TikTok 等)⇒ 可忽略,"
|
|
285
|
-
echo "
|
|
285
|
+
echo " 新版本已把「客户端有、stores.json 无」降级为 warn,只有「stores.json 有、客户端无」才判红。"
|
|
286
286
|
else
|
|
287
287
|
case "$client_login" in
|
|
288
288
|
*尚未登录*|*CLIENT_LOGGED_OUT*) echo " ⇒ 判定:**客户端登录态失效**(这一层需要人点一次;WebDriver 自动化本身未必受影响)" ;;
|
|
@@ -306,8 +306,8 @@ case "$client_mode" in *GUI*) _gui_mode=1 ;; esac
|
|
|
306
306
|
_ledger_detail="紫鸟授权链路不可用且 zclaw login 自愈失败:IPC=${wd_out:0:60} AUTH=${cred_out:0:60}"
|
|
307
307
|
_tel_detail="紫鸟授权链路不可用(需人工;已尝试 zclaw login)"
|
|
308
308
|
if [ "$_cred_kind" = "store-mismatch" ]; then
|
|
309
|
-
_ledger_detail="
|
|
310
|
-
_tel_detail="
|
|
309
|
+
_ledger_detail="店铺名单与 stores.json 不一致(非授权失效):${cred_out:0:200}"
|
|
310
|
+
_tel_detail="店铺名单与 stores.json 不一致(需人工核对;非授权失效)"
|
|
311
311
|
fi
|
|
312
312
|
"$PY" "$REPO/scripts/flow_ledger.py" --case-id "auth__ziniao" --event blocked \
|
|
313
313
|
--by ziniao-auth-probe --detail "$_ledger_detail" >/dev/null 2>&1 || true
|
package/engine/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.8.0-rc.
|
|
1
|
+
export const VERSION = "0.8.0-rc.9"
|
|
@@ -3,6 +3,9 @@ plugins/argent-core/src/index.js ziniao 28
|
|
|
3
3
|
plugins/argent-core/src/index.js 紫鸟 6
|
|
4
4
|
plugins/argent-core/src/index.js 美客多 1
|
|
5
5
|
plugins/argent-core/src/index.js 鑫中航 1
|
|
6
|
+
plugins/argent-desktop/dist/client.js ziniao 1
|
|
7
|
+
plugins/argent-desktop/src/health.mjs ziniao 27
|
|
8
|
+
plugins/argent-desktop/src/health.mjs 紫鸟 3
|
|
6
9
|
plugins/argent-dsh/dist/client.js ziniao 6
|
|
7
10
|
plugins/argent-dsh/dist/client.js 紫鸟 5
|
|
8
11
|
plugins/argent-dsh/dist/client.js 美客多 11
|
|
@@ -73,6 +76,7 @@ scripts/entitlements.py 美客多 2
|
|
|
73
76
|
scripts/env_probe.py ziniao 5
|
|
74
77
|
scripts/env_probe.py 紫鸟 4
|
|
75
78
|
scripts/env_probe.py 美客多 1
|
|
79
|
+
scripts/erp_invoice_shadow.py lip_ 2
|
|
76
80
|
scripts/feishu-card.mjs wenyao 1
|
|
77
81
|
scripts/feishu-card.mjs 文鳐 1
|
|
78
82
|
scripts/fix-skill-frontmatter.py 美客多 1
|
|
@@ -132,6 +136,7 @@ scripts/flow_triage.py 文鳐 1
|
|
|
132
136
|
scripts/fulfillment.js mercadolibre 7
|
|
133
137
|
scripts/fulfillment.js ziniao 10
|
|
134
138
|
scripts/fulfillment.js 紫鸟 3
|
|
139
|
+
scripts/fulfillment_sites.py mercadolibre 1
|
|
135
140
|
scripts/init-ml.sh mercadolibre 1
|
|
136
141
|
scripts/init-ml.sh ziniao 85
|
|
137
142
|
scripts/init-ml.sh 紫鸟 65
|
|
@@ -152,7 +157,7 @@ scripts/invoice-table.sh 鑫中航 1
|
|
|
152
157
|
scripts/invoice_carrier_notice.py lip_ 4
|
|
153
158
|
scripts/invoice_carrier_notice.py 文鳐 1
|
|
154
159
|
scripts/invoice_carrier_notice.py 鑫中航 1
|
|
155
|
-
scripts/invoice_lip_runner.py lip_
|
|
160
|
+
scripts/invoice_lip_runner.py lip_ 45
|
|
156
161
|
scripts/invoice_lip_runner.py xzh- 3
|
|
157
162
|
scripts/invoice_lip_runner.py 紫鸟 5
|
|
158
163
|
scripts/invoice_lip_runner.py 鑫中航 19
|
|
@@ -196,13 +201,22 @@ scripts/orchestrator.py mercadolibre 4
|
|
|
196
201
|
scripts/orchestrator.py ziniao 95
|
|
197
202
|
scripts/orchestrator.py 紫鸟 101
|
|
198
203
|
scripts/orchestrator.py 美客多 3
|
|
204
|
+
scripts/orchestrator_br.py lip_ 25
|
|
205
|
+
scripts/orchestrator_br.py mercadolibre 4
|
|
206
|
+
scripts/orchestrator_br.py ziniao 95
|
|
207
|
+
scripts/orchestrator_br.py 紫鸟 104
|
|
208
|
+
scripts/orchestrator_br.py 美客多 4
|
|
199
209
|
scripts/p2-report-run.mjs 美客多 1
|
|
200
210
|
scripts/poll-fulfillment.sh ziniao 7
|
|
201
211
|
scripts/poll-fulfillment.sh 紫鸟 5
|
|
202
212
|
scripts/poll-invoice.sh 鑫中航 2
|
|
203
|
-
scripts/query_runner.py mercadolibre
|
|
213
|
+
scripts/query_runner.py mercadolibre 1
|
|
204
214
|
scripts/query_runner.py ziniao 16
|
|
205
215
|
scripts/query_runner.py 紫鸟 4
|
|
216
|
+
scripts/skuflow_invoice_runner.py wenyao 6
|
|
217
|
+
scripts/skuflow_invoice_runner.py xzh- 1
|
|
218
|
+
scripts/skuflow_invoice_runner.py 文鳐 4
|
|
219
|
+
scripts/skuflow_invoice_runner.py 鑫中航 5
|
|
206
220
|
scripts/telemetry.py wenyao 2
|
|
207
221
|
scripts/wenyao-browser.sh wenyao 28
|
|
208
222
|
scripts/wenyao-browser.sh 文鳐 2
|
package/package.json
CHANGED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Huangwei Mac 迁移前只读体检(不修改/不停止/不安装任何东西)
|
|
3
|
-
set -u
|
|
4
|
-
echo "=== Huangwei preflight $(date -Is) ==="
|
|
5
|
-
echo "host: $(hostname) / $(uname -m) / $(sw_vers -productVersion 2>/dev/null || true)"
|
|
6
|
-
echo
|
|
7
|
-
echo "--- DSH Desktop / web ---"
|
|
8
|
-
ls -ld "/Applications/DeepSeek Harness.app" 2>/dev/null || echo "no /Applications/DeepSeek Harness.app"
|
|
9
|
-
pgrep -fl "DeepSeek Harness|dsh web|dsh-web" 2>/dev/null | head -20 || true
|
|
10
|
-
echo "--- launch agents ---"
|
|
11
|
-
launchctl list 2>/dev/null | grep -iE 'dsh|argent|whyshu' | head -30 || true
|
|
12
|
-
echo
|
|
13
|
-
echo "--- dsh version ---"
|
|
14
|
-
command -v dsh >/dev/null && dsh --version 2>&1 | head -3 || echo "dsh not in PATH"
|
|
15
|
-
echo
|
|
16
|
-
echo "--- argent data identity (no token) ---"
|
|
17
|
-
python3 - <<'PY' 2>/dev/null || true
|
|
18
|
-
import json, os
|
|
19
|
-
p=os.path.expanduser('~/.dsh/argent/agent-report.json')
|
|
20
|
-
try:
|
|
21
|
-
d=json.load(open(p))
|
|
22
|
-
print('agent-report:', {k:d.get(k) for k in ('enabled','serverUrl','tenantAppId','machineId','machineName','chatEnabled')})
|
|
23
|
-
except Exception as e:
|
|
24
|
-
print('agent-report: missing/invalid', type(e).__name__)
|
|
25
|
-
PY
|
|
26
|
-
echo
|
|
27
|
-
echo "--- desktop profile packages ---"
|
|
28
|
-
python3 - <<'PY' 2>/dev/null || true
|
|
29
|
-
import json, os
|
|
30
|
-
p=os.path.expanduser('~/.dsh/profiles/desktop/package.json')
|
|
31
|
-
try:
|
|
32
|
-
d=json.load(open(p)); print('profile:', {k:d.get(k) for k in ('name','version')}); print('deps:', d.get('dependencies') or {})
|
|
33
|
-
except Exception as e:
|
|
34
|
-
print('profile: missing/invalid', type(e).__name__)
|
|
35
|
-
PY
|
|
36
|
-
echo
|
|
37
|
-
echo "--- global argent packages ---"
|
|
38
|
-
npm ls -g --depth=0 @whyshu 2>/dev/null | head -20 || true
|
|
39
|
-
echo
|
|
40
|
-
echo "--- installed engine/runtime ---"
|
|
41
|
-
ls -ld ~/.dsh/argent/engines/* 2>/dev/null | tail -10 || true
|
|
42
|
-
echo "READ-ONLY: nothing was changed."
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# 发布 0.8.0-rc.4 / desktop 0.2.2 / launcher 0.1.17
|
|
3
|
-
# 前置:npm login(有 @whyshu publish 权限);本脚本不会登录/读取 token。
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
DIR="${1:-/tmp/argent-release-0.8.0-rc.4}"
|
|
6
|
-
cd "$DIR"
|
|
7
|
-
shasum -a 256 -c <<'SUMS'
|
|
8
|
-
892652d5e43deb1cba6539dc81b3ed2f0cf4e8f081d70a084b40796041a9dbaf whyshu-argent-engine-0.8.0-rc.4.tgz
|
|
9
|
-
9333fa9255cd93ef5821d58858a63172374b63f8071dd27f723521b14cdfe826 whyshu-argent-desktop-0.2.2.tgz
|
|
10
|
-
3a0501f16882535208a7f56ef49c4e57b3fccc59661d8facf61b323d3270cec5 whyshu-argent-0.1.17.tgz
|
|
11
|
-
SUMS
|
|
12
|
-
npm whoami >/dev/null
|
|
13
|
-
npm publish whyshu-argent-engine-0.8.0-rc.4.tgz --access public
|
|
14
|
-
npm publish whyshu-argent-desktop-0.2.2.tgz --access public
|
|
15
|
-
npm publish whyshu-argent-0.1.17.tgz --access public
|
|
16
|
-
npm view @whyshu/argent-engine version
|
|
17
|
-
npm view @whyshu/argent-desktop version
|
|
18
|
-
npm view @whyshu/argent version
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# 发布后回验(只读 npm/本地包;不发布)
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
DIR="${1:-/tmp/argent-release-0.8.0-rc.4}"
|
|
5
|
-
echo "== npm versions =="
|
|
6
|
-
for p in @whyshu/argent-engine @whyshu/argent-desktop @whyshu/argent; do
|
|
7
|
-
printf '%s: ' "$p"; npm view "$p" version
|
|
8
|
-
done
|
|
9
|
-
echo
|
|
10
|
-
echo "== expected =="
|
|
11
|
-
echo "@whyshu/argent-engine 0.8.0-rc.4"
|
|
12
|
-
echo "@whyshu/argent-desktop 0.2.2"
|
|
13
|
-
echo "@whyshu/argent 0.1.17"
|
|
14
|
-
echo
|
|
15
|
-
echo "== tarballs =="
|
|
16
|
-
ls -lh "$DIR"/*.tgz
|