{"id":51475370,"url":"https://github.com/asmuelle/agent-postgres","last_synced_at":"2026-07-06T20:30:34.060Z","repository":{"id":365534117,"uuid":"1260536527","full_name":"asmuelle/agent-postgres","owner":"asmuelle","description":"pgAgent — native macOS \u0026 iPadOS PostgreSQL \u0026 SSH workspace: terminal, SFTP, and database tooling over a memory-safe Rust core bridged to Swift with UniFFI.","archived":false,"fork":false,"pushed_at":"2026-06-25T10:51:48.000Z","size":2191,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-25T12:20:12.825Z","etag":null,"topics":["developer-tools","ipados","macos","postgresql","rust","sftp","ssh","swift","swiftui","terminal","uniffi"],"latest_commit_sha":null,"homepage":"https://asmuelle.github.io/agent-postgres/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asmuelle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"Security_Patch_Monitor.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":"CLA.md"}},"created_at":"2026-06-05T15:42:58.000Z","updated_at":"2026-06-25T10:51:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/asmuelle/agent-postgres","commit_stats":null,"previous_names":["asmuelle/agent-postgres"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/asmuelle/agent-postgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmuelle%2Fagent-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmuelle%2Fagent-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmuelle%2Fagent-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmuelle%2Fagent-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asmuelle","download_url":"https://codeload.github.com/asmuelle/agent-postgres/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmuelle%2Fagent-postgres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35205739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","ipados","macos","postgresql","rust","sftp","ssh","swift","swiftui","terminal","uniffi"],"created_at":"2026-07-06T20:30:33.080Z","updated_at":"2026-07-06T20:30:34.041Z","avatar_url":"https://github.com/asmuelle.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pgAgent\n\n[![CI](https://github.com/asmuelle/agent-postgres/actions/workflows/ci.yml/badge.svg)](https://github.com/asmuelle/agent-postgres/actions/workflows/ci.yml)\n\nNative macOS / iPadOS SSH workspace. AppKit + SwiftUI shell, SwiftTerm for the PTY, [`ssh-commander-core`](https://github.com/asmuelle/ssh-commander-core) for the protocol layer, [uniffi](https://mozilla.github.io/uniffi-rs/) for the FFI bridge.\n\n\n## Stack\n\n| Layer | Lives in | Notes |\n|-------|----------|-------|\n| App shell | `PgAgentApp/`, `PgAgentMobile/` | AppKit window + SwiftUI views, SwiftTerm |\n| Swift framework | `Sources/PgAgentMacOS/` | Cross-target models, stores |\n| FFI bridge | `src/` | Rust → Swift via uniffi proc-macros |\n| Generated bindings | `bindings/` | `midnight_ssh.swift`, `midnight_sshFFI.h`, `module.modulemap` |\n| Protocol layer | crates.io: `ssh-commander-core`, `ssh-commander-pg-parquet` | external |\n| Xcode project | `Mc-Ssh.xcodeproj` | generated from `project.yml` by xcodegen |\n\n## Prerequisites\n\n- macOS 14+ with Xcode 15+ and command-line tools (`xcode-select --install`)\n- Rust **1.95+** (edition 2024) — `rustup default stable`\n- [`just`](https://github.com/casey/just) — `brew install just`\n- [`xcodegen`](https://github.com/yonaskolb/XcodeGen) — `brew install xcodegen` (auto-installed by `just mac-bootstrap`)\n\n```bash\njust bootstrap          # one-time: xcodegen + macOS + iOS Rust targets\n```\n\n## Build \u0026 run\n\n```bash\n# Native macOS app (ad-hoc signed, opens Finder window)\njust mac-build\njust mac-run\n\n# iPad simulator (boots a sim, installs, launches)\njust run-on-ipad \"iPad Pro\"\n\n# Full local CI pass\njust ci-local\n```\n\nRun `just` (no args) for the full recipe list.\n\n## Common workflows\n\n### Edit Rust FFI surface\n\n```bash\n# 1. Edit src/ffi.rs or src/lib.rs\n# 2. Regenerate Swift bindings\njust mac-bindings\n# 3. Rebuild\njust mac-build\n```\n\nThe bindings under `bindings/` are committed — regenerate and commit them whenever the FFI changes. Hand-patching `bindings/midnight_ssh.swift` will appear to work but the per-function uniffi checksums will diverge from what the Rust lib reports at runtime, and `rshellInit()` will panic with `_assertionFailure`.\n\n### Edit `project.yml`\n\n```bash\njust mac-gen            # regenerate Mc-Ssh.xcodeproj\n```\n\nThe xcodeproj is gitignored — `mac-gen` is automatic before any `mac-*` build via `_ensure-xcodeproj`.\n\n### Sign + notarize a release DMG\n\n```bash\nexport APPLE_SIGNING_IDENTITY=\"Developer ID Application: Your Name (TEAMID)\"\nexport APPLE_ID=\"…\"\nexport APPLE_TEAM_ID=\"…\"\nexport APPLE_APP_SPECIFIC_PASSWORD=\"…\"\n\njust mac-release true   # build → DMG → notarize → staple\n```\n\nFor a build-only DMG without notarization, drop the env vars and run `just mac-release` (defaults to `false`).\n\n### Sparkle auto-updates\n\n```bash\njust mac-sparkle-keygen            # one-time, populate Info.plist with the public key\njust mac-sparkle-appcast ./dist    # generate appcast.xml from a folder of DMGs\n```\n\n## Repo layout\n\n```\n.\n├── Cargo.toml              # FFI crate manifest\n├── build.rs                # uniffi build hook\n├── uniffi-bindgen.rs       # bindgen entry point (cargo run --bin uniffi-bindgen)\n├── src/                    # Rust FFI bridge (bridge.rs, ffi.rs, monitor.rs)\n├── bindings/               # generated Swift bindings (committed)\n├── project.yml             # XcodeGen manifest (single source of truth)\n├── Mc-Ssh.xcodeproj/      # generated; gitignored\n├── Package.swift           # SPM wrapper around the static lib\n├── Sources/PgAgentMacOS/    # cross-target Swift framework (models + stores)\n├── PgAgentApp/              # macOS app target — SwiftUI views + managers\n├── PgAgentMobile/           # iPadOS / iOS app target\n├── Tests/                  # XCTest harness (PgAgentMacOS + PgAgentApp + Beta smoke)\n├── scripts/                # release, notarize, find-sparkle-tool helpers\n├── justfile                # command surface\n├── README.md               # you are here\n├── AGENTS.md               # AI-agent code tour\n└── TOOLS.md                # in-app feature catalog\n```\n\n## Troubleshooting\n\n**`error: There is no XCFramework found at .../Sparkle.xcframework`** — stale Xcode SourcePackages cache pinned to the old absolute path. Wipe and regenerate:\n```bash\nrm -rf build .build Mc-Ssh.xcodeproj\njust mac-gen\njust mac-build\n```\n\n**`Thread 3 Crashed: rshellInit() → _assertionFailure`** — uniffi binding checksums don't match the rebuilt Rust lib. Always regenerate via `just mac-bindings` after touching the FFI; never hand-edit the generated Swift.\n\n**Build is slow on first run** — `russh` and `parquet` (transitive via `ssh-commander-pg-parquet`) compile from source. Subsequent incremental builds are fast.\n\n## License\n\nPrivate. All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmuelle%2Fagent-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasmuelle%2Fagent-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmuelle%2Fagent-postgres/lists"}