@jini-ai/agent-plugins 0.6.17 → 0.6.19

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 (335) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/NOTICE +14 -0
  3. package/README.md +35 -14
  4. package/charts-echarts/plugin.json +39 -0
  5. package/charts-echarts/skills/charts-echarts/SKILL.md +110 -0
  6. package/charts-recharts/plugin.json +32 -0
  7. package/charts-recharts/skills/charts-recharts/SKILL.md +108 -0
  8. package/cloudflare/NOTES.md +16 -0
  9. package/cloudflare/form-destinations/cloudflare-d1.mjs +9 -0
  10. package/cloudflare/lib/api.mjs +96 -0
  11. package/cloudflare/lib/assets.mjs +65 -0
  12. package/cloudflare/lib/dns.mjs +32 -0
  13. package/cloudflare/lib/domain-inventory.mjs +61 -0
  14. package/cloudflare/lib/domain-status.mjs +48 -0
  15. package/cloudflare/lib/domains.mjs +95 -0
  16. package/cloudflare/lib/forms.mjs +254 -0
  17. package/cloudflare/lib/pages-upload.mjs +51 -0
  18. package/cloudflare/lib/target.mjs +165 -0
  19. package/cloudflare/lib/workers-upload.mjs +48 -0
  20. package/cloudflare/lib/zones.mjs +25 -0
  21. package/cloudflare/mcp.json +4 -0
  22. package/cloudflare/plugin.json +96 -0
  23. package/cloudflare/skills/cloudflare/SKILL.md +57 -0
  24. package/cloudflare/skills/cloudflare/references/domains.md +31 -0
  25. package/cloudflare/skills/cloudflare/references/pages.md +18 -0
  26. package/cloudflare/skills/cloudflare/references/permissions.md +29 -0
  27. package/cloudflare/skills/cloudflare/references/troubleshooting.md +20 -0
  28. package/cloudflare/skills/cloudflare/references/workers.md +42 -0
  29. package/cloudflare/targets/cloudflare-pages.mjs +12 -0
  30. package/cloudflare/targets/cloudflare-workers.mjs +17 -0
  31. package/cloudflare/tovu-consent.json +6 -0
  32. package/cloudflare/tovu-deploy-targets.json +630 -0
  33. package/cloudflare/tovu-form-destinations.json +12 -0
  34. package/cloudflare/worker/forms-receiver.mjs +249 -0
  35. package/composio/mcp.json +10 -0
  36. package/composio/plugin.json +68 -0
  37. package/composio/skills/composio/SKILL.md +85 -0
  38. package/dist/core/identity-namespace.d.ts +12 -0
  39. package/dist/core/identity-namespace.js +20 -0
  40. package/dist/folder-zip-node.js +29 -7
  41. package/dist/lifecycle/bundled-digests.js +4 -3
  42. package/dist/lifecycle/install.d.ts +7 -0
  43. package/dist/lifecycle/install.js +45 -3
  44. package/dist/lifecycle/manifest.d.ts +2 -2
  45. package/dist/lifecycle/manifest.js +5 -3
  46. package/dist/lifecycle/node.js +2 -0
  47. package/dist/lifecycle/persistent-state.js +1 -1
  48. package/dist/lifecycle/ports.d.ts +8 -0
  49. package/dist/lifecycle/seed-bundled.js +4 -1
  50. package/dist/manifest.d.ts +1 -1
  51. package/dist/manifest.js +3 -2
  52. package/fly/deploy-configs/fly.mjs +115 -0
  53. package/fly/deploy-ops/fly.mjs +102 -0
  54. package/fly/mcp.json +4 -0
  55. package/fly/plugin.json +81 -0
  56. package/fly/scripts/render-deploy-workflow.mjs +150 -0
  57. package/fly/skills/fly/SKILL.md +43 -0
  58. package/fly/skills/fly/references/fly-deploy.template.yml +117 -0
  59. package/fly/skills/fly/references/fly.template.toml +81 -0
  60. package/fly/tovu-credential-schemes.json +11 -0
  61. package/fly/tovu-deploy-configs.json +21 -0
  62. package/fly/tovu-deploy-ops.json +14 -0
  63. package/github/deploy-ops/github-actions.mjs +164 -0
  64. package/github/deployments/github.mjs +415 -0
  65. package/github/mcp.json +4 -0
  66. package/github/plugin.json +105 -0
  67. package/github/skills/github/SKILL.md +249 -0
  68. package/github/skills/github/references/actions.md +224 -0
  69. package/github/skills/github/references/auth-and-tokens.md +140 -0
  70. package/github/skills/github/references/repo-files.md +135 -0
  71. package/github/skills/github/references/site-backup.md +159 -0
  72. package/github/skills/github/references/source-control.md +123 -0
  73. package/github/source-control/backup-push.mjs +242 -0
  74. package/github/source-control/commit-site.mjs +459 -0
  75. package/github/source-control/github.mjs +93 -0
  76. package/github/source-control/write-files.mjs +468 -0
  77. package/github/tovu-deploy-ops.json +13 -0
  78. package/github/tovu-source-control.json +117 -0
  79. package/github-pages/NOTES.md +19 -0
  80. package/github-pages/mcp.json +4 -0
  81. package/github-pages/plugin.json +48 -0
  82. package/github-pages/skills/github-pages/SKILL.md +44 -0
  83. package/github-pages/targets/github-pages.mjs +543 -0
  84. package/github-pages/tovu-deploy-targets.json +327 -0
  85. package/google-login/exports/google-g.svg +1 -0
  86. package/google-login/exports/sign-in-button.css +68 -0
  87. package/google-login/exports/sign-in-button.html +4 -0
  88. package/google-login/mcp.json +4 -0
  89. package/google-login/plugin.json +59 -0
  90. package/google-login/skills/google-login/SKILL.md +96 -0
  91. package/google-login/tovu-login-providers.json +21 -0
  92. package/google-workspace/README.md +132 -0
  93. package/google-workspace/form-destinations/README.md +87 -0
  94. package/google-workspace/form-destinations/dedupe.mjs +43 -0
  95. package/google-workspace/form-destinations/delivery-result.mjs +69 -0
  96. package/google-workspace/form-destinations/mapping.mjs +152 -0
  97. package/google-workspace/form-destinations/sheets.mjs +202 -0
  98. package/google-workspace/lib/auth.mjs +81 -0
  99. package/google-workspace/lib/drive-files.mjs +54 -0
  100. package/google-workspace/lib/form-destination-settings.mjs +72 -0
  101. package/google-workspace/lib/http.mjs +168 -0
  102. package/google-workspace/lib/picker-flow.mjs +171 -0
  103. package/google-workspace/lib/picker-selection.mjs +107 -0
  104. package/google-workspace/lib/product-state.mjs +93 -0
  105. package/google-workspace/lib/request-policy.mjs +163 -0
  106. package/google-workspace/lib/sheets-a1.mjs +79 -0
  107. package/google-workspace/lib/sheets-admin-csv.mjs +82 -0
  108. package/google-workspace/lib/sheets-admin-request-kinds.mjs +183 -0
  109. package/google-workspace/lib/sheets-client.mjs +286 -0
  110. package/google-workspace/lib/surface-actions.mjs +107 -0
  111. package/google-workspace/mcp.json +4 -0
  112. package/google-workspace/plugin.json +77 -0
  113. package/google-workspace/products.json +12 -0
  114. package/google-workspace/skills/google-workspace/SKILL.md +82 -0
  115. package/google-workspace/skills/google-workspace/references/connection.md +102 -0
  116. package/google-workspace/skills/google-workspace/references/form-delivery.md +50 -0
  117. package/google-workspace/skills/google-workspace/references/sheets.md +149 -0
  118. package/google-workspace/skills/google-workspace/references/troubleshooting.md +31 -0
  119. package/google-workspace/tools/account-info.mjs +18 -0
  120. package/google-workspace/tools/sheets/README.md +54 -0
  121. package/google-workspace/tools/sheets/copy-tab.mjs +23 -0
  122. package/google-workspace/tools/sheets/copy.mjs +23 -0
  123. package/google-workspace/tools/sheets/create.mjs +35 -0
  124. package/google-workspace/tools/sheets/find-replace.mjs +38 -0
  125. package/google-workspace/tools/sheets/find.mjs +52 -0
  126. package/google-workspace/tools/sheets/get-by-data-filter.mjs +23 -0
  127. package/google-workspace/tools/sheets/get.mjs +22 -0
  128. package/google-workspace/tools/sheets/values-append.mjs +27 -0
  129. package/google-workspace/tools/sheets/values-batch-clear.mjs +20 -0
  130. package/google-workspace/tools/sheets/values-batch-get.mjs +20 -0
  131. package/google-workspace/tools/sheets/values-batch-update.mjs +29 -0
  132. package/google-workspace/tools/sheets/values-by-data-filter.mjs +62 -0
  133. package/google-workspace/tools/sheets/values-clear.mjs +20 -0
  134. package/google-workspace/tools/sheets/values-get.mjs +21 -0
  135. package/google-workspace/tools/sheets/values-update.mjs +26 -0
  136. package/google-workspace/tools/sheets-admin/README.md +45 -0
  137. package/google-workspace/tools/sheets-admin/basic-filter.mjs +32 -0
  138. package/google-workspace/tools/sheets-admin/batch-update.mjs +25 -0
  139. package/google-workspace/tools/sheets-admin/developer-metadata.mjs +28 -0
  140. package/google-workspace/tools/sheets-admin/export-csv.mjs +67 -0
  141. package/google-workspace/tools/sheets-admin/filter-views.mjs +38 -0
  142. package/google-workspace/tools/sheets-admin/format.mjs +70 -0
  143. package/google-workspace/tools/sheets-admin/named-ranges.mjs +42 -0
  144. package/google-workspace/tools/sheets-admin/open-existing.mjs +34 -0
  145. package/google-workspace/tools/sheets-admin/protected-ranges-get.mjs +18 -0
  146. package/google-workspace/tools/sheets-admin/sort.mjs +18 -0
  147. package/google-workspace/tools/sheets-admin/tab-modify.mjs +36 -0
  148. package/google-workspace/tovu-admin-surfaces.json +63 -0
  149. package/google-workspace/tovu-agent-tools.json +1178 -0
  150. package/google-workspace/tovu-connections.json +35 -0
  151. package/google-workspace/tovu-form-destinations.json +10 -0
  152. package/google-workspace/ui/README.md +73 -0
  153. package/google-workspace/ui/connection-panel.handler.mjs +167 -0
  154. package/google-workspace/ui/connection-panel.html +17 -0
  155. package/google-workspace/ui/connection-panel.mjs +189 -0
  156. package/google-workspace/ui/connection-view.mjs +120 -0
  157. package/google-workspace/ui/destination-panel.handler.mjs +106 -0
  158. package/google-workspace/ui/destination-panel.html +17 -0
  159. package/google-workspace/ui/destination-panel.mjs +150 -0
  160. package/google-workspace/ui/dom.mjs +140 -0
  161. package/google-workspace/ui/panel.css +170 -0
  162. package/google-workspace/ui/picker-flow.mjs +87 -0
  163. package/google-workspace/ui/picker-view.mjs +44 -0
  164. package/google-workspace/ui/picker.handler.mjs +56 -0
  165. package/google-workspace/ui/picker.html +17 -0
  166. package/google-workspace/ui/picker.mjs +88 -0
  167. package/google-workspace/ui/surface-client.mjs +227 -0
  168. package/higgsfield-media/mcp.json +9 -0
  169. package/higgsfield-media/plugin.json +109 -0
  170. package/higgsfield-media/skills/higgsfield-media/SKILL.md +325 -0
  171. package/higgsfield-media/skills/higgsfield-media/references/failure-modes.md +116 -0
  172. package/higgsfield-media/skills/higgsfield-media/references/models-and-plan-gates.md +142 -0
  173. package/jev/mcp.json +4 -0
  174. package/jev/plugin.json +44 -0
  175. package/jev/skills/jev/SKILL.md +308 -0
  176. package/jev/skills/jev/references/cookbooks.md +197 -0
  177. package/jev/skills/jev/references/jaggedness.md +135 -0
  178. package/jev/skills/jev/references/javascript-sdk.md +146 -0
  179. package/jev/skills/jev/references/patterns.md +123 -0
  180. package/jev/skills/jev/references/primitives-reference.md +187 -0
  181. package/langfuse/plugin.json +22 -0
  182. package/meilisearch/mcp.json +4 -0
  183. package/meilisearch/plugin.json +54 -0
  184. package/meilisearch/providers/meilisearch.mjs +651 -0
  185. package/meilisearch/skills/meilisearch/SKILL.md +43 -0
  186. package/meilisearch/tovu-search-providers.json +10 -0
  187. package/netlify/NOTES.md +13 -0
  188. package/netlify/mcp.json +4 -0
  189. package/netlify/plugin.json +47 -0
  190. package/netlify/skills/netlify/SKILL.md +39 -0
  191. package/netlify/targets/netlify.mjs +384 -0
  192. package/netlify/tovu-consent.json +6 -0
  193. package/netlify/tovu-deploy-targets.json +163 -0
  194. package/opentelemetry/mcp.json +4 -0
  195. package/opentelemetry/plugin.json +52 -0
  196. package/opentelemetry/skills/opentelemetry/SKILL.md +39 -0
  197. package/package.json +161 -6
  198. package/posthog/mcp.json +4 -0
  199. package/posthog/plugin.json +46 -0
  200. package/posthog/skills/posthog/SKILL.md +36 -0
  201. package/railway/deploy-configs/railway.mjs +135 -0
  202. package/railway/deploy-ops/railway.mjs +167 -0
  203. package/railway/mcp.json +4 -0
  204. package/railway/plugin.json +45 -0
  205. package/railway/skills/railway/SKILL.md +66 -0
  206. package/railway/tovu-deploy-configs.json +16 -0
  207. package/railway/tovu-deploy-ops.json +11 -0
  208. package/render/deploy-configs/render.mjs +141 -0
  209. package/render/deploy-ops/render.mjs +152 -0
  210. package/render/mcp.json +4 -0
  211. package/render/plugin.json +47 -0
  212. package/render/skills/render/SKILL.md +63 -0
  213. package/render/tovu-deploy-configs.json +16 -0
  214. package/render/tovu-deploy-ops.json +11 -0
  215. package/resend/NOTES.md +52 -0
  216. package/resend/adapters/resend.mjs +161 -0
  217. package/resend/lib/domains.mjs +137 -0
  218. package/resend/lib/errors.mjs +25 -0
  219. package/resend/lib/feedback.mjs +118 -0
  220. package/resend/mcp.json +13 -0
  221. package/resend/plugin.json +192 -0
  222. package/resend/skills/resend/SKILL.md +107 -0
  223. package/resend/tovu-mail-adapters.json +22 -0
  224. package/s3-compatible/NOTES.md +11 -0
  225. package/s3-compatible/mcp.json +4 -0
  226. package/s3-compatible/object-stores/s3-compatible.mjs +287 -0
  227. package/s3-compatible/plugin.json +56 -0
  228. package/s3-compatible/skills/s3-compatible/SKILL.md +39 -0
  229. package/s3-compatible/targets/s3-compatible.mjs +1054 -0
  230. package/s3-compatible/tovu-deploy-targets.json +432 -0
  231. package/s3-compatible/tovu-object-stores.json +29 -0
  232. package/sentry/mcp.json +4 -0
  233. package/sentry/plugin.json +49 -0
  234. package/sentry/skills/sentry/SKILL.md +34 -0
  235. package/shopify/mcp.json +4 -0
  236. package/shopify/plugin.json +22 -0
  237. package/shopify/skills/shopify/SKILL.md +103 -0
  238. package/shopify/skills/shopify/references/catalog-sync.md +74 -0
  239. package/shopify/skills/shopify/references/domains.md +26 -0
  240. package/shopify/skills/shopify/references/live-storefront.md +34 -0
  241. package/shopify/skills/shopify/references/storefront-snippets.md +21 -0
  242. package/site-compliance/mcp.json +4 -0
  243. package/site-compliance/plugin.json +34 -0
  244. package/site-compliance/skills/site-compliance/SKILL.md +220 -0
  245. package/site-compliance/skills/site-compliance/references/ccpa-cpra.md +115 -0
  246. package/site-compliance/skills/site-compliance/references/gdpr-eu-uk.md +143 -0
  247. package/site-compliance/skills/site-compliance/references/wcag-2-2.md +129 -0
  248. package/site-import/mcp.json +4 -0
  249. package/site-import/plugin.json +41 -0
  250. package/site-import/skills/site-import/SKILL.md +232 -0
  251. package/site-import/skills/site-import/references/content-mapping.md +166 -0
  252. package/site-import/skills/site-import/references/discovery-and-classification.md +117 -0
  253. package/site-import/skills/site-import/references/theme-extraction.md +34 -0
  254. package/slide-design/com.anthropic.claude-code/hooks/hooks.json +4 -0
  255. package/slide-design/mcp.json +4 -0
  256. package/slide-design/plugin.json +26 -0
  257. package/slide-design/skills/slide-design/SKILL.md +103 -0
  258. package/slide-design/skills/slide-design/references/charts-and-exhibits.md +100 -0
  259. package/slide-design/skills/slide-design/references/html-deck.md +175 -0
  260. package/slide-design/skills/slide-design/references/layout-and-style.md +131 -0
  261. package/slide-design/skills/slide-design/references/review.md +93 -0
  262. package/slide-design/skills/slide-design/references/storyline.md +118 -0
  263. package/stripe/plugin.json +22 -0
  264. package/supabase/mcp.json +26 -0
  265. package/supabase/plugin.json +78 -0
  266. package/supabase/skills/supabase/SKILL.md +169 -0
  267. package/supabase/skills/supabase/references/failure-modes.md +101 -0
  268. package/ui-ux-design/CHANGELOG.md +28 -0
  269. package/ui-ux-design/LICENSE +201 -0
  270. package/ui-ux-design/NOTICE +14 -0
  271. package/ui-ux-design/README.md +62 -0
  272. package/ui-ux-design/com.anthropic.claude-code/hooks/hooks.json +4 -0
  273. package/ui-ux-design/mcp.json +4 -0
  274. package/ui-ux-design/plugin.json +26 -0
  275. package/ui-ux-design/skills/frontend-accessibility/SKILL.md +60 -0
  276. package/ui-ux-design/skills/gstack-design/SKILL.md +53 -0
  277. package/ui-ux-design/skills/gstack-design/references/consultation.md +30 -0
  278. package/ui-ux-design/skills/gstack-design/references/html.md +29 -0
  279. package/ui-ux-design/skills/gstack-design/references/review.md +28 -0
  280. package/ui-ux-design/skills/gstack-design/references/shotgun.md +33 -0
  281. package/ui-ux-design/skills/gstack-design/references/upstream-notes.md +23 -0
  282. package/ui-ux-design/skills/interface-design/ORIGINAL.md +16 -0
  283. package/ui-ux-design/skills/interface-design/SKILL.md +41 -0
  284. package/ui-ux-design/skills/interface-design/references/commands/audit.md +40 -0
  285. package/ui-ux-design/skills/interface-design/references/commands/critique.md +21 -0
  286. package/ui-ux-design/skills/interface-design/references/commands/extract.md +34 -0
  287. package/ui-ux-design/skills/interface-design/references/commands/init.md +31 -0
  288. package/ui-ux-design/skills/interface-design/references/commands/status.md +22 -0
  289. package/ui-ux-design/skills/interface-design/references/examples/system-precision.md +29 -0
  290. package/ui-ux-design/skills/interface-design/references/examples/system-warmth.md +29 -0
  291. package/ui-ux-design/skills/interface-design/references/system-template.md +57 -0
  292. package/ui-ux-design/skills/shadcn-ui/README.md +244 -0
  293. package/ui-ux-design/skills/shadcn-ui/SKILL.md +333 -0
  294. package/ui-ux-design/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
  295. package/ui-ux-design/skills/shadcn-ui/examples/data-table.tsx +313 -0
  296. package/ui-ux-design/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
  297. package/ui-ux-design/skills/shadcn-ui/resources/component-catalog.md +481 -0
  298. package/ui-ux-design/skills/shadcn-ui/resources/customization-guide.md +516 -0
  299. package/ui-ux-design/skills/shadcn-ui/resources/migration-guide.md +463 -0
  300. package/ui-ux-design/skills/shadcn-ui/resources/setup-guide.md +412 -0
  301. package/ui-ux-design/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
  302. package/ui-ux-design/skills/ui-ux-design/SKILL.md +171 -0
  303. package/ui-ux-design/skills/ui-ux-design/references/brand-and-voice.md +78 -0
  304. package/ui-ux-design/skills/ui-ux-design/references/chrome-mobile-test-matrix.md +137 -0
  305. package/ui-ux-design/skills/ui-ux-design/references/components-and-states.md +112 -0
  306. package/ui-ux-design/skills/ui-ux-design/references/delight-and-motion.md +54 -0
  307. package/ui-ux-design/skills/ui-ux-design/references/foundations.md +145 -0
  308. package/ui-ux-design/skills/ui-ux-design/references/inclusive-ai-imagery.md +57 -0
  309. package/ui-ux-design/skills/ui-ux-design/references/kole-jain-uiux-concepts.md +104 -0
  310. package/ui-ux-design/skills/ui-ux-design/references/kuinetic-reference.md +184 -0
  311. package/ui-ux-design/skills/ui-ux-design/references/openai-frontend-skill.md +139 -0
  312. package/ui-ux-design/skills/ui-ux-design/references/premium-ui.md +55 -0
  313. package/ui-ux-design/skills/ui-ux-design/references/research-and-validation.md +88 -0
  314. package/ui-ux-design/skills/ui-ux-design/references/sam-crawford-premium-websites.md +103 -0
  315. package/ui-ux-design/skills/ui-ux-design/references/self-made-web-designer-core-skills.md +119 -0
  316. package/ui-ux-design/skills/ui-ux-design/references/ui-animation.md +173 -0
  317. package/ui-ux-design/skills/ui-ux-design/references/ui-loop.md +234 -0
  318. package/ui-ux-design/skills/ui-ux-design/references/visual-storytelling.md +54 -0
  319. package/ui-ux-design/skills/vercel-web-design-guidelines/SKILL.md +39 -0
  320. package/ui-ux-design/skills/web-compliance/SKILL.md +134 -0
  321. package/ui-ux-design/skills/web-compliance/references/audit-evidence.md +59 -0
  322. package/vercel/NOTES.md +23 -0
  323. package/vercel/mcp.json +4 -0
  324. package/vercel/object-stores/vercel-blob.mjs +147 -0
  325. package/vercel/plugin.json +47 -0
  326. package/vercel/skills/vercel/SKILL.md +48 -0
  327. package/vercel/targets/vercel.mjs +586 -0
  328. package/vercel/tovu-consent.json +6 -0
  329. package/vercel/tovu-deploy-targets.json +219 -0
  330. package/vercel/tovu-object-stores.json +10 -0
  331. package/wordpress/NOTES.md +33 -0
  332. package/wordpress/plugin.json +30 -0
  333. package/wordpress/skills/wordpress/SKILL.md +43 -0
  334. package/wordpress/skills/wordpress/references/free-site-redirect.md +46 -0
  335. package/wordpress/skills/wordpress/references/subdomain.md +66 -0
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @file Tool `sheets_export_csv` (`p_google_workspace__sheets_export_csv`): one tab (or an A1 range of it) as a CSV
3
+ * file the person can download. Read only on Google's side; the file is written through the host's
4
+ * artifact capability and only its reference, size and dimensions come back to chat.
5
+ *
6
+ * Exists because chat output is bounded (64 KiB) while a tab is not: the export reads the tab in
7
+ * bounded chunks, encodes CSV locally, and refuses — never truncates — anything over its bounds.
8
+ * A host without an artifact store passes no `artifacts` capability; the export refuses before any
9
+ * Google read then, so nothing is fetched for a file that could never be saved.
10
+ */
11
+ import { getSpreadsheet, sheetsClientFor, sheetsUrl, tabsOf } from '../../lib/sheets-client.mjs';
12
+ import { encodeCsv, planChunks } from '../../lib/sheets-admin-csv.mjs';
13
+ import { parseBoundsA1 } from '../../lib/sheets-a1.mjs';
14
+ import { GoogleWorkspaceError } from '../../lib/request-policy.mjs';
15
+
16
+ /** The tab's title and grid size. @complexity O(t) tabs. */
17
+ async function readTab(client, input, signal) {
18
+ const body = await getSpreadsheet({ client, connectionRef: input.connectionRef, spreadsheetId: input.spreadsheetId, fields: 'sheets(properties(sheetId,title,gridProperties(rowCount,columnCount)))' }, { signal });
19
+ const properties = tabsOf({ body, sheetId: input.sheetId })[0]?.properties;
20
+ if (typeof properties?.title !== 'string') throw new GoogleWorkspaceError({ code: 'invalid-input' }, { detail: `no tab with sheetId ${input.sheetId}` });
21
+ return properties;
22
+ }
23
+
24
+ /** The area to export: the given range, or the tab's whole grid. @complexity O(1). */
25
+ function areaOf(input, properties) {
26
+ if (input.range !== undefined) return parseBoundsA1({ range: input.range });
27
+ const grid = properties.gridProperties ?? {};
28
+ return { firstRow: 0, lastRow: Math.max(0, (grid.rowCount ?? 1) - 1), firstColumn: 0, lastColumn: Math.max(0, (grid.columnCount ?? 1) - 1) };
29
+ }
30
+
31
+ /** Every chunk's rows, each padded to its row count so later chunks keep their place. @complexity O(cells). */
32
+ async function readRows(client, input, chunks, signal) {
33
+ const rows = [];
34
+ for (const chunk of chunks) {
35
+ const body = await client.request({
36
+ connectionRef: input.connectionRef, url: sheetsUrl({ spreadsheetId: input.spreadsheetId }, { segments: ['values'], method: ':batchGet' }), kind: 'read',
37
+ query: { ranges: chunk.range, majorDimension: 'ROWS', valueRenderOption: input.valueRenderOption ?? 'FORMATTED_VALUE' },
38
+ }, signal ? { signal } : {});
39
+ rows.push(...paddedRows(body, chunk.rowCount));
40
+ }
41
+ return rows;
42
+ }
43
+
44
+ /** One chunk's rows; Google drops trailing empty rows, so they are put back as empty rows. @complexity O(rows). */
45
+ function paddedRows(body, rowCount) {
46
+ const values = Array.isArray(body?.valueRanges?.[0]?.values) ? body.valueRanges[0].values : [];
47
+ return Array.from({ length: rowCount }, (_, index) => (Array.isArray(values[index]) ? values[index] : []));
48
+ }
49
+
50
+ /** A file name from the tab title: letters, digits, space, dot, dash and underscore only. @complexity O(title). */
51
+ function fileNameFor(title) {
52
+ const safe = title.replace(/[^\p{L}\p{N} ._-]+/gu, '_').trim().slice(0, 80);
53
+ return `${safe === '' ? 'sheet' : safe}.csv`;
54
+ }
55
+
56
+ export default {
57
+ async invoke({ input, capabilities, signal }) {
58
+ if (!capabilities.artifacts) throw new GoogleWorkspaceError({ code: 'export-unavailable' });
59
+ const client = sheetsClientFor({ capabilities });
60
+ const properties = await readTab(client, input, signal);
61
+ const chunks = planChunks({ title: properties.title, area: areaOf(input, properties) });
62
+ const { csv, rows, columns, bytes } = encodeCsv({ rows: await readRows(client, input, chunks, signal) });
63
+ const fileName = fileNameFor(properties.title);
64
+ const { artifactRef } = await capabilities.artifacts.write({ name: fileName, mediaType: 'text/csv', content: csv });
65
+ return { artifactRef, fileName, rows, columns, bytes };
66
+ },
67
+ };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @file Tool `sheets_filter_views` (`p_google_workspace__sheets_filter_views`): list, add, update, duplicate or
3
+ * delete saved filter views. Destructive because `delete` removes a view other people may use.
4
+ *
5
+ * Exists as a named wrapper over the reviewed filter-view request kinds; `list` reads only the views
6
+ * (field mask), never cell data.
7
+ */
8
+ import { assertOutputWithin, getSpreadsheet, resourceLines, runBatchUpdate, sheetsClientFor, spreadsheetLine, tabsOf } from '../../lib/sheets-client.mjs';
9
+
10
+ /** action → the one batch request it sends. */
11
+ const REQUESTS = {
12
+ add: (input) => ({ addFilterView: { filter: input.filter } }),
13
+ update: (input) => ({ updateFilterView: { filter: { ...input.filter, filterViewId: input.filterViewId }, fields: input.fields.join(',') } }),
14
+ duplicate: (input) => ({ duplicateFilterView: { filterId: input.filterViewId } }),
15
+ delete: (input) => ({ deleteFilterView: { filterId: input.filterViewId } }),
16
+ };
17
+
18
+ /** Views per tab, optionally one tab. @complexity O(t) tabs. */
19
+ async function listViews(client, input, signal) {
20
+ const body = await getSpreadsheet({ client, connectionRef: input.connectionRef, spreadsheetId: input.spreadsheetId, fields: 'sheets(properties(sheetId,title),filterViews)' }, { signal });
21
+ const tabs = tabsOf({ body, sheetId: input.sheetId }).map((sheet) => ({ sheetId: sheet.properties?.sheetId, title: sheet.properties?.title, filterViews: sheet.filterViews ?? [] }));
22
+ return assertOutputWithin({ value: { action: 'list', tabs } });
23
+ }
24
+
25
+ export default {
26
+ async invoke({ input, capabilities, signal }) {
27
+ const client = sheetsClientFor({ capabilities });
28
+ if (input.action === 'list') return listViews(client, input, signal);
29
+ const { replies } = await runBatchUpdate({ client, connectionRef: input.connectionRef, spreadsheetId: input.spreadsheetId, requests: [REQUESTS[input.action](input)] }, { signal });
30
+ const view = replies[0]?.addFilterView?.filter ?? replies[0]?.duplicateFilterView?.filter;
31
+ return assertOutputWithin({ value: { action: input.action, ...(view ? { filterView: view } : { filterViewId: input.filterViewId }) } });
32
+ },
33
+ describeAffectedResources({ input }) {
34
+ const target = input.action === 'add' ? `new filter view "${input.filter?.title ?? 'untitled'}"` : `filter view ${input.filterViewId ?? ''}`.trim();
35
+ const verb = input.action === 'list' ? 'list filter views (no change)' : `${input.action} ${target}`;
36
+ return resourceLines({ lines: [spreadsheetLine(input), verb] });
37
+ },
38
+ };
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @file Tool `sheets_format` (`p_google_workspace__sheets_format`): basic formatting of a grid range — number
3
+ * formats, fonts, colours, alignment and wrapping (cell format with an explicit field mask), borders,
4
+ * frozen rows and columns, and column widths. A `write`: it never touches cell values.
5
+ *
6
+ * Exists as a named wrapper over the reviewed `repeatCell`, `updateBorders`,
7
+ * `updateSheetProperties` and `updateDimensionProperties` request kinds, sent as one batch. The
8
+ * format mask is always prefixed `userEnteredFormat.` from an allow-listed set (input schema), so a
9
+ * format call can never clear or overwrite values the way a `*` or `userEnteredValue` mask would.
10
+ */
11
+ import { resourceLines, runBatchUpdate, sheetsClientFor, spreadsheetLine } from '../../lib/sheets-client.mjs';
12
+ import { gridRangeLabel } from '../../lib/sheets-a1.mjs';
13
+
14
+ const BORDER_SIDES = ['top', 'bottom', 'left', 'right', 'innerHorizontal', 'innerVertical'];
15
+
16
+ function cellFormatRequest(input) {
17
+ const fields = input.fields.map((field) => `userEnteredFormat.${field}`).join(',');
18
+ return { repeatCell: { range: input.range, cell: { userEnteredFormat: input.cellFormat }, fields } };
19
+ }
20
+
21
+ function bordersRequest(input) {
22
+ const sides = Object.fromEntries(BORDER_SIDES.filter((side) => input.borders[side]).map((side) => [side, input.borders[side]]));
23
+ return { updateBorders: { range: input.range, ...sides } };
24
+ }
25
+
26
+ /** Frozen rows/columns, only the ones given. @complexity O(1). */
27
+ function frozenRequest(input) {
28
+ const gridProperties = {};
29
+ if (input.frozenRowCount !== undefined) gridProperties.frozenRowCount = input.frozenRowCount;
30
+ if (input.frozenColumnCount !== undefined) gridProperties.frozenColumnCount = input.frozenColumnCount;
31
+ const fields = Object.keys(gridProperties).map((name) => `gridProperties.${name}`).join(',');
32
+ return { updateSheetProperties: { properties: { sheetId: input.range.sheetId, gridProperties }, fields } };
33
+ }
34
+
35
+ function columnWidthRequest(input) {
36
+ const { sheetId, startColumnIndex, endColumnIndex } = input.range;
37
+ const range = { sheetId, dimension: 'COLUMNS', ...(startColumnIndex === undefined ? {} : { startIndex: startColumnIndex }), ...(endColumnIndex === undefined ? {} : { endIndex: endColumnIndex }) };
38
+ return { updateDimensionProperties: { range, properties: { pixelSize: input.columnWidth }, fields: 'pixelSize' } };
39
+ }
40
+
41
+ /** The requests for the parts of the input that are present, in a fixed order. @complexity O(1). */
42
+ function requestsFor(input) {
43
+ return [
44
+ input.cellFormat === undefined ? undefined : cellFormatRequest(input),
45
+ input.borders === undefined ? undefined : bordersRequest(input),
46
+ input.frozenRowCount === undefined && input.frozenColumnCount === undefined ? undefined : frozenRequest(input),
47
+ input.columnWidth === undefined ? undefined : columnWidthRequest(input),
48
+ ].filter(Boolean);
49
+ }
50
+
51
+ /** What the card lists as changing. @complexity O(1). */
52
+ function changedParts(input) {
53
+ return [
54
+ input.cellFormat === undefined ? undefined : `cell format (${input.fields.join(', ')})`,
55
+ input.borders === undefined ? undefined : 'borders',
56
+ input.frozenRowCount === undefined ? undefined : `frozen rows = ${input.frozenRowCount}`,
57
+ input.frozenColumnCount === undefined ? undefined : `frozen columns = ${input.frozenColumnCount}`,
58
+ input.columnWidth === undefined ? undefined : `column width = ${input.columnWidth}px`,
59
+ ].filter(Boolean);
60
+ }
61
+
62
+ export default {
63
+ async invoke({ input, capabilities, signal }) {
64
+ await runBatchUpdate({ client: sheetsClientFor({ capabilities }), connectionRef: input.connectionRef, spreadsheetId: input.spreadsheetId, requests: requestsFor(input) }, { signal });
65
+ return { formatted: input.range, changed: changedParts(input) };
66
+ },
67
+ describeAffectedResources({ input }) {
68
+ return resourceLines({ lines: [spreadsheetLine(input), `format ${gridRangeLabel({ range: input.range })}: ${changedParts(input).join('; ')}`] });
69
+ },
70
+ };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @file Tool `sheets_named_ranges` (`p_google_workspace__sheets_named_ranges`): list, add, update or delete named
3
+ * ranges. Destructive because deleting or re-pointing a named range breaks formulas that use it.
4
+ *
5
+ * Exists as a named wrapper over the reviewed named-range request kinds.
6
+ */
7
+ import { assertOutputWithin, getSpreadsheet, resourceLines, runBatchUpdate, sheetsClientFor, spreadsheetLine } from '../../lib/sheets-client.mjs';
8
+ import { gridRangeLabel } from '../../lib/sheets-a1.mjs';
9
+
10
+ /** The fields an update changes: only the ones given. @complexity O(1). */
11
+ const updatedFields = (input) => ['name', 'range'].filter((field) => input[field] !== undefined).join(',');
12
+
13
+ /** action → the one batch request it sends. */
14
+ const REQUESTS = {
15
+ add: (input) => ({ addNamedRange: { namedRange: { name: input.name, range: input.range } } }),
16
+ update: (input) => ({ updateNamedRange: { namedRange: { namedRangeId: input.namedRangeId, ...(input.name === undefined ? {} : { name: input.name }), ...(input.range === undefined ? {} : { range: input.range }) }, fields: updatedFields(input) } }),
17
+ delete: (input) => ({ deleteNamedRange: { namedRangeId: input.namedRangeId } }),
18
+ };
19
+
20
+ export default {
21
+ async invoke({ input, capabilities, signal }) {
22
+ const client = sheetsClientFor({ capabilities });
23
+ if (input.action === 'list') {
24
+ const body = await getSpreadsheet({ client, connectionRef: input.connectionRef, spreadsheetId: input.spreadsheetId, fields: 'namedRanges' }, { signal });
25
+ return assertOutputWithin({ value: { action: 'list', namedRanges: body?.namedRanges ?? [] } });
26
+ }
27
+ const { replies } = await runBatchUpdate({ client, connectionRef: input.connectionRef, spreadsheetId: input.spreadsheetId, requests: [REQUESTS[input.action](input)] }, { signal });
28
+ const added = replies[0]?.addNamedRange?.namedRange;
29
+ return { action: input.action, ...(added ? { namedRange: added } : { namedRangeId: input.namedRangeId }) };
30
+ },
31
+ describeAffectedResources({ input }) {
32
+ const where = input.range ? ` at ${gridRangeLabel({ range: input.range })}` : '';
33
+ const newName = input.name === undefined ? '' : ` to "${input.name}"`;
34
+ const lines = {
35
+ list: 'list named ranges (no change)',
36
+ add: `add named range "${input.name}"${where}`,
37
+ update: `change named range ${input.namedRangeId}${newName}${where} (formulas using it follow the change)`,
38
+ delete: `delete named range ${input.namedRangeId} (formulas using it stop working)`,
39
+ };
40
+ return resourceLines({ lines: [spreadsheetLine(input), lines[input.action]] });
41
+ },
42
+ };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @file Tool `sheets_open_existing` (`p_google_workspace__sheets_open_existing`): work with a spreadsheet the
3
+ * person already has. Without a `spreadsheetId` it answers `waiting` and points to the file picker;
4
+ * with one (from a completed pick) it verifies, with the connected account, that the site can open the
5
+ * file and that it is a spreadsheet (Drive metadata, then the Sheets API opens it: the same check as
6
+ * a Picker selection, `verifySpreadsheetAccess`), and returns its id, title and link. Read only.
7
+ *
8
+ * Exists because under `drive.file` a pasted link grants nothing: only Google's picker (or the site
9
+ * creating the file) does. Verifying through the API is the only honest answer to "can the site open
10
+ * this?": an ungranted file is `file-not-granted` with the next action "choose it with the picker".
11
+ * Chat receives resource metadata only; the link is built from the verified id, not taken from Google.
12
+ */
13
+ import { verifySpreadsheetAccess } from '../../lib/picker-selection.mjs';
14
+ import { assertProductEnabled } from '../../lib/product-state.mjs';
15
+ import { SHEETS_PRODUCT_ID, assertSpreadsheetId, sheetsClientFor } from '../../lib/sheets-client.mjs';
16
+
17
+ const WAITING = Object.freeze({
18
+ status: 'waiting',
19
+ nextAction: 'open-picker',
20
+ message: 'Ask the person to choose the spreadsheet with Google\'s file picker in the Google Workspace plugin (or offer to create a new one). A pasted link is not enough. Then call this again with the chosen spreadsheetId.',
21
+ });
22
+
23
+ export default {
24
+ async invoke({ input, capabilities, signal }) {
25
+ if (input.spreadsheetId === undefined) {
26
+ // Sends nothing to Google, but pointing at the picker is still a Sheets action: it is gated too.
27
+ await assertProductEnabled({ state: capabilities.state, productId: SHEETS_PRODUCT_ID });
28
+ return WAITING;
29
+ }
30
+ const fileId = assertSpreadsheetId({ id: input.spreadsheetId });
31
+ const resource = await verifySpreadsheetAccess({ client: sheetsClientFor({ capabilities }), connectionRef: input.connectionRef, fileId }, signal ? { signal } : {});
32
+ return { status: 'selected', resource };
33
+ },
34
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @file Tool `sheets_protected_ranges_get` (`p_google_workspace__sheets_protected_ranges_get`): which ranges of a
3
+ * spreadsheet are protected, by whom, and whether the connected account may edit them. Read only.
4
+ *
5
+ * Exists so chat can explain a refused edit before trying it. Protection changes go through
6
+ * `batch_update` (destructive, confirmed) instead of a wrapper.
7
+ */
8
+ import { assertOutputWithin, getSpreadsheet, sheetsClientFor, tabsOf } from '../../lib/sheets-client.mjs';
9
+
10
+ const FIELDS = 'sheets(properties(sheetId,title),protectedRanges(protectedRangeId,range,namedRangeId,tableId,description,warningOnly,requestingUserCanEdit,unprotectedRanges,editors))';
11
+
12
+ export default {
13
+ async invoke({ input, capabilities, signal }) {
14
+ const body = await getSpreadsheet({ client: sheetsClientFor({ capabilities }), connectionRef: input.connectionRef, spreadsheetId: input.spreadsheetId, fields: FIELDS }, { signal });
15
+ const tabs = tabsOf({ body, sheetId: input.sheetId }).map((sheet) => ({ sheetId: sheet.properties?.sheetId, title: sheet.properties?.title, protectedRanges: sheet.protectedRanges ?? [] }));
16
+ return assertOutputWithin({ value: { tabs } });
17
+ },
18
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @file Tool `sheets_sort` (`p_google_workspace__sheets_sort`): physically reorder the rows of a grid range by one
3
+ * or more columns. Destructive: the original row order is gone and the site cannot undo a remote change.
4
+ *
5
+ * Exists as a named wrapper over the reviewed `sortRange` request, sent through the batch path.
6
+ */
7
+ import { resourceLines, runBatchUpdate, sheetsClientFor, spreadsheetLine } from '../../lib/sheets-client.mjs';
8
+ import { gridRangeLabel } from '../../lib/sheets-a1.mjs';
9
+
10
+ export default {
11
+ async invoke({ input, capabilities, signal }) {
12
+ await runBatchUpdate({ client: sheetsClientFor({ capabilities }), connectionRef: input.connectionRef, spreadsheetId: input.spreadsheetId, requests: [{ sortRange: { range: input.range, sortSpecs: input.sortSpecs } }] }, { signal });
13
+ return { sorted: input.range, sortSpecs: input.sortSpecs };
14
+ },
15
+ describeAffectedResources({ input }) {
16
+ return resourceLines({ lines: [spreadsheetLine(input), `reorder rows of ${gridRangeLabel({ range: input.range })} (the old order is not kept)`] });
17
+ },
18
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @file Tool `sheets_tab_modify` (`p_google_workspace__sheets_tab_modify`): add, rename, delete, duplicate or move
3
+ * one tab of a spreadsheet. Declared destructive because `delete` removes a tab and its data; the
4
+ * confirmation card names the spreadsheet, the action and the tab.
5
+ *
6
+ * Exists as a named wrapper so the common tab changes need no raw batch: each action becomes one
7
+ * reviewed request kind and goes through the same batch path as `batch_update`.
8
+ */
9
+ import { resourceLines, runBatchUpdate, sheetsClientFor, spreadsheetLine } from '../../lib/sheets-client.mjs';
10
+
11
+ /** action → the one batch request it sends. */
12
+ const REQUESTS = {
13
+ add: (input) => ({ addSheet: { properties: { title: input.title, ...(input.index === undefined ? {} : { index: input.index }) } } }),
14
+ rename: (input) => ({ updateSheetProperties: { properties: { sheetId: input.sheetId, title: input.title }, fields: 'title' } }),
15
+ delete: (input) => ({ deleteSheet: { sheetId: input.sheetId } }),
16
+ duplicate: (input) => ({ duplicateSheet: { sourceSheetId: input.sheetId, ...(input.title === undefined ? {} : { newSheetName: input.title }), ...(input.index === undefined ? {} : { insertSheetIndex: input.index }) } }),
17
+ move: (input) => ({ updateSheetProperties: { properties: { sheetId: input.sheetId, index: input.index }, fields: 'index' } }),
18
+ };
19
+
20
+ /** The resulting tab: Google's properties for add/duplicate, the requested ones otherwise. @complexity O(1). */
21
+ function resultFor(input, reply) {
22
+ const created = reply?.addSheet?.properties ?? reply?.duplicateSheet?.properties;
23
+ if (created) return { action: input.action, tab: { sheetId: created.sheetId, title: created.title, index: created.index } };
24
+ return { action: input.action, tab: { sheetId: input.sheetId, ...(input.title === undefined ? {} : { title: input.title }), ...(input.index === undefined ? {} : { index: input.index }) } };
25
+ }
26
+
27
+ export default {
28
+ async invoke({ input, capabilities, signal }) {
29
+ const { replies } = await runBatchUpdate({ client: sheetsClientFor({ capabilities }), connectionRef: input.connectionRef, spreadsheetId: input.spreadsheetId, requests: [REQUESTS[input.action](input)] }, { signal });
30
+ return resultFor(input, replies[0]);
31
+ },
32
+ describeAffectedResources({ input }) {
33
+ const tab = input.sheetId === undefined ? `new tab "${input.title}"` : `tab ${input.sheetId}`;
34
+ return resourceLines({ lines: [spreadsheetLine(input), `${input.action} ${tab}${input.action === 'delete' ? ' and all of its data' : ''}`] });
35
+ },
36
+ };
@@ -0,0 +1,63 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "surfaces": [
4
+ {
5
+ "id": "connection",
6
+ "title": "Google Workspace",
7
+ "entry": "ui/connection-panel.html",
8
+ "files": ["ui/surface-client.mjs","ui/dom.mjs","ui/panel.css","ui/connection-panel.mjs","ui/connection-view.mjs"],
9
+ "handlerModule": "ui/connection-panel.handler.mjs",
10
+ "connections": [{"id":"account"}],
11
+ "deliveryAdapters": ["google-sheets"],
12
+ "linkOrigins": ["https://myaccount.google.com"],
13
+ "actions": [
14
+ {"name":"status","input":{"type":"object","properties":{},"required":[],"additionalProperties":false},"result":{"type":"object","properties":{"connection":{"type":"object","properties":{"status":{"type":"string","maxLength":32,"enum":["connected","reconnect-required","revocation-pending","disconnected"]},"grantedProducts":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":16},"accountLabel":{"type":"string","maxLength":320},"pendingSwitchAccountLabel":{"type":"string","maxLength":320}},"required":["status","grantedProducts"],"additionalProperties":false},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":128},"enabled":{"type":"boolean"},"granted":{"type":"boolean"}},"required":["id","label","enabled","granted"],"additionalProperties":false},"maxItems":16},"destinations":{"type":"array","items":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64},"title":{"type":"string","maxLength":1024},"tabTitle":{"type":"string","maxLength":1024}},"required":["formSlug","title","tabTitle"],"additionalProperties":false},"maxItems":50},"accountAccessUrl":{"type":"string","maxLength":256}},"required":["connection","products","destinations","accountAccessUrl"],"additionalProperties":false}},
15
+ {"name":"sign-in","input":{"type":"object","properties":{"action":{"type":"string","maxLength":16,"enum":["connect","reconnect","switch","add-scopes"]}},"required":["action"],"additionalProperties":false},"result":{"type":"object","properties":{"expiresAt":{"type":"string","maxLength":64}},"required":["expiresAt"],"additionalProperties":false}},
16
+ {"name":"confirm-switch","input":{"type":"object","properties":{"reassign":{"type":"array","items":{"type":"string","maxLength":64,"minLength":1},"maxItems":50}},"required":["reassign"],"additionalProperties":false},"result":{"type":"object","properties":{"connection":{"type":"object","properties":{"status":{"type":"string","maxLength":32,"enum":["connected","reconnect-required","revocation-pending","disconnected"]},"grantedProducts":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":16},"accountLabel":{"type":"string","maxLength":320},"pendingSwitchAccountLabel":{"type":"string","maxLength":320}},"required":["status","grantedProducts"],"additionalProperties":false},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":128},"enabled":{"type":"boolean"},"granted":{"type":"boolean"}},"required":["id","label","enabled","granted"],"additionalProperties":false},"maxItems":16},"destinations":{"type":"array","items":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64},"title":{"type":"string","maxLength":1024},"tabTitle":{"type":"string","maxLength":1024}},"required":["formSlug","title","tabTitle"],"additionalProperties":false},"maxItems":50},"accountAccessUrl":{"type":"string","maxLength":256},"reassignment":{"type":"object","properties":{"moved":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50},"failed":{"type":"array","items":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64},"code":{"type":"string","maxLength":64},"message":{"type":"string","maxLength":400}},"required":["formSlug","code","message"],"additionalProperties":false},"maxItems":50}},"required":["moved","failed"],"additionalProperties":false}},"required":["connection","products","destinations","accountAccessUrl","reassignment"],"additionalProperties":false}},
17
+ {"name":"cancel-switch","input":{"type":"object","properties":{},"required":[],"additionalProperties":false},"result":{"type":"object","properties":{"connection":{"type":"object","properties":{"status":{"type":"string","maxLength":32,"enum":["connected","reconnect-required","revocation-pending","disconnected"]},"grantedProducts":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":16},"accountLabel":{"type":"string","maxLength":320},"pendingSwitchAccountLabel":{"type":"string","maxLength":320}},"required":["status","grantedProducts"],"additionalProperties":false},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":128},"enabled":{"type":"boolean"},"granted":{"type":"boolean"}},"required":["id","label","enabled","granted"],"additionalProperties":false},"maxItems":16},"destinations":{"type":"array","items":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64},"title":{"type":"string","maxLength":1024},"tabTitle":{"type":"string","maxLength":1024}},"required":["formSlug","title","tabTitle"],"additionalProperties":false},"maxItems":50},"accountAccessUrl":{"type":"string","maxLength":256}},"required":["connection","products","destinations","accountAccessUrl"],"additionalProperties":false}},
18
+ {"name":"disconnect","input":{"type":"object","properties":{},"required":[],"additionalProperties":false},"result":{"type":"object","properties":{"connection":{"type":"object","properties":{"status":{"type":"string","maxLength":32,"enum":["connected","reconnect-required","revocation-pending","disconnected"]},"grantedProducts":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":16},"accountLabel":{"type":"string","maxLength":320},"pendingSwitchAccountLabel":{"type":"string","maxLength":320}},"required":["status","grantedProducts"],"additionalProperties":false},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":128},"enabled":{"type":"boolean"},"granted":{"type":"boolean"}},"required":["id","label","enabled","granted"],"additionalProperties":false},"maxItems":16},"destinations":{"type":"array","items":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64},"title":{"type":"string","maxLength":1024},"tabTitle":{"type":"string","maxLength":1024}},"required":["formSlug","title","tabTitle"],"additionalProperties":false},"maxItems":50},"accountAccessUrl":{"type":"string","maxLength":256},"revocation":{"type":"string","maxLength":16,"enum":["confirmed","pending","not-needed"]}},"required":["connection","products","destinations","accountAccessUrl","revocation"],"additionalProperties":false}},
19
+ {"name":"set-product","input":{"type":"object","properties":{"productId":{"type":"string","maxLength":64,"enum":["sheets"]},"enabled":{"type":"boolean"}},"required":["productId","enabled"],"additionalProperties":false},"result":{"type":"object","properties":{"connection":{"type":"object","properties":{"status":{"type":"string","maxLength":32,"enum":["connected","reconnect-required","revocation-pending","disconnected"]},"grantedProducts":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":16},"accountLabel":{"type":"string","maxLength":320},"pendingSwitchAccountLabel":{"type":"string","maxLength":320}},"required":["status","grantedProducts"],"additionalProperties":false},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":128},"enabled":{"type":"boolean"},"granted":{"type":"boolean"}},"required":["id","label","enabled","granted"],"additionalProperties":false},"maxItems":16},"destinations":{"type":"array","items":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64},"title":{"type":"string","maxLength":1024},"tabTitle":{"type":"string","maxLength":1024}},"required":["formSlug","title","tabTitle"],"additionalProperties":false},"maxItems":50},"accountAccessUrl":{"type":"string","maxLength":256}},"required":["connection","products","destinations","accountAccessUrl"],"additionalProperties":false}}
20
+ ]
21
+ },
22
+ {
23
+ "id": "picker",
24
+ "title": "Choose spreadsheet",
25
+ "entry": "ui/picker.html",
26
+ "files": ["ui/surface-client.mjs","ui/dom.mjs","ui/panel.css","ui/picker-flow.mjs","ui/picker-view.mjs","ui/picker.mjs"],
27
+ "handlerModule": "ui/picker.handler.mjs",
28
+ "bootstrap": {"type":"object","properties":{"mode":{"type":"string","maxLength":16,"enum":["unavailable","system-browser","hosted"]},"reason":{"type":"string","maxLength":64},"message":{"type":"string","maxLength":300},"accountLabel":{"type":"string","maxLength":320},"picker":{"type":"object","properties":{"accessToken":{"type":"string","maxLength":4096},"developerKey":{"type":"string","maxLength":256},"appId":{"type":"string","maxLength":64},"sessionId":{"type":"string","maxLength":64}},"required":["accessToken","developerKey","appId","sessionId"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},
29
+ "connections": [{"id":"account","startParams":["trigger_onepick","mimetypes"],"callbackFields":["picked_file_ids"]}],
30
+ "publicConfig": ["TOVU_GOOGLE_PICKER_BROWSER_KEY","TOVU_GOOGLE_PICKER_APP_ID"],
31
+ "actions": [
32
+ {"name":"list-picked","input":{"type":"object","properties":{},"required":[],"additionalProperties":false},"result":{"type":"object","properties":{"spreadsheets":{"type":"array","items":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512}},"required":["spreadsheetId","title","url"],"additionalProperties":false},"maxItems":10}},"required":["spreadsheets"],"additionalProperties":false}},
33
+ {"name":"verify-picked","input":{"type":"object","properties":{"sessionId":{"type":"string","maxLength":64,"minLength":1},"fileId":{"type":"string","maxLength":256,"minLength":1}},"required":["sessionId","fileId"],"additionalProperties":false},"result":{"type":"object","properties":{"spreadsheet":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512}},"required":["spreadsheetId","title","url"],"additionalProperties":false}},"required":["spreadsheet"],"additionalProperties":false}},
34
+ {"name":"start-system-picker","input":{"type":"object","properties":{},"required":[],"additionalProperties":false},"result":{"type":"object","properties":{"expiresAt":{"type":"string","maxLength":64}},"required":["expiresAt"],"additionalProperties":false}},
35
+ {"name":"finish-system-picker","input":{"type":"object","properties":{},"required":[],"additionalProperties":false},"result":{"type":"object","properties":{"status":{"type":"string","maxLength":16,"enum":["none","waiting","expired","cancelled","selected"]},"spreadsheet":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512}},"required":["spreadsheetId","title","url"],"additionalProperties":false}},"required":["status"],"additionalProperties":false}}
36
+ ],
37
+ "csp": {"script-src":["https://apis.google.com"],"frame-src":["https://docs.google.com"]}
38
+ },
39
+ {
40
+ "id": "form-destinations",
41
+ "title": "Form destinations",
42
+ "entry": "ui/destination-panel.html",
43
+ "files": ["ui/surface-client.mjs","ui/dom.mjs","ui/panel.css","ui/picker-flow.mjs","ui/picker-view.mjs","ui/destination-panel.mjs"],
44
+ "handlerModule": "ui/destination-panel.handler.mjs",
45
+ "deliveryAdapters": ["google-sheets"],
46
+ "forms": ["list"],
47
+ "bootstrap": {"type":"object","properties":{"mode":{"type":"string","maxLength":16,"enum":["unavailable","system-browser","hosted"]},"reason":{"type":"string","maxLength":64},"message":{"type":"string","maxLength":300},"accountLabel":{"type":"string","maxLength":320},"picker":{"type":"object","properties":{"accessToken":{"type":"string","maxLength":4096},"developerKey":{"type":"string","maxLength":256},"appId":{"type":"string","maxLength":64},"sessionId":{"type":"string","maxLength":64}},"required":["accessToken","developerKey","appId","sessionId"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},
48
+ "connections": [{"id":"account","startParams":["trigger_onepick","mimetypes"],"callbackFields":["picked_file_ids"]}],
49
+ "publicConfig": ["TOVU_GOOGLE_PICKER_BROWSER_KEY","TOVU_GOOGLE_PICKER_APP_ID"],
50
+ "actions": [
51
+ {"name":"list-picked","input":{"type":"object","properties":{},"required":[],"additionalProperties":false},"result":{"type":"object","properties":{"spreadsheets":{"type":"array","items":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512}},"required":["spreadsheetId","title","url"],"additionalProperties":false},"maxItems":10}},"required":["spreadsheets"],"additionalProperties":false}},
52
+ {"name":"verify-picked","input":{"type":"object","properties":{"sessionId":{"type":"string","maxLength":64,"minLength":1},"fileId":{"type":"string","maxLength":256,"minLength":1}},"required":["sessionId","fileId"],"additionalProperties":false},"result":{"type":"object","properties":{"spreadsheet":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512}},"required":["spreadsheetId","title","url"],"additionalProperties":false}},"required":["spreadsheet"],"additionalProperties":false}},
53
+ {"name":"start-system-picker","input":{"type":"object","properties":{},"required":[],"additionalProperties":false},"result":{"type":"object","properties":{"expiresAt":{"type":"string","maxLength":64}},"required":["expiresAt"],"additionalProperties":false}},
54
+ {"name":"finish-system-picker","input":{"type":"object","properties":{},"required":[],"additionalProperties":false},"result":{"type":"object","properties":{"status":{"type":"string","maxLength":16,"enum":["none","waiting","expired","cancelled","selected"]},"spreadsheet":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512}},"required":["spreadsheetId","title","url"],"additionalProperties":false}},"required":["status"],"additionalProperties":false}},
55
+ {"name":"list-destinations","input":{"type":"object","properties":{},"required":[],"additionalProperties":false},"result":{"type":"object","properties":{"forms":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64},"title":{"type":"string","maxLength":1024}},"required":["slug","title"],"additionalProperties":false},"maxItems":200},"destinations":{"type":"array","items":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64},"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512},"sheetId":{"type":"integer","minimum":0},"tabTitle":{"type":"string","maxLength":1024},"sameAccount":{"type":"boolean"}},"required":["formSlug","spreadsheetId","title","url","sheetId","tabTitle"],"additionalProperties":false},"maxItems":50},"picked":{"type":"array","items":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512}},"required":["spreadsheetId","title","url"],"additionalProperties":false},"maxItems":10}},"required":["destinations","picked"],"additionalProperties":false}},
56
+ {"name":"list-tabs","input":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":256,"minLength":1}},"required":["spreadsheetId"],"additionalProperties":false},"result":{"type":"object","properties":{"spreadsheet":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512}},"required":["spreadsheetId","title","url"],"additionalProperties":false},"tabs":{"type":"array","items":{"type":"object","properties":{"sheetId":{"type":"integer","minimum":0},"title":{"type":"string","maxLength":1024}},"required":["sheetId","title"],"additionalProperties":false},"maxItems":200}},"required":["spreadsheet","tabs"],"additionalProperties":false}},
57
+ {"name":"save-destination","input":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64,"minLength":1},"spreadsheetId":{"type":"string","maxLength":256,"minLength":1},"sheetId":{"type":"integer","minimum":0,"maximum":2147483647},"confirmExternalRows":{"type":"boolean"}},"required":["formSlug","spreadsheetId","sheetId","confirmExternalRows"],"additionalProperties":false},"result":{"type":"object","properties":{"forms":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64},"title":{"type":"string","maxLength":1024}},"required":["slug","title"],"additionalProperties":false},"maxItems":200},"destinations":{"type":"array","items":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64},"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512},"sheetId":{"type":"integer","minimum":0},"tabTitle":{"type":"string","maxLength":1024},"sameAccount":{"type":"boolean"}},"required":["formSlug","spreadsheetId","title","url","sheetId","tabTitle"],"additionalProperties":false},"maxItems":50},"picked":{"type":"array","items":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512}},"required":["spreadsheetId","title","url"],"additionalProperties":false},"maxItems":10}},"required":["destinations","picked"],"additionalProperties":false}},
58
+ {"name":"remove-destination","input":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64,"minLength":1}},"required":["formSlug"],"additionalProperties":false},"result":{"type":"object","properties":{"forms":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64},"title":{"type":"string","maxLength":1024}},"required":["slug","title"],"additionalProperties":false},"maxItems":200},"destinations":{"type":"array","items":{"type":"object","properties":{"formSlug":{"type":"string","maxLength":64},"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512},"sheetId":{"type":"integer","minimum":0},"tabTitle":{"type":"string","maxLength":1024},"sameAccount":{"type":"boolean"}},"required":["formSlug","spreadsheetId","title","url","sheetId","tabTitle"],"additionalProperties":false},"maxItems":50},"picked":{"type":"array","items":{"type":"object","properties":{"spreadsheetId":{"type":"string","maxLength":200},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":512}},"required":["spreadsheetId","title","url"],"additionalProperties":false},"maxItems":10}},"required":["destinations","picked"],"additionalProperties":false}}
59
+ ],
60
+ "csp": {"script-src":["https://apis.google.com"],"frame-src":["https://docs.google.com"]}
61
+ }
62
+ ]
63
+ }