zyntry-verdict 0.1.5 → 0.1.6
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/bin/zv.mjs +107 -32
- package/package.json +2 -1
package/bin/zv.mjs
CHANGED
|
@@ -938,6 +938,49 @@ function printVerdict(summary) {
|
|
|
938
938
|
console.log(" └──────────────────────────────────────────────");
|
|
939
939
|
}
|
|
940
940
|
|
|
941
|
+
// --- update check (cached 24h, silent on failure) ----------------------------
|
|
942
|
+
|
|
943
|
+
const VERSION = JSON.parse(
|
|
944
|
+
await readFile(new URL("../package.json", import.meta.url), "utf8"),
|
|
945
|
+
).version;
|
|
946
|
+
|
|
947
|
+
function isNewer(current, latest) {
|
|
948
|
+
const a = String(current).split(".").map(Number);
|
|
949
|
+
const b = String(latest).split(".").map(Number);
|
|
950
|
+
for (let i = 0; i < 3; i++) {
|
|
951
|
+
if ((b[i] ?? 0) > (a[i] ?? 0)) return true;
|
|
952
|
+
if ((b[i] ?? 0) < (a[i] ?? 0)) return false;
|
|
953
|
+
}
|
|
954
|
+
return false;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
async function notifyUpdate() {
|
|
958
|
+
try {
|
|
959
|
+
const cachePath = join(homedir(), ".zyntry", "update-check.json");
|
|
960
|
+
let cache = {};
|
|
961
|
+
try {
|
|
962
|
+
cache = JSON.parse(await readFile(cachePath, "utf8"));
|
|
963
|
+
} catch {}
|
|
964
|
+
if (cache.checkedAt && Date.now() - cache.checkedAt < 24 * 60 * 60 * 1000) {
|
|
965
|
+
if (cache.latest && isNewer(VERSION, cache.latest)) {
|
|
966
|
+
console.log(DIM(` update available: ${VERSION} -> ${cache.latest} (npx zyntry-verdict@latest)`));
|
|
967
|
+
}
|
|
968
|
+
return;
|
|
969
|
+
}
|
|
970
|
+
const res = await fetch("https://registry.npmjs.org/zyntry-verdict", {
|
|
971
|
+
headers: { Accept: "application/vnd.npm.install-v1+json" },
|
|
972
|
+
});
|
|
973
|
+
const data = await res.json();
|
|
974
|
+
const latest = data?.["dist-tags"]?.latest;
|
|
975
|
+
await writeFile(cachePath, JSON.stringify({ checkedAt: Date.now(), latest })).catch(() => {});
|
|
976
|
+
if (latest && isNewer(VERSION, latest)) {
|
|
977
|
+
console.log(DIM(` update available: ${VERSION} -> ${latest} (npx zyntry-verdict@latest)`));
|
|
978
|
+
}
|
|
979
|
+
} catch {
|
|
980
|
+
// offline or blocked: never nag on failure
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
|
|
941
984
|
// --- entry ----------------------------------------------------------------------
|
|
942
985
|
|
|
943
986
|
const argv = process.argv.slice(2);
|
|
@@ -947,7 +990,7 @@ let command = null;
|
|
|
947
990
|
for (let i = 0; i < argv.length; i++) {
|
|
948
991
|
if (argv[i].startsWith("--")) {
|
|
949
992
|
const name = argv[i].slice(2);
|
|
950
|
-
if (name === "gateway" || name === "mode" || name === "key" || name === "baseUrl" || name === "case" || name === "debounce") {
|
|
993
|
+
if (name === "gateway" || name === "mode" || name === "key" || name === "baseUrl" || name === "case" || name === "debounce" || name === "email") {
|
|
951
994
|
flags[name] = argv[i + 1];
|
|
952
995
|
i += 1;
|
|
953
996
|
} else {
|
|
@@ -960,7 +1003,66 @@ for (let i = 0; i < argv.length; i++) {
|
|
|
960
1003
|
}
|
|
961
1004
|
}
|
|
962
1005
|
|
|
1006
|
+
if (!command) {
|
|
1007
|
+
// Welcome: the hook, then the exact path, then the command list.
|
|
1008
|
+
console.log(GOLD("⚖ ZYNTRY VERDICT") + DIM(" the AI courtroom for your code"));
|
|
1009
|
+
console.log("");
|
|
1010
|
+
console.log(" Claims need failing tests to prove them. The standard is sealed:");
|
|
1011
|
+
console.log(" the agents being judged cannot read or run the tests that judge them.");
|
|
1012
|
+
console.log("");
|
|
1013
|
+
console.log(` ${BOLD("Same model, same budget:")} single agent missed the flaw 0 of 3 runs.`);
|
|
1014
|
+
console.log(` ${BOLD("Three adversarial agents:")} caught it 3 of 3.`);
|
|
1015
|
+
console.log("");
|
|
1016
|
+
console.log(BOLD(" Start (free $1 trial credit, no card):"));
|
|
1017
|
+
console.log(" 1. zyntry-verdict signup create your key");
|
|
1018
|
+
console.log(" 2. zyntry-verdict init scan YOUR repo, generate its case");
|
|
1019
|
+
console.log(" 3. zyntry-verdict run three agents review your code, live");
|
|
1020
|
+
console.log("");
|
|
1021
|
+
console.log(DIM(" Works with Meta, OpenAI, Ollama, or Cloudflare Workers AI keys (BYOK)."));
|
|
1022
|
+
console.log(DIM(" Docs: https://zyntry.space/products/zyntry-verdict/docs"));
|
|
1023
|
+
console.log(DIM(" Records: https://github.com/devspak-s8/zyntry-verdict"));
|
|
1024
|
+
console.log("");
|
|
1025
|
+
console.log(" All commands:");
|
|
1026
|
+
printHelp();
|
|
1027
|
+
process.exit(0);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
await notifyUpdate();
|
|
1031
|
+
|
|
963
1032
|
const config = await loadConfig();
|
|
1033
|
+
function printHelp() {
|
|
1034
|
+
console.log(`zyntry-verdict — the hosted courtroom, from your terminal
|
|
1035
|
+
|
|
1036
|
+
init scan YOUR repo and generate .zyntry.case.json
|
|
1037
|
+
(the courtroom then verifies your own code)
|
|
1038
|
+
signup create an API key with trial credits [--email <addr>]
|
|
1039
|
+
balance credits + usage
|
|
1040
|
+
topup <amount 5-500> pay via Bachs hosted checkout (card, bank transfer,
|
|
1041
|
+
mobile money, crypto) — credits land automatically
|
|
1042
|
+
provider [name] show or set YOUR model provider (BYOK)
|
|
1043
|
+
[--key <KEY>] [--baseUrl <url>] — or ZV_PROVIDER_KEY env
|
|
1044
|
+
cases list available case packs
|
|
1045
|
+
run [caseId] open the courtroom and stream the verdict live
|
|
1046
|
+
(auto-detects .zyntry.case.json in your repo)
|
|
1047
|
+
[--mode route|courtroom] [--gateway <url>]
|
|
1048
|
+
watch [caseId] auto-verdict on file change (the safety net)
|
|
1049
|
+
[--debounce 30] seconds after last change
|
|
1050
|
+
gate [caseId] one-shot verdict for git pre-commit hooks
|
|
1051
|
+
(exits 0 only on resolved-verified)
|
|
1052
|
+
stats <caseId> per-repo dashboard: win rate, escalation rate, spend
|
|
1053
|
+
certify <verdictId> export a signed verdict certificate (compliance proof)
|
|
1054
|
+
standards <caseId> show the sealed standard's growth (visible moat)
|
|
1055
|
+
|
|
1056
|
+
git hook: zyntry-verdict gate --case my-case # in .git/hooks/pre-commit
|
|
1057
|
+
|
|
1058
|
+
links: docs & API https://zyntry.space/products/zyntry-verdict/docs
|
|
1059
|
+
results https://verdict.zyntry.space/docs/results
|
|
1060
|
+
dogfood https://verdict.zyntry.space/docs/dogfood
|
|
1061
|
+
security https://verdict.zyntry.space/docs/security-audit
|
|
1062
|
+
|
|
1063
|
+
env: ZV_GATEWAY (default https://verdict.zyntry.space)`);
|
|
1064
|
+
}
|
|
1065
|
+
|
|
964
1066
|
switch (command) {
|
|
965
1067
|
case "init":
|
|
966
1068
|
await cmdInit(flags);
|
|
@@ -999,35 +1101,8 @@ switch (command) {
|
|
|
999
1101
|
await cmdRun(config, flags, positional);
|
|
1000
1102
|
break;
|
|
1001
1103
|
default:
|
|
1002
|
-
console.log(`
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
(the courtroom then verifies your own code)
|
|
1007
|
-
balance credits + usage
|
|
1008
|
-
topup <amount 5-500> pay via Bachs hosted checkout (card, bank transfer,
|
|
1009
|
-
mobile money, crypto) — credits land automatically
|
|
1010
|
-
provider [name] show or set YOUR model provider (BYOK)
|
|
1011
|
-
[--key <KEY>] [--baseUrl <url>] — or ZV_PROVIDER_KEY env
|
|
1012
|
-
cases list available case packs
|
|
1013
|
-
run [caseId] open the courtroom and stream the verdict live
|
|
1014
|
-
(auto-detects .zyntry.case.json in your repo)
|
|
1015
|
-
[--mode route|courtroom] [--gateway <url>]
|
|
1016
|
-
watch [caseId] auto-verdict on file change (the safety net)
|
|
1017
|
-
[--debounce 30] seconds after last change
|
|
1018
|
-
gate [caseId] one-shot verdict for git pre-commit hooks
|
|
1019
|
-
(exits 0 only on resolved-verified)
|
|
1020
|
-
stats <caseId> per-repo dashboard: win rate, escalation rate, spend
|
|
1021
|
-
certify <verdictId> export a signed verdict certificate (compliance proof)
|
|
1022
|
-
standards <caseId> show the sealed standard's growth (visible moat)
|
|
1023
|
-
|
|
1024
|
-
git hook: zyntry-verdict gate --case my-case # in .git/hooks/pre-commit
|
|
1025
|
-
|
|
1026
|
-
links: docs & API https://zyntry.space/products/zyntry-verdict/docs
|
|
1027
|
-
results https://verdict.zyntry.space/docs/results
|
|
1028
|
-
dogfood https://verdict.zyntry.space/docs/dogfood
|
|
1029
|
-
security https://verdict.zyntry.space/docs/security-audit
|
|
1030
|
-
|
|
1031
|
-
env: ZV_GATEWAY (default https://verdict.zyntry.space)`);
|
|
1032
|
-
process.exit(command ? 2 : 0);
|
|
1104
|
+
console.log(RED(`unknown command: ${command}`));
|
|
1105
|
+
console.log("");
|
|
1106
|
+
printHelp();
|
|
1107
|
+
process.exit(2);
|
|
1033
1108
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zyntry-verdict",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Thin client for the Zyntry Verdict hosted AI courtroom — submit code, watch the adversarial courtroom stream live, get a verdict that can withstand scrutiny.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,3 +34,4 @@
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
|