Skip to content
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ big changes should have an issue agreeing on the approach before code.

## Checklist

- [ ] `pnpm typecheck` and `pnpm test` pass locally
- [ ] `pnpm verify` passes locally
- [ ] Server behavior changes come with tests (see CONTRIBUTING.md → Tests)
- [ ] No `dist-server/` edits (it's build output)
- [ ] macOS-only code is platform-gated; no `shell: true` / cmd.exe string-building
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

jobs:
test:
name: typecheck + test (${{ matrix.os }})
name: verify (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
Expand All @@ -32,9 +32,7 @@ jobs:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
- run: pnpm test
- run: pnpm check:electron
- run: pnpm verify
- name: production UI build
if: matrix.os == 'ubuntu-latest'
run: pnpm exec vite build
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
.worktrees/
.cursor/
dist
dist-electron
dist-native
Expand All @@ -8,6 +9,9 @@ dist-native
dist-companion
dist-server
*.local
.env
.env.*
!.env.example
.DS_Store
*.tsbuildinfo
electron/resources/speech-helper
Expand Down
1 change: 1 addition & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
".roo/**",
".windsurf/**",
"dist/**",
"dist-companion/**",
"dist-electron/**",
"dist-native/**",
"dist-server/**",
Expand Down
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ makes a PR easy to merge. Read it once before opening anything; it's short on pu
- **Match the altitude.** This codebase is deliberately small and direct — plain Node, no frameworks
on the server, one store, one event bus. Don't introduce a dependency where thirty lines of code
will do. New runtime dependencies need a reason in the PR description.
- **Keep it green.** `pnpm typecheck && pnpm test` must pass. Server changes need tests (see below).
- **Keep it green.** `pnpm verify` must pass. Server changes need tests (see below).
- **UI changes need screenshots.** Before/after images in the PR body; video for anything animated.
Match the existing palette and tone in [`src/styles.css`](src/styles.css).

Expand All @@ -30,10 +30,12 @@ pnpm dev:server # harness server → 127.0.0.1:8799
pnpm dev # app → http://127.0.0.1:5199
pnpm dev:desktop # Electron shell (macOS/Ubuntu; keep server + Vite running)

pnpm lint # advisory strict audit; the existing whole-repo backlog is not a CI gate
pnpm typecheck # app + server
pnpm test # vitest suite (server unit + driver contract + API smoke)
pnpm test:watch # same, in watch mode
pnpm check:electron # syntax-check the plain JS Electron entrypoints
pnpm verify # required gate: typecheck + full tests + Electron syntax

pnpm package:mac # DMG + ZIP; requires Swift/Xcode tools
pnpm package:linux # Ubuntu x64 .deb + AppImage; no Swift required
Expand Down Expand Up @@ -68,6 +70,10 @@ packages built from different commits under one version.
| `server/testing/` | Test fakes: an in-memory driver, plus scripted fake `claude` / `codex` CLIs. |
| `src/` | The React chat app. No transports of its own — HTTP commands out, one SSE stream in. |
| `electron/` | Desktop shell: dictation, screen capture, local computer-use daemon. macOS-specific code lives here, gated. |
| `companion/` | Restricted LAN/tailnet proxy used by paired mobile clients. |
| `ios/` | Native Swift companion app, XcodeGen spec, and CompanionCore package tests. |
| `cloudflare/composio-broker/` | Independently deployed Worker that brokers connected-app sessions. |
| `scripts/` | Build, packaging, smoke-test, and verification entry points. |
| `dist-server/` | **Build output.** Never hand-edit, never include in PRs — it's regenerated by `pnpm build:server` at release time. |

Data lives in `~/.openmausbot/` (bots, transcripts, per-thread NDJSON event logs, config with keys).
Expand Down Expand Up @@ -145,7 +151,7 @@ responses or events, no baking them into argv where another local process could

## Before you open the PR

- [ ] `pnpm typecheck` and `pnpm test` pass
- [ ] `pnpm verify` passes
- [ ] `pnpm check:electron` passes for desktop-shell changes
- [ ] Ubuntu packaging changes pass `pnpm package:linux` and `node scripts/verify-linux-package.mjs`
- [ ] New server behavior has a test; driver changes keep the contract tests green
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ Composio and Box are third-party services with their own accounts and terms. Box
its trial, and using a cloud computer may incur charges.

```sh
pnpm verify # typecheck + full tests + Electron syntax checks
pnpm typecheck # app + server
pnpm test # unit, driver, API, and desktop capability tests
pnpm build # typecheck + production build
Expand Down
7 changes: 7 additions & 0 deletions ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
.build/
.swiftpm/
DerivedData/
build/
*.xcodeproj
*.xcworkspace
# Generated by XcodeGen from `project.yml`.
App/Info.plist
# Generated by Fastlane runs, not release configuration.
fastlane/README.md
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/
fastlane/test_output/
157 changes: 157 additions & 0 deletions ios/App/Cards/AgentThoughtChamberView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
import SwiftUI
import CompanionCore

public struct AgentThoughtChamberView: View {
public let reasoning: String
public let botName: String
public let mascotColor: Color
public let isStreaming: Bool

@Environment(\.colorScheme) private var colorScheme
@State private var isExpanded: Bool = false
@State private var pulseAnimation: Bool = false

public init(
reasoning: String,
botName: String = "Bot",
mascotColor: Color = .purple,
isStreaming: Bool = false
) {
self.reasoning = reasoning
self.botName = botName
self.mascotColor = mascotColor
self.isStreaming = isStreaming
}

private var steps: [String] {
reasoning.components(separatedBy: "\n").filter { !$0.trimmingCharacters(in: .whitespaces).isEmpty }
}

public var body: some View {
let isDark = colorScheme == .dark

VStack(alignment: .leading, spacing: 6) {
headerButton(isDark: isDark)

if isExpanded {
expandedContent(isDark: isDark)
}
}
.padding(6)
.background(
LinearGradient(
colors: isDark ? [
Color(hex: "#18181B").opacity(0.92),
Color(hex: "#0F172A").opacity(0.88)
] : [
Color.white.opacity(0.94),
Color(hex: "#F8FAFC").opacity(0.88)
],
startPoint: .topLeading,
endPoint: .bottomTrailing
)
)
.background(.ultraThinMaterial)
.clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
.overlay(
RoundedRectangle(cornerRadius: 12, style: .continuous)
.stroke(isDark ? mascotColor.opacity(0.3) : Color.black.opacity(0.08), lineWidth: 0.65)
)
.shadow(color: Color.black.opacity(isDark ? 0.25 : 0.04), radius: 3, y: 1)
.onAppear {
if isStreaming {
withAnimation(.easeInOut(duration: 0.8).repeatForever(autoreverses: true)) {
pulseAnimation = true
}
}
}
.onChange(of: isStreaming) { _, streaming in
if streaming {
withAnimation(.easeInOut(duration: 0.8).repeatForever(autoreverses: true)) {
pulseAnimation = true
}
} else {
pulseAnimation = false
}
}
}

@ViewBuilder
private func headerButton(isDark: Bool) -> some View {
Button {
withAnimation(.spring(response: 0.35, dampingFraction: 0.72)) {
isExpanded.toggle()
}
Haptics.selection()
} label: {
HStack(spacing: 6) {
Image(systemName: "brain.head.profile")
.font(.system(size: 11, weight: .bold))
.foregroundColor(mascotColor)
.scaleEffect(pulseAnimation ? 1.15 : 1.0)

Text(isStreaming ? "Thinking…" : "Thought Process")
.font(.caption2.weight(.bold))
.foregroundColor(isDark ? Color(hex: "#F8FAFC") : Color(hex: "#334155"))

if isStreaming {
Circle()
.fill(mascotColor)
.frame(width: 6, height: 6)
.opacity(pulseAnimation ? 1.0 : 0.3)
}

Spacer()

Text("\(steps.count) \(steps.count == 1 ? "step" : "steps")")
.font(.system(size: 9.5, weight: .medium, design: .monospaced))
.foregroundColor(isDark ? Color(hex: "#94A3B8") : Color(hex: "#64748B"))

Image(systemName: isExpanded ? "chevron.up" : "chevron.down")
.font(.system(size: 9, weight: .bold))
.foregroundColor(isDark ? Color(hex: "#94A3B8") : Color(hex: "#64748B"))
}
.padding(.horizontal, 10)
.padding(.vertical, 6)
.background(isDark ? Color.white.opacity(0.08) : Color.black.opacity(0.04))
.clipShape(Capsule())
}
.buttonStyle(.plain)
}

@ViewBuilder
private func expandedContent(isDark: Bool) -> some View {
VStack(alignment: .leading, spacing: 6) {
ScrollView {
VStack(alignment: .leading, spacing: 4) {
ForEach(Array(steps.enumerated()), id: \.offset) { idx, step in
stepRow(index: idx, step: step, isDark: isDark)
}
}
}
.frame(maxHeight: 160)
}
.padding(10)
.background(isDark ? Color.black.opacity(0.35) : Color.white.opacity(0.85))
.clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous))
.overlay(
RoundedRectangle(cornerRadius: 10, style: .continuous)
.stroke(isDark ? Color.white.opacity(0.06) : Color.black.opacity(0.06), lineWidth: 0.5)
)
.transition(.opacity.combined(with: .move(edge: .top)))
}

@ViewBuilder
private func stepRow(index: Int, step: String, isDark: Bool) -> some View {
HStack(alignment: .top, spacing: 6) {
Text(String(index + 1) + ".")
.font(.system(size: 10, weight: .bold, design: .monospaced))
.foregroundColor(mascotColor)

Text(step)
.font(.caption2)
.foregroundColor(isDark ? Color(hex: "#E2E8F0") : Color(hex: "#1E293B"))
.fixedSize(horizontal: false, vertical: true)
}
}
}
Loading