Skip to content

feat(daemon): Add define/endow/form verbs#3078

Open
zmanian wants to merge 8 commits intoendojs:llmfrom
zmanian:llm-durable-messages
Open

feat(daemon): Add define/endow/form verbs#3078
zmanian wants to merge 8 commits intoendojs:llmfrom
zmanian:llm-durable-messages

Conversation

@zmanian
Copy link

@zmanian zmanian commented Feb 7, 2026

Summary

  • Adds define/endow/form/respondForm verbs that separate code proposal from capability binding, reducing the social engineering surface of requestEvaluation where the LLM agent proposes both code and endowments
  • define: Guest proposes code with named capability slots (no endowments). Host sees code and slot descriptions in inbox.
  • endow: Host binds pet names to a definition's slots, creating an eval formula. Authority flows here -- host decides capabilities.
  • form/respondForm: Structured form request/response between agents.
  • Fixes approve-eval.js broken import (parseNumber -> parseBigint)
  • Fixes makeBundle guard: accepts name path (array) for optional result arg, matching makeUnconfined
  • Adds missing harden() calls to help-text.js exports
  • Llamadrome: define_code tool added as preferred alternative to request_evaluation

Files changed

Daemon core

  • types.d.ts -- DefineRequest, FormRequest types; expanded Message union and MessageFormula
  • interfaces.js -- Guards for define, form on Guest; endow, respondForm on Host; fix makeBundle guard
  • mail.js -- Factory functions, persistence, retrieval, and guest-facing methods for new message types
  • guest.js -- Wire define and form through to mailbox
  • host.js -- endow() resolves host bindings into eval formula; respondForm() marshals values
  • help-text.js -- Documentation for all new methods; harden exports

CLI

  • New commands: endo define, endo endow, endo form, endo respond-form
  • inbox.js -- Renders definition and form-request messages
  • endo.js -- Registers new commands
  • approve-eval.js -- Fix broken parseNumber import

Llamadrome

  • anthropic-backend.js -- define_code tool
  • system-prompt.js -- Documents define as preferred over requestEvaluation

CI status notes

The following CI failures are pre-existing on the llm base branch (not introduced by this PR):

  • test failures (5 CLI demo tests): The counter-example test gets 1 instead of 2 on second incr() call, cascading to 4 other tests. This is caused by the merge of kriskowal-endo-daemon-durable-messages into the llm branch. This PR does not modify daemon.js or any core formula/provide code. The llm branch was never tested by CI (no push triggers, PR feat(llamadrome): Multi-backend LLM agent with requestEvaluation #3077 merged without CI checks).
  • lint: Pre-existing prettier formatting issues in 16 files on the llm branch (fix in PR style: Fix prettier formatting across llm branch #3080).
  • docs-markdown: Pre-existing 154 errors on the llm base branch.
  • viable-release: Pre-existing on llm base branch.

Test plan

  • node --check passes on all modified/new JS files
  • endo purge -f && endo start
  • endo define 'E(counter).incr()' --slot 'counter:A counter capability'
  • endo inbox shows definition with slots
  • endo endow 0 --bind 'counter:my-counter'
  • endo form HOST 'Configure settings' --field 'name:Your name'
  • endo inbox shows form-request with fields
  • endo respond-form 0 --value 'name:Alice'
  • Llamadrome with LLM_BACKEND=anthropic uses define_code tool

Generated with Claude Code

kriskowal and others added 4 commits February 5, 2026 03:49
…ssages' into llm-durable-messages

# Conflicts:
#	packages/daemon/src/daemon.js
#	packages/daemon/src/host.js
#	packages/daemon/src/mail.js
#	packages/daemon/src/types.d.ts
…aluation

Introduces three new message verbs that separate code proposal from
capability binding, reducing the social engineering surface of
requestEvaluation where the LLM agent proposes both code and endowments.

- define: Guest proposes code with named capability slots (no endowments).
  The host sees the code and slot descriptions in their inbox.
- endow: Host binds pet names to a definition's slots, creating an eval
  formula. This is where authority flows -- the host decides capabilities.
- form: Guest sends a structured form request with labeled fields.
  The host fills it out and the guest receives a record.
- respondForm: Host responds to a form request with values.

Also fixes approve-eval.js which imported non-existent parseNumber
(should be parseBigint), and adds missing harden() calls to help-text.js
exports.

CLI commands: endo define, endo endow, endo form, endo respond-form.
Llamadrome: define_code tool added as preferred alternative to
request_evaluation.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Feb 7, 2026

⚠️ No Changeset found

Latest commit: e4cae48

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

zmanian and others added 4 commits February 7, 2026 15:55
Co-Authored-By: Claude Opus 4.6 <[email protected]>
M.interface guards only allow one .optional() call. Combined the two
optional parameters (workerName, resultName) into a single call.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
The makeBundle guard used NameShape (string) for its optional result
argument, but the CLI passes a NamePathShape (string[]) from
parseOptionalPetNamePath(). This matches the makeUnconfined guard
which already uses NameOrPathShape.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…d least-authority exos

The define and form methods added to GuestInterface were missing from the
least-authority exo, causing makeExo to throw and cascading cancellation
to all make-bundle formulas using NONE powers. This caused the counter to
re-incarnate fresh on each eval (always returning 1 instead of incrementing).

Also adds missing help and makeDirectory methods to MailHub and MessageHub
exos required by DirectoryInterface.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants