@whyshu/argent-engine 0.8.0-rc.8 → 0.13.27
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 +109 -43
- package/bin/runtime-install.mjs +92 -0
- package/engine/VERSION +1 -1
- package/engine/configs/billing-actions.json +30 -0
- package/engine/configs/mcp-tools.snapshot.json +47 -0
- package/engine/core/contracts/argent.contracts.json +3 -3
- package/engine/core/contracts/verbs.schema.json +64 -1
- package/engine/core/lib/account-token.mjs +37 -0
- package/engine/core/lib/contract.mjs +30 -0
- package/engine/core/lib/redact.mjs +34 -0
- package/engine/core/mcp/billing-upload.mjs +77 -0
- package/engine/core/mcp/erp-server.mjs +300 -0
- package/engine/core/mcp/gateway.mjs +333 -0
- package/engine/core/mcp/meter.mjs +101 -0
- package/engine/core/mcp/server.mjs +416 -2
- package/engine/core/mcp/vault.mjs +78 -0
- package/engine/scripts/appointment-worker.mjs +456 -35
- package/engine/scripts/appointment_grab.py +1389 -264
- package/engine/scripts/appointment_rules.py +118 -0
- package/engine/scripts/argent-timers.mjs +227 -0
- package/engine/scripts/argent-web-preflight.mjs +123 -0
- package/engine/scripts/argent-web-verify.mjs +105 -0
- package/engine/scripts/billing-upload.mjs +26 -0
- package/engine/scripts/build-doc-index.mjs +68 -0
- package/engine/scripts/build-engine-package.mjs +7 -1
- package/engine/scripts/capability-packs.lock.json +323 -300
- package/engine/scripts/check-docs-drift.mjs +51 -4
- package/engine/scripts/check-version-consistency.mjs +14 -1
- package/engine/scripts/ci-run.sh +2 -2
- package/engine/scripts/collect-intel.mjs +108 -0
- package/engine/scripts/daily-report-timer-plist.sh +18 -4
- package/engine/scripts/daily-report-timers.sh +36 -3
- package/engine/scripts/daily-report.mjs +78 -2
- package/engine/scripts/doc-status.mjs +212 -0
- package/engine/scripts/dsh-web-doctor.mjs +84 -0
- package/engine/scripts/engine-manifest.mjs +90 -0
- package/engine/scripts/engine-runtime-install.mjs +92 -0
- package/engine/scripts/erp-ui-install.mjs +127 -0
- package/engine/scripts/erp-ui-preflight.mjs +104 -0
- package/engine/scripts/erp-ui-verify.mjs +135 -0
- package/engine/scripts/flow-requirements.json +122 -99
- package/engine/scripts/full-exec-worker.mjs +251 -0
- package/engine/scripts/gen-preset-rows.mjs +1 -1
- package/engine/scripts/invoice_lip_runner.py +1 -0
- package/engine/scripts/invoice_runner.py +17 -6
- package/engine/scripts/invoice_stageb.py +21 -4
- package/engine/scripts/lib/bootcheck-wiring.mjs +7 -5
- package/engine/scripts/lib/intel-card.mjs +43 -0
- package/engine/scripts/lib/invoice_names.py +23 -0
- package/engine/scripts/lib/ml-ads-core.mjs +100 -18
- package/engine/scripts/lib/ml-ads-rules.mjs +275 -0
- package/engine/scripts/lib/ml-bridge-auth.mjs +50 -0
- package/engine/scripts/lib/ml-category-core.mjs +120 -0
- package/engine/scripts/lib/ml-insight-core.mjs +621 -0
- package/engine/scripts/lib/ml-insight-facts.mjs +424 -0
- package/engine/scripts/lib/ml-items.mjs +40 -0
- package/engine/scripts/lib/ml-listing-core.mjs +342 -0
- package/engine/scripts/lib/ml-market-core.mjs +774 -0
- package/engine/scripts/lib/plugin-packages.mjs +13 -0
- package/engine/scripts/lib/webdriver_ipc.py +61 -1
- package/engine/scripts/line_pack.py +196 -0
- package/engine/scripts/mcp-gateway-switch.mjs +100 -0
- package/engine/scripts/migrate-providers.mjs +3 -3
- package/engine/scripts/ml-ads-advice.mjs +140 -0
- package/engine/scripts/ml-ads.mjs +221 -0
- package/engine/scripts/ml-category-baseline.mjs +174 -0
- package/engine/scripts/ml-insight-diagnose.mjs +247 -0
- package/engine/scripts/ml-insight-run.sh +183 -0
- package/engine/scripts/ml-insight-timers.sh +224 -0
- package/engine/scripts/ml-listing-audit.mjs +170 -0
- package/engine/scripts/ml-market-matrix.mjs +84 -0
- package/engine/scripts/ml-market-snapshot.mjs +261 -0
- package/engine/scripts/ml-messages.mjs +145 -0
- package/engine/scripts/ml-oauth-setup.mjs +1 -1
- package/engine/scripts/npm-publish-argent.mjs +14 -0
- package/engine/scripts/ops-codefix-pr.mjs +87 -0
- package/engine/scripts/ops-codefix-queue.mjs +30 -0
- package/engine/scripts/ops-digest.mjs +98 -0
- package/engine/scripts/ops-verify.mjs +67 -0
- package/engine/scripts/orchestrator.py +410 -20
- package/engine/scripts/orchestrator_br.py +146 -4
- package/engine/scripts/plugin-bootcheck.mjs +50 -1
- package/engine/scripts/publish-engine.mjs +111 -0
- package/engine/scripts/restart-dsh-with-tunnel.sh +129 -0
- package/engine/scripts/skuflow_invoice_runner.py +43 -3
- package/engine/scripts/v0.9-acceptance.mjs +107 -0
- package/engine/scripts/vertical-lint.mjs +12 -1
- package/engine/scripts/web-switch.mjs +121 -0
- package/engine/scripts/wenyao_fill_template.py +52 -15
- package/engine/scripts/wenyao_run.py +2 -1
- package/engine/skills/README.md +3 -3
- package/engine/skills/bilibili-upload/SKILL.md +109 -0
- package/engine/skills/douyin-upload/SKILL.md +74 -0
- package/engine/skills/internal.json +28 -0
- package/engine/skills/kuaishou-upload/SKILL.md +109 -0
- package/engine/skills/ml-appointment-safety/SKILL.md +42 -0
- package/engine/skills/ml-full-appointment/SKILL.md +23 -0
- package/engine/skills/ml-invoice/SKILL.md +2 -2
- package/engine/skills/ml-invoice/references/template-fill-contract.md +1 -1
- package/engine/skills/ml-label-recovery/SKILL.md +43 -0
- package/engine/skills/ml-listing-audit/SKILL.md +66 -0
- package/engine/skills/ml-store-daily-report/SKILL.md +68 -0
- package/engine/skills/ml-store-daily-report/scripts/generate.js +35 -0
- package/engine/skills/ml-store-insight/SKILL.md +81 -0
- package/engine/skills/tencent-upload/SKILL.md +60 -0
- package/engine/skills/weibo-upload/SKILL.md +106 -0
- package/engine/skills/whyshu-social-ops/SKILL.md +136 -0
- package/engine/skills/xiaohongshu-upload/SKILL.md +122 -0
- package/engine/version.mjs +1 -1
- package/engine/verticals/README.md +7 -0
- package/engine/verticals/_engine-words.baseline.txt +27 -59
- package/engine/verticals/mercadolibre/manifest.json +132 -6
- package/package.json +5 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* build-doc-index.mjs —— 把 docs 的状态分布写进 INDEX.md 的自动区块(幂等)
|
|
4
|
+
*
|
|
5
|
+
* 背景(2026-11-02):索引里手写的"当前有效/历史"两份清单会漂(曾写死 0.7.6)。
|
|
6
|
+
* 本脚本只生成**状态总览**,手写清单仍保留(下一步再整体替换)。
|
|
7
|
+
*
|
|
8
|
+
* 用法:
|
|
9
|
+
* node scripts/build-doc-index.mjs # 写入(默认)
|
|
10
|
+
* node scripts/build-doc-index.mjs --check # 只校验是否最新(CI/门禁用,不同步则 exit 1)
|
|
11
|
+
*/
|
|
12
|
+
import { readFileSync, writeFileSync } from 'node:fs'
|
|
13
|
+
import { execFileSync } from 'node:child_process'
|
|
14
|
+
|
|
15
|
+
const ROOT = new URL('..', import.meta.url).pathname
|
|
16
|
+
const INDEX = ROOT + 'docs/INDEX.md'
|
|
17
|
+
const CHECK = process.argv.includes('--check')
|
|
18
|
+
const BEGIN = '<!-- BEGIN:DOC-STATUS(自动生成:node scripts/build-doc-index.mjs,勿手改) -->'
|
|
19
|
+
const END = '<!-- END:DOC-STATUS -->'
|
|
20
|
+
|
|
21
|
+
const out = execFileSync(process.execPath, [ROOT + 'scripts/doc-status.mjs', '--json'], { encoding: 'utf8' })
|
|
22
|
+
const { version, counts, rows } = JSON.parse(out)
|
|
23
|
+
const total = rows.length
|
|
24
|
+
const label = {
|
|
25
|
+
current: '现行口径(照它做)',
|
|
26
|
+
superseded: '已被取代(跟指针走)',
|
|
27
|
+
historical: '仅作证据(不构成操作依据)',
|
|
28
|
+
draft: '未定稿(禁止据此操作)',
|
|
29
|
+
'needs-review': '⚠️ 待人工判定(尚无 status)',
|
|
30
|
+
}
|
|
31
|
+
const order = ['current', 'superseded', 'historical', 'draft', 'needs-review']
|
|
32
|
+
const pending = rows.filter((r) => r.status === 'needs-review')
|
|
33
|
+
|
|
34
|
+
const lines = [
|
|
35
|
+
BEGIN,
|
|
36
|
+
`> 自动生成于 \`VERSION=${version}\`;共 **${total}** 篇。手改会被下次生成覆盖。`,
|
|
37
|
+
'',
|
|
38
|
+
'| status | 篇数 | 含义 |',
|
|
39
|
+
'|---|---:|---|',
|
|
40
|
+
...order.filter((k) => counts[k]).map((k) => `| \`${k}\` | ${counts[k]} | ${label[k]} |`),
|
|
41
|
+
'',
|
|
42
|
+
]
|
|
43
|
+
if (pending.length) {
|
|
44
|
+
lines.push('<details><summary>待判定的 ' + pending.length + ' 篇(点开)</summary>', '')
|
|
45
|
+
for (const r of pending) lines.push(`- \`${r.file}\``)
|
|
46
|
+
lines.push('', '</details>')
|
|
47
|
+
}
|
|
48
|
+
lines.push(END)
|
|
49
|
+
const block = lines.join('\n')
|
|
50
|
+
|
|
51
|
+
const text = readFileSync(INDEX, 'utf8')
|
|
52
|
+
const i = text.indexOf(BEGIN)
|
|
53
|
+
const j = text.indexOf(END)
|
|
54
|
+
if (i < 0 || j < 0) {
|
|
55
|
+
console.error('❌ INDEX.md 缺少 DOC-STATUS 标记,先补标记再运行')
|
|
56
|
+
process.exit(2)
|
|
57
|
+
}
|
|
58
|
+
const next = text.slice(0, i) + block + text.slice(j + END.length)
|
|
59
|
+
if (next === text) {
|
|
60
|
+
console.log('✓ 状态总览已是最新')
|
|
61
|
+
process.exit(0)
|
|
62
|
+
}
|
|
63
|
+
if (CHECK) {
|
|
64
|
+
console.error('❌ INDEX.md 的状态总览过期:请运行 node scripts/build-doc-index.mjs')
|
|
65
|
+
process.exit(1)
|
|
66
|
+
}
|
|
67
|
+
writeFileSync(INDEX, next)
|
|
68
|
+
console.log(`✓ 已更新 INDEX.md 状态总览(${total} 篇)`)
|
|
@@ -53,7 +53,8 @@ function pkgManifest() {
|
|
|
53
53
|
description: 'Argent 引擎(L1):流程/台账/重试/守卫/审计/浏览器自动化 —— 逐字节来自 argent-dsh 仓库',
|
|
54
54
|
type: 'module',
|
|
55
55
|
engines: { node: '>=20' },
|
|
56
|
-
files: ['engine/', 'MANIFEST.json', 'requirements.txt'],
|
|
56
|
+
files: ['engine/', 'bin/', 'MANIFEST.json', 'requirements.txt'],
|
|
57
|
+
bin: { 'argent-engine-runtime': 'bin/runtime-install.mjs' },
|
|
57
58
|
exports: {
|
|
58
59
|
'./version': './engine/version.mjs',
|
|
59
60
|
'./registry': './engine/scripts/lib/registry.mjs',
|
|
@@ -87,6 +88,11 @@ export function build(outDir) {
|
|
|
87
88
|
// Python 侧车需求清单(复核批指出缺口:包内没有需求清单,客户机无法装运行时)
|
|
88
89
|
const REQS = ['openpyxl', 'pyyaml', 'pillow', 'playwright', 'selenium']
|
|
89
90
|
writeFileSync(join(outDir, 'requirements.txt'), REQS.join('\n') + '\n')
|
|
91
|
+
// 自带 runtime 安装器(替代已退役启动器):客户机 npx 自拉即可更新 ~/.argent-dsh
|
|
92
|
+
mkdirSync(join(outDir, 'bin'), { recursive: true })
|
|
93
|
+
const installer = readFileSync(join(REPO, 'scripts', 'engine-runtime-install.mjs'))
|
|
94
|
+
writeFileSync(join(outDir, 'bin', 'runtime-install.mjs'), installer)
|
|
95
|
+
chmodSync(join(outDir, 'bin', 'runtime-install.mjs'), 0o755)
|
|
90
96
|
writeFileSync(join(outDir, 'package.json'), pkgManifest())
|
|
91
97
|
writeFileSync(join(outDir, 'MANIFEST.json'), JSON.stringify(manifest, null, 2) + '\n')
|
|
92
98
|
return { outDir, count: files.length, manifest }
|