vibecode-anything 0.3.0 → 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 (160) hide show
  1. package/README.md +239 -67
  2. package/dist/cli.js +2140 -73
  3. package/dist/core/adapters.d.ts +26 -3
  4. package/dist/core/adapters.js +411 -25
  5. package/dist/core/agent-adapter.d.ts +67 -0
  6. package/dist/core/agent-adapter.js +312 -0
  7. package/dist/core/anti-cheat.d.ts +6 -0
  8. package/dist/core/anti-cheat.js +372 -0
  9. package/dist/core/badge.d.ts +18 -0
  10. package/dist/core/badge.js +360 -0
  11. package/dist/core/cache.d.ts +47 -0
  12. package/dist/core/cache.js +403 -0
  13. package/dist/core/ci-export.d.ts +35 -0
  14. package/dist/core/ci-export.js +796 -0
  15. package/dist/core/ci-formats.d.ts +21 -0
  16. package/dist/core/ci-formats.js +388 -0
  17. package/dist/core/client-codegen.d.ts +36 -0
  18. package/dist/core/client-codegen.js +2538 -0
  19. package/dist/core/compose.d.ts +71 -0
  20. package/dist/core/compose.js +1088 -0
  21. package/dist/core/docs-export.d.ts +37 -0
  22. package/dist/core/docs-export.js +2706 -0
  23. package/dist/core/doctor.d.ts +21 -1
  24. package/dist/core/doctor.js +234 -21
  25. package/dist/core/exec.d.ts +26 -2
  26. package/dist/core/exec.js +235 -8
  27. package/dist/core/fixtures.d.ts +153 -0
  28. package/dist/core/fixtures.js +2245 -0
  29. package/dist/core/format.d.ts +77 -0
  30. package/dist/core/format.js +632 -0
  31. package/dist/core/fs-snapshot.d.ts +37 -0
  32. package/dist/core/fs-snapshot.js +216 -0
  33. package/dist/core/graphql-export.d.ts +34 -0
  34. package/dist/core/graphql-export.js +2482 -0
  35. package/dist/core/har-export.d.ts +29 -0
  36. package/dist/core/har-export.js +988 -0
  37. package/dist/core/html-report.d.ts +27 -0
  38. package/dist/core/html-report.js +1535 -0
  39. package/dist/core/http-export.d.ts +31 -0
  40. package/dist/core/http-export.js +726 -0
  41. package/dist/core/impact.d.ts +80 -0
  42. package/dist/core/impact.js +1412 -0
  43. package/dist/core/lint.d.ts +38 -0
  44. package/dist/core/lint.js +1111 -0
  45. package/dist/core/load-export.d.ts +37 -0
  46. package/dist/core/load-export.js +1813 -0
  47. package/dist/core/mcp-export.d.ts +35 -0
  48. package/dist/core/mcp-export.js +1736 -0
  49. package/dist/core/mock-server.d.ts +47 -0
  50. package/dist/core/mock-server.js +1722 -0
  51. package/dist/core/openapi-export.d.ts +44 -0
  52. package/dist/core/openapi-export.js +1074 -0
  53. package/dist/core/parity.d.ts +6 -1
  54. package/dist/core/parity.js +36 -1
  55. package/dist/core/playwright-exporter.d.ts +23 -0
  56. package/dist/core/playwright-exporter.js +1343 -0
  57. package/dist/core/png.js +45 -9
  58. package/dist/core/regression.d.ts +54 -0
  59. package/dist/core/regression.js +529 -0
  60. package/dist/core/responsive.d.ts +86 -0
  61. package/dist/core/responsive.js +606 -0
  62. package/dist/core/run.d.ts +74 -0
  63. package/dist/core/run.js +696 -0
  64. package/dist/core/scheduler.d.ts +24 -0
  65. package/dist/core/scheduler.js +162 -0
  66. package/dist/core/schema-export.d.ts +29 -0
  67. package/dist/core/schema-export.js +2215 -0
  68. package/dist/core/schema.d.ts +3 -2
  69. package/dist/core/schema.js +460 -17
  70. package/dist/core/security.d.ts +233 -0
  71. package/dist/core/security.js +1839 -0
  72. package/dist/core/server-export.d.ts +38 -0
  73. package/dist/core/server-export.js +3198 -0
  74. package/dist/core/spec-writer.d.ts +9 -0
  75. package/dist/core/spec-writer.js +1202 -0
  76. package/dist/core/store.d.ts +11 -2
  77. package/dist/core/store.js +128 -8
  78. package/dist/core/target-map.d.ts +34 -0
  79. package/dist/core/target-map.js +262 -0
  80. package/dist/core/test-exporter.d.ts +25 -0
  81. package/dist/core/test-exporter.js +1918 -0
  82. package/dist/core/types.d.ts +182 -14
  83. package/dist/core/visual-semantic.d.ts +67 -0
  84. package/dist/core/visual-semantic.js +673 -0
  85. package/dist/core/visual.js +65 -16
  86. package/dist/core/watch.d.ts +28 -3
  87. package/dist/core/watch.js +222 -12
  88. package/dist/core/yaml.d.ts +5 -0
  89. package/dist/core/yaml.js +1009 -0
  90. package/dist/diagnostics/diagnose.d.ts +53 -0
  91. package/dist/diagnostics/diagnose.js +1083 -0
  92. package/dist/diagnostics/flake.d.ts +71 -0
  93. package/dist/diagnostics/flake.js +608 -0
  94. package/dist/diagnostics/mutation-audit.d.ts +69 -0
  95. package/dist/diagnostics/mutation-audit.js +769 -0
  96. package/dist/diagnostics/spatial.d.ts +42 -0
  97. package/dist/diagnostics/spatial.js +346 -0
  98. package/dist/diagnostics/trends.d.ts +122 -0
  99. package/dist/diagnostics/trends.js +1190 -0
  100. package/dist/discovery/discover.d.ts +111 -0
  101. package/dist/discovery/discover.js +2017 -0
  102. package/dist/discovery/lock.d.ts +116 -0
  103. package/dist/discovery/lock.js +1505 -0
  104. package/dist/discovery/routes.d.ts +36 -0
  105. package/dist/discovery/routes.js +1494 -0
  106. package/dist/discovery/test-importer.d.ts +92 -0
  107. package/dist/discovery/test-importer.js +4952 -0
  108. package/dist/index.d.ts +123 -0
  109. package/dist/index.js +99 -0
  110. package/dist/ingestors/api-collections.d.ts +28 -0
  111. package/dist/ingestors/api-collections.js +2335 -0
  112. package/dist/ingestors/api-repo.d.ts +2 -1
  113. package/dist/ingestors/api-repo.js +483 -85
  114. package/dist/ingestors/asyncapi.d.ts +26 -0
  115. package/dist/ingestors/asyncapi.js +2105 -0
  116. package/dist/ingestors/bridges.d.ts +2 -0
  117. package/dist/ingestors/bridges.js +702 -0
  118. package/dist/ingestors/cli.d.ts +2 -1
  119. package/dist/ingestors/cli.js +234 -46
  120. package/dist/ingestors/curl.d.ts +14 -0
  121. package/dist/ingestors/curl.js +1024 -0
  122. package/dist/ingestors/graphql.d.ts +56 -0
  123. package/dist/ingestors/graphql.js +1852 -0
  124. package/dist/ingestors/http-file.d.ts +20 -0
  125. package/dist/ingestors/http-file.js +923 -0
  126. package/dist/ingestors/index.js +486 -6
  127. package/dist/ingestors/openrpc.d.ts +29 -0
  128. package/dist/ingestors/openrpc.js +1807 -0
  129. package/dist/ingestors/proto.d.ts +47 -0
  130. package/dist/ingestors/proto.js +2690 -0
  131. package/dist/ingestors/trace.d.ts +10 -0
  132. package/dist/ingestors/trace.js +599 -0
  133. package/dist/ingestors/video.d.ts +4 -1
  134. package/dist/ingestors/video.js +86 -36
  135. package/dist/ingestors/web.d.ts +16 -1
  136. package/dist/ingestors/web.js +474 -32
  137. package/dist/mcp/server.js +3532 -67
  138. package/dist/oracles/api-repo.js +102 -30
  139. package/dist/oracles/cli.js +65 -17
  140. package/dist/oracles/http-workflow.d.ts +68 -0
  141. package/dist/oracles/http-workflow.js +828 -0
  142. package/dist/oracles/image.js +178 -28
  143. package/dist/oracles/index.d.ts +3 -1
  144. package/dist/oracles/index.js +243 -14
  145. package/dist/oracles/perf-budget.d.ts +90 -0
  146. package/dist/oracles/perf-budget.js +1329 -0
  147. package/dist/oracles/stream.d.ts +94 -0
  148. package/dist/oracles/stream.js +1268 -0
  149. package/dist/oracles/ui-states.d.ts +49 -0
  150. package/dist/oracles/ui-states.js +894 -0
  151. package/dist/oracles/video.d.ts +1 -1
  152. package/dist/oracles/video.js +232 -16
  153. package/dist/oracles/web.js +464 -73
  154. package/dist/plugins/builtins.d.ts +12 -0
  155. package/dist/plugins/builtins.js +1052 -0
  156. package/dist/plugins/registry.d.ts +86 -0
  157. package/dist/plugins/registry.js +554 -0
  158. package/dist/setup/index.js +145 -33
  159. package/package.json +56 -47
  160. package/skills/vibecode-anything/SKILL.md +75 -52
@@ -0,0 +1,233 @@
1
+ /**
2
+ * Zero-dependency, linear-time (ReDoS-safe) security helpers shared across
3
+ * discovery, lock integrity, and diagnostics: secret/vault redaction and
4
+ * cross-platform path/vault/secret-file containment checks.
5
+ */
6
+ export declare const VALID_DOMAINS: ReadonlySet<string>;
7
+ export declare const ANSI: {
8
+ readonly reset: "\u001B[0m";
9
+ readonly bold: "\u001B[1m";
10
+ readonly dim: "\u001B[2m";
11
+ readonly red: "\u001B[31m";
12
+ readonly green: "\u001B[32m";
13
+ readonly yellow: "\u001B[33m";
14
+ readonly cyan: "\u001B[36m";
15
+ };
16
+ export declare function styleAnsi(text: string, codes: string, useColor: boolean): string;
17
+ export declare const FORBIDDEN_OBJECT_KEYS: ReadonlySet<string>;
18
+ export declare function isForbiddenObjectKey(key: string): boolean;
19
+ /** Strictly length-preserving ASCII-only lowercase (`A-Z` -> `a-z`), immune to Unicode expansion (e.g. Turkish `İ`). */
20
+ export declare function asciiLower(value: string): string;
21
+ /** Expands leading `~`, `~/`, or `~\` against `os.homedir()`. */
22
+ export declare function expandLeadingTilde(rawPath: string): string;
23
+ export declare const STRICT_CONTROL_CHARS_RE: RegExp;
24
+ export declare const HEADER_VALUE_UNSAFE_RE: RegExp;
25
+ export declare const HTTP_HEADER_NAME_RE: RegExp;
26
+ export declare const WINDOWS_RESERVED_NAME_RE: RegExp;
27
+ export declare const USERINFO_IN_FIRST_SEG_RE: RegExp;
28
+ /**
29
+ * Strictly O(N) linear-time stripper for ANSI CSI/OSC/DCS/APC/PM/SOS, standalone ESC,
30
+ * 8-bit C1 controls, C0 non-whitespace controls, and Trojan Source Unicode bidi/line overrides.
31
+ */
32
+ export declare function stripTerminalEscapes(value: string): string;
33
+ export declare const SENSITIVE_KEY_NAME_RE: RegExp;
34
+ export declare function isSensitiveHeaderName(name: string): boolean;
35
+ export declare function isSensitiveQueryParamName(name: string): boolean;
36
+ export declare function isSensitiveKeyName(name: string): boolean;
37
+ /**
38
+ * Redacts secrets, credentials, auth headers/tokens, sensitive query/env/JSON fields,
39
+ * `.vibecode-vault` paths, holdout filenames, and active `VIBECODE_VAULT_DIR` paths
40
+ * (including tilde `~/...` forms) in strict O(N) linear time (ReDoS-proof).
41
+ */
42
+ export declare function redactSensitiveText(text: string): string;
43
+ /**
44
+ * Variant of `redactSensitiveText` allowing an explicit vault replacement token
45
+ * (such as `"[REDACTED_VAULT_PATH]"` for MCP responses).
46
+ */
47
+ export declare function redactSensitiveTextWithOptions(text: string, options?: {
48
+ vaultToken?: string;
49
+ }): string;
50
+ /** Redacts text, strips escapes, collapses whitespace to a single line, and optionally bounds length. */
51
+ export declare function sanitizeSingleLine(text: string, maxChars?: number): string;
52
+ /**
53
+ * Rejects NUL bytes, ASCII control chars, UNC/device paths, drive-relative paths,
54
+ * leading backslashes, Windows drive-letter paths on POSIX, and backslash-normalized
55
+ * `..` / `../` parent escapes.
56
+ */
57
+ export declare function hasCrossPlatformPathEscape(rawPath: string): boolean;
58
+ /**
59
+ * Checks whether `targetPath` is contained within `baseDir`, handling Windows
60
+ * case-insensitivity and cross-drive paths safely.
61
+ */
62
+ export declare function isPathWithinDir(targetPath: string, baseDir: string, options?: {
63
+ allowEqual?: boolean;
64
+ }): boolean;
65
+ /** Alias for `isPathWithinDir(targetPath, baseDir, { allowEqual: true })`. */
66
+ export declare function isInsideOrEqualDir(targetPath: string, baseDir: string): boolean;
67
+ /** Checks path segments split on `/` or `\` for `.vibecode-vault`, `holdout`/`holdouts`, or `holdout(s)-*.json`. */
68
+ export declare function hasVaultOrHoldoutSegment(relPath: string): boolean;
69
+ /**
70
+ * Resolves `absPath` via its deepest existing ancestor (following intermediate or dangling
71
+ * symlinks across arbitrary path depth) while rejecting symlink cycles and > `maxHops` chains.
72
+ */
73
+ export declare function resolvePathViaExistingAncestor(absPath: string, maxHops?: number): string | null;
74
+ /**
75
+ * Returns true if `targetPath` (or its `realpathSync` / ancestor / symlink target) refers
76
+ * to a vault/holdout path or lies inside `VIBECODE_VAULT_DIR` or `~/.vibecode-vault`.
77
+ */
78
+ export declare function isInsideVaultDirectory(targetPath: string): boolean;
79
+ export declare function isEnvExampleFileName(baseName: string): boolean;
80
+ /** Checks whether a relative path refers to a secret, vault/holdout, or excluded file. */
81
+ export declare function isSecretRelativePath(relPath: string, options?: {
82
+ allowEnvExample?: boolean;
83
+ ignoredSegments?: ReadonlySet<string>;
84
+ }): boolean;
85
+ /** Rejects Windows ADS colons, leading whitespace, NTFS trailing dots/spaces, control chars, and Windows reserved device names. */
86
+ export declare function hasUnsafeRelativeSegment(relPath: string): boolean;
87
+ export interface ValidateSafeWorkspaceRelPathOptions {
88
+ label?: string;
89
+ forbiddenSegments?: ReadonlySet<string>;
90
+ allowEnvExample?: boolean;
91
+ blockVaultOrHoldout?: boolean;
92
+ blockSecretFiles?: boolean;
93
+ }
94
+ export type SafeWorkspaceRelPathResult = {
95
+ ok: true;
96
+ relPath: string;
97
+ } | {
98
+ ok: false;
99
+ error: string;
100
+ };
101
+ /** Validates and normalizes a workspace-relative path, rejecting traversal, NTFS/reserved tricks, protected dirs, vault, and secrets. */
102
+ export declare function validateSafeWorkspaceRelPath(raw: unknown, options?: ValidateSafeWorkspaceRelPathOptions): SafeWorkspaceRelPathResult;
103
+ export interface ValidateOriginRelativePathOptions {
104
+ maxLength?: number;
105
+ allowVarPlaceholders?: boolean;
106
+ varPlaceholderRe?: RegExp;
107
+ }
108
+ export type OriginRelativePathResult = {
109
+ ok: true;
110
+ path: string;
111
+ } | {
112
+ ok: false;
113
+ error: string;
114
+ };
115
+ /** Validates that a request path is strictly `/`-rooted on the target origin without SSRF overrides or userinfo. */
116
+ export declare function validateOriginRelativePath(raw: unknown, label?: string, options?: ValidateOriginRelativePathOptions): OriginRelativePathResult;
117
+ export interface ParseSafeHttpBaseUrlOptions {
118
+ allowWs?: boolean;
119
+ defaultProtocol?: "http" | "ws";
120
+ }
121
+ /** Parses and validates an HTTP(S) (or optional WS/WSS) base target URL without silently rewriting non-HTTP schemes. */
122
+ export declare function parseSafeHttpBaseUrl(rawBase: string, options?: ParseSafeHttpBaseUrlOptions): URL;
123
+ export interface ResolveSafeTargetUrlOptions {
124
+ allowCrossOrigin?: boolean;
125
+ allowWs?: boolean;
126
+ defaultProtocol?: "http" | "ws";
127
+ normalizeWsProtocol?: boolean;
128
+ query?: Record<string, unknown>;
129
+ }
130
+ /**
131
+ * Resolves `pathOrUrl` against `baseUrl` while blocking `file://`, `data:`, `javascript:`,
132
+ * `//evil`, backslash authority overrides, userinfo injection, and (by default) cross-origin redirects.
133
+ */
134
+ export declare function resolveSafeTargetUrl(pathOrUrl: string, baseUrl: string | URL, options?: ResolveSafeTargetUrlOptions): URL;
135
+ export declare function safeIsArray(value: unknown): value is readonly unknown[];
136
+ export declare function safeLength(arr: readonly unknown[], maxLen?: number): number;
137
+ export declare function isPlainObjectSafe(value: unknown): value is Record<string, unknown>;
138
+ /** Proxy-safe object check accepting any non-null, non-array object (regardless of prototype). */
139
+ export declare function isRecordSafe(value: unknown): value is Record<string, unknown>;
140
+ /** Own data-property read that ignores prototype pollution, never triggers getters, and catches Proxy traps. */
141
+ export declare function safeOwnProp(obj: unknown, key: string): unknown;
142
+ export type PropReadResult = {
143
+ ok: true;
144
+ present: boolean;
145
+ value: unknown;
146
+ } | {
147
+ ok: false;
148
+ error: string;
149
+ };
150
+ export declare function safeReadOwnDataProp(obj: unknown, key: string, label: string): PropReadResult;
151
+ export declare function defineOwnProp<T = unknown>(obj: Record<string, T>, key: string, value: T): void;
152
+ export interface SafeReadPlainObjectOptions {
153
+ allowNullish?: boolean;
154
+ forbiddenKeyPolicy?: "reject" | "skip" | "keep";
155
+ includeNonEnumerable?: boolean;
156
+ }
157
+ export type SafePlainObjectResult = {
158
+ ok: true;
159
+ entries: Map<string, unknown>;
160
+ } | {
161
+ ok: false;
162
+ kind: "not_plain" | "forbidden_key" | "accessor" | "proxy_error";
163
+ error: string;
164
+ key?: string;
165
+ };
166
+ export declare function safeReadPlainObject(raw: unknown, label: string, options?: SafeReadPlainObjectOptions): SafePlainObjectResult;
167
+ export type SafeArrayResult = {
168
+ ok: true;
169
+ items: unknown[];
170
+ } | {
171
+ ok: false;
172
+ error: string;
173
+ };
174
+ export declare function safeReadArray(raw: unknown, label: string, maxItems?: number): SafeArrayResult;
175
+ export declare function safePrimitiveToString(value: unknown): string | null;
176
+ export declare function safeString(value: unknown): string;
177
+ export declare function clampInt(value: unknown, fallback: number, min: number, max: number): number;
178
+ export interface CollectSecretOptions {
179
+ minLength?: number;
180
+ skipVarPlaceholders?: boolean;
181
+ }
182
+ export interface CollectJsonSecretsOptions extends CollectSecretOptions {
183
+ maxDepth?: number;
184
+ }
185
+ export declare function collectSecretValue(secrets: Set<string>, raw: unknown, options?: CollectSecretOptions): void;
186
+ export declare function collectUrlSecrets(secrets: Set<string>, rawUrl: string, options?: CollectSecretOptions): void;
187
+ export declare function collectHeaderSecrets(secrets: Set<string>, headers: unknown, options?: CollectSecretOptions): void;
188
+ export declare function collectJsonSecrets(secrets: Set<string>, node: unknown, options?: CollectJsonSecretsOptions): void;
189
+ /** Expands a secret literal into raw + URL-encoded, lower-hex, form `+`, encodeURI, and JSON-escaped variants. */
190
+ export declare function expandSecretVariants(base: string, hasPercent: boolean, hasPlus: boolean, hasBackslash: boolean): string[];
191
+ /**
192
+ * Replaces all occurrences of `secrets` (raw and encoded variants) in strict O(N) span-union
193
+ * fashion so overlapping secrets and sentinel collisions cannot leave fragments.
194
+ */
195
+ export declare function redactSecretSpans(text: string, secrets: Iterable<string>, token?: string): string;
196
+ export interface RedactDeepValueOptions {
197
+ maxDepth?: number;
198
+ maxNodes?: number;
199
+ maxArrayItems?: number;
200
+ redactText?: (text: string) => string;
201
+ sensitiveKeyMode?: "none" | "value" | "strings";
202
+ sensitivePathAware?: boolean;
203
+ preserveKeys?: ReadonlySet<string>;
204
+ unwrapError?: boolean;
205
+ sanitizeNonFiniteNumbers?: boolean;
206
+ stringifyNonJsonPrimitives?: boolean;
207
+ truncatedToken?: string;
208
+ circularToken?: string;
209
+ }
210
+ /**
211
+ * Error-aware, depth-capped, prototype-safe, descriptor-safe, and DAG-safe deep value redactor.
212
+ */
213
+ export declare function redactDeepValue(value: unknown, options?: RedactDeepValueOptions): unknown;
214
+ /** Descriptor-safe check whether a parity result record belongs to a holdout invariant. */
215
+ export declare function isHoldoutResultRecord(result: unknown): boolean;
216
+ export interface ReadBoundedFileOptions {
217
+ noFollow?: boolean;
218
+ rejectBinary?: boolean;
219
+ strictUtf8?: boolean;
220
+ stripBom?: boolean;
221
+ }
222
+ export type ReadBoundedFileResult = {
223
+ ok: true;
224
+ text: string;
225
+ bytes: number;
226
+ } | {
227
+ ok: false;
228
+ reason: "oversized" | "binary" | "not_file" | "unreadable";
229
+ size?: number;
230
+ code?: string;
231
+ };
232
+ /** Reads up to `maxBytes` of a regular file (or open fd) safely into UTF-8 with O_NOFOLLOW and binary guards. */
233
+ export declare function readBoundedFileUtf8(filePathOrFd: string | number, maxBytes: number, options?: ReadBoundedFileOptions): ReadBoundedFileResult;