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.
Files changed (180) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +407 -2
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.js +2519 -0
  5. package/dist/core/adapters.d.ts +31 -0
  6. package/dist/core/adapters.js +478 -0
  7. package/dist/core/agent-adapter.d.ts +67 -0
  8. package/dist/core/agent-adapter.js +312 -0
  9. package/dist/core/anti-cheat.d.ts +6 -0
  10. package/dist/core/anti-cheat.js +372 -0
  11. package/dist/core/badge.d.ts +18 -0
  12. package/dist/core/badge.js +360 -0
  13. package/dist/core/cache.d.ts +47 -0
  14. package/dist/core/cache.js +403 -0
  15. package/dist/core/ci-export.d.ts +35 -0
  16. package/dist/core/ci-export.js +796 -0
  17. package/dist/core/ci-formats.d.ts +21 -0
  18. package/dist/core/ci-formats.js +388 -0
  19. package/dist/core/client-codegen.d.ts +36 -0
  20. package/dist/core/client-codegen.js +2538 -0
  21. package/dist/core/compose.d.ts +71 -0
  22. package/dist/core/compose.js +1088 -0
  23. package/dist/core/diff.d.ts +10 -0
  24. package/dist/core/diff.js +207 -0
  25. package/dist/core/docs-export.d.ts +37 -0
  26. package/dist/core/docs-export.js +2706 -0
  27. package/dist/core/doctor.d.ts +70 -0
  28. package/dist/core/doctor.js +525 -0
  29. package/dist/core/errors.d.ts +32 -0
  30. package/dist/core/errors.js +81 -0
  31. package/dist/core/exec.d.ts +38 -0
  32. package/dist/core/exec.js +336 -0
  33. package/dist/core/fixtures.d.ts +153 -0
  34. package/dist/core/fixtures.js +2245 -0
  35. package/dist/core/format.d.ts +77 -0
  36. package/dist/core/format.js +632 -0
  37. package/dist/core/fs-snapshot.d.ts +37 -0
  38. package/dist/core/fs-snapshot.js +216 -0
  39. package/dist/core/graphql-export.d.ts +34 -0
  40. package/dist/core/graphql-export.js +2482 -0
  41. package/dist/core/har-export.d.ts +29 -0
  42. package/dist/core/har-export.js +988 -0
  43. package/dist/core/html-report.d.ts +27 -0
  44. package/dist/core/html-report.js +1535 -0
  45. package/dist/core/http-export.d.ts +31 -0
  46. package/dist/core/http-export.js +726 -0
  47. package/dist/core/impact.d.ts +80 -0
  48. package/dist/core/impact.js +1412 -0
  49. package/dist/core/lint.d.ts +38 -0
  50. package/dist/core/lint.js +1111 -0
  51. package/dist/core/load-export.d.ts +37 -0
  52. package/dist/core/load-export.js +1813 -0
  53. package/dist/core/mcp-export.d.ts +35 -0
  54. package/dist/core/mcp-export.js +1736 -0
  55. package/dist/core/mock-server.d.ts +47 -0
  56. package/dist/core/mock-server.js +1722 -0
  57. package/dist/core/openapi-export.d.ts +44 -0
  58. package/dist/core/openapi-export.js +1074 -0
  59. package/dist/core/parity.d.ts +14 -0
  60. package/dist/core/parity.js +173 -0
  61. package/dist/core/playwright-exporter.d.ts +23 -0
  62. package/dist/core/playwright-exporter.js +1343 -0
  63. package/dist/core/png.d.ts +7 -0
  64. package/dist/core/png.js +339 -0
  65. package/dist/core/regression.d.ts +54 -0
  66. package/dist/core/regression.js +529 -0
  67. package/dist/core/responsive.d.ts +86 -0
  68. package/dist/core/responsive.js +606 -0
  69. package/dist/core/run.d.ts +74 -0
  70. package/dist/core/run.js +696 -0
  71. package/dist/core/scheduler.d.ts +24 -0
  72. package/dist/core/scheduler.js +162 -0
  73. package/dist/core/schema-export.d.ts +29 -0
  74. package/dist/core/schema-export.js +2215 -0
  75. package/dist/core/schema.d.ts +18 -0
  76. package/dist/core/schema.js +1057 -0
  77. package/dist/core/security.d.ts +233 -0
  78. package/dist/core/security.js +1839 -0
  79. package/dist/core/server-export.d.ts +38 -0
  80. package/dist/core/server-export.js +3198 -0
  81. package/dist/core/slices.d.ts +24 -0
  82. package/dist/core/slices.js +294 -0
  83. package/dist/core/spec-writer.d.ts +9 -0
  84. package/dist/core/spec-writer.js +1202 -0
  85. package/dist/core/store.d.ts +26 -0
  86. package/dist/core/store.js +217 -0
  87. package/dist/core/target-map.d.ts +34 -0
  88. package/dist/core/target-map.js +262 -0
  89. package/dist/core/test-exporter.d.ts +25 -0
  90. package/dist/core/test-exporter.js +1918 -0
  91. package/dist/core/types.d.ts +919 -0
  92. package/dist/core/types.js +4 -0
  93. package/dist/core/visual-semantic.d.ts +67 -0
  94. package/dist/core/visual-semantic.js +673 -0
  95. package/dist/core/visual.d.ts +34 -0
  96. package/dist/core/visual.js +508 -0
  97. package/dist/core/watch.d.ts +78 -0
  98. package/dist/core/watch.js +495 -0
  99. package/dist/core/yaml.d.ts +5 -0
  100. package/dist/core/yaml.js +1009 -0
  101. package/dist/diagnostics/diagnose.d.ts +53 -0
  102. package/dist/diagnostics/diagnose.js +1083 -0
  103. package/dist/diagnostics/flake.d.ts +71 -0
  104. package/dist/diagnostics/flake.js +608 -0
  105. package/dist/diagnostics/mutation-audit.d.ts +69 -0
  106. package/dist/diagnostics/mutation-audit.js +769 -0
  107. package/dist/diagnostics/spatial.d.ts +42 -0
  108. package/dist/diagnostics/spatial.js +346 -0
  109. package/dist/diagnostics/trends.d.ts +122 -0
  110. package/dist/diagnostics/trends.js +1190 -0
  111. package/dist/discovery/discover.d.ts +111 -0
  112. package/dist/discovery/discover.js +2017 -0
  113. package/dist/discovery/lock.d.ts +116 -0
  114. package/dist/discovery/lock.js +1505 -0
  115. package/dist/discovery/routes.d.ts +36 -0
  116. package/dist/discovery/routes.js +1494 -0
  117. package/dist/discovery/test-importer.d.ts +92 -0
  118. package/dist/discovery/test-importer.js +4952 -0
  119. package/dist/index.d.ts +123 -0
  120. package/dist/index.js +99 -0
  121. package/dist/ingestors/api-collections.d.ts +28 -0
  122. package/dist/ingestors/api-collections.js +2335 -0
  123. package/dist/ingestors/api-repo.d.ts +6 -0
  124. package/dist/ingestors/api-repo.js +1120 -0
  125. package/dist/ingestors/asyncapi.d.ts +26 -0
  126. package/dist/ingestors/asyncapi.js +2105 -0
  127. package/dist/ingestors/bridges.d.ts +5 -0
  128. package/dist/ingestors/bridges.js +1264 -0
  129. package/dist/ingestors/cli.d.ts +10 -0
  130. package/dist/ingestors/cli.js +454 -0
  131. package/dist/ingestors/curl.d.ts +14 -0
  132. package/dist/ingestors/curl.js +1024 -0
  133. package/dist/ingestors/graphql.d.ts +56 -0
  134. package/dist/ingestors/graphql.js +1852 -0
  135. package/dist/ingestors/http-file.d.ts +20 -0
  136. package/dist/ingestors/http-file.js +923 -0
  137. package/dist/ingestors/image.d.ts +2 -0
  138. package/dist/ingestors/image.js +147 -0
  139. package/dist/ingestors/index.d.ts +5 -0
  140. package/dist/ingestors/index.js +577 -0
  141. package/dist/ingestors/openrpc.d.ts +29 -0
  142. package/dist/ingestors/openrpc.js +1807 -0
  143. package/dist/ingestors/proto.d.ts +47 -0
  144. package/dist/ingestors/proto.js +2690 -0
  145. package/dist/ingestors/trace.d.ts +10 -0
  146. package/dist/ingestors/trace.js +599 -0
  147. package/dist/ingestors/video.d.ts +50 -0
  148. package/dist/ingestors/video.js +655 -0
  149. package/dist/ingestors/web.d.ts +40 -0
  150. package/dist/ingestors/web.js +839 -0
  151. package/dist/mcp/server.d.ts +2 -0
  152. package/dist/mcp/server.js +3969 -0
  153. package/dist/oracles/api-repo.d.ts +2 -0
  154. package/dist/oracles/api-repo.js +286 -0
  155. package/dist/oracles/cli.d.ts +2 -0
  156. package/dist/oracles/cli.js +205 -0
  157. package/dist/oracles/http-workflow.d.ts +68 -0
  158. package/dist/oracles/http-workflow.js +828 -0
  159. package/dist/oracles/image.d.ts +2 -0
  160. package/dist/oracles/image.js +429 -0
  161. package/dist/oracles/index.d.ts +6 -0
  162. package/dist/oracles/index.js +320 -0
  163. package/dist/oracles/perf-budget.d.ts +90 -0
  164. package/dist/oracles/perf-budget.js +1329 -0
  165. package/dist/oracles/stream.d.ts +94 -0
  166. package/dist/oracles/stream.js +1268 -0
  167. package/dist/oracles/ui-states.d.ts +49 -0
  168. package/dist/oracles/ui-states.js +894 -0
  169. package/dist/oracles/video.d.ts +21 -0
  170. package/dist/oracles/video.js +627 -0
  171. package/dist/oracles/web.d.ts +2 -0
  172. package/dist/oracles/web.js +871 -0
  173. package/dist/plugins/builtins.d.ts +12 -0
  174. package/dist/plugins/builtins.js +1052 -0
  175. package/dist/plugins/registry.d.ts +86 -0
  176. package/dist/plugins/registry.js +554 -0
  177. package/dist/setup/index.d.ts +7 -0
  178. package/dist/setup/index.js +298 -0
  179. package/package.json +54 -4
  180. package/skills/vibecode-anything/SKILL.md +75 -0
@@ -0,0 +1,10 @@
1
+ import type { DiffLinesOptions, DiffLinesResult, JsonSubsetDiff } from "./types.js";
2
+ /**
3
+ * Output normalizers and diff utilities.
4
+ */
5
+ export declare function normalizeText(text: unknown, modes?: readonly string[]): string;
6
+ /**
7
+ * Simple LCS-based unified diff.
8
+ */
9
+ export declare function diffLines(expected: unknown, actual: unknown, { context, maxLines }?: DiffLinesOptions): DiffLinesResult;
10
+ export declare function diffJsonSubset(expectedSubset: unknown, actual: unknown, path?: string): JsonSubsetDiff[];
@@ -0,0 +1,207 @@
1
+ /**
2
+ * Output normalizers and diff utilities.
3
+ */
4
+ export function normalizeText(text, modes = []) {
5
+ let out = text == null ? "" : String(text);
6
+ for (const mode of modes) {
7
+ switch (mode) {
8
+ case "crlf":
9
+ out = out.replace(/\r\n/g, "\n");
10
+ break;
11
+ case "ansi":
12
+ // eslint-disable-next-line no-control-regex
13
+ out = out.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g, "");
14
+ break;
15
+ case "timestamps":
16
+ // ISO-like timestamps, common log timestamps, unix-ish epoch ms
17
+ out = out.replace(/\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(?:\.\d+)?Z?/g, "<TS>");
18
+ out = out.replace(/\b\d{13}\b/g, "<TS_MS>");
19
+ break;
20
+ case "paths":
21
+ // Normalize Windows paths to POSIX-ish for comparison
22
+ out = out.replace(/[A-Za-z]:\\[^\s"']+/g, (m) => m.replace(/\\/g, "/"));
23
+ break;
24
+ case "trim":
25
+ out = out.trim();
26
+ break;
27
+ default:
28
+ break;
29
+ }
30
+ }
31
+ return out;
32
+ }
33
+ /**
34
+ * Simple LCS-based unified diff.
35
+ */
36
+ export function diffLines(expected, actual, { context = 2, maxLines = 40 } = {}) {
37
+ const exp = String(expected ?? "").replace(/\r\n/g, "\n").split("\n");
38
+ const act = String(actual ?? "").replace(/\r\n/g, "\n").split("\n");
39
+ // Trim trailing empty line caused by final newline for cleaner diffs
40
+ if (exp.length > 1 && exp[exp.length - 1] === "")
41
+ exp.pop();
42
+ if (act.length > 1 && act[act.length - 1] === "")
43
+ act.pop();
44
+ if (exp.length === act.length && exp.every((l, i) => l === act[i])) {
45
+ return { identical: true, added: 0, removed: 0, truncated: false, unified: "" };
46
+ }
47
+ const edits = lcsEdits(exp, act);
48
+ let added = 0;
49
+ let removed = 0;
50
+ for (const e of edits) {
51
+ if (e.type === "add")
52
+ added++;
53
+ if (e.type === "remove")
54
+ removed++;
55
+ }
56
+ // Build hunks with context
57
+ const changeIndices = [];
58
+ for (let i = 0; i < edits.length; i++) {
59
+ if (edits[i].type !== "equal")
60
+ changeIndices.push(i);
61
+ }
62
+ if (changeIndices.length === 0) {
63
+ return { identical: true, added: 0, removed: 0, truncated: false, unified: "" };
64
+ }
65
+ const ranges = [];
66
+ let start = Math.max(0, changeIndices[0] - context);
67
+ let end = Math.min(edits.length - 1, changeIndices[0] + context);
68
+ for (let k = 1; k < changeIndices.length; k++) {
69
+ const idx = changeIndices[k];
70
+ const s = Math.max(0, idx - context);
71
+ const e = Math.min(edits.length - 1, idx + context);
72
+ if (s <= end + 1)
73
+ end = e;
74
+ else {
75
+ ranges.push([start, end]);
76
+ start = s;
77
+ end = e;
78
+ }
79
+ }
80
+ ranges.push([start, end]);
81
+ const lines = ["--- expected", "+++ actual"];
82
+ let emitted = 0;
83
+ let truncated = false;
84
+ outer: for (const [s, e] of ranges) {
85
+ lines.push("@@");
86
+ for (let i = s; i <= e; i++) {
87
+ if (emitted >= maxLines) {
88
+ truncated = true;
89
+ break outer;
90
+ }
91
+ const edit = edits[i];
92
+ if (edit.type === "equal")
93
+ lines.push(" " + edit.line);
94
+ else if (edit.type === "remove")
95
+ lines.push("-" + edit.line);
96
+ else if (edit.type === "add")
97
+ lines.push("+" + edit.line);
98
+ emitted++;
99
+ }
100
+ }
101
+ if (truncated)
102
+ lines.push("... diff truncated ...");
103
+ return { identical: false, added, removed, truncated, unified: lines.join("\n") };
104
+ }
105
+ function lcsEdits(a, b) {
106
+ const n = a.length;
107
+ const m = b.length;
108
+ // Optimize for common case: small inputs; for larger, use Myers-like? N*M is fine for CLI output.
109
+ // Guard against very large outputs to avoid OOM
110
+ const MAX = 4000;
111
+ if (n > MAX || m > MAX) {
112
+ // Fallback: simple prefix/suffix diff
113
+ return simpleEdits(a, b);
114
+ }
115
+ const dp = new Array(n + 1);
116
+ for (let i = 0; i <= n; i++) {
117
+ dp[i] = new Uint16Array(m + 1);
118
+ }
119
+ for (let i = n - 1; i >= 0; i--) {
120
+ for (let j = m - 1; j >= 0; j--) {
121
+ if (a[i] === b[j])
122
+ dp[i][j] = dp[i + 1][j + 1] + 1;
123
+ else
124
+ dp[i][j] = Math.max(dp[i + 1][j], dp[i][j + 1]);
125
+ }
126
+ }
127
+ const edits = [];
128
+ let i = 0, j = 0;
129
+ while (i < n && j < m) {
130
+ if (a[i] === b[j]) {
131
+ edits.push({ type: "equal", line: a[i] });
132
+ i++;
133
+ j++;
134
+ }
135
+ else if (dp[i + 1][j] >= dp[i][j + 1]) {
136
+ edits.push({ type: "remove", line: a[i] });
137
+ i++;
138
+ }
139
+ else {
140
+ edits.push({ type: "add", line: b[j] });
141
+ j++;
142
+ }
143
+ }
144
+ while (i < n) {
145
+ edits.push({ type: "remove", line: a[i++] });
146
+ }
147
+ while (j < m) {
148
+ edits.push({ type: "add", line: b[j++] });
149
+ }
150
+ return edits;
151
+ }
152
+ function simpleEdits(a, b) {
153
+ const edits = [];
154
+ let prefix = 0;
155
+ while (prefix < a.length && prefix < b.length && a[prefix] === b[prefix])
156
+ prefix++;
157
+ let suffix = 0;
158
+ while (suffix < a.length - prefix && suffix < b.length - prefix && a[a.length - 1 - suffix] === b[b.length - 1 - suffix])
159
+ suffix++;
160
+ for (let i = 0; i < prefix; i++)
161
+ edits.push({ type: "equal", line: a[i] });
162
+ for (let i = prefix; i < a.length - suffix; i++)
163
+ edits.push({ type: "remove", line: a[i] });
164
+ for (let j = prefix; j < b.length - suffix; j++)
165
+ edits.push({ type: "add", line: b[j] });
166
+ for (let i = a.length - suffix; i < a.length; i++)
167
+ edits.push({ type: "equal", line: a[i] });
168
+ return edits;
169
+ }
170
+ export function diffJsonSubset(expectedSubset, actual, path = "$") {
171
+ const diffs = [];
172
+ walk(expectedSubset, actual, path, diffs);
173
+ return diffs;
174
+ }
175
+ function walk(exp, act, p, diffs) {
176
+ if (Array.isArray(exp)) {
177
+ if (!Array.isArray(act)) {
178
+ diffs.push({ path: p, expected: exp, actual: act });
179
+ return;
180
+ }
181
+ // subset semantics: each expected element must match by index
182
+ for (let i = 0; i < exp.length; i++) {
183
+ if (i >= act.length)
184
+ diffs.push({ path: `${p}[${i}]`, expected: exp[i], actual: undefined });
185
+ else
186
+ walk(exp[i], act[i], `${p}[${i}]`, diffs);
187
+ }
188
+ return;
189
+ }
190
+ if (exp && typeof exp === "object") {
191
+ if (!act || typeof act !== "object" || Array.isArray(act)) {
192
+ diffs.push({ path: p, expected: exp, actual: act });
193
+ return;
194
+ }
195
+ const expObj = exp;
196
+ const actObj = act;
197
+ for (const k of Object.keys(expObj)) {
198
+ if (!(k in actObj))
199
+ diffs.push({ path: `${p}.${k}`, expected: expObj[k], actual: undefined });
200
+ else
201
+ walk(expObj[k], actObj[k], `${p}.${k}`, diffs);
202
+ }
203
+ return;
204
+ }
205
+ if (exp !== act)
206
+ diffs.push({ path: p, expected: exp, actual: act });
207
+ }
@@ -0,0 +1,37 @@
1
+ import type { ContractV02 } from "./types.js";
2
+ export type DocsExportFormat = "markdown" | "html" | "llms-txt";
3
+ export interface ExportDocsOptions {
4
+ format?: DocsExportFormat;
5
+ title?: string;
6
+ baseUrl?: string;
7
+ strict?: boolean;
8
+ includeSkippedComments?: boolean;
9
+ }
10
+ export interface ExportDocsResult {
11
+ format: DocsExportFormat;
12
+ content: string;
13
+ fileExtension: string;
14
+ documentedCount: number;
15
+ httpCount: number;
16
+ cliCount: number;
17
+ webCount: number;
18
+ skippedInvariants: Array<{
19
+ id: string;
20
+ reason: string;
21
+ }>;
22
+ warnings: string[];
23
+ outPath?: string;
24
+ }
25
+ /**
26
+ * Export a ContractV02 into interactive documentation (`markdown`, `html`, or `llms-txt`)
27
+ * with 100% holdout invisibility and secret/XSS sanitization.
28
+ */
29
+ export declare function exportContractDocs(contract: ContractV02, options?: ExportDocsOptions): ExportDocsResult;
30
+ /**
31
+ * Generate and atomically write contract documentation to disk via temp file + rename.
32
+ */
33
+ export declare function writeContractDocs(contract: ContractV02, outPath: string, options?: ExportDocsOptions): ExportDocsResult;
34
+ /**
35
+ * Format a concise, sanitized terminal summary for a documentation export result.
36
+ */
37
+ export declare function formatPrettyDocsExport(result: ExportDocsResult, outPath?: string, color?: boolean): string;