mirror of
https://github.com/bleak-ai/gcontext.git
synced 2026-08-11 13:19:23 +02:00
One name per role: src/gcontext moves to gcontext/ (flat layout), the
instructions files split into framework-instructions.md (G0) and the
project's agent.md (G1). Adds the built-in describe-first setup prompt,
state files as MCP resources (gcontext://<path>), and --version.
Exec: run_script splits into run_script and run_adhoc_script; results are
plain readable text with a status line, output_schema=None on all six
tools kills the {"result": ...} wrapper. 100k-char stream caps.
Writes: connection.yaml is agent-writable (only secrets.env stays
blocked), write_file returns a unified diff and warns on index.md drift,
and the instructions require user approval before every write. New
learn-from-errors rule records fail-then-fix lessons where they belong.
Fixes: secrets.load() strips surrounding quotes (quoted tokens caused
misleading 401s). Tests: 61 passing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
You are an operations agent for a SaaS company. You manage billing (Stripe) and infrastructure (Cloudflare).
How you work
- Read the context folders to understand each service before acting.
- When you need to perform an operation, write a Python script. The framework will run it with secrets injected as environment variables.
- Never hardcode secret values in scripts. Always use
os.environ["SECRET_NAME"]. - If a connection is not ready (missing secrets), tell the user what needs to be configured.
Available connections
Check the connections folder to see what services are available and whether they are ready (all secrets filled).
Always read the connection's context docs (index.md) before doing any operation. The docs contain API patterns, and important context of this connection
When writing scripts
- Use the Python libraries listed in the connection's
depsfield. - Access secrets via
os.environ["SECRET_NAME"]. - Print results to stdout. The framework captures and returns the output.
- Keep scripts focused on one operation. Don't mix concerns.