Repository navigation
[Cherry-pick] Cherry-pick to release-v0.182.0 - #1227
truefoundry-saas merged 2 commits into
Conversation
#1194) * feat: accept x-tfg-tools so a turn can mount ask_user_secret A TrueFoundry-mode turn can enable the client-side secret tool on the root agent. The header is not stored, and the secret value never enters the harness. Signed-off-by: Raman Tehlan <ramantehlan@gmail.com> * feat: accept tool definitions in x-tfg-tools Callers send the name, description, and JSON schema for each client-side tool. The harness mounts that list on the root agent for the turn. Signed-off-by: Raman Tehlan <ramantehlan@gmail.com> * fix: keep a typed secret out of the tool result Without a host secret form, the composer offered a plaintext answer and stored it as the ask_user_secret result. Signed-off-by: Raman Tehlan <ramantehlan@gmail.com> * fix: leave ask_user_secret rendering to the host frontend This package no longer special-cases the secret tool. The host that sends x-tfg-tools owns the form. Signed-off-by: Raman Tehlan <ramantehlan@gmail.com> * review comments * review comments: replace definiation with schema * Move assert tfgToolsHeader to turns.ts * review comment, fix drop of output schema * restructure to add capabilitiesStore --------- Signed-off-by: Raman Tehlan <ramantehlan@gmail.com>
🦋 Changeset detectedLatest commit: de9f56d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Qodex reviewReviewed units u1. The Fern specification version advances from 0.182.0-rc.2 to 0.182.0-rc.3. Effort: ●●●●● (5/5) · No findings worth raising. The diff reads clean. Since last review: 0 addressed, 0 new. Scope: the changes since the last review (delta: only what changed since the previously reviewed commit 3f9b02a is reviewed; findings are anchored on the whole change). WalkthroughWhat Qodex checkedLenses (openqodex review with checked answers, all dimensions)
Scanners
Quality filters
Verification (M1b probes against PR preview)
Cross-review dedup
Output
Reviewer: shown 2 of 2 changed hunks, opened 2 files, 8 tool calls served, 6 model calls, 0 correction rounds, 21.9s. The library does not report tool calls asked apart from those it served, or a step cap. Every dimension is reviewed. Bugs, security, and performance post inline; low-severity style and convention notes are collected in the group above rather than dropped. Mark a finding resolved or flag a false positive in the Qodex Pull Requests view. |
Automated cherry-pick for release request
b165bf01-e135-417d-9928-61a2f0d3d84a.Source PRs (merged to main):
Do not merge manually — this PR is merged automatically when the release request is approved. If you do merge it yourself, use "Sync status" on the request so it stops showing as pending.
Note
Medium Risk
Changes the turn startup path and tool advertisement for HTTP turns in TrueFoundry mode; malformed headers fail early with 400, and server-side execution is blocked for header tools.
Overview
Adds support for the
x-tfg-toolsrequest header in TrueFoundry mode: a JSON array of MCP tool definitions (including optionaloutputSchemaandannotations) that are not persisted—callers must resend the header on resume turns.Parsing and validation live in
inlineTools.ts(size/count limits, duplicate names, MCPToolSchema). A per-requestICapabilitiesStoreis resolved when a turn starts (before a turn id exists) and wired through turns and schedules; scheduled runs omit the header and mount nothing.TurnResourceResolvergains optionalrootCapabilities, which attachesextraCapabilitieson the main thread only (not sub-agents). Header tools are exposed as client-side system tools (e.g.ask_user_secret) that defer execution to the client rather than running on the server.LocalToolMCP.listToolsnow forwardsoutputSchemaandannotationsfrom local definitions so discovery/policy see the same metadata as inline header tools. OpenAPI version bumps to 0.182.0-rc.3.Reviewed by Cursor Bugbot for commit de9f56d. Bugbot is set up for automated code reviews on this repo. Configure here.