@lattices/cli 0.4.2 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/app/Info.plist +2 -2
- package/app/Lattices.app/Contents/Info.plist +2 -2
- package/app/Lattices.app/Contents/MacOS/Lattices +0 -0
- package/app/Package.swift +6 -0
- package/app/Sources/App.swift +10 -0
- package/app/Sources/AppDelegate.swift +90 -34
- package/app/Sources/AppShellView.swift +2 -0
- package/app/Sources/AppTypeClassifier.swift +36 -0
- package/app/Sources/AppUpdater.swift +92 -0
- package/app/Sources/CheatSheetHUD.swift +1 -0
- package/app/Sources/CliActionLauncher.swift +50 -0
- package/app/Sources/CommandModeView.swift +4 -24
- package/app/Sources/CompanionActivityLog.swift +70 -0
- package/app/Sources/CompanionKeyboardController.swift +141 -0
- package/app/Sources/DesktopModel.swift +4 -0
- package/app/Sources/HandsOffSession.swift +15 -4
- package/app/Sources/HomeDashboardView.swift +18 -10
- package/app/Sources/HotkeyStore.swift +8 -5
- package/app/Sources/IntentEngine.swift +7 -1
- package/app/Sources/LatticesApi.swift +125 -4
- package/app/Sources/LatticesCompanionBridgeServer.swift +438 -0
- package/app/Sources/LatticesCompanionCockpit.swift +555 -0
- package/app/Sources/LatticesCompanionSecurityCoordinator.swift +594 -0
- package/app/Sources/LatticesCompanionTrackpadController.swift +204 -0
- package/app/Sources/LatticesDeckHost.swift +1463 -0
- package/app/Sources/LatticesRuntime.swift +61 -0
- package/app/Sources/MainView.swift +351 -191
- package/app/Sources/MouseFinder.swift +335 -30
- package/app/Sources/MouseGestureConfig.swift +364 -0
- package/app/Sources/MouseGestureController.swift +1203 -0
- package/app/Sources/MouseInputDeviceStore.swift +98 -0
- package/app/Sources/MouseInputEventViewer.swift +272 -0
- package/app/Sources/MouseShortcutStore.swift +107 -0
- package/app/Sources/OmniSearchView.swift +136 -2
- package/app/Sources/OmniSearchWindow.swift +65 -5
- package/app/Sources/OnboardingView.swift +30 -16
- package/app/Sources/PaletteCommand.swift +26 -6
- package/app/Sources/PermissionChecker.swift +76 -2
- package/app/Sources/PiAuthNextStepCard.swift +148 -0
- package/app/Sources/PiAuthPromptCard.swift +90 -0
- package/app/Sources/PiChatDock.swift +137 -74
- package/app/Sources/PiChatSession.swift +608 -108
- package/app/Sources/PiInstallCallout.swift +86 -0
- package/app/Sources/PiProviderSetupCallout.swift +99 -0
- package/app/Sources/PiWorkspaceView.swift +174 -77
- package/app/Sources/Preferences.swift +78 -0
- package/app/Sources/ScreenMapState.swift +91 -31
- package/app/Sources/ScreenMapView.swift +510 -524
- package/app/Sources/ScreenMapWindowController.swift +12 -4
- package/app/Sources/SettingsView.swift +869 -152
- package/app/Sources/SystemTelemetryMonitor.swift +273 -0
- package/app/Sources/VoiceCommandWindow.swift +23 -2
- package/app/Sources/WindowDragSnapController.swift +628 -0
- package/app/Sources/WindowTiler.swift +328 -65
- package/app/Sources/WorkspaceManager.swift +288 -0
- package/bin/assistant-intelligence.ts +874 -0
- package/bin/handsoff-infer.ts +16 -209
- package/bin/handsoff-worker.ts +45 -258
- package/bin/lattices-app.ts +62 -0
- package/bin/lattices-dev +4 -0
- package/bin/lattices.ts +125 -14
- package/docs/agents.md +14 -0
- package/docs/api.md +55 -0
- package/docs/app.md +3 -0
- package/docs/companion-deck.md +180 -0
- package/docs/config.md +25 -0
- package/docs/tiling-reference.md +55 -0
- package/docs/voice-error-model.md +73 -0
- package/package.json +2 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
enum LatticesRuntime {
|
|
4
|
+
static var cliRoot: String? {
|
|
5
|
+
if let idx = CommandLine.arguments.firstIndex(of: "--lattices-cli-root"),
|
|
6
|
+
CommandLine.arguments.indices.contains(idx + 1) {
|
|
7
|
+
let root = CommandLine.arguments[idx + 1]
|
|
8
|
+
if hasAppHelper(in: root) { return root }
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let bundleDerivedRoot = Bundle.main.bundleURL
|
|
12
|
+
.deletingLastPathComponent()
|
|
13
|
+
.deletingLastPathComponent()
|
|
14
|
+
.path
|
|
15
|
+
if hasAppHelper(in: bundleDerivedRoot) {
|
|
16
|
+
return bundleDerivedRoot
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let devRoot = NSHomeDirectory() + "/dev/lattices"
|
|
20
|
+
if hasAppHelper(in: devRoot) {
|
|
21
|
+
return devRoot
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return nil
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static var appHelperScriptPath: String? {
|
|
28
|
+
guard let cliRoot else { return nil }
|
|
29
|
+
let path = cliRoot + "/bin/lattices-app.ts"
|
|
30
|
+
return FileManager.default.fileExists(atPath: path) ? path : nil
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
static var bunPath: String? {
|
|
34
|
+
let candidates = [
|
|
35
|
+
NSHomeDirectory() + "/.bun/bin/bun",
|
|
36
|
+
"/usr/local/bin/bun",
|
|
37
|
+
"/opt/homebrew/bin/bun",
|
|
38
|
+
]
|
|
39
|
+
if let path = candidates.first(where: { FileManager.default.isExecutableFile(atPath: $0) }) {
|
|
40
|
+
return path
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let resolved = ProcessQuery.shell(["/bin/zsh", "-lc", "command -v bun 2>/dev/null"])
|
|
44
|
+
if !resolved.isEmpty, FileManager.default.isExecutableFile(atPath: resolved) {
|
|
45
|
+
return resolved
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return nil
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static var appVersion: String {
|
|
52
|
+
let info = Bundle.main.infoDictionary
|
|
53
|
+
return (info?["CFBundleShortVersionString"] as? String)
|
|
54
|
+
?? (info?["CFBundleVersion"] as? String)
|
|
55
|
+
?? "unknown"
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
private static func hasAppHelper(in root: String) -> Bool {
|
|
59
|
+
FileManager.default.fileExists(atPath: root + "/bin/lattices-app.ts")
|
|
60
|
+
}
|
|
61
|
+
}
|