@productbrain/cli 0.1.0-beta.9254 → 0.1.0-beta.9276

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 (36) hide show
  1. package/dist/__tests__/login.test.js +18 -1
  2. package/dist/__tests__/login.test.js.map +1 -1
  3. package/dist/__tests__/profiles.test.js +31 -1
  4. package/dist/__tests__/profiles.test.js.map +1 -1
  5. package/dist/commands/connect-config.test.js +11 -3
  6. package/dist/commands/connect-config.test.js.map +1 -1
  7. package/dist/commands/connect-integration.test.js +9 -5
  8. package/dist/commands/connect-integration.test.js.map +1 -1
  9. package/dist/commands/connect-legacy-migration.test.js +19 -19
  10. package/dist/commands/connect-legacy-migration.test.js.map +1 -1
  11. package/dist/commands/connect.d.ts +7 -9
  12. package/dist/commands/connect.d.ts.map +1 -1
  13. package/dist/commands/connect.js +70 -125
  14. package/dist/commands/connect.js.map +1 -1
  15. package/dist/commands/connect.test.js +73 -141
  16. package/dist/commands/connect.test.js.map +1 -1
  17. package/dist/commands/login.d.ts.map +1 -1
  18. package/dist/commands/login.js +15 -11
  19. package/dist/commands/login.js.map +1 -1
  20. package/dist/lib/connectProfileName.d.ts +36 -0
  21. package/dist/lib/connectProfileName.d.ts.map +1 -0
  22. package/dist/lib/connectProfileName.js +72 -0
  23. package/dist/lib/connectProfileName.js.map +1 -0
  24. package/dist/lib/connectProfileName.test.d.ts +2 -0
  25. package/dist/lib/connectProfileName.test.d.ts.map +1 -0
  26. package/dist/lib/connectProfileName.test.js +100 -0
  27. package/dist/lib/connectProfileName.test.js.map +1 -0
  28. package/dist/lib/errors.d.ts +3 -4
  29. package/dist/lib/errors.d.ts.map +1 -1
  30. package/dist/lib/errors.js +3 -4
  31. package/dist/lib/errors.js.map +1 -1
  32. package/dist/lib/profiles.d.ts +10 -8
  33. package/dist/lib/profiles.d.ts.map +1 -1
  34. package/dist/lib/profiles.js +15 -15
  35. package/dist/lib/profiles.js.map +1 -1
  36. package/package.json +1 -1
@@ -5,13 +5,14 @@
5
5
  * key locally, runs Ink screens, then prints a tailored chat-handoff instruction
6
6
  * (WP-433 FEAT-1291).
7
7
  */
8
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
8
+ import { existsSync, mkdirSync, writeFileSync } from 'fs';
9
9
  import { resolve } from 'path';
10
10
  import { resolveAppUrl, resolveConnectRedeemUrl } from '../lib/constants.js';
11
11
  import { CONNECT_REDEEM_DEFAULT_API_KEY_NAME, trimClientKeyLabelInput, } from '../lib/connectKeyLabel.js';
12
12
  import { CONNECT_TOKEN_PREFIX } from '../lib/tokenConstants.js';
13
13
  import { CLIError, ErrorCode } from '../lib/errors.js';
14
- import { createProfile, resolveNamedProfileConfig, validateProfileName, autoMigrate, profileFileExists } from '../lib/profiles.js';
14
+ import { createProfile, autoMigrate, profileFileExists, validateProfileName } from '../lib/profiles.js';
15
+ import { connectFolderName, pickConnectProfileName } from '../lib/connectProfileName.js';
15
16
  import { withSpinner } from '../lib/spinner.js';
16
17
  import { stripControlChars } from '../lib/strip.js';
17
18
  import * as clack from '@clack/prompts';
@@ -127,133 +128,79 @@ async function redeemToken(token, siteUrl, optionalDisplayName) {
127
128
  });
128
129
  }
129
130
  /**
130
- * Slugify workspace name for profile naming.
131
- * Lowercase, replace spaces/special chars with hyphens, max 32 chars.
131
+ * Refuse a `PB_PROFILE` target that already exists — BEFORE the one-time token is redeemed, so
132
+ * the token stays unspent (TASK-638). A redeem always mints a new key, so an existing profile of
133
+ * that name necessarily holds different credentials; overwriting it would silently cut off
134
+ * whichever folder uses it. The name is validated before autoMigrate() touches any file
135
+ * (TEN-4503); migration runs before the occupancy check so a legacy install counts as `default`.
132
136
  */
133
- function slugify(name) {
134
- return name
135
- .toLowerCase()
136
- .replace(/[^a-z0-9]+/g, '-')
137
- .replace(/^-|-$/g, '')
138
- .slice(0, 32) || 'default';
137
+ function assertEnvProfileIsFree(envProfile) {
138
+ validateProfileName(envProfile);
139
+ autoMigrate();
140
+ if (!profileFileExists(envProfile))
141
+ return;
142
+ throw new CLIError(`Profile "${envProfile}" (from PB_PROFILE) already exists — refusing to overwrite it.`, {
143
+ code: ErrorCode.PROFILE_CREDENTIALS_CONFLICT,
144
+ category: 'profile',
145
+ guidance: 'Unset PB_PROFILE to let pb connect name the profile after this workspace and folder, or set ' +
146
+ 'PB_PROFILE to a name no profile uses yet. Your token has not been used — the same token still works.',
147
+ });
139
148
  }
140
149
  /**
141
- * Sweep finding #8: PB_PROFILE always wins profile resolution everywhere else in the CLI
142
- * (profiles.ts, config.ts, `pb profile use` — "PB_PROFILE always wins resolution (by design)").
143
- * `pb connect` previously ignored it entirely and always derived the profile name from
144
- * `slugify(workspaceName)` — so a connect run under an explicit `PB_PROFILE=<name>` silently
145
- * wrote credentials under a DIFFERENT, auto-derived slug instead of the profile the caller
146
- * named, and — because saveKeyAsProfile unconditionally overwrites an existing profile file of
147
- * the same name (the "re-connect" branch) — a slug collision with an unrelated existing profile
148
- * (e.g. the machine's `owner` profile) silently clobbered it. Honoring PB_PROFILE here matches
149
- * the resolution order everywhere else and makes the target profile the caller's explicit
150
- * choice, not an accidental slug collision.
150
+ * The profile this connect writes (DEC-1961): PB_PROFILE when set (already checked free before
151
+ * redeem), else `<workspace>-<folder>` from pickConnectProfileName — this folder's own pin is
152
+ * replaced in place (a key rotation), another folder's profile is never touched.
151
153
  */
152
- function resolveConnectProfileName(workspaceName) {
153
- const envProfile = process.env.PB_PROFILE?.trim();
154
+ function resolveConnectProfile(workspaceName, envProfile) {
154
155
  if (envProfile)
155
- return { profileName: envProfile, fromEnv: true };
156
- return { profileName: slugify(workspaceName), fromEnv: false };
156
+ return { profileName: envProfile, replace: false };
157
+ autoMigrate();
158
+ const choice = pickConnectProfileName({
159
+ workspaceName,
160
+ folderName: connectFolderName(process.cwd()),
161
+ ownPin: readLocalProjectConfig()?.profile ?? null,
162
+ isTaken: profileFileExists,
163
+ });
164
+ if (choice)
165
+ return choice;
166
+ throw new CLIError(`Every profile name for "${workspaceName}" in this folder is taken.`, {
167
+ code: ErrorCode.PROFILE_ALREADY_EXISTS,
168
+ category: 'profile',
169
+ guidance: 'Delete unused profiles with `pb profile delete <name>`, or set PB_PROFILE=<new-name> and request a fresh onboarding link.',
170
+ });
157
171
  }
158
172
  /**
159
- * Save API key as a named profile. Creates or updates the profile. Does NOT activate the
160
- * profile globally — project config (.productbrain/config.json) handles per-project
161
- * resolution; user switches manually with `pb use <profile>`. Sets process.env for the
162
- * current process only (so handshake works).
163
- *
164
- * TEN-2851: never a silent side-effect of a workspace-name slug collision. Order of
165
- * operations, each closing a review-found gap (WP-628):
166
- * 1. `validateProfileName` FIRST — before any path resolution (Copilot review: the read
167
- * below resolves an untrusted `PB_PROFILE` into a path with no sanitization of its own).
168
- * 2. `autoMigrate()` next — before the occupancy check (Codex P1): a legacy-only install
169
- * (`~/.config/productbrain/.env`, no profiles dir yet) must migrate before `createProfile`
170
- * below can create that dir first — which would make a LATER, unrelated `autoMigrate()`
171
- * call DELETE the legacy file unmigrated ("profiles dir exists" → remove-legacy branch).
172
- * 3. Occupancy is FILE existence OR a parsed config (Codex P2): `resolveNamedProfileConfig`
173
- * returns null for both "absent" and "exists but malformed" (e.g. missing
174
- * `PRODUCTBRAIN_API_KEY`); `profileFileExists` tells them apart so malformed is never
175
- * misclassified as absent.
176
- * 4. Absent → create; SAME credentials → idempotent no-op; occupied (different creds OR
177
- * malformed) → explicit act required: confirm interactively, or fail-closed
178
- * non-interactively (mirrors assertConnectableNonInteractively, :287-300) — independent
179
- * of `--yes`/assumeYes (only governs confirmWorkspaceBinding). Escape hatch: a NAMED
180
- * `PB_PROFILE=<other-name>` target, never a force flag. Discovered only after the token
181
- * is redeemed, so a refusal burns it — same trade-off as the decline path below.
182
- *
183
- * @returns true if the profile now holds these credentials (created, already matched, or
184
- * explicitly overwritten); false if the caller declined an interactive overwrite (nothing
185
- * written).
173
+ * Save the API key under the chosen profile. Does NOT activate it globally — the folder's pin
174
+ * (config.local.json) selects it. Sets process.env for the current process only (so the
175
+ * post-connect context sync works).
186
176
  */
187
- async function saveKeyAsProfile(apiKey, siteUrl, profileName) {
188
- validateProfileName(profileName);
189
- autoMigrate();
190
- const existingConfig = resolveNamedProfileConfig(profileName);
191
- const occupied = existingConfig !== null || profileFileExists(profileName);
192
- if (!occupied) {
193
- // No profile of this name yet — plain create.
194
- createProfile(profileName, apiKey, siteUrl);
195
- }
196
- else if (existingConfig !== null && existingConfig.apiKey === apiKey && (existingConfig.siteUrl ?? '') === (siteUrl ?? '')) {
197
- // Idempotent re-connect: identical credentials already saved. No write.
198
- }
199
- else {
200
- // Occupied by different credentials OR a malformed file — the TEN-2851 clobber case.
201
- const conflictReason = existingConfig === null
202
- ? 'exists but is unreadable (missing or empty PRODUCTBRAIN_API_KEY)'
203
- : 'already holds different credentials';
204
- if (!isInteractive()) {
205
- throw new CLIError(`Profile "${profileName}" ${conflictReason} — refusing to overwrite it.`, {
206
- code: ErrorCode.PROFILE_CREDENTIALS_CONFLICT,
207
- category: 'profile',
208
- guidance: `This is not an interactive terminal, so the overwrite cannot be confirmed. ` +
209
- `Connect under a different profile name instead: \`PB_PROFILE=<other-name> pb connect <token> --yes\`. ` +
210
- `Note: the one-time token has already been used — request a fresh onboarding link to retry.`,
211
- });
212
- }
213
- const overwrite = await confirm({
214
- message: `Profile "${profileName}" ${conflictReason}. Overwrite it?`,
215
- initialValue: false,
216
- });
217
- if (!overwrite) {
218
- return false;
219
- }
177
+ function saveKeyAsProfile(apiKey, siteUrl, profileName, replace) {
178
+ if (replace)
220
179
  createProfile(profileName, apiKey, siteUrl, { overwrite: true });
221
- }
222
- // Don't call useProfile() — that hijacks the global active profile.
223
- // Project config pins the workspace per-project instead.
180
+ else
181
+ createProfile(profileName, apiKey, siteUrl);
224
182
  process.env.PRODUCTBRAIN_API_KEY = apiKey;
225
183
  process.env.CONVEX_SITE_URL = siteUrl;
226
- return true;
227
184
  }
228
185
  /**
229
- * Write project config files to pin this project to the workspace.
230
- * Returns the prior repo profile pin so the caller can detect a workspace redirect.
186
+ * Pin this folder to the profile. Returns the prior pin so the caller can detect a redirect.
231
187
  *
232
- * Split design:
233
- * - config.json (committed): siteUrl only — workspace gateway, safe to share with teammates.
234
- * Strips any legacy `profile` field that may be present from earlier pb versions.
235
- * - config.local.json (gitignored): profile pin — machine-local, never committed.
236
- * Written via the shared setLocalProfilePin() writer (used by `pb profile use --local`
237
- * and `pb connect`).
188
+ * - config.json (committed): its PRESENCE declares a Product Brain project
189
+ * (projectConfig.ts findProjectRoot / projectConfigExists). Created empty when absent; its
190
+ * content is never read, so connect never rewrites it (TASK-638: the siteUrl writer had no
191
+ * reader since TEN-4500).
192
+ * - config.local.json (gitignored): the profile pin, via the shared setLocalProfilePin().
238
193
  *
239
194
  * Does NOT include the API key anywhere — that stays in profiles, never committed.
240
195
  */
241
- export function saveProjectConfig(siteUrl, profileName) {
196
+ export function saveProjectConfig(profileName) {
242
197
  const configDir = resolve(process.cwd(), '.productbrain');
243
198
  const configPath = resolve(configDir, 'config.json');
244
199
  mkdirSync(configDir, { recursive: true });
245
200
  // Capture the prior repo pin BEFORE we overwrite it (redirect detection).
246
201
  const previous = readLocalProjectConfig()?.profile ?? null;
247
- // --- config.json: siteUrl only (committed). Strip legacy `profile` field. ---
248
- let existingCommitted = {};
249
- if (existsSync(configPath)) {
250
- try {
251
- existingCommitted = JSON.parse(readFileSync(configPath, 'utf8'));
252
- }
253
- catch { /* ignore */ }
254
- }
255
- delete existingCommitted['profile'];
256
- writeFileSync(configPath, JSON.stringify({ ...existingCommitted, siteUrl }, null, 2) + '\n');
202
+ if (!existsSync(configPath))
203
+ writeFileSync(configPath, '{}\n');
257
204
  // --- config.local.json: profile pin (gitignored) via the shared writer ---
258
205
  setLocalProfilePin(process.cwd(), profileName);
259
206
  return { previousProfile: previous && previous !== profileName ? previous : null };
@@ -348,9 +295,11 @@ export async function runConnect(token, options = {}) {
348
295
  }
349
296
  // 2. Resolve cloud Convex gateway (--gateway → env → CONVEX_SITE_URL → production)
350
297
  const siteUrl = resolveConnectRedeemUrl(options.gateway);
351
- // Sweep fix (WP-632, PR #594): validate PB_PROFILE BEFORE redeemToken burns the token.
352
- if (process.env.PB_PROFILE?.trim())
353
- validateProfileName(process.env.PB_PROFILE.trim());
298
+ // PB_PROFILE is checked BEFORE redeemToken burns the token: a bad name (TEN-4503) or an
299
+ // existing profile (TASK-638) is refused while the token still works.
300
+ const envProfile = process.env.PB_PROFILE?.trim() || undefined;
301
+ if (envProfile)
302
+ assertEnvProfileIsFree(envProfile);
354
303
  // 3. Confirm-first gate, part 1 (WP-2): refuse a non-interactive connect that can't run
355
304
  // the workspace-confirm BEFORE redeeming, so the one-time token is never burned on a
356
305
  // gate we were always going to fail. --yes is the explicit headless opt-in.
@@ -359,7 +308,7 @@ export async function runConnect(token, options = {}) {
359
308
  const result = await redeemToken(token, siteUrl, redeemLabel);
360
309
  // workspaceName is server-controlled — strip ANSI/control chars before it reaches any
361
310
  // terminal output (prompt, errors, the wizard) to prevent terminal escape injection
362
- // (BET-269 C3 baseline). slugify() below independently sanitizes the profile/file name.
311
+ // (BET-269 C3 baseline). composeProfileName() independently slugs the profile/file name.
363
312
  const workspaceName = stripControlChars(result.workspaceName);
364
313
  // 4. Confirm-first gate, part 2 (WP-2): name the workspace and bind only after the
365
314
  // operator confirms — BEFORE any local write. Decline ⇒ nothing written; machine untouched.
@@ -370,22 +319,18 @@ export async function runConnect(token, options = {}) {
370
319
  return;
371
320
  }
372
321
  // 5. Save API key as named profile + pin project config
373
- const { profileName, fromEnv } = resolveConnectProfileName(result.workspaceName);
374
- if (fromEnv) {
375
- process.stderr.write(`PB_PROFILE is set to "${profileName}" — saving this connection under that profile name ` +
376
- `(instead of an auto-derived name from the workspace).\n`);
322
+ const { profileName, replace } = resolveConnectProfile(workspaceName, envProfile);
323
+ if (envProfile) {
324
+ process.stderr.write(`PB_PROFILE is set — saving this connection as profile "${profileName}".\n`);
377
325
  }
378
- // TEN-2851: an occupied, differently-credentialed profile requires an explicit act — see
379
- // saveKeyAsProfile's doc comment. A decline mirrors the workspace-confirm decline above:
380
- // nothing is written (including project config, which we skip on refusal).
381
- const saved = await saveKeyAsProfile(result.apiKey, siteUrl, profileName);
382
- if (!saved) {
383
- process.stderr.write(`Cancelled — nothing saved. Profile "${profileName}" was not overwritten.\n` +
384
- `Note: the one-time token was already used; request a fresh onboarding link, or connect ` +
385
- `under a different name: \`PB_PROFILE=<other-name> pb connect <token>\`.\n`);
386
- return;
326
+ saveKeyAsProfile(result.apiKey, siteUrl, profileName, replace);
327
+ const { previousProfile } = saveProjectConfig(profileName);
328
+ if (replace) {
329
+ // The profile stores no workspace id, so a same-named workspace could sit behind it now: say
330
+ // which workspace it holds and drop sessions bound to the old key.
331
+ process.stderr.write(`This folder's profile "${profileName}" now holds a new key for workspace "${workspaceName}".\n`);
332
+ discardAllSessions();
387
333
  }
388
- const { previousProfile } = saveProjectConfig(siteUrl, profileName);
389
334
  if (previousProfile) {
390
335
  process.stderr.write(`⚠ This repo was connected to "${previousProfile}"; now redirecting to "${profileName}" (${workspaceName}). Previous session was reset — run \`pb session start\` to begin a new one.\n`);
391
336
  // The repo's effective workspace changed — drop ALL stale session markers (Codex review fix:
@@ -1 +1 @@
1
- {"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/commands/connect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACN,mCAAmC,EACnC,uBAAuB,GACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,C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