Documentation
¶
Overview ¶
Package continuedev implements the Continue adapter for agentsync.
(The package is named continuedev rather than `continue` because `continue` is a Go keyword; the agent's name — Adapter.Name() — is still "continue".)
Continue stores configuration under ~/.continue (global) and <repo>/.continue (project), composed from "blocks" — individual files in per-kind subdirectories (per docs.continue.dev). agentsync projects to three of them:
- MCP servers → .continue/mcpServers/<id>.yaml (one YAML block per server)
- Memory → .continue/rules/agentsync.md (a plain always-apply rule)
- Commands → .continue/prompts/<name>.md (one prompt block per command)
Each is a whole-file (one-file-per-item) write, so the adapter has NO key-merge strategy. Continue has no Agent Skills, no per-file subagents (its "agents" are top-level assistants), no declarative hooks, and no LSP config, so those components are skipped with a report. See docs/capability-matrix.md for the per-component coverage and documented loss.
Index ¶
- func IngestMCPSpec(raw map[string]any) source.MCPServerSpec
- type Adapter
- func (a *Adapter) Apply(ops []adapter.FileOp, w adapter.DestWriter) error
- func (a *Adapter) Capabilities() adapter.Capability
- func (a *Adapter) Detect() (bool, error)
- func (a *Adapter) Ingest(scope adapter.Scope, project string) (source.Canonical, error)
- func (a *Adapter) KeyMergeStrategy() string
- func (a *Adapter) Name() string
- func (a *Adapter) Render(r secrets.Resolved, scope adapter.Scope, project string) ([]adapter.FileOp, []adapter.Skip, error)
- func (a *Adapter) SetStderr(w io.Writer)
- type Options
- type Paths
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IngestMCPSpec ¶
func IngestMCPSpec(raw map[string]any) source.MCPServerSpec
IngestMCPSpec translates one Continue-native server entry (a map under a block's `mcpServers` list) into the canonical MCPServerSpec. Inverse of continueMCPServerMap: `streamable-http` → http, `sse` → sse, otherwise stdio; `requestOptions.headers` → canonical headers, and any OTHER requestOptions subkey (timeout, verifySsl, proxy, …) is preserved verbatim in Extra["requestOptions"] so the round trip can rebuild the full object — dropping it silently would let the next apply destroy it on disk. Native keys agentsync doesn't model (e.g. cwd) are preserved in Extra.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements adapter.Adapter for Continue.
func (*Adapter) Apply ¶
Apply routes every destination write through the supplied DestWriter rather than calling iox.AtomicWrite directly. Continue projects every component as a whole-file write (one block per file), so there is no per-key merge: a write is the op's content verbatim. The DestWriter owns the foreign-collision backup invariant — see the doc on adapter.DestWriter.
func (*Adapter) Capabilities ¶
func (a *Adapter) Capabilities() adapter.Capability
func (*Adapter) Ingest ¶
Ingest reads Continue's native block files and returns a partial source.Canonical. It is the inverse of Render (modulo the documented projected loss — command argument-hint/allowed-tools — which Render drops with a report).
func (*Adapter) KeyMergeStrategy ¶
KeyMergeStrategy returns "" — Continue projects every component as a whole-file write (one YAML/markdown block per item), so the adapter owns no shared key-merge file.
func (*Adapter) Render ¶
func (a *Adapter) Render(r secrets.Resolved, scope adapter.Scope, project string) ([]adapter.FileOp, []adapter.Skip, error)
Render converts the resolved canonical into FileOps for Continue.
Render projects each plugin's COMPONENTS (MCP, memory, commands) to Continue's `.continue/` block directories. Continue has no native plugin enable-state agentsync models (it composes blocks from the Hub + local files), so there is no PluginIngester and nothing is written back — the same components-only-on- apply rule every adapter follows.
type Options ¶
type Options struct {
TargetRoot string // honors AGENTSYNC_TARGET_ROOT (real "/Users/x" in production)
// LookPath overrides exec.LookPath for testing. nil means use exec.LookPath.
LookPath func(file string) (string, error)
// Stderr receives Ingest warnings. nil means os.Stderr.
Stderr io.Writer
}
Options configure the adapter at construction.
type Paths ¶
type Paths struct {
ConfigDir string // ~/.continue (or <proj>/.continue)
MCPDir string // .continue/mcpServers (one YAML block per server)
RulesDir string // .continue/rules (memory → agentsync.md)
PromptsDir string // .continue/prompts (one prompt block per command)
}
Paths resolves the destination directories for a given (scope, project, target-root). Continue uses the same `.continue/` layout at user scope (~/.continue) and project scope (<repo>/.continue).
func ResolvePaths ¶
ResolvePaths returns the Paths for the given target root and optional project.