@mastra/azure 0.0.0-ag-example-20260516005230

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,83 @@
1
+ # @mastra/azure
2
+
3
+ ## 0.0.0-ag-example-20260516005230
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`58aadb8`](https://github.com/mastra-ai/mastra/commit/58aadb8a2ab713c945df04351290bb572dffad21), [`4d90188`](https://github.com/mastra-ai/mastra/commit/4d9018840fba28d40e9bc3238727bbc28b29e996), [`58aadb8`](https://github.com/mastra-ai/mastra/commit/58aadb8a2ab713c945df04351290bb572dffad21), [`58aadb8`](https://github.com/mastra-ai/mastra/commit/58aadb8a2ab713c945df04351290bb572dffad21), [`58aadb8`](https://github.com/mastra-ai/mastra/commit/58aadb8a2ab713c945df04351290bb572dffad21), [`58aadb8`](https://github.com/mastra-ai/mastra/commit/58aadb8a2ab713c945df04351290bb572dffad21), [`58aadb8`](https://github.com/mastra-ai/mastra/commit/58aadb8a2ab713c945df04351290bb572dffad21), [`2487b50`](https://github.com/mastra-ai/mastra/commit/2487b50af3b11dada6301afcb2f4da25612da1da), [`db58726`](https://github.com/mastra-ai/mastra/commit/db58726abd9cedd990ef40e85cec82aeb47594af), [`7c3a1ad`](https://github.com/mastra-ai/mastra/commit/7c3a1adedd155d126a15ad74b8985aa355af86e2), [`94556bf`](https://github.com/mastra-ai/mastra/commit/94556bffcf30aa1dae02662b80809df8957f81e1)]:
8
+ - @mastra/core@0.0.0-ag-example-20260516005230
9
+
10
+ ## 0.2.1
11
+
12
+ ### Patch Changes
13
+
14
+ - @mastra/azure: Fixed AzureBlobFilesystem mount configs to include configured prefixes so mounts use the configured prefix instead of the entire container. ([#15874](https://github.com/mastra-ai/mastra/pull/15874))
15
+
16
+ - Updated dependencies [[`6db978c`](https://github.com/mastra-ai/mastra/commit/6db978c42e94e75540a504f7230086f0b5cd35f9), [`512a013`](https://github.com/mastra-ai/mastra/commit/512a013f285aa9c0aa8f08a35b2ce09f9938b017), [`e9becde`](https://github.com/mastra-ai/mastra/commit/e9becdeed9176b9f8392e557bde12b933f99cf7a), [`703a443`](https://github.com/mastra-ai/mastra/commit/703a44390c587d9c0b8ae94ec4edd8afb2a74044), [`808df1b`](https://github.com/mastra-ai/mastra/commit/808df1b39358b5f10b7317107e42b1fda7c87185)]:
17
+ - @mastra/core@1.29.1
18
+
19
+ ## 0.2.1-alpha.0
20
+
21
+ ### Patch Changes
22
+
23
+ - @mastra/azure: Fixed AzureBlobFilesystem mount configs to include configured prefixes so mounts use the configured prefix instead of the entire container. ([#15874](https://github.com/mastra-ai/mastra/pull/15874))
24
+
25
+ - Updated dependencies [[`512a013`](https://github.com/mastra-ai/mastra/commit/512a013f285aa9c0aa8f08a35b2ce09f9938b017), [`e9becde`](https://github.com/mastra-ai/mastra/commit/e9becdeed9176b9f8392e557bde12b933f99cf7a)]:
26
+ - @mastra/core@1.29.1-alpha.2
27
+
28
+ ## 0.2.0
29
+
30
+ ### Minor Changes
31
+
32
+ - Add `@mastra/azure`, exporting an Azure Blob Storage `WorkspaceFilesystem` provider via `@mastra/azure/blob` with support for connection string, account key, SAS token, `DefaultAzureCredential`, and anonymous auth, plus prefix namespacing and read-only mode. ([#15217](https://github.com/mastra-ai/mastra/pull/15217))
33
+
34
+ - Added `AzureBlobStore`, a content-addressable blob store backed by Azure Blob Storage for skill versioning. Available alongside the existing `AzureBlobFilesystem` from `@mastra/azure/blob`. ([#15853](https://github.com/mastra-ai/mastra/pull/15853))
35
+
36
+ ```typescript
37
+ import { AzureBlobStore } from '@mastra/azure/blob';
38
+
39
+ const blobs = new AzureBlobStore({
40
+ container: 'my-skill-blobs',
41
+ connectionString: process.env.AZURE_STORAGE_CONNECTION_STRING,
42
+ });
43
+ ```
44
+
45
+ Supports the same authentication methods as `AzureBlobFilesystem`: connection string, account key, SAS token, `DefaultAzureCredential`, and anonymous access. A matching `azureBlobStoreProvider` descriptor is also exported for MastraEditor.
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies [[`28caa5b`](https://github.com/mastra-ai/mastra/commit/28caa5b032358545af2589ed90636eccb4dd9d2f), [`c1ae974`](https://github.com/mastra-ai/mastra/commit/c1ae97491f6e57378ce880c3a397778c42adcdf1), [`b510d36`](https://github.com/mastra-ai/mastra/commit/b510d368f73dab6be2e2c2bc99035aaef1fb7d7a), [`13b4d7c`](https://github.com/mastra-ai/mastra/commit/13b4d7c16de34dff9095d1cd80f22f544b6cfe75), [`7a7b313`](https://github.com/mastra-ai/mastra/commit/7a7b3138fb3bcf0b0c740eaea07971e43d330ef3), [`c04417b`](https://github.com/mastra-ai/mastra/commit/c04417ba0a2e4ded66da4352331ef29cd4bd1d79), [`cf25a03`](https://github.com/mastra-ai/mastra/commit/cf25a03132164b9dc1e5dccf7394824e33007c51), [`8a71261`](https://github.com/mastra-ai/mastra/commit/8a71261e3954ae617c6f8e25767b951f99438ab2), [`9e973b0`](https://github.com/mastra-ai/mastra/commit/9e973b010dacfa15ac82b0072897319f5234b90a), [`dd934a0`](https://github.com/mastra-ai/mastra/commit/dd934a0982ce0f78712fbd559e4f2410bf594b39), [`ba6b0c5`](https://github.com/mastra-ai/mastra/commit/ba6b0c51bfce358554fd33c7f2bcd5593633f2ff), [`a6dac0a`](https://github.com/mastra-ai/mastra/commit/a6dac0a40c7181161b1add4e8534f962bcbc9aa7), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`6c8c6c7`](https://github.com/mastra-ai/mastra/commit/6c8c6c71518394321a4692614aa4b11f3bb0a343), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`7d056b6`](https://github.com/mastra-ai/mastra/commit/7d056b6ecf603cacaa0f663ff1df025ed885b6c1), [`9cef83b`](https://github.com/mastra-ai/mastra/commit/9cef83b8a642b8098747772921e3523b492bafbc), [`d30e215`](https://github.com/mastra-ai/mastra/commit/d30e2156c746bc9fd791745cec1cc24377b66789), [`021a60f`](https://github.com/mastra-ai/mastra/commit/021a60f1f3e0135a70ef23c58be7a9b3aaffe6b4), [`73f2809`](https://github.com/mastra-ai/mastra/commit/73f2809721db24e98cdf122539652a455211b450), [`aedeea4`](https://github.com/mastra-ai/mastra/commit/aedeea48a94f728323f040478775076b9574be50), [`26f1f94`](https://github.com/mastra-ai/mastra/commit/26f1f9490574b864ba1ecedf2c9632e0767a23bd), [`8126d86`](https://github.com/mastra-ai/mastra/commit/8126d8638411eacfafdc29036ac998e8757ea66f), [`73b45fa`](https://github.com/mastra-ai/mastra/commit/73b45facdef4fbcb8af710c50f0646f18619dbaa), [`ae97520`](https://github.com/mastra-ai/mastra/commit/ae975206fdb0f6ef03c4d5bf94f7dc7c3f706c02), [`7a7b313`](https://github.com/mastra-ai/mastra/commit/7a7b3138fb3bcf0b0c740eaea07971e43d330ef3), [`441670a`](https://github.com/mastra-ai/mastra/commit/441670a02c9dc7731c52674f55481e7848a84523)]:
50
+ - @mastra/core@1.29.0
51
+
52
+ ## 0.2.0-alpha.1
53
+
54
+ ### Minor Changes
55
+
56
+ - Added `AzureBlobStore`, a content-addressable blob store backed by Azure Blob Storage for skill versioning. Available alongside the existing `AzureBlobFilesystem` from `@mastra/azure/blob`. ([#15853](https://github.com/mastra-ai/mastra/pull/15853))
57
+
58
+ ```typescript
59
+ import { AzureBlobStore } from '@mastra/azure/blob';
60
+
61
+ const blobs = new AzureBlobStore({
62
+ container: 'my-skill-blobs',
63
+ connectionString: process.env.AZURE_STORAGE_CONNECTION_STRING,
64
+ });
65
+ ```
66
+
67
+ Supports the same authentication methods as `AzureBlobFilesystem`: connection string, account key, SAS token, `DefaultAzureCredential`, and anonymous access. A matching `azureBlobStoreProvider` descriptor is also exported for MastraEditor.
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies [[`28caa5b`](https://github.com/mastra-ai/mastra/commit/28caa5b032358545af2589ed90636eccb4dd9d2f), [`7d056b6`](https://github.com/mastra-ai/mastra/commit/7d056b6ecf603cacaa0f663ff1df025ed885b6c1), [`26f1f94`](https://github.com/mastra-ai/mastra/commit/26f1f9490574b864ba1ecedf2c9632e0767a23bd)]:
72
+ - @mastra/core@1.29.0-alpha.5
73
+
74
+ ## 0.2.0-alpha.0
75
+
76
+ ### Minor Changes
77
+
78
+ - Add `@mastra/azure`, exporting an Azure Blob Storage `WorkspaceFilesystem` provider via `@mastra/azure/blob` with support for connection string, account key, SAS token, `DefaultAzureCredential`, and anonymous auth, plus prefix namespacing and read-only mode. ([#15217](https://github.com/mastra-ai/mastra/pull/15217))
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [[`c04417b`](https://github.com/mastra-ai/mastra/commit/c04417ba0a2e4ded66da4352331ef29cd4bd1d79), [`cf25a03`](https://github.com/mastra-ai/mastra/commit/cf25a03132164b9dc1e5dccf7394824e33007c51), [`ba6b0c5`](https://github.com/mastra-ai/mastra/commit/ba6b0c51bfce358554fd33c7f2bcd5593633f2ff)]:
83
+ - @mastra/core@1.29.0-alpha.3
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,79 @@
1
+ # @mastra/azure
2
+
3
+ Azure Blob Storage filesystem and content-addressable blob store provider for Mastra workspaces.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @mastra/azure
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { Agent } from '@mastra/core/agent';
15
+ import { Workspace } from '@mastra/core/workspace';
16
+ import { AzureBlobFilesystem } from '@mastra/azure/blob';
17
+
18
+ const workspace = new Workspace({
19
+ filesystem: new AzureBlobFilesystem({
20
+ container: 'my-container',
21
+ connectionString: process.env.AZURE_STORAGE_CONNECTION_STRING,
22
+ }),
23
+ });
24
+
25
+ const agent = new Agent({
26
+ name: 'my-agent',
27
+ model: 'anthropic/claude-opus-4-5',
28
+ workspace,
29
+ });
30
+ ```
31
+
32
+ ### Account key
33
+
34
+ ```typescript
35
+ const filesystem = new AzureBlobFilesystem({
36
+ container: 'my-container',
37
+ accountName: process.env.AZURE_STORAGE_ACCOUNT_NAME,
38
+ accountKey: process.env.AZURE_STORAGE_ACCOUNT_KEY,
39
+ });
40
+ ```
41
+
42
+ ### Shared access signature
43
+
44
+ ```typescript
45
+ const filesystem = new AzureBlobFilesystem({
46
+ container: 'my-container',
47
+ accountName: process.env.AZURE_STORAGE_ACCOUNT_NAME,
48
+ sasToken: process.env.AZURE_STORAGE_SAS_TOKEN,
49
+ });
50
+ ```
51
+
52
+ ### DefaultAzureCredential
53
+
54
+ Requires `@azure/identity` to be installed.
55
+
56
+ ```typescript
57
+ const filesystem = new AzureBlobFilesystem({
58
+ container: 'my-container',
59
+ accountName: process.env.AZURE_STORAGE_ACCOUNT_NAME,
60
+ useDefaultCredential: true,
61
+ });
62
+ ```
63
+
64
+ ## Blob Store
65
+
66
+ `AzureBlobStore` is a content-addressable blob store backed by Azure Blob Storage, used for skill versioning.
67
+
68
+ ```typescript
69
+ import { AzureBlobStore } from '@mastra/azure/blob';
70
+
71
+ const blobs = new AzureBlobStore({
72
+ container: 'my-skill-blobs',
73
+ connectionString: process.env.AZURE_STORAGE_CONNECTION_STRING,
74
+ });
75
+ ```
76
+
77
+ ## Documentation
78
+
79
+ For more information, see the [Mastra Workspaces documentation](https://mastra.ai/docs/workspace/overview).
@@ -0,0 +1,84 @@
1
+ import { BlobStore } from '@mastra/core/storage';
2
+ import type { StorageBlobEntry } from '@mastra/core/storage';
3
+ /**
4
+ * Configuration for AzureBlobStore.
5
+ */
6
+ export interface AzureBlobStoreOptions {
7
+ /** Azure Blob container name */
8
+ container: string;
9
+ /** Storage account name (required unless using connectionString) */
10
+ accountName?: string;
11
+ /** Storage account key */
12
+ accountKey?: string;
13
+ /** SAS token for authentication */
14
+ sasToken?: string;
15
+ /** Full connection string (takes priority over accountName/accountKey) */
16
+ connectionString?: string;
17
+ /**
18
+ * Use DefaultAzureCredential from @azure/identity for authentication.
19
+ * Requires @azure/identity to be installed as a peer dependency.
20
+ */
21
+ useDefaultCredential?: boolean;
22
+ /** Custom endpoint URL (e.g. for the Azurite emulator) */
23
+ endpoint?: string;
24
+ /**
25
+ * Key prefix for all blob objects.
26
+ * Defaults to 'mastra_skill_blobs/'.
27
+ */
28
+ prefix?: string;
29
+ }
30
+ /**
31
+ * Azure Blob Storage-backed content-addressable blob store for skill versioning.
32
+ *
33
+ * Each blob is stored as a block blob keyed by its SHA-256 hash. Metadata
34
+ * (size, mimeType, createdAt) is stored as Azure blob metadata.
35
+ *
36
+ * Since blobs are content-addressable, writes are idempotent — the same hash
37
+ * always maps to the same content, so overwrites are safe and equivalent to
38
+ * a no-op.
39
+ *
40
+ * @example Connection string
41
+ * ```typescript
42
+ * import { AzureBlobStore } from '@mastra/azure/blob';
43
+ *
44
+ * const blobs = new AzureBlobStore({
45
+ * container: 'my-skill-blobs',
46
+ * connectionString: process.env.AZURE_STORAGE_CONNECTION_STRING!,
47
+ * });
48
+ * ```
49
+ *
50
+ * @example Account key
51
+ * ```typescript
52
+ * import { AzureBlobStore } from '@mastra/azure/blob';
53
+ *
54
+ * const blobs = new AzureBlobStore({
55
+ * container: 'my-skill-blobs',
56
+ * accountName: process.env.AZURE_STORAGE_ACCOUNT_NAME!,
57
+ * accountKey: process.env.AZURE_STORAGE_ACCOUNT_KEY!,
58
+ * });
59
+ * ```
60
+ */
61
+ export declare class AzureBlobStore extends BlobStore {
62
+ private readonly containerName;
63
+ private readonly accountName?;
64
+ private readonly accountKey?;
65
+ private readonly sasToken?;
66
+ private readonly connectionString?;
67
+ private readonly useDefaultCredential;
68
+ private readonly endpoint?;
69
+ private readonly prefix;
70
+ private _containerClient;
71
+ constructor(options: AzureBlobStoreOptions);
72
+ private getContainerClient;
73
+ private toKey;
74
+ init(): Promise<void>;
75
+ put(entry: StorageBlobEntry): Promise<void>;
76
+ get(hash: string): Promise<StorageBlobEntry | null>;
77
+ has(hash: string): Promise<boolean>;
78
+ delete(hash: string): Promise<boolean>;
79
+ putMany(entries: StorageBlobEntry[]): Promise<void>;
80
+ getMany(hashes: string[]): Promise<Map<string, StorageBlobEntry>>;
81
+ dangerouslyClearAll(): Promise<void>;
82
+ private deleteBlobBatch;
83
+ }
84
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/blob/blob-store/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,gCAAgC;IAChC,SAAS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,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAOtC,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAOnD,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAajE,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;YAiB5B,eAAe;CAI9B"}
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Azure Blob Storage Filesystem Provider
3
+ *
4
+ * A filesystem implementation backed by Azure Blob Storage.
5
+ */
6
+ import type { ContainerClient } from '@azure/storage-blob';
7
+ import type { FileContent, FileStat, FileEntry, ReadOptions, WriteOptions, ListOptions, RemoveOptions, CopyOptions, FilesystemInfo, FilesystemMountConfig, FilesystemIcon, ProviderStatus, MastraFilesystemOptions } from '@mastra/core/workspace';
8
+ import { MastraFilesystem } from '@mastra/core/workspace';
9
+ /**
10
+ * Azure Blob mount configuration.
11
+ * Returned by AzureBlobFilesystem.getMountConfig() for FUSE mounting in sandboxes.
12
+ */
13
+ export interface AzureBlobMountConfig extends FilesystemMountConfig {
14
+ type: 'azure-blob';
15
+ container: string;
16
+ accountName?: string;
17
+ accountKey?: string;
18
+ sasToken?: string;
19
+ connectionString?: string;
20
+ useDefaultCredential?: boolean;
21
+ endpoint?: string;
22
+ prefix?: string;
23
+ readOnly?: boolean;
24
+ }
25
+ export interface AzureBlobFilesystemOptions extends MastraFilesystemOptions {
26
+ /** Unique identifier for this filesystem instance */
27
+ id?: string;
28
+ /** Azure Blob container name */
29
+ container: string;
30
+ /** Human-friendly display name for the UI */
31
+ displayName?: string;
32
+ /** Icon identifier for the UI (defaults to 'azure-blob') */
33
+ icon?: FilesystemIcon;
34
+ /** Description shown in tooltips */
35
+ description?: string;
36
+ /** Storage account name (required unless using connectionString) */
37
+ accountName?: string;
38
+ /** Storage account key */
39
+ accountKey?: string;
40
+ /** SAS token for authentication */
41
+ sasToken?: string;
42
+ /** Full connection string (takes priority over accountName/accountKey) */
43
+ connectionString?: string;
44
+ /**
45
+ * Use DefaultAzureCredential from @azure/identity for authentication.
46
+ * Supports Managed Identity, Azure CLI, environment variables, etc.
47
+ * Requires @azure/identity to be installed as a peer dependency.
48
+ */
49
+ useDefaultCredential?: boolean;
50
+ /** Optional prefix for all keys (acts like a subdirectory) */
51
+ prefix?: string;
52
+ /** Mount as read-only (blocks write operations, mounts read-only in sandboxes) */
53
+ readOnly?: boolean;
54
+ /**
55
+ * Custom endpoint URL.
56
+ * Used for local development with Azurite emulator.
57
+ */
58
+ endpoint?: string;
59
+ }
60
+ export declare class AzureBlobFilesystem extends MastraFilesystem {
61
+ readonly id: string;
62
+ readonly name = "AzureBlobFilesystem";
63
+ readonly provider = "azure-blob";
64
+ readonly readOnly?: boolean;
65
+ status: ProviderStatus;
66
+ readonly displayName?: string;
67
+ readonly icon: FilesystemIcon;
68
+ readonly description?: string;
69
+ private readonly containerName;
70
+ private readonly accountName?;
71
+ private readonly accountKey?;
72
+ private readonly sasToken?;
73
+ private readonly connectionString?;
74
+ private readonly useDefaultCredential;
75
+ private readonly prefix;
76
+ private readonly endpoint?;
77
+ private _containerClient;
78
+ constructor(options: AzureBlobFilesystemOptions);
79
+ /**
80
+ * Get the underlying ContainerClient for direct access to Azure Blob APIs.
81
+ *
82
+ * Use this when you need features not exposed through the WorkspaceFilesystem
83
+ * interface (e.g., SAS URL generation, lease management, etc.).
84
+ *
85
+ * This is async because DefaultAzureCredential requires a dynamic import.
86
+ * For non-DefaultAzureCredential auth methods, the promise resolves immediately.
87
+ */
88
+ getContainer(): Promise<ContainerClient>;
89
+ getMountConfig(): AzureBlobMountConfig;
90
+ getInfo(): FilesystemInfo<{
91
+ container: string;
92
+ endpoint?: string;
93
+ prefix?: string;
94
+ }>;
95
+ getInstructions(): string;
96
+ private getContainerClient;
97
+ private getReadyContainer;
98
+ private toKey;
99
+ private handleError;
100
+ private assertWritable;
101
+ readFile(path: string, options?: ReadOptions): Promise<string | Buffer>;
102
+ writeFile(path: string, content: FileContent, options?: WriteOptions): Promise<void>;
103
+ appendFile(path: string, content: FileContent): Promise<void>;
104
+ deleteFile(path: string, options?: RemoveOptions): Promise<void>;
105
+ copyFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
106
+ moveFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
107
+ mkdir(_path: string, _options?: {
108
+ recursive?: boolean;
109
+ }): Promise<void>;
110
+ rmdir(path: string, options?: RemoveOptions): Promise<void>;
111
+ private deleteBlobBatch;
112
+ readdir(path: string, options?: ListOptions): Promise<FileEntry[]>;
113
+ exists(path: string): Promise<boolean>;
114
+ stat(path: string): Promise<FileStat>;
115
+ isFile(path: string): Promise<boolean>;
116
+ isDirectory(path: string): Promise<boolean>;
117
+ init(): Promise<void>;
118
+ destroy(): Promise<void>;
119
+ }
120
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/blob/filesystem/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAa,MAAM,qBAAqB,CAAC;AAEtE,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACb,WAAW,EACX,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAuD,MAAM,wBAAwB,CAAC;AAE/G;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,qBAAqB;IACjE,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,E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_cjs.AzureBlobFilesystem; }
10
+ });
11
+ Object.defineProperty(exports, "AzureBlobStore", {
12
+ enumerable: true,
13
+ get: function () { return chunk74CBJSIM_cjs.AzureBlobStore; }
14
+ });
15
+ Object.defineProperty(exports, "azureBlobFilesystemProvider", {
16
+ enumerable: true,
17
+ get: function () { return chunk74CBJSIM_cjs.azureBlobFilesystemProvider; }
18
+ });
19
+ Object.defineProperty(exports, "azureBlobStoreProvider", {
20
+ enumerable: true,
21
+ get: function () { return chunk74CBJSIM_cjs.azureBlobStoreProvider; }
22
+ });
23
+ //# sourceMappingURL=index.cjs.map
24
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @mastra/azure/blob - Azure Blob Storage Filesystem & Blob Store Provider
3
+ *
4
+ * A filesystem and content-addressable blob store backed by Azure Blob Storage.
5
+ */
6
+ export { AzureBlobFilesystem, type AzureBlobFilesystemOptions, type AzureBlobMountConfig } from './filesystem/index.js';
7
+ export { AzureBlobStore, type AzureBlobStoreOptions } from './blob-store/index.js';
8
+ export { azureBlobFilesystemProvider, azureBlobStoreProvider } from './provider.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blob/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,KAAK,0BAA0B,EAAE,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC/G,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { AzureBlobFilesystem, AzureBlobStore, azureBlobFilesystemProvider, azureBlobStoreProvider } from '../chunk-T7WJTVIJ.js';
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,6 @@
1
+ import type { BlobStoreProvider, FilesystemProvider } from '@mastra/core/editor';
2
+ import type { AzureBlobStoreOptions } from './blob-store/index.js';
3
+ import type { AzureBlobFilesystemOptions } from './filesystem/index.js';
4
+ export declare const azureBlobFilesystemProvider: FilesystemProvider<AzureBlobFilesystemOptions>;
5
+ export declare const azureBlobStoreProvider: BlobStoreProvider<AzureBlobStoreOptions>;
6
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/blob/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE/D,eAAO,MAAM,2BAA2B,EAAE,kBAAkB,CAAC,0BAA0B,CAwBtF,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,qBAAqB,CAuB3E,CAAC"}