Skip to content

[Cherry-pick] Cherry-pick to release-v0.182.0 - #1227

Merged
truefoundry-saas merged 2 commits into
release-v0.182.0from
cherry-pick/b165bf01-e135-417d-9928-61a2f0d3d84a/release-v0.182.0
Oct 30, 2026
Merged

truefoundry-saas merged 2 commits into
release-v0.182.0from
cherry-pick/b165bf01-e135-417d-9928-61a2f0d3d84a/release-v0.182.0

Conversation

@truefoundry-saas

@truefoundry-saas truefoundry-saas commented Oct 29, 2026 •

Copy link
Copy Markdown

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-tools request header in TrueFoundry mode: a JSON array of MCP tool definitions (including optional outputSchema and annotations) that are not persisted—callers must resend the header on resume turns.

Parsing and validation live in inlineTools.ts (size/count limits, duplicate names, MCP ToolSchema). A per-request ICapabilitiesStore is resolved when a turn starts (before a turn id exists) and wired through turns and schedules; scheduled runs omit the header and mount nothing. TurnResourceResolver gains optional rootCapabilities, which attaches extraCapabilities on 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.listTools now forwards outputSchema and annotations from 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.

#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-bot

changeset-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: de9f56d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@truefoundry/trueforge Patch
@truefoundry/trueforge-core Patch

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-ai

qodex-ai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Qodex review

Reviewed 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).

Walkthrough
What Qodex checked

Lenses (openqodex review with checked answers, all dimensions)

  • Bugs and correctness
  • Security (auth, injection, SSRF, secrets, headers)
  • Performance regressions
  • Maintainability
  • Style and consistency

Scanners

  • actionlint did not run
  • bandit did not run
  • brakeman did not run
  • cargo-deny did not run
  • checkov did not run
  • gitleaks 8.21.2
  • golangci did not run
  • hadolint did not run
  • kube-linter did not run
  • kubeconform did not run
  • osv-scanner 2.6.0
  • oxlint did not run
  • rubocop did not run
  • ruff did not run
  • semgrep 1.94.0
  • shellcheck did not run
  • sqlfluff did not run
  • sqllint did not run
  • squawk did not run
  • tflint did not run
  • trivy did not run
  • zizmor did not run
  • 0 scanner candidates raised or dropped by the reviewer

Quality filters

  • PR description: minimal (present: length; missing: checklist, issue link)
  • Per-category confidence floor (bug/security/performance 0.7, maintainability 0.71, style 0.75)
  • Severity threshold from .qodex.yaml: minor
  • Path excludes (none configured in .qodex.yaml)
  • Disabled rules (none configured in .qodex.yaml)

Verification (M1b probes against PR preview)

  • Preview deployment discovered (no successful deploy for this commit)
  • Probes (skipped, no preview to probe)

Cross-review dedup

  • Delta review: delta: only what changed since the previously reviewed commit 3f9b02a is reviewed; findings are anchored on the whole change
  • Carry-overs (no findings from earlier reviews still present)

Output

  • Walkthrough comment posted
  • Inline comments (no in-diff findings to attach)

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.
Reviewed by Qodex · 46.0s

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.

@truefoundry-saas
truefoundry-saas merged commit e87e9f2 into release-v0.182.0 Oct 30, 2026
12 of 14 checks passed
@truefoundry-saas
truefoundry-saas deleted the cherry-pick/b165bf01-e135-417d-9928-61a2f0d3d84a/release-v0.182.0 branch October 30, 2026 08:37
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.

1 participant