feat: initial release
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
node_modules/
|
||||
*.log
|
||||
.env
|
||||
dist/
|
||||
@@ -0,0 +1,53 @@
|
||||
# KartiCode — Agent Configuration
|
||||
|
||||
**Karti.ai's OpenCode Plugin**
|
||||
|
||||
## Overview
|
||||
|
||||
KartiCode wraps oh-my-opencode and provides the same 11 built-in agents:
|
||||
|
||||
| Agent | Mode | Purpose |
|
||||
|-------|------|---------|
|
||||
| Sisyphus | all | Main orchestrator, plans + delegates |
|
||||
| Hephaestus | all | Autonomous deep worker |
|
||||
| Oracle | subagent | Read-only consultant |
|
||||
| Librarian | subagent | External docs/code search |
|
||||
| Explore | subagent | Contextual grep |
|
||||
| Atlas | primary | Todo-list orchestrator |
|
||||
| Metis | subagent | Pre-planning consultant |
|
||||
| Momus | subagent | Plan reviewer |
|
||||
| Multimodal-Looker | subagent | PDF/image analysis |
|
||||
| Prometheus | — | Strategic planner (internal) |
|
||||
| Sisyphus-Junior | all | Category-spawned executor |
|
||||
|
||||
## Custom Agents
|
||||
|
||||
You can add custom agents via your KartiCode config at `~/.config/opencode/karticode.jsonc`:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"agents": {
|
||||
"my-custom-agent": {
|
||||
"model": "fireworks/kimi-k2p5-turbo",
|
||||
"instructions": "You are a specialized agent for...",
|
||||
"temperature": 0.1
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## MCP Servers
|
||||
|
||||
KartiCode auto-configures these MCPs:
|
||||
|
||||
| MCP | Type | Path |
|
||||
|-----|------|------|
|
||||
| search | local | `mcp-servers/search-mcp-server/dist/index.js` |
|
||||
| mattermost | local | `mcp-servers/mattermost-mcp-server/mattermost-mcp-server` |
|
||||
| caddy | local | `mcp-servers/caddy-mcp-server/dist/index.js` |
|
||||
| gitea | local | `mcp-servers/gitea-mcp-server/dist/index.js` |
|
||||
|
||||
## Related
|
||||
|
||||
- `oh-my-opencode` - Base plugin that KartiCode wraps
|
||||
- `~/.config/opencode/oh-my-openagent.jsonc` - Shared config location
|
||||
@@ -0,0 +1,82 @@
|
||||
# KartiCode
|
||||
|
||||
Karti.ai's OpenCode plugin - wraps [oh-my-opencode](https://github.com/code-yeongyu/oh-my-openagent) with custom MCPs and team features.
|
||||
|
||||
## What it includes
|
||||
|
||||
### Base: oh-my-opencode
|
||||
- 11 agents (Sisyphus, Oracle, Librarian, etc.)
|
||||
- 26 tools
|
||||
- 52 lifecycle hooks
|
||||
- Background agent system
|
||||
- Skill/command/MCP system
|
||||
|
||||
### KartiCode additions:
|
||||
- **Search MCP** - SearXNG-based web search
|
||||
- **Mattermost MCP** - Team chat integration
|
||||
- **Caddy MCP** - Reverse proxy management
|
||||
- **Gitea MCP** - Self-hosted Git management
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# From npm (when published)
|
||||
npm install -g karticode
|
||||
|
||||
# From local source
|
||||
cd karticode
|
||||
npm link
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Add to your `~/.config/opencode/opencode.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"plugin": ["karticode"]
|
||||
}
|
||||
```
|
||||
|
||||
Or for a specific project, add to `.opencode/opencode.json`.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Some MCPs require environment variables:
|
||||
|
||||
```bash
|
||||
# Mattermost (optional)
|
||||
export MATTERMOST_HOST="https://your-mattermost-server.com"
|
||||
export MATTERMOST_BOT_TOKEN="your-bot-token"
|
||||
export MATTERMOST_PAT="your-personal-access-token"
|
||||
|
||||
# Gitea (optional)
|
||||
export GITEA_URL="https://your-gitea-server.com"
|
||||
export GITEA_TOKEN="your-token"
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
karticode/
|
||||
├── src/
|
||||
│ └── index.ts # Plugin entry point
|
||||
├── dist/ # Compiled output
|
||||
├── package.json
|
||||
└── tsconfig.json
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
# Build
|
||||
npm run build
|
||||
|
||||
# Watch mode (if you add a watch script)
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "karticode",
|
||||
"version": "1.0.0",
|
||||
"description": "Karti.ai's OpenCode plugin - wraps oh-my-opencode with custom MCPs and agents",
|
||||
"main": "./dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"dist",
|
||||
"assets"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"keywords": [
|
||||
"opencode",
|
||||
"plugin",
|
||||
"karticode",
|
||||
"kartiai",
|
||||
"mcp"
|
||||
],
|
||||
"author": "Karti.ai",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"oh-my-opencode": "^3.15.3",
|
||||
"@opencode-ai/plugin": "^1.4.0",
|
||||
"@opencode-ai/sdk": "^1.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.7.3",
|
||||
"@types/node": "^20.0.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import OhMyOpenCodePlugin from "oh-my-opencode"
|
||||
|
||||
/**
|
||||
* KartiCode Plugin - Karti.ai's OpenCode extension
|
||||
*
|
||||
* This is a thin wrapper around oh-my-opencode that:
|
||||
* - Provides Karti.ai branding
|
||||
* - Works with KartiCode-specific configuration
|
||||
* - Is designed to work with ~/.config/opencode/karticode.jsonc
|
||||
*
|
||||
* The actual MCPs and customizations are configured via:
|
||||
* - ~/.config/opencode/karticode.jsonc (user config)
|
||||
* - .opencode/karticode.jsonc (project config)
|
||||
*/
|
||||
|
||||
const KartiCodePlugin = async (ctx: unknown) => {
|
||||
// Initialize oh-my-opencode
|
||||
const omoPlugin = await OhMyOpenCodePlugin(ctx as Parameters<typeof OhMyOpenCodePlugin>[0])
|
||||
|
||||
// Log KartiCode activation
|
||||
process.stderr.write("[KartiCode] Plugin activated\n")
|
||||
|
||||
// Return with KartiCode branding but all oh-my-opencode functionality
|
||||
return {
|
||||
...omoPlugin,
|
||||
name: "karticode",
|
||||
}
|
||||
}
|
||||
|
||||
export default KartiCodePlugin
|
||||
|
||||
// Re-export all types from oh-my-opencode
|
||||
export type {
|
||||
OhMyOpenCodeConfig,
|
||||
AgentName,
|
||||
AgentOverrideConfig,
|
||||
AgentOverrides,
|
||||
McpName,
|
||||
HookName,
|
||||
BuiltinCommandName,
|
||||
ConfigLoadError,
|
||||
} from "oh-my-opencode"
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"lib": ["ES2022"],
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
Reference in New Issue
Block a user