-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
104 lines (103 loc) · 4.09 KB
/
Copy pathPackage.swift
File metadata and controls
104 lines (103 loc) · 4.09 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
// swift-tools-version: 6.1
import PackageDescription
// AnnotKit: native in-app annotation toolbar for AI coding agents.
//
// macOS 15 / iOS 17 floor. Swift 6 language mode is enforced from day one
// (the plan calls for strict concurrency: the public Element is Sendable,
// the introspection core is MainActor). F0 ships the public API surface
// plus the pure-logic pieces (selector parse/generate/resolve and the
// AX <-> Cocoa coordinate conversion); the platform adapters, overlay,
// and sinks land in F1-F7.
let package = Package(
name: "AnnotKit",
platforms: [
.macOS(.v15),
.iOS(.v17)
],
products: [
.library(name: "AnnotKit", targets: ["AnnotKit"]),
.library(name: "AnnotKitMCP", targets: ["AnnotKitMCP"]),
.executable(name: "annotkit-mcp", targets: ["annotkit-mcp"])
],
targets: [
.target(
name: "AnnotKit",
swiftSettings: [
.swiftLanguageMode(.v6)
]
),
// Optional agent bridge: a file-backed note store and a clean-room
// JSON-RPC / MCP dispatcher, plus a thin stdio executable. Kept out of
// the AnnotKit UI library so hosts that only want the toolbar do not
// pull it in.
.target(
name: "AnnotKitMCP",
dependencies: ["AnnotKit"],
swiftSettings: [
.swiftLanguageMode(.v6)
]
),
.executableTarget(
name: "annotkit-mcp",
dependencies: ["AnnotKitMCP"],
swiftSettings: [
.swiftLanguageMode(.v6)
]
),
.testTarget(
name: "AnnotKitTests",
dependencies: ["AnnotKit", "AnnotKitMCP"],
swiftSettings: [
.swiftLanguageMode(.v6)
]
),
// macOS smoke probe: builds an off-screen window with identified
// controls and exercises the live AX adapter (snapshot / hitTest /
// selector). Doubles as the seed for the F7 example app.
.executableTarget(
name: "AnnotKitProbe",
dependencies: ["AnnotKit"],
swiftSettings: [
.swiftLanguageMode(.v6)
]
),
// Interactive macOS demo: a small settings screen of identified
// controls with the annotation overlay mounted. `swift run
// AnnotKitDemo`, click Annotate, click a control (or drag a frame
// around a stat card), type a note, Save. Writes ANNOTKIT_NOTES.md
// in the working directory. Also serves as the on-camera demo app.
.executableTarget(
name: "AnnotKitDemo",
dependencies: ["AnnotKit"],
swiftSettings: [
.swiftLanguageMode(.v6)
]
),
// One isolated embedding host, configured from its environment alone and
// driven in code: mounts via `Annotation.install`, captures a note with
// host world context, and exports to whatever destinations the launch env
// named. `AgentLoopE2ETests` runs two of these side by side to assert an
// agent can reproduce the world, find the notes, and be woken by them.
.executableTarget(
name: "AnnotKitEnvProbe",
dependencies: ["AnnotKit"],
swiftSettings: [
.swiftLanguageMode(.v6)
]
),
// Off-screen overlay diagnostic harness. Unlike AnnotKitProbe (which only
// exercises the IDLE corner panel), this one calls `Annotation.install()`
// then `Annotation.start()` so the child panel EXPANDS to the full host
// window, then inspects the AX snapshot and the raw
// `AXUIElementCopyElementAtPosition` result THROUGH the expanded overlay.
// It exists to confirm/refute the "expanded panel shadows the host in the
// AX point query" hypothesis (issue 2). Reusable regression asset.
.executableTarget(
name: "AnnotKitOverlayProbe",
dependencies: ["AnnotKit"],
swiftSettings: [
.swiftLanguageMode(.v6)
]
)
]
)