@userreason/wizard 0.2.1 → 0.3.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.
Files changed (40) hide show
  1. package/README.md +95 -0
  2. package/dist/agent-note.js +7 -6
  3. package/dist/agent-skill.js +6 -5
  4. package/dist/analytics.js +9 -0
  5. package/dist/bin.js +222 -51
  6. package/dist/chunk-4INLEQE2.js +196 -0
  7. package/dist/{chunk-GGARVSPT.js → chunk-7AAH6C4L.js} +9198 -5670
  8. package/dist/{chunk-ULHKVBPD.js → chunk-7O7H3PIM.js} +7 -7
  9. package/dist/chunk-CSZW2ULJ.js +152 -0
  10. package/dist/{chunk-3RDJORRS.js → chunk-DMXUXEQI.js} +1 -1
  11. package/dist/{chunk-SJVLAYGG.js → chunk-EVNEX5N5.js} +8 -1
  12. package/dist/chunk-KF37D5WL.js +44 -0
  13. package/dist/{chunk-5SC2K42Q.js → chunk-LEJFE4U5.js} +2 -2
  14. package/dist/{chunk-OEGNGGZ2.js → chunk-NMHTFC5Q.js} +10 -3
  15. package/dist/{chunk-6CJ4ANMN.js → chunk-NNPYUATH.js} +1 -1
  16. package/dist/chunk-PJQOSDYS.js +50 -0
  17. package/dist/chunk-Q5U5UOQN.js +288 -0
  18. package/dist/{chunk-5Z5J6PY5.js → chunk-SB3AYQWG.js} +6 -6
  19. package/dist/{chunk-YMSGDC4B.js → chunk-TOID3NYP.js} +40 -11
  20. package/dist/{chunk-JD5U4U26.js → chunk-TRBSH5G7.js} +6 -6
  21. package/dist/{chunk-ZGZOBW2B.js → chunk-XASPGFYK.js} +3 -3
  22. package/dist/{chunk-HACTNBV3.js → chunk-XPFKXLIZ.js} +3 -3
  23. package/dist/chunk-ZHJV247H.js +31 -0
  24. package/dist/cli-access.js +3 -3
  25. package/dist/connection.js +2 -2
  26. package/dist/first-survey.js +11 -0
  27. package/dist/footer.js +17 -0
  28. package/dist/global-cli.js +6 -5
  29. package/dist/install-diagnostics.js +9 -0
  30. package/dist/integrate.js +5 -4
  31. package/dist/project.js +8 -3
  32. package/dist/registry.js +5 -3
  33. package/dist/setup-flow.js +25 -0
  34. package/dist/setup.js +33 -0
  35. package/dist/skills/userreason/SKILL.md +43 -0
  36. package/dist/skills/userreason/references/management.md +6 -0
  37. package/dist/startup.js +2 -2
  38. package/dist/state.js +6 -5
  39. package/dist/ui.js +2 -2
  40. package/package.json +1 -2
package/README.md CHANGED
@@ -36,6 +36,13 @@ 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`), onboarding opens in the browser by default.
40
+ Survey suggestions and the Agent test step are paused in production and development.
41
+ Setup does not prepare or upload application source for recommendations, and it
42
+ neither offers nor creates suggested drafts. The terminal flow skips the
43
+ first-survey offer too. You can create surveys in the dashboard after setup.
44
+ Use `--terminal-setup` to choose terminal onboarding explicitly.
45
+
39
46
  For a different application directory:
40
47
 
41
48
  ```sh
@@ -137,3 +144,91 @@ locally and is not uploaded to an AI service.
137
144
 
138
145
  See [troubleshooting](https://docs.userreason.com/get-started/troubleshooting/)
139
146
  for help with installation, sign-in, permissions and browser verification.
147
+
148
+ ## Optional installation measurement
149
+
150
+ The wizard sends bounded step outcomes and durations to the UserReason API to
151
+ help improve setup. It records when initialization, agent guidance, the agent
152
+ skill and CLI access are offered, selected, skipped, already present, applied,
153
+ cancelled or fail. Choosing an option and successfully applying it are separate
154
+ outcomes. The optional choices share one prompt, so its decision time is measured
155
+ once; file and package operations have their own durations. Flow and content
156
+ versions identify the shipped wizard experience. No experiment assignment or
157
+ Statsig integration is included.
158
+
159
+ These events include framework, package manager, execution mode, rerun status,
160
+ version and known workspace/site scope. Source code, guidance content, file paths,
161
+ project names, email addresses, credentials and raw errors are excluded. Before
162
+ sign-in the wizard uses a random local installation ID. Authenticated events are
163
+ associated with the verified account; queued anonymous events remain anonymous.
164
+ Setup checks do not count as proof that the application has run the SDK.
165
+
166
+ Disable measurement with `--no-telemetry`, `UR_TELEMETRY_DISABLED=1`,
167
+ `DO_NOT_TRACK=1`, or the shared `userreason telemetry disable` setting. Dry runs
168
+ send and store no analytics. The bounded queue stays outside the project,
169
+ expires after seven days, and retries best-effort uploads with short deadlines.
170
+ Measurement failures never fail an installation.
171
+
172
+ ### Browser-guided setup
173
+
174
+ Development onboarding uses the browser by default, including local development
175
+ package builds. With a published package, select the development API:
176
+
177
+ ```sh
178
+ npx -y @userreason/wizard@latest --dev
179
+ ```
180
+
181
+ Production still requires `--browser-setup`. Compatible builds also support:
182
+
183
+ ```sh
184
+ npx -y @userreason/wizard@latest --browser-setup
185
+ npx -y @userreason/wizard@latest --resume-setup SETUP_UUID
186
+ ```
187
+
188
+ Run from the same project and use the same `--api-url` or `--api-environment`
189
+ on resume. A custom API also needs its trusted `--browser-origin`.
190
+ Use `--terminal-setup` to choose terminal onboarding explicitly. Scripted runs
191
+ with `--yes` or `--json`, package refresh, dry runs, and explicit terminal
192
+ installation/resource flags retain their existing behavior; an explicit
193
+ `--browser-setup` still rejects incompatible terminal options.
194
+ If a server has not enabled browser setup, a new connection falls back before
195
+ creating a session or local effects.
196
+ Malformed protocol data and already-started setups never fall back silently.
197
+ Server rollout flags remain off by default; publication is a separate release.
198
+
199
+ The browser owns workspace/site selection, optional choices, local-plan approval,
200
+ finish and cancellation. Source analysis, suggested drafts and the Agent test
201
+ remain implemented but are hidden and skipped while their rollout flags are off. The local runner executes only approved typed effects
202
+ using the separate owner-only setup capability. It does not read or replace
203
+ normal CLI credentials. Stopping the local process leaves the setup resumable;
204
+ cancelling in the browser does not undo completed edits or delete created drafts.
205
+ Terminal results list verified, failed and manual outcomes separately.
206
+
207
+ Source analysis starts only when the server advertises availability. It is
208
+ currently disabled for production and development onboarding, including resumed
209
+ setups. No onboarding recommendation providers are called.
210
+
211
+ The optional footer choice defaults to No. `planFooter` preserves the reachable
212
+ host footer and adds a plain `Powered by UserReason` link when placement is
213
+ unambiguous. Missing/ambiguous placement and customized skills are manual outcomes.
214
+ Package managers use fixed allowlisted arguments, disabled scripts and exact
215
+ versions. Lockfiles are declared generated outputs and verified by recorded hashes.
216
+ Interrupted commands reconcile local receipts instead of blindly reinstalling.
217
+
218
+ The Agent test and terminal first-survey offer are paused. Installing the agent
219
+ skill never grants ongoing CLI access. Authorize continuing access separately
220
+ with `userreason login --open` when wanted. Standalone CLI survey tools remain
221
+ available outside onboarding.
222
+
223
+ The production profile for wizard 0.3.1 selects `@userreason/js@0.5.3` and
224
+ `@userreason/cli@0.2.1`. New installs use those exact versions; an installed
225
+ stable patch in the same release line is reused. Earlier SDK 0.4 and CLI 0.1
226
+ releases are upgraded when installation is selected. Browser setup still
227
+ requires explicit `--browser-setup` and a server advertising the capability.
228
+
229
+ Browser-guided installation prints package-manager failures in the connected
230
+ terminal, including failed registry requests when npm provides them. Diagnostic
231
+ text is redacted and retained in the private local setup receipt for resume.
232
+ A finished browser session with failed local steps is reported as incomplete and
233
+ the wizard exits unsuccessfully. Project `.npmrc` comments and authentication
234
+ references are preserved; registry configuration only adds the UserReason scope.
@@ -3,12 +3,13 @@ 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-7O7H3PIM.js";
7
+ import "./chunk-LEJFE4U5.js";
8
+ import "./chunk-TOID3NYP.js";
9
+ import "./chunk-PJQOSDYS.js";
10
+ import "./chunk-NMHTFC5Q.js";
11
+ import "./chunk-EVNEX5N5.js";
12
+ import "./chunk-7AAH6C4L.js";
12
13
  import "./chunk-WL3NOIM6.js";
13
14
  export {
14
15
  applyAgentNote,
@@ -3,11 +3,12 @@ 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-SB3AYQWG.js";
7
+ import "./chunk-TOID3NYP.js";
8
+ import "./chunk-PJQOSDYS.js";
9
+ import "./chunk-NMHTFC5Q.js";
10
+ import "./chunk-EVNEX5N5.js";
11
+ import "./chunk-7AAH6C4L.js";
11
12
  import "./chunk-WL3NOIM6.js";
12
13
  export {
13
14
  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-KF37D5WL.js";
5
+ import "./chunk-7AAH6C4L.js";
6
+ import "./chunk-WL3NOIM6.js";
7
+ export {
8
+ WizardAnalytics
9
+ };