Add personal data tools, 2nd Brain trust toggle, and research agents

Personal Data Tools: native Calendar, Reminders, Contacts (hidden pending
Apple TCC fix in beta), and Location & Maps access via EventKit, Contacts
framework, and MapKit. Write actions (create event/reminder, complete
reminder) gate through an approval sheet. Four hardened-runtime entitlements
added to oAI.entitlements; Info.plist usage strings added for all services.
Personal Data section shows a β badge while Contacts is hidden.

2nd Brain always-trust: inline toggle on the Agent Skills row for the skill
named "2nd Brain" skips the bash approval dialog when the command contains
.brain_helper.py, gated by three runtime checks in MCPService.

Research agents: spawn_research_agents tool runs up to 5 concurrent read-only
sub-agents (read_file, list_directory, search_files, web_search — no write,
no bash, no nesting). Bounded by maxConcurrentAgents setting (default 3) and
a hard ceiling of 8 tasks. Added items field to Tool.Function.Parameters.Property
for JSON Schema array support; wired into AnthropicProvider.convertParametersToDict.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 14:04:47 +02:00
parent 454cef4193
commit 40c5f25517
17 changed files with 11041 additions and 8443 deletions
+16 -2
View File
@@ -113,7 +113,9 @@ struct AgentSkillsView: View {
onToggle: { settings.toggleAgentSkill(id: skill.id) },
onEdit: { editContext = SkillEditContext(skill: skill) },
onExport: { exportOne(skill) },
onDelete: { settings.deleteAgentSkill(id: skill.id) }
onDelete: { settings.deleteAgentSkill(id: skill.id) },
isTrusted: settings.trustSecondBrainSkill,
onToggleTrust: { settings.trustSecondBrainSkill.toggle() }
)
}
}
@@ -349,6 +351,8 @@ private struct AgentSkillRow: View {
let onEdit: () -> Void
let onExport: () -> Void
let onDelete: () -> Void
var isTrusted: Bool = false
var onToggleTrust: (() -> Void)? = nil
private var fileCount: Int {
AgentSkillFilesService.shared.listFiles(for: skill.id).count
@@ -378,6 +382,14 @@ private struct AgentSkillRow: View {
Spacer()
// 2nd Brain: let the user mark bash calls to its helper script as always-trusted,
// skipping the bash approval dialog. Only shown for this specific skill while active.
if skill.isActive, skill.isSecondBrainSkill, let onToggleTrust {
Toggle("Trust", isOn: Binding(get: { isTrusted }, set: { _ in onToggleTrust() }))
.toggleStyle(.switch).controlSize(.small)
.help("When on, bash commands that call the 2nd Brain helper script run without asking for approval each time.")
}
// File count badge
if fileCount > 0 {
Label("^[\(fileCount) file](inflect: true)", systemImage: "doc")
@@ -479,7 +491,9 @@ struct AgentSkillsTabContent: View {
onToggle: { settings.toggleAgentSkill(id: skill.id) },
onEdit: { editContext = SkillEditContext(skill: skill) },
onExport: { exportOne(skill) },
onDelete: { settings.deleteAgentSkill(id: skill.id) }
onDelete: { settings.deleteAgentSkill(id: skill.id) },
isTrusted: settings.trustSecondBrainSkill,
onToggleTrust: { settings.trustSecondBrainSkill.toggle() }
)
if idx < settings.agentSkills.count - 1 { Divider() }
}