docs: add extraWorkspaceFiles documentation, remove redundant JSDoc

This commit is contained in:
SPANISH FLU 2026-01-27 10:45:19 +01:00
parent ca09994c09
commit 59347115db
4 changed files with 38 additions and 3 deletions

View File

@ -118,6 +118,44 @@ adjust the limit with `agents.defaults.bootstrapMaxChars` (default: 20000).
`moltbot setup` can recreate missing defaults without overwriting existing
files.
## Extra workspace files
You can inject additional workspace files into the system prompt alongside the
defaults using `extraWorkspaceFiles`:
```json5
{
agents: {
defaults: {
extraWorkspaceFiles: ["PANTHEON.md", "protocols/SHARED.md"]
}
}
}
```
Paths are relative to the workspace directory. Files that do not exist are
silently skipped (no "missing file" marker). Duplicates of default files are
ignored.
Per-agent overrides are supported:
```json5
{
agents: {
defaults: {
extraWorkspaceFiles: ["PANTHEON.md"]
},
list: [
{ id: "researcher", extraWorkspaceFiles: ["RESEARCH_PROTOCOL.md"] },
{ id: "minimal", extraWorkspaceFiles: [] } // disable extras
]
}
}
```
Extra files are included for subagent sessions alongside the default allowlist
(AGENTS.md, TOOLS.md).
## What is NOT in the workspace
These live under `~/.clawdbot/` and should NOT be committed to the workspace repo:

View File

@ -106,7 +106,6 @@ export type AgentDefaultsConfig = {
skipBootstrap?: boolean;
/** Max chars for injected bootstrap files before truncation (default: 20000). */
bootstrapMaxChars?: number;
/** Extra workspace files to inject alongside the default bootstrap files (paths relative to workspace). */
extraWorkspaceFiles?: string[];
/** Optional IANA timezone for the user (used in system prompt; defaults to host timezone). */
userTimezone?: string;

View File

@ -24,7 +24,6 @@ export type AgentConfig = {
workspace?: string;
agentDir?: string;
model?: AgentModelConfig;
/** Extra workspace files to inject alongside the default bootstrap files (paths relative to workspace). */
extraWorkspaceFiles?: string[];
memorySearch?: MemorySearchConfig;
/** Human-like delay between block replies for this agent. */

View File

@ -421,7 +421,6 @@ export const AgentEntrySchema = z
workspace: z.string().optional(),
agentDir: z.string().optional(),
model: AgentModelSchema.optional(),
/** Extra workspace files to inject alongside the default bootstrap files (paths relative to workspace). */
extraWorkspaceFiles: z.array(z.string()).optional(),
memorySearch: MemorySearchSchema,
humanDelay: HumanDelaySchema.optional(),