Windows agent improvements and dependency workflow fixes

- Added system info reporting to agent main loop
- Updated README with current project status and screenshots
- Fixed a few workflow quirks
This commit is contained in:
Fimeg
2025-10-17 16:26:21 -04:00
parent 2ade509b63
commit 4ef5216c89
10 changed files with 537 additions and 66 deletions

View File

@@ -222,7 +222,10 @@ func (q *UpdateQueries) SetCheckingDependencies(id uuid.UUID) error {
return err
}
// SetPendingDependencies marks an update as having dependencies that need approval
// SetPendingDependencies stores dependency information and sets status based on whether dependencies exist
// If dependencies array is empty, this function only updates metadata without changing status
// (the handler should auto-approve and proceed to installation in this case)
// If dependencies array has items, status is set to 'pending_dependencies' requiring manual approval
func (q *UpdateQueries) SetPendingDependencies(agentID uuid.UUID, packageType, packageName string, dependencies []string) error {
// Marshal dependencies to JSON for database storage
depsJSON, err := json.Marshal(dependencies)
@@ -230,6 +233,9 @@ func (q *UpdateQueries) SetPendingDependencies(agentID uuid.UUID, packageType, p
return fmt.Errorf("failed to marshal dependencies: %w", err)
}
// Note: When dependencies array is empty, the handler should bypass this status change
// and proceed directly to installation. This function still records the empty array
// in metadata for audit purposes before the handler transitions to 'installing'.
query := `
UPDATE current_package_state
SET status = 'pending_dependencies',