mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-04 10:02:15 +00:00
Remove the leading '#!/usr/bin/env docker agent run' shebang and following blank line from all example YAML and HCL files, as the config format is now self-documenting.
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
#
|
|
# Shadow-git snapshot hook
|
|
# ------------------------
|
|
# Records filesystem snapshots under the docker-agent data
|
|
# directory (`~/.cagent/snapshot/...` by default) without touching the
|
|
# source repository's `.git` directory.
|
|
#
|
|
# The builtin is a no-op outside git repositories. It mirrors the source
|
|
# repo's ignore rules and skips newly-added files larger than 2 MiB.
|
|
#
|
|
# To enable the same turn-level snapshots for every agent, set this in
|
|
# ~/.config/cagent/config.yaml instead of wiring hooks manually:
|
|
#
|
|
# settings:
|
|
# snapshot: true
|
|
|
|
agents:
|
|
root:
|
|
model: openai/gpt-5-mini
|
|
description: Coder with shadow-git snapshots enabled
|
|
instruction: |
|
|
You are a coding assistant. Make focused changes and explain what you changed.
|
|
toolsets:
|
|
- type: shell
|
|
- type: filesystem
|
|
hooks:
|
|
# Per-turn snapshots: capture before the model call and after the
|
|
# resulting tool batch finishes.
|
|
turn_start:
|
|
- type: builtin
|
|
command: snapshot
|
|
turn_end:
|
|
- type: builtin
|
|
command: snapshot
|
|
|
|
# Runs git gc on the shadow repo. Undo checkpoints stay available after
|
|
# the response stops so `/undo` can restore the latest changed snapshot.
|
|
session_end:
|
|
- type: builtin
|
|
command: snapshot
|