diff --git a/ConfigUI/Package.swift b/ConfigUI/Package.swift index 0ba5678..2ed5f60 100644 --- a/ConfigUI/Package.swift +++ b/ConfigUI/Package.swift @@ -1,4 +1,19 @@ // swift-tools-version: 5.9 + +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import PackageDescription let package = Package( diff --git a/ConfigUI/Sources/AboutView.swift b/ConfigUI/Sources/AboutView.swift index b5ba965..b4bc7e3 100644 --- a/ConfigUI/Sources/AboutView.swift +++ b/ConfigUI/Sources/AboutView.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import SwiftUI /// App-level About window showing version, description, and project links. diff --git a/ConfigUI/Sources/Config.swift b/ConfigUI/Sources/Config.swift index aecaf89..8b9a0bd 100644 --- a/ConfigUI/Sources/Config.swift +++ b/ConfigUI/Sources/Config.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import Foundation import Yams diff --git a/ConfigUI/Sources/ConfigEditorView.swift b/ConfigUI/Sources/ConfigEditorView.swift index dc9d41a..9b42b8d 100644 --- a/ConfigUI/Sources/ConfigEditorView.swift +++ b/ConfigUI/Sources/ConfigEditorView.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import SwiftUI import UniformTypeIdentifiers diff --git a/ConfigUI/Sources/ConfigUIApp.swift b/ConfigUI/Sources/ConfigUIApp.swift index a56ad41..47095b1 100644 --- a/ConfigUI/Sources/ConfigUIApp.swift +++ b/ConfigUI/Sources/ConfigUIApp.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import SwiftUI /// App delegate that owns the RunnerStore and StatusBarController. diff --git a/ConfigUI/Sources/ConfigurationsView.swift b/ConfigUI/Sources/ConfigurationsView.swift index 967293d..cbd0323 100644 --- a/ConfigUI/Sources/ConfigurationsView.swift +++ b/ConfigUI/Sources/ConfigurationsView.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import SwiftUI /// The main management window: a `NavigationSplitView` with a sidebar listing diff --git a/ConfigUI/Sources/Constants.swift b/ConfigUI/Sources/Constants.swift index 6f2974b..50fb678 100644 --- a/ConfigUI/Sources/Constants.swift +++ b/ConfigUI/Sources/Constants.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import Foundation // MARK: - Application Identity diff --git a/ConfigUI/Sources/ControlSocketClient.swift b/ConfigUI/Sources/ControlSocketClient.swift index 80b6ded..3743f6b 100644 --- a/ConfigUI/Sources/ControlSocketClient.swift +++ b/ConfigUI/Sources/ControlSocketClient.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import Foundation import Network diff --git a/ConfigUI/Sources/LaunchBanner.swift b/ConfigUI/Sources/LaunchBanner.swift index 49d99ab..a67ee57 100644 --- a/ConfigUI/Sources/LaunchBanner.swift +++ b/ConfigUI/Sources/LaunchBanner.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import AppKit import SwiftUI diff --git a/ConfigUI/Sources/LogStore.swift b/ConfigUI/Sources/LogStore.swift index 653b411..fe8357e 100644 --- a/ConfigUI/Sources/LogStore.swift +++ b/ConfigUI/Sources/LogStore.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import Foundation import os diff --git a/ConfigUI/Sources/LogViewerView.swift b/ConfigUI/Sources/LogViewerView.swift index 72fd2c6..89ee465 100644 --- a/ConfigUI/Sources/LogViewerView.swift +++ b/ConfigUI/Sources/LogViewerView.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import SwiftUI import AppKit diff --git a/ConfigUI/Sources/MetricsTimeSeriesView.swift b/ConfigUI/Sources/MetricsTimeSeriesView.swift index 39ad7bf..d5a9657 100644 --- a/ConfigUI/Sources/MetricsTimeSeriesView.swift +++ b/ConfigUI/Sources/MetricsTimeSeriesView.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import SwiftUI import Charts diff --git a/ConfigUI/Sources/MiniBarGaugeView.swift b/ConfigUI/Sources/MiniBarGaugeView.swift index 56d1525..3cee8ac 100644 --- a/ConfigUI/Sources/MiniBarGaugeView.swift +++ b/ConfigUI/Sources/MiniBarGaugeView.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import AppKit /// Pure AppKit view that draws two tiny vertical bar gauges side by side, diff --git a/ConfigUI/Sources/RunnerManager.swift b/ConfigUI/Sources/RunnerManager.swift index d2ca5e0..24198c3 100644 --- a/ConfigUI/Sources/RunnerManager.swift +++ b/ConfigUI/Sources/RunnerManager.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import Foundation /// Manages a single Go CLI binary (`graftery-cli`) subprocess for one diff --git a/ConfigUI/Sources/RunnerStore.swift b/ConfigUI/Sources/RunnerStore.swift index 8819acb..64f50dc 100644 --- a/ConfigUI/Sources/RunnerStore.swift +++ b/ConfigUI/Sources/RunnerStore.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import Foundation /// Persistent state for runner configurations. Tracks which configs exist diff --git a/ConfigUI/Sources/StatusBarController.swift b/ConfigUI/Sources/StatusBarController.swift index 54dac53..1852bc1 100644 --- a/ConfigUI/Sources/StatusBarController.swift +++ b/ConfigUI/Sources/StatusBarController.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import AppKit import SwiftUI diff --git a/ConfigUI/Sources/WizardView.swift b/ConfigUI/Sources/WizardView.swift index 3d25669..41aee1e 100644 --- a/ConfigUI/Sources/WizardView.swift +++ b/ConfigUI/Sources/WizardView.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import SwiftUI import UniformTypeIdentifiers diff --git a/ConfigUI/UITests/MenuBarTests.swift b/ConfigUI/UITests/MenuBarTests.swift index 5486e42..78c46d2 100644 --- a/ConfigUI/UITests/MenuBarTests.swift +++ b/ConfigUI/UITests/MenuBarTests.swift @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import XCTest /// UI tests for the Graftery menu bar app. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 761ee85..fac0333 100644 --- a/README.md +++ b/README.md @@ -1,81 +1,149 @@ -# Graftery +

+ Graftery +

-A lightweight macOS app and CLI that connects GitHub Actions to ephemeral [Tart](https://tart.run) macOS VMs using the [actions/scaleset](https://github.com/actions/scaleset) protocol. +

Graftery

-## What It Does +

+ Ephemeral macOS VMs for GitHub Actions — powered by Tart +

-Graftery bridges GitHub Actions with ephemeral macOS virtual machines running on Apple hardware. It uses the same scale-set protocol that [Actions Runner Controller (ARC)](https://github.com/actions/actions-runner-controller) uses inside Kubernetes, but runs directly on a Mac host. +

+ Platform + Protocol + Virtualization + License +

-The app sits in your menu bar and: +--- -- Long-polls GitHub for pending workflow jobs -- Clones a Tart base VM image for each job -- Injects JIT runner configuration into the VM via a shared directory -- Cleans up the VM automatically after the job completes -- Recovers from crashes by detecting and removing orphaned VMs on startup +## Why Graftery? - +### How it works + +``` +GitHub Actions Your Mac +───────────── ──────── + Job queued ──── scaleset poll ────▶ Graftery sees demand + │ + ├─ Clones base VM image + ├─ Injects JIT runner config + ├─ Boots ephemeral Tart VM + ├─ Runner picks up the job + └─ VM destroyed on completion +``` + +Graftery speaks the [actions/scaleset](https://github.com/actions/scaleset) protocol natively — the same wire protocol ARC uses. No custom API, no webhook glue. + +### Core capabilities + +**Clean room every job** — Each job runs in a fresh VM clone. No state leaks between jobs, ever. + +**Scale to zero** — No jobs? No VMs. Runners spin up on demand and tear down when done. Configure a warm pool (`min_runners`) for faster pickup. + +**Custom VM images** — Drop shell scripts into `bake.d/` and Graftery bakes them into a prepared image. Install Xcode, CocoaPods, Homebrew packages — whatever your builds need. Content-hashed so reprovisioning only happens when scripts change. + +**Pre/post job hooks** — Native GitHub Actions runner hooks (`ACTIONS_RUNNER_HOOK_JOB_STARTED` / `COMPLETED`). They show up as collapsible sections in the Actions UI. + +**Orphan cleanup** — On startup, Graftery finds and removes VMs left behind by crashes. Session conflicts with GitHub are retried automatically with exponential backoff. + +**Prometheus metrics** — Host CPU/memory/disk, per-VM CPU/memory/uptime, job counters — all exposed via a `/metrics` endpoint. Includes Apple hypervisor (XPC) process tracking for accurate VM resource attribution. + +**Dry-run mode** — Test your setup without GitHub or Tart. Simulates the full lifecycle with fake jobs so you can validate config, control socket, and UI integration end-to-end. + +### Two ways to run it + +Graftery ships as both a **macOS menu bar app** and a **standalone CLI**. They share the same Go backend — the app wraps the CLI in a native Swift UI. + +| | | | +|:---|:---|:---| +| **Best for** | Interactive use on a Mac with a display | Headless servers, automation, launchd/systemd | +| **Install** | [Download DMG](#-macos-app) | [Download binary](#-cli) | +| **Runner sets** | **Multiple** — manage unlimited independent configs | **One** per process | +| **Config** | 6-step setup wizard + tabbed editor with auto-save | YAML file + CLI flags | +| **Metrics** | Live time-series charts (CPU & memory), menu bar gauges | Prometheus `/metrics` endpoint | +| **Logs** | Built-in log viewer with search, level filtering, color | Structured logs to stderr | +| **Controls** | Menu bar start/stop per runner, enable/disable auto-start | SIGINT/SIGTERM | +| **Runs as** | Menu bar app | Foreground process | + +> [!TIP] +> **Already using ARC on Kubernetes?** Graftery uses the same protocol and the same `runs-on:` label convention. Your workflows don't need to change — just point a scale set name at your Mac and go. + +--- ## Requirements -- **macOS 14 (Sonoma)** or later -- **[Tart](https://tart.run)** installed and available in PATH (`brew install cirruslabs/cli/tart`) -- **GitHub App** credentials (Client ID, Installation ID, private key PEM) **or** a Personal Access Token with appropriate scopes -- A **Tart base VM image** with the GitHub Actions runner binary and a startup script (see [Base VM Image Requirements](#base-vm-image-requirements)) +| Requirement | Details | +|:---|:---| +| ![macOS](https://img.shields.io/badge/-macOS_14+-0e6878?style=flat-square&logo=apple&logoColor=white) | Sonoma or later | +| ![Tart](https://img.shields.io/badge/-Tart-094858?style=flat-square&logoColor=white) | `brew install cirruslabs/cli/tart` | +| ![Auth](https://img.shields.io/badge/-GitHub_Auth-c94a30?style=flat-square&logo=github&logoColor=white) | GitHub App credentials **or** a Personal Access Token | +| ![VM](https://img.shields.io/badge/-Base_VM-1a8090?style=flat-square&logoColor=white) | Tart image with the Actions runner binary & startup script ([details](#base-vm-image-requirements)) | -## Installation +--- -### From DMG (recommended) +# macOS App -Download the latest DMG from the releases page, open it, and drag **Graftery** to your Applications folder. +## Installation -### From source +Download the latest **DMG** from the [Releases](https://github.com/diranged/graftery/releases) page, open it, and drag **Graftery** into your Applications folder. -```bash -git clone https://github.com/diranged/graftery.git -cd graftery -make install -``` +That's it — no dependencies beyond [Tart](#requirements). -This builds the full `.app` bundle (requires Xcode command-line tools and Swift) and copies it to `/Applications/Graftery.app`. +> [!TIP] +> Building from source? See [Building from Source](#building-from-source) at the bottom of this page. ## Quick Start -1. **Launch Graftery** from your Applications folder (or Spotlight). -2. On first launch, the **configuration wizard** guides you through entering your GitHub credentials, selecting a base VM image, and setting runner limits. -3. The configuration is saved to `~/Library/Application Support/graftery/config.yaml`. -4. The runner connects to GitHub and begins listening for jobs automatically. -5. The menu bar icon shows the current runner status (e.g., `ARC: 1/2` for 1 busy out of 2 total runners). +1. **Launch Graftery** from Applications (or Spotlight). +2. The **setup wizard** walks you through creating your first runner configuration — name it, enter your GitHub credentials, choose a base VM image, and set runner limits. -## Configuration + + + + + + + + + +
Setup wizard — name your configurationSetup wizard — authentication
Step 1 — Name your configurationStep 3 — Authentication
-### Config file location +3. The runner connects to GitHub and begins listening for jobs automatically. +4. The **menu bar icon** shows live status. Click it to start/stop runners, add new configurations, or open the management window. -``` -~/Library/Application Support/graftery/config.yaml -``` +

+ Menu bar dropdown +

-A default config file is created on first launch. You can edit it through the app (menu bar -> Open Config File) or with any text editor. +5. Open **Manage Configurations** for the full editor — tabbed settings, live CPU & memory charts, and a built-in log viewer. -### Config fields +

+ Configuration editor with metrics +

-```yaml -# GitHub org or repo URL for scale set registration -url: https://github.com/your-org +## Configuration + +Each runner configuration is stored as a YAML file in `~/Library/Application Support/graftery/configs/`. You can manage everything through the UI — the setup wizard for new configs, and the tabbed editor for changes (auto-saved on every edit). + +You can also edit the YAML files directly with any text editor if you prefer. -# Scale set name (also the runs-on: label in workflows) -name: macos-runner +### Config file reference -# --- Authentication (choose one) --- +```yaml +# ── GitHub target ──────────────────────────────────────── +url: https://github.com/your-org # org or repo URL +name: macos-runner # scale set name (= runs-on: label) +# ── Authentication (choose one) ───────────────────────── # Option A: GitHub App -app_client_id: "Iv1.abc123" -app_installation_id: 12345678 -app_private_key_path: /path/to/private-key.pem +app_client_id: "Iv1.abc123" +app_installation_id: 12345678 +app_private_key_path: /path/to/private-key.pem # Or inline: # app_private_key: | # -----BEGIN RSA PRIVATE KEY----- @@ -84,60 +152,47 @@ app_private_key_path: /path/to/private-key.pem # Option B: Personal Access Token # token: ghp_xxxxxxxxxxxx -# --- Runner settings --- - -# Tart VM image to clone for each runner -base_image: ghcr.io/cirruslabs/macos-runner:sonoma - -# Maximum concurrent VMs (Apple allows max 2 macOS VMs per host) -max_runners: 2 - -# Warm pool size (VMs kept ready before jobs arrive) -min_runners: 0 - -# Additional labels for workflow targeting (defaults to the scale set name) -# labels: +# ── Runner settings ────────────────────────────────────── +base_image: ghcr.io/cirruslabs/macos-runner:sonoma +max_runners: 2 # Apple allows max 2 macOS VMs per host +min_runners: 0 # warm-pool size +runner_group: default +runner_prefix: runner # used for orphan detection on startup +# labels: # defaults to scale set name # - macos # - sonoma -# GitHub runner group name -runner_group: default - -# VM name prefix (used for orphan detection on startup) -runner_prefix: runner - -# --- Provisioning --- - -# Path to tart binary (default: look up in PATH) +# ── Provisioning ───────────────────────────────────────── # tart_path: /opt/homebrew/bin/tart - -# Custom scripts directory for image baking and hooks # provisioning: # scripts_dir: /path/to/custom/scripts # skip_builtin_scripts: false -# prepared_image_name: "" # auto-generated from base_image - -# --- Logging --- +# prepared_image_name: "" -# Log level: debug, info, warn, error -log_level: info - -# Log format: text or json -log_format: text +# ── Logging ────────────────────────────────────────────── +log_level: info # debug | info | warn | error +log_format: text # text | json ``` -### Editing via the UI +--- + +# CLI -From the menu bar dropdown: +## Installation -- **Open Config File** -- opens the YAML file in your default editor -- **Reload Config** -- re-reads the config file and applies changes +Download the latest **`graftery` binary** from the [Releases](https://github.com/diranged/graftery/releases) page and place it somewhere in your `PATH`. -Logs are written to `~/Library/Logs/graftery/graftery.log` and can be opened from the menu bar via **Open Logs**. +```bash +# Example: install to /usr/local/bin +curl -fSL https://github.com/diranged/graftery/releases/latest/download/graftery-darwin-arm64 \ + -o /usr/local/bin/graftery +chmod +x /usr/local/bin/graftery +``` -## CLI Usage +> [!TIP] +> Building from source? See [Building from Source](#building-from-source) at the bottom of this page. -The Go binary can also be used as a standalone CLI without the macOS app wrapper: +## Usage ```bash # Using a config file @@ -147,13 +202,11 @@ graftery --config /path/to/config.yaml graftery \ --url https://github.com/your-org \ --name macos-runner \ - --app-client-id Iv1.abc123 \ + --app-client-id Iv1.abc123 \ --app-installation-id 12345678 \ --app-private-key-path /path/to/private-key.pem \ --base-image ghcr.io/cirruslabs/macos-runner:sonoma \ - --max-runners 2 \ - --min-runners 0 \ - --log-level info + --max-runners 2 # Using a PAT instead of a GitHub App graftery \ @@ -163,108 +216,117 @@ graftery \ --base-image ghcr.io/cirruslabs/macos-runner:sonoma ``` -When `--config` is provided, the file is loaded first and any additional flags override the file values. +When `--config` is provided, the file is loaded first and any additional flags override its values. + +## CLI Flags -### All flags +| Flag | Req | Default | Description | +|:---|:---:|:---|:---| +| `--config` | | | Path to YAML config file | +| `--url` | **yes** | | GitHub org or repo URL | +| `--name` | **yes** | | Scale set name (`runs-on:` label) | +| `--app-client-id` | \* | | GitHub App Client ID | +| `--app-installation-id` | \* | | GitHub App Installation ID | +| `--app-private-key-path` | \* | | Path to PEM file | +| `--app-private-key` | \* | | PEM contents inline | +| `--token` | \* | | Personal access token | +| `--base-image` | | `ghcr.io/cirruslabs/macos-runner:sonoma` | Tart VM image | +| `--max-runners` | | `2` | Max concurrent VMs | +| `--min-runners` | | `0` | Warm pool size | +| `--labels` | | _(same as `--name`)_ | Additional labels | +| `--runner-group` | | `default` | Runner group name | +| `--runner-prefix` | | `runner` | VM name prefix | +| `--log-level` | | `info` | `debug` / `info` / `warn` / `error` | +| `--log-format` | | `text` | `text` / `json` | -| Flag | Required | Default | Description | -|---|---|---|---| -| `--config` | no | | Path to YAML config file | -| `--url` | yes | | GitHub org or repo URL for scale set registration | -| `--name` | yes | | Scale set name (also the `runs-on:` label) | -| `--app-client-id` | * | | GitHub App Client ID | -| `--app-installation-id` | * | | GitHub App Installation ID | -| `--app-private-key-path` | * | | Path to PEM file | -| `--app-private-key` | * | | PEM contents inline (alternative to path) | -| `--token` | * | | Personal access token (alternative to GitHub App) | -| `--base-image` | no | `ghcr.io/cirruslabs/macos-runner:sonoma` | Tart VM image to clone for each runner | -| `--max-runners` | no | `2` | Maximum concurrent VMs | -| `--min-runners` | no | `0` | Warm pool size | -| `--labels` | no | (same as `--name`) | Additional labels for workflow targeting | -| `--runner-group` | no | `default` | GitHub runner group name | -| `--runner-prefix` | no | `runner` | VM name prefix (used for orphan detection) | -| `--log-level` | no | `info` | `debug`, `info`, `warn`, `error` | -| `--log-format` | no | `text` | `text` or `json` | +\* Provide **either** GitHub App credentials **or** `--token`. -\* Either GitHub App credentials (`--app-client-id`, `--app-installation-id`, and `--app-private-key-path` or `--app-private-key`) **or** `--token` is required. +## Logging -## Image Provisioning +Logs go to stderr by default. Use `--log-level debug` for verbose output, or `--log-format json` for structured logs. -Graftery automatically prepares ("bakes") VM images from a base Tart image. On first run (or when scripts change), it: +--- -1. Clones the base image (e.g., `ghcr.io/cirruslabs/macos-runner:sonoma`) -2. Boots the clone and waits for the guest agent -3. Runs provisioning scripts from `bake.d/` in lexicographic order via `tart exec` -4. Shuts down the VM and saves it as a local "prepared" image -5. Caches a hash of all script contents — subsequent runs skip provisioning if nothing changed +# Image Provisioning -### Built-in scripts +_Applies to both the macOS app and CLI._ + +Graftery automatically **bakes** a prepared VM image from your base Tart image. The first run (or whenever scripts change) triggers provisioning: + +``` + Base image ──▶ Clone ──▶ Boot ──▶ Run bake.d/* scripts ──▶ Save prepared image + (lexicographic order) +``` -The following scripts are embedded in the binary and run by default: +A content hash of all scripts is cached — subsequent runs skip provisioning if nothing changed. + +## Built-in scripts | Script | Purpose | -|--------|---------| -| `01-startup-script.sh` | Installs `/usr/local/bin/arc-runner-startup.sh` — reads JIT config from shared mount, starts the runner, shuts down when done | -| `02-setup-info.py` | Generates `~/actions-runner/.setup_info` — shows VM info (OS, Xcode, Node, etc.) in the GitHub Actions "Set up job" step | -| `03-runner-hooks.sh` | Installs pre/post job hooks using GitHub Actions' native `ACTIONS_RUNNER_HOOK_JOB_STARTED` / `ACTIONS_RUNNER_HOOK_JOB_COMPLETED` | +|:---|:---| +| ![01](https://img.shields.io/badge/01-startup--script.sh-094858?style=flat-square) | Installs `arc-runner-startup.sh` — reads JIT config, starts runner, shuts down when done | +| ![02](https://img.shields.io/badge/02-setup--info.py-094858?style=flat-square) | Generates `.setup_info` — VM info shown in GitHub Actions "Set up job" step | +| ![03](https://img.shields.io/badge/03-runner--hooks.sh-094858?style=flat-square) | Installs pre/post job hooks via `ACTIONS_RUNNER_HOOK_JOB_STARTED` / `COMPLETED` | -### Custom provisioning scripts +## Custom provisioning scripts -Add your own scripts to the user scripts directory: +Drop your own scripts into the user scripts directory: ``` ~/Library/Application Support/graftery/scripts/ bake.d/ - 50-install-tools.sh # brew install jq terraform - 60-setup-xcode.sh # sudo xcode-select -s /Applications/Xcode_16.1.app + 50-install-tools.sh # brew install jq terraform + 60-setup-xcode.sh # sudo xcode-select -s ... hooks/ pre.d/ - 50-start-metrics.sh # custom pre-job hook + 50-start-metrics.sh # custom pre-job hook post.d/ - 50-emit-metrics.sh # custom post-job hook + 50-emit-metrics.sh # custom post-job hook ``` -**Merge behavior:** User scripts are merged with built-in scripts. Scripts with the same filename override the built-in version. Scripts are executed in lexicographic order, so `50-*` runs after `01-*`, `02-*`, `03-*`. +> [!NOTE] +> **Merge behavior:** User scripts merge with built-ins. Same-name files override. Execution is lexicographic (`50-*` runs after `01-*` through `03-*`). -Override the scripts directory with `--scripts-dir /path/to/scripts` or in config: +Override the directory: ```yaml provisioning: scripts_dir: /path/to/custom/scripts ``` -### Forcing reprovisioning +## Forcing reprovisioning ```bash -# Force a fresh bake (e.g., after updating scripts) -graftery --reprovision --config config.yaml - -# Skip all built-in scripts (only run user scripts) -graftery --skip-builtin-scripts --config config.yaml +graftery --reprovision --config config.yaml # force a fresh bake +graftery --skip-builtin-scripts --config config.yaml # only run user scripts ``` -### Pre/post job hooks +## Pre/post job hooks -Hooks use GitHub Actions' native runner hook mechanism. They show up in the job UI as collapsible sections: +Hooks use GitHub Actions' native runner hook mechanism and appear in the job UI as collapsible sections: -- **Pre-job hooks** (`hooks/pre.d/*.sh`) — run before each job starts, visible in "Set up runner" -- **Post-job hooks** (`hooks/post.d/*.sh`) — run after each job completes, visible in "Complete runner" +| Hook type | Location | Visible in | +|:---|:---|:---| +| **Pre-job** | `hooks/pre.d/*.sh` | "Set up runner" | +| **Post-job** | `hooks/post.d/*.sh` | "Complete runner" | -Hooks receive standard GitHub Actions environment variables (`GITHUB_REPOSITORY`, `GITHUB_RUN_ID`, etc.). +Hooks receive standard Actions environment variables (`GITHUB_REPOSITORY`, `GITHUB_RUN_ID`, etc.). -### Base VM image requirements +## Base VM image requirements The base Tart image must include: -1. **GitHub Actions runner binary** at `~/actions-runner/` (all `cirruslabs/macos-runner` images include this) -2. **Tart guest agent** (all non-vanilla Cirrus Labs images include this) -3. **python3** (required by the setup-info script) +| Component | Note | +|:---|:---| +| **GitHub Actions runner** | At `~/actions-runner/` — all `cirruslabs/macos-runner` images include this | +| **Tart guest agent** | All non-vanilla Cirrus Labs images include this | +| **python3** | Required by the setup-info script | -The default `ghcr.io/cirruslabs/macos-runner:sonoma` image satisfies all requirements. +> The default `ghcr.io/cirruslabs/macos-runner:sonoma` satisfies all requirements. -### Quick example: adding a tool to the image +## Example: adding a tool to the baked image -Need `pod` (CocoaPods) available for your builds? Create a bake script: +Need CocoaPods for your builds? Create a bake script: ```bash # ~/Library/Application Support/graftery/scripts/bake.d/50-install-cocoapods.sh @@ -276,92 +338,112 @@ gem install cocoapods sudo ln -sf "$(rbenv which pod)" /usr/local/bin/pod ``` -Restart the runner — it detects the new script, reprovisions the image, and every future VM has `pod` available. +Restart the runner — it detects the new script, reprovisions, and every future VM ships with `pod`. -### More examples +## More examples -See the [`examples/`](examples/) directory for complete setups: +See the [`examples/`](examples/) directory: | Example | Description | -|---------|-------------| +|:---|:---| | [iOS / React Native](examples/ios-react-native/) | CocoaPods, ccache, Expo prebuild, workflow caching for Pods and DerivedData | -Each example includes bake scripts to copy into your scripts directory and a recommended workflow configuration. +--- -## Troubleshooting +# Troubleshooting -### `tart` not found +
+tart not found -The `tart` binary must be in your PATH, or specify its location explicitly: +The `tart` binary must be in your PATH: ```bash brew install cirruslabs/cli/tart +``` + +Or specify the path explicitly via CLI flag or config: -# Or specify the path directly: +```bash graftery --tart-path /opt/homebrew/bin/tart --config config.yaml ``` -In the config file: ```yaml tart_path: /opt/homebrew/bin/tart ``` -### Authentication errors +
-- **"either GitHub App credentials or --token is required"** -- You must provide either a GitHub App configuration (client ID, installation ID, and private key) or a personal access token. You cannot omit both. -- **"specify either GitHub App credentials or --token, not both"** -- Use one authentication method, not both simultaneously. -- **Private key errors** -- Ensure the PEM file path is correct and readable. If using `app_private_key` inline in YAML, use a literal block scalar (`|`) to preserve newlines. +
+Authentication errors -### VM cleanup / orphaned VMs +| Error | Fix | +|:---|:---| +| _"either GitHub App credentials or --token is required"_ | Provide one auth method | +| _"specify either GitHub App credentials or --token, not both"_ | Use only one method | +| Private key errors | Check PEM path is correct and readable. For inline YAML, use `\|` block scalar | -On startup, the app automatically detects and removes any VMs whose names start with the configured runner prefix (default: `runner-`). If you need to manually clean up: +
-```bash -# List all Tart VMs -tart list +
+Orphaned VMs -# Stop and delete a specific runner VM -tart stop runner-abc12345 -tart delete runner-abc12345 +On startup, Graftery auto-removes VMs matching the runner prefix. To clean up manually: + +```bash +tart list # list all VMs +tart stop runner-abc12345 # stop +tart delete runner-abc12345 # delete ``` -### Scale set registration fails +
-- Verify the `--url` points to a valid GitHub organization or repository. -- Ensure your GitHub App is installed on the target org/repo with the required permissions, or that your PAT has the `admin:org` scope (for org-level runners) or `repo` scope (for repo-level runners). +
+Scale set registration fails -### Max runners limit +- Verify `--url` points to a valid GitHub org or repo +- Ensure your GitHub App has the required permissions, or your PAT has `admin:org` (org-level) / `repo` (repo-level) scope -Apple's macOS virtualization framework allows a maximum of 2 concurrent macOS VMs per host. The default `max_runners: 2` reflects this limit. Setting it higher may cause VM creation failures. +
-### Logs +
+Max runners limit -- **GUI app**: `~/Library/Logs/graftery/graftery.log` (also accessible via menu bar -> Open Logs) -- **CLI**: Logs are written to stderr by default. Use `--log-level debug` for verbose output. +Apple's virtualization framework allows **max 2 concurrent macOS VMs per host**. The default `max_runners: 2` reflects this. Setting it higher may cause VM creation failures. -## Building from Source +
-Requires Go 1.26+ and Xcode command-line tools (for the Swift UI and code signing). +
+Logs -```bash -# Build just the CLI binary (no CGO, no Swift) -make build-cli +| Mode | Location | +|:---|:---| +| **macOS App** | `~/Library/Logs/graftery/graftery.log` (menu bar -> Open Logs) | +| **CLI** | stderr — use `--log-level debug` for verbose output | -# Build the full macOS .app bundle (CLI + Swift UI) -make build-app +
-# Create a drag-and-drop DMG installer -make build-dmg +--- + +## Building from Source -# Install to /Applications -make install +Requires **Go 1.26+** and **Xcode command-line tools** (for Swift UI and code signing). -# Clean build artifacts -make clean +```bash +make build-cli # CLI binary only (no CGO, no Swift) +make build-app # full macOS .app bundle +make build-dmg # drag-and-drop DMG installer +make install # → /Applications/Graftery.app +make clean # remove build artifacts ``` -The built artifacts are placed in the `build/` directory. +All artifacts are placed in the `build/` directory. ## License -TBD +[Apache License 2.0](LICENSE) + +--- + +

+ Built for Apple silicon  ·  Powered by Tart  ·  Speaks actions/scaleset +

diff --git a/config.go b/config.go index f62c2ba..c224119 100644 --- a/config.go +++ b/config.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package main implements graftery, a GitHub Actions runner scale set // controller that provisions ephemeral Tart macOS VMs for each job. package main diff --git a/configfile.go b/configfile.go index 5a5bf59..826f726 100644 --- a/configfile.go +++ b/configfile.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/constants.go b/constants.go index 4770b99..7288e6a 100644 --- a/constants.go +++ b/constants.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import "time" diff --git a/control.go b/control.go index e6681fc..82145a7 100644 --- a/control.go +++ b/control.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/docs/screenshots/config-editor.png b/docs/screenshots/config-editor.png new file mode 100644 index 0000000..cac51c8 Binary files /dev/null and b/docs/screenshots/config-editor.png differ diff --git a/docs/screenshots/menu-bar.png b/docs/screenshots/menu-bar.png new file mode 100644 index 0000000..4ed205a Binary files /dev/null and b/docs/screenshots/menu-bar.png differ diff --git a/docs/screenshots/wizard-auth.png b/docs/screenshots/wizard-auth.png new file mode 100644 index 0000000..ffa9361 Binary files /dev/null and b/docs/screenshots/wizard-auth.png differ diff --git a/docs/screenshots/wizard-name.png b/docs/screenshots/wizard-name.png new file mode 100644 index 0000000..04eb413 Binary files /dev/null and b/docs/screenshots/wizard-name.png differ diff --git a/dryrun.go b/dryrun.go index a4eaf7e..ad4e3f7 100644 --- a/dryrun.go +++ b/dryrun.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/examples/ios-react-native/bake.d/50-install-cocoapods.sh b/examples/ios-react-native/bake.d/50-install-cocoapods.sh old mode 100755 new mode 100644 index bd40310..92cbef0 --- a/examples/ios-react-native/bake.d/50-install-cocoapods.sh +++ b/examples/ios-react-native/bake.d/50-install-cocoapods.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright 2026 Matt Wise +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Installs CocoaPods into the VM image. # # The Cirrus base image ships with system Ruby 2.6 which is too old for diff --git a/examples/ios-react-native/bake.d/51-install-ccache.sh b/examples/ios-react-native/bake.d/51-install-ccache.sh old mode 100755 new mode 100644 index e8ae08a..8e31f73 --- a/examples/ios-react-native/bake.d/51-install-ccache.sh +++ b/examples/ios-react-native/bake.d/51-install-ccache.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright 2026 Matt Wise +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Installs ccache for faster C/C++ compilation of React Native native modules. # # ccache caches compiled object files. When the same source file is compiled diff --git a/icons/README.md b/icons/README.md new file mode 100644 index 0000000..fda31b6 --- /dev/null +++ b/icons/README.md @@ -0,0 +1,32 @@ +# Graftery Icon Set + +## Concept + +Asymmetric graft metaphor: a thick rootstock (left) and thin wiggly scion +(upper-right) converge at a coral union band, generating ephemeral macOS VMs +below. + +### VM lifecycle (top to bottom) + +- **Ghost dashed box** -- destroyed / not-yet-started VM +- **Solid coral band** -- running VM (graft union point) +- **Open-bottom box** -- VM being assembled + +## Color palette + +| Role | Hex | +|------------|-----------| +| Background | `#0a1a20` | +| Rootstock | `#0e6878` | +| Scion | `#1aabb8` | +| Union band | `#c94a30` | + +## Files + +| File | Size | Purpose | +|------------------|--------|------------------------------------------| +| `icon.svg` | 1024px | Master icon (full detail, all VM states) | +| `icon-512.svg` | 512px | App icon with full detail | +| `icon-128.svg` | 128px | Dock/Finder (simplified, no ghost box) | + +`docs/icon.png` is generated from `icon.svg` for use in the project README. diff --git a/icons/icon-128.svg b/icons/icon-128.svg new file mode 100644 index 0000000..815113f --- /dev/null +++ b/icons/icon-128.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + diff --git a/icons/icon-512.svg b/icons/icon-512.svg new file mode 100644 index 0000000..0858167 --- /dev/null +++ b/icons/icon-512.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/icon.png b/icons/icon.png new file mode 100644 index 0000000..bb75e5c Binary files /dev/null and b/icons/icon.png differ diff --git a/icons/icon.svg b/icons/icon.svg new file mode 100644 index 0000000..1b870b9 --- /dev/null +++ b/icons/icon.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/integration_test.go b/integration_test.go index 1f8940f..14e31f2 100644 --- a/integration_test.go +++ b/integration_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/main.go b/main.go index e800284..50bc8c8 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/metrics.go b/metrics.go index 4fd5167..26e3faf 100644 --- a/metrics.go +++ b/metrics.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/metrics_test.go b/metrics_test.go index c07250d..63affe1 100644 --- a/metrics_test.go +++ b/metrics_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/packaging/build-dmg.sh b/packaging/build-dmg.sh index d121f97..dc6194d 100755 --- a/packaging/build-dmg.sh +++ b/packaging/build-dmg.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright 2026 Matt Wise +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Creates a drag-and-drop DMG installer for Graftery. # # Downloads create-dmg (pinned to a specific SHA) into a local bin directory @@ -49,6 +64,7 @@ cp -R "$APP_PATH" "$STAGING_DIR/" echo "Building DMG..." "$CREATE_DMG" \ --volname "Graftery" \ + --volicon "$SCRIPT_DIR/AppIcon.icns" \ --background "$SCRIPT_DIR/dmg-background.png" \ --window-pos 200 120 \ --window-size 600 400 \ @@ -63,6 +79,31 @@ echo "Building DMG..." rm -rf "$STAGING_DIR" +# Stamp the Graftery icon onto the .dmg file itself so Finder shows it in +# Downloads / Desktop instead of the generic white-page icon. +# 1. sips -i embeds the icon into the .icns resource fork +# 2. DeRez extracts that resource as Rez source +# 3. Rez appends the resource to the DMG +# 4. SetFile -a C sets the kHasCustomIcon Finder flag +# Requires Xcode command-line tools (ships with macOS developer tools). +ICON_ICNS="$SCRIPT_DIR/AppIcon.icns" +if [ -f "$ICON_ICNS" ]; then + echo "Setting custom icon on DMG file..." + ICON_TMP="$(mktemp -d)/icon_tmp" + cp "$ICON_ICNS" "$ICON_TMP.icns" + sips -i "$ICON_TMP.icns" >/dev/null 2>&1 || true + DeRez -only icns "$ICON_TMP.icns" > "$ICON_TMP.rsrc" 2>/dev/null || true + if [ -s "$ICON_TMP.rsrc" ]; then + Rez -append "$ICON_TMP.rsrc" -o "$DMG_PATH" + SetFile -a C "$DMG_PATH" + echo "Custom icon set on DMG." + else + echo "Warning: could not extract icon resource; DMG will use default icon." + fi + rm -f "$ICON_TMP.icns" "$ICON_TMP.rsrc" + rmdir "$(dirname "$ICON_TMP")" 2>/dev/null || true +fi + echo "" echo "Created $DMG_PATH" ls -lh "$DMG_PATH" diff --git a/packaging/dmg-background.png b/packaging/dmg-background.png index 8cf1fc4..2f7ec7c 100644 Binary files a/packaging/dmg-background.png and b/packaging/dmg-background.png differ diff --git a/packaging/generate-dmg-background.py b/packaging/generate-dmg-background.py new file mode 100644 index 0000000..05303b4 --- /dev/null +++ b/packaging/generate-dmg-background.py @@ -0,0 +1,178 @@ +#!/usr/bin/env python3 + +# Copyright 2026 Matt Wise +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Generates the DMG installer background image for Graftery. + +The background uses a light-teal radial gradient with a faint helix motif +and a coral drag-arrow between the two icon positions. Finder draws its own +icon labels, so we deliberately omit text from the image. + +Color palette derived from icons/icon.svg: + - Teal strand: #0e6878 + - Darker teal: #094858 + - Light teal accent: #1a8090 + - Coral accent: #c94a30 / #e86040 / #f07050 + +DMG window geometry (must match build-dmg.sh --window-size / --icon positions): + - Window: 600 x 400 + - Graftery.app centred at (175, 190) + - Applications centred at (425, 190) +""" + +from PIL import Image, ImageDraw, ImageFilter +import math, os + +WIDTH, HEIGHT = 600, 400 + +# --- palette --- +# Background kept light so Finder's black icon labels remain readable. +BG_DARK = (180, 215, 220) # light teal (edge of radial gradient) +BG_MID = (210, 235, 238) # very light teal (centre of radial gradient) +# Helix / accent colours taken directly from icons/icon.svg. +TEAL = (14, 104, 120) # #0e6878 rootstock strand +TEAL_DK = (9, 72, 88) # #094858 scion continuation +TEAL_LT = (26, 128, 144) # #1a8090 helix crossbar tint +CORAL = (201, 74, 48) # #c94a30 union band / arrow base +CORAL_LT = (240, 112, 80) # #f07050 arrowhead fill +CORAL_BRT = (232, 96, 64) # #e86040 arrow shaft + + +def lerp_color(c1, c2, t): + return tuple(int(a + (b - a) * t) for a, b in zip(c1, c2)) + + +def draw_gradient_bg(img): + """Radial gradient: slightly lighter in centre, dark at edges.""" + draw = ImageDraw.Draw(img) + cx, cy = WIDTH // 2, HEIGHT // 2 + max_dist = math.hypot(cx, cy) + for y in range(HEIGHT): + for x in range(WIDTH): + d = math.hypot(x - cx, y - cy) / max_dist + t = d * d # ease-out for subtlety + color = lerp_color(BG_MID, BG_DARK, t) + draw.point((x, y), fill=(*color, 255)) + + +def draw_subtle_helix(img): + """Draw faint helix curves echoing the icon DNA motif.""" + for strand_offset, color, alpha in [(0, TEAL, 45), (math.pi, TEAL_DK, 35)]: + overlay = Image.new("RGBA", (WIDTH, HEIGHT), (0, 0, 0, 0)) + od = ImageDraw.Draw(overlay) + amplitude = 70 + freq = 2.5 * math.pi / WIDTH + cy = HEIGHT // 2 + prev = None + for x in range(WIDTH): + y = int(cy + amplitude * math.sin(freq * x + strand_offset)) + if prev is not None: + od.line([prev, (x, y)], fill=(*color, alpha), width=4) + prev = (x, y) + img.paste(Image.alpha_composite( + Image.new("RGBA", img.size, (0, 0, 0, 0)), overlay), mask=overlay) + + # Faint crossbars at helix crossing points + overlay = Image.new("RGBA", (WIDTH, HEIGHT), (0, 0, 0, 0)) + od = ImageDraw.Draw(overlay) + freq = 2.5 * math.pi / WIDTH + cy = HEIGHT // 2 + for x in range(0, WIDTH, 8): + y1 = int(cy + 70 * math.sin(freq * x)) + y2 = int(cy + 70 * math.sin(freq * x + math.pi)) + # Only draw crossbars near where strands are close + if abs(y1 - y2) < 50: + od.line([(x, y1), (x, y2)], fill=(*TEAL_LT, 20), width=1) + img.paste(Image.alpha_composite( + Image.new("RGBA", img.size, (0, 0, 0, 0)), overlay), mask=overlay) + + +def draw_arrow(img): + """Draw a coral arrow with glow from app icon area to Applications area.""" + y = 190 + x_start = 238 + x_end = 362 + head_size = 20 + + # --- Glow layer (blurred coral on transparent) --- + glow = Image.new("RGBA", (WIDTH, HEIGHT), (0, 0, 0, 0)) + gd = ImageDraw.Draw(glow) + # Thick soft shaft + gd.line([(x_start - 4, y), (x_end - head_size + 4, y)], + fill=(*CORAL, 80), width=14) + # Soft arrowhead + head_pts = [ + (x_end + 4, y), + (x_end - head_size - 4, y - head_size // 2 - 6), + (x_end - head_size - 4, y + head_size // 2 + 6), + ] + gd.polygon(head_pts, fill=(*CORAL, 80)) + glow = glow.filter(ImageFilter.GaussianBlur(radius=10)) + img.paste(Image.alpha_composite( + Image.new("RGBA", img.size, (0, 0, 0, 0)), glow), mask=glow) + + # --- Crisp arrow on top --- + overlay = Image.new("RGBA", (WIDTH, HEIGHT), (0, 0, 0, 0)) + od = ImageDraw.Draw(overlay) + + # Shaft with rounded ends + od.line([(x_start, y), (x_end - head_size, y)], + fill=(*CORAL_BRT, 230), width=4) + # Round caps + od.ellipse([(x_start - 2, y - 2), (x_start + 2, y + 2)], + fill=(*CORAL_BRT, 230)) + + # Arrowhead + head_pts = [ + (x_end, y), + (x_end - head_size, y - head_size // 2 - 2), + (x_end - head_size, y + head_size // 2 + 2), + ] + od.polygon(head_pts, fill=(*CORAL_LT, 240)) + od.polygon(head_pts, outline=(*CORAL, 200)) + + img.paste(Image.alpha_composite( + Image.new("RGBA", img.size, (0, 0, 0, 0)), overlay), mask=overlay) + + +def draw_top_accent(img): + """Thin teal accent line at the very top.""" + overlay = Image.new("RGBA", (WIDTH, HEIGHT), (0, 0, 0, 0)) + od = ImageDraw.Draw(overlay) + for y in range(3): + alpha = int(40 * (1.0 - y / 3.0)) + od.line([(0, y), (WIDTH, y)], fill=(*TEAL_DK, alpha)) + img.paste(Image.alpha_composite( + Image.new("RGBA", img.size, (0, 0, 0, 0)), overlay), mask=overlay) + + +def main(): + img = Image.new("RGBA", (WIDTH, HEIGHT), (*BG_DARK, 255)) + + draw_gradient_bg(img) + draw_subtle_helix(img) + draw_top_accent(img) + draw_arrow(img) + + # Final output as RGB PNG (DMG backgrounds don't need alpha) + out = os.path.join(os.path.dirname(os.path.abspath(__file__)), + "dmg-background.png") + img.convert("RGB").save(out, "PNG") + print(f"Created {out} ({WIDTH}x{HEIGHT})") + + +if __name__ == "__main__": + main() diff --git a/packaging/generate-icons.sh b/packaging/generate-icons.sh index 0d5653e..121508b 100755 --- a/packaging/generate-icons.sh +++ b/packaging/generate-icons.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright 2026 Matt Wise +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generates AppIcon.icns from a source PNG. # Usage: ./generate-icons.sh [source.png] # diff --git a/provisioner/bake.go b/provisioner/bake.go index ae8bdb0..5ce6faf 100644 --- a/provisioner/bake.go +++ b/provisioner/bake.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package provisioner import ( diff --git a/provisioner/constants.go b/provisioner/constants.go index e2d0d95..69a1845 100644 --- a/provisioner/constants.go +++ b/provisioner/constants.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package provisioner // --------------------------------------------------------------------------- diff --git a/provisioner/embed.go b/provisioner/embed.go index f1e3b04..a1bd9ba 100644 --- a/provisioner/embed.go +++ b/provisioner/embed.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package provisioner import "embed" diff --git a/provisioner/hash.go b/provisioner/hash.go index 8cca0ce..07f8268 100644 --- a/provisioner/hash.go +++ b/provisioner/hash.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package provisioner import ( diff --git a/provisioner/hash_test.go b/provisioner/hash_test.go index 119ed23..95fe200 100644 --- a/provisioner/hash_test.go +++ b/provisioner/hash_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package provisioner import "testing" diff --git a/provisioner/hooks.go b/provisioner/hooks.go index f8c171a..2d72408 100644 --- a/provisioner/hooks.go +++ b/provisioner/hooks.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package provisioner // Hook scripts are now handled entirely via the shared directory mount: diff --git a/provisioner/provisioner.go b/provisioner/provisioner.go index 485226d..afcb497 100644 --- a/provisioner/provisioner.go +++ b/provisioner/provisioner.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package provisioner implements the "bake and cache" strategy for preparing // macOS VM images. It takes a base tart VM image, clones it, boots the clone, // runs provisioning scripts inside the guest via a shared directory mount, diff --git a/provisioner/provisioner_test.go b/provisioner/provisioner_test.go index 77a7058..ee681cb 100644 --- a/provisioner/provisioner_test.go +++ b/provisioner/provisioner_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package provisioner import "testing" diff --git a/provisioner/scripts.go b/provisioner/scripts.go index 551688e..9c44ad4 100644 --- a/provisioner/scripts.go +++ b/provisioner/scripts.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package provisioner import ( diff --git a/provisioner/scripts/bake.d/01-startup-script.sh b/provisioner/scripts/bake.d/01-startup-script.sh index f5e3492..57ca8ed 100644 --- a/provisioner/scripts/bake.d/01-startup-script.sh +++ b/provisioner/scripts/bake.d/01-startup-script.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright 2026 Matt Wise +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Installs the arc-runner startup script into the VM. # This script is invoked by the host via `tart exec` after the VM boots, # and handles reading the JIT config from the shared mount, starting diff --git a/provisioner/scripts/bake.d/02-setup-info.py b/provisioner/scripts/bake.d/02-setup-info.py index 984e03e..263d738 100644 --- a/provisioner/scripts/bake.d/02-setup-info.py +++ b/provisioner/scripts/bake.d/02-setup-info.py @@ -1,4 +1,19 @@ #!/usr/bin/env python3 + +# Copyright 2026 Matt Wise +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Generates ~/actions-runner/.setup_info for the GitHub Actions UI. The .setup_info file is read by the runner agent and displayed in the diff --git a/provisioner/scripts/bake.d/03-install-hooks.sh b/provisioner/scripts/bake.d/03-install-hooks.sh index 7f3b576..20920b7 100644 --- a/provisioner/scripts/bake.d/03-install-hooks.sh +++ b/provisioner/scripts/bake.d/03-install-hooks.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright 2026 Matt Wise +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Installs pre/post job hooks from the shared mount into the VM. # # During provisioning, the host mounts a directory containing all resolved diff --git a/provisioner/scripts/hooks/post.d/01-job-summary.sh b/provisioner/scripts/hooks/post.d/01-job-summary.sh index 0c0964b..7c99b2e 100644 --- a/provisioner/scripts/hooks/post.d/01-job-summary.sh +++ b/provisioner/scripts/hooks/post.d/01-job-summary.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright 2026 Matt Wise +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Post-job hook: logs job summary after the job completes. # Output uses ::group:: workflow commands for collapsible sections in the UI. echo "::group::Graftery Post-Job" diff --git a/provisioner/scripts/hooks/pre.d/01-system-info.sh b/provisioner/scripts/hooks/pre.d/01-system-info.sh index a0f7574..57f8a18 100644 --- a/provisioner/scripts/hooks/pre.d/01-system-info.sh +++ b/provisioner/scripts/hooks/pre.d/01-system-info.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright 2026 Matt Wise +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Pre-job hook: logs system information before the job starts. # Output uses ::group:: workflow commands for collapsible sections in the UI. echo "::group::Graftery Pre-Job" diff --git a/provisioner/scripts_test.go b/provisioner/scripts_test.go index f250bc1..5331241 100644 --- a/provisioner/scripts_test.go +++ b/provisioner/scripts_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package provisioner import ( diff --git a/provisioner/tart.go b/provisioner/tart.go index 5d80a2c..ee89094 100644 --- a/provisioner/tart.go +++ b/provisioner/tart.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package provisioner import ( diff --git a/run.go b/run.go index f9c8eed..d10be64 100644 --- a/run.go +++ b/run.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/scaler.go b/scaler.go index 0bbb7be..f3ccd48 100644 --- a/scaler.go +++ b/scaler.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/status.go b/status.go index 1d5c5a2..4e6dee2 100644 --- a/status.go +++ b/status.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/tart.go b/tart.go index f489177..c6eb6b3 100644 --- a/tart.go +++ b/tart.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/tart_adapter.go b/tart_adapter.go index afc8e84..ff1d4f5 100644 --- a/tart_adapter.go +++ b/tart_adapter.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/tart_test.go b/tart_test.go index df08f39..15455fe 100644 --- a/tart_test.go +++ b/tart_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Matt Wise +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import (