Documentation
¶
Overview ¶
Package devoutputs owns explicitly selected repository producer outputs. It is native-independent and shared by workspace builders and actual process owners.
Index ¶
- func IsViteConfigTemporaryFile(name string) bool
- func Publish(ctx context.Context, stages ...*Stage) error
- func Published(ctx context.Context, w devcontract.ResolvedWorkspace, consumer string, ...) (string, error)
- func ResetDependencyTrees(ctx context.Context, w devcontract.ResolvedWorkspace, roots []string, ...) ([]string, error)
- func Restore(ctx context.Context, w devcontract.ResolvedWorkspace) error
- func Validate(ctx context.Context, w devcontract.ResolvedWorkspace) error
- func ValidatedOwnedPaths(ctx context.Context, w devcontract.ResolvedWorkspace) ([]string, error)
- type Conflict
- type Difference
- type Inspection
- type OwnershipEntry
- type Producer
- type Reconciliation
- type Request
- type Stage
- type ViteBuild
- type Writer
- func BeginCompositionInstall(ctx context.Context, w devcontract.ResolvedWorkspace, p devcompose.Plan) (*Writer, error)
- func BeginInstall(ctx context.Context, w devcontract.ResolvedWorkspace, consumerRoot string) (*Writer, error)
- func BeginVite(ctx context.Context, w devcontract.ResolvedWorkspace, consumerRoot string) (*Writer, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsViteConfigTemporaryFile ¶
IsViteConfigTemporaryFile identifies only Vite's exact source-root loader stamp names. Watchers and ownership snapshots share this one convention.
func Publish ¶
Publish preflights every supplied destination before any source publication. Captured after-images and rename progress survive interruption for exact retry.
func Published ¶ added in v0.8.0
func Published(ctx context.Context, w devcontract.ResolvedWorkspace, consumer string, kind Producer) (string, error)
Published returns the content digest of a staged producer output that still exactly matches its last controlled publication, including directory identities. It refuses outputs that were never published by a controlled producer, have a live/unfinished writer or interrupted recovery, or changed since publication. The digest omits directory identities, so an identical republished tree has the same digest; it is not reuse authority by itself.
func ResetDependencyTrees ¶ added in v0.9.0
func ResetDependencyTrees(ctx context.Context, w devcontract.ResolvedWorkspace, roots []string, duringRestoration bool) ([]string, error)
ResetDependencyTrees deletes every journal-owned dependency tree and cache (modules, TypeScript, Vite loader and Vite optimizer caches), forgets their entries, and deletes any unrecorded node_modules directly below the supplied package roots. It never adopts foreign bytes: new trees come only from a later recorded writer. Other producer outputs and their journal entries are left untouched.
Unfinished writer records of the reset kinds are discarded, so the caller must hold the stopped-profile guard proving no producer process is alive.
duringRestoration admits a journal whose restoration (unlink/remove) was interrupted. Reset-kind removal intents complete by deleting their trees; every other entry and the Restoring state stay for the resumed restoration.
func Restore ¶
func Restore(ctx context.Context, w devcontract.ResolvedWorkspace) error
func Validate ¶
func Validate(ctx context.Context, w devcontract.ResolvedWorkspace) error
func ValidatedOwnedPaths ¶ added in v0.8.0
func ValidatedOwnedPaths(ctx context.Context, w devcontract.ResolvedWorkspace) ([]string, error)
ValidatedOwnedPaths returns exact currently validated producer boundaries. It grants no mutation authority and never adopts an unrecorded output tree.
Types ¶
type Conflict ¶ added in v0.32.0
type Conflict struct {
Code string `json:"code"`
Producer Producer `json:"producer"`
Consumer string `json:"consumer"`
Target string `json:"target"`
Ownership string `json:"ownership"`
Phase string `json:"phase"`
MetadataPath string `json:"metadataPath,omitempty"`
Stage string `json:"stage,omitempty"`
Backup string `json:"backup,omitempty"`
PreservedAt string `json:"preservedAt,omitempty"`
ChangedPaths []string `json:"changedPaths,omitempty"`
MoreChanges bool `json:"moreChanges,omitempty"`
Differences []Difference `json:"differences,omitempty"`
LifecyclePhase string `json:"lifecyclePhase,omitempty"`
NextCommands [][]string `json:"nextCommands,omitempty"`
Guidance string `json:"guidance"`
// contains filtered or unexported fields
}
Conflict describes one exact producer boundary. It never grants permission to delete, adopt, or overwrite bytes, and never attributes changes to a process.
type Difference ¶ added in v0.32.0
type Difference struct {
Path string `json:"path"`
ActualKind string `json:"actualKind"`
ExpectedKind string `json:"expectedKind"`
}
Difference exposes file kinds, not hashes, contents, or writer attribution.
type Inspection ¶ added in v0.32.0
type Inspection struct {
Ready bool `json:"ready"`
Scope string `json:"scope"`
MetadataPath string `json:"metadataPath"`
MetadataDirectory string `json:"metadataDirectory"`
Restoring bool `json:"restoring"`
LifecyclePhase string `json:"lifecyclePhase,omitempty"`
ReentryGuidance string `json:"reentryGuidance,omitempty"`
Entries []OwnershipEntry `json:"entries"`
}
func Inspect ¶ added in v0.32.0
func Inspect(ctx context.Context, w devcontract.ResolvedWorkspace, requests []Request) (Inspection, error)
Inspect observes all recorded producers plus requested admission boundaries. It creates no directories, lock files, journals, or writer capabilities. The result is a point-in-time observation, never authorization for later mutation.
type OwnershipEntry ¶ added in v0.32.0
type Reconciliation ¶ added in v0.32.0
type Reconciliation struct {
Target string `json:"target"`
PreservedAt string `json:"preservedAt"`
RestoredBaseline bool `json:"restoredBaseline"`
}
func Reconcile ¶ added in v0.32.0
func Reconcile(ctx context.Context, w devcontract.ResolvedWorkspace, consumer, producer, preserveAt string) (Reconciliation, error)
Reconcile preserves one explicitly selected staged producer by renaming it to a new external path. Unowned bytes receive only preservation authority, never admission as producer output. The caller holds lifecycle and stopped guards. A durable intent makes an interrupted preservation retryable with exact args.
type Request ¶ added in v0.32.0
Request selects a producer using the same boundaries as writer admission. Modules requests include the aggregate root and all selected package roots.
func ModuleRequest ¶ added in v0.32.0
ModuleRequest selects immutable dependency ownership, not a cache exemption.
type Stage ¶
type Stage struct {
Directory string
// contains filtered or unexported fields
}
func Prepare ¶
func Prepare(ctx context.Context, w devcontract.ResolvedWorkspace, consumer string, kind Producer) (*Stage, error)
type ViteBuild ¶ added in v0.7.0
type ViteBuild struct {
// contains filtered or unexported fields
}
ViteBuild owns one finite ordered canonical build, not reusable validation. Finish requires every actual producer and descendant to have joined.
func BeginViteBuild ¶ added in v0.7.0
func BeginViteBuild(ctx context.Context, w devcontract.ResolvedWorkspace, plan devcompose.Plan, consumers []string) (*ViteBuild, error)
func (*ViteBuild) Environment ¶ added in v0.7.0
Environment checks each actual consumer immediately before its producer. Immutable aggregate content is never accepted from an intermediate image.
type Writer ¶
type Writer struct {
Environment []string
// contains filtered or unexported fields
}
Writer is a real process-lifetime capability. Finish is legal only after the actual command and its owned descendants have stopped, never on transport loss.
func BeginCompositionInstall ¶
func BeginCompositionInstall(ctx context.Context, w devcontract.ResolvedWorkspace, p devcompose.Plan) (*Writer, error)
BeginCompositionInstall reserves only the fixed feature modules directory and actual packages selected by the validated composition. The returned capability must outlive the install command and all its descendants; uncertain disposal must retain it without calling Finish.
func BeginInstall ¶
func BeginInstall(ctx context.Context, w devcontract.ResolvedWorkspace, consumerRoot string) (*Writer, error)
func BeginVite ¶
func BeginVite(ctx context.Context, w devcontract.ResolvedWorkspace, consumerRoot string) (*Writer, error)
Source Files
¶
- conflict.go
- handles.go
- identity_unix.go
- inspection.go
- journal.go
- journal_read.go
- observe_path_other.go
- open_snapshot_unix.go
- owned_paths.go
- path_conflict.go
- preserve.go
- preserve_linux.go
- private_directory.go
- publication_inspection.go
- publication_state.go
- published.go
- reconcile.go
- reset.go
- restoration_batch.go
- restore.go
- scope.go
- snapshot.go
- validation.go
- writer.go