Skip to content

Agent adapter: read/write task lists via NIP-98 (agent-side counterpart to the browser app) #3

Description

@melvincarvalho

What

The tasks app gives a human add / complete / edit / delete over a wf:Tracker list in <pod>/public/tracker/. We built and proved an agent-side counterpart: a small skill that lets an autonomous agent do the same operations on the same resource, authenticated by the agent's own Nostr key via NIP-98 — no OAuth, no JWT.

Because it writes the identical wf:Tracker shape to the same /public/tracker/ location, the two interoperate: a task the agent adds shows up in the tasks app, and a task you add/complete in the app is visible to the agent. One tracker, two clients — human UI + agent. Not a new silo.

How it works (brief)

  • The agent reads the list (public GET), edits the JSON-LD, and PUTs the whole document back with an Authorization: Nostr <base64 kind-27235 event> signature over its Nostr key.
  • Two primitives (get / put) plus the agent's own reasoning give full CRUD — no per-verb endpoints. Add = append a Vtodo; complete = set status to COMPLETED; delete = drop it from issue.
  • The auth mechanism and a few server-side papercuts are written up in jspod#79.

Question — where should it live?

This repo is currently a pure browser app (no Node code). The agent skill is small: a Node helper (NIP-98 signing + get/put) plus a short instruction file. Placement options:

  1. An agent/ (or skill/) folder here, co-located with the app it mirrors — "tasks, for agents."
  2. A separate package — since the signing primitive is generic pod read/write (not tasks-specific); only the wf:Tracker-shape knowledge is. That keeps this repo browser-only.

My lean: keep the generic NIP-98 read/write as a shared primitive elsewhere, and put only the thin tasks-specific instruction here (e.g. an agent/ doc + a tiny wrapper). But placement is the maintainer's call before any PR.

Size / shape

Tiny — ~100 lines across a helper + an instruction file. Currently ESM .mjs; would ship as .js inside a type: module package.

Refs: jspod#79 (the NIP-98 agent-write pattern).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions