Repository navigation
refactor(agent): pass options object to botInput and explain safeId - #162
Draft
santinofuentesAI wants to merge 1 commit into
Draft
santinofuentesAI wants to merge 1 commit into
santinofuentesAI wants to merge 1 commit into
Conversation
Signed-off-by: Santino Fuentes <santinofuentesAI@users.noreply.github.com>
10 of 16 tasks
dbejarano820
left a comment
Contributor
There was a problem hiding this comment.
Thanks, Santino, for picking up the notes from #134. The options object makes the three strings impossible to swap, and the comment explains safeId well. Behavior is unchanged: the same wrapping, the same cleaning and the same taint record. The new taint.ref assertion locks in the raw id, which is a nice touch. Nothing outside the test calls botInput yet, so there's nothing else to update. I ran every gate locally on 1262003 and they all pass, and it merges cleanly with main.
Since it's a draft, here's what it needs before it's ready:
- CI hasn't run on this branch. No checks are recorded for 1262003. Please rebase onto main (it's 12 commits behind and merges cleanly) and push, so CI runs.
- The Model path section.
packages/agentcounts as the model path, and neither box is ticked. Please tick "It does" and add a line sayingbotInputhas no callers yet, so nothing the model sees changes. Given that, we won't ask for eval numbers on this one.
Since this follows a note from the review on #134, it doesn't need its own issue; keeping "Follow-up to #134" in the body is enough.
Thanks!
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.
What and why
Follow-up to @dbejarano820's review notes on #134 (for #85).
botInputinpackages/agent/src/untrusted.tsfrom positional parameters(botId, text, id, at)to an options object({ botId, text, seal, at }: BotInputOptions)so future bus code (Bots: run alone turns for handoffs and routines #88, Bots: add message_bot and reply_to_bot, checked in code first #90) cannot swap the three consecutive strings by mistake. Nothing outsidepackages/agent/test/untrusted.test.tscallsbotInputyet.sourceattribute uses the strippedsafeIdwhiletaint.refkeeps the rawbotId.Vision fit
Serves Principle 7 ("Small, typed and tested") and Principle 3 ("The model proposes. Code decides").
Non-negotiables
Checklist
acceptedproposal. (Small review follow-up to feat(cage): add bot taint kind and untrusted botInput wrapper #134.)pnpm check:privacy,pnpm typecheck,pnpm lint,pnpm testandnode scripts/guard/check.mjs --base origin/main --patterns scripts/guard/patterns.txt.packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes. (n/a: no UI strings.)Model path
packages/model,agent,skillsoreval, the prompt, the router, tool descriptions, normalizers, examples or the model file.This touches
packages/agent/src/untrusted.ts(botInput, which has no runtime callers yet), with no change to prompts, router, skills, normalizers, or model files.mac-eval.tswas not run locally becausellama-serverand Node 24 are not available on this machine; opened as a draft for maintainer confirmation.Screenshots
New dependencies and network calls
n/a
AI agents
packages/agent/src/untrusted.tsandpackages/agent/test/untrusted.test.ts, ran all five local gates againstorigin/main(6f0d47e), and drafted this PR description.