veryfront/trigger

Import

ts
import {
  conversationConflictDiagnostic,
  declarationConflictDiagnostic,
  discoverSourceTriggers,
  isTriggerId,
  isTriggerTarget,
  runTriggerTarget,
} from "veryfront/trigger";

Examples

Discover and run a source-defined trigger target

ts
import { discoverSchedules } from "veryfront/schedule";
import { runTriggerTarget } from "veryfront/trigger";

const { items } = await discoverSchedules({ projectDir, adapter });
const dailyTriage = items.find((item) => item.id === "daily-support-triage");

if (dailyTriage) {
  await runTriggerTarget({
    projectDir,
    adapter,
    target: dailyTriage.target,
    input: dailyTriage.input,
  });
}

Exports

Functions

NameDescriptionSource
conversationConflictDiagnosticDescribe a conversation pair that disagrees across two locations.source
declarationConflictDiagnosticDescribe one value declared in two places with disagreeing content.source
discoverSourceTriggersDiscover, validate, normalize, and deterministically de-duplicate source trigger definitions.source
isTriggerIdReturn true for a bounded canonical slash-separated trigger identifier.source
isTriggerTargetReturn true only for canonical targets stored in own data properties.source
runTriggerTargetDiscover and execute one canonical task, workflow, or agent target.source

Types

NameDescriptionSource
AgentConversationModeHosted conversation behavior for an agent trigger target.source
AgentTriggerTargetTrigger target addressing an agent definition and its hosted conversation.source
ResolvedTriggerTargetValidated target value that narrows conversation fields by kind.source
RunTriggerTargetOptionsOptions for one local trigger target execution.source
SourceTriggerDiscoveryErrorStructured failure produced while discovering one source definition.source
SourceTriggerDiscoveryErrorCodeStable failure categories emitted while discovering source triggers.source
SourceTriggerDiscoveryOptionsValidation and normalization contract for source trigger discovery.source
SourceTriggerDiscoveryResultDeterministic source trigger discovery result.source
SourceTriggerKindSource definition families handled by shared trigger discovery.source
TaskTriggerTargetTrigger target addressing a task definition.source
TriggerDefinitionWithIdMinimum contract required for source trigger de-duplication.source
TriggerDiscoveryOptionsShared filesystem, directory, and source-kind options for trigger discovery.source
TriggerTargetCanonical reference to a runnable project definition.source
TriggerTargetConfigAuthor-facing target shape accepting stored base values and kind-specific literals.source
TriggerTargetKindSupported local trigger target kinds.source
TriggerTargetRunResultSuccessful local trigger target result.source
WorkflowTriggerTargetTrigger target addressing a workflow definition.source