@adaptic/maestro 1.0.0

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.
Files changed (854) hide show
  1. package/.claude/commands/init-agent.md +99 -0
  2. package/.claude/commands/init-maestro.md +565 -0
  3. package/.claude/settings.json +114 -0
  4. package/.env.example +152 -0
  5. package/README.md +491 -0
  6. package/agents/board-prep/agent.md +80 -0
  7. package/agents/browser-operator/agent.md +52 -0
  8. package/agents/calendar-ops/agent.md +50 -0
  9. package/agents/capital-raising/agent.md +69 -0
  10. package/agents/ceo-briefing/agent.md +72 -0
  11. package/agents/communications/agent.md +69 -0
  12. package/agents/competitive-intelligence/agent.md +49 -0
  13. package/agents/corporate-development/agent.md +66 -0
  14. package/agents/decision-log/agent.md +65 -0
  15. package/agents/desktop-operator/agent.md +59 -0
  16. package/agents/engineering-coordination/agent.md +51 -0
  17. package/agents/founder-voice/agent.md +72 -0
  18. package/agents/fund-ops/agent.md +52 -0
  19. package/agents/gmail-operator/agent.md +62 -0
  20. package/agents/hiring-org-design/agent.md +119 -0
  21. package/agents/inbound-dispatcher/agent.md +66 -0
  22. package/agents/legal-structuring/agent.md +65 -0
  23. package/agents/market-research/agent.md +48 -0
  24. package/agents/partnerships/agent.md +59 -0
  25. package/agents/platform-architecture/agent.md +57 -0
  26. package/agents/pmo-execution/agent.md +60 -0
  27. package/agents/product-strategy/agent.md +50 -0
  28. package/agents/regulatory-dfsa/agent.md +96 -0
  29. package/agents/risk-register/agent.md +62 -0
  30. package/agents/rollup-target-sourcing/agent.md +59 -0
  31. package/agents/session-spawner/agent.md +64 -0
  32. package/agents/slack-operator/agent.md +60 -0
  33. package/agents/sophie-chief-of-staff/agent.md +134 -0
  34. package/agents/strategic-planning/agent.md +54 -0
  35. package/agents/whatsapp-operator/agent.md +60 -0
  36. package/agents/workflow-automation/agent.md +61 -0
  37. package/bin/maestro.mjs +388 -0
  38. package/desktop-control/README.md +56 -0
  39. package/desktop-control/app-profiles/gmail.yaml +120 -0
  40. package/desktop-control/app-profiles/slack.yaml +315 -0
  41. package/desktop-control/app-profiles/whatsapp.yaml +107 -0
  42. package/docs/architecture/agent-topology.md +2222 -0
  43. package/docs/architecture/continuous-monitoring.md +221 -0
  44. package/docs/architecture/mcp-capability-map.md +560 -0
  45. package/docs/architecture/system-architecture.md +1273 -0
  46. package/docs/business-synthesis/ADAPTIC-GROUP-FINAL-OWNERSHIP-STRUCTURE.pdf +13667 -10
  47. package/docs/business-synthesis/adaptic-overview.md +296 -0
  48. package/docs/business-synthesis/executive-operating-model.md +261 -0
  49. package/docs/governance/action-approval-model.md +331 -0
  50. package/docs/governance/communications-policy.md +410 -0
  51. package/docs/governance/desktop-control-safety.md +499 -0
  52. package/docs/guides/agent-persona-setup.md +600 -0
  53. package/docs/operating-charter.md +87 -0
  54. package/docs/prompts/board-pack-cover-template.md +37 -0
  55. package/docs/prompts/decision-recommendation-template.md +88 -0
  56. package/docs/prompts/followup-message-template.md +141 -0
  57. package/docs/prompts/investor-letter-template.md +52 -0
  58. package/docs/prompts/morning-brief-template.md +82 -0
  59. package/docs/prompts/presentation-template.md +58 -0
  60. package/docs/prompts/weekly-strategic-memo-template.md +104 -0
  61. package/docs/runbooks/mac-mini-bootstrap.md +404 -0
  62. package/docs/runbooks/perpetual-operations.md +505 -0
  63. package/docs/runbooks/recovery-and-failover.md +588 -0
  64. package/docs/superpowers/plans/2026-04-02-phase0-operational-foundation.md +2550 -0
  65. package/docs/superpowers/plans/2026-04-03-phase1-executive-core.md +1085 -0
  66. package/docs/superpowers/plans/2026-04-03-phase2-people-product-commercial.md +739 -0
  67. package/docs/superpowers/plans/2026-04-05-information-barrier-implementation.md +926 -0
  68. package/docs/superpowers/plans/2026-04-06-session-context-dedup.md +1994 -0
  69. package/docs/superpowers/specs/2026-04-02-phase0-operational-foundation-design.md +842 -0
  70. package/docs/superpowers/specs/2026-04-03-phase1-executive-core-design.md +516 -0
  71. package/docs/superpowers/specs/2026-04-03-phase2-people-product-commercial-design.md +452 -0
  72. package/docs/superpowers/specs/2026-04-03-phase3-4-final-towers-design.md +129 -0
  73. package/docs/superpowers/specs/2026-04-05-information-barrier-design.md +678 -0
  74. package/docs/superpowers/specs/2026-04-05-reactive-daemon-design.md +237 -0
  75. package/docs/superpowers/specs/2026-04-06-session-context-dedup-design.md +369 -0
  76. package/docs/workflows/executive-cadence.md +218 -0
  77. package/ingest/README.md +87 -0
  78. package/mcp/README.md +51 -0
  79. package/package.json +48 -0
  80. package/plugins/maestro-skills/plugin.json +55 -0
  81. package/plugins/maestro-skills/skills/board-deck.md +68 -0
  82. package/plugins/maestro-skills/skills/decision-brief.md +89 -0
  83. package/plugins/maestro-skills/skills/draft-comms.md +84 -0
  84. package/plugins/maestro-skills/skills/evening-wrap.md +53 -0
  85. package/plugins/maestro-skills/skills/hiring-triage.md +74 -0
  86. package/plugins/maestro-skills/skills/inbox-triage.md +61 -0
  87. package/plugins/maestro-skills/skills/morning-brief.md +54 -0
  88. package/plugins/maestro-skills/skills/pipeline-review.md +76 -0
  89. package/plugins/maestro-skills/skills/regulatory-status.md +81 -0
  90. package/plugins/maestro-skills/skills/schedule-meeting.md +91 -0
  91. package/plugins/maestro-skills/skills/slack-followup.md +64 -0
  92. package/plugins/maestro-skills/skills/weekly-memo.md +70 -0
  93. package/policies/action-classification.yaml +110 -0
  94. package/policies/information-barriers.yaml +119 -0
  95. package/policies/prompt-injection-defence.yaml +138 -0
  96. package/public/assets/adaptic-icon-dark.png +0 -0
  97. package/public/assets/adaptic-icon-dark.svg +4 -0
  98. package/public/assets/adaptic-icon-light.svg +4 -0
  99. package/public/assets/adaptic-logo-dark.svg +17 -0
  100. package/public/assets/adaptic-logo-light.svg +17 -0
  101. package/scaffold/CLAUDE.md +21 -0
  102. package/scaffold/config/agent.ts +69 -0
  103. package/scaffold/config/agent.ts.example +218 -0
  104. package/schedules/README.md +49 -0
  105. package/schedules/triggers/backlog-executor.md +102 -0
  106. package/schedules/triggers/daily-evening-wrap.md +142 -0
  107. package/schedules/triggers/daily-midday-sweep.md +58 -0
  108. package/schedules/triggers/daily-morning-brief.md +55 -0
  109. package/schedules/triggers/inbox-processor.md +115 -0
  110. package/schedules/triggers/meeting-action-capture.md +60 -0
  111. package/schedules/triggers/meeting-prep.md +69 -0
  112. package/schedules/triggers/quarterly-self-assessment.md +54 -0
  113. package/schedules/triggers/weekly-engineering-health.md +37 -0
  114. package/schedules/triggers/weekly-execution.md +67 -0
  115. package/schedules/triggers/weekly-hiring.md +53 -0
  116. package/schedules/triggers/weekly-priorities.md +38 -0
  117. package/schedules/triggers/weekly-strategic-memo.md +124 -0
  118. package/scripts/__pycache__/disclosure_assessment.cpython-313.pyc +0 -0
  119. package/scripts/__pycache__/disclosure_boundaries.cpython-313.pyc +0 -0
  120. package/scripts/__pycache__/email_quote_thread.cpython-313.pyc +0 -0
  121. package/scripts/__pycache__/email_thread_dedup.cpython-313.pyc +0 -0
  122. package/scripts/__pycache__/mehran-inbox-poller.cpython-313.pyc +0 -0
  123. package/scripts/__pycache__/outbound_dedup.cpython-313.pyc +0 -0
  124. package/scripts/__pycache__/pre-draft-context.cpython-313.pyc +0 -0
  125. package/scripts/__pycache__/pre_draft_lookup.cpython-313.pyc +0 -0
  126. package/scripts/__pycache__/send-email-as-mehran.cpython-313.pyc +0 -0
  127. package/scripts/__pycache__/send-email-threaded.cpython-313.pyc +0 -0
  128. package/scripts/__pycache__/send-email-with-attachment.cpython-313.pyc +0 -0
  129. package/scripts/__pycache__/validate_outbound.cpython-313.pyc +0 -0
  130. package/scripts/airtable-crm-populate.md +99 -0
  131. package/scripts/archive-email.sh +41 -0
  132. package/scripts/comms-monitor.sh +285 -0
  133. package/scripts/configure-whatsapp-sandbox.sh +201 -0
  134. package/scripts/continuous-monitor.sh +86 -0
  135. package/scripts/daemon/classifier.mjs +355 -0
  136. package/scripts/daemon/context-compiler.mjs +490 -0
  137. package/scripts/daemon/dispatcher.mjs +385 -0
  138. package/scripts/daemon/health.mjs +72 -0
  139. package/scripts/daemon/prompt-builder.mjs +426 -0
  140. package/scripts/daemon/responder.mjs +547 -0
  141. package/scripts/daemon/session-lock.mjs +520 -0
  142. package/scripts/daemon/sophie-daemon.mjs +521 -0
  143. package/scripts/daemon/test-context-compiler.mjs +238 -0
  144. package/scripts/daemon/test-integration.mjs +130 -0
  145. package/scripts/daemon/test-session-lock.mjs +215 -0
  146. package/scripts/disclosure_assessment.py +873 -0
  147. package/scripts/disclosure_boundaries.py +562 -0
  148. package/scripts/email-signature-mehran.html +52 -0
  149. package/scripts/email-signature.html +44 -0
  150. package/scripts/email_quote_thread.py +167 -0
  151. package/scripts/email_thread_dedup.py +361 -0
  152. package/scripts/emergency-stop.sh +41 -0
  153. package/scripts/healthcheck.sh +110 -0
  154. package/scripts/hooks/block-mcp-slack-send.sh +7 -0
  155. package/scripts/hooks/post-action-log.sh +17 -0
  156. package/scripts/hooks/pre-send-audit.sh +57 -0
  157. package/scripts/hooks/session-end-log.sh +27 -0
  158. package/scripts/huddle/audio-bridge.mjs +664 -0
  159. package/scripts/huddle/boot-slack-cdp.sh +102 -0
  160. package/scripts/huddle/huddle-controller.mjs +942 -0
  161. package/scripts/huddle/huddle-server.mjs +1059 -0
  162. package/scripts/huddle/launch-slack.sh +232 -0
  163. package/scripts/huddle/node_modules/.package-lock.json +50 -0
  164. package/scripts/huddle/node_modules/@anthropic-ai/sdk/CHANGELOG.md +1677 -0
  165. package/scripts/huddle/node_modules/@anthropic-ai/sdk/LICENSE +8 -0
  166. package/scripts/huddle/node_modules/@anthropic-ai/sdk/README.md +674 -0
  167. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts +3 -0
  168. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map +1 -0
  169. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts +3 -0
  170. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts.map +1 -0
  171. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js +226 -0
  172. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map +1 -0
  173. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs +223 -0
  174. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map +1 -0
  175. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.d.mts +2 -0
  176. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map +1 -0
  177. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.d.ts +2 -0
  178. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.d.ts.map +1 -0
  179. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.js +6 -0
  180. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.js.map +1 -0
  181. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.mjs +2 -0
  182. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.mjs.map +1 -0
  183. package/scripts/huddle/node_modules/@anthropic-ai/sdk/bin/cli +53 -0
  184. package/scripts/huddle/node_modules/@anthropic-ai/sdk/bin/migration-config.json +7 -0
  185. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.d.mts +225 -0
  186. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.d.mts.map +1 -0
  187. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.d.ts +225 -0
  188. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.d.ts.map +1 -0
  189. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.js +536 -0
  190. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.js.map +1 -0
  191. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.mjs +531 -0
  192. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.mjs.map +1 -0
  193. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts +49 -0
  194. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map +1 -0
  195. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts +49 -0
  196. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map +1 -0
  197. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.js +76 -0
  198. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.js.map +1 -0
  199. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.mjs +72 -0
  200. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map +1 -0
  201. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.d.mts +47 -0
  202. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.d.mts.map +1 -0
  203. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.d.ts +47 -0
  204. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.d.ts.map +1 -0
  205. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.js +114 -0
  206. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.js.map +1 -0
  207. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.mjs +98 -0
  208. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.mjs.map +1 -0
  209. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.d.mts +63 -0
  210. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map +1 -0
  211. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.d.ts +63 -0
  212. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map +1 -0
  213. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.js +123 -0
  214. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.js.map +1 -0
  215. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.mjs +117 -0
  216. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.mjs.map +1 -0
  217. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.d.mts +6 -0
  218. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map +1 -0
  219. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.d.ts +6 -0
  220. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map +1 -0
  221. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.js +11 -0
  222. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.js.map +1 -0
  223. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.mjs +7 -0
  224. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.mjs.map +1 -0
  225. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.d.mts +31 -0
  226. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.d.mts.map +1 -0
  227. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.d.ts +31 -0
  228. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map +1 -0
  229. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.js +282 -0
  230. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.js.map +1 -0
  231. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.mjs +277 -0
  232. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map +1 -0
  233. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.d.mts +3 -0
  234. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map +1 -0
  235. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.d.ts +3 -0
  236. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.d.ts.map +1 -0
  237. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.js +6 -0
  238. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.js.map +1 -0
  239. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.mjs +2 -0
  240. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map +1 -0
  241. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.d.mts +2 -0
  242. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.d.mts.map +1 -0
  243. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.d.ts +2 -0
  244. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.d.ts.map +1 -0
  245. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.js +6 -0
  246. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.js.map +1 -0
  247. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.mjs +2 -0
  248. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.mjs.map +1 -0
  249. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.d.mts +7 -0
  250. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.d.mts.map +1 -0
  251. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.d.ts +7 -0
  252. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.d.ts.map +1 -0
  253. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.js +35 -0
  254. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.js.map +1 -0
  255. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.mjs +8 -0
  256. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.mjs.map +1 -0
  257. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts +73 -0
  258. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts.map +1 -0
  259. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts +73 -0
  260. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts.map +1 -0
  261. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.js +4 -0
  262. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.js.map +1 -0
  263. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs +3 -0
  264. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs.map +1 -0
  265. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.d.mts +5 -0
  266. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map +1 -0
  267. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.d.ts +5 -0
  268. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map +1 -0
  269. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.js +15 -0
  270. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.js.map +1 -0
  271. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.mjs +12 -0
  272. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map +1 -0
  273. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts +10 -0
  274. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map +1 -0
  275. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts +10 -0
  276. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map +1 -0
  277. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js +39 -0
  278. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js.map +1 -0
  279. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs +35 -0
  280. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map +1 -0
  281. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts +17 -0
  282. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts.map +1 -0
  283. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts +17 -0
  284. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts.map +1 -0
  285. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.js +113 -0
  286. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.js.map +1 -0
  287. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs +108 -0
  288. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map +1 -0
  289. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts +15 -0
  290. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts.map +1 -0
  291. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.ts +15 -0
  292. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.ts.map +1 -0
  293. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.js +162 -0
  294. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.js.map +1 -0
  295. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs +157 -0
  296. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map +1 -0
  297. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.d.mts +3 -0
  298. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.d.mts.map +1 -0
  299. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.d.ts +3 -0
  300. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.d.ts.map +1 -0
  301. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.js +41 -0
  302. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.js.map +1 -0
  303. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.mjs +36 -0
  304. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.mjs.map +1 -0
  305. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.d.mts +22 -0
  306. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map +1 -0
  307. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.d.ts +22 -0
  308. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map +1 -0
  309. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.js +79 -0
  310. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.js.map +1 -0
  311. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.mjs +74 -0
  312. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map +1 -0
  313. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.d.mts +17 -0
  314. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map +1 -0
  315. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.d.ts +17 -0
  316. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map +1 -0
  317. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.js +55 -0
  318. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.js.map +1 -0
  319. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.mjs +51 -0
  320. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map +1 -0
  321. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts +34 -0
  322. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map +1 -0
  323. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts +34 -0
  324. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts.map +1 -0
  325. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.js +14 -0
  326. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.js.map +1 -0
  327. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.mjs +10 -0
  328. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.mjs.map +1 -0
  329. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shim-types.d.mts +28 -0
  330. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shim-types.d.ts +28 -0
  331. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.d.mts +20 -0
  332. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.d.mts.map +1 -0
  333. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.d.ts +20 -0
  334. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map +1 -0
  335. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.js +92 -0
  336. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.js.map +1 -0
  337. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.mjs +85 -0
  338. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.mjs.map +1 -0
  339. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts +8 -0
  340. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts.map +1 -0
  341. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts +8 -0
  342. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts.map +1 -0
  343. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.js +38 -0
  344. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.js.map +1 -0
  345. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.mjs +35 -0
  346. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.mjs.map +1 -0
  347. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts +45 -0
  348. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map +1 -0
  349. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts +45 -0
  350. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map +1 -0
  351. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.js +96 -0
  352. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.js.map +1 -0
  353. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.mjs +93 -0
  354. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map +1 -0
  355. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/tslib.js +81 -0
  356. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/tslib.mjs +17 -0
  357. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.d.mts +67 -0
  358. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map +1 -0
  359. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.d.ts +67 -0
  360. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.d.ts.map +1 -0
  361. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.js +4 -0
  362. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.js.map +1 -0
  363. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.mjs +3 -0
  364. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.mjs.map +1 -0
  365. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts +42 -0
  366. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map +1 -0
  367. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts +42 -0
  368. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts.map +1 -0
  369. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.js +146 -0
  370. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.js.map +1 -0
  371. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.mjs +136 -0
  372. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.mjs.map +1 -0
  373. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts +3 -0
  374. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts.map +1 -0
  375. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts +3 -0
  376. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map +1 -0
  377. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.js +38 -0
  378. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map +1 -0
  379. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs +33 -0
  380. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map +1 -0
  381. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts +4 -0
  382. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map +1 -0
  383. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts +4 -0
  384. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts.map +1 -0
  385. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js +31 -0
  386. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map +1 -0
  387. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs +26 -0
  388. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs.map +1 -0
  389. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts +9 -0
  390. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map +1 -0
  391. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts +9 -0
  392. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts.map +1 -0
  393. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.js +22 -0
  394. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.js.map +1 -0
  395. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs +18 -0
  396. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map +1 -0
  397. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts +37 -0
  398. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map +1 -0
  399. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts +37 -0
  400. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map +1 -0
  401. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.js +86 -0
  402. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map +1 -0
  403. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs +80 -0
  404. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map +1 -0
  405. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts +15 -0
  406. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts.map +1 -0
  407. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts +15 -0
  408. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts.map +1 -0
  409. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.js +58 -0
  410. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map +1 -0
  411. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs +53 -0
  412. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map +1 -0
  413. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts +2 -0
  414. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map +1 -0
  415. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts +2 -0
  416. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map +1 -0
  417. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js +7 -0
  418. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map +1 -0
  419. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs +3 -0
  420. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map +1 -0
  421. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts +5 -0
  422. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts.map +1 -0
  423. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts +5 -0
  424. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts.map +1 -0
  425. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js +19 -0
  426. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js.map +1 -0
  427. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs +15 -0
  428. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs.map +1 -0
  429. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts +16 -0
  430. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts.map +1 -0
  431. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts +16 -0
  432. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts.map +1 -0
  433. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.js +109 -0
  434. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.js.map +1 -0
  435. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs +92 -0
  436. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map +1 -0
  437. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.d.mts +7 -0
  438. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map +1 -0
  439. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.d.ts +7 -0
  440. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map +1 -0
  441. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.js +11 -0
  442. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.js.map +1 -0
  443. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.mjs +8 -0
  444. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map +1 -0
  445. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts +114 -0
  446. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map +1 -0
  447. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts +114 -0
  448. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map +1 -0
  449. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js +553 -0
  450. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map +1 -0
  451. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs +549 -0
  452. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map +1 -0
  453. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts +114 -0
  454. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map +1 -0
  455. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +114 -0
  456. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +1 -0
  457. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +553 -0
  458. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +1 -0
  459. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +549 -0
  460. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +1 -0
  461. package/scripts/huddle/node_modules/@anthropic-ai/sdk/package.json +185 -0
  462. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.d.mts +2 -0
  463. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.d.mts.map +1 -0
  464. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.d.ts +2 -0
  465. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.d.ts.map +1 -0
  466. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.js +6 -0
  467. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.js.map +1 -0
  468. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.mjs +2 -0
  469. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.mjs.map +1 -0
  470. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.d.mts +2 -0
  471. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.d.mts.map +1 -0
  472. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.d.ts +2 -0
  473. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.d.ts.map +1 -0
  474. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.js +6 -0
  475. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.js.map +1 -0
  476. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.mjs +2 -0
  477. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.mjs.map +1 -0
  478. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts +61 -0
  479. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts.map +1 -0
  480. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +61 -0
  481. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +1 -0
  482. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +25 -0
  483. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +1 -0
  484. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +20 -0
  485. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +1 -0
  486. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts +151 -0
  487. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts.map +1 -0
  488. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts +151 -0
  489. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts.map +1 -0
  490. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.js +122 -0
  491. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.js.map +1 -0
  492. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +118 -0
  493. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map +1 -0
  494. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts +5 -0
  495. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map +1 -0
  496. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +5 -0
  497. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +1 -0
  498. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.js +13 -0
  499. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +1 -0
  500. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +6 -0
  501. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +1 -0
  502. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts +343 -0
  503. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map +1 -0
  504. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts +343 -0
  505. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map +1 -0
  506. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +204 -0
  507. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js.map +1 -0
  508. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +200 -0
  509. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map +1 -0
  510. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts +3 -0
  511. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map +1 -0
  512. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts +3 -0
  513. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map +1 -0
  514. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js +9 -0
  515. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js.map +1 -0
  516. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs +4 -0
  517. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map +1 -0
  518. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts +1561 -0
  519. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map +1 -0
  520. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts +1561 -0
  521. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map +1 -0
  522. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +86 -0
  523. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map +1 -0
  524. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +81 -0
  525. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map +1 -0
  526. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts +2 -0
  527. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map +1 -0
  528. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts +2 -0
  529. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map +1 -0
  530. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.js +6 -0
  531. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.js.map +1 -0
  532. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs +3 -0
  533. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map +1 -0
  534. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts +74 -0
  535. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts.map +1 -0
  536. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts +74 -0
  537. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map +1 -0
  538. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.js +60 -0
  539. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.js.map +1 -0
  540. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs +56 -0
  541. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map +1 -0
  542. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.d.mts +2 -0
  543. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map +1 -0
  544. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.d.ts +2 -0
  545. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.d.ts.map +1 -0
  546. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.js +6 -0
  547. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.js.map +1 -0
  548. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.mjs +3 -0
  549. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map +1 -0
  550. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.d.mts +183 -0
  551. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map +1 -0
  552. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +183 -0
  553. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +1 -0
  554. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.js +23 -0
  555. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.js.map +1 -0
  556. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.mjs +19 -0
  557. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +1 -0
  558. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.d.mts +6 -0
  559. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map +1 -0
  560. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.d.ts +6 -0
  561. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +1 -0
  562. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.js +15 -0
  563. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.js.map +1 -0
  564. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.mjs +7 -0
  565. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +1 -0
  566. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts +304 -0
  567. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map +1 -0
  568. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts +304 -0
  569. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts.map +1 -0
  570. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +153 -0
  571. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map +1 -0
  572. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +149 -0
  573. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map +1 -0
  574. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts +3 -0
  575. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map +1 -0
  576. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts +3 -0
  577. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts.map +1 -0
  578. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.js +9 -0
  579. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.js.map +1 -0
  580. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs +4 -0
  581. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map +1 -0
  582. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts +1264 -0
  583. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map +1 -0
  584. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts +1264 -0
  585. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map +1 -0
  586. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +72 -0
  587. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map +1 -0
  588. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +67 -0
  589. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map +1 -0
  590. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.d.mts +2 -0
  591. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map +1 -0
  592. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.d.ts +2 -0
  593. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +1 -0
  594. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.js +6 -0
  595. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.js.map +1 -0
  596. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.mjs +3 -0
  597. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +1 -0
  598. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.d.mts +59 -0
  599. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.d.mts.map +1 -0
  600. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.d.ts +59 -0
  601. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.d.ts.map +1 -0
  602. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.js +45 -0
  603. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.js.map +1 -0
  604. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.mjs +41 -0
  605. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.mjs.map +1 -0
  606. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.d.mts +42 -0
  607. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.d.mts.map +1 -0
  608. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.d.ts +42 -0
  609. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.d.ts.map +1 -0
  610. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.js +4 -0
  611. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.js.map +1 -0
  612. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.mjs +3 -0
  613. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.mjs.map +1 -0
  614. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts +2 -0
  615. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map +1 -0
  616. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts +2 -0
  617. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map +1 -0
  618. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.js +4 -0
  619. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.js.map +1 -0
  620. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.mjs +3 -0
  621. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map +1 -0
  622. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.d.mts +2 -0
  623. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.d.mts.map +1 -0
  624. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.d.ts +2 -0
  625. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.d.ts.map +1 -0
  626. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.js +5 -0
  627. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.js.map +1 -0
  628. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.mjs +2 -0
  629. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.mjs.map +1 -0
  630. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/README.md +3 -0
  631. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts +264 -0
  632. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/api-promise.ts +2 -0
  633. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/client.ts +1070 -0
  634. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/README.md +3 -0
  635. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts +101 -0
  636. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/error.ts +133 -0
  637. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/pagination.ts +201 -0
  638. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/resource.ts +11 -0
  639. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +331 -0
  640. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/uploads.ts +2 -0
  641. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/error.ts +2 -0
  642. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/index.ts +23 -0
  643. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/README.md +3 -0
  644. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/builtin-types.ts +93 -0
  645. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/constants.ts +12 -0
  646. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/decoders/jsonl.ts +48 -0
  647. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/decoders/line.ts +135 -0
  648. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/detect-platform.ts +196 -0
  649. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/errors.ts +33 -0
  650. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/headers.ts +99 -0
  651. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/parse.ts +84 -0
  652. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts +39 -0
  653. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/shim-types.d.ts +28 -0
  654. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/shims.ts +107 -0
  655. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/stream-utils.ts +32 -0
  656. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts +159 -0
  657. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/types.ts +92 -0
  658. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts +193 -0
  659. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/base64.ts +40 -0
  660. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/bytes.ts +32 -0
  661. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/env.ts +18 -0
  662. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts +127 -0
  663. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/path.ts +65 -0
  664. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts +3 -0
  665. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/uuid.ts +17 -0
  666. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts +102 -0
  667. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils.ts +8 -0
  668. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/lib/.keep +4 -0
  669. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts +683 -0
  670. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +684 -0
  671. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/pagination.ts +2 -0
  672. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resource.ts +2 -0
  673. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +380 -0
  674. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +258 -0
  675. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +148 -0
  676. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +502 -0
  677. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts +135 -0
  678. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +2249 -0
  679. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/messages.ts +3 -0
  680. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +118 -0
  681. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta.ts +3 -0
  682. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +231 -0
  683. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/index.ts +121 -0
  684. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +396 -0
  685. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +110 -0
  686. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +1783 -0
  687. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/messages.ts +3 -0
  688. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/models.ts +103 -0
  689. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/shared.ts +72 -0
  690. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts +3 -0
  691. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources.ts +1 -0
  692. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/streaming.ts +2 -0
  693. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/tsconfig.json +11 -0
  694. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/uploads.ts +2 -0
  695. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/version.ts +1 -0
  696. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.d.mts +2 -0
  697. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.d.mts.map +1 -0
  698. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.d.ts +2 -0
  699. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +1 -0
  700. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.js +6 -0
  701. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.js.map +1 -0
  702. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.mjs +2 -0
  703. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.mjs.map +1 -0
  704. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.d.mts +2 -0
  705. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.d.mts.map +1 -0
  706. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.d.ts +2 -0
  707. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +1 -0
  708. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.js +6 -0
  709. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.js.map +1 -0
  710. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.mjs +2 -0
  711. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.mjs.map +1 -0
  712. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.d.mts +2 -0
  713. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.d.mts.map +1 -0
  714. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.d.ts +2 -0
  715. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.d.ts.map +1 -0
  716. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.js +5 -0
  717. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.js.map +1 -0
  718. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.mjs +2 -0
  719. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.mjs.map +1 -0
  720. package/scripts/huddle/node_modules/dotenv/CHANGELOG.md +520 -0
  721. package/scripts/huddle/node_modules/dotenv/LICENSE +23 -0
  722. package/scripts/huddle/node_modules/dotenv/README-es.md +411 -0
  723. package/scripts/huddle/node_modules/dotenv/README.md +645 -0
  724. package/scripts/huddle/node_modules/dotenv/SECURITY.md +1 -0
  725. package/scripts/huddle/node_modules/dotenv/config.d.ts +1 -0
  726. package/scripts/huddle/node_modules/dotenv/config.js +9 -0
  727. package/scripts/huddle/node_modules/dotenv/lib/cli-options.js +17 -0
  728. package/scripts/huddle/node_modules/dotenv/lib/env-options.js +28 -0
  729. package/scripts/huddle/node_modules/dotenv/lib/main.d.ts +162 -0
  730. package/scripts/huddle/node_modules/dotenv/lib/main.js +386 -0
  731. package/scripts/huddle/node_modules/dotenv/package.json +62 -0
  732. package/scripts/huddle/node_modules/ws/LICENSE +20 -0
  733. package/scripts/huddle/node_modules/ws/README.md +548 -0
  734. package/scripts/huddle/node_modules/ws/browser.js +8 -0
  735. package/scripts/huddle/node_modules/ws/index.js +22 -0
  736. package/scripts/huddle/node_modules/ws/lib/buffer-util.js +131 -0
  737. package/scripts/huddle/node_modules/ws/lib/constants.js +19 -0
  738. package/scripts/huddle/node_modules/ws/lib/event-target.js +292 -0
  739. package/scripts/huddle/node_modules/ws/lib/extension.js +203 -0
  740. package/scripts/huddle/node_modules/ws/lib/limiter.js +55 -0
  741. package/scripts/huddle/node_modules/ws/lib/permessage-deflate.js +528 -0
  742. package/scripts/huddle/node_modules/ws/lib/receiver.js +706 -0
  743. package/scripts/huddle/node_modules/ws/lib/sender.js +602 -0
  744. package/scripts/huddle/node_modules/ws/lib/stream.js +161 -0
  745. package/scripts/huddle/node_modules/ws/lib/subprotocol.js +62 -0
  746. package/scripts/huddle/node_modules/ws/lib/validation.js +152 -0
  747. package/scripts/huddle/node_modules/ws/lib/websocket-server.js +554 -0
  748. package/scripts/huddle/node_modules/ws/lib/websocket.js +1393 -0
  749. package/scripts/huddle/node_modules/ws/package.json +70 -0
  750. package/scripts/huddle/node_modules/ws/wrapper.mjs +21 -0
  751. package/scripts/huddle/package-lock.json +62 -0
  752. package/scripts/huddle/package.json +22 -0
  753. package/scripts/huddle/setup-audio.sh +239 -0
  754. package/scripts/huddle/start-call.mjs +318 -0
  755. package/scripts/huddle/test-pipeline.mjs +263 -0
  756. package/scripts/llm_email_dedup.py +434 -0
  757. package/scripts/local-triggers/install-all.sh +43 -0
  758. package/scripts/local-triggers/plists/ai.adaptic.slack-events-server.plist +45 -0
  759. package/scripts/local-triggers/plists/ai.adaptic.sophie-backlog-executor.plist +21 -0
  760. package/scripts/local-triggers/plists/ai.adaptic.sophie-daemon.plist +32 -0
  761. package/scripts/local-triggers/plists/ai.adaptic.sophie-inbox-processor.plist +21 -0
  762. package/scripts/local-triggers/plists/ai.adaptic.sophie-meeting-action-capture.plist +21 -0
  763. package/scripts/local-triggers/plists/ai.adaptic.sophie-meeting-prep.plist +21 -0
  764. package/scripts/local-triggers/plists/ai.adaptic.sophie-midday-sweep.plist +26 -0
  765. package/scripts/local-triggers/plists/ai.adaptic.sophie-quarterly-self-assessment.plist +62 -0
  766. package/scripts/local-triggers/plists/ai.adaptic.sophie-weekly-engineering-health.plist +28 -0
  767. package/scripts/local-triggers/plists/ai.adaptic.sophie-weekly-execution.plist +28 -0
  768. package/scripts/local-triggers/plists/ai.adaptic.sophie-weekly-hiring.plist +28 -0
  769. package/scripts/local-triggers/plists/ai.adaptic.sophie-weekly-priorities.plist +28 -0
  770. package/scripts/local-triggers/plists/ai.adaptic.sophie-weekly-strategic-memo.plist +28 -0
  771. package/scripts/local-triggers/run-trigger.sh +44 -0
  772. package/scripts/media-generation/README.md +103 -0
  773. package/scripts/media-generation/gemini-image-client.mjs +173 -0
  774. package/scripts/media-generation/generate-assets.mjs +289 -0
  775. package/scripts/media-generation/veo-video-client.mjs +219 -0
  776. package/scripts/mehran-inbox-poller.py +437 -0
  777. package/scripts/outbound-dedup-cleanup.sh +43 -0
  778. package/scripts/outbound-dedup.sh +476 -0
  779. package/scripts/outbound_dedup.py +115 -0
  780. package/scripts/parse-voice-transcript.mjs +486 -0
  781. package/scripts/pdf-generation/README.md +61 -0
  782. package/scripts/pdf-generation/build-document.mjs +230 -0
  783. package/scripts/pdf-generation/templates/board-pack.latex +136 -0
  784. package/scripts/pdf-generation/templates/corporate-letter.latex +126 -0
  785. package/scripts/pdf-generation/templates/memo.latex +114 -0
  786. package/scripts/poll-slack-events.sh +33 -0
  787. package/scripts/poller/calendar-poller.mjs +12 -0
  788. package/scripts/poller/gmail-poller.mjs +156 -0
  789. package/scripts/poller/imap-client.mjs +286 -0
  790. package/scripts/poller/index.mjs +73 -0
  791. package/scripts/poller/intra-session-check.mjs +267 -0
  792. package/scripts/poller/mehran-gmail-poller.mjs +98 -0
  793. package/scripts/poller/slack-poller.mjs +716 -0
  794. package/scripts/poller/trigger.mjs +47 -0
  795. package/scripts/poller/utils.mjs +253 -0
  796. package/scripts/poller-launchd/ai.adaptic.sophie-poller.plist +40 -0
  797. package/scripts/poller-launchd/ai.adaptic.sophie-whatsapp-handler.plist +39 -0
  798. package/scripts/poller-launchd/install.sh +38 -0
  799. package/scripts/post-interaction-indexer.py +1598 -0
  800. package/scripts/pre-draft-context.py +994 -0
  801. package/scripts/pre_draft_lookup.py +258 -0
  802. package/scripts/rag-indexer.py +629 -0
  803. package/scripts/resume-operations.sh +40 -0
  804. package/scripts/search-mehran-inbox.py +181 -0
  805. package/scripts/self-optimization/compute-metrics.py +377 -0
  806. package/scripts/send-difc-rfp.sh +98 -0
  807. package/scripts/send-email-as-mehran.py +369 -0
  808. package/scripts/send-email-threaded.py +336 -0
  809. package/scripts/send-email-with-attachment.py +360 -0
  810. package/scripts/send-email.sh +93 -0
  811. package/scripts/send-sms.sh +151 -0
  812. package/scripts/send-whatsapp.sh +261 -0
  813. package/scripts/session-start.sh +106 -0
  814. package/scripts/setup/configure-macos.sh +508 -0
  815. package/scripts/setup/init-agent.sh +450 -0
  816. package/scripts/slack-events-ctl.sh +177 -0
  817. package/scripts/slack-events-server.mjs +989 -0
  818. package/scripts/slack-react.mjs +89 -0
  819. package/scripts/slack-responded.sh +185 -0
  820. package/scripts/slack-send.sh +190 -0
  821. package/scripts/slack-typing.mjs +196 -0
  822. package/scripts/slack-upload-v2.py +95 -0
  823. package/scripts/sms-handler.mjs +436 -0
  824. package/scripts/sophie-inbox-poller.py +406 -0
  825. package/scripts/spawn-session.sh +85 -0
  826. package/scripts/system-verify.sh +171 -0
  827. package/scripts/test-email-thread-dedup.py +239 -0
  828. package/scripts/test-information-barriers.py +484 -0
  829. package/scripts/test-llm-email-dedup.py +251 -0
  830. package/scripts/test-pre-draft-integration.py +203 -0
  831. package/scripts/test-rag-phase2.sh +442 -0
  832. package/scripts/test-rag-search.sh +251 -0
  833. package/scripts/test-voice-parser.mjs +316 -0
  834. package/scripts/user-context-search.py +660 -0
  835. package/scripts/validate-outbound.py +1493 -0
  836. package/scripts/whatsapp-handler.mjs +525 -0
  837. package/teams/desktop-operations.yaml +34 -0
  838. package/teams/executive-office.yaml +27 -0
  839. package/teams/legal-and-regulatory.yaml +24 -0
  840. package/teams/platform-and-engineering.yaml +23 -0
  841. package/teams/strategy-and-growth.yaml +29 -0
  842. package/workflows/continuous/inbound-monitor.yaml +168 -0
  843. package/workflows/daily/applicant-triage.yaml +197 -0
  844. package/workflows/daily/comms-triage.yaml +80 -0
  845. package/workflows/daily/evening-wrap.yaml +65 -0
  846. package/workflows/daily/morning-brief.yaml +147 -0
  847. package/workflows/daily/slack-followup-sweep.yaml +87 -0
  848. package/workflows/event-driven/README.md +50 -0
  849. package/workflows/monthly/board-readiness.yaml +76 -0
  850. package/workflows/quarterly/strategic-scenario-analysis.yaml +85 -0
  851. package/workflows/session-protocol.md +171 -0
  852. package/workflows/weekly/hiring-review.yaml +169 -0
  853. package/workflows/weekly/rollup-pipeline-review.yaml +76 -0
  854. package/workflows/weekly/strategic-memo.yaml +79 -0
@@ -0,0 +1,1273 @@
1
+ # System Architecture — Maestro (Autonomous AI Agent Operating System)
2
+
3
+ > Classification: INTERNAL — System Architecture Specification
4
+ > Version: 1.0
5
+ > Last updated: 2026-04-02
6
+ > Maintainer: Sophie Nguyen (Maestro)
7
+ > Deployment: Dedicated Mac mini — perpetual operation
8
+
9
+ ---
10
+
11
+ ## Table of Contents
12
+
13
+ 1. [System Overview](#1-system-overview)
14
+ 2. [Architecture Layers](#2-architecture-layers)
15
+ 3. [Agent Architecture](#3-agent-architecture)
16
+ 4. [Desktop Control Architecture](#4-desktop-control-architecture)
17
+ 5. [Memory Architecture](#5-memory-architecture)
18
+ 6. [Communication Architecture](#6-communication-architecture)
19
+ 7. [Scheduling Architecture](#7-scheduling-architecture)
20
+ 8. [Integration Points](#8-integration-points)
21
+ 9. [Security Architecture](#9-security-architecture)
22
+ 10. [Resilience and Recovery](#10-resilience-and-recovery)
23
+ 11. [Directory Structure Reference](#11-directory-structure-reference)
24
+
25
+ ---
26
+
27
+ ## 1. System Overview
28
+
29
+ ### 1.1 Purpose
30
+
31
+ CEO Brain is the autonomous executive operating system for Adaptic.ai. It runs perpetually on a dedicated Mac mini under the operating persona **Sophie Nguyen** (Chief of Staff), providing continuous strategic operations, communications management, execution tracking, and desktop automation for the CEO.
32
+
33
+ The system is not an assistant that waits for instructions. It is a persistent, self-scheduling executive office that observes the operational environment, maintains strategic memory, coordinates specialist agent teams, executes approved actions, and escalates decisions requiring human authority.
34
+
35
+ ### 1.2 Deployment Model
36
+
37
+ | Attribute | Value |
38
+ | ------------------- | -------------------------------------------------------------- |
39
+ | Hardware | Mac mini (Apple Silicon, 24GB+ RAM, 1TB+ SSD) |
40
+ | Operating System | macOS 14+ (Sonoma or later) |
41
+ | Runtime | Claude Code CLI with MCP protocol extensions |
42
+ | Process Supervision | launchd (macOS native) + custom watchdog |
43
+ | Network | Persistent internet — Slack, Gmail, APIs, remote bridge |
44
+ | Physical Location | Secure, climate-controlled, UPS-backed |
45
+ | Access Model | Remote management via SSH + remote bridge; no physical console |
46
+ | Uptime Target | 99.5%+ (planned maintenance windows at 03:00-04:00 UTC Sunday) |
47
+
48
+ ### 1.3 Design Principles
49
+
50
+ 1. **Perpetual operation** — The system never stops. Scheduled tasks fire on cadence. Event-driven triggers respond in real time. If a process dies, it restarts.
51
+ 2. **Observe first, act with governance** — Reading, monitoring, and analysing are always permitted. Acting on the external world requires appropriate authorisation level.
52
+ 3. **Human-in-the-loop for high-risk actions** — The CEO retains authority over investor communications, regulatory submissions, strategic commitments, and financial decisions.
53
+ 4. **Audit everything** — Every observation, decision, delegation, and action is logged with timestamps, context, and provenance.
54
+ 5. **Agent decomposition** — Sophie orchestrates; specialist agents execute. Work is decomposed, routed, monitored, and synthesised.
55
+ 6. **Fail safe, recover fast** — State is persisted to disk. Processes are supervised. Recovery procedures are automated.
56
+
57
+ ### 1.4 Conceptual Architecture
58
+
59
+ ```
60
+ ┌─────────────────────────────────┐
61
+ │ GOVERNANCE LAYER │
62
+ │ Approval Gates / Audit Trail │
63
+ │ Kill Switches / Escalation │
64
+ └──────────┬──────────────────┬────┘
65
+ │ │
66
+ ┌──────────────────────┴──────────────────┴───────────────────┐
67
+ │ REASONING LAYER │
68
+ │ Strategic Memory / Knowledge Synthesis │
69
+ │ Decision Support / Context Assembly │
70
+ └──────┬────────────────┬───────────────────┬─────────────────┘
71
+ │ │ │
72
+ ┌──────────────┴───┐ ┌───────┴────────┐ ┌──────┴──────────────┐
73
+ │ PERCEPTION LAYER│ │ ORCHESTRATION │ │ ACTUATION LAYER │
74
+ │ │ │ LAYER │ │ │
75
+ │ Slack, Gmail, │ │ Agent Teams, │ │ Desktop Control, │
76
+ │ WhatsApp, Browser│ │ Task Routing, │ │ App Automation, │
77
+ │ Repos, Market │ │ Decomposition │ │ Communications, │
78
+ │ Data, Filesystem │ │ │ │ File Operations │
79
+ └──────────────────┘ └────────────────┘ └─────────────────────┘
80
+ ```
81
+
82
+ ---
83
+
84
+ ## 2. Architecture Layers
85
+
86
+ ### 2.1 Perception Layer
87
+
88
+ The Perception Layer is responsible for observing the operational environment. All perception operations are read-only and require no approval gates.
89
+
90
+ #### 2.1.1 Communication Channels
91
+
92
+ | Source | Method | Cadence | Data Captured |
93
+ | -------- | --------------------------------------- | ----------------------------- | ---------------------------------------------- |
94
+ | Slack | MCP server + desktop control fallback | Continuous + scheduled sweeps | Messages, threads, reactions, channel activity |
95
+ | Gmail | MCP server (Google API) + IMAP fallback | Scheduled sweeps (15 min) | Inbox, sent, drafts, labels, attachments |
96
+ | WhatsApp | Desktop app control via Accessibility | Scheduled sweeps (30 min) | Messages, group activity, read receipts |
97
+ | Calendar | MCP server (Google Calendar API) | Scheduled sync (5 min) | Events, invitations, conflicts, availability |
98
+
99
+ #### 2.1.2 Information Sources
100
+
101
+ | Source | Method | Cadence | Data Captured |
102
+ | ----------------- | ----------------------------------- | -------------------------- | ----------------------------------------- |
103
+ | GitHub Repos | CLI (`gh`, `git`) + MCP server | Event-driven + hourly poll | PRs, issues, commits, CI status, reviews |
104
+ | Market Data | REST APIs (Polygon.io, Alpaca) | Morning sweep + continuous | Prices, volumes, news, earnings, signals |
105
+ | Competitive Intel | Web scraping + RSS + news APIs | Daily sweep | Competitor announcements, filings, hiring |
106
+ | Filesystem | Direct access + `fswatch` | Event-driven | File changes in watched directories |
107
+ | Browser / Web | Desktop-controlled browser sessions | On-demand | Dashboard state, portal data, web content |
108
+
109
+ #### 2.1.3 Perception Pipeline
110
+
111
+ ```
112
+ Source → Ingest → Normalise → Classify → Route → Store
113
+
114
+ ├─ Urgent → Immediate alert to Reasoning Layer
115
+ ├─ Standard → Queue for next scheduled processing
116
+ └─ Background → Store in knowledge base for synthesis
117
+ ```
118
+
119
+ Ingested data is written to `/Users/sophie/sophie-ai/ingest/` with structured metadata (source, timestamp, classification, confidence) before being routed to the appropriate processing pipeline.
120
+
121
+ ### 2.2 Reasoning Layer
122
+
123
+ The Reasoning Layer is where the system thinks. It assembles context from memory and perception, applies strategic knowledge, and produces decisions, recommendations, and action plans.
124
+
125
+ #### 2.2.1 Context Assembly
126
+
127
+ For every reasoning task, the system assembles a context window comprising:
128
+
129
+ 1. **Task specification** — What needs to be decided or produced
130
+ 2. **Relevant memory** — Retrieved from working, episodic, semantic, and decision memory stores
131
+ 3. **Fresh perception data** — Recent observations relevant to the task
132
+ 4. **Policy constraints** — Governance rules, regulatory requirements, authority limits
133
+ 5. **Entity context** — Key people, organisations, and relationships involved
134
+ 6. **Historical precedent** — Past decisions on similar matters and their outcomes
135
+
136
+ #### 2.2.2 Reasoning Modes
137
+
138
+ | Mode | Trigger | Output |
139
+ | --------------------- | --------------------------------------------- | ----------------------------------------------- |
140
+ | Reactive Analysis | Inbound message or event requiring response | Draft communication, action recommendation |
141
+ | Scheduled Synthesis | Cron-triggered workflow (briefs, reviews) | Structured deliverable (memo, brief, report) |
142
+ | Strategic Planning | Explicit request or quarterly cadence | Scenario analysis, strategic recommendation |
143
+ | Decision Support | Decision point surfaced by perception layer | Options matrix, risk assessment, recommendation |
144
+ | Anomaly Investigation | Alert or deviation detected by monitoring | Root cause analysis, escalation recommendation |
145
+ | Knowledge Integration | New information conflicts with existing model | Updated synthesis, contradiction flag |
146
+
147
+ #### 2.2.3 Decision Support Framework
148
+
149
+ Every substantive recommendation follows the structure:
150
+
151
+ ```
152
+ CONTEXT: What prompted this decision point
153
+ OPTIONS: Enumerated choices with trade-offs
154
+ EVIDENCE: Data supporting each option (with source citations)
155
+ RISK: Downside scenarios for each option
156
+ RECOMMENDATION: Sophie's recommended course of action
157
+ AUTHORITY: Who decides (auto-execute, CEO approval, Board)
158
+ URGENCY: Time sensitivity classification
159
+ ```
160
+
161
+ ### 2.3 Orchestration Layer
162
+
163
+ The Orchestration Layer coordinates work across the agent hierarchy. Sophie (Executive Cortex) decomposes strategic objectives into executable tasks and routes them to the appropriate Domain VP or Specialist Worker agent.
164
+
165
+ #### 2.3.1 Task Decomposition
166
+
167
+ ```
168
+ Strategic Objective
169
+ └─ Workstream (assigned to Domain VP Agent)
170
+ └─ Task (assigned to Specialist Worker Agent)
171
+ └─ Sub-task (atomic, executable unit)
172
+ ```
173
+
174
+ #### 2.3.2 Work Routing
175
+
176
+ Tasks are routed based on:
177
+
178
+ - **Domain alignment** — Match task domain to agent specialisation
179
+ - **Current load** — Distribute work across available agents
180
+ - **Context proximity** — Prefer agents that already hold relevant context
181
+ - **Authority level** — Ensure the agent has the required access permissions
182
+ - **Dependency graph** — Sequence tasks that have order dependencies
183
+
184
+ #### 2.3.3 Orchestration Protocol
185
+
186
+ 1. **Decompose** — Break the objective into discrete, assignable tasks with clear deliverables
187
+ 2. **Assign** — Route each task to the best-matched agent with full context handoff
188
+ 3. **Monitor** — Track execution status, check for blockers, verify progress
189
+ 4. **Synthesise** — Combine agent outputs into executive-ready deliverables
190
+ 5. **Escalate** — Surface blockers, failures, or decisions requiring human authority
191
+ 6. **Close** — Verify completion, archive results, update memory
192
+
193
+ Task definitions, assignments, and status are tracked in `/Users/sophie/sophie-ai/teams/` with structured manifests.
194
+
195
+ ### 2.4 Actuation Layer
196
+
197
+ The Actuation Layer is how the system acts on the world. All actuation is subject to governance controls defined in the Governance Layer.
198
+
199
+ #### 2.4.1 Action Categories
200
+
201
+ | Category | Examples | Governance Level |
202
+ | ----------------------- | --------------------------------------------------------- | ------------------------- |
203
+ | File Operations | Write memos, update knowledge base, generate reports | Auto-execute |
204
+ | Internal Communications | Slack messages to team, task assignments, status requests | Auto-execute (logged) |
205
+ | Desktop Automation | Open apps, navigate UI, extract data from screens | Auto-execute (logged) |
206
+ | Draft Communications | Email drafts, investor memo drafts, board materials | Draft-and-hold |
207
+ | External Communications | Send emails, post in external channels | Approval required |
208
+ | Code Operations | Create PRs, commit changes, run scripts | Context-dependent |
209
+ | Financial Actions | Trade execution, fund operations | Prohibited (out of scope) |
210
+
211
+ #### 2.4.2 Output Generation
212
+
213
+ All generated outputs are written to `/Users/sophie/sophie-ai/outputs/` in the appropriate subdirectory:
214
+
215
+ ```
216
+ outputs/
217
+ ├── briefs/ # CEO morning/evening briefs
218
+ ├── memos/ # Strategic and operational memos
219
+ ├── communications/ # Draft communications awaiting review
220
+ ├── board/ # Board-related materials
221
+ └── followups/ # Follow-up tracking documents
222
+ ```
223
+
224
+ ### 2.5 Governance Layer
225
+
226
+ The Governance Layer enforces control over all system actions. It is the outermost layer and cannot be bypassed by any inner layer.
227
+
228
+ #### 2.5.1 Approval Gates
229
+
230
+ | Gate | Trigger | Approver | Method |
231
+ | ---------------------- | ----------------------------------------------- | ------------ | ------------------------------ |
232
+ | External Communication | Any message to parties outside the organisation | CEO (Mehran) | Slack approval prompt / review |
233
+ | Investor Communication | Any message to investors, LPs, or board members | CEO (Mehran) | Explicit per-message approval |
234
+ | Regulatory Submission | Any filing or correspondence with regulators | CEO + SEO | Dual approval required |
235
+ | Strategic Commitment | Commitments that bind the company | CEO (Mehran) | Explicit approval |
236
+ | Code Deployment | Merges to main/production branches | CTO / CEO | PR review process |
237
+ | Budget / Expenditure | Any financial commitment | CEO (Mehran) | Explicit approval |
238
+
239
+ #### 2.5.2 Audit Trail
240
+
241
+ Every action is recorded in `/Users/sophie/sophie-ai/logs/` with:
242
+
243
+ ```json
244
+ {
245
+ "timestamp": "2026-04-02T06:30:00Z",
246
+ "action_type": "communication.draft",
247
+ "agent": "sophie-chief-of-staff",
248
+ "target": "investor-update-q1-2026",
249
+ "governance_level": "draft-and-hold",
250
+ "approval_status": "pending",
251
+ "context_hash": "sha256:...",
252
+ "input_sources": [
253
+ "knowledge/syntheses/adaptic-overview.md",
254
+ "ingest/market-data/2026-04-01.json"
255
+ ],
256
+ "output_path": "outputs/communications/investor-update-q1-2026-draft.md",
257
+ "session_id": "session-2026-04-02-0630"
258
+ }
259
+ ```
260
+
261
+ #### 2.5.3 Escalation Protocol
262
+
263
+ ```
264
+ Level 0: Auto-execute with logging (read operations, internal file writes)
265
+ Level 1: Auto-execute with notification (internal Slack messages, routine follow-ups)
266
+ Level 2: Draft-and-hold for review (external communications, substantive content)
267
+ Level 3: Explicit approval required (investor/regulator communications, commitments)
268
+ Level 4: Dual approval required (regulatory submissions, material agreements)
269
+ Level 5: PROHIBITED (actions outside system authority — trading, fund operations)
270
+ ```
271
+
272
+ #### 2.5.4 Kill Switches
273
+
274
+ | Switch | Activation | Effect |
275
+ | ------------------ | -------------------------------------------- | ---------------------------------------------- |
276
+ | Full Stop | `kill-switch.lock` file in project root | All actuation ceases; perception continues |
277
+ | Communication Hold | `comms-hold.lock` file in project root | No outbound communications; all else continues |
278
+ | Agent Suspend | `agents/{name}/suspended.lock` | Specific agent stops receiving work |
279
+ | Emergency Shutdown | `launchctl unload` of all CEO Brain services | Complete system halt |
280
+ | Remote Kill | Remote bridge command from CEO's device | Full Stop equivalent via remote signal |
281
+
282
+ Kill switch activation is itself logged and triggers an immediate notification via all available channels.
283
+
284
+ ---
285
+
286
+ ## 3. Agent Architecture
287
+
288
+ ### 3.1 Three-Tier Model
289
+
290
+ The agent architecture follows a three-tier hierarchy inspired by the AI-Born thesis — small human teams directing autonomous agent swarms at institutional scale.
291
+
292
+ ```
293
+ ┌─────────────────────────────┐
294
+ │ SOPHIE NGUYEN │
295
+ │ Executive Cortex │
296
+ │ Chief of Staff │
297
+ └──────┬──────────────┬────────┘
298
+ │ │
299
+ ┌──────────────┴──┐ ┌─────┴──────────────┐
300
+ │ │ │ │ ... (8-10 Domain VPs)
301
+ ┌───────┴───────┐ ┌──────┴──────┴─┐ ┌───────────────┐
302
+ │ VP Strategic │ │ VP Capital & │ │ VP Platform & │
303
+ │ Planning │ │ Rollup Ops │ │ Engineering │
304
+ └───┬───────────┘ └───┬───────────┘ └───┬───────────┘
305
+ │ │ │
306
+ ┌───┴───┐ ┌───┴───┐ ┌───┴───┐
307
+ │Workers│ │Workers│ │Workers│ ... (20+ Specialist Workers)
308
+ └───────┘ └───────┘ └───────┘
309
+ ```
310
+
311
+ ### 3.2 Tier 1: Executive Cortex — Sophie
312
+
313
+ Sophie is the single top-level orchestrator. There is exactly one instance. She holds the master context, maintains strategic memory, and is the sole interface to the CEO.
314
+
315
+ | Attribute | Value |
316
+ | -------------- | ------------------------------------------------------------- |
317
+ | Agent ID | `sophie-chief-of-staff` |
318
+ | Role | Executive Cortex / Chief of Staff |
319
+ | Instance Count | 1 (singleton) |
320
+ | Context Window | Full strategic context — all memory layers accessible |
321
+ | Authority | Orchestration over all agents; direct actuation for Level 0-1 |
322
+ | Persistence | Continuous — session state preserved across restarts |
323
+ | Location | `/Users/sophie/sophie-ai/agents/sophie-chief-of-staff/` |
324
+
325
+ **Core responsibilities:**
326
+
327
+ - Morning and evening CEO briefings
328
+ - Communication triage and response coordination
329
+ - Strategic initiative tracking and follow-through
330
+ - Agent team orchestration and work routing
331
+ - Decision log maintenance
332
+ - Escalation management
333
+ - Knowledge synthesis oversight
334
+
335
+ ### 3.3 Tier 2: Domain VP Agents
336
+
337
+ Domain VPs are strategic-level agents responsible for an entire operational domain. They receive high-level objectives from Sophie and decompose them into tasks for Specialist Workers.
338
+
339
+ | Agent | Domain | Key Outputs |
340
+ | -------------------------- | ------------------------------------------------------- | ---------------------------------------------------------- |
341
+ | `strategic-planning` | Long-term strategy, scenario analysis, thesis alignment | Strategic memos, scenario reports, milestone tracking |
342
+ | `capital-raising` | LP relationships, fundraising, investor communications | Investor materials, pipeline tracking, term sheet analysis |
343
+ | `corporate-development` | M&A, rollup execution, due diligence coordination | Target briefs, DD checklists, deal structure analysis |
344
+ | `engineering-coordination` | Platform health, technical architecture, delivery | Engineering reports, PR reviews, architecture decisions |
345
+ | `product-strategy` | Product roadmap, feature prioritisation, UX direction | Product briefs, feature specs, competitive comparison |
346
+ | `regulatory-dfsa` | DFSA application, compliance infrastructure, legal | Gap analysis, regulatory responses, compliance reports |
347
+ | `fund-ops` | Fund structuring, NAV, investor reporting | Fund reports, NAV calculations, investor statements |
348
+ | `communications` | External comms, brand voice, media, content | Communication drafts, press materials, content calendar |
349
+ | `hiring-org-design` | Talent acquisition, org structure, team planning | JDs, candidate assessments, org chart updates |
350
+ | `risk-register` | Enterprise risk, operational risk, regulatory risk | Risk assessments, mitigation plans, risk dashboard |
351
+
352
+ Each Domain VP agent is defined in `/Users/sophie/sophie-ai/agents/{agent-name}/` with:
353
+
354
+ - Agent system prompt (role, responsibilities, constraints)
355
+ - Context assembly rules (which memory and knowledge sources to load)
356
+ - Output templates (standard deliverable formats)
357
+ - Escalation rules (when to push back to Sophie)
358
+
359
+ ### 3.4 Tier 3: Specialist Worker Agents
360
+
361
+ Specialist Workers execute discrete, well-scoped tasks. They receive fully specified task assignments from Domain VPs and return structured deliverables.
362
+
363
+ | Agent | Specialisation |
364
+ | -------------------------- | ------------------------------------------------------ |
365
+ | `ceo-briefing` | Compile and format CEO morning/evening briefs |
366
+ | `competitive-intelligence` | Monitor competitors, produce intelligence reports |
367
+ | `market-research` | Analyse market data, trends, and signals |
368
+ | `rollup-target-sourcing` | Identify and qualify rollup acquisition targets |
369
+ | `board-prep` | Prepare board meeting materials and packs |
370
+ | `legal-structuring` | Analyse legal structures, draft term sheets |
371
+ | `partnerships` | Track and advance strategic partnership discussions |
372
+ | `decision-log` | Maintain the structured decision log with rationale |
373
+ | `founder-voice` | Draft communications in the CEO's voice and style |
374
+ | `pmo-execution` | Track project milestones, deadlines, and deliverables |
375
+ | `platform-architecture` | Analyse and recommend technical architecture decisions |
376
+ | `workflow-automation` | Design and implement automated workflows |
377
+
378
+ #### Desktop Operator Specialists
379
+
380
+ | Agent | Specialisation |
381
+ | ------------------- | ---------------------------------------------------------------- |
382
+ | `desktop-operator` | General macOS desktop automation and control |
383
+ | `slack-operator` | Slack-specific navigation, reading, composing, thread management |
384
+ | `gmail-operator` | Gmail inbox management, drafting, labelling, search |
385
+ | `whatsapp-operator` | WhatsApp message monitoring and reply preparation |
386
+ | `browser-operator` | Web browsing, dashboard checking, form filling |
387
+ | `calendar-ops` | Calendar management, scheduling, conflict resolution |
388
+
389
+ ### 3.5 Agent Lifecycle
390
+
391
+ ```
392
+ DEFINE → INITIALISE → ASSIGN → EXECUTE → REPORT → IDLE / TERMINATE
393
+ │ │ │ │ │ │
394
+ │ │ │ │ │ └─ Return to pool or end session
395
+ │ │ │ │ └─ Deliver output, update status
396
+ │ │ │ └─ Execute task with access to specified tools/memory
397
+ │ │ └─ Receive task specification with context package
398
+ │ └─ Load agent prompt, configure tool access, attach memory
399
+ └─ Define agent in agents/{name}/ with system prompt and config
400
+ ```
401
+
402
+ ### 3.6 Agent Communication Protocol
403
+
404
+ Agents communicate through structured messages, not free-form text:
405
+
406
+ ```yaml
407
+ message:
408
+ from: sophie-chief-of-staff
409
+ to: corporate-development
410
+ type: task_assignment
411
+ priority: high
412
+ task:
413
+ id: task-2026-04-02-001
414
+ objective: "Prepare updated briefing document for Graham Capital acquisition target"
415
+ deliverable: "Target briefing document in outputs/memos/"
416
+ deadline: "2026-04-02T14:00:00Z"
417
+ context_sources:
418
+ - knowledge/entities/graham-capital.md
419
+ - knowledge/sources/rollup-pipeline.md
420
+ constraints:
421
+ - "Use only verified data (G0+ confidence)"
422
+ - "Include regulatory implications for DFSA"
423
+ escalation: "If key data missing, escalate to Sophie before deadline"
424
+ ```
425
+
426
+ ---
427
+
428
+ ## 4. Desktop Control Architecture
429
+
430
+ ### 4.1 Overview
431
+
432
+ The system operates as a full desktop user on macOS. It can see the screen, control the mouse and keyboard, switch between applications, and interact with native UI elements. This is not screen scraping — it is full computer use capability.
433
+
434
+ ### 4.2 Control Stack
435
+
436
+ ```
437
+ ┌─────────────────────────────────────────────────┐
438
+ │ Agent Decision Layer │
439
+ │ "I need to check the #general channel in Slack" │
440
+ ├─────────────────────────────────────────────────┤
441
+ │ Action Planning Layer │
442
+ │ 1. Activate Slack 2. Navigate to #general │
443
+ │ 3. Scroll to unread 4. Capture content │
444
+ ├─────────────────────────────────────────────────┤
445
+ │ State Awareness Layer │
446
+ │ Screenshot analysis, UI element detection, │
447
+ │ current app identification, window state │
448
+ ├──────────────┬──────────────────────────────────┤
449
+ │ AppleScript │ Accessibility API │ CGEvent │
450
+ │ (app-level) │ (UI elements) │ (input) │
451
+ ├──────────────┴──────────────────────────────────┤
452
+ │ macOS Desktop │
453
+ └─────────────────────────────────────────────────┘
454
+ ```
455
+
456
+ ### 4.3 Control Mechanisms
457
+
458
+ #### 4.3.1 AppleScript / JXA (JavaScript for Automation)
459
+
460
+ Primary mechanism for application-level control. Provides structured access to app state without relying on visual interpretation.
461
+
462
+ ```applescript
463
+ -- Example: Get unread Slack channel list
464
+ tell application "Slack"
465
+ activate
466
+ end tell
467
+
468
+ -- Example: Compose a new Gmail message
469
+ tell application "Google Chrome"
470
+ set URL of active tab of front window to "https://mail.google.com/mail/#compose"
471
+ end tell
472
+ ```
473
+
474
+ **Used for:** Application activation, window management, menu bar interaction, basic state queries.
475
+
476
+ #### 4.3.2 macOS Accessibility API (AXUIElement)
477
+
478
+ Programmatic access to UI element trees. Enables reading and interacting with specific UI controls without screenshot analysis.
479
+
480
+ **Used for:** Reading text from UI elements, clicking buttons by role/label, navigating form fields, checking control states (enabled, selected, value).
481
+
482
+ **Prerequisite:** System Preferences > Privacy & Security > Accessibility must grant access to the controlling process.
483
+
484
+ #### 4.3.3 CGEvent / IOHIDEvent (Input Simulation)
485
+
486
+ Low-level input simulation for cases where neither AppleScript nor Accessibility API provides the needed interaction.
487
+
488
+ **Used for:** Keyboard input, mouse clicks at coordinates, scroll events, drag operations, keyboard shortcuts.
489
+
490
+ #### 4.3.4 Screenshot Analysis (Computer Use)
491
+
492
+ Claude's computer use capability analyses screenshots to understand the current visual state of the desktop.
493
+
494
+ **Used for:** Identifying current application state, locating UI elements visually when Accessibility API access is unavailable, verifying that actions produced the expected result, handling non-standard UI components.
495
+
496
+ ### 4.4 Application Control Patterns
497
+
498
+ #### 4.4.1 Standard Application Interaction Sequence
499
+
500
+ ```
501
+ 1. VERIFY — Screenshot: What app is active? What state is it in?
502
+ 2. ACTIVATE — AppleScript: Bring target app to front
503
+ 3. CONFIRM — Screenshot: Is the app visible and in expected state?
504
+ 4. NAVIGATE — Accessibility/Keyboard: Navigate to target UI location
505
+ 5. CONFIRM — Screenshot: Am I at the correct location?
506
+ 6. ACT — Input simulation: Perform the action (click, type, select)
507
+ 7. VERIFY — Screenshot: Did the action succeed?
508
+ 8. EXTRACT — Accessibility/Screenshot: Capture result data
509
+ ```
510
+
511
+ #### 4.4.2 Slack Control
512
+
513
+ ```
514
+ Capabilities:
515
+ - Monitor all channels for new messages
516
+ - Read message content and thread context
517
+ - Compose and send messages (governance-gated)
518
+ - React to messages
519
+ - Search message history
520
+ - Navigate between workspaces
521
+
522
+ Method hierarchy:
523
+ 1. MCP Slack server (preferred — structured API access)
524
+ 2. Slack desktop app via Accessibility API
525
+ 3. Slack web app via browser control (fallback)
526
+ ```
527
+
528
+ #### 4.4.3 Gmail Control
529
+
530
+ ```
531
+ Capabilities:
532
+ - Inbox triage (read, classify, label)
533
+ - Draft composition
534
+ - Attachment handling
535
+ - Search and filter
536
+ - Label/folder management
537
+
538
+ Method hierarchy:
539
+ 1. MCP Gmail server (preferred — Google API access)
540
+ 2. Gmail web app via browser control (fallback)
541
+ ```
542
+
543
+ #### 4.4.4 WhatsApp Control
544
+
545
+ ```
546
+ Capabilities:
547
+ - Read incoming messages across chats/groups
548
+ - Compose replies (governance-gated)
549
+ - Monitor group activity
550
+ - Export conversation content
551
+
552
+ Method:
553
+ - WhatsApp Desktop app via Accessibility API + input simulation
554
+ - No API access available — desktop control is primary method
555
+ ```
556
+
557
+ ### 4.5 Window Management
558
+
559
+ ```
560
+ Strategies:
561
+ - Single-app focus: Maximise target app, perform operations, restore
562
+ - Split-screen: Side-by-side for reference tasks (e.g., draft email while viewing document)
563
+ - Background monitoring: Minimised apps checked via AppleScript state queries
564
+
565
+ Window state is tracked to enable restoration after operations:
566
+ - Record app positions and sizes before rearranging
567
+ - Restore layout after task completion
568
+ - Maintain a "home state" layout for idle periods
569
+ ```
570
+
571
+ ### 4.6 Recovery Patterns
572
+
573
+ Desktop control is inherently fragile. The system implements defensive patterns:
574
+
575
+ | Failure Mode | Detection | Recovery |
576
+ | ------------------------------------ | -------------------------------- | ---------------------------------------------------- |
577
+ | App not responding | Screenshot shows hang/beach ball | Force-quit via `kill`, relaunch, retry |
578
+ | Unexpected dialog/modal | Screenshot shows unexpected UI | Dismiss dialog (Escape/click), retry original action |
579
+ | App crashed | Process not found | Relaunch application, navigate to last known state |
580
+ | Screen lock activated | Screenshot shows login screen | Unlock via input simulation (credential in keychain) |
581
+ | Wrong app in foreground | Screenshot mismatch | Activate correct app, retry |
582
+ | UI element not found | Accessibility query returns null | Retry with delay, fallback to coordinate-based click |
583
+ | Network-dependent app loading slowly | Screenshot shows spinner/loading | Wait with exponential backoff, timeout after 30s |
584
+ | macOS system dialog (update, etc.) | Screenshot shows system UI | Dismiss/defer, log occurrence |
585
+
586
+ **Maximum retry depth:** 3 attempts per action. After 3 failures, escalate to error log and move to next task.
587
+
588
+ Desktop control scripts and configurations reside in `/Users/sophie/sophie-ai/desktop-control/`.
589
+
590
+ ---
591
+
592
+ ## 5. Memory Architecture
593
+
594
+ ### 5.1 Overview
595
+
596
+ The memory system provides persistent knowledge across sessions. It is structured into four tiers that mirror cognitive architecture: working memory, episodic memory, semantic memory, and decision memory.
597
+
598
+ All memory is file-based, stored in `/Users/sophie/sophie-ai/knowledge/`, and version-controlled via git.
599
+
600
+ ### 5.2 Working Memory
601
+
602
+ **Location:** In-session context window
603
+ **Persistence:** Session-scoped (lost on session restart unless explicitly persisted)
604
+ **Capacity:** Bounded by Claude context window (up to 1M tokens)
605
+
606
+ Working memory contains:
607
+
608
+ - Current task specification and progress
609
+ - Assembled context for the active reasoning task
610
+ - Intermediate results from in-progress operations
611
+ - Active conversation threads with agents
612
+
613
+ **Management:** Working memory is explicitly managed. At session boundaries, important working memory contents are flushed to episodic or semantic memory.
614
+
615
+ ### 5.3 Episodic Memory
616
+
617
+ **Location:** `/Users/sophie/sophie-ai/knowledge/memory/`
618
+ **Persistence:** Permanent (file-based)
619
+ **Structure:** Chronological entries with structured metadata
620
+
621
+ Episodic memory records events, conversations, and observations:
622
+
623
+ ```markdown
624
+ ## 2026-04-02 — Mehran flagged concern about Quantedge timeline
625
+
626
+ - Context: Morning Slack message in #strategy
627
+ - Content: Mehran noted that Quantedge CIO is considering retirement earlier than expected.
628
+ This compresses the engagement timeline from 12 months to potentially 6 months.
629
+ - Implication: Due diligence work on Quantedge must be front-loaded.
630
+ - Action taken: Escalated to corporate-development agent for pipeline timeline revision.
631
+ - Source: Slack #strategy, message ID msg-20260402-0823
632
+ ```
633
+
634
+ **Retrieval:** Episodic memory is searched by date range, entity mention, topic tag, and full-text search when assembling context for reasoning tasks.
635
+
636
+ ### 5.4 Semantic Memory
637
+
638
+ **Location:** `/Users/sophie/sophie-ai/knowledge/`
639
+ **Persistence:** Permanent (file-based, periodically refreshed)
640
+ **Structure:** Structured knowledge documents organised by domain
641
+
642
+ Semantic memory contains long-term strategic knowledge:
643
+
644
+ ```
645
+ knowledge/
646
+ ├── entities/ # Entity profiles (people, companies, funds, regulators)
647
+ ├── sources/ # Ingested and synthesised source documents
648
+ ├── syntheses/ # Cross-source synthesis documents (e.g., adaptic-overview.md)
649
+ ├── decisions/ # Decision log entries
650
+ └── memory/ # Episodic memory entries
651
+ ```
652
+
653
+ #### 5.4.1 Entity Maps
654
+
655
+ Entity profiles in `knowledge/entities/` maintain structured records:
656
+
657
+ ```yaml
658
+ entity: Graham Capital Management
659
+ type: acquisition_target
660
+ status: pipeline_active
661
+ aum: "$3.2B"
662
+ strategy: "Systematic CTA"
663
+ founder: "Name, age 71"
664
+ engagement_stage: "G0 — Identified, not yet contacted"
665
+ key_contacts: []
666
+ regulatory_jurisdiction: "SEC"
667
+ last_updated: "2026-04-01"
668
+ confidence: "verified"
669
+ source_documents:
670
+ - knowledge/sources/rollup-pipeline.md
671
+ - knowledge/sources/graham-capital-research.md
672
+ ```
673
+
674
+ #### 5.4.2 Knowledge Freshness
675
+
676
+ Every knowledge document carries metadata:
677
+
678
+ - `last_updated` — When the document was last refreshed
679
+ - `confidence` — Verified, probable, speculative, stale
680
+ - `source_authority` — Primary source, secondary synthesis, third-party report
681
+ - `refresh_cadence` — How often the document should be refreshed (daily, weekly, monthly)
682
+ - `contradictions` — Known conflicts with other knowledge sources
683
+
684
+ The system runs a weekly knowledge freshness audit that flags stale documents for refresh.
685
+
686
+ ### 5.5 Decision Memory
687
+
688
+ **Location:** `/Users/sophie/sophie-ai/knowledge/decisions/`
689
+ **Persistence:** Permanent (append-only)
690
+ **Structure:** Structured decision records
691
+
692
+ Every significant decision is recorded:
693
+
694
+ ```markdown
695
+ ## DECISION-2026-0042: Prioritise Graham Capital as Deal #1 candidate
696
+
697
+ - **Date:** 2026-03-28
698
+ - **Decider:** Mehran Granfar (CEO)
699
+ - **Context:** Pipeline review revealed Graham Capital has strongest succession-trigger signal
700
+ - **Options considered:**
701
+ 1. Graham Capital — strongest trigger, manageable AUM, systematic strategy aligns
702
+ 2. Cadian Capital — distressed AUM, but reputational risk from -64% decline
703
+ 3. Quantedge — excellent performance, but higher AUM means higher capital requirement
704
+ - **Decision:** Pursue Graham Capital as primary Deal #1 candidate
705
+ - **Rationale:** Founder age (71) creates natural succession pressure. Systematic CTA strategy aligns with Adaptic OS. $3.2B AUM is within achievable capital raise range.
706
+ - **Risks accepted:** Limited geographic overlap (US-based, we are DIFC). SEC regulatory complexity.
707
+ - **Review date:** 2026-05-01
708
+ - **Outcome:** [Pending — to be updated]
709
+ ```
710
+
711
+ ---
712
+
713
+ ## 6. Communication Architecture
714
+
715
+ ### 6.1 Voice Modes
716
+
717
+ | Mode | Use Case | Governance Level |
718
+ | ----------------------- | ------------------------------------------------------------- | ---------------- |
719
+ | Sophie's Voice | Internal team communications, operational coordination | Level 0-1 |
720
+ | Mehran's Voice (Draft) | External communications drafted for CEO review | Level 2 |
721
+ | Mehran's Voice (Direct) | Pre-approved routine messages sent as the CEO | Level 1 |
722
+ | Internal Notes | Analysis, recommendations, risk flags — never sent externally | Level 0 |
723
+ | Neutral / Institutional | Official company communications, regulatory correspondence | Level 3-4 |
724
+
725
+ ### 6.2 Channel Routing
726
+
727
+ | Recipient Type | Primary Channel | Fallback Channel | Governance |
728
+ | ------------------- | --------------- | ---------------- | ------------- |
729
+ | Internal team | Slack | Email | Auto-execute |
730
+ | CEO (Mehran) | Slack DM | WhatsApp | Auto-execute |
731
+ | Investors / LPs | Email (draft) | — | CEO approval |
732
+ | Board members | Email (draft) | — | CEO approval |
733
+ | Regulators | Email (draft) | — | Dual approval |
734
+ | Acquisition targets | Email (draft) | — | CEO approval |
735
+ | External advisors | Email (draft) | Slack guest | CEO approval |
736
+ | Engineering team | Slack + GitHub | Email | Auto-execute |
737
+
738
+ ### 6.3 Approval Flow
739
+
740
+ ```
741
+ Sophie drafts communication
742
+
743
+ ├─ Level 0-1: Auto-send, log action
744
+
745
+ ├─ Level 2: Hold in outputs/communications/
746
+ │ Notify Mehran via Slack: "Draft ready for review: [title]"
747
+ │ Wait for: Approve / Revise / Reject
748
+ │ On Approve: Send, log approval
749
+ │ On Revise: Update draft, re-submit
750
+ │ On Reject: Archive, log rejection
751
+
752
+ └─ Level 3-4: Hold in outputs/communications/
753
+ Notify Mehran via Slack + WhatsApp
754
+ Require explicit "APPROVED" response
755
+ Level 4: Require second approver confirmation
756
+ On Approve: Send, log all approvals
757
+ On Timeout (24h): Re-escalate
758
+ ```
759
+
760
+ ### 6.4 Communication Logging
761
+
762
+ Every communication (sent or drafted) is logged with:
763
+
764
+ - Timestamp, channel, sender identity (voice mode), recipient(s)
765
+ - Full message content
766
+ - Governance level applied
767
+ - Approval chain (who approved, when)
768
+ - Thread context (what prompted this communication)
769
+
770
+ ---
771
+
772
+ ## 7. Scheduling Architecture
773
+
774
+ ### 7.1 Scheduling Infrastructure
775
+
776
+ The system uses a dual scheduling approach:
777
+
778
+ 1. **launchd** (macOS native) — For system-level process supervision and core daemon scheduling
779
+ 2. **Cron-equivalent workflows** — For business-logic scheduling managed within the CEO Brain runtime
780
+
781
+ ### 7.2 launchd Configuration
782
+
783
+ Core system processes are managed as launchd agents:
784
+
785
+ ```xml
786
+ <!-- ~/Library/LaunchAgents/com.adaptic.sophie-ai.core.plist -->
787
+ <plist version="1.0">
788
+ <dict>
789
+ <key>Label</key>
790
+ <string>com.adaptic.sophie-ai.core</string>
791
+ <key>ProgramArguments</key>
792
+ <array>
793
+ <string>/usr/local/bin/claude</string>
794
+ <string>--session</string>
795
+ <string>sophie-main</string>
796
+ </array>
797
+ <key>KeepAlive</key>
798
+ <true/>
799
+ <key>RunAtLoad</key>
800
+ <true/>
801
+ <key>StandardOutPath</key>
802
+ <string>/Users/sophie/sophie-ai/logs/core.stdout.log</string>
803
+ <key>StandardErrorPath</key>
804
+ <string>/Users/sophie/sophie-ai/logs/core.stderr.log</string>
805
+ <key>WorkingDirectory</key>
806
+ <string>/Users/sophie/sophie-ai</string>
807
+ </dict>
808
+ </plist>
809
+ ```
810
+
811
+ ### 7.3 Scheduled Workflows
812
+
813
+ Workflow definitions reside in `/Users/sophie/sophie-ai/workflows/` organised by cadence:
814
+
815
+ ```
816
+ workflows/
817
+ ├── daily/ # Runs every day
818
+ ├── weekly/ # Runs on specific days
819
+ ├── monthly/ # Runs on specific dates
820
+ ├── quarterly/ # Runs at quarter boundaries
821
+ └── event-driven/ # Triggered by external events
822
+ ```
823
+
824
+ #### 7.3.1 Daily Schedule
825
+
826
+ | Time (UTC) | Workflow | Agent | Output |
827
+ | ---------- | ------------------------------------ | ---------------------------------- | --------------------- |
828
+ | 02:00 | Market data overnight ingest | `market-research` | `ingest/market-data/` |
829
+ | 02:30 | Competitive intelligence sweep | `competitive-intel` | `ingest/competitive/` |
830
+ | 03:00 | System maintenance window | `system` | `logs/maintenance/` |
831
+ | 05:30 | Morning intelligence synthesis | `sophie` | Working memory |
832
+ | 06:00 | CEO Morning Brief compilation | `ceo-briefing` | `outputs/briefs/` |
833
+ | 07:30 | Inbox triage (Gmail + Slack) | `gmail-operator`, `slack-operator` | Classified queue |
834
+ | 08:00 | Action item extraction | `sophie` | Task assignments |
835
+ | 12:00 | Midday follow-up sweep | `slack-operator` | Follow-up queue |
836
+ | 17:00 | End-of-day communications review | `sophie` | Pending items report |
837
+ | 17:30 | CEO Evening Wrap compilation | `ceo-briefing` | `outputs/briefs/` |
838
+ | 22:00 | Overnight monitoring mode activation | `sophie` | Alert-only mode |
839
+
840
+ #### 7.3.2 Weekly Schedule
841
+
842
+ | Day | Workflow | Agent |
843
+ | --------- | ------------------------------ | ----------------------- |
844
+ | Monday | Weekly priorities review | `sophie` + `pmo` |
845
+ | Tuesday | Engineering health review | `engineering-coord` |
846
+ | Wednesday | Rollup pipeline review | `corporate-development` |
847
+ | Thursday | Regulatory and legal follow-up | `regulatory-dfsa` |
848
+ | Friday | Weekly Strategic Memo | `sophie` + `strategic` |
849
+
850
+ #### 7.3.3 Monthly Schedule
851
+
852
+ | Workflow | Agent |
853
+ | ------------------------------ | ------------------------------ |
854
+ | Runway and capital review | `fund-ops` + `capital-raising` |
855
+ | Product maturity assessment | `product-strategy` |
856
+ | Board readiness review | `board-prep` |
857
+ | Risk register refresh | `risk-register` |
858
+ | Hiring and org review | `hiring-org-design` |
859
+ | Knowledge base freshness audit | `sophie` |
860
+
861
+ ### 7.4 Event-Driven Triggers
862
+
863
+ In addition to scheduled workflows, the system responds to real-time events:
864
+
865
+ | Event | Trigger Source | Response |
866
+ | ----------------------------------- | ---------------------- | -------------------------------------------- |
867
+ | CEO Slack message to Sophie | Slack monitoring | Immediate context assembly and response |
868
+ | Critical email received | Gmail monitoring | Alert + triage + draft response |
869
+ | GitHub PR merged to main | GitHub webhook / poll | Engineering status update |
870
+ | Market circuit breaker triggered | Market data monitoring | Risk alert to CEO + risk-register agent |
871
+ | Competitor announcement detected | News / RSS monitoring | Competitive intelligence brief |
872
+ | Kill switch activated | Filesystem watch | Immediate halt per kill switch type |
873
+ | New file in ingest directory | `fswatch` on ingest/ | Classify and route to appropriate processing |
874
+ | Calendar event approaching (15 min) | Calendar sync | Meeting brief preparation and delivery |
875
+
876
+ Event-driven workflow definitions reside in `/Users/sophie/sophie-ai/workflows/event-driven/`.
877
+
878
+ ---
879
+
880
+ ## 8. Integration Points
881
+
882
+ ### 8.1 MCP (Model Context Protocol) Servers
883
+
884
+ MCP is the primary integration protocol. MCP servers expose external services as structured tools available to Claude Code.
885
+
886
+ | MCP Server | Service | Capabilities |
887
+ | --------------------- | ------------------ | --------------------------------------------------------- |
888
+ | `mcp-slack` | Slack | Read channels, post messages, manage threads, search |
889
+ | `mcp-gmail` | Gmail (Google API) | Read inbox, send/draft emails, manage labels, search |
890
+ | `mcp-google-calendar` | Google Calendar | Read/write events, check availability, manage invitations |
891
+ | `mcp-github` | GitHub | Repos, PRs, issues, actions, code search |
892
+ | `mcp-filesystem` | Local filesystem | Read/write files, directory operations, file watching |
893
+ | `mcp-linear` | Linear | Issue tracking, project management, sprint data |
894
+ | `mcp-browser` | Browser automation | Navigate, extract, fill forms, download |
895
+
896
+ MCP server configurations are stored in `/Users/sophie/sophie-ai/mcp/`.
897
+
898
+ ### 8.2 Claude Code CLI
899
+
900
+ The system runs on Claude Code as the primary runtime. Key integration points:
901
+
902
+ | Feature | Usage |
903
+ | ------------------- | --------------------------------------------------------------- |
904
+ | Session persistence | Named sessions (`--session sophie-main`) for context continuity |
905
+ | Tool use | Bash, Read, Write, Edit, Glob, Grep for filesystem operations |
906
+ | MCP tool invocation | Access to all registered MCP servers |
907
+ | Computer use | Screenshot capture and analysis for desktop control |
908
+ | Sub-agent spawning | Claude Code instances for parallel agent execution |
909
+ | Background tasks | Long-running operations via background execution |
910
+
911
+ ### 8.3 Remote Bridge
912
+
913
+ The remote bridge enables the CEO to interact with the system from any device.
914
+
915
+ ```
916
+ ┌──────────────┐ ┌─────────────────┐ ┌──────────────────┐
917
+ │ CEO's Phone │────▶│ Remote Bridge │────▶│ CEO Brain │
918
+ │ / Laptop │◀────│ (Secure Relay) │◀────│ (Mac mini) │
919
+ └──────────────┘ └─────────────────┘ └──────────────────┘
920
+ ```
921
+
922
+ | Feature | Implementation |
923
+ | ----------------- | ---------------------------------------------- |
924
+ | Command channel | Encrypted message queue (CEO to Sophie) |
925
+ | Response channel | Encrypted message queue (Sophie to CEO) |
926
+ | Approval workflow | Structured approval/reject messages via bridge |
927
+ | Kill switch | Remote halt command via bridge |
928
+ | Status queries | On-demand system status reports |
929
+
930
+ Remote bridge code and configuration reside in `/Users/sophie/sophie-ai/remote-bridge/`.
931
+
932
+ ### 8.4 External APIs
933
+
934
+ | API | Purpose | Auth Method |
935
+ | ---------------- | ------------------------------------------- | ------------------- |
936
+ | Anthropic API | Claude model access for agent reasoning | API key (encrypted) |
937
+ | Polygon.io | Market data (prices, news, fundamentals) | API key |
938
+ | Alpaca Markets | Brokerage data (positions, orders, account) | OAuth / API key |
939
+ | Google Workspace | Gmail, Calendar, Drive | OAuth 2.0 |
940
+ | GitHub | Repository operations | PAT / GitHub App |
941
+ | Slack | Workspace communication | Bot token + OAuth |
942
+ | News APIs | Competitive and market intelligence | API keys |
943
+
944
+ ### 8.5 Claude Code Plugins
945
+
946
+ Custom plugins extend the system's capabilities:
947
+
948
+ ```
949
+ plugins/
950
+ ├── sophie-ai-tools/ # Custom tools for executive operations
951
+ ├── desktop-control/ # macOS desktop automation tools
952
+ ├── knowledge-ops/ # Knowledge base management tools
953
+ └── governance/ # Approval and audit trail tools
954
+ ```
955
+
956
+ Plugin configurations and source reside in `/Users/sophie/sophie-ai/plugins/`.
957
+
958
+ ---
959
+
960
+ ## 9. Security Architecture
961
+
962
+ ### 9.1 Threat Model
963
+
964
+ | Threat | Severity | Mitigation |
965
+ | ---------------------------------- | -------- | ------------------------------------------------------- |
966
+ | Credential theft from filesystem | Critical | macOS Keychain + encrypted secrets store |
967
+ | Unauthorised system access | Critical | SSH key auth, no password login, firewall rules |
968
+ | Agent prompt injection | High | Input sanitisation, output validation, sandboxed agents |
969
+ | Data exfiltration via agent action | High | Outbound communication gating, audit logging |
970
+ | Privilege escalation by agent | High | Role-based tool access, governance layer enforcement |
971
+ | Man-in-the-middle on API calls | Medium | TLS everywhere, certificate pinning where possible |
972
+ | Physical access to Mac mini | Medium | Physical security, FileVault encryption, auto-lock |
973
+ | Supply chain attack on MCP servers | Medium | Pin MCP server versions, review before update |
974
+
975
+ ### 9.2 Secrets Management
976
+
977
+ ```
978
+ Secrets storage hierarchy:
979
+ 1. macOS Keychain (preferred) — API keys, OAuth tokens, credentials
980
+ 2. Encrypted env files — Environment-specific configuration
981
+ 3. NEVER in plaintext files, git history, or agent context
982
+
983
+ Secrets access pattern:
984
+ Agent → requests secret by name → Governance Layer validates access → Keychain retrieval → inject into tool call → secret never enters log or memory
985
+ ```
986
+
987
+ **Critical rule:** No secret, credential, or token is ever written to the knowledge base, log files, agent context, or any file in the sophie-ai directory tree in plaintext.
988
+
989
+ ### 9.3 Access Control
990
+
991
+ | Principal | Access Level |
992
+ | ----------------------- | ------------------------------------------------------------- |
993
+ | Sophie (core agent) | Full read, gated write, orchestration authority |
994
+ | Domain VP agents | Domain-scoped read, domain-scoped write, no escalation bypass |
995
+ | Specialist Workers | Task-scoped read, task-scoped write only |
996
+ | CEO (Mehran) via bridge | Full override authority, approval authority |
997
+ | System administrator | SSH access, launchd management, no agent impersonation |
998
+
999
+ ### 9.4 Audit Logging
1000
+
1001
+ All logs are written to `/Users/sophie/sophie-ai/logs/` with the following guarantees:
1002
+
1003
+ - **Append-only** — Log files are never modified after writing, only rotated
1004
+ - **Structured format** — JSON lines for machine parsing, human-readable summaries
1005
+ - **Retention** — 6 years minimum (regulatory requirement per DFSA)
1006
+ - **Integrity** — Daily log checksums stored separately
1007
+ - **Categories:**
1008
+ - `audit.log` — All governance-relevant actions (communications, approvals, escalations)
1009
+ - `agent.log` — Agent lifecycle events (spawn, assign, complete, error)
1010
+ - `desktop.log` — Desktop control actions (app interactions, UI operations)
1011
+ - `perception.log` — Ingest events (what was observed, when, from where)
1012
+ - `error.log` — System errors, failures, recovery actions
1013
+ - `core.stdout.log` / `core.stderr.log` — Raw process output
1014
+
1015
+ ### 9.5 Encryption
1016
+
1017
+ | Data Category | At Rest | In Transit |
1018
+ | --------------------- | -------------------------------- | -------------------- |
1019
+ | Secrets / Credentials | macOS Keychain (hardware-backed) | TLS 1.3 |
1020
+ | Knowledge base | FileVault (full-disk encryption) | N/A (local) |
1021
+ | Logs | FileVault (full-disk encryption) | N/A (local) |
1022
+ | API communications | N/A | TLS 1.3 |
1023
+ | Remote bridge | N/A | End-to-end encrypted |
1024
+ | Backups | AES-256 encrypted archives | TLS 1.3 for transfer |
1025
+
1026
+ ### 9.6 Network Security
1027
+
1028
+ - macOS firewall enabled; only required ports open (SSH, HTTPS outbound)
1029
+ - No inbound connections except SSH (key-auth only) and remote bridge relay
1030
+ - DNS-over-HTTPS to prevent DNS-based monitoring
1031
+ - All API traffic over TLS; no plaintext HTTP
1032
+ - VPN for administrative access when off-network
1033
+
1034
+ ---
1035
+
1036
+ ## 10. Resilience and Recovery
1037
+
1038
+ ### 10.1 Health Check System
1039
+
1040
+ The watchdog process runs independently of the main CEO Brain runtime and monitors system health.
1041
+
1042
+ | Check | Frequency | Failure Action |
1043
+ | ----------------------- | ---------- | ------------------------------------------------------------ |
1044
+ | Core process alive | 30 seconds | Restart via launchd (automatic) |
1045
+ | Disk space > 20% free | 5 minutes | Alert + log rotation + old output archival |
1046
+ | Network connectivity | 1 minute | Alert; queue outbound actions; retry with backoff |
1047
+ | Memory usage < 80% | 1 minute | Alert; graceful restart if persistent |
1048
+ | Slack API accessible | 5 minutes | Fall back to desktop control |
1049
+ | Gmail API accessible | 5 minutes | Fall back to browser control |
1050
+ | MCP servers responsive | 5 minutes | Restart unresponsive server; fall back to CLI tools |
1051
+ | Log directory writable | 5 minutes | Critical alert; attempt repair; halt actuation if persistent |
1052
+ | Kill switch file absent | 10 seconds | If present: execute halt per switch type |
1053
+ | Screen unlocked | 1 minute | Unlock if locked; alert if unable |
1054
+ | Clock sync (NTP) | 1 hour | Alert if drift > 5 seconds |
1055
+
1056
+ ### 10.2 Watchdog Process
1057
+
1058
+ ```xml
1059
+ <!-- ~/Library/LaunchAgents/com.adaptic.sophie-ai.watchdog.plist -->
1060
+ <plist version="1.0">
1061
+ <dict>
1062
+ <key>Label</key>
1063
+ <string>com.adaptic.sophie-ai.watchdog</string>
1064
+ <key>ProgramArguments</key>
1065
+ <array>
1066
+ <string>/Users/sophie/sophie-ai/scripts/watchdog.sh</string>
1067
+ </array>
1068
+ <key>StartInterval</key>
1069
+ <integer>30</integer>
1070
+ <key>KeepAlive</key>
1071
+ <true/>
1072
+ <key>RunAtLoad</key>
1073
+ <true/>
1074
+ </dict>
1075
+ </plist>
1076
+ ```
1077
+
1078
+ The watchdog is a lightweight shell script (no dependency on Claude or Python). It checks process health, disk, memory, and network, and can restart the core process or trigger alerts independently.
1079
+
1080
+ ### 10.3 State Persistence
1081
+
1082
+ The system is designed to survive restarts without data loss:
1083
+
1084
+ | State Category | Persistence Method | Recovery |
1085
+ | ------------------------ | ------------------------------------------------------ | ------------------------------------ |
1086
+ | Strategic memory | Files in `knowledge/` (git-tracked) | Always available on restart |
1087
+ | Execution queues | Files in `teams/` with structured status | Resume from last known state |
1088
+ | Working memory | Session state file written at checkpoints | Reload on session restart |
1089
+ | Scheduled workflow state | Filesystem markers (last-run timestamps) | Detect missed runs, execute catch-up |
1090
+ | Desktop state | Screenshot before shutdown | Restore from screenshot analysis |
1091
+ | Pending approvals | Files in `outputs/communications/` with pending status | Re-surface in next briefing |
1092
+ | Decision log | Append-only files in `knowledge/decisions/` | Always available |
1093
+ | Audit logs | Append-only files in `logs/` | Always available |
1094
+
1095
+ ### 10.4 Recovery Procedures
1096
+
1097
+ #### 10.4.1 Graceful Restart
1098
+
1099
+ ```
1100
+ 1. Flush working memory to episodic memory
1101
+ 2. Write session checkpoint (current tasks, pending items, queue state)
1102
+ 3. Log restart reason
1103
+ 4. Terminate agent sessions
1104
+ 5. [Restart occurs via launchd]
1105
+ 6. Load session checkpoint
1106
+ 7. Verify knowledge base integrity
1107
+ 8. Resume scheduled workflows (catch up any missed)
1108
+ 9. Notify CEO: "System restarted at [time]. Reason: [reason]. All state recovered."
1109
+ ```
1110
+
1111
+ #### 10.4.2 Crash Recovery
1112
+
1113
+ ```
1114
+ 1. [launchd detects process death, restarts within 30 seconds]
1115
+ 2. Load last session checkpoint
1116
+ 3. Scan for incomplete operations (partial file writes, unsent messages)
1117
+ 4. Roll back incomplete operations
1118
+ 5. Resume from last clean state
1119
+ 6. Audit log gap analysis (identify any unlogged period)
1120
+ 7. Notify CEO: "System crash recovery at [time]. Gap: [duration]. Review needed: [items]"
1121
+ ```
1122
+
1123
+ #### 10.4.3 Full System Recovery (from backup)
1124
+
1125
+ ```
1126
+ 1. Restore macOS from Time Machine or archived backup
1127
+ 2. Verify FileVault decryption
1128
+ 3. Verify Keychain access (secrets intact)
1129
+ 4. Run integrity check on knowledge/ directory
1130
+ 5. Verify launchd agents registered
1131
+ 6. Start watchdog
1132
+ 7. Start core process
1133
+ 8. Run full health check suite
1134
+ 9. Notify CEO via all channels: "Full system recovery complete. Manual audit recommended."
1135
+ ```
1136
+
1137
+ ### 10.5 Backup Strategy
1138
+
1139
+ | Data | Method | Frequency | Retention |
1140
+ | -------------------- | ------------------------------------- | --------------- | -------------- |
1141
+ | Full system | Time Machine to encrypted external | Hourly | 30 days |
1142
+ | Knowledge base | Git push to private remote | On every commit | Permanent |
1143
+ | Logs and audit trail | Compressed archive to encrypted store | Daily | 6 years (DFSA) |
1144
+ | Configuration | Git push to private remote | On every change | Permanent |
1145
+ | Secrets / Keychain | macOS Keychain backup (encrypted) | Weekly | 1 year |
1146
+
1147
+ ---
1148
+
1149
+ ## 11. Directory Structure Reference
1150
+
1151
+ ```
1152
+ /Users/sophie/sophie-ai/
1153
+ ├── agents/ # Agent definitions and configurations
1154
+ │ ├── sophie-chief-of-staff/ # Executive Cortex (Tier 1)
1155
+ │ ├── strategic-planning/ # Domain VP (Tier 2)
1156
+ │ ├── capital-raising/ # Domain VP (Tier 2)
1157
+ │ ├── corporate-development/ # Domain VP (Tier 2)
1158
+ │ ├── engineering-coordination/ # Domain VP (Tier 2)
1159
+ │ ├── product-strategy/ # Domain VP (Tier 2)
1160
+ │ ├── regulatory-dfsa/ # Domain VP (Tier 2)
1161
+ │ ├── fund-ops/ # Domain VP (Tier 2)
1162
+ │ ├── communications/ # Domain VP (Tier 2)
1163
+ │ ├── hiring-org-design/ # Domain VP (Tier 2)
1164
+ │ ├── risk-register/ # Domain VP (Tier 2)
1165
+ │ ├── ceo-briefing/ # Specialist Worker (Tier 3)
1166
+ │ ├── competitive-intelligence/ # Specialist Worker (Tier 3)
1167
+ │ ├── market-research/ # Specialist Worker (Tier 3)
1168
+ │ ├── rollup-target-sourcing/ # Specialist Worker (Tier 3)
1169
+ │ ├── board-prep/ # Specialist Worker (Tier 3)
1170
+ │ ├── legal-structuring/ # Specialist Worker (Tier 3)
1171
+ │ ├── partnerships/ # Specialist Worker (Tier 3)
1172
+ │ ├── decision-log/ # Specialist Worker (Tier 3)
1173
+ │ ├── founder-voice/ # Specialist Worker (Tier 3)
1174
+ │ ├── pmo-execution/ # Specialist Worker (Tier 3)
1175
+ │ ├── platform-architecture/ # Specialist Worker (Tier 3)
1176
+ │ ├── workflow-automation/ # Specialist Worker (Tier 3)
1177
+ │ ├── desktop-operator/ # Desktop Specialist (Tier 3)
1178
+ │ ├── slack-operator/ # Desktop Specialist (Tier 3)
1179
+ │ ├── gmail-operator/ # Desktop Specialist (Tier 3)
1180
+ │ ├── whatsapp-operator/ # Desktop Specialist (Tier 3)
1181
+ │ ├── browser-operator/ # Desktop Specialist (Tier 3)
1182
+ │ └── calendar-ops/ # Desktop Specialist (Tier 3)
1183
+ ├── config/ # System configuration files
1184
+ ├── dashboards/ # Dashboard definitions and templates
1185
+ ├── desktop-control/ # Desktop automation scripts and state
1186
+ ├── docs/ # Documentation
1187
+ │ ├── architecture/ # System architecture (this document)
1188
+ │ ├── business-synthesis/ # Business context documents
1189
+ │ ├── governance/ # Governance policies and procedures
1190
+ │ ├── operating-model/ # Operating model definitions
1191
+ │ ├── prompts/ # Prompt templates and libraries
1192
+ │ ├── runbooks/ # Operational runbooks
1193
+ │ ├── vision/ # Vision and strategy documents
1194
+ │ └── workflows/ # Workflow documentation
1195
+ ├── ingest/ # Raw ingested data (perception layer)
1196
+ ├── knowledge/ # Persistent knowledge base
1197
+ │ ├── decisions/ # Decision memory (append-only)
1198
+ │ ├── entities/ # Entity profiles and maps
1199
+ │ ├── memory/ # Episodic memory entries
1200
+ │ ├── sources/ # Source documents and research
1201
+ │ └── syntheses/ # Cross-source synthesis documents
1202
+ ├── logs/ # System and audit logs
1203
+ ├── mcp/ # MCP server configurations
1204
+ ├── outputs/ # Generated deliverables
1205
+ │ ├── board/ # Board materials
1206
+ │ ├── briefs/ # CEO briefs (morning/evening)
1207
+ │ ├── communications/ # Draft communications
1208
+ │ ├── followups/ # Follow-up tracking
1209
+ │ └── memos/ # Strategic and operational memos
1210
+ ├── plugins/ # Claude Code plugin extensions
1211
+ ├── policies/ # Governance policies (machine-readable)
1212
+ ├── remote-bridge/ # Remote access bridge
1213
+ ├── schedules/ # Schedule definitions and state
1214
+ ├── scripts/ # System scripts (watchdog, maintenance)
1215
+ ├── teams/ # Agent team orchestration state
1216
+ ├── tests/ # System tests and validation
1217
+ └── workflows/ # Workflow definitions by cadence
1218
+ ├── daily/
1219
+ ├── weekly/
1220
+ ├── monthly/
1221
+ ├── quarterly/
1222
+ └── event-driven/
1223
+ ```
1224
+
1225
+ ---
1226
+
1227
+ ## Appendix A: Technology Stack Summary
1228
+
1229
+ | Component | Technology |
1230
+ | -------------------- | ---------------------------------------------------- |
1231
+ | AI Runtime | Claude Code CLI (Anthropic) |
1232
+ | Model | Claude (latest available via Anthropic API) |
1233
+ | Integration Protocol | MCP (Model Context Protocol) |
1234
+ | Desktop Control | AppleScript, Accessibility API, CGEvent |
1235
+ | Process Supervision | launchd (macOS native) |
1236
+ | Scheduling | launchd + workflow engine |
1237
+ | Secrets Management | macOS Keychain |
1238
+ | Disk Encryption | FileVault 2 |
1239
+ | Version Control | Git (knowledge base, config, agent definitions) |
1240
+ | Log Format | JSON Lines (structured) + plaintext (human-readable) |
1241
+ | Backup | Time Machine + git remote + encrypted archives |
1242
+ | Network Security | macOS firewall + TLS 1.3 + SSH key auth |
1243
+ | File Watching | `fswatch` (macOS) |
1244
+ | Operating System | macOS 14+ (Sonoma) |
1245
+ | Hardware | Apple Silicon Mac mini |
1246
+
1247
+ ## Appendix B: Configuration Checklist (Initial Deployment)
1248
+
1249
+ - [ ] Mac mini provisioned with macOS 14+, FileVault enabled
1250
+ - [ ] User account `sophie` created with admin privileges
1251
+ - [ ] Accessibility permissions granted to Claude Code and Terminal
1252
+ - [ ] Screen lock disabled or auto-unlock configured
1253
+ - [ ] Claude Code CLI installed and authenticated
1254
+ - [ ] All MCP servers installed and configured in `/Users/sophie/sophie-ai/mcp/`
1255
+ - [ ] API keys stored in macOS Keychain (Anthropic, Slack, Google, GitHub, Polygon, Alpaca)
1256
+ - [ ] OAuth tokens provisioned (Google Workspace, Slack, GitHub)
1257
+ - [ ] launchd agents installed (core process, watchdog)
1258
+ - [ ] SSH key-only access configured; password login disabled
1259
+ - [ ] Firewall rules configured (outbound HTTPS; inbound SSH only)
1260
+ - [ ] Time Machine backup configured to encrypted external drive
1261
+ - [ ] Git remote configured for knowledge base and config
1262
+ - [ ] All agent directories populated with system prompts
1263
+ - [ ] Governance policies written to `/Users/sophie/sophie-ai/policies/`
1264
+ - [ ] Kill switch mechanism tested (create and remove lock files)
1265
+ - [ ] Remote bridge configured and tested
1266
+ - [ ] Watchdog script deployed and tested
1267
+ - [ ] Full health check suite passing
1268
+ - [ ] CEO (Mehran) can reach system via Slack, WhatsApp, and remote bridge
1269
+ - [ ] First CEO Morning Brief generated successfully
1270
+
1271
+ ---
1272
+
1273
+ > This document is the authoritative reference for the CEO Brain system architecture. All implementation must conform to the specifications herein. Changes to this document require review and approval.