You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(source/cloud-storage): add Cloud Storage source with list_objects and read_object tools
Adds a new project-scoped `cloud-storage` source using ADC, plus two read-only
tools: `cloud-storage-list-objects` (with prefix/delimiter/pagination) and
`cloud-storage-read-object` (with HTTP-style byte range and base64 payload).
Introduces a GCS-aware error classifier in `cloudstoragecommon` that splits
failures into Agent errors (missing bucket/object, bad request, unsatisfiable
range) and Server errors (auth, IAM denial, quota, 5xx, cancellation) per
DEVELOPER.md, replacing the coarse-grained `util.ProcessGcpError`.
Ships YAML-parse unit tests, an error-classifier unit test, a range-parser unit
test, a live-GCS integration test (12 sub-tests, UUID-suffixed bucket with
self-cleanup), docs under `docs/en/integrations/cloud-storage/`, and a
`cloud-storage` CI shard.
The remaining 12 tools from the approved design doc land in follow-up PRs.
Cloud Storage is Google Cloud's managed service for storing unstructured objects (files) in buckets. Toolbox connects at the project level, allowing tools to list, read, and manage objects across any bucket the credentials can access.
8
+
no_list: true
9
+
---
10
+
11
+
## About
12
+
13
+
[Cloud Storage][gcs-docs] is Google Cloud's managed service for storing
14
+
unstructured data (blobs) in containers called *buckets*. Buckets live in a GCP
15
+
project; objects are addressed by `gs://<bucket>/<object>`.
16
+
17
+
If you are new to Cloud Storage, you can try the
18
+
[quickstart][gcs-quickstart] to create a bucket and upload your first objects.
19
+
20
+
The Cloud Storage source is configured at the **project** level. Individual
21
+
tools take a `bucket` parameter, so a single configured source can operate
22
+
against any bucket the underlying credentials are authorized for.
| bucket | string | true | Name of the Cloud Storage bucket to list objects from. |
35
+
| prefix | string | false | Filter results to objects whose names begin with this prefix. |
36
+
| delimiter | string | false | Delimiter used to group object names (typically '/'). When set, common prefixes are returned as `prefixes`. |
37
+
| max_results | integer | false | Maximum number of objects to return per page. A value of 0 uses the API default (1000); the maximum allowed is 1000. |
38
+
| page_token | string | false | A previously-returned page token for retrieving the next page of results. |
39
+
40
+
## Example
41
+
42
+
```yaml
43
+
kind: tool
44
+
name: list_objects
45
+
type: cloud-storage-list-objects
46
+
source: my-gcs-source
47
+
description: Use this tool to list objects in a Cloud Storage bucket.
A "cloud-storage-read-object" tool reads the content of a Cloud Storage object and returns it as a base64-encoded string, optionally constrained to a byte range.
7
+
---
8
+
9
+
## About
10
+
11
+
A `cloud-storage-read-object` tool fetches the bytes of a single
12
+
[Cloud Storage object][gcs-objects] and returns them base64-encoded so that
13
+
arbitrary binary content can be round-tripped through JSON safely. For large
14
+
objects, prefer the optional `range` parameter to read only the bytes you need.
15
+
16
+
This tool is intended for small-to-medium textual or binary content an LLM can
17
+
process directly. For bulk downloads of large files to the local filesystem,
18
+
use `cloud-storage-download-object` (coming in a follow-up release).
0 commit comments