PiBrowserTaskbarPhoenix.Task (pi_browser_taskbar_phoenix v0.1.0)

Copy Markdown

Validates browser requests and builds the trusted/untrusted Pi prompt envelope.

Summary

Functions

Validates and normalizes a version-one browser task request.

Builds the canonical prompt with browser data in a separate untrusted block.

Types

t()

@type t() :: %PiBrowserTaskbarPhoenix.Task{context: map(), prompt: String.t()}

Functions

new(params)

@spec new(map()) :: {:ok, t()} | {:error, :invalid_task, String.t()}

Validates and normalizes a version-one browser task request.

to_prompt(task)

@spec to_prompt(t()) :: String.t()

Builds the canonical prompt with browser data in a separate untrusted block.