app

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package app holds the use cases of the CLI. It reaches the Bootstrap, the terminal, Git and processes only through ports, and never decides what GTT means: it resolves, selects, invokes and reports.

Index

Constants

View Source
const (
	Pass            = "PASS"
	Warn            = "WARN"
	Fail            = "FAIL"
	CannotDetermine = "CANNOT DETERMINE"
)

Check levels of `gtt doctor`.

View Source
const DefaultSourceType = "design-document"

DefaultSourceType is the Bootstrap source type recorded when the human did not state one.

Variables

This section is empty.

Functions

func ParseSource

func ParseSource(arg string) lifecycle.Source

ParseSource splits a "path[:type]" argument.

Types

type AgentsSyncResult

type AgentsSyncResult struct {
	Schema      int                `json:"schema"`
	Environment agents.Environment `json:"environment"`
	Synced      []string           `json:"synchronized"`
	Added       []string           `json:"added"`
	Plan        string             `json:"plan,omitempty"`
	Source      string             `json:"source,omitempty"`
	Changed     bool               `json:"changed"`
}

AgentsSyncResult reports a synchronisation.

type App

type App struct {
	Factory   ports.BootstrapFactory
	Resolver  ports.Resolver
	Installer ports.Installer
	Signer    ports.ReleaseSigner
	Runner    ports.Runner
	Git       ports.Git
	Prompt    ports.Prompter
	Report    ports.Reporter

	Home      string // user-level GTT home
	Cwd       string
	AssumeYes bool // the human pre-answered confirmations with --yes
	// Lang is the interaction language of this invocation; nil is English.
	Lang *core.Language
}

App is the set of use cases, wired by the composition root.

func (*App) AgentsCheck

func (a *App) AgentsCheck(ctx context.Context) (agents.Environment, error)

AgentsCheck reports the agent environment. Nothing is modified.

func (*App) AgentsSync

func (a *App) AgentsSync(ctx context.Context, add []string, opts ResolveOptions) (AgentsSyncResult, error)

AgentsSync restores the managed context of declared agents from the authorised source: the Bootstrap catalog the project was installed from. It is idempotent. `add` names agents the human wants to incorporate.

func (*App) ArtifactNextID

func (a *App) ArtifactNextID(ctx context.Context, kind, requested string) (NextID, error)

ArtifactNextID asks the Bootstrap for the next free artifact id.

func (*App) Audit

func (a *App) Audit(ctx context.Context) (AuditResult, error)

Audit collects traceability information from the Bootstrap and from the CLI's own records.

func (*App) ChangeRequest added in v1.7.0

func (a *App) ChangeRequest(ctx context.Context, o ChangeOptions) (ChangeState, error)

ChangeRequest records the human's change request through the Bootstrap. What it does not get from flags it asks; without a terminal, the change and its reason are required. The agent is told to process it through the session's next action - it drafts a proposal and decides nothing.

func (*App) ChangeShow added in v1.7.0

func (a *App) ChangeShow(ctx context.Context) (ChangeState, error)

ChangeShow is `gtt change show`.

func (*App) Check added in v1.7.0

func (a *App) Check(ctx context.Context) (CheckResult, error)

Check verifies the code against the dependency rules of the ratified development method, with the language's own tool. It never corrects code or context: a forbidden dependency is reported as a conflict (exit 1). Without an adapter for the language the method is reported declared-only; with an adapter whose tool is not installed, the result cannot be determined (exit 7) - it is never reported as a pass.

func (*App) Clean

func (a *App) Clean(ctx context.Context, noSnapshot bool) (CleanResult, error)

Clean removes GTT from the current project: exactly the ownership set the Bootstrap reports, and only after an explicit human confirmation.

func (*App) ConfigLanguage

func (a *App) ConfigLanguage(ctx context.Context, lang string) error

ConfigLanguage records the interaction language through the Bootstrap.

func (*App) ConfigPrimary

func (a *App) ConfigPrimary(ctx context.Context, id string) (string, error)

ConfigPrimary changes the Primary ADE explicitly. The Bootstrap validates the change; other integrations are not reinstalled or removed.

func (*App) DesignReset added in v1.8.0

func (a *App) DesignReset(ctx context.Context, opts ResolveOptions) (DesignResetResult, error)

DesignReset starts the design over, before the first freeze: the governed context, Epic designs, ADRs and backlog go back to the Bootstrap's templates, and the elicitation working copies and SOURCE-BRIEF go away. Setup choices and recorded sources stay. Everything changed is copied to a local backup first. After a freeze there is no reset: a change to the ratified design is a change request.

func (*App) DevMethodList added in v1.7.0

func (a *App) DevMethodList(ctx context.Context, lang string) (DevMethodCatalog, error)

DevMethodList is `gtt dev-method list`.

func (*App) DevMethodShow added in v1.7.0

func (a *App) DevMethodShow(ctx context.Context) (DevMethodState, error)

DevMethodShow is `gtt dev-method`: read-only.

func (*App) Doctor

func (a *App) Doctor(ctx context.Context) (DoctorResult, error)

Doctor runs CLI-native operational diagnostics. It reports; it never repairs anything.

func (*App) ExportClean

func (a *App) ExportClean(ctx context.Context, dest string) (ExportResult, error)

ExportClean writes a clean delivery copy. The development project is not modified; what is excluded is exactly what the Bootstrap policy lists.

func (*App) Freeze

func (a *App) Freeze(ctx context.Context) (string, error)

Freeze is a facade over the Bootstrap freeze. Ratification is a human act: it is asked in a terminal and cannot be pre-answered.

func (*App) Init

func (a *App) Init(ctx context.Context, o InitOptions) (InitResult, error)

Init is the primary orchestration workflow.

func (*App) Inspect

func (a *App) Inspect(ctx context.Context) (InspectResult, error)

Inspect shows where things are. It does not interpret architecture.

func (*App) LaunchPrimary

func (a *App) LaunchPrimary(ctx context.Context) error

LaunchPrimary starts the Primary ADE in the project. It is only ever called after the human asked for it.

func (*App) MethodCheck

func (a *App) MethodCheck(ctx context.Context) (DoctorResult, error)

MethodCheck verifies that the plan configuration is coherent: a plan is selected and supported, every operating-policy value is one the CLI can execute, and the Bootstrap's own contract and validation checks pass.

func (*App) MethodSet

func (a *App) MethodSet(ctx context.Context, id string) (MethodResult, error)

MethodSet records a plan chosen by the human. Whether the transition is allowed is the Bootstrap's decision; a refusal is reported, not overridden.

func (*App) MethodShow

func (a *App) MethodShow(ctx context.Context) (MethodResult, error)

MethodShow reports the Autonomy Profile in force, in the Bootstrap's words.

func (*App) Promote added in v1.7.0

func (a *App) Promote(ctx context.Context, set string) (StepResult, error)

Promote applies a staged promotion set: the human's act, after seeing it.

func (*App) ProposalShow added in v1.7.0

func (a *App) ProposalShow(ctx context.Context, name string) (ProposalView, error)

ProposalShow is `gtt proposals show <name>`.

func (*App) ProposalWithdraw added in v1.7.0

func (a *App) ProposalWithdraw(ctx context.Context, name, by string) (StepResult, error)

ProposalWithdraw archives a draft nobody will promote (a human act).

func (*App) Proposals added in v1.7.0

func (a *App) Proposals(ctx context.Context) (ProposalsResult, error)

Proposals is `gtt proposals`.

func (*App) ReleaseKeygen

func (a *App) ReleaseKeygen(dir, id string) (ports.KeyPair, error)

ReleaseKeygen creates a release signing key pair in dir.

func (*App) ReleaseSign

func (a *App) ReleaseSign(ctx context.Context, root, keyFile string) (ports.SignResult, error)

ReleaseSign signs a Bootstrap package directory with a release key. It is a publisher's operation: it writes only the package's signature file.

func (*App) Resume

func (a *App) Resume(ctx context.Context) (ResumeResult, error)

Resume reconstructs operational context from actual state: the Bootstrap derives it from the repository, never from an agent's recollection.

func (*App) SnapshotCreate

func (a *App) SnapshotCreate(ctx context.Context) (snapshot.Info, error)

SnapshotCreate is `gtt snapshot create`.

func (*App) SnapshotList

func (a *App) SnapshotList(ctx context.Context) []snapshot.Info

SnapshotList is `gtt snapshot list`.

func (*App) SourcesApply

func (a *App) SourcesApply(ctx context.Context, paths []string) (SourcesResult, error)

SourcesApply processes the initial MDs. Paths named by the human are thereby selected.

func (*App) SourcesList

func (a *App) SourcesList(ctx context.Context) (SourcesResult, error)

SourcesList reports the tracking state without changing anything.

func (*App) Status

func (a *App) Status(ctx context.Context, withValidation bool) (StatusResult, error)

Status reports deterministic project state. It modifies nothing.

func (*App) Sync

func (a *App) Sync(ctx context.Context, opts ResolveOptions) (SyncResult, error)

Sync does the deterministic upkeep in one run: agent context, initial source tracking, and the Bootstrap's own maintenance (protection registry, index, validation). Nothing here is a governed decision.

func (*App) Undo added in v1.7.0

func (a *App) Undo(ctx context.Context, set string) (StepResult, error)

Undo puts back what the last promotion replaced. It is never an unfreeze: when that promotion froze, the Bootstrap records a new freeze over the earlier state and keeps the history.

func (*App) Update

func (a *App) Update(ctx context.Context, o UpdateOptions) (UpdateResult, error)

Update replaces the Bootstrap package content of a project with another release, transactionally. Project state - ADEs, Primary, plan, language, sources, governed artifacts - is not package content and is not touched; a package file changed since install is preserved: its difference is shown, and it is replaced only when the human confirms it in a terminal (--yes does not).

func (*App) Validate

func (a *App) Validate(ctx context.Context) (ValidateResult, error)

Validate delegates to the Bootstrap's single validation entry point. It is non-interactive, launches no ADE and modifies no governed artifact.

func (*App) Version

func (a *App) Version(ctx context.Context) VersionResult

Version reports the CLI release, the Bootstrap release it pins and, in a GTT project, the installed Bootstrap.

type AuditResult

type AuditResult struct {
	Schema     int                   `json:"schema"`
	Generated  string                `json:"generated_at"`
	Project    string                `json:"project"`
	CLI        string                `json:"cli_version"`
	Bootstrap  BootstrapInfo         `json:"bootstrap"`
	Resolution *lifecycle.Resolution `json:"resolution,omitempty"`
	Status     json.RawMessage       `json:"status"`
	Sources    json.RawMessage       `json:"sources"`
	Tracking   SourcesResult         `json:"initial_sources"`
	Validation validation            `json:"validation"`
	Snapshots  []snapshot.Info       `json:"recovery_snapshots"`
	History    []lifecycle.Event     `json:"history"`
	View       bootstrapStatus       `json:"-"`
	ADENames   map[string]string     `json:"ade_names"`
}

AuditResult is `gtt audit`: operational traceability, not governance.

type BootstrapCheck added in v1.1.0

type BootstrapCheck struct {
	Version  string `json:"version"`  // installed
	Required string `json:"required"` // the release this run requires
	Pinned   string `json:"pinned"`   // the release this CLI ships with
	Verified bool   `json:"verified"`
	// Modified are package files changed locally since they were installed;
	// Missing are package files that are gone. Neither is ever repaired
	// without the human's confirmation.
	Modified []string `json:"modified_locally,omitempty"`
	Missing  []string `json:"missing,omitempty"`
}

BootstrapCheck is what `gtt init` found when a Bootstrap was already in the project.

type BootstrapInfo

type BootstrapInfo struct {
	ID             string `json:"id"`
	Version        string `json:"version"`
	Schema         int    `json:"schema"`
	Channel        string `json:"channel"`
	ScaffoldLayout int    `json:"scaffold_layout"`
	Canon          string `json:"canon"`
	Compatibility  string `json:"compatibility"`
}

BootstrapInfo identifies the Bootstrap a project runs.

type BootstrapPin added in v1.1.0

type BootstrapPin struct {
	Version string `json:"version"`
	Tag     string `json:"tag"`
}

BootstrapPin names the Bootstrap release a CLI release ships with.

type ChangeOptions added in v1.7.0

type ChangeOptions struct {
	Change, Reason, Trigger, Scope, Impact, Risk, Priority, By string
	Replace                                                    bool
}

ChangeOptions are the request fields given on the command line.

type ChangeState added in v1.7.0

type ChangeState struct {
	Schema    int               `json:"schema"`
	State     string            `json:"state"` // absent | empty | pending | processed
	ID        string            `json:"id"`
	Fields    map[string]string `json:"fields"`
	Proposals []string          `json:"proposals"`
	// Primary is the ADE that will be told to process it (via the session's next action).
	Primary string `json:"primary,omitempty"`
}

ChangeState is the change request as the Bootstrap reads it.

type Check

type Check struct {
	Name   string `json:"name"`
	Level  string `json:"level"`
	Detail string `json:"detail,omitempty"`
}

Check is one diagnostic.

type CheckResult added in v1.7.0

type CheckResult struct {
	Schema int `json:"schema"`
	// Status: pass | conflict | declared-only | open | not-declared | cannot-determine.
	Status       string                 `json:"status"`
	Packs        []string               `json:"packs"`
	Declared     string                 `json:"declared_verification,omitempty"` // what the Method Lock declares
	Verification string                 `json:"verification"`                    // what this run actually verified
	Language     string                 `json:"language,omitempty"`
	Adapter      string                 `json:"adapter,omitempty"`
	Supported    []string               `json:"supported_languages"`
	Checked      []string               `json:"checked_rules"`
	NotInMap     []string               `json:"rules_not_in_map,omitempty"`
	AuditOnly    []string               `json:"audit_only_rules,omitempty"`
	Conflicts    []conformance.Conflict `json:"conflicts"`
	Note         string                 `json:"note,omitempty"`
}

CheckResult is `gtt check`: Method Conformance of the code.

type CleanResult

type CleanResult struct {
	Schema   int      `json:"schema"`
	Removed  []string `json:"removed"`
	Kept     []string `json:"kept"`
	Snapshot string   `json:"snapshot,omitempty"`
}

CleanResult is `gtt clean`.

type DesignResetResult added in v1.8.0

type DesignResetResult struct {
	Schema   int      `json:"schema"`
	Restored []string `json:"restored"`
	Removed  []string `json:"removed"`
	Backup   string   `json:"backup"`
}

DesignResetResult is `gtt design reset`.

type DevMethodCatalog added in v1.7.0

type DevMethodCatalog struct {
	Schema    int                 `json:"schema"`
	Lang      string              `json:"lang"`
	Questions []DevMethodQuestion `json:"questions"`
}

DevMethodCatalog is `gtt dev-method list`.

type DevMethodExtra added in v1.7.0

type DevMethodExtra struct {
	ID      string `json:"id"`
	Records string `json:"records"`
	Label   string `json:"label"`
	Summary string `json:"summary"`
}

DevMethodExtra is an option that is not a pack (help me choose, direct).

type DevMethodForce added in v1.7.0

type DevMethodForce struct {
	Source string `json:"source"` // lock | setup | none
	Status string `json:"status"` // ratified | open | selected | not declared
	Style  IDList `json:"style"`
	Start  string `json:"start"`
	Packs  IDList `json:"packs"`
}

DevMethodForce is what applies now: the lock, else the setup answer, else nothing.

type DevMethodLock added in v1.7.0

type DevMethodLock struct {
	Present      bool   `json:"present"`
	Style        IDList `json:"style"`
	Start        string `json:"start"`
	Status       string `json:"status"`
	LockedBy     string `json:"locked_by"`
	Verification string `json:"verification"`
	Gap          string `json:"gap"`
}

DevMethodLock is the Method Lock as the Bootstrap reads it.

type DevMethodOption added in v1.7.0

type DevMethodOption struct {
	ID               string   `json:"id"`
	Name             string   `json:"name"`
	Kind             string   `json:"kind"`
	Recommended      bool     `json:"recommended"`
	RequiresADR      bool     `json:"requires_adr"`
	Verification     string   `json:"verification"`
	WhatItIs         string   `json:"what_it_is"`
	FitsWhen         string   `json:"fits_when"`
	IncompatibleWith []string `json:"incompatible_with"`
}

DevMethodOption is one Method Pack.

type DevMethodQuestion added in v1.7.0

type DevMethodQuestion struct {
	ID       string            `json:"id"`
	Order    int               `json:"order"`
	Multiple bool              `json:"multiple"`
	Prompt   string            `json:"prompt"`
	Options  []DevMethodOption `json:"options"`
	Extra    []DevMethodExtra  `json:"extra_options"`
}

DevMethodQuestion is one setup question, as the Bootstrap declares it.

type DevMethodState added in v1.7.0

type DevMethodState struct {
	Schema    int            `json:"schema"`
	Supported bool           `json:"supported"`
	Frozen    bool           `json:"frozen"`
	InForce   DevMethodForce `json:"in_force"`
	Lock      DevMethodLock  `json:"lock"`
	Change    string         `json:"change"`
}

DevMethodState is `gtt dev-method`: the method in force, read-only.

type DoctorResult

type DoctorResult struct {
	Schema int            `json:"schema"`
	Checks []Check        `json:"checks"`
	Totals map[string]int `json:"totals"`
}

DoctorResult is `gtt doctor`.

type ExportResult

type ExportResult struct {
	Schema int `json:"schema"`
	export.Result
	KeptForReview []string `json:"kept_requires_confirmation"`
}

ExportResult is `gtt export --clean`.

type Handoff

type Handoff struct {
	PrimaryADE       string   `json:"primary_ade"`
	PrimaryName      string   `json:"primary_name"`
	InstructionEntry string   `json:"instruction_entry"`
	ReadFirst        []string `json:"read_first"`
	Questionnaire    string   `json:"questionnaire,omitempty"`
	// NextAction is the Bootstrap's own words for what the human does next
	// (elicitation handoff.next_action), set only while the Bootstrap reports
	// the questionnaire open. Empty with a Bootstrap that declares none.
	NextAction string `json:"next_action,omitempty"`
	Launchable bool   `json:"launchable"`
}

Handoff is what the CLI delivers to the Primary ADE: where the Bootstrap's own instructions are. The CLI writes no instructions.

type IDList added in v1.7.0

type IDList []string

IDList is a list of pack ids. The Bootstrap writes an undecided list as the single word OPEN; it is read as ["OPEN"].

func (*IDList) UnmarshalJSON added in v1.7.0

func (l *IDList) UnmarshalJSON(data []byte) error

UnmarshalJSON accepts a list, a single string or null.

type InitOptions

type InitOptions struct {
	Resolve       ResolveOptions
	ADEs          []string
	Primary       string
	Language      string
	Method        string
	DevStyle      string // development method: pack ids, comma separated, or "help"
	DevStart      string // how to start: a pack id, "direct" or "help"
	Sources       []string
	NoSources     bool
	Questionnaire string // "", "yes", "no"
	Launch        bool
	Resume        bool
	Rollback      bool
	Snapshot      string // explicit recovery snapshot to restore
	NoRestore     bool
}

InitOptions are the answers the human gave on the command line. Anything left empty is asked; without a terminal it is refused, never inferred.

type InitResult

type InitResult struct {
	Schema      int                  `json:"schema"`
	Outcome     string               `json:"outcome"` // initialized | already-initialized | updated | restored | rolled-back
	Project     string               `json:"project"`
	Bootstrap   lifecycle.Resolution `json:"bootstrap"`
	Selections  lifecycle.Selections `json:"selections"`
	Sources     []SourceReport       `json:"sources,omitempty"`
	Validation  string               `json:"validation"`
	Handoff     *Handoff             `json:"handoff,omitempty"`
	DesignState string               `json:"design_state"` // sources-selected | questionnaire | none
	// Installed is the check of a Bootstrap that was already in the project.
	Installed *BootstrapCheck `json:"installed_bootstrap,omitempty"`
	// Update is what changed when the human confirmed moving it to the
	// required release.
	Update *UpdateResult `json:"update,omitempty"`
	// DevMethodNote says why init does not ask the development method again.
	DevMethodNote string `json:"dev_method_note,omitempty"`
}

InitResult is the outcome of `gtt init`.

type InspectResult

type InspectResult struct {
	Schema       int                   `json:"schema"`
	ProjectRoot  string                `json:"project_root"`
	GitRoot      string                `json:"git_root,omitempty"`
	CLI          string                `json:"cli_version"`
	Bootstrap    BootstrapInfo         `json:"bootstrap"`
	Resolution   *lifecycle.Resolution `json:"resolution,omitempty"`
	Capabilities []ports.Capability    `json:"capabilities"`
	Operations   []string              `json:"operations"`
	Agents       agents.Environment    `json:"agents"`
	Plan         methodology.Plan      `json:"methodology"`
	Sources      json.RawMessage       `json:"sources"`
	Scaffold     []string              `json:"scaffold_paths"`
	OwnedByGTT   json.RawMessage       `json:"gtt_owned"`
	Templates    json.RawMessage       `json:"templates"`
	Frozen       bool                  `json:"frozen"`
	Session      bool                  `json:"session_exists"`
}

InspectResult is `gtt inspect`: topology and installation state.

type LastPromotion added in v1.7.0

type LastPromotion struct {
	Promotion *struct {
		Name  string   `json:"name"`
		At    string   `json:"at"`
		Files []string `json:"files"`
		Froze bool     `json:"froze"`
	} `json:"promotion"`
	Undoable bool     `json:"undoable"`
	Problems []string `json:"problems"`
}

LastPromotion is what `gtt undo` would put back.

type MethodResult

type MethodResult struct {
	Schema  int                  `json:"schema"`
	Plan    methodology.Plan     `json:"plan"`
	Choices []methodology.Choice `json:"choices,omitempty"`
}

MethodResult is `gtt autonomy show` (alias: gtt method).

type NextID

type NextID struct {
	Schema     int             `json:"schema"`
	ID         string          `json:"id"`
	Resolution string          `json:"resolution"`
	Automatic  bool            `json:"automatic"`
	Detail     json.RawMessage `json:"detail"`
}

NextID is the artifact identity allocator: the Bootstrap finds the next free id; under a plan that resolves identity automatically the CLI simply reports the id to use, otherwise it reports a proposal.

type Project

type Project struct {
	Root      string
	Detection project.Detection
	B         ports.Bootstrap
	Release   ports.Release
	Store     lifecycle.Store
}

Project is an installed project bound to its Bootstrap runtime.

type Proposal added in v1.7.0

type Proposal struct {
	Name    string   `json:"name"`
	Path    string   `json:"path"`
	Kind    string   `json:"kind"`
	Title   string   `json:"title"`
	Request string   `json:"request"`
	State   string   `json:"state"`
	Files   []string `json:"files,omitempty"`
}

Proposal is one draft under gtt-domain/proposals/.

type ProposalView added in v1.7.0

type ProposalView struct {
	Schema   int      `json:"schema"`
	Proposal Proposal `json:"proposal"`
	Content  string   `json:"content"`
}

ProposalView is `gtt proposals show`.

type ProposalsResult added in v1.7.0

type ProposalsResult struct {
	Schema    int         `json:"schema"`
	Request   ChangeState `json:"request"`
	Proposals []Proposal  `json:"proposals"`
}

ProposalsResult is `gtt proposals`.

type ResolveOptions

type ResolveOptions struct {
	Path    string
	Version string
	Offline bool
}

ResolveOptions are the human's Bootstrap resolution flags.

type ResumeResult

type ResumeResult struct {
	Schema      int             `json:"schema"`
	Project     string          `json:"project"`
	Context     json.RawMessage `json:"session_context"` // the Bootstrap document, verbatim
	Text        string          `json:"-"`
	Interrupted string          `json:"interrupted_init,omitempty"`
	Handoff     *Handoff        `json:"handoff,omitempty"`
}

ResumeResult is `gtt resume`: session context derived from project state.

type SourceReport

type SourceReport struct {
	Path    string `json:"path"`
	State   string `json:"state"`
	Outcome string `json:"outcome"` // applied | unchanged | pending | failed
	Reason  string `json:"reason,omitempty"`
}

SourceReport is the outcome for one initial MD.

type SourcesResult

type SourcesResult struct {
	Schema  int            `json:"schema"`
	Sources []SourceReport `json:"sources"`
	// contains filtered or unexported fields
}

SourcesResult is the result of a tracking run.

func (SourcesResult) Failed

func (r SourcesResult) Failed() bool

Failed reports whether any document failed.

type StatusResult

type StatusResult struct {
	Schema    int                `json:"schema"`
	Project   string             `json:"project"`
	CLI       string             `json:"cli_version"`
	Bootstrap BootstrapInfo      `json:"bootstrap"`
	ADENames  map[string]string  `json:"ade_names"`
	Status    json.RawMessage    `json:"status"` // the Bootstrap status document, verbatim
	Agents    agents.Environment `json:"agents"`
	Sources   SourcesResult      `json:"initial_sources"`
	View      bootstrapStatus    `json:"-"`
}

StatusResult is `gtt status`.

type StepResult added in v1.7.0

type StepResult struct {
	Schema  int    `json:"schema"`
	Action  string `json:"action"`
	Target  string `json:"target,omitempty"`
	Applied bool   `json:"applied"`
	Output  string `json:"output"`
}

StepResult reports a human act carried out through the Bootstrap.

type SyncResult

type SyncResult struct {
	Schema   int              `json:"schema"`
	Agents   AgentsSyncResult `json:"agents"`
	Sources  SourcesResult    `json:"initial_sources"`
	Maintain string           `json:"maintain"`
	Pending  bool             `json:"human_action_pending"`
}

SyncResult is `gtt sync`.

type UpdateOptions

type UpdateOptions struct {
	Resolve  ResolveOptions
	Base     string // catalog of the installed version, when no install ledger exists
	Rollback bool
}

UpdateOptions are the flags of `gtt update`.

type UpdateResult

type UpdateResult struct {
	Schema    int      `json:"schema"`
	Outcome   string   `json:"outcome"` // updated | already-current | rolled-back
	From      string   `json:"from"`
	To        string   `json:"to"`
	Replaced  []string `json:"replaced"`
	Added     []string `json:"added"`
	Removed   []string `json:"removed"`
	Preserved []string `json:"preserved_modified"`
	// Overwritten are locally modified files the human confirmed replacing.
	Overwritten []string `json:"replaced_modified,omitempty"`
	Snapshot    string   `json:"snapshot,omitempty"`
}

UpdateResult is `gtt update`.

type ValidateResult

type ValidateResult struct {
	Schema    int        `json:"schema"`
	Bootstrap string     `json:"bootstrap_version"`
	Result    string     `json:"result"`
	Report    validation `json:"report"`
}

ValidateResult is `gtt validate`: the Bootstrap's verdict, unaltered.

type VersionResult

type VersionResult struct {
	Schema       int      `json:"schema"`
	CLI          string   `json:"cli_version"`
	Capabilities []string `json:"cli_capabilities"`
	Schemas      []int    `json:"bootstrap_schemas"`
	// Pinned is the Bootstrap release this CLI release ships with.
	Pinned    BootstrapPin `json:"pinned_bootstrap"`
	Bootstrap *struct {
		Version       string `json:"version"`
		Schema        int    `json:"schema"`
		Channel       string `json:"channel"`
		Compatibility string `json:"compatibility"`
		MatchesPin    bool   `json:"matches_pin"`
	} `json:"bootstrap,omitempty"`
}

VersionResult is `gtt version`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL