dsh-vibe-math 2.7.3 → 2.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.
- package/LICENSE +21 -21
- package/README.en.md +682 -682
- package/README.md +683 -683
- package/docs/AUDIT-CHECKLIST.md +758 -744
- package/docs/COMPAT-AUDIT-ROUND2.md +351 -351
- package/docs/COMPAT-AUDIT-ROUND3.md +154 -154
- package/docs/audit-methodology.md +93 -0
- package/docs/final-paper.md +172 -172
- package/docs/formal-verification.md +613 -588
- package/docs/generate_framework_diagram_v2.py +114 -114
- package/docs/generate_framework_diagram_v3.py +127 -127
- package/docs/math-computation.md +195 -194
- package/docs/release-notes/README.en.md +2 -0
- package/docs/release-notes/README.md +2 -0
- package/docs/release-notes/RELEASE-NOTES-2.0.22.md +112 -112
- package/docs/release-notes/RELEASE-NOTES-2.1.0.md +143 -143
- package/docs/release-notes/RELEASE-NOTES-2.2.0.md +266 -266
- package/docs/release-notes/RELEASE-NOTES-2.2.1.md +43 -43
- package/docs/release-notes/RELEASE-NOTES-2.2.2.md +88 -88
- package/docs/release-notes/RELEASE-NOTES-2.3.0.md +207 -207
- package/docs/release-notes/RELEASE-NOTES-2.3.1.md +134 -134
- package/docs/release-notes/RELEASE-NOTES-2.3.10.md +105 -105
- package/docs/release-notes/RELEASE-NOTES-2.3.11.md +57 -57
- package/docs/release-notes/RELEASE-NOTES-2.3.12.md +80 -80
- package/docs/release-notes/RELEASE-NOTES-2.3.2.md +145 -145
- package/docs/release-notes/RELEASE-NOTES-2.3.3.md +115 -115
- package/docs/release-notes/RELEASE-NOTES-2.3.4.md +69 -69
- package/docs/release-notes/RELEASE-NOTES-2.3.5.md +63 -63
- package/docs/release-notes/RELEASE-NOTES-2.3.6.md +66 -66
- package/docs/release-notes/RELEASE-NOTES-2.3.7.md +59 -59
- package/docs/release-notes/RELEASE-NOTES-2.3.8.md +45 -45
- package/docs/release-notes/RELEASE-NOTES-2.3.9.md +70 -70
- package/docs/release-notes/RELEASE-NOTES-2.8.0.en.md +65 -0
- package/docs/release-notes/RELEASE-NOTES-2.8.0.md +65 -0
- package/docs/release-notes/RELEASE-NOTES-2.8.1.en.md +49 -0
- package/docs/release-notes/RELEASE-NOTES-2.8.1.md +49 -0
- package/docs/release-playbook.md +111 -0
- package/docs/slv-playbook.md +117 -0
- package/docs/test-timing.md +158 -157
- package/docs//346/236/266/346/236/204/345/233/276.md +77 -77
- package/installer.js +792 -792
- package/package.json +18 -3
- package/prompt-corpus-v2/formal-verify-v2.json +2 -2
- package/prompt-corpus-v2/formal-verify-v2.md +4 -0
- package/prompt-corpus-v3/formal-verify-v3.json +7 -7
- package/prompt-corpus-v3/formal-verify-v3.md +14 -0
- package/prompt-corpus-v5/prompt-corpus-v5.json +61 -61
- package/prompt-corpus-v5/prompt-corpus-v5.md +122 -0
- package/scripts/clean-temp.mjs +234 -0
- package/scripts/release-check.mjs +181 -0
- package/tests/audit-engine-faces.mjs +298 -0
- package/tests/audit-formal-sensitivity.mjs +345 -342
- package/tests/audit-installer-compat.test.mjs +256 -256
- package/tests/audit-math-computation-sensitivity.mjs +1 -1
- package/tests/audit-persona-sensitivity.mjs +323 -323
- package/tests/audit-persona-surface.test.mjs +431 -431
- package/tests/audit-prompt-duplication.mutants.mjs +3 -2
- package/tests/audit-prompt-invariants.mjs +589 -546
- package/tests/audit-registration.mjs +78 -78
- package/tests/audit-spec-traceability.mjs +193 -193
- package/tests/audit-status-report-fields.mjs +172 -172
- package/tests/audit-v5-integrity.mjs +795 -795
- package/tests/audit-v5-sensitivity.mjs +433 -432
- package/tests/e2e-v5-round2.test.mjs +2453 -2426
- package/tests/formal-verify-v2.test.mjs +1806 -1800
- package/tests/formal-verify-v3.test.mjs +1757 -1750
- package/tests/formal-verify-v4.test.mjs +2114 -2106
- package/tests/formal-verify-v5.test.mjs +774 -767
- package/tests/math-computation-discovery.mutants.mjs +3 -3
- package/tests/math-computation-shared.test.mjs +122 -5
- package/tests/math-computation-v2.test.mjs +14 -2
- package/tests/math-computation-v3.test.mjs +14 -2
- package/tests/math-computation-v4.test.mjs +739 -739
- package/tests/prompt-v5-integrity.test.mjs +1291 -1291
- package/tests/release-check.mutants.mjs +78 -0
- package/tests/run-tests.mjs +393 -332
- package/tests/selfdrive-v5.mjs +560 -560
- package/tests/temp-hygiene.mutants.mjs +80 -0
- package/tests/v2-fix-probes.mutants.mjs +4 -0
- package/tests/v2-fix-probes.test.mjs +1034 -1033
- package/tests/v2v3-interrupt.mutants.mjs +111 -0
- package/tests/v3-fix-probes.mutants.mjs +99 -95
- package/tests/v3-fix-probes.test.mjs +891 -890
- package/tests/v4-final-paper.mutants.mjs +116 -0
- package/tests/v4-final-paper.test.mjs +628 -0
- package/tests/v5-institute-fixes.mutants.mjs +218 -190
- package/vibe-math-v2/agent.cordis.yml +376 -376
- package/vibe-math-v2/math-computation.js +17 -15
- package/vibe-math-v2/preset.yml +2 -2
- package/vibe-math-v2/v2/347/232/204/351/242/235/345/244/226/350/246/201/346/261/202.txt +21 -21
- package/vibe-math-v2/vibe-math-v2.js +5078 -5011
- package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +486 -486
- package/vibe-math-v3/agent.cordis.yml +420 -420
- package/vibe-math-v3/math-computation.js +17 -15
- package/vibe-math-v3/preset.yml +2 -2
- package/vibe-math-v3/vibe-math-v3.js +6215 -6149
- package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +649 -649
- package/vibe-math-v4/agent.cordis.yml +438 -438
- package/vibe-math-v4/math-computation.js +17 -15
- package/vibe-math-v4/preset.yml +2 -2
- package/vibe-math-v4/vibe-math-v4.js +4520 -4422
- package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +1015 -1015
- package/vibe-math-v5/math-computation.js +17 -15
- package/vibe-math-v5/vibe-math-v5.js +93 -11
- package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +1728 -1728
- package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +693 -693
|
@@ -405,12 +405,12 @@ export async function probeMathEngines(host, opts) {
|
|
|
405
405
|
if (name === 'cli') continue // cli needs a caller-supplied command, so it is not auto-detected
|
|
406
406
|
const hit = await resolveCandidate(H, d)
|
|
407
407
|
if (!hit) continue
|
|
408
|
-
const v = await probeVersion(H, d, hit)
|
|
408
|
+
const v = await probeVersion(H, d, hit.exe)
|
|
409
409
|
if (!v.ok) {
|
|
410
410
|
if (d.license === 'commercial') continue // installed but not usable: reported by op=run as LICENSE_REQUIRED
|
|
411
411
|
continue
|
|
412
412
|
}
|
|
413
|
-
engines.push(Object.assign({ name: name, version: v.version, path: hit, license: d.license }, verifyFields(name)))
|
|
413
|
+
engines.push(Object.assign({ name: name, version: v.version, path: hit.exe, foundVia: hit.via, license: d.license }, verifyFields(name)))
|
|
414
414
|
}
|
|
415
415
|
const result = { ok: true, engines: engines, available: engines.length > 0 }
|
|
416
416
|
PROBE_CACHE.set(H, result)
|
|
@@ -461,7 +461,9 @@ async function knownInstallCandidates(H, engineName) {
|
|
|
461
461
|
if (Array.isArray(r)) injected = r.filter((x) => typeof x === 'string' && x)
|
|
462
462
|
} catch (e) { injected = null }
|
|
463
463
|
}
|
|
464
|
-
|
|
464
|
+
// A JS empty array is TRUTHY: a host that answers `[]` must fall back to the built-in table,
|
|
465
|
+
// otherwise the whole per-OS stage is silently suppressed (task-2).
|
|
466
|
+
const roots = (Array.isArray(injected) && injected.length) ? injected : mathInstallRoots(engineName, env, win)
|
|
465
467
|
const exts = win ? ['', '.exe', '.cmd'] : ['']
|
|
466
468
|
const out = []
|
|
467
469
|
const listNames = async (dir, kind) => {
|
|
@@ -491,17 +493,17 @@ async function resolveCandidate(H, d) {
|
|
|
491
493
|
for (const c of cands) {
|
|
492
494
|
try {
|
|
493
495
|
const p = await H.resolveExecutable(c)
|
|
494
|
-
if (typeof p === 'string' && p) return p
|
|
496
|
+
if (typeof p === 'string' && p) return { exe: p, via: 'path' }
|
|
495
497
|
} catch (e) { /* not this one */ }
|
|
496
498
|
}
|
|
497
499
|
// round-7 (fix 2): DSH ships its own runtimes; PATH always wins, so this is a LAST resort. The
|
|
498
500
|
// tree name is globbed (never hard-coded) and executable names come from the descriptor candidates.
|
|
499
501
|
for (const p of await dshRuntimeCandidates(H, d.name)) {
|
|
500
|
-
if (typeof p === 'string' && p) return p
|
|
502
|
+
if (typeof p === 'string' && p) return { exe: p, via: 'host-runtime' }
|
|
501
503
|
}
|
|
502
504
|
// round-9: then the known per-OS install locations (an engine installed without touching PATH).
|
|
503
505
|
for (const p of await knownInstallCandidates(H, d.name)) {
|
|
504
|
-
if (typeof p === 'string' && p) return p
|
|
506
|
+
if (typeof p === 'string' && p) return { exe: p, via: 'known-install' }
|
|
505
507
|
}
|
|
506
508
|
return null
|
|
507
509
|
}
|
|
@@ -660,16 +662,16 @@ async function resolveEngine(H, requested, params, args) {
|
|
|
660
662
|
cliProbe = fv.diag || null
|
|
661
663
|
if (fv.ok) cliVersion = fv.version
|
|
662
664
|
}
|
|
663
|
-
return { ok: true, name: name, desc: d, exe: exe, version: cliVersion, family: fam || null, probe: cliProbe }
|
|
665
|
+
return { ok: true, name: name, desc: d, exe: exe, version: cliVersion, family: fam || null, probe: cliProbe, via: 'cli' }
|
|
664
666
|
}
|
|
665
667
|
const hit = await resolveCandidate(H, d)
|
|
666
668
|
if (!hit) continue
|
|
667
|
-
const v = await probeVersionWithRetry(H, d, hit)
|
|
669
|
+
const v = await probeVersionWithRetry(H, d, hit.exe)
|
|
668
670
|
if (!v.ok) {
|
|
669
671
|
if (d.license === 'commercial' || d.versionOptional) {
|
|
670
|
-
const lic = await checkLicence(H, d, hit)
|
|
672
|
+
const lic = await checkLicence(H, d, hit.exe)
|
|
671
673
|
if (!lic.ok) return fail('MATH_ENGINE_LICENSE_REQUIRED', name, name + ' 已安装但许可不可用(仅厂商可激活)', { next: next('vendor', Object.assign({ engine: name, url: d.vendor || '' }, verifyFields(name))) })
|
|
672
|
-
return { ok: true, name: name, desc: d, exe: hit, version: 'unknown' }
|
|
674
|
+
return { ok: true, name: name, desc: d, exe: hit.exe, version: 'unknown', via: hit.via }
|
|
673
675
|
}
|
|
674
676
|
// round-7 (live-session fix): the engine WAS found - so an install guide would be misleading
|
|
675
677
|
// (the user does not need to install anything; the host path is what failed). Report the probe
|
|
@@ -679,9 +681,9 @@ async function resolveEngine(H, requested, params, args) {
|
|
|
679
681
|
next: next('note', { guidance: '引擎已找到但探测失败:请检查宿主 subprocess 通路(冷启动/超时/权限),或用 mathEngineOverride 调整 versionArgv 模板;已装的引擎不需要重装。' }),
|
|
680
682
|
})
|
|
681
683
|
}
|
|
682
|
-
const lic = await checkLicence(H, d, hit)
|
|
684
|
+
const lic = await checkLicence(H, d, hit.exe)
|
|
683
685
|
if (!lic.ok) return fail('MATH_ENGINE_LICENSE_REQUIRED', name, name + ' 已安装但许可不可用(仅厂商可激活)', { next: next('vendor', Object.assign({ engine: name, url: d.vendor || '' }, verifyFields(name))) })
|
|
684
|
-
return { ok: true, name: name, desc: d, exe: hit, version: v.version }
|
|
686
|
+
return { ok: true, name: name, desc: d, exe: hit.exe, version: v.version, via: hit.via }
|
|
685
687
|
}
|
|
686
688
|
const first = requested === 'auto' ? (params.mathEngines[0] || 'python') : requested
|
|
687
689
|
return fail('MATH_ENGINE_NOT_FOUND', first, '本机没有可用的计算引擎(试过:' + names.join(', ') + ')', { next: await userInstallNext(H, first) })
|
|
@@ -967,7 +969,7 @@ async function opProbe(H, args, params) {
|
|
|
967
969
|
if (chosen && chosen.ok && !engines.some((e) => e.name === chosen.name)) {
|
|
968
970
|
engines.push(Object.assign({ name: chosen.name, path: chosen.exe, version: chosen.version, license: (MATH_ENGINES[chosen.name] || {}).license }, verifyFields(chosen.name)))
|
|
969
971
|
}
|
|
970
|
-
const engineInfo = (chosen && chosen.ok) ? Object.assign({ name: chosen.name, path: chosen.exe, version: chosen.version }, verifyFields(chosen.name)) : null
|
|
972
|
+
const engineInfo = (chosen && chosen.ok) ? Object.assign({ name: chosen.name, path: chosen.exe, version: chosen.version, foundVia: chosen.via }, verifyFields(chosen.name)) : null
|
|
971
973
|
// round-9 (F3): the availability line must never be silently partial - name the CONFIGURED engines
|
|
972
974
|
// that were not found (and why), instead of just listing the ones that happened to resolve.
|
|
973
975
|
const foundNames = engines.map((e) => e.name)
|
|
@@ -1000,7 +1002,7 @@ async function opRun(H, args, params) {
|
|
|
1000
1002
|
const det = await resolveEngine(H, args.engine || 'auto', params, args)
|
|
1001
1003
|
if (!det.ok) return det
|
|
1002
1004
|
const desc = applyOverride(det, params, args)
|
|
1003
|
-
const det2 = { ok: true, name: det.name, desc: desc, exe: det.exe, version: det.version }
|
|
1005
|
+
const det2 = { ok: true, name: det.name, desc: desc, exe: det.exe, version: det.version, via: det.via }
|
|
1004
1006
|
// The generic escape hatch is recorded as `cli:<command>` (spec §4.3 / guards §18): the model and
|
|
1005
1007
|
// the receipt must be able to tell WHICH command was run, not just that it was "cli".
|
|
1006
1008
|
const cliCommand = args.cli && typeof args.cli.command === 'string' ? args.cli.command : ''
|
|
@@ -1118,7 +1120,7 @@ async function opRun(H, args, params) {
|
|
|
1118
1120
|
schema: 'vibe-math/math-computation-receipt@1',
|
|
1119
1121
|
runId: runId, preset: H.designator, project: slug(root), op: 'run', mode: mode,
|
|
1120
1122
|
attempt: attempt, attemptDir: dir, baseRunDir: baseDir,
|
|
1121
|
-
engine: { name: engineLabel, path: det.exe, version: det.version, source: det.name === 'cli' ? 'cli' : 'path' },
|
|
1123
|
+
engine: { name: engineLabel, path: det.exe, version: det.version, source: det.name === 'cli' ? 'cli' : 'path', foundVia: det2.via },
|
|
1122
1124
|
script: { path: scriptRel, sha256: scriptHash, bytes: Buffer.byteLength(scriptText, 'utf8') },
|
|
1123
1125
|
scriptPath: scriptRel, scriptHash: scriptHash,
|
|
1124
1126
|
// round-8 (P0/D3): member file tools are session-cwd relative, so the ABSOLUTE locations must be
|
package/vibe-math-v4/preset.yml
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
name: Vibe Math V4
|
|
2
|
-
description: 常驻自组织合作研究框架(第四代架构):一组持久化常驻子代理互相留言、集体开会,自主决定一切任务安排;各自沉淀 progress/命题/方法/子问题库并互相查阅;验证仅当全体常驻一致(真或假)才写入 Verified/,否则留库附概率;上下文达阈值自动 /compact;仅当全体一致认为原问题已解决才停止;断点续跑、多会话隔离、可随时人工干预/增开关闭常驻。
|
|
1
|
+
name: Vibe Math V4
|
|
2
|
+
description: 常驻自组织合作研究框架(第四代架构):一组持久化常驻子代理互相留言、集体开会,自主决定一切任务安排;各自沉淀 progress/命题/方法/子问题库并互相查阅;验证仅当全体常驻一致(真或假)才写入 Verified/,否则留库附概率;上下文达阈值自动 /compact;仅当全体一致认为原问题已解决才停止;断点续跑、多会话隔离、可随时人工干预/增开关闭常驻。
|