rivet-design 0.19.0 → 0.19.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 (47) hide show
  1. package/README.md +1 -1
  2. package/README.npm.md +1 -1
  3. package/dist/agent-variants/PreviewRuntime.d.ts +100 -0
  4. package/dist/agent-variants/PreviewRuntime.d.ts.map +1 -0
  5. package/dist/agent-variants/PreviewRuntime.js +577 -0
  6. package/dist/agent-variants/PreviewRuntime.js.map +1 -0
  7. package/dist/agent-variants/WorkspaceInventory.d.ts +81 -0
  8. package/dist/agent-variants/WorkspaceInventory.d.ts.map +1 -0
  9. package/dist/agent-variants/WorkspaceInventory.js +172 -0
  10. package/dist/agent-variants/WorkspaceInventory.js.map +1 -0
  11. package/dist/agent-variants/WorkspaceProvisioning.d.ts +40 -0
  12. package/dist/agent-variants/WorkspaceProvisioning.d.ts.map +1 -0
  13. package/dist/agent-variants/WorkspaceProvisioning.js +419 -0
  14. package/dist/agent-variants/WorkspaceProvisioning.js.map +1 -0
  15. package/dist/agent-variants/WorktreeOrchestrator.d.ts +9 -178
  16. package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
  17. package/dist/agent-variants/WorktreeOrchestrator.js +190 -2213
  18. package/dist/agent-variants/WorktreeOrchestrator.js.map +1 -1
  19. package/dist/agent-variants/designContextArtifacts.d.ts +25 -0
  20. package/dist/agent-variants/designContextArtifacts.d.ts.map +1 -0
  21. package/dist/agent-variants/designContextArtifacts.js +471 -0
  22. package/dist/agent-variants/designContextArtifacts.js.map +1 -0
  23. package/dist/agent-variants/variant-project-runtime.d.ts +40 -0
  24. package/dist/agent-variants/variant-project-runtime.d.ts.map +1 -0
  25. package/dist/agent-variants/variant-project-runtime.js +3 -0
  26. package/dist/agent-variants/variant-project-runtime.js.map +1 -0
  27. package/dist/agent-variants/variantWorkspaceFiles.d.ts +44 -0
  28. package/dist/agent-variants/variantWorkspaceFiles.d.ts.map +1 -0
  29. package/dist/agent-variants/variantWorkspaceFiles.js +426 -0
  30. package/dist/agent-variants/variantWorkspaceFiles.js.map +1 -0
  31. package/dist/agent-variants/variantsTelemetry.d.ts +189 -0
  32. package/dist/agent-variants/variantsTelemetry.d.ts.map +1 -0
  33. package/dist/agent-variants/variantsTelemetry.js +160 -0
  34. package/dist/agent-variants/variantsTelemetry.js.map +1 -0
  35. package/dist/utils/skills/claude-skill.d.ts +1 -1
  36. package/dist/utils/skills/claude-skill.d.ts.map +1 -1
  37. package/dist/utils/skills/claude-skill.js +1 -1
  38. package/dist/utils/skills/claude-skill.js.map +1 -1
  39. package/dist/utils/skills/cli-guidance.d.ts +1 -1
  40. package/dist/utils/skills/cli-guidance.js +4 -4
  41. package/dist/utils/skills/codex-skill.d.ts +1 -1
  42. package/dist/utils/skills/codex-skill.d.ts.map +1 -1
  43. package/dist/utils/skills/codex-skill.js +2 -2
  44. package/package.json +1 -1
  45. package/src/ui/dist/assets/{LibraryApp-B4ztVk52.js → LibraryApp-Sm0rsDtm.js} +8 -8
  46. package/src/ui/dist/assets/{main-CAPEQf84.js → main-5v9Ic8BN.js} +94 -94
  47. package/src/ui/dist/index.html +1 -1
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.trackStaticPreviewCompleted = exports.trackPreviewFailed = exports.trackPreviewReady = exports.trackPreviewStarted = exports.trackFreshDevServerFailed = exports.trackFreshDevServerStarted = exports.trackScaffoldFailed = exports.trackScaffoldCompleted = exports.trackScaffoldStarted = exports.summarizeDesignContext = exports.NOOP_TELEMETRY = void 0;
4
+ exports.NOOP_TELEMETRY = { track: () => undefined };
5
+ const summarizeDesignContext = (designContext) => {
6
+ if (!designContext)
7
+ return null;
8
+ return designContext.reduce((entries, entry, slot) => {
9
+ if (!entry)
10
+ return entries;
11
+ if (entry.kind === 'slug') {
12
+ entries.push({ slot, kind: 'slug', slug: entry.slug });
13
+ return entries;
14
+ }
15
+ entries.push({
16
+ slot,
17
+ kind: 'markdown',
18
+ markdownLabel: entry.label,
19
+ });
20
+ return entries;
21
+ }, []);
22
+ };
23
+ exports.summarizeDesignContext = summarizeDesignContext;
24
+ const trackScaffoldStarted = (telemetry, data) => {
25
+ if (telemetry.trackAgentVariantsScaffoldStarted) {
26
+ telemetry.trackAgentVariantsScaffoldStarted(data);
27
+ return;
28
+ }
29
+ telemetry.track('agent_variants.scaffold_started', {
30
+ source: 'mcp',
31
+ session_id: data.sessionId,
32
+ variant_count: data.variantCount,
33
+ design_context: data.designContext ?? null,
34
+ });
35
+ };
36
+ exports.trackScaffoldStarted = trackScaffoldStarted;
37
+ const trackScaffoldCompleted = (telemetry, data) => {
38
+ if (telemetry.trackAgentVariantsScaffoldCompleted) {
39
+ telemetry.trackAgentVariantsScaffoldCompleted(data);
40
+ return;
41
+ }
42
+ telemetry.track('agent_variants.scaffold_completed', {
43
+ source: 'mcp',
44
+ session_id: data.sessionId,
45
+ duration_ms: data.durationMs,
46
+ install_duration_ms: data.installDurationMs,
47
+ variant_count: data.variantCount,
48
+ });
49
+ };
50
+ exports.trackScaffoldCompleted = trackScaffoldCompleted;
51
+ const trackScaffoldFailed = (telemetry, data) => {
52
+ if (telemetry.trackAgentVariantsScaffoldFailed) {
53
+ telemetry.trackAgentVariantsScaffoldFailed(data);
54
+ return;
55
+ }
56
+ telemetry.track('agent_variants.scaffold_failed', {
57
+ source: 'mcp',
58
+ session_id: data.sessionId,
59
+ error_code: data.errorCode,
60
+ duration_ms: data.durationMs,
61
+ });
62
+ };
63
+ exports.trackScaffoldFailed = trackScaffoldFailed;
64
+ const trackFreshDevServerStarted = (telemetry, data) => {
65
+ if (telemetry.trackAgentVariantsFreshDevServerStarted) {
66
+ telemetry.trackAgentVariantsFreshDevServerStarted(data);
67
+ return;
68
+ }
69
+ telemetry.track('agent_variants.fresh_dev_server_started', {
70
+ source: 'mcp',
71
+ session_id: data.sessionId,
72
+ variant_id: data.variantId,
73
+ port: data.port,
74
+ });
75
+ };
76
+ exports.trackFreshDevServerStarted = trackFreshDevServerStarted;
77
+ const trackFreshDevServerFailed = (telemetry, data) => {
78
+ if (telemetry.trackAgentVariantsFreshDevServerFailed) {
79
+ telemetry.trackAgentVariantsFreshDevServerFailed(data);
80
+ return;
81
+ }
82
+ telemetry.track('agent_variants.fresh_dev_server_failed', {
83
+ source: 'mcp',
84
+ session_id: data.sessionId,
85
+ variant_id: data.variantId,
86
+ error_code: data.errorCode,
87
+ failure_reason: data.reason,
88
+ port_in_use: data.portInUse,
89
+ exit_code: data.exitCode,
90
+ term_signal: data.signal,
91
+ missing_deps: data.missingDeps,
92
+ });
93
+ };
94
+ exports.trackFreshDevServerFailed = trackFreshDevServerFailed;
95
+ const trackPreviewStarted = (telemetry, data) => {
96
+ if (telemetry.trackAgentVariantsPreviewStarted) {
97
+ telemetry.trackAgentVariantsPreviewStarted(data);
98
+ return;
99
+ }
100
+ telemetry.track('agent_variants.preview_started', {
101
+ source: 'mcp',
102
+ session_id: data.sessionId,
103
+ variant_id: data.variantId,
104
+ project_context_kind: data.projectContextKind,
105
+ preview_kind: data.previewKind,
106
+ });
107
+ };
108
+ exports.trackPreviewStarted = trackPreviewStarted;
109
+ const trackPreviewReady = (telemetry, data) => {
110
+ if (telemetry.trackAgentVariantsPreviewReady) {
111
+ telemetry.trackAgentVariantsPreviewReady(data);
112
+ return;
113
+ }
114
+ telemetry.track('agent_variants.preview_ready', {
115
+ source: 'mcp',
116
+ session_id: data.sessionId,
117
+ variant_id: data.variantId,
118
+ project_context_kind: data.projectContextKind,
119
+ preview_kind: data.previewKind,
120
+ has_port: data.hasPort,
121
+ port: data.port,
122
+ duration_ms: data.durationMs,
123
+ });
124
+ };
125
+ exports.trackPreviewReady = trackPreviewReady;
126
+ const trackPreviewFailed = (telemetry, data) => {
127
+ if (telemetry.trackAgentVariantsPreviewFailed) {
128
+ telemetry.trackAgentVariantsPreviewFailed(data);
129
+ return;
130
+ }
131
+ telemetry.track('agent_variants.preview_failed', {
132
+ source: 'mcp',
133
+ session_id: data.sessionId,
134
+ variant_id: data.variantId,
135
+ project_context_kind: data.projectContextKind,
136
+ preview_kind: data.previewKind,
137
+ error_code: data.errorCode,
138
+ failure_reason: data.reason,
139
+ port_in_use: data.portInUse,
140
+ duration_ms: data.durationMs,
141
+ exit_code: data.exitCode,
142
+ term_signal: data.signal,
143
+ missing_deps: data.missingDeps,
144
+ });
145
+ };
146
+ exports.trackPreviewFailed = trackPreviewFailed;
147
+ const trackStaticPreviewCompleted = (telemetry, data) => {
148
+ if (telemetry.trackAgentVariantsStaticPreviewCompleted) {
149
+ telemetry.trackAgentVariantsStaticPreviewCompleted(data);
150
+ return;
151
+ }
152
+ telemetry.track('agent_variants.static_preview_completed', {
153
+ source: 'mcp',
154
+ session_id: data.sessionId,
155
+ variant_id: data.variantId,
156
+ duration_ms: data.durationMs,
157
+ });
158
+ };
159
+ exports.trackStaticPreviewCompleted = trackStaticPreviewCompleted;
160
+ //# sourceMappingURL=variantsTelemetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variantsTelemetry.js","sourceRoot":"","sources":["../../src/agent-variants/variantsTelemetry.ts"],"names":[],"mappings":";;;AA0Ia,QAAA,cAAc,GAAsB,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC;AAUrE,MAAM,sBAAsB,GAAG,CACpC,aAAwE,EAClC,EAAE;IACxC,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC;IAChC,OAAO,aAAa,CAAC,MAAM,CACzB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACvB,IAAI,CAAC,KAAK;YAAE,OAAO,OAAO,CAAC;QAC3B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YAC1B,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YACvD,OAAO,OAAO,CA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3
  export declare const CLAUDE_SKILL_FILENAME = "SKILL.md";
4
4
  export declare const CLAUDE_SKILL_CONTENT: string;
@@ -1 +1 @@
1
- {"version":3,"file":"claude-skill.d.ts","sourceRoot":"","sources":["../../../src/utils/skills/claude-skill.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAGvC,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,eAAO,MAAM,oBAAoB,QAUhC,CAAC"}
1
+ {"version":3,"file":"claude-skill.d.ts","sourceRoot":"","sources":["../../../src/utils/skills/claude-skill.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAGvC,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,eAAO,MAAM,oBAAoB,QAUhC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CLAUDE_SKILL_CONTENT = exports.CLAUDE_SKILL_FILENAME = exports.CLAUDE_SKILL_DIR = exports.CLAUDE_SKILL_VERSION = void 0;
4
4
  const cli_guidance_1 = require("./cli-guidance");
5
- exports.CLAUDE_SKILL_VERSION = 55;
5
+ exports.CLAUDE_SKILL_VERSION = 56;
6
6
  const CLAUDE_SKILL_VERSION_MARKER = `[//]: # (rivet-skill-version: ${exports.CLAUDE_SKILL_VERSION})`;
7
7
  exports.CLAUDE_SKILL_DIR = 'rivet';
8
8
  exports.CLAUDE_SKILL_FILENAME = 'SKILL.md';
@@ -1 +1 @@
1
- {"version":3,"file":"claude-skill.js","sourceRoot":"","sources":["../../../src/utils/skills/claude-skill.ts"],"names":[],"mappings":";;;AAAA,iDAIwB;AAGX,QAAA,oBAAoB,GAAG,EAAE,CAAC;AACvC,MAAM,2BAA2B,GAAG,iCAAiC,4BAAoB,GAAG,CAAC;AAEhF,QAAA,gBAAgB,GAAG,OAAO,CAAC;AAC3B,QAAA,qBAAqB,GAAG,UAAU,CAAC;AAEnC,QAAA,oBAAoB,GAAG;;eAErB,uCAAwB;;;EAGrC,2BAA2B;uCACU,mCAAoB;;;EAGzD,gCAAiB;CAClB,CAAC"}
1
+ {"version":3,"file":"claude-skill.js","sourceRoot":"","sources":["../../../src/utils/skills/claude-skill.ts"],"names":[],"mappings":";;;AAAA,iDAIwB;AAEX,QAAA,oBAAoB,GAAG,EAAE,CAAC;AACvC,MAAM,2BAA2B,GAAG,iCAAiC,4BAAoB,GAAG,CAAC;AAEhF,QAAA,gBAAgB,GAAG,OAAO,CAAC;AAC3B,QAAA,qBAAqB,GAAG,UAAU,CAAC;AAEnC,QAAA,oBAAoB,GAAG;;eAErB,uCAAwB;;;EAGrC,2BAA2B;uCACU,mCAAoB;;;EAGzD,gCAAiB;CAClB,CAAC"}
@@ -1,4 +1,4 @@
1
- export declare const CLI_GUIDANCE_VERSION = 40;
1
+ export declare const CLI_GUIDANCE_VERSION = 41;
2
2
  export declare const CLI_GUIDANCE_BODY: string;
3
3
  export declare const CLI_GUIDANCE_DESCRIPTION = "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.";
4
4
  //# sourceMappingURL=cli-guidance.d.ts.map
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CLI_GUIDANCE_DESCRIPTION = exports.CLI_GUIDANCE_BODY = exports.CLI_GUIDANCE_VERSION = void 0;
4
4
  const displayLocale_1 = require("../displayLocale");
5
- exports.CLI_GUIDANCE_VERSION = 40;
5
+ exports.CLI_GUIDANCE_VERSION = 41;
6
6
  const DISPLAY_LOCALE = (0, displayLocale_1.resolveDisplayLocale)();
7
7
  exports.CLI_GUIDANCE_BODY = `Rivet 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.
8
8
 
9
- **Bare \`/rivet\` invocation.** When the user invokes exactly \`/rivet\` with no additional request, immediately run \`rivet open\` for the current project without asking what they want to do. Keep the normal interactive browser behavior so the Rivet editor opens, then share the returned \`editorUrl\`.
9
+ **Bare \`/rivet\` invocation.** When the user invokes exactly \`/rivet\` with no additional request, immediately run \`rivet open\` for the current project without asking what they want to do. Follow the browser behavior below, then share the returned \`editorUrl\`.
10
10
 
11
11
  **Exit codes:** 0 ok · 1 operation failed (see \`error.code\`) · 2 usage error · 3 auth required · 4 no server for the project · 5 \`rivet wait\` timeout (work still pending or running — not a failure; the envelope's \`state\` says which).
12
12
 
@@ -16,7 +16,7 @@ exports.CLI_GUIDANCE_BODY = `Rivet helps you **explore multiple design direction
16
16
 
17
17
  **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\`.
18
18
 
19
- **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 explicitly unattended automation, headless environments, CI/e2e checks, or when the user explicitly asks not to open a browser; in those cases, report the returned \`editorUrl\`. Background workers or a background shell command do not make an interactive user request unattended. Always report the returned \`editorUrl\`; if \`browser.action\` is \`launch_failed\`, give the user that link to open manually.
19
+ **Browser behavior.** In a local desktop host with an in-app browser that can reach localhost, run \`rivet open --no-browser\` with the usual project and caller flags. Open the returned \`data.editorUrl\` in the in-app browser using the host's browser tool when available; do not construct a URL from a port. In Claude Code Desktop, if navigation requires a user action, share the link and tell the user to choose **Open in app**. If the host has no usable in-app browser, run \`rivet open\` without \`--no-browser\` so the system browser opens. Use \`--no-browser\` for unattended automation, headless environments, CI/e2e checks, or when the user asks not to open a browser, and report the URL. Background workers or a background shell command do not make an interactive request unattended. Always report the returned \`editorUrl\`; if \`browser.action\` is \`launch_failed\` or in-app navigation fails, give the user that link to open manually.
20
20
 
21
21
  **MCP tools (opt-in).** If this host has Rivet MCP tools registered (\`rivet_status\`, \`rivet_variants\`, \`rivet_design_context\`, \`rivet_login\` — 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 — \`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.
22
22
 
@@ -32,7 +32,7 @@ exports.CLI_GUIDANCE_BODY = `Rivet helps you **explore multiple design direction
32
32
 
33
33
  ## Commands
34
34
 
35
- - \`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]\` — 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\`/\`storybook\` script when possible. Omit \`--no-browser\` for interactive work so the UI opens for the user.
35
+ - \`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]\` — 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\`/\`storybook\` script when possible. Follow the browser behavior above for interactive work.
36
36
  - **Attach, don't rebuild.** If the user's dev server is already running (including Storybook — component-library teams often run only Storybook), pass \`--user-port <port>\` to attach directly: this skips detection and never starts a second server. Auto-detection scans common ports (3000, 5173, 6006, …), but an explicit \`--user-port\` is always the most reliable path — when in doubt, ask the user which port their app is on, or start the dev server yourself first and pass its port.
37
37
  - **Rivet never installs dependencies.** If \`open\` fails because the app's start command failed, the error carries the exact command and its output. YOU own the fix: diagnose the output, run the project's install yourself if dependencies are missing, or start the dev server yourself — then re-run \`rivet open --user-port <port>\`. Do not retry \`rivet open\` unchanged expecting a different result.
38
38
  - \`rivet variants start --project <path> --instruction <text> [--run-label <text>] [--briefs <json>] [--count N] [--fidelity low|medium|high] [--element <selector>] [--files <json>] [--fresh] [--profile auto|off] [--context-images <json>] [--reference-pages <json>] [--reference-videos <json>] [--target <sessionId>:<variantId>] [--worker-provider claude|codex|cursor] [--worker-model <id>]\` — explore design directions. For existing-app and \`--target\` starts, agent invocations MUST pass an AI-authored 1–3 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\` — 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.
@@ -1,3 +1,3 @@
1
1
  export declare const CODEX_SKILL_MARKER = "[//]: # (managed-by: rivet install codex)";
2
- export declare const CODEX_SKILL_CONTENT = "---\nname: rivet\ndescription: Open the Rivet visual editor for the current project when the user asks to open Rivet or invokes $rivet.\n---\n\n[//]: # (managed-by: rivet install codex)\n\n# Open Rivet\n\nOpen the current project immediately when the user invokes `$rivet` without another request. Use the current project directory unless the user specifies a different one.\n\nRun the installed CLI as a standalone shell command:\n\n```sh\nrivet open --project \"<absolute project path>\" --caller-agent codex --caller-model \"<your actual model>\"\n```\n\nReplace the placeholders with the actual path and model. Include `--caller-session` when the current session ID is available. If another host invokes this skill, use its actual caller agent instead of codex.\n\nKeep the normal browser launch for interactive use. Use `--no-browser` only when the user requests it or for unattended verification. If the conversation identifies an already-running app server, attach with `--user-port <port>`.\n\nRead the returned JSON envelope. On success, share `data.editorUrl`; if the browser launch failed, tell the user to open that link manually. On failure, explain the reported error and address its cause before retrying. If sign-in is required, use Rivet's available login tool or ask the user to run `rivet login` in their own terminal.\n\nOpening Rivet alone does not request variant generation. If the user also asks for design work, open Rivet first and then follow their request using the installed Rivet CLI guidance.\n";
2
+ export declare const CODEX_SKILL_CONTENT = "---\nname: rivet\ndescription: Open the Rivet visual editor for the current project when the user asks to open Rivet or invokes $rivet.\n---\n\n[//]: # (managed-by: rivet install codex)\n\n# Open Rivet\n\nOpen the current project immediately when the user invokes `$rivet` without another request. Use the current project directory unless the user specifies a different one.\n\nRun the installed CLI as a standalone shell command:\n\n```sh\nrivet open --project \"<absolute project path>\" --caller-agent codex --caller-model \"<your actual model>\"\n```\n\nReplace the placeholders with the actual path and model. Include `--caller-session` when the current session ID is available. If another host invokes this skill, use its actual caller agent instead of codex.\n\nIn the local ChatGPT desktop app, when Codex has an in-app browser that can reach localhost, add `--no-browser` to the command above (`rivet open --no-browser` with the same project and caller flags). Open the returned `data.editorUrl` in the in-app browser using the available browser tool. Use the actual returned URL, including its fragment; do not construct one from a port. If no usable in-app browser is available, run `rivet open` without `--no-browser` so the system browser opens. If the conversation identifies an already-running app server, attach with `--user-port <port>`.\n\nRead the returned JSON envelope. On success, share `data.editorUrl`; if browser navigation or launch failed, tell the user to open that link manually. On failure, explain the reported error and address its cause before retrying. If sign-in is required, use Rivet's available login tool or ask the user to run `rivet login` in their own terminal.\n\nOpening Rivet alone does not request variant generation. If the user also asks for design work, open Rivet first and then follow their request using the installed Rivet CLI guidance.\n";
3
3
  //# sourceMappingURL=codex-skill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codex-skill.d.ts","sourceRoot":"","sources":["../../../src/utils/skills/codex-skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,8CAA8C,CAAC;AAE9E,eAAO,MAAM,mBAAmB,0/CAwB/B,CAAC"}
1
+ {"version":3,"file":"codex-skill.d.ts","sourceRoot":"","sources":["../../../src/utils/skills/codex-skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,8CAA8C,CAAC;AAE9E,eAAO,MAAM,mBAAmB,w2DAwB/B,CAAC"}
@@ -21,9 +21,9 @@ rivet open --project "<absolute project path>" --caller-agent codex --caller-mod
21
21
 
22
22
  Replace the placeholders with the actual path and model. Include \`--caller-session\` when the current session ID is available. If another host invokes this skill, use its actual caller agent instead of codex.
23
23
 
24
- Keep the normal browser launch for interactive use. Use \`--no-browser\` only when the user requests it or for unattended verification. If the conversation identifies an already-running app server, attach with \`--user-port <port>\`.
24
+ In the local ChatGPT desktop app, when Codex has an in-app browser that can reach localhost, add \`--no-browser\` to the command above (\`rivet open --no-browser\` with the same project and caller flags). Open the returned \`data.editorUrl\` in the in-app browser using the available browser tool. Use the actual returned URL, including its fragment; do not construct one from a port. If no usable in-app browser is available, run \`rivet open\` without \`--no-browser\` so the system browser opens. If the conversation identifies an already-running app server, attach with \`--user-port <port>\`.
25
25
 
26
- Read the returned JSON envelope. On success, share \`data.editorUrl\`; if the browser launch failed, tell the user to open that link manually. On failure, explain the reported error and address its cause before retrying. If sign-in is required, use Rivet's available login tool or ask the user to run \`rivet login\` in their own terminal.
26
+ Read the returned JSON envelope. On success, share \`data.editorUrl\`; if browser navigation or launch failed, tell the user to open that link manually. On failure, explain the reported error and address its cause before retrying. If sign-in is required, use Rivet's available login tool or ask the user to run \`rivet login\` in their own terminal.
27
27
 
28
28
  Opening Rivet alone does not request variant generation. If the user also asks for design work, open Rivet first and then follow their request using the installed Rivet CLI guidance.
29
29
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rivet-design",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Local visual web development tool with AI-powered code modification",
5
5
  "main": "dist/index.js",
6
6
  "workspaces": [
@@ -1,35 +1,35 @@
1
- var $e=s=>{throw TypeError(s)};var ke=(s,t,r)=>t.has(s)||$e("Cannot "+r);var d=(s,t,r)=>(ke(s,t,"read from private field"),r?r.call(s):t.get(s)),T=(s,t,r)=>t.has(s)?$e("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,r),P=(s,t,r,i)=>(ke(s,t,"write to private field"),i?i.call(s,r):t.set(s,r),r),L=(s,t,r)=>(ke(s,t,"access private method"),r);import{S as Je,s as Xe,h as qe,g as St,n as de,r as Rt,Q as Ze,u as ge,a as It,b as Et,c as h,e as Pt,d as Ot,f as Mt,i as et,j as Fe,k as At,l as Lt,m as Tt,o as re,p as oe,q as Dt,t as e,B as U,v as Ne,R as zt,T as $t,P as qt,C as Ft,w as Kt,X as tt,D as st,x as rt,y as it,z as nt,A as at,E as ot,F as lt,G as Ht,H as Ut,I as Qt,J as Bt,K as ie,L as ve,M as Vt,N as ct,O as dt,U as Wt,V as Gt,W as Yt,Y as Jt,Z as Xt,_ as Zt,$ as F,a0 as es,a1 as Ke,a2 as ts,a3 as ss,a4 as rs,a5 as is,a6 as ns}from"./main-CAPEQf84.js";var G,X,z,Y,W,le,_e,Ge,as=(Ge=class extends Je{constructor(t,r){super();T(this,W);T(this,G);T(this,X);T(this,z);T(this,Y);P(this,G,t),this.setOptions(r),this.bindMethods(),L(this,W,le).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const r=this.options;this.options=d(this,G).defaultMutationOptions(t),Xe(this.options,r)||d(this,G).getMutationCache().notify({type:"observerOptionsUpdated",mutation:d(this,z),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&qe(r.mutationKey)!==qe(this.options.mutationKey)?this.reset():((i=d(this,z))==null?void 0:i.state.status)==="pending"&&d(this,z).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&d(this,z)&&(d(this,z).addObserver(this),L(this,W,le).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=d(this,z))==null||t.removeObserver(this)}onMutationUpdate(t){L(this,W,le).call(this),L(this,W,_e).call(this,t)}getCurrentResult(){return d(this,X)}reset(){var t;(t=d(this,z))==null||t.removeObserver(this),P(this,z,void 0),L(this,W,le).call(this),L(this,W,_e).call(this)}mutate(t,r){var i;return P(this,Y,r),(i=d(this,z))==null||i.removeObserver(this),P(this,z,d(this,G).getMutationCache().build(d(this,G),this.options)),d(this,z).addObserver(this),d(this,z).execute(t)}},G=new WeakMap,X=new WeakMap,z=new WeakMap,Y=new WeakMap,W=new WeakSet,le=function(){var r;const t=((r=d(this,z))==null?void 0:r.state)??St();P(this,X,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},_e=function(t){de.batch(()=>{var r,i,a,o,n,c,p,w;if(d(this,Y)&&this.hasListeners()){const x=d(this,X).variables,u=d(this,X).context,f={client:d(this,G),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(i=(r=d(this,Y)).onSuccess)==null||i.call(r,t.data,x,u,f)}catch(b){Promise.reject(b)}try{(o=(a=d(this,Y)).onSettled)==null||o.call(a,t.data,null,x,u,f)}catch(b){Promise.reject(b)}}else if((t==null?void 0:t.type)==="error"){try{(c=(n=d(this,Y)).onError)==null||c.call(n,t.error,x,u,f)}catch(b){Promise.reject(b)}try{(w=(p=d(this,Y)).onSettled)==null||w.call(p,void 0,t.error,x,u,f)}catch(b){Promise.reject(b)}}}this.listeners.forEach(x=>{x(d(this,X))})})},Ge);function He(s,t){const r=new Set(t);return s.filter(i=>!r.has(i))}var ne,q,ae,te,H,se,ue,he,me,pe,M,Ce,Se,ut,Re,Ie,Ee,Ye,os=(Ye=class extends Je{constructor(t,r,i){super();T(this,M);T(this,ne);T(this,q);T(this,ae);T(this,te);T(this,H);T(this,se);T(this,ue);T(this,he);T(this,me);T(this,pe,[]);P(this,ne,t),P(this,te,i),P(this,ae,[]),P(this,H,[]),P(this,q,[]),this.setQueries(r)}onSubscribe(){this.listeners.size===1&&d(this,H).forEach(t=>{t.subscribe(r=>{L(this,M,Ie).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,d(this,H).forEach(t=>{t.destroy()})}setQueries(t,r){P(this,ae,t),P(this,te,r),de.batch(()=>{const i=d(this,H),a=L(this,M,Re).call(this,d(this,ae));a.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions));const o=a.map(u=>u.observer),n=o.map(u=>u.getCurrentResult()),c=i.length!==o.length,p=o.some((u,f)=>u!==i[f]),w=c||p,x=w?!0:n.some((u,f)=>{const b=d(this,q)[f];return!b||!Xe(u,b)});!w&&!x||(w&&(P(this,pe,a),P(this,H,o)),P(this,q,n),this.hasListeners()&&(w&&(He(i,o).forEach(u=>{u.destroy()}),He(o,i).forEach(u=>{u.subscribe(f=>{L(this,M,Ie).call(this,u,f)})})),L(this,M,Ee).call(this)))})}getCurrentResult(){return d(this,q)}getQueries(){return d(this,H).map(t=>t.getCurrentQuery())}getObservers(){return d(this,H)}getOptimisticResult(t,r){const i=L(this,M,Re).call(this,t),a=i.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),o=i.map(n=>n.defaultedQueryOptions.queryHash);return[a,n=>L(this,M,Se).call(this,n??a,r,o),()=>L(this,M,Ce).call(this,a,i)]}},ne=new WeakMap,q=new WeakMap,ae=new WeakMap,te=new WeakMap,H=new WeakMap,se=new WeakMap,ue=new WeakMap,he=new WeakMap,me=new WeakMap,pe=new WeakMap,M=new WeakSet,Ce=function(t,r){const i=new Set;return r.map((a,o)=>{const n=t[o];return a.defaultedQueryOptions.notifyOnChangeProps?n:a.observer.trackResult(n,c=>{i.has(c)||(i.add(c),r.forEach(p=>{p.observer.trackProp(c)}))})})},Se=function(t,r,i){if(r){const a=d(this,me),o=i!==void 0&&a!==void 0&&(a.length!==i.length||i.some((n,c)=>n!==a[c]));return(d(this,q)!==d(this,he)||o||r!==d(this,ue))&&(P(this,ue,r),P(this,he,d(this,q)),i!==void 0&&P(this,me,i),P(this,se,Rt(d(this,se),r(t)))),d(this,se)}return t},ut=function(){var t;return!((t=d(this,te))!=null&&t.combine)||d(this,H).some((r,i)=>{var a;return r.options.suspense&&((a=d(this,q)[i])==null?void 0:a.data)===void 0})},Re=function(t){const r=new Map;d(this,H).forEach(a=>{const o=a.options.queryHash;if(!o)return;const n=r.get(o);n?n.push(a):r.set(o,[a])});const i=[];return t.forEach(a=>{var c;const o=d(this,ne).defaultQueryOptions(a),n=((c=r.get(o.queryHash))==null?void 0:c.shift())??new Ze(d(this,ne),o);i.push({defaultedQueryOptions:o,observer:n})}),i},Ie=function(t,r){const i=d(this,H).indexOf(t);i!==-1&&(P(this,q,d(this,q).slice()),d(this,q)[i]=r,L(this,M,Ee).call(this))},Ee=function(){var t;if(this.hasListeners()){const r=L(this,M,ut).call(this),i=d(this,se),a=r?i:L(this,M,Se).call(this,L(this,M,Ce).call(this,d(this,q),d(this,pe)),(t=d(this,te))==null?void 0:t.combine);(r||i!==a)&&de.batch(()=>{this.listeners.forEach(o=>{o(d(this,q))})})}},Ye);function ls({queries:s,...t},r){const i=ge(),a=It(),o=Et(),n=t.subscribed!==!1,c=h.useMemo(()=>s.map(_=>{const j=i.defaultQueryOptions(_);return j._optimisticResults=a?"isRestoring":n?"optimistic":void 0,j}),[s,i,a,n]);c.forEach(_=>{Pt(_);const j=i.getQueryCache().get(_.queryHash);Ot(_,o,j)}),Mt(o);const[p]=h.useState(()=>new os(i,c,t)),[w,x,u]=p.getOptimisticResult(c,t.combine),f=!a&&n;h.useSyncExternalStore(h.useCallback(_=>f?p.subscribe(de.batchCalls(_)):et,[p,f]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),h.useEffect(()=>{p.setQueries(c,t)},[c,t,p]);const b=w.some((_,j)=>Fe(c[j],_))?w.flatMap((_,j)=>{const k=c[j];if(k&&Fe(k,_)){const K=new Ze(i,k);return At(k,K,o)}return[]}):[];if(b.length>0)throw Promise.all(b);const N=w.find((_,j)=>{const k=c[j];return k&&Lt({result:_,errorResetBoundary:o,throwOnError:k.throwOnError,query:i.getQueryCache().get(k.queryHash),suspense:k.suspense})});if(N)throw N.error;return x(u())}function ce(s,t){const r=ge(),[i]=h.useState(()=>new as(r,s));h.useEffect(()=>{i.setOptions(s)},[i,s]);const a=h.useSyncExternalStore(h.useCallback(n=>i.subscribe(de.batchCalls(n)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=h.useCallback((...n)=>{i.mutate(n[0],n[1]).catch(et)},[i]);if(a.error&&Tt(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}/**
2
- * @license lucide-react v1.48.0 - ISC
1
+ var $e=s=>{throw TypeError(s)};var ke=(s,t,r)=>t.has(s)||$e("Cannot "+r);var d=(s,t,r)=>(ke(s,t,"read from private field"),r?r.call(s):t.get(s)),T=(s,t,r)=>t.has(s)?$e("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,r),P=(s,t,r,i)=>(ke(s,t,"write to private field"),i?i.call(s,r):t.set(s,r),r),L=(s,t,r)=>(ke(s,t,"access private method"),r);import{S as Je,s as Xe,h as qe,g as St,n as de,r as Rt,Q as Ze,u as ge,a as It,b as Et,c as h,e as Pt,d as Ot,f as Mt,i as et,j as Fe,k as At,l as Lt,m as Tt,o as re,p as oe,q as Dt,t as e,B as U,v as Ne,R as zt,T as $t,P as qt,C as Ft,w as Kt,X as tt,D as st,x as rt,y as it,z as nt,A as at,E as ot,F as lt,G as Ht,H as Ut,I as Qt,J as Bt,K as ie,L as ve,M as Vt,N as ct,O as dt,U as Wt,V as Gt,W as Yt,Y as Jt,Z as Xt,_ as Zt,$ as F,a0 as es,a1 as Ke,a2 as ts,a3 as ss,a4 as rs,a5 as is,a6 as ns}from"./main-5v9Ic8BN.js";var G,X,z,Y,W,le,_e,Ge,as=(Ge=class extends Je{constructor(t,r){super();T(this,W);T(this,G);T(this,X);T(this,z);T(this,Y);P(this,G,t),this.setOptions(r),this.bindMethods(),L(this,W,le).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const r=this.options;this.options=d(this,G).defaultMutationOptions(t),Xe(this.options,r)||d(this,G).getMutationCache().notify({type:"observerOptionsUpdated",mutation:d(this,z),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&qe(r.mutationKey)!==qe(this.options.mutationKey)?this.reset():((i=d(this,z))==null?void 0:i.state.status)==="pending"&&d(this,z).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&d(this,z)&&(d(this,z).addObserver(this),L(this,W,le).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=d(this,z))==null||t.removeObserver(this)}onMutationUpdate(t){L(this,W,le).call(this),L(this,W,_e).call(this,t)}getCurrentResult(){return d(this,X)}reset(){var t;(t=d(this,z))==null||t.removeObserver(this),P(this,z,void 0),L(this,W,le).call(this),L(this,W,_e).call(this)}mutate(t,r){var i;return P(this,Y,r),(i=d(this,z))==null||i.removeObserver(this),P(this,z,d(this,G).getMutationCache().build(d(this,G),this.options)),d(this,z).addObserver(this),d(this,z).execute(t)}},G=new WeakMap,X=new WeakMap,z=new WeakMap,Y=new WeakMap,W=new WeakSet,le=function(){var r;const t=((r=d(this,z))==null?void 0:r.state)??St();P(this,X,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},_e=function(t){de.batch(()=>{var r,i,a,o,n,c,p,w;if(d(this,Y)&&this.hasListeners()){const x=d(this,X).variables,u=d(this,X).context,f={client:d(this,G),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(i=(r=d(this,Y)).onSuccess)==null||i.call(r,t.data,x,u,f)}catch(b){Promise.reject(b)}try{(o=(a=d(this,Y)).onSettled)==null||o.call(a,t.data,null,x,u,f)}catch(b){Promise.reject(b)}}else if((t==null?void 0:t.type)==="error"){try{(c=(n=d(this,Y)).onError)==null||c.call(n,t.error,x,u,f)}catch(b){Promise.reject(b)}try{(w=(p=d(this,Y)).onSettled)==null||w.call(p,void 0,t.error,x,u,f)}catch(b){Promise.reject(b)}}}this.listeners.forEach(x=>{x(d(this,X))})})},Ge);function He(s,t){const r=new Set(t);return s.filter(i=>!r.has(i))}var ne,q,ae,te,H,se,ue,he,me,pe,M,Ce,Se,ut,Re,Ie,Ee,Ye,os=(Ye=class extends Je{constructor(t,r,i){super();T(this,M);T(this,ne);T(this,q);T(this,ae);T(this,te);T(this,H);T(this,se);T(this,ue);T(this,he);T(this,me);T(this,pe,[]);P(this,ne,t),P(this,te,i),P(this,ae,[]),P(this,H,[]),P(this,q,[]),this.setQueries(r)}onSubscribe(){this.listeners.size===1&&d(this,H).forEach(t=>{t.subscribe(r=>{L(this,M,Ie).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,d(this,H).forEach(t=>{t.destroy()})}setQueries(t,r){P(this,ae,t),P(this,te,r),de.batch(()=>{const i=d(this,H),a=L(this,M,Re).call(this,d(this,ae));a.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions));const o=a.map(u=>u.observer),n=o.map(u=>u.getCurrentResult()),c=i.length!==o.length,p=o.some((u,f)=>u!==i[f]),w=c||p,x=w?!0:n.some((u,f)=>{const b=d(this,q)[f];return!b||!Xe(u,b)});!w&&!x||(w&&(P(this,pe,a),P(this,H,o)),P(this,q,n),this.hasListeners()&&(w&&(He(i,o).forEach(u=>{u.destroy()}),He(o,i).forEach(u=>{u.subscribe(f=>{L(this,M,Ie).call(this,u,f)})})),L(this,M,Ee).call(this)))})}getCurrentResult(){return d(this,q)}getQueries(){return d(this,H).map(t=>t.getCurrentQuery())}getObservers(){return d(this,H)}getOptimisticResult(t,r){const i=L(this,M,Re).call(this,t),a=i.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),o=i.map(n=>n.defaultedQueryOptions.queryHash);return[a,n=>L(this,M,Se).call(this,n??a,r,o),()=>L(this,M,Ce).call(this,a,i)]}},ne=new WeakMap,q=new WeakMap,ae=new WeakMap,te=new WeakMap,H=new WeakMap,se=new WeakMap,ue=new WeakMap,he=new WeakMap,me=new WeakMap,pe=new WeakMap,M=new WeakSet,Ce=function(t,r){const i=new Set;return r.map((a,o)=>{const n=t[o];return a.defaultedQueryOptions.notifyOnChangeProps?n:a.observer.trackResult(n,c=>{i.has(c)||(i.add(c),r.forEach(p=>{p.observer.trackProp(c)}))})})},Se=function(t,r,i){if(r){const a=d(this,me),o=i!==void 0&&a!==void 0&&(a.length!==i.length||i.some((n,c)=>n!==a[c]));return(d(this,q)!==d(this,he)||o||r!==d(this,ue))&&(P(this,ue,r),P(this,he,d(this,q)),i!==void 0&&P(this,me,i),P(this,se,Rt(d(this,se),r(t)))),d(this,se)}return t},ut=function(){var t;return!((t=d(this,te))!=null&&t.combine)||d(this,H).some((r,i)=>{var a;return r.options.suspense&&((a=d(this,q)[i])==null?void 0:a.data)===void 0})},Re=function(t){const r=new Map;d(this,H).forEach(a=>{const o=a.options.queryHash;if(!o)return;const n=r.get(o);n?n.push(a):r.set(o,[a])});const i=[];return t.forEach(a=>{var c;const o=d(this,ne).defaultQueryOptions(a),n=((c=r.get(o.queryHash))==null?void 0:c.shift())??new Ze(d(this,ne),o);i.push({defaultedQueryOptions:o,observer:n})}),i},Ie=function(t,r){const i=d(this,H).indexOf(t);i!==-1&&(P(this,q,d(this,q).slice()),d(this,q)[i]=r,L(this,M,Ee).call(this))},Ee=function(){var t;if(this.hasListeners()){const r=L(this,M,ut).call(this),i=d(this,se),a=r?i:L(this,M,Se).call(this,L(this,M,Ce).call(this,d(this,q),d(this,pe)),(t=d(this,te))==null?void 0:t.combine);(r||i!==a)&&de.batch(()=>{this.listeners.forEach(o=>{o(d(this,q))})})}},Ye);function ls({queries:s,...t},r){const i=ge(),a=It(),o=Et(),n=t.subscribed!==!1,c=h.useMemo(()=>s.map(_=>{const j=i.defaultQueryOptions(_);return j._optimisticResults=a?"isRestoring":n?"optimistic":void 0,j}),[s,i,a,n]);c.forEach(_=>{Pt(_);const j=i.getQueryCache().get(_.queryHash);Ot(_,o,j)}),Mt(o);const[p]=h.useState(()=>new os(i,c,t)),[w,x,u]=p.getOptimisticResult(c,t.combine),f=!a&&n;h.useSyncExternalStore(h.useCallback(_=>f?p.subscribe(de.batchCalls(_)):et,[p,f]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),h.useEffect(()=>{p.setQueries(c,t)},[c,t,p]);const b=w.some((_,j)=>Fe(c[j],_))?w.flatMap((_,j)=>{const k=c[j];if(k&&Fe(k,_)){const K=new Ze(i,k);return At(k,K,o)}return[]}):[];if(b.length>0)throw Promise.all(b);const N=w.find((_,j)=>{const k=c[j];return k&&Lt({result:_,errorResetBoundary:o,throwOnError:k.throwOnError,query:i.getQueryCache().get(k.queryHash),suspense:k.suspense})});if(N)throw N.error;return x(u())}function ce(s,t){const r=ge(),[i]=h.useState(()=>new as(r,s));h.useEffect(()=>{i.setOptions(s)},[i,s]);const a=h.useSyncExternalStore(h.useCallback(n=>i.subscribe(de.batchCalls(n)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=h.useCallback((...n)=>{i.mutate(n[0],n[1]).catch(et)},[i]);if(a.error&&Tt(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}/**
2
+ * @license lucide-react v1.49.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
6
  */const ht={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};ht.node;const mt=re(ht);/**
7
- * @license lucide-react v1.48.0 - ISC
7
+ * @license lucide-react v1.49.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
11
  */const pt={name:"clipboard-copy",size:24,node:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]};pt.node;const cs=re(pt);/**
12
- * @license lucide-react v1.48.0 - ISC
12
+ * @license lucide-react v1.49.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
16
  */const xt={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};xt.node;const ds=re(xt);/**
17
- * @license lucide-react v1.48.0 - ISC
17
+ * @license lucide-react v1.49.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
21
  */const ft={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};ft.node;const Ue=re(ft);/**
22
- * @license lucide-react v1.48.0 - ISC
22
+ * @license lucide-react v1.49.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
26
  */const bt={name:"image-off",size:24,node:[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]};bt.node;const us=re(bt);/**
27
- * @license lucide-react v1.48.0 - ISC
27
+ * @license lucide-react v1.49.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
31
  */const yt={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};yt.node;const hs=re(yt);/**
32
- * @license lucide-react v1.48.0 - ISC
32
+ * @license lucide-react v1.49.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.