@burdenoff/microfe-vibecontrols 2026.813.1 → 2026.815.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.
@@ -2,9 +2,10 @@ import { gatherPageContext as e } from "../utils/pageContext.js";
2
2
  import { dispatchAssistantQuotaExhausted as t, notifyAiCreditsUpdated as n } from "../utils/aiCredits.js";
3
3
  import { useSandboxAssistantTransport as r } from "@burdenoff/fe-libs/shared/assistant";
4
4
  //#region src/services/createSandboxAssistantTransport.ts
5
- function i() {
5
+ function i(i = "assistant") {
6
6
  return r({
7
7
  product: "vibecontrols",
8
+ mode: i,
8
9
  gatherPageContext: e,
9
10
  enableCredits: !0,
10
11
  onQuotaExhausted: () => t("ai-credits"),
@@ -1 +1 @@
1
- {"version":3,"file":"createSandboxAssistantTransport.js","names":[],"sources":["../../src/services/createSandboxAssistantTransport.ts"],"sourcesContent":["/**\n * VibeControls adapter for the shared fe-libs AssistantWidget transport.\n *\n * The entire sandbox lifecycle + poll/stream loop now lives in\n * `@burdenoff/fe-libs/shared/assistant` (one implementation for all products).\n * This file is a thin wrapper that passes the product id, VibeControls'\n * `gatherPageContext`, and its credit-UX callbacks.\n *\n * NOTE: the exported name/shape are unchanged so app-shell imports don't move.\n * The public return type is a LOCALLY-declared structural mirror — we never\n * re-export fe-libs types here (microfe tsconfig maps `@burdenoff/fe-libs/*` to\n * source, and vite-plugin-dts would rewrite a cross-package type in this hook's\n * emitted `.d.ts` to a broken source-relative path).\n */\n\nimport { useSandboxAssistantTransport as useSharedTransport } from '@burdenoff/fe-libs/shared/assistant';\nimport { gatherPageContext } from '@/utils/pageContext';\nimport { dispatchAssistantQuotaExhausted, notifyAiCreditsUpdated } from '@/utils/aiCredits';\n\ninterface AssistantSendArgs {\n prompt: string;\n onProgress: (partialText: string) => void;\n signal: AbortSignal;\n}\n\nexport interface AssistantTransport {\n sendPrompt: (args: AssistantSendArgs) => Promise<{ text: string }>;\n prewarm?: (level?: 'probe' | 'full') => void;\n suspend?: () => void;\n}\n\nexport function useSandboxAssistantTransport(): AssistantTransport {\n return useSharedTransport({\n product: 'vibecontrols',\n gatherPageContext,\n enableCredits: true,\n onQuotaExhausted: () => dispatchAssistantQuotaExhausted('ai-credits'),\n onCreditsUpdated: () => notifyAiCreditsUpdated(),\n });\n}\n"],"mappings":";;;;AA+BA,SAAgB,IAAmD;AACjE,QAAO,EAAmB;EACxB,SAAS;EACT;EACA,eAAe;EACf,wBAAwB,EAAgC,aAAa;EACrE,wBAAwB,GAAwB;EACjD,CAAC"}
1
+ {"version":3,"file":"createSandboxAssistantTransport.js","names":[],"sources":["../../src/services/createSandboxAssistantTransport.ts"],"sourcesContent":["/**\n * VibeControls adapter for the shared fe-libs AssistantWidget transport.\n *\n * The entire sandbox lifecycle + poll/stream loop now lives in\n * `@burdenoff/fe-libs/shared/assistant` (one implementation for all products).\n * This file is a thin wrapper that passes the product id, VibeControls'\n * `gatherPageContext`, and its credit-UX callbacks.\n *\n * NOTE: the exported name/shape are unchanged so app-shell imports don't move.\n * The public return type is a LOCALLY-declared structural mirror — we never\n * re-export fe-libs types here (microfe tsconfig maps `@burdenoff/fe-libs/*` to\n * source, and vite-plugin-dts would rewrite a cross-package type in this hook's\n * emitted `.d.ts` to a broken source-relative path).\n */\n\nimport { useSandboxAssistantTransport as useSharedTransport } from '@burdenoff/fe-libs/shared/assistant';\nimport { gatherPageContext } from '@/utils/pageContext';\nimport { dispatchAssistantQuotaExhausted, notifyAiCreditsUpdated } from '@/utils/aiCredits';\n\ninterface AssistantSendArgs {\n prompt: string;\n onProgress: (partialText: string) => void;\n signal: AbortSignal;\n}\n\nexport interface AssistantTransport {\n sendPrompt: (args: AssistantSendArgs) => Promise<{ text: string }>;\n prewarm?: (level?: 'probe' | 'full') => void;\n suspend?: () => void;\n}\n\n/**\n * Modes this wrapper accepts. Deliberately narrower than fe-libs'\n * `AssistantMode`: VibeControls ships one assistant, and the only choice worth\n * exposing is how much authority it has.\n *\n * - `assistant` read-only. Runs on the caller's own forwarded token.\n * - `api-calls` can act on the user's behalf. fe-libs pairs this with\n * AI_ASSISTANT_CONFIRM_WRITES, so every mutation is refused once\n * and only sent after the user approves it.\n *\n * Declared as a literal union rather than imported, for the same reason the\n * return type is a local mirror (see the file header): cross-package types get\n * rewritten to broken paths in the emitted .d.ts.\n */\nexport type VibeControlsAssistantMode = 'assistant' | 'api-calls';\n\nexport function useSandboxAssistantTransport(\n mode: VibeControlsAssistantMode = 'assistant'\n): AssistantTransport {\n return useSharedTransport({\n product: 'vibecontrols',\n mode,\n gatherPageContext,\n enableCredits: true,\n onQuotaExhausted: () => dispatchAssistantQuotaExhausted('ai-credits'),\n onCreditsUpdated: () => notifyAiCreditsUpdated(),\n });\n}\n"],"mappings":";;;;AA+CA,SAAgB,EACd,IAAkC,aACd;AACpB,QAAO,EAAmB;EACxB,SAAS;EACT;EACA;EACA,eAAe;EACf,wBAAwB,EAAgC,aAAa;EACrE,wBAAwB,GAAwB;EACjD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-vibecontrols",
3
- "version": "2026.813.1",
3
+ "version": "2026.815.1",
4
4
  "description": "VibeControls microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [