Documentation
¶
Index ¶
- Constants
- Variables
- func EnsureHarness(reqs []require.Requirement, flowPath ...string) (string, error)
- func EnsureHarnessCLIContext(ctx context.Context, reqs []require.Requirement, flowPath ...string) (string, error)
- func EnsureHarnessContext(ctx context.Context, reqs []require.Requirement, flowPath ...string) (string, error)
- func EnsureThinHarnessContext(ctx context.Context, reqs []require.Requirement, flowPath ...string) (string, error)
- func ExecHarness(bin string, args []string) int
- func ExecHarnessContext(ctx context.Context, bin string, args []string) int
- func FlowModuleRoot() (string, error)
- func GitCommit(ctx context.Context, dir string) string
- func GitDescribe(ctx context.Context, dir string) string
- func Print(w interface{ ... })
- func ResetRequirementSource(ctx context.Context, file string) error
- func ResolvedBuildInfo() (version, commit, builtAt string)
- func RunBuild(ctx context.Context, args []string, ...) int
- func SourceRequires(ctx context.Context, path string) ([]require.Requirement, error)
- func WithGoDiagnostics(ctx context.Context) context.Context
- type RequirementChange
- type RequirementSourceResult
Constants ¶
const ( HarnessEnv = "NFLOW_HARNESS" // HarnessFallbackExitCode is reserved for thin-harness refusal; workflow // execution must not return it because the CLI treats it as a retry request. HarnessFallbackExitCode = 125 )
HarnessEnv marks a process as running inside an external-module harness.
Variables ¶
var ( Version = "dev" Commit = unknownValue BuiltAt = unknownValue )
Functions ¶
func EnsureHarness ¶
func EnsureHarness(reqs []require.Requirement, flowPath ...string) (string, error)
func EnsureHarnessCLIContext ¶ added in v0.48.0
func EnsureHarnessCLIContext(ctx context.Context, reqs []require.Requirement, flowPath ...string) (string, error)
EnsureHarnessCLIContext builds the compatibility harness that delegates to the full CLI. It is used when the thin runner cannot preserve CLI semantics.
func EnsureHarnessContext ¶
func EnsureThinHarnessContext ¶ added in v0.48.0
func EnsureThinHarnessContext(ctx context.Context, reqs []require.Requirement, flowPath ...string) (string, error)
EnsureThinHarnessContext builds the optimized runner for supported run invocations only.
func ExecHarness ¶
func ExecHarnessContext ¶
func FlowModuleRoot ¶
FlowModuleRoot locates the Nexss Flow source module using the running executable or current working directory. It is shared by the CLI and the builder so both use the same module-root detection logic.
func GitDescribe ¶
GitDescribe returns the closest tag or revision for a source directory.
func ResetRequirementSource ¶ added in v0.37.0
ResetRequirementSource restores the last pre-change bytes and consumes the optional backup. No resolver, lockfile, or Go metadata is involved.
func ResolvedBuildInfo ¶
func ResolvedBuildInfo() (version, commit, builtAt string)
func RunBuild ¶
func RunBuild(ctx context.Context, args []string, sourceRequires func(context.Context, string) ([]require.Requirement, error)) int
RunBuild builds the workflow binary using the supplied requirement resolver. The resolver is injected by the CLI so its active native bundle set is honored.
func SourceRequires ¶
SourceRequires resolves @require declarations using the shipped native directives.
Types ¶
type RequirementChange ¶ added in v0.37.0
RequirementChange describes a direct declaration in the named source file. Skipped declarations have a Reason; no provider metadata is persisted.
type RequirementSourceResult ¶ added in v0.37.0
type RequirementSourceResult struct {
Changes []RequirementChange
Changed bool
Backup string
}
RequirementSourceResult is an inspection or a completed source edit.
func ManageRequirementSource ¶ added in v0.37.0
func ManageRequirementSource(ctx context.Context, file, operation, pattern string, table *compiler.DirectiveTable) (RequirementSourceResult, error)
ManageRequirementSource shares parsing, provider selection and writing across check, update and pin. The supplied directive table preserves CLI extensions. Only direct declarations in file are edited; imported sources are untouched.