eve 0.33.0 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/src/execution/dispatch-runtime-actions-step.d.ts +3 -9
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +5 -0
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/parked-delivery-wait.d.ts +8 -0
- package/dist/src/execution/parked-delivery-wait.js +1 -1
- package/dist/src/execution/route-child-delivery.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/subagent-hitl-proxy.d.ts +1 -0
- package/dist/src/execution/subagent-hitl-proxy.js +1 -1
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-steps.d.ts +4 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/hitl/approval-input-requests.d.ts +13 -0
- package/dist/src/harness/hitl/approval-input-requests.js +1 -0
- package/dist/src/harness/hitl/pending-input-resolution.d.ts +51 -0
- package/dist/src/harness/hitl/pending-input-resolution.js +1 -0
- package/dist/src/harness/hitl/question-input-requests.d.ts +15 -0
- package/dist/src/harness/hitl/question-input-requests.js +1 -0
- package/dist/src/harness/hitl/session-limit-input-requests.d.ts +10 -0
- package/dist/src/harness/hitl/session-limit-input-requests.js +1 -0
- package/dist/src/harness/input-requests.d.ts +17 -105
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/pending-input-batches.d.ts +77 -0
- package/dist/src/harness/pending-input-batches.js +1 -0
- package/dist/src/harness/proxy-input-requests.d.ts +13 -3
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/create/web-template.d.ts +9 -0
- package/dist/src/setup/scaffold/create/web-template.js +291 -1
- package/dist/src/setup/scaffold/index.d.ts +1 -1
- package/dist/src/setup/scaffold/update/channels.d.ts +4 -13
- package/dist/src/setup/scaffold/update/channels.js +2 -2
- package/dist/src/setup/scaffold/update/web-options.d.ts +15 -0
- package/dist/src/setup/scaffold/update/web-options.js +1 -0
- package/dist/src/setup/vercel-project.js +0 -0
- package/docs/concepts/sessions-runs-and-streaming.md +4 -4
- package/docs/guides/frontend/overview.mdx +31 -10
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +37 -15
- package/docs/guides/frontend/use-eve-agent-vue.mdx +38 -15
- package/docs/tools/human-in-the-loop.md +2 -2
- package/package.json +1 -1
|
@@ -88,28 +88,51 @@ async function onFileChange(event: Event) {
|
|
|
88
88
|
|
|
89
89
|
## Human-in-the-loop prompts
|
|
90
90
|
|
|
91
|
-
A tool opts into approval with `approval` ([Tools](../../tools)). When it triggers, the pending request shows up
|
|
91
|
+
A tool opts into approval with `approval` ([Tools](../../tools)). When it triggers, the pending request shows up on a `dynamic-tool` part at `part.toolMetadata?.eve?.inputRequest`. Scan every message because an unrelated turn can add newer messages while the approval stays open, then answer through the same session with `respond(inputResponses)`:
|
|
92
92
|
|
|
93
|
-
```
|
|
94
|
-
|
|
93
|
+
```vue
|
|
94
|
+
<script setup lang="ts">
|
|
95
|
+
import { computed } from "vue";
|
|
96
|
+
import { useEveAgent } from "eve/vue";
|
|
95
97
|
|
|
96
98
|
const { data, respond } = useEveAgent();
|
|
97
99
|
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
const pendingRequests = computed(() =>
|
|
101
|
+
data.value.messages.flatMap((message) =>
|
|
102
|
+
message.parts.flatMap((part) => {
|
|
103
|
+
if (part.type !== "dynamic-tool" || part.state !== "approval-requested") return [];
|
|
104
|
+
const request = part.toolMetadata?.eve?.inputRequest;
|
|
105
|
+
return request ? [request] : [];
|
|
106
|
+
}),
|
|
107
|
+
),
|
|
108
|
+
);
|
|
109
|
+
</script>
|
|
106
110
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
<template>
|
|
112
|
+
<fieldset v-for="request in pendingRequests" :key="request.requestId">
|
|
113
|
+
<legend>
|
|
114
|
+
{{
|
|
115
|
+
request.kind === "tool-approval"
|
|
116
|
+
? "Approval required"
|
|
117
|
+
: request.kind === "question"
|
|
118
|
+
? "Question"
|
|
119
|
+
: "Session limit"
|
|
120
|
+
}}
|
|
121
|
+
</legend>
|
|
122
|
+
<p>{{ request.prompt }}</p>
|
|
123
|
+
<button
|
|
124
|
+
v-for="option in request.options ?? []"
|
|
125
|
+
:key="option.id"
|
|
126
|
+
type="button"
|
|
127
|
+
@click="respond([{ requestId: request.requestId, optionId: option.id }])"
|
|
128
|
+
>
|
|
129
|
+
{{ option.label }}
|
|
130
|
+
</button>
|
|
131
|
+
</fieldset>
|
|
132
|
+
</template>
|
|
110
133
|
```
|
|
111
134
|
|
|
112
|
-
|
|
135
|
+
For a question with `allowFreeform`, bind a text input and send `{ requestId, text }`. The [React hook reference](./overview) covers the shared behavior.
|
|
113
136
|
|
|
114
137
|
## Stop, reset, and resume
|
|
115
138
|
|
|
@@ -109,7 +109,7 @@ semantics.
|
|
|
109
109
|
|
|
110
110
|
The run picks back up exactly where it parked. Because the pause is durable, nothing is held in memory while it waits — the process can restart and the parked turn survives.
|
|
111
111
|
|
|
112
|
-
For approval requests, unrelated follow-up text does not deny the tool call.
|
|
112
|
+
For approval requests, unrelated follow-up text does not deny the tool call — and it does not wait behind it either. The message runs as an ordinary turn while the approval stays pending and answerable; a later structured answer still resolves the original tool call. Text that exactly matches an option (like `approve`) still resolves the request directly.
|
|
113
113
|
|
|
114
114
|
See [Sessions, runs & streaming](/docs/concepts/sessions-runs-and-streaming) for the full event and resume contract that this builds on.
|
|
115
115
|
|
|
@@ -117,7 +117,7 @@ See [Sessions, runs & streaming](/docs/concepts/sessions-runs-and-streaming) for
|
|
|
117
117
|
|
|
118
118
|
Channels turn requests into native UI: the Slack adapter renders approvals as buttons and questions as select menus, and writes the user's choice back as the answer. You get this for free on every [channel](/docs/channels/overview).
|
|
119
119
|
|
|
120
|
-
From your own frontend,
|
|
120
|
+
From your own frontend, scan all messages for pending requests and answer through the same session — see [Building a frontend](/docs/guides/frontend/overview#human-in-the-loop-prompts) for the client-side reducer and `inputResponses` shape.
|
|
121
121
|
|
|
122
122
|
## What to read next
|
|
123
123
|
|