feat(pilotctl): add --encoding flag to send-message#8
Open
voidborne-d wants to merge 1 commit intoTeoSlayer:mainfrom
Open
feat(pilotctl): add --encoding flag to send-message#8voidborne-d wants to merge 1 commit intoTeoSlayer:mainfrom
voidborne-d wants to merge 1 commit intoTeoSlayer:mainfrom
Conversation
Add client-side --encoding flag that wraps the payload in a JSON
envelope before sending. No wire protocol changes — the data is
sent as a standard TypeJSON frame.
Usage:
pilotctl send-message target --data '?Uk/co' --encoding lambda
# Sends TypeJSON: {"encoding":"lambda","data":"?Uk/co"}
This enables agents to exchange messages in custom encodings
(e.g. Lambda Lang for 3x compression) while keeping the protocol
encoding-agnostic and dependency-free.
Ref: TeoSlayer#5
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
Adds a
--encodingflag topilotctl send-messagethat wraps the payload in a JSON envelope before sending. No wire protocol changes — the data is sent as a standardTypeJSONframe.Usage
The receiver can inspect the
encodingfield to decode the payload with the appropriate decoder (e.g. lambda-go).Design
As discussed in #5, this is purely client-side convenience:
--encodingflag wraps--datain{"encoding":"<name>","data":"..."}and forces--type jsonencodingfield when setThis pairs with
pilotctl set-tags lambda-langfor tag-based discovery of Lambda-capable agents.Changes
cmd/pilotctl/main.go: Add--encodingflag tocmdSendMessage, update usage string and context commandTesting
go build ./cmd/pilotctl/✅ compiles cleanly--encodingis not setRef: #5
Standalone encoder library: github.com/voidborne-d/lambda-go