Repository navigation
feat(ai): agent context policy (0028) + structured output (0030) + Swagger /docs base-path fix - #97
Merged
Conversation
ai/agent gains optional maxContextTokens (approximate budget) + contextStrategy (drop-oldest default | summarize). Before each completion the running transcript is bounded by trimContext: it preserves the leading system turns + the first user task and the most recent turns, dropping the oldest middle turns; 'summarize' replaces them with one LLM-generated summary turn (opt-in extra call, recorded as a steps entry). Token estimate is a coarse ~4-chars/token heuristic, centralized for a future tokenizer. Absent budget = unchanged behavior. Persisted cross-run session store (Option B) and vector/RAG (Option C) deferred. ADR-0028 Proposed -> Accepted (Option A shipped). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…spond (ADR-0030)
Opt-in: an outputSchema input (list of {name,type,required,description}) makes the
node return a validated object instead of free-form text. A single forced
"respond" tool carries the schema (ParameterSchemaToJSONSchema) with
ToolChoice=required; the tool-call args are parsed and validated, with one
bounded repair retry. Works on every provider (all support tool calling). The
agent runs its normal loop then coerces the final answer. Absent outputSchema =
unchanged.
Provider-native response_format (Option B) deferred. ADR-0030 Proposed -> Accepted.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…h prefix When FUSE is hosted under a sub-path (e.g. api.example.com/fuse), the /docs redirect used an absolute /docs/index.html, so the browser dropped the /fuse prefix and 404'd. Now the redirect honors the proxy's X-Forwarded-Prefix header, falling back to a new SERVER_BASE_PATH config; and the Swagger UI loads its spec via a relative URL (doc.json) so it resolves under the prefix automatically (or an absolute base-path URL when SERVER_BASE_PATH is set). Root hosting is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This branch was previously deployed
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.
One consolidated PR to
main. The leaf agent PRs got merged into their stacked featurebranches instead of
main, so this re-lands the missing work in a single, flat PR. (#93 — LLMusage metrics — already reached
main; not included here.) Supersedes the open #96.Included
ai/agentgainsmaxContextTokens+contextStrategy(drop-oldestdefault |summarize); the running transcript is bounded beforeeach completion, preserving the system turns + first task + most-recent turns. Opt-in / backward
compatible.
outputSchemaonai/chat&ai/agentreturns avalidated object via a forced
respondtool (universal across providers), with one repairretry. Backward compatible.
/docsbehind a path prefix: the/docsredirect honorsX-Forwarded-Prefix→falls back to a new
SERVER_BASE_PATH(e.g./fuse); the UI loads its spec relatively so itresolves under the prefix. Fixes docs 404 when hosted at
api.example.com/fuse.ADRs 0028 & 0030 flip
Proposed → Acceptedwith shipped notes.Verify
make lint0 ·make buildok ·make test710 pass.🤖 Generated with Claude Code