@b3os/cli 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/README.md +87 -7
  2. package/assets/b3os-run.py +137 -0
  3. package/assets/skill/b3os/SKILL.md +111 -0
  4. package/dist/commands/_agents.d.ts +14 -0
  5. package/dist/commands/_agents.js +33 -0
  6. package/dist/commands/_agents.js.map +1 -0
  7. package/dist/commands/_common.js +6 -2
  8. package/dist/commands/_common.js.map +1 -1
  9. package/dist/commands/_context.d.ts +49 -0
  10. package/dist/commands/_context.js +260 -0
  11. package/dist/commands/_context.js.map +1 -0
  12. package/dist/commands/_next.d.ts +39 -0
  13. package/dist/commands/_next.js +77 -0
  14. package/dist/commands/_next.js.map +1 -0
  15. package/dist/commands/agent.d.ts +42 -0
  16. package/dist/commands/agent.js +218 -0
  17. package/dist/commands/agent.js.map +1 -0
  18. package/dist/commands/app.d.ts +2 -0
  19. package/dist/commands/app.js +559 -54
  20. package/dist/commands/app.js.map +1 -1
  21. package/dist/commands/auth.d.ts +88 -2
  22. package/dist/commands/auth.js +354 -44
  23. package/dist/commands/auth.js.map +1 -1
  24. package/dist/commands/docs.d.ts +54 -0
  25. package/dist/commands/docs.js +202 -0
  26. package/dist/commands/docs.js.map +1 -0
  27. package/dist/commands/doctor.d.ts +23 -0
  28. package/dist/commands/doctor.js +313 -0
  29. package/dist/commands/doctor.js.map +1 -0
  30. package/dist/commands/init.d.ts +38 -1
  31. package/dist/commands/init.js +259 -60
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/listen.d.ts +30 -0
  34. package/dist/commands/listen.js +194 -0
  35. package/dist/commands/listen.js.map +1 -0
  36. package/dist/commands/manifest.d.ts +13 -1
  37. package/dist/commands/manifest.js +81 -18
  38. package/dist/commands/manifest.js.map +1 -1
  39. package/dist/commands/mcp.d.ts +25 -2
  40. package/dist/commands/mcp.js +120 -11
  41. package/dist/commands/mcp.js.map +1 -1
  42. package/dist/commands/sandbox.d.ts +35 -6
  43. package/dist/commands/sandbox.js +208 -9
  44. package/dist/commands/sandbox.js.map +1 -1
  45. package/dist/commands/setup.d.ts +39 -0
  46. package/dist/commands/setup.js +203 -0
  47. package/dist/commands/setup.js.map +1 -0
  48. package/dist/commands/tool.d.ts +154 -0
  49. package/dist/commands/tool.js +785 -0
  50. package/dist/commands/tool.js.map +1 -0
  51. package/dist/config.d.ts +30 -6
  52. package/dist/config.js +39 -8
  53. package/dist/config.js.map +1 -1
  54. package/dist/ctx.d.ts +5 -45
  55. package/dist/ctx.js +25 -160
  56. package/dist/ctx.js.map +1 -1
  57. package/dist/docs/index.json +1 -0
  58. package/dist/docs/pages/actions/call.md +300 -0
  59. package/dist/docs/pages/actions/catalog/airtable.md +737 -0
  60. package/dist/docs/pages/actions/catalog/arxiv.md +166 -0
  61. package/dist/docs/pages/actions/catalog/chainalysis-sanctions.md +125 -0
  62. package/dist/docs/pages/actions/catalog/coingecko.md +1558 -0
  63. package/dist/docs/pages/actions/catalog/deps-dev.md +465 -0
  64. package/dist/docs/pages/actions/catalog/dexscreener.md +568 -0
  65. package/dist/docs/pages/actions/catalog/discord.md +784 -0
  66. package/dist/docs/pages/actions/catalog/finnhub.md +776 -0
  67. package/dist/docs/pages/actions/catalog/frankfurter.md +438 -0
  68. package/dist/docs/pages/actions/catalog/github.md +1853 -0
  69. package/dist/docs/pages/actions/catalog/gmail.md +575 -0
  70. package/dist/docs/pages/actions/catalog/google-calendar.md +654 -0
  71. package/dist/docs/pages/actions/catalog/google-drive.md +502 -0
  72. package/dist/docs/pages/actions/catalog/google-sheets.md +700 -0
  73. package/dist/docs/pages/actions/catalog/hacker-news.md +542 -0
  74. package/dist/docs/pages/actions/catalog/http.md +824 -0
  75. package/dist/docs/pages/actions/catalog/hyperliquid.md +942 -0
  76. package/dist/docs/pages/actions/catalog/jira.md +920 -0
  77. package/dist/docs/pages/actions/catalog/kalshi.md +917 -0
  78. package/dist/docs/pages/actions/catalog/linear.md +1030 -0
  79. package/dist/docs/pages/actions/catalog/markets.md +21 -0
  80. package/dist/docs/pages/actions/catalog/morpho.md +247 -0
  81. package/dist/docs/pages/actions/catalog/notion.md +1077 -0
  82. package/dist/docs/pages/actions/catalog/nws.md +485 -0
  83. package/dist/docs/pages/actions/catalog/open-meteo.md +559 -0
  84. package/dist/docs/pages/actions/catalog/polymarket.md +1523 -0
  85. package/dist/docs/pages/actions/catalog/pushbullet.md +220 -0
  86. package/dist/docs/pages/actions/catalog/resend.md +307 -0
  87. package/dist/docs/pages/actions/catalog/s3.md +513 -0
  88. package/dist/docs/pages/actions/catalog/sec-edgar.md +487 -0
  89. package/dist/docs/pages/actions/catalog/slack.md +2629 -0
  90. package/dist/docs/pages/actions/catalog/stripe.md +1405 -0
  91. package/dist/docs/pages/actions/catalog/wikipedia.md +379 -0
  92. package/dist/docs/pages/actions/catalog.md +46 -0
  93. package/dist/docs/pages/actions/limits.md +50 -0
  94. package/dist/docs/pages/actions/model-tools.md +225 -0
  95. package/dist/docs/pages/actions/packs.md +148 -0
  96. package/dist/docs/pages/actions/settings.md +69 -0
  97. package/dist/docs/pages/actions/tools.md +244 -0
  98. package/dist/docs/pages/actions/triggers.md +149 -0
  99. package/dist/docs/pages/actions.md +88 -0
  100. package/dist/docs/pages/compat/anthropic.md +168 -0
  101. package/dist/docs/pages/compat/e2b.md +194 -0
  102. package/dist/docs/pages/compat/firecrawl.md +138 -0
  103. package/dist/docs/pages/compat/openai.md +168 -0
  104. package/dist/docs/pages/concepts/auth.md +151 -0
  105. package/dist/docs/pages/concepts/beta.md +55 -0
  106. package/dist/docs/pages/concepts/glossary.md +71 -0
  107. package/dist/docs/pages/concepts/ids.md +98 -0
  108. package/dist/docs/pages/concepts/jobs.md +229 -0
  109. package/dist/docs/pages/concepts/latency.md +138 -0
  110. package/dist/docs/pages/concepts/limits.md +191 -0
  111. package/dist/docs/pages/concepts/stack.md +59 -0
  112. package/dist/docs/pages/concepts/timing.md +86 -0
  113. package/dist/docs/pages/concepts/usage.md +110 -0
  114. package/dist/docs/pages/design/b3os-yaml.md +370 -0
  115. package/dist/docs/pages/design/deploy-from-github.md +122 -0
  116. package/dist/docs/pages/design/observability.md +134 -0
  117. package/dist/docs/pages/errors.md +1824 -0
  118. package/dist/docs/pages/infer/chat.md +570 -0
  119. package/dist/docs/pages/infer/limits.md +55 -0
  120. package/dist/docs/pages/infer/messages.md +185 -0
  121. package/dist/docs/pages/infer/responses.md +173 -0
  122. package/dist/docs/pages/infer/settings.md +154 -0
  123. package/dist/docs/pages/infer/speech.md +323 -0
  124. package/dist/docs/pages/infer.md +154 -0
  125. package/dist/docs/pages/introduction.md +162 -0
  126. package/dist/docs/pages/platform/addresses.md +174 -0
  127. package/dist/docs/pages/platform/call-log.md +99 -0
  128. package/dist/docs/pages/platform/custom-domains.md +104 -0
  129. package/dist/docs/pages/platform/keys.md +79 -0
  130. package/dist/docs/pages/platform/limits.md +57 -0
  131. package/dist/docs/pages/platform/members.md +101 -0
  132. package/dist/docs/pages/platform/requests.md +116 -0
  133. package/dist/docs/pages/platform/settings.md +129 -0
  134. package/dist/docs/pages/platform/webhooks.md +68 -0
  135. package/dist/docs/pages/platform.md +67 -0
  136. package/dist/docs/pages/quickstart/mcp.md +94 -0
  137. package/dist/docs/pages/quickstart/sandbox-agent.md +205 -0
  138. package/dist/docs/pages/quickstart/scrape.md +134 -0
  139. package/dist/docs/pages/quickstart.md +45 -0
  140. package/dist/docs/pages/render/inspections.md +162 -0
  141. package/dist/docs/pages/render/limits.md +72 -0
  142. package/dist/docs/pages/render/screenshots.md +179 -0
  143. package/dist/docs/pages/render/settings.md +431 -0
  144. package/dist/docs/pages/render/styles.md +342 -0
  145. package/dist/docs/pages/render/videos.md +272 -0
  146. package/dist/docs/pages/render.md +118 -0
  147. package/dist/docs/pages/routines/callables.md +174 -0
  148. package/dist/docs/pages/routines/definitions.md +361 -0
  149. package/dist/docs/pages/routines/limits.md +117 -0
  150. package/dist/docs/pages/routines/runs.md +328 -0
  151. package/dist/docs/pages/routines/settings.md +104 -0
  152. package/dist/docs/pages/routines/triggers.md +339 -0
  153. package/dist/docs/pages/routines.md +216 -0
  154. package/dist/docs/pages/sandboxes/agents.md +217 -0
  155. package/dist/docs/pages/sandboxes/commands.md +272 -0
  156. package/dist/docs/pages/sandboxes/images.md +166 -0
  157. package/dist/docs/pages/sandboxes/limits.md +143 -0
  158. package/dist/docs/pages/sandboxes/ports.md +260 -0
  159. package/dist/docs/pages/sandboxes/settings.md +358 -0
  160. package/dist/docs/pages/sandboxes/snapshots.md +423 -0
  161. package/dist/docs/pages/sandboxes/swarms.md +146 -0
  162. package/dist/docs/pages/sandboxes/volumes.md +131 -0
  163. package/dist/docs/pages/sandboxes.md +231 -0
  164. package/dist/docs/pages/sdks/cli.md +121 -0
  165. package/dist/docs/pages/sdks/mcp.md +169 -0
  166. package/dist/docs/pages/sdks/python.md +146 -0
  167. package/dist/docs/pages/sdks/typescript.md +202 -0
  168. package/dist/docs/pages/sdks.md +282 -0
  169. package/dist/docs/pages/settings.md +33 -0
  170. package/dist/docs/pages/vault/limits.md +46 -0
  171. package/dist/docs/pages/vault.md +133 -0
  172. package/dist/docs/pages/vision/agent-browser.md +115 -0
  173. package/dist/docs/pages/vision/crawl.md +333 -0
  174. package/dist/docs/pages/vision/extract.md +152 -0
  175. package/dist/docs/pages/vision/fetcher.md +15 -0
  176. package/dist/docs/pages/vision/limits.md +79 -0
  177. package/dist/docs/pages/vision/profiles.md +111 -0
  178. package/dist/docs/pages/vision/proxy.md +131 -0
  179. package/dist/docs/pages/vision/scrape.md +356 -0
  180. package/dist/docs/pages/vision/sessions.md +311 -0
  181. package/dist/docs/pages/vision/settings.md +656 -0
  182. package/dist/docs/pages/vision.md +175 -0
  183. package/dist/errors.d.ts +129 -0
  184. package/dist/errors.js +326 -0
  185. package/dist/errors.js.map +1 -0
  186. package/dist/main.d.ts +1 -1
  187. package/dist/main.js +26 -13
  188. package/dist/main.js.map +1 -1
  189. package/dist/manifest/apply.d.ts +4 -0
  190. package/dist/manifest/apply.js +2 -0
  191. package/dist/manifest/apply.js.map +1 -1
  192. package/dist/manifest/domains.d.ts +50 -0
  193. package/dist/manifest/domains.js +159 -0
  194. package/dist/manifest/domains.js.map +1 -0
  195. package/dist/manifest/link.d.ts +20 -0
  196. package/dist/manifest/link.js +24 -0
  197. package/dist/manifest/link.js.map +1 -0
  198. package/dist/manifest/record.d.ts +1 -1
  199. package/dist/tool/archive.d.ts +33 -0
  200. package/dist/tool/archive.js +174 -0
  201. package/dist/tool/archive.js.map +1 -0
  202. package/dist/tool/calls.d.ts +46 -0
  203. package/dist/tool/calls.js +274 -0
  204. package/dist/tool/calls.js.map +1 -0
  205. package/dist/tool/checks.d.ts +21 -0
  206. package/dist/tool/checks.js +145 -0
  207. package/dist/tool/checks.js.map +1 -0
  208. package/dist/tool/elf.d.ts +19 -0
  209. package/dist/tool/elf.js +107 -0
  210. package/dist/tool/elf.js.map +1 -0
  211. package/dist/tool/predict.d.ts +8 -0
  212. package/dist/tool/predict.js +38 -0
  213. package/dist/tool/predict.js.map +1 -0
  214. package/dist/tool/ustar.d.ts +5 -0
  215. package/dist/tool/ustar.js +220 -0
  216. package/dist/tool/ustar.js.map +1 -0
  217. package/package.json +6 -5
@@ -0,0 +1,502 @@
1
+ # Google Drive
2
+
3
+ > The io.b3os/google-drive pack: 5 actions with call snippets, fixture outputs, connection setup and error codes, generated from version 1.0.0.
4
+
5
+ Source: https://docs.beta.b3os.org/actions/catalog/google-drive.md
6
+
7
+ <a id="google-drive"></a>
8
+
9
+ `io.b3os/google-drive` 1.0.0 · `files`, `documents`, `productivity` · MIT
10
+
11
+ Find and read files in Google Drive with your own Google OAuth token: search with Drive's query language, get file metadata, export Google Docs, Sheets and Slides as plain text, Markdown or CSV, download text files, and create folders. Includes shared drives. Needs drive.readonly (or drive.file for files the app created, drive for create-folder).
12
+
13
+ Every call's result carries `upstream_status` and `timing`: `validate_ms`, `inject_ms`, `render_ms`, `upstream_ms`, `map_ms` and `total_ms`. `upstream` is the service's time; the others are B3OS's own ([call actions](https://docs.beta.b3os.org/actions/call)). The snippets below show no timing values, because a fixture records none.
14
+
15
+ ## Connection
16
+
17
+ `google`, type `oauth2`: Google account (Drive).
18
+
19
+ An OAuth access token for your Google account from your own Google Cloud OAuth client, with the scopes listed here. Store the refresh_token, client_id and client_secret with it so the vault can refresh the token (access tokens last an hour); B3OS never uses a Google client of its own.
20
+
21
+ How to get one: [developers.google.com](https://developers.google.com/identity/protocols/oauth2/web-server).
22
+
23
+ Scopes the pack's actions use: `https://www.googleapis.com/auth/drive.readonly`, `https://www.googleapis.com/auth/drive.file`. The manifest names them per connection, not per action.
24
+
25
+ The credential is sent only to `www.googleapis.com`.
26
+
27
+ Store the credential once as a [vault connection](https://docs.beta.b3os.org/vault) for this pack and key, then name its id in a call's `connections`. Leave the key out and B3OS uses the project's newest connection for the pack and key without a `subject` ([connections](https://docs.beta.b3os.org/actions/call#connections)).
28
+
29
+ Hosts it reaches: `www.googleapis.com`.
30
+
31
+ ## Actions
32
+
33
+ | Action | Effect | MCP tool | Title |
34
+ |---|---|---|---|
35
+ | [`search-files`](https://docs.beta.b3os.org/actions/catalog/google-drive#google-drive-search-files) | read | `google-drive__search-files` | Search files |
36
+ | [`get-file`](https://docs.beta.b3os.org/actions/catalog/google-drive#google-drive-get-file) | read | `google-drive__get-file` | Get file metadata |
37
+ | [`export-document`](https://docs.beta.b3os.org/actions/catalog/google-drive#google-drive-export-document) | read | `google-drive__export-document` | Export Google Doc, Sheet or Slides |
38
+ | [`download-text`](https://docs.beta.b3os.org/actions/catalog/google-drive#google-drive-download-text) | read | `google-drive__download-text` | Download text file |
39
+ | [`create-folder`](https://docs.beta.b3os.org/actions/catalog/google-drive#google-drive-create-folder) | write | `google-drive__create-folder` | Create folder |
40
+
41
+ <h3 id="google-drive-search-files"><code>search-files</code></h3>
42
+
43
+ **Search files.** Files and folders matching a Drive query, for example name contains 'roadmap' and mimeType = 'application/vnd.google-apps.document' and trashed = false, or 'FOLDER_ID' in parents. Sorted by last modified by default. Page with page_token.
44
+
45
+ Ref `io.b3os/google-drive/search-files@1.0.0` · effect `read` · connection `google` · MCP tool `google-drive__search-files`
46
+
47
+ **curl**
48
+
49
+ ```bash
50
+ curl -s https://beta-api.b3os.org/v1/actions/call \
51
+ -H "Authorization: Bearer $B3OS_API_KEY" \
52
+ -H "Content-Type: application/json" \
53
+ -d '{
54
+ "ref": "io.b3os/google-drive/search-files@1",
55
+ "input": {
56
+ "query": "name contains '\''roadmap'\'' and trashed = false",
57
+ "page_size": 2
58
+ },
59
+ "connections": {"google": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
60
+ }'
61
+ ```
62
+ **TypeScript**
63
+
64
+ ```ts
65
+ import { B3OS } from "@b3os/sdk";
66
+
67
+ const b3os = new B3OS();
68
+ const result = await b3os.actions.call({
69
+ ref: "io.b3os/google-drive/search-files@1",
70
+ input: {
71
+ query: "name contains 'roadmap' and trashed = false",
72
+ page_size: 2,
73
+ },
74
+ connections: { google: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
75
+ });
76
+ console.log(result.output);
77
+ ```
78
+ **Python**
79
+
80
+ ```python
81
+ from b3os import B3OS
82
+
83
+ b3os = B3OS()
84
+ result = b3os.actions.call({
85
+ "ref": "io.b3os/google-drive/search-files@1",
86
+ "input": {
87
+ "query": "name contains 'roadmap' and trashed = false",
88
+ "page_size": 2,
89
+ },
90
+ "connections": {"google": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
91
+ })
92
+ print(result["output"])
93
+ ```
94
+ **MCP**
95
+
96
+ ```json
97
+ {
98
+ "method": "tools/call",
99
+ "params": {
100
+ "name": "google-drive__search-files",
101
+ "arguments": {
102
+ "query": "name contains 'roadmap' and trashed = false",
103
+ "page_size": 2
104
+ }
105
+ }
106
+ }
107
+ ```
108
+
109
+ Expose the pack as tools with `--packs google-drive` on the local server or `?packs=google-drive` on the remote URL, and the agent calls `google-drive__search-files` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
110
+
111
+ Output, labeled `fixture`: Search files (documented response shape, example values). From the bundle's `fixtures/search-files.json`, not a live call.
112
+
113
+ ```json
114
+ {
115
+ "files": [
116
+ {
117
+ "id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
118
+ "name": "Q4 roadmap",
119
+ "mime_type": "application/vnd.google-apps.document",
120
+ "modified_time": "2026-10-25T21:30:00.000Z",
121
+ "created_time": "2026-09-02T16:00:00.000Z",
122
+ "size": null,
123
+ "web_view_link": "https://docs.google.com/document/d/1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345/edit",
124
+ "parents": ["0AFolderRootExample"],
125
+ "owner": "Mona Example",
126
+ "owner_email": "mona@acme.example",
127
+ "trashed": false,
128
+ "starred": false
129
+ },
130
+ {
131
+ "id": "1zYxWvUtSrQpOnMlKjIhGfEdCbA987654",
132
+ "name": "roadmap-2025.pdf",
133
+ "mime_type": "application/pdf",
134
+ "modified_time": "2026-10-25T21:30:00.000Z",
135
+ "created_time": "2026-09-02T16:00:00.000Z",
136
+ "size": "482113",
137
+ "web_view_link": "https://drive.google.com/file/d/1zYxWvUtSrQpOnMlKjIhGfEdCbA987654/view",
138
+ "parents": ["0AFolderRootExample"],
139
+ "owner": "Mona Example",
140
+ "owner_email": "mona@acme.example",
141
+ "trashed": false,
142
+ "starred": false
143
+ }
144
+ ],
145
+ "next_page_token": "~!!~AI9FV7Q-example"
146
+ }
147
+ ```
148
+
149
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
150
+
151
+ | `pack_error.code` | Service status | Retryable | Message |
152
+ |---|---|---|---|
153
+ | `not_found` | 404 | no | built from the service's response |
154
+ | `connection_unauthorized` | 401 | no | Google rejected the access token (expired or revoked); refresh or reconnect it. |
155
+ | `rate_limited` | 429, 403 | yes | built from the service's response |
156
+ | `forbidden` | 403 | no | built from the service's response |
157
+ | `invalid_request` | 400 | no | built from the service's response |
158
+ | `conflict` | 409 | no | built from the service's response |
159
+
160
+ <h3 id="google-drive-get-file"><code>get-file</code></h3>
161
+
162
+ **Get file metadata.** One file's name, type, size, owner, parents, timestamps and web link.
163
+
164
+ Ref `io.b3os/google-drive/get-file@1.0.0` · effect `read` · connection `google` · MCP tool `google-drive__get-file`
165
+
166
+ **curl**
167
+
168
+ ```bash
169
+ curl -s https://beta-api.b3os.org/v1/actions/call \
170
+ -H "Authorization: Bearer $B3OS_API_KEY" \
171
+ -H "Content-Type: application/json" \
172
+ -d '{
173
+ "ref": "io.b3os/google-drive/get-file@1",
174
+ "input": {"id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345"},
175
+ "connections": {"google": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
176
+ }'
177
+ ```
178
+ **TypeScript**
179
+
180
+ ```ts
181
+ import { B3OS } from "@b3os/sdk";
182
+
183
+ const b3os = new B3OS();
184
+ const result = await b3os.actions.call({
185
+ ref: "io.b3os/google-drive/get-file@1",
186
+ input: { id: "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345" },
187
+ connections: { google: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
188
+ });
189
+ console.log(result.output);
190
+ ```
191
+ **Python**
192
+
193
+ ```python
194
+ from b3os import B3OS
195
+
196
+ b3os = B3OS()
197
+ result = b3os.actions.call({
198
+ "ref": "io.b3os/google-drive/get-file@1",
199
+ "input": {"id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345"},
200
+ "connections": {"google": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
201
+ })
202
+ print(result["output"])
203
+ ```
204
+ **MCP**
205
+
206
+ ```json
207
+ {
208
+ "method": "tools/call",
209
+ "params": {
210
+ "name": "google-drive__get-file",
211
+ "arguments": {"id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345"}
212
+ }
213
+ }
214
+ ```
215
+
216
+ Expose the pack as tools with `--packs google-drive` on the local server or `?packs=google-drive` on the remote URL, and the agent calls `google-drive__get-file` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
217
+
218
+ Output, labeled `fixture`: Get file metadata (documented response shape, example values). From the bundle's `fixtures/get-file.json`, not a live call.
219
+
220
+ ```json
221
+ {
222
+ "id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
223
+ "name": "Q4 roadmap",
224
+ "mime_type": "application/vnd.google-apps.document",
225
+ "modified_time": "2026-10-25T21:30:00.000Z",
226
+ "created_time": "2026-09-02T16:00:00.000Z",
227
+ "size": null,
228
+ "web_view_link": "https://docs.google.com/document/d/1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345/edit",
229
+ "parents": ["0AFolderRootExample"],
230
+ "owner": "Mona Example",
231
+ "owner_email": "mona@acme.example",
232
+ "trashed": false,
233
+ "starred": false
234
+ }
235
+ ```
236
+
237
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
238
+
239
+ | `pack_error.code` | Service status | Retryable | Message |
240
+ |---|---|---|---|
241
+ | `not_found` | 404 | no | built from the service's response |
242
+ | `connection_unauthorized` | 401 | no | Google rejected the access token (expired or revoked); refresh or reconnect it. |
243
+ | `rate_limited` | 429, 403 | yes | built from the service's response |
244
+ | `forbidden` | 403 | no | built from the service's response |
245
+ | `invalid_request` | 400 | no | built from the service's response |
246
+ | `conflict` | 409 | no | built from the service's response |
247
+
248
+ <h3 id="google-drive-export-document"><code>export-document</code></h3>
249
+
250
+ **Export Google Doc, Sheet or Slides.** The contents of a Google Doc as plain text or Markdown, of a Sheet's first tab as CSV, or of Slides as plain text. Exports are limited to 10 MB by Google. For other text files use download-text.
251
+
252
+ Ref `io.b3os/google-drive/export-document@1.0.0` · effect `read` · connection `google` · MCP tool `google-drive__export-document`
253
+
254
+ **curl**
255
+
256
+ ```bash
257
+ curl -s https://beta-api.b3os.org/v1/actions/call \
258
+ -H "Authorization: Bearer $B3OS_API_KEY" \
259
+ -H "Content-Type: application/json" \
260
+ -d '{
261
+ "ref": "io.b3os/google-drive/export-document@1",
262
+ "input": {
263
+ "id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
264
+ "format": "text/markdown"
265
+ },
266
+ "connections": {"google": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
267
+ }'
268
+ ```
269
+ **TypeScript**
270
+
271
+ ```ts
272
+ import { B3OS } from "@b3os/sdk";
273
+
274
+ const b3os = new B3OS();
275
+ const result = await b3os.actions.call({
276
+ ref: "io.b3os/google-drive/export-document@1",
277
+ input: { id: "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345", format: "text/markdown" },
278
+ connections: { google: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
279
+ });
280
+ console.log(result.output);
281
+ ```
282
+ **Python**
283
+
284
+ ```python
285
+ from b3os import B3OS
286
+
287
+ b3os = B3OS()
288
+ result = b3os.actions.call({
289
+ "ref": "io.b3os/google-drive/export-document@1",
290
+ "input": {
291
+ "id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
292
+ "format": "text/markdown",
293
+ },
294
+ "connections": {"google": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
295
+ })
296
+ print(result["output"])
297
+ ```
298
+ **MCP**
299
+
300
+ ```json
301
+ {
302
+ "method": "tools/call",
303
+ "params": {
304
+ "name": "google-drive__export-document",
305
+ "arguments": {
306
+ "id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
307
+ "format": "text/markdown"
308
+ }
309
+ }
310
+ }
311
+ ```
312
+
313
+ Expose the pack as tools with `--packs google-drive` on the local server or `?packs=google-drive` on the remote URL, and the agent calls `google-drive__export-document` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
314
+
315
+ Output, labeled `fixture`: Export Google Doc, Sheet or Slides (documented response shape, example values). From the bundle's `fixtures/export-document.json`, not a live call.
316
+
317
+ ```json
318
+ {
319
+ "id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
320
+ "format": "text/markdown",
321
+ "content": "# Q4 roadmap\n\n## Goals\n\n- Ship checkout v2\n- Cut p50 checkout latency in half\n"
322
+ }
323
+ ```
324
+
325
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
326
+
327
+ | `pack_error.code` | Service status | Retryable | Message |
328
+ |---|---|---|---|
329
+ | `not_found` | 404 | no | built from the service's response |
330
+ | `connection_unauthorized` | 401 | no | Google rejected the access token (expired or revoked); refresh or reconnect it. |
331
+ | `rate_limited` | 429, 403 | yes | built from the service's response |
332
+ | `forbidden` | 403 | no | built from the service's response |
333
+ | `invalid_request` | 400 | no | built from the service's response |
334
+ | `conflict` | 409 | no | built from the service's response |
335
+
336
+ <h3 id="google-drive-download-text"><code>download-text</code></h3>
337
+
338
+ **Download text file.** The contents of a regular file stored in Drive (txt, csv, md, json, ...) as text. Binary files come back garbled; Google Docs need export-document. Very large files can exceed the runtime's response size limit.
339
+
340
+ Ref `io.b3os/google-drive/download-text@1.0.0` · effect `read` · connection `google` · MCP tool `google-drive__download-text`
341
+
342
+ **curl**
343
+
344
+ ```bash
345
+ curl -s https://beta-api.b3os.org/v1/actions/call \
346
+ -H "Authorization: Bearer $B3OS_API_KEY" \
347
+ -H "Content-Type: application/json" \
348
+ -d '{
349
+ "ref": "io.b3os/google-drive/download-text@1",
350
+ "input": {"id": "1zYxWvUtSrQpOnMlKjIhGfEdCbA987655"},
351
+ "connections": {"google": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
352
+ }'
353
+ ```
354
+ **TypeScript**
355
+
356
+ ```ts
357
+ import { B3OS } from "@b3os/sdk";
358
+
359
+ const b3os = new B3OS();
360
+ const result = await b3os.actions.call({
361
+ ref: "io.b3os/google-drive/download-text@1",
362
+ input: { id: "1zYxWvUtSrQpOnMlKjIhGfEdCbA987655" },
363
+ connections: { google: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
364
+ });
365
+ console.log(result.output);
366
+ ```
367
+ **Python**
368
+
369
+ ```python
370
+ from b3os import B3OS
371
+
372
+ b3os = B3OS()
373
+ result = b3os.actions.call({
374
+ "ref": "io.b3os/google-drive/download-text@1",
375
+ "input": {"id": "1zYxWvUtSrQpOnMlKjIhGfEdCbA987655"},
376
+ "connections": {"google": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
377
+ })
378
+ print(result["output"])
379
+ ```
380
+ **MCP**
381
+
382
+ ```json
383
+ {
384
+ "method": "tools/call",
385
+ "params": {
386
+ "name": "google-drive__download-text",
387
+ "arguments": {"id": "1zYxWvUtSrQpOnMlKjIhGfEdCbA987655"}
388
+ }
389
+ }
390
+ ```
391
+
392
+ Expose the pack as tools with `--packs google-drive` on the local server or `?packs=google-drive` on the remote URL, and the agent calls `google-drive__download-text` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
393
+
394
+ Output, labeled `fixture`: Download text file (documented response shape, example values). From the bundle's `fixtures/download-text.json`, not a live call.
395
+
396
+ ```json
397
+ {
398
+ "id": "1zYxWvUtSrQpOnMlKjIhGfEdCbA987655",
399
+ "content": "company,stage,amount\nAcme,Proposal,12000\n"
400
+ }
401
+ ```
402
+
403
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
404
+
405
+ | `pack_error.code` | Service status | Retryable | Message |
406
+ |---|---|---|---|
407
+ | `not_found` | 404 | no | built from the service's response |
408
+ | `connection_unauthorized` | 401 | no | Google rejected the access token (expired or revoked); refresh or reconnect it. |
409
+ | `rate_limited` | 429, 403 | yes | built from the service's response |
410
+ | `forbidden` | 403 | no | built from the service's response |
411
+ | `invalid_request` | 400 | no | built from the service's response |
412
+ | `conflict` | 409 | no | built from the service's response |
413
+
414
+ <h3 id="google-drive-create-folder"><code>create-folder</code></h3>
415
+
416
+ **Create folder.** Create a folder, optionally inside another folder (parent_id). Returns its id and link. Not idempotent: Drive allows several folders with the same name.
417
+
418
+ Ref `io.b3os/google-drive/create-folder@1.0.0` · effect `write` · connection `google` · MCP tool `google-drive__create-folder`
419
+
420
+ **curl**
421
+
422
+ ```bash
423
+ curl -s https://beta-api.b3os.org/v1/actions/call \
424
+ -H "Authorization: Bearer $B3OS_API_KEY" \
425
+ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \
426
+ -H "Content-Type: application/json" \
427
+ -d '{
428
+ "ref": "io.b3os/google-drive/create-folder@1",
429
+ "input": {"name": "Launch assets", "parent_id": "0AFolderRootExample"},
430
+ "connections": {"google": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
431
+ }'
432
+ ```
433
+ **TypeScript**
434
+
435
+ ```ts
436
+ import { B3OS } from "@b3os/sdk";
437
+
438
+ const b3os = new B3OS();
439
+ const result = await b3os.actions.call({
440
+ ref: "io.b3os/google-drive/create-folder@1",
441
+ input: { name: "Launch assets", parent_id: "0AFolderRootExample" },
442
+ connections: { google: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
443
+ }, { idempotencyKey: crypto.randomUUID() });
444
+ console.log(result.output);
445
+ ```
446
+ **Python**
447
+
448
+ ```python
449
+ import uuid
450
+ from b3os import B3OS
451
+
452
+ b3os = B3OS()
453
+ result = b3os.actions.call({
454
+ "ref": "io.b3os/google-drive/create-folder@1",
455
+ "input": {"name": "Launch assets", "parent_id": "0AFolderRootExample"},
456
+ "connections": {"google": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
457
+ }, idempotency_key=str(uuid.uuid4()))
458
+ print(result["output"])
459
+ ```
460
+ **MCP**
461
+
462
+ ```json
463
+ {
464
+ "method": "tools/call",
465
+ "params": {
466
+ "name": "google-drive__create-folder",
467
+ "arguments": {"name": "Launch assets", "parent_id": "0AFolderRootExample"}
468
+ }
469
+ }
470
+ ```
471
+
472
+ Expose the pack as tools with `--packs google-drive` on the local server or `?packs=google-drive` on the remote URL, and the agent calls `google-drive__create-folder` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
473
+
474
+ Output, labeled `fixture`: Create folder (documented response shape, example values). From the bundle's `fixtures/create-folder.json`, not a live call.
475
+
476
+ ```json
477
+ {
478
+ "id": "1FoLdErIdExample0123456789",
479
+ "name": "Launch assets",
480
+ "mime_type": "application/vnd.google-apps.folder",
481
+ "modified_time": "2026-10-25T21:30:00.000Z",
482
+ "created_time": "2026-09-02T16:00:00.000Z",
483
+ "size": null,
484
+ "web_view_link": "https://drive.google.com/drive/folders/1FoLdErIdExample0123456789",
485
+ "parents": ["0AFolderRootExample"],
486
+ "owner": "Mona Example",
487
+ "owner_email": "mona@acme.example",
488
+ "trashed": false,
489
+ "starred": false
490
+ }
491
+ ```
492
+
493
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
494
+
495
+ | `pack_error.code` | Service status | Retryable | Message |
496
+ |---|---|---|---|
497
+ | `not_found` | 404 | no | built from the service's response |
498
+ | `connection_unauthorized` | 401 | no | Google rejected the access token (expired or revoked); refresh or reconnect it. |
499
+ | `rate_limited` | 429, 403 | yes | built from the service's response |
500
+ | `forbidden` | 403 | no | built from the service's response |
501
+ | `invalid_request` | 400 | no | built from the service's response |
502
+ | `conflict` | 409 | no | built from the service's response |