Documentation
¶
Overview ¶
Package migrate brings a user's setup over from another personal-assistant agent (Hermes, OpenClaw, nanobot, …): providers and keys, persona files, memory, skills, MCP servers, schedules and chat channels. Chat history is deliberately not migrated.
The flow is detect → plan → apply. Detect is cheap and read-only. Plan reads the source and describes every item it would bring over, without writing anything. Apply writes the items the user kept, after a backup. Contract: docs/plans/2026-10-03-migrate-contract.md.
Index ¶
- Constants
- Variables
- func BackupsDir() string
- func ContentHash(s string) string
- func CronJobID(sourceID, itemID string) string
- func CustomProviderID(taken func(id string) bool, name string) string
- func EverySchedule(d time.Duration) string
- func ExpandHome(p string) string
- func ExpandVars(s string, env map[string]string) (string, bool)
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsLocalURL(u string) bool
- func ItemID(cat Category, key string) string
- func JSON5ToJSON(src []byte) ([]byte, error)
- func LooksSecret(text string) bool
- func MemoryID(sourceID, content string) string
- func NextFreeName(name string, taken func(string) bool) string
- func NormalizeTransport(t, url string) string
- func PlatformLabel(p string) string
- func RAGCollection(sourceID string) string
- func ReadDotEnv(path string) map[string]string
- func ReadJSON(path string, v any) error
- func ReadJSON5(path string, v any) error
- func ReadText(path string) string
- func ReadYAML(path string, v any) error
- func Redact(s string) string
- func RedactSecrets(text string) string
- func Register(s Source)
- func RenderPlan(p Plan) string
- func ResolveBackup(name string) (string, error)
- func RoleDirs(cfg *config.Config) []string
- func SkillDirs(cfg *config.Config) []string
- func Slug(name string) string
- func Summarize(items []Item) string
- func SupportedPlatform(p string) bool
- func TextPath(cat Category) string
- func Truncate(s string, n int) string
- func Undo(ctx context.Context, backup string, deps Deps) error
- func ValidSchedule(expr string) error
- type BackupEntry
- type BackupInfo
- type Category
- type ChannelPayload
- type Choice
- type CronPayload
- type DefaultModelChecker
- type Deps
- type Detection
- type Env
- type Item
- func ChannelItem(env Env, platform, title string, fields map[string]any, missingInput string) Item
- func CronItem(key string, c CronPayload, sourceEnabled bool) Item
- func KnowledgeItem(env Env, relPath, content string) (Item, bool)
- func MCPItem(env Env, m MCPPayload) Item
- func MemoryItems(entries []MemoryEntry, scope string, tags ...string) []Item
- func ModelItem(env Env, m ModelPayload) Item
- func OAuthProviderItem(key, label string) Item
- func ProviderItem(env Env, p ProviderPayload, detail string) Item
- func RoleItem(env Env, r RolePayload) Item
- func SkillItem(env Env, s SkillDir) Item
- func TextItem(env Env, cat Category, content, from string) (Item, bool)
- func UnsupportedItem(cat Category, key, title, reason string) Item
- type ItemFailure
- type Keychain
- type KnowledgePayload
- type MCPPayload
- type Manifest
- type MemoryEntry
- type MemoryPayload
- type ModelPayload
- type MultiDetector
- type OSKeychain
- type Payload
- type Plan
- type ProviderMatcher
- type ProviderPayload
- type RAGChecker
- type RAGRef
- type Report
- type Resolution
- type RolePayload
- type SkillDir
- type SkillPayload
- type Source
- type SourceInfo
- type StateEnv
- func (e *StateEnv) ChannelConfigured(platform string) bool
- func (e *StateEnv) HasDefaultModel() bool
- func (e *StateEnv) MCPServerExists(name string) bool
- func (e *StateEnv) ProviderExists(id string) bool
- func (e *StateEnv) ProviderMatches(id, baseURL, apiKey string) bool
- func (e *StateEnv) RAGEnabled() bool
- func (e *StateEnv) RoleExists(name string) bool
- func (e *StateEnv) SkillExists(name string) bool
- func (e *StateEnv) TextFileState(cat Category) string
- type Status
- type TextPayload
- type VendorInfo
Constants ¶
const HermesMemorySeparator = "\n§\n"
HermesMemorySeparator is the delimiter Hermes writes between entries in memories/MEMORY.md and memories/USER.md (tools/memory_tool.py, ENTRY_DELIMITER = "\n§\n").
const ManifestVersion = 1
ManifestVersion is bumped when the manifest layout changes.
Variables ¶
var CatalogueProviderIDs = []string{
"openrouter", "anthropic", "openai", "gemini", "zai", "opencode", "ollama",
"lmstudio", "azure", "bedrock", "vertex", "copilot", "codex", "custom",
}
CatalogueProviderIDs are the built-in provider ids of the setup catalogue (internal/server/handlers_setup.go setupProviderCatalogue). A custom provider must not take one. Duplicated here because migrate cannot import server; a server test asserts the two lists match.
var ErrNoSecret = errors.New("no such keychain entry")
ErrNoSecret means the keychain has no such entry.
var ErrNotFound = errors.New("not installed")
ErrNotFound is what Detect returns when the agent is not installed at the default locations (or at root). DetectAll also treats any other error, or a Detection with an empty Root, as "not installed".
var HomeDir = func() string { h, _ := os.UserHomeDir() return h }
HomeDir is the user's home directory; tests may override it.
var PIDAlive = func(pid int) bool { if pid <= 0 || runtime.GOOS == "windows" { return false } p, err := os.FindProcess(pid) if err != nil { return false } return p.Signal(syscall.Signal(0)) == nil }
PIDAlive reports whether pid is a live process (never on Windows, where signal 0 is not available). Sources use it for PID/lock files; tests replace it.
var RunningCheck = func(processPatterns, launchdLabels []string) bool { if runtime.GOOS == "darwin" { for _, l := range launchdLabels { if out, err := exec.Command("launchctl", "list", l).Output(); err == nil && bytes.Contains(out, []byte(`"PID"`)) { return true } } } if runtime.GOOS == "windows" { return false } for _, p := range processPatterns { if err := exec.Command("pgrep", "-f", p).Run(); err == nil { return true } } return false }
RunningCheck reports whether any of the named processes (matched against the full command line) or launchd labels (macOS) is running. Sources call it from Detect; tests replace it.
var SupportedPlatforms = []string{"telegram", "discord", "slack", "matrix", "signal", "whatsapp", "feishu"}
SupportedPlatforms are the gateway.<platform> blocks Antares has.
Functions ¶
func ContentHash ¶
ContentHash is a short stable hash of normalised text, used for memory ids and dedupe.
func CustomProviderID ¶
CustomProviderID mints a config id for a user-named OpenAI-compatible provider, with the same rules as server.CustomProviderID: slug of the name, "custom-provider" when the slug is empty or "custom", never a catalogue id, and "-2", "-3"… until taken reports false.
func EverySchedule ¶
EverySchedule renders an interval as an Antares "@every" schedule ("@every 30m", "@every 2h", "@every 1h30m").
func ExpandHome ¶
ExpandHome turns a leading "~" into the user's home directory.
func ExpandVars ¶
ExpandVars replaces ${VAR} and $VAR references with values from env, then from the process environment. ok is false when a referenced variable is unset anywhere (the caller then marks the item needs_input).
func IsLocalURL ¶
IsLocalURL reports whether an endpoint is on this machine (no key needed).
func JSON5ToJSON ¶
JSON5ToJSON rewrites JSON5 text as strict JSON. It handles the JSON5 that config files actually use: // and /* */ comments, trailing commas, unquoted identifier keys, single-quoted strings, backslash line continuations, hexadecimal integers, leading '+' and bare leading/trailing decimal points. Infinity and NaN have no JSON form and become null.
func LooksSecret ¶
LooksSecret reports whether text appears to contain a credential.
func MemoryID ¶
MemoryID is the deterministic store id of an imported memory, so a second import of the same entry is a no-op.
func NextFreeName ¶
NextFreeName returns name if free, else name-2, name-3… (the rename resolution).
func NormalizeTransport ¶
NormalizeTransport maps a source's MCP transport name to Antares' "stdio" or "http" (sse, streamable_http, streamable-http and http → http; empty → http when a URL is set, else stdio).
func PlatformLabel ¶
PlatformLabel is a display name for a channel platform.
func RAGCollection ¶
RAGCollection is the RAG collection a source's knowledge goes into.
func ReadDotEnv ¶
ReadDotEnv parses a KEY=VALUE file (blank lines and # comments ignored, optional "export " prefix, single/double quotes stripped, inline " #" comments dropped from unquoted values). A missing file yields an empty map.
func ReadJSON5 ¶
ReadJSON5 decodes a JSON5 file (comments, trailing commas, unquoted keys, single-quoted strings, hex numbers) into v via JSON5ToJSON.
func ReadText ¶
ReadText returns a file's contents trimmed, or "" when it is missing, unreadable or larger than 8 MB.
func Redact ¶
Redact masks a secret for display: "••••" plus the last 4 characters when the value is long enough to keep them anonymous, else just "••••".
func RedactSecrets ¶
RedactSecrets masks credential-looking values in text meant for display.
func Register ¶
func Register(s Source)
Register adds a source; called from each source file's init.
func RenderPlan ¶
RenderPlan prints a plan as stable text — one line per item plus its payload with every secret redacted. Used for golden tests and the CLI's --dry-run --verbose output.
func ResolveBackup ¶
ResolveBackup turns a backup directory name ("migrate-hermes-20261003T101500Z") into its absolute path under the backups dir. Only a bare name is accepted: anything with a path separator or "..", or not starting with "migrate-", is refused.
func RoleDirs ¶
RoleDirs are the configured role directories, expanded; the first is where imported roles are written. Falls back to <home>/roles.
func SkillDirs ¶
SkillDirs are the configured user skill directories, expanded; the first is where imports are written. Falls back to <home>/skills.
func Slug ¶
Slug reduces a name to lowercase kebab-case ASCII (the form Antares uses for skill, role, MCP and provider ids).
func Summarize ¶
Summarize renders the picker's count line ("2 providers · 14 skills · Telegram") from a plan's items; channels are named, the rest counted.
func SupportedPlatform ¶
SupportedPlatform reports whether Antares has a gateway for platform.
func Undo ¶
Undo reverses one Apply: files it changed are restored from the backup, files/folders it created are removed, and the memories, cron jobs and RAG documents it added are deleted. The backup dir is kept, marked undone; a second Undo is an error. The caller reloads the server afterwards.
func ValidSchedule ¶
ValidSchedule reports whether Antares' scheduler accepts expr.
Types ¶
type BackupEntry ¶
BackupEntry maps a live path to its copy in the backup dir.
type BackupInfo ¶
type BackupInfo struct {
Name string `json:"name"` // dir name under backups/, the undo handle
Source string `json:"source"`
Profile string `json:"profile,omitempty"`
CreatedAt time.Time `json:"created_at"`
Applied int `json:"applied"`
Undone bool `json:"undone"`
}
BackupInfo describes one past migration, for the Settings list.
func ListBackups ¶
func ListBackups() []BackupInfo
ListBackups returns the migration backups, newest first.
type Category ¶
type Category string
Category groups plan items; the UI shows one section per category and the CLI's --only flag filters by it.
const ( CatProvider Category = "provider" // an LLM provider with its key CatModel Category = "model" // the default model (+ fallbacks) CatSoul Category = "soul" // persona → ~/.antares/SOUL.md CatAgentsMD Category = "agents_md" // global instructions → ~/.antares/AGENTS.md CatUserMD Category = "user_md" // facts about the user → ~/.antares/USER.md CatMemory Category = "memory" // one memory entry → store.Memory CatKnowledge Category = "knowledge" // a note/daily file → RAG collection CatSkill Category = "skill" // a SKILL.md folder → ~/.antares/skills/<name>/ CatMCP Category = "mcp" // an MCP server → config mcp.servers CatCron Category = "cron" // a schedule → store.CronJob CatChannel Category = "channel" // a chat channel → config gateway.<platform> CatRole Category = "role" // a sub-agent/agent profile → ~/.antares/roles/<name>.md )
type ChannelPayload ¶
type Choice ¶
type Choice struct {
ID string `json:"id"`
Resolution Resolution `json:"resolution,omitempty"` // for conflicts
// Input supplies a needs_input value (e.g. the API key).
Input string `json:"input,omitempty"`
}
Choice is what the user decided for one item.
type CronPayload ¶
type DefaultModelChecker ¶
type DefaultModelChecker interface {
HasDefaultModel() bool
}
DefaultModelChecker reports whether Antares already has a working default model (a model plus a provider that can answer).
type Deps ¶
type Deps struct {
// Store receives memories and cron jobs; required when the plan has any.
Store store.Store
// RAG indexes knowledge items; nil means RAG is off (items are skipped).
RAG tools.RAGProvider
// Now is the clock (UTC timestamps for backup dirs); nil = time.Now.
Now func() time.Time
}
Deps are the live services Apply and Undo write through.
type Detection ¶
type Detection struct {
Source string `json:"source"` // Source.ID()
Name string `json:"name"` // Source.Name()
Root string `json:"root"` // the agent's home dir, e.g. ~/.hermes
Version string `json:"version,omitempty"`
// Profile distinguishes several installs of one agent (Hermes profiles,
// OpenClaw extra agents); empty for the default.
Profile string `json:"profile,omitempty"`
// Running is true when the agent's process/service appears to be running
// (its bots would fight Antares' bots over the same tokens).
Running bool `json:"running"`
// Summary is a short count line for the picker, e.g.
// "2 providers · 14 skills · Telegram".
Summary string `json:"summary"`
}
Detection is one installation found on disk.
type Env ¶
type Env interface {
ProviderExists(id string) bool
SkillExists(name string) bool
MCPServerExists(name string) bool
RoleExists(name string) bool
// ChannelConfigured reports whether gateway.<platform> already has a
// token set ("telegram", "discord", "slack", "matrix", "signal",
// "whatsapp", "feishu").
ChannelConfigured(platform string) bool
// TextFileState returns "missing", "default" (the shipped placeholder)
// or "custom" for SOUL.md / AGENTS.md / USER.md.
TextFileState(cat Category) string
}
Env is what a source may consult while planning: the current Antares state (to mark conflicts) without importing the server.
type Item ¶
type Item struct {
// ID is stable for a given source state: "<category>:<key>", e.g.
// "provider:openrouter", "skill:web-research", "memory:7".
ID string `json:"id"`
Category Category `json:"category"`
// Title is the one-line label ("OpenRouter", "Telegram bot @mybot").
Title string `json:"title"`
// Detail is an optional second line ("3 models · key from .env").
Detail string `json:"detail,omitempty"`
Status Status `json:"status"`
// Reason explains a conflict, a needed input or why it is unsupported.
Reason string `json:"reason,omitempty"`
// Input, for StatusNeedsInput, names the field the user must fill
// ("api_key"); the UI renders a password field for keys.
Input string `json:"input,omitempty"`
// Secret marks an item carrying a credential; the API never returns the
// value, only that one exists.
Secret bool `json:"secret,omitempty"`
// Default selection in the UI: true for ready items, false otherwise.
Selected bool `json:"selected"`
// Payload is the data Apply writes; one of these is set, by category.
// Never serialised to clients (secrets live here).
Payload Payload `json:"-"`
}
Item is one thing to migrate.
func ChannelItem ¶
ChannelItem builds a chat-channel item. Unsupported platforms get a reason; a missing required field (missingInput, e.g. "bot_token") is needs_input; a platform Antares already has a token for is a conflict.
func CronItem ¶
func CronItem(key string, c CronPayload, sourceEnabled bool) Item
CronItem builds a schedule item. The schedule must already be in Antares form; one cron.Parse rejects becomes unsupported. Imported jobs are always disabled (Enabled=false), whatever the source said.
func KnowledgeItem ¶
KnowledgeItem builds a RAG document item; unsupported when RAG is off.
func MCPItem ¶
func MCPItem(env Env, m MCPPayload) Item
MCPItem builds an MCP server item; transport is normalised; a conflict when the name exists. Env/header values count as secrets.
func MemoryItems ¶
func MemoryItems(entries []MemoryEntry, scope string, tags ...string) []Item
MemoryItems turns entries into memory items, deduped by content hash. tags are added to every entry (an entry's Heading is added as a tag too).
func ModelItem ¶
func ModelItem(env Env, m ModelPayload) Item
ModelItem builds the default-model item; a conflict when Antares already has a working default (as reported by a DefaultModelChecker Env).
func OAuthProviderItem ¶
OAuthProviderItem lists a subscription login that must be redone in Antares.
func ProviderItem ¶
func ProviderItem(env Env, p ProviderPayload, detail string) Item
ProviderItem builds a provider item. A missing key (for a kind that needs one and a non-local endpoint) is needs_input "api_key"; an existing id is a conflict unless the Env reports identical base URL and key (then ready, and Apply makes it a no-op).
func RoleItem ¶
func RoleItem(env Env, r RolePayload) Item
RoleItem builds a role item; a conflict when the name exists (including a built-in role of the same name).
func TextItem ¶
TextItem builds a soul / agents_md / user_md item; a conflict when the current Antares file is custom. Empty content yields ok=false.
func UnsupportedItem ¶
UnsupportedItem is an item that is listed but never applied.
type ItemFailure ¶
type Keychain ¶
Keychain reads a secret another agent keeps in the OS keychain (macOS Keychain, Windows Credential Manager, Secret Service on Linux). Reading may show the OS's own access prompt; that prompt is the user's consent.
var DefaultKeychain Keychain = OSKeychain{}
DefaultKeychain is the keychain sources read when planning. Tests replace it.
type KnowledgePayload ¶
type MCPPayload ¶
type Manifest ¶
type Manifest struct {
Version int `json:"version"`
Source string `json:"source"`
Profile string `json:"profile,omitempty"`
CreatedAt time.Time `json:"created_at"`
Undone bool `json:"undone,omitempty"`
Applied []string `json:"applied"`
// Restore lists files/dirs Apply modified that existed before; each has a
// copy under the backup dir (Backup is relative to it).
Restore []BackupEntry `json:"restore,omitempty"`
// CreatedPaths are files/dirs Apply created; Undo removes them.
CreatedPaths []string `json:"created_paths,omitempty"`
Memories []string `json:"memories,omitempty"`
CronJobs []string `json:"cron_jobs,omitempty"`
RAGDocs []RAGRef `json:"rag_docs,omitempty"`
}
Manifest records what one Apply changed, so Undo can reverse it. It never holds secret values: only ids, paths and names.
type MemoryEntry ¶
type MemoryEntry struct {
Content string
// Heading is the nearest Markdown heading above the entry, if any; useful
// as a tag.
Heading string
}
MemoryEntry is one fact split out of a memory file.
func SplitBySeparator ¶
func SplitBySeparator(text, sep string) []MemoryEntry
SplitBySeparator splits text on sep, trimming entries and dropping empty ones. Line endings are normalised to \n first.
func SplitMarkdownEntries ¶
func SplitMarkdownEntries(text string) []MemoryEntry
SplitMarkdownEntries splits a Markdown memory file into entries:
- each top-level bullet ("- ", "* ", "+ ", "1. ") with its indented continuation lines is one entry, and each plain paragraph (blank-line separated) is one entry;
- a lead line ending with ":" or ":" ("Key rules:") is grouped with the bullets and code blocks that follow it into one entry;
- fenced code blocks are kept whole;
- headings are not entries; they become the Heading of the entries beneath them. Front matter and HTML comments are skipped;
- entries that are only a code fence, a lone label, or have fewer than ~12 meaningful characters (letters and digits; CJK counts 1.5) are dropped.
func SplitMemory ¶
func SplitMemory(text, sep string) []MemoryEntry
SplitMemory splits memory text by sep when non-empty, else by Markdown bullets/paragraphs (SplitMarkdownEntries).
type MemoryPayload ¶
type ModelPayload ¶
type MultiDetector ¶
MultiDetector is an optional Source extension for agents that can have several installs side by side (Hermes profiles, OpenClaw agents). DetectAll prefers it over Detect; each Detection's Profile tells them apart, and Plan receives the chosen one.
type OSKeychain ¶
type OSKeychain struct{}
OSKeychain is the real keychain. Sources take a Keychain so tests can pass a fake; DefaultKeychain is what the API and CLI use.
type Payload ¶
type Payload struct {
Provider *ProviderPayload
Model *ModelPayload
Text *TextPayload // soul, agents_md, user_md
Memory *MemoryPayload
Knowledge *KnowledgePayload
Skill *SkillPayload
MCP *MCPPayload
Cron *CronPayload
Channel *ChannelPayload
Role *RolePayload
}
Payload carries the concrete values for an item.
type Plan ¶
type Plan struct {
Detection Detection `json:"detection"`
Items []Item `json:"items"`
// Warnings that are not about one item (e.g. "Hermes is running — stop
// it before importing its Telegram token").
Warnings []string `json:"warnings,omitempty"`
}
Plan is everything a source would bring over.
type ProviderMatcher ¶
ProviderMatcher reports whether provider id already holds exactly this base URL and key, so re-importing it is a no-op rather than a conflict.
type ProviderPayload ¶
type RAGChecker ¶
type RAGChecker interface {
RAGEnabled() bool
}
RAGChecker reports whether RAG is enabled, so knowledge items can be marked unsupported ("RAG is off") at plan time.
type Report ¶
type Report struct {
Source string `json:"source"`
Backup string `json:"backup"` // backup dir, for undo
Applied []string `json:"applied"`
Skipped []string `json:"skipped"`
Failed []ItemFailure `json:"failed,omitempty"`
// NeedsRestart is true when the gateway or MCP changed and a reload is
// needed for them to take effect (the server applies it itself).
NeedsRestart bool `json:"needs_restart"`
}
Report is the outcome of Apply.
func Apply ¶
Apply writes the chosen items of plan into Antares, after backing up what it will change. Only items named in choices are considered; unsupported items, conflicts without a resolution (or with "skip") and needs_input items without input are skipped. The config file is written once at the end. The caller reloads the server afterwards.
type Resolution ¶
type Resolution string
Resolution chooses what Apply does with a conflicting item.
const ( ResolveSkip Resolution = "skip" // keep what Antares has (default) ResolveReplace Resolution = "replace" // overwrite it ResolveRename Resolution = "rename" // add beside it under a new id/name (providers, skills, MCP, roles) ResolveAppend Resolution = "append" // text files only: add the imported text under a heading )
type RolePayload ¶
type SkillDir ¶
type SkillDir struct {
Name string // from front matter "name", else the folder name; sanitised
Description string
Dir string // absolute folder path
Category string // parent folder relative to the scan root ("" at top level)
}
SkillDir is one folder holding a SKILL.md.
func ScanSkills ¶
ScanSkills finds SKILL.md folders under root, up to maxDepth levels deep (Hermes uses skills/<category>/<name>/SKILL.md, so 2; flat layouts need 1). Hidden folders and node_modules are skipped, and a skill folder's own subfolders are not searched. On a name clash the first found (sorted by path) wins. Missing root yields nil.
type SkillPayload ¶
type Source ¶
type Source interface {
// ID is the stable identifier used in the API and CLI: "hermes",
// "openclaw", "nanobot", "picoclaw", "cowagent", "qwenpaw", "letta",
// "zeroclaw", "nanoclaw", "openhuman".
ID() string
// Name is the display name ("Hermes Agent").
Name() string
// Detect looks for the agent's data under the default locations (or at
// root when non-empty) and returns what it found. It only stats and
// reads small config files; it never decrypts or prompts.
Detect(ctx context.Context, root string) (Detection, error)
// Plan reads the source at det.Root and returns every item it would
// migrate. It may decrypt secrets (which can trigger an OS keychain
// prompt — that prompt is the user's consent); it never writes.
Plan(ctx context.Context, det Detection, env Env) (Plan, error)
}
Source is one agent Antares can migrate from. Implementations live in source_<id>.go and register themselves in init via Register.
type SourceInfo ¶
type SourceInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Detected []Detection `json:"detected"`
}
SourceInfo is one registered source with what was found on disk.
func DetectAll ¶
func DetectAll(ctx context.Context) []SourceInfo
DetectAll runs every registered source's detection at its default locations. A source that is not installed (ErrNotFound, any other error, or an empty Root) gets an empty Detected list; detection never fails the whole listing.
type StateEnv ¶
type StateEnv struct {
// contains filtered or unexported fields
}
StateEnv is the real Env: it answers from the Antares config, the skill and role directories and the persona files under the Antares home. Build it with NewEnv right before planning so conflicts reflect the current state.
func (*StateEnv) ChannelConfigured ¶
func (*StateEnv) HasDefaultModel ¶
HasDefaultModel implements DefaultModelChecker: a default model whose provider has a key, is local, or takes credentials from the environment.
func (*StateEnv) MCPServerExists ¶
func (*StateEnv) ProviderExists ¶
ProviderExists reports a configured provider. A keyless placeholder entry (the defaults ship catalogue providers without keys) does not count: the import simply fills it in.
func (*StateEnv) ProviderMatches ¶
ProviderMatches implements ProviderMatcher.
func (*StateEnv) RAGEnabled ¶
RAGEnabled implements RAGChecker.
func (*StateEnv) RoleExists ¶
func (*StateEnv) SkillExists ¶
func (*StateEnv) TextFileState ¶
type Status ¶
type Status string
Status says whether an item can be applied as is.
const ( // StatusReady applies without further input. StatusReady Status = "ready" // StatusConflict means Antares already has something in this place (a // provider with this id, a skill with this name, a configured Telegram // bot, a non-default SOUL.md). Apply needs a Resolution for it. StatusConflict Status = "conflict" // StatusNeedsInput means a value is missing and the user must supply it // (Input), e.g. a key that could not be read or decrypted. StatusNeedsInput Status = "needs_input" // StatusUnsupported cannot be migrated (a channel Antares has no gateway // for, an OAuth login, a one-shot schedule). Shown with the reason; never // applied. StatusUnsupported Status = "unsupported" )
type TextPayload ¶
type VendorInfo ¶
type VendorInfo struct {
ID string // Antares provider id (a catalogue id where one exists)
Label string
Kind string // Antares provider kind
BaseURL string // default endpoint; empty means the kind's own default
// OAuth marks a subscription/OAuth login that cannot be migrated as a key.
OAuth bool
}
VendorInfo is the Antares provider a source vendor name maps to.
func Vendor ¶
func Vendor(name string) (VendorInfo, bool)
Vendor maps a source's provider/vendor name (case-insensitive; "_" and " " treated as "-") to an Antares provider.
func VendorByBaseURL ¶
func VendorByBaseURL(baseURL string) (VendorInfo, bool)
VendorByBaseURL guesses the vendor from an endpoint's host, for sources that only store a base URL.