authorize

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package authorize implements the `aiwf authorize ` verb (per-verb subpackage of M-0116; cmd/aiwf/main.go's newRootCmd wires it via NewCmd).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd() *cobra.Command

NewCmd builds `aiwf authorize <id>` in its three modes:

aiwf authorize <id> --to <agent> [--reason "..."] [--force]
aiwf authorize <id> --pause "<reason>"
aiwf authorize <id> --resume "<reason>"

Exactly one of --to / --pause / --resume must be set. The dispatcher resolves the actor (must be human/), locks the repo, loads the existing scopes for the entity from git log (so --pause / --resume can find their target), and hands off to verb.Authorize.

Per docs/pocv3/design/provenance-model.md §"The aiwf authorize verb" the `--reason` argument has a different role per mode:

  • --to: optional; the rationale the human writes when opening a scope.
  • --pause / --resume: required; the argument to the flag is itself the reason (e.g. `--pause "blocked by E-09"`). Passing both `--pause "..."` and `--reason "..."` is a usage error.

func Run

func Run(id, actor, root, to, pause, resume, reason string, force bool) int

Run executes `aiwf authorize`. Returns one of the cliutil.Exit* codes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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