synapse-orch-ai 1.1.2__tar.gz

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 (226) hide show
  1. synapse_orch_ai-1.1.2/.codacy.yaml +79 -0
  2. synapse_orch_ai-1.1.2/.dockerignore +20 -0
  3. synapse_orch_ai-1.1.2/.env.example +37 -0
  4. synapse_orch_ai-1.1.2/.github/FUNDING.yml +15 -0
  5. synapse_orch_ai-1.1.2/.github/workflows/codacy.yml +106 -0
  6. synapse_orch_ai-1.1.2/.github/workflows/codeql.yml +104 -0
  7. synapse_orch_ai-1.1.2/.github/workflows/publish.yml +76 -0
  8. synapse_orch_ai-1.1.2/.gitignore +43 -0
  9. synapse_orch_ai-1.1.2/CODE_OF_CONDUCT.md +128 -0
  10. synapse_orch_ai-1.1.2/CONTRIBUTING.md +182 -0
  11. synapse_orch_ai-1.1.2/Dockerfile.backend +23 -0
  12. synapse_orch_ai-1.1.2/Dockerfile.frontend +17 -0
  13. synapse_orch_ai-1.1.2/LICENSE +661 -0
  14. synapse_orch_ai-1.1.2/PKG-INFO +549 -0
  15. synapse_orch_ai-1.1.2/README.md +501 -0
  16. synapse_orch_ai-1.1.2/backend/core/__init__.py +0 -0
  17. synapse_orch_ai-1.1.2/backend/core/agent_logger.py +195 -0
  18. synapse_orch_ai-1.1.2/backend/core/builder_tools.py +1482 -0
  19. synapse_orch_ai-1.1.2/backend/core/compaction.py +188 -0
  20. synapse_orch_ai-1.1.2/backend/core/config.py +89 -0
  21. synapse_orch_ai-1.1.2/backend/core/json_store.py +50 -0
  22. synapse_orch_ai-1.1.2/backend/core/llm_providers.py +2088 -0
  23. synapse_orch_ai-1.1.2/backend/core/mcp_client.py +548 -0
  24. synapse_orch_ai-1.1.2/backend/core/mcp_oauth_state.py +37 -0
  25. synapse_orch_ai-1.1.2/backend/core/memory.py +714 -0
  26. synapse_orch_ai-1.1.2/backend/core/messaging/__init__.py +5 -0
  27. synapse_orch_ai-1.1.2/backend/core/messaging/adapters/__init__.py +1 -0
  28. synapse_orch_ai-1.1.2/backend/core/messaging/adapters/discord.py +112 -0
  29. synapse_orch_ai-1.1.2/backend/core/messaging/adapters/slack.py +123 -0
  30. synapse_orch_ai-1.1.2/backend/core/messaging/adapters/teams.py +102 -0
  31. synapse_orch_ai-1.1.2/backend/core/messaging/adapters/telegram.py +118 -0
  32. synapse_orch_ai-1.1.2/backend/core/messaging/adapters/whatsapp.py +216 -0
  33. synapse_orch_ai-1.1.2/backend/core/messaging/base.py +209 -0
  34. synapse_orch_ai-1.1.2/backend/core/messaging/manager.py +291 -0
  35. synapse_orch_ai-1.1.2/backend/core/messaging/markdown.py +171 -0
  36. synapse_orch_ai-1.1.2/backend/core/messaging/store.py +95 -0
  37. synapse_orch_ai-1.1.2/backend/core/models.py +154 -0
  38. synapse_orch_ai-1.1.2/backend/core/models_orchestration.py +123 -0
  39. synapse_orch_ai-1.1.2/backend/core/models_schedule.py +56 -0
  40. synapse_orch_ai-1.1.2/backend/core/native_builder/__init__.py +60 -0
  41. synapse_orch_ai-1.1.2/backend/core/native_builder/agents/agent_creator.json +20 -0
  42. synapse_orch_ai-1.1.2/backend/core/native_builder/agents/orchestrator_builder.json +15 -0
  43. synapse_orch_ai-1.1.2/backend/core/native_builder/agents/requirements_analyst.json +21 -0
  44. synapse_orch_ai-1.1.2/backend/core/native_builder/agents/saver_create.json +28 -0
  45. synapse_orch_ai-1.1.2/backend/core/native_builder/agents/saver_update.json +29 -0
  46. synapse_orch_ai-1.1.2/backend/core/native_builder/orchestration.json +515 -0
  47. synapse_orch_ai-1.1.2/backend/core/native_builder/seed.py +135 -0
  48. synapse_orch_ai-1.1.2/backend/core/orchestration/__init__.py +5 -0
  49. synapse_orch_ai-1.1.2/backend/core/orchestration/context.py +630 -0
  50. synapse_orch_ai-1.1.2/backend/core/orchestration/engine.py +489 -0
  51. synapse_orch_ai-1.1.2/backend/core/orchestration/logger.py +278 -0
  52. synapse_orch_ai-1.1.2/backend/core/orchestration/state.py +79 -0
  53. synapse_orch_ai-1.1.2/backend/core/orchestration/steps.py +1017 -0
  54. synapse_orch_ai-1.1.2/backend/core/orchestration/summarizer.py +106 -0
  55. synapse_orch_ai-1.1.2/backend/core/personal_details.py +60 -0
  56. synapse_orch_ai-1.1.2/backend/core/profiling.py +160 -0
  57. synapse_orch_ai-1.1.2/backend/core/react_engine.py +1017 -0
  58. synapse_orch_ai-1.1.2/backend/core/routes/__init__.py +4 -0
  59. synapse_orch_ai-1.1.2/backend/core/routes/agents.py +303 -0
  60. synapse_orch_ai-1.1.2/backend/core/routes/auth.py +38 -0
  61. synapse_orch_ai-1.1.2/backend/core/routes/builder.py +491 -0
  62. synapse_orch_ai-1.1.2/backend/core/routes/chat.py +151 -0
  63. synapse_orch_ai-1.1.2/backend/core/routes/data.py +800 -0
  64. synapse_orch_ai-1.1.2/backend/core/routes/db_configs.py +105 -0
  65. synapse_orch_ai-1.1.2/backend/core/routes/import_export.py +370 -0
  66. synapse_orch_ai-1.1.2/backend/core/routes/logs.py +93 -0
  67. synapse_orch_ai-1.1.2/backend/core/routes/messaging.py +204 -0
  68. synapse_orch_ai-1.1.2/backend/core/routes/n8n.py +95 -0
  69. synapse_orch_ai-1.1.2/backend/core/routes/orchestrations.py +364 -0
  70. synapse_orch_ai-1.1.2/backend/core/routes/profiling.py +83 -0
  71. synapse_orch_ai-1.1.2/backend/core/routes/repos.py +212 -0
  72. synapse_orch_ai-1.1.2/backend/core/routes/schedules.py +158 -0
  73. synapse_orch_ai-1.1.2/backend/core/routes/sessions.py +48 -0
  74. synapse_orch_ai-1.1.2/backend/core/routes/settings.py +362 -0
  75. synapse_orch_ai-1.1.2/backend/core/routes/tools.py +416 -0
  76. synapse_orch_ai-1.1.2/backend/core/routes/usage.py +63 -0
  77. synapse_orch_ai-1.1.2/backend/core/routes/vault.py +254 -0
  78. synapse_orch_ai-1.1.2/backend/core/schedule_logger.py +226 -0
  79. synapse_orch_ai-1.1.2/backend/core/scheduler.py +376 -0
  80. synapse_orch_ai-1.1.2/backend/core/server.py +658 -0
  81. synapse_orch_ai-1.1.2/backend/core/session.py +206 -0
  82. synapse_orch_ai-1.1.2/backend/core/tools.py +344 -0
  83. synapse_orch_ai-1.1.2/backend/core/usage_tracker.py +417 -0
  84. synapse_orch_ai-1.1.2/backend/core/vault.py +265 -0
  85. synapse_orch_ai-1.1.2/backend/examples/developer_pack.bundle.json +1644 -0
  86. synapse_orch_ai-1.1.2/backend/examples/index.json +73 -0
  87. synapse_orch_ai-1.1.2/backend/examples/mcp_pack.bundle.json +39 -0
  88. synapse_orch_ai-1.1.2/backend/examples/productivity_pack.bundle.json +398 -0
  89. synapse_orch_ai-1.1.2/backend/examples/simple_orch.bundle.json +478 -0
  90. synapse_orch_ai-1.1.2/backend/examples/starter_pack.bundle.json +656 -0
  91. synapse_orch_ai-1.1.2/backend/main.py +26 -0
  92. synapse_orch_ai-1.1.2/backend/package-lock.json +71 -0
  93. synapse_orch_ai-1.1.2/backend/package.json +5 -0
  94. synapse_orch_ai-1.1.2/backend/requirements-coding.txt +3 -0
  95. synapse_orch_ai-1.1.2/backend/requirements-messaging.txt +6 -0
  96. synapse_orch_ai-1.1.2/backend/requirements.txt +24 -0
  97. synapse_orch_ai-1.1.2/backend/services/__init__.py +0 -0
  98. synapse_orch_ai-1.1.2/backend/services/code_indexer.py +488 -0
  99. synapse_orch_ai-1.1.2/backend/services/google.py +343 -0
  100. synapse_orch_ai-1.1.2/backend/services/synthetic_data.py +140 -0
  101. synapse_orch_ai-1.1.2/backend/tools/__init__.py +0 -0
  102. synapse_orch_ai-1.1.2/backend/tools/bash.py +244 -0
  103. synapse_orch_ai-1.1.2/backend/tools/code_indexer.py +110 -0
  104. synapse_orch_ai-1.1.2/backend/tools/code_search.py +537 -0
  105. synapse_orch_ai-1.1.2/backend/tools/collect_data.py +134 -0
  106. synapse_orch_ai-1.1.2/backend/tools/pdf_parser.py +103 -0
  107. synapse_orch_ai-1.1.2/backend/tools/personal_details.py +52 -0
  108. synapse_orch_ai-1.1.2/backend/tools/sandbox.Dockerfile +24 -0
  109. synapse_orch_ai-1.1.2/backend/tools/sandbox.py +586 -0
  110. synapse_orch_ai-1.1.2/backend/tools/sql_agent.py +221 -0
  111. synapse_orch_ai-1.1.2/backend/tools/time.py +283 -0
  112. synapse_orch_ai-1.1.2/backend/tools/web_scraper.py +765 -0
  113. synapse_orch_ai-1.1.2/backend/tools/xlsx_parser.py +79 -0
  114. synapse_orch_ai-1.1.2/bin/synapse +16 -0
  115. synapse_orch_ai-1.1.2/bin/synapse.bat +36 -0
  116. synapse_orch_ai-1.1.2/bin/synapse.js +247 -0
  117. synapse_orch_ai-1.1.2/docker-compose.yml +52 -0
  118. synapse_orch_ai-1.1.2/docs/cli.md +219 -0
  119. synapse_orch_ai-1.1.2/frontend/.gitignore +41 -0
  120. synapse_orch_ai-1.1.2/frontend/README.md +36 -0
  121. synapse_orch_ai-1.1.2/frontend/eslint.config.mjs +18 -0
  122. synapse_orch_ai-1.1.2/frontend/next.config.ts +87 -0
  123. synapse_orch_ai-1.1.2/frontend/package-lock.json +8711 -0
  124. synapse_orch_ai-1.1.2/frontend/package.json +43 -0
  125. synapse_orch_ai-1.1.2/frontend/postcss.config.mjs +7 -0
  126. synapse_orch_ai-1.1.2/frontend/public/aws-bedrock-icon.svg +1 -0
  127. synapse_orch_ai-1.1.2/frontend/public/chatgpt-icon.svg +1 -0
  128. synapse_orch_ai-1.1.2/frontend/public/claude-ai-icon.svg +1 -0
  129. synapse_orch_ai-1.1.2/frontend/public/deepseek-logo-icon.svg +1 -0
  130. synapse_orch_ai-1.1.2/frontend/public/discord-round-color-icon.svg +1 -0
  131. synapse_orch_ai-1.1.2/frontend/public/file.svg +1 -0
  132. synapse_orch_ai-1.1.2/frontend/public/globe.svg +1 -0
  133. synapse_orch_ai-1.1.2/frontend/public/google-gemini-icon.svg +1 -0
  134. synapse_orch_ai-1.1.2/frontend/public/grok-icon.svg +1 -0
  135. synapse_orch_ai-1.1.2/frontend/public/next.svg +1 -0
  136. synapse_orch_ai-1.1.2/frontend/public/ollama-icon.svg +1 -0
  137. synapse_orch_ai-1.1.2/frontend/public/slack-icon.svg +6 -0
  138. synapse_orch_ai-1.1.2/frontend/public/teams.svg +2 -0
  139. synapse_orch_ai-1.1.2/frontend/public/telegram-icon.svg +1 -0
  140. synapse_orch_ai-1.1.2/frontend/public/vercel.svg +1 -0
  141. synapse_orch_ai-1.1.2/frontend/public/whatsapp-color-icon.svg +1 -0
  142. synapse_orch_ai-1.1.2/frontend/public/window.svg +1 -0
  143. synapse_orch_ai-1.1.2/frontend/scripts/load-env.js +60 -0
  144. synapse_orch_ai-1.1.2/frontend/src/app/StoreProvider.tsx +7 -0
  145. synapse_orch_ai-1.1.2/frontend/src/app/api/agent-types/route.ts +20 -0
  146. synapse_orch_ai-1.1.2/frontend/src/app/api/agents/generate-prompt/route.ts +33 -0
  147. synapse_orch_ai-1.1.2/frontend/src/app/api/builder/chat/route.ts +37 -0
  148. synapse_orch_ai-1.1.2/frontend/src/app/api/builder/resume/route.ts +37 -0
  149. synapse_orch_ai-1.1.2/frontend/src/app/api/chat/route.ts +36 -0
  150. synapse_orch_ai-1.1.2/frontend/src/app/api/chat/stream/route.ts +45 -0
  151. synapse_orch_ai-1.1.2/frontend/src/app/api/logs/[type]/[run_id]/route.ts +40 -0
  152. synapse_orch_ai-1.1.2/frontend/src/app/api/logs/[type]/route.ts +19 -0
  153. synapse_orch_ai-1.1.2/frontend/src/app/api/models/route.ts +20 -0
  154. synapse_orch_ai-1.1.2/frontend/src/app/api/orchestrations/[orch_id]/run/route.ts +73 -0
  155. synapse_orch_ai-1.1.2/frontend/src/app/api/orchestrations/runs/[run_id]/human-input/route.ts +51 -0
  156. synapse_orch_ai-1.1.2/frontend/src/app/api/orchestrations/runs/[run_id]/resume/route.ts +59 -0
  157. synapse_orch_ai-1.1.2/frontend/src/app/api/schedules/[schedule_id]/route.ts +80 -0
  158. synapse_orch_ai-1.1.2/frontend/src/app/api/schedules/[schedule_id]/run/route.ts +23 -0
  159. synapse_orch_ai-1.1.2/frontend/src/app/api/schedules/route.ts +33 -0
  160. synapse_orch_ai-1.1.2/frontend/src/app/globals.css +211 -0
  161. synapse_orch_ai-1.1.2/frontend/src/app/icon.svg +4 -0
  162. synapse_orch_ai-1.1.2/frontend/src/app/layout.tsx +54 -0
  163. synapse_orch_ai-1.1.2/frontend/src/app/page.tsx +1679 -0
  164. synapse_orch_ai-1.1.2/frontend/src/app/settings/[tab]/page.tsx +14 -0
  165. synapse_orch_ai-1.1.2/frontend/src/app/settings/layout.tsx +123 -0
  166. synapse_orch_ai-1.1.2/frontend/src/app/settings/loading.tsx +30 -0
  167. synapse_orch_ai-1.1.2/frontend/src/components/CollectDataForm.tsx +163 -0
  168. synapse_orch_ai-1.1.2/frontend/src/components/SettingsView.tsx +1085 -0
  169. synapse_orch_ai-1.1.2/frontend/src/components/VaultMention.tsx +272 -0
  170. synapse_orch_ai-1.1.2/frontend/src/components/orchestration/BuilderPanel.tsx +676 -0
  171. synapse_orch_ai-1.1.2/frontend/src/components/orchestration/StateSchemaEditor.tsx +82 -0
  172. synapse_orch_ai-1.1.2/frontend/src/components/orchestration/StepConfigPanel.tsx +715 -0
  173. synapse_orch_ai-1.1.2/frontend/src/components/orchestration/StepNode.tsx +192 -0
  174. synapse_orch_ai-1.1.2/frontend/src/components/orchestration/WorkflowCanvas.tsx +320 -0
  175. synapse_orch_ai-1.1.2/frontend/src/components/settings/AgentsTab.tsx +736 -0
  176. synapse_orch_ai-1.1.2/frontend/src/components/settings/ConfirmationModal.tsx +45 -0
  177. synapse_orch_ai-1.1.2/frontend/src/components/settings/CustomToolsTab.tsx +494 -0
  178. synapse_orch_ai-1.1.2/frontend/src/components/settings/DBsTab.tsx +311 -0
  179. synapse_orch_ai-1.1.2/frontend/src/components/settings/DataLabTab.tsx +99 -0
  180. synapse_orch_ai-1.1.2/frontend/src/components/settings/DatabaseTab.tsx +53 -0
  181. synapse_orch_ai-1.1.2/frontend/src/components/settings/GeneralTab.tsx +510 -0
  182. synapse_orch_ai-1.1.2/frontend/src/components/settings/ImportExportTab.tsx +68 -0
  183. synapse_orch_ai-1.1.2/frontend/src/components/settings/IntegrationsTab.tsx +367 -0
  184. synapse_orch_ai-1.1.2/frontend/src/components/settings/LogsTab.tsx +312 -0
  185. synapse_orch_ai-1.1.2/frontend/src/components/settings/McpServersTab.tsx +466 -0
  186. synapse_orch_ai-1.1.2/frontend/src/components/settings/MemoryTab.tsx +192 -0
  187. synapse_orch_ai-1.1.2/frontend/src/components/settings/MessagingTab.tsx +627 -0
  188. synapse_orch_ai-1.1.2/frontend/src/components/settings/ModelsTab.tsx +611 -0
  189. synapse_orch_ai-1.1.2/frontend/src/components/settings/N8nFullscreenOverlay.tsx +45 -0
  190. synapse_orch_ai-1.1.2/frontend/src/components/settings/OrchestrationTab.tsx +1370 -0
  191. synapse_orch_ai-1.1.2/frontend/src/components/settings/PersonalDetailsTab.tsx +146 -0
  192. synapse_orch_ai-1.1.2/frontend/src/components/settings/PythonToolEditor.tsx +411 -0
  193. synapse_orch_ai-1.1.2/frontend/src/components/settings/ReposTab.tsx +498 -0
  194. synapse_orch_ai-1.1.2/frontend/src/components/settings/SchedulesTab.tsx +780 -0
  195. synapse_orch_ai-1.1.2/frontend/src/components/settings/ToastNotification.tsx +32 -0
  196. synapse_orch_ai-1.1.2/frontend/src/components/settings/UsageTab.tsx +919 -0
  197. synapse_orch_ai-1.1.2/frontend/src/components/settings/VaultTab.tsx +683 -0
  198. synapse_orch_ai-1.1.2/frontend/src/components/settings/import-export/ExamplesView.tsx +187 -0
  199. synapse_orch_ai-1.1.2/frontend/src/components/settings/import-export/ExportView.tsx +189 -0
  200. synapse_orch_ai-1.1.2/frontend/src/components/settings/import-export/ImportView.tsx +756 -0
  201. synapse_orch_ai-1.1.2/frontend/src/components/settings/import-export/SectionTable.tsx +87 -0
  202. synapse_orch_ai-1.1.2/frontend/src/components/settings/import-export/types.ts +72 -0
  203. synapse_orch_ai-1.1.2/frontend/src/components/settings/import-export/utils.ts +14 -0
  204. synapse_orch_ai-1.1.2/frontend/src/components/settings/index.ts +18 -0
  205. synapse_orch_ai-1.1.2/frontend/src/components/settings/types.ts +24 -0
  206. synapse_orch_ai-1.1.2/frontend/src/lib/utils.tsx +133 -0
  207. synapse_orch_ai-1.1.2/frontend/src/store/index.ts +11 -0
  208. synapse_orch_ai-1.1.2/frontend/src/store/settingsSlice.ts +99 -0
  209. synapse_orch_ai-1.1.2/frontend/src/types/index.ts +69 -0
  210. synapse_orch_ai-1.1.2/frontend/src/types/orchestration.ts +136 -0
  211. synapse_orch_ai-1.1.2/frontend/tsconfig.json +34 -0
  212. synapse_orch_ai-1.1.2/hatch_build.py +22 -0
  213. synapse_orch_ai-1.1.2/launch_browser.py +62 -0
  214. synapse_orch_ai-1.1.2/package.json +34 -0
  215. synapse_orch_ai-1.1.2/pyproject.toml +89 -0
  216. synapse_orch_ai-1.1.2/scripts/build_frontend.sh +33 -0
  217. synapse_orch_ai-1.1.2/scripts/bundle-frontend.js +53 -0
  218. synapse_orch_ai-1.1.2/setup.ps1 +571 -0
  219. synapse_orch_ai-1.1.2/setup.py +2573 -0
  220. synapse_orch_ai-1.1.2/setup.sh +421 -0
  221. synapse_orch_ai-1.1.2/start.ps1 +140 -0
  222. synapse_orch_ai-1.1.2/start.sh +121 -0
  223. synapse_orch_ai-1.1.2/synapse/__init__.py +0 -0
  224. synapse_orch_ai-1.1.2/synapse/__main__.py +3 -0
  225. synapse_orch_ai-1.1.2/synapse/cli.py +1233 -0
  226. synapse_orch_ai-1.1.2/synapse/setup_wizard.py +179 -0
@@ -0,0 +1,79 @@
1
+ ---
2
+ # Codacy configuration — controls both API-upload scans and Actions workflow scans.
3
+ # Stack: Python backend + TypeScript/Next.js frontend + Docker
4
+ engines:
5
+ # Python security — keep
6
+ bandit:
7
+ enabled: true
8
+ ruff:
9
+ enabled: true
10
+ pylint:
11
+ enabled: true
12
+ prospector:
13
+ enabled: false # redundant with ruff + pylint
14
+ pylintpython3:
15
+ enabled: false # duplicate of pylint
16
+
17
+ # JavaScript / TypeScript — keep ESLint only
18
+ eslint:
19
+ enabled: true
20
+ jshint:
21
+ enabled: false # deprecated, ESLint covers it
22
+ tslint:
23
+ enabled: false # deprecated, ESLint covers it
24
+
25
+ # CSS — keep Stylelint only
26
+ stylelint:
27
+ enabled: true
28
+ csslint:
29
+ enabled: false # redundant with stylelint
30
+
31
+ # Infrastructure / Docker
32
+ checkov:
33
+ enabled: true
34
+ hadolint:
35
+ enabled: true
36
+
37
+ # Shell scripts (setup.sh, start.sh)
38
+ shellcheck:
39
+ enabled: true
40
+ psscriptanalyzer:
41
+ enabled: false # PowerShell — not a focus
42
+
43
+ # Static analysis
44
+ semgrep:
45
+ enabled: true
46
+
47
+ # Disabled — not relevant to this stack
48
+ pmd:
49
+ enabled: false # Java only
50
+ pmd-7:
51
+ enabled: false # Java only
52
+ lizard:
53
+ enabled: false # complexity metrics, not security
54
+ jacksonlinter:
55
+ enabled: false
56
+ markdownlint:
57
+ enabled: false
58
+ remark-lint:
59
+ enabled: false
60
+ opengrep:
61
+ enabled: false
62
+ spectral:
63
+ enabled: false
64
+
65
+ exclude_paths:
66
+ - node_modules/**
67
+ - frontend/node_modules/**
68
+ - backend/node_modules/**
69
+ - frontend/.next/**
70
+ - backend/venv/**
71
+ - backend/.venv/**
72
+ - backend/chroma_db/**
73
+ - backend/data/**
74
+ - backend/logs/**
75
+ - dist/**
76
+ - frontend-build/**
77
+ - synapse/_frontend/**
78
+ - "**/__pycache__/**"
79
+ - "**/*.egg-info/**"
@@ -0,0 +1,20 @@
1
+ backend/venv/
2
+ backend/__pycache__/
3
+ backend/data/chroma_db/
4
+ backend/data/vault/
5
+ backend/data/settings.json
6
+ backend/data/credentials.json
7
+ backend/data/token.json
8
+ backend/data/personal_details.json
9
+ frontend/node_modules/
10
+ frontend/.next/
11
+ .git/
12
+ *.log
13
+ *.pyc
14
+ *.pyo
15
+ synapse/_frontend/
16
+ frontend-build/
17
+ dist/
18
+ *.egg-info/
19
+ .env
20
+ .env.local
@@ -0,0 +1,37 @@
1
+ # Synapse - Environment Configuration
2
+ # Copy this file to .env and fill in your values.
3
+ # All values are optional — Synapse works with defaults.
4
+
5
+ # Directory where Synapse stores user data (settings, agent configs, vault, logs)
6
+ # Default: backend/data (relative to the project root)
7
+ SYNAPSE_DATA_DIR=backend/data
8
+
9
+ # Ollama base URL (for local models)
10
+ # Default: http://127.0.0.1:11434
11
+ OLLAMA_BASE_URL=http://127.0.0.1:11434
12
+
13
+ # Port for the backend API server
14
+ # Default: 8000
15
+ SYNAPSE_BACKEND_PORT=8000
16
+
17
+ # Port for the frontend web UI
18
+ # Default: 3000
19
+ SYNAPSE_FRONTEND_PORT=3000
20
+
21
+ # Backend port exposed to the Next.js browser bundle (used in UI instructions like Google OAuth redirect URI)
22
+ # Must match SYNAPSE_BACKEND_PORT. Requires a frontend rebuild when changed.
23
+ # Default: 8000
24
+ NEXT_PUBLIC_BACKEND_PORT=8000
25
+
26
+ # Backend URL as seen by the Next.js server (used in Docker / custom deployments).
27
+ # OPTIONAL — if omitted, auto-derived from SYNAPSE_BACKEND_PORT as http://127.0.0.1:<port>.
28
+ # Override here for Docker/remote deployments (e.g. http://synapse-backend:8000).
29
+ # BACKEND_URL=http://synapse-backend:8000
30
+
31
+ # CORS origins allowed by the backend (comma-separated)
32
+ # Default: http://localhost:3000,http://localhost:5173
33
+ CORS_ORIGINS=http://localhost:3000
34
+
35
+ # Coding Agent default db configuration
36
+ # Default: postgres://postgres:password@localhost:5432/synapse
37
+ DATABASE_URL=postgres://postgres:root@localhost:5432/synapse
@@ -0,0 +1,15 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [naveenraj-17]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12
+ polar: # Replace with a single Polar username
13
+ buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14
+ thanks_dev: # Replace with a single thanks.dev username
15
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,106 @@
1
+ name: Codacy Security Scan
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+ workflow_dispatch:
9
+ schedule:
10
+ - cron: '30 3 * * *'
11
+
12
+ permissions:
13
+ contents: read
14
+ security-events: write
15
+ actions: read
16
+
17
+ jobs:
18
+ codacy-security-scan:
19
+ name: Codacy Security Scan
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - name: Checkout code
23
+ uses: actions/checkout@v4
24
+
25
+ # Run only the security tools relevant to this project (Python + TypeScript + Docker)
26
+ - name: Run Security Analysis
27
+ timeout-minutes: 20
28
+ continue-on-error: true
29
+ run: |
30
+ mkdir -p sarif_results
31
+
32
+ TOOLS="bandit semgrep checkov eslint"
33
+ for tool in $TOOLS; do
34
+ echo "::group::Running $tool"
35
+ docker run --rm \
36
+ --env CODACY_CODE="$PWD" \
37
+ --env JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" \
38
+ --volume /var/run/docker.sock:/var/run/docker.sock \
39
+ --volume "$PWD":"$PWD" \
40
+ --volume /tmp:/tmp \
41
+ codacy/codacy-analysis-cli:7.10.0 -- \
42
+ analyze \
43
+ --tool "$tool" \
44
+ --verbose \
45
+ --format sarif \
46
+ --output "$PWD/sarif_results/${tool}.sarif" \
47
+ --max-allowed-issues 2147483647 \
48
+ --skip-uncommitted-files-check || echo "::warning::$tool analysis failed"
49
+ echo "::endgroup::"
50
+ done
51
+
52
+ # Tag each SARIF with a unique category so GitHub doesn't merge them
53
+ - name: Prepare SARIF for upload
54
+ run: |
55
+ sudo python3 -c '
56
+ import json, os, glob
57
+
58
+ for path in glob.glob("sarif_results/*.sarif"):
59
+ if os.path.getsize(path) == 0:
60
+ os.remove(path)
61
+ continue
62
+ try:
63
+ with open(path) as f:
64
+ data = json.load(f)
65
+ runs = data.get("runs", [])
66
+ has_results = any(run.get("results") for run in runs)
67
+ if not runs or not has_results:
68
+ print(f"Skipping {path}: no results")
69
+ os.remove(path)
70
+ continue
71
+ tool = os.path.basename(path).replace(".sarif", "")
72
+ for i, run in enumerate(runs):
73
+ if "automationDetails" not in run:
74
+ run["automationDetails"] = {}
75
+ run["automationDetails"]["id"] = f"codacy-{tool}-{i}"
76
+ with open(path, "w") as f:
77
+ json.dump(data, f, indent=2)
78
+ except (json.JSONDecodeError, KeyError):
79
+ print(f"Warning: Could not process {path}")
80
+ os.remove(path)
81
+ '
82
+
83
+ - name: Fix file permissions
84
+ run: sudo chown -R $(id -u):$(id -g) sarif_results/
85
+
86
+ - name: Upload SARIF results
87
+ env:
88
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89
+ run: |
90
+ for file in sarif_results/*.sarif; do
91
+ [ -f "$file" ] || continue
92
+ [ -s "$file" ] || continue
93
+ echo "Uploading $file..."
94
+ gzip -c "$file" > payload.gz
95
+ b64_payload=$(base64 -w0 payload.gz)
96
+ gh api \
97
+ --method POST \
98
+ -H "Accept: application/vnd.github+json" \
99
+ -H "X-GitHub-Api-Version: 2022-11-28" \
100
+ /repos/${{ github.repository }}/code-scanning/sarifs \
101
+ -f commit_sha="${{ github.sha }}" \
102
+ -f ref="${{ github.ref }}" \
103
+ -f sarif="$b64_payload" || echo "::warning::Failed to upload $file"
104
+ sleep 2
105
+ done
106
+ echo "All uploads complete!"
@@ -0,0 +1,104 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL Advanced"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "master" ]
17
+ pull_request:
18
+ branches: [ "master" ]
19
+ workflow_dispatch:
20
+ schedule:
21
+ - cron: '30 3 * * *'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze (${{ matrix.language }})
26
+ # Runner size impacts CodeQL analysis time. To learn more, please see:
27
+ # - https://gh.io/recommended-hardware-resources-for-running-codeql
28
+ # - https://gh.io/supported-runners-and-hardware-resources
29
+ # - https://gh.io/using-larger-runners (GitHub.com only)
30
+ # Consider using larger runners or machines with greater resources for possible analysis time improvements.
31
+ runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
32
+ env:
33
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
34
+ permissions:
35
+ # required for all workflows
36
+ security-events: write
37
+
38
+ # required to fetch internal or private CodeQL packs
39
+ packages: read
40
+
41
+ # only required for workflows in private repositories
42
+ actions: read
43
+ contents: read
44
+
45
+ strategy:
46
+ fail-fast: false
47
+ matrix:
48
+ include:
49
+ - language: javascript-typescript
50
+ build-mode: none
51
+ - language: python
52
+ build-mode: none
53
+ # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
54
+ # Use `c-cpp` to analyze code written in C, C++ or both
55
+ # Use 'java-kotlin' to analyze code written in Java, Kotlin or both
56
+ # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
57
+ # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
58
+ # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
59
+ # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
60
+ # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
61
+ steps:
62
+ - name: Checkout repository
63
+ uses: actions/checkout@v4
64
+
65
+ # Add any setup steps before running the `github/codeql-action/init` action.
66
+ # This includes steps like installing compilers or runtimes (`actions/setup-node`
67
+ # or others). This is typically only required for manual builds.
68
+ # - name: Setup runtime (example)
69
+ # uses: actions/setup-example@v1
70
+
71
+ # Initializes the CodeQL tools for scanning.
72
+ - name: Initialize CodeQL
73
+ uses: github/codeql-action/init@v4
74
+ with:
75
+ languages: ${{ matrix.language }}
76
+ build-mode: ${{ matrix.build-mode }}
77
+ # If you wish to specify custom queries, you can do so here or in a config file.
78
+ # By default, queries listed here will override any specified in a config file.
79
+ # Prefix the list here with "+" to use these queries and those in the config file.
80
+
81
+ # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
82
+ # queries: security-extended,security-and-quality
83
+
84
+ # If the analyze step fails for one of the languages you are analyzing with
85
+ # "We were unable to automatically build your code", modify the matrix above
86
+ # to set the build mode to "manual" for that language. Then modify this step
87
+ # to build your code.
88
+ # ℹ️ Command-line programs to run using the OS shell.
89
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
90
+ - name: Run manual build steps
91
+ if: matrix.build-mode == 'manual'
92
+ shell: bash
93
+ run: |
94
+ echo 'If you are using a "manual" build mode for one or more of the' \
95
+ 'languages you are analyzing, replace this with the commands to build' \
96
+ 'your code, for example:'
97
+ echo ' make bootstrap'
98
+ echo ' make release'
99
+ exit 1
100
+
101
+ - name: Perform CodeQL Analysis
102
+ uses: github/codeql-action/analyze@v4
103
+ with:
104
+ category: "/language:${{matrix.language}}"
@@ -0,0 +1,76 @@
1
+ name: Publish Synapse
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ build-frontend:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - uses: actions/setup-node@v4
15
+ with:
16
+ node-version: '20'
17
+
18
+ - name: Build Next.js standalone
19
+ run: bash scripts/build_frontend.sh
20
+
21
+ - name: Upload frontend artifacts
22
+ uses: actions/upload-artifact@v4
23
+ with:
24
+ name: frontend-builds
25
+ path: |
26
+ synapse/_frontend
27
+ frontend-build
28
+
29
+ publish-python:
30
+ runs-on: ubuntu-latest
31
+ needs: build-frontend
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+
35
+ - uses: actions/setup-python@v5
36
+ with:
37
+ python-version: '3.11'
38
+
39
+ - name: Download frontend artifacts
40
+ uses: actions/download-artifact@v4
41
+ with:
42
+ name: frontend-builds
43
+
44
+ - name: Build Python package
45
+ run: |
46
+ pip install hatch
47
+ hatch build
48
+
49
+ - name: Publish to PyPI
50
+ run: |
51
+ pip install twine
52
+ twine upload --skip-existing dist/*
53
+ env:
54
+ TWINE_USERNAME: __token__
55
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
56
+
57
+ publish-npm:
58
+ runs-on: ubuntu-latest
59
+ needs: build-frontend
60
+ steps:
61
+ - uses: actions/checkout@v4
62
+
63
+ - uses: actions/setup-node@v4
64
+ with:
65
+ node-version: '20'
66
+ registry-url: 'https://registry.npmjs.org'
67
+
68
+ - name: Download frontend artifacts
69
+ uses: actions/download-artifact@v4
70
+ with:
71
+ name: frontend-builds
72
+
73
+ - name: Publish to npm
74
+ run: npm publish --access public
75
+ env:
76
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,43 @@
1
+ # General
2
+ .DS_Store
3
+ .vscode/
4
+ .idea/
5
+ *.log
6
+
7
+ # Python / Backend
8
+ **/__pycache__/
9
+ backend/node_modules/
10
+ backend/data/orchestration_runs/
11
+ backend/logs/
12
+ backend/venv/
13
+ backend/data/chroma_db/
14
+ backend/data/*
15
+ backend/.playwright-mcp/
16
+
17
+ # Javascript / Frontend
18
+ frontend/node_modules/
19
+ frontend/.next/
20
+ frontend/next-env.d.ts
21
+
22
+ # Specific project files
23
+ backend/chroma_db/
24
+ backend/data/chroma_db/
25
+ backend/.venv/
26
+
27
+ # Distribution artifacts
28
+ dist/
29
+ *.egg-info/
30
+ *.whl
31
+ *.tar.gz
32
+ *.tgz
33
+ synapse/_frontend/
34
+ frontend-build/
35
+ node_modules/
36
+
37
+ # Environment files
38
+ .env
39
+ .env.local
40
+ .env.*.local
41
+
42
+ # Security — token files
43
+ backend/data/token.json
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ synapse.ai.orch@gmail.com.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.