@tickernelz/paperclip-pro-shared 2026.1006.0 → 2026.1006.2

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 (302) hide show
  1. package/dist/.paperclip-build-complete +1 -1
  2. package/dist/aggregator-app-catalog.d.ts +26 -0
  3. package/dist/aggregator-app-catalog.d.ts.map +1 -0
  4. package/dist/aggregator-app-catalog.js +72 -0
  5. package/dist/aggregator-app-catalog.js.map +1 -0
  6. package/dist/aggregator-app-catalog.test.d.ts +2 -0
  7. package/dist/aggregator-app-catalog.test.d.ts.map +1 -0
  8. package/dist/aggregator-app-catalog.test.js +45 -0
  9. package/dist/aggregator-app-catalog.test.js.map +1 -0
  10. package/dist/aggregator-apps.d.ts +41 -0
  11. package/dist/aggregator-apps.d.ts.map +1 -0
  12. package/dist/aggregator-apps.js +34 -0
  13. package/dist/aggregator-apps.js.map +1 -0
  14. package/dist/ai-connection-router.d.ts +352 -0
  15. package/dist/ai-connection-router.d.ts.map +1 -0
  16. package/dist/ai-connection-router.js +55 -0
  17. package/dist/ai-connection-router.js.map +1 -0
  18. package/dist/ai-connection-usage.d.ts +48 -0
  19. package/dist/ai-connection-usage.d.ts.map +1 -0
  20. package/dist/ai-connection-usage.js +6 -0
  21. package/dist/ai-connection-usage.js.map +1 -0
  22. package/dist/ai-connections.d.ts +7 -0
  23. package/dist/ai-connections.d.ts.map +1 -1
  24. package/dist/ai-connections.js +7 -5
  25. package/dist/ai-connections.js.map +1 -1
  26. package/dist/app-definitions/agentmail.json +1 -1
  27. package/dist/app-definitions/airtable.json +10 -1
  28. package/dist/app-definitions/api-key-generic.json +2 -1
  29. package/dist/app-definitions/asana.json +37 -6
  30. package/dist/app-definitions/beehiiv.json +5 -1
  31. package/dist/app-definitions/bitly.json +2 -1
  32. package/dist/app-definitions/brex.json +23 -1
  33. package/dist/app-definitions/browser-use-cloud.json +53 -0
  34. package/dist/app-definitions/candid.json +6 -1
  35. package/dist/app-definitions/clickhouse.json +8 -1
  36. package/dist/app-definitions/cloudflare.json +7 -2
  37. package/dist/app-definitions/cloudinary.json +10 -1
  38. package/dist/app-definitions/coda.json +6 -2
  39. package/dist/app-definitions/cognee.json +76 -0
  40. package/dist/app-definitions/embat.json +7 -1
  41. package/dist/app-definitions/fireflies.json +2 -1
  42. package/dist/app-definitions/github-code-review-bot.json +57 -0
  43. package/dist/app-definitions/github.json +4 -43
  44. package/dist/app-definitions/google-calendar.json +0 -2
  45. package/dist/app-definitions/google-docs.json +0 -6
  46. package/dist/app-definitions/google-sheets.json +0 -6
  47. package/dist/app-definitions/google-slides.json +0 -6
  48. package/dist/app-definitions/honcho.json +73 -0
  49. package/dist/app-definitions/hugging-face.json +4 -1
  50. package/dist/app-definitions/kernel.json +6 -2
  51. package/dist/app-definitions/linear.json +2 -1
  52. package/dist/app-definitions/local-falcon.json +5 -1
  53. package/dist/app-definitions/manufact.json +7 -1
  54. package/dist/app-definitions/mem0.json +12 -6
  55. package/dist/app-definitions/miro.json +7 -1
  56. package/dist/app-definitions/mixpanel.json +27 -1
  57. package/dist/app-definitions/neon.json +155 -0
  58. package/dist/app-definitions/netlify.json +6 -1
  59. package/dist/app-definitions/notion.json +4 -1
  60. package/dist/app-definitions/oreilly.json +7 -2
  61. package/dist/app-definitions/pagerduty.json +4 -2
  62. package/dist/app-definitions/planetscale.json +12 -2
  63. package/dist/app-definitions/posthog.json +2 -1
  64. package/dist/app-definitions/postman.json +6 -3
  65. package/dist/app-definitions/razorpay.json +2 -1
  66. package/dist/app-definitions/resend.json +4 -1
  67. package/dist/app-definitions/sanity.json +6 -2
  68. package/dist/app-definitions/sentry.json +8 -1
  69. package/dist/app-definitions/similarweb.json +2 -1
  70. package/dist/app-definitions/slack.json +28 -1
  71. package/dist/app-definitions/stripe.json +6 -2
  72. package/dist/app-definitions/supabase.json +22 -4
  73. package/dist/app-definitions/supermemory.json +55 -0
  74. package/dist/app-definitions/ticktick.json +5 -1
  75. package/dist/app-definitions/todoist.json +4 -1
  76. package/dist/app-definitions/vercel.json +4 -1
  77. package/dist/app-definitions/wix.json +4 -1
  78. package/dist/app-definitions/youcom.json +7 -2
  79. package/dist/app-definitions/zep.json +54 -0
  80. package/dist/app-definitions-url.test.js +4 -2
  81. package/dist/app-definitions-url.test.js.map +1 -1
  82. package/dist/app-definitions.d.ts +5 -1
  83. package/dist/app-definitions.d.ts.map +1 -1
  84. package/dist/app-definitions.generated.d.ts.map +1 -1
  85. package/dist/app-definitions.generated.js +78 -71
  86. package/dist/app-definitions.generated.js.map +1 -1
  87. package/dist/app-definitions.js +18 -7
  88. package/dist/app-definitions.js.map +1 -1
  89. package/dist/app-definitions.test.js +173 -46
  90. package/dist/app-definitions.test.js.map +1 -1
  91. package/dist/arcade-app-catalog.json +1602 -0
  92. package/dist/asana-connectors.d.ts +7 -0
  93. package/dist/asana-connectors.d.ts.map +1 -0
  94. package/dist/asana-connectors.js +8 -0
  95. package/dist/asana-connectors.js.map +1 -0
  96. package/dist/browser-use.d.ts +107 -0
  97. package/dist/browser-use.d.ts.map +1 -0
  98. package/dist/browser-use.js +98 -0
  99. package/dist/browser-use.js.map +1 -0
  100. package/dist/composio-app-setup.d.ts +65 -0
  101. package/dist/composio-app-setup.d.ts.map +1 -0
  102. package/dist/composio-app-setup.js +17 -0
  103. package/dist/composio-app-setup.js.map +1 -0
  104. package/dist/composio-search-catalog.json +1589 -0
  105. package/dist/connection-instructions.d.ts +34 -0
  106. package/dist/connection-instructions.d.ts.map +1 -0
  107. package/dist/connection-instructions.js +48 -0
  108. package/dist/connection-instructions.js.map +1 -0
  109. package/dist/connection-instructions.test.d.ts +2 -0
  110. package/dist/connection-instructions.test.d.ts.map +1 -0
  111. package/dist/connection-instructions.test.js +84 -0
  112. package/dist/connection-instructions.test.js.map +1 -0
  113. package/dist/connection-intent-guidance.d.ts +2 -2
  114. package/dist/connection-intent-guidance.d.ts.map +1 -1
  115. package/dist/connection-intent-guidance.js +7 -20
  116. package/dist/connection-intent-guidance.js.map +1 -1
  117. package/dist/connection-intent-guidance.test.js +15 -54
  118. package/dist/connection-intent-guidance.test.js.map +1 -1
  119. package/dist/connection-routing.d.ts +33 -0
  120. package/dist/connection-routing.d.ts.map +1 -0
  121. package/dist/connection-routing.js +309 -0
  122. package/dist/connection-routing.js.map +1 -0
  123. package/dist/connection-routing.test.d.ts +2 -0
  124. package/dist/connection-routing.test.d.ts.map +1 -0
  125. package/dist/connection-routing.test.js +73 -0
  126. package/dist/connection-routing.test.js.map +1 -0
  127. package/dist/connection-search.d.ts +15 -0
  128. package/dist/connection-search.d.ts.map +1 -0
  129. package/dist/connection-search.js +75 -0
  130. package/dist/connection-search.js.map +1 -0
  131. package/dist/connection-search.test.d.ts +2 -0
  132. package/dist/connection-search.test.d.ts.map +1 -0
  133. package/dist/connection-search.test.js +37 -0
  134. package/dist/connection-search.test.js.map +1 -0
  135. package/dist/connection-setup-state.d.ts +32 -0
  136. package/dist/connection-setup-state.d.ts.map +1 -0
  137. package/dist/connection-setup-state.js +74 -0
  138. package/dist/connection-setup-state.js.map +1 -0
  139. package/dist/connection-setup-state.test.d.ts +2 -0
  140. package/dist/connection-setup-state.test.d.ts.map +1 -0
  141. package/dist/connection-setup-state.test.js +92 -0
  142. package/dist/connection-setup-state.test.js.map +1 -0
  143. package/dist/constants.d.ts +2 -2
  144. package/dist/constants.d.ts.map +1 -1
  145. package/dist/constants.js +2 -1
  146. package/dist/constants.js.map +1 -1
  147. package/dist/feature-catalog.d.ts.map +1 -1
  148. package/dist/feature-catalog.js +24 -5
  149. package/dist/feature-catalog.js.map +1 -1
  150. package/dist/github-skill-repository.d.ts +7 -0
  151. package/dist/github-skill-repository.d.ts.map +1 -0
  152. package/dist/github-skill-repository.js +29 -0
  153. package/dist/github-skill-repository.js.map +1 -0
  154. package/dist/google-workspace-connectors.js +7 -7
  155. package/dist/google-workspace-connectors.js.map +1 -1
  156. package/dist/heartbeat-inbox.d.ts +5 -0
  157. package/dist/heartbeat-inbox.d.ts.map +1 -0
  158. package/dist/heartbeat-inbox.js +10 -0
  159. package/dist/heartbeat-inbox.js.map +1 -0
  160. package/dist/index.d.ts +26 -4
  161. package/dist/index.d.ts.map +1 -1
  162. package/dist/index.js +23 -3
  163. package/dist/index.js.map +1 -1
  164. package/dist/issue-thread-interactions.test.js +53 -0
  165. package/dist/issue-thread-interactions.test.js.map +1 -1
  166. package/dist/memory-connectors.d.ts +5 -0
  167. package/dist/memory-connectors.d.ts.map +1 -0
  168. package/dist/memory-connectors.js +6 -0
  169. package/dist/memory-connectors.js.map +1 -0
  170. package/dist/memory-connectors.test.d.ts +2 -0
  171. package/dist/memory-connectors.test.d.ts.map +1 -0
  172. package/dist/memory-connectors.test.js +33 -0
  173. package/dist/memory-connectors.test.js.map +1 -0
  174. package/dist/question-set.d.ts +4 -0
  175. package/dist/question-set.d.ts.map +1 -0
  176. package/dist/question-set.js +48 -0
  177. package/dist/question-set.js.map +1 -0
  178. package/dist/remote-mcp-connectors.test.js +4 -4
  179. package/dist/remote-mcp-connectors.test.js.map +1 -1
  180. package/dist/self-serve-mcp-research.json +7 -2
  181. package/dist/settings-visibility-catalog-growth.test.d.ts +2 -0
  182. package/dist/settings-visibility-catalog-growth.test.d.ts.map +1 -0
  183. package/dist/settings-visibility-catalog-growth.test.js +15 -0
  184. package/dist/settings-visibility-catalog-growth.test.js.map +1 -0
  185. package/dist/settings-visibility.d.ts +13 -5
  186. package/dist/settings-visibility.d.ts.map +1 -1
  187. package/dist/settings-visibility.js +27 -5
  188. package/dist/settings-visibility.js.map +1 -1
  189. package/dist/settings-visibility.test.js +37 -0
  190. package/dist/settings-visibility.test.js.map +1 -1
  191. package/dist/slack-tools.d.ts +57 -3
  192. package/dist/slack-tools.d.ts.map +1 -1
  193. package/dist/slack-tools.js +25 -4
  194. package/dist/slack-tools.js.map +1 -1
  195. package/dist/telemetry/generated/paperclip-telemetry.d.ts +3 -0
  196. package/dist/telemetry/generated/paperclip-telemetry.d.ts.map +1 -1
  197. package/dist/telemetry/generated/paperclip-telemetry.js.map +1 -1
  198. package/dist/types/agent.d.ts +67 -1
  199. package/dist/types/agent.d.ts.map +1 -1
  200. package/dist/types/agent.js.map +1 -1
  201. package/dist/types/app-definition.d.ts +5 -0
  202. package/dist/types/app-definition.d.ts.map +1 -1
  203. package/dist/types/asset.d.ts +1 -0
  204. package/dist/types/asset.d.ts.map +1 -1
  205. package/dist/types/company-skill.d.ts +6 -0
  206. package/dist/types/company-skill.d.ts.map +1 -1
  207. package/dist/types/connection-intent.d.ts +27 -1
  208. package/dist/types/connection-intent.d.ts.map +1 -1
  209. package/dist/types/email.d.ts +13 -0
  210. package/dist/types/email.d.ts.map +1 -1
  211. package/dist/types/execution-continuation.d.ts +5 -0
  212. package/dist/types/execution-continuation.d.ts.map +1 -1
  213. package/dist/types/execution-projection.d.ts +9 -0
  214. package/dist/types/execution-projection.d.ts.map +1 -1
  215. package/dist/types/execution-projection.js.map +1 -1
  216. package/dist/types/index.d.ts +4 -1
  217. package/dist/types/index.d.ts.map +1 -1
  218. package/dist/types/index.js +1 -0
  219. package/dist/types/index.js.map +1 -1
  220. package/dist/types/instance.d.ts +6 -2
  221. package/dist/types/instance.d.ts.map +1 -1
  222. package/dist/types/instance.js.map +1 -1
  223. package/dist/types/issue.d.ts +39 -2
  224. package/dist/types/issue.d.ts.map +1 -1
  225. package/dist/types/plugin.d.ts +12 -0
  226. package/dist/types/plugin.d.ts.map +1 -1
  227. package/dist/types/project.d.ts +16 -0
  228. package/dist/types/project.d.ts.map +1 -1
  229. package/dist/types/skill-source.d.ts +135 -0
  230. package/dist/types/skill-source.d.ts.map +1 -0
  231. package/dist/types/skill-source.js +2 -0
  232. package/dist/types/skill-source.js.map +1 -0
  233. package/dist/types/tool-access.d.ts +3 -0
  234. package/dist/types/tool-access.d.ts.map +1 -1
  235. package/dist/types/tool-access.js.map +1 -1
  236. package/dist/validators/agent.d.ts +38 -11
  237. package/dist/validators/agent.d.ts.map +1 -1
  238. package/dist/validators/agent.js +15 -4
  239. package/dist/validators/agent.js.map +1 -1
  240. package/dist/validators/app-definition.d.ts +19 -0
  241. package/dist/validators/app-definition.d.ts.map +1 -1
  242. package/dist/validators/app-definition.js +13 -2
  243. package/dist/validators/app-definition.js.map +1 -1
  244. package/dist/validators/artifact.d.ts +1 -0
  245. package/dist/validators/artifact.d.ts.map +1 -1
  246. package/dist/validators/artifact.js +2 -0
  247. package/dist/validators/artifact.js.map +1 -1
  248. package/dist/validators/company-portability.d.ts +24 -0
  249. package/dist/validators/company-portability.d.ts.map +1 -1
  250. package/dist/validators/company-skill.d.ts +27 -0
  251. package/dist/validators/company-skill.d.ts.map +1 -1
  252. package/dist/validators/company-skill.js +8 -0
  253. package/dist/validators/company-skill.js.map +1 -1
  254. package/dist/validators/connection-intent.d.ts +5 -0
  255. package/dist/validators/connection-intent.d.ts.map +1 -1
  256. package/dist/validators/connection-intent.js +6 -1
  257. package/dist/validators/connection-intent.js.map +1 -1
  258. package/dist/validators/connection-intent.test.js +22 -0
  259. package/dist/validators/connection-intent.test.js.map +1 -1
  260. package/dist/validators/email.d.ts +5 -0
  261. package/dist/validators/email.d.ts.map +1 -1
  262. package/dist/validators/email.js +4 -0
  263. package/dist/validators/email.js.map +1 -1
  264. package/dist/validators/index.d.ts +4 -2
  265. package/dist/validators/index.d.ts.map +1 -1
  266. package/dist/validators/index.js +4 -2
  267. package/dist/validators/index.js.map +1 -1
  268. package/dist/validators/instance.d.ts +9 -2
  269. package/dist/validators/instance.d.ts.map +1 -1
  270. package/dist/validators/instance.js +5 -2
  271. package/dist/validators/instance.js.map +1 -1
  272. package/dist/validators/issue.d.ts +274 -7
  273. package/dist/validators/issue.d.ts.map +1 -1
  274. package/dist/validators/issue.js +81 -10
  275. package/dist/validators/issue.js.map +1 -1
  276. package/dist/validators/issue.test.js +10 -1
  277. package/dist/validators/issue.test.js.map +1 -1
  278. package/dist/validators/plugin.d.ts +11 -0
  279. package/dist/validators/plugin.d.ts.map +1 -1
  280. package/dist/validators/plugin.js +5 -0
  281. package/dist/validators/plugin.js.map +1 -1
  282. package/dist/validators/plugin.test.js +14 -0
  283. package/dist/validators/plugin.test.js.map +1 -1
  284. package/dist/validators/project.d.ts +4 -0
  285. package/dist/validators/project.d.ts.map +1 -1
  286. package/dist/validators/project.js +4 -0
  287. package/dist/validators/project.js.map +1 -1
  288. package/dist/validators/skill-source.d.ts +29 -0
  289. package/dist/validators/skill-source.d.ts.map +1 -0
  290. package/dist/validators/skill-source.js +26 -0
  291. package/dist/validators/skill-source.js.map +1 -0
  292. package/dist/validators/tool-access.d.ts +35 -0
  293. package/dist/validators/tool-access.d.ts.map +1 -1
  294. package/dist/validators/tool-access.js +4 -0
  295. package/dist/validators/tool-access.js.map +1 -1
  296. package/dist/workspace-restore.d.ts +8 -0
  297. package/dist/workspace-restore.d.ts.map +1 -0
  298. package/dist/workspace-restore.js +28 -0
  299. package/dist/workspace-restore.js.map +1 -0
  300. package/dist/worktree-port-registry.test.js +162 -31
  301. package/dist/worktree-port-registry.test.js.map +1 -1
  302. package/package.json +1 -1
@@ -0,0 +1,34 @@
1
+ import { z } from "zod";
2
+ import type { AppDefinition } from "./types/app-definition.js";
3
+ export declare const CONNECTION_INSTRUCTIONS_MAX_LENGTH = 2000;
4
+ /** Optional catalog capability. It is independent of provider and transport. */
5
+ export declare const connectionInstructionTemplateSchema: z.ZodObject<{
6
+ id: z.ZodString;
7
+ version: z.ZodNumber;
8
+ text: z.ZodString;
9
+ }, z.core.$strip>;
10
+ export type ConnectionInstructionTemplate = z.infer<typeof connectionInstructionTemplateSchema>;
11
+ /** Connection-owned settings; custom connections need not have a template. */
12
+ export declare const connectionAgentInstructionsSchema: z.ZodObject<{
13
+ enabled: z.ZodBoolean;
14
+ text: z.ZodString;
15
+ template: z.ZodOptional<z.ZodObject<{
16
+ id: z.ZodString;
17
+ version: z.ZodNumber;
18
+ }, z.core.$strip>>;
19
+ }, z.core.$strip>;
20
+ export type ConnectionAgentInstructions = z.infer<typeof connectionAgentInstructionsSchema>;
21
+ export declare function defaultConnectionAgentInstructions(template: ConnectionInstructionTemplate | null | undefined): ConnectionAgentInstructions | null;
22
+ /** The server supplies this immutable snapshot, never the wake request author. */
23
+ export interface ConnectionInstructionsSnapshot {
24
+ text: string;
25
+ digest: string;
26
+ }
27
+ /** Older connections can retain catalog metadata only in transportConfig. */
28
+ export declare function connectionInstructionsConfig(connection: {
29
+ config?: Record<string, unknown> | null;
30
+ transportConfig?: Record<string, unknown> | null;
31
+ }): Record<string, unknown>;
32
+ /** Only public configuration fields declared by the connector enter prompts. */
33
+ export declare function connectionInstructionContext(app: AppDefinition | null | undefined, config: Record<string, unknown>): Record<string, string | boolean> | null;
34
+ //# sourceMappingURL=connection-instructions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-instructions.d.ts","sourceRoot":"","sources":["../src/connection-instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,eAAO,MAAM,kCAAkC,OAAO,CAAC;AAEvD,gFAAgF;AAChF,eAAO,MAAM,mCAAmC;;;;iBAI9C,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEhG,8EAA8E;AAC9E,eAAO,MAAM,iCAAiC;;;;;;;iBAO5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,6BAA6B,GAAG,IAAI,GAAG,SAAS,GACzD,2BAA2B,GAAG,IAAI,CAMpC;AAED,kFAAkF;AAClF,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,6EAA6E;AAC7E,wBAAgB,4BAA4B,CAAC,UAAU,EAAE;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAClD,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1B;AAED,gFAAgF;AAChF,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,EACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI,CAazC"}
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ export const CONNECTION_INSTRUCTIONS_MAX_LENGTH = 2000;
3
+ /** Optional catalog capability. It is independent of provider and transport. */
4
+ export const connectionInstructionTemplateSchema = z.object({
5
+ id: z.string().trim().min(1).max(160),
6
+ version: z.number().int().positive(),
7
+ text: z.string().trim().min(1).max(CONNECTION_INSTRUCTIONS_MAX_LENGTH),
8
+ });
9
+ /** Connection-owned settings; custom connections need not have a template. */
10
+ export const connectionAgentInstructionsSchema = z.object({
11
+ enabled: z.boolean(),
12
+ text: z.string().trim().min(1).max(CONNECTION_INSTRUCTIONS_MAX_LENGTH),
13
+ template: z.object({
14
+ id: z.string().trim().min(1).max(160),
15
+ version: z.number().int().positive(),
16
+ }).optional(),
17
+ });
18
+ export function defaultConnectionAgentInstructions(template) {
19
+ return template ? {
20
+ enabled: true,
21
+ text: template.text,
22
+ template: { id: template.id, version: template.version },
23
+ } : null;
24
+ }
25
+ /** Older connections can retain catalog metadata only in transportConfig. */
26
+ export function connectionInstructionsConfig(connection) {
27
+ return { ...connection.transportConfig, ...connection.config };
28
+ }
29
+ /** Only public configuration fields declared by the connector enter prompts. */
30
+ export function connectionInstructionContext(app, config) {
31
+ const method = app?.methods.find((entry) => entry.key === config.connectionMethodKey) ?? app?.methods[0];
32
+ const values = config.methodConfig && typeof config.methodConfig === "object" && !Array.isArray(config.methodConfig)
33
+ ? config.methodConfig : {};
34
+ const context = {};
35
+ for (const field of [...(method?.tenantFields ?? []), ...(method?.extensionFields ?? [])]) {
36
+ if (field.secret || field.type === "password")
37
+ continue;
38
+ const value = values[field.key] ?? field.defaultValue;
39
+ if (field.required && (value === undefined || value === null || (typeof value === "string" && !value.trim())))
40
+ return null;
41
+ if (typeof value === "string" && value.trim())
42
+ context[field.key] = value.trim();
43
+ else if (typeof value === "boolean")
44
+ context[field.key] = value;
45
+ }
46
+ return context;
47
+ }
48
+ //# sourceMappingURL=connection-instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-instructions.js","sourceRoot":"","sources":["../src/connection-instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,kCAAkC,GAAG,IAAI,CAAC;AAEvD,gFAAgF;AAChF,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACrC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,kCAAkC,CAAC;CACvE,CAAC,CAAC;AAGH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG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AAC,EAAE,CAAC;IACxD,MAAM,OAAO,GAAqC,EAAE,CAAC;IACrD,KAAK,MAAM,KAAK,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,YAAY,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;QAC1F,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU;YAAE,SAAS;QACxD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC;QACtD,IAAI,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QAC3H,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;aAC5E,IAAI,OAAO,KAAK,KAAK,SAAS;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAClE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=connection-instructions.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-instructions.test.d.ts","sourceRoot":"","sources":["../src/connection-instructions.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,84 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { execFileSync } from "node:child_process";
3
+ import { cpSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
4
+ import { tmpdir } from "node:os";
5
+ import { dirname, join } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+ import { connectionAgentInstructionsSchema, connectionInstructionContext, defaultConnectionAgentInstructions } from "./connection-instructions.js";
8
+ import { getConnectableAppDefinition } from "./app-definitions.js";
9
+ import { connectToolAppSchema, createToolConnectionSchema, finishToolAppSchema, updateToolConnectionSchema } from "./validators/tool-access.js";
10
+ import { appDefinitionSchema } from "./validators/app-definition.js";
11
+ describe("generic connection instructions", () => {
12
+ it.each(["honcho", "mem0", "zep", "supermemory", "cognee"])("validates and enables the reviewed %s default", (slug) => {
13
+ const app = appDefinitionSchema.parse(getConnectableAppDefinition(slug));
14
+ const settings = connectionAgentInstructionsSchema.parse(defaultConnectionAgentInstructions(app.agentInstructions));
15
+ expect(settings.enabled).toBe(true);
16
+ expect(settings.template?.version).toBeGreaterThan(0);
17
+ expect(settings.text).toContain("current task");
18
+ expect(settings.text).toContain("approvals");
19
+ });
20
+ it("supports non-memory templates and saved settings without a template", () => {
21
+ const app = { ...getConnectableAppDefinition("notion"), agentInstructions: { id: "handbook", version: 1, text: "Consult the current release checklist." } };
22
+ expect(appDefinitionSchema.parse(app).agentInstructions).toEqual(app.agentInstructions);
23
+ const value = { enabled: false, text: "Keep this custom paragraph." };
24
+ expect(updateToolConnectionSchema.parse({ agentInstructions: value }).agentInstructions).toEqual(value);
25
+ expect(connectToolAppSchema.parse({ galleryKey: "notion", agentInstructions: value }).agentInstructions).toEqual(value);
26
+ expect(finishToolAppSchema.parse({ enabledCatalogEntryIds: [], askFirstCatalogEntryIds: [], access: "all_agents", agentInstructions: value }).agentInstructions).toEqual(value);
27
+ expect(createToolConnectionSchema.parse({ name: "Handbook", transport: "mcp_remote", agentInstructions: value }).agentInstructions).toEqual(value);
28
+ expect(defaultConnectionAgentInstructions(getConnectableAppDefinition("notion")?.agentInstructions)).toBeNull();
29
+ });
30
+ it("withholds unconfigured instructions and never includes secret fields", () => {
31
+ const app = getConnectableAppDefinition("honcho");
32
+ expect(connectionInstructionContext(app, { methodConfig: { workspaceId: " " } })).toBeNull();
33
+ expect(connectionInstructionContext(app, { methodConfig: { workspaceId: " team ", apiKey: "secret" } })).toEqual({ workspaceId: "team" });
34
+ });
35
+ it("allows explicit clearing and rejects blank or unbounded text", () => {
36
+ expect(updateToolConnectionSchema.parse({ agentInstructions: null }).agentInstructions).toBeNull();
37
+ expect(connectionAgentInstructionsSchema.safeParse({ enabled: true, text: " " }).success).toBe(false);
38
+ expect(connectionAgentInstructionsSchema.safeParse({ enabled: true, text: "a".repeat(2001) }).success).toBe(false);
39
+ });
40
+ it("regenerates templates from each app definition, including non-memory edits and removal", () => {
41
+ const root = fileURLToPath(new URL("../../../", import.meta.url));
42
+ const fixture = mkdtempSync(join(tmpdir(), "paperclip-app-instructions-"));
43
+ const definitions = join(fixture, "packages/shared/src/app-definitions");
44
+ const readApp = (slug) => JSON.parse(readFileSync(join(definitions, `${slug}.json`), "utf8"));
45
+ const writeApp = (slug, app) => writeFileSync(join(definitions, `${slug}.json`), JSON.stringify(app));
46
+ const generate = () => execFileSync(process.execPath, [join(root, "scripts/ingest-app-definitions.mjs"), "--definitions-only"], { cwd: fixture, stdio: "pipe" });
47
+ try {
48
+ for (const source of [
49
+ "ui/public/brands/apps/manifest.json",
50
+ "packages/shared/src/self-serve-mcp-research.json",
51
+ "doc/connections/tool-method-permission-reviews.json",
52
+ "packages/shared/src/app-definitions",
53
+ ]) {
54
+ mkdirSync(dirname(join(fixture, source)), { recursive: true });
55
+ cpSync(join(root, source), join(fixture, source), { recursive: true });
56
+ }
57
+ const notion = readApp("notion");
58
+ notion.agentInstructions = { id: "notion.handbook", version: 2, text: "Consult the current release checklist." };
59
+ writeApp("notion", notion);
60
+ generate();
61
+ expect(readApp("notion").agentInstructions).toEqual(notion.agentInstructions);
62
+ for (const slug of ["honcho", "mem0", "zep", "supermemory", "cognee"]) {
63
+ expect(readApp(slug).agentInstructions).toEqual(getConnectableAppDefinition(slug)?.agentInstructions);
64
+ }
65
+ expect(readApp("linear").agentInstructions).toBeUndefined();
66
+ notion.agentInstructions.text = "Check the updated handbook before a release.";
67
+ notion.agentInstructions.version++;
68
+ writeApp("notion", notion);
69
+ const mem0 = readApp("mem0");
70
+ delete mem0.agentInstructions;
71
+ writeApp("mem0", mem0);
72
+ generate();
73
+ expect(readApp("notion").agentInstructions).toEqual(notion.agentInstructions);
74
+ expect(readApp("mem0").agentInstructions).toBeUndefined();
75
+ notion.agentInstructions.text = " ";
76
+ writeApp("notion", notion);
77
+ expect(generate).toThrow("notion: invalid agent instruction template");
78
+ }
79
+ finally {
80
+ rmSync(fixture, { recursive: true, force: true });
81
+ }
82
+ });
83
+ });
84
+ //# sourceMappingURL=connection-instructions.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-instructions.test.js","sourceRoot":"","sources":["../src/connection-instructions.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AACnJ,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAChJ,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C,E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,CAAC,CAAC,iBAAiB,CAAC,CAAC,aAAa,EAAE,CAAC;YAE5D,MAAM,CAAC,iBAAiB,CAAC,IAAI,GAAG,8CAA8C,CAAC;YAC/E,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC;YACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC3B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;YAC7B,OAAO,IAAI,CAAC,iBAAiB,CAAC;YAC9B,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACvB,QAAQ,EAAE,CAAC;YACX,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;YAC9E,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,aAAa,EAAE,CAAC;YAE1D,MAAM,CAAC,iBAAiB,CAAC,IAAI,GAAG,GAAG,CAAC;YACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC3B,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,4CAA4C,CAAC,CAAC;QACzE,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACpD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -6,7 +6,7 @@
6
6
  * environment delivery, and MCP tool descriptions.
7
7
  */
8
8
  export declare const CONNECTION_INTENT_AGENT_GUIDANCE: string;
9
- export declare const CONNECTIONS_SEARCH_TOOL_DESCRIPTION: string;
10
- export declare const CONNECTION_REQUEST_TOOL_DESCRIPTION: string;
9
+ export declare const CONNECTIONS_SEARCH_TOOL_DESCRIPTION = "Search connections across tool, channel/email, and AI purposes with a service name or a natural-language description (up to 4000 characters). Results tolerate extra words, split names, and small typos. Choose the relevant match using its description and method purpose. Follow the returned instruction to present an inline setup card with connection_request or share the method's setupPath. Also discovers verified external aggregator apps. Use first when the user asks to connect a service, or when usable access is uncertain; follow the returned instruction and exact providerQuestion, if any. Do not use for arbitrary MCP URLs. Search is read-only.";
10
+ export declare const CONNECTION_REQUEST_TOOL_DESCRIPTION = "Request the service identifier returned by connections_search. For an existing connection with missing agent access, pass connectionId and the exact required toolNames to create an embedded Grant access card; only the human can approve it. Follow the search instruction; aggregator routes require the saved provider-selection interaction ID. Only this tool creates the real setup card. If user action is needed, finish independent work, then yield without retrying or asking for credentials in comments.";
11
11
  export declare const CONNECTION_RUNTIME_TOOL_NAMES: readonly ["connections_search", "connection_request"];
12
12
  //# sourceMappingURL=connection-intent-guidance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection-intent-guidance.d.ts","sourceRoot":"","sources":["../src/connection-intent-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,QAYjC,CAAC;AAEb,eAAO,MAAM,mCAAmC,QAIrC,CAAC;AAEZ,eAAO,MAAM,mCAAmC,QAIrC,CAAC;AAEZ,eAAO,MAAM,6BAA6B,YACxC,oBAAoB,EACpB,oBAAoB,CACZ,CAAC"}
1
+ {"version":3,"file":"connection-intent-guidance.d.ts","sourceRoot":"","sources":["../src/connection-intent-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,QAOjC,CAAC;AAEb,eAAO,MAAM,mCAAmC,gpBAAgpB,CAAC;AAEjsB,eAAO,MAAM,mCAAmC,4fAA4f,CAAC;AAE7iB,eAAO,MAAM,6BAA6B,YACxC,oBAAoB,EACpB,oBAAoB,CACZ,CAAC"}
@@ -7,27 +7,14 @@
7
7
  */
8
8
  export const CONNECTION_INTENT_AGENT_GUIDANCE = [
9
9
  "Connection tools:",
10
- "- When work requires a known external service and usable access is uncertain, call `connections_search` with the service name or capability.",
11
- "- This applies both when the user explicitly asks to connect a service and when the requested work implicitly depends on that service.",
12
- "- If search returns `ready`, use the installed connection; do not create a connection intent.",
13
- "- If search returns `available` or `needs_user_action`, call `connection_request` with the returned service identifier.",
14
- "- When the user has already asked to connect a known service, use the real connection request. Do not ask whether to connect again or imitate the Connect / Not now card with `ask_user_questions`, a generic confirmation, or a comment. Only `connection_request` creates the actual connection setup card.",
15
- "- If search returns `unavailable`, explain that the service is unavailable and do not call `connection_request`.",
16
- "- If `connection_request` returns `needs_user_action`, finish any independent work, then yield in a waiting posture. Do not retry the request, ask for credentials in comments, or claim access.",
17
- "- Do not use connection tools for arbitrary MCP URLs, unsupported services, or work that does not require an external service.",
18
- "- Keep an existing pending card across messages. Do not request again after the user declines unless they explicitly ask to retry.",
19
- "- On a continuation run after connection setup, use the newly installed connection instead of requesting it again.",
10
+ "- When the user asks to connect a service, call `connections_search` before any service tool, even if already installed. Also search when a task needs a service and usable access is uncertain. Search by its name or capability and follow the returned `instruction`.",
11
+ "- Use the returned service identifiers and connection tools for setup. Respect recorded user choices; never invent access or ask for credentials in comments.",
12
+ "- If installed tools are Off or the connection is not enabled for this agent, call `connection_request` with the saved connectionId and required toolNames. It creates a scoped human access card; never substitute a generic permission question or change permissions yourself.",
13
+ "- When waiting for user action, finish independent work, then yield without retrying or polling. On continuation, follow the recorded outcome and use the installed connection.",
14
+ "- Do not use connection tools for arbitrary MCP URLs or unrelated work.",
20
15
  ].join("\n");
21
- export const CONNECTIONS_SEARCH_TOOL_DESCRIPTION = [
22
- "Search Paperclip's catalog services and authorized configured custom connections and report this run's agent-relative access state.",
23
- "Use it when work requires a known external service and usable access is uncertain; do not use it for arbitrary MCP URLs or unrelated work.",
24
- "If the user already asked to connect the service, search and request it through the connection tools instead of asking a generic confirmation question.",
25
- ].join(" ");
26
- export const CONNECTION_REQUEST_TOOL_DESCRIPTION = [
27
- "Request access to a known connectable service for this run's agent from the responsible user.",
28
- "This creates the real Connect / Not now setup card. When the user already asked to connect, use this tool; do not recreate those choices with ask_user_questions, request_confirmation, or a comment. A generic question does not start connection setup.",
29
- "Call it only with the service identifier returned as available or needs_user_action by connections_search; if user action is needed, finish independent work, then yield without retrying or asking for credentials in comments.",
30
- ].join(" ");
16
+ export const CONNECTIONS_SEARCH_TOOL_DESCRIPTION = "Search connections across tool, channel/email, and AI purposes with a service name or a natural-language description (up to 4000 characters). Results tolerate extra words, split names, and small typos. Choose the relevant match using its description and method purpose. Follow the returned instruction to present an inline setup card with connection_request or share the method's setupPath. Also discovers verified external aggregator apps. Use first when the user asks to connect a service, or when usable access is uncertain; follow the returned instruction and exact providerQuestion, if any. Do not use for arbitrary MCP URLs. Search is read-only.";
17
+ export const CONNECTION_REQUEST_TOOL_DESCRIPTION = "Request the service identifier returned by connections_search. For an existing connection with missing agent access, pass connectionId and the exact required toolNames to create an embedded Grant access card; only the human can approve it. Follow the search instruction; aggregator routes require the saved provider-selection interaction ID. Only this tool creates the real setup card. If user action is needed, finish independent work, then yield without retrying or asking for credentials in comments.";
31
18
  export const CONNECTION_RUNTIME_TOOL_NAMES = [
32
19
  "connections_search",
33
20
  "connection_request",
@@ -1 +1 @@
1
- {"version":3,"file":"connection-intent-guidance.js","sourceRoot":"","sources":["../src/connection-intent-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,mBAAmB;IACnB,8IAA8I;IAC9I,wIAAwI;IACxI,+FAA+F;IAC/F,yHAAyH;IACzH,+SAA+S;IAC/S,kHAAkH;IAClH,kMAAkM;IAClM,gIAAgI;IAChI,oIAAoI;IACpI,oHAAoH;CACrH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,qIAAqI;IACrI,4IAA4I;IAC5I,yJAAyJ;CAC1J,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,+FAA+F;IAC/F,2PAA2P;IAC3P,kOAAkO;CACnO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,oBAAoB;IACpB,oBAAoB;CACZ,CAAC"}
1
+ {"version":3,"file":"connection-intent-guidance.js","sourceRoot":"","sources":["../src/connection-intent-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,mBAAmB;IACnB,0QAA0Q;IAC1Q,+JAA+J;IAC/J,mRAAmR;IACnR,iLAAiL;IACjL,yEAAyE;CAC1E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,mCAAmC,GAAG,6oBAA6oB,CAAC;AAEjsB,MAAM,CAAC,MAAM,mCAAmC,GAAG,yfAAyf,CAAC;AAE7iB,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,oBAAoB;IACpB,oBAAoB;CACZ,CAAC"}
@@ -1,60 +1,21 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import { CONNECTION_INTENT_AGENT_GUIDANCE, CONNECTION_REQUEST_TOOL_DESCRIPTION, CONNECTION_RUNTIME_TOOL_NAMES, CONNECTIONS_SEARCH_TOOL_DESCRIPTION, } from "./connection-intent-guidance.js";
3
- describe("connection intent agent guidance", () => {
4
- it.each([
5
- [
6
- "explicit connect request",
7
- "explicitly asks to connect",
8
- "connections_search",
9
- ],
10
- [
11
- "implicit service dependency",
12
- "implicitly depends on that service",
13
- "connections_search",
14
- ],
15
- [
16
- "already-ready service",
17
- "returns `ready`",
18
- "do not create a connection intent",
19
- ],
20
- [
21
- "available service",
22
- "returns `available` or `needs_user_action`",
23
- "connection_request",
24
- ],
25
- [
26
- "unavailable service",
27
- "returns `unavailable`",
28
- "do not call `connection_request`",
29
- ],
30
- ["arbitrary MCP URL", "arbitrary MCP URLs", "Do not use connection tools"],
31
- [
32
- "pending user action",
33
- "returns `needs_user_action`",
34
- "finish any independent work, then yield in a waiting posture",
35
- ],
36
- [
37
- "continuation run",
38
- "On a continuation run",
39
- "instead of requesting it again",
40
- ],
41
- ])("gives an explicit instruction for %s", (_scenario, trigger, action) => {
42
- expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain(trigger);
43
- expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain(action);
2
+ import { CONNECTION_INTENT_AGENT_GUIDANCE, CONNECTION_REQUEST_TOOL_DESCRIPTION, CONNECTION_RUNTIME_TOOL_NAMES, CONNECTIONS_SEARCH_TOOL_DESCRIPTION } from "./connection-intent-guidance.js";
3
+ describe("connection result guidance", () => {
4
+ it("delegates route decisions to trusted tool output instead of a provider decision tree", () => {
5
+ expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("follow the returned `instruction`");
6
+ expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("Respect recorded user choices");
7
+ expect(CONNECTION_INTENT_AGENT_GUIDANCE).not.toMatch(/Composio|Arcade|Executor|Zapier/);
8
+ expect(CONNECTION_INTENT_AGENT_GUIDANCE).not.toMatch(/https?:\/\/|bearer/);
44
9
  });
45
- it("names the canonical tools without embedding secrets or authorization URLs", () => {
46
- expect(CONNECTION_RUNTIME_TOOL_NAMES).toEqual([
47
- "connections_search",
48
- "connection_request",
49
- ]);
50
- expect(CONNECTION_INTENT_AGENT_GUIDANCE).not.toMatch(/bearer|credential value|https?:\/\//i);
10
+ it("retains waiting, credential, and arbitrary URL boundaries", () => {
11
+ expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("yield without retrying or polling");
12
+ expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("never invent access or ask for credentials in comments");
13
+ expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("arbitrary MCP URLs");
51
14
  });
52
- it("keeps MCP descriptions aligned with the guidance decision points", () => {
53
- expect(CONNECTIONS_SEARCH_TOOL_DESCRIPTION).toContain("usable access is uncertain");
54
- expect(CONNECTIONS_SEARCH_TOOL_DESCRIPTION).toContain("arbitrary MCP URLs");
55
- expect(CONNECTION_REQUEST_TOOL_DESCRIPTION).toContain("available or needs_user_action");
56
- expect(CONNECTION_REQUEST_TOOL_DESCRIPTION).toContain("finish independent work, then yield");
57
- expect(CONNECTION_REQUEST_TOOL_DESCRIPTION).toContain("without retrying");
15
+ it("describes exact questions and saved selection proof", () => {
16
+ expect(CONNECTIONS_SEARCH_TOOL_DESCRIPTION).toContain("exact providerQuestion");
17
+ expect(CONNECTION_REQUEST_TOOL_DESCRIPTION).toContain("saved provider-selection interaction ID");
18
+ expect(CONNECTION_RUNTIME_TOOL_NAMES).toEqual(["connections_search", "connection_request"]);
58
19
  });
59
20
  });
60
21
  //# sourceMappingURL=connection-intent-guidance.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection-intent-guidance.test.js","sourceRoot":"","sources":["../src/connection-intent-guidance.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,gCAAgC,EAChC,mCAAmC,EACnC,6BAA6B,EAC7B,mCAAmC,GACpC,MAAM,iCAAiC,CAAC;AAEzC,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;IAChD,EAAE,CAAC,IAAI,CAAC;QACN;YACE,0BAA0B;YAC1B,4BAA4B;YAC5B,oBAAoB;SACrB;QACD;YACE,6BAA6B;YAC7B,oCAAoC;YACpC,oBAAoB;SACrB;QACD;YACE,uBAAuB;YACvB,iBAAiB;YACjB,mCAAmC;SACpC;QACD;YACE,mBAAmB;YACnB,4CAA4C;YAC5C,oBAAoB;SACrB;QACD;YACE,qBAAqB;YACrB,uBAAuB;YACvB,kCAAkC;SACnC;QACD,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,6BAA6B,CAAC;QAC1E;YACE,qBAAqB;YACrB,6BAA6B;YAC7B,8DAA8D;SAC/D;QACD;YACE,kBAA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C,CAAC;AAC5L,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,EAAE,CAAC,sFAAsF,EAAE,GAAG,EAAE;QAC9F,MAAM,CAAC,gCAAgC,CAAC,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAC;QACxF,MAAM,CAAC,gCAAgC,CAAC,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC;QACpF,MAAM,CAAC,gCAAgC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC;QACxF,MAAM,CAAC,gCAAgC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACnE,MAAM,CAAC,gCAAgC,CAAC,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAC;QACxF,MAAM,CAAC,gCAAgC,CAAC,CAAC,SAAS,CAAC,wDAAwD,CAAC,CAAC;QAC7G,MAAM,CAAC,gCAAgC,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC7D,MAAM,CAAC,mCAAmC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;QAChF,MAAM,CAAC,mCAAmC,CAAC,CAAC,SAAS,CAAC,yCAAyC,CAAC,CAAC;QACjG,MAAM,CAAC,6BAA6B,CAAC,CAAC,OAAO,CAAC,CAAC,oBAAoB,EAAC,oBAAoB,CAAC,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { AskUserQuestionsQuestion, ConnectionSearchResultItem } from "./types/index.js";
2
+ import { type RemoteMcpConnectorId } from "./remote-mcp-connectors.js";
3
+ import { prepareConnectionSearch } from "./connection-search.js";
4
+ export declare const AGGREGATOR_PRIORITY: readonly ["composio", "arcade", "executor", "zapier"];
5
+ export declare const AGGREGATOR_NAMES: Record<RemoteMcpConnectorId, string>;
6
+ export interface AggregatorServiceDefinition {
7
+ slug: string;
8
+ name: string;
9
+ aliases: readonly string[];
10
+ providers: Partial<Record<RemoteMcpConnectorId, string>>;
11
+ evidenceUrls?: Partial<Record<RemoteMcpConnectorId, string>>;
12
+ }
13
+ export declare const AGGREGATOR_SUPPORT_INDEX: AggregatorServiceDefinition[];
14
+ export declare function searchAggregatorServices(query: string | ReturnType<typeof prepareConnectionSearch>): {
15
+ score: number;
16
+ nameScore: number;
17
+ service: AggregatorServiceDefinition;
18
+ }[];
19
+ export declare const AGGREGATOR_CATALOG_SOURCES: Partial<Record<RemoteMcpConnectorId, string>>;
20
+ export declare function normalizeConnectionQuery(value: string): string;
21
+ export declare function findAggregatorService(query: string, rankedMatches?: ReturnType<typeof searchAggregatorServices>): AggregatorServiceDefinition | undefined;
22
+ /** Preserve a provider explicitly named by the user instead of applying default ranking. */
23
+ export declare function explicitAggregatorQuery(query: string): {
24
+ provider: RemoteMcpConnectorId;
25
+ serviceQuery: string;
26
+ } | null;
27
+ export declare function parseAggregatorRoute(service: string): {
28
+ provider: "arcade" | "composio" | "executor" | "zapier";
29
+ targetService: string;
30
+ } | null;
31
+ export declare function aggregatorProviderQuestion(targetService: string, targetName: string, results: ConnectionSearchResultItem[]): AskUserQuestionsQuestion;
32
+ export declare function aggregatorContinuationInstruction(provider: RemoteMcpConnectorId, targetName: string): string;
33
+ //# sourceMappingURL=connection-routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-routing.d.ts","sourceRoot":"","sources":["../src/connection-routing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAE,uBAAuB,EAAyB,MAAM,wBA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