@mastra/gcs 0.0.0-agent-chat-ui-20260305212602

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,340 @@
1
+ # @mastra/gcs
2
+
3
+ ## 0.0.0-agent-chat-ui-20260305212602
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`41e48c1`](https://github.com/mastra-ai/mastra/commit/41e48c198eee846478e60c02ec432c19d322a517), [`82469d3`](https://github.com/mastra-ai/mastra/commit/82469d3135d5a49dd8dc8feec0ff398b4e0225a0), [`33e2fd5`](https://github.com/mastra-ai/mastra/commit/33e2fd5088f83666df17401e2da68c943dbc0448), [`7ef6e2c`](https://github.com/mastra-ai/mastra/commit/7ef6e2c61be5a42e26f55d15b5902866fc76634f), [`b12d2a5`](https://github.com/mastra-ai/mastra/commit/b12d2a59a48be0477cabae66eb6cf0fc94a7d40d), [`fa37d39`](https://github.com/mastra-ai/mastra/commit/fa37d39910421feaf8847716292e3d65dd4f30c2), [`b12d2a5`](https://github.com/mastra-ai/mastra/commit/b12d2a59a48be0477cabae66eb6cf0fc94a7d40d), [`71c38bf`](https://github.com/mastra-ai/mastra/commit/71c38bf905905148ecd0e75c07c1f9825d299b76), [`f993c38`](https://github.com/mastra-ai/mastra/commit/f993c3848c97479b813231be872443bedeced6ab), [`f51849a`](https://github.com/mastra-ai/mastra/commit/f51849a568935122b5100b7ee69704e6d680cf7b), [`9bf3a0d`](https://github.com/mastra-ai/mastra/commit/9bf3a0dac602787925f1762f1f0387d7b4a59620), [`cafa045`](https://github.com/mastra-ai/mastra/commit/cafa0453c9de141ad50c09a13894622dffdd9978), [`1fd9ddb`](https://github.com/mastra-ai/mastra/commit/1fd9ddbb3fe83b281b12bd2e27e426ae86288266), [`6135ef4`](https://github.com/mastra-ai/mastra/commit/6135ef4f5288652bf45f616ec590607e4c95f443), [`d9d228c`](https://github.com/mastra-ai/mastra/commit/d9d228c0c6ae82ae6ce3b540a3a56b2b1c2b8d98), [`5576507`](https://github.com/mastra-ai/mastra/commit/55765071e360fb97e443aa0a91ccf7e1cd8d92aa), [`79d69c9`](https://github.com/mastra-ai/mastra/commit/79d69c9d5f842ff1c31352fb6026f04c1f6190f3), [`94f44b8`](https://github.com/mastra-ai/mastra/commit/94f44b827ce57b179e50f4916a84c0fa6e7f3b8c), [`13187db`](https://github.com/mastra-ai/mastra/commit/13187dbac880174232dedc5a501ff6c5d0fe59bc), [`2ae5311`](https://github.com/mastra-ai/mastra/commit/2ae531185fff66a80fa165c0999e3d801900e89d), [`6135ef4`](https://github.com/mastra-ai/mastra/commit/6135ef4f5288652bf45f616ec590607e4c95f443)]:
8
+ - @mastra/core@0.0.0-agent-chat-ui-20260305212602
9
+
10
+ ## 0.1.1
11
+
12
+ ### Patch Changes
13
+
14
+ - Added editor provider descriptors for workspace filesystem, sandbox, and blob store packages. Each provider exports an object with `id`, `name`, `description`, `configSchema` (JSON Schema), and a factory method, enabling the editor UI to auto-discover and render configuration forms for workspace providers. ([#13156](https://github.com/mastra-ai/mastra/pull/13156))
15
+ - `@mastra/gcs`: Added `gcsFilesystemProvider` with config schema for bucket, projectId, credentials, prefix, readOnly, and endpoint
16
+ - `@mastra/e2b`: Added `e2bSandboxProvider` with config schema for template, timeout, env, metadata, runtimes, domain, and API settings
17
+
18
+ ```ts
19
+ import { gcsFilesystemProvider } from '@mastra/gcs';
20
+ import { e2bSandboxProvider } from '@mastra/e2b';
21
+
22
+ const editor = new MastraEditor({
23
+ filesystems: {
24
+ gcs: gcsFilesystemProvider,
25
+ },
26
+ sandboxes: {
27
+ e2b: e2bSandboxProvider,
28
+ },
29
+ });
30
+
31
+ // Enumerate available providers and their config schemas for UI rendering
32
+ const fsProviders = editor.getFilesystemProviders();
33
+ const sbProviders = editor.getSandboxProviders();
34
+ ```
35
+
36
+ - Added workspace and skill storage domains with full CRUD, versioning, and implementations across LibSQL, Postgres, and MongoDB. Added `editor.workspace` and `editor.skill` namespaces for managing workspace configurations and skill definitions through the editor. Agents stored in the editor can now reference workspaces (by ID or inline config) and skills, with full hydration to runtime `Workspace` instances during agent resolution. ([#13156](https://github.com/mastra-ai/mastra/pull/13156))
37
+
38
+ **Filesystem-native skill versioning (draft → publish model):**
39
+
40
+ Skills are versioned as filesystem trees with content-addressable blob storage. The editing surface (live filesystem) is separated from the serving surface (versioned blob store), enabling a `draft → publish` workflow:
41
+ - `editor.skill.publish(skillId, source, skillPath)` — Snapshots a skill directory from the filesystem into blob storage, creates a new version with a tree manifest, and sets `activeVersionId`
42
+ - Version switching via `editor.skill.update({ id, activeVersionId })` — Points the skill to a previous version without re-publishing
43
+ - Publishing a skill automatically invalidates cached agents that reference it, so they re-hydrate with the updated version on next access
44
+
45
+ **Agent skill resolution strategies:**
46
+
47
+ Agents can reference skills with different resolution strategies:
48
+ - `strategy: 'latest'` — Resolves the skill's active version (honors `activeVersionId` for rollback)
49
+ - `pin: '<versionId>'` — Pins to a specific version, immune to publishes
50
+ - `strategy: 'live'` — Reads directly from the live filesystem (no blob store)
51
+
52
+ **Blob storage infrastructure:**
53
+ - `BlobStore` abstract class for content-addressable storage keyed by SHA-256 hash
54
+ - `InMemoryBlobStore` for testing
55
+ - LibSQL, Postgres, and MongoDB implementations
56
+ - `S3BlobStore` for storing blobs in S3 or S3-compatible storage (AWS, R2, MinIO, DO Spaces)
57
+ - `BlobStoreProvider` interface and `MastraEditorConfig.blobStores` registry for pluggable blob storage
58
+ - `VersionedSkillSource` and `CompositeVersionedSkillSource` for reading skill files from the blob store at runtime
59
+
60
+ **New storage types:**
61
+ - `StorageWorkspaceSnapshotType` and `StorageSkillSnapshotType` with corresponding input/output types
62
+ - `StorageWorkspaceRef` for ID-based or inline workspace references on agents
63
+ - `StorageSkillConfig` for per-agent skill overrides (`pin`, `strategy`, description, instructions)
64
+ - `SkillVersionTree` and `SkillVersionTreeEntry` for tree manifests
65
+ - `StorageBlobEntry` for content-addressable blob entries
66
+ - `SKILL_BLOBS_SCHEMA` for the `mastra_skill_blobs` table
67
+
68
+ **New editor namespaces:**
69
+ - `editor.workspace` — CRUD for workspace configs, plus `hydrateSnapshotToWorkspace()` for resolving to runtime `Workspace` instances
70
+ - `editor.skill` — CRUD for skill definitions, plus `publish()` for filesystem-to-blob snapshots
71
+
72
+ **Provider registries:**
73
+ - `MastraEditorConfig` accepts `filesystems`, `sandboxes`, and `blobStores` provider registries (keyed by provider ID)
74
+ - Built-in `local` filesystem and sandbox providers are auto-registered
75
+ - `editor.resolveBlobStore()` resolves from provider registry or falls back to the storage backend's blobs domain
76
+ - Providers expose `id`, `name`, `description`, `configSchema` (JSON Schema for UI form rendering), and a factory method
77
+
78
+ **Storage adapter support:**
79
+ - LibSQL: Full `workspaces`, `skills`, and `blobs` domain implementations
80
+ - Postgres: Full `workspaces`, `skills`, and `blobs` domain implementations
81
+ - MongoDB: Full `workspaces`, `skills`, and `blobs` domain implementations
82
+ - All three include `workspace`, `skills`, and `skillsFormat` fields on agent versions
83
+
84
+ **Server endpoints:**
85
+ - `GET/POST/PATCH/DELETE /stored/workspaces` — CRUD for stored workspaces
86
+ - `GET/POST/PATCH/DELETE /stored/skills` — CRUD for stored skills
87
+ - `POST /stored/skills/:id/publish` — Publish a skill from a filesystem source
88
+
89
+ ```ts
90
+ import { MastraEditor } from '@mastra/editor';
91
+ import { s3FilesystemProvider, s3BlobStoreProvider } from '@mastra/s3';
92
+ import { e2bSandboxProvider } from '@mastra/e2b';
93
+
94
+ const editor = new MastraEditor({
95
+ filesystems: { s3: s3FilesystemProvider },
96
+ sandboxes: { e2b: e2bSandboxProvider },
97
+ blobStores: { s3: s3BlobStoreProvider },
98
+ });
99
+
100
+ // Create a skill and publish it
101
+ const skill = await editor.skill.create({
102
+ name: 'Code Review',
103
+ description: 'Reviews code for best practices',
104
+ instructions: 'Analyze the code and provide feedback...',
105
+ });
106
+ await editor.skill.publish(skill.id, source, 'skills/code-review');
107
+
108
+ // Agents resolve skills by strategy
109
+ await editor.agent.create({
110
+ name: 'Dev Assistant',
111
+ model: { provider: 'openai', name: 'gpt-4' },
112
+ workspace: { type: 'id', workspaceId: workspace.id },
113
+ skills: { [skill.id]: { strategy: 'latest' } },
114
+ skillsFormat: 'xml',
115
+ });
116
+ ```
117
+
118
+ - Updated dependencies [[`252580a`](https://github.com/mastra-ai/mastra/commit/252580a71feb0e46d0ccab04a70a79ff6a2ee0ab), [`f8e819f`](https://github.com/mastra-ai/mastra/commit/f8e819fabdfdc43d2da546a3ad81ba23685f603d), [`5c75261`](https://github.com/mastra-ai/mastra/commit/5c7526120d936757d4ffb7b82232e1641ebd45cb), [`e27d832`](https://github.com/mastra-ai/mastra/commit/e27d83281b5e166fd63a13969689e928d8605944), [`e37ef84`](https://github.com/mastra-ai/mastra/commit/e37ef8404043c94ca0c8e35ecdedb093b8087878), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`10cf521`](https://github.com/mastra-ai/mastra/commit/10cf52183344743a0d7babe24cd24fd78870c354), [`efdb682`](https://github.com/mastra-ai/mastra/commit/efdb682887f6522149769383908f9790c188ab88), [`0dee7a0`](https://github.com/mastra-ai/mastra/commit/0dee7a0ff4c2507e6eb6e6ee5f9738877ebd4ad1), [`04c2c8e`](https://github.com/mastra-ai/mastra/commit/04c2c8e888984364194131aecb490a3d6e920e61), [`02dc07a`](https://github.com/mastra-ai/mastra/commit/02dc07acc4ad42d93335825e3308f5b42266eba2), [`bb7262b`](https://github.com/mastra-ai/mastra/commit/bb7262b7c0ca76320d985b40510b6ffbbb936582), [`cf1c6e7`](https://github.com/mastra-ai/mastra/commit/cf1c6e789b131f55638fed52183a89d5078b4876), [`5ffadfe`](https://github.com/mastra-ai/mastra/commit/5ffadfefb1468ac2612b20bb84d24c39de6961c0), [`1e1339c`](https://github.com/mastra-ai/mastra/commit/1e1339cc276e571a48cfff5014487877086bfe68), [`d03df73`](https://github.com/mastra-ai/mastra/commit/d03df73f8fe9496064a33e1c3b74ba0479bf9ee6), [`79b8f45`](https://github.com/mastra-ai/mastra/commit/79b8f45a6767e1a5c3d56cd3c5b1214326b81661), [`9bbf08e`](https://github.com/mastra-ai/mastra/commit/9bbf08e3c20731c79dea13a765895b9fcf29cbf1), [`0a25952`](https://github.com/mastra-ai/mastra/commit/0a259526b5e1ac11e6efa53db1f140272962af2d), [`ffa5468`](https://github.com/mastra-ai/mastra/commit/ffa546857fc4821753979b3a34e13b4d76fbbcd4), [`3264a04`](https://github.com/mastra-ai/mastra/commit/3264a04e30340c3c5447433300a035ea0878df85), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`088d9ba`](https://github.com/mastra-ai/mastra/commit/088d9ba2577518703c52b0dccd617178d9ee6b0d), [`74fbebd`](https://github.com/mastra-ai/mastra/commit/74fbebd918a03832a2864965a8bea59bf617d3a2), [`aea6217`](https://github.com/mastra-ai/mastra/commit/aea621790bfb2291431b08da0cc5e6e150303ae7), [`b6a855e`](https://github.com/mastra-ai/mastra/commit/b6a855edc056e088279075506442ba1d6fa6def9), [`ae408ea`](https://github.com/mastra-ai/mastra/commit/ae408ea7128f0d2710b78d8623185198e7cb19c1), [`17e942e`](https://github.com/mastra-ai/mastra/commit/17e942eee2ba44985b1f807e6208cdde672f82f9), [`2015cf9`](https://github.com/mastra-ai/mastra/commit/2015cf921649f44c3f5bcd32a2c052335f8e49b4), [`7ef454e`](https://github.com/mastra-ai/mastra/commit/7ef454eaf9dcec6de60021c8f42192052dd490d6), [`2be1d99`](https://github.com/mastra-ai/mastra/commit/2be1d99564ce79acc4846071082bff353035a87a), [`2708fa1`](https://github.com/mastra-ai/mastra/commit/2708fa1055ac91c03e08b598869f6b8fb51fa37f), [`ba74aef`](https://github.com/mastra-ai/mastra/commit/ba74aef5716142dbbe931351f5243c9c6e4128a9), [`ba74aef`](https://github.com/mastra-ai/mastra/commit/ba74aef5716142dbbe931351f5243c9c6e4128a9), [`ec53e89`](https://github.com/mastra-ai/mastra/commit/ec53e8939c76c638991e21af762e51378eff7543), [`9b5a8cb`](https://github.com/mastra-ai/mastra/commit/9b5a8cb13e120811b0bf14140ada314f1c067894), [`607e66b`](https://github.com/mastra-ai/mastra/commit/607e66b02dc7f531ee37799f3456aa2dc0ca7ac5), [`a215d06`](https://github.com/mastra-ai/mastra/commit/a215d06758dcf590eabfe0b7afd4ae39bdbf082c), [`6909c74`](https://github.com/mastra-ai/mastra/commit/6909c74a7781e0447d475e9dbc1dc871b700f426), [`192438f`](https://github.com/mastra-ai/mastra/commit/192438f8a90c4f375e955f8ff179bf8dc6821a83)]:
119
+ - @mastra/core@1.5.0
120
+
121
+ ## 0.1.1-alpha.0
122
+
123
+ ### Patch Changes
124
+
125
+ - Added editor provider descriptors for workspace filesystem, sandbox, and blob store packages. Each provider exports an object with `id`, `name`, `description`, `configSchema` (JSON Schema), and a factory method, enabling the editor UI to auto-discover and render configuration forms for workspace providers. ([#13156](https://github.com/mastra-ai/mastra/pull/13156))
126
+ - `@mastra/gcs`: Added `gcsFilesystemProvider` with config schema for bucket, projectId, credentials, prefix, readOnly, and endpoint
127
+ - `@mastra/e2b`: Added `e2bSandboxProvider` with config schema for template, timeout, env, metadata, runtimes, domain, and API settings
128
+
129
+ ```ts
130
+ import { gcsFilesystemProvider } from '@mastra/gcs';
131
+ import { e2bSandboxProvider } from '@mastra/e2b';
132
+
133
+ const editor = new MastraEditor({
134
+ filesystems: {
135
+ gcs: gcsFilesystemProvider,
136
+ },
137
+ sandboxes: {
138
+ e2b: e2bSandboxProvider,
139
+ },
140
+ });
141
+
142
+ // Enumerate available providers and their config schemas for UI rendering
143
+ const fsProviders = editor.getFilesystemProviders();
144
+ const sbProviders = editor.getSandboxProviders();
145
+ ```
146
+
147
+ - Added workspace and skill storage domains with full CRUD, versioning, and implementations across LibSQL, Postgres, and MongoDB. Added `editor.workspace` and `editor.skill` namespaces for managing workspace configurations and skill definitions through the editor. Agents stored in the editor can now reference workspaces (by ID or inline config) and skills, with full hydration to runtime `Workspace` instances during agent resolution. ([#13156](https://github.com/mastra-ai/mastra/pull/13156))
148
+
149
+ **Filesystem-native skill versioning (draft → publish model):**
150
+
151
+ Skills are versioned as filesystem trees with content-addressable blob storage. The editing surface (live filesystem) is separated from the serving surface (versioned blob store), enabling a `draft → publish` workflow:
152
+ - `editor.skill.publish(skillId, source, skillPath)` — Snapshots a skill directory from the filesystem into blob storage, creates a new version with a tree manifest, and sets `activeVersionId`
153
+ - Version switching via `editor.skill.update({ id, activeVersionId })` — Points the skill to a previous version without re-publishing
154
+ - Publishing a skill automatically invalidates cached agents that reference it, so they re-hydrate with the updated version on next access
155
+
156
+ **Agent skill resolution strategies:**
157
+
158
+ Agents can reference skills with different resolution strategies:
159
+ - `strategy: 'latest'` — Resolves the skill's active version (honors `activeVersionId` for rollback)
160
+ - `pin: '<versionId>'` — Pins to a specific version, immune to publishes
161
+ - `strategy: 'live'` — Reads directly from the live filesystem (no blob store)
162
+
163
+ **Blob storage infrastructure:**
164
+ - `BlobStore` abstract class for content-addressable storage keyed by SHA-256 hash
165
+ - `InMemoryBlobStore` for testing
166
+ - LibSQL, Postgres, and MongoDB implementations
167
+ - `S3BlobStore` for storing blobs in S3 or S3-compatible storage (AWS, R2, MinIO, DO Spaces)
168
+ - `BlobStoreProvider` interface and `MastraEditorConfig.blobStores` registry for pluggable blob storage
169
+ - `VersionedSkillSource` and `CompositeVersionedSkillSource` for reading skill files from the blob store at runtime
170
+
171
+ **New storage types:**
172
+ - `StorageWorkspaceSnapshotType` and `StorageSkillSnapshotType` with corresponding input/output types
173
+ - `StorageWorkspaceRef` for ID-based or inline workspace references on agents
174
+ - `StorageSkillConfig` for per-agent skill overrides (`pin`, `strategy`, description, instructions)
175
+ - `SkillVersionTree` and `SkillVersionTreeEntry` for tree manifests
176
+ - `StorageBlobEntry` for content-addressable blob entries
177
+ - `SKILL_BLOBS_SCHEMA` for the `mastra_skill_blobs` table
178
+
179
+ **New editor namespaces:**
180
+ - `editor.workspace` — CRUD for workspace configs, plus `hydrateSnapshotToWorkspace()` for resolving to runtime `Workspace` instances
181
+ - `editor.skill` — CRUD for skill definitions, plus `publish()` for filesystem-to-blob snapshots
182
+
183
+ **Provider registries:**
184
+ - `MastraEditorConfig` accepts `filesystems`, `sandboxes`, and `blobStores` provider registries (keyed by provider ID)
185
+ - Built-in `local` filesystem and sandbox providers are auto-registered
186
+ - `editor.resolveBlobStore()` resolves from provider registry or falls back to the storage backend's blobs domain
187
+ - Providers expose `id`, `name`, `description`, `configSchema` (JSON Schema for UI form rendering), and a factory method
188
+
189
+ **Storage adapter support:**
190
+ - LibSQL: Full `workspaces`, `skills`, and `blobs` domain implementations
191
+ - Postgres: Full `workspaces`, `skills`, and `blobs` domain implementations
192
+ - MongoDB: Full `workspaces`, `skills`, and `blobs` domain implementations
193
+ - All three include `workspace`, `skills`, and `skillsFormat` fields on agent versions
194
+
195
+ **Server endpoints:**
196
+ - `GET/POST/PATCH/DELETE /stored/workspaces` — CRUD for stored workspaces
197
+ - `GET/POST/PATCH/DELETE /stored/skills` — CRUD for stored skills
198
+ - `POST /stored/skills/:id/publish` — Publish a skill from a filesystem source
199
+
200
+ ```ts
201
+ import { MastraEditor } from '@mastra/editor';
202
+ import { s3FilesystemProvider, s3BlobStoreProvider } from '@mastra/s3';
203
+ import { e2bSandboxProvider } from '@mastra/e2b';
204
+
205
+ const editor = new MastraEditor({
206
+ filesystems: { s3: s3FilesystemProvider },
207
+ sandboxes: { e2b: e2bSandboxProvider },
208
+ blobStores: { s3: s3BlobStoreProvider },
209
+ });
210
+
211
+ // Create a skill and publish it
212
+ const skill = await editor.skill.create({
213
+ name: 'Code Review',
214
+ description: 'Reviews code for best practices',
215
+ instructions: 'Analyze the code and provide feedback...',
216
+ });
217
+ await editor.skill.publish(skill.id, source, 'skills/code-review');
218
+
219
+ // Agents resolve skills by strategy
220
+ await editor.agent.create({
221
+ name: 'Dev Assistant',
222
+ model: { provider: 'openai', name: 'gpt-4' },
223
+ workspace: { type: 'id', workspaceId: workspace.id },
224
+ skills: { [skill.id]: { strategy: 'latest' } },
225
+ skillsFormat: 'xml',
226
+ });
227
+ ```
228
+
229
+ - Updated dependencies [[`252580a`](https://github.com/mastra-ai/mastra/commit/252580a71feb0e46d0ccab04a70a79ff6a2ee0ab), [`f8e819f`](https://github.com/mastra-ai/mastra/commit/f8e819fabdfdc43d2da546a3ad81ba23685f603d), [`5c75261`](https://github.com/mastra-ai/mastra/commit/5c7526120d936757d4ffb7b82232e1641ebd45cb), [`e27d832`](https://github.com/mastra-ai/mastra/commit/e27d83281b5e166fd63a13969689e928d8605944), [`e37ef84`](https://github.com/mastra-ai/mastra/commit/e37ef8404043c94ca0c8e35ecdedb093b8087878), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`10cf521`](https://github.com/mastra-ai/mastra/commit/10cf52183344743a0d7babe24cd24fd78870c354), [`efdb682`](https://github.com/mastra-ai/mastra/commit/efdb682887f6522149769383908f9790c188ab88), [`0dee7a0`](https://github.com/mastra-ai/mastra/commit/0dee7a0ff4c2507e6eb6e6ee5f9738877ebd4ad1), [`04c2c8e`](https://github.com/mastra-ai/mastra/commit/04c2c8e888984364194131aecb490a3d6e920e61), [`02dc07a`](https://github.com/mastra-ai/mastra/commit/02dc07acc4ad42d93335825e3308f5b42266eba2), [`bb7262b`](https://github.com/mastra-ai/mastra/commit/bb7262b7c0ca76320d985b40510b6ffbbb936582), [`cf1c6e7`](https://github.com/mastra-ai/mastra/commit/cf1c6e789b131f55638fed52183a89d5078b4876), [`5ffadfe`](https://github.com/mastra-ai/mastra/commit/5ffadfefb1468ac2612b20bb84d24c39de6961c0), [`1e1339c`](https://github.com/mastra-ai/mastra/commit/1e1339cc276e571a48cfff5014487877086bfe68), [`d03df73`](https://github.com/mastra-ai/mastra/commit/d03df73f8fe9496064a33e1c3b74ba0479bf9ee6), [`79b8f45`](https://github.com/mastra-ai/mastra/commit/79b8f45a6767e1a5c3d56cd3c5b1214326b81661), [`9bbf08e`](https://github.com/mastra-ai/mastra/commit/9bbf08e3c20731c79dea13a765895b9fcf29cbf1), [`0a25952`](https://github.com/mastra-ai/mastra/commit/0a259526b5e1ac11e6efa53db1f140272962af2d), [`ffa5468`](https://github.com/mastra-ai/mastra/commit/ffa546857fc4821753979b3a34e13b4d76fbbcd4), [`3264a04`](https://github.com/mastra-ai/mastra/commit/3264a04e30340c3c5447433300a035ea0878df85), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`088d9ba`](https://github.com/mastra-ai/mastra/commit/088d9ba2577518703c52b0dccd617178d9ee6b0d), [`74fbebd`](https://github.com/mastra-ai/mastra/commit/74fbebd918a03832a2864965a8bea59bf617d3a2), [`aea6217`](https://github.com/mastra-ai/mastra/commit/aea621790bfb2291431b08da0cc5e6e150303ae7), [`b6a855e`](https://github.com/mastra-ai/mastra/commit/b6a855edc056e088279075506442ba1d6fa6def9), [`ae408ea`](https://github.com/mastra-ai/mastra/commit/ae408ea7128f0d2710b78d8623185198e7cb19c1), [`17e942e`](https://github.com/mastra-ai/mastra/commit/17e942eee2ba44985b1f807e6208cdde672f82f9), [`2015cf9`](https://github.com/mastra-ai/mastra/commit/2015cf921649f44c3f5bcd32a2c052335f8e49b4), [`7ef454e`](https://github.com/mastra-ai/mastra/commit/7ef454eaf9dcec6de60021c8f42192052dd490d6), [`2be1d99`](https://github.com/mastra-ai/mastra/commit/2be1d99564ce79acc4846071082bff353035a87a), [`2708fa1`](https://github.com/mastra-ai/mastra/commit/2708fa1055ac91c03e08b598869f6b8fb51fa37f), [`ba74aef`](https://github.com/mastra-ai/mastra/commit/ba74aef5716142dbbe931351f5243c9c6e4128a9), [`ba74aef`](https://github.com/mastra-ai/mastra/commit/ba74aef5716142dbbe931351f5243c9c6e4128a9), [`ec53e89`](https://github.com/mastra-ai/mastra/commit/ec53e8939c76c638991e21af762e51378eff7543), [`9b5a8cb`](https://github.com/mastra-ai/mastra/commit/9b5a8cb13e120811b0bf14140ada314f1c067894), [`607e66b`](https://github.com/mastra-ai/mastra/commit/607e66b02dc7f531ee37799f3456aa2dc0ca7ac5), [`a215d06`](https://github.com/mastra-ai/mastra/commit/a215d06758dcf590eabfe0b7afd4ae39bdbf082c), [`6909c74`](https://github.com/mastra-ai/mastra/commit/6909c74a7781e0447d475e9dbc1dc871b700f426), [`192438f`](https://github.com/mastra-ai/mastra/commit/192438f8a90c4f375e955f8ff179bf8dc6821a83)]:
230
+ - @mastra/core@1.5.0-alpha.0
231
+
232
+ ## 0.1.0
233
+
234
+ ### Minor Changes
235
+
236
+ - Updated minimum `@mastra/core` peer dependency to support the new `FilesystemLifecycle` and `SandboxLifecycle` interfaces and `onInit` / `onDestroy` lifecycle callbacks. ([#12978](https://github.com/mastra-ai/mastra/pull/12978))
237
+
238
+ See the `@mastra/s3` and `@mastra/gcs` patch changesets for usage examples.
239
+
240
+ ### Patch Changes
241
+
242
+ - dependencies updates: ([#12931](https://github.com/mastra-ai/mastra/pull/12931))
243
+ - Updated dependency [`@google-cloud/storage@^7.19.0` ↗︎](https://www.npmjs.com/package/@google-cloud/storage/v/7.19.0) (from `^7.18.0`, in `dependencies`)
244
+
245
+ - Add typed metadata to getInfo() return type and ensure all common FilesystemInfo fields (error, readOnly) are returned. ([#12971](https://github.com/mastra-ai/mastra/pull/12971))
246
+
247
+ - Added `overwrite: false` support to `writeFile` and `copyFile`. Previously, the `overwrite` option was ignored, allowing files to be silently overwritten. Now throws `FileExistsError` when `overwrite` is set to `false` and the destination file already exists. ([#12912](https://github.com/mastra-ai/mastra/pull/12912))
248
+
249
+ - Added optional `onInit` and `onDestroy` lifecycle callbacks to `GCSFilesystemOptions`. ([#12978](https://github.com/mastra-ai/mastra/pull/12978))
250
+
251
+ ```ts
252
+ const fs = new GCSFilesystem({
253
+ bucket: 'my-bucket',
254
+ projectId: 'my-project',
255
+ onInit: ({ filesystem }) => {
256
+ console.log('GCS filesystem ready:', filesystem.status);
257
+ },
258
+ onDestroy: ({ filesystem }) => {
259
+ console.log('GCS filesystem shutting down');
260
+ },
261
+ });
262
+ ```
263
+
264
+ - Updated dependencies [[`7ef618f`](https://github.com/mastra-ai/mastra/commit/7ef618f3c49c27e2f6b27d7f564c557c0734325b), [`b373564`](https://github.com/mastra-ai/mastra/commit/b37356491d43b4d53067f10cb669abaf2502f218), [`927c2af`](https://github.com/mastra-ai/mastra/commit/927c2af9792286c122e04409efce0f3c804f777f), [`b896b41`](https://github.com/mastra-ai/mastra/commit/b896b41343de7fcc14442fb40fe82d189e65bbe2), [`6415277`](https://github.com/mastra-ai/mastra/commit/6415277a438faa00db2af850ead5dee25f40c428), [`0831bbb`](https://github.com/mastra-ai/mastra/commit/0831bbb5bc750c18e9b22b45f18687c964b70828), [`63f7eda`](https://github.com/mastra-ai/mastra/commit/63f7eda605eb3e0c8c35ee3912ffe7c999c69f69), [`a5b67a3`](https://github.com/mastra-ai/mastra/commit/a5b67a3589a74415feb663a55d1858324a2afde9), [`877b02c`](https://github.com/mastra-ai/mastra/commit/877b02cdbb15e199184c7f2b8f217be8d3ebada7), [`7567222`](https://github.com/mastra-ai/mastra/commit/7567222b1366f0d39980594792dd9d5060bfe2ab), [`af71458`](https://github.com/mastra-ai/mastra/commit/af71458e3b566f09c11d0e5a0a836dc818e7a24a), [`eb36bd8`](https://github.com/mastra-ai/mastra/commit/eb36bd8c52fcd6ec9674ac3b7a6412405b5983e1), [`3cbf121`](https://github.com/mastra-ai/mastra/commit/3cbf121f55418141924754a83102aade89835947)]:
265
+ - @mastra/core@1.4.0
266
+
267
+ ## 0.1.0-alpha.0
268
+
269
+ ### Minor Changes
270
+
271
+ - Updated minimum `@mastra/core` peer dependency to support the new `FilesystemLifecycle` and `SandboxLifecycle` interfaces and `onInit` / `onDestroy` lifecycle callbacks. ([#12978](https://github.com/mastra-ai/mastra/pull/12978))
272
+
273
+ See the `@mastra/s3` and `@mastra/gcs` patch changesets for usage examples.
274
+
275
+ ### Patch Changes
276
+
277
+ - dependencies updates: ([#12931](https://github.com/mastra-ai/mastra/pull/12931))
278
+ - Updated dependency [`@google-cloud/storage@^7.19.0` ↗︎](https://www.npmjs.com/package/@google-cloud/storage/v/7.19.0) (from `^7.18.0`, in `dependencies`)
279
+
280
+ - Add typed metadata to getInfo() return type and ensure all common FilesystemInfo fields (error, readOnly) are returned. ([#12971](https://github.com/mastra-ai/mastra/pull/12971))
281
+
282
+ - Added `overwrite: false` support to `writeFile` and `copyFile`. Previously, the `overwrite` option was ignored, allowing files to be silently overwritten. Now throws `FileExistsError` when `overwrite` is set to `false` and the destination file already exists. ([#12912](https://github.com/mastra-ai/mastra/pull/12912))
283
+
284
+ - Added optional `onInit` and `onDestroy` lifecycle callbacks to `GCSFilesystemOptions`. ([#12978](https://github.com/mastra-ai/mastra/pull/12978))
285
+
286
+ ```ts
287
+ const fs = new GCSFilesystem({
288
+ bucket: 'my-bucket',
289
+ projectId: 'my-project',
290
+ onInit: ({ filesystem }) => {
291
+ console.log('GCS filesystem ready:', filesystem.status);
292
+ },
293
+ onDestroy: ({ filesystem }) => {
294
+ console.log('GCS filesystem shutting down');
295
+ },
296
+ });
297
+ ```
298
+
299
+ - Updated dependencies [[`7ef618f`](https://github.com/mastra-ai/mastra/commit/7ef618f3c49c27e2f6b27d7f564c557c0734325b), [`b373564`](https://github.com/mastra-ai/mastra/commit/b37356491d43b4d53067f10cb669abaf2502f218), [`927c2af`](https://github.com/mastra-ai/mastra/commit/927c2af9792286c122e04409efce0f3c804f777f), [`b896b41`](https://github.com/mastra-ai/mastra/commit/b896b41343de7fcc14442fb40fe82d189e65bbe2), [`6415277`](https://github.com/mastra-ai/mastra/commit/6415277a438faa00db2af850ead5dee25f40c428), [`0831bbb`](https://github.com/mastra-ai/mastra/commit/0831bbb5bc750c18e9b22b45f18687c964b70828), [`63f7eda`](https://github.com/mastra-ai/mastra/commit/63f7eda605eb3e0c8c35ee3912ffe7c999c69f69), [`a5b67a3`](https://github.com/mastra-ai/mastra/commit/a5b67a3589a74415feb663a55d1858324a2afde9), [`877b02c`](https://github.com/mastra-ai/mastra/commit/877b02cdbb15e199184c7f2b8f217be8d3ebada7), [`7567222`](https://github.com/mastra-ai/mastra/commit/7567222b1366f0d39980594792dd9d5060bfe2ab), [`af71458`](https://github.com/mastra-ai/mastra/commit/af71458e3b566f09c11d0e5a0a836dc818e7a24a), [`eb36bd8`](https://github.com/mastra-ai/mastra/commit/eb36bd8c52fcd6ec9674ac3b7a6412405b5983e1), [`3cbf121`](https://github.com/mastra-ai/mastra/commit/3cbf121f55418141924754a83102aade89835947)]:
300
+ - @mastra/core@1.4.0-alpha.0
301
+
302
+ ## 0.0.1
303
+
304
+ ### Patch Changes
305
+
306
+ - Added `@mastra/gcs` package providing Google Cloud Storage filesystem for Mastra workspaces. Supports credentials as a JSON object, key file path, or Application Default Credentials. ([#12605](https://github.com/mastra-ai/mastra/pull/12605))
307
+
308
+ ```typescript
309
+ import { GCSFilesystem } from '@mastra/gcs';
310
+
311
+ const fs = new GCSFilesystem({
312
+ bucket: 'my-bucket',
313
+ credentials: {
314
+ /* service account key */
315
+ },
316
+ });
317
+ ```
318
+
319
+ - Updated dependencies [[`717ffab`](https://github.com/mastra-ai/mastra/commit/717ffab42cfd58ff723b5c19ada4939997773004), [`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a), [`e4b6dab`](https://github.com/mastra-ai/mastra/commit/e4b6dab171c5960e340b3ea3ea6da8d64d2b8672), [`5719fa8`](https://github.com/mastra-ai/mastra/commit/5719fa8880e86e8affe698ec4b3807c7e0e0a06f), [`83cda45`](https://github.com/mastra-ai/mastra/commit/83cda4523e588558466892bff8f80f631a36945a), [`11804ad`](https://github.com/mastra-ai/mastra/commit/11804adf1d6be46ebe216be40a43b39bb8b397d7), [`aa95f95`](https://github.com/mastra-ai/mastra/commit/aa95f958b186ae5c9f4219c88e268f5565c277a2), [`90f7894`](https://github.com/mastra-ai/mastra/commit/90f7894568dc9481f40a4d29672234fae23090bb), [`f5501ae`](https://github.com/mastra-ai/mastra/commit/f5501aedb0a11106c7db7e480d6eaf3971b7bda8), [`44573af`](https://github.com/mastra-ai/mastra/commit/44573afad0a4bc86f627d6cbc0207961cdcb3bc3), [`00e3861`](https://github.com/mastra-ai/mastra/commit/00e3861863fbfee78faeb1ebbdc7c0223aae13ff), [`8109aee`](https://github.com/mastra-ai/mastra/commit/8109aeeab758e16cd4255a6c36f044b70eefc6a6), [`7bfbc52`](https://github.com/mastra-ai/mastra/commit/7bfbc52a8604feb0fff2c0a082c13c0c2a3df1a2), [`1445994`](https://github.com/mastra-ai/mastra/commit/1445994aee19c9334a6a101cf7bd80ca7ed4d186), [`61f44a2`](https://github.com/mastra-ai/mastra/commit/61f44a26861c89e364f367ff40825bdb7f19df55), [`37145d2`](https://github.com/mastra-ai/mastra/commit/37145d25f99dc31f1a9105576e5452609843ce32), [`fdad759`](https://github.com/mastra-ai/mastra/commit/fdad75939ff008b27625f5ec0ce9c6915d99d9ec), [`e4569c5`](https://github.com/mastra-ai/mastra/commit/e4569c589e00c4061a686c9eb85afe1b7050b0a8), [`7309a85`](https://github.com/mastra-ai/mastra/commit/7309a85427281a8be23f4fb80ca52e18eaffd596), [`99424f6`](https://github.com/mastra-ai/mastra/commit/99424f6862ffb679c4ec6765501486034754a4c2), [`44eb452`](https://github.com/mastra-ai/mastra/commit/44eb4529b10603c279688318bebf3048543a1d61), [`6c40593`](https://github.com/mastra-ai/mastra/commit/6c40593d6d2b1b68b0c45d1a3a4c6ac5ecac3937), [`8c1135d`](https://github.com/mastra-ai/mastra/commit/8c1135dfb91b057283eae7ee11f9ec28753cc64f), [`dd39e54`](https://github.com/mastra-ai/mastra/commit/dd39e54ea34532c995b33bee6e0e808bf41a7341), [`b6fad9a`](https://github.com/mastra-ai/mastra/commit/b6fad9a602182b1cc0df47cd8c55004fa829ad61), [`4129c07`](https://github.com/mastra-ai/mastra/commit/4129c073349b5a66643fd8136ebfe9d7097cf793), [`5b930ab`](https://github.com/mastra-ai/mastra/commit/5b930aba1834d9898e8460a49d15106f31ac7c8d), [`4be93d0`](https://github.com/mastra-ai/mastra/commit/4be93d09d68e20aaf0ea3f210749422719618b5f), [`047635c`](https://github.com/mastra-ai/mastra/commit/047635ccd7861d726c62d135560c0022a5490aec), [`8c90ff4`](https://github.com/mastra-ai/mastra/commit/8c90ff4d3414e7f2a2d216ea91274644f7b29133), [`ed232d1`](https://github.com/mastra-ai/mastra/commit/ed232d1583f403925dc5ae45f7bee948cf2a182b), [`3891795`](https://github.com/mastra-ai/mastra/commit/38917953518eb4154a984ee36e6ededdcfe80f72), [`4f955b2`](https://github.com/mastra-ai/mastra/commit/4f955b20c7f66ed282ee1fd8709696fa64c4f19d), [`55a4c90`](https://github.com/mastra-ai/mastra/commit/55a4c9044ac7454349b9f6aeba0bbab5ee65d10f)]:
320
+ - @mastra/core@1.3.0
321
+
322
+ ## 0.0.1-alpha.0
323
+
324
+ ### Patch Changes
325
+
326
+ - Added `@mastra/gcs` package providing Google Cloud Storage filesystem for Mastra workspaces. Supports credentials as a JSON object, key file path, or Application Default Credentials. ([#12605](https://github.com/mastra-ai/mastra/pull/12605))
327
+
328
+ ```typescript
329
+ import { GCSFilesystem } from '@mastra/gcs';
330
+
331
+ const fs = new GCSFilesystem({
332
+ bucket: 'my-bucket',
333
+ credentials: {
334
+ /* service account key */
335
+ },
336
+ });
337
+ ```
338
+
339
+ - Updated dependencies [[`717ffab`](https://github.com/mastra-ai/mastra/commit/717ffab42cfd58ff723b5c19ada4939997773004), [`e4b6dab`](https://github.com/mastra-ai/mastra/commit/e4b6dab171c5960e340b3ea3ea6da8d64d2b8672), [`5719fa8`](https://github.com/mastra-ai/mastra/commit/5719fa8880e86e8affe698ec4b3807c7e0e0a06f), [`83cda45`](https://github.com/mastra-ai/mastra/commit/83cda4523e588558466892bff8f80f631a36945a), [`11804ad`](https://github.com/mastra-ai/mastra/commit/11804adf1d6be46ebe216be40a43b39bb8b397d7), [`aa95f95`](https://github.com/mastra-ai/mastra/commit/aa95f958b186ae5c9f4219c88e268f5565c277a2), [`f5501ae`](https://github.com/mastra-ai/mastra/commit/f5501aedb0a11106c7db7e480d6eaf3971b7bda8), [`44573af`](https://github.com/mastra-ai/mastra/commit/44573afad0a4bc86f627d6cbc0207961cdcb3bc3), [`00e3861`](https://github.com/mastra-ai/mastra/commit/00e3861863fbfee78faeb1ebbdc7c0223aae13ff), [`7bfbc52`](https://github.com/mastra-ai/mastra/commit/7bfbc52a8604feb0fff2c0a082c13c0c2a3df1a2), [`1445994`](https://github.com/mastra-ai/mastra/commit/1445994aee19c9334a6a101cf7bd80ca7ed4d186), [`61f44a2`](https://github.com/mastra-ai/mastra/commit/61f44a26861c89e364f367ff40825bdb7f19df55), [`37145d2`](https://github.com/mastra-ai/mastra/commit/37145d25f99dc31f1a9105576e5452609843ce32), [`fdad759`](https://github.com/mastra-ai/mastra/commit/fdad75939ff008b27625f5ec0ce9c6915d99d9ec), [`e4569c5`](https://github.com/mastra-ai/mastra/commit/e4569c589e00c4061a686c9eb85afe1b7050b0a8), [`7309a85`](https://github.com/mastra-ai/mastra/commit/7309a85427281a8be23f4fb80ca52e18eaffd596), [`99424f6`](https://github.com/mastra-ai/mastra/commit/99424f6862ffb679c4ec6765501486034754a4c2), [`44eb452`](https://github.com/mastra-ai/mastra/commit/44eb4529b10603c279688318bebf3048543a1d61), [`6c40593`](https://github.com/mastra-ai/mastra/commit/6c40593d6d2b1b68b0c45d1a3a4c6ac5ecac3937), [`8c1135d`](https://github.com/mastra-ai/mastra/commit/8c1135dfb91b057283eae7ee11f9ec28753cc64f), [`dd39e54`](https://github.com/mastra-ai/mastra/commit/dd39e54ea34532c995b33bee6e0e808bf41a7341), [`b6fad9a`](https://github.com/mastra-ai/mastra/commit/b6fad9a602182b1cc0df47cd8c55004fa829ad61), [`4129c07`](https://github.com/mastra-ai/mastra/commit/4129c073349b5a66643fd8136ebfe9d7097cf793), [`5b930ab`](https://github.com/mastra-ai/mastra/commit/5b930aba1834d9898e8460a49d15106f31ac7c8d), [`4be93d0`](https://github.com/mastra-ai/mastra/commit/4be93d09d68e20aaf0ea3f210749422719618b5f), [`047635c`](https://github.com/mastra-ai/mastra/commit/047635ccd7861d726c62d135560c0022a5490aec), [`8c90ff4`](https://github.com/mastra-ai/mastra/commit/8c90ff4d3414e7f2a2d216ea91274644f7b29133), [`ed232d1`](https://github.com/mastra-ai/mastra/commit/ed232d1583f403925dc5ae45f7bee948cf2a182b), [`3891795`](https://github.com/mastra-ai/mastra/commit/38917953518eb4154a984ee36e6ededdcfe80f72), [`4f955b2`](https://github.com/mastra-ai/mastra/commit/4f955b20c7f66ed282ee1fd8709696fa64c4f19d), [`55a4c90`](https://github.com/mastra-ai/mastra/commit/55a4c9044ac7454349b9f6aeba0bbab5ee65d10f)]:
340
+ - @mastra/core@1.3.0-alpha.1
package/LICENSE.md ADDED
@@ -0,0 +1,30 @@
1
+ Portions of this software are licensed as follows:
2
+
3
+ - All content that resides under any directory named "ee/" within this
4
+ repository, including but not limited to:
5
+ - `packages/core/src/auth/ee/`
6
+ - `packages/server/src/server/auth/ee/`
7
+ is licensed under the license defined in `ee/LICENSE`.
8
+
9
+ - All third-party components incorporated into the Mastra Software are
10
+ licensed under the original license provided by the owner of the
11
+ applicable component.
12
+
13
+ - Content outside of the above-mentioned directories or restrictions is
14
+ available under the "Apache License 2.0" as defined below.
15
+
16
+ # Apache License 2.0
17
+
18
+ Copyright (c) 2025 Kepler Software, Inc.
19
+
20
+ Licensed under the Apache License, Version 2.0 (the "License");
21
+ you may not use this file except in compliance with the License.
22
+ You may obtain a copy of the License at
23
+
24
+ http://www.apache.org/licenses/LICENSE-2.0
25
+
26
+ Unless required by applicable law or agreed to in writing, software
27
+ distributed under the License is distributed on an "AS IS" BASIS,
28
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
+ See the License for the specific language governing permissions and
30
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # @mastra/gcs
2
+
3
+ Google Cloud Storage filesystem provider for Mastra workspaces.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @mastra/gcs
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { Agent } from '@mastra/core/agent';
15
+ import { Workspace } from '@mastra/core/workspace';
16
+ import { GCSFilesystem } from '@mastra/gcs';
17
+
18
+ const workspace = new Workspace({
19
+ filesystem: new GCSFilesystem({
20
+ bucket: 'my-gcs-bucket',
21
+ // Uses Application Default Credentials by default
22
+ // Or provide a service account key:
23
+ projectId: 'my-project-id',
24
+ credentials: JSON.parse(process.env.GCS_SERVICE_ACCOUNT_KEY),
25
+ }),
26
+ });
27
+
28
+ const agent = new Agent({
29
+ name: 'my-agent',
30
+ model: 'anthropic/claude-opus-4-5',
31
+ workspace,
32
+ });
33
+ ```
34
+
35
+ ### With E2B Sandbox
36
+
37
+ When used with `@mastra/e2b`, GCS filesystems can be mounted into E2B sandboxes via gcsfuse:
38
+
39
+ ```typescript
40
+ import { Workspace } from '@mastra/core/workspace';
41
+ import { GCSFilesystem } from '@mastra/gcs';
42
+ import { E2BSandbox } from '@mastra/e2b';
43
+
44
+ const workspace = new Workspace({
45
+ mounts: {
46
+ '/my-bucket': new GCSFilesystem({
47
+ bucket: 'my-gcs-bucket',
48
+ projectId: 'my-project-id',
49
+ credentials: JSON.parse(process.env.GCS_SERVICE_ACCOUNT_KEY),
50
+ }),
51
+ },
52
+ sandbox: new E2BSandbox(),
53
+ });
54
+ ```
55
+
56
+ ## Documentation
57
+
58
+ For more information, see the [Mastra Workspaces documentation](https://mastra.ai/docs/workspace/overview).
@@ -0,0 +1,122 @@
1
+ /**
2
+ * GCS Filesystem Provider
3
+ *
4
+ * A filesystem implementation backed by Google Cloud Storage.
5
+ */
6
+ import type { FileContent, FileStat, FileEntry, ReadOptions, WriteOptions, ListOptions, RemoveOptions, CopyOptions, FilesystemInfo, FilesystemMountConfig, FilesystemIcon, ProviderStatus, MastraFilesystemOptions } from '@mastra/core/workspace';
7
+ import { MastraFilesystem } from '@mastra/core/workspace';
8
+ /**
9
+ * GCS mount configuration.
10
+ * Returned by GCSFilesystem.getMountConfig() for FUSE mounting in sandboxes.
11
+ */
12
+ export interface GCSMountConfig extends FilesystemMountConfig {
13
+ type: 'gcs';
14
+ /** GCS bucket name */
15
+ bucket: string;
16
+ /** Service account key JSON (optional - omit for public buckets or ADC) */
17
+ serviceAccountKey?: string;
18
+ }
19
+ /**
20
+ * GCS filesystem provider configuration.
21
+ */
22
+ export interface GCSFilesystemOptions extends MastraFilesystemOptions {
23
+ /** Unique identifier for this filesystem instance */
24
+ id?: string;
25
+ /** GCS bucket name */
26
+ bucket: string;
27
+ /** Human-friendly display name for the UI */
28
+ displayName?: string;
29
+ /** Icon identifier for the UI (defaults to 'gcs') */
30
+ icon?: FilesystemIcon;
31
+ /** Description shown in tooltips */
32
+ description?: string;
33
+ /**
34
+ * GCS project ID.
35
+ * Required when using service account credentials.
36
+ */
37
+ projectId?: string;
38
+ /**
39
+ * Service account key JSON object or path to key file.
40
+ * If not provided, uses Application Default Credentials (ADC).
41
+ */
42
+ credentials?: object | string;
43
+ /** Optional prefix for all keys (acts like a subdirectory) */
44
+ prefix?: string;
45
+ /** Mount as read-only (blocks write operations, mounts read-only in sandboxes) */
46
+ readOnly?: boolean;
47
+ /**
48
+ * Custom API endpoint URL.
49
+ * Used for local development with emulators like fake-gcs-server.
50
+ */
51
+ endpoint?: string;
52
+ }
53
+ export declare class GCSFilesystem extends MastraFilesystem {
54
+ readonly id: string;
55
+ readonly name = "GCSFilesystem";
56
+ readonly provider = "gcs";
57
+ readonly readOnly?: boolean;
58
+ status: ProviderStatus;
59
+ readonly displayName?: string;
60
+ readonly icon: FilesystemIcon;
61
+ readonly description?: string;
62
+ private readonly bucketName;
63
+ private readonly projectId?;
64
+ private readonly credentials?;
65
+ private readonly prefix;
66
+ private readonly endpoint?;
67
+ private _storage;
68
+ private _bucket;
69
+ constructor(options: GCSFilesystemOptions);
70
+ /**
71
+ * Get mount configuration for E2B sandbox.
72
+ * Returns GCS-compatible config that works with gcsfuse.
73
+ */
74
+ getMountConfig(): GCSMountConfig;
75
+ /**
76
+ * Get filesystem info for status reporting.
77
+ */
78
+ getInfo(): FilesystemInfo<{
79
+ bucket: string;
80
+ endpoint?: string;
81
+ prefix?: string;
82
+ }>;
83
+ /**
84
+ * Get instructions describing this GCS filesystem.
85
+ * Used by agents to understand storage semantics.
86
+ */
87
+ getInstructions(): string;
88
+ private getStorage;
89
+ private getBucket;
90
+ /**
91
+ * Ensure the filesystem is initialized and return the bucket.
92
+ * Uses base class ensureReady() for status management, then returns bucket.
93
+ */
94
+ private getReadyBucket;
95
+ private toKey;
96
+ readFile(path: string, options?: ReadOptions): Promise<string | Buffer>;
97
+ writeFile(path: string, content: FileContent, options?: WriteOptions): Promise<void>;
98
+ appendFile(path: string, content: FileContent): Promise<void>;
99
+ deleteFile(path: string, options?: RemoveOptions): Promise<void>;
100
+ copyFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
101
+ moveFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
102
+ mkdir(_path: string, _options?: {
103
+ recursive?: boolean;
104
+ }): Promise<void>;
105
+ rmdir(path: string, options?: RemoveOptions): Promise<void>;
106
+ readdir(path: string, options?: ListOptions): Promise<FileEntry[]>;
107
+ exists(path: string): Promise<boolean>;
108
+ stat(path: string): Promise<FileStat>;
109
+ isFile(path: string): Promise<boolean>;
110
+ isDirectory(path: string): Promise<boolean>;
111
+ /**
112
+ * Initialize the GCS client.
113
+ * Status management is handled by the base class.
114
+ */
115
+ init(): Promise<void>;
116
+ /**
117
+ * Clean up the GCS client.
118
+ * Status management is handled by the base class.
119
+ */
120
+ destroy(): Promise<void>;
121
+ }
122
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index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