Foundry.Context.NodeEntry (foundry v0.1.2)

Copy Markdown

The core typed output struct for per-module context queries. Mirrors the ModuleContext schema but with extended metadata.

Serialized with compact encoding: nil, false, [], and "" values are filtered out at any nesting depth. This optimizes LLM context while future-proofing stub fields (Phase B/D features appear automatically when populated).

Summary

Types

agent_step()

@type agent_step() :: %{
  step_id: String.t(),
  agent_type: String.t(),
  model: String.t(),
  input_schema: String.t() | nil,
  output_schema: String.t() | nil,
  tools: [String.t()],
  confidence_threshold: float() | nil,
  on_low_confidence: String.t() | nil,
  human_gate: map() | nil,
  telemetry_prefix: [String.t()]
}

auth_strategy()

@type auth_strategy() :: %{
  strategy_name: String.t(),
  strategy_type: :password | :magic_link | :oauth2 | :api_key | :other,
  identity_field: String.t() | nil,
  token_resource: String.t() | nil,
  has_sign_in_tokens: boolean(),
  has_password_reset: boolean()
}

money_attribute()

@type money_attribute() :: %{
  name: String.t(),
  type: String.t(),
  cldr_backend: String.t()
}

relationship()

@type relationship() :: %{
  name: String.t(),
  type: :belongs_to | :has_many | :has_one | :many_to_many,
  related_resource: String.t(),
  source_attribute: String.t() | nil,
  destination_attribute: String.t() | nil,
  description: String.t() | nil
}

state_machine()

@type state_machine() :: %{
  present: boolean(),
  states: [String.t()],
  transitions: [%{from: String.t(), to: String.t(), action: String.t()}],
  state_attribute: String.t() | nil,
  initial_states: [String.t()],
  default_initial_state: String.t() | nil,
  terminal_states: [String.t()]
}

test_coverage()

@type test_coverage() :: %{
  property_tests: boolean(),
  scenario_tests: boolean(),
  e2e_tests: boolean()
}