Documentation
¶
Index ¶
- Variables
- func ErrorText(args []string, output io.Writer, err error) string
- func ManagementEnvironmentID(cfg management.Startup) string
- func NewLegacyLifecycle(statePath string) ports.LegacyLifecycle
- func NewRoot(app App) *cobra.Command
- func NormalizeManagementStartup(input management.Startup) (management.Startup, error)
- func ShouldWriteAgentFailure(err error) bool
- func WriteAgentFailure(writer io.Writer, err error) error
- type AgentAction
- type AgentFailure
- type App
- type CLIUsageError
- type DirectoryClient
- type DiscoveryClient
- type ManagementBackend
- func (b *ManagementBackend) Catalog(ctx context.Context, query string) (management.Catalog, error)
- func (b *ManagementBackend) CatalogDetail(ctx context.Context, id string) (management.CatalogEntry, error)
- func (b *ManagementBackend) CheckUpdates(ctx context.Context, input management.UpdateCheckRequest) (management.UpdateCheck, error)
- func (b *ManagementBackend) Close()
- func (b *ManagementBackend) ContextID() string
- func (b *ManagementBackend) DiscardSkillsCatalog(ctx context.Context, catalogID string) error
- func (b *ManagementBackend) EnvironmentID() string
- func (b *ManagementBackend) ForgetObservation(ctx context.Context, operation management.Operation) error
- func (b *ManagementBackend) Inspect(ctx context.Context) (management.Environment, error)
- func (b *ManagementBackend) Prepare(ctx context.Context, input management.ChangeRequest, operationID string) (management.Prepared, error)
- func (b *ManagementBackend) PrepareLocalSkill(ctx context.Context, input management.LocalSkillRequest, operationID string) (management.Prepared, error)
- func (b *ManagementBackend) Session(ctx context.Context) (management.Session, error)
- func (b *ManagementBackend) SkillPreview(ctx context.Context, catalogID, candidateID string) (management.SkillPreview, error)
- func (b *ManagementBackend) SkillsCatalog(ctx context.Context, input management.SourceRequest) (management.SkillCatalog, error)
- type PreparedSkillsBatch
- func (p *PreparedSkillsBatch) Actions() []SkillsAction
- func (p *PreparedSkillsBatch) Apply(ctx context.Context) (SkillsBatchResult, error)
- func (p *PreparedSkillsBatch) ApplyWithProgress(ctx context.Context, progress func(SkillsProgress)) (SkillsBatchResult, error)
- func (p *PreparedSkillsBatch) Check(ctx context.Context) error
- func (p *PreparedSkillsBatch) Close()
- func (p *PreparedSkillsBatch) Warnings() []string
- type SecurityIndex
- type SkillsAction
- type SkillsBatchItem
- type SkillsBatchRequest
- type SkillsBatchResult
- type SkillsPickerRequest
- type SkillsProgress
- type SkillsSelection
- type SkillsSelectionError
- type SourceAcquirer
Constants ¶
This section is empty.
Variables ¶
var ErrSkillsPlanStale = errors.New("skill installation plan is stale")
Functions ¶
func ErrorText ¶
ErrorText uses the same flag parser without executing a command or touching state. Malformed flags and unknown commands deliberately keep their diagnostic unstyled.
func ManagementEnvironmentID ¶
func ManagementEnvironmentID(cfg management.Startup) string
ManagementEnvironmentID identifies the engine's durable receipt environment. cfg must have passed NormalizeManagementStartup. A relocated manifest or client executable must not hide interrupted work for the same native state store.
func NewLegacyLifecycle ¶
func NewLegacyLifecycle(statePath string) ports.LegacyLifecycle
func NormalizeManagementStartup ¶
func NormalizeManagementStartup(input management.Startup) (management.Startup, error)
NormalizeManagementStartup captures immutable trusted-host facts. A display ID supplied by a host never lets different roots share accepted request identity.
func ShouldWriteAgentFailure ¶
ShouldWriteAgentFailure opts in only early usage errors. Source selection errors already emit their own JSON; old native refusals require empty stdout.
Types ¶
type AgentAction ¶
type AgentAction struct {
Code string `json:"code"`
Actor string `json:"actor"`
Message string `json:"message"`
}
AgentAction is actionable guidance, not proof of native activation.
type AgentFailure ¶
type AgentFailure struct {
Code string `json:"code"`
Message string `json:"message"`
Retryable bool `json:"retryable"`
NextActions []AgentAction `json:"next_actions,omitempty"`
}
AgentFailure deliberately never serializes raw native/transport errors.
type App ¶
type App struct {
// Explicit selected-client startup is distinct from install/activation.
SessionEnv clients.Env
StartNativeSession func(context.Context, clients.SessionPlan, []string) error
ManagementFactory func(management.Startup) (App, error)
// ForScope composes an isolated runtime after command flags select its context.
ForScope func(domain.InstallScope, string) (App, error) `json:"-"`
Scope domain.InstallScope `json:"-"`
ProjectRoot string `json:"-"`
Prompter prompt.Prompter
PromptFactory func(io.Reader, io.Writer, io.Writer, bool, bool) (prompt.Prompter, io.Writer, error)
// InstallLogDir receives technical install logs. It is always a per-user
// location: a project root belongs to the repository and never holds logs.
InstallLogDir string
Version string
UserHome string
ManagedRoot string
DependenciesRoot string
EnvironmentStoreRoot string
EnvironmentLockPath string
StateStore transaction.StateStore
Detector ports.ClientDetector
// ClientRegistry is the set of client adapters this binary knows about. The
// composition root decides it; CLI commands receive the already-built planner
// and never reconstruct one.
ClientRegistry *clients.Registry
Planner ports.DeliveryPlanner
Targets ports.DeliveryTargetResolver
DirectoryClient DirectoryClient
DirectoryClientForDryRun func(string) (DirectoryClient, error)
CommitDirectoryPreview func(DirectoryClient) error
DiscoveryClient DiscoveryClient
SourceAcquirer SourceAcquirer
PackageLoader ports.PackageLoader
NativePackageLoader ports.PackageLoader
SecurityIndex SecurityIndex
SecurityEvaluator ports.PackageSecurityEvaluator
SecurityEvaluatorForDryRun func(string) ports.PackageSecurityEvaluator
SourceAcquirerForDryRun func(string) SourceAcquirer
// Installer is the public facade used by the qualified explicit local
// package path. Other CLI acquisition and lifecycle paths remain on the
// existing service until their contracts are qualified separately.
Installer *installer.Engine
Lifecycle usecase.Service
StateMigrator *statemigration.Migrator
LegacyLifecycle ports.LegacyLifecycle
LegacyStateLock ports.MutationLock
Input io.Reader
Output io.Writer
ErrorOutput io.Writer
Terminal bool
// contains filtered or unexported fields
}
func ConfigureManagementApp ¶
func ConfigureManagementApp(app App, cfg management.Startup) (App, error)
ConfigureManagementApp is called after the executable composition root creates the engine for StateRoot. Native profile detection is explicit in this mode.
func (App) PrepareSkills ¶
func (app App) PrepareSkills(ctx context.Context, input SkillsBatchRequest) (plan *PreparedSkillsBatch, err error)
PrepareSkills acquires exact selected commits in disposable storage and prepares one complete candidate graph. It never writes intent, persistent cache or profiles.
func (App) StartSkillsPicker ¶
func (app App) StartSkillsPicker(ctx context.Context, input SkillsPickerRequest) (*skillspicker.Server, error)
StartSkillsPicker resolves a real immutable Git source and joins discovery and the same prepared batch installer used by terminal selection. Closing the server releases all source and review scratch workspaces.
type CLIUsageError ¶
CLIUsageError carries a fixed safe diagnostic without re-parsing stderr.
func (CLIUsageError) Error ¶
func (e CLIUsageError) Error() string
type DirectoryClient ¶
type DirectoryClient interface {
Load(context.Context, uint64) (directoryv1.VerifiedBundle, error)
}
type DiscoveryClient ¶
type DiscoveryClient interface {
Load(context.Context, uint64) (discoveryv1.VerifiedBundle, error)
}
type ManagementBackend ¶
type ManagementBackend struct {
// contains filtered or unexported fields
}
ManagementBackend adapts shared application behavior to the generated wire contract. Prepared handles and catalog selections remain private Go objects.
func NewManagementBackend ¶
func NewManagementBackend(app App, input management.Startup) (*ManagementBackend, error)
func (*ManagementBackend) Catalog ¶
func (b *ManagementBackend) Catalog(ctx context.Context, query string) (management.Catalog, error)
func (*ManagementBackend) CatalogDetail ¶
func (b *ManagementBackend) CatalogDetail(ctx context.Context, id string) (management.CatalogEntry, error)
func (*ManagementBackend) CheckUpdates ¶
func (b *ManagementBackend) CheckUpdates(ctx context.Context, input management.UpdateCheckRequest) (management.UpdateCheck, error)
CheckUpdates is explicit network work. Inspect remains a passive snapshot.
func (*ManagementBackend) Close ¶
func (b *ManagementBackend) Close()
func (*ManagementBackend) ContextID ¶
func (b *ManagementBackend) ContextID() string
func (*ManagementBackend) DiscardSkillsCatalog ¶
func (b *ManagementBackend) DiscardSkillsCatalog(ctx context.Context, catalogID string) error
DiscardSkillsCatalog releases only discovery resources. Prepared selected-Skill plans own independently retained source snapshots and remain valid.
func (*ManagementBackend) EnvironmentID ¶
func (b *ManagementBackend) EnvironmentID() string
func (*ManagementBackend) ForgetObservation ¶
func (b *ManagementBackend) ForgetObservation(ctx context.Context, operation management.Operation) error
ForgetObservation is called only for an expired settled observation while the transport holds its acceptance lock. It removes verified private undo data, never an active Skill, and refuses ambiguous or user-modified backup contents.
func (*ManagementBackend) Inspect ¶
func (b *ManagementBackend) Inspect(ctx context.Context) (management.Environment, error)
func (*ManagementBackend) Prepare ¶
func (b *ManagementBackend) Prepare(ctx context.Context, input management.ChangeRequest, operationID string) (management.Prepared, error)
func (*ManagementBackend) PrepareLocalSkill ¶
func (b *ManagementBackend) PrepareLocalSkill(ctx context.Context, input management.LocalSkillRequest, operationID string) (management.Prepared, error)
func (*ManagementBackend) Session ¶
func (b *ManagementBackend) Session(ctx context.Context) (management.Session, error)
func (*ManagementBackend) SkillPreview ¶
func (b *ManagementBackend) SkillPreview(ctx context.Context, catalogID, candidateID string) (management.SkillPreview, error)
func (*ManagementBackend) SkillsCatalog ¶
func (b *ManagementBackend) SkillsCatalog(ctx context.Context, input management.SourceRequest) (management.SkillCatalog, error)
type PreparedSkillsBatch ¶
type PreparedSkillsBatch struct {
// contains filtered or unexported fields
}
func (*PreparedSkillsBatch) Actions ¶
func (p *PreparedSkillsBatch) Actions() []SkillsAction
func (*PreparedSkillsBatch) Apply ¶
func (p *PreparedSkillsBatch) Apply(ctx context.Context) (SkillsBatchResult, error)
Apply is called only after explicit confirmation by the caller. The existing environment lock/rechecks and installer receipts own all durable effects.
func (*PreparedSkillsBatch) ApplyWithProgress ¶
func (p *PreparedSkillsBatch) ApplyWithProgress(ctx context.Context, progress func(SkillsProgress)) (SkillsBatchResult, error)
ApplyWithProgress observes the same transaction as Apply. An observer is presentation only; its panic cannot change native effects or receipts.
func (*PreparedSkillsBatch) Close ¶
func (p *PreparedSkillsBatch) Close()
func (*PreparedSkillsBatch) Warnings ¶
func (p *PreparedSkillsBatch) Warnings() []string
type SecurityIndex ¶
type SecurityIndex interface {
Lookup(context.Context, domain.SecuritySubject) (*domain.SecurityAssessment, error)
}
type SkillsAction ¶
type SkillsAction struct{ Alias, ClientID, Action, TargetPath, CandidateID, FromPath, ToPath string }
type SkillsBatchItem ¶
type SkillsBatchItem struct {
Alias, ClientID, Action, TargetPath, CandidateID, Status, Reason string
Client installer.ClientResult
ManualActions []string
// contains filtered or unexported fields
}
type SkillsBatchRequest ¶
type SkillsBatchRequest struct {
Selections []SkillsSelection
TargetIDs []string
}
type SkillsBatchResult ¶
type SkillsBatchResult struct {
Status string
Items []SkillsBatchItem
RepairInstructions []string
}
type SkillsPickerRequest ¶
SkillsPickerRequest selects one public source; PathSet distinguishes an exact repository root Skill from an unrestricted repository scan.
type SkillsProgress ¶
type SkillsSelection ¶
type SkillsSelection struct {
Repository, Commit, Path, Name, Alias, CandidateID string
Website string
ExpectedIndexSHA256, ExpectedRawTreeDigest string
Selector environment.Selector
}
type SkillsSelectionError ¶
SkillsSelectionError associates a failed source with the immutable selection. Presentation layers choose a safe message; the cause remains classifiable.
func (*SkillsSelectionError) Error ¶
func (e *SkillsSelectionError) Error() string
func (*SkillsSelectionError) Unwrap ¶
func (e *SkillsSelectionError) Unwrap() error
type SourceAcquirer ¶
type SourceAcquirer interface {
AcquireLocal(context.Context, string) (domain.PackageSnapshot, error)
DiscoverGitHubPackages(context.Context, string, string) ([]string, error)
AcquireGitHub(context.Context, string, string, string) (domain.PackageSnapshot, error)
AcquireGitHubVerified(context.Context, string, string, string, string) (domain.PackageSnapshot, error)
}
Source Files
¶
- add.go
- add_activity.go
- add_application.go
- add_attestation.go
- add_multi.go
- add_multi_isolation.go
- add_multi_presentation.go
- add_multi_proof.go
- add_multi_retry.go
- add_prepared_setup.go
- add_ready_actions.go
- add_result.go
- add_result_lifecycle.go
- add_targets.go
- agent_error.go
- agent_readiness.go
- app.go
- apply_outcome_status.go
- binding.go
- chatgpt_guidance.go
- client_policy.go
- client_session.go
- client_session_ownership.go
- color_error.go
- command_activity.go
- deps_apply.go
- deps_candidates.go
- deps_check.go
- deps_check_agreement.go
- deps_check_policy.go
- deps_check_render.go
- deps_command_constructors.go
- deps_commands.go
- deps_declaration_index.go
- deps_directory_identity.go
- deps_document_io.go
- deps_identity.go
- deps_keys.go
- deps_manifest.go
- deps_package_facts.go
- deps_policy.go
- deps_preflight_error.go
- deps_render.go
- deps_repair.go
- deps_repair_source.go
- deps_replay.go
- deps_resolver.go
- deps_retained.go
- deps_root_prefetch.go
- deps_sbom.go
- deps_skills.go
- deps_source.go
- deps_staging.go
- deps_status.go
- deps_sync.go
- deps_sync_locked.go
- deps_transfer.go
- deps_transfer_install.go
- deps_transfer_output.go
- deps_transfer_publish.go
- deps_transfer_render.go
- deps_transfer_run.go
- deps_tree.go
- deps_web_skills.go
- directory_floor_load.go
- doctor_codex_native_audit.go
- doctor_project_readiness.go
- engine_boundary.go
- engine_switch.go
- environment_session.go
- explicit_add_completion.go
- group_progress_board.go
- group_progress_resize_unix.go
- install.go
- install_failure.go
- install_failure_errno_other.go
- install_report.go
- install_retry.go
- installer_facade.go
- interactive_directory.go
- interactive_loaded.go
- interactive_target_compatibility.go
- interactive_targets.go
- interrupted_client_change.go
- interrupted_operations.go
- legacy_controller.go
- legacy_remove.go
- lifecycle.go
- lifecycle_commands.go
- lifecycle_helpers.go
- lifecycle_presentation.go
- management_apply.go
- management_backend.go
- management_catalog.go
- management_command.go
- management_context.go
- management_diagnostics.go
- management_discovery.go
- management_inspect.go
- management_local_skills.go
- management_local_skills_apply.go
- management_local_skills_publication.go
- management_local_skills_recovery.go
- management_local_skills_retention.go
- management_local_skills_tree.go
- management_local_skills_tree_plan.go
- management_local_skills_validation.go
- management_native_verify.go
- management_plan.go
- management_prepare.go
- management_preview.go
- management_reconcile.go
- management_recovery.go
- management_refusals.go
- management_removal.go
- management_result.go
- management_scope.go
- management_skills.go
- management_update.go
- management_updates.go
- management_validation.go
- management_web.go
- opencode_runtime_notice.go
- ordered_prefetch.go
- outdated.go
- outdated_directory.go
- outdated_discovery.go
- outdated_presentation.go
- outdated_saved.go
- output.go
- plan_review.go
- plan_review_format.go
- plugin_enablement.go
- plugin_removal_version.go
- prefetch_disk_statfs.go
- prefetch_guard.go
- preflight.go
- prepare.go
- prepared_client.go
- project_context.go
- project_version_preflight.go
- prompts.go
- read.go
- read_commands.go
- read_directory.go
- read_directory_doctor.go
- read_directory_warnings.go
- read_native_projection.go
- read_public.go
- read_reconciliation.go
- read_snapshot.go
- remove_multi.go
- remove_multi_apply.go
- remove_multi_presentation.go
- repair_multi.go
- repair_multi_commit.go
- repair_multi_presentation.go
- retained_data_guidance.go
- root.go
- saved_add.go
- saved_add_acquisition.go
- saved_add_completion.go
- saved_add_directory_existing.go
- saved_add_existing.go
- saved_add_foreign.go
- saved_add_lock_plan.go
- saved_add_preparation.go
- saved_add_result.go
- saved_add_targets.go
- saved_direct.go
- saved_lifecycle.go
- saved_lifecycle_operations.go
- saved_registry_update.go
- saved_target_notice.go
- saved_updates.go
- scope_reason.go
- search.go
- search_directory.go
- search_discovery.go
- search_presentation.go
- security.go
- skills.go
- skills_batch.go
- skills_batch_prepare.go
- skills_batch_selection.go
- skills_diagnostics.go
- skills_list.go
- skills_mcp.go
- skills_picker.go
- skills_picker_mutation.go
- skills_picker_read.go
- skills_prefetch.go
- skills_progress.go
- skills_result_output.go
- skills_resume.go
- skills_retry.go
- skills_review_errors.go
- skills_review_output.go
- skills_scope.go
- skills_search_prompt.go
- skills_selection_errors.go
- skills_terminal.go
- skills_unchanged.go
- skills_website.go
- source.go
- source_acquire.go
- source_client_policy.go
- source_direct.go
- source_evidence.go
- source_repair.go
- source_selector.go
- source_snapshot.go
- state_migration.go
- target_batch.go
- target_choice.go
- update_all.go
- update_all_saved.go
- update_multi.go
- update_multi_apply.go
- update_multi_presentation.go
- update_multi_target_policy.go
- validate.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package management provides primitives to interact with the openapi HTTP API.
|
Package management provides primitives to interact with the openapi HTTP API. |
|
Package managementhttp adapts the Management application to private loopback HTTP.
|
Package managementhttp adapts the Management application to private loopback HTTP. |
|
Package managementstate implements Management observation persistence and its cross-process mutation lock.
|
Package managementstate implements Management observation persistence and its cross-process mutation lock. |
|
Package manifestedit edits the supported outer syntax of uap.toml.
|
Package manifestedit edits the supported outer syntax of uap.toml. |
|
Package prompt is the CLI-owned, presentation-independent interaction port.
|
Package prompt is the CLI-owned, presentation-independent interaction port. |
|
Package skillspicker provides primitives to interact with the openapi HTTP API.
|
Package skillspicker provides primitives to interact with the openapi HTTP API. |