Managed Update
Delegate self-updates for orz-managed copies to orz upgrade <package>. Each upstream tool needs to integrate the handoff into its updater.
Recognize a managed launch
When a shim or orz run -- <command> selects an installed package command directly, orz sets two child environment variables.
ORZ_PACKAGEis the catalog package name, which can differ from the exported command.ORZ_EXECUTABLEis the absolute path to the orz launcher. For a shim launch, the shared.orz-shimexecutable accepts the upgrade handoff.
Treat inherited values as hints. Resolve the running executable's path and check that it is inside the resolved local orz store and belongs to the named package. Verify the launcher against a trusted local orz installation identified independently of the environment variables.
Hand off an update
An integrated Flog updater passes upgrade and flog as separate arguments to the verified launcher. Preserve the working directory and standard streams and propagate the exit status. Only orz writes installed copies in its store.
The current handoff follows the catalog default. A pin in orz.toml in the current directory or a parent blocks the upgrade. To change the pin explicitly, run orz use flog@default from the directory containing it.
A copy launched directly from the store is still managed. If the launch variables are missing or invalid, leave the copy untouched and direct the user to orz upgrade <package> with their trusted launcher. A verified standalone copy keeps its native updater. If ownership is uncertain, stop before writing to the copy.
Proposed channel switching
Channel forwarding requires future support in orz and upstream updaters. A managed flog update --channel unstable would delegate to orz upgrade flog --channel unstable. A managed rp update --channel unstable would likewise delegate to orz upgrade rp --channel unstable. Standalone installs keep their native channel behavior.
orz would accept published channels such as stable, alpha, and unstable. It would save the selected channel with the exact installed release after a successful update and record the verified upstream Run and artifact digest for rolling channels. Later updates without a channel would follow the saved choice. Normal launches would use the installed build offline. Project pins would still block managed upgrades, and an unknown channel would leave both the saved channel and installed selection unchanged.