@diffexai/diffex 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/AGENTS.md +0 -11
- package/dist/core/agent-session.d.ts +0 -1
- package/dist/core/agent-session.js +3 -10
- package/dist/core/sdk.js +1 -1
- package/dist/core/system-prompt-production.d.ts +7 -0
- package/dist/core/system-prompt-production.js +102 -0
- package/dist/core/system-prompt.d.ts +2 -2
- package/dist/core/system-prompt.js +34 -35
- package/dist/core/tools/subagents.js +22 -9
- package/dist/modes/print-mode.js +12 -14
- package/dist/node_modules/@diffexai/diffex-agent-core/distribution-components.json +4 -4
- package/dist/node_modules/@diffexai/diffex-agent-core/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-agent-core/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/.manifest.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/fireworks.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/mistral.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/nvidia.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/openrouter.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/distribution-components.json +3 -3
- package/dist/node_modules/@diffexai/diffex-ai/distribution-files.json +11 -11
- package/dist/node_modules/@diffexai/diffex-ai/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-client/distribution-components.json +3 -3
- package/dist/node_modules/@diffexai/diffex-client/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-client/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-harness-state/distribution-components.json +2 -2
- package/dist/node_modules/@diffexai/diffex-harness-state/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-harness-state/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-protocol/distribution-components.json +2 -2
- package/dist/node_modules/@diffexai/diffex-protocol/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-protocol/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-telemetry/distribution-components.json +2 -2
- package/dist/node_modules/@diffexai/diffex-telemetry/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-telemetry/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-tui/distribution-components.json +2 -2
- package/dist/node_modules/@diffexai/diffex-tui/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-tui/package.json +1 -1
- package/dist/server/create-harness.js +1 -1
- package/distribution-components.json +11 -11
- package/distribution-files.json +49 -41
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -31
- package/release/distribution-manifest.json +4 -4
- package/release/install-package-lock.json +5 -5
- package/release/install-package.json +2 -2
- package/docs/compaction.md +0 -401
- package/docs/containerization.md +0 -84
- package/docs/custom-provider.md +0 -774
- package/docs/environment-variables.md +0 -88
- package/docs/evolution.md +0 -90
- package/docs/extensions.md +0 -2982
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/installation.md +0 -118
- package/docs/json.md +0 -91
- package/docs/keybindings.md +0 -241
- package/docs/llama-cpp.md +0 -99
- package/docs/models.md +0 -565
- package/docs/packages.md +0 -232
- package/docs/prompt-templates.md +0 -96
- package/docs/providers.md +0 -317
- package/docs/quickstart.md +0 -161
- package/docs/rpc.md +0 -1647
- package/docs/sdk.md +0 -1332
- package/docs/security.md +0 -66
- package/docs/session-format.md +0 -438
- package/docs/sessions.md +0 -162
- package/docs/settings.md +0 -341
- package/docs/shell-aliases.md +0 -13
- package/docs/skills.md +0 -227
- package/docs/terminal-setup.md +0 -152
- package/docs/themes.md +0 -326
- package/docs/tmux.md +0 -63
- package/docs/tui.md +0 -940
- package/docs/usage.md +0 -434
package/docs/settings.md
DELETED
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
# Settings
|
|
2
|
-
|
|
3
|
-
Diffex uses JSON settings files with project settings overriding global settings.
|
|
4
|
-
|
|
5
|
-
| Location | Scope |
|
|
6
|
-
|----------|-------|
|
|
7
|
-
| `~/.diffex/agent/settings.json` | Global (all projects) |
|
|
8
|
-
| `.diffex/settings.json` | Project (current directory) |
|
|
9
|
-
|
|
10
|
-
Edit directly or use `/settings` for common options.
|
|
11
|
-
|
|
12
|
-
## Project Trust
|
|
13
|
-
|
|
14
|
-
On interactive startup, Diffex asks before trusting a project folder that contains project-local settings, resources, or project `.agents/skills` and has no saved decision for the folder or a parent folder in `~/.diffex/agent/trust.json`. Trusting a project allows Diffex to load `.diffex/settings.json` and `.diffex` resources, install missing project packages, and execute project extensions.
|
|
15
|
-
|
|
16
|
-
Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore those project resources, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
|
|
17
|
-
|
|
18
|
-
If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.diffex/agent/settings.json`, or change it with `/settings`.
|
|
19
|
-
|
|
20
|
-
`diffex config` and package commands use the same project trust flow, except `diffex update` never prompts. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
|
|
21
|
-
|
|
22
|
-
Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.diffex/agent/trust.json` only; the current session is not reloaded, so restart Diffex for changes to take effect.
|
|
23
|
-
|
|
24
|
-
## All Settings
|
|
25
|
-
|
|
26
|
-
### Model & Thinking
|
|
27
|
-
|
|
28
|
-
Use `/model` or Ctrl+L to select a model, then choose from its supported thinking levels. Exact `/model <id>` matches and selecting the current model also open this screen. It is skipped when there is at most one supported level. Escape or Ctrl+C keeps the selected model and its current supported level. The thinking preference is shared across models and saved as `defaultThinkingLevel`, with existing model capability clamping.
|
|
29
|
-
|
|
30
|
-
| Setting | Type | Default | Description |
|
|
31
|
-
|---------|------|---------|-------------|
|
|
32
|
-
| `defaultProvider` | string | - | Default provider (e.g., `"anthropic"`, `"openai"`) |
|
|
33
|
-
| `defaultModel` | string | - | Default model ID |
|
|
34
|
-
| `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
|
|
35
|
-
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
|
|
36
|
-
| `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses |
|
|
37
|
-
| `thinkingBudgets` | object | - | Custom token budgets per thinking level |
|
|
38
|
-
|
|
39
|
-
#### thinkingBudgets
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
{
|
|
43
|
-
"thinkingBudgets": {
|
|
44
|
-
"minimal": 1024,
|
|
45
|
-
"low": 4096,
|
|
46
|
-
"medium": 10240,
|
|
47
|
-
"high": 32768
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### UI & Display
|
|
53
|
-
|
|
54
|
-
| Setting | Type | Default | Description |
|
|
55
|
-
|---------|------|---------|-------------|
|
|
56
|
-
| `theme` | string | `"dark"` | Theme name (`"dark"`, `"light"`, or custom) |
|
|
57
|
-
| `externalEditor` | string | `$VISUAL`, then `$EDITOR`, then Notepad on Windows or `nano` elsewhere | Command for Ctrl+G external editor; takes precedence over environment variables |
|
|
58
|
-
| `quietStartup` | boolean | `false` | Hide startup header |
|
|
59
|
-
| `defaultProjectTrust` | string | `"ask"` | Fallback project trust behavior: `"ask"`, `"always"`, or `"never"`. Global setting only |
|
|
60
|
-
| `collapseChangelog` | boolean | `false` | Show condensed changelog after updates |
|
|
61
|
-
| `enableProviderAttribution` | boolean | `false` | Add optional attribution headers to OpenRouter, Cloudflare, and direct NVIDIA NIM requests |
|
|
62
|
-
| `enableAnalytics` | boolean | `false` | Opt-in analytics data sharing. Currently only asked for during the experimental first-time setup (`DIFFEX_EXPERIMENTAL=1`) |
|
|
63
|
-
| `trackingId` | string | - | Analytics tracking identifier, generated when `enableAnalytics` is turned on |
|
|
64
|
-
| `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
|
|
65
|
-
| `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
|
|
66
|
-
| `editorPaddingX` | number | `0` | Horizontal padding for input editor (0-3) |
|
|
67
|
-
| `outputPad` | number | `1` | Horizontal padding for user messages, assistant messages, and thinking (0 or 1) |
|
|
68
|
-
| `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
|
|
69
|
-
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
|
|
70
|
-
| `tuiMode` | string | `"regular"` | Interactive TUI mode: `"regular"` or experimental `"fullscreen"`. Changes from `/settings` apply immediately; `--tui-mode` overrides this setting at startup |
|
|
71
|
-
| `fullscreenScrollbar` | string | `"auto"` | Fullscreen transcript scrollbar: `"auto"` shows it temporarily while scrolling, `"always"` reserves the rightmost column and keeps it visible, and `"hidden"` hides it. Has no effect in regular TUI mode |
|
|
72
|
-
|
|
73
|
-
For VS Code, include `--wait` so Diffex resumes after the editor exits:
|
|
74
|
-
|
|
75
|
-
```json
|
|
76
|
-
{
|
|
77
|
-
"externalEditor": "code --wait"
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Provider attribution and update checks
|
|
82
|
-
|
|
83
|
-
Diffex does not send install or update telemetry reports.
|
|
84
|
-
The former `enableInstallTelemetry` setting and `DIFFEX_TELEMETRY` variable are ignored.
|
|
85
|
-
Optional provider attribution defaults off so removing the old shared setting cannot re-enable headers for users who previously opted out.
|
|
86
|
-
Use `enableProviderAttribution` or `DIFFEX_PROVIDER_ATTRIBUTION` to control optional OpenRouter, Cloudflare, and direct NVIDIA NIM headers independently.
|
|
87
|
-
The environment variable takes precedence: `1`/`true`/`yes` enables attribution; `0`/`false`/`no` disables it.
|
|
88
|
-
This setting does not control update checks, OpenCode session headers, or explicitly configured request headers.
|
|
89
|
-
|
|
90
|
-
Set `DIFFEX_SKIP_VERSION_CHECK=1` to disable automatic release checks against `https://api.diffex.ai/api/latest-version`.
|
|
91
|
-
Use `--offline` or `DIFFEX_OFFLINE=1` to disable startup network operations, including update checks and package update checks.
|
|
92
|
-
|
|
93
|
-
### Network
|
|
94
|
-
|
|
95
|
-
| Setting | Type | Default | Description |
|
|
96
|
-
|---------|------|---------|-------------|
|
|
97
|
-
| `httpProxy` | string | - | HTTP proxy URL applied as `HTTP_PROXY` and `HTTPS_PROXY`. Global setting only. |
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
{
|
|
101
|
-
"httpProxy": "http://127.0.0.1:7890"
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Warnings
|
|
106
|
-
|
|
107
|
-
| Setting | Type | Default | Description |
|
|
108
|
-
|---------|------|---------|-------------|
|
|
109
|
-
| `warnings.anthropicExtraUsage` | boolean | `true` | Show a warning when Anthropic subscription auth may use paid extra usage |
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"warnings": {
|
|
114
|
-
"anthropicExtraUsage": false
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Evolution
|
|
120
|
-
|
|
121
|
-
| Setting | Type | Default | Description |
|
|
122
|
-
|---------|------|---------|-------------|
|
|
123
|
-
| `evolution.enabled` | boolean | `true` | Global-only. Enables future invocation tracing and manual/background evolution controls. Disabling it does not unselect the active harness or remove active evolved skills. |
|
|
124
|
-
|
|
125
|
-
Already-running Diffex processes monitor this setting. A change made by another process is applied to their trace collectors and evolution workers without a restart.
|
|
126
|
-
|
|
127
|
-
Automatic work requires at least 400,000 provider-reported input and output tokens from unprocessed assistant messages, at least three eligible settled invocations, and a 10-minute cooldown after the previous automatic run. Each automatic run processes the oldest unprocessed evidence through the complete invocation that reaches or crosses the same 400,000-token trigger threshold. Only that final invocation may take the batch over the threshold; later invocations stay queued. Larger backlogs continue in threshold-sized batches after each cooldown, while partial batches wait for the threshold. Manual runs remain uncapped. The token total matches the response usage counter and excludes cache-read and cache-write usage. Evolution model calls may consume provider quota. See [Harness Evolution](evolution.md).
|
|
128
|
-
|
|
129
|
-
### Compaction
|
|
130
|
-
|
|
131
|
-
| Setting | Type | Default | Description |
|
|
132
|
-
|---------|------|---------|-------------|
|
|
133
|
-
| `compaction.enabled` | boolean | `true` | Enable auto-compaction |
|
|
134
|
-
| `compaction.reserveTokens` | number | `16384` | Tokens reserved for LLM response |
|
|
135
|
-
| `compaction.keepRecentTokens` | number | `20000` | Recent tokens to keep (not summarized) |
|
|
136
|
-
|
|
137
|
-
```json
|
|
138
|
-
{
|
|
139
|
-
"compaction": {
|
|
140
|
-
"enabled": true,
|
|
141
|
-
"reserveTokens": 16384,
|
|
142
|
-
"keepRecentTokens": 20000
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### Branch Summary
|
|
148
|
-
|
|
149
|
-
| Setting | Type | Default | Description |
|
|
150
|
-
|---------|------|---------|-------------|
|
|
151
|
-
| `branchSummary.reserveTokens` | number | `16384` | Tokens reserved for branch summarization |
|
|
152
|
-
| `branchSummary.skipPrompt` | boolean | `false` | Skip "Summarize branch?" prompt on `/tree` navigation (defaults to no summary) |
|
|
153
|
-
|
|
154
|
-
### Retry
|
|
155
|
-
|
|
156
|
-
| Setting | Type | Default | Description |
|
|
157
|
-
|---------|------|---------|-------------|
|
|
158
|
-
| `retry.enabled` | boolean | `true` | Enable automatic agent-level retry on transient errors |
|
|
159
|
-
| `retry.maxRetries` | number | `3` | Maximum agent-level retry attempts |
|
|
160
|
-
| `retry.baseDelayMs` | number | `2000` | Base delay for agent-level exponential backoff (2s, 4s, 8s) |
|
|
161
|
-
| `retry.provider.timeoutMs` | number | SDK default | Provider/SDK request timeout in milliseconds |
|
|
162
|
-
| `retry.provider.maxRetries` | number | `0` | Provider/SDK retry attempts |
|
|
163
|
-
| `retry.provider.maxRetryDelayMs` | number | `60000` | Max server-requested delay before failing (60s) |
|
|
164
|
-
|
|
165
|
-
When a provider requests a retry delay longer than `retry.provider.maxRetryDelayMs`, the request fails immediately with an informative error instead of waiting silently. Set it to `0` to disable the limit.
|
|
166
|
-
|
|
167
|
-
Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explicitly needed. Setting it above `0` can make SDK/provider retries handle out-of-usage-limit errors before Diffex sees them, which may block the agent until the provider quota resets in some circumstances.
|
|
168
|
-
|
|
169
|
-
```json
|
|
170
|
-
{
|
|
171
|
-
"retry": {
|
|
172
|
-
"enabled": true,
|
|
173
|
-
"maxRetries": 3,
|
|
174
|
-
"baseDelayMs": 2000,
|
|
175
|
-
"provider": {
|
|
176
|
-
"timeoutMs": 3600000,
|
|
177
|
-
"maxRetries": 0,
|
|
178
|
-
"maxRetryDelayMs": 60000
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### Message Delivery
|
|
185
|
-
|
|
186
|
-
| Setting | Type | Default | Description |
|
|
187
|
-
|---------|------|---------|-------------|
|
|
188
|
-
| `steeringMode` | string | `"one-at-a-time"` | How steering messages are sent: `"all"` or `"one-at-a-time"` |
|
|
189
|
-
| `followUpMode` | string | `"one-at-a-time"` | How follow-up messages are sent: `"all"` or `"one-at-a-time"` |
|
|
190
|
-
| `transport` | string | `"auto"` | Preferred transport for providers that support multiple transports: `"sse"`, `"websocket"`, `"websocket-cached"`, or `"auto"` |
|
|
191
|
-
| `httpIdleTimeoutMs` | number | `300000` | HTTP header/body idle timeout in milliseconds, also used by providers with explicit stream idle timeouts. Set to `0` to disable. |
|
|
192
|
-
| `websocketConnectTimeoutMs` | number | `15000` | WebSocket connect/open handshake timeout in milliseconds for providers that support WebSocket transports. Set to `0` to disable. |
|
|
193
|
-
|
|
194
|
-
### Terminal & Images
|
|
195
|
-
|
|
196
|
-
| Setting | Type | Default | Description |
|
|
197
|
-
|---------|------|---------|-------------|
|
|
198
|
-
| `terminal.showImages` | boolean | `true` | Show images in terminal (if supported) |
|
|
199
|
-
| `terminal.imageWidthCells` | number | `60` | Preferred inline image width in terminal cells |
|
|
200
|
-
| `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when content shrinks (can cause flicker) |
|
|
201
|
-
| `images.autoResize` | boolean | `true` | Resize images to 2000x2000 max. Applies to `@file` attachments, `read`, and images returned by tools |
|
|
202
|
-
| `images.blockImages` | boolean | `false` | Block all images from being sent to LLM |
|
|
203
|
-
|
|
204
|
-
### Shell
|
|
205
|
-
|
|
206
|
-
| Setting | Type | Default | Description |
|
|
207
|
-
|---------|------|---------|-------------|
|
|
208
|
-
| `shellPath` | string | - | Custom shell path (e.g., for Cygwin on Windows); supports a leading `~` for the home directory |
|
|
209
|
-
| `shellCommandPrefix` | string | - | Prefix for every bash command (e.g., `"shopt -s expand_aliases"`) |
|
|
210
|
-
| `npmCommand` | string[] | - | Command argv used for npm package lookup/install operations (e.g., `["mise", "exec", "node@20", "--", "npm"]`) |
|
|
211
|
-
|
|
212
|
-
```json
|
|
213
|
-
{
|
|
214
|
-
"npmCommand": ["mise", "exec", "node@20", "--", "npm"]
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
`npmCommand` is used for all npm package-manager operations, including installs, uninstalls, and dependency installs inside git packages. User-scoped npm packages install under `~/.diffex/agent/npm/`; project-scoped npm packages install under `.diffex/npm/`. Use argv-style entries exactly as the process should be launched. When `npmCommand` is configured, git package dependency installs use plain `install` to avoid npm-specific flags in wrappers or alternate package managers.
|
|
219
|
-
|
|
220
|
-
### Sessions
|
|
221
|
-
|
|
222
|
-
| Setting | Type | Default | Description |
|
|
223
|
-
|---------|------|---------|-------------|
|
|
224
|
-
| `sessionDir` | string | - | Directory where session files are stored. Accepts absolute or relative paths, plus `~`. |
|
|
225
|
-
|
|
226
|
-
```json
|
|
227
|
-
{ "sessionDir": ".diffex/sessions" }
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
When multiple sources specify a session directory, precedence is `--session-dir`, `DIFFEX_CODING_AGENT_SESSION_DIR`, then `sessionDir` in settings.json.
|
|
231
|
-
|
|
232
|
-
### Model Cycling
|
|
233
|
-
|
|
234
|
-
| Setting | Type | Default | Description |
|
|
235
|
-
|---------|------|---------|-------------|
|
|
236
|
-
| `enabledModels` | string[] | - | Model patterns for Ctrl+P cycling (same format as `--models` CLI flag) |
|
|
237
|
-
|
|
238
|
-
```json
|
|
239
|
-
{
|
|
240
|
-
"enabledModels": ["claude-*", "gpt-4o", "gemini-2*"]
|
|
241
|
-
}
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### Markdown
|
|
245
|
-
|
|
246
|
-
| Setting | Type | Default | Description |
|
|
247
|
-
|---------|------|---------|-------------|
|
|
248
|
-
| `markdown.codeBlockIndent` | string | `" "` | Indentation for code blocks |
|
|
249
|
-
| `markdown.mermaid` | string | `"streaming"` | Mermaid rendering mode: `"off"`, `"final"`, or `"streaming"` |
|
|
250
|
-
|
|
251
|
-
### Resources
|
|
252
|
-
|
|
253
|
-
These settings define where to load extensions, skills, prompts, and themes from.
|
|
254
|
-
|
|
255
|
-
Use **Installed skills** in `/settings` to inspect global and workspace skill paths, sources, scopes, and enabled state. Toggle entries to persist global or project overrides, then use `/reload` to apply them to the current session. Evolved skills are read-only outside `/evolve` and `/version`.
|
|
256
|
-
|
|
257
|
-
Paths in `~/.diffex/agent/settings.json` resolve relative to `~/.diffex/agent`. Paths in `.diffex/settings.json` resolve relative to `.diffex`. Absolute paths and `~` are supported.
|
|
258
|
-
|
|
259
|
-
| Setting | Type | Default | Description |
|
|
260
|
-
|---------|------|---------|-------------|
|
|
261
|
-
| `packages` | array | `[]` | npm/git packages to load resources from |
|
|
262
|
-
| `extensions` | string[] | `[]` | Local extension file paths or directories |
|
|
263
|
-
| `skills` | string[] | `[]` | Local skill file paths or directories |
|
|
264
|
-
| `prompts` | string[] | `[]` | Local prompt template paths or directories |
|
|
265
|
-
| `themes` | string[] | `[]` | Local theme file paths or directories |
|
|
266
|
-
|
|
267
|
-
Arrays support glob patterns and exclusions. Use `!pattern` to exclude. Use `+path` to force-include an exact path and `-path` to force-exclude an exact path.
|
|
268
|
-
|
|
269
|
-
#### packages
|
|
270
|
-
|
|
271
|
-
String form loads all resources from a package:
|
|
272
|
-
|
|
273
|
-
```json
|
|
274
|
-
{
|
|
275
|
-
"packages": ["@org/my-skills", "@org/my-extension"]
|
|
276
|
-
}
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
Object form filters which resources to load:
|
|
280
|
-
|
|
281
|
-
```json
|
|
282
|
-
{
|
|
283
|
-
"packages": [
|
|
284
|
-
{
|
|
285
|
-
"source": "@org/my-skills",
|
|
286
|
-
"skills": ["brave-search", "transcribe"],
|
|
287
|
-
"extensions": []
|
|
288
|
-
}
|
|
289
|
-
]
|
|
290
|
-
}
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
See [packages.md](packages.md) for package management details.
|
|
294
|
-
|
|
295
|
-
## Example
|
|
296
|
-
|
|
297
|
-
```json
|
|
298
|
-
{
|
|
299
|
-
"defaultProvider": "anthropic",
|
|
300
|
-
"defaultModel": "claude-sonnet-4-20250514",
|
|
301
|
-
"defaultThinkingLevel": "medium",
|
|
302
|
-
"theme": "dark",
|
|
303
|
-
"compaction": {
|
|
304
|
-
"enabled": true,
|
|
305
|
-
"reserveTokens": 16384,
|
|
306
|
-
"keepRecentTokens": 20000
|
|
307
|
-
},
|
|
308
|
-
"retry": {
|
|
309
|
-
"enabled": true,
|
|
310
|
-
"maxRetries": 3
|
|
311
|
-
},
|
|
312
|
-
"enabledModels": ["claude-*", "gpt-4o"],
|
|
313
|
-
"warnings": {
|
|
314
|
-
"anthropicExtraUsage": true
|
|
315
|
-
},
|
|
316
|
-
"packages": ["@org/my-skills"]
|
|
317
|
-
}
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
## Project Overrides
|
|
321
|
-
|
|
322
|
-
Project settings (`.diffex/settings.json`) override global settings. Nested objects are merged:
|
|
323
|
-
|
|
324
|
-
```json
|
|
325
|
-
// ~/.diffex/agent/settings.json (global)
|
|
326
|
-
{
|
|
327
|
-
"theme": "dark",
|
|
328
|
-
"compaction": { "enabled": true, "reserveTokens": 16384 }
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// .diffex/settings.json (project)
|
|
332
|
-
{
|
|
333
|
-
"compaction": { "reserveTokens": 8192 }
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
// Result
|
|
337
|
-
{
|
|
338
|
-
"theme": "dark",
|
|
339
|
-
"compaction": { "enabled": true, "reserveTokens": 8192 }
|
|
340
|
-
}
|
|
341
|
-
```
|
package/docs/shell-aliases.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Shell Aliases
|
|
2
|
-
|
|
3
|
-
Diffex runs bash in non-interactive mode (`bash -c`), which doesn't expand aliases by default.
|
|
4
|
-
|
|
5
|
-
To enable your shell aliases, add to `~/.diffex/agent/settings.json`:
|
|
6
|
-
|
|
7
|
-
```json
|
|
8
|
-
{
|
|
9
|
-
"shellCommandPrefix": "shopt -s expand_aliases\neval \"$(grep '^alias ' ~/.zshrc)\""
|
|
10
|
-
}
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Adjust the path (`~/.zshrc`, `~/.bashrc`, etc.) to match your shell config.
|
package/docs/skills.md
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
> Diffex can create skills. Ask it to build one for your use case.
|
|
2
|
-
|
|
3
|
-
# Skills
|
|
4
|
-
|
|
5
|
-
Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.
|
|
6
|
-
|
|
7
|
-
Diffex implements the [Agent Skills standard](https://agentskills.io/specification), warning about most violations but remaining lenient. Diffex allows skill names to differ from their parent directory even though the standard disallows it; that rule is suboptimal for shared skill directories used across multiple agent harnesses.
|
|
8
|
-
|
|
9
|
-
## Table of Contents
|
|
10
|
-
|
|
11
|
-
- [Locations](#locations)
|
|
12
|
-
- [How Skills Work](#how-skills-work)
|
|
13
|
-
- [Skill Commands](#skill-commands)
|
|
14
|
-
- [Skill Structure](#skill-structure)
|
|
15
|
-
- [Frontmatter](#frontmatter)
|
|
16
|
-
- [Validation](#validation)
|
|
17
|
-
- [Example](#example)
|
|
18
|
-
- [Skill Repositories](#skill-repositories)
|
|
19
|
-
|
|
20
|
-
## Locations
|
|
21
|
-
|
|
22
|
-
> **Security:** Skills can instruct the model to perform any action and may include executable code the model invokes. Review skill content before use.
|
|
23
|
-
|
|
24
|
-
Diffex loads skills from:
|
|
25
|
-
|
|
26
|
-
- Global:
|
|
27
|
-
- `~/.diffex/agent/skills/`
|
|
28
|
-
- `~/.agents/skills/`
|
|
29
|
-
- Project (only after the project is trusted):
|
|
30
|
-
- `.diffex/skills/`
|
|
31
|
-
- `.agents/skills/` in `cwd` and ancestor directories (up to git repo root, or filesystem root when not in a repo)
|
|
32
|
-
- Packages: `skills/` directories or `diffex.skills` entries in `package.json`
|
|
33
|
-
- Settings: `skills` array with files or directories
|
|
34
|
-
- CLI: `--skill <path>` (repeatable, additive even with `--no-skills`)
|
|
35
|
-
|
|
36
|
-
Discovery rules:
|
|
37
|
-
- In `~/.diffex/agent/skills/` and `.diffex/skills/`, direct root `.md` files are discovered as individual skills
|
|
38
|
-
- In all skill locations, directories containing `SKILL.md` are discovered recursively
|
|
39
|
-
- In `~/.agents/skills/` and project `.agents/skills/`, root `.md` files are ignored
|
|
40
|
-
|
|
41
|
-
Disable discovery with `--no-skills` (explicit `--skill` paths still load).
|
|
42
|
-
|
|
43
|
-
### Using Skills from Other Harnesses
|
|
44
|
-
|
|
45
|
-
To use skills from Claude Code or OpenAI Codex, add their directories to settings:
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"skills": [
|
|
50
|
-
"~/.claude/skills",
|
|
51
|
-
"~/.codex/skills"
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
For project-level Claude Code skills, add to `.diffex/settings.json`:
|
|
57
|
-
|
|
58
|
-
```json
|
|
59
|
-
{
|
|
60
|
-
"skills": ["../.claude/skills"]
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## How Skills Work
|
|
65
|
-
|
|
66
|
-
1. At startup, Diffex scans skill locations and builds one catalog for the session. Each entry has a stable source identity, source kind, scope, content digest, version, and the full content captured at load time.
|
|
67
|
-
2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills).
|
|
68
|
-
3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use `/skills` to reference it explicitly).
|
|
69
|
-
4. Explicit references use the catalog's captured version, so a file change does not alter a request that has already been admitted. Reload resources to catalog a changed installed skill.
|
|
70
|
-
5. Invocation traces record availability, model listing, explicit references, `/skills` force-loading, and digest-matched reads as separate facts for the exact catalog version.
|
|
71
|
-
6. The agent follows the instructions, using relative paths to reference scripts and assets.
|
|
72
|
-
|
|
73
|
-
This is progressive disclosure: only names, descriptions, and locations are always in context; full instructions load on-demand. The TUI, system prompt, SDK, and evolution snapshots all read from the same catalog. Trace observations do not infer that a skill was used or caused an outcome.
|
|
74
|
-
|
|
75
|
-
### Evolved Skills
|
|
76
|
-
|
|
77
|
-
Evolved skills are immutable, workspace-scoped packages in a harness revision. The package version covers `SKILL.md` and every bundled UTF-8 supporting file, while the content digest identifies `SKILL.md` itself. Diffex exposes a package only when the active revision and workspace identity match. Selecting another revision changes `EVOLVE.md` memory and the evolved-skill set together at the next prompt boundary; in-flight and already admitted queued requests remain pinned.
|
|
78
|
-
|
|
79
|
-
An evolved reference binds its skill ID, content version, digest, workspace, and harness revision. A reference from an inactive revision is rejected. `/reload` refreshes installed skills while preserving the evolved overlay from the active harness. Accepted evolved skills activate automatically after validation and any configured evaluation finish. Use `/evolve` to inspect provenance, validation, available evaluation results, activation, and rollback. See [Harness Evolution](evolution.md).
|
|
80
|
-
|
|
81
|
-
## Skill Commands
|
|
82
|
-
|
|
83
|
-
Use `/skills` in interactive mode to browse Installed Workspace Skills, Installed Global Skills, and Evolved Skills. Within a category, press Space to enable or disable the highlighted skill for future model prompts; enabled skills display as `[x] name` and disabled skills as `[] name`. The change applies to the next prompt. Press Enter to reference the highlighted skill in the editor without changing whether it is enabled.
|
|
84
|
-
|
|
85
|
-
Referenced skills appear in the editor as purple skill-name tokens while retaining versioned references internally, so you can add the task before submitting. Each reference loads that exact captured skill content for one request, including queued steering and follow-up messages. Disabled skills remain available for explicit reference but are omitted from progressive disclosure in the system prompt.
|
|
86
|
-
|
|
87
|
-
To install a package containing skills from an interactive terminal, run `diffex install <source>` and choose `Install globally` or `Install for this workspace`. The prompt shows both destinations and the trust implications. Workspace installation requires project trust and never falls back to global installation. Non-interactive installs retain the global default; pass `-l` to select workspace scope explicitly.
|
|
88
|
-
|
|
89
|
-
## Skill Structure
|
|
90
|
-
|
|
91
|
-
A skill is a directory with a `SKILL.md` file. Everything else is freeform.
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
my-skill/
|
|
95
|
-
├── SKILL.md # Required: frontmatter + instructions
|
|
96
|
-
├── scripts/ # Helper scripts
|
|
97
|
-
│ └── process.sh
|
|
98
|
-
├── references/ # Detailed docs loaded on-demand
|
|
99
|
-
│ └── api-reference.md
|
|
100
|
-
└── assets/
|
|
101
|
-
└── template.json
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### SKILL.md Format
|
|
105
|
-
|
|
106
|
-
````markdown
|
|
107
|
-
---
|
|
108
|
-
name: my-skill
|
|
109
|
-
description: What this skill does and when to use it. Be specific.
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
# My Skill
|
|
113
|
-
|
|
114
|
-
## Setup
|
|
115
|
-
|
|
116
|
-
Run once before first use:
|
|
117
|
-
```bash
|
|
118
|
-
cd /path/to/skill && npm install
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Usage
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
./scripts/process.sh <input>
|
|
125
|
-
```
|
|
126
|
-
````
|
|
127
|
-
|
|
128
|
-
Use relative paths from the skill directory:
|
|
129
|
-
|
|
130
|
-
```markdown
|
|
131
|
-
See [the reference guide](references/REFERENCE.md) for details.
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Frontmatter
|
|
135
|
-
|
|
136
|
-
Per the [Agent Skills specification](https://agentskills.io/specification#frontmatter-required):
|
|
137
|
-
|
|
138
|
-
| Field | Required | Description |
|
|
139
|
-
|-------|----------|-------------|
|
|
140
|
-
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens. Unlike the standard, Diffex does not require this to match the parent directory because that standard requirement is suboptimal for shared skill directories. |
|
|
141
|
-
| `description` | Yes | Max 1024 chars. What the skill does and when to use it. |
|
|
142
|
-
| `license` | No | License name or reference to bundled file. |
|
|
143
|
-
| `compatibility` | No | Max 500 chars. Environment requirements. |
|
|
144
|
-
| `metadata` | No | Arbitrary key-value mapping. |
|
|
145
|
-
| `allowed-tools` | No | Space-delimited list of pre-approved tools (experimental). |
|
|
146
|
-
| `disable-model-invocation` | No | When `true`, skill is hidden from the system prompt. Users must reference it explicitly through `/skills`. |
|
|
147
|
-
|
|
148
|
-
### Name Rules
|
|
149
|
-
|
|
150
|
-
- 1-64 characters
|
|
151
|
-
- Lowercase letters, numbers, hyphens only
|
|
152
|
-
- No leading/trailing hyphens
|
|
153
|
-
- No consecutive hyphens
|
|
154
|
-
Diffex does not require the name to match the parent directory. The Agent Skills standard does, but that requirement is suboptimal for shared skill directories used by multiple tools.
|
|
155
|
-
|
|
156
|
-
Valid: `pdf-processing`, `data-analysis`, `code-review`
|
|
157
|
-
Invalid: `PDF-Processing`, `-pdf`, `pdf--processing`
|
|
158
|
-
|
|
159
|
-
### Description Best Practices
|
|
160
|
-
|
|
161
|
-
The description determines when the agent loads the skill. Be specific.
|
|
162
|
-
|
|
163
|
-
Good:
|
|
164
|
-
```yaml
|
|
165
|
-
description: Extracts text and tables from PDF files, fills PDF forms, and merges multiple PDFs. Use when working with PDF documents.
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Poor:
|
|
169
|
-
```yaml
|
|
170
|
-
description: Helps with PDFs.
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Validation
|
|
174
|
-
|
|
175
|
-
Diffex validates skills against the Agent Skills standard. Most issues produce warnings but still load the skill:
|
|
176
|
-
|
|
177
|
-
- Name exceeds 64 characters or contains invalid characters
|
|
178
|
-
- Name starts/ends with hyphen or has consecutive hyphens
|
|
179
|
-
- Description exceeds 1024 characters
|
|
180
|
-
|
|
181
|
-
Unknown frontmatter fields are ignored.
|
|
182
|
-
|
|
183
|
-
**Exception:** Skills with missing description are not loaded.
|
|
184
|
-
|
|
185
|
-
Installed skill name precedence is project, user, then package order. Collisions warn and retain the higher-precedence installed skill. When an evolved skill has the same name, the installed skill retains the unsuffixed name and the evolved skill is exposed as `<name>-Evolved`; if that alias also collides, the evolved skill is omitted with a diagnostic.
|
|
186
|
-
|
|
187
|
-
## Example
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
brave-search/
|
|
191
|
-
├── SKILL.md
|
|
192
|
-
├── search.js
|
|
193
|
-
└── content.js
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
**SKILL.md:**
|
|
197
|
-
````markdown
|
|
198
|
-
---
|
|
199
|
-
name: brave-search
|
|
200
|
-
description: Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content.
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
# Brave Search
|
|
204
|
-
|
|
205
|
-
## Setup
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
cd /path/to/brave-search && npm install
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## Search
|
|
212
|
-
|
|
213
|
-
```bash
|
|
214
|
-
./search.js "query" # Basic search
|
|
215
|
-
./search.js "query" --content # Include page content
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
## Extract Page Content
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
./content.js https://example.com
|
|
222
|
-
```
|
|
223
|
-
````
|
|
224
|
-
|
|
225
|
-
## Skill Repositories
|
|
226
|
-
|
|
227
|
-
- [Anthropic Skills](https://github.com/anthropics/skills) - Document processing (docx, pdf, pptx, xlsx), web development
|