-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathProject.swift
More file actions
160 lines (157 loc) · 7.28 KB
/
Copy pathProject.swift
File metadata and controls
160 lines (157 loc) · 7.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
import ProjectDescription
// Graphcode: a native macOS orchestrator for a graph of agentic loops.
// See docs/03-architecture.md for the full component breakdown this project scaffolds.
//
// Three products today:
// - `GraphcodeKit` — shared static framework: Domain types, the daemon<->app IPC
// protocol, and the PTY session primitive both `graphcode` and `graphcoded` launch
// CLI backends through. Static, not dynamic, so `graphcoded` (a plain command-line
// tool with nowhere sensible to embed a dynamic framework) can link it directly.
// - `graphcode` — the SwiftUI app (the UI process).
// - `graphcoded` — the background orchestrator daemon. From Phase 3 on it's no
// longer an empty skeleton: it owns the real `LoopGraph` state, fires `.handoff`
// edges automatically, and arms time-based triggers that survive the app quitting
// — see docs/07-roadmap.md#phase-3--orchestrator-automation.
// Both are overridable so a development build can run *beside* an installed release
// instead of replacing it. macOS keys far too much off the bundle id — Login Items,
// LaunchServices' "which app owns this?", the background-agent attribution — so two
// builds sharing one id fight over all of it.
//
// TUIST_BUNDLE_ID_PREFIX=com.example.graphcode-localdev \
// TUIST_APP_DISPLAY_NAME="GraphCode (localdev)" \
// mise exec -- tuist generate --no-open
//
// The bundle id is only half of side-by-side: state is keyed by
// `GRAPHCODE_SUPPORT_DIR` (see `SupportDirectory`), and a second build sharing
// `~/.graphcode` would share graphs and zmx session names with the release and fight
// over the sessions. Set both, or use `make dev-*`, which sets both for you.
let bundleIdPrefix = Environment.bundleIdPrefix.getString(default: "dev.graphcode")
let appDisplayName = Environment.appDisplayName.getString(default: "GraphCode")
let project = Project(
name: "graphcode",
organizationName: "Graphcode",
targets: [
// `MailroomKit` — the Mailroom domain model: one post type, one watch
// subscription, and the caps/matching rules both the daemon and the CLI read.
// Its own module, with no dependency beyond Foundation, so the shared board is
// a thing GraphcodeKit links rather than a folder inside it — and so the
// post shape can evolve without touching the session machinery.
.target(
name: "MailroomKit",
destinations: .macOS,
product: .staticFramework,
bundleId: "\(bundleIdPrefix).mailroom",
deploymentTargets: .macOS("15.0"),
buildableFolders: [
"MailroomKit/Sources"
]
),
.target(
name: "GraphcodeKit",
destinations: .macOS,
product: .staticFramework,
bundleId: "\(bundleIdPrefix).kit",
deploymentTargets: .macOS("15.0"),
buildableFolders: [
"GraphcodeKit/Sources"
],
dependencies: [
.target(name: "MailroomKit"),
.external(name: "IdentifiedCollections")
]
),
.target(
name: "graphcode",
destinations: .macOS,
product: .app,
bundleId: "\(bundleIdPrefix).app",
deploymentTargets: .macOS("15.0"),
infoPlist: .extendingDefault(with: [
// The name a human sees — menu bar, Finder, Dock, About. Distinct from
// the bundle's filename and from `graphcode` the CLI, which stay lower
// case because they are a path and a command someone types.
"CFBundleName": .string(appDisplayName),
"CFBundleDisplayName": .string(appDisplayName),
"CFBundleIconName": "AppIcon",
// The app reported Tuist's default 1.0 while every release was tagged
// v0.0.x, so About said one thing and the download page another. Keep
// this in step with the git tag when cutting a release — suffix and
// all: since 0.1.15-beta3 a beta carries its full version here, which
// is how Check for Updates knows the install is on the beta channel
// (#33). Before that the suffix lived on the tag only, so betas 48/49
// of the 0.1.15 line read "0.1.15" and are told by the build number
// apart.
"CFBundleShortVersionString": "0.1.71",
"CFBundleVersion": "279",
]),
resources: [
"graphcode/Resources/**"
],
buildableFolders: [
"graphcode/Sources"
],
dependencies: [
.target(name: "GraphcodeKit"),
.external(name: "ComposableArchitecture"),
.external(name: "Dependencies"),
.external(name: "IdentifiedCollections"),
// Built by `make build-ghostty` (see Makefile) — not committed, not
// vendored in-tree. `generate`/`build-app` depend on that target so
// this path exists before Tuist needs to inspect it.
.xcframework(path: ".build/ghostty/GhosttyKit.xcframework"),
// libghostty's keyboard-layout handling (`input.KeymapDarwin`) calls
// the Carbon TIS* APIs directly.
.sdk(name: "Carbon", type: .framework),
],
settings: .settings(base: [
"SWIFT_EMIT_LOC_STRINGS": "YES"
])
),
.target(
name: "graphcodeTests",
destinations: .macOS,
product: .unitTests,
bundleId: "\(bundleIdPrefix).app.tests",
deploymentTargets: .macOS("15.0"),
infoPlist: .default,
buildableFolders: [
"graphcode/Tests"
],
dependencies: [.target(name: "graphcode")]
),
// `graphcode` the CLI (docs/03-architecture.md#cli-graphcode) — a separate
// product from `graphcode` the app, talking to `graphcoded` over the same socket
// the app uses. Named `graphcode-cli` as a Tuist target because two targets
// can't share a name; the built binary is what a human types.
.target(
name: "graphcode-cli",
destinations: .macOS,
product: .commandLineTool,
// Without this the binary is `graphcode_cli` — Tuist sanitizes the hyphen
// out of the target name. The thing a human types is `graphcode`.
productName: "graphcode",
bundleId: "\(bundleIdPrefix).cli",
deploymentTargets: .macOS("15.0"),
buildableFolders: [
"graphcode-cli/Sources"
],
dependencies: [
.target(name: "GraphcodeKit"),
.target(name: "MailroomKit"),
]
),
.target(
name: "graphcoded",
destinations: .macOS,
product: .commandLineTool,
bundleId: "\(bundleIdPrefix).graphcoded",
deploymentTargets: .macOS("15.0"),
buildableFolders: [
"graphcoded/Sources"
],
dependencies: [
.target(name: "GraphcodeKit")
]
),
]
)