chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
from .src.python.opencode_tool import OpenCodeTool
|
||||
|
||||
__all__ = ["OpenCodeTool"]
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"OPENCODE_OPENROUTER_API_KEY": null,
|
||||
"OPENCODE_OPENROUTER_MODEL": "openrouter/openai/gpt-5.2-codex"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from './opencode-tool'
|
||||
@@ -0,0 +1,68 @@
|
||||
{{SYSTEM_PROMPT_SECTION}}
|
||||
{{REPO_SNAPSHOT}}
|
||||
{{TOOLKIT_INFO}}
|
||||
|
||||
# Leon Skill Creation (Concise)
|
||||
|
||||
You are generating a Leon skill in **{{LANGUAGE}}**.
|
||||
|
||||
## Core Rules
|
||||
|
||||
- Use the **{{BRIDGE}}** bridge for all source files.
|
||||
- Skills live directly under `skills/` (no subfolders).
|
||||
- All source files use `{{FILE_EXTENSION}}`.
|
||||
- Validate JSON files against `schemas/skill-schemas/*`.
|
||||
- Write all required files to disk under the chosen `skills/<name>_skill` folder.
|
||||
|
||||
## Required Structure
|
||||
|
||||
```
|
||||
skills/skill_name/
|
||||
skill.json
|
||||
locales/en.json
|
||||
src/
|
||||
settings.sample.json
|
||||
settings.json
|
||||
actions/
|
||||
widgets/ (optional)
|
||||
```
|
||||
|
||||
## skill.json Rules
|
||||
|
||||
- `actions` required, `flow` optional.
|
||||
- If `flow` exists, only the first action receives user parameters.
|
||||
- Use `"skill_name:action_name"` for cross-skill flow steps.
|
||||
- Set `author.name` to `Leon` unless explicitly specified.
|
||||
|
||||
## Settings Files
|
||||
|
||||
- `src/settings.sample.json` and `src/settings.json` must both exist and start identical.
|
||||
- Use `{}` if no settings.
|
||||
|
||||
## Toolkits (Plan First)
|
||||
|
||||
- Choose relevant toolkits from above **before** writing code.
|
||||
- Use existing tools instead of duplicating functionality.
|
||||
|
||||
## leon.answer Basics
|
||||
|
||||
{{LEON_ANSWER_BASIC_EXAMPLE}}
|
||||
|
||||
## Passing Data Between Actions
|
||||
|
||||
{{CONTEXT_DATA_EXAMPLE}}
|
||||
|
||||
## Settings Usage
|
||||
|
||||
{{SETTINGS_USAGE_EXAMPLE}}
|
||||
|
||||
## Widget Rules
|
||||
|
||||
- Do not use `Card` as the parent component. The `WidgetWrapper` is already applied by default.
|
||||
- For icons, use only the icon name without the `ri-` prefix and `-line` suffix. The system automatically completes them to `ri-{icon-name}-line`. For example, use `snow` instead of `ri-snow-line`.
|
||||
|
||||
## Action Parameters
|
||||
|
||||
{{ACTION_PARAMS_EXAMPLE}}
|
||||
|
||||
{{REFERENCE_FILES_SECTION}}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,68 @@
|
||||
{{SYSTEM_PROMPT_SECTION}}
|
||||
{{REPO_SNAPSHOT}}
|
||||
{{TOOLKIT_INFO}}
|
||||
|
||||
# Leon Skill Creation (Concise)
|
||||
|
||||
You are generating a Leon skill in **{{LANGUAGE}}**.
|
||||
|
||||
## Core Rules
|
||||
|
||||
- Use the **{{BRIDGE}}** bridge for all source files.
|
||||
- Skills live directly under `skills/` (no subfolders).
|
||||
- All source files use `{{FILE_EXTENSION}}`.
|
||||
- Validate JSON files against `schemas/skill-schemas/*`.
|
||||
- Write all required files to disk under the chosen `skills/<name>_skill` folder.
|
||||
|
||||
## Required Structure
|
||||
|
||||
```
|
||||
skills/skill_name/
|
||||
skill.json
|
||||
locales/en.json
|
||||
src/
|
||||
settings.sample.json
|
||||
settings.json
|
||||
actions/
|
||||
widgets/ (optional)
|
||||
```
|
||||
|
||||
## skill.json Rules
|
||||
|
||||
- `actions` required, `flow` optional.
|
||||
- If `flow` exists, only the first action receives user parameters.
|
||||
- Use `"skill_name:action_name"` for cross-skill flow steps.
|
||||
- Set `author.name` to `Leon` unless explicitly specified.
|
||||
|
||||
## Settings Files
|
||||
|
||||
- `src/settings.sample.json` and `src/settings.json` must both exist and start identical.
|
||||
- Use `{}` if no settings.
|
||||
|
||||
## Toolkits (Plan First)
|
||||
|
||||
- Choose relevant toolkits from above **before** writing code.
|
||||
- Use existing tools instead of duplicating functionality.
|
||||
|
||||
## leon.answer Basics
|
||||
|
||||
{{LEON_ANSWER_BASIC_EXAMPLE}}
|
||||
|
||||
## Passing Data Between Actions
|
||||
|
||||
{{CONTEXT_DATA_EXAMPLE}}
|
||||
|
||||
## Settings Usage
|
||||
|
||||
{{SETTINGS_USAGE_EXAMPLE}}
|
||||
|
||||
## Widget Rules
|
||||
|
||||
- Do not use `Card` as the parent component. The `WidgetWrapper` is already applied by default.
|
||||
- For icons, use only the icon name without the `ri-` prefix and `-line` suffix. The system automatically completes them to `ri-{icon-name}-line`. For example, use `snow` instead of `ri-snow-line`.
|
||||
|
||||
## Action Parameters
|
||||
|
||||
{{ACTION_PARAMS_EXAMPLE}}
|
||||
|
||||
{{REFERENCE_FILES_SECTION}}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"$schema": "../../../schemas/tool-schemas/tool.json",
|
||||
"tool_id": "opencode",
|
||||
"toolkit_id": "coding_development",
|
||||
"name": "OpenCode",
|
||||
"description": "An AI-powered coding agent tool that generates skills using multiple LLM providers (Cerebras, MiniMax, Anthropic, OpenAI, Gemini).",
|
||||
"icon_name": "code-box-line",
|
||||
"author": {
|
||||
"name": "Louis Grenard",
|
||||
"email": "louis@getleon.ai",
|
||||
"url": "https://twitter.com/grenlouis"
|
||||
},
|
||||
"binaries": {
|
||||
"linux-x86_64": "https://github.com/leon-ai/leon-binaries/releases/download/opencode-v1.14.29/opencode_1.14.29-linux-x86_64.tar.gz",
|
||||
"linux-aarch64": "https://github.com/leon-ai/leon-binaries/releases/download/opencode-v1.14.29/opencode_1.14.29-linux-aarch64.tar.gz",
|
||||
"macosx-x86_64": "https://github.com/leon-ai/leon-binaries/releases/download/opencode-v1.14.29/opencode_1.14.29-macosx-x86_64.zip",
|
||||
"macosx-arm64": "https://github.com/leon-ai/leon-binaries/releases/download/opencode-v1.14.29/opencode_1.14.29-macosx-arm64.zip",
|
||||
"win-amd64": "https://github.com/leon-ai/leon-binaries/releases/download/opencode-v1.14.29/opencode_1.14.29-win-amd64.zip"
|
||||
},
|
||||
"functions": {
|
||||
"configureProvider": {
|
||||
"description": "Configure a provider with an API key and optional model.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"type": "string"
|
||||
},
|
||||
"apiKey": {
|
||||
"type": "string"
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provider",
|
||||
"apiKey"
|
||||
]
|
||||
}
|
||||
},
|
||||
"getConfiguredProviders": {
|
||||
"description": "List the providers currently configured with API keys.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
},
|
||||
"getAvailableProviders": {
|
||||
"description": "List providers supported by OpenCode.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
},
|
||||
"getDefaultModel": {
|
||||
"description": "Get the default model name for a provider.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"generateSkill": {
|
||||
"description": "Generate a new skill using OpenCode CLI with an agentic loop.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"type": "string"
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
"api_key": {
|
||||
"type": "string"
|
||||
},
|
||||
"target_path": {
|
||||
"type": "string"
|
||||
},
|
||||
"context_files": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"system_prompt": {
|
||||
"type": "string"
|
||||
},
|
||||
"bridge": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"description",
|
||||
"provider",
|
||||
"target_path"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "../../schemas/toolkit-schemas/toolkit.json",
|
||||
"name": "Coding & Development",
|
||||
"description": "Tools for code generation, development, and automation.",
|
||||
"icon_name": "code-s-slash-line",
|
||||
"context_files": [
|
||||
"ARCHITECTURE.md",
|
||||
"WORKSPACE_INTELLIGENCE.md",
|
||||
"LEON_RUNTIME.md",
|
||||
"HOME.md"
|
||||
],
|
||||
"tools": [
|
||||
"opencode"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user