@tyvm/knowhow 0.0.109 → 0.0.111
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/autodoc/README.md +324 -0
- package/autodoc/chat-guide.md +268 -365
- package/autodoc/cli-reference.md +399 -473
- package/autodoc/config-reference.md +431 -330
- package/autodoc/embeddings-guide.md +223 -322
- package/autodoc/generate-guide.md +261 -301
- package/autodoc/language-plugin-guide.md +221 -247
- package/autodoc/modules-guide.md +242 -215
- package/autodoc/plugins-guide.md +470 -469
- package/autodoc/quickstart-guide.md +67 -70
- package/autodoc/skills-guide.md +455 -339
- package/autodoc/worker-guide.md +301 -308
- package/package.json +1 -1
- package/scripts/build-for-node.sh +10 -24
- package/src/agents/tools/list.ts +2 -2
- package/src/ai.ts +81 -37
- package/src/auth/browserLogin.ts +129 -3
- package/src/chat/CliChatService.ts +1 -1
- package/src/chat/modules/AgentModule.ts +7 -2
- package/src/chat/modules/SessionsModule.ts +40 -1
- package/src/chat/modules/SystemModule.ts +2 -2
- package/src/clients/anthropic.ts +1 -1
- package/src/clients/index.ts +25 -6
- package/src/clients/openai.ts +8 -5
- package/src/clients/types.ts +29 -6
- package/src/clients/withRetry.ts +89 -0
- package/src/commands/agent.ts +30 -0
- package/src/commands/modules.ts +417 -47
- package/src/config.ts +1 -1
- package/src/fileSync.ts +20 -12
- package/src/hashes.ts +43 -22
- package/src/index.ts +4 -2
- package/src/login.ts +3 -2
- package/src/processors/Base64ImageDetector.ts +73 -0
- package/src/services/Mcp.ts +14 -1
- package/src/services/MediaProcessorService.ts +79 -10
- package/src/services/modules/index.ts +47 -18
- package/src/utils/http.ts +9 -2
- package/tests/processors/Base64ImageDetector.test.ts +160 -0
- package/tests/unit/clients/AIClient.test.ts +446 -0
- package/tests/unit/clients/withRetry.test.ts +319 -0
- package/tests/unit/commands/github-credentials.test.ts +1 -2
- package/ts_build/package.json +1 -1
- package/ts_build/src/agents/tools/list.js +2 -2
- package/ts_build/src/agents/tools/list.js.map +1 -1
- package/ts_build/src/ai.d.ts +3 -3
- package/ts_build/src/ai.js +51 -23
- package/ts_build/src/ai.js.map +1 -1
- package/ts_build/src/auth/browserLogin.d.ts +2 -0
- package/ts_build/src/auth/browserLogin.js +91 -3
- package/ts_build/src/auth/browserLogin.js.map +1 -1
- package/ts_build/src/chat/CliChatService.js +1 -1
- package/ts_build/src/chat/CliChatService.js.map +1 -1
- package/ts_build/src/chat/modules/AgentModule.js +5 -2
- package/ts_build/src/chat/modules/AgentModule.js.map +1 -1
- package/ts_build/src/chat/modules/SessionsModule.js +30 -1
- package/ts_build/src/chat/modules/SessionsModule.js.map +1 -1
- package/ts_build/src/chat/modules/SystemModule.js +2 -2
- package/ts_build/src/chat/modules/SystemModule.js.map +1 -1
- package/ts_build/src/clients/anthropic.js +1 -1
- package/ts_build/src/clients/anthropic.js.map +1 -1
- package/ts_build/src/clients/index.js +7 -6
- package/ts_build/src/clients/index.js.map +1 -1
- package/ts_build/src/clients/openai.js +4 -4
- package/ts_build/src/clients/openai.js.map +1 -1
- package/ts_build/src/clients/types.d.ts +12 -6
- package/ts_build/src/clients/withRetry.d.ts +2 -0
- package/ts_build/src/clients/withRetry.js +60 -0
- package/ts_build/src/clients/withRetry.js.map +1 -0
- package/ts_build/src/commands/agent.js +25 -0
- package/ts_build/src/commands/agent.js.map +1 -1
- package/ts_build/src/commands/modules.js +359 -32
- package/ts_build/src/commands/modules.js.map +1 -1
- package/ts_build/src/config.js +1 -1
- package/ts_build/src/config.js.map +1 -1
- package/ts_build/src/fileSync.d.ts +2 -2
- package/ts_build/src/fileSync.js +13 -11
- package/ts_build/src/fileSync.js.map +1 -1
- package/ts_build/src/hashes.d.ts +2 -2
- package/ts_build/src/hashes.js +40 -16
- package/ts_build/src/hashes.js.map +1 -1
- package/ts_build/src/index.js +1 -1
- package/ts_build/src/index.js.map +1 -1
- package/ts_build/src/login.js +2 -2
- package/ts_build/src/login.js.map +1 -1
- package/ts_build/src/processors/Base64ImageDetector.d.ts +3 -0
- package/ts_build/src/processors/Base64ImageDetector.js +42 -0
- package/ts_build/src/processors/Base64ImageDetector.js.map +1 -1
- package/ts_build/src/services/Mcp.js +9 -1
- package/ts_build/src/services/Mcp.js.map +1 -1
- package/ts_build/src/services/MediaProcessorService.d.ts +5 -4
- package/ts_build/src/services/MediaProcessorService.js +53 -8
- package/ts_build/src/services/MediaProcessorService.js.map +1 -1
- package/ts_build/src/services/modules/index.js +35 -12
- package/ts_build/src/services/modules/index.js.map +1 -1
- package/ts_build/src/utils/http.d.ts +2 -1
- package/ts_build/src/utils/http.js +11 -2
- package/ts_build/src/utils/http.js.map +1 -1
- package/ts_build/tests/processors/Base64ImageDetector.test.js +111 -0
- package/ts_build/tests/processors/Base64ImageDetector.test.js.map +1 -1
- package/ts_build/tests/unit/clients/AIClient.test.d.ts +1 -0
- package/ts_build/tests/unit/clients/AIClient.test.js +339 -0
- package/ts_build/tests/unit/clients/AIClient.test.js.map +1 -0
- package/ts_build/tests/unit/clients/withRetry.test.d.ts +1 -0
- package/ts_build/tests/unit/clients/withRetry.test.js +225 -0
- package/ts_build/tests/unit/clients/withRetry.test.js.map +1 -0
- package/ts_build/tests/unit/commands/github-credentials.test.js +1 -2
- package/ts_build/tests/unit/commands/github-credentials.test.js.map +1 -1
|
@@ -1,46 +1,71 @@
|
|
|
1
1
|
# `knowhow.json` Configuration Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`knowhow.json` is the main configuration file for the **Knowhow CLI**. In a project, it lives at:
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- **Global path:** `~/.knowhow/knowhow.json`
|
|
5
|
+
- `./.knowhow/knowhow.json`
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
During `knowhow init`, Knowhow also creates a global config at:
|
|
8
|
+
|
|
9
|
+
- `~/.knowhow/knowhow.json`
|
|
10
|
+
|
|
11
|
+
> This reference is derived from the `Config` type (`src/types.ts`) and the default config/template behavior (`src/config.ts`).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Example (minimal)
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"promptsDir": ".knowhow/prompts",
|
|
20
|
+
"modules": [],
|
|
21
|
+
"plugins": { "enabled": [], "disabled": [] },
|
|
22
|
+
"sources": [],
|
|
23
|
+
"embedSources": [],
|
|
24
|
+
"embeddingModel": "openai:EmbeddingAda2",
|
|
25
|
+
"agents": [],
|
|
26
|
+
"mcps": [],
|
|
27
|
+
"modelProviders": []
|
|
28
|
+
}
|
|
29
|
+
```
|
|
10
30
|
|
|
11
31
|
---
|
|
12
32
|
|
|
13
33
|
## Top-level keys
|
|
14
34
|
|
|
15
|
-
| Key | Type |
|
|
16
|
-
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `chat` | `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
35
|
+
| Key | Type | Required | Default | Description |
|
|
36
|
+
|---|---|---:|---|---|
|
|
37
|
+
| `openaiBaseUrl` | `string` | No | — | Base URL override for OpenAI-compatible APIs. |
|
|
38
|
+
| `promptsDir` | `string` | **Yes** | `.knowhow/prompts` | Directory containing prompt templates (`*.mdx`). |
|
|
39
|
+
| `lintCommands` | `{ [fileExtension: string]: string }` | No | see defaults | Lint commands run after successful patches (by extension). |
|
|
40
|
+
| `orgId` | `string` | No | — | Organization ID (used by some providers / services). |
|
|
41
|
+
| `syncRemote` | `boolean` | No | `false` | Whether remote operations should use sync behavior (tooling-dependent). |
|
|
42
|
+
| `micCommand` | `string` | No | — | Mic command (for audio-related workflows; provider/tool-dependent). |
|
|
43
|
+
| `defaultMic` | `string` | No | — | Default microphone identifier (if applicable). |
|
|
44
|
+
| `sources` | `GenerationSource[]` | **Yes** | see defaults | File generation pipeline for `knowhow generate`. |
|
|
45
|
+
| `embedSources` | `EmbedSource[]` | **Yes** | see defaults | Embedding pipeline for `knowhow embed`. |
|
|
46
|
+
| `embeddingModel` | `string` | **Yes** | `EmbeddingModels.openai.EmbeddingAda2` | Embedding model ID/name. |
|
|
47
|
+
| `skills` | `string[]` | No | — | Directories to load “skills” from (custom behavior; plugin/tooling dependent). |
|
|
48
|
+
| `plugins` | `{ enabled: string[]; disabled: string[] }` | **Yes** | see defaults | Plugin enable/disable lists. |
|
|
49
|
+
| `chat` | `{ rootModule?: string; renderer?: string; modules?: string[] }` | No | — | Chat UI/runtime configuration. |
|
|
50
|
+
| `modules` | `string[]` | **Yes** | `[]` | Extra NPM modules to load (tools/agents/plugins/clients). |
|
|
51
|
+
| `agents` | `Assistant[]` | **Yes** | see default | Custom chat agents available in Knowhow chat. |
|
|
52
|
+
| `mcps` | `McpConfig[]` | **Yes** | see defaults | MCP servers to start/connect. |
|
|
53
|
+
| `modelProviders` | `ModelProvider[]` | **Yes** | see defaults | Custom model provider endpoints/config. |
|
|
54
|
+
| `ycmd` | `{ enabled?: boolean; installPath?: string; port?: number; logLevel?: ...; completionTimeout?: number }` | No | see defaults | ycmd language server configuration. |
|
|
55
|
+
| `files` | `{ remotePath: string; localPath: string; direction?: "download" \| "upload" \| "sync" }[]` | No | — | Remote/local file sync configuration. |
|
|
56
|
+
| `worker` | `worker` config object | No | partial defaults | Worker runtime sandbox/tunnel/tools. |
|
|
34
57
|
|
|
35
58
|
---
|
|
36
59
|
|
|
37
60
|
## `promptsDir`
|
|
38
61
|
|
|
39
62
|
- **Type:** `string`
|
|
40
|
-
- **
|
|
41
|
-
- **
|
|
42
|
-
-
|
|
43
|
-
- **
|
|
63
|
+
- **Required:** Yes
|
|
64
|
+
- **Description:** Directory where prompt templates are stored. Prompt files are looked up as:
|
|
65
|
+
- `${promptsDir}/${promptName}.mdx`
|
|
66
|
+
- **Default:** `.knowhow/prompts`
|
|
67
|
+
|
|
68
|
+
**Example**
|
|
44
69
|
```json
|
|
45
70
|
{
|
|
46
71
|
"promptsDir": ".knowhow/prompts"
|
|
@@ -49,25 +74,118 @@ This document describes how to configure Knowhow CLI using a `knowhow.json` file
|
|
|
49
74
|
|
|
50
75
|
---
|
|
51
76
|
|
|
77
|
+
## `modules`
|
|
78
|
+
|
|
79
|
+
- **Type:** `string[]`
|
|
80
|
+
- **Required:** Yes
|
|
81
|
+
- **Description:** List of extra NPM modules to load. These can provide custom tools, agents, plugins, or clients.
|
|
82
|
+
- **Default:** `[]`
|
|
83
|
+
|
|
84
|
+
**Example**
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"modules": ["@myorg/knowhow-tools", "@myorg/knowhow-agent-awesome"]
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
> Note: `knowhow init` automatically ensures `@tyvm/knowhow-module-script` is present in the global config.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## `plugins`
|
|
96
|
+
|
|
97
|
+
- **Type:**
|
|
98
|
+
```ts
|
|
99
|
+
{ enabled: string[]; disabled: string[] }
|
|
100
|
+
```
|
|
101
|
+
- **Required:** Yes
|
|
102
|
+
- **Default:**
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"enabled": [
|
|
106
|
+
"embeddings","language","git","vim","github","asana","jira","linear",
|
|
107
|
+
"download","figma","url","tmux","agents-md","exec"
|
|
108
|
+
],
|
|
109
|
+
"disabled": []
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
- **Description:** Enables/disables plugin names. Plugins provide integrations/tools and (for embedding) implementations keyed by `embedSources[].kind`.
|
|
113
|
+
|
|
114
|
+
### Default/commonly referenced plugins
|
|
115
|
+
|
|
116
|
+
| Plugin name | What it does (based on shipped examples) |
|
|
117
|
+
|---|---|
|
|
118
|
+
| `embeddings` | Provides embedding support; used by `embedSources` via `kind`. |
|
|
119
|
+
| `language` | Language terms/hotkeys that expand into larger content (configured in `.knowhow/language.json`). |
|
|
120
|
+
| `git` | Git integration (resolve/operate on git-related data; exact behavior plugin-defined). |
|
|
121
|
+
| `vim` | Vim integration for loading/editing files (chat tools and patching flows). |
|
|
122
|
+
| `github` | Resolve GitHub resources (PRs/issues) and fetch content referenced by URLs. |
|
|
123
|
+
| `asana` | Resolve Asana tasks/lists referenced in inputs. |
|
|
124
|
+
| `jira` | Resolve Jira issues/projects referenced in inputs. |
|
|
125
|
+
| `linear` | Resolve Linear issues referenced in inputs. |
|
|
126
|
+
| `download` | Download remote content referenced by `embedSources` / other pipelines. |
|
|
127
|
+
| `figma` | Resolve design files from Figma. |
|
|
128
|
+
| `url` | Resolve/generalize URL references into usable content. |
|
|
129
|
+
| `tmux` | Integrate with tmux sessions (tooling-dependent). |
|
|
130
|
+
| `agents-md` | Markdown-backed agent definitions (tooling-dependent). |
|
|
131
|
+
| `exec` | Execute commands (tooling-dependent). |
|
|
132
|
+
| `notion` *(seen in examples)* | Notion integration (tooling-dependent). |
|
|
133
|
+
|
|
134
|
+
**Example**
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"plugins": {
|
|
138
|
+
"enabled": ["embeddings", "language", "github", "asana"],
|
|
139
|
+
"disabled": ["exec"]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## `lintCommands`
|
|
147
|
+
|
|
148
|
+
- **Type:** `{ [fileExtension: string]: string }`
|
|
149
|
+
- **Required:** No
|
|
150
|
+
- **Default (partial):**
|
|
151
|
+
```json
|
|
152
|
+
{ "js": "eslint", "ts": "tslint" }
|
|
153
|
+
```
|
|
154
|
+
- **Description:** Commands run after an agent successfully patches a file, when the patched file extension matches the key.
|
|
155
|
+
- `$1` is replaced with the patched file path.
|
|
156
|
+
|
|
157
|
+
**Example**
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"lintCommands": {
|
|
161
|
+
"js": "eslint $1",
|
|
162
|
+
"ts": "tsc -p tsconfig.json && eslint $1"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
52
169
|
## `sources` (generation pipeline)
|
|
53
170
|
|
|
54
|
-
- **Type:** `
|
|
55
|
-
- **
|
|
171
|
+
- **Type:** `GenerationSource[]`
|
|
172
|
+
- **Required:** Yes
|
|
173
|
+
- **Purpose:** Used by `knowhow generate` to process input files and write output artifacts.
|
|
56
174
|
|
|
57
|
-
|
|
175
|
+
Each `GenerationSource` has:
|
|
58
176
|
|
|
59
|
-
|
|
|
177
|
+
| Field | Type | Required | Default | Description |
|
|
60
178
|
|---|---|---:|---|---|
|
|
61
|
-
| `input` | `string` |
|
|
62
|
-
| `output` | `string` |
|
|
63
|
-
| `prompt` | `string` |
|
|
64
|
-
| `kind` | `string` |
|
|
65
|
-
| `agent` | `string` |
|
|
66
|
-
| `model` | `string` |
|
|
67
|
-
| `outputExt` | `string` |
|
|
68
|
-
| `outputName` | `string` |
|
|
69
|
-
|
|
70
|
-
|
|
179
|
+
| `input` | `string` | Yes | — | Glob/path(s) to read input files. |
|
|
180
|
+
| `output` | `string` | Yes | — | Output directory or file target. |
|
|
181
|
+
| `prompt` | `string` | Yes | — | Prompt name (looks up `${promptsDir}/${prompt}.mdx`) or a direct prompt string. |
|
|
182
|
+
| `kind` | `string` | No | — | Optional kind for pipeline/tooling behavior. |
|
|
183
|
+
| `agent` | `string` | No | — | Agent name to use for generating output. |
|
|
184
|
+
| `model` | `string` | No | — | Model override. |
|
|
185
|
+
| `outputExt` | `string` | No | — | Output file extension override. |
|
|
186
|
+
| `outputName` | `string` | No | — | Output file name override. |
|
|
187
|
+
|
|
188
|
+
**Example**
|
|
71
189
|
```json
|
|
72
190
|
{
|
|
73
191
|
"sources": [
|
|
@@ -79,8 +197,22 @@ This document describes how to configure Knowhow CLI using a `knowhow.json` file
|
|
|
79
197
|
{
|
|
80
198
|
"input": ".knowhow/docs/**/*.mdx",
|
|
81
199
|
"output": ".knowhow/docs/README.mdx",
|
|
82
|
-
"prompt": "BasicProjectDocumenter"
|
|
83
|
-
|
|
200
|
+
"prompt": "BasicProjectDocumenter"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Example (agent + model)**
|
|
207
|
+
```json
|
|
208
|
+
{
|
|
209
|
+
"sources": [
|
|
210
|
+
{
|
|
211
|
+
"input": ".knowhow/downloads/**/*.webm",
|
|
212
|
+
"output": ".knowhow/organized/",
|
|
213
|
+
"prompt": "FSOrganizer",
|
|
214
|
+
"agent": "Developer",
|
|
215
|
+
"model": "gpt-5.4-nano"
|
|
84
216
|
}
|
|
85
217
|
]
|
|
86
218
|
}
|
|
@@ -90,25 +222,30 @@ This document describes how to configure Knowhow CLI using a `knowhow.json` file
|
|
|
90
222
|
|
|
91
223
|
## `embedSources` (embedding pipeline)
|
|
92
224
|
|
|
93
|
-
- **Type:** `
|
|
94
|
-
- **
|
|
225
|
+
- **Type:** `EmbedSource[]`
|
|
226
|
+
- **Required:** Yes
|
|
227
|
+
- **Purpose:** Used by `knowhow embed` to generate embedding JSON and optionally upload/download remote embeddings.
|
|
95
228
|
|
|
96
|
-
|
|
229
|
+
Each `EmbedSource` has:
|
|
97
230
|
|
|
98
|
-
|
|
|
231
|
+
| Field | Type | Required | Default | Description |
|
|
99
232
|
|---|---|---:|---|---|
|
|
100
|
-
| `input` | `string` |
|
|
101
|
-
| `output` | `string` |
|
|
102
|
-
| `prompt` | `string` |
|
|
103
|
-
| `kind` | `string` |
|
|
104
|
-
| `chunkSize` | `number` |
|
|
105
|
-
| `minLength` | `number` |
|
|
106
|
-
| `remote` | `string` |
|
|
107
|
-
| `remoteType` | `string` |
|
|
108
|
-
| `remoteId` | `string` |
|
|
109
|
-
| `uploadMode` | `
|
|
110
|
-
|
|
111
|
-
###
|
|
233
|
+
| `input` | `string` | Yes | — | Glob/path(s) or remote input. |
|
|
234
|
+
| `output` | `string` | Yes | — | Where the embeddings JSON is written locally. |
|
|
235
|
+
| `prompt` | `string` | No | — | Optional prompt name for preprocessing before embedding (`${promptsDir}/${prompt}.mdx`). |
|
|
236
|
+
| `kind` | `string` | No | — | Plugin “kind” that implements embedding for this source (any plugin that implements embedding for that `kind`). |
|
|
237
|
+
| `chunkSize` | `number` | No | — | Embedding chunk size (e.g., `2000`). |
|
|
238
|
+
| `minLength` | `number` | No | — | Minimum text length threshold before embedding. |
|
|
239
|
+
| `remote` | `string` | No | — | Remote target name used by upload tooling (plugin/tooling-dependent). |
|
|
240
|
+
| `remoteType` | `string` | No | — | Remote type; examples include `s3` and `github*`. |
|
|
241
|
+
| `remoteId` | `string` | No | — | Remote identifier (e.g., bucket/object or known embedding set id). |
|
|
242
|
+
| `uploadMode` | `boolean` | No | — | Controls uploading behavior (tooling-dependent). |
|
|
243
|
+
|
|
244
|
+
### Upload/download remote options (from examples)
|
|
245
|
+
- **S3:** `remoteType: "s3"` (upload via `knowhow upload`)
|
|
246
|
+
- **GitHub (`github*`):** download/upload via git LFS workflows (tooling-dependent)
|
|
247
|
+
|
|
248
|
+
**Example (local docs + prompt preprocessing)**
|
|
112
249
|
```json
|
|
113
250
|
{
|
|
114
251
|
"embedSources": [
|
|
@@ -117,7 +254,15 @@ This document describes how to configure Knowhow CLI using a `knowhow.json` file
|
|
|
117
254
|
"output": ".knowhow/embeddings/docs.json",
|
|
118
255
|
"prompt": "BasicEmbeddingExplainer",
|
|
119
256
|
"chunkSize": 2000
|
|
120
|
-
}
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Example (code embedding)**
|
|
263
|
+
```json
|
|
264
|
+
{
|
|
265
|
+
"embedSources": [
|
|
121
266
|
{
|
|
122
267
|
"input": "src/**/*.ts",
|
|
123
268
|
"output": ".knowhow/embeddings/code.json",
|
|
@@ -127,15 +272,17 @@ This document describes how to configure Knowhow CLI using a `knowhow.json` file
|
|
|
127
272
|
}
|
|
128
273
|
```
|
|
129
274
|
|
|
130
|
-
|
|
275
|
+
**Example (remote embeddings via S3 + kind)**
|
|
131
276
|
```json
|
|
132
277
|
{
|
|
133
278
|
"embedSources": [
|
|
134
279
|
{
|
|
135
|
-
"input": "https://
|
|
136
|
-
"output": ".knowhow/embeddings/
|
|
137
|
-
"
|
|
138
|
-
"
|
|
280
|
+
"input": "https://app.asana.com/0/111111111111111/list",
|
|
281
|
+
"output": ".knowhow/embeddings/asana.json",
|
|
282
|
+
"remote": "mybucket",
|
|
283
|
+
"remoteType": "s3",
|
|
284
|
+
"kind": "asana",
|
|
285
|
+
"chunkSize": 2000
|
|
139
286
|
}
|
|
140
287
|
]
|
|
141
288
|
}
|
|
@@ -146,101 +293,42 @@ This document describes how to configure Knowhow CLI using a `knowhow.json` file
|
|
|
146
293
|
## `embeddingModel`
|
|
147
294
|
|
|
148
295
|
- **Type:** `string`
|
|
149
|
-
- **
|
|
150
|
-
- **
|
|
151
|
-
|
|
152
|
-
{
|
|
153
|
-
"embeddingModel": "openai:EmbeddingAda2"
|
|
154
|
-
}
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
> Use the exact identifier format your Knowhow build expects (commonly defined by an `EmbeddingModels` enum/constant).
|
|
296
|
+
- **Required:** Yes
|
|
297
|
+
- **Default:** `EmbeddingModels.openai.EmbeddingAda2`
|
|
298
|
+
- **Description:** The embedding model identifier to use for embedding generation.
|
|
158
299
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
## `plugins`
|
|
162
|
-
|
|
163
|
-
- **Type:**
|
|
164
|
-
```ts
|
|
165
|
-
{
|
|
166
|
-
enabled: string[];
|
|
167
|
-
disabled: string[];
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
- **Description:** Enables/disables built-in plugins by name.
|
|
171
|
-
|
|
172
|
-
| Key | Type | Description | Example |
|
|
173
|
-
|---|---|---|---|
|
|
174
|
-
| `enabled` | `string[]` | List of enabled plugin identifiers. | `["embeddings","git"]` |
|
|
175
|
-
| `disabled` | `string[]` | List of disabled plugin identifiers. | `["github"]` |
|
|
176
|
-
|
|
177
|
-
### Example
|
|
300
|
+
**Example**
|
|
178
301
|
```json
|
|
179
302
|
{
|
|
180
|
-
"
|
|
181
|
-
"enabled": ["embeddings", "language", "git", "exec"],
|
|
182
|
-
"disabled": []
|
|
183
|
-
}
|
|
303
|
+
"embeddingModel": "openai:EmbeddingAda2"
|
|
184
304
|
}
|
|
185
305
|
```
|
|
186
306
|
|
|
187
307
|
---
|
|
188
308
|
|
|
189
|
-
## `
|
|
190
|
-
|
|
191
|
-
- **Type:** `string[]`
|
|
192
|
-
- **Description:** NPM package names to load additional/custom plugins from.
|
|
193
|
-
|
|
194
|
-
### Example
|
|
195
|
-
```json
|
|
196
|
-
{
|
|
197
|
-
"pluginPackages": ["@myorg/knowhow-plugin-acme"]
|
|
198
|
-
}
|
|
199
|
-
```
|
|
309
|
+
## `agents` (custom chat agents)
|
|
200
310
|
|
|
201
|
-
|
|
311
|
+
- **Type:** `Assistant[]`
|
|
312
|
+
- **Required:** Yes
|
|
313
|
+
- **Default:** includes an “Example agent”
|
|
314
|
+
- **Description:** Defines named agents that can be selected in chat sessions. Agents are provided with:
|
|
315
|
+
- tool access (as determined by enabled plugins and loaded modules)
|
|
316
|
+
- prompt instructions
|
|
317
|
+
- an optional model/provider
|
|
202
318
|
|
|
203
|
-
|
|
319
|
+
**Important:** Your prompt/examples mention `assistants`, but the current `Config` type only defines **`agents`**.
|
|
204
320
|
|
|
205
|
-
|
|
206
|
-
- **Description:** Load custom npm modules that can provide tools/agents/plugins/clients.
|
|
321
|
+
### `Assistant` fields
|
|
207
322
|
|
|
208
|
-
|
|
209
|
-
| Key | Type | Required | Description | Example |
|
|
323
|
+
| Field | Type | Required | Default | Description |
|
|
210
324
|
|---|---|---:|---|---|
|
|
211
|
-
| `
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
"modules": [
|
|
217
|
-
{ "package": "@myorg/knowhow-module-custom-tools" },
|
|
218
|
-
{ "package": "@myorg/knowhow-module-chat-ui" }
|
|
219
|
-
]
|
|
220
|
-
}
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## `agents` / `assistants`
|
|
325
|
+
| `name` | `string` | No | — | Agent name (used in chat selection). |
|
|
326
|
+
| `description` | `string` | No | — | Short agent description. |
|
|
327
|
+
| `instructions` | `string` | **Yes** | — | Agent behavior/instructions. |
|
|
328
|
+
| `model` | `string` | No | — | Model override. |
|
|
329
|
+
| `provider` | `keyof Providers` | No | — | Provider key (e.g., `openai`, `anthropic`, `google`, `xai`, etc.). |
|
|
226
330
|
|
|
227
|
-
|
|
228
|
-
- **Description:** Custom agent definitions usable by generation/chat.
|
|
229
|
-
- **Note:** Both keys typically share the same schema; `assistants` may be treated as an alias/parallel list.
|
|
230
|
-
|
|
231
|
-
### `AgentConfig`
|
|
232
|
-
|
|
233
|
-
| Key | Type | Required | Description | Example |
|
|
234
|
-
|---|---|---:|---|---|
|
|
235
|
-
| `name` | `string` | ✅ | Agent identifier referenced by `sources[].agent`. | `Example agent` |
|
|
236
|
-
| `description` | `string` | ❌ | Short human-readable description. | `Docs writer` |
|
|
237
|
-
| `instructions` | `string` | ✅ | Agent system/developer instructions. | `Reply with ...` |
|
|
238
|
-
| `model` | `string` | ❌ | Model override used by this agent. | `gpt-4o-2024-08-06` |
|
|
239
|
-
| `provider` | `string` | ❌/✅ | Model provider key used by this agent. | `openai` |
|
|
240
|
-
| `tools` | `string[]` | ❌ | Tool names the agent is allowed to use. | `["git","exec"]` |
|
|
241
|
-
| `files` | `string[]` | ❌ | Files/dirs/globs provided as context for this agent. | `[".knowhow/docs/"]` |
|
|
242
|
-
|
|
243
|
-
### Example
|
|
331
|
+
**Example**
|
|
244
332
|
```json
|
|
245
333
|
{
|
|
246
334
|
"agents": [
|
|
@@ -248,48 +336,37 @@ This document describes how to configure Knowhow CLI using a `knowhow.json` file
|
|
|
248
336
|
"name": "Example agent",
|
|
249
337
|
"description": "You can define agents in the config. They will have access to all tools.",
|
|
250
338
|
"instructions": "Reply to the user saying 'Hello, world!'",
|
|
251
|
-
"model": "gpt-
|
|
339
|
+
"model": "gpt-5.4-nano",
|
|
252
340
|
"provider": "openai"
|
|
253
341
|
}
|
|
254
342
|
]
|
|
255
343
|
}
|
|
256
344
|
```
|
|
257
345
|
|
|
258
|
-
### Example: agent with `tools` and `files`
|
|
259
|
-
```json
|
|
260
|
-
{
|
|
261
|
-
"agents": [
|
|
262
|
-
{
|
|
263
|
-
"name": "Docs agent",
|
|
264
|
-
"description": "Writes and updates project documentation.",
|
|
265
|
-
"instructions": "Summarize changes and update docs with a clear changelog.",
|
|
266
|
-
"model": "gpt-4o-2024-08-06",
|
|
267
|
-
"provider": "openai",
|
|
268
|
-
"tools": ["git", "exec"],
|
|
269
|
-
"files": [".knowhow/docs/"]
|
|
270
|
-
}
|
|
271
|
-
]
|
|
272
|
-
}
|
|
273
|
-
```
|
|
274
|
-
|
|
275
346
|
---
|
|
276
347
|
|
|
277
348
|
## `mcps` (MCP servers)
|
|
278
349
|
|
|
279
|
-
- **Type:** `
|
|
280
|
-
- **
|
|
350
|
+
- **Type:** `McpConfig[]`
|
|
351
|
+
- **Required:** Yes
|
|
352
|
+
- **Default:** includes a `browser` MCP example
|
|
353
|
+
- **Description:** Configure MCP servers Knowhow can launch/connect to.
|
|
281
354
|
|
|
282
|
-
### `
|
|
355
|
+
### `McpConfig` fields
|
|
283
356
|
|
|
284
|
-
|
|
|
357
|
+
| Field | Type | Required | Default | Description |
|
|
285
358
|
|---|---|---:|---|---|
|
|
286
|
-
| `name` | `string` |
|
|
287
|
-
| `
|
|
288
|
-
| `
|
|
289
|
-
| `
|
|
290
|
-
| `
|
|
291
|
-
|
|
292
|
-
|
|
359
|
+
| `name` | `string` | **Yes** | — | MCP server name. |
|
|
360
|
+
| `autoConnect` | `boolean` | No | — | Whether to auto-connect. |
|
|
361
|
+
| `command` | `string` | No | — | Command to run (e.g., `npx`). |
|
|
362
|
+
| `args` | `string[]` | No | — | Command arguments. |
|
|
363
|
+
| `url` | `string` | No | — | If provided, connect via URL instead of launching a process. |
|
|
364
|
+
| `env` | `{ [key: string]: string }` | No | — | Environment variables for the process. |
|
|
365
|
+
| `params` | `Partial<{ socket: WebSocket }>` | No | — | Advanced socket parameters (implementation-dependent). |
|
|
366
|
+
| `authorization_token` | `string` | No | — | Authorization token for the MCP endpoint. |
|
|
367
|
+
| `authorization_token_file` | `string` | No | — | Path to a file containing the token. |
|
|
368
|
+
|
|
369
|
+
**Example**
|
|
293
370
|
```json
|
|
294
371
|
{
|
|
295
372
|
"mcps": [
|
|
@@ -305,110 +382,146 @@ This document describes how to configure Knowhow CLI using a `knowhow.json` file
|
|
|
305
382
|
|
|
306
383
|
---
|
|
307
384
|
|
|
308
|
-
## `modelProviders`
|
|
385
|
+
## `modelProviders` (custom model providers)
|
|
309
386
|
|
|
310
|
-
- **Type:** `
|
|
311
|
-
- **
|
|
387
|
+
- **Type:** `ModelProvider[]`
|
|
388
|
+
- **Required:** Yes
|
|
389
|
+
- **Default (examples):** includes `openai`, `anthropic`, `google`, `xai`, `knowhow`, and `lms`.
|
|
312
390
|
|
|
313
|
-
### `
|
|
391
|
+
### `ModelProvider` fields
|
|
314
392
|
|
|
315
|
-
|
|
|
393
|
+
| Field | Type | Required | Default | Description |
|
|
316
394
|
|---|---|---:|---|---|
|
|
317
|
-
| `
|
|
318
|
-
| `
|
|
319
|
-
| `
|
|
320
|
-
|
|
321
|
-
|
|
395
|
+
| `provider` | `string` | **Yes** | — | Provider key (must match Knowhow’s provider selection). |
|
|
396
|
+
| `url` | `string` | No | — | Base URL for the provider endpoint. |
|
|
397
|
+
| `envKey` | `string` | No | — | Environment variable name holding provider auth (e.g., `OPENAI_API_KEY`). |
|
|
398
|
+
| `headers` | `{ [key: string]: string }` | No | — | Additional HTTP headers. |
|
|
399
|
+
| `jwtFile` | `string` | No | — | Path to a JWT file. |
|
|
400
|
+
| `timeout` | `number` | No | — | Request timeout. |
|
|
401
|
+
| `extra_body` | `Record<string, any>` | No | — | Extra fields injected into provider requests. |
|
|
402
|
+
| `pricing` | `Record<string, { input?: number; output?: number; cached_input?: number; cache_hit?: number }>` | No | — | Optional model pricing map. |
|
|
403
|
+
| *(Note)* `pricing` is passed to `HttpClient.setPrices()` per code comments. | | | | |
|
|
404
|
+
|
|
405
|
+
**Example (LMS Studio / custom endpoint)**
|
|
322
406
|
```json
|
|
323
407
|
{
|
|
324
408
|
"modelProviders": [
|
|
325
|
-
{
|
|
409
|
+
{
|
|
410
|
+
"url": "http://localhost:1234",
|
|
411
|
+
"provider": "lms"
|
|
412
|
+
}
|
|
326
413
|
]
|
|
327
414
|
}
|
|
328
415
|
```
|
|
329
416
|
|
|
330
417
|
---
|
|
331
418
|
|
|
332
|
-
## `
|
|
333
|
-
|
|
334
|
-
- **Type:** `Record<string,string>`
|
|
335
|
-
- **Description:** Map file extensions to lint commands.
|
|
336
|
-
- Common behavior: keys are extensions like `"ts"`, and the command is run with `$1` replaced by the patched file path.
|
|
419
|
+
## `chat` (chat config)
|
|
337
420
|
|
|
338
|
-
|
|
339
|
-
```
|
|
340
|
-
{
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
421
|
+
- **Type:**
|
|
422
|
+
```ts
|
|
423
|
+
{
|
|
424
|
+
rootModule?: string;
|
|
425
|
+
renderer?: string;
|
|
426
|
+
modules?: string[];
|
|
344
427
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
## `chat`
|
|
351
|
-
|
|
352
|
-
- **Type:** `ChatConfig`
|
|
353
|
-
- **Description:** Configure chat renderer and module wiring.
|
|
354
|
-
|
|
355
|
-
### `ChatConfig`
|
|
356
|
-
|
|
357
|
-
| Key | Type | Required | Description | Example |
|
|
358
|
-
|---|---|---:|---|---|
|
|
359
|
-
| `renderer` | `string` | ❌ | Renderer module name/path. | `default` |
|
|
360
|
-
| `modules` | `string[]` | ❌ | Chat modules to load. | `["@myorg/knowhow-chat-ui"]` |
|
|
361
|
-
| `rootModule` | `string` | ❌ | Root module entry. | `knowhow-chat` |
|
|
428
|
+
```
|
|
429
|
+
- **Required:** No
|
|
430
|
+
- **Description:** Configures chat runtime: renderer and module loading for chat UI/tooling.
|
|
362
431
|
|
|
363
|
-
|
|
432
|
+
**Example**
|
|
364
433
|
```json
|
|
365
434
|
{
|
|
366
435
|
"chat": {
|
|
367
|
-
"renderer": "default",
|
|
368
|
-
"
|
|
369
|
-
"
|
|
436
|
+
"renderer": "@knowhow/chat-renderer-default",
|
|
437
|
+
"rootModule": "@knowhow/chat-root",
|
|
438
|
+
"modules": ["@myorg/knowhow-chat-mods"]
|
|
370
439
|
}
|
|
371
440
|
}
|
|
372
441
|
```
|
|
373
442
|
|
|
374
443
|
---
|
|
375
444
|
|
|
376
|
-
## `worker`
|
|
445
|
+
## `worker` (worker runtime config)
|
|
377
446
|
|
|
378
|
-
- **Type:**
|
|
379
|
-
|
|
447
|
+
- **Type:**
|
|
448
|
+
```ts
|
|
449
|
+
{
|
|
450
|
+
allowedTools?: string[];
|
|
451
|
+
workerId?: string;
|
|
452
|
+
sandbox?: boolean;
|
|
453
|
+
volumes?: string[];
|
|
454
|
+
envFile?: string;
|
|
455
|
+
auth?: { ... };
|
|
456
|
+
commandAuth?: { [toolName: string]: "always" | "session" | "never" };
|
|
457
|
+
tunnel?: {
|
|
458
|
+
enabled?: boolean;
|
|
459
|
+
allowedPorts?: number[];
|
|
460
|
+
maxConcurrentStreams?: number;
|
|
461
|
+
portMapping?: { [containerPort: number]: number };
|
|
462
|
+
localHost?: string;
|
|
463
|
+
enableUrlRewriting?: boolean;
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
```
|
|
467
|
+
- **Required:** No
|
|
468
|
+
- **Default (partial):**
|
|
469
|
+
```json
|
|
470
|
+
{
|
|
471
|
+
"worker": {
|
|
472
|
+
"tunnel": { "enabled": false, "allowedPorts": [] }
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
```
|
|
380
476
|
|
|
381
|
-
###
|
|
477
|
+
### Worker fields
|
|
382
478
|
|
|
383
|
-
|
|
|
479
|
+
| Field | Type | Required | Default | Description |
|
|
384
480
|
|---|---|---:|---|---|
|
|
385
|
-
| `allowedTools` | `string[]` |
|
|
386
|
-
| `
|
|
387
|
-
| `
|
|
388
|
-
| `
|
|
389
|
-
| `
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
481
|
+
| `allowedTools` | `string[]` | No | — | Tools the worker is allowed to expose. |
|
|
482
|
+
| `workerId` | `string` | No | — | Identifier for the worker instance. |
|
|
483
|
+
| `sandbox` | `boolean` | No | — | Whether to run tools in a sandbox. |
|
|
484
|
+
| `volumes` | `string[]` | No | — | Volume mappings for containerized execution. |
|
|
485
|
+
| `envFile` | `string` | No | — | Path to an env file used by the worker. |
|
|
486
|
+
| `auth` | object | No | — | Authentication requirements for worker access. |
|
|
487
|
+
| `commandAuth` | `{ [toolName: string]: "always" \| "session" \| "never" }` | No | — | Per-tool authorization policy. |
|
|
488
|
+
| `tunnel` | object | No | — | Network tunneling configuration. |
|
|
489
|
+
|
|
490
|
+
#### `worker.auth`
|
|
491
|
+
|
|
492
|
+
| Field | Type | Description |
|
|
493
|
+
|---|---|---|
|
|
494
|
+
| `required` | `boolean` | Whether auth is required. |
|
|
495
|
+
| `passkey.publicKey` | `string` | Passkey public key. |
|
|
496
|
+
| `passkey.credentialId` | `string` | Passkey credential id. |
|
|
497
|
+
| `passkey.algorithm` | `string` | Passkey algorithm. |
|
|
498
|
+
| `sessionDurationHours` | `number` | Session TTL in hours. |
|
|
499
|
+
|
|
500
|
+
#### `worker.tunnel`
|
|
501
|
+
|
|
502
|
+
| Field | Type | Description |
|
|
503
|
+
|---|---|---|
|
|
504
|
+
| `enabled` | `boolean` | Enable tunneling. |
|
|
505
|
+
| `allowedPorts` | `number[]` | Ports allowed for tunneling. |
|
|
506
|
+
| `maxConcurrentStreams` | `number` | Max concurrent tunnel streams. |
|
|
507
|
+
| `portMapping` | `{ [containerPort: number]: number }` | Container→local port mapping. |
|
|
508
|
+
| `localHost` | `string` | Host used for local forwarding. |
|
|
509
|
+
| `enableUrlRewriting` | `boolean` | Rewrite URLs for proxied access. |
|
|
510
|
+
|
|
511
|
+
**Example (expose tools via tunnel disabled)**
|
|
402
512
|
```json
|
|
403
513
|
{
|
|
404
514
|
"worker": {
|
|
405
|
-
"allowedTools": [
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
515
|
+
"allowedTools": [
|
|
516
|
+
"embeddingSearch",
|
|
517
|
+
"finalAnswer",
|
|
518
|
+
"readFile",
|
|
519
|
+
"writeFileChunk",
|
|
520
|
+
"mcp_0_puppeteer_screenshot"
|
|
521
|
+
],
|
|
409
522
|
"tunnel": {
|
|
410
|
-
"enabled":
|
|
411
|
-
"allowedPorts": [
|
|
523
|
+
"enabled": false,
|
|
524
|
+
"allowedPorts": []
|
|
412
525
|
}
|
|
413
526
|
}
|
|
414
527
|
}
|
|
@@ -419,123 +532,111 @@ This document describes how to configure Knowhow CLI using a `knowhow.json` file
|
|
|
419
532
|
## `skills`
|
|
420
533
|
|
|
421
534
|
- **Type:** `string[]`
|
|
422
|
-
- **
|
|
535
|
+
- **Required:** No
|
|
536
|
+
- **Description:** List of directories to load skills from (implementation-specific; used by skill/tool orchestration).
|
|
423
537
|
|
|
424
|
-
|
|
538
|
+
**Example**
|
|
425
539
|
```json
|
|
426
540
|
{
|
|
427
|
-
"skills": ["
|
|
541
|
+
"skills": ["./skills/common", "./skills/my-special-skill"]
|
|
428
542
|
}
|
|
429
543
|
```
|
|
430
544
|
|
|
431
545
|
---
|
|
432
546
|
|
|
433
|
-
## `files` (file sync
|
|
434
|
-
|
|
435
|
-
- **Type:** `FileSyncConfig` *(schema varies by Knowhow build/version)*
|
|
436
|
-
- **Description:** Configure how files are synced between local filesystem and Knowhow’s filesystem/runtime.
|
|
547
|
+
## `files` (file sync configuration)
|
|
437
548
|
|
|
438
|
-
|
|
549
|
+
- **Type:**
|
|
550
|
+
```ts
|
|
551
|
+
{
|
|
552
|
+
remotePath: string;
|
|
553
|
+
localPath: string;
|
|
554
|
+
direction?: "download" | "upload" | "sync";
|
|
555
|
+
}[]
|
|
556
|
+
```
|
|
557
|
+
- **Required:** No
|
|
558
|
+
- **Description:** Declare remote↔local file sync entries.
|
|
559
|
+
|
|
560
|
+
**Example**
|
|
439
561
|
```json
|
|
440
562
|
{
|
|
441
|
-
"files":
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
563
|
+
"files": [
|
|
564
|
+
{
|
|
565
|
+
"remotePath": "s3://mybucket/embeddings/docs.json",
|
|
566
|
+
"localPath": ".knowhow/embeddings/docs.json",
|
|
567
|
+
"direction": "download"
|
|
568
|
+
}
|
|
569
|
+
]
|
|
446
570
|
}
|
|
447
571
|
```
|
|
448
572
|
|
|
449
|
-
> If you paste your `Config`/`FileSyncConfig` type from `src/types.ts`, I can replace this “illustrative shape” with the exact keys/types.
|
|
450
|
-
|
|
451
573
|
---
|
|
452
574
|
|
|
453
|
-
## `ycmd` (language server)
|
|
454
|
-
|
|
455
|
-
- **Type:** `YcmdConfig`
|
|
456
|
-
- **Description:** Configure the ycmd language server.
|
|
457
|
-
|
|
458
|
-
### `YcmdConfig`
|
|
575
|
+
## `ycmd` (language server config)
|
|
459
576
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
577
|
+
- **Type:**
|
|
578
|
+
```ts
|
|
579
|
+
{
|
|
580
|
+
enabled?: boolean;
|
|
581
|
+
installPath?: string;
|
|
582
|
+
port?: number; // 0 for auto-assign
|
|
583
|
+
logLevel?: "debug" | "info" | "warning" | "error";
|
|
584
|
+
completionTimeout?: number;
|
|
585
|
+
}
|
|
586
|
+
```
|
|
587
|
+
- **Required:** No
|
|
588
|
+
- **Default (from `config.ts`):**
|
|
589
|
+
```json
|
|
590
|
+
{
|
|
591
|
+
"enabled": false,
|
|
592
|
+
"installPath": undefined,
|
|
593
|
+
"port": 0,
|
|
594
|
+
"logLevel": "info",
|
|
595
|
+
"completionTimeout": 5000
|
|
596
|
+
}
|
|
597
|
+
```
|
|
598
|
+
- **Description:** Configures **ycmd** installation and server behavior.
|
|
467
599
|
|
|
468
|
-
|
|
600
|
+
**Example**
|
|
469
601
|
```json
|
|
470
602
|
{
|
|
471
603
|
"ycmd": {
|
|
472
604
|
"enabled": true,
|
|
473
|
-
"
|
|
474
|
-
"port": 0,
|
|
605
|
+
"port": 8123,
|
|
475
606
|
"logLevel": "debug",
|
|
476
|
-
"completionTimeout":
|
|
607
|
+
"completionTimeout": 8000
|
|
477
608
|
}
|
|
478
609
|
}
|
|
479
610
|
```
|
|
480
611
|
|
|
481
612
|
---
|
|
482
613
|
|
|
483
|
-
##
|
|
614
|
+
## Other configuration keys
|
|
484
615
|
|
|
616
|
+
### `openaiBaseUrl`
|
|
617
|
+
- **Type:** `string`
|
|
618
|
+
- **Default:** —
|
|
619
|
+
- **Description:** Base URL override for OpenAI-compatible clients.
|
|
620
|
+
|
|
621
|
+
**Example**
|
|
485
622
|
```json
|
|
486
623
|
{
|
|
487
|
-
"
|
|
488
|
-
"plugins": {
|
|
489
|
-
"enabled": ["embeddings", "language", "git", "exec"],
|
|
490
|
-
"disabled": []
|
|
491
|
-
},
|
|
492
|
-
"lintCommands": {
|
|
493
|
-
"ts": "eslint $1",
|
|
494
|
-
"js": "eslint $1"
|
|
495
|
-
},
|
|
496
|
-
"sources": [
|
|
497
|
-
{
|
|
498
|
-
"input": "src/**/*.mdx",
|
|
499
|
-
"output": ".knowhow/docs/",
|
|
500
|
-
"prompt": "BasicCodeDocumenter"
|
|
501
|
-
}
|
|
502
|
-
],
|
|
503
|
-
"embedSources": [
|
|
504
|
-
{
|
|
505
|
-
"input": ".knowhow/docs/**/*.mdx",
|
|
506
|
-
"output": ".knowhow/embeddings/docs.json",
|
|
507
|
-
"prompt": "BasicEmbeddingExplainer",
|
|
508
|
-
"chunkSize": 2000
|
|
509
|
-
}
|
|
510
|
-
],
|
|
511
|
-
"embeddingModel": "openai:EmbeddingAda2",
|
|
512
|
-
"agents": [
|
|
513
|
-
{
|
|
514
|
-
"name": "Example agent",
|
|
515
|
-
"instructions": "Reply to the user saying 'Hello, world!'",
|
|
516
|
-
"model": "gpt-4o-2024-08-06",
|
|
517
|
-
"provider": "openai"
|
|
518
|
-
}
|
|
519
|
-
],
|
|
520
|
-
"mcps": [
|
|
521
|
-
{
|
|
522
|
-
"name": "browser",
|
|
523
|
-
"command": "npx",
|
|
524
|
-
"args": ["-y", "@playwright/mcp@latest", "--browser", "chrome"]
|
|
525
|
-
}
|
|
526
|
-
],
|
|
527
|
-
"modelProviders": [{ "url": "http://localhost:1234", "provider": "lms" }],
|
|
528
|
-
"worker": {
|
|
529
|
-
"tunnel": { "enabled": false, "allowedPorts": [] }
|
|
530
|
-
}
|
|
624
|
+
"openaiBaseUrl": "http://localhost:11434/v1"
|
|
531
625
|
}
|
|
532
626
|
```
|
|
533
627
|
|
|
628
|
+
### `orgId`
|
|
629
|
+
- **Type:** `string`
|
|
630
|
+
- **Description:** Organization ID (provider/service dependent).
|
|
631
|
+
|
|
632
|
+
### `syncRemote`
|
|
633
|
+
- **Type:** `boolean`
|
|
634
|
+
- **Description:** Enables sync behavior for remote operations (tooling-dependent).
|
|
635
|
+
|
|
636
|
+
### `micCommand` / `defaultMic`
|
|
637
|
+
- **Type:** `string`
|
|
638
|
+
- **Description:** Audio/microphone configuration (implementation/tooling dependent).
|
|
639
|
+
|
|
534
640
|
---
|
|
535
641
|
|
|
536
|
-
|
|
537
|
-
If you paste `src/config.ts` and `src/types.ts` (the actual `Config`, `SourceConfig`, `EmbedSourceConfig`, `WorkerConfig`, `FileSyncConfig`, and `YcmdConfig` type definitions), I can regenerate this reference with:
|
|
538
|
-
- exact field names (no illustrative placeholders),
|
|
539
|
-
- exact optional/required fields,
|
|
540
|
-
- exact union literal types (e.g., allowed `uploadMode` values, `logLevel` enum values),
|
|
541
|
-
- and the real list of built-in plugin names + what each one does.
|
|
642
|
+
If you want, paste your current `knowhow.json` and I’ll validate it against this schema-style reference and suggest fixes for missing/invalid fields.
|