gadget/gadget-drone
Rob Colbert 9c1e65785d feat: add chat_export tool for session export (markdown/json)
New chat tool: chat_export

- Export current ChatSession and all finished ChatTurn records to disk
- Two formats: markdown (human-readable) and json (machine-readable)
- JSON exports always include a companion -readme.md with author credits,
  Gadget Code version/link, AI provider/model/parameters
- Output to .gadget/exports/ with sanitized session name + timestamp
- Security-first: excludes emails, API keys, baseUrls, system prompts,
  gitUrls, and other PII/infrastructure details from all exports
- Only finished/aborted/error turns included (processing excluded)
- Follows SubagentTool setter-injection pattern for session data
- Available in all chat session modes (plan/build/test/ship/dev)

Files:
- packages/ai-toolbox/src/chat/export.ts (NEW - 729 lines)
- packages/ai-toolbox/src/chat/index.ts (barrel update)
- gadget-drone/src/tools/index.ts (re-export update)
- gadget-drone/src/services/agent.ts (import, register, getExportData)
2026-05-18 11:44:53 -04:00
..
.vscode created by merging gadget-code and gadget-drone 2026-04-28 09:20:37 -04:00
data/prompts/subagent subagents (written by an agent, for an agent) 2026-05-11 11:22:59 -04:00
docs Phase 2: SubProcess observability in DroneManager and DroneInspector 2026-05-14 13:52:59 -04:00
src feat: add chat_export tool for session export (markdown/json) 2026-05-18 11:44:53 -04:00
types created by merging gadget-code and gadget-drone 2026-04-28 09:20:37 -04:00
.gitignore stop monitoring my .gadget directory, dammit! 2026-04-30 16:54:44 -04:00
AGENTS.md finishing touches on move to GadgetId from ObjectId 2026-05-01 15:07:37 -04:00
gadget-drone.code-workspace created by merging gadget-code and gadget-drone 2026-04-28 09:20:37 -04:00
LICENSE created by merging gadget-code and gadget-drone 2026-04-28 09:20:37 -04:00
package.json AI toolbox refactor/extraction complete (checkpoint) 2026-05-16 17:06:08 -04:00
pnpm-lock.yaml created by merging gadget-code and gadget-drone 2026-04-28 09:20:37 -04:00
pnpm-workspace.yaml created by merging gadget-code and gadget-drone 2026-04-28 09:20:37 -04:00
tsconfig.json created by merging gadget-code and gadget-drone 2026-04-28 09:20:37 -04:00
vitest.config.ts Phase 1: SubProcess service and agent tool 2026-05-14 12:59:05 -04:00