toolspace › registry › Muninn task_policy
Muninn task_policy
Load the live policy for a perch autonomous task. Reads the {task}-command ops entry, recent preference memories, and the most recent real run, so task prompts route to fresh policy rather than hardcoded behavior.
Install
install-manifest install https://raw.githubusercontent.com/oaustegard/muninn-utilities/main/manifests/task-policy/muninn-task-policy.v0.4.json
manifest JSON · source · docs · issues · homepage
Security
| Kill switch | manual Manual procedure: — |
|---|---|
| Smoke contract | shell timeout 5s |
Scopes
-
memory.trackingread turso-libsql-token (coarse; full DB access)Reads the {task_name}-command ops entry, preference-tagged memories, and the most recent perch-time run for the named task. Never writes — the utility is a read-only policy resolver.
-
net.outboundread *.turso.ioTalks to the configured Turso libSQL host via the remembering library. No other outbound destinations.
Data boundary
Reads
memory.trackingsensitivity: medium
Actions
-
load read idempotent
Load the live policy for a perch task. Returns instructions + preference memories + last run. ·
memory.trackingnet.outbound- Goal
- Resolve a perch task's live policy from Turso.
- Inputs
task_name (req: e.g. 'zeitgeist'|'fly'|'sleep'|'dispatch'), n_prefs (int, default 5)- Outputs
{instructions: string|null, preferences: array, last_run: object|null}- Errors
tracking_unconfigured (no Turso creds; partial-success path leaves all three keys at null defaults)- Example
load task_name='zeitgeist' n_prefs=5
-
days_since_last_run none idempotent
Return days elapsed since policy.last_run, or null if no prior run is on record. Pure compute.
- Goal
- Compute the age of the most recent prior run.
- Inputs
policy (req: dict from load())- Outputs
{days: number|null}- Errors
(none — pure compute, returns null on parse miss)- Example
days_since_last_run policy={...}
-
format_summary none idempotent
Render a human-readable one-line summary of a loaded policy, for logging. Pure compute.
- Goal
- Render the policy as a one-line log message.
- Inputs
policy (req: dict from load()), task_name (req)- Outputs
{summary: string}- Errors
(none — pure compute)- Example
format_summary policy={...} task_name='zeitgeist'
Environment
TURSO_TOKEN |
Turso libSQL auth token for the Muninn memory database. The three reads (config_get, recall, _exec) all route through the remembering library, which uses these credentials. Required. required · secret: yes · obtain |
|---|---|
TURSO_URL |
Hostname of the Muninn memory libSQL database, e.g. 'mydb-username.turso.io'. required · secret: no |
Verify & cost
| Install fee | 0¢ |
|---|---|
| Monthly fee | 0¢ |
| Usage model | none |
Runtime
runtime: python-module · install method: preinstalled · entrypoint: python -m muninn_utils.task_policy
Three loads, all routed through the `remembering` library against Turso: (1) the {task_name}-command ops entry via config_get, (2) the N most recent memories tagged BOTH the task name AND 'preference' via recall(), (3) the most recent memory tagged with the task name and 'perch-time' but NOT 'skip' via a direct _exec SQL. Returns a dict combining the three plus a days_since_last_run helper. Pure read — no writes. The utility itself has no direct outbound HTTP; all I/O is mediated by the remembering library, which talks to Turso. See oaustegard/muninn-utilities#14 for the architectural background.
Tags: policyperchconfigmemorymuninn-internal
License: MIT
Last fetched 2026-06-18T09:09:17Z (live)