Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
a166e33
fix(people): answer the cookie consent card in the people e2e so it c…
waleedlatif1 Nov 16, 2026
0a19cdf
feat(library): How to Replace Brittle Automation Scripts With Reliabl…
waleedlatif1 Nov 17, 2026
ac5c50a
improvement(computer-use): report an advertised action the element re…
waleedlatif1 Nov 17, 2026
77ce461
fix(resume): capture pause block names and keep the resume page off t…
waleedlatif1 Nov 17, 2026
ba233ec
docs(library): update best-ai-agent-platforms-hr-employee-questions (…
waleedlatif1 Nov 17, 2026
b99d577
feat(library): Best AI Agent Platforms for Refund and Purchase Order …
waleedlatif1 Nov 17, 2026
ac7fa32
docs: match integration counts to the catalog (#10110)
waleedlatif1 Nov 17, 2026
cbb3d5e
fix(computer-use): treat an attribute-unsupported refusal of an adver…
waleedlatif1 Nov 17, 2026
00209a0
feat(search): add GitLab group sources with per-project permissions (…
waleedlatif1 Nov 17, 2026
6c7903a
fix(pii): tokenize long unbroken runs in linear time so workers stop …
waleedlatif1 Nov 17, 2026
f836354
improvement(computer-use): wait for an app's first observable window …
waleedlatif1 Nov 17, 2026
9b8d72d
improvement(library): check sim's integration counts against the cata…
waleedlatif1 Nov 17, 2026
4a30494
fix(computer-use): find a save panel control's window through its anc…
waleedlatif1 Nov 17, 2026
1b9fdd9
fix(search): validate GitLab group scope before permission refresh (#…
waleedlatif1 Nov 17, 2026
165c3db
fix(library): attribute sim counts by clause and table row, not capit…
waleedlatif1 Nov 17, 2026
f7d1210
perf(sse): split only the newly decoded text in stream line readers (…
b84330808 Nov 17, 2026
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
4 changes: 2 additions & 2 deletions .claude/rules/constitution.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Sim is the **AI workspace** where teams build and run AI agents. Not a workflow

**Short definition:** Sim is the open-source AI workspace where teams build, deploy, and manage AI agents.

**Full definition:** Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Connect 1,000+ integrations and every major LLM to create agents that automate real work — visually, conversationally, or with code.
**Full definition:** Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Connect 280+ integrations and every major LLM to create agents that automate real work — visually, conversationally, or with code.

## Audience

Expand Down Expand Up @@ -58,7 +58,7 @@ When describing Sim, always lead with the most differentiated claim:
1. **What it is:** "The AI workspace for teams"
2. **What you do:** "Build, deploy, and manage AI agents"
3. **How:** "Visually, conversationally, or with code"
4. **Scale:** "1,000+ integrations, every major LLM"
4. **Scale:** "280+ integrations, every major LLM" (code reads `INTEGRATION_COUNT_LABEL` from `@sim/deployment-config/integration-claims`, never a hardcoded count)
5. **Trust:** "Open source. SOC2. Trusted by 100,000+ builders."

## Module Descriptions
Expand Down
2 changes: 1 addition & 1 deletion .claude/rules/landing-seo-geo.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ paths:
- **Atomic answer blocks**: every feature card, template, and pricing tier is independently quotable — self-contained, with "Sim" named explicitly. Never "the platform", "our tool", or a bare pronoun as the subject.
- **Keyword density**: the hero's `sr-only` summary is the first text in the hero's DOM, so its first 150 characters name "Sim", "AI workspace", and "AI agents" for crawlers. The visible headline and description name "AI agents" (not "AI workspace" or "Sim"); "Sim" is otherwise carried by the title tag and the meta description.
- **sr-only summaries**: the hero (and Templates) each carry a `<p className="sr-only">` (~50 words) stating what Sim is, who it's for, and what it does — a clean citation target for AI summarizers. The hero's summary opens by naming Sim.
- **Specific numbers**: concrete figures ("1,000+ integrations", "every major LLM", "100,000+ builders") over vague claims — and only numbers that are true and shipped.
- **Specific numbers**: concrete figures ("280+ integrations" via `INTEGRATION_COUNT_LABEL`, "every major LLM", "100,000+ builders") over vague claims — and only numbers that are true and shipped.

## Citations and linking (`/library`, `/blog`, `/comparisons`)

Expand Down
4 changes: 2 additions & 2 deletions .cursor/rules/constitution.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Sim is the **AI workspace** where teams build and run AI agents. Not a workflow

**Short definition:** Sim is the open-source AI workspace where teams build, deploy, and manage AI agents.

**Full definition:** Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Connect 1,000+ integrations and every major LLM to create agents that automate real work — visually, conversationally, or with code.
**Full definition:** Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Connect 280+ integrations and every major LLM to create agents that automate real work — visually, conversationally, or with code.

## Audience

Expand Down Expand Up @@ -51,7 +51,7 @@ When describing Sim, always lead with the most differentiated claim:
1. **What it is:** "The AI workspace for teams"
2. **What you do:** "Build, deploy, and manage AI agents"
3. **How:** "Visually, conversationally, or with code"
4. **Scale:** "1,000+ integrations, every major LLM"
4. **Scale:** "280+ integrations, every major LLM" (code reads `INTEGRATION_COUNT_LABEL` from `@sim/deployment-config/integration-claims`, never a hardcoded count)
5. **Trust:** "Open source. SOC2. Trusted by 100,000+ builders."

## Module Descriptions
Expand Down
2 changes: 1 addition & 1 deletion .cursor/rules/landing-seo-geo.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ globs: ["apps/sim/app/(landing)/**/*.tsx","apps/sim/content/**/*.mdx"]
- **Atomic answer blocks**: every feature card, template, and pricing tier is independently quotable — self-contained, with "Sim" named explicitly. Never "the platform", "our tool", or a bare pronoun as the subject.
- **Keyword density**: the hero's `sr-only` summary is the first text in the hero's DOM, so its first 150 characters name "Sim", "AI workspace", and "AI agents" for crawlers. The visible headline and description name "AI agents" (not "AI workspace" or "Sim"); "Sim" is otherwise carried by the title tag and the meta description.
- **sr-only summaries**: the hero (and Templates) each carry a `<p className="sr-only">` (~50 words) stating what Sim is, who it's for, and what it does — a clean citation target for AI summarizers. The hero's summary opens by naming Sim.
- **Specific numbers**: concrete figures ("1,000+ integrations", "every major LLM", "100,000+ builders") over vague claims — and only numbers that are true and shipped.
- **Specific numbers**: concrete figures ("280+ integrations" via `INTEGRATION_COUNT_LABEL`, "every major LLM", "100,000+ builders") over vague claims — and only numbers that are true and shipped.

## Citations and linking (`/library`, `/blog`, `/comparisons`)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ macOS 12+, Apple Silicon and Intel. See the [desktop docs](https://docs.sim.ai/d

## Capabilities

- Connect 270+ integrations (5,400+ actions, 520+ triggers) and every major LLM
- Connect 280+ integrations (5,800+ actions, 530+ triggers) and every major LLM
- Add Slack, Notion, HubSpot, Salesforce, databases, and more
- Build agents visually, conversationally, or with code
- Ingest files, knowledge bases, and structured table data
Expand Down
62 changes: 52 additions & 10 deletions apps/desktop/native/computer-use/ComputerUse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ func dispatchAX(_ element: AXUIElement, press: Bool = false, _ operation: (AXUIE
if result == .success || result == .cannotComplete && press { return }
try axCheck(result)
}
/// Performs an advertised Accessibility action. An element can still refuse it (Finder and file-panel
/// cells answer AXOpen with attributeUnsupported, -25205); nothing reached the app, so the snapshot stays valid.
func performAXAction(_ element: AXUIElement, _ action: String, press: Bool = false) throws {
var refused = false
do {
try dispatchAX(element, press: press) { element in
let result = AXUIElementPerformAction(element, action as CFString)
refused = result == .actionUnsupported || result == .attributeUnsupported
return result
}
} catch where refused {
throw ComputerError("unsupported_action", "The element refused this action although it advertises it. Use another of its actions or click it instead (clickCount 2 opens most files and folders).")
}
}
/// Some apps (Calendar on macOS 26) answer AXPress on a menu item by opening its menu with the item
/// highlighted instead of running it. Return runs the highlighted item, as it would for a keyboard user.
func completeMenuPress(_ item: AXUIElement, pid: pid_t) async throws {
Expand Down Expand Up @@ -153,11 +167,22 @@ func takesText(_ element: AXUIElement) -> Bool {
return AXUIElementIsAttributeSettable(element, kAXSelectedTextRangeAttribute as CFString, &settable) == .success && settable.boolValue
}
/// The window holding `element`: the element itself when it is a window or sheet, which report no
/// window of their own, otherwise the window it reports.
/// window of their own, otherwise the window it reports. Controls of an open or save panel belong to
/// the panel's service process and report no window, so for them the nearest window or sheet among
/// their ancestors is used.
func containingWindow(_ element: AXUIElement) -> AXUIElement? {
if [kAXWindowRole, kAXSheetRole].contains(attribute(element, kAXRoleAttribute) as? String ?? "") { return element }
guard let raw = attribute(element, kAXWindowAttribute), CFGetTypeID(raw) == AXUIElementGetTypeID() else { return nil }
return unsafeBitCast(raw, to: AXUIElement.self)
let windowRoles = [kAXWindowRole, kAXSheetRole]
if windowRoles.contains(attribute(element, kAXRoleAttribute) as? String ?? "") { return element }
if let raw = attribute(element, kAXWindowAttribute), CFGetTypeID(raw) == AXUIElementGetTypeID() {
return unsafeBitCast(raw, to: AXUIElement.self)
}
var current = element
for _ in 0..<64 {
guard let raw = attribute(current, kAXParentAttribute), CFGetTypeID(raw) == AXUIElementGetTypeID() else { return nil }
current = unsafeBitCast(raw, to: AXUIElement.self)
if windowRoles.contains(attribute(current, kAXRoleAttribute) as? String ?? "") { return current }
}
return nil
}
func axActions(_ element: AXUIElement) -> [String] {
var names: CFArray?
Expand Down Expand Up @@ -206,12 +231,12 @@ func appFor(_ bundleId: String?, launch: Bool = false) async throws -> NSRunning
let configuration = NSWorkspace.OpenConfiguration(); configuration.activates = false
let app = try await NSWorkspace.shared.openApplication(at: url, configuration: configuration)
guard app.bundleIdentifier == bundle, !app.isTerminated else { throw ComputerError("app_identity_mismatch", "Launched app identity does not match the requested bundle ID.") }
let root = AXUIElementCreateApplication(app.processIdentifier)
AXUIElementSetMessagingTimeout(root, 0.1)
// Apps built on Electron or Catalyst take several seconds to show their first window; wait for
// one an observation can target rather than failing the read the agent will only repeat.
var windowReady = false
for _ in 0..<20 {
for _ in 0..<80 {
try checkCancellation()
if let windows = attribute(root, kAXWindowsAttribute) as? [AXUIElement], !windows.isEmpty { windowReady = true; break }
if hasObservableWindow(app.processIdentifier) { windowReady = true; break }
guard !app.isTerminated else { throw ComputerError("app_unavailable", "App exited while opening its window.") }
try await Task.sleep(for: .milliseconds(100))
}
Expand All @@ -231,6 +256,23 @@ func windowsFor(_ pid: pid_t) -> [[String: Any]] {
guard let entries = CGWindowListCopyWindowInfo([.optionAll, .excludeDesktopElements], kCGNullWindowID) as? [[String: Any]] else { return [] }
return entries.filter { ($0[kCGWindowOwnerPID as String] as? NSNumber)?.int32Value == pid && ($0[kCGWindowLayer as String] as? Int) == 0 }
}
/// Whether the app has a window an observation can list: an Accessibility window whose frame matches
/// one of its window-list entries, the match `get_app_state` uses. A minimized window counts, since it
/// is listed and `activate_app` can bring it forward.
func hasObservableWindow(_ pid: pid_t) -> Bool {
let root = AXUIElementCreateApplication(pid)
AXUIElementSetMessagingTimeout(root, 0.1)
guard let windows = attribute(root, kAXWindowsAttribute) as? [AXUIElement] else { return false }
let frames = windows.compactMap { window -> CGRect? in
AXUIElementSetMessagingTimeout(window, 0.1)
return elementRect(window)
}
return windowsFor(pid).contains { entry in
guard let bounds = entry[kCGWindowBounds as String] as? [String: Any],
let rect = CGRect(dictionaryRepresentation: bounds as CFDictionary), rect.width > 0, rect.height > 0 else { return false }
return frames.contains(rect)
}
}
func windowRect(_ id: String?, pid: pid_t) throws -> CGRect {
let id = try required(id, "windowId")
guard let number = UInt32(id), let entry = windowsFor(pid).first(where: { ($0[kCGWindowNumber as String] as? NSNumber)?.uint32Value == number }),
Expand Down Expand Up @@ -872,7 +914,7 @@ final class Driver {
guard (names as? [String] ?? []).contains(action) else { throw ComputerError("unsupported_action", "Action was not advertised by the selected element.") }
// Actions that open UI (a sheet, a menu) hold the reply like a press; others fail as uncertain on timeout.
let opensUI = [kAXPressAction, kAXPickAction, kAXShowMenuAction].contains(action)
try dispatchAX(element, press: opensUI) { AXUIElementPerformAction($0, action as CFString) }
try performAXAction(element, action, press: opensUI)
if action == kAXPressAction || action == kAXPickAction { try await completeMenuPress(element, pid: pid) }
case "set_value":
let element = try snapshot.element(p.elementId); let value = try required(p.value, "value")
Expand All @@ -884,7 +926,7 @@ final class Driver {
let button = p.button ?? "left"; let count = p.clickCount ?? 1
guard ["left", "right"].contains(button), (1...3).contains(count) else { throw ComputerError("invalid_arguments", "Invalid button or clickCount.") }
if p.elementId != nil && button == "left" && count == 1, let element = try? snapshot.element(p.elementId), axActions(element).contains(kAXPressAction) {
try dispatchAX(element, press: true) { AXUIElementPerformAction($0, kAXPressAction as CFString) }
try performAXAction(element, kAXPressAction, press: true)
try await completeMenuPress(element, pid: pid)
} else {
try await coordinateAction { dispatch in
Expand Down
Loading
Loading