studiograph 1.3.3-next.9 → 1.3.4

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 (282) hide show
  1. package/dist/agent/orchestrator.d.ts +2 -0
  2. package/dist/agent/orchestrator.js +13 -5
  3. package/dist/agent/orchestrator.js.map +1 -1
  4. package/dist/agent/skills/sync-configuration.md +4 -29
  5. package/dist/agent/skills/sync-setup.md +2 -4
  6. package/dist/agent/tools/ops-tools.js +15 -126
  7. package/dist/agent/tools/ops-tools.js.map +1 -1
  8. package/dist/agent/tools/sync-tools.d.ts +7 -6
  9. package/dist/agent/tools/sync-tools.js +205 -178
  10. package/dist/agent/tools/sync-tools.js.map +1 -1
  11. package/dist/cli/commands/about.d.ts +13 -0
  12. package/dist/cli/commands/about.js +97 -0
  13. package/dist/cli/commands/about.js.map +1 -0
  14. package/dist/cli/commands/clone.d.ts +5 -2
  15. package/dist/cli/commands/clone.js +131 -62
  16. package/dist/cli/commands/clone.js.map +1 -1
  17. package/dist/cli/commands/connector.d.ts +2 -16
  18. package/dist/cli/commands/connector.js +32 -109
  19. package/dist/cli/commands/connector.js.map +1 -1
  20. package/dist/cli/commands/deploy.d.ts +0 -1
  21. package/dist/cli/commands/deploy.js +13 -103
  22. package/dist/cli/commands/deploy.js.map +1 -1
  23. package/dist/cli/commands/init.js +6 -93
  24. package/dist/cli/commands/init.js.map +1 -1
  25. package/dist/cli/commands/join.js +51 -1
  26. package/dist/cli/commands/join.js.map +1 -1
  27. package/dist/cli/commands/redeploy.js +1 -2
  28. package/dist/cli/commands/redeploy.js.map +1 -1
  29. package/dist/cli/commands/serve.d.ts +1 -3
  30. package/dist/cli/commands/serve.js +29 -109
  31. package/dist/cli/commands/serve.js.map +1 -1
  32. package/dist/cli/commands/start.js +1 -1
  33. package/dist/cli/commands/start.js.map +1 -1
  34. package/dist/cli/commands/sync-collection.d.ts +14 -0
  35. package/dist/cli/commands/sync-collection.js +366 -0
  36. package/dist/cli/commands/sync-collection.js.map +1 -0
  37. package/dist/cli/commands/sync.js +518 -82
  38. package/dist/cli/commands/sync.js.map +1 -1
  39. package/dist/cli/index.js +12 -30
  40. package/dist/cli/index.js.map +1 -1
  41. package/dist/cli/setup-wizard.d.ts +0 -13
  42. package/dist/cli/setup-wizard.js +6 -81
  43. package/dist/cli/setup-wizard.js.map +1 -1
  44. package/dist/core/types.d.ts +140 -21
  45. package/dist/core/types.js +15 -4
  46. package/dist/core/types.js.map +1 -1
  47. package/dist/core/workspace.d.ts +11 -4
  48. package/dist/core/workspace.js +61 -26
  49. package/dist/core/workspace.js.map +1 -1
  50. package/dist/integrations/asana.d.ts +26 -0
  51. package/dist/integrations/asana.js +77 -0
  52. package/dist/integrations/asana.js.map +1 -0
  53. package/dist/integrations/figma-local.d.ts +16 -0
  54. package/dist/integrations/figma-local.js +10 -0
  55. package/dist/integrations/figma-local.js.map +1 -0
  56. package/dist/integrations/figma.d.ts +17 -0
  57. package/dist/integrations/figma.js +16 -0
  58. package/dist/integrations/figma.js.map +1 -0
  59. package/dist/integrations/granola.d.ts +24 -0
  60. package/dist/integrations/granola.js +59 -0
  61. package/dist/integrations/granola.js.map +1 -0
  62. package/dist/integrations/linear.d.ts +14 -0
  63. package/dist/integrations/linear.js +70 -0
  64. package/dist/integrations/linear.js.map +1 -0
  65. package/dist/integrations/paper-local.d.ts +14 -0
  66. package/dist/integrations/paper-local.js +10 -0
  67. package/dist/integrations/paper-local.js.map +1 -0
  68. package/dist/integrations/paper.d.ts +2 -0
  69. package/dist/integrations/paper.js +10 -0
  70. package/dist/integrations/paper.js.map +1 -0
  71. package/dist/integrations/pipedrive.d.ts +26 -0
  72. package/dist/integrations/pipedrive.js +97 -0
  73. package/dist/integrations/pipedrive.js.map +1 -0
  74. package/dist/integrations/registry.d.ts +15 -0
  75. package/dist/integrations/registry.js +27 -0
  76. package/dist/integrations/registry.js.map +1 -0
  77. package/dist/integrations/types.d.ts +34 -0
  78. package/dist/integrations/types.js +9 -0
  79. package/dist/integrations/types.js.map +1 -0
  80. package/dist/mcp/connector-manager.d.ts +45 -31
  81. package/dist/mcp/connector-manager.js +164 -116
  82. package/dist/mcp/connector-manager.js.map +1 -1
  83. package/dist/mcp/server-oauth-provider.d.ts +56 -0
  84. package/dist/mcp/server-oauth-provider.js +138 -0
  85. package/dist/mcp/server-oauth-provider.js.map +1 -0
  86. package/dist/server/chrome/chrome.css +142 -28
  87. package/dist/server/chrome/chrome.js +51 -25
  88. package/dist/server/collab-authority.d.ts +70 -0
  89. package/dist/server/collab-authority.js +218 -0
  90. package/dist/server/collab-authority.js.map +1 -0
  91. package/dist/server/collab.d.ts +29 -0
  92. package/dist/server/collab.js +195 -0
  93. package/dist/server/collab.js.map +1 -0
  94. package/dist/server/commit-scheduler.d.ts +1 -1
  95. package/dist/server/commit-scheduler.js +18 -4
  96. package/dist/server/commit-scheduler.js.map +1 -1
  97. package/dist/server/index.d.ts +0 -2
  98. package/dist/server/index.js +89 -18
  99. package/dist/server/index.js.map +1 -1
  100. package/dist/server/routes/auth-api.d.ts +6 -0
  101. package/dist/server/routes/auth-api.js +55 -0
  102. package/dist/server/routes/auth-api.js.map +1 -1
  103. package/dist/server/routes/collab.d.ts +6 -0
  104. package/dist/server/routes/collab.js +10 -0
  105. package/dist/server/routes/collab.js.map +1 -0
  106. package/dist/server/routes/git-http.d.ts +1 -1
  107. package/dist/server/routes/git-http.js +53 -15
  108. package/dist/server/routes/git-http.js.map +1 -1
  109. package/dist/server/routes/graph-api.d.ts +2 -2
  110. package/dist/server/routes/graph-api.js +59 -55
  111. package/dist/server/routes/graph-api.js.map +1 -1
  112. package/dist/server/routes/mcp.d.ts +12 -0
  113. package/dist/server/routes/mcp.js +35 -0
  114. package/dist/server/routes/mcp.js.map +1 -0
  115. package/dist/server/routes/permissions-api.d.ts +2 -1
  116. package/dist/server/routes/permissions-api.js +16 -2
  117. package/dist/server/routes/permissions-api.js.map +1 -1
  118. package/dist/server/routes/sync-api.d.ts +26 -0
  119. package/dist/server/routes/sync-api.js +757 -0
  120. package/dist/server/routes/sync-api.js.map +1 -0
  121. package/dist/server/routes/ws.d.ts +4 -2
  122. package/dist/server/routes/ws.js +100 -4
  123. package/dist/server/routes/ws.js.map +1 -1
  124. package/dist/server/session-manager.d.ts +40 -0
  125. package/dist/server/session-manager.js +132 -0
  126. package/dist/server/session-manager.js.map +1 -0
  127. package/dist/server/ws-hub.d.ts +95 -1
  128. package/dist/server/ws-hub.js +192 -5
  129. package/dist/server/ws-hub.js.map +1 -1
  130. package/dist/server/yjs-manager.d.ts +59 -0
  131. package/dist/server/yjs-manager.js +194 -0
  132. package/dist/server/yjs-manager.js.map +1 -0
  133. package/dist/services/auth-service.d.ts +30 -2
  134. package/dist/services/auth-service.js +116 -11
  135. package/dist/services/auth-service.js.map +1 -1
  136. package/dist/services/git.d.ts +6 -0
  137. package/dist/services/git.js +32 -2
  138. package/dist/services/git.js.map +1 -1
  139. package/dist/services/sync/collection-sync.d.ts +73 -0
  140. package/dist/services/sync/collection-sync.js +726 -0
  141. package/dist/services/sync/collection-sync.js.map +1 -0
  142. package/dist/services/sync/commit.js +5 -20
  143. package/dist/services/sync/commit.js.map +1 -1
  144. package/dist/services/sync/data-fetcher.d.ts +31 -0
  145. package/dist/services/sync/data-fetcher.js +12 -0
  146. package/dist/services/sync/data-fetcher.js.map +1 -0
  147. package/dist/services/sync/entity-refresh.d.ts +30 -0
  148. package/dist/services/sync/entity-refresh.js +275 -0
  149. package/dist/services/sync/entity-refresh.js.map +1 -0
  150. package/dist/services/sync/frontmatter-extractor.d.ts +2 -2
  151. package/dist/services/sync/frontmatter-extractor.js +1 -2
  152. package/dist/services/sync/frontmatter-extractor.js.map +1 -1
  153. package/dist/services/sync/graph-match.js +1 -1
  154. package/dist/services/sync/graph-match.js.map +1 -1
  155. package/dist/services/sync/mcp-client.d.ts +16 -4
  156. package/dist/services/sync/mcp-client.js +34 -20
  157. package/dist/services/sync/mcp-client.js.map +1 -1
  158. package/dist/services/sync/prompts.js +1 -1
  159. package/dist/services/sync/reconciler.js +1 -2
  160. package/dist/services/sync/reconciler.js.map +1 -1
  161. package/dist/services/sync/rest-client.d.ts +40 -0
  162. package/dist/services/sync/rest-client.js +100 -0
  163. package/dist/services/sync/rest-client.js.map +1 -0
  164. package/dist/services/sync/source-config.d.ts +23 -1
  165. package/dist/services/sync/source-config.js +112 -16
  166. package/dist/services/sync/source-config.js.map +1 -1
  167. package/dist/services/sync/source-definitions/asana.d.ts +3 -4
  168. package/dist/services/sync/source-definitions/asana.js +7 -13
  169. package/dist/services/sync/source-definitions/asana.js.map +1 -1
  170. package/dist/services/sync/source-definitions/definitions.d.ts +5 -18
  171. package/dist/services/sync/source-definitions/definitions.js +4 -22
  172. package/dist/services/sync/source-definitions/definitions.js.map +1 -1
  173. package/dist/services/sync/source-definitions/granola.d.ts +1 -1
  174. package/dist/services/sync/source-definitions/granola.js +11 -18
  175. package/dist/services/sync/source-definitions/granola.js.map +1 -1
  176. package/dist/services/sync/source-definitions/linear.d.ts +1 -1
  177. package/dist/services/sync/source-definitions/linear.js +17 -15
  178. package/dist/services/sync/source-definitions/linear.js.map +1 -1
  179. package/dist/services/sync/source-definitions/pipedrive.d.ts +1 -1
  180. package/dist/services/sync/source-definitions/pipedrive.js +6 -15
  181. package/dist/services/sync/source-definitions/pipedrive.js.map +1 -1
  182. package/dist/services/sync/staging.js +1 -2
  183. package/dist/services/sync/staging.js.map +1 -1
  184. package/dist/services/sync/structured-extractor.d.ts +8 -2
  185. package/dist/services/sync/structured-extractor.js +243 -35
  186. package/dist/services/sync/structured-extractor.js.map +1 -1
  187. package/dist/services/sync/types.d.ts +192 -23
  188. package/dist/services/sync/unstructured-extractor.d.ts +1 -3
  189. package/dist/services/sync/unstructured-extractor.js +2 -14
  190. package/dist/services/sync/unstructured-extractor.js.map +1 -1
  191. package/dist/utils/git.d.ts +24 -20
  192. package/dist/utils/git.js +99 -65
  193. package/dist/utils/git.js.map +1 -1
  194. package/dist/utils/preflight.d.ts +1 -15
  195. package/dist/utils/preflight.js +1 -35
  196. package/dist/utils/preflight.js.map +1 -1
  197. package/dist/web/_app/immutable/assets/0.CupILLQs.css +1 -0
  198. package/dist/web/_app/immutable/assets/3.CtJi4Cy9.css +1 -0
  199. package/dist/web/_app/immutable/assets/5.CydFyZSu.css +1 -0
  200. package/dist/web/_app/immutable/assets/6.kqeOo0OW.css +1 -0
  201. package/dist/web/_app/immutable/assets/7.CseIx7qQ.css +1 -0
  202. package/dist/web/_app/immutable/assets/{8.Sm6jB3a0.css → 8.BYpFDZHK.css} +1 -1
  203. package/dist/web/_app/immutable/assets/AppShell.Ch_ef9hJ.css +1 -0
  204. package/dist/web/_app/immutable/assets/ChatPanel.CP-_8txt.css +1 -0
  205. package/dist/web/_app/immutable/chunks/0oxpWEgM.js +1 -0
  206. package/dist/web/_app/immutable/chunks/B1y7Wy5O.js +18 -0
  207. package/dist/web/_app/immutable/chunks/B7eduG_j.js +64 -0
  208. package/dist/web/_app/immutable/chunks/BBLgaWN8.js +1 -0
  209. package/dist/web/_app/immutable/chunks/BCB5cYCz.js +2 -0
  210. package/dist/web/_app/immutable/chunks/{aosHekRC.js → BPUy9_sS.js} +1 -1
  211. package/dist/web/_app/immutable/chunks/BVBRzmeQ.js +7 -0
  212. package/dist/web/_app/immutable/chunks/{CUzqHQY_.js → BXuvR8Ks.js} +2 -1
  213. package/dist/web/_app/immutable/chunks/BeBar3OL.js +1 -0
  214. package/dist/web/_app/immutable/chunks/BuOTIbJu.js +1 -0
  215. package/dist/web/_app/immutable/chunks/CLFba8FK.js +5 -0
  216. package/dist/web/_app/immutable/chunks/CQCkXCml.js +1 -0
  217. package/dist/web/_app/immutable/chunks/CXuhHL4d.js +1 -0
  218. package/dist/web/_app/immutable/chunks/Cg9NOuOl.js +27 -0
  219. package/dist/web/_app/immutable/chunks/Cs5oz2oJ.js +5 -0
  220. package/dist/web/_app/immutable/chunks/Cs_ROD7H.js +2 -0
  221. package/dist/web/_app/immutable/chunks/D2aTbzFm.js +3 -0
  222. package/dist/web/_app/immutable/chunks/D4FXhiC2.js +1 -0
  223. package/dist/web/_app/immutable/chunks/D4VHRYeB.js +1 -0
  224. package/dist/web/_app/immutable/chunks/DCGSm8Hl.js +1 -0
  225. package/dist/web/_app/immutable/chunks/DP09rP34.js +2 -0
  226. package/dist/web/_app/immutable/chunks/DiP47fAp.js +1 -0
  227. package/dist/web/_app/immutable/chunks/DptGlK8O.js +1 -0
  228. package/dist/web/_app/immutable/chunks/O0fx2ss6.js +1 -0
  229. package/dist/web/_app/immutable/chunks/xBRYfpah.js +1 -0
  230. package/dist/web/_app/immutable/entry/app.FgnywZP_.js +2 -0
  231. package/dist/web/_app/immutable/entry/start.Bsa-zlPf.js +1 -0
  232. package/dist/web/_app/immutable/nodes/0.D3SW-LMc.js +10 -0
  233. package/dist/web/_app/immutable/nodes/1.y0c5TQTP.js +1 -0
  234. package/dist/web/_app/immutable/nodes/2.BQfSep9-.js +1 -0
  235. package/dist/web/_app/immutable/nodes/3.CC4Y-xMM.js +11 -0
  236. package/dist/web/_app/immutable/nodes/4.Dp0Z-oPW.js +4 -0
  237. package/dist/web/_app/immutable/nodes/5.gjZ03DON.js +2 -0
  238. package/dist/web/_app/immutable/nodes/6.dRNIwcJQ.js +1 -0
  239. package/dist/web/_app/immutable/nodes/7.I4Gjes3o.js +2 -0
  240. package/dist/web/_app/immutable/nodes/8.Dj14D7uH.js +1 -0
  241. package/dist/web/_app/version.json +1 -1
  242. package/dist/web/index.html +10 -12
  243. package/package.json +4 -2
  244. package/dist/web/_app/immutable/assets/0.CF0XhAap.css +0 -1
  245. package/dist/web/_app/immutable/assets/3.BJy7pVXi.css +0 -1
  246. package/dist/web/_app/immutable/assets/4.Ad16uh9o.css +0 -1
  247. package/dist/web/_app/immutable/assets/6.Bm2i7O0j.css +0 -1
  248. package/dist/web/_app/immutable/assets/7.Cn2DG-J6.css +0 -1
  249. package/dist/web/_app/immutable/assets/AppShell.CztjTuKY.css +0 -1
  250. package/dist/web/_app/immutable/assets/ChatPanel.RFD5GGYI.css +0 -1
  251. package/dist/web/_app/immutable/assets/editor.CPAf2SRV.css +0 -1
  252. package/dist/web/_app/immutable/chunks/4QY4j-jX.js +0 -1
  253. package/dist/web/_app/immutable/chunks/B3Kdf1r4.js +0 -6
  254. package/dist/web/_app/immutable/chunks/BIo3H1KR.js +0 -2
  255. package/dist/web/_app/immutable/chunks/BJLM1w2L.js +0 -23
  256. package/dist/web/_app/immutable/chunks/BLCwEMdm.js +0 -1
  257. package/dist/web/_app/immutable/chunks/BSYvCVJt.js +0 -1
  258. package/dist/web/_app/immutable/chunks/Ba5JX1o9.js +0 -1
  259. package/dist/web/_app/immutable/chunks/Bj34y868.js +0 -64
  260. package/dist/web/_app/immutable/chunks/BrWpHgBJ.js +0 -1
  261. package/dist/web/_app/immutable/chunks/C3g_lwol.js +0 -1
  262. package/dist/web/_app/immutable/chunks/CXnPm09s.js +0 -1
  263. package/dist/web/_app/immutable/chunks/ClOTom10.js +0 -1
  264. package/dist/web/_app/immutable/chunks/CtT4aw_G.js +0 -1
  265. package/dist/web/_app/immutable/chunks/Dh_H7Owr.js +0 -18
  266. package/dist/web/_app/immutable/chunks/DnlgZ_Tk.js +0 -5
  267. package/dist/web/_app/immutable/chunks/DtVH--hH.js +0 -6
  268. package/dist/web/_app/immutable/chunks/Dzd9kdLj.js +0 -2
  269. package/dist/web/_app/immutable/chunks/L91a_BGe.js +0 -1
  270. package/dist/web/_app/immutable/chunks/bHAllEMt.js +0 -1
  271. package/dist/web/_app/immutable/entry/app.CdrgaaFb.js +0 -2
  272. package/dist/web/_app/immutable/entry/start.t9LMjt48.js +0 -1
  273. package/dist/web/_app/immutable/nodes/0.P-Xfebn4.js +0 -2
  274. package/dist/web/_app/immutable/nodes/1.DiZlq1e6.js +0 -1
  275. package/dist/web/_app/immutable/nodes/2.ByIZ5J2p.js +0 -1
  276. package/dist/web/_app/immutable/nodes/3.D7JhktsZ.js +0 -1
  277. package/dist/web/_app/immutable/nodes/4.BtMeWbPx.js +0 -16
  278. package/dist/web/_app/immutable/nodes/5.CCYG1pbQ.js +0 -4
  279. package/dist/web/_app/immutable/nodes/6.CL_Ah04j.js +0 -2
  280. package/dist/web/_app/immutable/nodes/7.BMTaosAj.js +0 -1
  281. package/dist/web/_app/immutable/nodes/8.mrPg67cz.js +0 -1
  282. /package/dist/web/_app/immutable/assets/{5.BhKgiXd2.css → 4.BhKgiXd2.css} +0 -0
@@ -0,0 +1,70 @@
1
+ export const linear = {
2
+ name: 'linear',
3
+ connector: {
4
+ url: 'https://mcp.linear.app/mcp',
5
+ description: 'Linear issue tracker',
6
+ auth: 'oauth',
7
+ },
8
+ source: {
9
+ connector: 'linear',
10
+ filter_fields: [
11
+ {
12
+ key: 'project',
13
+ label: 'Project',
14
+ placeholder: 'e.g. My Project',
15
+ type: 'text',
16
+ mode: 'client',
17
+ fields: ['project', 'name'],
18
+ op: 'contains',
19
+ },
20
+ ],
21
+ entities: {
22
+ task: {
23
+ source_type: 'issue',
24
+ primary: true,
25
+ id_from: 'title',
26
+ content_from: 'description',
27
+ fetch_details: true,
28
+ field_map: {
29
+ 'title': 'name',
30
+ 'assignee': { field: 'assignee', transform: 'wikilink' },
31
+ 'dueDate': 'due_date',
32
+ 'project': { field: 'project', transform: 'wikilink' },
33
+ 'labels': { field: 'tags', transform: 'direct', subfield: 'name' },
34
+ 'url': 'url',
35
+ 'identifier': 'external_id',
36
+ },
37
+ status_map: {
38
+ 'Backlog': 'open',
39
+ 'Todo': 'open',
40
+ 'In Progress': 'in-progress',
41
+ 'In Review': 'in-progress',
42
+ 'Done': 'done',
43
+ 'Canceled': 'cancelled',
44
+ 'Duplicate': 'cancelled',
45
+ },
46
+ },
47
+ project: {
48
+ source_type: 'project',
49
+ id_from: 'name',
50
+ content_from: 'description',
51
+ field_map: {
52
+ 'name': 'name',
53
+ 'startDate': 'start_date',
54
+ 'targetDate': 'target_completion',
55
+ 'lead': { field: 'lead', transform: 'wikilink' },
56
+ 'url': 'url',
57
+ },
58
+ status_map: {
59
+ 'Backlog': 'planning',
60
+ 'Planned': 'planning',
61
+ 'Started': 'active',
62
+ 'Paused': 'on-hold',
63
+ 'Completed': 'completed',
64
+ 'Canceled': 'archived',
65
+ },
66
+ },
67
+ },
68
+ },
69
+ };
70
+ //# sourceMappingURL=linear.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linear.js","sourceRoot":"","sources":["../../src/integrations/linear.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,MAAM,GAAgB;IACjC,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE;QACT,GAAG,EAAE,4BAA4B;QACjC,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,OAAO;KACd;IACD,MAAM,EAAE;QACN,SAAS,EAAE,QAAQ;QACnB,aAAa,EAAE;YACb;gBACE,GAAG,EAAE,SAAS;gBACd,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,iBAAiB;gBAC9B,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;gBAC3B,EAAE,EAAE,UAAU;aACf;SACF;QACD,QAAQ,EAAE;YACR,IAAI,EAAE;gBACJ,WAAW,EAAE,OAAO;gBACpB,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,OAAO;gBAChB,YAAY,EAAE,aAAa;gBAC3B,aAAa,EAAE,IAAI;gBACnB,SAAS,EAAE;oBACT,OAAO,EAAE,MAAM;oBACf,UAAU,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE;oBACxD,SAAS,EAAE,UAAU;oBACrB,SAAS,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE;oBACtD,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE;oBAClE,KAAK,EAAE,KAAK;oBACZ,YAAY,EAAE,aAAa;iBAC5B;gBACD,UAAU,EAAE;oBACV,SAAS,EAAE,MAAM;oBACjB,MAAM,EAAE,MAAM;oBACd,aAAa,EAAE,aAAa;oBAC5B,WAAW,EAAE,aAAa;oBAC1B,MAAM,EAAE,MAAM;oBACd,UAAU,EAAE,WAAW;oBACvB,WAAW,EAAE,WAAW;iBACzB;aACF;YACD,OAAO,EAAE;gBACP,WAAW,EAAE,SAAS;gBACtB,OAAO,EAAE,MAAM;gBACf,YAAY,EAAE,aAAa;gBAC3B,SAAS,EAAE;oBACT,MAAM,EAAE,MAAM;oBACd,WAAW,EAAE,YAAY;oBACzB,YAAY,EAAE,mBAAmB;oBACjC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE;oBAChD,KAAK,EAAE,KAAK;iBACb;gBACD,UAAU,EAAE;oBACV,SAAS,EAAE,UAAU;oBACrB,SAAS,EAAE,UAAU;oBACrB,SAAS,EAAE,QAAQ;oBACnB,QAAQ,EAAE,SAAS;oBACnB,WAAW,EAAE,WAAW;oBACxB,UAAU,EAAE,UAAU;iBACvB;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Paper — local design tool MCP connector.
3
+ *
4
+ * Agent: MCP via localhost:29979 (no auth, requires Paper desktop app running)
5
+ * Paper is a professional UI design tool. The MCP server provides tools for
6
+ * reading designs, creating artboards, writing HTML, and managing styles.
7
+ *
8
+ * Sync: None — design tool, interactive use only.
9
+ *
10
+ * Note: The port (29979) is determined by the Paper app, not configurable.
11
+ * Connection will fail gracefully if the app is not running.
12
+ */
13
+ import type { Integration } from './types.js';
14
+ export declare const paper: Integration;
@@ -0,0 +1,10 @@
1
+ export const paper = {
2
+ name: 'paper',
3
+ connector: {
4
+ url: 'http://127.0.0.1:29979/mcp',
5
+ description: 'Paper design tool (local)',
6
+ auth: 'none',
7
+ },
8
+ // No sync source — Paper is a local design tool for interactive use only
9
+ };
10
+ //# sourceMappingURL=paper-local.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paper-local.js","sourceRoot":"","sources":["../../src/integrations/paper-local.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,KAAK,GAAgB;IAChC,IAAI,EAAE,OAAO;IACb,SAAS,EAAE;QACT,GAAG,EAAE,4BAA4B;QACjC,WAAW,EAAE,2BAA2B;QACxC,IAAI,EAAE,MAAM;KACb;IACD,yEAAyE;CAC1E,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Integration } from './types.js';
2
+ export declare const paper: Integration;
@@ -0,0 +1,10 @@
1
+ export const paper = {
2
+ name: 'paper',
3
+ connector: {
4
+ url: 'http://127.0.0.1:29979/mcp',
5
+ description: 'Paper design tool',
6
+ auth: 'none',
7
+ },
8
+ // No sync source — Paper is a local design tool for interactive use only
9
+ };
10
+ //# sourceMappingURL=paper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paper.js","sourceRoot":"","sources":["../../src/integrations/paper.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAgB;IAChC,IAAI,EAAE,OAAO;IACb,SAAS,EAAE;QACT,GAAG,EAAE,4BAA4B;QACjC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,MAAM;KACb;IACD,yEAAyE;CAC1E,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Pipedrive — CRM integration.
3
+ *
4
+ * Agent: MCP via mcp.pipedrive.com (OAuth, pre-registered app required)
5
+ * OAuth app registered at developers.pipedrive.com.
6
+ * Callback: https://auth.studiograph.com/callback/pipedrive
7
+ * Env: PIPEDRIVE_CLIENT_SECRET
8
+ * Custom OAuth endpoints required — Pipedrive's MCP server returns 500 on
9
+ * .well-known discovery, so we provide synthetic metadata via createOAuthFetch().
10
+ *
11
+ * Sync: REST adapter via api.pipedrive.com/v1 (API token as query param)
12
+ * Env: PIPEDRIVE_API_TOKEN (personal API token from Settings > Personal > API)
13
+ * The API token is separate from MCP OAuth — both can coexist.
14
+ *
15
+ * Entities: deal (primary), person, organization
16
+ * Filters: status (server-side: open/won/lost/all_not_deleted),
17
+ * filter_id (server-side: saved Pipedrive filter ID)
18
+ *
19
+ * Deal notes: Fetched via content_tool (/notes?deal_id=...). HTML content is
20
+ * converted to markdown (headings, bold, italic, links, lists). Deals without
21
+ * notes get metadata-only entities.
22
+ *
23
+ * Pagination: Offset-based (start/limit), max 500 per page, page_size set to 100.
24
+ */
25
+ import type { Integration } from './types.js';
26
+ export declare const pipedrive: Integration;
@@ -0,0 +1,97 @@
1
+ export const pipedrive = {
2
+ name: 'pipedrive',
3
+ connector: {
4
+ url: 'https://mcp.pipedrive.com/mcp',
5
+ description: 'Pipedrive CRM',
6
+ auth: 'oauth',
7
+ oauth: {
8
+ client_id: '9a3dbc40a7b5ce9d',
9
+ client_secret_env: 'PIPEDRIVE_CLIENT_SECRET',
10
+ authorization_endpoint: 'https://oauth.pipedrive.com/oauth/authorize',
11
+ token_endpoint: 'https://oauth.pipedrive.com/oauth/token',
12
+ },
13
+ },
14
+ source: {
15
+ connector: 'pipedrive',
16
+ adapter: 'rest',
17
+ rest: {
18
+ base_url: 'https://api.pipedrive.com/v1',
19
+ query_auth: { api_token: '$PIPEDRIVE_API_TOKEN' },
20
+ },
21
+ filter_fields: [
22
+ {
23
+ key: 'status',
24
+ label: 'Deal status',
25
+ placeholder: 'open, won, lost, or all_not_deleted',
26
+ type: 'text',
27
+ mode: 'server',
28
+ },
29
+ // To use a saved filter: Pipedrive > Deals > Filter icon > + Add new filter > Save.
30
+ // The filter ID appears in the URL (?filter_id=123) or via GET /v1/filters?type=deals.
31
+ // Set visibility to "shared" so the filter works regardless of which user's API token is used.
32
+ {
33
+ key: 'filter_id',
34
+ label: 'Pipedrive filter ID',
35
+ placeholder: 'Saved filter ID (e.g. 1068)',
36
+ type: 'text',
37
+ mode: 'server',
38
+ },
39
+ ],
40
+ entities: {
41
+ deal: {
42
+ source_type: 'deal',
43
+ primary: true,
44
+ list_endpoint: '/deals',
45
+ detail_endpoint: '/deals/{id}',
46
+ pagination: 'offset',
47
+ page_size: 100,
48
+ id_from: 'title',
49
+ field_map: {
50
+ 'title': 'name',
51
+ 'value': 'deal_value',
52
+ 'org_name': { field: 'client', transform: 'wikilink' },
53
+ 'person_name': { field: 'contacts', transform: 'wikilink-array' },
54
+ 'expected_close_date': 'expected_close',
55
+ 'add_time': { field: 'date', transform: 'date-iso' },
56
+ 'lost_reason': 'lost_reason',
57
+ },
58
+ status_map: {
59
+ 'open': 'scoping',
60
+ 'won': 'won',
61
+ 'lost': 'lost',
62
+ },
63
+ content_tool: {
64
+ tool: '/notes',
65
+ id_param: 'deal_id',
66
+ id_from: 'id',
67
+ content_field: 'content',
68
+ },
69
+ },
70
+ person: {
71
+ list_endpoint: '/persons',
72
+ detail_endpoint: '/persons/{id}',
73
+ pagination: 'offset',
74
+ page_size: 100,
75
+ id_from: 'name',
76
+ field_map: {
77
+ 'name': 'name',
78
+ 'org_name': { field: 'organization', transform: 'wikilink' },
79
+ 'owner_name': { field: 'owner', transform: 'wikilink' },
80
+ },
81
+ },
82
+ organization: {
83
+ list_endpoint: '/organizations',
84
+ detail_endpoint: '/organizations/{id}',
85
+ pagination: 'offset',
86
+ page_size: 100,
87
+ id_from: 'name',
88
+ field_map: {
89
+ 'name': 'name',
90
+ 'address': 'address',
91
+ 'owner_name': { field: 'owner', transform: 'wikilink' },
92
+ },
93
+ },
94
+ },
95
+ },
96
+ };
97
+ //# sourceMappingURL=pipedrive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipedrive.js","sourceRoot":"","sources":["../../src/integrations/pipedrive.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAC,MAAM,SAAS,GAAgB;IACpC,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE;QACT,GAAG,EAAE,+BAA+B;QACpC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,OAAO;QACb,KAAK,EAAE;YACL,SAAS,EAAE,kBAAkB;YAC7B,iBAAiB,EAAE,yBAAyB;YAC5C,sBAAsB,EAAE,6CAA6C;YACrE,cAAc,EAAE,yCAAyC;SAC1D;KACF;IACD,MAAM,EAAE;QACN,SAAS,EAAE,WAAW;QACtB,OAAO,EAAE,MAAM;QACf,IAAI,EAAE;YACJ,QAAQ,EAAE,8BAA8B;YACxC,UAAU,EAAE,EAAE,SAAS,EAAE,sBAAsB,EAAE;SAClD;QACD,aAAa,EAAE;YACb;gBACE,GAAG,EAAE,QAAQ;gBACb,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,qCAAqC;gBAClD,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;aACf;YACD,oFAAoF;YACpF,uFAAuF;YACvF,+FAA+F;YAC/F;gBACE,GAAG,EAAE,WAAW;gBAChB,KAAK,EAAE,qBAAqB;gBAC5B,WAAW,EAAE,6BAA6B;gBAC1C,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;aACf;SACF;QACD,QAAQ,EAAE;YACR,IAAI,EAAE;gBACJ,WAAW,EAAE,MAAM;gBACnB,OAAO,EAAE,IAAI;gBACb,aAAa,EAAE,QAAQ;gBACvB,eAAe,EAAE,aAAa;gBAC9B,UAAU,EAAE,QAAQ;gBACpB,SAAS,EAAE,GAAG;gBACd,OAAO,EAAE,OAAO;gBAChB,SAAS,EAAE;oBACT,OAAO,EAAE,MAAM;oBACf,OAAO,EAAE,YAAY;oBACrB,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE;oBACtD,aAAa,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE;oBACjE,qBAAqB,EAAE,gBAAgB;oBACvC,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE;oBACpD,aAAa,EAAE,aAAa;iBAC7B;gBACD,UAAU,EAAE;oBACV,MAAM,EAAE,SAAS;oBACjB,KAAK,EAAE,KAAK;oBACZ,MAAM,EAAE,MAAM;iBACf;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,SAAS;oBACnB,OAAO,EAAE,IAAI;oBACb,aAAa,EAAE,SAAS;iBACzB;aACF;YACD,MAAM,EAAE;gBACN,aAAa,EAAE,UAAU;gBACzB,eAAe,EAAE,eAAe;gBAChC,UAAU,EAAE,QAAQ;gBACpB,SAAS,EAAE,GAAG;gBACd,OAAO,EAAE,MAAM;gBACf,SAAS,EAAE;oBACT,MAAM,EAAE,MAAM;oBACd,UAAU,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE;oBAC5D,YAAY,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE;iBACxD;aACF;YACD,YAAY,EAAE;gBACZ,aAAa,EAAE,gBAAgB;gBAC/B,eAAe,EAAE,qBAAqB;gBACtC,UAAU,EAAE,QAAQ;gBACpB,SAAS,EAAE,GAAG;gBACd,OAAO,EAAE,MAAM;gBACf,SAAS,EAAE;oBACT,MAAM,EAAE,MAAM;oBACd,SAAS,EAAE,SAAS;oBACpB,YAAY,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE;iBACxD;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Integration registry — single source of truth for all built-in connectors.
3
+ *
4
+ * Derives KNOWN_CONNECTORS and SOURCE_DEFINITIONS from the integration modules.
5
+ * To add a new integration: create a file in src/integrations/, import it here.
6
+ */
7
+ import type { Integration, ConnectorSpec } from './types.js';
8
+ import type { SourceDefinition } from '../services/sync/types.js';
9
+ export declare const INTEGRATIONS: Integration[];
10
+ /** MCP connector configs, keyed by name. Used for pre-listed connectors in the UI. */
11
+ export declare const KNOWN_CONNECTORS: Record<string, ConnectorSpec>;
12
+ /** Built-in sync source definitions, keyed by name. Only integrations with a source. */
13
+ export declare const SOURCE_DEFINITIONS: Record<string, SourceDefinition>;
14
+ export type { Integration, ConnectorSpec } from './types.js';
15
+ export type { SourceDefinition };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Integration registry — single source of truth for all built-in connectors.
3
+ *
4
+ * Derives KNOWN_CONNECTORS and SOURCE_DEFINITIONS from the integration modules.
5
+ * To add a new integration: create a file in src/integrations/, import it here.
6
+ */
7
+ import { linear } from './linear.js';
8
+ import { granola } from './granola.js';
9
+ import { asana } from './asana.js';
10
+ import { figma } from './figma.js';
11
+ import { figmaDesktop } from './figma-local.js';
12
+ import { pipedrive } from './pipedrive.js';
13
+ import { paper } from './paper-local.js';
14
+ export const INTEGRATIONS = [
15
+ linear,
16
+ granola,
17
+ asana,
18
+ figma,
19
+ figmaDesktop,
20
+ pipedrive,
21
+ paper,
22
+ ];
23
+ /** MCP connector configs, keyed by name. Used for pre-listed connectors in the UI. */
24
+ export const KNOWN_CONNECTORS = Object.fromEntries(INTEGRATIONS.map(i => [i.name, i.connector]));
25
+ /** Built-in sync source definitions, keyed by name. Only integrations with a source. */
26
+ export const SOURCE_DEFINITIONS = Object.fromEntries(INTEGRATIONS.filter(i => i.source).map(i => [i.name, i.source]));
27
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/integrations/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,MAAM,CAAC,MAAM,YAAY,GAAkB;IACzC,MAAM;IACN,OAAO;IACP,KAAK;IACL,KAAK;IACL,YAAY;IACZ,SAAS;IACT,KAAK;CACN,CAAC;AAEF,sFAAsF;AACtF,MAAM,CAAC,MAAM,gBAAgB,GAC3B,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAEnE,wFAAwF;AACxF,MAAM,CAAC,MAAM,kBAAkB,GAC7B,MAAM,CAAC,WAAW,CAChB,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAO,CAAC,CAAC,CACjE,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Integration — a single file defines everything about a third-party connector:
3
+ * MCP config, sync source definition, and metadata.
4
+ *
5
+ * The registry auto-collects all integrations and derives KNOWN_CONNECTORS
6
+ * and SOURCE_DEFINITIONS from them.
7
+ */
8
+ import type { SourceDefinition } from '../services/sync/types.js';
9
+ /** Pre-registered OAuth app credentials for connectors that don't support dynamic client registration. */
10
+ export interface OAuthAppConfig {
11
+ /** OAuth client ID (public — safe to bake into code) */
12
+ client_id: string;
13
+ /** Env var name containing the client secret (e.g. 'PIPEDRIVE_CLIENT_SECRET') */
14
+ client_secret_env?: string;
15
+ /** Override authorization endpoint (when provider uses a different domain than the MCP server) */
16
+ authorization_endpoint?: string;
17
+ /** Override token endpoint */
18
+ token_endpoint?: string;
19
+ }
20
+ export interface ConnectorSpec {
21
+ url: string;
22
+ description: string;
23
+ auth: 'oauth' | 'none';
24
+ /** Pre-registered OAuth app credentials. Required for providers that don't support dynamic client registration. */
25
+ oauth?: OAuthAppConfig;
26
+ }
27
+ export interface Integration {
28
+ /** Unique name used as connector/source key (e.g. 'linear', 'granola') */
29
+ name: string;
30
+ /** MCP connector config */
31
+ connector: ConnectorSpec;
32
+ /** Sync source definition (optional — some connectors don't have sync, e.g. Paper) */
33
+ source?: SourceDefinition;
34
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Integration — a single file defines everything about a third-party connector:
3
+ * MCP config, sync source definition, and metadata.
4
+ *
5
+ * The registry auto-collects all integrations and derives KNOWN_CONNECTORS
6
+ * and SOURCE_DEFINITIONS from them.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -4,54 +4,65 @@
4
4
  * Connects the Studiograph agent to third-party MCP servers so the agent can
5
5
  * query external data sources on demand.
6
6
  *
7
- * Three transport types are supported:
7
+ * Only HTTP transport is supported (Streamable HTTP). Connectors are configured
8
+ * with a URL and optional headers — same format as Cursor/Claude Code MCP configs.
8
9
  *
9
- * http — Remote streamable-HTTP server (e.g. Linear at https://mcp.linear.app/mcp).
10
- * Requires `url` and `token` fields. Token can be a literal string or a
11
- * $ENV_VAR reference resolved at runtime.
10
+ * Two-layer config:
12
11
  *
13
- * oauth Remote streamable-HTTP server with OAuth (e.g. Figma at mcp.figma.com/mcp).
14
- * Requires `url` only. Uses dynamic client registration + PKCE — no client
15
- * secrets needed. Browser opens for user authorization on first connect.
12
+ * Workspace layer (.studiograph/connectors/<name>.json)
13
+ * Non-secret transport config committed to git. Secrets replaced with
14
+ * $ENV_VAR placeholders resolved at runtime.
16
15
  *
17
- * stdio Local stdio MCP server (e.g. granola-mcp spawned as a child process).
18
- * Requires `command` and optionally `args` / `env`. No token needed —
19
- * the server reads its own credentials from wherever it stores them.
20
- *
21
- * Connector configs are stored per-user at ~/.studiograph/connectors/<name>.json
22
- * (mode 0600 — never committed to git).
16
+ * Homedir layer (~/.studiograph/connectors/<name>.json)
17
+ * Full config with literal secrets (mode 0600, never committed).
18
+ * When present, homedir fields override workspace fields.
23
19
  *
24
20
  * Each connector's tools are injected into the agent with a namespaced prefix:
25
- * linear__search_issues, granola__list_meetings, etc.
21
+ * linear__search_issues, etc.
26
22
  *
27
23
  * Connection failures are non-fatal — the failing connector is skipped with a warning.
28
24
  */
29
25
  export declare const CONNECTORS_DIR: string;
30
- export type ConnectorType = 'http' | 'oauth' | 'stdio';
31
26
  export interface ConnectorConfig {
32
27
  /** Unique name used as the tool prefix (e.g. "linear" → "linear__search_issues") */
33
28
  name: string;
34
- /** Transport type defaults to "http" if `url` is present, "stdio" if `command` is present */
35
- type?: ConnectorType;
29
+ /** Remote MCP server URL */
30
+ url: string;
31
+ /** HTTP headers (e.g. { "Authorization": "Bearer ..." }) */
32
+ headers?: Record<string, string>;
36
33
  /** Human-readable description shown in tool labels */
37
34
  description?: string;
38
- /** Remote MCP server URL (http type) */
39
- url?: string;
40
- /** Bearer token or $ENV_VAR reference (http type) */
41
- token?: string;
42
- /** Executable to spawn (stdio type) */
43
- command?: string;
44
- /** Arguments passed to the command (stdio type) */
45
- args?: string[];
46
- /** Extra environment variables for the child process (stdio type) */
47
- env?: Record<string, string>;
35
+ /** Auth mode: 'oauth' uses per-user OAuth tokens, 'headers' uses manual headers, 'none' for local connectors */
36
+ auth?: 'headers' | 'oauth' | 'none';
48
37
  }
38
+ /** Pre-listed connectors — derived from integration registry. */
39
+ export { KNOWN_CONNECTORS } from '../integrations/registry.js';
49
40
  export declare class ConnectorManager {
50
- static loadConfigs(): ConnectorConfig[];
41
+ /**
42
+ * Load all connector configs, merging workspace + homedir layers.
43
+ * When workspacePath is provided, reads .studiograph/connectors/ first,
44
+ * then overlays homedir configs (homedir fields win).
45
+ */
46
+ static loadConfigs(workspacePath?: string): ConnectorConfig[];
47
+ /**
48
+ * Load connector configs from workspace .studiograph/connectors/ only.
49
+ * Used by the config bundle export endpoint.
50
+ */
51
+ static loadWorkspaceConfigs(workspacePath: string): ConnectorConfig[];
52
+ /** Save full config to homedir (mode 0600, never committed). */
51
53
  static saveConfig(config: ConnectorConfig): void;
52
- static removeConfig(name: string): boolean;
54
+ /** Save sanitized config to workspace .studiograph/connectors/ (git-tracked). */
55
+ static saveWorkspaceConfig(config: ConnectorConfig, workspacePath: string): void;
56
+ static removeConfig(name: string, workspacePath?: string): boolean;
57
+ /** Load a single connector, merging workspace + homedir layers. */
58
+ static loadConfig(name: string, workspacePath?: string): ConnectorConfig | null;
59
+ /**
60
+ * Strip secret fields from a connector config, replacing them with $ENV_VAR
61
+ * placeholders. Safe to commit to git.
62
+ */
63
+ static stripSecrets(config: ConnectorConfig): ConnectorConfig;
53
64
  /** Expands $ENV_VAR references; returns the literal string otherwise. */
54
- static resolveToken(token: string): string;
65
+ static resolveEnvVar(value: string): string;
55
66
  /**
56
67
  * For each connector config: connect to the MCP server, fetch its tool list,
57
68
  * and return Pi-Mono-compatible tool objects with namespaced names.
@@ -59,7 +70,10 @@ export declare class ConnectorManager {
59
70
  * Failures are non-fatal — the connector is skipped with a console.warn.
60
71
  */
61
72
  static buildTools(configs: ConnectorConfig[], timeoutMs?: number): Promise<any[]>;
62
- private static _resolveType;
73
+ /** Read all valid connector configs from a directory. */
74
+ private static _readDir;
75
+ /** Merge two configs for the same connector — overlay fields win over base. */
76
+ private static _merge;
63
77
  private static _validate;
64
78
  private static _buildConnectorTools;
65
79
  }