@uservane/vercel-ai: ResolveTaskOptions
Type Alias: ResolveTaskOptions
Section titled “Type Alias: ResolveTaskOptions”ResolveTaskOptions =
object
Defined in: products/uservane/agent-core/dist/index.d.ts:95
@uservane/vercel-ai - agent-native capture for Vercel AI SDK hosts.
Thin positioning shim over @uservane/agent-core + @uservane/agent-react.
Headless core (AgentController) + React <UserVaneProvider> / <InlineFeedback/>.
Reuses @uservane/browser for bootstrap, decideShow, submit. Does not reimplement
show-token, suppression, or sampling.
Session correlation (production linked path):
- Server:
import { mintFeedbackToken } from "@uservane/vercel-ai/server"with the project SECRET key + the same sessionId passed to Langfuse propagateAttributes. - Thread showToken + sessionId to the client.
- Client:
controller.bind({ surveyId, showToken, sessionId })then resolveTask. Submit carries the bound token + sessionId -> response storedlinked.
Without bind(), the unbound bootstrap path still works (stored unlinked).
Do not import the /server entry from client code (secret key must stay server-side).
Observation-level auto-read remains deferred.
// NEEDS CEO VERIFICATION: observation-level auto-read (deferred)
import { UserVaneProvider, useUserVane } from "@uservane/vercel-ai";
<UserVaneProvider apiKey="uv_pk_live_..." surveySlug="post-task"> <Chat /></UserVaneProvider>
// after server mints a bound token:controller.bind({ surveyId, showToken, sessionId });// at true resolution:const { resolveTask } = useUserVane();resolveTask({ outcome: "refunded" });Headless-only: construct AgentController with headlessMode: true and supply
setHeadlessContract({ isTaskOpen, onDismiss }) or shows are refused.
Properties
Section titled “Properties”defer?
Section titled “defer?”
optionaldefer?:boolean
Defined in: products/uservane/agent-core/dist/index.d.ts:107
Out-of-band / async resolution (deferAsk). Closes the task so in-session asks are barred for this resolution, but does NOT render InlineFeedback. Use mintDeferredAskLink on the server to deliver the ask later via the customer’s own channel (email, SMS, follow-up session). UserVane does not send email/SMS; last-mile non-intrusion is the customer’s contract.
outcome?
Section titled “outcome?”
optionaloutcome?:string
Defined in: products/uservane/agent-core/dist/index.d.ts:97
surveySlug?
Section titled “surveySlug?”
optionalsurveySlug?:string
Defined in: products/uservane/agent-core/dist/index.d.ts:99
Override the init survey slug for this resolution.
taskId?
Section titled “taskId?”
optionaltaskId?:string
Defined in: products/uservane/agent-core/dist/index.d.ts:96