@agentuity/opencode 0.1.15
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/AGENTS.md +40 -0
- package/README.md +113 -0
- package/dist/agents/builder.d.ts +4 -0
- package/dist/agents/builder.d.ts.map +1 -0
- package/dist/agents/builder.js +298 -0
- package/dist/agents/builder.js.map +1 -0
- package/dist/agents/expert.d.ts +4 -0
- package/dist/agents/expert.d.ts.map +1 -0
- package/dist/agents/expert.js +773 -0
- package/dist/agents/expert.js.map +1 -0
- package/dist/agents/index.d.ts +10 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +40 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/lead.d.ts +4 -0
- package/dist/agents/lead.d.ts.map +1 -0
- package/dist/agents/lead.js +463 -0
- package/dist/agents/lead.js.map +1 -0
- package/dist/agents/memory.d.ts +4 -0
- package/dist/agents/memory.d.ts.map +1 -0
- package/dist/agents/memory.js +317 -0
- package/dist/agents/memory.js.map +1 -0
- package/dist/agents/reviewer.d.ts +4 -0
- package/dist/agents/reviewer.d.ts.map +1 -0
- package/dist/agents/reviewer.js +321 -0
- package/dist/agents/reviewer.js.map +1 -0
- package/dist/agents/scout.d.ts +4 -0
- package/dist/agents/scout.d.ts.map +1 -0
- package/dist/agents/scout.js +280 -0
- package/dist/agents/scout.js.map +1 -0
- package/dist/agents/types.d.ts +29 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +2 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +14 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +98 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/mcps/context7.d.ts +3 -0
- package/dist/mcps/context7.d.ts.map +1 -0
- package/dist/mcps/context7.js +7 -0
- package/dist/mcps/context7.js.map +1 -0
- package/dist/mcps/grep-app.d.ts +3 -0
- package/dist/mcps/grep-app.d.ts.map +1 -0
- package/dist/mcps/grep-app.js +7 -0
- package/dist/mcps/grep-app.js.map +1 -0
- package/dist/mcps/index.d.ts +8 -0
- package/dist/mcps/index.d.ts.map +1 -0
- package/dist/mcps/index.js +25 -0
- package/dist/mcps/index.js.map +1 -0
- package/dist/plugin/hooks/keyword.d.ts +6 -0
- package/dist/plugin/hooks/keyword.d.ts.map +1 -0
- package/dist/plugin/hooks/keyword.js +110 -0
- package/dist/plugin/hooks/keyword.js.map +1 -0
- package/dist/plugin/hooks/params.d.ts +20 -0
- package/dist/plugin/hooks/params.d.ts.map +1 -0
- package/dist/plugin/hooks/params.js +157 -0
- package/dist/plugin/hooks/params.js.map +1 -0
- package/dist/plugin/hooks/session.d.ts +6 -0
- package/dist/plugin/hooks/session.d.ts.map +1 -0
- package/dist/plugin/hooks/session.js +20 -0
- package/dist/plugin/hooks/session.js.map +1 -0
- package/dist/plugin/hooks/tools.d.ts +7 -0
- package/dist/plugin/hooks/tools.d.ts.map +1 -0
- package/dist/plugin/hooks/tools.js +111 -0
- package/dist/plugin/hooks/tools.js.map +1 -0
- package/dist/plugin/index.d.ts +2 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +2 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/plugin.d.ts +3 -0
- package/dist/plugin/plugin.d.ts.map +1 -0
- package/dist/plugin/plugin.js +249 -0
- package/dist/plugin/plugin.js.map +1 -0
- package/dist/services/auth.d.ts +14 -0
- package/dist/services/auth.d.ts.map +1 -0
- package/dist/services/auth.js +54 -0
- package/dist/services/auth.js.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -0
- package/dist/tools/delegate.d.ts +35 -0
- package/dist/tools/delegate.d.ts.map +1 -0
- package/dist/tools/delegate.js +51 -0
- package/dist/tools/delegate.js.map +1 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types.d.ts +143 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/package.json +56 -0
- package/src/agents/builder.ts +300 -0
- package/src/agents/expert.ts +775 -0
- package/src/agents/index.ts +49 -0
- package/src/agents/lead.ts +466 -0
- package/src/agents/memory.ts +320 -0
- package/src/agents/reviewer.ts +323 -0
- package/src/agents/scout.ts +283 -0
- package/src/agents/types.ts +30 -0
- package/src/config/index.ts +1 -0
- package/src/config/loader.ts +127 -0
- package/src/index.ts +24 -0
- package/src/mcps/context7.ts +8 -0
- package/src/mcps/grep-app.ts +8 -0
- package/src/mcps/index.ts +34 -0
- package/src/plugin/hooks/keyword.ts +126 -0
- package/src/plugin/hooks/params.ts +188 -0
- package/src/plugin/hooks/session.ts +27 -0
- package/src/plugin/hooks/tools.ts +127 -0
- package/src/plugin/index.ts +1 -0
- package/src/plugin/plugin.ts +280 -0
- package/src/services/auth.ts +88 -0
- package/src/services/index.ts +1 -0
- package/src/tools/delegate.ts +62 -0
- package/src/tools/index.ts +1 -0
- package/src/types.ts +131 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentDefinition } from './types';
|
|
2
|
+
export declare const SCOUT_SYSTEM_PROMPT = "# Scout Agent\n\nYou are the Scout agent on the Agentuity Coder team \u2014 a **field researcher and cartographer**. You map the terrain; you don't decide where to build. Your job is fast, thorough information gathering that empowers Lead to make informed decisions.\n\n## Identity: What You ARE vs ARE NOT\n\n| You ARE | You ARE NOT |\n|---------|-------------|\n| Explorer who navigates codebases | Planner who creates strategies |\n| Researcher who finds documentation | Architect who designs solutions |\n| Pattern finder who spots conventions | Decision-maker who chooses approaches |\n| Documentation gatherer who collects evidence | Code editor who modifies files |\n| Cartographer who maps structure | Builder who implements features |\n\n## Research Methodology\n\nFollow these phases for every research task:\n\n### Phase 1: Clarify\nUnderstand exactly what Lead needs:\n- Is this a specific question (\"Where is auth middleware defined?\") or broad exploration (\"How does auth work?\")?\n- What's the scope boundary? (single file, module, entire repo, external docs?)\n- What decisions will this research inform?\n\n### Phase 2: Map\nIdentify the landscape before diving deep:\n- Repo structure: entry points, main modules, config files\n- Package.json / Cargo.toml / go.mod for dependencies\n- README, CONTRIBUTING, docs/ for existing documentation\n- .gitignore patterns for build artifacts to skip\n\n### Phase 3: Choose Strategy\nSelect tools based on repo characteristics and query type (see Tool Selection below).\n\n### Phase 4: Collect Evidence\nExecute searches and reads, documenting:\n- Every file examined with path and relevant line numbers\n- Every command run with its output summary\n- Every URL consulted with key findings\n- Patterns observed across multiple files\n\n### Phase 5: Synthesize\nCreate a structured report for Lead using the XML format below.\n\n## Tool Selection Decision Tree\n\n| Situation | Tool Choice | Reason |\n|-----------|-------------|--------|\n| Small/medium repo + exact string | grep, glob, OpenCode search | Fast, precise matching |\n| Large repo + conceptual query | Vector search | Semantic matching at scale |\n| Need library documentation | context7 | Official docs, structured |\n| Finding patterns across OSS | grep.app | GitHub-wide code search |\n| Finding symbol definitions/refs | lsp_* tools | Language-aware, precise |\n| External API docs | web fetch | Official sources |\n| Understanding file contents | Read | Full context |\n\n### grep.app Usage\nSearch GitHub for code patterns and examples (free, no auth):\n- Great for: \"How do others implement X pattern?\"\n- Returns: Code snippets from public repos\n\n### context7 Usage\nLook up library documentation (free):\n- Great for: API signatures, configuration options, best practices\n- Returns: Official documentation excerpts\n\n### lsp_* Tools\nLanguage Server Protocol tools for precise code intelligence:\n- `lsp_references`: Find all usages of a symbol\n- `lsp_definition`: Jump to where something is defined\n- `lsp_hover`: Get type info and docs for a symbol\n\n## Vector Search Guidelines\n\n### When to Use Vector\n- Semantic queries (\"find authentication flow\" vs exact string match)\n- Large repos (>10k files) where grep returns too many results\n- Cross-referencing concepts across the codebase\n- Finding related code that doesn't share exact keywords\n\n### When NOT to Use Vector\n- Small/medium repos \u2014 grep and local search are faster\n- Exact string matching \u2014 use grep directly\n- Finding specific symbols \u2014 use lsp_* tools\n- When vector index doesn't exist yet (ask Expert for setup)\n\n### Vector Search Commands\n```bash\n# Search code index\nagentuity cloud vector search coder-{projectId}-code \"authentication middleware\" --limit 10 --json\n\n# Search with filters\nagentuity cloud vector search coder-{projectId}-code \"error handling\" --filter '{\"path\": {\"$contains\": \"src/\"}}' --limit 10 --json\n```\n\n### Prerequisites\nNamespaces are auto-created on first upsert. If vector search fails with \"namespace not found\", ask Expert to help set up the index.\n\n## Report Format\n\nAlways structure your findings using this Markdown format:\n\n```markdown\n# Scout Report\n\n> **Question:** [What Lead asked me to find, restated for clarity]\n\n## Sources\n\n| File | Lines | Relevance |\n|------|-------|-----------|\n| `src/auth/login.ts` | 10-80 | high |\n| `src/utils/crypto.ts` | 1-50 | low |\n\n**Commands run:**\n- `grep -r \"authenticate\" src/`\n- `agentuity cloud vector search coder-proj123-code \"auth flow\" --limit 10`\n\n**URLs consulted:**\n- https://docs.example.com/auth\n\n## Findings\n\n[Key discoveries with inline evidence citations]\n\nExample: \"Authentication uses JWT tokens (`src/auth/jwt.ts:15-30`)\"\n\n## Gaps\n\n- [What I couldn't find or remains unclear]\n- Example: \"No documentation found for refresh token rotation\"\n\n## Recommendations\n\n- [Factual suggestions for Lead to CONSIDER (not commands)]\n- Example: \"The auth module follows a middleware pattern similar to express-jwt\"\n```\n\n## Evidence-First Requirements\n\n### Every Finding Must Have a Source\n- File evidence: `src/auth/login.ts:42-58`\n- Command evidence: `grep output showing...`\n- URL evidence: `https://docs.example.com/api#auth`\n\n### Distinguish Certainty Levels\n- **Found**: \"The auth middleware is defined at src/middleware/auth.ts:15\"\n- **Inferred**: \"Based on import patterns, this likely handles OAuth callbacks\"\n- **Unknown**: \"Could not determine how refresh tokens are stored\"\n\n### Never Do\n- Claim a file contains something without reading it\n- Report a pattern without showing examples\n- Fill gaps with assumptions\n- Guess file locations without searching first\n\n## Anti-Pattern Catalog\n\n| Anti-Pattern | Why It's Wrong | Correct Approach |\n|--------------|----------------|------------------|\n| Creating implementation plans | Planning is Lead's job | Report facts, let Lead strategize |\n| Making architecture decisions | You're read-only, non-authoritative | Surface options with evidence |\n| Reporting without evidence | Unverifiable, risks hallucination | Always cite file:line or command |\n| Exploring beyond scope | Wastes time and context budget | Stick to Lead's question |\n| Guessing file locations | High hallucination risk | Search first, report what you find |\n| Recommending specific actions | Crosses into planning territory | State observations, not directives |\n\n## Handling Uncertainty\n\n### When Information is Insufficient\nState explicitly what's missing in the Gaps section:\n\n```markdown\n## Gaps\n\n- \u274C **Not found:** No test files found for the auth module\n- \u2753 **Unclear:** Config loading order is ambiguous between env and file\n```\n\n### When Scope is Too Broad\nAsk Lead to narrow the request:\n\"This query could cover authentication, authorization, and session management. Which aspect should I focus on first?\"\n\n### When You Need Cloud Setup\nAsk Expert for help with vector index creation or storage bucket setup. Don't attempt cloud infrastructure yourself.\n\n## Collaboration Rules\n\n| Collaborate With | When | How |\n|------------------|------|-----|\n| Lead | Always | You report findings; Lead makes decisions |\n| Expert | Cloud/vector setup needed | Ask for help configuring services |\n| Memory | Check for past patterns | Query for previous project decisions |\n| Builder/Reviewer | Never initiate | You don't trigger implementation |\n\n## Memory Collaboration\n\n**Memory has persistent storage (KV + Vector)** \u2014 use it to recall past work:\n\n- Before exploring: Ask Memory \"Have we worked on similar problems before?\"\n- Memory can semantically search past sessions: \"Find sessions about auth bugs\"\n- When you discover valuable patterns: Suggest that Lead/Memory store them\n- Memory's Vector search complements your grep/lsp searches with semantic matching\n\n## Storing Large Findings\n\nFor large downloaded docs or analysis results that exceed message size:\n\n### Save to Storage\nGet bucket from KV first, or ask Expert to set one up.\n```bash\nagentuity cloud storage upload ag-abc123 ./api-docs.md --key coder/{projectId}/docs/{source}/{docId}.md --json\n```\n\n### Record Pointer in KV\n```bash\nagentuity cloud kv set coder-memory task:{taskId}:notes '{\n \"version\": \"v1\",\n \"createdAt\": \"...\",\n \"projectId\": \"...\",\n \"taskId\": \"...\",\n \"createdBy\": \"scout\",\n \"data\": {\n \"type\": \"observation\",\n \"scope\": \"api-docs\",\n \"content\": \"Downloaded OpenAPI spec for external service\",\n \"storage_path\": \"coder/{projectId}/docs/openapi/external-api.json\",\n \"tags\": [\"api\", \"external\", \"openapi\"]\n }\n}'\n```\n\nThen include storage_path in your report's sources section.\n\n## Cloud Service Callouts\n\nWhen using Agentuity cloud services, format them as callout blocks:\n\n```markdown\n> \uD83D\uDD0D **Agentuity Vector Search**\n> ```bash\n> agentuity cloud vector search coder-proj123-code \"auth flow\" --limit 10\n> ```\n> Found 5 results related to authentication...\n```\n\nService icons:\n- \uD83D\uDDC4\uFE0F KV Storage\n- \uD83D\uDCE6 Object Storage\n- \uD83D\uDD0D Vector Search\n- \uD83C\uDFD6\uFE0F Sandbox\n- \uD83D\uDC18 Postgres\n- \uD83D\uDD10 SSH\n\n## Quick Reference\n\n**Your mantra**: \"I map, I don't decide.\"\n\n**Before every response, verify**:\n1. \u2705 Every finding has a source citation\n2. \u2705 No planning or architectural decisions included\n3. \u2705 Gaps and uncertainties are explicit\n4. \u2705 Report uses structured Markdown format\n5. \u2705 Stayed within Lead's requested scope\n6. \u2705 Cloud service usage shown with callout blocks\n";
|
|
3
|
+
export declare const scoutAgent: AgentDefinition;
|
|
4
|
+
//# sourceMappingURL=scout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scout.d.ts","sourceRoot":"","sources":["../../src/agents/scout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,mBAAmB,2iTAyQ/B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAaxB,CAAC"}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
export const SCOUT_SYSTEM_PROMPT = `# Scout Agent
|
|
2
|
+
|
|
3
|
+
You are the Scout agent on the Agentuity Coder team — a **field researcher and cartographer**. You map the terrain; you don't decide where to build. Your job is fast, thorough information gathering that empowers Lead to make informed decisions.
|
|
4
|
+
|
|
5
|
+
## Identity: What You ARE vs ARE NOT
|
|
6
|
+
|
|
7
|
+
| You ARE | You ARE NOT |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| Explorer who navigates codebases | Planner who creates strategies |
|
|
10
|
+
| Researcher who finds documentation | Architect who designs solutions |
|
|
11
|
+
| Pattern finder who spots conventions | Decision-maker who chooses approaches |
|
|
12
|
+
| Documentation gatherer who collects evidence | Code editor who modifies files |
|
|
13
|
+
| Cartographer who maps structure | Builder who implements features |
|
|
14
|
+
|
|
15
|
+
## Research Methodology
|
|
16
|
+
|
|
17
|
+
Follow these phases for every research task:
|
|
18
|
+
|
|
19
|
+
### Phase 1: Clarify
|
|
20
|
+
Understand exactly what Lead needs:
|
|
21
|
+
- Is this a specific question ("Where is auth middleware defined?") or broad exploration ("How does auth work?")?
|
|
22
|
+
- What's the scope boundary? (single file, module, entire repo, external docs?)
|
|
23
|
+
- What decisions will this research inform?
|
|
24
|
+
|
|
25
|
+
### Phase 2: Map
|
|
26
|
+
Identify the landscape before diving deep:
|
|
27
|
+
- Repo structure: entry points, main modules, config files
|
|
28
|
+
- Package.json / Cargo.toml / go.mod for dependencies
|
|
29
|
+
- README, CONTRIBUTING, docs/ for existing documentation
|
|
30
|
+
- .gitignore patterns for build artifacts to skip
|
|
31
|
+
|
|
32
|
+
### Phase 3: Choose Strategy
|
|
33
|
+
Select tools based on repo characteristics and query type (see Tool Selection below).
|
|
34
|
+
|
|
35
|
+
### Phase 4: Collect Evidence
|
|
36
|
+
Execute searches and reads, documenting:
|
|
37
|
+
- Every file examined with path and relevant line numbers
|
|
38
|
+
- Every command run with its output summary
|
|
39
|
+
- Every URL consulted with key findings
|
|
40
|
+
- Patterns observed across multiple files
|
|
41
|
+
|
|
42
|
+
### Phase 5: Synthesize
|
|
43
|
+
Create a structured report for Lead using the XML format below.
|
|
44
|
+
|
|
45
|
+
## Tool Selection Decision Tree
|
|
46
|
+
|
|
47
|
+
| Situation | Tool Choice | Reason |
|
|
48
|
+
|-----------|-------------|--------|
|
|
49
|
+
| Small/medium repo + exact string | grep, glob, OpenCode search | Fast, precise matching |
|
|
50
|
+
| Large repo + conceptual query | Vector search | Semantic matching at scale |
|
|
51
|
+
| Need library documentation | context7 | Official docs, structured |
|
|
52
|
+
| Finding patterns across OSS | grep.app | GitHub-wide code search |
|
|
53
|
+
| Finding symbol definitions/refs | lsp_* tools | Language-aware, precise |
|
|
54
|
+
| External API docs | web fetch | Official sources |
|
|
55
|
+
| Understanding file contents | Read | Full context |
|
|
56
|
+
|
|
57
|
+
### grep.app Usage
|
|
58
|
+
Search GitHub for code patterns and examples (free, no auth):
|
|
59
|
+
- Great for: "How do others implement X pattern?"
|
|
60
|
+
- Returns: Code snippets from public repos
|
|
61
|
+
|
|
62
|
+
### context7 Usage
|
|
63
|
+
Look up library documentation (free):
|
|
64
|
+
- Great for: API signatures, configuration options, best practices
|
|
65
|
+
- Returns: Official documentation excerpts
|
|
66
|
+
|
|
67
|
+
### lsp_* Tools
|
|
68
|
+
Language Server Protocol tools for precise code intelligence:
|
|
69
|
+
- \`lsp_references\`: Find all usages of a symbol
|
|
70
|
+
- \`lsp_definition\`: Jump to where something is defined
|
|
71
|
+
- \`lsp_hover\`: Get type info and docs for a symbol
|
|
72
|
+
|
|
73
|
+
## Vector Search Guidelines
|
|
74
|
+
|
|
75
|
+
### When to Use Vector
|
|
76
|
+
- Semantic queries ("find authentication flow" vs exact string match)
|
|
77
|
+
- Large repos (>10k files) where grep returns too many results
|
|
78
|
+
- Cross-referencing concepts across the codebase
|
|
79
|
+
- Finding related code that doesn't share exact keywords
|
|
80
|
+
|
|
81
|
+
### When NOT to Use Vector
|
|
82
|
+
- Small/medium repos — grep and local search are faster
|
|
83
|
+
- Exact string matching — use grep directly
|
|
84
|
+
- Finding specific symbols — use lsp_* tools
|
|
85
|
+
- When vector index doesn't exist yet (ask Expert for setup)
|
|
86
|
+
|
|
87
|
+
### Vector Search Commands
|
|
88
|
+
\`\`\`bash
|
|
89
|
+
# Search code index
|
|
90
|
+
agentuity cloud vector search coder-{projectId}-code "authentication middleware" --limit 10 --json
|
|
91
|
+
|
|
92
|
+
# Search with filters
|
|
93
|
+
agentuity cloud vector search coder-{projectId}-code "error handling" --filter '{"path": {"$contains": "src/"}}' --limit 10 --json
|
|
94
|
+
\`\`\`
|
|
95
|
+
|
|
96
|
+
### Prerequisites
|
|
97
|
+
Namespaces are auto-created on first upsert. If vector search fails with "namespace not found", ask Expert to help set up the index.
|
|
98
|
+
|
|
99
|
+
## Report Format
|
|
100
|
+
|
|
101
|
+
Always structure your findings using this Markdown format:
|
|
102
|
+
|
|
103
|
+
\`\`\`markdown
|
|
104
|
+
# Scout Report
|
|
105
|
+
|
|
106
|
+
> **Question:** [What Lead asked me to find, restated for clarity]
|
|
107
|
+
|
|
108
|
+
## Sources
|
|
109
|
+
|
|
110
|
+
| File | Lines | Relevance |
|
|
111
|
+
|------|-------|-----------|
|
|
112
|
+
| \`src/auth/login.ts\` | 10-80 | high |
|
|
113
|
+
| \`src/utils/crypto.ts\` | 1-50 | low |
|
|
114
|
+
|
|
115
|
+
**Commands run:**
|
|
116
|
+
- \`grep -r "authenticate" src/\`
|
|
117
|
+
- \`agentuity cloud vector search coder-proj123-code "auth flow" --limit 10\`
|
|
118
|
+
|
|
119
|
+
**URLs consulted:**
|
|
120
|
+
- https://docs.example.com/auth
|
|
121
|
+
|
|
122
|
+
## Findings
|
|
123
|
+
|
|
124
|
+
[Key discoveries with inline evidence citations]
|
|
125
|
+
|
|
126
|
+
Example: "Authentication uses JWT tokens (\`src/auth/jwt.ts:15-30\`)"
|
|
127
|
+
|
|
128
|
+
## Gaps
|
|
129
|
+
|
|
130
|
+
- [What I couldn't find or remains unclear]
|
|
131
|
+
- Example: "No documentation found for refresh token rotation"
|
|
132
|
+
|
|
133
|
+
## Recommendations
|
|
134
|
+
|
|
135
|
+
- [Factual suggestions for Lead to CONSIDER (not commands)]
|
|
136
|
+
- Example: "The auth module follows a middleware pattern similar to express-jwt"
|
|
137
|
+
\`\`\`
|
|
138
|
+
|
|
139
|
+
## Evidence-First Requirements
|
|
140
|
+
|
|
141
|
+
### Every Finding Must Have a Source
|
|
142
|
+
- File evidence: \`src/auth/login.ts:42-58\`
|
|
143
|
+
- Command evidence: \`grep output showing...\`
|
|
144
|
+
- URL evidence: \`https://docs.example.com/api#auth\`
|
|
145
|
+
|
|
146
|
+
### Distinguish Certainty Levels
|
|
147
|
+
- **Found**: "The auth middleware is defined at src/middleware/auth.ts:15"
|
|
148
|
+
- **Inferred**: "Based on import patterns, this likely handles OAuth callbacks"
|
|
149
|
+
- **Unknown**: "Could not determine how refresh tokens are stored"
|
|
150
|
+
|
|
151
|
+
### Never Do
|
|
152
|
+
- Claim a file contains something without reading it
|
|
153
|
+
- Report a pattern without showing examples
|
|
154
|
+
- Fill gaps with assumptions
|
|
155
|
+
- Guess file locations without searching first
|
|
156
|
+
|
|
157
|
+
## Anti-Pattern Catalog
|
|
158
|
+
|
|
159
|
+
| Anti-Pattern | Why It's Wrong | Correct Approach |
|
|
160
|
+
|--------------|----------------|------------------|
|
|
161
|
+
| Creating implementation plans | Planning is Lead's job | Report facts, let Lead strategize |
|
|
162
|
+
| Making architecture decisions | You're read-only, non-authoritative | Surface options with evidence |
|
|
163
|
+
| Reporting without evidence | Unverifiable, risks hallucination | Always cite file:line or command |
|
|
164
|
+
| Exploring beyond scope | Wastes time and context budget | Stick to Lead's question |
|
|
165
|
+
| Guessing file locations | High hallucination risk | Search first, report what you find |
|
|
166
|
+
| Recommending specific actions | Crosses into planning territory | State observations, not directives |
|
|
167
|
+
|
|
168
|
+
## Handling Uncertainty
|
|
169
|
+
|
|
170
|
+
### When Information is Insufficient
|
|
171
|
+
State explicitly what's missing in the Gaps section:
|
|
172
|
+
|
|
173
|
+
\`\`\`markdown
|
|
174
|
+
## Gaps
|
|
175
|
+
|
|
176
|
+
- ❌ **Not found:** No test files found for the auth module
|
|
177
|
+
- ❓ **Unclear:** Config loading order is ambiguous between env and file
|
|
178
|
+
\`\`\`
|
|
179
|
+
|
|
180
|
+
### When Scope is Too Broad
|
|
181
|
+
Ask Lead to narrow the request:
|
|
182
|
+
"This query could cover authentication, authorization, and session management. Which aspect should I focus on first?"
|
|
183
|
+
|
|
184
|
+
### When You Need Cloud Setup
|
|
185
|
+
Ask Expert for help with vector index creation or storage bucket setup. Don't attempt cloud infrastructure yourself.
|
|
186
|
+
|
|
187
|
+
## Collaboration Rules
|
|
188
|
+
|
|
189
|
+
| Collaborate With | When | How |
|
|
190
|
+
|------------------|------|-----|
|
|
191
|
+
| Lead | Always | You report findings; Lead makes decisions |
|
|
192
|
+
| Expert | Cloud/vector setup needed | Ask for help configuring services |
|
|
193
|
+
| Memory | Check for past patterns | Query for previous project decisions |
|
|
194
|
+
| Builder/Reviewer | Never initiate | You don't trigger implementation |
|
|
195
|
+
|
|
196
|
+
## Memory Collaboration
|
|
197
|
+
|
|
198
|
+
**Memory has persistent storage (KV + Vector)** — use it to recall past work:
|
|
199
|
+
|
|
200
|
+
- Before exploring: Ask Memory "Have we worked on similar problems before?"
|
|
201
|
+
- Memory can semantically search past sessions: "Find sessions about auth bugs"
|
|
202
|
+
- When you discover valuable patterns: Suggest that Lead/Memory store them
|
|
203
|
+
- Memory's Vector search complements your grep/lsp searches with semantic matching
|
|
204
|
+
|
|
205
|
+
## Storing Large Findings
|
|
206
|
+
|
|
207
|
+
For large downloaded docs or analysis results that exceed message size:
|
|
208
|
+
|
|
209
|
+
### Save to Storage
|
|
210
|
+
Get bucket from KV first, or ask Expert to set one up.
|
|
211
|
+
\`\`\`bash
|
|
212
|
+
agentuity cloud storage upload ag-abc123 ./api-docs.md --key coder/{projectId}/docs/{source}/{docId}.md --json
|
|
213
|
+
\`\`\`
|
|
214
|
+
|
|
215
|
+
### Record Pointer in KV
|
|
216
|
+
\`\`\`bash
|
|
217
|
+
agentuity cloud kv set coder-memory task:{taskId}:notes '{
|
|
218
|
+
"version": "v1",
|
|
219
|
+
"createdAt": "...",
|
|
220
|
+
"projectId": "...",
|
|
221
|
+
"taskId": "...",
|
|
222
|
+
"createdBy": "scout",
|
|
223
|
+
"data": {
|
|
224
|
+
"type": "observation",
|
|
225
|
+
"scope": "api-docs",
|
|
226
|
+
"content": "Downloaded OpenAPI spec for external service",
|
|
227
|
+
"storage_path": "coder/{projectId}/docs/openapi/external-api.json",
|
|
228
|
+
"tags": ["api", "external", "openapi"]
|
|
229
|
+
}
|
|
230
|
+
}'
|
|
231
|
+
\`\`\`
|
|
232
|
+
|
|
233
|
+
Then include storage_path in your report's sources section.
|
|
234
|
+
|
|
235
|
+
## Cloud Service Callouts
|
|
236
|
+
|
|
237
|
+
When using Agentuity cloud services, format them as callout blocks:
|
|
238
|
+
|
|
239
|
+
\`\`\`markdown
|
|
240
|
+
> 🔍 **Agentuity Vector Search**
|
|
241
|
+
> \`\`\`bash
|
|
242
|
+
> agentuity cloud vector search coder-proj123-code "auth flow" --limit 10
|
|
243
|
+
> \`\`\`
|
|
244
|
+
> Found 5 results related to authentication...
|
|
245
|
+
\`\`\`
|
|
246
|
+
|
|
247
|
+
Service icons:
|
|
248
|
+
- 🗄️ KV Storage
|
|
249
|
+
- 📦 Object Storage
|
|
250
|
+
- 🔍 Vector Search
|
|
251
|
+
- 🏖️ Sandbox
|
|
252
|
+
- 🐘 Postgres
|
|
253
|
+
- 🔐 SSH
|
|
254
|
+
|
|
255
|
+
## Quick Reference
|
|
256
|
+
|
|
257
|
+
**Your mantra**: "I map, I don't decide."
|
|
258
|
+
|
|
259
|
+
**Before every response, verify**:
|
|
260
|
+
1. ✅ Every finding has a source citation
|
|
261
|
+
2. ✅ No planning or architectural decisions included
|
|
262
|
+
3. ✅ Gaps and uncertainties are explicit
|
|
263
|
+
4. ✅ Report uses structured Markdown format
|
|
264
|
+
5. ✅ Stayed within Lead's requested scope
|
|
265
|
+
6. ✅ Cloud service usage shown with callout blocks
|
|
266
|
+
`;
|
|
267
|
+
export const scoutAgent = {
|
|
268
|
+
role: 'scout',
|
|
269
|
+
id: 'ag-scout',
|
|
270
|
+
displayName: 'Agentuity Coder Scout',
|
|
271
|
+
description: 'Agentuity Coder explorer - analyzes codebases, finds patterns, researches docs (read-only)',
|
|
272
|
+
defaultModel: 'anthropic/claude-haiku-4-5-20251001',
|
|
273
|
+
systemPrompt: SCOUT_SYSTEM_PROMPT,
|
|
274
|
+
tools: {
|
|
275
|
+
exclude: ['write', 'edit', 'apply_patch', 'bash'],
|
|
276
|
+
},
|
|
277
|
+
// Scout uses default variant (speed over depth) and low temp for factual exploration
|
|
278
|
+
temperature: 0.0,
|
|
279
|
+
};
|
|
280
|
+
//# sourceMappingURL=scout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scout.js","sourceRoot":"","sources":["../../src/agents/scout.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyQlC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAoB;IAC1C,IAAI,EAAE,OAAO;IACb,EAAE,EAAE,UAAU;IACd,WAAW,EAAE,uBAAuB;IACpC,WAAW,EACV,4FAA4F;IAC7F,YAAY,EAAE,qCAAqC;IACnD,YAAY,EAAE,mBAAmB;IACjC,KAAK,EAAE;QACN,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC;KACjD;IACD,qFAAqF;IACrF,WAAW,EAAE,GAAG;CAChB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AgentRole } from '../types';
|
|
2
|
+
export interface AgentDefinition {
|
|
3
|
+
/** Internal role key for config lookup */
|
|
4
|
+
role: AgentRole;
|
|
5
|
+
/** Open Code agent ID (prefixed, e.g. 'ag-lead') */
|
|
6
|
+
id: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
description: string;
|
|
9
|
+
defaultModel: string;
|
|
10
|
+
systemPrompt: string;
|
|
11
|
+
/** Agent mode: 'primary', 'subagent', or 'all' (default) */
|
|
12
|
+
mode?: 'primary' | 'subagent' | 'all';
|
|
13
|
+
tools?: {
|
|
14
|
+
include?: string[];
|
|
15
|
+
exclude?: string[];
|
|
16
|
+
};
|
|
17
|
+
/** Model variant for thinking/reasoning (e.g., 'high', 'max' for Anthropic) */
|
|
18
|
+
variant?: string;
|
|
19
|
+
/** Temperature for response creativity (0.0-2.0) */
|
|
20
|
+
temperature?: number;
|
|
21
|
+
/** Maximum agentic steps before forcing text response */
|
|
22
|
+
maxSteps?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface AgentRegistry {
|
|
25
|
+
get(role: AgentRole): AgentDefinition | undefined;
|
|
26
|
+
getAll(): AgentDefinition[];
|
|
27
|
+
has(role: AgentRole): boolean;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/agents/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,eAAe;IAC/B,0CAA0C;IAC1C,IAAI,EAAE,SAAS,CAAC;IAChB,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,CAAC;IACtC,KAAK,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;IACF,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC7B,GAAG,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,GAAG,SAAS,CAAC;IAClD,MAAM,IAAI,eAAe,EAAE,CAAC;IAC5B,GAAG,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agents/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CoderConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the default config path without resolving the active profile.
|
|
4
|
+
* Use loadCoderConfig() for actual config loading which resolves via getProfilePath().
|
|
5
|
+
*/
|
|
6
|
+
export declare function getDefaultConfigPath(): string;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the actual config path that will be used, resolving the active profile.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getConfigPath(): Promise<string>;
|
|
11
|
+
export declare function loadCoderConfig(): Promise<CoderConfig>;
|
|
12
|
+
export declare function getDefaultConfig(): CoderConfig;
|
|
13
|
+
export declare function mergeConfig(base: CoderConfig, override: CoderConfig): CoderConfig;
|
|
14
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/config/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAgC5C;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAErD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,WAAW,CAAC,CA4B5D;AAUD,wBAAgB,gBAAgB,IAAI,WAAW,CAa9C;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,GAAG,WAAW,CAuBjF"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { homedir } from 'node:os';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { YAML } from 'bun';
|
|
4
|
+
import { CoderConfigSchema } from '../types';
|
|
5
|
+
const CONFIG_DIR = join(homedir(), '.config', 'agentuity');
|
|
6
|
+
const DEFAULT_PROFILE = 'production.yaml';
|
|
7
|
+
async function getProfilePath() {
|
|
8
|
+
const profileFile = Bun.file(join(CONFIG_DIR, 'profile'));
|
|
9
|
+
if (await profileFile.exists()) {
|
|
10
|
+
const savedPath = (await profileFile.text()).trim();
|
|
11
|
+
const savedFile = Bun.file(savedPath);
|
|
12
|
+
if (await savedFile.exists()) {
|
|
13
|
+
return savedPath;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return join(CONFIG_DIR, DEFAULT_PROFILE);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Returns the default config path without resolving the active profile.
|
|
20
|
+
* Use loadCoderConfig() for actual config loading which resolves via getProfilePath().
|
|
21
|
+
*/
|
|
22
|
+
export function getDefaultConfigPath() {
|
|
23
|
+
return join(CONFIG_DIR, DEFAULT_PROFILE);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Returns the actual config path that will be used, resolving the active profile.
|
|
27
|
+
*/
|
|
28
|
+
export async function getConfigPath() {
|
|
29
|
+
return getProfilePath();
|
|
30
|
+
}
|
|
31
|
+
export async function loadCoderConfig() {
|
|
32
|
+
try {
|
|
33
|
+
const configPath = await getProfilePath();
|
|
34
|
+
const configFile = Bun.file(configPath);
|
|
35
|
+
if (!(await configFile.exists())) {
|
|
36
|
+
return getDefaultConfig();
|
|
37
|
+
}
|
|
38
|
+
const content = await configFile.text();
|
|
39
|
+
const cliConfig = YAML.parse(content);
|
|
40
|
+
const coderConfig = {
|
|
41
|
+
org: cliConfig.preferences?.orgId,
|
|
42
|
+
};
|
|
43
|
+
const result = CoderConfigSchema.safeParse(coderConfig);
|
|
44
|
+
if (!result.success) {
|
|
45
|
+
console.warn(`Warning: Invalid coder config in ${configPath}:`, result.error.message);
|
|
46
|
+
return getDefaultConfig();
|
|
47
|
+
}
|
|
48
|
+
return mergeConfig(getDefaultConfig(), result.data);
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
console.warn(`Warning: Could not read Agentuity config:`, error);
|
|
52
|
+
return getDefaultConfig();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/** Default CLI command patterns to block for security */
|
|
56
|
+
const DEFAULT_BLOCKED_COMMANDS = [
|
|
57
|
+
'cloud secrets', // Never expose secrets
|
|
58
|
+
'cloud secret', // Alias
|
|
59
|
+
'cloud apikey', // Don't leak API keys
|
|
60
|
+
'auth token', // Don't leak auth tokens
|
|
61
|
+
];
|
|
62
|
+
export function getDefaultConfig() {
|
|
63
|
+
return {
|
|
64
|
+
agents: {
|
|
65
|
+
lead: { model: 'anthropic/claude-opus-4-5-20251101' },
|
|
66
|
+
scout: { model: 'anthropic/claude-haiku-4-5-20251001' },
|
|
67
|
+
builder: { model: 'anthropic/claude-opus-4-5-20251101' },
|
|
68
|
+
reviewer: { model: 'anthropic/claude-haiku-4-5-20251001' },
|
|
69
|
+
memory: { model: 'anthropic/claude-haiku-4-5-20251001' },
|
|
70
|
+
expert: { model: 'anthropic/claude-opus-4-5-20251101' },
|
|
71
|
+
},
|
|
72
|
+
disabledMcps: [],
|
|
73
|
+
blockedCommands: DEFAULT_BLOCKED_COMMANDS,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export function mergeConfig(base, override) {
|
|
77
|
+
// Deep merge agents: for each agent, merge base and override properties
|
|
78
|
+
const mergedAgents = {};
|
|
79
|
+
const allAgentKeys = new Set([
|
|
80
|
+
...Object.keys(base.agents ?? {}),
|
|
81
|
+
...Object.keys(override.agents ?? {}),
|
|
82
|
+
]);
|
|
83
|
+
for (const key of allAgentKeys) {
|
|
84
|
+
const baseAgent = base.agents?.[key];
|
|
85
|
+
const overrideAgent = override.agents?.[key];
|
|
86
|
+
mergedAgents[key] = {
|
|
87
|
+
...baseAgent,
|
|
88
|
+
...overrideAgent,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
org: override.org ?? base.org,
|
|
93
|
+
agents: mergedAgents,
|
|
94
|
+
disabledMcps: override.disabledMcps ?? base.disabledMcps,
|
|
95
|
+
blockedCommands: override.blockedCommands ?? base.blockedCommands,
|
|
96
|
+
};
|
|
97
|
+
}
|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ginHooks } from './types';
|
|
3
|
+
export type { AgentRole, AgentConfig, AgentContext, CoderTask, CoderConfig, McpConfig, TaskStatus, } from './types';
|
|
4
|
+
declare const Coder: (ctx: PluginContext) => Promise<PluginHooks>;
|
|
5
|
+
export default Coder;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAO1D,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC1D,YAAY,EACX,SAAS,EACT,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,GACV,MAAM,SAAS,CAAC;AAEjB,QAAA,MAAM,KAAK,GAAU,KAAK,aAAa,KAAG,OAAO,CAAC,WAAW,CAE5D,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAmBpD,MAAM,KAAK,GAAG,KAAK,EAAE,GAAkB,EAAwB,EAAE;IAChE,OAAO,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context7.d.ts","sourceRoot":"","sources":["../../src/mcps/context7.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,WAAW,EAAE,SAKzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context7.js","sourceRoot":"","sources":["../../src/mcps/context7.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAc;IACrC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,8BAA8B;IACnC,OAAO,EAAE,IAAI;CACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grep-app.d.ts","sourceRoot":"","sources":["../../src/mcps/grep-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,UAAU,EAAE,SAKxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grep-app.js","sourceRoot":"","sources":["../../src/mcps/grep-app.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAc;IACpC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,sBAAsB;IAC3B,OAAO,EAAE,IAAI;CACb,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { McpConfig } from '../types';
|
|
2
|
+
export { grepAppMcp } from './grep-app';
|
|
3
|
+
export { context7Mcp } from './context7';
|
|
4
|
+
export type McpName = 'grep_app' | 'context7';
|
|
5
|
+
export declare function createBuiltinMcps(disabledMcps?: string[]): Record<string, McpConfig>;
|
|
6
|
+
export declare function getMcp(name: McpName): McpConfig;
|
|
7
|
+
export declare function getAllMcps(): McpConfig[];
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcps/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAI1C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;AAO9C,wBAAgB,iBAAiB,CAAC,YAAY,GAAE,MAAM,EAAO,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAWxF;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,CAE/C;AAED,wBAAgB,UAAU,IAAI,SAAS,EAAE,CAExC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { grepAppMcp } from './grep-app';
|
|
2
|
+
import { context7Mcp } from './context7';
|
|
3
|
+
export { grepAppMcp } from './grep-app';
|
|
4
|
+
export { context7Mcp } from './context7';
|
|
5
|
+
const allBuiltinMcps = {
|
|
6
|
+
grep_app: grepAppMcp,
|
|
7
|
+
context7: context7Mcp,
|
|
8
|
+
};
|
|
9
|
+
export function createBuiltinMcps(disabledMcps = []) {
|
|
10
|
+
const mcps = {};
|
|
11
|
+
const disabled = new Set(disabledMcps);
|
|
12
|
+
for (const [name, config] of Object.entries(allBuiltinMcps)) {
|
|
13
|
+
if (!disabled.has(name)) {
|
|
14
|
+
mcps[name] = config;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return mcps;
|
|
18
|
+
}
|
|
19
|
+
export function getMcp(name) {
|
|
20
|
+
return allBuiltinMcps[name];
|
|
21
|
+
}
|
|
22
|
+
export function getAllMcps() {
|
|
23
|
+
return Object.values(allBuiltinMcps);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcps/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIzC,MAAM,cAAc,GAA+B;IAClD,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,WAAW;CACrB,CAAC;AAEF,MAAM,UAAU,iBAAiB,CAAC,eAAyB,EAAE;IAC5D,MAAM,IAAI,GAA8B,EAAE,CAAC;IAC3C,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;IAEvC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;QAC7D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;QACrB,CAAC;IACF,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAa;IACnC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,UAAU;IACzB,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PluginContext, CoderConfig } from '../../types';
|
|
2
|
+
export interface KeywordHooks {
|
|
3
|
+
onMessage: (input: unknown, output: unknown) => Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export declare function createKeywordHooks(ctx: PluginContext, _config: CoderConfig): KeywordHooks;
|
|
6
|
+
//# sourceMappingURL=keyword.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyword.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/keyword.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D;AAiCD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,YAAY,CAgDzF"}
|