source: advance the checked projection

Source-Sha: 194a59adfd6c901635da7a9c18253bb2210e2426
Policy-Sha: b9b0be0ee74e55f561a803b8aef6be3c2134f5a83b46816a069a372f2eb04f4d
Tree-Digest: 4697f2e281c1c6ecafff17cf6eeb391a0a1ac0fa6e5fc429f5b473f4579c252c
This commit is contained in:
Source publisher 2026-09-21 14:39:08 +00:00
commit ffdccba10f
42 changed files with 2516 additions and 554 deletions

View file

@ -49,6 +49,8 @@ ApplicationWindow {
property string pendingProcessQuery: ""
property var approval: parse(machine.approvalJson, {
})
property var fleetJoin: parse(machine.joinJson, {
})
// The capabilities that turn "a process" into "a process that can rewrite the
// machine". Tinted so a wall of chips still reads at a glance.
readonly property var sharpCapabilities: ["CAP_SYS_ADMIN", "CAP_SYS_MODULE", "CAP_SYS_RAWIO", "CAP_SYS_PTRACE", "CAP_SYS_BOOT", "CAP_BPF", "CAP_NET_ADMIN", "CAP_NET_RAW", "CAP_DAC_READ_SEARCH", "CAP_SETUID", "CAP_SETGID"]
@ -1781,7 +1783,6 @@ ApplicationWindow {
font.pixelSize: Theme.fontMeta
Layout.preferredWidth: 100
}
}
}
@ -3004,6 +3005,243 @@ ApplicationWindow {
}
Rectangle {
id: fleetJoinCard
visible: machine.enrollment === "standalone" || machine.enrollment === "joining fleet"
Layout.fillWidth: true
Layout.preferredHeight: visible ? fleetJoinColumn.implicitHeight + 30 : 0
color: Theme.surface
radius: Theme.radius
border.width: 1
border.color: machine.enrollment === "joining fleet" ? Theme.warn : Theme.divider
ColumnLayout {
id: fleetJoinColumn
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: 15
spacing: 10
RowLayout {
Layout.fillWidth: true
ColumnLayout {
spacing: 2
Text {
text: "JOIN THIS MACHINE TO A FLEET"
color: Theme.text
font.pixelSize: 11
font.weight: 750
font.letterSpacing: 1
}
Text {
text: "Keep this machine's identity. Replace its local signing authority with the fleet Server key."
color: Theme.dim
font.pixelSize: 10
}
}
Item {
Layout.fillWidth: true
}
Text {
text: machine.enrollment === "joining fleet" ? "CONVERGING" : "ONE WAY"
color: machine.enrollment === "joining fleet" ? Theme.warn : Theme.red
font.pixelSize: 9
font.weight: 750
font.letterSpacing: 1
}
}
RowLayout {
Layout.fillWidth: true
spacing: 8
Button {
text: machine.joinSeed.length ? "New host seed" : "Create host seed"
enabled: !machine.joinRunning && machine.enrollment === "standalone"
onClicked: machine.prepareFleetJoin()
background: Rectangle {
color: parent.pressed ? Theme.hover : Theme.raised
border.width: 1
border.color: Theme.divider
radius: Theme.radiusSm
}
contentItem: Text {
text: parent.text
color: parent.enabled ? Theme.text : Theme.faint
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pixelSize: 11
font.weight: 650
}
}
TextField {
id: fleetJoinSeed
Layout.fillWidth: true
text: machine.joinSeed
readOnly: true
selectByMouse: true
placeholderText: "Create the host proof seed first"
color: Theme.cyan
placeholderTextColor: Theme.faint
font.family: Theme.mono
background: Rectangle {
color: Theme.raised
border.width: 1
border.color: fleetJoinSeed.activeFocus ? Theme.cyan : Theme.divider
radius: Theme.radiusSm
}
}
}
Text {
Layout.fillWidth: true
text: "In RedFlag Web, create a one-seat fleet join key using this host seed. Then return here with the key."
color: Theme.faint
font.pixelSize: 10
wrapMode: Text.Wrap
}
GridLayout {
Layout.fillWidth: true
columns: 2
columnSpacing: 8
rowSpacing: 4
Text {
text: "SERVER URL"
color: Theme.faint
font.pixelSize: 9
font.weight: 700
}
Text {
text: "ONE-SEAT JOIN KEY"
color: Theme.faint
font.pixelSize: 9
font.weight: 700
}
TextField {
id: fleetJoinServer
Layout.fillWidth: true
placeholderText: "https://redflag.example"
color: Theme.text
placeholderTextColor: Theme.faint
background: Rectangle {
color: Theme.raised
border.width: 1
border.color: fleetJoinServer.activeFocus ? Theme.red : Theme.divider
radius: Theme.radiusSm
}
}
TextField {
id: fleetJoinToken
Layout.fillWidth: true
placeholderText: "Paste the join key"
echoMode: TextInput.Password
color: Theme.text
placeholderTextColor: Theme.faint
font.family: Theme.mono
background: Rectangle {
color: Theme.raised
border.width: 1
border.color: fleetJoinToken.activeFocus ? Theme.red : Theme.divider
radius: Theme.radiusSm
}
}
}
CheckBox {
id: fleetJoinConfirm
enabled: machine.enrollment === "standalone" && !machine.joinRunning
text: "Retire this machine's standalone signing key and local mint permission."
contentItem: Text {
text: parent.text
color: parent.checked ? Theme.warn : Theme.dim
font.pixelSize: 11
leftPadding: parent.indicator.width + parent.spacing
}
}
RowLayout {
Layout.fillWidth: true
Text {
Layout.fillWidth: true
text: app.fleetJoin.error || (app.fleetJoin.restart_required ? "Fleet authority installed. The Agent is restarting into fleet mode." : "")
color: app.fleetJoin.error ? Theme.bad : Theme.good
font.pixelSize: 10
font.family: Theme.mono
wrapMode: Text.Wrap
}
Button {
text: machine.joinRunning ? "Joining…" : machine.enrollment === "joining fleet" ? "Restarting Agent…" : "Join fleet"
enabled: machine.enrollment === "standalone" && !machine.joinRunning && fleetJoinConfirm.checked && fleetJoinSeed.text.length > 0 && fleetJoinServer.text.trim().length > 0 && fleetJoinToken.text.trim().length > 0
onClicked: machine.joinFleet(fleetJoinServer.text.trim(), fleetJoinToken.text.trim(), fleetJoinSeed.text.trim())
background: Rectangle {
color: !parent.enabled ? Theme.raised : parent.pressed ? Qt.darker(Theme.red, 1.15) : Theme.red
radius: Theme.radiusSm
}
contentItem: Text {
text: parent.text
color: parent.enabled ? "white" : Theme.faint
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pixelSize: 11
font.weight: 650
}
}
}
Connections {
function onJoinFinished(success) {
if (success) {
fleetJoinToken.text = "";
fleetJoinConfirm.checked = false;
}
}
target: machine
}
}
}
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 100