Skip to main content

Module update

Module update 

Source
Expand description

kb update, and the app’s update: installs the latest release over this one, by running the installer the README gives, which downloads it, checks its checksum and replaces the binaries, then runs the new version’s init --all, so none of that is repeated here. Never while an agent works on a task: init --all would rewrite its instructions and a migration its data mid-session.

Enums§

Install
How the running program was installed, which says how to update it.

Constants§

INSTALL_PS1
The installer for Windows, likewise.

Functions§

agents_working
The tasks agents are working on, in doing, in every registered repository and the central brain, as shop/api #3 title (#3 title in the central brain), as kb status names them: an update waits for them. A brain that can’t be read, such as one a newer kanbrain wrote, has none to wait for.
cargo_update_command
The cargo install that updates program to release (X.Y.Z), or to the latest when it isn’t known. The crate kanbrain on crates.io is the command line, whose latest cargo installs; the kanban app’s, kanbrain-app, isn’t there (GPUI comes from git), so it comes from the repository, at the release’s tag, else at main, which is the latest release. The app is told apart by its name, kanbrain: Program says nothing else about it, and a field it gained would break code building one.
check_no_agent_working
Refuses while agents_working finds any, naming them.
clear_installer_choices_ps1
PowerShell that clears [INSTALLER_CHOICES] in its session, to run before the installer there.
hide_console
Keeps a console window from flashing up when the app, which has none, runs a program on Windows.
install_of
How the program at exe was installed.
newer_release
The latest release’s version, X.Y.Z, when it’s newer than this one. Asks GitHub, through curl, for where its latest release is.
powershell_string
text as a PowerShell single-quoted string literal, which PowerShell reads back to exactly text, whatever its characters: for a folder or file in a command or script made for PowerShell. Nothing expands in single quotes, neither $ nor a backtick; only a single quote is special, written twice, and PowerShell takes the typographic ones (‘ ’ ‚ ‛) for one too.
run_installer
Runs the installer for app into dir, on Linux and macOS: the binaries are replaced by renaming, so the running ones carry on. captured, its messages are kept out of sight and the last of them make up the error when it fails, as the app wants; otherwise they’re printed.
updateDeprecated
update_program for kb, which this always names.
update_program
program’s update: runs the installer for the apps installed where this program is, into the same folder, unless an agent is working. On Windows it prints the PowerShell command instead, since a running program’s file can’t be replaced there. Installed with cargo install, it says how cargo updates it instead.