byterover-cli 1.2.1 → 1.4.0

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.
Files changed (147) hide show
  1. package/README.md +76 -8
  2. package/dist/constants.d.ts +0 -5
  3. package/dist/constants.js +0 -5
  4. package/dist/core/domain/cipher/agent/agent-info.d.ts +17 -17
  5. package/dist/core/domain/cipher/errors/file-system-error.d.ts +11 -0
  6. package/dist/core/domain/cipher/errors/file-system-error.js +17 -0
  7. package/dist/core/domain/cipher/file-system/types.d.ts +40 -6
  8. package/dist/core/domain/cipher/llm/schemas.d.ts +14 -14
  9. package/dist/core/domain/cipher/session/session-metadata.d.ts +2 -2
  10. package/dist/core/domain/entities/agent.d.ts +1 -1
  11. package/dist/core/domain/entities/agent.js +11 -6
  12. package/dist/core/domain/entities/connector-type.d.ts +2 -1
  13. package/dist/core/domain/entities/connector-type.js +2 -1
  14. package/dist/core/domain/transport/schemas.d.ts +66 -66
  15. package/dist/core/interfaces/cipher/cipher-services.d.ts +0 -3
  16. package/dist/core/interfaces/cipher/index.d.ts +0 -2
  17. package/dist/core/interfaces/connectors/i-connector.d.ts +2 -2
  18. package/dist/core/interfaces/i-file-service.d.ts +7 -0
  19. package/dist/infra/auth/oauth-service.d.ts +15 -0
  20. package/dist/infra/auth/oauth-service.js +38 -2
  21. package/dist/infra/cipher/agent/agent-schemas.d.ts +42 -42
  22. package/dist/infra/cipher/file-system/binary-utils.d.ts +15 -2
  23. package/dist/infra/cipher/file-system/binary-utils.js +26 -3
  24. package/dist/infra/cipher/file-system/file-system-service.d.ts +9 -0
  25. package/dist/infra/cipher/file-system/file-system-service.js +91 -8
  26. package/dist/infra/cipher/file-system/pdf-extractor.d.ts +100 -0
  27. package/dist/infra/cipher/file-system/pdf-extractor.js +226 -0
  28. package/dist/infra/cipher/llm/context/context-manager.js +7 -9
  29. package/dist/infra/cipher/llm/internal-llm-service.d.ts +5 -1
  30. package/dist/infra/cipher/llm/internal-llm-service.js +57 -46
  31. package/dist/infra/cipher/system-prompt/contributor-schemas.d.ts +8 -8
  32. package/dist/infra/cipher/system-prompt/schemas.d.ts +5 -5
  33. package/dist/infra/cipher/tools/implementations/read-file-tool.js +24 -4
  34. package/dist/infra/connectors/connector-manager.js +2 -0
  35. package/dist/infra/connectors/hook/hook-connector.d.ts +1 -1
  36. package/dist/infra/connectors/hook/hook-connector.js +3 -3
  37. package/dist/infra/connectors/mcp/mcp-connector.d.ts +1 -1
  38. package/dist/infra/connectors/mcp/mcp-connector.js +4 -4
  39. package/dist/infra/connectors/rules/rules-connector-config.d.ts +4 -0
  40. package/dist/infra/connectors/rules/rules-connector-config.js +4 -0
  41. package/dist/infra/connectors/rules/rules-connector.d.ts +1 -1
  42. package/dist/infra/connectors/rules/rules-connector.js +4 -4
  43. package/dist/infra/connectors/shared/template-service.js +4 -0
  44. package/dist/infra/connectors/skill/index.d.ts +1 -0
  45. package/dist/infra/connectors/skill/index.js +1 -0
  46. package/dist/infra/connectors/skill/skill-connector-config.d.ts +45 -0
  47. package/dist/infra/connectors/skill/skill-connector-config.js +26 -0
  48. package/dist/infra/connectors/skill/skill-connector.d.ts +39 -0
  49. package/dist/infra/connectors/skill/skill-connector.js +160 -0
  50. package/dist/infra/connectors/skill/skill-content-loader.d.ts +18 -0
  51. package/dist/infra/connectors/skill/skill-content-loader.js +33 -0
  52. package/dist/infra/file/fs-file-service.d.ts +7 -0
  53. package/dist/infra/file/fs-file-service.js +15 -1
  54. package/dist/infra/mcp/tools/brv-curate-tool.d.ts +10 -4
  55. package/dist/infra/mcp/tools/brv-curate-tool.js +9 -4
  56. package/dist/infra/mcp/tools/task-result-waiter.js +8 -0
  57. package/dist/infra/process/agent-worker.js +30 -14
  58. package/dist/infra/process/task-queue-manager.d.ts +23 -34
  59. package/dist/infra/process/task-queue-manager.js +57 -118
  60. package/dist/infra/process/transport-handlers.js +1 -7
  61. package/dist/infra/repl/commands/connectors-command.js +1 -1
  62. package/dist/infra/repl/commands/space/switch-command.js +0 -2
  63. package/dist/infra/usecase/connectors-use-case.js +8 -2
  64. package/dist/infra/usecase/curate-use-case.js +10 -4
  65. package/dist/infra/usecase/init-use-case.js +1 -1
  66. package/dist/infra/usecase/reset-use-case.d.ts +1 -0
  67. package/dist/infra/usecase/reset-use-case.js +4 -1
  68. package/dist/infra/usecase/space-switch-use-case.d.ts +0 -10
  69. package/dist/infra/usecase/space-switch-use-case.js +7 -37
  70. package/dist/{commands → oclif/commands}/curate.d.ts +1 -1
  71. package/dist/{commands → oclif/commands}/curate.js +6 -6
  72. package/dist/{commands → oclif/commands}/hook-prompt-submit.d.ts +1 -1
  73. package/dist/{commands → oclif/commands}/hook-prompt-submit.js +3 -3
  74. package/dist/{commands → oclif/commands}/main.js +10 -10
  75. package/dist/{commands → oclif/commands}/mcp.js +2 -2
  76. package/dist/{commands → oclif/commands}/query.d.ts +1 -1
  77. package/dist/{commands → oclif/commands}/query.js +6 -6
  78. package/dist/{commands → oclif/commands}/status.d.ts +1 -1
  79. package/dist/{commands → oclif/commands}/status.js +8 -8
  80. package/dist/oclif/constants.d.ts +11 -0
  81. package/dist/oclif/constants.js +11 -0
  82. package/dist/{hooks → oclif/hooks}/init/welcome.js +4 -17
  83. package/dist/{hooks → oclif/hooks}/prerun/validate-brv-config-version.d.ts +1 -1
  84. package/dist/{hooks → oclif/hooks}/prerun/validate-brv-config-version.js +2 -2
  85. package/dist/resources/prompts/curate.yml +1 -0
  86. package/dist/resources/tools/read_file.txt +5 -2
  87. package/dist/templates/skill/SKILL.md +91 -0
  88. package/dist/templates/skill/TROUBLESHOOTING.md +50 -0
  89. package/dist/templates/skill/WORKFLOWS.md +229 -0
  90. package/dist/utils/file-validator.js +8 -4
  91. package/dist/utils/type-guards.d.ts +11 -0
  92. package/dist/utils/type-guards.js +13 -0
  93. package/oclif.manifest.json +7 -53
  94. package/package.json +12 -10
  95. package/dist/commands/watch.d.ts +0 -25
  96. package/dist/commands/watch.js +0 -175
  97. package/dist/core/interfaces/cipher/i-coding-agent-log-parser.d.ts +0 -20
  98. package/dist/core/interfaces/cipher/i-coding-agent-log-parser.js +0 -1
  99. package/dist/core/interfaces/cipher/i-coding-agent-log-watcher.d.ts +0 -31
  100. package/dist/core/interfaces/cipher/i-coding-agent-log-watcher.js +0 -1
  101. package/dist/core/interfaces/i-file-watcher-service.d.ts +0 -41
  102. package/dist/core/interfaces/i-file-watcher-service.js +0 -1
  103. package/dist/core/interfaces/parser/i-clean-parser-service.d.ts +0 -18
  104. package/dist/core/interfaces/parser/i-clean-parser-service.js +0 -1
  105. package/dist/core/interfaces/parser/i-raw-parser-service.d.ts +0 -17
  106. package/dist/core/interfaces/parser/i-raw-parser-service.js +0 -1
  107. package/dist/core/interfaces/parser/i-session-normalizer.d.ts +0 -56
  108. package/dist/core/interfaces/parser/i-session-normalizer.js +0 -1
  109. package/dist/infra/cipher/parsers/coding-agent-log-parser.d.ts +0 -24
  110. package/dist/infra/cipher/parsers/coding-agent-log-parser.js +0 -51
  111. package/dist/infra/cipher/watcher/coding-agent-log-watcher.d.ts +0 -14
  112. package/dist/infra/cipher/watcher/coding-agent-log-watcher.js +0 -55
  113. package/dist/infra/parsers/clean/clean-claude-service.d.ts +0 -111
  114. package/dist/infra/parsers/clean/clean-claude-service.js +0 -271
  115. package/dist/infra/parsers/clean/clean-codex-service.d.ts +0 -231
  116. package/dist/infra/parsers/clean/clean-codex-service.js +0 -534
  117. package/dist/infra/parsers/clean/clean-copilot-service.d.ts +0 -255
  118. package/dist/infra/parsers/clean/clean-copilot-service.js +0 -729
  119. package/dist/infra/parsers/clean/clean-cursor-service.d.ts +0 -161
  120. package/dist/infra/parsers/clean/clean-cursor-service.js +0 -432
  121. package/dist/infra/parsers/clean/clean-parser-service-factory.d.ts +0 -54
  122. package/dist/infra/parsers/clean/clean-parser-service-factory.js +0 -80
  123. package/dist/infra/parsers/clean/shared.d.ts +0 -84
  124. package/dist/infra/parsers/clean/shared.js +0 -273
  125. package/dist/infra/parsers/raw/raw-claude-service.d.ts +0 -195
  126. package/dist/infra/parsers/raw/raw-claude-service.js +0 -548
  127. package/dist/infra/parsers/raw/raw-codex-service.d.ts +0 -313
  128. package/dist/infra/parsers/raw/raw-codex-service.js +0 -782
  129. package/dist/infra/parsers/raw/raw-copilot-service.d.ts +0 -196
  130. package/dist/infra/parsers/raw/raw-copilot-service.js +0 -558
  131. package/dist/infra/parsers/raw/raw-cursor-service.d.ts +0 -316
  132. package/dist/infra/parsers/raw/raw-cursor-service.js +0 -818
  133. package/dist/infra/parsers/raw/raw-parser-service-factory.d.ts +0 -54
  134. package/dist/infra/parsers/raw/raw-parser-service-factory.js +0 -81
  135. package/dist/infra/process/constants.d.ts +0 -1
  136. package/dist/infra/process/constants.js +0 -1
  137. package/dist/infra/watcher/file-watcher-service.d.ts +0 -10
  138. package/dist/infra/watcher/file-watcher-service.js +0 -81
  139. /package/dist/{commands → oclif/commands}/main.d.ts +0 -0
  140. /package/dist/{commands → oclif/commands}/mcp.d.ts +0 -0
  141. /package/dist/{hooks → oclif/hooks}/command_not_found/handle-invalid-commands.d.ts +0 -0
  142. /package/dist/{hooks → oclif/hooks}/command_not_found/handle-invalid-commands.js +0 -0
  143. /package/dist/{hooks → oclif/hooks}/error/clean-errors.d.ts +0 -0
  144. /package/dist/{hooks → oclif/hooks}/error/clean-errors.js +0 -0
  145. /package/dist/{hooks → oclif/hooks}/init/update-notifier.d.ts +0 -0
  146. /package/dist/{hooks → oclif/hooks}/init/update-notifier.js +0 -0
  147. /package/dist/{hooks → oclif/hooks}/init/welcome.d.ts +0 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ByteRover CLI
2
2
 
3
- Command-line interface for ByteRover, featuring an interactive REPL with a modern React/Ink terminal UI for managing your project's context tree and knowledge storage. Seamlessly integrate with 18+ AI coding agents including Claude Code, Cursor, Windsurf, GitHub Copilot, Cline, and more.
3
+ Command-line interface for ByteRover, featuring an interactive REPL with a modern React/Ink terminal UI for managing your project's context tree and knowledge storage. Seamlessly integrate with 19 AI coding agents via modern skill files, MCP tools, or rules-based integration—supports Claude Code, Cursor, Windsurf, GitHub Copilot, Cline, and more.
4
4
 
5
5
  [![Version](https://img.shields.io/npm/v/byterover-cli.svg)](https://npmjs.org/package/byterover-cli)
6
6
  [![Downloads/week](https://img.shields.io/npm/dw/byterover-cli.svg)](https://npmjs.org/package/byterover-cli)
@@ -13,6 +13,7 @@ Command-line interface for ByteRover, featuring an interactive REPL with a moder
13
13
  * [Interactive REPL](#interactive-repl)
14
14
  * [Keyboard Shortcuts](#keyboard-shortcuts)
15
15
  * [What is Context Tree?](#what-is-context-tree)
16
+ * [Supported AI Agents](#supported-ai-agents)
16
17
  * [Slash Commands Reference](#slash-commands-reference)
17
18
  * [Authentication](#authentication)
18
19
  * [Configuration](#configuration)
@@ -79,6 +80,17 @@ This opens your browser to complete OAuth authentication. Your credentials are s
79
80
 
80
81
  Select a team and space from your available options, and ByteRover will set up your project's context tree.
81
82
 
83
+ ### 4. (Optional) Configure Agent Connectors
84
+
85
+ ```
86
+ /connectors
87
+ ```
88
+
89
+ ByteRover automatically configures the best connector for your installed agents:
90
+ - **Skill files** for Claude Code and Cursor (modern, discoverable)
91
+ - **MCP tools** for most other agents (universal protocol)
92
+ - Switch connector types anytime via `/connectors`
93
+
82
94
  You're now ready to use ByteRover! Try `/status` to see your project's current state.
83
95
 
84
96
  ## Interactive REPL
@@ -101,7 +113,9 @@ The terminal UI includes:
101
113
  - **Command Completion**: Type `/` to see available commands with auto-completion
102
114
  - **Activity Log**: Real-time task status and execution progress
103
115
  - **Streaming Output**: Live responses with markdown rendering (headings, lists, blockquotes, code blocks)
104
- - **File References**: Type `@` in curate mode to browse and attach files (supports PDF)
116
+ - **Reasoning Display**: View agent thinking process with streamed reasoning blocks
117
+ - **File References**: Type `@` in curate mode to browse and attach files
118
+ - **PDF Support**: Reference and extract text from PDF files using `@` (up to 100 pages)
105
119
  - **Dynamic Domains**: Automatically creates new knowledge domains as your context tree grows
106
120
  - **Session Persistence**: Sessions auto-resume after restart
107
121
  - **Expandable Views**: Press `Ctrl+O` to expand messages or logs to full-screen with vim-style navigation
@@ -140,7 +154,7 @@ The **Context Tree** is ByteRover's structured knowledge system that helps you a
140
154
  - **Organized Knowledge**: Structure your project knowledge by domain and topic
141
155
  - **Easy Retrieval**: Find relevant context quickly when you need it
142
156
  - **Persistent Memory**: Maintain project-specific knowledge across sessions
143
- - **Agent-Friendly**: Works seamlessly with 18+ AI coding agents (Claude Code, Cursor, Windsurf, GitHub Copilot, Cline, and more) via rules-based or hook-based integration
157
+ - **Agent-Friendly**: Works seamlessly with 19 AI coding agents (Claude Code, Cursor, Windsurf, GitHub Copilot, Cline, and more) via skill files, MCP tools, hooks, or rules
144
158
  - **Cloud Sync**: Push and sync your context tree to ByteRover's cloud storage for backup and team collaboration
145
159
  - **Dynamic Domains**: Automatically creates new domains as your knowledge grows
146
160
 
@@ -151,6 +165,23 @@ The context tree organizes knowledge into:
151
165
  - **Topics**: Specific subjects within domains (e.g., Authentication, Components)
152
166
  - **Context Files**: Markdown files containing your actual knowledge
153
167
 
168
+ ## Supported AI Agents
169
+
170
+ ByteRover integrates with 19 AI coding agents:
171
+
172
+ **Skill Connector (Default):**
173
+ - Claude Code, Cursor
174
+
175
+ **MCP Connector (Default):**
176
+ - Amp, Augment Code, Cline, Codex, Gemini CLI, Github Copilot, Junie, Kilo Code, Kiro, Qoder, Qwen Code, Roo Code, Trae.ai, Warp, Windsurf, Zed
177
+
178
+ **Rules Connector (Default):**
179
+ - Antigravity (rules-only integration)
180
+
181
+ **All agents support rules-based integration as a universal fallback option.**
182
+
183
+ Use `/connectors` in the REPL to view, install, or switch connector types for your agents.
184
+
154
185
  ### Integrating with Coding Agents
155
186
 
156
187
  Use `/connectors` to manage integrations with your AI coding agents:
@@ -159,10 +190,18 @@ Use `/connectors` to manage integrations with your AI coding agents:
159
190
  /connectors
160
191
  ```
161
192
 
162
- ByteRover supports three connector types:
163
- - **Hook integration** (Claude Code): Direct injection via IDE settings for seamless integration
164
- - **Rules-based** (all agents): Generates agent-specific rule files (e.g., `CLAUDE.md`, `.cursorrules`) that instruct the agent how to read from and contribute to your context tree
165
- - **MCP integration** (Model Context Protocol): Exposes `brv-query` and `brv-curate` as MCP tools that AI agents can call directly
193
+ ByteRover supports four connector types:
194
+
195
+ 1. **Skill integration** (Claude Code, Cursor - default): Modern integration that writes 3 markdown files (SKILL.md, TROUBLESHOOTING.md, WORKFLOWS.md) to your agent's skills directory for easy discovery and guidance
196
+ 2. **MCP integration** (16 agents - default): Exposes brv-query and brv-curate as Model Context Protocol tools that AI agents can call directly
197
+ 3. **Rules-based** (all agents): Generates agent-specific rule files (e.g., CLAUDE.md, .cursorrules) with instructions for using ByteRover
198
+ 4. **Hook integration** (Claude Code only - legacy): Direct injection via IDE settings, replaced by skill connector
199
+
200
+ **Defaults by agent:**
201
+ - Claude Code, Cursor: Skill connector
202
+ - Antigravity: Rules connector (only supported type)
203
+ - All others (16 agents): MCP connector
204
+ - Rules: Available for all agents as fallback
166
205
 
167
206
  ## Slash Commands Reference
168
207
 
@@ -223,9 +262,20 @@ ByteRover supports three connector types:
223
262
 
224
263
  | Command | Description |
225
264
  |---------|-------------|
226
- | `/connectors` | Manage agent connectors (rules-based or hook integration) |
265
+ | `/connectors` | Manage agent connectors (skill, hook, mcp, or rules integration) |
227
266
  | `/reset [-y] [directory]` | Reset context tree to empty state |
228
267
 
268
+ **Connector types:**
269
+ - `skill`: Modern integration with markdown skill files (SKILL.md, TROUBLESHOOTING.md, WORKFLOWS.md)
270
+ - `mcp`: Model Context Protocol tools (brv-query, brv-curate)
271
+ - `hook`: Legacy IDE settings injection (Claude Code only)
272
+ - `rules`: Agent-specific rule files (universal fallback)
273
+
274
+ **Defaults:**
275
+ - Claude Code, Cursor: `skill`
276
+ - Antigravity: `rules` (only supported type)
277
+ - All others: `mcp`
278
+
229
279
  **Reset options:**
230
280
  - `-y, --yes`: Skip confirmation prompt
231
281
 
@@ -319,6 +369,24 @@ The context tree is stored in `.brv/context-tree/`:
319
369
 
320
370
  **Note**: When you run `/push`, your context tree is uploaded to ByteRover's cloud storage for version control and team collaboration.
321
371
 
372
+ ### Agent Connector Configuration
373
+
374
+ Connector configurations are stored based on type:
375
+
376
+ **Skill connectors** (Claude Code, Cursor):
377
+ - **Project-scoped**: `.claude/skills/byterover/`, `.cursor/skills/byterover/`
378
+ - **Global-scoped** (Codex): `~/.codex/skills/byterover/`
379
+ - Files: `SKILL.md`, `TROUBLESHOOTING.md`, `WORKFLOWS.md`
380
+
381
+ **Hook connectors** (Claude Code legacy):
382
+ - `.claude/settings.local.json` (project-scoped)
383
+
384
+ **MCP connectors**:
385
+ - Managed via MCP configuration files (JSON/TOML)
386
+
387
+ **Rules connectors**:
388
+ - `CLAUDE.md`, `.cursorrules`, `.windsurfrules`, etc. (varies by agent)
389
+
322
390
  ## Troubleshooting
323
391
 
324
392
  ### Session Logs
@@ -19,11 +19,6 @@ export declare const SNAPSHOT_FILE = ".snapshot.json";
19
19
  * This is ByteRover's internal branching mechanism, not Git branches.
20
20
  */
21
21
  export declare const DEFAULT_BRANCH = "main";
22
- /**
23
- * ByteRover documentation URL.
24
- * Used in CLI help output to direct users to online documentation.
25
- */
26
- export declare const DOCS_URL = "https://docs.byterover.dev";
27
22
  export declare const TRANSPORT_HOST = "127.0.0.1";
28
23
  export declare const TRANSPORT_REQUEST_TIMEOUT_MS = 10000;
29
24
  export declare const TRANSPORT_ROOM_TIMEOUT_MS = 2000;
package/dist/constants.js CHANGED
@@ -24,11 +24,6 @@ export const SNAPSHOT_FILE = '.snapshot.json';
24
24
  * This is ByteRover's internal branching mechanism, not Git branches.
25
25
  */
26
26
  export const DEFAULT_BRANCH = 'main';
27
- /**
28
- * ByteRover documentation URL.
29
- * Used in CLI help output to direct users to online documentation.
30
- */
31
- export const DOCS_URL = 'https://docs.byterover.dev';
32
27
  // Transport layer constants (optimized for localhost real-time)
33
28
  export const TRANSPORT_HOST = '127.0.0.1'; // Use hostname for better sandbox compatibility
34
29
  export const TRANSPORT_REQUEST_TIMEOUT_MS = 10_000; // 10s - most operations complete quickly
@@ -33,11 +33,11 @@ export declare const AgentPermissionSchema: z.ZodObject<{
33
33
  */
34
34
  edit: z.ZodDefault<z.ZodEnum<["allow", "deny", "ask"]>>;
35
35
  }, "strip", z.ZodTypeAny, {
36
- edit: "allow" | "deny" | "ask";
37
36
  bash: Record<string, "allow" | "deny" | "ask">;
37
+ edit: "allow" | "deny" | "ask";
38
38
  }, {
39
- edit?: "allow" | "deny" | "ask" | undefined;
40
39
  bash?: Record<string, "allow" | "deny" | "ask"> | undefined;
40
+ edit?: "allow" | "deny" | "ask" | undefined;
41
41
  }>;
42
42
  export type AgentPermission = z.infer<typeof AgentPermissionSchema>;
43
43
  /**
@@ -115,11 +115,11 @@ export declare const AgentInfoSchema: z.ZodObject<{
115
115
  */
116
116
  edit: z.ZodDefault<z.ZodEnum<["allow", "deny", "ask"]>>;
117
117
  }, "strip", z.ZodTypeAny, {
118
- edit: "allow" | "deny" | "ask";
119
118
  bash: Record<string, "allow" | "deny" | "ask">;
119
+ edit: "allow" | "deny" | "ask";
120
120
  }, {
121
- edit?: "allow" | "deny" | "ask" | undefined;
122
121
  bash?: Record<string, "allow" | "deny" | "ask"> | undefined;
122
+ edit?: "allow" | "deny" | "ask" | undefined;
123
123
  }>>;
124
124
  /**
125
125
  * Inline system prompt for this agent.
@@ -145,44 +145,44 @@ export declare const AgentInfoSchema: z.ZodObject<{
145
145
  */
146
146
  tools: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
147
147
  }, "strip", z.ZodTypeAny, {
148
- name: string;
149
148
  hidden: boolean;
150
149
  mode: "primary" | "subagent" | "all";
150
+ name: string;
151
151
  native: boolean;
152
152
  permission: {
153
- edit: "allow" | "deny" | "ask";
154
153
  bash: Record<string, "allow" | "deny" | "ask">;
154
+ edit: "allow" | "deny" | "ask";
155
155
  };
156
156
  tools: Record<string, boolean>;
157
- prompt?: string | undefined;
157
+ color?: string | undefined;
158
+ description?: string | undefined;
158
159
  maxIterations?: number | undefined;
159
160
  model?: {
160
161
  modelId: string;
161
162
  providerId?: string | undefined;
162
163
  } | undefined;
163
- description?: string | undefined;
164
- color?: string | undefined;
165
- temperature?: number | undefined;
164
+ prompt?: string | undefined;
166
165
  promptFile?: string | undefined;
166
+ temperature?: number | undefined;
167
167
  }, {
168
- name: string;
169
168
  mode: "primary" | "subagent" | "all";
170
- prompt?: string | undefined;
169
+ name: string;
170
+ color?: string | undefined;
171
+ description?: string | undefined;
172
+ hidden?: boolean | undefined;
171
173
  maxIterations?: number | undefined;
172
174
  model?: {
173
175
  modelId: string;
174
176
  providerId?: string | undefined;
175
177
  } | undefined;
176
- description?: string | undefined;
177
- hidden?: boolean | undefined;
178
- color?: string | undefined;
179
- temperature?: number | undefined;
180
178
  native?: boolean | undefined;
181
179
  permission?: {
182
- edit?: "allow" | "deny" | "ask" | undefined;
183
180
  bash?: Record<string, "allow" | "deny" | "ask"> | undefined;
181
+ edit?: "allow" | "deny" | "ask" | undefined;
184
182
  } | undefined;
183
+ prompt?: string | undefined;
185
184
  promptFile?: string | undefined;
185
+ temperature?: number | undefined;
186
186
  tools?: Record<string, boolean> | undefined;
187
187
  }>;
188
188
  /**
@@ -210,3 +210,14 @@ export declare class TooManyResultsError extends FileSystemError {
210
210
  */
211
211
  constructor(operation: string, count: number, maxResults: number);
212
212
  }
213
+ /**
214
+ * Error thrown when PDF text extraction fails.
215
+ */
216
+ export declare class PdfExtractionError extends FileSystemError {
217
+ /**
218
+ * Creates a new PDF extraction error
219
+ * @param path - Path to the PDF file
220
+ * @param reason - Reason for the extraction failure
221
+ */
222
+ constructor(path: string, reason: string);
223
+ }
@@ -290,3 +290,20 @@ export class TooManyResultsError extends FileSystemError {
290
290
  this.name = 'TooManyResultsError';
291
291
  }
292
292
  }
293
+ /**
294
+ * Error thrown when PDF text extraction fails.
295
+ */
296
+ export class PdfExtractionError extends FileSystemError {
297
+ /**
298
+ * Creates a new PDF extraction error
299
+ * @param path - Path to the PDF file
300
+ * @param reason - Reason for the extraction failure
301
+ */
302
+ constructor(path, reason) {
303
+ super(`Failed to extract text from PDF: ${path}. ${reason}`, 'PDF_EXTRACTION_FAILED', {
304
+ path,
305
+ reason,
306
+ });
307
+ this.name = 'PdfExtractionError';
308
+ }
309
+ }
@@ -18,16 +18,46 @@ export interface FileSystemConfig {
18
18
  /** Working directory for relative path resolution */
19
19
  workingDirectory: string;
20
20
  }
21
+ /**
22
+ * PDF read mode for controlling how PDF files are returned.
23
+ * - 'text': Extract text content page by page (default)
24
+ * - 'base64': Return raw PDF as base64 attachment (for multimodal LLMs)
25
+ */
26
+ export type PdfReadMode = 'base64' | 'text';
27
+ /**
28
+ * Metadata extracted from a PDF file.
29
+ */
30
+ export interface PdfMetadata {
31
+ /** Author of the PDF (if available) */
32
+ author?: string;
33
+ /** Creation date of the PDF (if available) */
34
+ creationDate?: Date;
35
+ /** Total number of pages in the PDF */
36
+ pageCount: number;
37
+ /** Title of the PDF (if available) */
38
+ title?: string;
39
+ }
40
+ /**
41
+ * Content extracted from a single PDF page.
42
+ */
43
+ export interface PdfPageContent {
44
+ /** 1-based page number */
45
+ pageNumber: number;
46
+ /** Extracted text content from the page */
47
+ text: string;
48
+ }
21
49
  /**
22
50
  * Options for reading files.
23
51
  */
24
52
  export interface ReadFileOptions {
25
53
  /** Character encoding */
26
54
  encoding?: BufferEncoding;
27
- /** Maximum number of lines to read */
55
+ /** Maximum number of lines to read (for text files) or pages (for PDFs in text mode) */
28
56
  limit?: number;
29
- /** Starting line number (1-based, like text editors) */
57
+ /** Starting line number (1-based) for text files, or starting page number for PDFs */
30
58
  offset?: number;
59
+ /** PDF read mode: 'text' (default) extracts text, 'base64' returns raw attachment */
60
+ pdfMode?: PdfReadMode;
31
61
  }
32
62
  /**
33
63
  * Options for writing files.
@@ -126,23 +156,27 @@ export interface FileAttachment {
126
156
  * Result of a file read operation.
127
157
  */
128
158
  export interface FileContent {
129
- /** Attachment data for binary files (images, PDFs) */
159
+ /** Attachment data for binary files (images, PDFs in base64 mode) */
130
160
  attachment?: FileAttachment;
131
161
  /** File content as string */
132
162
  content: string;
133
163
  /** Character encoding used */
134
164
  encoding: string;
135
- /** Formatted content with line numbers (00001| content format) */
165
+ /** Formatted content with line numbers (00001| content format) or PDF page separators */
136
166
  formattedContent: string;
137
- /** Total number of lines in the returned content */
167
+ /** Total number of lines in the returned content (or pages for PDF text mode) */
138
168
  lines: number;
139
169
  /** Human-readable message about file status (truncation info, etc.) */
140
170
  message: string;
171
+ /** PDF metadata when reading PDF in text mode */
172
+ pdfMetadata?: PdfMetadata;
173
+ /** PDF page contents when reading PDF in text mode */
174
+ pdfPages?: PdfPageContent[];
141
175
  /** Preview of content (first 20 lines) for UI display */
142
176
  preview?: string;
143
177
  /** File size in bytes */
144
178
  size: number;
145
- /** Total lines in the entire file */
179
+ /** Total lines in the entire file (or total pages for PDF text mode) */
146
180
  totalLines: number;
147
181
  /** Whether content was truncated due to size/line limits */
148
182
  truncated: boolean;
@@ -19,16 +19,16 @@ export declare const LLMConfigBaseSchema: z.ZodObject<{
19
19
  maxIterations: number;
20
20
  model: string;
21
21
  provider: "claude" | "gemini" | "openrouter";
22
- timeout?: number | undefined;
23
22
  temperature?: number | undefined;
23
+ timeout?: number | undefined;
24
24
  maxInputTokens?: number | undefined;
25
25
  maxOutputTokens?: number | undefined;
26
26
  }, {
27
27
  model: string;
28
28
  provider: "claude" | "gemini" | "openrouter";
29
- timeout?: number | undefined;
30
29
  maxIterations?: number | undefined;
31
30
  temperature?: number | undefined;
31
+ timeout?: number | undefined;
32
32
  maxInputTokens?: number | undefined;
33
33
  maxOutputTokens?: number | undefined;
34
34
  }>;
@@ -47,32 +47,32 @@ export declare const LLMConfigSchema: z.ZodEffects<z.ZodObject<{
47
47
  maxIterations: number;
48
48
  model: string;
49
49
  provider: "claude" | "gemini" | "openrouter";
50
- timeout?: number | undefined;
51
50
  temperature?: number | undefined;
51
+ timeout?: number | undefined;
52
52
  maxInputTokens?: number | undefined;
53
53
  maxOutputTokens?: number | undefined;
54
54
  }, {
55
55
  model: string;
56
56
  provider: "claude" | "gemini" | "openrouter";
57
- timeout?: number | undefined;
58
57
  maxIterations?: number | undefined;
59
58
  temperature?: number | undefined;
59
+ timeout?: number | undefined;
60
60
  maxInputTokens?: number | undefined;
61
61
  maxOutputTokens?: number | undefined;
62
62
  }>, {
63
63
  maxIterations: number;
64
64
  model: string;
65
65
  provider: "claude" | "gemini" | "openrouter";
66
- timeout?: number | undefined;
67
66
  temperature?: number | undefined;
67
+ timeout?: number | undefined;
68
68
  maxInputTokens?: number | undefined;
69
69
  maxOutputTokens?: number | undefined;
70
70
  }, {
71
71
  model: string;
72
72
  provider: "claude" | "gemini" | "openrouter";
73
- timeout?: number | undefined;
74
73
  maxIterations?: number | undefined;
75
74
  temperature?: number | undefined;
75
+ timeout?: number | undefined;
76
76
  maxInputTokens?: number | undefined;
77
77
  maxOutputTokens?: number | undefined;
78
78
  }>;
@@ -97,37 +97,37 @@ export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
97
97
  temperature: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
98
98
  timeout: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
99
99
  }, "strip", z.ZodTypeAny, {
100
- timeout?: number | undefined;
101
100
  maxIterations?: number | undefined;
102
101
  model?: string | undefined;
103
- provider?: "claude" | "gemini" | "openrouter" | undefined;
104
102
  temperature?: number | undefined;
103
+ timeout?: number | undefined;
105
104
  maxInputTokens?: number | undefined;
106
105
  maxOutputTokens?: number | undefined;
106
+ provider?: "claude" | "gemini" | "openrouter" | undefined;
107
107
  }, {
108
- timeout?: number | undefined;
109
108
  maxIterations?: number | undefined;
110
109
  model?: string | undefined;
111
- provider?: "claude" | "gemini" | "openrouter" | undefined;
112
110
  temperature?: number | undefined;
111
+ timeout?: number | undefined;
113
112
  maxInputTokens?: number | undefined;
114
113
  maxOutputTokens?: number | undefined;
114
+ provider?: "claude" | "gemini" | "openrouter" | undefined;
115
115
  }>, {
116
- timeout?: number | undefined;
117
116
  maxIterations?: number | undefined;
118
117
  model?: string | undefined;
119
- provider?: "claude" | "gemini" | "openrouter" | undefined;
120
118
  temperature?: number | undefined;
119
+ timeout?: number | undefined;
121
120
  maxInputTokens?: number | undefined;
122
121
  maxOutputTokens?: number | undefined;
122
+ provider?: "claude" | "gemini" | "openrouter" | undefined;
123
123
  }, {
124
- timeout?: number | undefined;
125
124
  maxIterations?: number | undefined;
126
125
  model?: string | undefined;
127
- provider?: "claude" | "gemini" | "openrouter" | undefined;
128
126
  temperature?: number | undefined;
127
+ timeout?: number | undefined;
129
128
  maxInputTokens?: number | undefined;
130
129
  maxOutputTokens?: number | undefined;
130
+ provider?: "claude" | "gemini" | "openrouter" | undefined;
131
131
  }>;
132
132
  /**
133
133
  * Input type for LLM updates.
@@ -88,13 +88,13 @@ export declare const ActiveSessionPointerSchema: z.ZodObject<{
88
88
  sessionId: z.ZodString;
89
89
  }, "strip", z.ZodTypeAny, {
90
90
  sessionId: string;
91
- pid: number;
92
91
  activatedAt: string;
92
+ pid: number;
93
93
  processToken?: string | undefined;
94
94
  }, {
95
95
  sessionId: string;
96
- pid: number;
97
96
  activatedAt: string;
97
+ pid: number;
98
98
  processToken?: string | undefined;
99
99
  }>;
100
100
  /**
@@ -2,7 +2,7 @@ import type { ConnectorType } from './connector-type.js';
2
2
  /**
3
3
  * Array of all supported Agents.
4
4
  */
5
- export declare const AGENT_VALUES: readonly ["Amp", "Augment Code", "Claude Code", "Cline", "Codex", "Cursor", "Gemini CLI", "Github Copilot", "Junie", "Kilo Code", "Kiro", "Qoder", "Qwen Code", "Roo Code", "Trae.ai", "Warp", "Windsurf", "Zed"];
5
+ export declare const AGENT_VALUES: readonly ["Amp", "Antigravity", "Augment Code", "Claude Code", "Cline", "Codex", "Cursor", "Gemini CLI", "Github Copilot", "Junie", "Kilo Code", "Kiro", "Qoder", "Qwen Code", "Roo Code", "Trae.ai", "Warp", "Windsurf", "Zed"];
6
6
  export type Agent = (typeof AGENT_VALUES)[number];
7
7
  /**
8
8
  * Connector availability configuration for an agent.
@@ -3,6 +3,7 @@
3
3
  */
4
4
  export const AGENT_VALUES = [
5
5
  'Amp',
6
+ 'Antigravity',
6
7
  'Augment Code',
7
8
  'Claude Code',
8
9
  'Cline',
@@ -30,13 +31,17 @@ export const AGENT_CONNECTOR_CONFIG = {
30
31
  default: 'mcp',
31
32
  supported: ['rules', 'mcp'],
32
33
  },
34
+ Antigravity: {
35
+ default: 'rules',
36
+ supported: ['rules'],
37
+ },
33
38
  'Augment Code': {
34
39
  default: 'mcp',
35
40
  supported: ['rules', 'mcp'],
36
41
  },
37
42
  'Claude Code': {
38
- default: 'hook',
39
- supported: ['rules', 'hook', 'mcp'],
43
+ default: 'skill',
44
+ supported: ['rules', 'hook', 'mcp', 'skill'],
40
45
  },
41
46
  Cline: {
42
47
  default: 'mcp',
@@ -44,11 +49,11 @@ export const AGENT_CONNECTOR_CONFIG = {
44
49
  },
45
50
  Codex: {
46
51
  default: 'mcp',
47
- supported: ['rules', 'mcp'],
52
+ supported: ['rules', 'mcp', 'skill'],
48
53
  },
49
54
  Cursor: {
50
- default: 'mcp',
51
- supported: ['rules', 'mcp'],
55
+ default: 'skill',
56
+ supported: ['rules', 'mcp', 'skill'],
52
57
  },
53
58
  'Gemini CLI': {
54
59
  default: 'mcp',
@@ -56,7 +61,7 @@ export const AGENT_CONNECTOR_CONFIG = {
56
61
  },
57
62
  'Github Copilot': {
58
63
  default: 'mcp',
59
- supported: ['rules', 'mcp'],
64
+ supported: ['rules', 'mcp', 'skill'],
60
65
  },
61
66
  Junie: {
62
67
  default: 'mcp',
@@ -5,6 +5,7 @@
5
5
  * - 'rules': Agent reads instructions from a rule file (e.g., CLAUDE.md)
6
6
  * - 'hook': Instructions are injected on each prompt via agent hooks
7
7
  * - 'mcp': Agent uses mcp tools to interact with brv
8
+ * - 'skill': Agent reads skill files from a project subdirectory
8
9
  */
9
- export declare const CONNECTOR_TYPES: readonly ["rules", "hook", "mcp"];
10
+ export declare const CONNECTOR_TYPES: readonly ["rules", "hook", "mcp", "skill"];
10
11
  export type ConnectorType = (typeof CONNECTOR_TYPES)[number];
@@ -5,5 +5,6 @@
5
5
  * - 'rules': Agent reads instructions from a rule file (e.g., CLAUDE.md)
6
6
  * - 'hook': Instructions are injected on each prompt via agent hooks
7
7
  * - 'mcp': Agent uses mcp tools to interact with brv
8
+ * - 'skill': Agent reads skill files from a project subdirectory
8
9
  */
9
- export const CONNECTOR_TYPES = ['rules', 'hook', 'mcp'];
10
+ export const CONNECTOR_TYPES = ['rules', 'hook', 'mcp', 'skill'];