@beryl-so/cli 0.35.0 → 0.36.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.
package/README.md CHANGED
@@ -332,7 +332,7 @@ Durable identities on the site under test: what an authenticated test signs in a
332
332
  | --- | --- | --- |
333
333
  | `beryl accounts list` | List the test accounts an environment's tests sign in as | `accounts_list` |
334
334
  | `beryl accounts create` | Add a test account: the customer's own, or one Beryl signs up | `accounts_create` |
335
- | `beryl accounts provision <account-id>` | Prove a test account can get in, by replaying a plan that ends logged in | `accounts_provision` |
335
+ | `beryl accounts signup <account-id>` | Store a test account's signup plan and sign it up on its environment | `accounts_signup` |
336
336
  | `beryl accounts set-login <account-id>` | Store the sign-in plan a run replays once, plus the probe that proves it | `accounts_set_login` |
337
337
  | `beryl accounts get-login <account-id>` | Read the stored sign-in plan, its probe, and the hash a safe write must cite | `accounts_get_login` |
338
338
  | `beryl accounts check <account-id>` | Sign in now and prove the session survives into a fresh browser | `accounts_check` |
@@ -154,13 +154,14 @@ An empty \`accounts list\` means nothing is set up. In order of preference:
154
154
  \`beryl accounts create --email <email> --password <password>\`. A DEDICATED test
155
155
  account only — never a real user's.
156
156
  2. **No credentials, but the app has a signup form** → let Beryl make one.
157
- \`beryl accounts create --type beryl\`, then prove it with
158
- \`beryl accounts provision <id> --file <plan.json>\`. The plan is any ActionPlan that
159
- ends LOGGED IN a signup filling \`{{mailbox_address}}\` and \`{{login_password}}\`
160
- for a new account, or a **sign-in** for one that already exists (hand-made, or the
161
- record was lost); both prove the same thing. No password sign-in? Pass
162
- \`--login-method otp\` (or \`magic_link\`) and let the plan \`await_email\` through —
163
- later sign-ins read the same mailbox.
157
+ \`beryl accounts create --type beryl\`, then sign it up with
158
+ \`beryl accounts signup <id> --file <signup-plan.json>\`. The plan is the app's own
159
+ signup form as an ActionPlan, ending LOGGED IN, filling \`{{mailbox_address}}\` and
160
+ \`{{login_password}}\`. It stays on the account, so a new environment signs the same
161
+ identity up again by itself. An account that already exists on the site (hand-made,
162
+ or the record was lost) skips signup: store its sign-in with \`accounts set-login\`.
163
+ No password sign-in? Pass \`--login-method otp\` (or \`magic_link\`) and let the plan
164
+ \`await_email\` through; later sign-ins read the same mailbox.
164
165
  3. **Neither** → the flow is not testable authenticated. Say so rather than guessing.
165
166
 
166
167
  A project with no accounts falls back to the \`LOGIN_EMAIL\` variable +
@@ -63,7 +63,7 @@ export const testAccountCommands = [
63
63
  description: "Two kinds. `--type user_provided` records a dedicated account you already have on " +
64
64
  "the site: pass --email and --password, and it is usable immediately. `--type beryl` " +
65
65
  "reserves one Beryl will sign up itself, addressed at the project mailbox. It starts " +
66
- "`pending` and becomes usable after `beryl accounts provision`. " +
66
+ "`pending` and becomes usable after `beryl accounts signup`. " +
67
67
  "The first account an environment gets is its default whatever you pass.",
68
68
  scope: "project",
69
69
  flags: [
@@ -111,8 +111,8 @@ export const testAccountCommands = [
111
111
  is_default: flagBool(input, "default"),
112
112
  }));
113
113
  const next = account.status === "pending"
114
- ? yellow(`\nNot proven yet — run:\n beryl accounts provision ${account.id} --file <plan.json>\n` +
115
- `with a plan that ends logged in (a signup, or a sign-in if it already exists).`)
114
+ ? yellow(`\nNot signed up yet. Run:\n beryl accounts signup ${account.id} --file <signup-plan.json>\n` +
115
+ `with the app's signup form as a plan that ends logged in.`)
116
116
  : "";
117
117
  return {
118
118
  data: account,
@@ -121,15 +121,15 @@ export const testAccountCommands = [
121
121
  },
122
122
  },
123
123
  {
124
- name: "accounts provision",
125
- summary: "Prove a test account can get in, by replaying a plan that ends logged in",
126
- description: "Runs the plan once in a real browser and, if it passes, marks the account ready. " +
127
- "The plan is an ordinary ActionPlan that ends logged in: a SIGNUP when the account " +
128
- "does not exist yet, or a SIGN-IN when it already does (you created it by hand, or " +
129
- "the site already had it). Either proves the same thing, and a sign-in is what every " +
130
- "later test will do anyway. Type {{mailbox_address}} into the email field and " +
131
- "{{login_password}} into the password field. Both resolve at replay time, and an " +
132
- "`await_email` step reads the project mailbox, so a verification code works.",
124
+ name: "accounts signup",
125
+ summary: "Store a test account's signup plan and sign it up on its environment",
126
+ description: "Runs the app's signup form once in a real browser and, if it ends logged in, marks " +
127
+ "the account ready. The plan is an ordinary ActionPlan of the SIGNUP flow. Type " +
128
+ "{{mailbox_address}} into the email field and {{login_password}} into the password " +
129
+ "field. Both resolve at replay time, and an `await_email` step reads the project " +
130
+ "mailbox, so a verification code works. The plan is kept on the account, so the " +
131
+ "same identity can be signed up again on a new environment. For an account that " +
132
+ "already exists on the site, store its sign-in with `accounts set-login` instead.",
133
133
  scope: "project",
134
134
  args: [{ name: "account-id", description: "Account id from `beryl accounts list`", required: true }],
135
135
  flags: [
@@ -137,20 +137,17 @@ export const testAccountCommands = [
137
137
  name: "file",
138
138
  type: "string",
139
139
  required: true,
140
- description: "ActionPlan that ends logged in, as JSON (path, or - for stdin)",
140
+ description: "The signup ActionPlan, ending logged in, as JSON (path, or - for stdin)",
141
141
  },
142
142
  ],
143
- examples: [
144
- "beryl accounts provision acc_123 --file signup-plan.json",
145
- "beryl accounts provision acc_123 --file signin-plan.json",
146
- ],
143
+ examples: ["beryl accounts signup acc_123 --file signup-plan.json"],
147
144
  async run(ctx, input) {
148
145
  const { workspaceId, projectId } = await ctx.requireProject(input);
149
- const account = (await ctx.client.post(`${accountsPath(workspaceId, projectId)}/${arg(input, "account-id")}/provision`, { plan: readJsonFlag(input, "file") }));
146
+ const account = (await ctx.client.post(`${accountsPath(workspaceId, projectId)}/${arg(input, "account-id")}/signup`, { plan: readJsonFlag(input, "file") }));
150
147
  if (account.status !== "ready")
151
148
  return {
152
149
  data: account,
153
- human: `${yellow("The account could not get in")}: ${account.last_error ?? account.status}`,
150
+ human: `${yellow("The signup did not get in")}: ${account.last_error ?? account.status}`,
154
151
  exitCode: 1,
155
152
  };
156
153
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beryl-so/cli",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "Beryl on the command line — projects, runs, the exploring agent, and an MCP server over the same commands.",
5
5
  "license": "MIT",
6
6
  "type": "module",