-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
83 lines (77 loc) · 3.55 KB
/
Copy pathPackage.swift
File metadata and controls
83 lines (77 loc) · 3.55 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
// swift-tools-version: 6.0
import PackageDescription
/// Monolite modulare: un solo repo, molti moduli. Le dipendenze tra moduli sono imposte dal
/// compilatore (vedi docs/ARCHITECTURE.md). Regola: solo verso il basso, mai risalire.
let package = Package(
name: "relay",
platforms: [.macOS(.v14)],
products: [
.executable(name: "relay", targets: ["RelayApp"]),
.executable(name: "relay-cli", targets: ["CLI"]),
],
dependencies: [
// Pin a una revisione precisa: l'engine del terminale è sul path caldo e usa API non
// ancora rilasciate (search summary). Bumpare deliberatamente quando serve un cambio
// upstream, non a ogni `swift package update`.
.package(
url: "https://github.com/migueldeicaza/SwiftTerm",
revision: "d5ee56e1c74777120f3af688600d336de4201bd2"
),
],
targets: [
// Livello 0: primitivi condivisi, nessuna dipendenza.
.target(name: "Core"),
// Livello 1: protocollo agente puro (tipi, niente I/O).
.target(name: "AgentProtocol", dependencies: ["Core"]),
// Livello 2: runtime e model.
.target(name: "AgentRuntime", dependencies: ["Core", "AgentProtocol"]),
.target(name: "WorkspaceModel", dependencies: ["Core", "AgentProtocol"]),
.target(
name: "TerminalEngine",
dependencies: ["Core", .product(name: "SwiftTerm", package: "SwiftTerm")]
),
.target(name: "HookInstaller", dependencies: ["Core", "AgentProtocol"]),
.target(name: "LayoutStore", dependencies: ["Core", "WorkspaceModel"]),
// Livello 3: UI (AppKit sul path caldo, SwiftUI nei pannelli isolati).
.target(name: "TerminalHostUI", dependencies: ["Core", "TerminalEngine", "WorkspaceModel"]),
.target(
name: "Panels",
dependencies: ["Core", "AgentProtocol", "WorkspaceModel"]
),
// Eseguibili.
.executableTarget(
name: "RelayApp",
dependencies: [
"Core", "AgentProtocol", "AgentRuntime", "WorkspaceModel",
"TerminalEngine", "TerminalHostUI", "Panels", "HookInstaller", "LayoutStore",
],
path: "Sources/relay"
),
.executableTarget(
name: "CLI",
// WorkspaceModel per il solo `guide-md` (comando di sviluppo): è un modulo puro, non
// tira dentro AppKit.
dependencies: [
"Core", "AgentProtocol", "AgentRuntime", "HookInstaller", "WorkspaceModel",
],
path: "Sources/relay-cli"
),
// Test (logica pura, veloce, senza AppKit).
.testTarget(name: "CoreTests", dependencies: ["Core"]),
.testTarget(name: "AgentProtocolTests", dependencies: ["AgentProtocol"]),
.testTarget(name: "WorkspaceModelTests", dependencies: ["WorkspaceModel", "AgentProtocol"]),
.testTarget(name: "AgentRuntimeTests", dependencies: ["AgentRuntime", "AgentProtocol"]),
.testTarget(name: "HookInstallerTests", dependencies: ["HookInstaller", "AgentProtocol"]),
.testTarget(name: "TerminalEngineTests", dependencies: ["TerminalEngine"]),
.testTarget(name: "TerminalHostUITests", dependencies: ["TerminalHostUI"]),
.testTarget(
name: "LayoutStoreTests",
dependencies: ["LayoutStore", "WorkspaceModel", "AgentProtocol"]
),
.testTarget(
name: "PanelsTests",
dependencies: ["Panels", "WorkspaceModel", "AgentProtocol"]
),
],
swiftLanguageModes: [.v6]
)