eve 0.76.3 → 0.78.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 +43 -0
- package/dist/src/channel/adapter.d.ts +13 -4
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/send-input.d.ts +6 -2
- package/dist/src/channel/send-input.js +1 -1
- package/dist/src/channel/session.js +1 -1
- package/dist/src/chunks/{use-eve-agent-BtKWTEpm.js → use-eve-agent-B8brxCk-.js} +46 -28
- package/dist/src/chunks/{use-eve-agent-jI6EsYAu.js → use-eve-agent-BSYe_Re7.js} +46 -28
- package/dist/src/cli/commands/vercel-non-interactive.d.ts +5 -3
- package/dist/src/cli/commands/vercel-non-interactive.js +1 -1
- package/dist/src/client/eve-agent-store.d.ts +2 -2
- package/dist/src/client/message-response.d.ts +2 -0
- package/dist/src/client/message-response.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +9 -9
- package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +6 -1
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/google/index.d.ts +16 -3
- package/dist/src/compiled/@ai-sdk/google/index.js +6 -6
- package/dist/src/compiled/@ai-sdk/mcp/index.d.ts +681 -348
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.d.ts +56 -42
- package/dist/src/compiled/@ai-sdk/openai/index.js +5 -3
- package/dist/src/compiled/@ai-sdk/otel/index.js +3 -3
- package/dist/src/compiled/@ai-sdk/provider/index.d.ts +49 -15
- package/dist/src/compiled/@ai-sdk/provider/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/provider-utils/index.d.ts +4 -1
- package/dist/src/compiled/_chunks/workflow/{dist-DXLdlucM.js → dist-C8k3N3BQ.js} +2 -4
- package/dist/src/compiled/_chunks/workflow/dist-DsNhwdzf.js +1 -0
- package/dist/src/compiled/_chunks/workflow/experimental-decision-DlvnsBD-.js +3 -0
- package/dist/src/compiler/extension-compatibility.d.ts +18 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/context/dynamic-model-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +16 -0
- package/dist/src/context/keys.js +1 -1
- package/dist/src/evals/judge.js +1 -1
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/types.d.ts +14 -1
- package/dist/src/execution/agent-sessions/steps.d.ts +2 -0
- package/dist/src/execution/agent-sessions/steps.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.js +1 -1
- package/dist/src/execution/catalog/connection-entry.js +1 -1
- package/dist/src/execution/catalog/search.js +1 -1
- package/dist/src/execution/catalog/step-catalog.d.ts +12 -3
- package/dist/src/execution/catalog/step-catalog.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +1 -2
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/publish-session-events.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-container.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/sandbox/read-file.d.ts +5 -5
- package/dist/src/execution/sandbox/read-file.js +2 -2
- package/dist/src/execution/sandbox/session.d.ts +6 -0
- package/dist/src/execution/sandbox/session.js +2 -2
- package/dist/src/execution/session/active-turn.d.ts +9 -1
- package/dist/src/execution/session/active-turn.js +1 -1
- package/dist/src/execution/session/checkpoint-migrations.js +1 -1
- package/dist/src/execution/session/end-sandbox-step.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +1 -1
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn.d.ts +11 -4
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-inbox/inbox.d.ts +3 -0
- package/dist/src/execution/session-inbox/inbox.js +1 -1
- package/dist/src/execution/session-workflow-tool-run.d.ts +14 -12
- package/dist/src/execution/session-workflow-tool-run.js +1 -1
- package/dist/src/execution/tasks/start.d.ts +14 -1
- package/dist/src/execution/tasks/start.js +1 -1
- package/dist/src/execution/tasks/steps.d.ts +7 -4
- package/dist/src/execution/tasks/steps.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/workflow/apply-run-messages-step.d.ts +20 -0
- package/dist/src/execution/tools/workflow/apply-run-messages-step.js +1 -0
- package/dist/src/execution/tools/workflow/ask.d.ts +0 -1
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/interrupt.d.ts +5 -2
- package/dist/src/execution/tools/workflow/interrupt.js +1 -1
- package/dist/src/execution/tools/workflow/messages.d.ts +14 -0
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +18 -6
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/start.d.ts +10 -0
- package/dist/src/execution/tools/workflow/start.js +1 -1
- package/dist/src/execution/tools/workflow/step.js +1 -1
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +12 -0
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -1
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/web-fetch/request.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +18 -3
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/harness/attachment-staging.d.ts +13 -12
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/harness/compaction/step.js +1 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/hitl/approvals.d.ts +4 -7
- package/dist/src/harness/hitl/approvals.js +1 -1
- package/dist/src/harness/hitl/approved-calls.d.ts +11 -0
- package/dist/src/harness/hitl/approved-calls.js +1 -1
- package/dist/src/harness/hitl/candidates.d.ts +0 -4
- package/dist/src/harness/hitl/candidates.js +1 -1
- package/dist/src/harness/hitl/delivery.d.ts +0 -1
- package/dist/src/harness/hitl/delivery.js +1 -1
- package/dist/src/harness/hitl/index.d.ts +2 -2
- package/dist/src/harness/hitl/index.js +1 -1
- package/dist/src/harness/hitl/intake.d.ts +2 -2
- package/dist/src/harness/hitl/intake.js +1 -1
- package/dist/src/harness/model-call/call.js +1 -1
- package/dist/src/harness/model-call/errors.d.ts +10 -0
- package/dist/src/harness/model-call/errors.js +1 -1
- package/dist/src/harness/model-call/run.js +1 -1
- package/dist/src/harness/session-machine/state.d.ts +0 -2
- package/dist/src/harness/session-machine/transitions.js +1 -1
- package/dist/src/harness/session-machine/view.d.ts +0 -3
- package/dist/src/harness/session-machine/view.js +1 -1
- package/dist/src/harness/step/after-model.js +1 -1
- package/dist/src/harness/token-estimate.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/application/stamped-package-version.js +1 -1
- package/dist/src/internal/attachments/data.d.ts +29 -10
- package/dist/src/internal/attachments/data.js +1 -1
- package/dist/src/internal/attachments/errors.d.ts +2 -2
- package/dist/src/internal/attachments/media-metadata.d.ts +15 -0
- package/dist/src/internal/attachments/media-metadata.js +1 -1
- package/dist/src/internal/attachments/public-link.d.ts +5 -0
- package/dist/src/internal/attachments/public-link.js +1 -0
- package/dist/src/internal/attachments/sandbox-refs.d.ts +7 -6
- package/dist/src/internal/attachments/sandbox-refs.js +1 -1
- package/dist/src/internal/attachments/url-refs.js +1 -1
- package/dist/src/protocol/message.d.ts +7 -0
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/public/channels/attachment-error.d.ts +14 -0
- package/dist/src/public/channels/attachment-error.js +1 -0
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +1 -1
- package/dist/src/public/channels/discord/defaults.js +1 -1
- package/dist/src/public/channels/github/defaults.js +1 -1
- package/dist/src/public/channels/index.d.ts +2 -0
- package/dist/src/public/channels/index.js +1 -1
- package/dist/src/public/channels/linear/defaults.js +1 -1
- package/dist/src/public/channels/slack/api.d.ts +10 -0
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/approval-cards.js +1 -1
- package/dist/src/public/channels/slack/attachments.d.ts +29 -19
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/defaults.js +1 -1
- package/dist/src/public/channels/slack/inbound.d.ts +6 -0
- package/dist/src/public/channels/slack/inbound.js +1 -1
- package/dist/src/public/channels/slack/interaction-cards.d.ts +6 -0
- package/dist/src/public/channels/slack/interaction-cards.js +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/defaults.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/telegram/defaults.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/channels/twilio/defaults.js +1 -1
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/runtime/channels/registry.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/scaffold/update/web-options.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +2 -1
- package/dist/src/shared/channel-definition.d.ts +16 -4
- package/dist/src/svelte/index.d.ts +0 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/read-file.d.ts +3 -2
- package/dist/src/tools/provided/read-file.js +2 -2
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- package/dist/src/vue/index.d.ts +0 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +12 -4
- package/docs/channels/chat-sdk.mdx +1 -1
- package/docs/channels/custom.mdx +30 -3
- package/docs/channels/eve.mdx +34 -0
- package/docs/channels/slack.mdx +5 -1
- package/docs/concepts/built-in-tools.md +10 -10
- package/docs/concepts/sessions-runs-and-streaming.md +2 -2
- package/docs/evals/overview.mdx +1 -1
- package/docs/guides/client/streaming.mdx +1 -1
- package/docs/guides/dynamic-capabilities.md +6 -2
- package/docs/memory/custom-provider.md +3 -1
- package/docs/sandbox/index.mdx +10 -4
- package/docs/tools/human-in-the-loop.md +1 -1
- package/docs/tools/overview.mdx +1 -1
- package/package.json +11 -11
- package/dist/src/compiled/_chunks/workflow/experimental-decision-BrfWf6-n.js +0 -3
- package/dist/src/context/caller-scope.d.ts +0 -7
- package/dist/src/context/caller-scope.js +0 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +0 -13
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +0 -1
- package/dist/src/harness/hitl/approved-call-callers.d.ts +0 -14
- package/dist/src/harness/hitl/approved-call-callers.js +0 -1
- package/dist/src/internal/attachments/refs.d.ts +0 -55
- package/dist/src/internal/attachments/refs.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# eve
|
|
2
2
|
|
|
3
|
+
## 0.78.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9559de8: Approved calls now always run as the requester. This closes a privilege escalation: when another person approved a call, it ran with the approver's identity and credentials, so a requester could get a tool to act with access they don't have. The call now keeps the identity and credentials of the person whose turn requested it, and approved workflow and agent calls are rechecked before dispatch. This reverses the execution-identity rule from #4368. Tools that should only proceed for certain approvers can still check `response.principal` in their `approval.response` policy.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- db71190: A dynamic resolver no longer adds the catalog tools (`eve__search`, `eve__tool`, and `eve__skill`) on its own. eve adds the catalog tools once a session reaches something they find, call, or load, such as a deferred entry a resolver returns, and keeps them for the rest of the session. Agents whose resolvers return only listed tools no longer see these tools or spend steps searching.
|
|
12
|
+
- 4ef1ad9: Workflow tools and the agents they open start faster. Tasks begin work sooner, `ctx.agent().send()` no longer waits for the agent's session to boot, a model step that starts several workflow tool runs starts them in parallel, and a fan-out's agent starts, progress, and results reach the session in batches instead of one at a time.
|
|
13
|
+
- f3dbd0c: Keep an over-budget turn waiting for input until its continuation question is answered. Continue resumes the same turn, queued messages wait for the answer, and cancellation withdraws the question.
|
|
14
|
+
- 7f87e28: Emit sign-in requests for executing tools even when a sibling call in the same model step needs approval.
|
|
15
|
+
- 3e7bbb2: Emit `turn.waiting` with `on: "tasks"` when a model step parks on blocking workflow execute calls, including calls dispatched after approval. Task and agent receipt dispatches do not emit a wait; their actual task waits report the park.
|
|
16
|
+
- 3445e89: Sandbox commands now run with `AI_AGENT=eve` by default, so agent-aware CLIs such as `vercel` switch to their non-interactive agent mode. Set `AI_AGENT` in the environment's `env` option, or in the `env` of one `run()` or `spawn()` call, to override it.
|
|
17
|
+
- db71190: `eve__search` results now include `searched`, the number of entries the query covered, and `remaining`, the number of matches past `limit`, so the model can tell after one search how much is left to find. Its description now tells the model to search only when nothing in its tool list fits the request.
|
|
18
|
+
|
|
19
|
+
## 0.77.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 0248e69: eve now downloads attachment links itself instead of handing them to the model provider. When a channel's `fetchFile` returns `null`, or the channel has none, eve fetches a public `https:` link with the 25 MB upload cap and a 30-second timeout, at most 10 links per message and one at a time, and any other link or failed download reaches the model as a note. A private or expired link, such as a Google Drive file shared in Slack, no longer fails every later model call, and sessions that already hold such a link recover.
|
|
24
|
+
- 0248e69: `read_file` now shows PDFs up to 20 MiB to the model as files, so the agent can reopen an attached PDF after compaction, or read one that a tool or `bash` wrote to the sandbox. Its output's `image` field is now `file` and carries `pages` for PDFs. `read_file` also refuses images over 8000 pixels per side, which providers reject.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- b6b353f: A custom channel's `fetchFile` can throw `attachmentError(message)` from `eve/channels` to tell the model why a file didn't arrive, such as a size limit, while the original error stays in operator logs. `fetchFile` now types the `session` it already receives, and `eve/channels` exports the `FetchFileFunction`, `FetchFileContext`, and `FetchFileResult` types for resolvers written in their own module.
|
|
29
|
+
- 0248e69: Every attachment now reaches the model with a label that names its sandbox path, including images and PDFs that also arrive as bytes, so the agent can pass a visible file to `bash` or open it again. eve checks image and PDF media types against the file's bytes. Only PNG, JPEG, GIF, and WebP images up to 3 MiB and 8000 pixels per side, and PDFs up to 20 MiB, go to the model as bytes, and tool results follow the same rule. A HEIC photo, an oversized screenshot, or a mislabeled file renders as its label instead of failing the model call. Live sessions pay one prompt-cache rewrite after upgrading.
|
|
30
|
+
- 0248e69: A turn cancelled before its first model call now stages its attachments, so a photo sent just before a follow-up message no longer breaks every later turn. File parts eve can't stage become a note instead of entering session history. Byte-valued file parts cross the queue as `data:` URLs, a string with any URL scheme reaches the channel's `fetchFile` instead of being decoded as base64, and `message.received` reports an inline file's size instead of echoing its `data:` URL.
|
|
31
|
+
- caf61ff: `cancel()` from `useEveAgent()` and `EveAgentStore` now stops a turn that an approval or other input answer resumed. Previously it sent no cancel request and the resumed turn ran to completion. `MessageResponse.cancel()` on a `ClientSession.respond()` response now targets that resumed turn too.
|
|
32
|
+
- 351f66d: Memory recalled on `compaction.completed` during a turn now joins history before the turn's latest user message, where `turn.started` recall goes, instead of after it. The question stays the last user message the model reads, with client context between the recalled memory and the question. Compaction between turns still appends the recall.
|
|
33
|
+
- 8f50d9d: A connection tool call no longer fails with `Unrecognized key` when the model sends a key the connection supplies through `toolCall.providedArguments`. eve drops the model's value and the provided value is used, as documented.
|
|
34
|
+
- b6b353f: `eveChannel()` accepts `fetchFile`, so a web client can upload a large file to its own storage and send only the URL. eve loads the file inside the workflow step, past the platform's request body limit. `defineChannel` and `eveChannel` take an `uploadPolicy` that eve now applies to every staged file, including URLs it downloads itself, on the final bytes and their verified media type. Slack, Telegram, and Teams apply their own `uploadPolicy` the same way. A file over the cap or of a disallowed type reaches the model as a note. An `eveChannel` with `uploadPolicy` or `fetchFile` reports its instrumentation kind as `channel:eve` instead of `http`, as one with `events` already does.
|
|
35
|
+
- 66ed5f9: Importing `eve/next` from a `node -e` script, such as the loader `vercel dev` uses for `next.config.*`, no longer throws `ERR_INVALID_ARG_VALUE` for `"[eval]"`.
|
|
36
|
+
- 15177c6: Fix a second, never-settling `web_search` part under AI Gateway. eve no longer streams input for provider tools such as `web_search`, so each search shows up once, under the call id it runs and settles with.
|
|
37
|
+
- 2eb861a: `eve/vue` and `eve/svelte` no longer export the internal session projection types `SessionAuthorization`, `SessionCall`, `SessionCallStatus`, and `SessionProjection`, matching `eve/react`. Use `ToolCallStatus` and `toolCallState()` to read a tool call's status.
|
|
38
|
+
- 88edd75: just-bash sandboxes now start when the app runs from a different path than the one it was built in. The prepared artifact stores the template key, and eve resolves it under the runtime sandbox cache, so copying `.output` and `.eve/sandbox-cache` to a new root no longer fails with `SandboxTemplateNotProvisionedError`.
|
|
39
|
+
- dd4374e: Agents that use `mockModel` from `eve/evals` now compile without `modelContextWindowTokens`. Before, the documented one-line `mockModel` example failed with a missing AI Gateway context window error; mock models now default to a 1,000,000-token window.
|
|
40
|
+
- 85d1fcb: Slack now removes the buttons from every settled tool-approval card when one step posts many approvals. Before, a grouped message could grow past Slack's 50-block limit as cards settled, Slack rejected the update, and settled cards kept their Approve and Cancel buttons. A settled card now shows the outcome and who answered on the card itself instead of in extra lines below it.
|
|
41
|
+
- 13998d2: The Slack channel now collects every file posted in a thread since the previous mention of the app, up to 10 messages back, instead of only the newest message's files, so a file shared before a follow-up question reaches the agent. It skips Google Drive, Dropbox, and other remote files, whose links stay in the message text, keeps audio and video attachments, and stops a file download after 30 seconds.
|
|
42
|
+
- b56b4ff: A model stream that stops sending output without closing no longer holds the turn forever. After 10 minutes without output eve abandons the stream and retries the model call, and the turn fails normally once retries run out. Time spent running tools does not count toward the timeout. eve now requires `ai` 7.0.137 or later.
|
|
43
|
+
- 5d37843: When a failed turn ends the session, built-in channels now post one notice telling the person to start over, instead of a "please try again" notice followed by a "start a new session" notice for the same error. `turn.failed` events now carry `terminal: true` when `session.failed` follows (and `false` when the session waits for the next message), so custom channel handlers can make the same choice.
|
|
44
|
+
- 11392bd: `eve link --non-interactive --project <name>` and `eve deploy --non-interactive --yes --project <name>` now link a multi-agent workspace from its root instead of failing with "No eve agent in this directory", so a fresh CI checkout can link and deploy every agent without a prompt.
|
|
45
|
+
|
|
3
46
|
## 0.76.3
|
|
4
47
|
|
|
5
48
|
### Patch Changes
|
|
@@ -3,6 +3,7 @@ import type { StepInput } from "#harness/types.js";
|
|
|
3
3
|
import type { UnstampedMessageStreamEvent } from "#protocol/message.js";
|
|
4
4
|
import type { SessionHandle } from "#channel/session.js";
|
|
5
5
|
import type { DeliverPayload } from "#channel/types.js";
|
|
6
|
+
import type { UploadPolicy } from "#public/channels/upload-policy.js";
|
|
6
7
|
import type { FetchFileContext, FetchFileResult, FetchFileFunction } from "#shared/channel-definition.js";
|
|
7
8
|
import type { ChannelAudienceProjector } from "#channel/audience.js";
|
|
8
9
|
/**
|
|
@@ -115,15 +116,23 @@ export type ChannelAdapter<TCtx extends ChannelAdapterContext<any> = ChannelAdap
|
|
|
115
116
|
/**
|
|
116
117
|
* Fetches bytes for a URL encountered in `FilePart.data`.
|
|
117
118
|
*
|
|
118
|
-
* Called by the staging pipeline when it encounters a
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
119
|
+
* Called by the staging pipeline when it encounters a link on a
|
|
120
|
+
* `FilePart`. Return bytes or {@link FetchFileResult} to stage the file
|
|
121
|
+
* to the sandbox. Return `null` when the link is not this channel's: eve
|
|
122
|
+
* then downloads a public `https:` link itself, and any other link
|
|
123
|
+
* reaches the model as a note.
|
|
122
124
|
*
|
|
123
125
|
* Credentials should be captured in the closure at channel
|
|
124
126
|
* construction time.
|
|
125
127
|
*/
|
|
126
128
|
readonly fetchFile?: FetchFileFunction;
|
|
129
|
+
/**
|
|
130
|
+
* Upload policy staging applies to every inbound attachment, on its final
|
|
131
|
+
* bytes and verified media type, including links eve downloads itself.
|
|
132
|
+
* Without one, staging checks nothing and eve's own downloads stop at the
|
|
133
|
+
* framework default size.
|
|
134
|
+
*/
|
|
135
|
+
readonly uploadPolicy?: UploadPolicy;
|
|
127
136
|
/**
|
|
128
137
|
* Framework-owned observability projection for the active channel.
|
|
129
138
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSession,sessionCallbackToTurnCaller}from"#channel/session.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{normalizeSendInput,
|
|
1
|
+
import{createSession,sessionCallbackToTurnCaller}from"#channel/session.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{normalizeSendInput,serializeFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{isReservedSessionCommandToken}from"#execution/session-inbox/address.js";function createChannelAddress(e){let t=e.metadata??{},n=`${e.channelName}:${e.continuationToken}`;if(isReservedSessionCommandToken(n))throw Error(`Channel address "${n}" uses eve's reserved session namespace.`);return{continuationToken:e.continuationToken,async deliver(r,i){let a=t.channelKind!==void 0&&t.channelName!==void 0?createChannelDeliveryMetadata(t):void 0,o=normalizeSendInput(r),s=sessionCallbackToTurnCaller(i.callback),c={auth:i.auth,delivery:a,kind:`send`,payload:{...o,message:serializeFilePartsInMessage(o.message)},requestId:t.requestId,turnPolicy:o.message===void 0?void 0:i.turnPolicy??e.turnPolicy??DEFAULT_TURN_POLICY},l=s===void 0?c:{...c,caller:s},u=i.state,d={adapter:u===void 0?e.adapter:{...e.adapter,state:{...e.adapter.state,...u}},auth:i.auth,capabilities:{requestInput:!0},callback:i.callback,channelName:e.channelName,continuationConflictCommand:l,continuationToken:n,delivery:a,initiatorAuth:i.initiatorAuth,input:{context:o.context,message:serializeFilePartsInMessage(o.message)??``,outputSchema:o.outputSchema,state:o.state},requestId:t.requestId,title:i.title},toSession=n=>createSession(n,e.runtime,{...t,turnPolicy:e.turnPolicy}),f=await e.runtime.dispatchContinuation({command:l,continuationToken:n,successor:d});if(f.status===`accepted`)return toSession(f.sessionId);if(o.inputResponses&&o.inputResponses.length>0)throw Error(`Cannot deliver inputResponses — the target session was not found via continuation token.`);return toSession((await e.runtime.createSession(d)).sessionId)},async send(e,t){return await this.deliver({message:e},t)},async respond(e,t){if(e===void 0||e.length===0)throw Error(`respond() requires at least one input response.`);return await this.deliver({inputResponses:e},t)},async cancel(t){return await e.runtime.dispatchContinuation({command:{kind:`cancel`,turnId:t?.turnId},continuationToken:n})},async compact(){return await e.runtime.dispatchContinuation({command:{kind:`compact`},continuationToken:n})},async clear(){return await e.runtime.dispatchContinuation({command:{kind:`clear`},continuationToken:n})},async reset(t){return await e.runtime.dispatchContinuation({command:{kind:`reset`,reason:t?.reason},continuationToken:n})},async resolveSession(){let r=await e.runtime.resolveContinuation(n);return r===void 0?void 0:createSession(r.sessionId,e.runtime,{...t,turnPolicy:e.turnPolicy})}}}function createChannelAddressFn(e){return t=>createChannelAddress({...e,continuationToken:t})}export{createChannelAddress,createChannelAddressFn};
|
|
@@ -2,5 +2,9 @@ import type { UserContent } from "ai";
|
|
|
2
2
|
import type { SendPayload } from "#channel/routes.js";
|
|
3
3
|
/** Normalizes the shorthand input forms accepted by channel and session sends. */
|
|
4
4
|
export declare function normalizeSendInput(input: string | UserContent | SendPayload): SendPayload;
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Serializes file parts before input crosses the durable boundary: `URL`s
|
|
7
|
+
* become `eve-url:` markers and bytes become `data:` URLs, so no world
|
|
8
|
+
* serializer has to round-trip a `URL` or a typed array.
|
|
9
|
+
*/
|
|
10
|
+
export declare function serializeFilePartsInMessage(message: string | UserContent | undefined): string | UserContent | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{serializeUrlFilePart}from"#internal/attachments/url-refs.js";function normalizeSendInput(e){return typeof e==`string`||Array.isArray(e)?{message:e}:e}function
|
|
1
|
+
import{serializeUrlFilePart}from"#internal/attachments/url-refs.js";function normalizeSendInput(e){return typeof e==`string`||Array.isArray(e)?{message:e}:e}function serializeFilePartsInMessage(e){if(e===void 0||typeof e==`string`)return e;let t=!1,n=e.map(e=>{if(e.type!==`file`)return e;if(e.data instanceof URL&&e.data.protocol!==`data:`)return t=!0,{...e,data:serializeUrlFilePart(e.data)};if(e.data instanceof Uint8Array||e.data instanceof ArrayBuffer){t=!0;let n=Buffer.from(new Uint8Array(e.data)).toString(`base64`);return{...e,data:`data:${e.mediaType};base64,${n}`}}return e});return t?n:e}export{normalizeSendInput,serializeFilePartsInMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{attachClientContext,readClientContext}from"#internal/client-context.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{
|
|
1
|
+
import{attachClientContext,readClientContext}from"#internal/client-context.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{serializeFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{parseInputResponses}from"#shared/input.js";import{AuthKey,ContinuationHookTokensKey,ContinuationTokenKey,InitiatorAuthKey,SessionIdKey}from"#context/keys.js";import{toChannelLocalContinuationToken}from"#shared/continuation-token.js";function createSession(e,t,n={}){return{id:e,async send(r,i){let a=createDelivery(n),o=sessionCallbackToTurnCaller(i.callback),s=attachClientContext({message:serializeFilePartsInMessage(r)},readClientContext(i));i.context!==void 0&&(s.context=i.context),i.outputSchema!==void 0&&(s.outputSchema=i.outputSchema);let c={auth:i.auth,delivery:a,kind:`send`,payload:s,requestId:n.requestId,turnPolicy:i.turnPolicy??n.turnPolicy??DEFAULT_TURN_POLICY,title:i.title};return await t.dispatchSession({command:o===void 0?c:{...c,caller:o},sessionId:e})},async respond(r,i){if(r.length===0)throw Error(`respond() requires at least one input response.`);let a=parseInputResponses(r),o=sessionCallbackToTurnCaller(i.callback),s=createDelivery(n),c=attachClientContext({inputResponses:a},readClientContext(i));i.context!==void 0&&(c.context=i.context),i.outputSchema!==void 0&&(c.outputSchema=i.outputSchema);let l={auth:i.auth,delivery:s,kind:`send`,payload:c,requestId:n.requestId};return await t.dispatchSession({command:o===void 0?l:{...l,caller:o},sessionId:e})},async cancel(n){let r={kind:`cancel`};return n?.turnId!==void 0&&(r.turnId=n.turnId),await t.dispatchSession({command:r,sessionId:e})},async compact(){return await t.dispatchSession({command:{kind:`compact`},sessionId:e})},async clear(){return await t.dispatchSession({command:{kind:`clear`},sessionId:e})},async reset(n){return await t.dispatchSession({command:{kind:`reset`,reason:n?.reason},sessionId:e})},async getEventStream(n){return t.getEventStream(e,n)},async getStreamTailIndex(){return t.getStreamTailIndex(e)}}}function createAttachSessionFn(e,t={}){return n=>createSession(n,e,t)}function createDelivery(e){return e.channelKind!==void 0&&e.channelName!==void 0?createChannelDeliveryMetadata(e):void 0}function buildSessionHandle(e){return{get id(){return e.get(SessionIdKey)??``},get auth(){return{current:e.get(AuthKey)??null,initiator:e.get(InitiatorAuthKey)??null}},get continuation(){let t=e.get(ContinuationTokenKey);if(t!==void 0&&t.length!==0)return{token:toChannelLocalContinuationToken(t),alias(n){if(n.length===0)throw Error(`A session alias requires a nonempty token.`);let r=namespaceContinuationToken(t,n);t!==r&&(e.set(ContinuationHookTokensKey,e=>{let n=e??[t];return n.includes(r)?n:[...n,r]}),e.set(ContinuationTokenKey,r))}}}}}function namespaceContinuationToken(e,t){let n=e.indexOf(`:`);if(n<=0)throw Error(`Cannot set session continuation token without an existing namespaced continuation token. Start the session with a placeholder continuationToken.`);return`${e.slice(0,n+1)}${t}`}function sessionCallbackToTurnCaller(e){return e===void 0?void 0:{callId:e.callId,replyTo:{kind:`callback`,token:e.token,url:e.url},subagentName:e.subagentName}}export{buildSessionHandle,createAttachSessionFn,createSession,sessionCallbackToTurnCaller};
|
|
@@ -585,33 +585,19 @@ function parseJsonObject$1(body) {
|
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
//#endregion
|
|
588
|
-
//#region src/
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
const error = new Error(toErrorMessage(raw));
|
|
602
|
-
if (!isObject(raw)) return error;
|
|
603
|
-
if (typeof raw.name === "string" && raw.name.length > 0) error.name = raw.name;
|
|
604
|
-
if (typeof raw.stack === "string" && raw.stack.length > 0) error.stack = raw.stack;
|
|
605
|
-
if ("cause" in raw && raw.cause !== void 0 && raw.cause !== raw) error.cause = raw.cause;
|
|
606
|
-
return error;
|
|
607
|
-
}
|
|
608
|
-
function safeJsonStringify(value) {
|
|
609
|
-
try {
|
|
610
|
-
return JSON.stringify(value) ?? String(value);
|
|
611
|
-
} catch {
|
|
612
|
-
return String(value);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
588
|
+
//#region src/internal/attachments/media-metadata.ts
|
|
589
|
+
const PDF_MEDIA_TYPE = "application/pdf";
|
|
590
|
+
const INLINE_IMAGE_MEDIA_TYPES = /* @__PURE__ */ new Set([
|
|
591
|
+
"image/gif",
|
|
592
|
+
"image/jpeg",
|
|
593
|
+
"image/png",
|
|
594
|
+
"image/webp"
|
|
595
|
+
]);
|
|
596
|
+
const VERIFIABLE_MEDIA_TYPES = /* @__PURE__ */ new Set([
|
|
597
|
+
...INLINE_IMAGE_MEDIA_TYPES,
|
|
598
|
+
"image/jpg",
|
|
599
|
+
PDF_MEDIA_TYPE
|
|
600
|
+
]);
|
|
615
601
|
|
|
616
602
|
//#endregion
|
|
617
603
|
//#region src/shared/ulid.ts
|
|
@@ -1751,6 +1737,7 @@ var MessageResponse = class {
|
|
|
1751
1737
|
#cancellation;
|
|
1752
1738
|
#consumed = false;
|
|
1753
1739
|
#createStream;
|
|
1740
|
+
#resumesTurn;
|
|
1754
1741
|
#settled = false;
|
|
1755
1742
|
#turnId = Promise.withResolvers();
|
|
1756
1743
|
constructor(input) {
|
|
@@ -1758,6 +1745,7 @@ var MessageResponse = class {
|
|
|
1758
1745
|
this.sessionId = input.sessionId;
|
|
1759
1746
|
this[acceptedDeliveryId] = input.deliveryId;
|
|
1760
1747
|
this.#createStream = input.createStream;
|
|
1748
|
+
this.#resumesTurn = input.resumesTurn ?? false;
|
|
1761
1749
|
}
|
|
1762
1750
|
cancel() {
|
|
1763
1751
|
if (this.#settled) return Promise.resolve({ status: "no_active_turn" });
|
|
@@ -1793,7 +1781,7 @@ var MessageResponse = class {
|
|
|
1793
1781
|
async *#observeStream(source) {
|
|
1794
1782
|
try {
|
|
1795
1783
|
for await (const event of this.#createStream(source)) {
|
|
1796
|
-
if (event.type === "turn.started") this.#turnId.resolve(event.data.turnId);
|
|
1784
|
+
if (event.type === "turn.started" || this.#resumesTurn && event.type === "input.resolved") this.#turnId.resolve(event.data.turnId);
|
|
1797
1785
|
else if (isCurrentTurnBoundaryEvent(event)) {
|
|
1798
1786
|
this.#settled = true;
|
|
1799
1787
|
this.#turnId.resolve(void 0);
|
|
@@ -1943,6 +1931,35 @@ function withRedirectPolicy$1(init, redirect) {
|
|
|
1943
1931
|
};
|
|
1944
1932
|
}
|
|
1945
1933
|
|
|
1934
|
+
//#endregion
|
|
1935
|
+
//#region src/shared/errors.ts
|
|
1936
|
+
function toErrorMessage(error) {
|
|
1937
|
+
if (error instanceof Error) return error.message;
|
|
1938
|
+
if (typeof error === "string") return error;
|
|
1939
|
+
if (error === null || error === void 0) return String(error);
|
|
1940
|
+
if (isObject(error)) {
|
|
1941
|
+
if (typeof error.message === "string" && error.message.length > 0) return error.message;
|
|
1942
|
+
return safeJsonStringify(error);
|
|
1943
|
+
}
|
|
1944
|
+
return String(error);
|
|
1945
|
+
}
|
|
1946
|
+
function toError(raw) {
|
|
1947
|
+
if (raw instanceof Error) return raw;
|
|
1948
|
+
const error = new Error(toErrorMessage(raw));
|
|
1949
|
+
if (!isObject(raw)) return error;
|
|
1950
|
+
if (typeof raw.name === "string" && raw.name.length > 0) error.name = raw.name;
|
|
1951
|
+
if (typeof raw.stack === "string" && raw.stack.length > 0) error.stack = raw.stack;
|
|
1952
|
+
if ("cause" in raw && raw.cause !== void 0 && raw.cause !== raw) error.cause = raw.cause;
|
|
1953
|
+
return error;
|
|
1954
|
+
}
|
|
1955
|
+
function safeJsonStringify(value) {
|
|
1956
|
+
try {
|
|
1957
|
+
return JSON.stringify(value) ?? String(value);
|
|
1958
|
+
} catch {
|
|
1959
|
+
return String(value);
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1946
1963
|
//#endregion
|
|
1947
1964
|
//#region src/shared/json.ts
|
|
1948
1965
|
const INVALID_JSON_VALUE_CANDIDATE = Symbol("invalid-json-value-candidate");
|
|
@@ -2390,6 +2407,7 @@ var ClientSession = class ClientSession {
|
|
|
2390
2407
|
cancelTurn: async (turnId) => await this.cancel({ turnId }),
|
|
2391
2408
|
createStream: (source) => this.#createEventStream(initialStreamIndex, input, deliveryId, source),
|
|
2392
2409
|
deliveryId,
|
|
2410
|
+
resumesTurn: input.inputResponses !== void 0,
|
|
2393
2411
|
sessionId: this.#state.sessionId
|
|
2394
2412
|
});
|
|
2395
2413
|
}
|
|
@@ -586,33 +586,19 @@ function parseJsonObject$1(body) {
|
|
|
586
586
|
}
|
|
587
587
|
|
|
588
588
|
//#endregion
|
|
589
|
-
//#region src/
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
const error = new Error(toErrorMessage(raw));
|
|
603
|
-
if (!isObject(raw)) return error;
|
|
604
|
-
if (typeof raw.name === "string" && raw.name.length > 0) error.name = raw.name;
|
|
605
|
-
if (typeof raw.stack === "string" && raw.stack.length > 0) error.stack = raw.stack;
|
|
606
|
-
if ("cause" in raw && raw.cause !== void 0 && raw.cause !== raw) error.cause = raw.cause;
|
|
607
|
-
return error;
|
|
608
|
-
}
|
|
609
|
-
function safeJsonStringify(value) {
|
|
610
|
-
try {
|
|
611
|
-
return JSON.stringify(value) ?? String(value);
|
|
612
|
-
} catch {
|
|
613
|
-
return String(value);
|
|
614
|
-
}
|
|
615
|
-
}
|
|
589
|
+
//#region src/internal/attachments/media-metadata.ts
|
|
590
|
+
const PDF_MEDIA_TYPE = "application/pdf";
|
|
591
|
+
const INLINE_IMAGE_MEDIA_TYPES = /* @__PURE__ */ new Set([
|
|
592
|
+
"image/gif",
|
|
593
|
+
"image/jpeg",
|
|
594
|
+
"image/png",
|
|
595
|
+
"image/webp"
|
|
596
|
+
]);
|
|
597
|
+
const VERIFIABLE_MEDIA_TYPES = /* @__PURE__ */ new Set([
|
|
598
|
+
...INLINE_IMAGE_MEDIA_TYPES,
|
|
599
|
+
"image/jpg",
|
|
600
|
+
PDF_MEDIA_TYPE
|
|
601
|
+
]);
|
|
616
602
|
|
|
617
603
|
//#endregion
|
|
618
604
|
//#region src/shared/ulid.ts
|
|
@@ -1752,6 +1738,7 @@ var MessageResponse = class {
|
|
|
1752
1738
|
#cancellation;
|
|
1753
1739
|
#consumed = false;
|
|
1754
1740
|
#createStream;
|
|
1741
|
+
#resumesTurn;
|
|
1755
1742
|
#settled = false;
|
|
1756
1743
|
#turnId = Promise.withResolvers();
|
|
1757
1744
|
constructor(input) {
|
|
@@ -1759,6 +1746,7 @@ var MessageResponse = class {
|
|
|
1759
1746
|
this.sessionId = input.sessionId;
|
|
1760
1747
|
this[acceptedDeliveryId] = input.deliveryId;
|
|
1761
1748
|
this.#createStream = input.createStream;
|
|
1749
|
+
this.#resumesTurn = input.resumesTurn ?? false;
|
|
1762
1750
|
}
|
|
1763
1751
|
cancel() {
|
|
1764
1752
|
if (this.#settled) return Promise.resolve({ status: "no_active_turn" });
|
|
@@ -1794,7 +1782,7 @@ var MessageResponse = class {
|
|
|
1794
1782
|
async *#observeStream(source) {
|
|
1795
1783
|
try {
|
|
1796
1784
|
for await (const event of this.#createStream(source)) {
|
|
1797
|
-
if (event.type === "turn.started") this.#turnId.resolve(event.data.turnId);
|
|
1785
|
+
if (event.type === "turn.started" || this.#resumesTurn && event.type === "input.resolved") this.#turnId.resolve(event.data.turnId);
|
|
1798
1786
|
else if (isCurrentTurnBoundaryEvent(event)) {
|
|
1799
1787
|
this.#settled = true;
|
|
1800
1788
|
this.#turnId.resolve(void 0);
|
|
@@ -1944,6 +1932,35 @@ function withRedirectPolicy$1(init, redirect) {
|
|
|
1944
1932
|
};
|
|
1945
1933
|
}
|
|
1946
1934
|
|
|
1935
|
+
//#endregion
|
|
1936
|
+
//#region src/shared/errors.ts
|
|
1937
|
+
function toErrorMessage(error) {
|
|
1938
|
+
if (error instanceof Error) return error.message;
|
|
1939
|
+
if (typeof error === "string") return error;
|
|
1940
|
+
if (error === null || error === void 0) return String(error);
|
|
1941
|
+
if (isObject(error)) {
|
|
1942
|
+
if (typeof error.message === "string" && error.message.length > 0) return error.message;
|
|
1943
|
+
return safeJsonStringify(error);
|
|
1944
|
+
}
|
|
1945
|
+
return String(error);
|
|
1946
|
+
}
|
|
1947
|
+
function toError(raw) {
|
|
1948
|
+
if (raw instanceof Error) return raw;
|
|
1949
|
+
const error = new Error(toErrorMessage(raw));
|
|
1950
|
+
if (!isObject(raw)) return error;
|
|
1951
|
+
if (typeof raw.name === "string" && raw.name.length > 0) error.name = raw.name;
|
|
1952
|
+
if (typeof raw.stack === "string" && raw.stack.length > 0) error.stack = raw.stack;
|
|
1953
|
+
if ("cause" in raw && raw.cause !== void 0 && raw.cause !== raw) error.cause = raw.cause;
|
|
1954
|
+
return error;
|
|
1955
|
+
}
|
|
1956
|
+
function safeJsonStringify(value) {
|
|
1957
|
+
try {
|
|
1958
|
+
return JSON.stringify(value) ?? String(value);
|
|
1959
|
+
} catch {
|
|
1960
|
+
return String(value);
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1947
1964
|
//#endregion
|
|
1948
1965
|
//#region src/shared/json.ts
|
|
1949
1966
|
const INVALID_JSON_VALUE_CANDIDATE = Symbol("invalid-json-value-candidate");
|
|
@@ -2391,6 +2408,7 @@ var ClientSession = class ClientSession {
|
|
|
2391
2408
|
cancelTurn: async (turnId) => await this.cancel({ turnId }),
|
|
2392
2409
|
createStream: (source) => this.#createEventStream(initialStreamIndex, input, deliveryId, source),
|
|
2393
2410
|
deliveryId,
|
|
2411
|
+
resumesTurn: input.inputResponses !== void 0,
|
|
2394
2412
|
sessionId: this.#state.sessionId
|
|
2395
2413
|
});
|
|
2396
2414
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { runVercelEnvPull } from "#setup/run-vercel-link.js";
|
|
2
|
-
import { isEveProject } from "#setup/scaffold/index.js";
|
|
3
2
|
import { runVercel } from "#setup/primitives/index.js";
|
|
4
3
|
import { readProjectLink } from "#setup/project-resolution.js";
|
|
5
4
|
import { resolveProjectByNameOrId, resolveTeam } from "#setup/vercel-project.js";
|
|
@@ -14,7 +13,6 @@ export interface VercelProjectCliOptions {
|
|
|
14
13
|
team?: string;
|
|
15
14
|
}
|
|
16
15
|
export interface NonInteractiveLinkDependencies {
|
|
17
|
-
isEveProject: typeof isEveProject;
|
|
18
16
|
runVercel: typeof runVercel;
|
|
19
17
|
runVercelEnvPull: typeof runVercelEnvPull;
|
|
20
18
|
readProjectLink: typeof readProjectLink;
|
|
@@ -22,7 +20,11 @@ export interface NonInteractiveLinkDependencies {
|
|
|
22
20
|
resolveProjectByNameOrId: typeof resolveProjectByNameOrId;
|
|
23
21
|
}
|
|
24
22
|
export declare function isNonInteractiveProjectCommand(options: VercelProjectCliOptions): boolean;
|
|
25
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Links a named Vercel project and refreshes its local environment without a
|
|
25
|
+
* prompt. Callers validate `appRoot` first, since a workspace root is not an
|
|
26
|
+
* eve project by itself.
|
|
27
|
+
*/
|
|
26
28
|
export declare function runNonInteractiveLink(input: {
|
|
27
29
|
logger: VercelNonInteractiveLogger;
|
|
28
30
|
appRoot: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{runVercelEnvPull}from"#setup/run-vercel-link.js";import{runVercel}from"#setup/primitives/index.js";import{readProjectLink}from"#setup/project-resolution.js";import{resolveProjectByNameOrId,resolveTeam}from"#setup/vercel-project.js";import{configureTraceSampling}from"#setup/vercel-trace-sampling.js";const defaultDependencies={runVercel,runVercelEnvPull,readProjectLink,resolveTeam,resolveProjectByNameOrId};function isNonInteractiveProjectCommand(e){return e.nonInteractive===!0}async function runNonInteractiveLink(e){let{appRoot:t,logger:n,options:r}=e,i=e.dependencies??defaultDependencies;if(r.project===void 0)return n.error("`eve link --non-interactive` requires `--project <name-or-id>`."),process.exitCode=1,!1;let a;if(r.traceSampling!==!1)try{a=await i.resolveProjectByNameOrId(t,await i.resolveTeam(t,r.team),r.project)!==null}catch{}let o=[`link`,`--project`,r.project,...r.team===void 0?[]:[`--team`,r.team],`--yes`];if(!await i.runVercel(o,{cwd:t,nonInteractive:!0}))return process.exitCode=1,!1;if(a===!1){let n=await i.readProjectLink(t).catch(()=>void 0);n!==void 0&&await configureTraceSampling(n,e.prompter)}return await i.runVercelEnvPull(t,void 0,void 0,!0)?(n.log(`Project linked.`),!0):(n.error(`Vercel project linked, but pulling environment variables did not complete.`),process.exitCode=1,!1)}export{isNonInteractiveProjectCommand,runNonInteractiveLink};
|
|
@@ -22,8 +22,8 @@ export declare class EveAgentStore<TData> {
|
|
|
22
22
|
/**
|
|
23
23
|
* Requests cooperative cancellation of the active durable turn.
|
|
24
24
|
*
|
|
25
|
-
* If the
|
|
26
|
-
*
|
|
25
|
+
* If the stream has not identified the turn yet, the request waits for its
|
|
26
|
+
* turn ID. The event stream stays attached until the turn settles.
|
|
27
27
|
*/
|
|
28
28
|
cancel(): Promise<CancelSessionResult>;
|
|
29
29
|
/** Queues server-side compaction of the current session's context. */
|
|
@@ -7,6 +7,8 @@ interface MessageResponseInput {
|
|
|
7
7
|
readonly cancelTurn: (turnId: string) => Promise<CancelSessionResult>;
|
|
8
8
|
readonly createStream: (source?: AsyncIterable<MessageStreamEvent>) => AsyncGenerator<MessageStreamEvent>;
|
|
9
9
|
readonly deliveryId?: string;
|
|
10
|
+
/** Answers resume a turn that started before their stream, so its `input.resolved` names it. */
|
|
11
|
+
readonly resumesTurn?: boolean;
|
|
10
12
|
readonly sessionId: string;
|
|
11
13
|
}
|
|
12
14
|
declare const consumeResponse: unique symbol;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{summarizeTurnEvents}from"#client/session-utils.js";import{isCurrentTurnBoundaryEvent}from"#protocol/message.js";import{extractCompletedResult}from"#client/output-schema.js";const consumeResponse=Symbol(`consumeMessageResponse`),acceptedDeliveryId=Symbol(`acceptedDeliveryId`);var MessageResponse=class{sessionId;[acceptedDeliveryId];#e;#t;#n=!1;#r;#i=!1;#
|
|
1
|
+
import{summarizeTurnEvents}from"#client/session-utils.js";import{isCurrentTurnBoundaryEvent}from"#protocol/message.js";import{extractCompletedResult}from"#client/output-schema.js";const consumeResponse=Symbol(`consumeMessageResponse`),acceptedDeliveryId=Symbol(`acceptedDeliveryId`);var MessageResponse=class{sessionId;[acceptedDeliveryId];#e;#t;#n=!1;#r;#i;#a=!1;#o=Promise.withResolvers();constructor(e){this.#e=e.cancelTurn,this.sessionId=e.sessionId,this[acceptedDeliveryId]=e.deliveryId,this.#r=e.createStream,this.#i=e.resumesTurn??!1}cancel(){if(this.#a)return Promise.resolve({status:`no_active_turn`});if(this.#t!==void 0)return this.#t;let e=this.#o.promise.then(e=>e===void 0?{status:`no_active_turn`}:this.#e(e));return this.#t=e,e.catch(()=>{!this.#a&&this.#t===e&&(this.#t=void 0)}),e}async result(){let e=[];for await(let t of this)e.push(t);let t=summarizeTurnEvents(e);return{data:extractCompletedResult(e),events:e,inputRequests:t.inputRequests,message:t.message,sessionId:this.sessionId,status:t.status}}[Symbol.asyncIterator](){return this[consumeResponse]()}[consumeResponse](e){if(this.#n)throw Error(`MessageResponse has already been consumed.`);return this.#n=!0,this.#s(e)}async*#s(e){try{for await(let t of this.#r(e))t.type===`turn.started`||this.#i&&t.type===`input.resolved`?this.#o.resolve(t.data.turnId):isCurrentTurnBoundaryEvent(t)&&(this.#a=!0,this.#o.resolve(void 0)),yield t}finally{this.#o.resolve(void 0)}}};function getMessageResponseDeliveryId(e){return e[acceptedDeliveryId]}function consumeMessageResponse(e,t){return e[consumeResponse](t)}export{MessageResponse,consumeMessageResponse,getMessageResponseDeliveryId};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EVE_SESSION_ROUTE_PATH,createEveSessionRoutePath,createEveSessionStreamRoutePath}from"#protocol/routes.js";import{ClientError,createClientError}from"#client/client-error.js";import{TurnSegment}from"#client/session-utils.js";import{EVE_SESSION_ID_HEADER}from"#protocol/message.js";import{followStreamIterable,sleep}from"#client/open-stream.js";import{createClientUrl}from"#client/url.js";import{MessageResponse}from"#client/message-response.js";import{ClientAgentSession}from"#client/agent-session.js";import{cancelClientSession,clearClientSession,compactClientSession,resetClientSession}from"#client/session-controls.js";import{serializeOutputSchema}from"#tools/schema.js";const followSession=Symbol(`followClientSession`);var ClientSession=class ClientSession{#e;#t;constructor(e,t){this.#e=e,this.#t=t}static async create(e,t){let n=await postTurn(e,EVE_SESSION_ROUTE_PATH,t,!0,t.stubs),{sessionId:r}=await readAcceptedMessage(n),i=new ClientSession(e,{sessionId:r,streamIndex:0});return{response:i.#r(n,t,0),session:i}}static async prewarm(e,t={}){let{sessionId:n}=await readAcceptedMessage(await postCreateSession(e,t));return new ClientSession(e,{sessionId:n,streamIndex:0})}get state(){return this.#t}async snapshot(e){e?.signal?.throwIfAborted();let t=[];for await(let n of this.#s({follow:!1,signal:e?.signal,startIndex:0}))t.push(n);return e?.signal?.throwIfAborted(),{events:t,session:{sessionId:this.#t.sessionId,streamIndex:t.length}}}async send(e,t={}){return await this.#n({...t,message:e},!0)}async respond(e,t={}){if(e.length===0)throw Error(`ClientSession.respond() requires at least one input response.`);return await this.#n({...t,inputResponses:e},!1)}async#n(e,t){let n=this.#t.streamIndex,r=createEveSessionRoutePath(this.#t.sessionId),i=t?await postSessionSend(this.#e,r,e):await postTurn(this.#e,r,e,!1),{sessionId:a,deliveryId:o}=await readAcceptedMessage(i,this.#t.sessionId);if(a!==this.#t.sessionId)throw Error(`Message route returned a different session id.`);if(e.message!==void 0&&o===void 0)throw Error(`Message route did not return a delivery id. Update the server before sending with this client.`);return this.#r(i,e,n,e.message===void 0?void 0:o)}async cancel(e){return await cancelClientSession({context:this.#e,options:e,sessionId:this.#t.sessionId})}async clear(){return await clearClientSession({context:this.#e,sessionId:this.#t.sessionId})}async compact(){return await compactClientSession({context:this.#e,sessionId:this.#t.sessionId})}async reset(e){return await resetClientSession({context:this.#e,options:e,sessionId:this.#t.sessionId})}stream(e){if(e?.follow===!1&&(e.startIndex??this.#t.streamIndex)<0)throw Error(`stream({ follow: false }) requires a nonnegative startIndex; a tail-relative cursor cannot be bounded.`);return this.#a(e)}agent(e){return new ClientAgentSession(this.#e,e)}[followSession](e){return this.#a({...e,keepAlive:!0})}#r(e,t,n,r){return e.body?.cancel().catch(()=>{}),new MessageResponse({cancelTurn:async e=>await this.cancel({turnId:e}),createStream:e=>this.#i(n,t,r,e),deliveryId:r,sessionId:this.#t.sessionId})}async*#i(e,t,n,r){let i=0,a=n===void 0,o=!1,s=new TurnSegment({followCallbacks:!0});try{for await(let c of r??this.#s({headers:t.headers,keepAlive:!0,signal:t.signal,startIndex:e,streamReconnectPolicy:t.streamReconnectPolicy})){if(i+=1,n!==void 0){let e=c.meta?.deliveryIds?.includes(n)===!0,t=c.type===`session.failed`||c.type===`session.completed`;if(!e&&t&&(!a||c.type===`session.completed`))throw Error(`The session ended before the accepted message reached its turn boundary.`);if(!a&&!e)continue;let r=c.meta?.deliveryIds!==void 0;if(!t&&r&&!e)continue;a=!0}if(o=s.observe(c),yield c,o)break}if(n!==void 0&&!o&&!t.signal?.aborted)throw Error(`The response stream ended before the accepted message reached its turn boundary.`)}finally{this.#o(e+i)}}async*#a(e){let t=e?.startIndex??this.#t.streamIndex,n=0;for await(let r of this.#s({follow:e?.follow,headers:e?.headers,keepAlive:e?.keepAlive,onCaughtUp:e?.onCaughtUp,resolveHeaders:e?.resolveHeaders,resolveReconnectPolicy:e?.resolveReconnectPolicy,signal:e?.signal,startIndex:t,streamReconnectPolicy:e?.streamReconnectPolicy}))n+=1,t>=0&&this.#o(t+n),yield r}#o(e){this.#t={sessionId:this.#t.sessionId,streamIndex:Math.max(this.#t.streamIndex,e)}}#s(e){return followStreamIterable({onCaughtUp:e.onCaughtUp,follow:e.follow,host:this.#e.host,keepAlive:e.keepAlive,resolveHeaders:()=>this.#e.resolveHeaders(e.resolveHeaders?.()??e.headers),path:createEveSessionStreamRoutePath(this.#t.sessionId),redirect:this.#e.redirect,signal:e.signal,startIndex:e.startIndex,streamReconnectPolicy:e.streamReconnectPolicy,resolveReconnectPolicy:e.resolveReconnectPolicy})}};function followClientSession(e,t){return e[followSession](t)}async function postSessionSend(e,t,n){let r=Date.now()+2e4,i=250;for(;;){try{return await postTurn(e,t,n,!1)}catch(e){if(!isSessionNotReady(e))throw e;let t=r-Date.now();if(t<=0)throw e;await sleep(Math.min(i,t),n.signal)}n.signal?.throwIfAborted(),i=Math.min(i*2,2e3)}}async function postCreateSession(e,t){let n=await e.resolveHeaders(t.headers),r=t.stubs===void 0?void 0:JSON.stringify({stubs:t.stubs});r!==void 0&&n.set(`content-type`,`application/json`);let i=await fetch(createClientUrl(e.host,EVE_SESSION_ROUTE_PATH),{body:r,headers:n,method:`POST`,redirect:e.redirect,signal:t.signal??null});if(!i.ok){let e=await i.text();throw new ClientError(i.status,e,i.headers)}return i}function isSessionNotReady(e){return e instanceof ClientError&&e.status===409&&e.code===`session_not_ready`}async function postTurn(e,t,n,r,i){let a=createMessageBody(n,r);if(a===null)throw Error(r?`Creating a session requires a non-empty message.`:`A session turn requires a non-empty message or inputResponses.`);i!==void 0&&(a.stubs=i);let o=await e.resolveHeaders(n.headers);o.set(`content-type`,`application/json`);let s=await fetch(createClientUrl(e.host,t),{body:JSON.stringify(a),headers:o,method:`POST`,redirect:e.redirect,signal:n.signal??null});if(!s.ok){let e=await s.text();throw createClientError(s.status,e,s.headers)}return s}async function readAcceptedMessage(e,t){let n=await e.json(),r=(typeof n.sessionId==`string`?n.sessionId:void 0)??e.headers.get(EVE_SESSION_ID_HEADER)?.trim()??t;if(!r)throw Error(`Message route did not return a session id.`);return{sessionId:r,deliveryId:typeof n.deliveryId==`string`&&n.deliveryId.length>0?n.deliveryId:void 0}}function createMessageBody(e,t){let n={};e.message!==void 0&&(n.message=e.message),e.inputResponses!==void 0&&e.inputResponses.length>0&&(n.inputResponses=e.inputResponses),!t&&e.message!==void 0&&e.turnPolicy!==void 0&&(n.turnPolicy=e.turnPolicy),e.clientContext!==void 0&&(n.clientContext=e.clientContext);let r=serializeOutputSchema(e.outputSchema);return r!==void 0&&(n.outputSchema=r),t&&n.message===void 0||n.message===void 0&&n.inputResponses===void 0?null:n}export{ClientSession,followClientSession};
|
|
1
|
+
import{EVE_SESSION_ROUTE_PATH,createEveSessionRoutePath,createEveSessionStreamRoutePath}from"#protocol/routes.js";import{ClientError,createClientError}from"#client/client-error.js";import{TurnSegment}from"#client/session-utils.js";import{EVE_SESSION_ID_HEADER}from"#protocol/message.js";import{followStreamIterable,sleep}from"#client/open-stream.js";import{createClientUrl}from"#client/url.js";import{MessageResponse}from"#client/message-response.js";import{ClientAgentSession}from"#client/agent-session.js";import{cancelClientSession,clearClientSession,compactClientSession,resetClientSession}from"#client/session-controls.js";import{serializeOutputSchema}from"#tools/schema.js";const followSession=Symbol(`followClientSession`);var ClientSession=class ClientSession{#e;#t;constructor(e,t){this.#e=e,this.#t=t}static async create(e,t){let n=await postTurn(e,EVE_SESSION_ROUTE_PATH,t,!0,t.stubs),{sessionId:r}=await readAcceptedMessage(n),i=new ClientSession(e,{sessionId:r,streamIndex:0});return{response:i.#r(n,t,0),session:i}}static async prewarm(e,t={}){let{sessionId:n}=await readAcceptedMessage(await postCreateSession(e,t));return new ClientSession(e,{sessionId:n,streamIndex:0})}get state(){return this.#t}async snapshot(e){e?.signal?.throwIfAborted();let t=[];for await(let n of this.#s({follow:!1,signal:e?.signal,startIndex:0}))t.push(n);return e?.signal?.throwIfAborted(),{events:t,session:{sessionId:this.#t.sessionId,streamIndex:t.length}}}async send(e,t={}){return await this.#n({...t,message:e},!0)}async respond(e,t={}){if(e.length===0)throw Error(`ClientSession.respond() requires at least one input response.`);return await this.#n({...t,inputResponses:e},!1)}async#n(e,t){let n=this.#t.streamIndex,r=createEveSessionRoutePath(this.#t.sessionId),i=t?await postSessionSend(this.#e,r,e):await postTurn(this.#e,r,e,!1),{sessionId:a,deliveryId:o}=await readAcceptedMessage(i,this.#t.sessionId);if(a!==this.#t.sessionId)throw Error(`Message route returned a different session id.`);if(e.message!==void 0&&o===void 0)throw Error(`Message route did not return a delivery id. Update the server before sending with this client.`);return this.#r(i,e,n,e.message===void 0?void 0:o)}async cancel(e){return await cancelClientSession({context:this.#e,options:e,sessionId:this.#t.sessionId})}async clear(){return await clearClientSession({context:this.#e,sessionId:this.#t.sessionId})}async compact(){return await compactClientSession({context:this.#e,sessionId:this.#t.sessionId})}async reset(e){return await resetClientSession({context:this.#e,options:e,sessionId:this.#t.sessionId})}stream(e){if(e?.follow===!1&&(e.startIndex??this.#t.streamIndex)<0)throw Error(`stream({ follow: false }) requires a nonnegative startIndex; a tail-relative cursor cannot be bounded.`);return this.#a(e)}agent(e){return new ClientAgentSession(this.#e,e)}[followSession](e){return this.#a({...e,keepAlive:!0})}#r(e,t,n,r){return e.body?.cancel().catch(()=>{}),new MessageResponse({cancelTurn:async e=>await this.cancel({turnId:e}),createStream:e=>this.#i(n,t,r,e),deliveryId:r,resumesTurn:t.inputResponses!==void 0,sessionId:this.#t.sessionId})}async*#i(e,t,n,r){let i=0,a=n===void 0,o=!1,s=new TurnSegment({followCallbacks:!0});try{for await(let c of r??this.#s({headers:t.headers,keepAlive:!0,signal:t.signal,startIndex:e,streamReconnectPolicy:t.streamReconnectPolicy})){if(i+=1,n!==void 0){let e=c.meta?.deliveryIds?.includes(n)===!0,t=c.type===`session.failed`||c.type===`session.completed`;if(!e&&t&&(!a||c.type===`session.completed`))throw Error(`The session ended before the accepted message reached its turn boundary.`);if(!a&&!e)continue;let r=c.meta?.deliveryIds!==void 0;if(!t&&r&&!e)continue;a=!0}if(o=s.observe(c),yield c,o)break}if(n!==void 0&&!o&&!t.signal?.aborted)throw Error(`The response stream ended before the accepted message reached its turn boundary.`)}finally{this.#o(e+i)}}async*#a(e){let t=e?.startIndex??this.#t.streamIndex,n=0;for await(let r of this.#s({follow:e?.follow,headers:e?.headers,keepAlive:e?.keepAlive,onCaughtUp:e?.onCaughtUp,resolveHeaders:e?.resolveHeaders,resolveReconnectPolicy:e?.resolveReconnectPolicy,signal:e?.signal,startIndex:t,streamReconnectPolicy:e?.streamReconnectPolicy}))n+=1,t>=0&&this.#o(t+n),yield r}#o(e){this.#t={sessionId:this.#t.sessionId,streamIndex:Math.max(this.#t.streamIndex,e)}}#s(e){return followStreamIterable({onCaughtUp:e.onCaughtUp,follow:e.follow,host:this.#e.host,keepAlive:e.keepAlive,resolveHeaders:()=>this.#e.resolveHeaders(e.resolveHeaders?.()??e.headers),path:createEveSessionStreamRoutePath(this.#t.sessionId),redirect:this.#e.redirect,signal:e.signal,startIndex:e.startIndex,streamReconnectPolicy:e.streamReconnectPolicy,resolveReconnectPolicy:e.resolveReconnectPolicy})}};function followClientSession(e,t){return e[followSession](t)}async function postSessionSend(e,t,n){let r=Date.now()+2e4,i=250;for(;;){try{return await postTurn(e,t,n,!1)}catch(e){if(!isSessionNotReady(e))throw e;let t=r-Date.now();if(t<=0)throw e;await sleep(Math.min(i,t),n.signal)}n.signal?.throwIfAborted(),i=Math.min(i*2,2e3)}}async function postCreateSession(e,t){let n=await e.resolveHeaders(t.headers),r=t.stubs===void 0?void 0:JSON.stringify({stubs:t.stubs});r!==void 0&&n.set(`content-type`,`application/json`);let i=await fetch(createClientUrl(e.host,EVE_SESSION_ROUTE_PATH),{body:r,headers:n,method:`POST`,redirect:e.redirect,signal:t.signal??null});if(!i.ok){let e=await i.text();throw new ClientError(i.status,e,i.headers)}return i}function isSessionNotReady(e){return e instanceof ClientError&&e.status===409&&e.code===`session_not_ready`}async function postTurn(e,t,n,r,i){let a=createMessageBody(n,r);if(a===null)throw Error(r?`Creating a session requires a non-empty message.`:`A session turn requires a non-empty message or inputResponses.`);i!==void 0&&(a.stubs=i);let o=await e.resolveHeaders(n.headers);o.set(`content-type`,`application/json`);let s=await fetch(createClientUrl(e.host,t),{body:JSON.stringify(a),headers:o,method:`POST`,redirect:e.redirect,signal:n.signal??null});if(!s.ok){let e=await s.text();throw createClientError(s.status,e,s.headers)}return s}async function readAcceptedMessage(e,t){let n=await e.json(),r=(typeof n.sessionId==`string`?n.sessionId:void 0)??e.headers.get(EVE_SESSION_ID_HEADER)?.trim()??t;if(!r)throw Error(`Message route did not return a session id.`);return{sessionId:r,deliveryId:typeof n.deliveryId==`string`&&n.deliveryId.length>0?n.deliveryId:void 0}}function createMessageBody(e,t){let n={};e.message!==void 0&&(n.message=e.message),e.inputResponses!==void 0&&e.inputResponses.length>0&&(n.inputResponses=e.inputResponses),!t&&e.message!==void 0&&e.turnPolicy!==void 0&&(n.turnPolicy=e.turnPolicy),e.clientContext!==void 0&&(n.clientContext=e.clientContext);let r=serializeOutputSchema(e.outputSchema);return r!==void 0&&(n.outputSchema=r),t&&n.message===void 0||n.message===void 0&&n.inputResponses===void 0?null:n}export{ClientSession,followClientSession};
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
},
|
|
7
7
|
"moduleVersions": {
|
|
8
8
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
9
|
-
"@ai-sdk/anthropic": "4.0.
|
|
9
|
+
"@ai-sdk/anthropic": "4.0.78",
|
|
10
10
|
"@cfworker/json-schema": "4.1.1",
|
|
11
|
-
"@ai-sdk/code-mode": "1.0.
|
|
11
|
+
"@ai-sdk/code-mode": "1.0.94",
|
|
12
12
|
"chat": "4.41.0",
|
|
13
13
|
"@chat-adapter/slack": "4.41.0",
|
|
14
14
|
"@chat-adapter/state-memory": "4.41.0",
|
|
@@ -19,24 +19,24 @@
|
|
|
19
19
|
"eventsource-parser": "3.1.0",
|
|
20
20
|
"env-runner": "0.1.16",
|
|
21
21
|
"@eve/catalog": "0.0.1",
|
|
22
|
-
"@ai-sdk/google": "4.0.
|
|
22
|
+
"@ai-sdk/google": "4.0.93",
|
|
23
23
|
"jose": "6.2.3",
|
|
24
24
|
"js-yaml": "4.3.2",
|
|
25
25
|
"jsonc-parser": "3.3.1",
|
|
26
26
|
"@types/json-schema": "7.0.15",
|
|
27
27
|
"just-secrets": "0.0.2",
|
|
28
28
|
"marked": "17.0.6",
|
|
29
|
-
"@ai-sdk/mcp": "2.0.
|
|
29
|
+
"@ai-sdk/mcp": "2.0.73",
|
|
30
30
|
"@modelcontextprotocol/server": "2.0.0",
|
|
31
|
-
"@ai-sdk/openai": "4.0.
|
|
31
|
+
"@ai-sdk/openai": "4.0.91",
|
|
32
32
|
"@opentelemetry/api": "1.9.1",
|
|
33
33
|
"@opentelemetry/otlp-transformer": "0.214.0",
|
|
34
|
-
"@ai-sdk/otel": "1.0.
|
|
34
|
+
"@ai-sdk/otel": "1.0.137",
|
|
35
35
|
"@photon-ai/chat-adapter-imessage": "3.2.0",
|
|
36
36
|
"@linqapp/chat-sdk-adapter": "0.5.1",
|
|
37
37
|
"picocolors": "1.1.1",
|
|
38
|
-
"@ai-sdk/provider": "4.0.
|
|
39
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
38
|
+
"@ai-sdk/provider": "4.0.26",
|
|
39
|
+
"@ai-sdk/provider-utils": "5.0.58",
|
|
40
40
|
"semver": "7.8.4",
|
|
41
41
|
"@shadcn/registry": "0.1.3",
|
|
42
42
|
"@standard-schema/spec": "1.1.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"zod": "4.5.4",
|
|
60
60
|
"zod-validation-error": "5.0.0"
|
|
61
61
|
},
|
|
62
|
-
"scriptHash": "
|
|
62
|
+
"scriptHash": "f296c8787cbb975a01596e49048f5c4b1a1480c03754134647da5eff762b98ca",
|
|
63
63
|
"toolVersions": {
|
|
64
64
|
"rolldown": "1.2.9",
|
|
65
65
|
"typescript": "7.0.2"
|
|
@@ -220,7 +220,7 @@ interface AnthropicMessageMetadata {
|
|
|
220
220
|
}
|
|
221
221
|
//#endregion
|
|
222
222
|
//#region src/anthropic-language-model-options.d.ts
|
|
223
|
-
type AnthropicModelId = 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-sonnet-5' | 'claude-sonnet-5-5' | (string & {});
|
|
223
|
+
type AnthropicModelId = 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-haiku-5-5' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-sonnet-5' | 'claude-sonnet-5-5' | (string & {});
|
|
224
224
|
/**
|
|
225
225
|
* Anthropic provider options for system messages.
|
|
226
226
|
*/
|
|
@@ -1484,6 +1484,11 @@ interface AnthropicProvider extends ProviderV4 {
|
|
|
1484
1484
|
tools: typeof anthropicTools;
|
|
1485
1485
|
}
|
|
1486
1486
|
interface AnthropicProviderSettings {
|
|
1487
|
+
/** Settings for downloading JSON Lines batch results. */
|
|
1488
|
+
batchResultDownloads?: {
|
|
1489
|
+
/** Maximum UTF-8 bytes per row, excluding LF. Defaults to 64 MiB. */
|
|
1490
|
+
maxLineBytes?: number;
|
|
1491
|
+
};
|
|
1487
1492
|
/**
|
|
1488
1493
|
* Use a different URL prefix for API calls, e.g. to use proxy servers.
|
|
1489
1494
|
* The default prefix is `https://api.anthropic.com/v1`.
|