Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ced8d07
feat!: simplify hack to a local-first core
roodboi Apr 20, 2026
b310f6d
chore: merge main into simplify-hack-platform
roodboi Apr 20, 2026
bbe8f69
fix: address dispatch and tickets review feedback
roodboi Apr 20, 2026
11f39e5
fix: address ci and lifecycle review feedback
roodboi Apr 21, 2026
97a1151
fix: serialize tickets worktree access
roodboi Apr 21, 2026
d8a718e
feat: publish portable runtime images
roodboi Apr 21, 2026
172b975
test: smoke portable managed containers
roodboi Apr 21, 2026
709b582
fix: read shared env keys from primary worktrees
roodboi Apr 21, 2026
0fd6dc1
fix: close env and tickets review regressions
roodboi Apr 21, 2026
d767231
fix: harden lifecycle cleanup and restore CI
roodboi Apr 21, 2026
08c12ad
fix: restore lifecycle and env compatibility cleanup
roodboi Apr 21, 2026
147adb6
fix: suppress inactive gateway token doctor noise
roodboi Apr 22, 2026
95bd545
feat(lifecycle): support singleton host process adoption
roodboi Apr 22, 2026
196bd90
docs(lifecycle): explain singleton adoption semantics
roodboi Apr 22, 2026
748a072
fix(lifecycle): avoid external singleton port probes
roodboi Apr 23, 2026
87d2041
docs(agent): refresh local-first setup guidance
roodboi Apr 23, 2026
291cca1
fix(runtime): harden env ignores and singleton probes
roodboi Apr 23, 2026
5ad7259
fix(env): tolerate missing git and preserve ssh wrappers
roodboi Apr 23, 2026
e52af68
fix(env): preserve legacy local overlays without git
roodboi Apr 23, 2026
6d2e9d8
fix(runtime): close remaining review regressions
roodboi Apr 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 0 additions & 42 deletions .hack/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,6 @@ services:
networks:
- default

web:
image: imbios/bun-node:latest
working_dir: /app
volumes:
- ..:/app
- node_modules:/app/node_modules
depends_on:
deps:
condition: service_completed_successfully
command: bun run --cwd apps/web dev -- --hostname 0.0.0.0 --port 3000
environment:
CHOKIDAR_USEPOLLING: "true"
WATCHPACK_POLLING: "true"
labels:
caddy: "hack-cli.hack, hack-cli.hack.gy"
caddy.reverse_proxy: "{{upstreams 3000}}"
caddy.tls: internal
networks:
- hack-dev
- default

auth-broker:
image: imbios/bun-node:latest
working_dir: /app
volumes:
- ..:/app
- node_modules:/app/node_modules
depends_on:
deps:
condition: service_completed_successfully
command: bun run --cwd services/auth-broker start
environment:
PORT: "8080"
HOST: "0.0.0.0"
labels:
caddy: "auth.hack-cli.hack, auth.hack-cli.hack.gy"
caddy.reverse_proxy: "{{upstreams 8080}}"
caddy.tls: internal
networks:
- hack-dev
- default

networks:
hack-dev:
external: true
Expand Down
12 changes: 1 addition & 11 deletions .hack/hack.env.remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,4 @@ version: 1
environment: remote
secretsprovider: project_key
values:
web:
HACK_AUTH_BROKER_URL: https://auth.hack.broker
NEXT_PUBLIC_HACK_AUTH_BROKER_URL: https://auth.hack.broker
auth-broker:
AUTH_BROKER_PUBLIC_BASE_URL: https://auth.hack.broker
BETTER_AUTH_URL: https://auth.hack.broker
# Broker custom GitHub OAuth callback for Hack-owned flows.
# Better Auth browser social login uses:
# ${BETTER_AUTH_URL}/api/auth/callback/github
GITHUB_REDIRECT_URI: https://auth.hack.broker/gh/callback
HACK_LINEAR_REDIRECT_URI: https://auth.hack.broker/linear/callback
global: {}
408 changes: 74 additions & 334 deletions README.md

Large diffs are not rendered by default.

88 changes: 24 additions & 64 deletions WORKFLOW.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,62 @@
# Hack CLI Workflow

This repository is the source tree for the `hack` CLI and related services.
This repository is the source tree for the Hack CLI and the local-first macOS companion.

## Core expectations

- Use Bun, not npm, pnpm, or yarn.
- Prefer targeted package or service commands before broad workspace runs.
- Keep changes scoped to the ticket. Do not mix unrelated cleanup into the same branch.
- Work inside the ticket worktree and ticket branch created by Symphony.
- Commit useful checkpoints as you make progress. Do not wait until the very end to create the first commit if the change is substantial.
- Before finishing, make sure the branch is in a state that can be pushed and reviewed cleanly.
- Prefer targeted checks before broad workspace runs.
- Keep changes scoped and reviewable.
- Capture real verification for CLI/runtime/env changes.

## Project structure

- `index.ts`, `src/**`: root CLI entrypoints and orchestration logic
- `index.ts`, `src/**`: CLI and runtime orchestration
- `packages/cli/**`: packaged CLI build/install scripts and macOS helper commands
- `services/auth-broker/**`: auth broker service
- `packages/db/**`: database package
- `packages/db/**`: internal database package
- `apps/macos/**`: native desktop app
- `docs/**`, `README.md`: user/operator documentation
- `docs/**`, `README.md`: current product docs

## Default validation

Start with the narrowest checks that match the files you changed, then run broader checks before handoff.

### Common commands

```bash
bun run typecheck
bun run test
bun run check
```

### Package and service focused commands
Focused checks:

```bash
bun run --cwd packages/cli test
bun run --cwd packages/cli typecheck
bun run --cwd packages/cli check

bun run --cwd services/auth-broker test
bun run --cwd services/auth-broker typecheck
bun run --cwd services/auth-broker check

bun run --cwd packages/db test
bun run --cwd packages/db typecheck
bun run --cwd packages/db check
bun run macos:test
```

### Local install / runtime smoke checks

Use these when the ticket changes install, packaging, startup, or command behavior.
## Local runtime smoke checks

```bash
bun run install:status
bun run install:dev
hack --help
```

### Desktop / macOS work

Only run these when the ticket touches `apps/macos` or macOS-specific packaging.

```bash
bun run macos:test
bun run macos:build
```

## Development guidance

- Prefer root `bun run` scripts for workspace-wide behavior.
- Prefer package-local commands when you are changing a single area.
- If you change CLI behavior, capture at least one realistic command path in tests or a documented smoke check.
- If you change docs or workflow behavior, keep examples accurate with the current CLI surface.
- If you touch build, install, release, or runtime image code, include a smoke check that proves the command still executes.

## Git and PR workflow

- The ticket worktree should already be on a dedicated ticket branch.
- Commit incrementally with clear messages.
- Keep the branch rebased or merge-ready.
- When preparing for merge:
- make sure validation commands are recorded
- summarize any residual risk
- do not mark the work done if CI-critical checks are still unverified
## Product boundary

## What to avoid
Supported:

- Do not introduce Node-only workflows when Bun already covers the use case.
- Do not hand-edit generated artifacts unless the ticket is specifically about generation outputs.
- Do not run broad destructive cleanup across unrelated packages.
- Do not assume macOS-only paths are safe to change without validation.
- local runtime orchestration
- env management
- sessions
- diagnostics
- optional local tickets
- slim macOS companion

## Completion checklist
Removed:

Before handing work back for review:
- hosted auth/account/org/team flows
- built-in GitHub workflows
- built-in Linear workflows
- web dashboard

1. Run targeted validation for the touched area.
2. Run broader validation if the change affects shared runtime, install, orchestration, or release behavior.
3. Make sure the working tree changes are intentional and reviewable.
4. Leave a concise summary of what changed, how it was validated, and any remaining follow-up.
Remote/gateway/node/dispatch stay unsupported experimental.
9 changes: 4 additions & 5 deletions apps/macos/App/HackDesktopApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,9 @@ struct HackDesktopApp: App {

@MainActor
private func handleIncomingDeepLink(url: URL) {
let handledHackAuth = model.ingestHackAuthDeepLink(url: url)
let handledGitHub = model.ingestGitHubOAuthDeepLink(url: url)
let handledLinear = model.ingestLinearOAuthDeepLink(url: url)
guard handledHackAuth || handledGitHub || handledLinear else { return }
guard url.scheme != nil else { return }

model.statusMessage = "Hosted auth and integration callbacks are no longer supported in Hack Desktop v3."

#if os(macOS)
NSApp.activate(ignoringOtherApps: true)
Expand All @@ -120,7 +119,7 @@ struct HackDesktopApp: App {
name: .hackSettingsRequested,
object: nil,
userInfo: [
"pane": handledHackAuth ? "account" : (handledLinear ? "linear" : "github"),
"pane": "runtime",
]
)
}
Expand Down
8 changes: 1 addition & 7 deletions apps/macos/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
</array>
</dict>
</array>
<key>HackAuthCompletionURL</key>
<string>$(HACK_URL_SCHEME)://auth/complete</string>
<key>HackGitHubOAuthCallbackURL</key>
<string>$(HACK_URL_SCHEME)://auth/github/callback</string>
<key>HackLinearOAuthCallbackURL</key>
<string>$(HACK_URL_SCHEME)://auth/linear/callback</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand All @@ -44,6 +38,6 @@
<key>NSAppleEventsUsageDescription</key>
<string>Hack Desktop can open Terminal to run hack setup commands (some require sudo) so your local dev environment works.</string>
<key>NSLocalNetworkUsageDescription</key>
<string>Hack Desktop can access your local network to show LAN gateway status and open local development URLs.</string>
<string>Hack Desktop can access your local network to open local development URLs and inspect local runtime services on this machine.</string>
</dict>
</plist>
5 changes: 4 additions & 1 deletion apps/macos/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ let package = Package(
.product(name: "MarkdownUI", package: "swift-markdown-ui"),
.product(name: "Highlightr", package: "Highlightr")
],
path: "Packages/Features/DashboardFeature/Sources/DashboardFeature"
path: "Packages/Features/DashboardFeature/Sources/DashboardFeature",
exclude: [
"TicketMarkdownCodeSyntaxHighlighter.swift",
]
),
.testTarget(
name: "HackDesktopModelsTests",
Expand Down
Loading