Add native Windows support (#91)

- Native Windows daemon using TCP loopback endpoints
- Direct-mode fallback for CLI/daemon compatibility
- Comment operations over RPC
- PowerShell installer script
- Go 1.24 requirement
- Cross-OS testing documented

Co-authored-by: danshapiro <danshapiro@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-c6230265-055f-4af1-9712-4481061886db
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-20 21:08:49 -07:00
parent 94a23cae39
commit a86f3e139e
58 changed files with 1707 additions and 729 deletions

View File

@@ -107,14 +107,15 @@ Default threshold: 300 seconds (5 minutes)`,
// getStaleIssues queries for issues with execution_state where executor is dead/stopped
func getStaleIssues(thresholdSeconds int) ([]*StaleIssueInfo, error) {
// If daemon is running but doesn't support this command, use direct storage
if daemonClient != nil && store == nil {
var err error
store, err = sqlite.New(dbPath)
if err != nil {
// Ensure we have a direct store when daemon lacks stale support
if daemonClient != nil {
if err := ensureDirectMode("daemon does not support stale command"); err != nil {
return nil, fmt.Errorf("failed to open database: %w", err)
}
} else if store == nil {
if err := ensureStoreActive(); err != nil {
return nil, fmt.Errorf("failed to open database: %w", err)
}
defer store.Close()
}
ctx := context.Background()
@@ -196,14 +197,15 @@ func getStaleIssues(thresholdSeconds int) ([]*StaleIssueInfo, error) {
// releaseStaleIssues releases all stale issues by deleting execution state and resetting status
func releaseStaleIssues(staleIssues []*StaleIssueInfo) (int, error) {
// If daemon is running but doesn't support this command, use direct storage
if daemonClient != nil && store == nil {
var err error
store, err = sqlite.New(dbPath)
if err != nil {
// Ensure we have a direct store when daemon lacks stale support
if daemonClient != nil {
if err := ensureDirectMode("daemon does not support stale command"); err != nil {
return 0, fmt.Errorf("failed to open database: %w", err)
}
} else if store == nil {
if err := ensureStoreActive(); err != nil {
return 0, fmt.Errorf("failed to open database: %w", err)
}
defer store.Close()
}
ctx := context.Background()