@zackbart/connecta 0.34.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/CHANGELOG.md +393 -0
  2. package/README.md +62 -105
  3. package/SECURITY.md +3 -2
  4. package/bin/connecta.mjs +41 -16
  5. package/bin/version.mjs +1 -1
  6. package/dist/access-tokens.d.ts +2 -1
  7. package/dist/access-tokens.js +66 -30
  8. package/dist/activity.d.ts +1 -1
  9. package/dist/activity.js +2 -0
  10. package/dist/agent-config.d.ts +23 -0
  11. package/dist/agent-config.js +59 -0
  12. package/dist/agent-description.js +16 -0
  13. package/dist/agent-identity.js +4 -4
  14. package/dist/agent-observation.js +39 -0
  15. package/dist/auth/clerk-sdk/client.d.ts +2 -0
  16. package/dist/auth/clerk-sdk/generated.js +554 -563
  17. package/dist/auth/clerk-transport.js +70 -3
  18. package/dist/auth/clerk.d.ts +13 -0
  19. package/dist/auth/clerk.js +653 -246
  20. package/dist/auth/cloudflare-access.js +46 -42
  21. package/dist/auth/downstream-client-metadata.js +2 -2
  22. package/dist/auth/downstream-oauth.js +2051 -1160
  23. package/dist/auth/downstream-revocation.js +88 -88
  24. package/dist/auth/native-call.js +20 -0
  25. package/dist/auth/native.js +184 -0
  26. package/dist/auth/oauth-start-reset.js +11 -5
  27. package/dist/auth/oauth-token-response.js +121 -102
  28. package/dist/auth/oauth-v2-migration.js +97 -78
  29. package/dist/auth/renewable-grant.js +10 -0
  30. package/dist/auth/static-oauth.js +663 -271
  31. package/dist/auth/vercel-agent.js +266 -0
  32. package/dist/auth-admission.js +204 -0
  33. package/dist/auth-elicitation.js +350 -241
  34. package/dist/authorization-handoff.js +164 -90
  35. package/dist/call-admission-context.js +3 -10
  36. package/dist/call-admission.js +2 -0
  37. package/dist/call-classification.js +9 -0
  38. package/dist/call-recovery.js +32 -13
  39. package/dist/canonical-json.js +8 -0
  40. package/dist/catalog-cache.js +369 -213
  41. package/dist/catalog-service.js +659 -530
  42. package/dist/catalog.js +5 -1
  43. package/dist/concurrency.js +0 -25
  44. package/dist/config-defaults.d.ts +1 -0
  45. package/dist/config-defaults.js +1 -0
  46. package/dist/config-schema.d.ts +3 -1
  47. package/dist/config-schema.js +13 -3
  48. package/dist/config.d.ts +40 -6
  49. package/dist/config.js +40 -26
  50. package/dist/connector-caller.d.ts +4 -0
  51. package/dist/connector-caller.js +17 -4
  52. package/dist/connectors/api-connector.d.ts +15 -7
  53. package/dist/connectors/api-connector.js +147 -57
  54. package/dist/connectors/guarded-fetch.d.ts +51 -17
  55. package/dist/connectors/guarded-fetch.js +215 -121
  56. package/dist/connectors/negotiation-cache.js +20 -10
  57. package/dist/connectors/option-shapes.js +1 -1
  58. package/dist/connectors/remote-mcp.d.ts +12 -30
  59. package/dist/connectors/remote-mcp.js +960 -564
  60. package/dist/d1.js +10 -243
  61. package/dist/derived-context.js +5 -0
  62. package/dist/describe-config.d.ts +5 -1
  63. package/dist/describe-config.js +3 -0
  64. package/dist/downstream-input.js +347 -260
  65. package/dist/errors.d.ts +87 -6
  66. package/dist/errors.js +114 -4
  67. package/dist/execute.js +87 -50
  68. package/dist/executor-admission.js +3 -0
  69. package/dist/executors/quickjs.js +163 -112
  70. package/dist/guarded-transport.js +50 -0
  71. package/dist/guest-runtime.js +1 -1
  72. package/dist/http/client.js +439 -0
  73. package/dist/http/errors.js +558 -0
  74. package/dist/http/fields.js +49 -0
  75. package/dist/http/hatch-paging.js +318 -0
  76. package/dist/http/hatch.js +1279 -0
  77. package/dist/http/json-schema.js +267 -0
  78. package/dist/http/node-transport.js +241 -0
  79. package/dist/http/oauth.js +162 -0
  80. package/dist/http/paging.js +228 -0
  81. package/dist/http/provider.js +221 -0
  82. package/dist/http/safety.js +82 -0
  83. package/dist/http/services.js +79 -0
  84. package/dist/http/tools.js +383 -0
  85. package/dist/http/vendor-index.js +138 -0
  86. package/dist/http/vendor.js +448 -0
  87. package/dist/http/write-request.js +66 -0
  88. package/dist/http-policy.d.ts +11 -0
  89. package/dist/http-policy.js +45 -0
  90. package/dist/inbound-credential.js +1 -1
  91. package/dist/index.d.ts +2 -2
  92. package/dist/index.js +4 -0
  93. package/dist/invocation-auth.js +30 -19
  94. package/dist/invocation.js +221 -87
  95. package/dist/mcp-result.js +0 -4
  96. package/dist/membership.d.ts +4 -0
  97. package/dist/meta-output.js +1 -1
  98. package/dist/meta-tools.js +534 -408
  99. package/dist/native-recovery.js +52 -0
  100. package/dist/native-tools.js +382 -0
  101. package/dist/node.d.ts +4 -3
  102. package/dist/node.js +45 -8
  103. package/dist/oauth-handoff.js +177 -104
  104. package/dist/oauth-partition.js +6 -20
  105. package/dist/oauth-sealing.js +6 -7
  106. package/dist/operation-vocabulary.js +101 -0
  107. package/dist/operator-record.d.ts +2 -2
  108. package/dist/operator-record.js +17 -4
  109. package/dist/operator-ui/agents.d.ts +5 -4
  110. package/dist/operator-ui/agents.js +17 -7
  111. package/dist/operator-ui/config-summary.js +8 -4
  112. package/dist/operator-ui/connection-map.js +9 -6
  113. package/dist/operator-ui/contract.d.ts +7 -3
  114. package/dist/operator-ui/endpoints.js +5 -14
  115. package/dist/operator-ui/fix-prompts.d.ts +1 -1
  116. package/dist/operator-ui/fix-prompts.js +0 -8
  117. package/dist/operator-ui/generated.js +3 -3
  118. package/dist/operator-ui/health.js +52 -0
  119. package/dist/operator-ui/model.d.ts +2 -3
  120. package/dist/operator-ui/overview.js +11 -19
  121. package/dist/operator-ui/setup-commands.js +0 -4
  122. package/dist/operator-ui/view.d.ts +5 -29
  123. package/dist/operator-ui/view.js +3 -59
  124. package/dist/program-writes.js +47 -26
  125. package/dist/provider-call-facts.d.ts +115 -0
  126. package/dist/provider-call-facts.js +182 -0
  127. package/dist/provider-call.d.ts +112 -0
  128. package/dist/provider-call.js +271 -0
  129. package/dist/provider.d.ts +71 -32
  130. package/dist/provider.js +134 -40
  131. package/dist/providers/_shared/google/hatch.js +91 -0
  132. package/dist/providers/_shared/google/kit.js +537 -0
  133. package/dist/providers/_shared/google/result-size.js +15 -2
  134. package/dist/providers/_shared/google/service-account.d.ts +2 -1
  135. package/dist/providers/_shared/google/service-account.js +8 -4
  136. package/dist/providers/_shared/google/workspace.d.ts +8 -209
  137. package/dist/providers/_shared/google/workspace.js +7 -426
  138. package/dist/providers/_shared/rest/compact-index.js +86 -0
  139. package/dist/providers/_shared/rest/dispatch.js +3 -23
  140. package/dist/providers/_shared/rest/kit.js +546 -0
  141. package/dist/providers/_shared/rest/operation-index.js +230 -14
  142. package/dist/providers/_shared/rest/response-media.js +11 -0
  143. package/dist/providers/_shared/rest/tools.js +101 -78
  144. package/dist/providers/_shared/rest/value-safety.js +353 -195
  145. package/dist/providers/_shared/sensitive-fields.js +27 -0
  146. package/dist/providers/breeze/api.js +584 -0
  147. package/dist/providers/breeze/index.d.ts +3 -3
  148. package/dist/providers/breeze/index.js +67 -1420
  149. package/dist/providers/breeze/openapi.generated.js +60 -0
  150. package/dist/providers/breeze/skill.generated.js +2 -6
  151. package/dist/providers/breeze/tools.js +696 -0
  152. package/dist/providers/ccb/api.js +496 -0
  153. package/dist/providers/ccb/index.d.ts +17 -37
  154. package/dist/providers/ccb/index.js +77 -1702
  155. package/dist/providers/ccb/lib/constants.d.ts +34 -0
  156. package/dist/providers/ccb/lib/constants.js +74 -0
  157. package/dist/providers/ccb/lib/guide.js +9 -0
  158. package/dist/providers/ccb/lib/verdicts.js +387 -0
  159. package/dist/providers/ccb/openapi.generated.js +397 -0
  160. package/dist/providers/ccb/safety.js +295 -0
  161. package/dist/providers/ccb/skill.generated.js +2 -6
  162. package/dist/providers/ccb/tools.js +853 -0
  163. package/dist/providers/cloudflare/api.js +1066 -0
  164. package/dist/providers/cloudflare/index.d.ts +7 -22
  165. package/dist/providers/cloudflare/index.js +80 -194
  166. package/dist/providers/cloudflare/lib/config.d.ts +16 -0
  167. package/dist/providers/cloudflare/lib/config.js +2 -0
  168. package/dist/providers/cloudflare/lib/discovery.js +29 -0
  169. package/dist/providers/cloudflare/{graphql.js → lib/graphql.js} +1 -1
  170. package/dist/providers/cloudflare/lib/hatch.js +103 -0
  171. package/dist/providers/cloudflare/lib/path-bounds.js +28 -0
  172. package/dist/providers/cloudflare/lib/response-media.js +75 -0
  173. package/dist/providers/cloudflare/openapi.generated.js +3299 -3208
  174. package/dist/providers/cloudflare/{value-safety.js → safety.js} +538 -18
  175. package/dist/providers/cloudflare/skill.generated.js +2 -10
  176. package/dist/providers/cloudflare/tools.js +360 -0
  177. package/dist/providers/docs/api.js +51 -0
  178. package/dist/providers/docs/index.d.ts +1 -12
  179. package/dist/providers/docs/index.js +53 -1165
  180. package/dist/providers/docs/lib/constants.d.ts +18 -0
  181. package/dist/providers/docs/lib/constants.js +18 -0
  182. package/dist/providers/docs/lib/discovery.js +26 -0
  183. package/dist/providers/docs/lib/requests.js +48 -0
  184. package/dist/providers/docs/lib/schemas.js +168 -0
  185. package/dist/providers/docs/openapi.generated.js +16 -0
  186. package/dist/providers/docs/safety.js +54 -0
  187. package/dist/providers/docs/skill.generated.js +2 -6
  188. package/dist/providers/docs/tools.js +802 -0
  189. package/dist/providers/drive/api.js +177 -0
  190. package/dist/providers/drive/index.d.ts +1 -12
  191. package/dist/providers/drive/index.js +38 -1448
  192. package/dist/providers/drive/lib/constants.d.ts +6 -0
  193. package/dist/providers/drive/lib/constants.js +6 -0
  194. package/dist/providers/drive/lib/contracts.js +532 -0
  195. package/dist/providers/drive/lib/hatch.js +197 -0
  196. package/dist/providers/drive/openapi.generated.js +77 -0
  197. package/dist/providers/drive/safety.js +90 -0
  198. package/dist/providers/drive/skill.generated.js +2 -6
  199. package/dist/providers/drive/tools.js +1290 -0
  200. package/dist/providers/forms/api.js +71 -0
  201. package/dist/providers/forms/index.d.ts +1 -12
  202. package/dist/providers/forms/index.js +49 -1145
  203. package/dist/providers/forms/lib/constants.d.ts +14 -0
  204. package/dist/providers/forms/lib/constants.js +19 -0
  205. package/dist/providers/forms/lib/hatch.js +72 -0
  206. package/dist/providers/forms/openapi.generated.js +23 -0
  207. package/dist/providers/forms/safety.js +34 -0
  208. package/dist/providers/forms/skill.generated.js +2 -8
  209. package/dist/providers/forms/tools.js +1024 -0
  210. package/dist/providers/github/api.js +150 -0
  211. package/dist/providers/github/index.d.ts +4 -5
  212. package/dist/providers/github/index.js +30 -87
  213. package/dist/providers/github/{auth.d.ts → lib/auth.d.ts} +5 -3
  214. package/dist/providers/github/{auth.js → lib/auth.js} +40 -43
  215. package/dist/providers/github/lib/discovery.js +132 -0
  216. package/dist/providers/github/lib/operations.js +58 -0
  217. package/dist/providers/github/{scope.d.ts → lib/scope.d.ts} +2 -0
  218. package/dist/providers/github/{scope.js → lib/scope.js} +25 -1
  219. package/dist/providers/github/openapi.generated.js +1216 -0
  220. package/dist/providers/github/safety.js +216 -0
  221. package/dist/providers/github/skill.generated.js +2 -5
  222. package/dist/providers/github/tools.js +506 -0
  223. package/dist/providers/gmail/api.js +114 -0
  224. package/dist/providers/gmail/index.d.ts +1 -12
  225. package/dist/providers/gmail/index.js +73 -1621
  226. package/dist/providers/gmail/lib/constants.d.ts +13 -0
  227. package/dist/providers/gmail/lib/constants.js +16 -0
  228. package/dist/providers/gmail/lib/index.js +173 -0
  229. package/dist/providers/gmail/lib/schemas.js +176 -0
  230. package/dist/providers/gmail/lib/threading.js +120 -0
  231. package/dist/providers/gmail/openapi.generated.js +92 -0
  232. package/dist/providers/gmail/safety.js +21 -0
  233. package/dist/providers/gmail/skill.generated.js +2 -6
  234. package/dist/providers/gmail/tools.js +1435 -0
  235. package/dist/providers/overflow/api.js +1008 -0
  236. package/dist/providers/overflow/index.d.ts +3 -17
  237. package/dist/providers/overflow/index.js +60 -1488
  238. package/dist/providers/overflow/skill.generated.js +2 -5
  239. package/dist/providers/overflow/tools.js +873 -0
  240. package/dist/providers/planning-center/api.js +467 -0
  241. package/dist/providers/planning-center/index.d.ts +6 -35
  242. package/dist/providers/planning-center/index.js +69 -2445
  243. package/dist/providers/planning-center/lib/constants.d.ts +58 -0
  244. package/dist/providers/planning-center/lib/constants.js +83 -0
  245. package/dist/providers/planning-center/lib/discovery.js +40 -0
  246. package/dist/providers/planning-center/lib/guide.js +39 -0
  247. package/dist/providers/planning-center/lib/json-api.js +83 -0
  248. package/dist/providers/planning-center/lib/verdicts.js +1758 -0
  249. package/dist/providers/planning-center/openapi.generated.js +1764 -0
  250. package/dist/providers/planning-center/safety.js +188 -0
  251. package/dist/providers/planning-center/skill.generated.js +2 -27
  252. package/dist/providers/planning-center/tools.js +1010 -0
  253. package/dist/providers/sheets/api.js +133 -0
  254. package/dist/providers/sheets/index.d.ts +4 -16
  255. package/dist/providers/sheets/index.js +61 -1172
  256. package/dist/providers/sheets/lib/constants.d.ts +14 -0
  257. package/dist/providers/sheets/lib/constants.js +14 -0
  258. package/dist/providers/sheets/lib/hatch.js +163 -0
  259. package/dist/providers/sheets/lib/requests.js +105 -0
  260. package/dist/providers/sheets/lib/schemas.js +138 -0
  261. package/dist/providers/sheets/openapi.generated.js +30 -0
  262. package/dist/providers/sheets/safety.js +27 -0
  263. package/dist/providers/sheets/skill.generated.js +2 -7
  264. package/dist/providers/sheets/tools.js +734 -0
  265. package/dist/providers/slides/api.js +147 -0
  266. package/dist/providers/slides/index.d.ts +2 -10
  267. package/dist/providers/slides/index.js +48 -2555
  268. package/dist/providers/slides/lib/constants.d.ts +11 -0
  269. package/dist/providers/slides/lib/constants.js +11 -0
  270. package/dist/providers/slides/lib/requests.js +60 -0
  271. package/dist/providers/slides/lib/schemas.js +565 -0
  272. package/dist/providers/slides/openapi.generated.js +18 -0
  273. package/dist/providers/slides/skill.generated.js +2 -6
  274. package/dist/providers/slides/tools.js +1968 -0
  275. package/dist/providers/stripe/api.js +401 -0
  276. package/dist/providers/stripe/index.d.ts +7 -27
  277. package/dist/providers/stripe/index.js +75 -191
  278. package/dist/providers/stripe/lib/config.d.ts +4 -0
  279. package/dist/providers/stripe/lib/config.js +2 -0
  280. package/dist/providers/stripe/openapi.generated.js +4 -3
  281. package/dist/providers/stripe/{value-safety.js → safety.js} +5 -5
  282. package/dist/providers/stripe/skill.generated.js +2 -10
  283. package/dist/providers/stripe/tools.js +77 -0
  284. package/dist/providers/tithely/api.js +531 -0
  285. package/dist/providers/tithely/index.d.ts +19 -0
  286. package/dist/providers/tithely/index.js +86 -965
  287. package/dist/providers/tithely/skill.generated.js +2 -5
  288. package/dist/providers/tithely/tools.js +426 -0
  289. package/dist/providers/vercel/api.js +551 -0
  290. package/dist/providers/vercel/index.d.ts +11 -25
  291. package/dist/providers/vercel/index.js +67 -261
  292. package/dist/providers/vercel/lib/config.d.ts +2 -0
  293. package/dist/providers/vercel/lib/config.js +2 -0
  294. package/dist/providers/vercel/lib/index.js +117 -0
  295. package/dist/providers/vercel/lib/logs.js +100 -0
  296. package/dist/providers/vercel/lib/pin.js +270 -0
  297. package/dist/providers/vercel/openapi.generated.js +398 -376
  298. package/dist/providers/vercel/{value-safety.js → safety.js} +261 -42
  299. package/dist/providers/vercel/skill.generated.js +2 -7
  300. package/dist/providers/vercel/tools.js +642 -0
  301. package/dist/redaction-identity.js +47 -0
  302. package/dist/redaction-marker.js +125 -0
  303. package/dist/registry.d.ts +30 -28
  304. package/dist/registry.js +446 -413
  305. package/dist/routes/access-tokens.js +1 -1
  306. package/dist/routes/actor-labels.js +1 -1
  307. package/dist/routes/connect.js +1 -1
  308. package/dist/routes/dispatch.js +103 -0
  309. package/dist/routes/mcp.js +170 -79
  310. package/dist/routes/oauth.js +3 -1
  311. package/dist/routes/operator.js +2 -2
  312. package/dist/routes/shared.d.ts +5 -4
  313. package/dist/routes/shared.js +244 -177
  314. package/dist/routes/skills.js +10 -8
  315. package/dist/routes/ui-config.js +27 -3
  316. package/dist/routes/ui-data.js +29 -22
  317. package/dist/routes/ui.js +1 -1
  318. package/dist/runtime/call-admission.js +0 -26
  319. package/dist/runtime/call-entry.js +30 -0
  320. package/dist/runtime/call.js +556 -0
  321. package/dist/runtime/connector-scope.js +7 -0
  322. package/dist/runtime/credential-probe.js +34 -0
  323. package/dist/runtime/executor.js +40 -0
  324. package/dist/runtime/native-storage.js +63 -0
  325. package/dist/runtime/registry.js +27 -0
  326. package/dist/runtime/request-scope.js +72 -0
  327. package/dist/runtime/run.js +15 -7
  328. package/dist/runtime/shared-read.js +34 -5
  329. package/dist/runtime/storage.js +34 -21
  330. package/dist/sent-secrets.d.ts +194 -37
  331. package/dist/sent-secrets.js +1743 -340
  332. package/dist/server.js +5 -56
  333. package/dist/skills.js +330 -224
  334. package/dist/sqlite.js +15 -14
  335. package/dist/storage/d1-copy.js +255 -0
  336. package/dist/storage/d1-driver.js +15 -0
  337. package/dist/storage/keys.js +28 -0
  338. package/dist/storage/sql-driver.js +88 -0
  339. package/dist/storage/sql-native.js +544 -0
  340. package/dist/storage/sql-schema.d.ts +6 -0
  341. package/dist/storage/sql-schema.js +15 -0
  342. package/dist/storage/sql.d.ts +14 -20
  343. package/dist/storage/sql.js +29 -535
  344. package/dist/timeout.js +0 -26
  345. package/dist/tool-safety.js +20 -10
  346. package/dist/types.d.ts +11 -99
  347. package/dist/upward.js +3 -0
  348. package/dist/usage-guide.js +3 -1
  349. package/dist/validate.d.ts +4 -2
  350. package/dist/validate.js +86 -9
  351. package/dist/version.d.ts +1 -1
  352. package/dist/version.js +1 -1
  353. package/dist/worker.js +312 -292
  354. package/dist/workspace-subject.js +5 -1
  355. package/dist/write-outcome.js +454 -34
  356. package/documentation/README.md +27 -7
  357. package/documentation/architecture.md +2550 -186
  358. package/documentation/auth.md +821 -98
  359. package/documentation/code-mode.md +56 -21
  360. package/documentation/deploying.md +164 -20
  361. package/documentation/hosted-mcp-migration.md +460 -0
  362. package/documentation/integrating.md +144 -105
  363. package/documentation/meta-tools.md +411 -34
  364. package/documentation/operating.md +28 -4
  365. package/documentation/operator-tests.md +11 -2
  366. package/documentation/operator-ui.md +103 -33
  367. package/documentation/provider-auth-migration.md +38 -63
  368. package/documentation/provider-migration-0.29.md +10 -5
  369. package/documentation/provider-migration-0.35.md +975 -0
  370. package/documentation/providers.md +965 -0
  371. package/examples/worker/AGENTS.md +23 -9
  372. package/examples/worker/README.md +254 -135
  373. package/examples/worker/alchemy.run.ts +116 -0
  374. package/examples/worker/gitignore +10 -0
  375. package/examples/worker/src/connecta.config.ts +23 -21
  376. package/examples/worker/wrangler.jsonc +14 -5
  377. package/guides/connecting-agents.md +157 -0
  378. package/guides/how-it-works.md +156 -0
  379. package/guides/safety-and-trust.md +153 -0
  380. package/package.json +27 -42
  381. package/templates/node/.env.example +3 -0
  382. package/templates/node/README.md +22 -2
  383. package/templates/node/docker-compose.yml +1 -0
  384. package/templates/node/package.json +3 -2
  385. package/templates/node/src/connecta.config.ts +8 -0
  386. package/dist/catalog-drift.d.ts +0 -134
  387. package/dist/catalog-drift.js +0 -493
  388. package/dist/providers/_shared/request-token.js +0 -83
  389. package/dist/providers/_shared/rest/operation-index.d.ts +0 -133
  390. package/dist/providers/_shared/rest/tools.d.ts +0 -141
  391. package/dist/providers/_shared/rest/value-safety.d.ts +0 -201
  392. package/dist/providers/basecamp/index.d.ts +0 -43
  393. package/dist/providers/basecamp/index.js +0 -997
  394. package/dist/providers/basecamp/skill.generated.js +0 -9
  395. package/dist/providers/cloudflare/rest.d.ts +0 -37
  396. package/dist/providers/cloudflare/rest.js +0 -1078
  397. package/dist/providers/github/hosted.js +0 -218
  398. package/dist/providers/github/rest.js +0 -321
  399. package/dist/providers/infisical/index.d.ts +0 -7
  400. package/dist/providers/infisical/index.js +0 -713
  401. package/dist/providers/infisical/skill.generated.js +0 -8
  402. package/dist/providers/linear/index.d.ts +0 -55
  403. package/dist/providers/linear/index.js +0 -352
  404. package/dist/providers/linear/skill.generated.js +0 -8
  405. package/dist/providers/mixpanel/index.d.ts +0 -57
  406. package/dist/providers/mixpanel/index.js +0 -468
  407. package/dist/providers/mixpanel/operations.js +0 -20
  408. package/dist/providers/mixpanel/rest.js +0 -603
  409. package/dist/providers/mixpanel/skill.generated.js +0 -10
  410. package/dist/providers/mixpanel/value-safety.js +0 -16
  411. package/dist/providers/notion/index.d.ts +0 -65
  412. package/dist/providers/notion/index.js +0 -368
  413. package/dist/providers/notion/openapi.generated.js +0 -75
  414. package/dist/providers/notion/rest.d.ts +0 -24
  415. package/dist/providers/notion/rest.js +0 -1226
  416. package/dist/providers/notion/skill.generated.js +0 -11
  417. package/dist/providers/notion/value-safety.js +0 -56
  418. package/dist/providers/revenuecat/index.d.ts +0 -49
  419. package/dist/providers/revenuecat/index.js +0 -557
  420. package/dist/providers/revenuecat/skill.generated.js +0 -11
  421. package/dist/providers/stripe/rest.d.ts +0 -14
  422. package/dist/providers/stripe/rest.js +0 -402
  423. package/dist/providers/vercel/rest.d.ts +0 -20
  424. package/dist/providers/vercel/rest.js +0 -1020
  425. package/dist/providers/wispr-flow/index.d.ts +0 -14
  426. package/dist/providers/wispr-flow/index.js +0 -117
  427. package/dist/providers/wispr-flow/skill.generated.js +0 -8
  428. /package/dist/providers/github/{key.js → lib/key.js} +0 -0
@@ -5,6 +5,9 @@ tools behind it. `search_tools` finds addresses, the call tools enforce the
5
5
  stored classification, `execute_code` runs programs on a writable or read-only endpoint, and `connecta.result` inside programs
6
6
  pages bounded results.
7
7
 
8
+ A pool may instead list each downstream tool directly, for clients that run
9
+ their own tool search; see [native tool surface](#native-tool-surface).
10
+
8
11
  This guide is the contract an MCP client sees. The in-program `connecta.*` API
9
12
  those tools imply belongs to [code mode](./code-mode.md); inbound identity and
10
13
  credential administration belong to [auth](./auth.md).
@@ -22,20 +25,28 @@ owns the top-level MCP contract; it does not require reading the core internals.
22
25
  | Load provider instructions or native skills | [Connector guides](#connector-guides-and-skills), [native extension](#native-skills-extension) |
23
26
  | Interpret a direct response or page a large result | [Representation](#result-representation), [truncation](#truncated-direct-call-results), [paging](#paging-with-connectaresult) |
24
27
  | Recover a refused or invalid call | [Authorization](#authorization-recovery), [routing](#routing-recovery), [arguments](#argument-recovery), [echo budgets](#echo-budgets) |
28
+ | List downstream tools directly, or connect Eve | [Native tool surface](#native-tool-surface), [Eve agents](#eve-agents) |
25
29
  | Change the contract | [Source and tests](#source-and-tests), [guest API](./code-mode.md#verification) |
26
30
 
31
+ ## Tool presentation
32
+
33
+ The default surface is the six meta-tools below. From 0.35.0, pools can use
34
+ [native tool presentation](#native-tool-surface) for clients with their own
35
+ tool search. Both presentations use the same invocation enforcement; native
36
+ pools keep code available by default.
37
+
27
38
  ## The six tools
28
39
 
29
- Every deployment requires an executor, so `tools/list` is exactly six. No
30
- configuration adds a seventh or removes one, so a client's cached tool list
31
- never depends on the storage behind the deployment. There was an eighth,
32
- `resume_execution`, while programs paused at writes; it left with pausing
33
- ([#672](https://github.com/zackbart/connecta/issues/672)). `execute_code`
40
+ Every deployment requires an executor. A meta endpoint's `tools/list` is
41
+ exactly six. This is the default; a pool may instead use the
42
+ [native tool surface](#native-tool-surface). No other configuration adds a
43
+ seventh or removes one, so a client's cached meta-tool list never depends on
44
+ the storage behind the deployment. `execute_code`
34
45
  is annotated `readOnlyHint: true, destructiveHint: false` on a read-only
35
46
  endpoint, and `readOnlyHint: false, destructiveHint: true` on a writable one.
36
47
  Approval belongs to the client. A read-only endpoint keeps all six tools, omits
37
48
  write tools from `search_tools` results and describe, and refuses every write
38
- call; `readOnly` never changes connector visibility or read grants. Guides
49
+ call. Connector `readOnly` applies the same restriction on every endpoint; effective read-only is endpoint OR connector. Neither setting changes connector visibility or read grants. Guides
39
50
  (`queryAnalysis.guideSummary`, `skills`, `connecta.skill`, skill
40
51
  `resources/read`) are documentation and may name tools the endpoint refuses. The four tools with structured-only success results
41
52
  advertise `outputSchema`. The two direct-call tools omit it because their default
@@ -150,6 +161,37 @@ discovery. Both take the same arguments.
150
161
  Neither `connector` nor `safety` grants authority or changes invocation
151
162
  admission; they select what discovery shows and nothing else.
152
163
 
164
+ Main search also consults a standard hatch's construction-authored operation
165
+ vocabulary (path, operation id, vendor summary and tag), without calling a tool
166
+ or reading account data. A match returns the owning `_api_search` tool; call it
167
+ with the original query to retrieve operations. Exact tool/address and complete
168
+ authored-tool matches retain precedence. A vocabulary match requires every term
169
+ in one operation, and the operation's hatch route must be visible and match the
170
+ read/write filter. On `approvalRequired` searches the returned discovery tool
171
+ is still a read. Hidden tools, missing grants and read-only restrictions remain
172
+ in force. Browsing does not consult operation vocabulary.
173
+
174
+ Vocabulary is bounded: queries at most 200 characters and eight terms; each
175
+ hatch caches at most 8,192 rows and 2,097,152 characters, with at most 1,024
176
+ characters per row and 128 query intersections. Longer queries and vocabulary
177
+ outside these bounds remain available through the hatch's own search. These
178
+ bounds never claim an exhaustive operation search.
179
+
180
+ When a non-empty query matches no catalog tool or bounded operation vocabulary,
181
+ visible standard API hatches may still cover it. `queryAnalysis.guidance` names up to three qualified API
182
+ search tools in connector order and reports the omitted count; full indexes have
183
+ not been searched. For example, call `crm.crm_api_search` with the original
184
+ query before concluding that the operation is unavailable. Browse with an
185
+ empty query and follow every page, or search for `_api_search`, to list all API
186
+ search tools. If the query names a configured connector, its identity and
187
+ scoped-browse guidance comes first, followed by the API-search pointer.
188
+ The pointer respects endpoint and tool visibility; a read search tool can
189
+ discover indexed writes when the catalog query selected
190
+ `safety: "approvalRequired"`, provided the endpoint and connector allow writes.
191
+ That filter suppresses pointers on read-only endpoints and for read-only
192
+ connectors. Required connector guides and catalog failures still apply.
193
+ Catalog search itself performs no API index lookup.
194
+
153
195
  `includeSchemas: "compact"` adds each match's input and any provider-declared
154
196
  output shape, plus `inputKeys`, `requiredInputKeys`, and `outputKeys` for
155
197
  bounded plain objects. Where the provider declared no output shape but an
@@ -404,6 +446,15 @@ match those bindings and pass current auth, connector/tool grants, pool membersh
404
446
  and read-only checks. Old entries lacking bindings fail closed. A random UUID is a
405
447
  handle, never an access grant.
406
448
 
449
+ Each page validates access twice: before decoding its payload and again before
450
+ returning it. Each pass authenticates the caller once, checks every dependency
451
+ against that admitted scope, and reuses each connector's catalog within the
452
+ pass. Authentication is never reused across passes or requests, so revocation
453
+ during the page read still refuses the page. For example, a search handle with
454
+ 30 tool dependencies requires the same number of authentications as one with
455
+ one dependency. Paging deadlines cover both storage and access validation;
456
+ timeout errors identify the active stage as `result storage` or `access validation`.
457
+
407
458
  New entries store UTF-8 bytes in a base64 envelope split across storage keys,
408
459
  48 KiB of result text per chunk — widening past roughly 1.5 MB so no result
409
460
  occupies more than 32 keys, because every chunk is also a write. `connecta.result`
@@ -507,7 +558,7 @@ no paging route.
507
558
 
508
559
  ### Paging with connecta.result
509
560
 
510
- Paging is a guest operation, never another top-level tool. Program calls also
561
+ Meta endpoints page inside a program. Native pools without code list `read_result` for the same bound handles. Program calls also
511
562
  return handles for oversized values; see [program result limits](./code-mode.md#cancellation-and-limits).
512
563
  `connecta.result(handle, { page: 0 })` accepts those handles alongside direct
513
564
  result IDs. Numbered pages are zero-based and mutually exclusive with offset.
@@ -533,7 +584,7 @@ cap and a 32 KiB program bridge ceiling, with UTF-8 alignment and forward progre
533
584
  returning pages unchanged can hit the program result cap. The admitted subject
534
585
  and principal, endpoint/pool, request origin, connector, and tool bindings must
535
586
  match. The host rechecks current access and whether the endpoint is read-only
536
- before returning each page; a read-only endpoint cannot read a write stash.
587
+ before returning each page; a read-only endpoint or connector cannot read a write stash.
537
588
  Caller arguments select no partition. A read-only endpoint never runs a write,
538
589
  so every write result it could page came from a writable endpoint.
539
590
 
@@ -555,9 +606,9 @@ default to JSON schemas and schema-key metadata.
555
606
  "catalogErrors": [],
556
607
  "tools": [
557
608
  {
558
- "name": "get_issue",
559
- "address": "linear.get_issue",
560
- "connectorTitle": "Linear Production",
609
+ "name": "get_ticket",
610
+ "address": "tickets.get_ticket",
611
+ "connectorTitle": "Tickets",
561
612
  "classification": "read",
562
613
  "schemaFormat": "json",
563
614
  "inputSchema": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"] }
@@ -604,7 +655,7 @@ terms that never occur in its tools need not be repeated in every tool descripti
604
655
  An explicit unknown `connector` scope returns no tools and an `absence` record:
605
656
  `{ service, message, configuredConnectors }`. The message says
606
657
  `No connector for "X" is configured for this endpoint.` Unscoped queries naming
607
- recognized services such as GitHub, Linear, Mixpanel, Supabase, or PostHog do the
658
+ recognized services such as GitHub, Linear, Supabase, or PostHog do the
608
659
  same when no visible connector ID or title names that service. This service-name
609
660
  vocabulary is query interpretation, not an inventory of configured providers.
610
661
  For other service names, use the explicit `connector` scope. An unavailable
@@ -615,7 +666,7 @@ is indistinguishable from an unconfigured one.
615
666
  If no tool covers every search term, wider any-term fallback remains available
616
667
  for ordinary action/object searches and the page carries `matchMode: "partial"`.
617
668
  A service absence suppresses that fallback, so `GitHub get issue` cannot return
618
- Linear issues or Mixpanel/Supabase projects. Tool rows expose no scores or
669
+ Linear issues or Supabase projects. Tool rows expose no scores or
619
670
  per-result query coverage. `queryAnalysis` partitions at most eight terms of at
620
671
  most 64 characters into `representedTerms`, `otherResultTerms`, and
621
672
  `unmatchedTerms`, marking longer input `truncated`. Its guidance distinguishes
@@ -682,7 +733,8 @@ opaque state and input responses is a continuation, not an automatic replay.
682
733
  The sealed arguments digest prevents using that continuation for fresh write
683
734
  arguments. A timeout or other failure during a continuation leaves its nonce
684
735
  spent, so it cannot authorize a second attempt. Write continuations stop at an
685
- HTTP 401 or redirect before the SDK can refresh authorization or resend the call.
736
+ HTTP 401 or redirect before the SDK can refresh authorization or resend the call;
737
+ an ordinary write lets the refresh run and stops only the resend.
686
738
  HTTP 403 scope escalation also remains disabled. Read continuations retain normal
687
739
  OAuth refresh behavior.
688
740
 
@@ -697,8 +749,16 @@ capped at 128 KiB. `input_required_invalid`, `input_required_limit`,
697
749
  and `input_required_unsupported` are non-retryable typed failures;
698
750
  `input_required_round_limit` is an untyped failure with `retryable: false`.
699
751
 
700
- Programs and in-process meta-tools return `input_required_unsupported`, with a
701
- `nextAction` naming the equivalent direct call and bounded original arguments.
752
+ For a read, programs and in-process meta-tools return
753
+ `input_required_unsupported`, with a `nextAction` naming the equivalent direct
754
+ call and bounded original arguments. A downstream asks for input from inside
755
+ its handler, so a write that suspends may already have applied. A write's
756
+ `input_required_unsupported` is `retryable: false` with
757
+ `writeOutcome: "unknown"`, carries no `nextAction`, and its `retry` says to
758
+ re-read the target before any fresh call; a program counts it in
759
+ `writes.unknown`. A direct write whose input cannot be relayed (no sealing
760
+ vault, the round limit, or private state over its cap) also carries
761
+ `writeOutcome: "unknown"` and is never told to start a new request.
702
762
  Programs never receive downstream state or prompts, and never restart to
703
763
  fulfill downstream input.
704
764
 
@@ -720,6 +780,18 @@ from configured `publicUrl`. OAuth consent stays in the browser; a credential
720
780
  slot uses the authenticated operator UI. `authorize_connector` uses the same
721
781
  flow for explicit connect and restart. There is no legacy shim.
722
782
 
783
+ For an operator-managed credential, an explicit `authorize_connector` returns
784
+ `recovery: "ready"` when the declared credential fields are configured. This
785
+ reports local presence, without testing the key or remembering earlier requests.
786
+ The message is conditional: if a call just failed with an authentication or
787
+ operator-configuration error, give the retained `operatorUrl`, `credential` and
788
+ `instructions` to the operator; otherwise proceed with the requested call.
789
+ Without the optional UI, the message retains the deployment configuration
790
+ needed for recovery. A missing, unreadable or mismatched slot returns the
791
+ operator handoff or `unavailable`. The explicit authorization result has its own
792
+ type; authentication errors never carry `ready`. OAuth sign-in and restart
793
+ behavior is unchanged.
794
+
723
795
  The host echoes `requestState` and its bare `inputResponses.connecta_auth`
724
796
  response on the original `tools/call`. Accept re-runs the original call; it
725
797
  does not prove browser consent completed. Decline or cancel ends without
@@ -737,10 +809,12 @@ stale catalog returns `auth_replay_refused` and reconciliation guidance.
737
809
  Each round also checks its own invocation facts. Normal stale-fallback calls
738
810
  retain their existing behavior.
739
811
  An auth failure after a write handler or transport was entered keeps its
740
- ordinary error code,
741
- `retryable: false`, `reconciliationRequired: true`, and manual `/connect` guidance
742
- where available. The write may have partially run; reconcile its target before
743
- retrying after connection. Handler-authored error fields cannot clear this guard.
812
+ ordinary error code and manual `/connect` guidance where available. Unless a
813
+ maintained provider's complete ledger records an auxiliary resource read and
814
+ proves that only auxiliary resource reads and authentication token mints departed,
815
+ it also carries `retryable: false` and `reconciliationRequired: true`:
816
+ the write may have partially run, so reconcile its target before retrying after
817
+ connection. An explicit `writeOutcome: "unknown"` always keeps this guard.
744
818
 
745
819
  State integrity, expiry, principal, endpoint, and tool failures produce the
746
820
  SDK's JSON-RPC `-32602` with `data.reason: "invalid_request_state"` before the
@@ -886,15 +960,16 @@ exposing backend error text.
886
960
  Submitted `writeOnly` values also enter the call's sent-secret output redaction
887
961
  set, including property names inside private object subtrees. Downstream
888
962
  result and error text quoting them, in raw or credential-supported encoded
889
- forms, is redacted before direct-call output, program returns, logs, and emits,
890
- or result stash persistence; paging in a later request reads already-redacted
891
- bytes. A program's `connecta.read` resources, connector usage guides, and
892
- downstream `connecta.skill` files take the same rules before the program sees
893
- them. JSON stays valid: a matching number or boolean becomes `"[redacted]"`.
894
- Empty private strings are exempt. A private value shorter than eight characters
895
- redacts only structured fields that equal it, so identifiers and approval state
896
- remain, and withholds prose that contains it, including error messages, while
897
- typed classification, retry facts, and write outcome remain.
963
+ forms, or any run of eight consecutive units of one, is redacted before
964
+ direct-call output, program returns, logs, and emits, or result stash
965
+ persistence; paging in a later request reads already-redacted bytes. A
966
+ program's `connecta.read` resources, connector usage guides, and downstream
967
+ `connecta.skill` files take the same rules before the program sees them. JSON
968
+ stays valid: a matching number or boolean becomes `"[redacted]"`. Empty private
969
+ strings are exempt. A private value of one to three characters is withheld only
970
+ where a whole string, property name, number, or boolean equals it; one of four
971
+ to seven characters is also replaced wherever it occurs in result and error
972
+ text. Typed classification, retry facts, and write outcome remain.
898
973
  Work limits withhold the affected text without failing the call. See
899
974
  [output redaction](./auth.md#what-a-servers-errors-may-say)
900
975
  for the shared encoding, budget, and argument-filter contract.
@@ -910,6 +985,25 @@ carries no `errorCode`.
910
985
 
911
986
  ## Argument recovery
912
987
 
988
+ Standard API hatches refuse marker containment in request paths and query
989
+ keys/values. Body fields and named kit writes refuse whole `[redacted]` values
990
+ (including decoded spellings) and withheld links, before sending. Longer prose
991
+ such as `the log says [redacted]` is allowed. Obtain the original value/link or
992
+ omit its field: do not copy `{ "token": "[redacted]" }` from a read into a write.
993
+ These rules check agent arguments; a body composed later from internal reads
994
+ is not rescanned as a whole. Legacy tools and remote MCP keep their own rules.
995
+
996
+ Pass signed hatch and named-list cursors back unchanged. They authenticate the
997
+ continuation and bind its connection, personal owner and arguments; hatch
998
+ search/details cursors also bind the index content.
999
+ When the connection acts as a different downstream identity per caller, the
1000
+ signature also binds the admitted caller and pool owner. These identities are
1001
+ not included in the readable cursor. Fixed shared identities keep the shared
1002
+ binding. For example, a cursor issued to `alice` on a caller-mapped connection
1003
+ is refused when `bob` presents it, before any downstream request. An altered cursor
1004
+ or changed scope/index is `invalid_args`. Start discovery again after that
1005
+ refusal. Cursors survive restarts with persistent storage. A signing-key load failure is retryable `unavailable`; operators can follow [cursor-key recovery](./deploying.md#recover-a-cursor-signing-key).
1006
+
913
1007
  A remote MCP tool's advertised `inputSchema` is checked in the shared invocation
914
1008
  path before admission and provider dispatch, so a mismatch is the non-retryable
915
1009
  `invalid_args` identically on `call_tool`, `call_destructive_tool`,
@@ -941,34 +1035,314 @@ Unknown-address errors list `configuredConnectors` from the current endpoint's
941
1035
  scoped registry, including an empty list when none are accessible. They never
942
1036
  list connectors from another pool or identity's grants.
943
1037
 
944
- A write that times out after dispatch returns `write_outcome_unknown` with
1038
+ A write that times out after dispatch without complete auxiliary-only proof
1039
+ returns `write_outcome_unknown` with
945
1040
  `retryable: false` and an agent-only `uncertainCall: { address, args?, argsOmitted?, argsRedacted?, recovery? }`.
1041
+ An auxiliary-only timeout reported by a completed maintained-provider call keeps
1042
+ its `timeout` verdict under the rule below.
946
1043
  No write is automatically replayed. `recovery` carries facts the connector
947
1044
  recorded before dispatch, such as a REST connector's
948
- generated or caller-supplied `idempotencyKey`. Recovery accepts keys up to 255
1045
+ generated or caller-supplied `idempotencyKey`. A caller-supplied key that is
1046
+ empty once leading and trailing whitespace is removed is refused with
1047
+ `invalid_args` before dispatch and never recorded: fetch would send it empty,
1048
+ which is no key. Recovery accepts keys up to 255
949
1049
  characters, matching the REST write schema. Other recovery values remain capped
950
1050
  at 128 characters, with at most four facts per call and camelCase names of at
951
- most 32 characters. Values outside these bounds are dropped whole. A deliberate
1051
+ most 32 characters. Values outside these bounds are dropped whole. A recovery
1052
+ key is a diagnostic. Only when the call sent exactly one write, carrying that
1053
+ key, through the one connector it entered does `retry` add that a deliberate
952
1054
  retry that reuses the key with the exact original arguments cannot repeat the
953
1055
  write while the vendor retains the key
954
1056
  (Stripe may prune v1 keys after 24 hours). After that, look the object up before
955
- retrying. When a connector recorded such facts, any other dispatched write whose
1057
+ retrying. The advice needs one boundary that owns the call and exactly one
1058
+ dispatched write carrying the key; GET and HEAD reads beside it do not count.
1059
+ A second write, a write the key did not travel on, or a connector that wraps
1060
+ another or enters more than one boundary never gets it, since reusing the key
1061
+ would protect that request alone. A key generated but never sent (a write
1062
+ refused before dispatch, such as one with no configured credential) stays in
1063
+ the message as a diagnostic, with no reuse advice, direct or served. When a connector recorded such facts, any other dispatched write whose
956
1064
  outcome is unknown (a lost response body, a 5xx) also carries `uncertainCall`
957
1065
  with them under its own code, and program write accounting keeps it. `args` may be partial reconciliation context
958
1066
  with `argsRedacted: true`. A withheld echo or arguments over the 512-byte budget
959
1067
  carry `argsOmitted: true`; sensitive or unresolved schemas also carry
960
1068
  `argsRedacted: true`. When `args` is absent or redacted, use the original
961
1069
  arguments if reconciliation requires another call. A timeout before dispatch remains `timeout`.
1070
+ A connector's `callTool` called directly from code, outside an invocation, has
1071
+ no such boundary: a write that may have been dispatched and then timed out
1072
+ (an SDK deadline or HTTP 408 included) keeps its code and timeout
1073
+ `details.code`, and is `retryable: false` with `writeOutcome: "unknown"`. A
1074
+ write the caller's own signal aborted after it may have been dispatched is
1075
+ the same: `timeout` when the reason is one (`AbortSignal.timeout`), else
1076
+ `connector_call_failed`, with the caller's reason as its `cause` (a redacted
1077
+ copy of the same class where the connector's output redaction applies, as on
1078
+ `remoteMcp()`) and the reason's class and code in `details` (`{ name: "TimeoutError", code:
1079
+ "timeout" }`). Only an idempotency key the vendor receives keeps such a direct
1080
+ write's retry advice: a key that is blank once trimmed, or that holds a
1081
+ character fetch cannot send in a header, is refused as `invalid_args`. A
1082
+ direct read's timeout stays retryable, and a direct read's own abort reason is
1083
+ rethrown unchanged.
962
1084
  Program write accounting keeps this detail even if the guest catches the
963
1085
  failure or returns early. Multiple uncertain writes use `uncertainCalls`,
964
1086
  bounded to ten calls with `uncertainCallsTruncated` when more exist.
965
1087
 
1088
+ A dispatched write is never reported as retryable once the downstream may
1089
+ have acted on it (INV-9). A failed maintained-provider write call whose complete
1090
+ request ledger records an auxiliary resource read and proves that no call-owned
1091
+ request or kit auxiliary falsely declared as a read departed keeps the failure's retry advice and needs no write
1092
+ reconciliation. For example, a Gmail connector named `mail` can fail
1093
+ `mail.update_draft` during its auxiliary draft lookup before sending the update;
1094
+ its authorization handoff then says to retry after recovery. The same rule applies
1095
+ to a timeout reported by that completed call. An explicit `writeOutcome: "unknown"`
1096
+ always takes precedence. A kit request declared `effect: "read"` that uses POST
1097
+ or a method-overridden GET blocks this inference even alongside an auxiliary read,
1098
+ while retaining core write reservation and replay rules. Authentication token mints
1099
+ supply no resource-read proof but do not invalidate a later auxiliary resource read.
1100
+ Empty, absent or incomplete ledgers, invocation deadlines and caller
1101
+ cancellation without a complete answer retain conservative write outcomes.
1102
+ Custom `api()` and `remoteMcp()` connectors always stay conservative: the internal
1103
+ complete-tracking declaration is available only to maintained providers.
1104
+ A 5xx (a gateway's 502 to 504 included), any
1105
+ network failure of its send (a refused connection included), or a reply that
1106
+ broke off is a non-retryable `connector_call_failed` whose outcome is unknown,
1107
+ from `remoteMcp()`, `api()` handlers, and the maintained providers alike;
1108
+ reads keep their retryable verdict. One send can hide several attempts:
1109
+ Node's fetch sends a request again after HTTP 421 and after an HTTP/2
1110
+ `REFUSED_STREAM`, both of which servers define as not processed, and an
1111
+ operator-installed dispatcher such as undici's `RetryAgent` can retry further,
1112
+ so a refusal on the last attempt says nothing about the earlier ones.
1113
+ Connecta therefore never reports a transport-failed write as known failed. A
1114
+ write stays a known failure, with its own advice, only on refusal provenance
1115
+ recorded where the evidence was observed: connecta refused it before it left,
1116
+ or the downstream served an HTTP refusal, a 4xx other than 408 that its
1117
+ provider reads as a refusal. A 408 is a timeout, and a refusing status the
1118
+ provider reads as `unavailable` or a timeout (Stripe's 424) does not prove the
1119
+ write unapplied, so a keyless Stripe write answered 424 is unknown. An error
1120
+ code is never that evidence by itself. A `rate_limited`,
1121
+ `invalid_args`, or any other code thrown after a 2xx (by a response mapper,
1122
+ a parser, or an output-schema check) or after a 408, and any JSON-RPC error a
1123
+ `remoteMcp()` server returns once the `tools/call` was sent (`-32602`
1124
+ included: a server can run the tool and then reject its own result), keeps
1125
+ its code and message for diagnostics but is `retryable: false` with
1126
+ `writeOutcome: "unknown"`, on a direct and a served call alike, and counts in
1127
+ a program's `writes.unknown`. An HTTP refusal of the call's own write stays
1128
+ known only under the refusal rules above and a complete ledger proving the
1129
+ refusal covers the whole call; its recovery advice and program accounting both
1130
+ report failure. Partial or unknown ledgers remain conservative. An auth failure after entering a write with
1131
+ no call-owned dispatch reports an unknown outcome and requires reconciliation,
1132
+ including credential refusals, static-OAuth refresh failures, and `remoteMcp()`
1133
+ connect or initialize 401s before `tools/call`. A non-auth refusal before
1134
+ `tools/call` is sent stays known. A custom connector can show no such
1135
+ provenance: a served write whose
1136
+ `callTool` throws after it was entered is `retryable: false` with
1137
+ `writeOutcome: "unknown"` whatever its code, and gets no retry advice
1138
+ (neither "grant the permission, then retry" nor "correct the arguments and
1139
+ retry"). That includes a refusal it rethrows from a call it made to another
1140
+ connector: refusal evidence holds only for the whole call, so a custom
1141
+ connector that deletes one Stripe customer and is then refused 429 on a
1142
+ second reports the unknown outcome. A served write whose downstream MCP tool
1143
+ answers `isError` came back over a 2xx after the tool ran, so it is unknown
1144
+ too, with its text kept; a read's `isError` stays a known answer. No text on
1145
+ an unknown write says to retry it: a rate limit's or overload's wait-and-retry
1146
+ wording is dropped from its message, and an authorization or credential
1147
+ handoff (`instructions`) says to re-read the target before any fresh call
1148
+ instead of to retry the original call. A read, and a write with a known
1149
+ outcome, keep that advice. A failure during a composite
1150
+ call's later request leaves earlier requests' outcomes unknown, and once the
1151
+ call's outcome is decided, a request that had not left is never sent. A
1152
+ write the downstream answered with HTTP 401 has an unknown outcome, since a
1153
+ server may act on a request before it rejects the credential, and is never
1154
+ resent. It is never retryable and carries no wait. Until the credential is
1155
+ renewed, the failure keeps its authorization code (`auth_required`, or
1156
+ `downstream_oauth_required` for an OAuth connector) with
1157
+ `writeOutcome: "unknown"`, `reconciliationRequired: true`, and the
1158
+ `authorize_connector` handoff, whose `instructions` say to authorize and then
1159
+ re-read the target before any fresh call. That holds whatever renewal meets: a
1160
+ refused or unreachable token endpoint, a disconnect, or the caller leaving. It
1161
+ also holds whatever the call met after the 401: a body past the response
1162
+ ceiling, a later failure in the same call, a 401 on a later request of a
1163
+ composite write, a 401 answered inside another connector the call reached
1164
+ (an `api()` or `remoteMcp()` connector, through a custom connector or a
1165
+ program), or the call's deadline or the caller's cancellation cutting the
1166
+ write off after the 401: the result is that verdict, not
1167
+ `write_outcome_unknown`. Nor can such a call succeed: a handler that caught
1168
+ the 401 and returned, or a result that could not be processed, still ends
1169
+ in that verdict, and a program counts the write in `writes.unknown`. An
1170
+ idempotency key never makes such a write repeatable, so it gets no
1171
+ key-reuse advice. Once every such 401 is renewed
1172
+ the handoff goes, but the call stays unknown, even if its handler caught
1173
+ the failure and returned a result: renewal does not prove whether the write
1174
+ took effect. A caught read 401, or a declared refusal followed by a successful
1175
+ write, does not prevent the call from succeeding. A read needs positive
1176
+ operation or tool classification and a recorded GET or HEAD; the method
1177
+ alone is insufficient. Breeze GET writes and requests carrying
1178
+ `X-HTTP-Method-Override`, `X-HTTP-Method` or `X-Method-Override` remain writes,
1179
+ even when a handler catches their 401 and returns.
1180
+ Once renewal succeeds (an OAuth refresh), nothing is left
1181
+ to authorize: the call reports a non-retryable `connector_call_failed` with
1182
+ the unknown outcome, and the renewed credential serves any fresh call after
1183
+ the target is reconciled. Renewal succeeds only when it yields a different
1184
+ credential than the one the write sent: a refresh or login that hands back
1185
+ the rejected token, or an earlier recovery in the same request, renews
1186
+ nothing, and the write keeps its handoff. Google Workspace renews on the next call, so its
1187
+ write keeps the authorization code and handoff. A write answered 401 is a
1188
+ known refusal only where its provider has reviewed vendor documentation that
1189
+ the vendor authenticates a request before acting on it. Among the maintained
1190
+ providers that is Stripe with an API key, for an API v1 answer that carries
1191
+ Stripe's `Request-Id`, since Stripe documents that an invalid API key is an
1192
+ error that occurs before execution begins. A read answered 401 keeps its
1193
+ refusal, and its handoff says to retry the original call.
1194
+ A `remoteMcp()` write answered with a redirect is not sent to the new location,
1195
+ whatever the connector's `redirects` setting, and reports the unknown outcome;
1196
+ reads follow same-origin redirects as configured. An error whose write outcome
1197
+ is unknown carries `writeOutcome: "unknown"` unless its code is already
1198
+ `write_outcome_unknown`, and a program that sent the write fails with it counted
1199
+ in `writes.unknown` even when the program caught the failure. When that write
1200
+ met an authorization verdict, the program's error is that verdict, as a direct
1201
+ call reports it: its code, `connector`, `recovery`, and `nextAction`, with
1202
+ `writeOutcome: "unknown"` and `reconciliationRequired: true`. Any other unknown
1203
+ write makes it `write_outcome_unknown`.
1204
+
1205
+ The classification served for the call decides this advice, including deployment
1206
+ `classification` overrides. For example, `classification: { crm: { get_person:
1207
+ "write" } }` makes a dispatched `crm.get_person` that receives HTTP 503 report
1208
+ `retryable: false` and `writeOutcome: "unknown"`, even if its request uses GET.
1209
+ A served read keeps the provider's read retry advice even if its request uses
1210
+ POST. Tool defaults and HTTP methods supply a fallback only when no served
1211
+ classification exists. A vendor idempotency key does not change an uncertain
1212
+ served write into retry advice; its recovery facts still help reconcile the
1213
+ target before any fresh call. An operation hint (a whole-resource `PUT`,
1214
+ fixed spreadsheet cells, a content-addressed upload) grants no retry credit on
1215
+ any call, direct or served: only an idempotency key the vendor honors, which is
1216
+ Stripe's today, keeps a direct write's retry advice.
1217
+
966
1218
  Retryability comes from typed errors, HTTP status, registered OAuth error codes,
967
1219
  SDK timeout classes, and runtime network codes. Untyped prose is non-retryable:
968
1220
  "timeout", "temporarily unavailable", "rate limit", or "503" in a body, tool
969
1221
  name, or URL never changes the verdict. JSON-RPC `ProtocolError.data` is dropped
970
1222
  at the downstream boundary, even when the agent may see the error's message.
971
1223
 
1224
+ ## Native tool surface
1225
+
1226
+ A pool set to `surface: "native"` lists each downstream tool as its own MCP
1227
+ tool instead of the six meta-tools, for clients that already defer tools behind
1228
+ their own search (Eve, Claude Code with tool search). The meta surface stays
1229
+ the default everywhere, and plain `/mcp` is always meta.
1230
+
1231
+ ```ts
1232
+ pools: {
1233
+ assistant: { tools: ["crm", "tickets"], members: ["agent:assistant"], surface: "native" },
1234
+ assistant_lean: { tools: ["crm"], members: ["agent:assistant"], surface: "native", executeCode: false },
1235
+ }
1236
+ ```
1237
+
1238
+ `executeCode: false` is valid only with `surface: "native"`; construction
1239
+ refuses it otherwise, and refuses any `surface` other than `"meta"` or
1240
+ `"native"`. Both pool endpoints, `/mcp/<pool>` and `/agent/<pool>`, serve the
1241
+ pool's surface.
1242
+
1243
+ | A native pool lists | Shape |
1244
+ | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1245
+ | Each visible downstream tool | Named `<connector>__<tool>`; object input constraints and local references preserved; no `outputSchema`; `_meta["dev.connecta/address"]` is its address |
1246
+ | `execute_code` | Unless `executeCode: false`. Each downstream tool's description then ends with `Program address: <connector>.<tool>`, the address `connecta.call` takes |
1247
+ | `read_result` | Only with `executeCode: false`: `{ id, offset?, page?, maxBytes? }` pages a stashed result exactly as `connecta.result` does, with the same bindings and rechecks |
1248
+ | `skills` | Always |
1249
+
1250
+ `search_tools`, `call_tool`, `call_destructive_tool`, and `authorize_connector`
1251
+ are not listed. Auth failures still carry their handoff in the error envelope.
1252
+
1253
+ **Names.** A name is a pure function of the connector id and downstream tool
1254
+ name, so it survives catalog refreshes. It is `<connector>__<tool>` when the
1255
+ tool name uses only `[A-Za-z0-9_-]`, contains no `__`, does not start with `_`,
1256
+ and the whole name fits 48 characters; otherwise it is that name's head plus
1257
+ `_` and the first six hex digits of the SHA-256 of `<connector>.<tool>`. A
1258
+ connector id that does not start with a letter is prefixed with `C`. 48
1259
+ characters leave room for a client's own prefix under common 64-character
1260
+ tool-name limits (Eve's `connecta__`, Claude Code's `mcp__connecta__`). Two
1261
+ tools that would share a name are both left out of the list, with an operator
1262
+ warning, and a call by that name is refused; both stay callable by address in
1263
+ `execute_code`.
1264
+
1265
+ **Annotations** come from the served classification only: a read is
1266
+ `{ readOnlyHint: true, destructiveHint: false, openWorldHint: true }` and a
1267
+ write `{ readOnlyHint: false, destructiveHint: true, openWorldHint: true }`,
1268
+ whatever hints the downstream declared. A read-only endpoint or connector
1269
+ leaves write tools out of the list, by the same rule search and describe use.
1270
+
1271
+ **Calls take the existing paths.** A call to a downstream tool is the
1272
+ `call_tool` call for its address when the tool is currently a read, and the
1273
+ `call_destructive_tool` call when it is a write, run by the same handler. So
1274
+ classification, `read_only_endpoint` refusal, argument validation and repair,
1275
+ admission, redaction, single-attempt writes, auth elicitation, downstream input,
1276
+ result caps, and activity use the same enforcement. Activity records source
1277
+ `native` with the canonical address and served classification. A name must
1278
+ exactly match the definition's native name before dispatch. Unknown or ambiguous
1279
+ names fail with `unknown_tool`; catalog failures retain their handoff. Success results are
1280
+ `call_tool`'s default mode: native `content`, never `structuredContent`, which
1281
+ is why no `outputSchema` is advertised. A truncated result's notice pages with
1282
+ `connecta.result` inside `execute_code`, or with `read_result` on a pool without
1283
+ `execute_code`.
1284
+
1285
+ **Approval is the host's, enforcement is Connecta's.** The host approves from
1286
+ the annotations of the list it cached. If a tool changes from read to write
1287
+ between that list and a call (a downstream changes its hints, or the deployment
1288
+ changes its classification), the call runs under Connecta's current verdict:
1289
+ on the `call_destructive_tool` route, refused on a read-only endpoint, and never
1290
+ resent, although the host approved what it saw as a read. To narrow that
1291
+ window, a native `tools/list` carries a 300-second private cache hint, against
1292
+ an hour on meta endpoints. This hint does not guarantee that a host refreshes
1293
+ its cached annotations; the stale-approval race is accepted on writable pools.
1294
+
1295
+ **Listing.** `tools/list` is one page with no cursor (Eve 0.83 reads only the
1296
+ first page). A pool listing more than 1,000 tools fails `tools/list` with a
1297
+ JSON-RPC error asking the operator to narrow the pool; nothing is silently
1298
+ dropped. A connector whose catalog cannot load is left out of that listing
1299
+ whole, never partially, with an operator warning; its tools return with the
1300
+ next listing that loads it. Listing never starts authorization. The server
1301
+ still declares `tools.listChanged: false`.
1302
+
1303
+ **Instructions** replace the meta routing text: call one known operation
1304
+ directly; with `execute_code`, use one program for several, dependent, or
1305
+ reduced calls; write tools are absent and refused on a read-only endpoint;
1306
+ never repeat a write; page a truncated result as its notice says. A pool
1307
+ `description` is appended as on meta endpoints.
1308
+
1309
+ **Recovery.** Repair and validation fields retain the exact constraint details.
1310
+ Discovery `nextAction` points to the host's tool search (`host: "search"`), with
1311
+ only a `query` argument. Retry actions and retry text name the native tool,
1312
+ never a meta wrapper. Auth actions carry `authorizationUrl` or `operatorUrl`;
1313
+ give the returned URL and instructions to the user or operator. Capable modern
1314
+ clients may resume native auth and downstream form/URL input with the same
1315
+ wire name, arguments and returned `requestState`. Changed names, targets or
1316
+ arguments, expired state and spent retry nonces are refused. Never resend a
1317
+ write to recover output.
1318
+
1319
+ **Schemas.** Ordinary `type: "object"` schemas are byte-identical. Object
1320
+ constraints without a top-level type, composed object schemas and local
1321
+ `$defs`/`$ref` keep their constraints with `type: "object"` at the root. A schema
1322
+ that cannot be represented as object arguments omits its connector whole from
1323
+ that listing, with an operator warning naming the connector and tool. Other
1324
+ connectors remain listed. Correct the schema or use the meta surface.
1325
+
1326
+ **Diagnostics.** `connecta doctor --pool assistant` recognizes the configured
1327
+ surface and code setting from the local `skills` tool's
1328
+ `_meta["dev.connecta/surface"]`. It checks the required local tools, reports
1329
+ unavailable connector catalogs and listing-cap errors, and runs only a constant
1330
+ program when code is enabled. It never dispatches a downstream tool. The
1331
+ metadata's `catalogErrors` exposes this request's failing connector ids,
1332
+ including connectors with unrepresentable schemas, to every client of the pool.
1333
+ Connector ids already appear in native tool names. The
1334
+ operator UI and `describeConfig()` show every pool's effective `surface` and
1335
+ `executeCode` as facts from deployment code. Change these settings in code.
1336
+
1337
+ Keep native pools bounded. Comparisons so far used 40 synthetic tools;
1338
+ large production catalogs near the cap have not been evaluated.
1339
+
1340
+ ### Eve agents
1341
+
1342
+ Starting with 0.35.0, the Eve helper ships separately as `@zackbart/connecta-eve`.
1343
+ Connecta core supplies the native pool surface and has no Eve dependency.
1344
+ Consult that package's documentation for its compatibility and setup.
1345
+
972
1346
  ## Contributor reference
973
1347
 
974
1348
  ### Source and tests
@@ -978,12 +1352,15 @@ Handlers and schemas live in [meta-tools.ts](https://github.com/zackbart/connect
978
1352
  and [invocation](https://github.com/zackbart/connecta/blob/main/src/invocation.ts)
979
1353
  serve both direct tools and programs. [Skills](https://github.com/zackbart/connecta/blob/main/src/skills.ts)
980
1354
  owns the supplied usage instructions, each endpoint's instructions
981
- (`endpointInstructions`), and connector guides.
1355
+ (`endpointInstructions`), and connector guides. The native surface's names,
1356
+ listing, and call translation live in
1357
+ [native-tools.ts](https://github.com/zackbart/connecta/blob/main/src/native-tools.ts).
982
1358
 
983
1359
  [Schema tests](https://github.com/zackbart/connecta/blob/main/test/meta-tool-schemas.test.ts),
984
1360
  [search tests](https://github.com/zackbart/connecta/blob/main/test/meta-tools-search.test.ts),
985
1361
  [call tests](https://github.com/zackbart/connecta/blob/main/test/meta-tools-call.test.ts),
986
1362
  [skills tests](https://github.com/zackbart/connecta/blob/main/test/skills-extension.test.ts),
1363
+ [native surface tests](https://github.com/zackbart/connecta/blob/main/test/native-tools.test.ts),
987
1364
  [surface tests](https://github.com/zackbart/connecta/blob/main/test/code-first-surface.test.ts),
988
1365
  and [pool description tests](https://github.com/zackbart/connecta/blob/main/test/pool-description.test.ts)
989
1366
  check the published contract. Guest parity and clause evidence are in