vibecode-anything 0.0.0-stage → 0.4.0
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 -0
- package/README.md +407 -2
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +2519 -0
- package/dist/core/adapters.d.ts +31 -0
- package/dist/core/adapters.js +478 -0
- package/dist/core/agent-adapter.d.ts +67 -0
- package/dist/core/agent-adapter.js +312 -0
- package/dist/core/anti-cheat.d.ts +6 -0
- package/dist/core/anti-cheat.js +372 -0
- package/dist/core/badge.d.ts +18 -0
- package/dist/core/badge.js +360 -0
- package/dist/core/cache.d.ts +47 -0
- package/dist/core/cache.js +403 -0
- package/dist/core/ci-export.d.ts +35 -0
- package/dist/core/ci-export.js +796 -0
- package/dist/core/ci-formats.d.ts +21 -0
- package/dist/core/ci-formats.js +388 -0
- package/dist/core/client-codegen.d.ts +36 -0
- package/dist/core/client-codegen.js +2538 -0
- package/dist/core/compose.d.ts +71 -0
- package/dist/core/compose.js +1088 -0
- package/dist/core/diff.d.ts +10 -0
- package/dist/core/diff.js +207 -0
- package/dist/core/docs-export.d.ts +37 -0
- package/dist/core/docs-export.js +2706 -0
- package/dist/core/doctor.d.ts +70 -0
- package/dist/core/doctor.js +525 -0
- package/dist/core/errors.d.ts +32 -0
- package/dist/core/errors.js +81 -0
- package/dist/core/exec.d.ts +38 -0
- package/dist/core/exec.js +336 -0
- package/dist/core/fixtures.d.ts +153 -0
- package/dist/core/fixtures.js +2245 -0
- package/dist/core/format.d.ts +77 -0
- package/dist/core/format.js +632 -0
- package/dist/core/fs-snapshot.d.ts +37 -0
- package/dist/core/fs-snapshot.js +216 -0
- package/dist/core/graphql-export.d.ts +34 -0
- package/dist/core/graphql-export.js +2482 -0
- package/dist/core/har-export.d.ts +29 -0
- package/dist/core/har-export.js +988 -0
- package/dist/core/html-report.d.ts +27 -0
- package/dist/core/html-report.js +1535 -0
- package/dist/core/http-export.d.ts +31 -0
- package/dist/core/http-export.js +726 -0
- package/dist/core/impact.d.ts +80 -0
- package/dist/core/impact.js +1412 -0
- package/dist/core/lint.d.ts +38 -0
- package/dist/core/lint.js +1111 -0
- package/dist/core/load-export.d.ts +37 -0
- package/dist/core/load-export.js +1813 -0
- package/dist/core/mcp-export.d.ts +35 -0
- package/dist/core/mcp-export.js +1736 -0
- package/dist/core/mock-server.d.ts +47 -0
- package/dist/core/mock-server.js +1722 -0
- package/dist/core/openapi-export.d.ts +44 -0
- package/dist/core/openapi-export.js +1074 -0
- package/dist/core/parity.d.ts +14 -0
- package/dist/core/parity.js +173 -0
- package/dist/core/playwright-exporter.d.ts +23 -0
- package/dist/core/playwright-exporter.js +1343 -0
- package/dist/core/png.d.ts +7 -0
- package/dist/core/png.js +339 -0
- package/dist/core/regression.d.ts +54 -0
- package/dist/core/regression.js +529 -0
- package/dist/core/responsive.d.ts +86 -0
- package/dist/core/responsive.js +606 -0
- package/dist/core/run.d.ts +74 -0
- package/dist/core/run.js +696 -0
- package/dist/core/scheduler.d.ts +24 -0
- package/dist/core/scheduler.js +162 -0
- package/dist/core/schema-export.d.ts +29 -0
- package/dist/core/schema-export.js +2215 -0
- package/dist/core/schema.d.ts +18 -0
- package/dist/core/schema.js +1057 -0
- package/dist/core/security.d.ts +233 -0
- package/dist/core/security.js +1839 -0
- package/dist/core/server-export.d.ts +38 -0
- package/dist/core/server-export.js +3198 -0
- package/dist/core/slices.d.ts +24 -0
- package/dist/core/slices.js +294 -0
- package/dist/core/spec-writer.d.ts +9 -0
- package/dist/core/spec-writer.js +1202 -0
- package/dist/core/store.d.ts +26 -0
- package/dist/core/store.js +217 -0
- package/dist/core/target-map.d.ts +34 -0
- package/dist/core/target-map.js +262 -0
- package/dist/core/test-exporter.d.ts +25 -0
- package/dist/core/test-exporter.js +1918 -0
- package/dist/core/types.d.ts +919 -0
- package/dist/core/types.js +4 -0
- package/dist/core/visual-semantic.d.ts +67 -0
- package/dist/core/visual-semantic.js +673 -0
- package/dist/core/visual.d.ts +34 -0
- package/dist/core/visual.js +508 -0
- package/dist/core/watch.d.ts +78 -0
- package/dist/core/watch.js +495 -0
- package/dist/core/yaml.d.ts +5 -0
- package/dist/core/yaml.js +1009 -0
- package/dist/diagnostics/diagnose.d.ts +53 -0
- package/dist/diagnostics/diagnose.js +1083 -0
- package/dist/diagnostics/flake.d.ts +71 -0
- package/dist/diagnostics/flake.js +608 -0
- package/dist/diagnostics/mutation-audit.d.ts +69 -0
- package/dist/diagnostics/mutation-audit.js +769 -0
- package/dist/diagnostics/spatial.d.ts +42 -0
- package/dist/diagnostics/spatial.js +346 -0
- package/dist/diagnostics/trends.d.ts +122 -0
- package/dist/diagnostics/trends.js +1190 -0
- package/dist/discovery/discover.d.ts +111 -0
- package/dist/discovery/discover.js +2017 -0
- package/dist/discovery/lock.d.ts +116 -0
- package/dist/discovery/lock.js +1505 -0
- package/dist/discovery/routes.d.ts +36 -0
- package/dist/discovery/routes.js +1494 -0
- package/dist/discovery/test-importer.d.ts +92 -0
- package/dist/discovery/test-importer.js +4952 -0
- package/dist/index.d.ts +123 -0
- package/dist/index.js +99 -0
- package/dist/ingestors/api-collections.d.ts +28 -0
- package/dist/ingestors/api-collections.js +2335 -0
- package/dist/ingestors/api-repo.d.ts +6 -0
- package/dist/ingestors/api-repo.js +1120 -0
- package/dist/ingestors/asyncapi.d.ts +26 -0
- package/dist/ingestors/asyncapi.js +2105 -0
- package/dist/ingestors/bridges.d.ts +5 -0
- package/dist/ingestors/bridges.js +1264 -0
- package/dist/ingestors/cli.d.ts +10 -0
- package/dist/ingestors/cli.js +454 -0
- package/dist/ingestors/curl.d.ts +14 -0
- package/dist/ingestors/curl.js +1024 -0
- package/dist/ingestors/graphql.d.ts +56 -0
- package/dist/ingestors/graphql.js +1852 -0
- package/dist/ingestors/http-file.d.ts +20 -0
- package/dist/ingestors/http-file.js +923 -0
- package/dist/ingestors/image.d.ts +2 -0
- package/dist/ingestors/image.js +147 -0
- package/dist/ingestors/index.d.ts +5 -0
- package/dist/ingestors/index.js +577 -0
- package/dist/ingestors/openrpc.d.ts +29 -0
- package/dist/ingestors/openrpc.js +1807 -0
- package/dist/ingestors/proto.d.ts +47 -0
- package/dist/ingestors/proto.js +2690 -0
- package/dist/ingestors/trace.d.ts +10 -0
- package/dist/ingestors/trace.js +599 -0
- package/dist/ingestors/video.d.ts +50 -0
- package/dist/ingestors/video.js +655 -0
- package/dist/ingestors/web.d.ts +40 -0
- package/dist/ingestors/web.js +839 -0
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.js +3969 -0
- package/dist/oracles/api-repo.d.ts +2 -0
- package/dist/oracles/api-repo.js +286 -0
- package/dist/oracles/cli.d.ts +2 -0
- package/dist/oracles/cli.js +205 -0
- package/dist/oracles/http-workflow.d.ts +68 -0
- package/dist/oracles/http-workflow.js +828 -0
- package/dist/oracles/image.d.ts +2 -0
- package/dist/oracles/image.js +429 -0
- package/dist/oracles/index.d.ts +6 -0
- package/dist/oracles/index.js +320 -0
- package/dist/oracles/perf-budget.d.ts +90 -0
- package/dist/oracles/perf-budget.js +1329 -0
- package/dist/oracles/stream.d.ts +94 -0
- package/dist/oracles/stream.js +1268 -0
- package/dist/oracles/ui-states.d.ts +49 -0
- package/dist/oracles/ui-states.js +894 -0
- package/dist/oracles/video.d.ts +21 -0
- package/dist/oracles/video.js +627 -0
- package/dist/oracles/web.d.ts +2 -0
- package/dist/oracles/web.js +871 -0
- package/dist/plugins/builtins.d.ts +12 -0
- package/dist/plugins/builtins.js +1052 -0
- package/dist/plugins/registry.d.ts +86 -0
- package/dist/plugins/registry.js +554 -0
- package/dist/setup/index.d.ts +7 -0
- package/dist/setup/index.js +298 -0
- package/package.json +54 -4
- package/skills/vibecode-anything/SKILL.md +75 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AntiCheatReport, ContractV02, Invariant, InvariantResult, ParityReport } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Redact failing/errored holdout invariant details unless revealHoldouts is enabled.
|
|
4
|
+
*/
|
|
5
|
+
export declare function redactHoldoutResult(invariant: Invariant, outcome: InvariantResult, revealHoldouts?: boolean): InvariantResult;
|
|
6
|
+
/**
|
|
7
|
+
* Score report from oracle results.
|
|
8
|
+
* results: Array<InvariantResult>
|
|
9
|
+
* { id, type, severity: 'hard'|'soft', status: 'pass'|'fail'|'skipped'|'warn', score: number, failures?:[], durationMs? }
|
|
10
|
+
*/
|
|
11
|
+
export declare function scoreReport(contract: Partial<ContractV02> | null | undefined, results: InvariantResult[], options?: {
|
|
12
|
+
strict?: boolean;
|
|
13
|
+
antiCheat?: AntiCheatReport;
|
|
14
|
+
}): ParityReport;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { SCHEMA_VERSION } from "./schema.js";
|
|
2
|
+
import { redactSensitiveText } from "./security.js";
|
|
3
|
+
/**
|
|
4
|
+
* Redact failing/errored holdout invariant details unless revealHoldouts is enabled.
|
|
5
|
+
*/
|
|
6
|
+
export function redactHoldoutResult(invariant, outcome, revealHoldouts = false) {
|
|
7
|
+
if (invariant.holdout === true && (outcome.status === "fail" || outcome.status === "error") && !revealHoldouts) {
|
|
8
|
+
const safeHint = typeof invariant.holdoutHint === "string" ? redactSensitiveText(invariant.holdoutHint).trim() : "";
|
|
9
|
+
return {
|
|
10
|
+
id: redactSensitiveText(outcome.id),
|
|
11
|
+
type: outcome.type,
|
|
12
|
+
severity: outcome.severity,
|
|
13
|
+
status: outcome.status,
|
|
14
|
+
score: 0,
|
|
15
|
+
failures: [safeHint || "Holdout invariant failed (expected details redacted)"],
|
|
16
|
+
metrics: {
|
|
17
|
+
...(outcome.metrics?.exitCode !== undefined ? { exitCode: outcome.metrics.exitCode } : {}),
|
|
18
|
+
redacted: true
|
|
19
|
+
},
|
|
20
|
+
...(outcome.durationMs !== undefined ? { durationMs: outcome.durationMs } : {})
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return outcome;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Score report from oracle results.
|
|
27
|
+
* results: Array<InvariantResult>
|
|
28
|
+
* { id, type, severity: 'hard'|'soft', status: 'pass'|'fail'|'skipped'|'warn', score: number, failures?:[], durationMs? }
|
|
29
|
+
*/
|
|
30
|
+
export function scoreReport(contract, results, options = {}) {
|
|
31
|
+
const strict = Boolean(options.strict);
|
|
32
|
+
const hardResults = [];
|
|
33
|
+
const softResults = [];
|
|
34
|
+
const otherResults = [];
|
|
35
|
+
for (const r of results) {
|
|
36
|
+
if (r.severity === "hard")
|
|
37
|
+
hardResults.push(r);
|
|
38
|
+
else if (r.severity === "soft")
|
|
39
|
+
softResults.push(r);
|
|
40
|
+
else
|
|
41
|
+
otherResults.push(r);
|
|
42
|
+
}
|
|
43
|
+
const hardPassed = hardResults.filter((r) => r.status === "pass").length;
|
|
44
|
+
const hardFailed = hardResults.filter((r) => r.status === "fail" || r.status === "error").length;
|
|
45
|
+
const hardSkipped = hardResults.filter((r) => r.status === "skipped").length;
|
|
46
|
+
const hardEvaluated = hardResults.filter((r) => r.status !== "skipped").length;
|
|
47
|
+
const softPassed = softResults.filter((r) => r.status === "pass").length;
|
|
48
|
+
const softFailed = softResults.filter((r) => r.status === "fail" || r.status === "error").length;
|
|
49
|
+
const softWarned = softResults.filter((r) => r.status === "warn").length;
|
|
50
|
+
const softSkipped = softResults.filter((r) => r.status === "skipped").length;
|
|
51
|
+
const softEvaluated = softResults.filter((r) => r.status !== "skipped").length;
|
|
52
|
+
const softScores = softResults
|
|
53
|
+
.filter((r) => r.status !== "skipped" && typeof r.score === "number")
|
|
54
|
+
.map((r) => r.score);
|
|
55
|
+
const hardParity = hardEvaluated > 0 ? hardPassed / hardEvaluated : 1.0;
|
|
56
|
+
const softParity = softEvaluated > 0 ? (softPassed + softWarned) / softEvaluated : 1.0; // warn counts as non-fail in "parity" sense
|
|
57
|
+
const softMeanScore = softScores.length > 0 ? softScores.reduce((a, b) => a + b, 0) / softScores.length : 1.0;
|
|
58
|
+
let compositeScore = 0.0;
|
|
59
|
+
if (hardEvaluated > 0 && softEvaluated > 0) {
|
|
60
|
+
compositeScore = 0.7 * hardParity + 0.3 * softMeanScore;
|
|
61
|
+
}
|
|
62
|
+
else if (hardEvaluated > 0) {
|
|
63
|
+
compositeScore = hardParity;
|
|
64
|
+
}
|
|
65
|
+
else if (softEvaluated > 0) {
|
|
66
|
+
compositeScore = softMeanScore;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
compositeScore = 0.0;
|
|
70
|
+
}
|
|
71
|
+
const thresholds = contract?.thresholds;
|
|
72
|
+
const hardReq = typeof thresholds?.hardBehavioralParity === "number" ? thresholds.hardBehavioralParity : 1.0;
|
|
73
|
+
const softReq = typeof thresholds?.softPerceptualParity === "number" ? thresholds.softPerceptualParity : 0.85;
|
|
74
|
+
const softGateMode = strict ? "fail" : (thresholds?.softGateMode || "warn");
|
|
75
|
+
const reasons = [];
|
|
76
|
+
let status = "pass";
|
|
77
|
+
if (hardEvaluated === 0 && softEvaluated === 0) {
|
|
78
|
+
status = "incomplete";
|
|
79
|
+
reasons.push("No invariants were evaluated (all skipped or none present).");
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
if (hardEvaluated > 0 && hardParity < hardReq - 1e-12) {
|
|
83
|
+
status = "fail";
|
|
84
|
+
reasons.push(`Hard behavioral parity ${(hardParity * 100).toFixed(1)}% < required ${(hardReq * 100).toFixed(1)}%`);
|
|
85
|
+
}
|
|
86
|
+
const softBelowMean = softEvaluated > 0 && softMeanScore < softReq - 1e-12;
|
|
87
|
+
const softHasFail = softFailed > 0;
|
|
88
|
+
if (softBelowMean || softHasFail) {
|
|
89
|
+
if (softGateMode === "fail") {
|
|
90
|
+
status = "fail";
|
|
91
|
+
if (softBelowMean && !reasons.some((r) => r.includes("Soft perceptual"))) {
|
|
92
|
+
reasons.push(`Soft perceptual score ${softMeanScore.toFixed(3)} < required ${softReq.toFixed(3)} (--strict/fail mode)`);
|
|
93
|
+
}
|
|
94
|
+
else if (softHasFail && !reasons.some((r) => r.includes("soft invariant"))) {
|
|
95
|
+
reasons.push(`${softFailed} soft invariant(s) failed tolerance (--strict/fail mode)`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
if (status !== "fail")
|
|
100
|
+
status = "pass_with_warnings";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (status === "pass" && softWarned > 0 && softGateMode !== "fail") {
|
|
104
|
+
status = "pass_with_warnings";
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (options.antiCheat?.status === "suspected") {
|
|
108
|
+
status = "fail";
|
|
109
|
+
for (const reason of options.antiCheat.reasons) {
|
|
110
|
+
if (reason && !reasons.includes(reason)) {
|
|
111
|
+
reasons.push(reason);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
let exitCode = 0;
|
|
116
|
+
if (status === "fail")
|
|
117
|
+
exitCode = 1;
|
|
118
|
+
else if (status === "incomplete")
|
|
119
|
+
exitCode = 2;
|
|
120
|
+
else
|
|
121
|
+
exitCode = 0;
|
|
122
|
+
let nextAction = "none";
|
|
123
|
+
if (options.antiCheat?.status === "suspected" ||
|
|
124
|
+
hardFailed > 0 ||
|
|
125
|
+
(hardEvaluated > 0 && hardParity < hardReq - 1e-12)) {
|
|
126
|
+
nextAction = "fix_hard_invariants_first";
|
|
127
|
+
}
|
|
128
|
+
else if (status === "incomplete")
|
|
129
|
+
nextAction = "add_or_enable_invariants_or_adapters";
|
|
130
|
+
else if (status === "pass_with_warnings")
|
|
131
|
+
nextAction = "review_soft_warnings";
|
|
132
|
+
else
|
|
133
|
+
nextAction = "none";
|
|
134
|
+
const total = results.length;
|
|
135
|
+
const passedCount = results.filter((r) => r.status === "pass").length;
|
|
136
|
+
return {
|
|
137
|
+
schemaVersion: SCHEMA_VERSION,
|
|
138
|
+
timestamp: new Date().toISOString(),
|
|
139
|
+
// v0.1 compatible fields
|
|
140
|
+
passed: passedCount,
|
|
141
|
+
total,
|
|
142
|
+
parity: total > 0 ? passedCount / total : 0.0,
|
|
143
|
+
// v0.2 fields
|
|
144
|
+
compositeScore,
|
|
145
|
+
hard: {
|
|
146
|
+
passed: hardPassed,
|
|
147
|
+
failed: hardFailed,
|
|
148
|
+
skipped: hardSkipped,
|
|
149
|
+
evaluated: hardEvaluated,
|
|
150
|
+
total: hardResults.length,
|
|
151
|
+
parity: hardEvaluated > 0 ? hardPassed / hardEvaluated : 1.0
|
|
152
|
+
},
|
|
153
|
+
soft: {
|
|
154
|
+
passed: softPassed,
|
|
155
|
+
warned: softWarned,
|
|
156
|
+
failed: softFailed,
|
|
157
|
+
skipped: softSkipped,
|
|
158
|
+
evaluated: softEvaluated,
|
|
159
|
+
total: softResults.length,
|
|
160
|
+
meanScore: softMeanScore,
|
|
161
|
+
parity: softEvaluated > 0 ? (softPassed + softWarned) / softEvaluated : 1.0
|
|
162
|
+
},
|
|
163
|
+
gate: {
|
|
164
|
+
passed: status === "pass" || status === "pass_with_warnings",
|
|
165
|
+
status,
|
|
166
|
+
exitCode,
|
|
167
|
+
reasons
|
|
168
|
+
},
|
|
169
|
+
nextAction,
|
|
170
|
+
...(options.antiCheat ? { antiCheat: options.antiCheat } : {}),
|
|
171
|
+
results
|
|
172
|
+
};
|
|
173
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ContractV02 } from "./types.js";
|
|
2
|
+
export interface ExportPlaywrightOptions {
|
|
3
|
+
target?: string;
|
|
4
|
+
contractPath?: string;
|
|
5
|
+
includeSkippedComments?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ExportPlaywrightResult {
|
|
8
|
+
format: "playwright";
|
|
9
|
+
suggestedFilename: string;
|
|
10
|
+
code: string;
|
|
11
|
+
exportedCount: number;
|
|
12
|
+
skippedCount: number;
|
|
13
|
+
skippedIds: string[];
|
|
14
|
+
excludedHoldoutCount: number;
|
|
15
|
+
}
|
|
16
|
+
export interface WritePlaywrightOptions extends ExportPlaywrightOptions {
|
|
17
|
+
outPath: string;
|
|
18
|
+
}
|
|
19
|
+
export interface WritePlaywrightResult extends ExportPlaywrightResult {
|
|
20
|
+
outPath: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function exportPlaywrightTests(contract: ContractV02, options?: ExportPlaywrightOptions): ExportPlaywrightResult;
|
|
23
|
+
export declare function writePlaywrightTests(contract: ContractV02, options: WritePlaywrightOptions): WritePlaywrightResult;
|