fix: skills loading from ~/.agents/skills

- Fix skill manager directory path to ~/.agents/skills
- Add InitPlugins() call in main.go to load skills on startup
- Skills now recognized and loaded correctly
This commit is contained in:
大森 2026-05-08 22:17:24 +08:00
parent 286d3dae3c
commit 81f6802f2e
4 changed files with 23 additions and 2 deletions

View File

@ -57,6 +57,10 @@ func main() {
log.Fatalf("Failed to start kernel: %v", err)
}
if err := k.InitPlugins(); err != nil {
log.Printf("Warning: failed to load skills: %v", err)
}
k.SetStreamWriter(os.Stdout)
fmt.Println("Orca Agent Framework")

View File

@ -82,7 +82,7 @@ func NewWithConfig(cfg *config.Config) *Kernel {
k.registerBuiltinTools()
// Initialize skill manager
k.skillMgr = skill.NewManager(cfg.Session.StorageDir + "/skills")
k.skillMgr = skill.NewManager("~/.agents/skills")
// Initialize actor system
k.initializeActorSystem()

View File

@ -15,7 +15,7 @@ const (
DefaultOutputLimit = 64 * 1024
// DefaultWorkingDir is the default working directory for sandboxed commands.
DefaultWorkingDir = "/tmp/orca/sandbox"
DefaultWorkingDir = "."
)
// AllowedEnvVars is the whitelist of environment variables accessible inside the sandbox.

17
test.md Normal file
View File

@ -0,0 +1,17 @@
## 测试文件
这是一个Markdown格式的测试文件。
- 列表项1
- 列表项2
- 列表项3
```go
package main
import "fmt"
func main() {
fmt.Println("Hello, orca.ai!")
}
```