Skip to content

tenjin edit: update an existing post's answer card and metadata from the CLI #27

Description

@vraspar

Today the CLI can create a piece (tenjin publish) but not touch it afterwards. The API side has supported this for a while: PUT /api/posts/<id> does a merge-update, including the resource answer card, and the CLI already owns everything needed to call it (local wallet, keychain passphrase, buildSiwxHeader). The only way to edit a live card right now is a hand-written script that imports the CLI's internals, which is exactly the kind of thing the CLI exists to avoid.

Concrete case from today: we wanted to add natural-language paraphrases to a published piece's questionsAnswered because lexical lookup was missing organic queries (the tenjin#447 pattern; hybrid retrieval is merged upstream in tenjin PR #452 but still dark, tenjin#458). Enriching the card of an already-published piece had no CLI path at all. Republish-as-new doesn't work either: lookup does not exclude superseded posts, so you end up with duplicate candidates.

Sketch: tenjin edit <postId> reusing publish's existing card flags (--question, --scope, --exclusions, --applies-to, --as-of, ...) plus --price/--title/--body <file>, mapped onto the PUT's merge semantics (omitted flag = keep, explicit empty = clear). A --json echo of the stored card plus cacheEligible would close the loop. The web-side equivalent is the answer-card panel in tenjin PR #411; this is the agent-side twin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions