@whisperr/wizard 0.5.3 → 0.6.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 (3) hide show
  1. package/README.md +52 -47
  2. package/dist/index.js +3547 -3769
  3. package/package.json +5 -6
package/README.md CHANGED
@@ -1,80 +1,85 @@
1
1
  # @whisperr/wizard
2
2
 
3
- Generate and integrate a Whisperr intervention model from your actual codebase.
3
+ Integrate [Whisperr](https://whisperr.net) into your app with one command.
4
4
 
5
5
  ```bash
6
6
  npx @whisperr/wizard
7
7
  ```
8
8
 
9
- Run the command in the customer-facing frontend first. The wizard detects the stack, authenticates the app, inspects concrete product behavior, writes the generated model to Whisperr as it works, installs the SDK, and instruments the generated events.
9
+ Run it in your project's root. The wizard detects your stack, signs you in,
10
+ **maps your codebase, plans every event placement, shows you the plan, and
11
+ wires it in** — then verifies the build, watches for your first event, and
12
+ hands you a clean diff to review and commit.
10
13
 
11
- ## How It Works
14
+ ## How it works
12
15
 
13
- 1. A read-only Terra agent maps repository structure, end-user paths, and concrete event call sites.
14
- 2. The Sol primary creates only intervention groups, interventions, events, and direct intervention-event links.
15
- 3. Each accepted item is written to runtime immediately with a stable idempotency key, so the dashboard can show live progress.
16
- 4. Sol installs and configures the stack-specific SDK, then instruments events owned by this project.
17
- 5. The host runs the stack's deterministic build or lint verifier when one is defined, before runtime accepts completion.
18
- 6. An interrupted run resumes from the runtime snapshot and its OpenAI conversation. Missing conversations restart from the same server snapshot without duplicating rows.
16
+ The wizard is an agentic integrator with a planner/editor split:
19
17
 
20
- For split repositories, finish the frontend run before running the wizard in backend repositories. A full-stack repository is one project.
18
+ 1. **Plan** one read-only pass charts your repo (entry points, end-user vs
19
+ admin auth flows, billing surfaces, existing analytics wrappers) and
20
+ decides, per event, exactly where it belongs (`file @ anchor`) with the
21
+ properties available in scope — or says honestly that it doesn't exist on
22
+ this surface. It also notes churn-relevant moments your plan is missing.
23
+ 2. **See the plan** — every placement is printed before a single line
24
+ changes. The run then proceeds on its own; pass `--review-plan` if you'd
25
+ rather confirm placements first, or `--propose-only` to keep new
26
+ events/interventions behind dashboard approval instead of adding them.
27
+ 3. **Wire** — a fast editor model executes the plan mechanically.
28
+ 4. **Review** — the agent re-reads its own diff and fixes wrong subjects,
29
+ wrong lifecycle moments, and missing discriminators.
30
+ 5. **Verify** — placements are scanned back out of the diff, your build/lint
31
+ command runs, and failures get one automatic repair pass. Every event ends
32
+ the run as `✓ wired @ file` or `○ skipped — reason`.
21
33
 
22
- ## Supported Stacks
34
+ Multi-surface aware: run it in your web app, then your mobile app, then your
35
+ backend — the wizard knows what each surface already covers and never
36
+ re-proposes what another run wired.
23
37
 
24
- Next.js, Web (JavaScript/TypeScript), React Native, Flutter, Swift, Node, Python, and PHP.
38
+ ## Supported stacks
25
39
 
26
- ## Requirements
40
+ Next.js · Web (JS/TS) · React Native · Flutter · Swift · Node · Python · PHP
27
41
 
28
- - Node.js 22+
29
- - A completed Whisperr onboarding session
30
- - A Git repository with a clean working tree for a new run
42
+ ## Requirements
31
43
 
32
- An incomplete run may resume with its existing wizard edits still in the working tree. `--force` permits other uncommitted changes; invocation-scoped restore preserves the state that existed before that invocation.
44
+ - Node.js 18.17+
45
+ - A Whisperr account with onboarding completed (or use `--offline` to demo)
33
46
 
34
47
  ## Usage
35
48
 
36
49
  ```bash
50
+ # in your project root
37
51
  npx @whisperr/wizard
52
+
53
+ # or point it somewhere
38
54
  npx @whisperr/wizard path/to/app
39
55
  ```
40
56
 
41
57
  Options:
42
58
 
43
- ```text
44
- --force Proceed without a clean Git tree
45
- --api <url> Override the Whisperr API base URL
46
- --model <id> Override the primary Sol model
59
+ ```
60
+ --offline Demo run with a mock manifest — no account or browser needed
61
+ --force Proceed without a clean git tree (disables the safe undo)
62
+ --api <url> Point at a specific Whisperr API (advanced)
63
+ --model <id> Override the editor model (WHISPERR_WIZARD_MODEL)
47
64
  -h, --help Show help
48
65
  -v, --version Show version
49
66
  ```
50
67
 
51
- Model defaults are `gpt-5.6-sol` with `high` reasoning and the `priority` service tier, plus `gpt-5.6-terra` with `xhigh` reasoning for read-only exploration.
52
-
53
- Development overrides:
54
-
55
- - `WHISPERR_WIZARD_API_BASE`
56
- - `WHISPERR_WIZARD_OPENAI_BASE`
57
- - `WHISPERR_WIZARD_PRIMARY_MODEL`
58
- - `WHISPERR_WIZARD_PRIMARY_EFFORT`
59
- - `WHISPERR_WIZARD_SERVICE_TIER`
60
- - `WHISPERR_WIZARD_EXPLORER_MODEL`
61
- - `WHISPERR_WIZARD_EXPLORER_EFFORT`
62
- - `WHISPERR_WIZARD_DIRECT_OPENAI_KEY`
63
- - `WHISPERR_WIZARD_LOG_DIR` to place private diagnostic logs in a specific directory outside the target repository
64
-
65
- ## Diagnostics
66
-
67
- Each wizard invocation prints the path to one private JSONL diagnostic file. By default it is stored under the wizard state directory's `logs` folder, outside the target repository. The directory is mode `0700` and each file is mode `0600`. Filenames contain only a timestamp and random invocation ID.
68
-
69
- Diagnostics contain bounded lifecycle, progress, Git-safety, coverage, first-event, and HTTP timing/status metadata. They do not contain request or response bodies or headers, prompts, repository source, model output or reasoning, subprocess output, environment contents, authorization codes or URLs, or credentials. Known credentials are registered for exact redaction as they become available, and common token/key formats are also scrubbed.
68
+ Environment knobs: `WHISPERR_WIZARD_PLANNER_MODEL`,
69
+ `WHISPERR_WIZARD_BUDGET_USD` (default 25), `WHISPERR_WIZARD_EFFORT`.
70
70
 
71
71
  ## Safety
72
72
 
73
- - Repository tools are host-owned and restricted to the selected repository.
74
- - Secret files are blocked. The host writes ingestion credentials only to local environment files and redacts them from model-visible reads and command output.
75
- - Terra receives only read, list, and search tools.
76
- - Repository commands use parsed arguments without a shell and are limited to approved SDK package installation plus metadata-only Git commands.
77
- - Git and CI configuration writes are blocked.
78
- - The wizard never commits or pushes changes.
73
+ - **Clean-tree contract** the wizard requires a clean git working tree and
74
+ gives you a one-command revert; your code is never uncommitted-mixed with
75
+ its changes.
76
+ - **Restricted agent sandbox** the agent cannot read secret material
77
+ (`.env*`, keys, credentials) and can only run an allowlisted set of package
78
+ -manager commands. Details in [SECURITY.md](./SECURITY.md).
79
+ - **Nothing merges itself** — the wizard's output is a working-tree diff for
80
+ you to review and commit.
81
+
82
+ ---
79
83
 
80
- See [SECURITY.md](./SECURITY.md) for the complete boundary and residual risks.
84
+ Whisperr predict churn, automate interventions, recover revenue.
85
+ [whisperr.net](https://whisperr.net)