From c8528af12b28cea7d1b0948caa641ce635120b12 Mon Sep 17 00:00:00 2001 From: PJ Date: Mon, 25 May 2026 18:13:36 +0530 Subject: [PATCH] feat(spec): add defaultActions bundle --- pkg/spec/src/defaults/actions.ts | 14 ++++++++++++++ pkg/spec/src/defaults/index.ts | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 pkg/spec/src/defaults/actions.ts create mode 100644 pkg/spec/src/defaults/index.ts diff --git a/pkg/spec/src/defaults/actions.ts b/pkg/spec/src/defaults/actions.ts new file mode 100644 index 0000000..f332635 --- /dev/null +++ b/pkg/spec/src/defaults/actions.ts @@ -0,0 +1,14 @@ +import { pressKey, swipes, taps, typing, weighted } from "../actions.ts"; +import type { ActionGenerator } from "../types.ts"; + +export { pressKey, swipes, taps, typing, waitOnce } from "../actions.ts"; + +// A broad exploration generator: tap things, type edge-case values into fields, +// swipe, and occasionally press back. Layer it under targeted depth flows so the +// fuzzer wanders the whole app while still driving the paths an author wrote. +export const defaultActions: ActionGenerator = weighted( + [50, taps], + [30, typing], + [10, swipes], + [10, pressKey], +); diff --git a/pkg/spec/src/defaults/index.ts b/pkg/spec/src/defaults/index.ts new file mode 100644 index 0000000..a292e69 --- /dev/null +++ b/pkg/spec/src/defaults/index.ts @@ -0,0 +1,2 @@ +export * from "./properties.ts"; +export * from "./actions.ts";