eve 0.54.4 → 0.55.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 +33 -0
- package/dist/src/channel/adapter.d.ts +3 -2
- package/dist/src/channel/audience.d.ts +16 -0
- package/dist/src/channel/audience.js +1 -0
- package/dist/src/channel/conversation-context.d.ts +3 -0
- package/dist/src/channel/conversation-context.js +1 -0
- package/dist/src/channel/instrumentation.js +1 -1
- package/dist/src/channel/types.d.ts +9 -0
- package/dist/src/cli/commands/agent-prompt/scaffold.md +5 -4
- package/dist/src/cli/commands/init-target.js +2 -2
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +9 -9
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +16 -16
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/context/dynamic-resolve-context.js +1 -1
- package/dist/src/discover/filesystem.d.ts +3 -1
- package/dist/src/discover/filesystem.js +1 -1
- package/dist/src/discover/skills.js +1 -1
- package/dist/src/dynamic/definition.d.ts +6 -0
- package/dist/src/eve-channel/audience.d.ts +3 -0
- package/dist/src/eve-channel/audience.js +1 -0
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/types.d.ts +14 -1
- package/dist/src/execution/activity-work.d.ts +2 -0
- package/dist/src/execution/activity-work.js +1 -1
- package/dist/src/execution/channel-context.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +1 -0
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/scheduled-launch-delivery.d.ts +7 -0
- package/dist/src/execution/scheduled-launch-delivery.js +1 -0
- package/dist/src/execution/session-activity.js +1 -1
- package/dist/src/execution/tasks/child/steps.js +1 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +2 -0
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +2 -0
- package/dist/src/execution/tools/subagent/invoke-step.js +1 -1
- package/dist/src/execution/tools/subagent/start.d.ts +5 -0
- package/dist/src/execution/tools/subagent/start.js +1 -1
- package/dist/src/execution/wire/session-inbox-contract.d.ts +2 -2
- package/dist/src/execution/wire/session-inbox-contract.js +1 -1
- package/dist/src/execution/wire/session-inbox-encoder.d.ts +6 -2
- package/dist/src/execution/wire/session-inbox-encoder.js +1 -1
- package/dist/src/execution/wire/session-inbox-resume.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v7.d.ts +342 -0
- package/dist/src/execution/wire/session-inbox-wire.v7.js +1 -0
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/action-presentation.d.ts +5 -0
- package/dist/src/harness/action-presentation.js +1 -1
- package/dist/src/harness/background-tools.d.ts +3 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/workflow-lifecycle.js +1 -1
- package/dist/src/instrumentation/channel-delivery.js +1 -1
- package/dist/src/instrumentation/content-policy.d.ts +2 -2
- package/dist/src/instrumentation/principal-summary.d.ts +3 -3
- package/dist/src/instrumentation/runtime-global.d.ts +4 -0
- package/dist/src/instrumentation/runtime-global.js +1 -0
- package/dist/src/instrumentation/runtime.d.ts +5 -9
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/session-context.d.ts +1 -0
- package/dist/src/instrumentation/session-context.js +1 -1
- package/dist/src/instrumentation/session-init.d.ts +5 -0
- package/dist/src/instrumentation/session-init.js +1 -0
- package/dist/src/instrumentation/setup-context.js +1 -1
- package/dist/src/internal/application/dev-environment.d.ts +3 -0
- package/dist/src/internal/application/dev-environment.js +1 -1
- package/dist/src/internal/application/output-publication-journal.js +1 -1
- package/dist/src/internal/application/output-publication-lock.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/connection.js +1 -1
- package/dist/src/internal/instrumentation.d.ts +1 -12
- package/dist/src/internal/instrumentation.js +1 -1
- package/dist/src/internal/logging.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/protocol/activity.d.ts +1 -0
- package/dist/src/protocol/activity.js +1 -1
- package/dist/src/public/channels/chat-sdk/audience.d.ts +8 -0
- package/dist/src/public/channels/chat-sdk/audience.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +0 -2
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +1 -1
- package/dist/src/public/channels/discord/audience.js +1 -1
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/discord/index.d.ts +0 -1
- package/dist/src/public/channels/index.d.ts +2 -3
- package/dist/src/public/channels/slack/activity-plan.js +1 -1
- package/dist/src/public/channels/slack/defaults.d.ts +2 -2
- package/dist/src/public/channels/slack/defaults.js +3 -3
- package/dist/src/public/channels/slack/hitl.d.ts +20 -4
- package/dist/src/public/channels/slack/hitl.js +2 -2
- package/dist/src/public/channels/slack/index.d.ts +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/channels/slack/private-approval-delivery.d.ts +11 -0
- package/dist/src/public/channels/slack/private-approval-delivery.js +1 -0
- package/dist/src/public/channels/slack/slackChannel.d.ts +27 -4
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/hitl.js +1 -1
- package/dist/src/public/channels/teams/index.d.ts +0 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/teams/verify.js +1 -1
- package/dist/src/public/channels/telegram/audience.d.ts +7 -0
- package/dist/src/public/channels/telegram/audience.js +1 -1
- package/dist/src/public/channels/telegram/index.d.ts +0 -1
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/channels/twilio/twilioChannel.d.ts +0 -2
- package/dist/src/public/channels/twilio/twilioChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +2 -1
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +6 -0
- package/dist/src/public/definitions/workspace-agent.js +1 -1
- package/dist/src/public/models/openai/chatgpt/auth.js +1 -1
- package/dist/src/public/models/openai/chatgpt/codex-app-server.js +1 -1
- package/dist/src/public/models/openai/chatgpt/credential-store.js +1 -1
- package/dist/src/public/next/index.d.ts +6 -4
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/next/server.js +1 -1
- package/dist/src/public/next/vercel-output-config.d.ts +1 -0
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/resolve-connection.js +1 -1
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
- package/dist/src/runtime/types.d.ts +1 -0
- package/dist/src/self-modification/agent.d.ts +7 -1
- package/dist/src/self-modification/agent.js +1 -1
- package/dist/src/self-modification/extension/instructions.js +6 -9
- package/dist/src/setup/flows/chatgpt-auth.js +1 -1
- package/dist/src/setup/flows/registry.js +1 -1
- package/dist/src/setup/provider-settings.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/channel-audience.d.ts +0 -3
- package/dist/src/shared/channel-definition.d.ts +13 -4
- package/dist/src/shared/conversation-context.d.ts +47 -0
- package/dist/src/shared/conversation-context.js +1 -0
- package/dist/src/shared/forwarded-trace-policy.d.ts +2 -1
- package/dist/src/shared/forwarded-trace-policy.js +1 -1
- package/dist/src/shared/instrumentation-channel-kind.d.ts +3 -0
- package/dist/src/shared/instrumentation-channel-kind.js +1 -0
- package/dist/src/shared/instrumentation-content.d.ts +9 -4
- package/dist/src/shared/instrumentation-content.js +1 -1
- package/dist/src/shared/trace-policy.d.ts +7 -6
- package/dist/src/shared/trace-policy.js +1 -1
- package/dist/src/subagents/handle-dispatch.d.ts +2 -1
- package/dist/src/subagents/handle-dispatch.js +1 -1
- package/dist/src/subagents/remote-dispatch.js +1 -1
- package/dist/src/subagents/start-local.d.ts +1 -0
- package/dist/src/subagents/start-local.js +1 -1
- package/dist/src/subagents/start-remote.d.ts +2 -0
- package/dist/src/subagents/start-remote.js +1 -1
- package/dist/src/subagents/tool.d.ts +3 -0
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/tasks/session-index.d.ts +2 -0
- package/dist/src/tasks/session-index.js +1 -1
- package/dist/src/tracing/agent-invocation-coordinator.d.ts +3 -2
- package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
- package/dist/src/tracing/agent-memory-instrumentation.d.ts +3 -1
- package/dist/src/tracing/agent-memory-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-provider.d.ts +2 -0
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-session-context.d.ts +2 -0
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/local-instrumentation-runtime.d.ts +1 -1
- package/dist/src/tracing/local-instrumentation-runtime.js +1 -1
- package/docs/channels/custom.mdx +22 -2
- package/docs/channels/eve.mdx +39 -0
- package/docs/channels/slack.mdx +47 -0
- package/docs/connections/mcp.mdx +14 -0
- package/docs/guides/frontend/nextjs.mdx +12 -10
- package/docs/guides/instrumentation-providers.md +10 -8
- package/docs/guides/instrumentation.md +2 -2
- package/docs/guides/remote-agents.md +1 -1
- package/docs/install-integrations.mdx +1 -1
- package/docs/reference/cli.md +9 -8
- package/docs/subagents/index.mdx +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger}from"#internal/logging.js";import{
|
|
1
|
+
import{createLogger}from"#internal/logging.js";import{decisionToTraceContentCeiling,resolveForwardedTraceSeed}from"#shared/forwarded-trace-policy.js";import{contextStorage,loadContext}from"#context/container.js";import{SessionTraceSeedKey}from"#context/keys.js";import{ContextKey}from"#context/key.js";import{getWorkflowToolRuns}from"#harness/workflow-tool-runs.js";import{getSessionTaskIndex}from"#tasks/session-index.js";import{deriveTaskId}from"#tasks/task-id.js";import{actionIdempotencyKey}from"#instrumentation/lifecycle.js";import{AGENT_TRACE_CONTEXT_KEY,deserializeAgentTraceContextState,emptyAgentTraceContextState,serializeAgentTraceContextState}from"#tracing/agent-trace-context-codec.js";const AgentTraceContextKey=new ContextKey(AGENT_TRACE_CONTEXT_KEY,{codec:{deserialize:deserializeAgentTraceContextState,serialize:serializeAgentTraceContextState}});function pruneAgentTraceState(e,t,n){try{pruneTraceOwnership(e,t,n)}catch(e){createLogger(`tracing.retention`).warn(`could not reconcile trace ownership; preserving trace state`,{error:e})}}function pruneTraceOwnership(e,t,n){let r=e.get(AgentTraceContextKey);if(r===void 0)return;let i=new Set(getWorkflowToolRuns(n).map(e=>e.callId)),a=new Set(getSessionTaskIndex(n).filter(e=>e.terminalView===void 0).map(e=>e.taskId)),o=Object.fromEntries(Object.entries(r.actionAnchors).filter(([e,n])=>n.sessionId!==t||r.actions[e]!==void 0||i.has(n.callId)||a.has(deriveTaskId({callId:n.callId,parentSessionId:t,parentTurnId:n.turnId})))),s=new Set(Object.values(o).filter(e=>e.sessionId===t).map(e=>e.callId)),c=Object.fromEntries(Object.entries(r.invocations).filter(([,e])=>e.sessionId!==t||e.terminal!==void 0||s.has(e.parentActionCallId)));e.set(AgentTraceContextKey,{...r,actionAnchors:o,invocations:c})}function readCurrentSessionTraceDecision(e){let t=contextStorage.getStore();return t===void 0?void 0:readSessionTraceDecision(t,e)}function readSessionTraceDecision(e,t){return e.get(AgentTraceContextKey)?.sessions[t]?.decision}function preserveSerializedAgentTraceState(e,t){let n=t[AgentTraceContextKey.name];return n===void 0?e:{...e,[AgentTraceContextKey.name]:n}}function readTurnTraceContext(e,t,n){let r=e[AgentTraceContextKey.name];if(r===void 0)return;let i=deserializeAgentTraceContextState(r),a=i.turns[turnKey(t,n)];return a===void 0?void 0:withTraceDecision(e,a.context,i.sessions[t]?.decision)}function readActionTraceContext(e,t,n,r){let i=e[AgentTraceContextKey.name];if(i===void 0)return;let a=deserializeAgentTraceContextState(i),o=actionIdempotencyKey(t,n,r),s=a.invocations[o]??a.actions[o]??a.actionAnchors[o];if(s!==void 0)return withTraceDecision(e,{isRemote:!1,spanId:s.spanId,traceFlags:s.parent.traceFlags,traceId:s.parent.traceId},a.sessions[s.sessionId]?.decision)}function readTaskActionTrace(e,t,n){let r=deserializeAgentTraceContextState(e[AgentTraceContextKey.name]);return Object.values(r.actionAnchors).find(e=>e.sessionId===t&&deriveTaskId({callId:e.callId,parentSessionId:t,parentTurnId:e.turnId})===n)}function recordNestedAgentInvocation(e){let t=e.serializedContext[AgentTraceContextKey.name];if(t===void 0)return e.serializedContext;let n=deserializeAgentTraceContextState(t),r=actionIdempotencyKey(e.sessionId,e.turnId,e.outerCallId),i=n.actions[r]??n.actionAnchors[r];if(i===void 0)return e.serializedContext;let a=actionIdempotencyKey(e.sessionId,e.turnId,e.callId),promote=e=>e.isWorkflowTool===!0&&e.kind===`tool-call`?{...e,workflowName:e.name}:e,o=n.actions[r]===void 0?n.actions:{...n.actions,[r]:promote(n.actions[r])},s=n.actionAnchors[r]===void 0?n.actionAnchors:{...n.actionAnchors,[r]:promote(n.actionAnchors[r])};if(n.invocations[a]!==void 0)return{...e.serializedContext,[AgentTraceContextKey.name]:serializeAgentTraceContextState({...n,actionAnchors:s,actions:o})};let c={attemptIndex:i.attemptIndex,callId:e.callId,channelAudience:i.channelAudience,kind:e.kind,name:e.name,parent:{spanId:i.spanId,traceFlags:i.parent.traceFlags,traceId:i.parent.traceId},parentActionCallId:e.outerCallId,recordOutputs:e.recordOutputs===!0,rootSessionId:i.rootSessionId,sessionId:i.sessionId,spanId:e.spanId,startTimeMs:e.startTimeMs,stepIndex:i.stepIndex,turnId:i.turnId};return{...e.serializedContext,[AgentTraceContextKey.name]:serializeAgentTraceContextState({...n,actionAnchors:s,actions:o,invocations:{...n.invocations,[a]:c}})}}function recordActionInvocationKind(e){let t=e.serializedContext[AgentTraceContextKey.name];if(t===void 0)return e.serializedContext;let n=deserializeAgentTraceContextState(t),update=t=>t.sessionId===e.sessionId&&t.turnId===e.turnId&&t.callId===e.callId?{...t,isWorkflowTool:void 0,kind:e.kind,workflowName:void 0}:t;return{...e.serializedContext,[AgentTraceContextKey.name]:serializeAgentTraceContextState({...n,actionAnchors:Object.fromEntries(Object.entries(n.actionAnchors).map(([e,t])=>[e,update(t)])),actions:Object.fromEntries(Object.entries(n.actions).map(([e,t])=>[e,update(t)]))})}}function withTraceDecision(e,t,n){let r=e[SessionTraceSeedKey.name],i=resolveForwardedTraceSeed({decision:n??r?.decision,forwardedTracePolicy:r?.forwardedTracePolicy,traceFlags:t.traceFlags}),a=i.decision,o=i.forwardedTracePolicy,s=decisionToTraceContentCeiling(a),c={...t,traceFlags:i.traceFlags};if(o===void 0)return a===void 0?c:{...c,decision:a};let l=s===void 0?o:{...o,ceiling:s};return a===void 0?{...c,forwardedTracePolicy:l}:{...c,decision:a,forwardedTracePolicy:l}}var ContextAgentTraceStateStore=class{deleteAction(e){updateState(t=>{let n={...t.actions};return delete n[e],{...t,actions:n}})}deleteActionAnchors(e){updateState(t=>({...t,actionAnchors:Object.fromEntries(Object.entries(t.actionAnchors).filter(([,t])=>t.sessionId!==e))}))}deleteActions(e,t){updateState(n=>{let r={...n.actions};for(let[n,i]of Object.entries(r))i.sessionId===e&&(t===void 0||i.turnId===t)&&delete r[n];return{...n,actions:r}})}deleteInvocation(e){updateState(t=>{let n={...t.invocations};return delete n[e],{...t,invocations:n}})}deleteInvocations(e,t){updateState(n=>({...n,invocations:Object.fromEntries(Object.entries(n.invocations).filter(([,n])=>n.sessionId!==e||t!==void 0&&n.turnId!==t))}))}deleteSession(e){updateState(t=>{let n={...t.sessions};return delete n[e],{...t,sessions:n}})}deleteTurn(e,t){updateState(n=>{let r={...n.turns};return delete r[turnKey(e,t)],{...n,turns:r}})}findAction(e,t){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actions??{}).find(n=>n.sessionId===e&&n.callId===t)}findActionAnchor(e,t,n){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actionAnchors??{}).find(r=>r.sessionId===e&&r.turnId===t&&r.callId===n)}findInvocations(e,t,n){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.invocations??{}).filter(r=>(e===void 0||r.sessionId===e)&&(t===void 0||r.turnId===t)&&(n===void 0||r.parentActionCallId===n))}getAction(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.actions[e]}getSession(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.sessions[e]}getTurn(e,t){return contextStorage.getStore()?.get(AgentTraceContextKey)?.turns[turnKey(e,t)]}setAction(e,t){updateState(n=>({...n,actions:{...n.actions,[e]:t}}))}setActionAnchor(e,t){updateState(n=>({...n,actionAnchors:{...n.actionAnchors,[e]:t}}))}setInvocation(e,t){updateState(n=>({...n,invocations:{...n.invocations,[e]:t}}))}setSession(e,t){updateState(n=>({...n,sessions:{...n.sessions,[e]:t}}))}setTurn(e,t,n){updateState(r=>({...r,turns:{...r.turns,[turnKey(e,t)]:n}}))}updateTurn(e,t,n){updateState(r=>{let i=turnKey(e,t),a=r.turns[i];return a===void 0?r:{...r,turns:{...r.turns,[i]:n(a)}}})}};function updateState(e){loadContext().set(AgentTraceContextKey,t=>e(t??emptyAgentTraceContextState()))}function turnKey(e,t){return`${e}\0${t}`}export{ContextAgentTraceStateStore,preserveSerializedAgentTraceState,pruneAgentTraceState,readActionTraceContext,readCurrentSessionTraceDecision,readSessionTraceDecision,readTaskActionTrace,readTurnTraceContext,recordActionInvocationKind,recordNestedAgentInvocation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,formatError}from"#internal/logging.js";import{contextStorage}from"#context/container.js";import{ConversationIdKey}from"#context/keys.js";import{readConversationId}from"#tracing/conversation-context.js";import{ContextAgentTraceStateStore}from"#tracing/agent-trace-context-store.js";import{registerInstrumentationRuntime}from"#instrumentation/runtime.js";import{trace}from"#compiled/@opentelemetry/api/index.js";import{createInstrumentationHooks}from"#instrumentation/lifecycle.js";import{AgentSpanIdGenerator}from"#tracing/agent-span-id-generator.js";import{hasConversationRelease}from"#tracing/local-traces.js";import{createAgentOtelInstrumentation}from"#tracing/agent-otel-provider.js";import{registerOtelPipeline}from"#tracing/otel-registration.js";const log=createLogger(`tracing.install-instrumentation-runtime`);function installInstrumentationRuntime(e){let t=[],n=[],r,flushSettledInvocations,i,a,runInContext=(e,t)=>t();if(e.collected.declared){r=registerOtelPipeline({pipeline:e.collected.pipeline,serviceName:e.serviceName});let o=createAgentOtelInstrumentation({frameworkVersion:e.frameworkVersion,idGenerator:r.idGenerator,recordInputs:e.collected.settings.recordInputs,recordOutputs:e.collected.settings.recordOutputs,samplesTrace:r.samplesTrace,stateStore:new ContextAgentTraceStateStore,tracer:trace.getTracer(`eve.agent`,e.frameworkVersion),tracePolicy:e.collected.settings.tracePolicy});t.push({...o.hook,stateNamespace:`internal:otel`}),flushSettledInvocations=async()=>{await o.hook.flush?.()},i=o.prepareSessionTrace,a=o.prepareTurnTrace,runInContext=o.runInContext;let s=e.collected.pipeline.spanProcessors.filter(isSpanProcessor).filter(hasConversationRelease);s.length>0&&n.push(sessionReleaseProvider(s))}let o=[...t,...e.providers,...n],s;return registerInstrumentationRuntime({flushSettledInvocations,forceFlush:async()=>{await settleAll(o.map(e=>()=>e.flush?.())),await settleAll(r===void 0?[]:[r.forceFlush])},hooks:createInstrumentationHooks({parallel:e.providers,serialAfter:n,serialBefore:t}),idGenerator:r?.idGenerator??new AgentSpanIdGenerator,instrumentationProviders:e.instrumentationProviders,memoryOperations:r!==void 0||e.providers.some(hasMemoryOperationHandler),otelSettings:e.collected.declared?e.collected.settings:void 0,ownsAgentSpans:r!==void 0,prepareSessionTrace:i,prepareTurnTrace:a,runtimeContextResolvers:e.runtimeContextResolvers,runInContext,samplesTrace:r?.samplesTrace,shutdown:()=>(s??=(async()=>{await settleAll(o.map(e=>()=>e.shutdown?.())),await settleAll(r===void 0?[]:[r.shutdown])})(),s)})}function hasMemoryOperationHandler(e){return e.events?.[`memory.operation.started`]!==void 0||e.events?.[`memory.operation.completed`]!==void 0||e.events?.[`memory.operation.failed`]!==void 0}function isSpanProcessor(e){return e!==`auto`}function sessionReleaseProvider(e){let release=async t=>{let n=readConversationId(contextStorage.getStore()?.get(ConversationIdKey))??t.sessionId;n===t.sessionId&&await Promise.all(e.map(e=>e.releaseConversation(n)))};return{events:{"session.completed":release,"session.failed":release},name:`eve.conversation-release`,stateNamespace:`internal:conversation-release`}}async function settleAll(e){let t=await Promise.allSettled(e.map(async e=>e()));for(let e of t)e.status===`rejected`&&log.warn(`instrumentation drain failed`,{error:formatError(e.reason)})}export{installInstrumentationRuntime};
|
|
1
|
+
import{createLogger,formatError}from"#internal/logging.js";import{contextStorage}from"#context/container.js";import{ConversationIdKey}from"#context/keys.js";import{resolveInstrumentationEnvironment}from"#internal/application/dev-environment.js";import{readConversationId}from"#tracing/conversation-context.js";import{ContextAgentTraceStateStore}from"#tracing/agent-trace-context-store.js";import{registerInstrumentationRuntime}from"#instrumentation/runtime.js";import{trace}from"#compiled/@opentelemetry/api/index.js";import{createInstrumentationHooks}from"#instrumentation/lifecycle.js";import{AgentSpanIdGenerator}from"#tracing/agent-span-id-generator.js";import{hasConversationRelease}from"#tracing/local-traces.js";import{createAgentOtelInstrumentation}from"#tracing/agent-otel-provider.js";import{registerOtelPipeline}from"#tracing/otel-registration.js";const log=createLogger(`tracing.install-instrumentation-runtime`);function installInstrumentationRuntime(e){let t=[],n=[],r,flushSettledInvocations,i,a,runInContext=(e,t)=>t();if(e.collected.declared){r=registerOtelPipeline({pipeline:e.collected.pipeline,serviceName:e.serviceName});let o=createAgentOtelInstrumentation({environment:resolveInstrumentationEnvironment(),frameworkVersion:e.frameworkVersion,idGenerator:r.idGenerator,recordInputs:e.collected.settings.recordInputs,recordOutputs:e.collected.settings.recordOutputs,samplesTrace:r.samplesTrace,stateStore:new ContextAgentTraceStateStore,tracer:trace.getTracer(`eve.agent`,e.frameworkVersion),tracePolicy:e.collected.settings.tracePolicy});t.push({...o.hook,stateNamespace:`internal:otel`}),flushSettledInvocations=async()=>{await o.hook.flush?.()},i=o.prepareSessionTrace,a=o.prepareTurnTrace,runInContext=o.runInContext;let s=e.collected.pipeline.spanProcessors.filter(isSpanProcessor).filter(hasConversationRelease);s.length>0&&n.push(sessionReleaseProvider(s))}let o=[...t,...e.providers,...n],s;return registerInstrumentationRuntime({flushSettledInvocations,forceFlush:async()=>{await settleAll(o.map(e=>()=>e.flush?.())),await settleAll(r===void 0?[]:[r.forceFlush])},hooks:createInstrumentationHooks({parallel:e.providers,serialAfter:n,serialBefore:t}),idGenerator:r?.idGenerator??new AgentSpanIdGenerator,instrumentationProviders:e.instrumentationProviders,memoryOperations:r!==void 0||e.providers.some(hasMemoryOperationHandler),otelSettings:e.collected.declared?e.collected.settings:void 0,ownsAgentSpans:r!==void 0,prepareSessionTrace:i,prepareTurnTrace:a,runtimeContextResolvers:e.runtimeContextResolvers,runInContext,samplesTrace:r?.samplesTrace,shutdown:()=>(s??=(async()=>{await settleAll(o.map(e=>()=>e.shutdown?.())),await settleAll(r===void 0?[]:[r.shutdown])})(),s)})}function hasMemoryOperationHandler(e){return e.events?.[`memory.operation.started`]!==void 0||e.events?.[`memory.operation.completed`]!==void 0||e.events?.[`memory.operation.failed`]!==void 0}function isSpanProcessor(e){return e!==`auto`}function sessionReleaseProvider(e){let release=async t=>{let n=readConversationId(contextStorage.getStore()?.get(ConversationIdKey))??t.sessionId;n===t.sessionId&&await Promise.all(e.map(e=>e.releaseConversation(n)))};return{events:{"session.completed":release,"session.failed":release},name:`eve.conversation-release`,stateNamespace:`internal:conversation-release`}}async function settleAll(e){let t=await Promise.allSettled(e.map(async e=>e()));for(let e of t)e.status===`rejected`&&log.warn(`instrumentation drain failed`,{error:formatError(e.reason)})}export{installInstrumentationRuntime};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InstrumentationRuntime } from "#instrumentation/runtime.js";
|
|
2
2
|
import { type TraceCapturePolicy } from "#tracing/otel-declaration.js";
|
|
3
|
-
/** Zero-config local tracing keeps unclassified
|
|
3
|
+
/** Zero-config local tracing keeps public and unclassified sessions observable. @internal */
|
|
4
4
|
export declare const localTracePolicy: TraceCapturePolicy;
|
|
5
5
|
/** Installs the zero-config local OTel runtime once in an `eve dev` worker. */
|
|
6
6
|
export declare function installLocalInstrumentationRuntime(input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getInstrumentationRuntime}from"#instrumentation/runtime.js";import{installInstrumentationRuntime}from"#tracing/install-instrumentation-runtime.js";import{collectOtelPipeline,managedOtelIntegration,otel}from"#tracing/otel-declaration.js";import{createLocalTracesProcessor,resolveLocalTracesContent}from"#tracing/local-traces.js";const localTracePolicy=({audience:e})=>e
|
|
1
|
+
import{getInstrumentationRuntime}from"#instrumentation/runtime.js";import{installInstrumentationRuntime}from"#tracing/install-instrumentation-runtime.js";import{collectOtelPipeline,managedOtelIntegration,otel}from"#tracing/otel-declaration.js";import{createLocalTracesProcessor,resolveLocalTracesContent}from"#tracing/local-traces.js";const localTracePolicy=({audience:e})=>e!==`private`;function installLocalInstrumentationRuntime(e){let t=getInstrumentationRuntime();if(t!==void 0)return t;let n=createLocalTracesProcessor({appRoot:e.appRoot});return installInstrumentationRuntime({collected:collectOtelPipeline([otel({tracePolicy:localTracePolicy}),managedOtelIntegration({...resolveLocalTracesContent(),spanProcessors:[n]})]),frameworkVersion:e.frameworkVersion,providers:[],serviceName:e.serviceName})}export{installLocalInstrumentationRuntime,localTracePolicy};
|
package/docs/channels/custom.mdx
CHANGED
|
@@ -310,9 +310,29 @@ export default defineChannel({
|
|
|
310
310
|
|
|
311
311
|
The projection is re-evaluated whenever adapter state changes after channel event handlers run. Dynamic tool resolvers read it via `ctx.channel.metadata` and narrow it with `isChannel`. See [Dynamic capabilities](../guides/dynamic-capabilities) for the full consumption pattern.
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
### Conversation audience
|
|
314
314
|
|
|
315
|
-
|
|
315
|
+
Use `audience(input)` to classify who can observe the conversation. The hook runs after route authentication and before the session is created:
|
|
316
|
+
|
|
317
|
+
```ts
|
|
318
|
+
import { defineChannel, POST } from "eve/channels";
|
|
319
|
+
|
|
320
|
+
export default defineChannel({
|
|
321
|
+
state: { visibility: "workspace" as "workspace" | "private" | "unknown" },
|
|
322
|
+
audience({ state, auth }) {
|
|
323
|
+
if (state.visibility === "workspace") return "public";
|
|
324
|
+
if (auth?.principalType === "user") return "private";
|
|
325
|
+
return "unknown";
|
|
326
|
+
},
|
|
327
|
+
routes: [POST("/webhook", async () => new Response("ok"))],
|
|
328
|
+
});
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
The input contains the channel's `state`, authenticated `auth` principal, `channel`, `mode`, and `environment`. Return `"public"`, `"private"`, or `"unknown"`. Return `"unknown"` when the channel does not have enough evidence to classify confidently; consumers treat it as non-public. A missing, throwing, asynchronous, or malformed classifier also fails closed to `"unknown"`.
|
|
332
|
+
|
|
333
|
+
Classification is fixed when the session is created. Continuation turns from a different caller do not reclassify an existing session. When a parent dispatches a local subagent, the child inherits the parent's audience while the framework forwards the parent's custom channel metadata separately.
|
|
334
|
+
|
|
335
|
+
`metadata(state)` remains a channel-owned projection of custom observability fields. It no longer carries a reserved `audience` key. Channel extensions built before channel epoch 20 can still use that key; eve accepts it as a deprecated fallback and warns once, then authors should move classification to `audience(input)`.
|
|
316
336
|
|
|
317
337
|
## Continuation tokens
|
|
318
338
|
|
package/docs/channels/eve.mdx
CHANGED
|
@@ -157,6 +157,45 @@ Neither admits browser users or external clients in production. For a public app
|
|
|
157
157
|
|
|
158
158
|
For the full auth model and helper list, see [Auth & route protection](../guides/auth-and-route-protection).
|
|
159
159
|
|
|
160
|
+
## Audience
|
|
161
|
+
|
|
162
|
+
The eve channel classifies who can observe a session when that session is created:
|
|
163
|
+
|
|
164
|
+
| Session creator | Default audience |
|
|
165
|
+
| ----------------------------------------- | ---------------- |
|
|
166
|
+
| Anonymous caller | `public` |
|
|
167
|
+
| `user`, `service`, or `runtime` principal | `private` |
|
|
168
|
+
| Any other principal type | `unknown` |
|
|
169
|
+
|
|
170
|
+
Anonymous HTTP surfaces are public because anyone who can reach the surface can read it. Authenticated `user`, `service`, and `runtime` sessions are private because they belong to one identified party. Other authenticated principal types remain `unknown`: trace consumers record metadata but omit content by default in preview and production.
|
|
171
|
+
|
|
172
|
+
Pass a constant or a function to override the default:
|
|
173
|
+
|
|
174
|
+
```ts title="agent/channels/eve.ts"
|
|
175
|
+
import { none, vercelOidc } from "eve/channels/auth";
|
|
176
|
+
import { eveChannel } from "eve/channels/eve";
|
|
177
|
+
|
|
178
|
+
export default eveChannel({
|
|
179
|
+
auth: [vercelOidc()],
|
|
180
|
+
audience: "private",
|
|
181
|
+
});
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```ts title="agent/channels/eve.ts"
|
|
185
|
+
import { vercelOidc } from "eve/channels/auth";
|
|
186
|
+
import { eveChannel } from "eve/channels/eve";
|
|
187
|
+
|
|
188
|
+
export default eveChannel({
|
|
189
|
+
auth: [vercelOidc(), none()],
|
|
190
|
+
audience({ auth, environment }) {
|
|
191
|
+
if (auth === null) return environment === "development" ? "public" : "unknown";
|
|
192
|
+
return "private";
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
The function receives the authenticated principal, channel, run mode, and deployment environment. Classification is fixed at session creation; a continuation turn from a different caller does not reclassify the session. When another eve deployment forwards a request without an accepted forwarded trace assertion, the calling deployment's principal is used for classification, so the session remains `private`. A custom [trace policy](../guides/instrumentation-providers#control-inputs-and-outputs) can still admit or deny content independently.
|
|
198
|
+
|
|
160
199
|
## Customization
|
|
161
200
|
|
|
162
201
|
Use `onMessage` to add request-specific context before the agent sees the user message, and `events` to observe stream events from sessions this channel created:
|
package/docs/channels/slack.mdx
CHANGED
|
@@ -438,6 +438,53 @@ export default slackChannel({
|
|
|
438
438
|
|
|
439
439
|
HITL renders as Slack buttons and selects. Fixed-choice actions and freeform modal submissions pass through `onInputResponse` before the parked session resumes. The initial **Type your answer** action only opens eve's modal; the hook runs when the user submits an answer.
|
|
440
440
|
|
|
441
|
+
Set `approvalChannel` to choose where each input request appears, including tool approvals and questions from `ctx.ask()`. Return `"direct-message"` when the request must be visible only to the Slack user who triggered the turn, or `"thread"` for the normal shared thread.
|
|
442
|
+
|
|
443
|
+
```ts title="agent/channels/slack.ts"
|
|
444
|
+
import { slackChannel } from "eve/channels/slack";
|
|
445
|
+
|
|
446
|
+
export default slackChannel({
|
|
447
|
+
approvalChannel: (request) =>
|
|
448
|
+
request.kind === "question" || request.action.toolName === "review_answer"
|
|
449
|
+
? "direct-message"
|
|
450
|
+
: "thread",
|
|
451
|
+
});
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
The callback receives the `InputRequest` and current `SessionContext`, so it can switch on `kind`, `action`, or presentation properties. Omit it to keep every request in the thread, or return `"direct-message"` unconditionally to make every request private. If eve cannot resolve the triggering Slack user for a direct message, it logs the undelivered request and posts no fallback, so private delivery fails closed. The existing `onInputResponse` or tool approval response policy still decides whether the person who clicks may respond.
|
|
455
|
+
|
|
456
|
+
An authored `input.requested` handler can extend delivery and then hand the requests back to eve through `defaultDeliver()`. For example, an application can add non-sensitive context to the Slack thread before eve renders the actionable controls. The configured `approvalChannel` still sends sensitive reviews to a DM and keeps ordinary requests in the thread:
|
|
457
|
+
|
|
458
|
+
```ts title="agent/channels/slack.ts"
|
|
459
|
+
import { slackChannel } from "eve/channels/slack";
|
|
460
|
+
import { isPrivate } from "../lib/review-policy";
|
|
461
|
+
|
|
462
|
+
export default slackChannel({
|
|
463
|
+
approvalChannel(request) {
|
|
464
|
+
return isPrivate(request) ? "direct-message" : "thread";
|
|
465
|
+
},
|
|
466
|
+
events: {
|
|
467
|
+
async "input.requested"(event, channel, _ctx, defaultDeliver) {
|
|
468
|
+
await channel.thread.post({
|
|
469
|
+
blocks: [
|
|
470
|
+
{
|
|
471
|
+
type: "context",
|
|
472
|
+
elements: [
|
|
473
|
+
{
|
|
474
|
+
type: "mrkdwn",
|
|
475
|
+
text: "A review is needed before this work can continue.",
|
|
476
|
+
},
|
|
477
|
+
],
|
|
478
|
+
},
|
|
479
|
+
],
|
|
480
|
+
text: "A review is needed before this work can continue.",
|
|
481
|
+
});
|
|
482
|
+
await defaultDeliver(event);
|
|
483
|
+
},
|
|
484
|
+
},
|
|
485
|
+
});
|
|
486
|
+
```
|
|
487
|
+
|
|
441
488
|
Authorization prompts split public status from private credentials. A sign-in challenge (OAuth URL, device code) is a credential. Anyone who completes it binds their identity to the session's connection. The default `authorization.required` handler posts a public, link-free status in the thread, delivers the actual challenge ephemerally to the triggering user, device code included, and then updates that public status when `authorization.completed` fires. The handler receives a private-delivery context with `postEphemeral`, `postDirectMessage` (needs the `im:write` scope), and `state`. There is, intentionally, no public `post` and no raw API access.
|
|
442
489
|
|
|
443
490
|
```ts
|
package/docs/connections/mcp.mdx
CHANGED
|
@@ -24,6 +24,20 @@ export default defineMcpClientConnection({
|
|
|
24
24
|
|
|
25
25
|
The `url` must speak Streamable HTTP or SSE. Write the `description` for the model, not for yourself: it is the main signal `connection_search` uses when deciding which connection to query.
|
|
26
26
|
|
|
27
|
+
## Configure protocol discovery
|
|
28
|
+
|
|
29
|
+
eve discovers the server's MCP protocol by default. If a server requires the older `initialize` handshake, disable discovery for that connection:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
export default defineMcpClientConnection({
|
|
33
|
+
url: "https://mcp.example.com/mcp",
|
|
34
|
+
description: "Search support cases",
|
|
35
|
+
protocolVersionDiscovery: false,
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
With `protocolVersionDiscovery: false`, the client skips `server/discover` and starts with `initialize`, proposing `2025-11-25` and negotiating a supported handshake-based version. This is a per-connection setting; omitting it or setting it to `true` keeps discovery enabled. Remove the override when the server supports discovery. The setting also applies to connections returned by dynamic resolvers.
|
|
40
|
+
|
|
27
41
|
## Use Vercel Connect for OAuth
|
|
28
42
|
|
|
29
43
|
For OAuth-backed MCP servers, use the shared [Vercel Connect flow](../connections#interactive-oauth-via-vercel-connect), then pass the returned connector UID to `connect()`. Keep the MCP runtime URL and Connect service identifier distinct. For example, Linear uses `https://mcp.linear.app/mcp` as the MCP endpoint and `mcp.linear.app` when creating the connector.
|
|
@@ -22,7 +22,9 @@ const nextConfig: NextConfig = {};
|
|
|
22
22
|
export default withEve(nextConfig);
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
By default `withEve()` looks for an `agent/` folder inside your Next.js project root.
|
|
25
|
+
By default `withEve()` looks for an `agent/` folder inside your Next.js project root. When the project root is an eve workspace with `agents/<name>/` members, it discovers every member and mounts each at `/eve/agents/<name>/eve/v1/*` instead.
|
|
26
|
+
|
|
27
|
+
If one agent lives somewhere else, point at it with `eveRoot`:
|
|
26
28
|
|
|
27
29
|
```ts
|
|
28
30
|
export default withEve(nextConfig, {
|
|
@@ -30,7 +32,7 @@ export default withEve(nextConfig, {
|
|
|
30
32
|
});
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
To mount agents that are not members of the project-level `agents/` workspace, use `agents`. String values are agent roots; object values can override the build command or private production service prefix for that agent:
|
|
34
36
|
|
|
35
37
|
```ts
|
|
36
38
|
export default withEve(nextConfig, {
|
|
@@ -60,13 +62,13 @@ Generated agent services build with `EVE_PUBLIC_ROUTE_PREFIX` set to the agent's
|
|
|
60
62
|
|
|
61
63
|
All fields are optional.
|
|
62
64
|
|
|
63
|
-
| Option | Type | Default
|
|
64
|
-
| -------------------- | --------------------- |
|
|
65
|
-
| `eveRoot` | `string` | Next.js app root
|
|
66
|
-
| `agents` | `Record<string, ...>` |
|
|
67
|
-
| `eveBuildCommand` | `string` | generated
|
|
68
|
-
| `servicePrefix` | `string` | `"/_eve_internal/eve"`
|
|
69
|
-
| `devServerTimeoutMs` | `number` | `180000`
|
|
65
|
+
| Option | Type | Default | Purpose |
|
|
66
|
+
| -------------------- | --------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| `eveRoot` | `string` | Next.js app root | Path to one unnamed eve app root, relative to `process.cwd()` unless absolute. Do not combine with `agents`. |
|
|
68
|
+
| `agents` | `Record<string, ...>` | inferred for a workspace | Named eve agents to mount under `/eve/agents/<name>/eve/v1/*`. `withEve()` discovers project-level `agents/<name>/` members when neither `agents` nor `eveRoot` is set; otherwise each value is a root string or `{ root, buildCommand?, servicePrefix? }`. |
|
|
69
|
+
| `eveBuildCommand` | `string` | generated | Build command for generated eve Vercel services. In multi-agent mode this is the default for agents without their own `buildCommand`. |
|
|
70
|
+
| `servicePrefix` | `string` | `"/_eve_internal/eve"` | Private route namespace for legacy manual Vercel service configs and non-Vercel production proxying. Named agents derive unique defaults from this prefix. |
|
|
71
|
+
| `devServerTimeoutMs` | `number` | `180000` | Maximum time to wait for each eve development server to become available. |
|
|
70
72
|
|
|
71
73
|
For slow cold starts, increase the development timeout:
|
|
72
74
|
|
|
@@ -124,7 +126,7 @@ See [Resumable sessions](./overview#resumable-sessions) for persistence and repl
|
|
|
124
126
|
});
|
|
125
127
|
```
|
|
126
128
|
|
|
127
|
-
- **Local production build.** `next build && next start` serves the eve runtime from its built `.output/server/index.mjs` on a stable local port (`4274`) and proxies the eve routes to it. Run `eve build` first so that output exists. Change the port with `EVE_NEXT_PRODUCTION_PORT`:
|
|
129
|
+
- **Local production build.** `next build && next start` serves the eve runtime from its built `.output/server/index.mjs` on a stable local port (`4274`) and proxies the eve routes to it. Run `eve build` first so that output exists. In an `agents/` workspace, build every member from its `agents/<name>/` directory before starting Next.js. Change the port with `EVE_NEXT_PRODUCTION_PORT`:
|
|
128
130
|
|
|
129
131
|
```bash
|
|
130
132
|
EVE_NEXT_PRODUCTION_PORT=5000 npm run build && npm start
|
|
@@ -65,10 +65,10 @@ Each provider has an independent `tracePolicy`. It decides whether the provider
|
|
|
65
65
|
import { defineInstrumentation } from "eve/instrumentation";
|
|
66
66
|
|
|
67
67
|
export default defineInstrumentation({
|
|
68
|
-
tracePolicy: ({ audience }) => ({
|
|
68
|
+
tracePolicy: ({ audience, environment }) => ({
|
|
69
69
|
emit: true,
|
|
70
|
-
recordInputs: audience === "public",
|
|
71
|
-
recordOutputs: audience === "public",
|
|
70
|
+
recordInputs: audience === "public" || environment === "development",
|
|
71
|
+
recordOutputs: audience === "public" || environment === "development",
|
|
72
72
|
}),
|
|
73
73
|
events: {
|
|
74
74
|
"model.call.started": (event) => {
|
|
@@ -81,9 +81,11 @@ export default defineInstrumentation({
|
|
|
81
81
|
});
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
The policy receives `agentName`, `audience`,
|
|
84
|
+
The policy receives `agentName`, `channel`, `audience`, `mode`, `environment`, and `principalType`. `audience` is `"public"`, `"private"`, or `"unknown"`. `environment` is `"development"`, `"preview"`, or `"production"`.
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
`principalType` is the principal used for classification. Normal channels report their route or session principal; forwarded eve sessions report the calling deployment's principal. Sessions that predate the durable conversation key report their session initiator.
|
|
87
|
+
|
|
88
|
+
The default policy emits metadata for every audience and includes inputs and outputs for `public` conversations and for any audience in a development environment. Preview behaves like production: an `unknown` conversation records metadata only. Return an explicit decision to change that behavior:
|
|
87
89
|
|
|
88
90
|
| Decision | Result |
|
|
89
91
|
| --------------------------------------------- | ------------------------------------------------------------ |
|
|
@@ -162,10 +164,10 @@ import { otel } from "eve/instrumentation/otel";
|
|
|
162
164
|
|
|
163
165
|
export default otel({
|
|
164
166
|
resource: { "deployment.environment": process.env.VERCEL_ENV ?? "development" },
|
|
165
|
-
tracePolicy: ({ audience }) => ({
|
|
167
|
+
tracePolicy: ({ audience, environment }) => ({
|
|
166
168
|
emit: true,
|
|
167
|
-
recordInputs: audience === "public",
|
|
168
|
-
recordOutputs: audience === "public",
|
|
169
|
+
recordInputs: audience === "public" || environment === "development",
|
|
170
|
+
recordOutputs: audience === "public" || environment === "development",
|
|
169
171
|
}),
|
|
170
172
|
});
|
|
171
173
|
```
|
|
@@ -62,7 +62,7 @@ You are responsible for ensuring any observability or eval provider is approved
|
|
|
62
62
|
|
|
63
63
|
The third configurable surface, [runtime context events](#runtime-context), attaches per-model-call values to these spans.
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Channels classify their conversation with an `audience`: `public`, `private`, or `unknown`. The eve channel classifies anonymous callers as public and authenticated `user`, `service`, or `runtime` callers as private. Slack public-channel handoffs and Chat SDK workspace-visible threads are public; direct and private conversations are private; platform surfaces without enough visibility evidence remain unknown. Inbound Slack webhooks remain `unknown`; proactive Slack `receive` / `ctx.send` handoffs also stay `unknown` unless the caller passes `audience` on the target, for example when a webhook or schedule already knows the destination channel is public.
|
|
66
66
|
|
|
67
67
|
## Channel delivery traces
|
|
68
68
|
|
|
@@ -253,7 +253,7 @@ Agent Runs activation metadata includes bounded principal summaries:
|
|
|
253
253
|
|
|
254
254
|
Types are limited to `user`, `service`, `runtime`, `app`, `anonymous`, `local-dev`, `unknown`, `none`, and `other`. Types are emitted for every audience when a principal is present. An absent type means no authentication context was set; `none` means an explicitly null principal and has no ID. The auth layer's `unknown` type stays `unknown`; unrecognized authored types become `other`.
|
|
255
255
|
|
|
256
|
-
Principal IDs require
|
|
256
|
+
Principal IDs require content-visible capture and a resolved trace decision that allows both `recordInputs` and `recordOutputs`. Public turns and every audience in a development environment can include IDs; private and unknown turns omit them in preview and production. A user-configured trace policy or forwarded content ceiling that denies either direction omits both principal IDs before turn state is stored or sampled. Empty IDs and IDs larger than 1 KiB of UTF-8 data are omitted, not truncated; authentication records are unchanged. eve does not copy other authentication fields, such as claims, email attributes, issuers, or subjects, into these summaries.
|
|
257
257
|
|
|
258
258
|
## Query exported traces
|
|
259
259
|
|
|
@@ -173,7 +173,7 @@ export default eveChannel({
|
|
|
173
173
|
|
|
174
174
|
The request must also include a callback and a valid sampled `traceparent`. Those fields identify a remote call, but they do not establish trust. `trustedForwarders` is the authorization boundary.
|
|
175
175
|
|
|
176
|
-
The receiver combines the incoming ceiling with its own trace policy. Each hop may narrow the result, but it cannot restore inputs or outputs removed earlier. The original audience stays the same across remote and local subagent hops. Public origins may include content by default
|
|
176
|
+
The receiver combines the incoming ceiling with its own trace policy. Each hop may narrow the result, but it cannot restore inputs or outputs removed earlier. The original audience stays the same across remote and local subagent hops. Public origins may include content by default. Private and unknown origins stay metadata-only in preview and production unless both deployments explicitly allow them; a receiver running in development still applies the development content default.
|
|
177
177
|
|
|
178
178
|
The live delivery audience still matters. An unknown callback delivery, or one matching the origin, uses the session decision. A different explicit audience applies its own hard ceiling, so a private delivery stays redacted even when the trace began in public.
|
|
179
179
|
|
|
@@ -19,7 +19,7 @@ eve add memory/file
|
|
|
19
19
|
|
|
20
20
|
If an item is not found, `eve add` searches the available catalogs and prints close matches without installing anything.
|
|
21
21
|
|
|
22
|
-
Web Chat installs a project-level Next.js application and cannot currently be added to a top-level `agents/` workspace. For that topology, create a root Next.js application and
|
|
22
|
+
Web Chat installs a project-level Next.js application and cannot currently be added to a top-level `agents/` workspace. For that topology, create a root Next.js application and wrap its config with [`withEve()`](./guides/frontend/nextjs); eve discovers the workspace agents automatically. eve rejects `eve add channel/web` before writing files when the selected agent belongs to such a workspace.
|
|
23
23
|
|
|
24
24
|
If you do not know an item name yet, run `eve add` without an argument. Its help output shows how to search the registry with `eve registry search <query>`.
|
|
25
25
|
|
package/docs/reference/cli.md
CHANGED
|
@@ -47,14 +47,15 @@ eve init [target] [--model <provider/model-id>] [--reasoning <effort>] [--channe
|
|
|
47
47
|
|
|
48
48
|
Creates a new agent app or adds an agent to an existing app. Always installs dependencies. New directories also initialize Git.
|
|
49
49
|
|
|
50
|
-
| Target
|
|
51
|
-
|
|
|
52
|
-
| `eve init my-agent`
|
|
53
|
-
| `eve init` or `eve init .` in an empty directory
|
|
54
|
-
| `eve init` or `eve init .` in a
|
|
55
|
-
| `eve init .` in an existing project
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
| Target | What happens |
|
|
51
|
+
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
52
|
+
| `eve init my-agent` | Creates an agent project in `my-agent/` |
|
|
53
|
+
| `eve init` or `eve init .` in an empty directory | Creates an agent project in the current directory |
|
|
54
|
+
| `eve init` or `eve init .` in a directory with files other than environment metadata and no `package.json` | Refuses to overwrite the directory. Pass a new directory name, such as `eve init my-agent` |
|
|
55
|
+
| `eve init` or `eve init .` in an existing project | Adds `agent/` plus missing `eve`, `ai`, and `zod` dependencies. Requires `package.json` and no existing `agent/` files |
|
|
56
|
+
| `eve init path/to/app` | Adds an agent to the existing package at `path/to/app` |
|
|
57
|
+
|
|
58
|
+
Existing packages do not need a target-selection prompt: run `eve init` from the project directory or `eve init path/to/app`. New projects in non-interactive environments need a new directory name, such as `eve init my-agent`.
|
|
58
59
|
|
|
59
60
|
After scaffolding, a human terminal usually continues into `eve dev`. Enable the self-modification subagent to edit your agent from the dev session. Otherwise, if a coding-agent REPL is on `PATH`, you can launch it to make changes instead of opening the TUI. Fresh projects use the parent workspace's package manager when there is one; otherwise they use the manager that launched `eve init`.
|
|
60
61
|
|
package/docs/subagents/index.mdx
CHANGED
|
@@ -79,7 +79,7 @@ export default defineWorkspaceAgent({
|
|
|
79
79
|
});
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
The helper uses the peer's root `defineAgent({ description })` value as the model-visible tool description. Pass `description` to override it for this caller. When `transport` is omitted, eve selects the built-in transport for the runtime environment. Vercel deployments route through the current deployment and authenticate with the caller's Vercel OIDC token. Outside Vercel, provide an explicit transport with `url` and optional `auth` or `headers`:
|
|
82
|
+
The helper uses the peer's root `defineAgent({ description })` value as the model-visible tool description. Pass `description` to override it for this caller. When `transport` is omitted, eve selects the built-in transport for the runtime environment. Vercel deployments route through the current deployment and authenticate with the caller's Vercel OIDC token. A workspace hosted through `withEve()` in a Next.js app uses its `/eve/agents/<name>` mount; a hostless workspace uses `/<name>`. Outside Vercel, provide an explicit transport with `url` and optional `auth` or `headers`:
|
|
83
83
|
|
|
84
84
|
```ts title="agents/foreman/agent/subagents/research.ts"
|
|
85
85
|
import { defineWorkspaceAgent } from "eve";
|
|
@@ -217,6 +217,8 @@ Do not rely on subagent delegation by itself as an approval boundary. Put sensit
|
|
|
217
217
|
|
|
218
218
|
Each delegated subagent spins up its own child session and stream. The parent stream carries the control-plane events `subagent.called` and `subagent.completed`, plus interactive `input.requested`, `authorization.required`, and `authorization.completed` events proxied from descendants so the root channel can prompt the user. To follow the child's other progress, read `subagent.called.data.childSessionId` and subscribe at `GET /eve/v1/session/:childSessionId/stream`.
|
|
219
219
|
|
|
220
|
+
Channels with activity reporting attribute the backing agent's tool activity to its background task. Local and remote subagents share the task's progress item rather than adding a separate agent item. Continuing or steering a child with `agentId` attaches its new activity to the new task; the previous task keeps its completed or cancelled status. This applies to the built-in `agent` and declared subagent tools, not to child invocations inside custom workflow tools. Activity reporting is best-effort and does not change task execution or result delivery.
|
|
221
|
+
|
|
220
222
|
A background task that was already admitted survives cancellation of the turn that started it; background work that has not yet been admitted is rejected with the cancelled step. Use `task_cancel` to stop an admitted task. Cancellation delivers the task's final notification to an active parent even if the task must be stopped forcibly. Parent-session finalization cancels remaining live tasks.
|
|
221
223
|
|
|
222
224
|
Subagent model calls automatically retry classified transient provider failures, including overload errors delivered after a stream starts. eve makes at most three fresh model-call attempts, repeating only the current uncommitted call by default so completed earlier Workflow steps, tool results, and sandbox work remain available to the child. A declared subagent that opts into [Workflow checkpoint batching](./agent-config#workflow-checkpoint-batching) can instead repeat the uncommitted calls and inline tool executions in its current batch. Other recoverable task errors fall back to Workflow's durable step retry from the last committed session snapshot. Exhausting the transient model-call attempts or the dedicated empty-response reissue returns one failed task result instead of stacking both retry budgets; terminal errors fail immediately.
|