Interface
What other programs can rely on from lnk cloud, and where the
commands a cloud adapter, lnk-<kind>, answers are. An adapter whose
account hosts agents answers the agent plugin's commands too, its own
contract's.
lnk cloud
The two commands other programs read, each printing JSON and never an account's keys.
lnk cloud list --json
[{"name", "kind", "place", "identity", "login"}], one entry per
connected account. Read by lnk agent move (whether where it goes is a
cloud account) and lnk agent list (the accounts to ask whether they
host agents).
lnk cloud env <name> --json
One account as link_cloud_contract::Account: {"name", "kind", "place", "identity", "login", "region"?, "profile"?, "project"?, "settings"?, "env"}. Exits nonzero when there's no such account.
Its settings and env
settings holds ordinary selectors and credential-file paths, and
env guarded credential values. The adapter combines them only for an
explicitly authorized cloud CLI child.
Who reads it
lnk box, lnk bucket, and lnk agent move and list (an account
that hosts agents), for every adapter call, which each then makes
itself (link_cloud_contract::call); and lnk bucket backend create --cloud and connect --cloud.
Cloud adapters (lnk-<kind>)
What lnk-aws and lnk-gcp answer, each command reading a request on
stdin and printing a reply, is the contract crate's:
Cloud Adapters.
Accounts from an existing sign-in
An installed plugin may answer cloud.accounts, the typed
link_cloud_contract::ACCOUNTS question. It reads {} and returns
{"accounts": [...]} in Account's shape. list and env include
these accounts without saving them. A discovered name may match a saved
account only when its adapter kind and identity match; a conflict fails.