@fungi.computer/grove 0.10.1 → 0.10.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.
Files changed (28) hide show
  1. package/dist/assets/{anthropic-messages-BFoeaJ9G.js → anthropic-messages-dhdSZQHh.js} +3 -3
  2. package/dist/assets/{azure-openai-responses-v5sceQAh.js → azure-openai-responses-DZ_87FTJ.js} +1 -1
  3. package/dist/assets/{burger-BOxdMwcj.js → burger-DrCCNm9Q.js} +1 -1
  4. package/dist/assets/{cat-Bod6aGSu.js → cat-PcbuH79a.js} +1 -1
  5. package/dist/assets/{compat-BwyOKmFY.js → compat-CTlPjeXf.js} +2 -2
  6. package/dist/assets/{extension-hook-e_kcchuR.js → extension-hook-TXWlsyri.js} +2 -2
  7. package/dist/assets/{google-generative-ai-CC__uqhq.js → google-generative-ai-YxFSrkHg.js} +1 -1
  8. package/dist/assets/{google-shared-Ytf1tToW.js → google-shared-BdaSUTuo.js} +1 -1
  9. package/dist/assets/{google-vertex-C15xl0ZM.js → google-vertex-nsZCfEGW.js} +1 -1
  10. package/dist/assets/index-D1_UIO2Y.js +117 -0
  11. package/dist/assets/{mistral-conversations-DDZgyjp9.js → mistral-conversations-CF-mWKB5.js} +1 -1
  12. package/dist/assets/{node.browser-innEFFFK.js → node.browser-BCRZH2FH.js} +1 -1
  13. package/dist/assets/{openai-codex-responses-C4kT5hiJ.js → openai-codex-responses-DO2jOPV4.js} +1 -1
  14. package/dist/assets/{openai-completions-DD3jh9lR.js → openai-completions-rcgYpl7N.js} +1 -1
  15. package/dist/assets/{openai-responses-46u5c4XI.js → openai-responses-CJz81TLZ.js} +1 -1
  16. package/dist/assets/{openai-responses-shared-D5dLczao.js → openai-responses-shared-BhyHCBgw.js} +1 -1
  17. package/dist/assets/parakeet-DSXcEA6r.js +36 -0
  18. package/dist/assets/parakeet-conversation-5gtL-N8q.js +4 -0
  19. package/dist/assets/{runtime-core-CnjAqR_U.js → runtime-core-BDds1RWk.js} +1 -1
  20. package/dist/assets/sigil-CumoCbKe.js +31 -0
  21. package/dist/assets/{transform-messages-DJBPqZww.js → transform-messages-UVC-QukO.js} +1 -1
  22. package/dist/assets/{website-conversation-Bac-VGNJ.js → website-conversation-vF8iWv5k.js} +1 -1
  23. package/dist/index.html +3 -3
  24. package/package.json +2 -2
  25. package/dist/assets/index-CMllICY2.js +0 -117
  26. package/dist/assets/parakeet-DaeViSsc.js +0 -36
  27. package/dist/assets/parakeet-conversation-CiOk0Gxq.js +0 -4
  28. package/dist/assets/sigil-hHfpi6aQ.js +0 -31
@@ -1 +1 @@
1
- import{n as e}from"./models-BM_0GHMS.js";import{r as t}from"./runtime-core-CnjAqR_U.js";function n(){return typeof process>`u`||!(process.versions?.node||process.versions?.bun)?null:process.getBuiltinModule?.(`node:os`)??null}var r=n();function i(){return r?`pi (${r.platform()} ${r.release()}; ${r.arch()})`:`pi (browser)`}var a=class extends Error{},o=[`$ref`,`$defs`,`definitions`,`allOf`,`oneOf`,`patternProperties`,`dependentSchemas`,`dependencies`,`unevaluatedProperties`,`propertyNames`,`contains`,`prefixItems`,`not`,`if`,`then`,`else`];function s(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function c(e){if(!s(e))return!1;let t=typeof e.type==`string`?[e.type]:Array.isArray(e.type)?e.type:[];return t.includes(`object`)||t.includes(`array`)||e.properties!==void 0||e.items!==void 0}function l(e){return s(e)?e.type===`null`||Array.isArray(e.type)&&e.type.includes(`null`)||e.const===null||Array.isArray(e.enum)&&e.enum.includes(null)?!0:Array.isArray(e.anyOf)&&e.anyOf.some(e=>l(e)):!1}function u(e,t){if(!s(e))throw new a(`boolean schemas are unsupported`);for(let t of o)if(e[t]!==void 0)throw new a(`${t} schemas are unsupported`);if(t){for(let[n,r]of Object.entries(e))if(t(n,r))throw new a(`${n}: ${JSON.stringify(r)} is unsupported`)}if(e.anyOf!==void 0){if(!Array.isArray(e.anyOf)||e.anyOf.length===0)throw new a(`anyOf must contain at least one schema`);for(let n of e.anyOf){if(c(n))throw new a(`object and array unions are unsupported`);u(n,t)}}if(e.items!==void 0){if(Array.isArray(e.items))throw new a(`tuple schemas are unsupported`);u(e.items,t)}let n=e.type===`object`;if(e.properties!==void 0&&!n)throw new a(`properties require type object`);if(!n)return;if(e.additionalProperties!==void 0&&e.additionalProperties!==!1)throw new a(`schema-valued or true additionalProperties is unsupported`);if(e.properties!==void 0&&!s(e.properties))throw new a(`object properties must be a schema map`);if(e.required!==void 0&&(!Array.isArray(e.required)||e.required.some(e=>typeof e!=`string`)))throw new a(`object required must be a string array`);let r=e.properties??{},i=Object.keys(r),d=new Set(Array.isArray(e.required)?e.required:[]);if([...d].some(e=>!i.includes(e)))throw new a(`required contains an unknown property`);for(let[e,n]of Object.entries(r))u(n,t),!d.has(e)&&!l(n)&&(r[e]={anyOf:[n,{type:`null`}]});e.required=i,e.additionalProperties=!1}function d(e,t){let n=structuredClone(e);if(!s(n)||(u(n,t),n.type!==`object`))throw new a(`root schema must have type object`);return n}function f(e,t){return t===!0?d(e.parameters):e.parameters}function p(e,t,n){let r=t[n];if(typeof r!=`string`)throw Error(`Grammar tool call "${e}" requires argument "${n}" to be a string.`);return r}function m(e,t,n,r){if(e.closed){if(r&&n===e.input)return;throw Error(`grammar tool input for property "${t}" changed after it was closed`)}if(!n.startsWith(e.input))throw Error(`grammar tool input for property "${t}" changed non-monotonically`);let i=n.slice(e.input.length);if(!r&&i.length===0)return;let a=``;return e.started||=(a+=`{${JSON.stringify(t)}:"`,!0),a+=JSON.stringify(i).slice(1,-1),e.input=n,r&&(a+=`"}`,e.closed=!0),a}function h(e){let t=e.parameters;if(t.type!==`object`)throw Error(`grammar constrained sampling requires an object parameter schema`);if(!Array.isArray(t.required)||t.required.length!==1||typeof t.required[0]!=`string`)throw Error(`grammar constrained sampling requires exactly one required string property`);let n=t.required[0];if(!t.properties?.[n])throw Error(`grammar constrained sampling requires a properties entry for ${n}`);if(t.properties[n]?.type!==`string`)throw Error(`grammar constrained sampling property ${n} must have type string`);return n}function g(e,t,n){let r=e.constrainedSampling;if(!(!r||r.type!==`json_schema`)){if(t)try{return d(e.parameters,n),!0}catch(t){if(!(t instanceof a))throw t;if(r.strict!==`require`)return;throw Error(`Tool "${e.name}" requires JSON-schema constrained sampling, but ${t.message}.`)}if(r.strict===`require`)throw Error(`Tool "${e.name}" requires JSON-schema constrained sampling, but strict tools are unsupported.`)}}function _(e,t){let n=e.constrainedSampling;if(!n||n.type!==`grammar`||!t)return;let r=n.variants.openai_lark,i=n.variants.openai_regex,a=typeof r==`string`&&r.trim().length>0,o=typeof i==`string`&&i.trim().length>0;if(!a&&!o)throw Error(`Tool "${e.name}" cannot use grammar constrained sampling: no supported grammar variant was provided.`);try{return{format:a?`lark`:`regex`,definition:a?r:i,inputProperty:h(e)}}catch(t){let n=t instanceof Error?t.message:String(t);throw Error(`Tool "${e.name}" cannot use grammar constrained sampling: ${n}.`)}}function v(e,t){let n=new Map;for(let r of e??[]){let e=_(r,t);e&&n.set(r.name,e.inputProperty)}return n}var y=4096,b=1;function x(e,n,r){if(e.contextWindow<=0)return Math.max(b,r);let i=e.contextWindow-t(n).tokens-y;return Math.min(r,Math.max(b,i))}function S(t,n,r){let i=e(t,n),a=t.samplingParamsByThinkingLevel?.[i];return t.samplingParams||a||r?{...t.samplingParams,...a,...r}:void 0}function C(e,t,n,r){let i=S(e,n?.reasoning??`off`,n?.samplingParams);return{temperature:n?.temperature,samplingParams:i,maxTokens:x(e,t,n?.maxTokens??e.maxTokens),signal:n?.signal,telemetryContext:n?.telemetryContext,apiKey:r||n?.apiKey,fetch:n?.fetch,transport:n?.transport,cacheRetention:n?.cacheRetention,sessionId:n?.sessionId,headers:n?.headers,onPayload:n?.onPayload,onResponse:n?.onResponse,onProviderStreamEvent:n?.onProviderStreamEvent,timeoutMs:n?.timeoutMs,websocketConnectTimeoutMs:n?.websocketConnectTimeoutMs,maxRetries:n?.maxRetries,maxRetryDelayMs:n?.maxRetryDelayMs,metadata:n?.metadata,env:n?.env}}var w=1024,T={minimal:1024,low:2048,medium:8192,high:16384};function E(e){return e===`xhigh`||e===`max`?`high`:e}function D(e,t){return{...T,...t}[E(e)]}function O(e,t){return Math.min(e,Math.max(0,t-w))}function k(e,t,n,r){let i=D(n,r),a=e===void 0?t:Math.min(e+i,t);return a<=i&&(i=O(i,a)),{maxTokens:a,thinkingBudget:i}}var A=`(image omitted: model does not support images)`,j=`(tool image omitted: model does not support images)`,M=`(image attached after the tool results)`;function N(e){if(!e.isError)return;let t=e.content.filter(e=>e.type===`image`);if(t.length!==0)return{content:P(e.content,M),caption:`Images from the error result of tool call ${e.toolCallId} (${e.toolName}):`,images:t}}function P(e,t){let n=[],r=!1;for(let i of e){if(i.type===`image`){r||n.push({type:`text`,text:t}),r=!0;continue}n.push(i),r=i.text===t}return n}function F(e,t){return t.input.includes(`image`)?e:e.map(e=>e.role===`user`&&Array.isArray(e.content)?{...e,content:P(e.content,A)}:e.role===`toolResult`?{...e,content:P(e.content,j)}:e)}function I(e,t,n){let r=new Map,i=F(e.map(e=>e.content==null?{...e,content:[]}:e),t).map(e=>{if(e.role===`system`||e.role===`user`)return e;if(e.role===`toolResult`){let t=r.get(e.toolCallId);return t&&t!==e.toolCallId?{...e,toolCallId:t}:e}if(e.role===`assistant`){let i=e,a=i.provider===t.provider&&i.api===t.api&&i.model===t.id,o=i.content.flatMap(e=>{if(e.type===`thinking`)return a?e.redacted||e.thinkingSignature?e:!e.thinking||e.thinking.trim()===``?[]:e:[];if(e.type===`text`)return a?e:{type:`text`,text:e.text};if(e.type===`toolCall`){let o=e,s=o;if(!a&&o.thoughtSignature&&(s={...o},delete s.thoughtSignature),!a&&n){let e=n(o.id,t,i);e!==o.id&&(r.set(o.id,e),s={...s,id:e})}return s}return e});return{...i,content:o}}return e}),a=[],o=[],s=new Set,c=[],l=()=>{if(o.length>0){for(let e of o)s.has(e.id)||a.push({role:`toolResult`,toolCallId:e.id,toolName:e.name,content:[{type:`text`,text:`No result provided`}],isError:!0,timestamp:Date.now()});o=[],s=new Set}a.push(...c),c.length=0};for(let e=0;e<i.length;e++){let t=i[e];if(t.role===`assistant`){l();let e=t;if(e.stopReason===`error`||e.stopReason===`aborted`)continue;let n=e.content.filter(e=>e.type===`toolCall`);n.length>0&&(o=n,s=new Set),a.push(t)}else t.role===`toolResult`?(s.add(t.toolCallId),a.push(t)):t.role===`system`?o.length>0?c.push(t):a.push(t):(t.role===`user`&&l(),a.push(t))}return l(),a}export{x as a,D as c,p as d,f,i as h,C as i,m as l,g as m,I as n,O as o,_ as p,k as r,S as s,N as t,v as u};
1
+ import{n as e}from"./models-BM_0GHMS.js";import{r as t}from"./runtime-core-BDds1RWk.js";function n(){return typeof process>`u`||!(process.versions?.node||process.versions?.bun)?null:process.getBuiltinModule?.(`node:os`)??null}var r=n();function i(){return r?`pi (${r.platform()} ${r.release()}; ${r.arch()})`:`pi (browser)`}var a=class extends Error{},o=[`$ref`,`$defs`,`definitions`,`allOf`,`oneOf`,`patternProperties`,`dependentSchemas`,`dependencies`,`unevaluatedProperties`,`propertyNames`,`contains`,`prefixItems`,`not`,`if`,`then`,`else`];function s(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function c(e){if(!s(e))return!1;let t=typeof e.type==`string`?[e.type]:Array.isArray(e.type)?e.type:[];return t.includes(`object`)||t.includes(`array`)||e.properties!==void 0||e.items!==void 0}function l(e){return s(e)?e.type===`null`||Array.isArray(e.type)&&e.type.includes(`null`)||e.const===null||Array.isArray(e.enum)&&e.enum.includes(null)?!0:Array.isArray(e.anyOf)&&e.anyOf.some(e=>l(e)):!1}function u(e,t){if(!s(e))throw new a(`boolean schemas are unsupported`);for(let t of o)if(e[t]!==void 0)throw new a(`${t} schemas are unsupported`);if(t){for(let[n,r]of Object.entries(e))if(t(n,r))throw new a(`${n}: ${JSON.stringify(r)} is unsupported`)}if(e.anyOf!==void 0){if(!Array.isArray(e.anyOf)||e.anyOf.length===0)throw new a(`anyOf must contain at least one schema`);for(let n of e.anyOf){if(c(n))throw new a(`object and array unions are unsupported`);u(n,t)}}if(e.items!==void 0){if(Array.isArray(e.items))throw new a(`tuple schemas are unsupported`);u(e.items,t)}let n=e.type===`object`;if(e.properties!==void 0&&!n)throw new a(`properties require type object`);if(!n)return;if(e.additionalProperties!==void 0&&e.additionalProperties!==!1)throw new a(`schema-valued or true additionalProperties is unsupported`);if(e.properties!==void 0&&!s(e.properties))throw new a(`object properties must be a schema map`);if(e.required!==void 0&&(!Array.isArray(e.required)||e.required.some(e=>typeof e!=`string`)))throw new a(`object required must be a string array`);let r=e.properties??{},i=Object.keys(r),d=new Set(Array.isArray(e.required)?e.required:[]);if([...d].some(e=>!i.includes(e)))throw new a(`required contains an unknown property`);for(let[e,n]of Object.entries(r))u(n,t),!d.has(e)&&!l(n)&&(r[e]={anyOf:[n,{type:`null`}]});e.required=i,e.additionalProperties=!1}function d(e,t){let n=structuredClone(e);if(!s(n)||(u(n,t),n.type!==`object`))throw new a(`root schema must have type object`);return n}function f(e,t){return t===!0?d(e.parameters):e.parameters}function p(e,t,n){let r=t[n];if(typeof r!=`string`)throw Error(`Grammar tool call "${e}" requires argument "${n}" to be a string.`);return r}function m(e,t,n,r){if(e.closed){if(r&&n===e.input)return;throw Error(`grammar tool input for property "${t}" changed after it was closed`)}if(!n.startsWith(e.input))throw Error(`grammar tool input for property "${t}" changed non-monotonically`);let i=n.slice(e.input.length);if(!r&&i.length===0)return;let a=``;return e.started||=(a+=`{${JSON.stringify(t)}:"`,!0),a+=JSON.stringify(i).slice(1,-1),e.input=n,r&&(a+=`"}`,e.closed=!0),a}function h(e){let t=e.parameters;if(t.type!==`object`)throw Error(`grammar constrained sampling requires an object parameter schema`);if(!Array.isArray(t.required)||t.required.length!==1||typeof t.required[0]!=`string`)throw Error(`grammar constrained sampling requires exactly one required string property`);let n=t.required[0];if(!t.properties?.[n])throw Error(`grammar constrained sampling requires a properties entry for ${n}`);if(t.properties[n]?.type!==`string`)throw Error(`grammar constrained sampling property ${n} must have type string`);return n}function g(e,t,n){let r=e.constrainedSampling;if(!(!r||r.type!==`json_schema`)){if(t)try{return d(e.parameters,n),!0}catch(t){if(!(t instanceof a))throw t;if(r.strict!==`require`)return;throw Error(`Tool "${e.name}" requires JSON-schema constrained sampling, but ${t.message}.`)}if(r.strict===`require`)throw Error(`Tool "${e.name}" requires JSON-schema constrained sampling, but strict tools are unsupported.`)}}function _(e,t){let n=e.constrainedSampling;if(!n||n.type!==`grammar`||!t)return;let r=n.variants.openai_lark,i=n.variants.openai_regex,a=typeof r==`string`&&r.trim().length>0,o=typeof i==`string`&&i.trim().length>0;if(!a&&!o)throw Error(`Tool "${e.name}" cannot use grammar constrained sampling: no supported grammar variant was provided.`);try{return{format:a?`lark`:`regex`,definition:a?r:i,inputProperty:h(e)}}catch(t){let n=t instanceof Error?t.message:String(t);throw Error(`Tool "${e.name}" cannot use grammar constrained sampling: ${n}.`)}}function v(e,t){let n=new Map;for(let r of e??[]){let e=_(r,t);e&&n.set(r.name,e.inputProperty)}return n}var y=4096,b=1;function x(e,n,r){if(e.contextWindow<=0)return Math.max(b,r);let i=e.contextWindow-t(n).tokens-y;return Math.min(r,Math.max(b,i))}function S(t,n,r){let i=e(t,n),a=t.samplingParamsByThinkingLevel?.[i];return t.samplingParams||a||r?{...t.samplingParams,...a,...r}:void 0}function C(e,t,n,r){let i=S(e,n?.reasoning??`off`,n?.samplingParams);return{temperature:n?.temperature,samplingParams:i,maxTokens:x(e,t,n?.maxTokens??e.maxTokens),signal:n?.signal,telemetryContext:n?.telemetryContext,apiKey:r||n?.apiKey,fetch:n?.fetch,transport:n?.transport,cacheRetention:n?.cacheRetention,sessionId:n?.sessionId,headers:n?.headers,onPayload:n?.onPayload,onResponse:n?.onResponse,onProviderStreamEvent:n?.onProviderStreamEvent,timeoutMs:n?.timeoutMs,websocketConnectTimeoutMs:n?.websocketConnectTimeoutMs,maxRetries:n?.maxRetries,maxRetryDelayMs:n?.maxRetryDelayMs,metadata:n?.metadata,env:n?.env}}var w=1024,T={minimal:1024,low:2048,medium:8192,high:16384};function E(e){return e===`xhigh`||e===`max`?`high`:e}function D(e,t){return{...T,...t}[E(e)]}function O(e,t){return Math.min(e,Math.max(0,t-w))}function k(e,t,n,r){let i=D(n,r),a=e===void 0?t:Math.min(e+i,t);return a<=i&&(i=O(i,a)),{maxTokens:a,thinkingBudget:i}}var A=`(image omitted: model does not support images)`,j=`(tool image omitted: model does not support images)`,M=`(image attached after the tool results)`;function N(e){if(!e.isError)return;let t=e.content.filter(e=>e.type===`image`);if(t.length!==0)return{content:P(e.content,M),caption:`Images from the error result of tool call ${e.toolCallId} (${e.toolName}):`,images:t}}function P(e,t){let n=[],r=!1;for(let i of e){if(i.type===`image`){r||n.push({type:`text`,text:t}),r=!0;continue}n.push(i),r=i.text===t}return n}function F(e,t){return t.input.includes(`image`)?e:e.map(e=>e.role===`user`&&Array.isArray(e.content)?{...e,content:P(e.content,A)}:e.role===`toolResult`?{...e,content:P(e.content,j)}:e)}function I(e,t,n){let r=new Map,i=F(e.map(e=>e.content==null?{...e,content:[]}:e),t).map(e=>{if(e.role===`system`||e.role===`user`)return e;if(e.role===`toolResult`){let t=r.get(e.toolCallId);return t&&t!==e.toolCallId?{...e,toolCallId:t}:e}if(e.role===`assistant`){let i=e,a=i.provider===t.provider&&i.api===t.api&&i.model===t.id,o=i.content.flatMap(e=>{if(e.type===`thinking`)return a?e.redacted||e.thinkingSignature?e:!e.thinking||e.thinking.trim()===``?[]:e:[];if(e.type===`text`)return a?e:{type:`text`,text:e.text};if(e.type===`toolCall`){let o=e,s=o;if(!a&&o.thoughtSignature&&(s={...o},delete s.thoughtSignature),!a&&n){let e=n(o.id,t,i);e!==o.id&&(r.set(o.id,e),s={...s,id:e})}return s}return e});return{...i,content:o}}return e}),a=[],o=[],s=new Set,c=[],l=()=>{if(o.length>0){for(let e of o)s.has(e.id)||a.push({role:`toolResult`,toolCallId:e.id,toolName:e.name,content:[{type:`text`,text:`No result provided`}],isError:!0,timestamp:Date.now()});o=[],s=new Set}a.push(...c),c.length=0};for(let e=0;e<i.length;e++){let t=i[e];if(t.role===`assistant`){l();let e=t;if(e.stopReason===`error`||e.stopReason===`aborted`)continue;let n=e.content.filter(e=>e.type===`toolCall`);n.length>0&&(o=n,s=new Set),a.push(t)}else t.role===`toolResult`?(s.add(t.toolCallId),a.push(t)):t.role===`system`?o.length>0?c.push(t):a.push(t):(t.role===`user`&&l(),a.push(t))}return l(),a}export{x as a,D as c,p as d,f,i as h,C as i,m as l,g as m,I as n,O as o,_ as p,k as r,S as s,N as t,v as u};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,D as n,O as r,P as i,T as a,j as o,k as s,ki as c,mi as l,mr as u}from"./sigil-hHfpi6aQ.js";import{ti as d}from"./extension-hook-e_kcchuR.js";import{t as f}from"./parakeet-DaeViSsc.js";var p=e(c(),1),m=l();function h({inbox:e}){let{selected:c,session:l,action:h,canManage:g,openingError:_}=e,[v,y]=(0,p.useState)(null);if((0,p.useEffect)(()=>{y(null)},[c?.bindingId,c?.conversation.sessionId,g]),c===void 0)return null;let b=c.conversation;return(0,m.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col`,"aria-label":`Website conversation`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-base-300 p-2`,children:[(0,m.jsx)(`span`,{className:`min-w-0 flex-1 text-sm`,children:b.heldByYou?`You're replying. The Agent is paused.`:b.held?`${b.heldByName??`A teammate`} is replying.`:`The Agent is replying. Take over to answer as yourself.`}),g?(0,m.jsx)(u,{size:`sm`,disabled:h.isPending,onClick:()=>{let e={bindingId:c.bindingId,sessionId:b.sessionId};b.heldByYou?h.mutate({kind:`release`,...e,expectedVersion:b.holdVersion,confirm:!1}):b.held?y({...e,version:b.holdVersion,name:b.heldByName??`A teammate`}):h.mutate({kind:`hold`,...e,expectedVersion:b.holdVersion,confirm:!1})},children:b.heldByYou?`Hand back to Agent`:`Take over`}):null]}),(0,m.jsx)(a,{open:v!==null,onOpenChange:e=>{e||y(null)},children:(0,m.jsxs)(r,{children:[(0,m.jsxs)(o,{children:[(0,m.jsxs)(i,{children:[v?.name,` is replying — take over?`]}),(0,m.jsx)(s,{children:`You will reply as yourself. Their replies stop until they take over again.`})]}),(0,m.jsxs)(t,{children:[(0,m.jsx)(n,{render:(0,m.jsx)(u,{variant:`outline`}),children:`Cancel`}),(0,m.jsx)(u,{disabled:h.isPending||!g,onClick:()=>{v!==null&&(h.mutate({kind:`hold`,bindingId:v.bindingId,sessionId:v.sessionId,expectedVersion:v.version,confirm:!0}),y(null))},children:`Take over`})]})]})}),g?null:(0,m.jsx)(`p`,{className:`p-3 text-sm`,children:`Allow takeover in Grove's App permissions to reply. Your Team permissions still apply.`}),h.isError?(0,m.jsx)(`p`,{role:`alert`,className:`p-2 text-sm text-error`,children:`This conversation changed or website access was removed. Refresh and try again.`}):null,_?(0,m.jsx)(`p`,{role:`alert`,className:`p-2 text-sm text-error`,children:_}):null,l?(0,m.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,m.jsx)(f,{authorOf:d,disambiguateAuthors:!0,session:l,markdownPolicy:`visitor`,composerActionVariant:`outline`},`${c.bindingId}:${b.sessionId}`)}):null]})}export{h as WebsiteConversation};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,E as n,F as r,M as i,O as a,j as o,k as s,ki as c,mi as l,mr as u}from"./sigil-CumoCbKe.js";import{ti as d}from"./extension-hook-TXWlsyri.js";import{t as f}from"./parakeet-DSXcEA6r.js";var p=e(c(),1),m=l();function h({inbox:e}){let{selected:c,session:l,action:h,canManage:g,openingError:_}=e,[v,y]=(0,p.useState)(null);if((0,p.useEffect)(()=>{y(null)},[c?.bindingId,c?.conversation.sessionId,g]),c===void 0)return null;let b=c.conversation;return(0,m.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col`,"aria-label":`Website conversation`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-base-300 p-2`,children:[(0,m.jsx)(`span`,{className:`min-w-0 flex-1 text-sm`,children:b.heldByYou?`You're replying. The Agent is paused.`:b.held?`${b.heldByName??`A teammate`} is replying.`:`The Agent is replying. Take over to answer as yourself.`}),g?(0,m.jsx)(u,{size:`sm`,disabled:h.isPending,onClick:()=>{let e={bindingId:c.bindingId,sessionId:b.sessionId};b.heldByYou?h.mutate({kind:`release`,...e,expectedVersion:b.holdVersion,confirm:!1}):b.held?y({...e,version:b.holdVersion,name:b.heldByName??`A teammate`}):h.mutate({kind:`hold`,...e,expectedVersion:b.holdVersion,confirm:!1})},children:b.heldByYou?`Hand back to Agent`:`Take over`}):null]}),(0,m.jsx)(n,{open:v!==null,onOpenChange:e=>{e||y(null)},children:(0,m.jsxs)(s,{children:[(0,m.jsxs)(i,{children:[(0,m.jsxs)(r,{children:[v?.name,` is replying — take over?`]}),(0,m.jsx)(t,{children:`You will reply as yourself. Their replies stop until they take over again.`})]}),(0,m.jsxs)(o,{children:[(0,m.jsx)(a,{render:(0,m.jsx)(u,{variant:`outline`}),children:`Cancel`}),(0,m.jsx)(u,{disabled:h.isPending||!g,onClick:()=>{v!==null&&(h.mutate({kind:`hold`,bindingId:v.bindingId,sessionId:v.sessionId,expectedVersion:v.version,confirm:!0}),y(null))},children:`Take over`})]})]})}),g?null:(0,m.jsx)(`p`,{className:`p-3 text-sm`,children:`Allow takeover in Grove's App permissions to reply. Your Team permissions still apply.`}),h.isError?(0,m.jsx)(`p`,{role:`alert`,className:`p-2 text-sm text-error`,children:`This conversation changed or website access was removed. Refresh and try again.`}):null,_?(0,m.jsx)(`p`,{role:`alert`,className:`p-2 text-sm text-error`,children:_}):null,l?(0,m.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,m.jsx)(f,{authorOf:d,disambiguateAuthors:!0,session:l,markdownPolicy:`visitor`,composerActionVariant:`outline`},`${c.bindingId}:${b.sessionId}`)}):null]})}export{h as WebsiteConversation};
package/dist/index.html CHANGED
@@ -4,13 +4,13 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <title>Inbox</title>
7
- <script type="module" crossorigin src="/assets/index-CMllICY2.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-D1_UIO2Y.js"></script>
8
8
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
9
9
  <link rel="modulepreload" crossorigin href="/assets/Effect-CsknxyoC.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/preload-helper-DY31Aviq.js">
11
- <link rel="modulepreload" crossorigin href="/assets/extension-hook-e_kcchuR.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/extension-hook-TXWlsyri.js">
12
12
  <link rel="modulepreload" crossorigin href="/assets/animation-Ca8A_H2p.js">
13
- <link rel="modulepreload" crossorigin href="/assets/sigil-hHfpi6aQ.js">
13
+ <link rel="modulepreload" crossorigin href="/assets/sigil-CumoCbKe.js">
14
14
  <link rel="modulepreload" crossorigin href="/assets/document-Bq-ilh6h.js">
15
15
  <link rel="modulepreload" crossorigin href="/assets/base-face-BYNJAADF.js">
16
16
  <link rel="stylesheet" crossorigin href="/assets/index-DBOh8_JS.css">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/grove",
3
- "version": "0.10.1",
3
+ "version": "0.10.3",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "type": "module",
6
6
  "description": "Grove: conversations with agents that call your other Apps, for Oyster",
@@ -11,7 +11,7 @@
11
11
  "@fungi.computer/caps": "0.10.1",
12
12
  "@fungi.computer/knapsack": "0.4.9",
13
13
  "@fungi.computer/maosaico": "0.1.1",
14
- "@fungi.computer/parakeet": "0.11.1",
14
+ "@fungi.computer/parakeet": "0.11.3",
15
15
  "@fungi.computer/shiitake": "0.12.3",
16
16
  "@fungi.computer/sigils": "0.3.0",
17
17
  "@fungi.computer/sprite": "0.2.2",