mirror of
https://github.com/block/goose.git
synced 2026-08-21 14:24:58 +00:00
Record the last routed request's header (system prompt, tools) per session in a bounded in-process registry, then build the summarization request as that request plus the compaction instruction as the final user message, with the prompt cache enabled and the session's thinking config inherited. This replaces the standalone summarizer shape for session compaction; a session with no recorded header summarizes the same way with an empty header. The unused compaction.md template leaves the template registry and docs; a stale user override warns toward compaction_prefix.md and compaction_summary.md. When the summarizer overflows, tool-response contents are elided middle-out in progressively larger fractions, keeping every tool request/response pair intact. A response that is not a summary (a tool call, or no text) gets one corrective retry on the same cached prefix, with rejected tool calls paired to stub results and a re-instruction; a second rejection fails compaction with an error that carries the billed usage of each rejected attempt, which every loop records per attempt so cost is kept and the context gauge is not inflated. Toolshim sessions convert tool traffic to text at send time (so elision still sees native tool responses) and interpret the summarizer's response like any session response, so a textual shim-protocol tool call is rejected and corrected instead of accepted as the summary. |
||
|---|---|---|
| .. | ||
| .goose/memory | ||
| automation | ||
| blog | ||
| docs | ||
| plugins | ||
| scripts | ||
| src | ||
| static | ||
| .gitignore | ||
| .goosehints | ||
| .npmrc | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| docusaurus.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| sidebars.ts | ||
| tailwind.config.js | ||
| tsconfig.json | ||
Website
This website is built using Docusaurus, a modern static website generator.
Run all commands from the documentation/ directory.
Installation
$ npm i
Local Development
$ npm run start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Build
$ npm run build
This command generates static content into the build directory and can be served using any static contents hosting service.
Deployment
Using SSH:
$ USE_SSH=true npm run deploy
Not using SSH:
$ GIT_USER=<Your GitHub username> npm run deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.