@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,994 @@
1
+ #!/usr/bin/env python3
2
+ """Pre-draft fact retrieval module — Memory Enhancement Phase 4.
3
+
4
+ Pulls relevant entity context BEFORE composing any outbound message.
5
+ Closes the gap where Sophie drafts messages without first checking what
6
+ she knows about the recipient and related entities.
7
+
8
+ Integration points — call this script before any of these send scripts:
9
+ - scripts/send-email-threaded.py (email composition)
10
+ - scripts/slack-send.sh (Slack messaging)
11
+ - scripts/send-whatsapp.sh (WhatsApp messaging)
12
+
13
+ Usage:
14
+ python3 scripts/pre-draft-context.py --recipient "Graham Syder"
15
+ python3 scripts/pre-draft-context.py --recipient "Graham Syder" --topic "fitout"
16
+ python3 scripts/pre-draft-context.py --recipient "hootan@adaptic.ai" --format brief
17
+ python3 scripts/pre-draft-context.py --recipient "Nima" --topic "83b election" --format brief
18
+
19
+ Output:
20
+ --format json (default) → Full structured JSON to stdout
21
+ --format brief → 3-5 line summary suitable for prompt injection
22
+
23
+ Performance target: < 500ms (no API calls — file reads only).
24
+ Exit codes: 0 = context found, 1 = recipient not found, 2 = error
25
+
26
+ Created: 2026-04-04 — Memory Enhancement Phase 4
27
+ """
28
+ import argparse
29
+ import json
30
+ import re
31
+ import sys
32
+ import time
33
+ from pathlib import Path
34
+
35
+ # Try to import PyYAML at module level (avoids repeated import overhead)
36
+ _yaml_mod = None
37
+ _yaml_loader = None
38
+ try:
39
+ import yaml as _yaml_mod
40
+ try:
41
+ _yaml_loader = _yaml_mod.CSafeLoader # C extension — 10x faster
42
+ except AttributeError:
43
+ _yaml_loader = None
44
+ except ImportError:
45
+ pass
46
+
47
+ # ─────────────────────────────────────────────
48
+ # Path resolution
49
+ # ─────────────────────────────────────────────
50
+ SCRIPT_DIR = Path(__file__).resolve().parent
51
+ REPO_ROOT = SCRIPT_DIR.parent
52
+
53
+ ENTITY_INDEX_PATH = REPO_ROOT / "memory" / "indexes" / "entity-relationships.yaml"
54
+ ENTITY_INDEX_CACHE_PATH = REPO_ROOT / "memory" / "indexes" / ".entity-relationships.json"
55
+ USER_PROFILES_DIR = REPO_ROOT / "memory" / "profiles" / "users"
56
+ QUEUES_DIR = REPO_ROOT / "state" / "queues"
57
+ INTERACTIONS_DIR = REPO_ROOT / "memory" / "interactions"
58
+
59
+
60
+ # ─────────────────────────────────────────────
61
+ # YAML parser — reused from validate-outbound.py
62
+ # ─────────────────────────────────────────────
63
+ def _parse_yaml(text):
64
+ """Parse YAML text into nested Python objects.
65
+
66
+ Uses PyYAML with C loader (fastest) if available, then safe_load,
67
+ falls back to built-in recursive parser.
68
+ """
69
+ if _yaml_mod is not None:
70
+ if _yaml_loader is not None:
71
+ return _yaml_mod.load(text, Loader=_yaml_loader) or {}
72
+ else:
73
+ return _yaml_mod.safe_load(text) or {}
74
+ lines = text.split('\n')
75
+ return _parse_yaml_block(lines, 0, 0)[0]
76
+
77
+
78
+ def _parse_yaml_block(lines, start, base_indent):
79
+ """Recursively parse a YAML block."""
80
+ result = {}
81
+ i = start
82
+ while i < len(lines):
83
+ raw = lines[i]
84
+ stripped = raw.lstrip()
85
+ if not stripped or stripped.startswith('#'):
86
+ i += 1
87
+ continue
88
+ indent = len(raw) - len(raw.lstrip())
89
+ if indent < base_indent and i > start:
90
+ break
91
+ if indent > base_indent and i > start:
92
+ break
93
+
94
+ if stripped.startswith('- '):
95
+ lst, i = _parse_yaml_list(lines, i, indent)
96
+ if not result:
97
+ return lst, i
98
+ break
99
+
100
+ if ':' in stripped and not stripped.startswith('-'):
101
+ key, _, rest = stripped.partition(':')
102
+ key = key.strip()
103
+ rest = rest.strip()
104
+ if rest:
105
+ result[key] = _yaml_scalar(rest)
106
+ i += 1
107
+ else:
108
+ child_indent, child_idx = _next_content_line(lines, i + 1)
109
+ if child_indent is not None and child_indent > indent:
110
+ child_stripped = lines[child_idx].lstrip()
111
+ if child_stripped.startswith('- '):
112
+ value, i = _parse_yaml_list(lines, child_idx, child_indent)
113
+ else:
114
+ value, i = _parse_yaml_block(lines, child_idx, child_indent)
115
+ result[key] = value
116
+ else:
117
+ result[key] = None
118
+ i += 1
119
+ else:
120
+ i += 1
121
+ return result, i
122
+
123
+
124
+ def _parse_yaml_list(lines, start, base_indent):
125
+ """Parse a YAML list."""
126
+ result = []
127
+ i = start
128
+ while i < len(lines):
129
+ raw = lines[i]
130
+ stripped = raw.lstrip()
131
+ if not stripped or stripped.startswith('#'):
132
+ i += 1
133
+ continue
134
+ indent = len(raw) - len(raw.lstrip())
135
+ if indent < base_indent:
136
+ break
137
+ if indent > base_indent:
138
+ break
139
+ if not stripped.startswith('- '):
140
+ break
141
+
142
+ item_content = stripped[2:].strip()
143
+ if ':' in item_content and not item_content.startswith('"') and not item_content.startswith("'"):
144
+ k, _, v = item_content.partition(':')
145
+ k = k.strip()
146
+ v = v.strip()
147
+ item_dict = {k: _yaml_scalar(v) if v else None}
148
+ child_indent, child_idx = _next_content_line(lines, i + 1)
149
+ if child_indent is not None and child_indent > indent:
150
+ extra, i = _parse_yaml_block(lines, child_idx, child_indent)
151
+ if isinstance(extra, dict):
152
+ item_dict.update(extra)
153
+ else:
154
+ i += 1
155
+ result.append(item_dict)
156
+ else:
157
+ result.append(_yaml_scalar(item_content))
158
+ i += 1
159
+ return result, i
160
+
161
+
162
+ def _next_content_line(lines, start):
163
+ """Find next non-blank, non-comment line."""
164
+ i = start
165
+ while i < len(lines):
166
+ stripped = lines[i].lstrip()
167
+ if stripped and not stripped.startswith('#'):
168
+ indent = len(lines[i]) - len(lines[i].lstrip())
169
+ return indent, i
170
+ i += 1
171
+ return None, None
172
+
173
+
174
+ def _yaml_scalar(text):
175
+ """Convert a YAML scalar string to Python type."""
176
+ if not text:
177
+ return None
178
+ if (text.startswith('"') and text.endswith('"')) or \
179
+ (text.startswith("'") and text.endswith("'")):
180
+ return text[1:-1]
181
+ if ' #' in text:
182
+ text = text[:text.index(' #')].strip()
183
+ if text.lower() in ('true', 'yes'):
184
+ return True
185
+ if text.lower() in ('false', 'no'):
186
+ return False
187
+ if text.lower() in ('null', '~', ''):
188
+ return None
189
+ try:
190
+ return int(text)
191
+ except ValueError:
192
+ pass
193
+ try:
194
+ return float(text)
195
+ except ValueError:
196
+ pass
197
+ return text.strip('"').strip("'")
198
+
199
+
200
+ # ─────────────────────────────────────────────
201
+ # Entity index loading (mirrors validate-outbound.py)
202
+ # ─────────────────────────────────────────────
203
+ _entity_index_cache = None
204
+
205
+
206
+ def _load_entity_data():
207
+ """Load raw entity data from YAML, using JSON cache when fresh.
208
+
209
+ The JSON cache is regenerated when the YAML file is newer.
210
+ Returns parsed dict with 'entities' and 'relationships' keys.
211
+ """
212
+ if not ENTITY_INDEX_PATH.exists():
213
+ return {'entities': [], 'relationships': []}
214
+
215
+ # Check if JSON cache is fresh
216
+ if ENTITY_INDEX_CACHE_PATH.exists():
217
+ yaml_mtime = ENTITY_INDEX_PATH.stat().st_mtime
218
+ json_mtime = ENTITY_INDEX_CACHE_PATH.stat().st_mtime
219
+ if json_mtime >= yaml_mtime:
220
+ try:
221
+ return json.loads(ENTITY_INDEX_CACHE_PATH.read_text(encoding='utf-8'))
222
+ except Exception:
223
+ pass # Fall through to YAML parsing
224
+
225
+ # Parse YAML and write JSON cache
226
+ text = ENTITY_INDEX_PATH.read_text(encoding='utf-8')
227
+ data = _parse_yaml(text)
228
+ if not isinstance(data, dict):
229
+ return {'entities': [], 'relationships': []}
230
+
231
+ # Write cache (best-effort, non-blocking)
232
+ try:
233
+ ENTITY_INDEX_CACHE_PATH.write_text(
234
+ json.dumps(data, default=str, ensure_ascii=False),
235
+ encoding='utf-8'
236
+ )
237
+ except Exception:
238
+ pass
239
+
240
+ return data
241
+
242
+
243
+ def load_entity_index():
244
+ """Load and index entity-relationships.yaml.
245
+
246
+ Returns dict with:
247
+ - entities: list of entity dicts
248
+ - relationships: list of relationship dicts
249
+ - by_name: dict mapping lowercase name/alias -> entity dict
250
+ - by_email: dict mapping lowercase email -> entity dict
251
+ - rels_by_subject: dict mapping entity id -> list of rels
252
+ - rels_by_object: dict mapping entity id -> list of rels
253
+ """
254
+ global _entity_index_cache
255
+ if _entity_index_cache is not None:
256
+ return _entity_index_cache
257
+
258
+ empty = {
259
+ 'entities': [], 'relationships': [],
260
+ 'by_name': {}, 'by_email': {},
261
+ 'rels_by_subject': {}, 'rels_by_object': {},
262
+ }
263
+
264
+ if not ENTITY_INDEX_PATH.exists():
265
+ _entity_index_cache = empty
266
+ return _entity_index_cache
267
+
268
+ try:
269
+ data = _load_entity_data()
270
+ if not isinstance(data, dict):
271
+ _entity_index_cache = empty
272
+ return _entity_index_cache
273
+
274
+ entities = data.get('entities', []) or []
275
+ relationships = data.get('relationships', []) or []
276
+
277
+ by_name = {}
278
+ by_email = {}
279
+ for entity in entities:
280
+ if not isinstance(entity, dict):
281
+ continue
282
+ name = entity.get('name', '')
283
+ if name and isinstance(name, str):
284
+ by_name[name.lower()] = entity
285
+ parts = name.split()
286
+ if len(parts) >= 2:
287
+ short = f"{parts[0]} {parts[-1]}"
288
+ by_name[short.lower()] = entity
289
+ if len(parts) >= 1:
290
+ first = parts[0].lower()
291
+ if first not in by_name:
292
+ by_name[first] = entity
293
+
294
+ aliases = entity.get('aliases', []) or []
295
+ if isinstance(aliases, list):
296
+ for alias in aliases:
297
+ if alias and isinstance(alias, str):
298
+ by_name[alias.lower()] = entity
299
+
300
+ email = entity.get('email', '')
301
+ if email and isinstance(email, str):
302
+ by_email[email.lower()] = entity
303
+
304
+ rels_by_subject = {}
305
+ rels_by_object = {}
306
+ for rel in relationships:
307
+ if not isinstance(rel, dict):
308
+ continue
309
+ subj = rel.get('subject', '')
310
+ obj = rel.get('object', '')
311
+ if subj:
312
+ rels_by_subject.setdefault(subj, []).append(rel)
313
+ if obj:
314
+ rels_by_object.setdefault(obj, []).append(rel)
315
+
316
+ _entity_index_cache = {
317
+ 'entities': entities,
318
+ 'relationships': relationships,
319
+ 'by_name': by_name,
320
+ 'by_email': by_email,
321
+ 'rels_by_subject': rels_by_subject,
322
+ 'rels_by_object': rels_by_object,
323
+ }
324
+ except Exception:
325
+ _entity_index_cache = empty
326
+
327
+ return _entity_index_cache
328
+
329
+
330
+ def lookup_entity(name_or_email):
331
+ """Find an entity by name, alias, or email.
332
+
333
+ Returns the entity dict or None.
334
+ """
335
+ idx = load_entity_index()
336
+ key = name_or_email.lower().strip()
337
+ if not key:
338
+ return None
339
+
340
+ # Try email first
341
+ entity = idx['by_email'].get(key)
342
+ if entity:
343
+ return entity
344
+
345
+ # Try name/alias
346
+ entity = idx['by_name'].get(key)
347
+ if entity:
348
+ return entity
349
+
350
+ # Try first+last from multi-word input
351
+ parts = key.split()
352
+ if len(parts) >= 2:
353
+ short = f"{parts[0]} {parts[-1]}"
354
+ entity = idx['by_name'].get(short)
355
+ if entity:
356
+ return entity
357
+
358
+ # Single name
359
+ if len(parts) == 1:
360
+ entity = idx['by_name'].get(parts[0])
361
+ if entity:
362
+ return entity
363
+
364
+ return None
365
+
366
+
367
+ # ─────────────────────────────────────────────
368
+ # Relationship classification
369
+ # ─────────────────────────────────────────────
370
+ ADAPTIC_IDS = {
371
+ 'company:adaptic-group', 'company:adaptic-holdings',
372
+ 'company:adaptic-am-difc', 'company:adaptic-technologies',
373
+ 'company:adaptic-group-investments', 'company:adaptic-investments',
374
+ 'company:adaptic-inc', 'company:adaptic-ai-uk',
375
+ 'company:adaptic-am-uk', 'company:adaptic-am-cayman',
376
+ 'company:adaptic-am-asia', 'company:adaptic-asia',
377
+ 'company:adaptic-am-eu', 'company:adaptic-am-us',
378
+ 'company:adaptic-am-ksa', 'company:adaptic-ksa',
379
+ }
380
+
381
+
382
+ def classify_relationship(entity_id):
383
+ """Classify a person or company's relationship to Adaptic.
384
+
385
+ Returns dict: relationship_type, is_internal, relationships_to_adaptic.
386
+ """
387
+ idx = load_entity_index()
388
+ rels = idx['rels_by_subject'].get(entity_id, [])
389
+
390
+ adaptic_rels = []
391
+ is_internal = False
392
+ rel_type = 'unknown'
393
+
394
+ for rel in rels:
395
+ obj = rel.get('object', '')
396
+ pred = rel.get('predicate', '')
397
+ if obj in ADAPTIC_IDS or obj.startswith('company:adaptic'):
398
+ adaptic_rels.append(rel)
399
+ if pred in ('employed_by', 'directs'):
400
+ is_internal = True
401
+ rel_type = 'internal'
402
+ elif pred == 'vendor_candidate_for' and rel_type != 'internal':
403
+ rel_type = 'vendor_candidate'
404
+ elif pred == 'vendor_for' and rel_type not in ('internal', 'vendor_candidate'):
405
+ rel_type = 'external_vendor'
406
+ elif pred == 'advises' and rel_type not in ('internal', 'vendor_candidate', 'external_vendor'):
407
+ rel_type = 'external_advisor'
408
+ elif pred == 'invests_in' and rel_type not in ('internal',):
409
+ rel_type = 'investor'
410
+ elif pred == 'regulates' and rel_type not in ('internal',):
411
+ rel_type = 'regulator'
412
+
413
+ if rel_type == 'unknown':
414
+ for rel in rels:
415
+ if rel.get('predicate') == 'employed_by':
416
+ rel_type = 'external'
417
+ break
418
+
419
+ return {
420
+ 'relationship_type': rel_type,
421
+ 'is_internal': is_internal,
422
+ 'relationships_to_adaptic': adaptic_rels,
423
+ }
424
+
425
+
426
+ # ─────────────────────────────────────────────
427
+ # User profile loading
428
+ # ─────────────────────────────────────────────
429
+ def load_user_profile(entity):
430
+ """Load the full user profile YAML for an entity.
431
+
432
+ Returns parsed dict or None.
433
+ """
434
+ profile_path = entity.get('profile_path', '')
435
+ if profile_path:
436
+ full_path = REPO_ROOT / profile_path
437
+ if full_path.exists():
438
+ try:
439
+ text = full_path.read_text(encoding='utf-8')
440
+ return _parse_yaml(text)
441
+ except Exception:
442
+ pass
443
+
444
+ # Fallback: try to derive slug from entity name
445
+ name = entity.get('name', '')
446
+ if name:
447
+ slug = name.lower().replace(' ', '-')
448
+ # Remove middle names for slug
449
+ parts = name.lower().split()
450
+ if len(parts) >= 2:
451
+ slug = f"{parts[0]}-{parts[-1]}"
452
+ candidate = USER_PROFILES_DIR / f"{slug}.yaml"
453
+ if candidate.exists():
454
+ try:
455
+ text = candidate.read_text(encoding='utf-8')
456
+ return _parse_yaml(text)
457
+ except Exception:
458
+ pass
459
+
460
+ return None
461
+
462
+
463
+ # ─────────────────────────────────────────────
464
+ # Queue scanning — find active items mentioning a person
465
+ # ─────────────────────────────────────────────
466
+ def scan_queues_for_person(name, entity_id=None, slug=None):
467
+ """Scan all queue YAML files for items mentioning this person.
468
+
469
+ Uses fast text search to skip files that don't mention the person,
470
+ then parses only matching item blocks to extract structured data.
471
+
472
+ Returns list of dicts with: queue, item_id, title, status, priority.
473
+ """
474
+ if not QUEUES_DIR.exists():
475
+ return []
476
+
477
+ # Build search terms for initial text-based filtering
478
+ search_terms = set()
479
+ search_terms.add(name.lower())
480
+ if entity_id:
481
+ parts = entity_id.split(':')
482
+ if len(parts) == 2:
483
+ search_terms.add(parts[1].lower())
484
+ if slug:
485
+ search_terms.add(slug.lower())
486
+
487
+ results = []
488
+ for qfile in sorted(QUEUES_DIR.glob('*.yaml')):
489
+ try:
490
+ text = qfile.read_text(encoding='utf-8')
491
+ text_lower = text.lower()
492
+
493
+ # Fast check: skip entire file if no search term appears
494
+ if not any(term in text_lower for term in search_terms):
495
+ continue
496
+
497
+ # Extract queue_name from early lines (avoid full parse)
498
+ queue_name = qfile.stem
499
+ for line in text.split('\n')[:5]:
500
+ if line.startswith('queue_name:'):
501
+ queue_name = line.split(':', 1)[1].strip().strip('"').strip("'")
502
+ break
503
+
504
+ # Parse item blocks using text-based extraction
505
+ # Split on ' - id:' which marks each queue item
506
+ item_blocks = re.split(r'\n - id:', text)
507
+ if len(item_blocks) < 2:
508
+ # Try alternate format
509
+ item_blocks = re.split(r'\n -\s+id:', text)
510
+
511
+ for i, block in enumerate(item_blocks):
512
+ if i == 0:
513
+ continue # Skip preamble before first item
514
+
515
+ block_lower = block.lower()
516
+
517
+ # Check if this block mentions the person
518
+ if not any(term in block_lower for term in search_terms):
519
+ continue
520
+
521
+ # Extract fields with simple regex
522
+ item_id = ''
523
+ id_match = re.match(r'\s*(\S+)', block)
524
+ if id_match:
525
+ item_id = id_match.group(1).strip()
526
+
527
+ def _extract_field(field_name, text_block):
528
+ pattern = rf'^\s*{field_name}:\s*(.+?)$'
529
+ m = re.search(pattern, text_block, re.MULTILINE)
530
+ if m:
531
+ val = m.group(1).strip().strip('"').strip("'")
532
+ return val
533
+ return ''
534
+
535
+ status = _extract_field('status', block)
536
+ # Only include active items
537
+ if status.lower() in ('closed', 'resolved', 'cancelled'):
538
+ continue
539
+
540
+ title = _extract_field('title', block)
541
+ priority = _extract_field('priority', block)
542
+ due = _extract_field('due', block)
543
+
544
+ results.append({
545
+ 'queue': queue_name,
546
+ 'item_id': item_id,
547
+ 'title': title,
548
+ 'status': status,
549
+ 'priority': priority,
550
+ 'due': due if due else None,
551
+ })
552
+
553
+ except Exception:
554
+ continue
555
+
556
+ return results
557
+
558
+
559
+ # ─────────────────────────────────────────────
560
+ # Interaction history — recent communications
561
+ # ─────────────────────────────────────────────
562
+ def get_recent_interactions(entity, max_items=10):
563
+ """Load recent interaction history for the entity.
564
+
565
+ Checks memory/interactions/{email,slack,meetings}/ for the entity's slug.
566
+ Returns list of interaction summaries (most recent first).
567
+ """
568
+ name = entity.get('name', '')
569
+ parts = name.lower().split()
570
+ if len(parts) >= 2:
571
+ slug = f"{parts[0]}-{parts[-1]}"
572
+ elif parts:
573
+ slug = parts[0]
574
+ else:
575
+ return []
576
+
577
+ interactions = []
578
+
579
+ def _parse_interaction(entry, channel):
580
+ """Normalize an interaction entry from any JSONL schema variant."""
581
+ # Handle both timestamp formats: 'timestamp' and 'date'
582
+ ts = entry.get('timestamp', '') or entry.get('date', '') or ''
583
+ # Handle both direction formats: 'direction' and 'type'
584
+ direction = entry.get('direction', '') or entry.get('type', '') or ''
585
+ # Handle summary: 'summary', 'content', or fall back to 'action_taken'
586
+ summary = entry.get('summary', '') or entry.get('content', '') or entry.get('action_taken', '') or ''
587
+ return {
588
+ 'channel': channel,
589
+ 'timestamp': ts,
590
+ 'direction': direction,
591
+ 'subject': entry.get('subject', ''),
592
+ 'summary': summary,
593
+ }
594
+
595
+ # Check email interactions
596
+ email_dir = INTERACTIONS_DIR / "email" / slug
597
+ if email_dir.exists():
598
+ for f in sorted(email_dir.glob('*.jsonl'), reverse=True):
599
+ try:
600
+ for line in f.read_text(encoding='utf-8').strip().split('\n'):
601
+ line = line.strip()
602
+ if not line:
603
+ continue
604
+ try:
605
+ entry = json.loads(line)
606
+ interactions.append(_parse_interaction(entry, 'email'))
607
+ except json.JSONDecodeError:
608
+ continue
609
+ except Exception:
610
+ continue
611
+
612
+ # Check Slack DM interactions
613
+ slack_dm_dir = INTERACTIONS_DIR / "slack" / "dm" / slug if INTERACTIONS_DIR.exists() else None
614
+ if slack_dm_dir and slack_dm_dir.exists():
615
+ for f in sorted(slack_dm_dir.glob('*.jsonl'), reverse=True):
616
+ try:
617
+ for line in f.read_text(encoding='utf-8').strip().split('\n'):
618
+ line = line.strip()
619
+ if not line:
620
+ continue
621
+ try:
622
+ entry = json.loads(line)
623
+ interactions.append(_parse_interaction(entry, 'slack_dm'))
624
+ except json.JSONDecodeError:
625
+ continue
626
+ except Exception:
627
+ continue
628
+
629
+ # Check meeting interactions
630
+ meetings_dir = INTERACTIONS_DIR / "meetings" / slug if INTERACTIONS_DIR.exists() else None
631
+ if meetings_dir and meetings_dir.exists():
632
+ for f in sorted(meetings_dir.glob('*.jsonl'), reverse=True):
633
+ try:
634
+ for line in f.read_text(encoding='utf-8').strip().split('\n'):
635
+ line = line.strip()
636
+ if not line:
637
+ continue
638
+ try:
639
+ entry = json.loads(line)
640
+ interactions.append(_parse_interaction(entry, 'meeting'))
641
+ except json.JSONDecodeError:
642
+ continue
643
+ except Exception:
644
+ continue
645
+
646
+ # Sort by timestamp descending
647
+ interactions.sort(key=lambda x: x.get('timestamp', ''), reverse=True)
648
+ return interactions[:max_items]
649
+
650
+
651
+ # ─────────────────────────────────────────────
652
+ # Related entities
653
+ # ─────────────────────────────────────────────
654
+ def get_related_entities(entity_id):
655
+ """Find all entities related to this one via the relationship graph.
656
+
657
+ Returns list of dicts: related_entity_id, related_entity_name,
658
+ predicate, direction ('outgoing'/'incoming'), notes.
659
+ """
660
+ idx = load_entity_index()
661
+ related = []
662
+
663
+ # Entities we look up by id
664
+ entity_by_id = {}
665
+ for e in idx['entities']:
666
+ if isinstance(e, dict) and e.get('id'):
667
+ entity_by_id[e['id']] = e
668
+
669
+ # Outgoing relationships (this entity is subject)
670
+ for rel in idx['rels_by_subject'].get(entity_id, []):
671
+ obj_id = rel.get('object', '')
672
+ obj_entity = entity_by_id.get(obj_id, {})
673
+ related.append({
674
+ 'entity_id': obj_id,
675
+ 'entity_name': obj_entity.get('name', obj_id),
676
+ 'predicate': rel.get('predicate', ''),
677
+ 'direction': 'outgoing',
678
+ 'scope': rel.get('scope', ''),
679
+ 'status': rel.get('status', ''),
680
+ 'notes': rel.get('notes', ''),
681
+ })
682
+
683
+ # Incoming relationships (this entity is object)
684
+ for rel in idx['rels_by_object'].get(entity_id, []):
685
+ subj_id = rel.get('subject', '')
686
+ subj_entity = entity_by_id.get(subj_id, {})
687
+ related.append({
688
+ 'entity_id': subj_id,
689
+ 'entity_name': subj_entity.get('name', subj_id),
690
+ 'predicate': rel.get('predicate', ''),
691
+ 'direction': 'incoming',
692
+ 'scope': rel.get('scope', ''),
693
+ 'status': rel.get('status', ''),
694
+ 'notes': rel.get('notes', ''),
695
+ })
696
+
697
+ return related
698
+
699
+
700
+ # ─────────────────────────────────────────────
701
+ # Topic filtering
702
+ # ─────────────────────────────────────────────
703
+ def filter_by_topic(context, topic):
704
+ """Boost relevance of context items matching the given topic.
705
+
706
+ Adds a 'topic_relevant' flag to queue items and interactions
707
+ that mention the topic.
708
+ """
709
+ if not topic:
710
+ return context
711
+
712
+ topic_lower = topic.lower()
713
+ topic_words = topic_lower.split()
714
+
715
+ # Tag queue items
716
+ for item in context.get('active_queue_items', []):
717
+ searchable = f"{item.get('title', '')} {item.get('queue', '')}".lower()
718
+ item['topic_relevant'] = any(w in searchable for w in topic_words)
719
+
720
+ # Tag interactions
721
+ for item in context.get('recent_interactions', []):
722
+ searchable = f"{item.get('subject', '')} {item.get('summary', '')}".lower()
723
+ item['topic_relevant'] = any(w in searchable for w in topic_words)
724
+
725
+ # Tag related entities
726
+ for item in context.get('related_entities', []):
727
+ searchable = f"{item.get('entity_name', '')} {item.get('scope', '')} {item.get('notes', '')}".lower()
728
+ item['topic_relevant'] = any(w in searchable for w in topic_words)
729
+
730
+ return context
731
+
732
+
733
+ # ─────────────────────────────────────────────
734
+ # Main retrieval function
735
+ # ─────────────────────────────────────────────
736
+ def retrieve_context(recipient, topic=None):
737
+ """Retrieve full pre-draft context for a recipient.
738
+
739
+ Args:
740
+ recipient: Name or email of the person to look up.
741
+ topic: Optional topic to filter/boost relevant items.
742
+
743
+ Returns:
744
+ dict with full context, or None if recipient not found.
745
+ """
746
+ t0 = time.time()
747
+
748
+ # 1. Find entity in index
749
+ entity = lookup_entity(recipient)
750
+ if entity is None:
751
+ return None
752
+
753
+ entity_id = entity.get('id', '')
754
+ entity_name = entity.get('name', '')
755
+
756
+ # 2. Classify relationship
757
+ rel_info = classify_relationship(entity_id)
758
+
759
+ # 3. Load user profile
760
+ profile = load_user_profile(entity)
761
+
762
+ # 4. Extract key profile fields
763
+ standing_instructions = []
764
+ communication_prefs = {}
765
+ last_interaction = None
766
+ interaction_summary_notes = ''
767
+
768
+ if profile:
769
+ si = profile.get('standing_instructions', [])
770
+ if isinstance(si, list):
771
+ standing_instructions = si
772
+ elif isinstance(si, str) and si.strip() in ('[]', ''):
773
+ standing_instructions = []
774
+ else:
775
+ standing_instructions = [si] if si else []
776
+ communication_prefs = profile.get('communication_preferences', {}) or {}
777
+ isummary = profile.get('interaction_summary', {}) or {}
778
+ last_interaction = isummary.get('last_interaction')
779
+ interaction_summary_notes = str(isummary.get('notes', '') or '').strip()
780
+
781
+ # 5. Scan queues for active items about this person
782
+ slug = None
783
+ if entity_id and ':' in entity_id:
784
+ slug = entity_id.split(':')[1]
785
+ queue_items = scan_queues_for_person(entity_name, entity_id, slug)
786
+
787
+ # 6. Get recent interaction history
788
+ interactions = get_recent_interactions(entity)
789
+
790
+ # 7. Get related entities
791
+ related = get_related_entities(entity_id)
792
+
793
+ # 8. Build context object
794
+ context = {
795
+ 'recipient': {
796
+ 'name': entity_name,
797
+ 'entity_id': entity_id,
798
+ 'type': entity.get('type', ''),
799
+ 'role': entity.get('primary_role', ''),
800
+ 'company': entity.get('primary_company', ''),
801
+ 'email': entity.get('email', ''),
802
+ 'timezone': entity.get('timezone', ''),
803
+ 'notes': entity.get('notes', ''),
804
+ },
805
+ 'relationship': {
806
+ 'type': rel_info['relationship_type'],
807
+ 'is_internal': rel_info['is_internal'],
808
+ 'adaptic_relationships': [
809
+ {
810
+ 'predicate': r.get('predicate', ''),
811
+ 'object': r.get('object', ''),
812
+ 'status': r.get('status', ''),
813
+ 'scope': r.get('scope', ''),
814
+ 'notes': r.get('notes', ''),
815
+ }
816
+ for r in rel_info['relationships_to_adaptic']
817
+ ],
818
+ },
819
+ 'communication': {
820
+ 'preferences': communication_prefs,
821
+ 'standing_instructions': standing_instructions,
822
+ 'last_interaction': str(last_interaction) if last_interaction else None,
823
+ 'interaction_notes': interaction_summary_notes,
824
+ },
825
+ 'related_entities': related,
826
+ 'active_queue_items': queue_items,
827
+ 'recent_interactions': interactions,
828
+ 'topic': topic,
829
+ 'retrieval_time_ms': round((time.time() - t0) * 1000, 1),
830
+ }
831
+
832
+ # 9. Apply topic filtering if provided
833
+ if topic:
834
+ context = filter_by_topic(context, topic)
835
+
836
+ return context
837
+
838
+
839
+ # ─────────────────────────────────────────────
840
+ # Brief format — concise summary for prompt injection
841
+ # ─────────────────────────────────────────────
842
+ def format_brief(context):
843
+ """Format context as a 3-5 line summary for prompt injection.
844
+
845
+ Returns a string.
846
+ """
847
+ if context is None:
848
+ return "RECIPIENT NOT FOUND — no entity data available. Verify recipient identity before drafting."
849
+
850
+ r = context['recipient']
851
+ rel = context['relationship']
852
+ comm = context['communication']
853
+
854
+ lines = []
855
+
856
+ # Line 1: Identity + relationship
857
+ rel_label = rel['type'].replace('_', ' ')
858
+ company_name = r.get('company', '')
859
+ if company_name and ':' in company_name:
860
+ # Resolve company entity id to name
861
+ idx = load_entity_index()
862
+ for e in idx['entities']:
863
+ if isinstance(e, dict) and e.get('id') == company_name:
864
+ company_name = e.get('name', company_name)
865
+ break
866
+ role_str = f"{r['role']}, {company_name}" if r['role'] and company_name else r['role'] or ''
867
+ lines.append(f"RECIPIENT: {r['name']} — {role_str} [{rel_label}]")
868
+
869
+ # Line 2: Communication preferences + standing instructions
870
+ prefs = comm.get('preferences', {})
871
+ tone = prefs.get('tone', prefs.get('voice', ''))
872
+ channel = prefs.get('preferred_channel', prefs.get('channel_preference', ''))
873
+ pref_parts = []
874
+ if tone:
875
+ pref_parts.append(f"tone: {tone}")
876
+ if channel:
877
+ pref_parts.append(f"prefers: {channel}")
878
+ instructions = comm.get('standing_instructions', [])
879
+ if instructions and isinstance(instructions, list) and len(instructions) > 0:
880
+ pref_parts.append(f"instructions: {'; '.join(str(i) for i in instructions[:2])}")
881
+ if pref_parts:
882
+ lines.append(f"COMMS: {', '.join(pref_parts)}")
883
+
884
+ # Line 3: Active items
885
+ active = context.get('active_queue_items', [])
886
+ topic = context.get('topic', '')
887
+ if topic:
888
+ topic_items = [i for i in active if i.get('topic_relevant')]
889
+ if topic_items:
890
+ lines.append(f"ACTIVE ({topic}): {len(topic_items)} item(s) — " +
891
+ '; '.join(i['title'][:60] for i in topic_items[:3]))
892
+ elif active:
893
+ lines.append(f"ACTIVE: {len(active)} item(s) — " +
894
+ '; '.join(i['title'][:60] for i in active[:3]))
895
+ elif active:
896
+ lines.append(f"ACTIVE: {len(active)} item(s) — " +
897
+ '; '.join(i['title'][:60] for i in active[:3]))
898
+
899
+ # Line 4: Last interaction
900
+ last = comm.get('last_interaction')
901
+ interactions = context.get('recent_interactions', [])
902
+ # Find the most recent interaction with a non-empty timestamp
903
+ latest_with_ts = None
904
+ for ix in interactions:
905
+ if ix.get('timestamp'):
906
+ latest_with_ts = ix
907
+ break
908
+ if latest_with_ts:
909
+ channel = latest_with_ts.get('channel', '')
910
+ summary = latest_with_ts.get('summary', '') or latest_with_ts.get('subject', '')
911
+ if summary and len(summary) > 80:
912
+ summary = summary[:77] + '...'
913
+ lines.append(f"LAST CONTACT: {latest_with_ts['timestamp']} via {channel} — {summary}")
914
+ elif interactions:
915
+ # Have interactions but none with timestamps — use first one's subject
916
+ latest = interactions[0]
917
+ channel = latest.get('channel', '')
918
+ summary = latest.get('summary', '') or latest.get('subject', '')
919
+ if summary and len(summary) > 80:
920
+ summary = summary[:77] + '...'
921
+ if summary:
922
+ lines.append(f"LAST CONTACT: via {channel} — {summary}")
923
+ elif last:
924
+ lines.append(f"LAST CONTACT: {last}")
925
+
926
+ # Line 5: Key notes/warnings
927
+ notes = r.get('notes', '') or ''
928
+ interaction_notes = comm.get('interaction_notes', '') or ''
929
+ # Prefer interaction notes for internal people (richer context)
930
+ note_text = interaction_notes if (rel['is_internal'] and interaction_notes) else notes
931
+ if not note_text:
932
+ note_text = interaction_notes or notes
933
+ if note_text:
934
+ # Take first sentence if long
935
+ if len(note_text) > 100:
936
+ first_sentence = note_text.split('.')[0].strip()
937
+ if first_sentence and len(first_sentence) < 100:
938
+ note_text = first_sentence + '.'
939
+ else:
940
+ note_text = note_text[:97] + '...'
941
+ lines.append(f"NOTE: {note_text}")
942
+
943
+ return '\n'.join(lines)
944
+
945
+
946
+ # ─────────────────────────────────────────────
947
+ # CLI entry point
948
+ # ─────────────────────────────────────────────
949
+ def main():
950
+ parser = argparse.ArgumentParser(
951
+ description='Pre-draft fact retrieval — retrieve entity context before composing messages.'
952
+ )
953
+ parser.add_argument('--recipient', required=True,
954
+ help='Recipient name or email address')
955
+ parser.add_argument('--topic', default=None,
956
+ help='Optional topic to filter/boost relevant context')
957
+ parser.add_argument('--format', dest='output_format', default='json',
958
+ choices=['json', 'brief'],
959
+ help='Output format: json (full) or brief (3-5 line summary)')
960
+
961
+ args = parser.parse_args()
962
+
963
+ try:
964
+ context = retrieve_context(args.recipient, args.topic)
965
+
966
+ if context is None:
967
+ if args.output_format == 'brief':
968
+ print(format_brief(None))
969
+ else:
970
+ print(json.dumps({
971
+ 'status': 'not_found',
972
+ 'recipient_query': args.recipient,
973
+ 'message': f'No entity found matching "{args.recipient}"',
974
+ }, indent=2))
975
+ sys.exit(1)
976
+
977
+ if args.output_format == 'brief':
978
+ print(format_brief(context))
979
+ else:
980
+ # Sanitize for JSON serialization
981
+ print(json.dumps(context, indent=2, default=str))
982
+
983
+ sys.exit(0)
984
+
985
+ except Exception as e:
986
+ print(json.dumps({
987
+ 'status': 'error',
988
+ 'message': str(e),
989
+ }), file=sys.stderr)
990
+ sys.exit(2)
991
+
992
+
993
+ if __name__ == '__main__':
994
+ main()