You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0a42995
Browse filesBrowse the repository at this point in the historyBrowse files
fix: allow x-tfg resource headers only on inline sessions (#1076)
* fix: fail-closed x-tfg overlays for inline-session turns
Restrict request-scoped skill/MCP/model headers to TrueFoundry-mode
turns on inline sessions, and stop InlineSkillStore from falling through
to registry resolve (API-key privilege escalation on turns).
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: clarify x-tfg header changeset wording
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: do not gate x-tfg-mcp-headers with inline resource checks
x-tfg-mcp-headers only adds per-server invoke headers; it does not define
MCP servers. Drop overlay naming from the allow helper.
Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor: struct resolve inputs and turn-scoped skill mounts
Colocate resolve input types on ServerDeps, move x-tfg-skills wrapping to
resolveTurnSkillsStore, update closed-set skill tests, and clarify the
changeset that x-tfg-skills does not accept registry skills.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: harden inline resource resolve and keep Promise contracts
Fail closed on x-tfg overlays, require object-shaped store resolve inputs,
keep InlineSkillStore unknown-name errors as Promise rejections under
require-await, type inline skills as GitSkill, and validate inline session
create/spec replace against request-scoped headers.
Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor: use one turn-skills resolve for HTTP and schedules
Make ResolveTurnSkillsStoreInput.c optional so schedules call
resolveTurnSkillsStore({}) and drop the separate prebuilt store.
Co-authored-by: Cursor <cursoragent@cursor.com>
* test: tighten sessionHttp allowInlineResources coverage
Merge the inline PATCH case with resolve opt-in asserts and loop the
repeated creator-only 403 checks.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
In TrueFoundry mode, `x-tfg-skills`, `x-tfg-mcp`, and `x-tfg-models` are allowed when creating an inline session, replacing its spec, or running a turn on it. Create and replace only use the headers to check the spec and do not save them. `x-tfg-skills` must list every skill as a git skill; registry skill ids are not accepted. MCP servers and models fall back to the registry when a name is missing. Other routes reject these headers.
Copy file name to clipboardExpand all lines: AGENTS.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@
11
11
- AgentUIServer / server-port types (`AgentChatServer`, `AgentBuilderServer`, catalog ports, session/turn DTOs, stream events) MUST be defined only in `packages/assistant-ui-runtime/src/server/types.ts` / `events.ts`. `@truefoundry/trueforge-ui` MUST re-export them from `src/server/types.ts` (pass-through aliases only) and MUST NOT add hand-written parallel definitions of those ports/DTOs.
12
12
- Runtime types backed by Zod schemas MUST be derived with named `z.infer<typeof Schema>` aliases; code MUST NOT duplicate those schemas as hand-written interfaces or indirect utility-type chains.
13
13
- Modules MUST use static `import` and `import type`; they MUST NOT use `require()`, `require.resolve()`, or lint suppressions to bypass import checks.
14
+
- After editing ESLint-covered files, run `pnpm exec eslint <changed-files> --max-warnings=0` and fix findings in the same change. Do not drop `async` solely to silence `@typescript-eslint/require-await` when the body can throw: keep Promise rejections via `Promise.resolve()` / `Promise.reject()` / `Promise.resolve().then(...)`.
14
15
- A change that makes code unused MUST remove that dead code in the same change; it MUST NOT leave stale exports, files, documentation, duplicates, or “just in case” shims.
15
16
- Every nested `AGENTS.md` MUST have a sibling `CLAUDE.md` containing only `@AGENTS.md`, so Cursor and Claude Code load the same scoped rules.
16
17
- OpenAPI specs under `.github/fern/openapi/openapi.json` and `docs/openapi.json` are autogenerated in CI and MUST NOT be edited manually (both copies MUST stay identical)
0 commit comments