saffron-ai 0.9.9 → 1.0.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/CHANGELOG.md +969 -0
- package/README.md +5 -6
- package/dist-pkg/cli.js +384 -249
- package/package.json +4 -3
- package/skills/saffron/SKILL.md +208 -95
- package/skills/saffron/references/config.md +6 -3
- package/skills/saffron/references/syntax.md +128 -5
- package/textmate/saffron/syntaxes/saffron.tmLanguage.json +12 -3
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ of short `.saffron` scenarios against the public demo shop at saucedemo.com
|
|
|
44
44
|
the middle of scenarios) so the first run records and replays something
|
|
45
45
|
real.
|
|
46
46
|
|
|
47
|
-
**Built for the AI era:** Claude Code users install everything at once from the [Saffron plugin](https://github.com/s-chathuranga-j/saffron-claude-plugin) (`/plugin marketplace add s-chathuranga-j/saffron-claude-plugin`, then `/plugin install saffron@saffron`): the language server for diagnostics and navigation while Claude edits `.saffron` files, the MCP server, and the skill. For every other agent, the package ships an [Agent Skill](https://agentskills.io) that teaches Claude Code, Codex, Cursor, Copilot and any skill-aware agent to write Saffron tests efficiently. Reuse recorded wordings, keep assertions sacred, secrets as `{env:VAR}`, so the tests your agents write replay at zero tokens instead of paying for near-duplicate recordings.
|
|
47
|
+
**Built for the AI era:** Claude Code users install everything at once from the [Saffron plugin](https://github.com/s-chathuranga-j/saffron-claude-plugin) (`/plugin marketplace add s-chathuranga-j/saffron-claude-plugin`, then `/plugin install saffron@saffron`): the language server for diagnostics and navigation while Claude edits `.saffron` files, the MCP server, and the skill. Codex users get the MCP server and the skill from the same repo (`codex plugin marketplace add s-chathuranga-j/saffron-claude-plugin`, then `codex plugin add saffron@saffron`). For every other agent, the package ships an [Agent Skill](https://agentskills.io) that teaches Claude Code, Codex, Cursor, Copilot and any skill-aware agent to write Saffron tests efficiently. Reuse recorded wordings, keep assertions sacred, secrets as `{env:VAR}`, so the tests your agents write replay at zero tokens instead of paying for near-duplicate recordings.
|
|
48
48
|
|
|
49
49
|
CI tip: `saffron run --strict` treats yellow (passed-with-adaptation) as a
|
|
50
50
|
failure until its cache proposal is reviewed: cached-green-only builds.
|
|
@@ -131,8 +131,8 @@ cached replays *and* the agent start authenticated. Generate one with
|
|
|
131
131
|
|
|
132
132
|
The full execution-model diagram is on the site: https://saffron-ai.io/docs
|
|
133
133
|
|
|
134
|
-
- Caches store per-step action lists with semantic targets (`role` + accessible name, `nameRegex` for volatile labels, CSS fallbacks) and `<param>` placeholders, so one cache serves every Examples row of a Scenario Outline.
|
|
135
|
-
- Dynamic-content vocabulary for real-world apps: `captureText` stores displayed values (prices, counters) under a name; `expectDiffers` compares against captured values; `expectMatches`/`expectAttribute` assert patterns instead of literals; `{date±N}` templates keep date-picker locators valid across days; the replayer follows links that open new tabs, and multi-tab scenarios are plain prose ("switch back to the first tab", "close the preview tab", "open a new tab at …") recorded as tab actions; native dialogs, file uploads, drag-and-drop, and iframe-scoped elements replay on all three engines; network-aware steps wait on or assert backend API responses (`waitForResponse` / sacred `expectResponse`) with URL/method/status/body matchers, "wait for the order API to return 201" instead of a sleep.
|
|
134
|
+
- Caches store per-step action lists with semantic targets (`role` + accessible name, `nameRegex` for volatile labels, CSS fallbacks) and `<param>` placeholders, so one cache serves every Examples row of a Scenario Outline (unless the recording is bound to its row, which refuses the other rows with guidance, or a row's value needs one more recording; see "A recording bound to its row" in docs/HOW-TO-USE.md).
|
|
135
|
+
- Dynamic-content vocabulary for real-world apps: `captureText` stores displayed values (prices, counters) under a name; `expectDiffers` compares against captured values; `expectMatches`/`expectAttribute` assert patterns instead of literals; `{date±N}` templates keep date-picker locators valid across days; the replayer follows links that open new tabs, and multi-tab scenarios are plain prose ("switch back to the first tab", "close the preview tab", "open a new tab at …") recorded as tab actions; native dialogs, file uploads, drag-and-drop, and iframe-scoped elements replay on all three engines; a download is waited for, kept, and its text checked (`expectDownload`: an .ics file's `DTSTART;VALUE=DATE:{date+7:YYYYMMDD}`); network-aware steps wait on or assert backend API responses (`waitForResponse` / sacred `expectResponse`) with URL/method/status/body matchers, "wait for the order API to return 201" instead of a sleep.
|
|
136
136
|
- The agent and the replayer share one browser over CDP, so healing continues from the exact page state where replay failed.
|
|
137
137
|
- Every recorded action carries a page fingerprint (hash of the normalized aria snapshot) for token-free drift detection.
|
|
138
138
|
|
|
@@ -154,8 +154,7 @@ The roadmap is at **[saffron-ai.io/docs/roadmap](https://saffron-ai.io/docs/road
|
|
|
154
154
|
milestones, statuses and decision gates, and everything shipped so far in
|
|
155
155
|
its "Where we are" table.
|
|
156
156
|
Headlines ahead: API testing (reusable REST operations, fixtures and schema
|
|
157
|
-
validation),
|
|
158
|
-
features folder, failure video,
|
|
157
|
+
validation), failure video,
|
|
159
158
|
agent-blind secrets, LLM-less MCP replay, the Level-2 shared step library
|
|
160
159
|
(gated on Level-1 divergence data), and the long-term open-core SaaS layer.
|
|
161
160
|
|
|
@@ -168,4 +167,4 @@ agent-blind secrets, LLM-less MCP replay, the Level-2 shared step library
|
|
|
168
167
|
- **Docs site**: `npm run docs` builds a self-contained page at
|
|
169
168
|
## License
|
|
170
169
|
|
|
171
|
-
Free to use, including commercially, under the Saffron Free Use License (
|
|
170
|
+
Free to use, including commercially, under the [Saffron Free Use License](https://saffron-ai.io/docs/license) (the [LICENSE](LICENSE) file in this package). The runner's source is closed.
|