@userreason/wizard 0.2.1 → 0.3.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 (38) hide show
  1. package/README.md +103 -0
  2. package/dist/agent-note.js +6 -6
  3. package/dist/agent-skill.js +5 -5
  4. package/dist/analytics.js +9 -0
  5. package/dist/bin.js +201 -34
  6. package/dist/{chunk-ZGZOBW2B.js → chunk-2UEUVLCB.js} +3 -3
  7. package/dist/{chunk-5SC2K42Q.js → chunk-5IO5LY22.js} +2 -2
  8. package/dist/{chunk-GGARVSPT.js → chunk-77SK7TKZ.js} +8894 -5663
  9. package/dist/{chunk-YMSGDC4B.js → chunk-CADA5WZ3.js} +28 -6
  10. package/dist/{chunk-HACTNBV3.js → chunk-F4FKAUQN.js} +3 -3
  11. package/dist/{chunk-SJVLAYGG.js → chunk-GOYBYAUH.js} +8 -1
  12. package/dist/chunk-HIF6NUNK.js +33 -0
  13. package/dist/{chunk-6CJ4ANMN.js → chunk-MFGJ2KPT.js} +1 -1
  14. package/dist/{chunk-OEGNGGZ2.js → chunk-NMHTFC5Q.js} +10 -3
  15. package/dist/{chunk-5Z5J6PY5.js → chunk-NZ65XDNL.js} +4 -4
  16. package/dist/{chunk-3RDJORRS.js → chunk-P6DOSGRZ.js} +1 -1
  17. package/dist/chunk-SFODN2YB.js +196 -0
  18. package/dist/chunk-UN24JFV2.js +44 -0
  19. package/dist/chunk-VXWLSQYK.js +130 -0
  20. package/dist/chunk-YYFC7TM2.js +286 -0
  21. package/dist/{chunk-ULHKVBPD.js → chunk-Z6ZY7X2K.js} +5 -5
  22. package/dist/{chunk-JD5U4U26.js → chunk-ZHHIHHLU.js} +4 -4
  23. package/dist/cli-access.js +3 -3
  24. package/dist/connection.js +2 -2
  25. package/dist/first-survey.js +11 -0
  26. package/dist/footer.js +16 -0
  27. package/dist/global-cli.js +5 -5
  28. package/dist/integrate.js +4 -4
  29. package/dist/project.js +7 -3
  30. package/dist/registry.js +5 -3
  31. package/dist/setup-flow.js +24 -0
  32. package/dist/setup.js +32 -0
  33. package/dist/skills/userreason/SKILL.md +43 -0
  34. package/dist/skills/userreason/references/management.md +6 -0
  35. package/dist/startup.js +2 -2
  36. package/dist/state.js +5 -5
  37. package/dist/ui.js +2 -2
  38. package/package.json +1 -2
package/README.md CHANGED
@@ -36,6 +36,22 @@ terminal. The [first survey guide](https://docs.userreason.com/get-started/first
36
36
  walks through creating and publishing a survey. Installing the SDK does not
37
37
  publish a survey.
38
38
 
39
+ In development mode (`--dev`), an interactive installation continues into a
40
+ guided first-survey flow. Choose an improvement, workflow-friction or satisfaction
41
+ goal and immediately review a ready-to-edit question. You can save that starter
42
+ without AI or skip the step. Optional AI personalization runs while you review
43
+ the starter and never replaces your edits automatically.
44
+
45
+ Local source preparation starts after sign-in and stays in memory. It does not
46
+ upload code, read Git history or make a model call. Personalization requires a
47
+ separate review and approval of the exact source packet. Changed files are
48
+ rechecked before upload and before using a source-based suggestion.
49
+
50
+ Saving creates an unpublished draft. Choose a verified completion event or
51
+ configure audience and timing in the editor; the latter leaves the draft unable
52
+ to match anyone. No survey is published automatically. This development flow
53
+ does not change the production wizard or require an SDK release.
54
+
39
55
  For a different application directory:
40
56
 
41
57
  ```sh
@@ -137,3 +153,90 @@ locally and is not uploaded to an AI service.
137
153
 
138
154
  See [troubleshooting](https://docs.userreason.com/get-started/troubleshooting/)
139
155
  for help with installation, sign-in, permissions and browser verification.
156
+
157
+ ## Optional installation measurement
158
+
159
+ The wizard sends bounded step outcomes and durations to the UserReason API to
160
+ help improve setup. It records when initialization, agent guidance, the agent
161
+ skill and CLI access are offered, selected, skipped, already present, applied,
162
+ cancelled or fail. Choosing an option and successfully applying it are separate
163
+ outcomes. The optional choices share one prompt, so its decision time is measured
164
+ once; file and package operations have their own durations. Flow and content
165
+ versions identify the shipped wizard experience. No experiment assignment or
166
+ Statsig integration is included.
167
+
168
+ These events include framework, package manager, execution mode, rerun status,
169
+ version and known workspace/site scope. Source code, guidance content, file paths,
170
+ project names, email addresses, credentials and raw errors are excluded. Before
171
+ sign-in the wizard uses a random local installation ID. Authenticated events are
172
+ associated with the verified account; queued anonymous events remain anonymous.
173
+ Setup checks do not count as proof that the application has run the SDK.
174
+
175
+ Disable measurement with `--no-telemetry`, `UR_TELEMETRY_DISABLED=1`,
176
+ `DO_NOT_TRACK=1`, or the shared `userreason telemetry disable` setting. Dry runs
177
+ send and store no analytics. The bounded queue stays outside the project,
178
+ expires after seven days, and retries best-effort uploads with short deadlines.
179
+ Measurement failures never fail an installation.
180
+
181
+ ### Browser-guided setup (explicit opt-in)
182
+
183
+ Prepared compatible builds support:
184
+
185
+ ```sh
186
+ npx -y @userreason/wizard@latest --browser-setup
187
+ npx -y @userreason/wizard@latest --resume-setup SETUP_UUID
188
+ ```
189
+
190
+ Run from the same project and use the same `--api-url` or `--api-environment`
191
+ on resume. A custom API also needs its trusted `--browser-origin`. Ordinary
192
+ startup keeps the existing terminal wizard. If a server has not enabled browser
193
+ setup, a new connection falls back before creating a session or local effects.
194
+ Malformed protocol data and already-started setups never fall back silently.
195
+ Server rollout flags remain off by default; publication is a separate release.
196
+
197
+ The browser owns workspace/site selection, optional choices, local-plan approval,
198
+ source/provider consent, candidate selection, inactive draft saves, sample skip,
199
+ finish and cancellation. The local runner executes only approved typed effects
200
+ using the separate owner-only setup capability. It does not read or replace
201
+ normal CLI credentials. Stopping the local process leaves the setup resumable;
202
+ cancelling in the browser does not undo completed edits or delete created drafts.
203
+ Terminal results list verified, failed and manual outcomes separately.
204
+
205
+ Source analysis starts only when the server advertises availability. Before
206
+ consent, the terminal displays the exact bounded excerpts, hashes and line ranges;
207
+ the browser receives metadata only. No Git history is collected. Approving the
208
+ source packet and providers is separate from approving installation. Immediately
209
+ before upload, the runner revalidates full files and installed package versions.
210
+ Changed source requires fresh browser review. Raw source stays in memory and is
211
+ not written to setup receipts. A lost analysis response is polled rather than
212
+ repeated; browser retry starts a fresh preparation and consent.
213
+
214
+ The optional footer choice defaults to No. `planFooter` preserves the reachable
215
+ host footer and adds a plain `Powered by UserReason` link when placement is
216
+ unambiguous. Missing/ambiguous placement and customized skills are manual outcomes.
217
+ Package managers use fixed allowlisted arguments, disabled scripts and exact
218
+ versions. Lockfiles are declared generated outputs and verified by recorded hashes.
219
+ Interrupted commands reconcile local receipts instead of blindly reinstalling.
220
+
221
+ At the optional agent test, the terminal prints a setup-scoped command and the
222
+ prompt “What do UserReason dummy respondents think?”. It reads only the static
223
+ sample and records its receipt; it does not read production responses. Installing
224
+ the agent skill and reading that sample never grant ongoing CLI access. Authorize
225
+ continuing access separately with `userreason login --open` when wanted.
226
+
227
+ ### Optional first survey
228
+
229
+ After a successful interactive installation, choose Review suggestions, Continue
230
+ with my coding agent, or Finish setup. `--yes`, JSON and diff modes never approve
231
+ source analysis. Suggestions reuse the CLI's bounded collector, explicit provider
232
+ consent and per-candidate draft review; failures leave installation intact. An
233
+ ongoing site-read/survey-write connection is required, not the installation grant.
234
+ No automatic source edits or publication. Resume/cancel/delete with the CLI's
235
+ `first-survey` group. See the CLI README and installed skill for privacy, retention,
236
+ hash-guarded manual instrumentation and separate publication authorization.
237
+
238
+ The production profile for wizard 0.3.0 selects `@userreason/js@0.5.0` and
239
+ `@userreason/cli@0.2.0`. New installs use those exact versions; an installed
240
+ stable patch in the same release line is reused. Earlier SDK 0.4 and CLI 0.1
241
+ releases are upgraded when installation is selected. Browser setup still
242
+ requires explicit `--browser-setup` and a server advertising the capability.
@@ -3,12 +3,12 @@ import {
3
3
  applyAgentNote,
4
4
  offerAgentNote,
5
5
  planAgentNote
6
- } from "./chunk-ULHKVBPD.js";
7
- import "./chunk-SJVLAYGG.js";
8
- import "./chunk-5SC2K42Q.js";
9
- import "./chunk-YMSGDC4B.js";
10
- import "./chunk-OEGNGGZ2.js";
11
- import "./chunk-GGARVSPT.js";
6
+ } from "./chunk-Z6ZY7X2K.js";
7
+ import "./chunk-GOYBYAUH.js";
8
+ import "./chunk-5IO5LY22.js";
9
+ import "./chunk-CADA5WZ3.js";
10
+ import "./chunk-NMHTFC5Q.js";
11
+ import "./chunk-77SK7TKZ.js";
12
12
  import "./chunk-WL3NOIM6.js";
13
13
  export {
14
14
  applyAgentNote,
@@ -3,11 +3,11 @@ import {
3
3
  applyAgentSkill,
4
4
  offerAgentSkill,
5
5
  planAgentSkill
6
- } from "./chunk-5Z5J6PY5.js";
7
- import "./chunk-SJVLAYGG.js";
8
- import "./chunk-YMSGDC4B.js";
9
- import "./chunk-OEGNGGZ2.js";
10
- import "./chunk-GGARVSPT.js";
6
+ } from "./chunk-NZ65XDNL.js";
7
+ import "./chunk-GOYBYAUH.js";
8
+ import "./chunk-CADA5WZ3.js";
9
+ import "./chunk-NMHTFC5Q.js";
10
+ import "./chunk-77SK7TKZ.js";
11
11
  import "./chunk-WL3NOIM6.js";
12
12
  export {
13
13
  applyAgentSkill,
@@ -0,0 +1,9 @@
1
+ import { createRequire as createWizardRequire } from 'node:module'; import { fileURLToPath as wizardFileURLToPath } from 'node:url'; import { dirname as wizardDirname } from 'node:path'; const require = createWizardRequire(import.meta.url); const __filename = wizardFileURLToPath(import.meta.url); const __dirname = wizardDirname(__filename);
2
+ import {
3
+ WizardAnalytics
4
+ } from "./chunk-UN24JFV2.js";
5
+ import "./chunk-77SK7TKZ.js";
6
+ import "./chunk-WL3NOIM6.js";
7
+ export {
8
+ WizardAnalytics
9
+ };