Why: Allow consumers to download an immutable module revision without nested source checkouts or local path replacements. Evidence: SELF package tests and the prior canonical-path rejection are recorded in the Dev dependency-workspace task card; remote consumption is replayed against the committed candidate. Impact: Change the module identity and its Go imports while preserving API behavior. Existing historical submodule revisions remain buildable. Refs: Versioned dependencies U1/U3; feature/dependency-workspace
37 lines
1.6 KiB
Go
37 lines
1.6 KiB
Go
package extension
|
|
|
|
import (
|
|
core "git-ssh.u1680832.nyat.app/weichen/Agent-System-Core.git"
|
|
"context"
|
|
)
|
|
|
|
// ProjectHost is an optional actor-scoped host projection capability. Metadata
|
|
// can be shared by an authorizer; registered-lifecycle metadata masks credentials.
|
|
// OwnedProject remains an owner-only management lookup; mutations remain owner-only.
|
|
type ProjectHost interface {
|
|
Owner() string
|
|
OwnedProjects() ([]core.Project, error)
|
|
ProjectMetadata(projectID string) (core.Project, error)
|
|
OwnedProject(projectID string) (core.Project, error)
|
|
EnsureProject(projectID, name string) (core.Project, error)
|
|
RenameOwnedProject(projectID, name string) (core.Project, error)
|
|
ProjectNameAvailable(name, exceptID string) (bool, error)
|
|
}
|
|
|
|
// ProjectLifecycle supplies the domain's public project lifecycle and live work
|
|
// authorization. Each Host is scoped to the authenticated actor. Errors with a
|
|
// StatusCode() int method may report 400, 403, 404, 409, or 503 to HTTP clients.
|
|
type ProjectLifecycle struct {
|
|
List func(context.Context, Host) ([]core.Project, error)
|
|
Create func(context.Context, Host, string) (core.Project, error)
|
|
Rename func(context.Context, Host, string, string) (core.Project, error)
|
|
Archive func(context.Context, Host, string) error
|
|
Work func(context.Context, string, core.ID) (bool, error)
|
|
}
|
|
|
|
// ProjectLifecycleRegistry is optional so older Registry implementations retain
|
|
// their contract. Only in-process plugins can register one complete provider.
|
|
type ProjectLifecycleRegistry interface {
|
|
RegisterProjectLifecycle(ProjectLifecycle) error
|
|
}
|