eve 0.26.1 → 0.27.0
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.
- package/CHANGELOG.md +26 -0
- package/dist/src/chunks/{use-eve-agent-CruinZmd.js → use-eve-agent-AeQLLhu9.js} +118 -92
- package/dist/src/chunks/{use-eve-agent-BkztZA0v.js → use-eve-agent-PMY2WkAt.js} +118 -92
- package/dist/src/cli/commands/info.d.ts +2 -0
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/client/message-action-parts.d.ts +43 -0
- package/dist/src/client/message-action-parts.js +1 -0
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +4 -4
- package/dist/src/compiled/@chat-adapter/slack/blocks.d.ts +47 -2
- package/dist/src/compiled/@chat-adapter/slack/blocks.js +10 -8
- package/dist/src/compiled/@chat-adapter/slack/index.d.ts +168 -8
- package/dist/src/compiled/@chat-adapter/slack/index.js +28 -28
- package/dist/src/compiled/@chat-adapter/slack/{types-AntsVifS.d.ts → types-CdGmMyOr.d.ts} +1 -1
- package/dist/src/compiled/@chat-adapter/slack/webhook.d.ts +2 -2
- package/dist/src/compiled/@chat-adapter/twilio/index.d.ts +1 -1
- package/dist/src/compiled/@chat-adapter/twilio/index.js +1 -1
- package/dist/src/compiled/@chat-adapter/twilio/webhook.d.ts +2 -2
- package/dist/src/compiled/@vercel/sandbox/index.js +12 -12
- package/dist/src/compiled/_chunks/node/{auth-Cuszvn7l.js → auth-BuQkq4Gr.js} +2 -2
- package/dist/src/compiled/_chunks/node/{dist-CdH_Yoxt.js → dist-BweCayKF.js} +42 -35
- package/dist/src/compiled/_chunks/node/{dist-Drt-_JVK.js → dist-DvkWiagq.js} +6 -4
- package/dist/src/compiled/chat/index.d.ts +17 -6
- package/dist/src/compiled/chat/index.js +1 -1
- package/dist/src/compiled/chat/{jsx-runtime-CzthIo1o.d.ts → jsx-runtime-_JEEAotp.d.ts} +125 -5
- package/dist/src/compiler/model-catalog.js +1 -1
- package/dist/src/evals/autoevals-client.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-lookup.js +1 -1
- package/dist/src/execution/session.d.ts +0 -2
- package/dist/src/execution/session.js +1 -1
- package/dist/src/execution/skills/instructions.d.ts +3 -3
- package/dist/src/execution/skills/instructions.js +2 -2
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/compaction-prompt.d.ts +19 -1
- package/dist/src/harness/compaction-prompt.js +7 -5
- package/dist/src/harness/compaction.d.ts +4 -11
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/messages.d.ts +7 -0
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/prompt-cache.d.ts +16 -5
- package/dist/src/harness/prompt-cache.js +1 -1
- package/dist/src/harness/stale-input-responses.js +2 -2
- package/dist/src/harness/token-estimate.d.ts +9 -0
- package/dist/src/harness/token-estimate.js +1 -0
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/internal/application/compiled-artifacts.js +9 -3
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/gateway.d.ts +19 -0
- package/dist/src/internal/gateway.js +1 -0
- package/dist/src/internal/nitro/host/copy-host-middleware.js +1 -1
- package/dist/src/internal/user-agent.d.ts +11 -0
- package/dist/src/internal/user-agent.js +1 -0
- package/dist/src/public/channels/auth.d.ts +59 -9
- package/dist/src/public/channels/auth.js +1 -1
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/nuxt/index.d.ts +1 -1
- package/dist/src/public/nuxt/index.js +1 -1
- package/dist/src/public/nuxt/module.d.ts +10 -24
- package/dist/src/public/nuxt/module.js +1 -1
- package/dist/src/public/nuxt/routing.d.ts +5 -39
- package/dist/src/public/nuxt/routing.js +1 -1
- package/dist/src/public/nuxt/vercel-services.d.ts +117 -0
- package/dist/src/public/nuxt/vercel-services.js +1 -0
- package/dist/src/public/tools/defaults.d.ts +3 -3
- package/dist/src/runtime/framework-tools/index.d.ts +3 -2
- package/dist/src/runtime/framework-tools/index.js +1 -1
- package/dist/src/runtime/framework-tools/skill.d.ts +6 -1
- package/dist/src/runtime/framework-tools/skill.js +1 -1
- package/dist/src/runtime/framework-tools/todo.js +1 -1
- package/dist/src/runtime/governance/auth/http-basic.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/gateway-models.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/validate-gateway-key.js +1 -1
- package/dist/src/{public/next → shared}/resolve-eve-binary.d.ts +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +7 -7
- package/docs/extensions.md +115 -77
- package/docs/guides/auth-and-route-protection.md +14 -1
- package/docs/guides/frontend/nuxt.mdx +22 -1
- package/docs/meta.json +1 -0
- package/docs/reference/cli.md +1 -1
- package/docs/schedules.mdx +1 -1
- package/docs/skills.mdx +1 -1
- package/package.json +5 -5
- package/dist/src/execution/sandbox/bindings/vercel-user-agent.d.ts +0 -6
- package/dist/src/execution/sandbox/bindings/vercel-user-agent.js +0 -1
- package/dist/src/execution/workflow-skill-root.d.ts +0 -6
- package/dist/src/execution/workflow-skill-root.js +0 -1
- package/dist/src/public/nuxt/vercel-json.d.ts +0 -17
- package/dist/src/public/nuxt/vercel-json.js +0 -1
- /package/dist/src/{public/next → shared}/resolve-eve-binary.js +0 -0
|
@@ -184,4 +184,4 @@ declare class SlackWebhookParseError extends SlackWebhookError {
|
|
|
184
184
|
constructor(message: string);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
export { type
|
|
187
|
+
export { type SlackWebhookVerifier as S, type SlackParseOptions as a, type SlackWebhookPayload as b, type SlackReadOptions as c, type SlackVerifyOptions as d, type SlackHeaders as e, type SlackAction as f, type SlackAppMentionPayload as g, type SlackBlockActionsPayload as h, type SlackBlockSuggestionPayload as i, type SlackContinuation as j, type SlackDirectMessagePayload as k, type SlackEventBasePayload as l, type SlackFile as m, type SlackHeaderValue as n, type SlackRetry as o, type SlackSlashCommandPayload as p, type SlackUnsupportedPayload as q, type SlackUrlVerificationPayload as r, type SlackUser as s, type SlackViewClosedPayload as t, type SlackViewStateValue as u, type SlackViewSubmissionPayload as v, SlackWebhookError as w, SlackWebhookParseError as x, SlackWebhookVerificationError as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a as SlackParseOptions, b as SlackWebhookPayload, c as SlackReadOptions, d as SlackVerifyOptions, e as SlackHeaders } from './types-CdGmMyOr.js';
|
|
2
|
+
export { f as SlackAction, g as SlackAppMentionPayload, h as SlackBlockActionsPayload, i as SlackBlockSuggestionPayload, j as SlackContinuation, k as SlackDirectMessagePayload, l as SlackEventBasePayload, m as SlackFile, n as SlackHeaderValue, o as SlackRetry, p as SlackSlashCommandPayload, q as SlackUnsupportedPayload, r as SlackUrlVerificationPayload, s as SlackUser, t as SlackViewClosedPayload, u as SlackViewStateValue, v as SlackViewSubmissionPayload, w as SlackWebhookError, x as SlackWebhookParseError, y as SlackWebhookVerificationError, S as SlackWebhookVerifier } from './types-CdGmMyOr.js';
|
|
3
3
|
|
|
4
4
|
declare function parseSlackWebhookBody(body: string, options?: SlackParseOptions): SlackWebhookPayload;
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseFormatConverter, Root, AdapterPostableMessage, Logger, CardElement, Adapter, ChatInstance, WebhookOptions, RawMessage, Message, FetchOptions, FetchResult, ThreadInfo, UserInfo, FormattedContent, Attachment } from '#compiled/chat/index.js';
|
|
2
2
|
import { TwilioMessageResource, TwilioCredential, TwilioFetch, TwilioApiOptions } from './api.js';
|
|
3
|
-
import {
|
|
3
|
+
import { T as TwilioWebhookPayload, a as TwilioWebhookUrl, b as TwilioWebhookVerifier, c as TwilioMediaPayload } from './types-WYjTBVDi.js';
|
|
4
4
|
|
|
5
5
|
declare class TwilioFormatConverter extends BaseFormatConverter {
|
|
6
6
|
toAst(text: string): Root;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as e,Et as t,Ft as n,Mt as r,b as i,bt as a,kt as o,tt as s,u as c}from"../../_chunks/node/dist-BweCayKF.js";import{a as l,d as u,f as d,i as f,u as p}from"../../_chunks/node/dist-DvkWiagq.js";import{n as m,r as h,t as g}from"../../_chunks/node/chunk-PFJ2G64A-B79fSABi.js";import{a as _,l as v,o as y,r as b,s as x}from"../../_chunks/node/chunk-5OX2R7AJ-CxVV-owP.js";import{a as S,n as C,r as w}from"../../_chunks/node/chunk-QZV7YRVM-Dzw4WEBv.js";function T(e){return l(e).replace(/\*/g,``)}var E=class extends s{toAst(e){return t(e)}fromAst(e){return o(n(structuredClone(e),e=>a(e)?{type:`code`,value:r(e)}:e)).trim()}renderPostable(e){return typeof e==`string`?e:`raw`in e?e.raw:`markdown`in e?this.fromMarkdown(e.markdown):`ast`in e?this.fromAst(e.ast):super.renderPostable(e)}};function D(e){return`twilio:${encodeURIComponent(e.sender)}:${encodeURIComponent(e.recipient)}`}function O(e){let[t,n,r]=e.split(`:`);if(t!==`twilio`||!n||!r)throw new f(`twilio`,`Invalid Twilio thread ID: ${e}`);return{recipient:decodeURIComponent(r),sender:decodeURIComponent(n)}}function k(e){let t=O(e);return`twilio:${encodeURIComponent(t.sender)}`}function A(){return new Response(`<Response></Response>`,{headers:{"content-type":`application/xml`},status:200})}function j(e){return e.startsWith(`MG`)?{messagingServiceSid:e}:{from:e}}function M(e){return e?.startsWith(`image/`)?`image`:e?.startsWith(`video/`)?`video`:e?.startsWith(`audio/`)?`audio`:`file`}var N=class{name=`twilio`;lockScope=`channel`;persistThreadHistory=!0;userName;chat=null;accountSid;apiUrl;authToken;fetch;formatConverter=new E;logger;messagingServiceSid;phoneNumber;statusCallbackUrl;webhookUrl;webhookVerifier;constructor(e={}){this.accountSid=e.accountSid,this.apiUrl=e.apiUrl,this.authToken=e.authToken,this.fetch=e.fetch,this.logger=e.logger??new c(`info`).child(`twilio`),this.messagingServiceSid=e.messagingServiceSid??process.env.TWILIO_MESSAGING_SERVICE_SID,this.phoneNumber=e.phoneNumber??process.env.TWILIO_PHONE_NUMBER,this.statusCallbackUrl=e.statusCallbackUrl,this.userName=e.userName??`bot`,this.webhookUrl=e.webhookUrl,this.webhookVerifier=e.webhookVerifier}async initialize(e){this.chat=e,this.logger.info(`Twilio adapter initialized`,{messagingServiceSid:this.messagingServiceSid,phoneNumber:this.phoneNumber})}async handleWebhook(e,t){let n;try{n=await S(e,{authToken:this.authToken,webhookUrl:this.webhookUrl,webhookVerifier:this.webhookVerifier})}catch(e){if(e instanceof w)return new Response(`Invalid signature`,{status:401});if(e instanceof C)return new Response(`Invalid webhook`,{status:400});throw e}if(n.kind!==`text`||!this.chat)return A();let r=this.encodeThreadId({recipient:n.from,sender:n.to}),i=this.parseTwilioTextPayload(n,r);return this.chat.processMessage(this,r,i,t),A()}async postMessage(e,t){let n=this.decodeThreadId(e),r=this.renderPostableText(t),i=this.mediaUrls(t);if(!r&&i.length===0)throw new f(`twilio`,`Message text cannot be empty`);let a=await v({...this.apiOptions(),body:r||i.length===0?h(r):void 0,mediaUrl:i,statusCallbackUrl:this.statusCallbackUrl,to:n.recipient,...j(n.sender)});return{id:a.sid,raw:a,threadId:this.threadIdForResource(a,n)}}async editMessage(){throw new e(`Twilio does not support editing sent messages`,`editMessage`)}async deleteMessage(e,t){await b({...this.apiOptions(),messageSid:t})}async addReaction(){throw new e(`Twilio does not support message reactions`,`addReaction`)}async removeReaction(){throw new e(`Twilio does not support message reactions`,`removeReaction`)}async startTyping(){}parseMessage(e){if(F(e)){if(e.kind!==`text`)throw new f(`twilio`,`Cannot parse unsupported webhook`);return this.parseTwilioTextPayload(e,this.encodeThreadId({recipient:e.from,sender:e.to}))}return this.parseTwilioResource(e,void 0)}async fetchMessage(e,t){let n=this.decodeThreadId(e);try{let e=await y({...this.apiOptions(),messageSid:t});return this.parseTwilioResource(e,n)}catch{return null}}async fetchMessages(e,t={}){let n=this.decodeThreadId(e),r=t.limit??50,[i,a]=await Promise.all([x({...this.apiOptions(),from:n.sender,limit:r,to:n.recipient}),x({...this.apiOptions(),from:n.recipient,limit:r,to:n.sender})]);return{messages:[...i,...a].map(e=>this.parseTwilioResource(e,n)).sort((e,t)=>e.metadata.dateSent.getTime()-t.metadata.dateSent.getTime()).slice(-r)}}async fetchThread(e){let t=this.decodeThreadId(e);return{channelId:this.channelIdFromThreadId(e),channelName:t.sender,id:e,isDM:!0,metadata:{...t}}}async getUser(e){return{fullName:e,isBot:!1,userId:e,userName:e}}async openDM(e){return this.encodeThreadId({recipient:e,sender:this.defaultSender()})}isDM(e){return e.startsWith(`twilio:`)}channelIdFromThreadId(e){return k(e)}encodeThreadId(e){return D(e)}decodeThreadId(e){return O(e)}renderFormatted(e){return this.formatConverter.fromAst(e)}rehydrateAttachment(e){let t=e.fetchMetadata?.twilioMediaUrl??e.url;return t?this.twilioAttachment({contentType:e.mimeType,url:t}):e}parseTwilioTextPayload(e,t){return new i({attachments:e.media.map(e=>this.twilioAttachment(e)),author:this.author(e.from,!1),formatted:this.formatConverter.toAst(e.body),id:e.messageSid??`twilio:${Date.now()}`,metadata:{dateSent:new Date,edited:!1},raw:e,text:e.body,threadId:t})}parseTwilioResource(e,t){let n=e.direction?.startsWith(`outbound`)??!1,r=e.from??e.messaging_service_sid??(n?t?.sender:t?.recipient),a=e.to??(n?t?.recipient:t?.sender);if(!(r&&a))throw new f(`twilio`,`Twilio message is missing routing`);let o=e.body??``,s=n?{recipient:t?.recipient??a,sender:t?.sender??r}:{recipient:r,sender:a};return new i({attachments:[],author:this.author(n?s.sender:r,n),formatted:this.formatConverter.toAst(o),id:e.sid,metadata:{dateSent:I(e.date_sent??e.date_created),edited:!1},raw:e,text:o,threadId:this.encodeThreadId(s)})}renderPostableText(e){let t=p(e);return m(t?T(t):this.formatConverter.renderPostable(e),{limit:g}).text}mediaUrls(e){if(u(e).length>0)throw new f(`twilio`,`Twilio adapter supports media attachments by public URL only`);let t=d(e),n=[];for(let e of t){if(typeof e.url!=`string`||e.url.length===0)throw new f(`twilio`,`Twilio adapter supports media attachments by public URL only`);n.push(e.url)}return n}twilioAttachment(e){return{fetchData:async()=>Buffer.from(await _({...this.apiOptions(),url:e.url})),fetchMetadata:{twilioMediaUrl:e.url},mimeType:e.contentType,type:M(e.contentType),url:e.url}}apiOptions(){return{apiUrl:this.apiUrl,credentials:{accountSid:this.accountSid,authToken:this.authToken},fetch:this.fetch}}defaultSender(){let e=this.phoneNumber??this.messagingServiceSid;if(!e)throw new f(`twilio`,`phoneNumber or messagingServiceSid is required`);return e}author(e,t){return{fullName:e,isBot:t,isMe:t,userId:e,userName:e}}threadIdForResource(e,t){return this.parseTwilioResource(e,t).threadId}};function P(e={}){return new N(e)}function F(e){return`kind`in e}function I(e){let t=e?new Date(e):new Date;return Number.isNaN(t.getTime())?new Date:t}export{N as TwilioAdapter,E as TwilioFormatConverter,T as cardToTwilioText,P as createTwilioAdapter};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { T as TwilioWebhookPayload, a as TwilioWebhookUrl, d as TwilioVerifyOptions, e as TwilioVerifiedRequest, f as TwilioReadOptions } from './types-WYjTBVDi.js';
|
|
2
|
+
export { g as TwilioHeaderValue, h as TwilioHeaders, c as TwilioMediaPayload, i as TwilioStatusPayload, j as TwilioTextPayload, k as TwilioUnsupportedPayload, l as TwilioWebhookError, m as TwilioWebhookParseError, n as TwilioWebhookVerificationError, b as TwilioWebhookVerifier } from './types-WYjTBVDi.js';
|
|
3
3
|
import './api.js';
|
|
4
4
|
|
|
5
5
|
declare function parseTwilioWebhookBody(params: URLSearchParams): TwilioWebhookPayload;
|