botholomew 0.9.5 → 0.9.8
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/README.md +6 -3
- package/package.json +1 -1
- package/src/chat/agent.ts +26 -2
- package/src/chat/session.ts +4 -0
- package/src/commands/context.ts +1 -0
- package/src/context/chunker.ts +40 -3
- package/src/context/ingest.ts +8 -1
- package/src/context/refresh.ts +28 -18
- package/src/db/connection.ts +2 -4
- package/src/db/context.ts +16 -3
- package/src/db/embeddings.ts +37 -2
- package/src/db/schema.ts +10 -2
- package/src/db/sql/11-rebuild_hnsw.sql +8 -9
- package/src/db/sql/13-drive-paths.sql +0 -2
- package/src/db/sql/14-drop_hnsw_index.sql +8 -0
- package/src/db/sql/15-fts_index.sql +8 -0
- package/src/db/sql/16-source_url.sql +7 -0
- package/src/db/sql/6-vss_index.sql +7 -1
- package/src/db/sql/7-drop_embeddings_fk.sql +0 -1
- package/src/skills/writer.ts +63 -0
- package/src/tools/registry.ts +15 -0
- package/src/tools/skill/edit.ts +114 -0
- package/src/tools/skill/list.ts +63 -0
- package/src/tools/skill/read.ts +72 -0
- package/src/tools/skill/search.ts +165 -0
- package/src/tools/skill/write.ts +180 -0
- package/src/tools/task/delete.ts +54 -0
- package/src/worker/prompt.ts +19 -2
package/src/worker/prompt.ts
CHANGED
|
@@ -131,9 +131,26 @@ When calling complete_task, write a summary that captures your key findings, dec
|
|
|
131
131
|
prompt += `
|
|
132
132
|
## External Tools (MCP)
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
### Local context first
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
**Before any MCP read, search local context.** Drive, Gmail, GitHub, URLs, and prior agent runs are usually already ingested — refetching is slower, costs tokens, and risks rate limits.
|
|
137
|
+
|
|
138
|
+
Workflow for any "look up / find / read" intent:
|
|
139
|
+
|
|
140
|
+
1. \`search_semantic\` (semantic) or \`context_search\` (keyword), then \`context_read\` / \`context_tree\` to drill in.
|
|
141
|
+
2. If freshness matters, call \`context_info\` and check \`indexed_at\`. To re-pull a single stale item, use \`context_refresh\` rather than going to MCP for the whole document.
|
|
142
|
+
3. Only call \`mcp_exec\` for reads when the data is genuinely missing locally **or** must be real-time (e.g., "what's on my calendar right now").
|
|
143
|
+
|
|
144
|
+
Writes always go through MCP — sending an email, creating an issue, posting to Slack. Don't search context first for those.
|
|
145
|
+
|
|
146
|
+
Examples:
|
|
147
|
+
- "What does doc X say?" → \`search_semantic\` first.
|
|
148
|
+
- "Any new emails from Y?" → check the \`gmail\` drive first; only hit Gmail MCP if the freshest indexed item is too old for the question.
|
|
149
|
+
- "Send an email to Y" → MCP write directly; no context lookup.
|
|
150
|
+
|
|
151
|
+
### Calling MCP tools
|
|
152
|
+
|
|
153
|
+
Before calling any MCP tool you haven't used yet this session, you MUST fetch its schema first:
|
|
137
154
|
|
|
138
155
|
1. Discover tools with \`mcp_search\` (preferred — semantic) or \`mcp_list_tools\`.
|
|
139
156
|
2. Call \`mcp_info\` with the exact \`server\` and \`tool\` to read the tool's input schema, required fields, and types.
|