@burdenoff/microfe-healthybowl 2026.630.1 → 2026.630.3

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.
@@ -18,10 +18,10 @@ var c = ({ onSend: c, disabled: l = !1, placeholder: u = "Ask anything...", tool
18
18
  return /* @__PURE__ */ s("div", {
19
19
  className: "px-4 pb-4 pt-2",
20
20
  children: [/* @__PURE__ */ o("style", { children: "@keyframes hb-shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}" }), /* @__PURE__ */ s("div", {
21
- className: "relative overflow-hidden rounded-2xl border border-border-default bg-bg-sunken px-1.5 pb-2 pt-1.5 shadow-sm transition-all focus-within:border-action-primary-bg focus-within:shadow-md focus-within:ring-2 focus-within:ring-action-primary-bg/15",
21
+ className: "relative rounded-2xl border border-border-default bg-bg-sunken px-1.5 pb-2 pt-1.5 shadow-sm transition-all focus-within:border-action-primary-bg focus-within:shadow-md focus-within:ring-2 focus-within:ring-action-primary-bg/15",
22
22
  children: [
23
23
  y && /* @__PURE__ */ o("div", {
24
- className: "pointer-events-none absolute inset-0 z-0",
24
+ className: "pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-2xl",
25
25
  "aria-hidden": "true",
26
26
  "data-testid": "composer-shimmer",
27
27
  children: /* @__PURE__ */ o("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantChatInput.js","names":[],"sources":["../../../src/components/assistant/AssistantChatInput.tsx"],"sourcesContent":["import { useRef, useState, useCallback, type FC, type KeyboardEvent, type ReactNode } from 'react';\nimport { ArrowUp, Loader2 } from 'lucide-react';\nimport { useTr } from '../../shared/hooks/useTr';\n\ninterface Props {\n onSend: (message: string) => void;\n disabled?: boolean;\n placeholder?: string;\n /** Rendered inline on the left of the composer toolbar (e.g. the mode chip). */\n toolbarStart?: ReactNode;\n}\n\n/**\n * Composer — a large rounded \"card\" (Google-Stitch / Gemini style): a roomy\n * input area on top with a controls toolbar pinned at the bottom (the mode chip\n * on the left, a circular send up-arrow on the right). The whole card lifts its\n * border on focus. Uses HB semantic tokens only.\n */\nexport const AssistantChatInput: FC<Props> = ({\n onSend,\n disabled = false,\n placeholder = 'Ask anything...',\n toolbarStart,\n}) => {\n const tr = useTr();\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n // Track whether there's text so the send button can switch between its\n // inactive (empty) and active (ready) states, like Gemini's composer.\n const [hasText, setHasText] = useState(false);\n\n const handleSend = useCallback(() => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n\n const value = textarea.value.trim();\n if (!value || disabled) return;\n\n onSend(value);\n textarea.value = '';\n textarea.style.height = 'auto';\n setHasText(false);\n }, [onSend, disabled]);\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSend();\n }\n },\n [handleSend]\n );\n\n const handleInput = useCallback(() => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n textarea.style.height = 'auto';\n textarea.style.height = `${Math.min(textarea.scrollHeight, 200)}px`;\n setHasText(textarea.value.trim().length > 0);\n }, []);\n\n // `disabled` from the parent means the assistant is busy processing a turn.\n const isProcessing = disabled;\n const canSend = hasText && !isProcessing;\n\n return (\n <div className=\"px-4 pb-4 pt-2\">\n <style>{'@keyframes hb-shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}'}</style>\n {/* Large two-row composer card: a roomy input area on top, the controls\n toolbar pinned at the bottom (mode chip left, circular send right).\n While processing, a soft shimmer glides across the card. */}\n <div className=\"relative overflow-hidden rounded-2xl border border-border-default bg-bg-sunken px-1.5 pb-2 pt-1.5 shadow-sm transition-all focus-within:border-action-primary-bg focus-within:shadow-md focus-within:ring-2 focus-within:ring-action-primary-bg/15\">\n {isProcessing && (\n <div className=\"pointer-events-none absolute inset-0 z-0\" aria-hidden=\"true\" data-testid=\"composer-shimmer\">\n <div\n className=\"h-full w-full bg-gradient-to-r from-transparent via-action-primary-bg/12 to-transparent\"\n style={{ animation: 'hb-shimmer 1.6s linear infinite' }}\n />\n </div>\n )}\n <textarea\n ref={textareaRef}\n onKeyDown={handleKeyDown}\n onInput={handleInput}\n disabled={isProcessing}\n placeholder={placeholder}\n rows={3}\n className=\"relative z-[1] min-h-[84px] w-full resize-none bg-transparent px-3 pb-2 pt-2.5 text-[15px] leading-relaxed text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50\"\n aria-label={tr('healthybowl.assistant.chatInput.ariaLabel', 'Message input')}\n data-testid=\"assistant-input\"\n />\n <div className=\"relative z-[1] flex items-center justify-between gap-2 px-1.5 pb-0.5 pt-1\">\n <div className=\"flex min-w-0 items-center gap-1.5\">{toolbarStart}</div>\n <button\n type=\"button\"\n onClick={handleSend}\n disabled={!canSend}\n className={`flex size-9 flex-shrink-0 items-center justify-center rounded-full shadow-sm transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${\n canSend\n ? 'bg-action-primary-bg text-action-primary-text hover:scale-105 hover:bg-action-primary-bg-hover'\n : 'bg-bg-elevated text-text-muted'\n }`}\n aria-label={tr('healthybowl.assistant.chatInput.send', 'Send message')}\n data-testid=\"assistant-send\"\n >\n {isProcessing ? <Loader2 className=\"size-4 animate-spin\" /> : <ArrowUp className=\"size-4\" />}\n </button>\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AAkBA,IAAa,KAAiC,EAC5C,WACA,cAAW,IACX,iBAAc,mBACd,sBACI;CACJ,IAAM,IAAK,GAAO,EACZ,IAAc,EAA4B,KAAK,EAG/C,CAAC,GAAS,KAAc,EAAS,GAAM,EAEvC,IAAa,QAAkB;EACnC,IAAM,IAAW,EAAY;AAC7B,MAAI,CAAC,EAAU;EAEf,IAAM,IAAQ,EAAS,MAAM,MAAM;AAC/B,GAAC,KAAS,MAEd,EAAO,EAAM,EACb,EAAS,QAAQ,IACjB,EAAS,MAAM,SAAS,QACxB,EAAW,GAAM;IAChB,CAAC,GAAQ,EAAS,CAAC,EAEhB,IAAgB,GACnB,MAA0C;AACzC,EAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,aAC1B,EAAE,gBAAgB,EAClB,GAAY;IAGhB,CAAC,EAAW,CACb,EAEK,IAAc,QAAkB;EACpC,IAAM,IAAW,EAAY;AACxB,QACL,EAAS,MAAM,SAAS,QACxB,EAAS,MAAM,SAAS,GAAG,KAAK,IAAI,EAAS,cAAc,IAAI,CAAC,KAChE,EAAW,EAAS,MAAM,MAAM,CAAC,SAAS,EAAE;IAC3C,EAAE,CAAC,EAGA,IAAe,GACf,IAAU,KAAW,CAAC;AAE5B,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,SAAD,EAAA,UAAQ,0FAAiG,CAAA,EAIzG,kBAAC,OAAD;GAAK,WAAU;aAAf;IACG,KACC,kBAAC,OAAD;KAAK,WAAU;KAA2C,eAAY;KAAO,eAAY;eACvF,kBAAC,OAAD;MACE,WAAU;MACV,OAAO,EAAE,WAAW,mCAAmC;MACvD,CAAA;KACE,CAAA;IAER,kBAAC,YAAD;KACE,KAAK;KACL,WAAW;KACX,SAAS;KACT,UAAU;KACG;KACb,MAAM;KACN,WAAU;KACV,cAAY,EAAG,6CAA6C,gBAAgB;KAC5E,eAAY;KACZ,CAAA;IACF,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAqC;MAAmB,CAAA,EACvE,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,UAAU,CAAC;MACX,WAAW,wKACT,IACI,mGACA;MAEN,cAAY,EAAG,wCAAwC,eAAe;MACtE,eAAY;gBAEX,IAAe,kBAAC,GAAD,EAAS,WAAU,uBAAwB,CAAA,GAAG,kBAAC,GAAD,EAAS,WAAU,UAAW,CAAA;MACrF,CAAA,CACL;;IACF;KACF"}
1
+ {"version":3,"file":"AssistantChatInput.js","names":[],"sources":["../../../src/components/assistant/AssistantChatInput.tsx"],"sourcesContent":["import { useRef, useState, useCallback, type FC, type KeyboardEvent, type ReactNode } from 'react';\nimport { ArrowUp, Loader2 } from 'lucide-react';\nimport { useTr } from '../../shared/hooks/useTr';\n\ninterface Props {\n onSend: (message: string) => void;\n disabled?: boolean;\n placeholder?: string;\n /** Rendered inline on the left of the composer toolbar (e.g. the mode chip). */\n toolbarStart?: ReactNode;\n}\n\n/**\n * Composer — a large rounded \"card\" (Google-Stitch / Gemini style): a roomy\n * input area on top with a controls toolbar pinned at the bottom (the mode chip\n * on the left, a circular send up-arrow on the right). The whole card lifts its\n * border on focus. Uses HB semantic tokens only.\n */\nexport const AssistantChatInput: FC<Props> = ({\n onSend,\n disabled = false,\n placeholder = 'Ask anything...',\n toolbarStart,\n}) => {\n const tr = useTr();\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n // Track whether there's text so the send button can switch between its\n // inactive (empty) and active (ready) states, like Gemini's composer.\n const [hasText, setHasText] = useState(false);\n\n const handleSend = useCallback(() => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n\n const value = textarea.value.trim();\n if (!value || disabled) return;\n\n onSend(value);\n textarea.value = '';\n textarea.style.height = 'auto';\n setHasText(false);\n }, [onSend, disabled]);\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSend();\n }\n },\n [handleSend]\n );\n\n const handleInput = useCallback(() => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n textarea.style.height = 'auto';\n textarea.style.height = `${Math.min(textarea.scrollHeight, 200)}px`;\n setHasText(textarea.value.trim().length > 0);\n }, []);\n\n // `disabled` from the parent means the assistant is busy processing a turn.\n const isProcessing = disabled;\n const canSend = hasText && !isProcessing;\n\n return (\n <div className=\"px-4 pb-4 pt-2\">\n <style>{'@keyframes hb-shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}'}</style>\n {/* Large two-row composer card: a roomy input area on top, the controls\n toolbar pinned at the bottom (mode chip left, circular send right).\n While processing, a soft shimmer glides across the card. */}\n {/* NOTE: the card must NOT clip overflow — the mode dropdown opens upward\n and would be cut off. The shimmer is clipped on its own layer instead. */}\n <div className=\"relative rounded-2xl border border-border-default bg-bg-sunken px-1.5 pb-2 pt-1.5 shadow-sm transition-all focus-within:border-action-primary-bg focus-within:shadow-md focus-within:ring-2 focus-within:ring-action-primary-bg/15\">\n {isProcessing && (\n <div\n className=\"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-2xl\"\n aria-hidden=\"true\"\n data-testid=\"composer-shimmer\"\n >\n <div\n className=\"h-full w-full bg-gradient-to-r from-transparent via-action-primary-bg/12 to-transparent\"\n style={{ animation: 'hb-shimmer 1.6s linear infinite' }}\n />\n </div>\n )}\n <textarea\n ref={textareaRef}\n onKeyDown={handleKeyDown}\n onInput={handleInput}\n disabled={isProcessing}\n placeholder={placeholder}\n rows={3}\n className=\"relative z-[1] min-h-[84px] w-full resize-none bg-transparent px-3 pb-2 pt-2.5 text-[15px] leading-relaxed text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50\"\n aria-label={tr('healthybowl.assistant.chatInput.ariaLabel', 'Message input')}\n data-testid=\"assistant-input\"\n />\n <div className=\"relative z-[1] flex items-center justify-between gap-2 px-1.5 pb-0.5 pt-1\">\n <div className=\"flex min-w-0 items-center gap-1.5\">{toolbarStart}</div>\n <button\n type=\"button\"\n onClick={handleSend}\n disabled={!canSend}\n className={`flex size-9 flex-shrink-0 items-center justify-center rounded-full shadow-sm transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${\n canSend\n ? 'bg-action-primary-bg text-action-primary-text hover:scale-105 hover:bg-action-primary-bg-hover'\n : 'bg-bg-elevated text-text-muted'\n }`}\n aria-label={tr('healthybowl.assistant.chatInput.send', 'Send message')}\n data-testid=\"assistant-send\"\n >\n {isProcessing ? <Loader2 className=\"size-4 animate-spin\" /> : <ArrowUp className=\"size-4\" />}\n </button>\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AAkBA,IAAa,KAAiC,EAC5C,WACA,cAAW,IACX,iBAAc,mBACd,sBACI;CACJ,IAAM,IAAK,GAAO,EACZ,IAAc,EAA4B,KAAK,EAG/C,CAAC,GAAS,KAAc,EAAS,GAAM,EAEvC,IAAa,QAAkB;EACnC,IAAM,IAAW,EAAY;AAC7B,MAAI,CAAC,EAAU;EAEf,IAAM,IAAQ,EAAS,MAAM,MAAM;AAC/B,GAAC,KAAS,MAEd,EAAO,EAAM,EACb,EAAS,QAAQ,IACjB,EAAS,MAAM,SAAS,QACxB,EAAW,GAAM;IAChB,CAAC,GAAQ,EAAS,CAAC,EAEhB,IAAgB,GACnB,MAA0C;AACzC,EAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,aAC1B,EAAE,gBAAgB,EAClB,GAAY;IAGhB,CAAC,EAAW,CACb,EAEK,IAAc,QAAkB;EACpC,IAAM,IAAW,EAAY;AACxB,QACL,EAAS,MAAM,SAAS,QACxB,EAAS,MAAM,SAAS,GAAG,KAAK,IAAI,EAAS,cAAc,IAAI,CAAC,KAChE,EAAW,EAAS,MAAM,MAAM,CAAC,SAAS,EAAE;IAC3C,EAAE,CAAC,EAGA,IAAe,GACf,IAAU,KAAW,CAAC;AAE5B,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,SAAD,EAAA,UAAQ,0FAAiG,CAAA,EAMzG,kBAAC,OAAD;GAAK,WAAU;aAAf;IACG,KACC,kBAAC,OAAD;KACE,WAAU;KACV,eAAY;KACZ,eAAY;eAEZ,kBAAC,OAAD;MACE,WAAU;MACV,OAAO,EAAE,WAAW,mCAAmC;MACvD,CAAA;KACE,CAAA;IAER,kBAAC,YAAD;KACE,KAAK;KACL,WAAW;KACX,SAAS;KACT,UAAU;KACG;KACb,MAAM;KACN,WAAU;KACV,cAAY,EAAG,6CAA6C,gBAAgB;KAC5E,eAAY;KACZ,CAAA;IACF,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAqC;MAAmB,CAAA,EACvE,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,UAAU,CAAC;MACX,WAAW,wKACT,IACI,mGACA;MAEN,cAAY,EAAG,wCAAwC,eAAe;MACtE,eAAY;gBAEX,IAAe,kBAAC,GAAD,EAAS,WAAU,uBAAwB,CAAA,GAAG,kBAAC,GAAD,EAAS,WAAU,UAAW,CAAA;MACrF,CAAA,CACL;;IACF;KACF"}
@@ -1,4 +1,5 @@
1
- var e = typeof window < "u" && window.location.hostname !== "app.gethealthybowl.com", t = {
1
+ //#region src/config/assistantUsecases.ts
2
+ var e = typeof window < "u", t = {
2
3
  id: "general",
3
4
  label: "General",
4
5
  description: "General help with HealthyBowl — crops, livestock, the marketplace, and farm operations",
@@ -1 +1 @@
1
- {"version":3,"file":"assistantUsecases.js","names":[],"sources":["../../src/config/assistantUsecases.ts"],"sourcesContent":["/**\n * HealthyBowl AI Assistant usecases.\n *\n * `AssistantUsecaseId` is the full set of modes the transport/runtime\n * understands — it drives the image/resource switches in `services/assistantApi`.\n * `ASSISTANT_USECASE_CONFIG` is the set of modes the panel KNOWS about; the mode\n * selector further filters them at runtime by the user's role (see\n * `useAssistantApiAccess`) so a write-capable mode only appears for org admins.\n * - `general` — docs Q&A (proxy-token auth, available to everyone).\n * - `api-calls` — WRITE-CAPABLE: the agent executes GraphQL on the user's\n * behalf (app-client-credentials auth). Minting its per-sandbox OAuth app\n * requires a global Owner/Admin actor, so it is gated to admins, guarded by a\n * confirm-before-mutate dialog + a soft agent preamble, and master-flagged.\n * - `vibe-plugins` — a VibeControls-only concept HealthyBowl never exposes.\n */\n\n// Full set of runtime-understood modes. Keep in sync with the image/resource\n// switches in `services/assistantApi.ts`.\nexport type AssistantUsecaseId = 'general' | 'api-calls' | 'vibe-plugins';\n\nexport interface AssistantUsecase {\n id: AssistantUsecaseId;\n label: string;\n description: string;\n suggestions: readonly string[];\n /** Only offered to a global Owner/Admin (minting the OAuth app needs admin). */\n requiresAdmin?: boolean;\n /** Executes mutations on live data → triggers the confirm-before-mutate guard. */\n writeCapable?: boolean;\n}\n\n/**\n * Master switch for the write-capable `api-calls` mode. It is admin-gated, shows\n * a one-time confirm dialog, and prepends a describe-and-confirm instruction —\n * but the in-sandbox agent still auto-executes (there is no hard server-side\n * confirmation yet, per the ai-assistant agent). So it is held OFF on the\n * PRODUCTION app (`app.gethealthybowl.com`) and stays ON for alpha\n * (`alphaapp.gethealthybowl.com`) + local dev, until the agent-side hard confirm\n * lands. Flipping it does not touch the transport, which already supports the mode.\n *\n * Why a RUNTIME hostname check and not `import.meta.env.VITE_*`: this microfe\n * ships a PREBUILT dist (the app bundles dist/index.js, not src), so Vite bakes\n * any `import.meta.env` at MICROFE build time — where the env is never 'prod' —\n * making a build-time env flag unable to distinguish prod from alpha. The\n * runtime `window.location.hostname` is the reliable signal in the browser.\n */\nconst PROD_APP_HOST = 'app.gethealthybowl.com';\nexport const API_CALLS_MODE_ENABLED = typeof window !== 'undefined' && window.location.hostname !== PROD_APP_HOST;\n\nconst GENERAL: AssistantUsecase = {\n id: 'general',\n label: 'General',\n description: 'General help with HealthyBowl — crops, livestock, the marketplace, and farm operations',\n suggestions: [\n 'How do I add a new crop?',\n 'Explain the livestock health tracker',\n 'How does the marketplace work?',\n 'What government schemes can I apply for?',\n ],\n};\n\nconst API_CALLS: AssistantUsecase = {\n id: 'api-calls',\n label: 'Actions',\n description:\n 'Let the assistant take actions for you — add crops, log harvests, update records. It describes what it will do and asks before changing anything.',\n suggestions: [\n 'Add a new crop',\n 'Log a harvest for one of my fields',\n 'List all my livestock',\n \"Update a crop's status\",\n ],\n requiresAdmin: true,\n writeCapable: true,\n};\n\n// Modes the panel knows about. Phase 1 = general; phase 2 adds api-calls (admin-\n// gated + guarded). The mode selector filters this further by role at runtime.\nexport const ASSISTANT_USECASE_CONFIG: readonly AssistantUsecase[] = API_CALLS_MODE_ENABLED\n ? [GENERAL, API_CALLS]\n : [GENERAL];\n"],"mappings":"AA+CA,IAAa,IAAyB,OAAO,SAAW,OAAe,OAAO,SAAS,aADjE,0BAGhB,IAA4B;CAChC,IAAI;CACJ,OAAO;CACP,aAAa;CACb,aAAa;EACX;EACA;EACA;EACA;EACD;CACF,EAmBY,IAAwD,IACjE,CAAC,GAlB+B;CAClC,IAAI;CACJ,OAAO;CACP,aACE;CACF,aAAa;EACX;EACA;EACA;EACA;EACD;CACD,eAAe;CACf,cAAc;CACf,CAKuB,GACpB,CAAC,EAAQ"}
1
+ {"version":3,"file":"assistantUsecases.js","names":[],"sources":["../../src/config/assistantUsecases.ts"],"sourcesContent":["/**\n * HealthyBowl AI Assistant usecases.\n *\n * `AssistantUsecaseId` is the full set of modes the transport/runtime\n * understands — it drives the image/resource switches in `services/assistantApi`.\n * `ASSISTANT_USECASE_CONFIG` is the set of modes the panel KNOWS about; the mode\n * selector further filters them at runtime by the user's role (see\n * `useAssistantApiAccess`) so a write-capable mode only appears for org admins.\n * - `general` — docs Q&A (proxy-token auth, available to everyone).\n * - `api-calls` — WRITE-CAPABLE: the agent executes GraphQL on the user's\n * behalf (app-client-credentials auth). Minting its per-sandbox OAuth app\n * requires a global Owner/Admin actor, so it is gated to admins, guarded by a\n * confirm-before-mutate dialog + a soft agent preamble, and master-flagged.\n * - `vibe-plugins` — a VibeControls-only concept HealthyBowl never exposes.\n */\n\n// Full set of runtime-understood modes. Keep in sync with the image/resource\n// switches in `services/assistantApi.ts`.\nexport type AssistantUsecaseId = 'general' | 'api-calls' | 'vibe-plugins';\n\nexport interface AssistantUsecase {\n id: AssistantUsecaseId;\n label: string;\n description: string;\n suggestions: readonly string[];\n /** Only offered to a global Owner/Admin (minting the OAuth app needs admin). */\n requiresAdmin?: boolean;\n /** Executes mutations on live data → triggers the confirm-before-mutate guard. */\n writeCapable?: boolean;\n}\n\n/**\n * Master switch for the write-capable `api-calls` (\"Actions\") mode. Enabled on\n * ALL environments (alpha + production) as of 2026-06-30, by explicit product\n * decision. The mode remains gated by: (1) the admin check — only org\n * Owners/Admins ever see it (useAssistantApiAccess), (2) a one-time consent\n * dialog, and (3) a describe-and-confirm instruction prepended to the prompt.\n * The in-sandbox agent still auto-executes (no hard server-side confirm yet) —\n * that residual risk was accepted when enabling on prod.\n *\n * `typeof window` keeps it false during any non-browser evaluation; in the\n * browser it's always on (the admin gate is the real boundary).\n */\nexport const API_CALLS_MODE_ENABLED = typeof window !== 'undefined';\n\nconst GENERAL: AssistantUsecase = {\n id: 'general',\n label: 'General',\n description: 'General help with HealthyBowl — crops, livestock, the marketplace, and farm operations',\n suggestions: [\n 'How do I add a new crop?',\n 'Explain the livestock health tracker',\n 'How does the marketplace work?',\n 'What government schemes can I apply for?',\n ],\n};\n\nconst API_CALLS: AssistantUsecase = {\n id: 'api-calls',\n label: 'Actions',\n description:\n 'Let the assistant take actions for you — add crops, log harvests, update records. It describes what it will do and asks before changing anything.',\n suggestions: [\n 'Add a new crop',\n 'Log a harvest for one of my fields',\n 'List all my livestock',\n \"Update a crop's status\",\n ],\n requiresAdmin: true,\n writeCapable: true,\n};\n\n// Modes the panel knows about. Phase 1 = general; phase 2 adds api-calls (admin-\n// gated + guarded). The mode selector filters this further by role at runtime.\nexport const ASSISTANT_USECASE_CONFIG: readonly AssistantUsecase[] = API_CALLS_MODE_ENABLED\n ? [GENERAL, API_CALLS]\n : [GENERAL];\n"],"mappings":";AA2CA,IAAa,IAAyB,OAAO,SAAW,KAElD,IAA4B;CAChC,IAAI;CACJ,OAAO;CACP,aAAa;CACb,aAAa;EACX;EACA;EACA;EACA;EACD;CACF,EAmBY,IAAwD,IACjE,CAAC,GAlB+B;CAClC,IAAI;CACJ,OAAO;CACP,aACE;CACF,aAAa;EACX;EACA;EACA;EACA;EACD;CACD,eAAe;CACf,cAAc;CACf,CAKuB,GACpB,CAAC,EAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-healthybowl",
3
- "version": "2026.630.1",
3
+ "version": "2026.630.3",
4
4
  "description": "Burdenoff HealthyBowl Microfrontend - Comprehensive organic farming and agro-foods management platform",
5
5
  "type": "module",
6
6
  "files": [