AppleIntents.Jido (apple_intents_jido v0.1.0)

Copy Markdown View Source

Jido integration for apple_intents.

Add this package when you want App Intent handlers to delegate to Jido.Exec actions with dry-run and approval previews.

Intent handler

defmodule MyApp.PhotoIntent do
  use AppleIntents.Intent, intent: "OrganizePhotos", domain: :photos
  use AppleIntents.Jido, task: "organize_photos"
end

Router

defmodule MyApp.IntentRouter do
  use AppleIntents.Router
  use AppleIntents.Jido, orchestrator: MyApp.Orchestrator

  handlers do
    [MyApp.PhotoIntent]
  end
end

Summary

Functions

Run the configured task for an intent module.

Run a Jido-backed task through the configured orchestrator.

Types

task_ref()

@type task_ref() :: module() | String.t()

Functions

run_from_intent(handler, params, context, opts \\ [])

@spec run_from_intent(module(), map(), AppleIntents.Context.t(), keyword()) ::
  {:ok, map()} | {:error, term()}

Run the configured task for an intent module.

run_task(task, params, context, opts \\ [])

@spec run_task(task_ref(), map(), AppleIntents.Context.t(), keyword()) ::
  {:ok, map()} | {:error, term()}

Run a Jido-backed task through the configured orchestrator.

Delegates to AppleIntents.Orchestration.run/4 with Jido defaults.