Skip to content

PersistentAI API Documentation / @persistentai/fireflow-types / NodeExecutionAnnotations

Interface: NodeExecutionAnnotations

Defined in: packages/fireflow-types/src/node/types.ts:24

Node execution annotations for deterministic parallel execution.

Design principles:

  • Only include what's REQUIRED for correct execution
  • Align with MCP tool annotations where sensible
  • Keep it simple

See

docs/design/018-deterministic-parallel-execution.md

Properties

dbos?

optional dbos: boolean

Defined in: packages/fireflow-types/src/node/types.ts:56

TRUE if node calls DBOS primitives:

  • dbos.runStep()
  • dbos.startSubflow() / executeSubflow()
  • dbos.sleep()
  • dbos.send() / recv()
  • dbos.setEvent() / getEvent()

DBOS nodes MUST start in deterministic order (sorted by node ID) to ensure consistent function_id sequence during replay.

Examples: ExecuteFlowNode, SleepNode

Default

ts
false

destructiveHint?

optional destructiveHint: boolean

Defined in: packages/fireflow-types/src/node/types.ts:70

MCP-aligned hint: If true, may delete or overwrite data. Useful for UI warnings, not scheduling.

Default

ts
true

idempotentHint?

optional idempotentHint: boolean

Defined in: packages/fireflow-types/src/node/types.ts:63

MCP-aligned hint: If true, safe to retry without side effects. Useful for error handling policies, not scheduling.

Default

ts
false

pure?

optional pure: boolean

Defined in: packages/fireflow-types/src/node/types.ts:39

TRUE if node is pure:

  • Same inputs always produce same outputs (deterministic)
  • No side effects (doesn't modify external state)

Pure nodes can:

  • Execute in any order
  • Be memoized (cached)
  • Be fused into clusters

Examples: MathNode, StringConcat, JSONParse, ArrayMap

Default

ts
false (conservative - assume impure if not specified)

Licensed under BUSL-1.1