πŸ”’ VhyxSeal
GitHub

Intent Vocabulary

The built-in intent vocabulary maps common user action names to sensible contract defaults. Providing an intent prop at Level 1 adoption automatically fills safety level, reversibility, and confirmation requirements from these defaults.

Built-in Intents

25 intents total. Filter by name to find what you need.

IntentSafety LevelReversibleRequires ConfirmationDestructive
place-orderhighyesyesno
make-paymentcriticalnoyesno
delete-accountcriticalnoyesyes
delete-itemhighnoyesyes
send-messagemediumnonono
save-draftlowyesnono
submit-formmediumnonono
update-profilemediumyesnono
sign-outlowyesnono
sign-inlowyesnono
apply-filterlowyesnono
searchlowyesnono
upload-filemediumyesnono
download-filelowyesnono
schedule-meetingmediumyesnono
cancel-bookinghighnoyesno
publish-contenthighyesyesno
unpublish-contenthighyesyesno
share-itemmediumyesnono
navigatelowyesnono
confirm-actionhighnoyesno
collect-emaillowyesnono
collect-passwordsensitiveyesnono
collect-paymentsensitivenoyesno
authenticatemediumyesnono

Registering Custom Intents

Use registerIntent() to extend the built-in vocabulary with domain-specific intents. Once registered, the intent is recognized by isKnownIntent(), and its defaults are automatically merged when a developer uses the intent at Level 1 or Level 2 adoption.

import { registerIntent } from '@vhyxseal/core'

// Register a domain-specific intent with custom defaults
registerIntent("request-refund", {
  safetyLevel: "high",
  reversible: false,
  requiresConfirmation: true,
  destructive: false,
})

// The intent is now available for components:
// <Button intent="request-refund">Request Refund</Button>
// Library merges your registered defaults β€” no other fields required

Custom intents are appropriate when your domain has actions that don't map cleanly to the built-in vocabulary β€” for example, request-refund, approve-document, or archive-record. Keep intent names lowercase, hyphen-separated, and descriptive of the action from the user's perspective. Intent names must be 50 characters or fewer.