feat(daemon): Add define/endow/form verbs#3078
Open
zmanian wants to merge 8 commits intoendojs:llmfrom
Open
Conversation
…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]>
|
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
define/endow/form/respondFormverbs that separate code proposal from capability binding, reducing the social engineering surface ofrequestEvaluationwhere the LLM agent proposes both code and endowmentsdefine: 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.approve-eval.jsbroken import (parseNumber->parseBigint)makeBundleguard: accepts name path (array) for optional result arg, matchingmakeUnconfinedharden()calls tohelp-text.jsexportsdefine_codetool added as preferred alternative torequest_evaluationFiles changed
Daemon core
types.d.ts--DefineRequest,FormRequesttypes; expandedMessageunion andMessageFormulainterfaces.js-- Guards fordefine,formon Guest;endow,respondFormon Host; fixmakeBundleguardmail.js-- Factory functions, persistence, retrieval, and guest-facing methods for new message typesguest.js-- Wiredefineandformthrough to mailboxhost.js--endow()resolves host bindings into eval formula;respondForm()marshals valueshelp-text.js-- Documentation for all new methods; harden exportsCLI
endo define,endo endow,endo form,endo respond-forminbox.js-- Rendersdefinitionandform-requestmessagesendo.js-- Registers new commandsapprove-eval.js-- Fix brokenparseNumberimportLlamadrome
anthropic-backend.js--define_codetoolsystem-prompt.js-- Documentsdefineas preferred overrequestEvaluationCI status notes
The following CI failures are pre-existing on the
llmbase branch (not introduced by this PR):counter-exampletest gets1instead of2on secondincr()call, cascading to 4 other tests. This is caused by the merge ofkriskowal-endo-daemon-durable-messagesinto thellmbranch. This PR does not modifydaemon.jsor any core formula/provide code. Thellmbranch was never tested by CI (no push triggers, PR feat(llamadrome): Multi-backend LLM agent with requestEvaluation #3077 merged without CI checks).llmbranch (fix in PR style: Fix prettier formatting across llm branch #3080).llmbase branch.llmbase branch.Test plan
node --checkpasses on all modified/new JS filesendo purge -f && endo startendo define 'E(counter).incr()' --slot 'counter:A counter capability'endo inboxshows definition with slotsendo endow 0 --bind 'counter:my-counter'endo form HOST 'Configure settings' --field 'name:Your name'endo inboxshows form-request with fieldsendo respond-form 0 --value 'name:Alice'LLM_BACKEND=anthropicusesdefine_codetoolGenerated with Claude Code