@arach/lattices 0.2.0 → 0.6.1
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/LICENSE +21 -0
- package/README.md +172 -86
- package/apps/mac/Info.plist +43 -0
- package/apps/mac/Lattices.app/Contents/Info.plist +43 -0
- package/apps/mac/Lattices.app/Contents/MacOS/Lattices +0 -0
- package/apps/mac/Lattices.app/Contents/Resources/AppIcon.icns +0 -0
- package/apps/mac/Lattices.app/Contents/Resources/docs/assistant-knowledge.md +130 -0
- package/apps/mac/Lattices.app/Contents/Resources/tap.wav +0 -0
- package/apps/mac/Lattices.app/Contents/_CodeSignature/CodeResources +150 -0
- package/apps/mac/Lattices.entitlements +21 -0
- package/apps/mac/Resources/Pets/assistant-spark/pet.json +62 -0
- package/apps/mac/Resources/Pets/assistant-spark/spritesheet.webp +0 -0
- package/apps/mac/Resources/Pets/scout-ranger/pet.json +6 -0
- package/apps/mac/Resources/Pets/scout-ranger/spritesheet.webp +0 -0
- package/apps/mac/Resources/tap.wav +0 -0
- package/assets/AppIcon.icns +0 -0
- package/bin/assistant-intelligence.ts +912 -0
- package/bin/cli/capture.ts +252 -0
- package/bin/cli/daemon.ts +22 -0
- package/bin/cli/helpers.ts +105 -0
- package/bin/cli/layer.ts +178 -0
- package/bin/cli/runs.ts +43 -0
- package/bin/cli/search.ts +141 -0
- package/bin/cli/session.ts +32 -0
- package/bin/client.ts +17 -0
- package/bin/cua.ts +26 -0
- package/bin/{daemon-client.js → daemon-client.ts} +49 -30
- package/bin/handsoff-infer.ts +96 -0
- package/bin/handsoff-worker.ts +531 -0
- package/bin/infer.ts +424 -0
- package/bin/keychain.ts +75 -0
- package/bin/lattices-app.ts +655 -0
- package/bin/lattices-build +125 -0
- package/bin/lattices-build-env.ts +77 -0
- package/bin/lattices-dev +362 -0
- package/bin/lattices.ts +3260 -0
- package/bin/project-twin.ts +645 -0
- package/docs/agent-execution-plan.md +562 -0
- package/docs/agent-layer-guide.md +207 -0
- package/docs/agents.md +233 -0
- package/docs/ai-chat-ux-review.md +416 -0
- package/docs/api.md +1041 -47
- package/docs/app.md +96 -13
- package/docs/assistant-knowledge.md +130 -0
- package/docs/companion-deck.md +209 -0
- package/docs/component-extraction-roadmap.md +392 -0
- package/docs/concepts.md +13 -12
- package/docs/config.md +83 -10
- package/docs/gesture-customization-proposal.md +520 -0
- package/docs/handsoff-test-scenarios.md +84 -0
- package/docs/hyperspace-grid-snappiness.md +210 -0
- package/docs/layers.md +176 -28
- package/docs/mouse-gestures.md +244 -0
- package/docs/ocr.md +21 -9
- package/docs/overview.md +42 -23
- package/docs/presentation-execution-review.md +491 -0
- package/docs/prompts/hands-off-system.md +382 -0
- package/docs/prompts/hands-off-turn.md +30 -0
- package/docs/prompts/voice-advisor.md +31 -0
- package/docs/prompts/voice-fallback.md +23 -0
- package/docs/proposals/LAT-001-gesture-visual-customization.md +522 -0
- package/docs/proposals/LAT-002-shared-overlay-canvas.md +353 -0
- package/docs/proposals/LAT-003-menu-bar-controller-architecture.md +291 -0
- package/docs/proposals/LAT-004-interactive-overlay-actors.md +534 -0
- package/docs/proposals/LAT-005-action-runtime-product-spine.md +914 -0
- package/docs/proposals/LAT-006-followup-gaps.md +103 -0
- package/docs/proposals/LAT-006-runs-and-capture-in-lattices.md +566 -0
- package/docs/proposals/LAT-007-unified-app-shell.md +128 -0
- package/docs/quickstart.md +8 -12
- package/docs/reference/dewey.config.ts +74 -0
- package/docs/reference/install-agent.md +79 -0
- package/docs/release.md +172 -0
- package/docs/repo-structure.md +100 -0
- package/docs/terminal-kit.md +87 -0
- package/docs/tiling-reference.md +224 -0
- package/docs/twins.md +138 -0
- package/docs/voice-command-protocol.md +278 -0
- package/docs/voice-error-model.md +73 -0
- package/docs/voice.md +221 -0
- package/package.json +69 -16
- package/packages/npm/sdk/cua.d.mts +1 -0
- package/packages/npm/sdk/cua.d.ts +188 -0
- package/packages/npm/sdk/cua.mjs +376 -0
- package/app/Lattices.app/Contents/Info.plist +0 -24
- package/app/Package.swift +0 -13
- package/app/Sources/ActionRow.swift +0 -61
- package/app/Sources/App.swift +0 -10
- package/app/Sources/AppDelegate.swift +0 -234
- package/app/Sources/AppShellView.swift +0 -62
- package/app/Sources/AppTypeClassifier.swift +0 -70
- package/app/Sources/AppWindowShell.swift +0 -63
- package/app/Sources/CheatSheetHUD.swift +0 -332
- package/app/Sources/CommandModeState.swift +0 -1362
- package/app/Sources/CommandModeView.swift +0 -1405
- package/app/Sources/CommandModeWindow.swift +0 -192
- package/app/Sources/CommandPaletteView.swift +0 -307
- package/app/Sources/CommandPaletteWindow.swift +0 -134
- package/app/Sources/DaemonProtocol.swift +0 -101
- package/app/Sources/DaemonServer.swift +0 -414
- package/app/Sources/DesktopModel.swift +0 -121
- package/app/Sources/DesktopModelTypes.swift +0 -71
- package/app/Sources/DiagnosticLog.swift +0 -271
- package/app/Sources/EventBus.swift +0 -30
- package/app/Sources/HotkeyManager.swift +0 -250
- package/app/Sources/HotkeyStore.swift +0 -338
- package/app/Sources/InventoryManager.swift +0 -35
- package/app/Sources/InventoryPath.swift +0 -43
- package/app/Sources/KeyRecorderView.swift +0 -210
- package/app/Sources/LatticesApi.swift +0 -1125
- package/app/Sources/MainView.swift +0 -467
- package/app/Sources/MainWindow.swift +0 -83
- package/app/Sources/OcrModel.swift +0 -309
- package/app/Sources/OcrStore.swift +0 -295
- package/app/Sources/OmniSearchState.swift +0 -283
- package/app/Sources/OmniSearchView.swift +0 -288
- package/app/Sources/OmniSearchWindow.swift +0 -105
- package/app/Sources/OrphanRow.swift +0 -129
- package/app/Sources/PaletteCommand.swift +0 -419
- package/app/Sources/PermissionChecker.swift +0 -125
- package/app/Sources/Preferences.swift +0 -92
- package/app/Sources/ProcessModel.swift +0 -199
- package/app/Sources/ProcessQuery.swift +0 -151
- package/app/Sources/Project.swift +0 -28
- package/app/Sources/ProjectRow.swift +0 -368
- package/app/Sources/ProjectScanner.swift +0 -121
- package/app/Sources/ScreenMapState.swift +0 -2387
- package/app/Sources/ScreenMapView.swift +0 -2820
- package/app/Sources/ScreenMapWindowController.swift +0 -89
- package/app/Sources/SessionManager.swift +0 -72
- package/app/Sources/SettingsView.swift +0 -1053
- package/app/Sources/SettingsWindow.swift +0 -20
- package/app/Sources/TabGroupRow.swift +0 -178
- package/app/Sources/Terminal.swift +0 -259
- package/app/Sources/TerminalQuery.swift +0 -156
- package/app/Sources/TerminalSynthesizer.swift +0 -200
- package/app/Sources/Theme.swift +0 -163
- package/app/Sources/TilePickerView.swift +0 -209
- package/app/Sources/TmuxModel.swift +0 -53
- package/app/Sources/TmuxQuery.swift +0 -81
- package/app/Sources/WindowTiler.swift +0 -1755
- package/app/Sources/WorkspaceManager.swift +0 -434
- package/bin/lattices-app.js +0 -221
- package/bin/lattices.js +0 -1418
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import Foundation
|
|
2
|
-
|
|
3
|
-
// MARK: - Data Models
|
|
4
|
-
|
|
5
|
-
struct TmuxSession: Identifiable {
|
|
6
|
-
let id: String // session name
|
|
7
|
-
let name: String
|
|
8
|
-
let windowCount: Int
|
|
9
|
-
let attached: Bool
|
|
10
|
-
let panes: [TmuxPane]
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
struct TmuxPane: Identifiable {
|
|
14
|
-
let id: String // "%0", "%1", etc.
|
|
15
|
-
let windowIndex: Int
|
|
16
|
-
let windowName: String
|
|
17
|
-
let title: String // pane_title
|
|
18
|
-
let currentCommand: String // e.g. "node", "vim", "zsh"
|
|
19
|
-
let pid: Int
|
|
20
|
-
let isActive: Bool
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// MARK: - Query
|
|
24
|
-
|
|
25
|
-
enum TmuxQuery {
|
|
26
|
-
private static let tmuxPath = "/opt/homebrew/bin/tmux"
|
|
27
|
-
|
|
28
|
-
/// List all tmux sessions with their panes in exactly 2 shell calls
|
|
29
|
-
static func listSessions() -> [TmuxSession] {
|
|
30
|
-
// Query 1: all sessions
|
|
31
|
-
let sessionsRaw = shell([
|
|
32
|
-
tmuxPath, "list-sessions", "-F",
|
|
33
|
-
"#{session_name}\t#{session_windows}\t#{session_created}\t#{session_attached}"
|
|
34
|
-
])
|
|
35
|
-
guard !sessionsRaw.isEmpty else { return [] }
|
|
36
|
-
|
|
37
|
-
// Query 2: all panes across all sessions
|
|
38
|
-
let panesRaw = shell([
|
|
39
|
-
tmuxPath, "list-panes", "-a", "-F",
|
|
40
|
-
"#{session_name}\t#{window_index}\t#{window_name}\t#{pane_id}\t#{pane_title}\t#{pane_current_command}\t#{pane_pid}\t#{pane_active}"
|
|
41
|
-
])
|
|
42
|
-
|
|
43
|
-
// Parse panes, grouped by session name
|
|
44
|
-
var panesBySession: [String: [TmuxPane]] = [:]
|
|
45
|
-
for line in panesRaw.split(separator: "\n") {
|
|
46
|
-
let cols = line.split(separator: "\t", omittingEmptySubsequences: false).map(String.init)
|
|
47
|
-
guard cols.count >= 8 else { continue }
|
|
48
|
-
let pane = TmuxPane(
|
|
49
|
-
id: cols[3],
|
|
50
|
-
windowIndex: Int(cols[1]) ?? 0,
|
|
51
|
-
windowName: cols[2],
|
|
52
|
-
title: cols[4],
|
|
53
|
-
currentCommand: cols[5],
|
|
54
|
-
pid: Int(cols[6]) ?? 0,
|
|
55
|
-
isActive: cols[7] == "1"
|
|
56
|
-
)
|
|
57
|
-
panesBySession[cols[0], default: []].append(pane)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Parse sessions
|
|
61
|
-
var sessions: [TmuxSession] = []
|
|
62
|
-
for line in sessionsRaw.split(separator: "\n") {
|
|
63
|
-
let cols = line.split(separator: "\t", omittingEmptySubsequences: false).map(String.init)
|
|
64
|
-
guard cols.count >= 4 else { continue }
|
|
65
|
-
let name = cols[0]
|
|
66
|
-
sessions.append(TmuxSession(
|
|
67
|
-
id: name,
|
|
68
|
-
name: name,
|
|
69
|
-
windowCount: Int(cols[1]) ?? 1,
|
|
70
|
-
attached: cols[3] != "0",
|
|
71
|
-
panes: panesBySession[name] ?? []
|
|
72
|
-
))
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return sessions
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
private static func shell(_ args: [String]) -> String {
|
|
79
|
-
ProcessQuery.shell(args)
|
|
80
|
-
}
|
|
81
|
-
}
|