Skip to content

Commit bb562e0

Browse files
committed
Bring the docs up to what is actually merged
Audited every markdown file against everything that landed today, including the work that was not mine. `docs/coworkers.md` still told people to point `MANAGED_AGENT_AG_UI_URL` at `4200`. #33 made `agent-langgraph` on `4201` the default precisely because the proof-of-concept hand-writes the protocol and leaves the tool loop to whatever is watching, so following that page produced the shape the change moved away from. Three environment variables the server reads were in `.env.example` and nowhere in the configuration reference: `AGENT_STALL_TIMEOUT_MS` from #19, which is the only thing that notices a Bot's stream going silent; `AGENT_TOOL_TOKEN` from #34, without which no framework Bot may call a granted tool back; and `APP_DIST_DIR`, which the container sets so one process serves both halves. Both documentation indexes had fallen behind their own directory and listed neither `deployment.md` nor `releasing.md`. `docs/development.md` gains the migration workflow the checks in #64 now enforce: never hand-edit a generated migration, write a data step with `--custom`, and what to do when `drizzle-kit migrate` hangs and exits non-zero with nothing printed, which is the journal naming a file a rebase renamed. `drizzle-kit check` calls that state fine, because it compares schemas rather than asking whether the journal and the directory agree. The README keeps its shape: what this is, how to run it, how to deploy it, and where to read the rest.
1 parent d70d0c9 commit bb562e0

5 files changed

Lines changed: 47 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ Use `bash scripts/start.sh` for the whole stack. Use `bun run dev` only when you
315315
- [docs/configuration.md](docs/configuration.md)
316316
- [docs/development.md](docs/development.md)
317317
- [docs/coworkers.md](docs/coworkers.md)
318+
- [docs/deployment.md](docs/deployment.md)
319+
- [docs/releasing.md](docs/releasing.md)
318320

319321
## Contributing
320322

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ Start with the root [README](../README.md), then use these references:
66
- [Configuration](configuration.md): environment variables and tenant package YAML.
77
- [Development](development.md): local setup, migrations, ports, and quality checks.
88
- [Coworkers](coworkers.md): durable Bot profiles, channels, visibility, deletion, and external AG-UI registration.
9+
- [Deployment](deployment.md): the container, what is in the image, minimum sizes, and the platform notes.
10+
- [Releasing](releasing.md): how a release is proposed, reviewed and published.
911

1012
Do not include credential values, customer data, transcripts, or local-only notes in public docs.

docs/configuration.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ All four Intelligence values are required together. Missing any of them stops se
4646
| `GOOGLE_GENERATIVE_AI_BASE_URL` | unset | Google-compatible endpoint that key is spent against. |
4747
| `BOT_MODEL` | provider default from Bot code/env | Model used by the shipped Bots. |
4848
| `BOT_RESPONSES_API` | `false` | Makes `agent-langgraph` use the OpenAI Responses API. |
49+
| `AGENT_STALL_TIMEOUT_MS` | unset (off) | How long a Bot's stream may produce nothing before the turn is ended for it. |
50+
| `AGENT_TOOL_TOKEN` | unset | The secret a framework Bot presents when it calls a granted tool back through this server. |
51+
| `APP_DIST_DIR` | unset | Where the built app is, when this process serves it. Set inside the container image; unset in development, where Vite serves the app. |
52+
53+
**`AGENT_STALL_TIMEOUT_MS`** watches for the failure a Bot has that nothing else in the trail can
54+
show: a stream that stops producing anything. Every other audit row is something that happened, and
55+
this one is the absence of anything happening, which leaves no trace of its own. Ending the turn
56+
writes `agent.stream_stalled`. Unset or `0` switches it off and nothing is watched. `.env.example`
57+
ships `60000`, so a new clone has it on and an upgraded deployment does not acquire it unasked.
58+
59+
**`AGENT_TOOL_TOKEN`** exists because a framework Bot runs its own loop in its own process and still
60+
may not reach a vendor directly. It calls the deployment that granted the tool, which is where the
61+
grant, the policy and the audit row live. Absent, no Bot may call tools back, and it is told so
62+
rather than quietly allowed.
4963

5064
## OpenAI-compatible endpoints
5165

docs/coworkers.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@ Hiding is personal roster state. It removes the coworker from one user's list wi
5454
Product-created coworkers use:
5555

5656
```dotenv
57-
MANAGED_AGENT_AG_UI_URL=http://localhost:4200/ag-ui
57+
MANAGED_AGENT_AG_UI_URL=http://localhost:4201/ag-ui
5858
```
5959

60+
That is `agent-langgraph`, which runs a real framework and its own tool loop. The proof-of-concept on
61+
`4200` hand-writes the protocol and leaves the loop to whatever is watching, so it is a reference
62+
rather than something to build a deployment on.
63+
6064
The server requires this setting at startup. Package-provided agents use their own `agents.yaml` configuration.
6165

6266
## Register an external AG-UI agent

docs/development.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,30 @@ bun run --filter server db:migrate
5656

5757
Review generated migration files before sharing them. `start.sh` applies existing migrations when it starts the stack.
5858

59+
**Do not hand-edit a generated migration.** It leaves a file that no longer matches what the
60+
generator produced. If the generated SQL will not work — `ADD COLUMN ... NOT NULL` fails on a table
61+
that already has rows — split it instead: generate the column nullable, add the data step, then
62+
generate the constraint.
63+
64+
**A data step is its own migration**, created with the flag that exists for it:
65+
66+
```sh
67+
bun run --filter server db:generate -- --custom --name=backfill_something
68+
```
69+
70+
A generator diffs schema against schema, so a rule like "the rows whose provider is Google get
71+
Google's issuer" can never come out of one: it is not in the schema. `--custom` writes an empty file
72+
registered in the journal, and it is the only migration anybody should be writing by hand.
73+
74+
CI enforces two things about this: `drizzle-kit check` for collisions and gaps between migrations,
75+
and a generate-and-fail-if-dirty probe that refuses a schema change with no migration written for it.
76+
77+
**If `drizzle-kit migrate` hangs and then exits non-zero with no error**, the journal names a
78+
migration file that is not there. A rebase does this: `meta/_journal.json` is a checked-in file, so
79+
restoring it can reinstate entries for migrations that were renamed. `drizzle-kit check` reports
80+
"Everything's fine" in that state, because it compares schemas rather than checking that the journal
81+
and the directory agree. Compare `meta/_journal.json` against `ls server/drizzle/*.sql`.
82+
5983
## Quality checks
6084

6185
Run these before opening a pull request:

0 commit comments

Comments
 (0)