mirror of
https://github.com/lukaszraczylo/harness-sync.git
synced 2026-10-12 00:45:22 +00:00
The Zed Agent panel (new ACP-based UI) only discovers providers registered
under language_models.openai_compatible.<name>, not language_models.openai.
Each named entry appears as its own provider in the LLM Providers list.
- language_models.openai_compatible.harness-sync-gateway holds gateway URL + models
- agent.default_model.provider = 'harness-sync-gateway' (was 'openai')
- Model entries include capabilities {tools,images,parallel_tool_calls}
- Export common.GatewayProviderID so zed.go can reference it
- Fix staticcheck QF1001 (De Morgan's law) in io.go
- Fix struct field alignment in File (80→72 bytes)
- gofmt remaining files
53 lines
1.4 KiB
Go
53 lines
1.4 KiB
Go
// Package adapter defines the harness adapter interface and FileSet.
|
|
package adapter
|
|
|
|
import "github.com/lukaszraczylo/harness-sync/internal/canonical"
|
|
|
|
type Kind int
|
|
|
|
const (
|
|
RenderedFile Kind = iota
|
|
SymlinkFile
|
|
SymlinkDir
|
|
)
|
|
|
|
func (k Kind) String() string {
|
|
switch k {
|
|
case RenderedFile:
|
|
return "rendered"
|
|
case SymlinkFile:
|
|
return "symlink-file"
|
|
case SymlinkDir:
|
|
return "symlink-dir"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
// HarnessCapabilities declares what an adapter manages.
|
|
// HasBuiltInSub means the harness has its own AI subscription (e.g. Claude Max)
|
|
// and harness-sync should not write provider/model/endpoint config for it.
|
|
type HarnessCapabilities struct {
|
|
ManagesProviders bool // writes provider/gateway endpoint config
|
|
ManagesModels bool // writes model selection config
|
|
ManagesMCP bool // writes MCP server config
|
|
ManagesSkills bool // writes skills symlink or equivalent
|
|
ManagesInstructions bool // writes instructions file (CLAUDE.md, AGENTS.md, etc.)
|
|
HasBuiltInSub bool // has its own subscription; provider/model config is skipped
|
|
}
|
|
|
|
type Adapter interface {
|
|
Name() string
|
|
Detect() bool
|
|
Capabilities() HarnessCapabilities
|
|
Render(b *canonical.Bundle) (*FileSet, error)
|
|
Import(home string) (*ImportResult, error)
|
|
}
|
|
|
|
type ImportResult struct {
|
|
Instructions string
|
|
Skills []canonical.Skill
|
|
Agents []canonical.Agent
|
|
MCP []canonical.MCPServer
|
|
Profiles []canonical.Profile
|
|
}
|