Why: Downstream products must extend the base through a public package and host API instead of editing internal code. Evidence: go test ./... passed, including plugin v2 assets, sidecar startup, migration v13, pending confirms, HITL timeout, hash embedder, command pairs, and the extension surface snapshot. Impact: apiVersion 2.0-experimental rejects empty network allowlists for declarative HTTP. Hash embeddings stay opt-in via models.embedding.provider=hash. Plugin secrets resolve per owner at execution time. Refs: docs/proposals/2026-10-01-plugin-contract-v2.md Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
533 B
Go
18 lines
533 B
Go
// Package link 把 extension.Main 接到产品组合根。
|
|
// 下游自有二进制空白导入本包;基座 internal 不反向依赖它。
|
|
package link
|
|
|
|
import (
|
|
"agent-system-backend/internal/app"
|
|
"agent-system-backend/pkg/extension"
|
|
)
|
|
|
|
func init() {
|
|
extension.SetRunner(func(opt extension.Options) error {
|
|
return app.Run(app.Options{
|
|
Addr: opt.Addr, DataDir: opt.DataDir, PluginsDir: opt.PluginsDir, ForceMock: opt.Mock,
|
|
StorageDSN: opt.StorageDSN, ArtifactsDir: opt.ArtifactsDir, AuthMode: opt.AuthMode,
|
|
})
|
|
})
|
|
}
|