Skip to content

refactor(agent): pass options object to botInput and explain safeId - #162

Draft
santinofuentesAI wants to merge 1 commit into
DojoCodingLabs:mainfrom
santinofuentesAI:refactor/bot-input-options
Draft

santinofuentesAI wants to merge 1 commit into
DojoCodingLabs:mainfrom
santinofuentesAI:refactor/bot-input-options

Conversation

@santinofuentesAI

Copy link
Copy Markdown
Contributor

What and why

Follow-up to @dbejarano820's review notes on #134 (for #85).

Vision fit

Serves Principle 7 ("Small, typed and tested") and Principle 3 ("The model proposes. Code decides").

Non-negotiables

  • This keeps every non-negotiable in AGENTS.md as it is.
  • Or it changes one, and this is the accepted RFC: #

Checklist

  • It closes one issue, linked above, or it's a small fix (a typo, a broken link, a wrong comment). A feature has an accepted proposal. (Small review follow-up to feat(cage): add bot taint kind and untrusted botInput wrapper #134.)
  • I wrote the failing test first. It fails without this change and passes with it.
  • These pass: pnpm check:privacy, pnpm typecheck, pnpm lint, pnpm test and node scripts/guard/check.mjs --base origin/main --patterns scripts/guard/patterns.txt.
  • No new network call, telemetry, analytics, ads or crash reporting. (A new request in an app adapter is explained below, with its host, skill and risk.)
  • No new dependency, or the reason for each one is below.
  • Every UI string is in packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes. (n/a: no UI strings.)
  • Tests, fixtures and screenshots use made-up data only.

Model path

  • This doesn't touch the model path: packages/model, agent, skills or eval, the prompt, the router, tool descriptions, normalizers, examples or the model file.
  • It does. The eval numbers from before and after are below, run as docs/evals.md says. No held-out case was tuned on.

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.ts was not run locally because llama-server and Node 24 are not available on this machine; opened as a draft for maintainer confirmation.

Screenshots

  • No UI change.
  • UI change. Each changed screen is below, in both themes and both languages, with made-up data.

New dependencies and network calls

n/a

AI agents

  • No AI agent wrote any part of this.
  • An AI agent helped. Which one, and what it did: Antigravity updated packages/agent/src/untrusted.ts and packages/agent/test/untrusted.test.ts, ran all five local gates against origin/main (6f0d47e), and drafted this PR description.
  • I read and ran everything in this pull request, and I can explain it.

Signed-off-by: Santino Fuentes <santinofuentesAI@users.noreply.github.com>

@dbejarano820 dbejarano820 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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.
  2. The Model path section. packages/agent counts as the model path, and neither box is ticked. Please tick "It does" and add a line saying botInput has 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!

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