@mizchi/vlmkit-generate 0.9.0 → 0.9.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/README.md +1 -1
- package/dist/generate.mjs +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ The optional second argument to `buildPlaywrightRuntimeGate` repeats the runtime
|
|
|
81
81
|
gate, which is useful for routing, filters, hydration, and other timing-sensitive
|
|
82
82
|
UI where a single run can miss a race.
|
|
83
83
|
|
|
84
|
-
When `provider` is omitted, vlmkit-generate uses `
|
|
84
|
+
When `provider` is omitted, vlmkit-generate uses `VLMKIT_LLM_PROVIDER` first, then
|
|
85
85
|
available API keys in this order: Anthropic, OpenRouter, Gemini. With no key
|
|
86
86
|
signals it falls back to OpenRouter.
|
|
87
87
|
|
package/dist/generate.mjs
CHANGED
|
@@ -19,7 +19,7 @@ function buildGeneratePrompt(input) {
|
|
|
19
19
|
"- For live-region roles such as `status`, `alert`, and `log`, use `getByRole(\"status\")` and assert text separately; do not pass a `name` filter.",
|
|
20
20
|
"- Keep comments sparse. Do not narrate obvious Playwright actions; comment only non-obvious locator or determinism constraints.",
|
|
21
21
|
"- Every visual assertion must also have semantic assertions.",
|
|
22
|
-
requireScreenshots ? "- Include deterministic `toHaveScreenshot()` checks for the
|
|
22
|
+
requireScreenshots ? "- Include deterministic `toHaveScreenshot()` checks only for VRT states required by the plan and additional generation rules. Do not invent extra snapshots." : void 0,
|
|
23
23
|
input.locatorInventory ? formatLocatorInventory(input.locatorInventory) : void 0,
|
|
24
24
|
"",
|
|
25
25
|
input.rulesMarkdown?.trim() ? `Additional generation rules:\n${input.rulesMarkdown.trim()}` : void 0,
|
|
@@ -321,10 +321,10 @@ function normalizeMaxAttempts(value) {
|
|
|
321
321
|
return Math.max(1, Math.floor(value));
|
|
322
322
|
}
|
|
323
323
|
function resolveDefaultProvider(env) {
|
|
324
|
-
const fromEnv = env.
|
|
324
|
+
const fromEnv = env.VLMKIT_LLM_PROVIDER;
|
|
325
325
|
if (fromEnv) {
|
|
326
326
|
if (fromEnv === "anthropic" || fromEnv === "gemini" || fromEnv === "openrouter") return fromEnv;
|
|
327
|
-
throw new Error(`Invalid
|
|
327
|
+
throw new Error(`Invalid VLMKIT_LLM_PROVIDER: ${fromEnv}`);
|
|
328
328
|
}
|
|
329
329
|
if (env.ANTHROPIC_API_KEY) return "anthropic";
|
|
330
330
|
if (env.OPENROUTER_API_KEY) return "openrouter";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mizchi/vlmkit-generate",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Generator contract for Playwright tests: turns a Markdown plan and generation rules into a Playwright spec source file.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "mizchi",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"typescript": "^6.0.2",
|
|
47
|
-
"@mizchi/vlmkit-ai": "0.9.
|
|
47
|
+
"@mizchi/vlmkit-ai": "0.9.1"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "pnpm --dir ../.. exec tsdown --config tsdown.packages.config.ts --filter @mizchi/vlmkit-generate",
|