rivet-design 0.14.7 → 0.14.9

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 (51) hide show
  1. package/dist/agent-variants/SessionStore.d.ts +1 -0
  2. package/dist/agent-variants/SessionStore.d.ts.map +1 -1
  3. package/dist/agent-variants/SessionStore.js +16 -0
  4. package/dist/agent-variants/SessionStore.js.map +1 -1
  5. package/dist/agent-variants/WorkerExecutorService.d.ts +1 -0
  6. package/dist/agent-variants/WorkerExecutorService.d.ts.map +1 -1
  7. package/dist/agent-variants/WorkerExecutorService.js +14 -0
  8. package/dist/agent-variants/WorkerExecutorService.js.map +1 -1
  9. package/dist/agent-variants/WorktreeOrchestrator.d.ts +1 -0
  10. package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
  11. package/dist/agent-variants/WorktreeOrchestrator.js +5 -0
  12. package/dist/agent-variants/WorktreeOrchestrator.js.map +1 -1
  13. package/dist/agent-variants/contracts.d.ts +11 -0
  14. package/dist/agent-variants/contracts.d.ts.map +1 -1
  15. package/dist/agent-variants/contracts.js.map +1 -1
  16. package/dist/cli/commands/evidence.js +1 -1
  17. package/dist/cli/commands/evidence.js.map +1 -1
  18. package/dist/cli/commands/mcpServe.d.ts.map +1 -1
  19. package/dist/cli/commands/mcpServe.js +152 -1
  20. package/dist/cli/commands/mcpServe.js.map +1 -1
  21. package/dist/cli/commands/open.js +2 -2
  22. package/dist/cli/commands/open.js.map +1 -1
  23. package/dist/cli/commands/reference.js +1 -1
  24. package/dist/cli/commands/reference.js.map +1 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +74 -20
  27. package/dist/index.js.map +1 -1
  28. package/dist/services/AuthService.d.ts +41 -0
  29. package/dist/services/AuthService.d.ts.map +1 -1
  30. package/dist/services/AuthService.js +208 -44
  31. package/dist/services/AuthService.js.map +1 -1
  32. package/dist/services/pendingLogin.d.ts +24 -0
  33. package/dist/services/pendingLogin.d.ts.map +1 -0
  34. package/dist/services/pendingLogin.js +56 -0
  35. package/dist/services/pendingLogin.js.map +1 -0
  36. package/dist/utils/skills/claude-skill.d.ts +1 -1
  37. package/dist/utils/skills/claude-skill.d.ts.map +1 -1
  38. package/dist/utils/skills/cli-guidance.d.ts +2 -2
  39. package/dist/utils/skills/cli-guidance.d.ts.map +1 -1
  40. package/dist/utils/skills/cli-guidance.js +3 -3
  41. package/dist/utils/skills/cursor-rules.d.ts +2 -2
  42. package/dist/utils/skills/cursor-rules.d.ts.map +1 -1
  43. package/dist/utils/skills/cursor-rules.js +1 -1
  44. package/package.json +1 -1
  45. package/src/ui/dist/assets/main-CQho_sDZ.js +422 -0
  46. package/src/ui/dist/index.html +1 -1
  47. package/dist/onboarding/signin.d.ts +0 -41
  48. package/dist/onboarding/signin.d.ts.map +0 -1
  49. package/dist/onboarding/signin.js +0 -273
  50. package/dist/onboarding/signin.js.map +0 -1
  51. package/src/ui/dist/assets/main-BqM5p5EF.js +0 -422
@@ -40,6 +40,7 @@ const ConfigManager_1 = require("./ConfigManager");
40
40
  const http_1 = require("http");
41
41
  const accessTokenRefresh_1 = require("./accessTokenRefresh");
42
42
  const RequestAuthContext_1 = require("./RequestAuthContext");
43
+ const pendingLogin_1 = require("./pendingLogin");
43
44
  const log = (0, logger_1.createLogger)('AuthService');
44
45
  const LOOPBACK_HOST = '127.0.0.1';
45
46
  const LOOPBACK_PORT = 0;
@@ -410,59 +411,75 @@ class AuthService {
410
411
  const requestOptions = { ...options };
411
412
  let loopbackCallback = null;
412
413
  try {
413
- if (requestOptions.source === 'mcp' && !requestOptions.redirectOrigin) {
414
- loopbackCallback = await createLoopbackOAuthCallback();
415
- requestOptions.redirectOrigin = loopbackCallback.redirectOrigin;
416
- }
417
- log.info(`Requesting OAuth URL from: ${this.proxyUrl}/api/auth/google/start`);
418
- const body = {};
419
- if (requestOptions.redirectOrigin) {
420
- body.redirectOrigin = requestOptions.redirectOrigin;
421
- }
422
- body.authDestination =
423
- requestOptions.authDestination ?? HOSTED_DASHBOARD_AUTH_URL;
424
- if (requestOptions.source) {
425
- body.source = requestOptions.source;
426
- }
427
- if (requestOptions.editor) {
428
- body.editor = requestOptions.editor;
414
+ // No explicit redirect target prefer PKCE: the login completes on the
415
+ // proxy, so no local listener is needed and this process dying mid-flow
416
+ // doesn't strand the login (see resumePendingLogin). An old proxy that
417
+ // doesn't speak PKCE answers without `flow: 'pkce'` (or 400s for MCP);
418
+ // both fall back to the legacy loopback/implicit path below.
419
+ let startResult = !requestOptions.redirectOrigin
420
+ ? await this.startGoogleOAuth({ ...requestOptions, flow: 'pkce' })
421
+ : null;
422
+ if (!startResult || startResult.flow !== 'pkce') {
423
+ if (requestOptions.source === 'mcp' &&
424
+ !requestOptions.redirectOrigin) {
425
+ loopbackCallback = await createLoopbackOAuthCallback();
426
+ requestOptions.redirectOrigin = loopbackCallback.redirectOrigin;
427
+ }
428
+ startResult = await this.startGoogleOAuth(requestOptions);
429
429
  }
430
- if (requestOptions.version) {
431
- body.version = requestOptions.version;
430
+ if (!startResult) {
431
+ return {
432
+ success: false,
433
+ error: 'Failed to start authentication',
434
+ message: 'Could not start the Google sign-in flow.',
435
+ };
432
436
  }
433
- // Request OAuth URL from proxy
434
- const response = await fetch(`${this.proxyUrl}/api/auth/google/start`, {
435
- method: 'POST',
436
- headers: {
437
- 'Content-Type': 'application/json',
438
- },
439
- body: JSON.stringify(body),
440
- });
441
- const result = await response.json();
442
- if (!response.ok || !result.success) {
443
- log.warn('Failed to start Google OAuth:', result.error, result.message);
437
+ if (!startResult.success) {
444
438
  return {
445
439
  success: false,
446
- error: result.error || 'Failed to start authentication',
447
- message: result.message,
440
+ error: startResult.error || 'Failed to start authentication',
441
+ message: startResult.message,
448
442
  };
449
443
  }
450
- // Open browser for user to authenticate
451
- const open = (await Promise.resolve().then(() => __importStar(require('open')))).default;
452
- await open(result.authUrl);
453
- log.info('Opened browser for Google authentication');
454
- log.info('Waiting for authentication...');
455
444
  // Poll for completion
456
- const sessionId = result.sessionId;
457
- const pollSecret = result.pollSecret;
458
- const completionSecret = result.completionSecret;
459
- if (!sessionId || !pollSecret) {
445
+ const authUrl = startResult.authUrl;
446
+ const sessionId = startResult.sessionId;
447
+ const pollSecret = startResult.pollSecret;
448
+ const completionSecret = startResult.completionSecret;
449
+ if (!authUrl || !sessionId || !pollSecret) {
460
450
  return {
461
451
  success: false,
462
452
  error: 'Invalid response from server',
463
453
  message: 'Authentication response missing session or poll secret',
464
454
  };
465
455
  }
456
+ // PKCE logins survive this process: persist the session BEFORE
457
+ // surfacing or opening the URL, so the printed recovery link is
458
+ // resumable even when opening the browser throws (SSH, containers) or
459
+ // this process dies while the user is on Google.
460
+ if (startResult.flow === 'pkce') {
461
+ (0, pendingLogin_1.writePendingLogin)({
462
+ sessionId,
463
+ pollSecret,
464
+ proxyUrl: this.proxyUrl,
465
+ createdAt: Date.now(),
466
+ authUrl,
467
+ });
468
+ }
469
+ options.onAuthUrl?.(authUrl);
470
+ if (!options.noBrowser) {
471
+ try {
472
+ const open = (await Promise.resolve().then(() => __importStar(require('open')))).default;
473
+ await open(authUrl);
474
+ log.info('Opened browser for Google authentication');
475
+ }
476
+ catch (error) {
477
+ // Not fatal: onAuthUrl printed the link, and PKCE logins remain
478
+ // resumable via the pending file written above.
479
+ log.warn('Could not open browser for login:', error);
480
+ }
481
+ }
482
+ log.info('Waiting for authentication...');
466
483
  if (loopbackCallback) {
467
484
  if (!completionSecret) {
468
485
  return {
@@ -496,11 +513,22 @@ class AuthService {
496
513
  };
497
514
  }
498
515
  }
499
- const tokenResult = await this.pollForToken(sessionId, pollSecret);
516
+ // PKCE gets a longer window (~5 min): there's no local listener whose
517
+ // lifetime caps the wait, only a poll loop, and first-time Google
518
+ // consent regularly exceeds 2 minutes.
519
+ const tokenResult = await this.pollForToken(sessionId, pollSecret, startResult.flow === 'pkce' ? 150 : 60);
500
520
  if (tokenResult.success && tokenResult.token && tokenResult.user) {
501
521
  this.configManager.setAuth(tokenResult.token, tokenResult.user.email, tokenResult.refreshToken, tokenResult.user.id);
502
522
  log.info(`Logged in as ${tokenResult.user.email}`);
503
523
  }
524
+ if (startResult.flow === 'pkce') {
525
+ // Redeemed or terminally failed → the pending file is spent. On a
526
+ // poll timeout, keep it: the user may still finish in the browser and
527
+ // a later invocation can redeem the session (resumePendingLogin).
528
+ if (tokenResult.success || tokenResult.error !== 'Timeout') {
529
+ (0, pendingLogin_1.clearPendingLogin)();
530
+ }
531
+ }
504
532
  return tokenResult;
505
533
  }
506
534
  catch (error) {
@@ -515,6 +543,139 @@ class AuthService {
515
543
  await loopbackCallback?.close();
516
544
  }
517
545
  }
546
+ /**
547
+ * Ask the proxy to start a Google OAuth flow. Returns null on network
548
+ * failure so callers can distinguish "proxy unreachable" from a rejected
549
+ * start.
550
+ */
551
+ async startGoogleOAuth(requestOptions) {
552
+ log.info(`Requesting OAuth URL from: ${this.proxyUrl}/api/auth/google/start`);
553
+ const body = {};
554
+ if (requestOptions.redirectOrigin) {
555
+ body.redirectOrigin = requestOptions.redirectOrigin;
556
+ }
557
+ body.authDestination =
558
+ requestOptions.authDestination ?? HOSTED_DASHBOARD_AUTH_URL;
559
+ if (requestOptions.source) {
560
+ body.source = requestOptions.source;
561
+ }
562
+ if (requestOptions.editor) {
563
+ body.editor = requestOptions.editor;
564
+ }
565
+ if (requestOptions.version) {
566
+ body.version = requestOptions.version;
567
+ }
568
+ if (requestOptions.flow) {
569
+ body.flow = requestOptions.flow;
570
+ }
571
+ try {
572
+ const response = await fetch(`${this.proxyUrl}/api/auth/google/start`, {
573
+ method: 'POST',
574
+ headers: { 'Content-Type': 'application/json' },
575
+ body: JSON.stringify(body),
576
+ });
577
+ const result = (await response.json());
578
+ if (!response.ok || !result.success) {
579
+ log.warn('Failed to start Google OAuth:', result.error, result.message);
580
+ return { ...result, success: false };
581
+ }
582
+ return result;
583
+ }
584
+ catch (error) {
585
+ log.warn('Error starting Google OAuth:', error);
586
+ return null;
587
+ }
588
+ }
589
+ /**
590
+ * Start a PKCE login and return immediately after opening the browser —
591
+ * built for agent/MCP contexts where the calling process may not survive
592
+ * the user's trip through Google. The pending session is persisted; any
593
+ * later Rivet invocation completes it via resumePendingLogin().
594
+ */
595
+ async beginGoogleLogin(options = {}) {
596
+ const startResult = await this.startGoogleOAuth({
597
+ ...options,
598
+ flow: 'pkce',
599
+ });
600
+ if (!startResult || !startResult.success) {
601
+ return {
602
+ started: false,
603
+ error: startResult?.message ||
604
+ startResult?.error ||
605
+ 'Could not reach the sign-in service.',
606
+ };
607
+ }
608
+ if (startResult.flow !== 'pkce' ||
609
+ !startResult.sessionId ||
610
+ !startResult.pollSecret ||
611
+ !startResult.authUrl) {
612
+ // Old proxy without PKCE: a detached login can't work — the implicit
613
+ // flow needs a live local listener that this call deliberately never
614
+ // creates.
615
+ return {
616
+ started: false,
617
+ error: 'The sign-in service does not support detached login yet. Run `rivet login` in a terminal instead.',
618
+ };
619
+ }
620
+ (0, pendingLogin_1.writePendingLogin)({
621
+ sessionId: startResult.sessionId,
622
+ pollSecret: startResult.pollSecret,
623
+ proxyUrl: this.proxyUrl,
624
+ createdAt: Date.now(),
625
+ authUrl: startResult.authUrl,
626
+ });
627
+ try {
628
+ const open = (await Promise.resolve().then(() => __importStar(require('open')))).default;
629
+ await open(startResult.authUrl);
630
+ }
631
+ catch (error) {
632
+ log.warn('Could not open browser for login:', error);
633
+ // Not fatal: the caller surfaces authUrl for the user to click.
634
+ }
635
+ return {
636
+ started: true,
637
+ authUrl: startResult.authUrl,
638
+ sessionId: startResult.sessionId,
639
+ };
640
+ }
641
+ /**
642
+ * Complete a login started earlier (possibly by another process). Polls the
643
+ * proxy for the persisted pending session — once by default, or for a
644
+ * bounded window when maxAttempts > 1 (2s per attempt), which lets callers
645
+ * wait for the user to finish the browser flow. Returns the login result
646
+ * when the session resolved (either way), or null when there's nothing
647
+ * pending / still waiting on the user.
648
+ */
649
+ /**
650
+ * The in-flight login this service could actually resume, or null. Applies
651
+ * the same proxy filter as resumePendingLogin — a pending file written
652
+ * against a different proxy must not read as "login in progress" here
653
+ * (it would block fresh sign-ins for the pending file's whole TTL).
654
+ */
655
+ peekPendingLogin() {
656
+ const pending = (0, pendingLogin_1.readPendingLogin)();
657
+ return pending && pending.proxyUrl === this.proxyUrl ? pending : null;
658
+ }
659
+ async resumePendingLogin(maxAttempts = 1) {
660
+ const pending = this.peekPendingLogin();
661
+ if (!pending) {
662
+ return null;
663
+ }
664
+ const tokenResult = await this.pollForToken(pending.sessionId, pending.pollSecret, maxAttempts);
665
+ if (tokenResult.success && tokenResult.token && tokenResult.user) {
666
+ (0, pendingLogin_1.clearPendingLogin)();
667
+ this.configManager.setAuth(tokenResult.token, tokenResult.user.email, tokenResult.refreshToken, tokenResult.user.id);
668
+ log.info(`Logged in as ${tokenResult.user.email} (resumed login)`);
669
+ return tokenResult;
670
+ }
671
+ if (tokenResult.error && tokenResult.error !== 'Timeout') {
672
+ // Session expired or errored on the proxy — spent either way.
673
+ (0, pendingLogin_1.clearPendingLogin)();
674
+ return tokenResult;
675
+ }
676
+ // Still pending: leave the file for the next attempt.
677
+ return null;
678
+ }
518
679
  /**
519
680
  * Poll the proxy server for authentication token after OAuth
520
681
  */
@@ -536,17 +697,20 @@ class AuthService {
536
697
  if (result.error && result.error !== 'Pending') {
537
698
  return result;
538
699
  }
539
- // Wait 2 seconds before next poll
540
- await new Promise((resolve) => setTimeout(resolve, 2000));
700
+ // Wait 2 seconds before next poll (skip after the final attempt)
701
+ if (i < maxAttempts - 1) {
702
+ await new Promise((resolve) => setTimeout(resolve, 2000));
703
+ }
541
704
  }
542
705
  catch (error) {
543
706
  log.warn('Error polling for token:', error);
544
707
  }
545
708
  }
709
+ const waitedMinutes = Math.max(1, Math.round((maxAttempts * 2000) / 60_000));
546
710
  return {
547
711
  success: false,
548
712
  error: 'Timeout',
549
- message: 'Authentication timed out after 2 minutes',
713
+ message: `Authentication timed out after ${waitedMinutes} minute${waitedMinutes === 1 ? '' : 's'}`,
550
714
  };
551
715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SAAS,CAAC,YAAY;wBACpC,KAAK;wBACL,MAAM;qBACP,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,aAAa,CAAC,OAAO,CACxB,SAAS,CAAC,KAAK,EACf,KAAK,EACL,SAAS,CAAC,YAAY,EACtB,MAAM,CACP,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,OAAO,KAAK,CAAC,OAAO,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,IAAI,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;YAClD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;IAC3C,CAAC;CACF;AAtcD,kCAscC"}
1
+ {"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../src/services/AuthService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAqC;AACrC,4CAA+C;AAC/C,mDAAmD;AACnD,+BAAqE;AACrE,6DAAkE;AAClE,6DAG8B;AAC9B,iDAKwB;AAExB,MAAM,GAAG,GAAG,IAAA,qBAAY,EAAC,aAAa,CAAC,CAAC;AACxC,MAAM,aAAa,GAAG,WAAW,CAAC;AAClC,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAC3C,MAAM,sBAAsB,GAAG,IAAI,CAAC;AACpC,MAAM,+BAA+B,GAAG,wBAAwB,CAAC;AACjE,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAC1C,MAAM,uBAAuB,GAAG,EAAE,GAAG,IAAI,CAAC;AAC1C,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAC1C,MAAM,yBAAyB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,OAAO,CAAC,IAAI,CAAC,KAAK,EACxB,SAAS,CAAC,YAAY,EACtB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CACtB,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;gBAClD,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;gBAC9C,IAAI,cAAc,EAAE,CAAC;oBACnB,IAAA,6CAAwB,EAAC;wBACvB,KAAK,EAAE,SAAS,CAAC,KAAK;wBACtB,YAAY,EAAE,SAAS,CAAC,YAAY;wBACpC,KAAK;wBACL,MAAM;qBACP,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,aAAa,CAAC,OAAO,CACxB,SAAS,CAAC,KAAK,EACf,KAAK,EACL,SAAS,CAAC,YAAY,EACtB,MAAM,CACP,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,OAAO,KAAK,CAAC,OAAO,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,IAAI,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;YAClD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;IAC3C,CAAC;CACF;AA9oBD,kCA8oBC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Persistence for an in-flight PKCE login (`~/.rivet/pending-login.json`).
3
+ *
4
+ * A PKCE login completes on the proxy, not in the process that started it —
5
+ * the browser redirect never touches this machine. That makes the login
6
+ * resumable: if the starting process dies (agent tool timeout, MCP server
7
+ * restart) while the user is still on Google's consent screen, the next
8
+ * Rivet invocation reads this file, polls the proxy once, and picks up the
9
+ * finished session. The file holds only the session id and poll secret —
10
+ * never tokens — and is worthless after the proxy-side TTL.
11
+ */
12
+ export type PendingLogin = {
13
+ sessionId: string;
14
+ pollSecret: string;
15
+ proxyUrl: string;
16
+ createdAt: number;
17
+ /** Sign-in URL of the in-flight login, so callers can re-share the link. */
18
+ authUrl?: string;
19
+ };
20
+ export declare const writePendingLogin: (pending: PendingLogin) => void;
21
+ export declare const clearPendingLogin: () => void;
22
+ /** Read the pending login, dropping (and deleting) stale or malformed files. */
23
+ export declare const readPendingLogin: () => PendingLogin | null;
24
+ //# sourceMappingURL=pendingLogin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pendingLogin.d.ts","sourceRoot":"","sources":["../../src/services/pendingLogin.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAQF,eAAO,MAAM,iBAAiB,GAAI,SAAS,YAAY,KAAG,IAIzD,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,IAMpC,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,QAAO,YAAY,GAAG,IAyBlD,CAAC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.readPendingLogin = exports.clearPendingLogin = exports.writePendingLogin = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const os_1 = __importDefault(require("os"));
9
+ const path_1 = __importDefault(require("path"));
10
+ /** Mirrors the proxy's OAuth session TTL; stale files are self-cleaning. */
11
+ const PENDING_LOGIN_TTL_MS = 10 * 60 * 1000;
12
+ const pendingLoginPath = () => path_1.default.join(os_1.default.homedir(), '.rivet', 'pending-login.json');
13
+ const writePendingLogin = (pending) => {
14
+ const filePath = pendingLoginPath();
15
+ fs_1.default.mkdirSync(path_1.default.dirname(filePath), { recursive: true });
16
+ fs_1.default.writeFileSync(filePath, JSON.stringify(pending), { mode: 0o600 });
17
+ };
18
+ exports.writePendingLogin = writePendingLogin;
19
+ const clearPendingLogin = () => {
20
+ try {
21
+ fs_1.default.unlinkSync(pendingLoginPath());
22
+ }
23
+ catch {
24
+ // Already gone.
25
+ }
26
+ };
27
+ exports.clearPendingLogin = clearPendingLogin;
28
+ /** Read the pending login, dropping (and deleting) stale or malformed files. */
29
+ const readPendingLogin = () => {
30
+ let raw;
31
+ try {
32
+ raw = fs_1.default.readFileSync(pendingLoginPath(), 'utf8');
33
+ }
34
+ catch {
35
+ return null;
36
+ }
37
+ try {
38
+ const parsed = JSON.parse(raw);
39
+ if (typeof parsed.sessionId !== 'string' ||
40
+ typeof parsed.pollSecret !== 'string' ||
41
+ typeof parsed.proxyUrl !== 'string' ||
42
+ typeof parsed.createdAt !== 'number' ||
43
+ (parsed.authUrl !== undefined && typeof parsed.authUrl !== 'string') ||
44
+ Date.now() - parsed.createdAt > PENDING_LOGIN_TTL_MS) {
45
+ (0, exports.clearPendingLogin)();
46
+ return null;
47
+ }
48
+ return parsed;
49
+ }
50
+ catch {
51
+ (0, exports.clearPendingLogin)();
52
+ return null;
53
+ }
54
+ };
55
+ exports.readPendingLogin = readPendingLogin;
56
+ //# sourceMappingURL=pendingLogin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pendingLogin.js","sourceRoot":"","sources":["../../src/services/pendingLogin.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AAuBxB,4EAA4E;AAC5E,MAAM,oBAAo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K,QAAQ;YACnC,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ;YACpC,CAAC,MAAM,CAAC,OAAO,KAAK,SAAS,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,CAAC;YACpE,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,SAAS,GAAG,oBAAoB,EACpD,CAAC;YACD,IAAA,yBAAiB,GAAE,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,MAAsB,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,IAAA,yBAAiB,GAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAzBW,QAAA,gBAAgB,oBAyB3B"}
@@ -6,5 +6,5 @@
6
6
  export declare const CLAUDE_SKILL_VERSION = 50;
7
7
  export declare const CLAUDE_SKILL_DIR = "rivet";
8
8
  export declare const CLAUDE_SKILL_FILENAME = "SKILL.md";
9
- export declare const CLAUDE_SKILL_CONTENT = "---\nname: rivet\ndescription: Rivet \u2014 explore multiple design directions for your web app (\"/rivet\", \"use rivet\", \"explore with rivet\", \"create variants of X\", \"show me options for X\", \"open rivet\", \"open the visual editor\"). Drive it with `rivet` CLI commands.\n---\n\n[//]: # (rivet-skill-version: 50)\n[//]: # (rivet-cli-guidance-version: 23)\n# Rivet\n\nRivet helps you **explore multiple design directions** for a web app. You drive it by running `rivet` CLI commands. Every command prints exactly one JSON envelope on stdout (`{ schemaVersion, ok, command, data | error }`), routes progress to stderr, and never prompts for input.\n\n**Exit codes:** 0 ok \u00B7 1 operation failed (see `error.code`) \u00B7 2 usage error \u00B7 3 auth required \u00B7 4 no server for the project \u00B7 5 `rivet wait` timeout (work still pending or running \u2014 not a failure; the envelope's `state` says which).\n\n**Identify yourself (handoff).** Add these flags to every invocation so Rivet can attribute work: `--caller-agent claude|codex|cursor`, `--caller-model <your model>`, and `--caller-session <your chat session id>` when you have one. Human-direct invocations omit handoff flags. Never wrap or chain `rivet` with other commands (`&&`, pipes) \u2014 plain invocations are what the host allowlist covers.\n\n**Project path.** Prefer explicit `--project <absolute path>` on every command so follow-up chats attach to the same workspace. For an existing app, pass its repo/app root. For a fresh app, create or use an empty directory first, then open Rivet there and start variants with `--fresh`.\n\n**Browser behavior.** For interactive user workflows, run `rivet open` without `--no-browser` so the Rivet UI opens in the browser. Use `--no-browser` only for headless/background automation, CI/e2e checks, or when the user explicitly asks not to open a browser; in those cases, report the returned `editorUrl`.\n\n**MCP tools (opt-in).** If this host has Rivet MCP tools registered (`rivet_status`, `rivet_variants`, `rivet_design_context` \u2014 the user opted in via `rivet install --mcp`), prefer them over shelling out for status, variants, and design-context work: they drive the same control plane and return the same JSON envelopes, without per-call process cost. Lifecycle and auth stay CLI-only on purpose \u2014 `rivet open`, `rivet stop`, `rivet wait`, and `rivet login` have no MCP tools. There is no blocking/watch tool either: start work with `rivet_variants`; if the result contains `nextAction.action=\"complete_host_variant_work\"`, execute it yourself with parallel subagents when available.\n\n## Commands\n\n- `rivet open [--project <path>] [--agent claude|codex|cursor] [--rivet-port N] [--user-port N] [--framework nextjs|vite|cra|remix|svelte|static] [--entry <path>] [--no-browser] [--no-git]` \u2014 start or attach the project's editor server (idempotent; returns `editorUrl`). It detects the app, attaches to an already-running dev server, or starts one from the app's standard `dev`/`start`/`serve` script when possible. Omit `--no-browser` for interactive work so the UI opens for the user.\n- `rivet variants start --project <path> --instruction <text> [--run-label <text>] [--briefs <json>] [--count N] [--fidelity low|medium|high] [--element <selector>] [--files <json>] [--fresh] [--context-images <json>] [--reference-pages <json>] [--reference-videos <json>] [--target <sessionId>:<variantId>]` \u2014 explore design directions. For existing-app and `--target` starts, agent invocations MUST pass an AI-authored 1\u20133 word batch label through `rivet_variants` `runLabel` or CLI `--run-label`, plus one AI-authored brief per direction; `briefs.length` sets the count. FRESH (`--fresh`) starts are different: OMIT briefs and run-label and pass `--count` \u2014 Rivet prepares all reference context and authors the directions server-side, which starts workers immediately. Use `--files` for already-known project paths and `--target` to Vary an existing direction. Returns a `workId` and `nextAction` after workspace provisioning.\n- `rivet variants complete <workId> --project <path> [--session <sessionId>] [--status succeeded|failed|cancelled] [--output <json>] [--error <message>]` \u2014 report one host-agent work item complete after you edit its assigned workspace. Static artifacts are read from disk; do not send them through `--output`.\n- `rivet wait <workId> --project <path> [--timeout <seconds>]` \u2014 bounded block until a work id settles (exit 5 on timeout; re-issue or check status).\n- `rivet status --project <path> [--watch]` \u2014 session, resolved runner, active run, and the variants snapshot. `--watch` streams NDJSON.\n- `rivet variants status --project <path>` / `rivet variants list --project <path> [--history]` \u2014 inspect live or past directions.\n- `rivet variants get <sessionId>:<variantId> --project <path>` \u2014 retrieve one exact variant, including its local artifact path or diff, from a reference copied by the editor.\n- `rivet variants commit <variantId> --project <path> [--session <id>]` \u2014 send the chosen direction to the project.\n- `rivet variants cancel <sessionId> --project <path>` \u2014 cancel a running variants session.\n- `rivet evidence capture --url <url>` \u2014 rendered design evidence (root variables, element styles, fonts) for a reference URL.\n- `rivet reference fetch <url>` \u2014 Pinterest / Are.na reference data via the user's connected account. Accepts full pin/board URLs and `pin.it` share links. Pinterest images are downloaded into `.rivet/references/` and returned as absolute paths (`data.images`, plus `local_path` per pin) \u2014 view them directly and pass them to variants via `--context-images` instead of relaying URLs. On failure the error message says exactly what to tell the user (e.g. save the pin to a board first).\n- `rivet auth status` \u2014 signed-in state. If `authenticated: false`, tell the user to run `rivet login` themselves \u2014 never run login for them.\n- `rivet stop [--project <path>]` \u2014 stop the CLI-owned server.\n\n**Fidelity (capture the user's intent).** Design fidelity is a function of the authoring model, which correlates with latency \u2014 so the choice belongs to the user. On every `variants start` (CLI `--fidelity`, or the `rivet_variants` `fidelity` field), translate the user's ask into a fidelity level: `low` when they want speed or throwaway exploration (\"quick ideas\", \"rough sketches\", \"just show me options fast\") \u2014 sketch-grade workers, results in ~1.5\u20132 minutes; `high` when they want craft (\"polished\", \"pixel-perfect\", \"high fidelity\", \"final\", \"production-ready\", \"take your time\") \u2014 frontier-model authorship that can take a few minutes per direction. OMIT the flag when the user expressed no speed/quality intent \u2014 Rivet's default (`medium`) balances both. Never ask the user to pick a level; infer it from their words and mention the choice in your summary so they can redirect.\n\n## Typical flows\n\nBefore every agent-initiated EXISTING-APP or `--target` variants start, author a 1\u20133 word batch label plus one or more direction briefs as `[{\"label\":\"\u2026\",\"body\":\"\u2026\"}]`. (Fresh `--fresh` starts skip this entirely \u2014 see the fresh flow below.) The batch label summarizes the shared request and is passed through `runLabel` (MCP) or `--run-label` (CLI). Each brief `label` is an AI-authored direction title: 1\u20135 plain-English words naming what that direction concretely changes, not a vibe or numbered placeholder. Each `body` is a concise plain-English subtitle of at most 10 words describing that direction. Add an optional `notes` string per brief for richer implementation intent (design tokens, motion specs, constraints) \u2014 it is delivered verbatim to that direction's worker and never shown in UI chips. Use one brief for a single visualization when the user wants Rivet's visualization framework without divergent ideas. For multiple directions, make every brief meaningfully different. Pass the array through the `rivet_variants` `briefs` field or CLI `--briefs <json>`, and omit `--count` because the array length is authoritative. Human-direct CLI calls may omit the batch label and briefs and use Rivet's deterministic fallback.\n\nExisting app:\n1. `rivet open --project <path> --caller-agent cursor --caller-model <model> --caller-session <id>` \u2192 note `editorUrl`, `sessionId`, and `resolvedRunner`.\n2. Author a batch label and three distinct title/subtitle briefs, then call `rivet variants start --project <path> --instruction \"try three hero layouts\" --run-label \"Hero layouts\" --briefs '[{\"label\":\"Split hero\",\"body\":\"Moves supporting proof beside the primary call to action.\"},{\"label\":\"Layered hero\",\"body\":\"Stacks product imagery behind a compact centered headline.\"},{\"label\":\"Product-led hero\",\"body\":\"Lets the product preview dominate the opening composition.\"}]' --caller-agent cursor --caller-model <model> --caller-session <id>` \u2192 note `workId`.\n3. Rivet normally builds the directions with its OWN workers (the server executor): if the start response shows variants in flight but NO `nextAction`, do not implement anything \u2014 check `rivet status --project <path>` periodically (foreground waits only) until every variant is terminal, then present the results. Only when a response carries `nextAction.action=\"complete_host_variant_work\"` (executor unavailable on this machine) does the host implement, as follows. Each work item carries a server-authored `workerPrompt` pointing at its briefing file \u2014 the full packet (direction, mode contract, boundaries, completion command). Follow `nextAction.parallelism` exactly: one item \u2192 follow its `workerPrompt` yourself in the current host; multiple items \u2192 spawn every worker in that same turn as background subagents, passing each item's `workerPrompt` VERBATIM as the entire worker prompt \u2014 compose nothing, and never re-plan or elaborate briefs before spawning. When `nextAction.worker.agentType` is set (Claude Code: `rivet-worker`, installed by `rivet install` with tuned model/effort defaults), spawn each worker AS that subagent type; fall back to your default subagent type only if it is not registered. For `mode=\"vary\"` the workspace entry already contains the source direction's finished code: read it first, apply the requested delta with targeted `Edit` operations in place, and never rewrite or re-emit the full file \u2014 unchanged sections must remain untouched. For `workspace.kind=\"artifact_directory\"` the deliverable is `workspace.rootPath/workspace.entryPath` (write it in full only when it starts empty, i.e. `mode=\"create\"`); for `workspace.kind=\"git_worktree\"`, edit the app under `workspace.projectPath`.\n4. The briefing file ends with the item's exact `completeCommand`: the worker runs `rivet variants complete <workId> --project <path> --session <sessionId>` itself as its final step, the moment its workspace is done. Completions are never held back or batched by the coordinator \u2014 and because workers self-report, the coordinator does NOT poll status while workers run: check `rivet status` once after workers return (or on a single \u226560s wakeup), only to confirm terminal states and surface failures. Rivet reads static HTML from `workspace.entryPath` and captures git-worktree changes itself. Do not send inline HTML or repeat project context in the completion payload. If the result says `requeuedForRegeneration`, poll status for the renewed lease, address its QA summary, and complete that item once more. If a worker cannot complete it, use `--status failed --error <message>`.\n5. Show the user the `editorUrl` to compare directions; `rivet variants commit <variantId> --project <path>` when they pick one.\n\nFresh 0-to-1 (the fast path \u2014 go straight to the start call): create or use an empty directory, run `rivet open --project <path> ...`, then IMMEDIATELY run `rivet variants start --project <path> --fresh --instruction \"build a SaaS landing page\" --count 3 ...` with the user's references passed raw. OMIT `--briefs` and `--run-label`: Rivet authors the directions server-side, and every second you spend reading references or writing briefs delays the build. Pass local reference images via `--context-images '[\"/abs/path.png\"]'` (`rivet_variants` `contextImages`) \u2014 Rivet copies them into the run context and every worker views them natively. Pass reference page URLs via `--reference-pages '[\"https://example.com\"]'` (`referencePages`) \u2014 Rivet renders each page server-side for design evidence + a screenshot; never capture evidence or screenshot pages yourself. Pass local reference videos via `--reference-videos '[\"/abs/clip.mp4\"]'` (`referenceVideos`) \u2014 Rivet samples keyframes server-side; never run ffmpeg yourself. Never substitute a prose description of media you can pass directly.\n\nVary an existing direction: after status/list gives you `sessionId` and `variantId`, author a batch label and two distinct delta briefs by default, then run `rivet variants start --project <path> --target <sessionId>:<variantId> --instruction \"make this calmer\" --run-label \"Calmer direction\" --briefs '<json>' ...`. Include `--files '[\"src/known-target.tsx\"]'` when the relevant files are already known. Explicit briefs/counts remain authoritative.\n\nRivet owns orchestration; the host agent owns implementation. Do not wait for Rivet to spawn a separate agent. When `rivet variants start`, `rivet status`, `rivet_variants`, or `rivet_status` returns `nextAction.action=\"complete_host_variant_work\"`, complete those work items from the current host session. Avoid subagent startup for one item. For multiple items, spawn one background worker per isolated workspace in the same turn, and have each worker report its own completion immediately via its `completeCommand` (or `rivet_variants` action `complete`) \u2014 a variant's completion must never wait for its siblings.\n\n**Never cancel to unblock.** If `variants start` is rejected with `start_in_flight`, a start is still provisioning (status reports `variants.starting: true` \u2014 can take minutes); poll status and retry once it clears. If rejected with `active_session`, the user has live work: report the conflict and let them decide, or refine the active session with `--target`. Cancelling a session destroys the user's in-progress exploration \u2014 only do it when the user explicitly asks.\n";
9
+ export declare const CLAUDE_SKILL_CONTENT = "---\nname: rivet\ndescription: Rivet \u2014 explore multiple design directions for your web app (\"/rivet\", \"use rivet\", \"explore with rivet\", \"create variants of X\", \"show me options for X\", \"open rivet\", \"open the visual editor\"). Drive it with `rivet` CLI commands.\n---\n\n[//]: # (rivet-skill-version: 50)\n[//]: # (rivet-cli-guidance-version: 24)\n# Rivet\n\nRivet helps you **explore multiple design directions** for a web app. You drive it by running `rivet` CLI commands. Every command prints exactly one JSON envelope on stdout (`{ schemaVersion, ok, command, data | error }`), routes progress to stderr, and never prompts for input.\n\n**Exit codes:** 0 ok \u00B7 1 operation failed (see `error.code`) \u00B7 2 usage error \u00B7 3 auth required \u00B7 4 no server for the project \u00B7 5 `rivet wait` timeout (work still pending or running \u2014 not a failure; the envelope's `state` says which).\n\n**Identify yourself (handoff).** Add these flags to every invocation so Rivet can attribute work: `--caller-agent claude|codex|cursor`, `--caller-model <your model>`, and `--caller-session <your chat session id>` when you have one. Human-direct invocations omit handoff flags. Never wrap or chain `rivet` with other commands (`&&`, pipes) \u2014 plain invocations are what the host allowlist covers.\n\n**Project path.** Prefer explicit `--project <absolute path>` on every command so follow-up chats attach to the same workspace. For an existing app, pass its repo/app root. For a fresh app, create or use an empty directory first, then open Rivet there and start variants with `--fresh`.\n\n**Browser behavior.** For interactive user workflows, run `rivet open` without `--no-browser` so the Rivet UI opens in the browser. Use `--no-browser` only for headless/background automation, CI/e2e checks, or when the user explicitly asks not to open a browser; in those cases, report the returned `editorUrl`.\n\n**MCP tools (opt-in).** If this host has Rivet MCP tools registered (`rivet_status`, `rivet_variants`, `rivet_design_context`, `rivet_login` \u2014 the user opted in via `rivet install --mcp`), prefer them over shelling out for status, variants, design-context, and sign-in work: they drive the same control plane and return the same JSON envelopes, without per-call process cost. Lifecycle stays CLI-only on purpose \u2014 `rivet open`, `rivet stop`, and `rivet wait` have no MCP tools. There is no blocking/watch tool either: start work with `rivet_variants`; if the result contains `nextAction.action=\"complete_host_variant_work\"`, execute it yourself with parallel subagents when available.\n\n## Commands\n\n- `rivet open [--project <path>] [--agent claude|codex|cursor] [--rivet-port N] [--user-port N] [--framework nextjs|vite|cra|remix|svelte|static] [--entry <path>] [--no-browser] [--no-git]` \u2014 start or attach the project's editor server (idempotent; returns `editorUrl`). It detects the app, attaches to an already-running dev server, or starts one from the app's standard `dev`/`start`/`serve` script when possible. Omit `--no-browser` for interactive work so the UI opens for the user.\n- `rivet variants start --project <path> --instruction <text> [--run-label <text>] [--briefs <json>] [--count N] [--fidelity low|medium|high] [--element <selector>] [--files <json>] [--fresh] [--context-images <json>] [--reference-pages <json>] [--reference-videos <json>] [--target <sessionId>:<variantId>]` \u2014 explore design directions. For existing-app and `--target` starts, agent invocations MUST pass an AI-authored 1\u20133 word batch label through `rivet_variants` `runLabel` or CLI `--run-label`, plus one AI-authored brief per direction; `briefs.length` sets the count. FRESH (`--fresh`) starts are different: OMIT briefs and run-label and pass `--count` \u2014 Rivet prepares all reference context and authors the directions server-side, which starts workers immediately. Use `--files` for already-known project paths and `--target` to Vary an existing direction. Returns a `workId` and `nextAction` after workspace provisioning.\n- `rivet variants complete <workId> --project <path> [--session <sessionId>] [--status succeeded|failed|cancelled] [--output <json>] [--error <message>]` \u2014 report one host-agent work item complete after you edit its assigned workspace. Static artifacts are read from disk; do not send them through `--output`.\n- `rivet wait <workId> --project <path> [--timeout <seconds>]` \u2014 bounded block until a work id settles (exit 5 on timeout; re-issue or check status).\n- `rivet status --project <path> [--watch]` \u2014 session, resolved runner, active run, and the variants snapshot. `--watch` streams NDJSON.\n- `rivet variants status --project <path>` / `rivet variants list --project <path> [--history]` \u2014 inspect live or past directions.\n- `rivet variants get <sessionId>:<variantId> --project <path>` \u2014 retrieve one exact variant, including its local artifact path or diff, from a reference copied by the editor.\n- `rivet variants commit <variantId> --project <path> [--session <id>]` \u2014 send the chosen direction to the project.\n- `rivet variants cancel <sessionId> --project <path>` \u2014 cancel a running variants session.\n- `rivet evidence capture --url <url>` \u2014 rendered design evidence (root variables, element styles, fonts) for a reference URL.\n- `rivet reference fetch <url>` \u2014 Pinterest / Are.na reference data via the user's connected account. Accepts full pin/board URLs and `pin.it` share links. Pinterest images are downloaded into `.rivet/references/` and returned as absolute paths (`data.images`, plus `local_path` per pin) \u2014 view them directly and pass them to variants via `--context-images` instead of relaying URLs. On failure the error message says exactly what to tell the user (e.g. save the pin to a board first).\n- `rivet auth status` \u2014 signed-in state. If `authenticated: false`: call the `rivet_login` MCP tool when this host has it \u2014 it opens a browser sign-in for the user and returns immediately; after they finish, retry the blocked action (the session is picked up automatically). Without MCP tools, tell the user to run `rivet login` themselves \u2014 never run login in your own terminal (it blocks waiting on the browser).\n- `rivet stop [--project <path>]` \u2014 stop the CLI-owned server.\n\n**Fidelity (capture the user's intent).** Design fidelity is a function of the authoring model, which correlates with latency \u2014 so the choice belongs to the user. On every `variants start` (CLI `--fidelity`, or the `rivet_variants` `fidelity` field), translate the user's ask into a fidelity level: `low` when they want speed or throwaway exploration (\"quick ideas\", \"rough sketches\", \"just show me options fast\") \u2014 sketch-grade workers, results in ~1.5\u20132 minutes; `high` when they want craft (\"polished\", \"pixel-perfect\", \"high fidelity\", \"final\", \"production-ready\", \"take your time\") \u2014 frontier-model authorship that can take a few minutes per direction. OMIT the flag when the user expressed no speed/quality intent \u2014 Rivet's default (`medium`) balances both. Never ask the user to pick a level; infer it from their words and mention the choice in your summary so they can redirect.\n\n## Typical flows\n\nBefore every agent-initiated EXISTING-APP or `--target` variants start, author a 1\u20133 word batch label plus one or more direction briefs as `[{\"label\":\"\u2026\",\"body\":\"\u2026\"}]`. (Fresh `--fresh` starts skip this entirely \u2014 see the fresh flow below.) The batch label summarizes the shared request and is passed through `runLabel` (MCP) or `--run-label` (CLI). Each brief `label` is an AI-authored direction title: 1\u20135 plain-English words naming what that direction concretely changes, not a vibe or numbered placeholder. Each `body` is a concise plain-English subtitle of at most 10 words describing that direction. Add an optional `notes` string per brief for richer implementation intent (design tokens, motion specs, constraints) \u2014 it is delivered verbatim to that direction's worker and never shown in UI chips. Use one brief for a single visualization when the user wants Rivet's visualization framework without divergent ideas. For multiple directions, make every brief meaningfully different. Pass the array through the `rivet_variants` `briefs` field or CLI `--briefs <json>`, and omit `--count` because the array length is authoritative. Human-direct CLI calls may omit the batch label and briefs and use Rivet's deterministic fallback.\n\nExisting app:\n1. `rivet open --project <path> --caller-agent cursor --caller-model <model> --caller-session <id>` \u2192 note `editorUrl`, `sessionId`, and `resolvedRunner`.\n2. Author a batch label and three distinct title/subtitle briefs, then call `rivet variants start --project <path> --instruction \"try three hero layouts\" --run-label \"Hero layouts\" --briefs '[{\"label\":\"Split hero\",\"body\":\"Moves supporting proof beside the primary call to action.\"},{\"label\":\"Layered hero\",\"body\":\"Stacks product imagery behind a compact centered headline.\"},{\"label\":\"Product-led hero\",\"body\":\"Lets the product preview dominate the opening composition.\"}]' --caller-agent cursor --caller-model <model> --caller-session <id>` \u2192 note `workId`.\n3. Rivet normally builds the directions with its OWN workers (the server executor): if the start response shows variants in flight but NO `nextAction`, do not implement anything \u2014 check `rivet status --project <path>` periodically (foreground waits only) until every variant is terminal, then present the results. Only when a response carries `nextAction.action=\"complete_host_variant_work\"` (executor unavailable on this machine) does the host implement, as follows. Each work item carries a server-authored `workerPrompt` pointing at its briefing file \u2014 the full packet (direction, mode contract, boundaries, completion command). Follow `nextAction.parallelism` exactly: one item \u2192 follow its `workerPrompt` yourself in the current host; multiple items \u2192 spawn every worker in that same turn as background subagents, passing each item's `workerPrompt` VERBATIM as the entire worker prompt \u2014 compose nothing, and never re-plan or elaborate briefs before spawning. When `nextAction.worker.agentType` is set (Claude Code: `rivet-worker`, installed by `rivet install` with tuned model/effort defaults), spawn each worker AS that subagent type; fall back to your default subagent type only if it is not registered. For `mode=\"vary\"` the workspace entry already contains the source direction's finished code: read it first, apply the requested delta with targeted `Edit` operations in place, and never rewrite or re-emit the full file \u2014 unchanged sections must remain untouched. For `workspace.kind=\"artifact_directory\"` the deliverable is `workspace.rootPath/workspace.entryPath` (write it in full only when it starts empty, i.e. `mode=\"create\"`); for `workspace.kind=\"git_worktree\"`, edit the app under `workspace.projectPath`.\n4. The briefing file ends with the item's exact `completeCommand`: the worker runs `rivet variants complete <workId> --project <path> --session <sessionId>` itself as its final step, the moment its workspace is done. Completions are never held back or batched by the coordinator \u2014 and because workers self-report, the coordinator does NOT poll status while workers run: check `rivet status` once after workers return (or on a single \u226560s wakeup), only to confirm terminal states and surface failures. Rivet reads static HTML from `workspace.entryPath` and captures git-worktree changes itself. Do not send inline HTML or repeat project context in the completion payload. If the result says `requeuedForRegeneration`, poll status for the renewed lease, address its QA summary, and complete that item once more. If a worker cannot complete it, use `--status failed --error <message>`.\n5. Show the user the `editorUrl` to compare directions; `rivet variants commit <variantId> --project <path>` when they pick one.\n\nFresh 0-to-1 (the fast path \u2014 go straight to the start call): create or use an empty directory, run `rivet open --project <path> ...`, then IMMEDIATELY run `rivet variants start --project <path> --fresh --instruction \"build a SaaS landing page\" --count 3 ...` with the user's references passed raw. OMIT `--briefs` and `--run-label`: Rivet authors the directions server-side, and every second you spend reading references or writing briefs delays the build. Pass local reference images via `--context-images '[\"/abs/path.png\"]'` (`rivet_variants` `contextImages`) \u2014 Rivet copies them into the run context and every worker views them natively. Pass reference page URLs via `--reference-pages '[\"https://example.com\"]'` (`referencePages`) \u2014 Rivet renders each page server-side for design evidence + a screenshot; never capture evidence or screenshot pages yourself. Pass local reference videos via `--reference-videos '[\"/abs/clip.mp4\"]'` (`referenceVideos`) \u2014 Rivet samples keyframes server-side; never run ffmpeg yourself. Never substitute a prose description of media you can pass directly.\n\nVary an existing direction: after status/list gives you `sessionId` and `variantId`, author a batch label and two distinct delta briefs by default, then run `rivet variants start --project <path> --target <sessionId>:<variantId> --instruction \"make this calmer\" --run-label \"Calmer direction\" --briefs '<json>' ...`. Include `--files '[\"src/known-target.tsx\"]'` when the relevant files are already known. Explicit briefs/counts remain authoritative.\n\nRivet owns orchestration; the host agent owns implementation. Do not wait for Rivet to spawn a separate agent. When `rivet variants start`, `rivet status`, `rivet_variants`, or `rivet_status` returns `nextAction.action=\"complete_host_variant_work\"`, complete those work items from the current host session. Avoid subagent startup for one item. For multiple items, spawn one background worker per isolated workspace in the same turn, and have each worker report its own completion immediately via its `completeCommand` (or `rivet_variants` action `complete`) \u2014 a variant's completion must never wait for its siblings.\n\n**Never cancel to unblock.** If `variants start` is rejected with `start_in_flight`, a start is still provisioning (status reports `variants.starting: true` \u2014 can take minutes); poll status and retry once it clears. If rejected with `active_session`, the user has live work: report the conflict and let them decide, or refine the active session with `--target`. Cancelling a session destroys the user's in-progress exploration \u2014 only do it when the user explicitly asks.\n";
10
10
  //# sourceMappingURL=claude-skill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-skill.d.ts","sourceRoot":"","sources":["../../../src/utils/skills/claude-skill.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AAEH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAGvC,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,eAAO,MAAM,oBAAoB,wvcAUhC,CAAC"}
1
+ {"version":3,"file":"claude-skill.d.ts","sourceRoot":"","sources":["../../../src/utils/skills/claude-skill.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AAEH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAGvC,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,eAAO,MAAM,oBAAoB,+gdAUhC,CAAC"}