@microsoft/agents-hosting 1.9.0-beta.3.gb2d23c1c44 → 1.9.1
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/README.md +182 -4
- package/dist/package.json +3 -3
- package/dist/src/app/agentApplication.d.ts +4 -3
- package/dist/src/app/agentApplication.js +24 -21
- package/dist/src/app/agentApplication.js.map +1 -1
- package/dist/src/app/agentApplicationBuilder.d.ts +9 -2
- package/dist/src/app/agentApplicationBuilder.js +9 -0
- package/dist/src/app/agentApplicationBuilder.js.map +1 -1
- package/dist/src/app/agentApplicationOptions.d.ts +16 -4
- package/dist/src/app/auth/authorization.d.ts +54 -0
- package/dist/src/app/auth/authorization.js +63 -2
- package/dist/src/app/auth/authorization.js.map +1 -1
- package/dist/src/app/auth/authorizationManager.d.ts +0 -8
- package/dist/src/app/auth/authorizationManager.js +104 -178
- package/dist/src/app/auth/authorizationManager.js.map +1 -1
- package/dist/src/app/auth/handlerStorage.d.ts +5 -3
- package/dist/src/app/auth/handlerStorage.js +36 -10
- package/dist/src/app/auth/handlerStorage.js.map +1 -1
- package/dist/src/app/auth/types.d.ts +2 -2
- package/dist/src/app/index.d.ts +1 -0
- package/dist/src/app/proactive/proactive.js +10 -6
- package/dist/src/app/proactive/proactive.js.map +1 -1
- package/dist/src/app/proactive/proactiveOptions.d.ts +2 -2
- package/dist/src/app/rateLimit.d.ts +315 -0
- package/dist/src/app/rateLimit.js +333 -0
- package/dist/src/app/rateLimit.js.map +1 -0
- package/dist/src/app/turnState.d.ts +6 -3
- package/dist/src/app/turnState.js +43 -4
- package/dist/src/app/turnState.js.map +1 -1
- package/dist/src/auth/authConfiguration.d.ts +10 -3
- package/dist/src/auth/authConfiguration.js +292 -259
- package/dist/src/auth/authConfiguration.js.map +1 -1
- package/dist/src/auth/delegatedTokenCredential.d.ts +29 -0
- package/dist/src/auth/delegatedTokenCredential.js +49 -0
- package/dist/src/auth/delegatedTokenCredential.js.map +1 -0
- package/dist/src/auth/msal/msalTokenCredential.js +1 -1
- package/dist/src/auth/msal/msalTokenCredential.js.map +1 -1
- package/dist/src/auth/settings.d.ts +8 -70
- package/dist/src/auth/settings.js +5 -67
- package/dist/src/auth/settings.js.map +1 -1
- package/dist/src/cloudAdapter.d.ts +5 -0
- package/dist/src/cloudAdapter.js +13 -103
- package/dist/src/cloudAdapter.js.map +1 -1
- package/dist/src/configuration/botFrameworkEnvironmentCompatibility.d.ts +23 -0
- package/dist/src/configuration/botFrameworkEnvironmentCompatibility.js +183 -0
- package/dist/src/configuration/botFrameworkEnvironmentCompatibility.js.map +1 -0
- package/dist/src/configuration/configuration.d.ts +83 -0
- package/dist/src/configuration/configuration.js +836 -0
- package/dist/src/configuration/configuration.js.map +1 -0
- package/dist/src/configuration/configurationSource.d.ts +57 -0
- package/dist/src/configuration/configurationSource.js +7 -0
- package/dist/src/configuration/configurationSource.js.map +1 -0
- package/dist/src/configuration/environmentConfiguration.d.ts +14 -0
- package/dist/src/configuration/environmentConfiguration.js +271 -0
- package/dist/src/configuration/environmentConfiguration.js.map +1 -0
- package/dist/src/configuration/index.d.ts +7 -0
- package/dist/src/configuration/index.js +14 -0
- package/dist/src/configuration/index.js.map +1 -0
- package/dist/src/configuration/jsonFileConfigurationSource.d.ts +15 -0
- package/dist/src/configuration/jsonFileConfigurationSource.js +58 -0
- package/dist/src/configuration/jsonFileConfigurationSource.js.map +1 -0
- package/dist/src/createCloudAdapter.d.ts +30 -5
- package/dist/src/createCloudAdapter.js +17 -10
- package/dist/src/createCloudAdapter.js.map +1 -1
- package/dist/src/errorHelper.js +124 -5
- package/dist/src/errorHelper.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/observability/traces.d.ts +6 -4
- package/dist/src/observability/traces.js +10 -9
- package/dist/src/observability/traces.js.map +1 -1
- package/dist/src/outboundHostValidator.d.ts +4 -1
- package/dist/src/outboundHostValidator.js +25 -48
- package/dist/src/outboundHostValidator.js.map +1 -1
- package/dist/src/state/agentState.d.ts +8 -3
- package/dist/src/state/agentState.js +26 -8
- package/dist/src/state/agentState.js.map +1 -1
- package/dist/src/state/conversationState.d.ts +2 -2
- package/dist/src/state/conversationState.js.map +1 -1
- package/dist/src/state/userState.d.ts +2 -2
- package/dist/src/state/userState.js.map +1 -1
- package/dist/src/statusCodes.d.ts +5 -0
- package/dist/src/statusCodes.js +5 -0
- package/dist/src/statusCodes.js.map +1 -1
- package/dist/src/storage/fileStorage.d.ts +83 -68
- package/dist/src/storage/fileStorage.js +279 -105
- package/dist/src/storage/fileStorage.js.map +1 -1
- package/dist/src/storage/index.d.ts +1 -0
- package/dist/src/storage/index.js +1 -0
- package/dist/src/storage/index.js.map +1 -1
- package/dist/src/storage/memoryStorage.d.ts +85 -60
- package/dist/src/storage/memoryStorage.js +244 -87
- package/dist/src/storage/memoryStorage.js.map +1 -1
- package/dist/src/storage/storage.d.ts +100 -2
- package/dist/src/storage/storage.js +25 -0
- package/dist/src/storage/storage.js.map +1 -1
- package/dist/src/storage/storageCompatibility.d.ts +17 -0
- package/dist/src/storage/storageCompatibility.js +157 -0
- package/dist/src/storage/storageCompatibility.js.map +1 -0
- package/dist/src/storage/storageExpiry.d.ts +6 -0
- package/dist/src/storage/storageExpiry.js +20 -0
- package/dist/src/storage/storageExpiry.js.map +1 -0
- package/dist/src/utils/env.d.ts +43 -0
- package/dist/src/utils/env.js +42 -6
- package/dist/src/utils/env.js.map +1 -1
- package/dist/src/utils.d.ts +1 -0
- package/dist/src/utils.js +10 -1
- package/dist/src/utils.js.map +1 -1
- package/package.json +3 -3
- package/src/app/agentApplication.ts +27 -14
- package/src/app/agentApplicationBuilder.ts +13 -2
- package/src/app/agentApplicationOptions.ts +18 -4
- package/src/app/auth/authorization.ts +67 -2
- package/src/app/auth/authorizationManager.ts +126 -204
- package/src/app/auth/handlerStorage.ts +51 -7
- package/src/app/auth/types.ts +2 -2
- package/src/app/index.ts +7 -0
- package/src/app/proactive/proactive.ts +19 -9
- package/src/app/proactive/proactiveOptions.ts +2 -2
- package/src/app/rateLimit.ts +659 -0
- package/src/app/turnState.ts +50 -7
- package/src/auth/authConfiguration.ts +415 -260
- package/src/auth/delegatedTokenCredential.ts +49 -0
- package/src/auth/msal/msalTokenCredential.ts +1 -1
- package/src/auth/settings.ts +5 -82
- package/src/cloudAdapter.ts +38 -113
- package/src/configuration/botFrameworkEnvironmentCompatibility.ts +245 -0
- package/src/configuration/configuration.ts +1076 -0
- package/src/configuration/configurationSource.ts +76 -0
- package/src/configuration/environmentConfiguration.ts +377 -0
- package/src/configuration/index.ts +19 -0
- package/src/configuration/jsonFileConfigurationSource.ts +74 -0
- package/src/createCloudAdapter.ts +52 -9
- package/src/errorHelper.ts +151 -5
- package/src/index.ts +1 -0
- package/src/observability/traces.ts +8 -7
- package/src/outboundHostValidator.ts +37 -44
- package/src/state/agentState.ts +39 -13
- package/src/state/conversationState.ts +2 -2
- package/src/state/userState.ts +2 -2
- package/src/statusCodes.ts +6 -0
- package/src/storage/fileStorage.ts +299 -106
- package/src/storage/index.ts +1 -0
- package/src/storage/memoryStorage.ts +268 -85
- package/src/storage/storage.ts +114 -2
- package/src/storage/storageCompatibility.ts +185 -0
- package/src/storage/storageExpiry.ts +21 -0
- package/src/utils/env.ts +63 -0
- package/src/utils.ts +10 -0
|
@@ -2,89 +2,114 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { Storage, StoreItem } from './storage';
|
|
5
|
+
import { StorageDeleteOptions, StorageDeleteResults, StorageReadResults, StorageWriteOptions, StorageWriteResults, Storage, StorageV2, StoreItem } from './storage';
|
|
6
|
+
interface MemoryStorageState {
|
|
7
|
+
memory: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
versions: {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
};
|
|
13
|
+
expirations: {
|
|
14
|
+
[key: string]: number;
|
|
15
|
+
};
|
|
16
|
+
etag: number;
|
|
17
|
+
}
|
|
18
|
+
declare class MemoryStorageInternals {
|
|
19
|
+
private static readonly states;
|
|
20
|
+
readonly state: MemoryStorageState;
|
|
21
|
+
/**
|
|
22
|
+
* Creates an internal in-memory provider for the selected storage contract.
|
|
23
|
+
*/
|
|
24
|
+
constructor(memory?: {
|
|
25
|
+
[key: string]: string;
|
|
26
|
+
});
|
|
27
|
+
save(key: string, item: unknown, expiresAt?: number): string;
|
|
28
|
+
getVersion(key: string, value: StoreItem): string | undefined;
|
|
29
|
+
isExpired(key: string): boolean;
|
|
30
|
+
remove(key: string): void;
|
|
31
|
+
}
|
|
6
32
|
/**
|
|
7
|
-
* A simple in-memory storage provider
|
|
33
|
+
* A simple in-memory storage provider for development and testing.
|
|
8
34
|
*
|
|
9
|
-
* @
|
|
10
|
-
*
|
|
11
|
-
* which means data is lost when the process terminates. It's primarily useful for:
|
|
12
|
-
* - Development and testing scenarios
|
|
13
|
-
* - Simple applications that don't require data persistence across restarts
|
|
14
|
-
* - Stateless environments where external storage isn't available
|
|
15
|
-
*
|
|
16
|
-
* MemoryStorage supports optimistic concurrency control through eTags and
|
|
17
|
-
* can be used as a singleton through the {@link MemoryStorage.getSingleInstance | getSingleInstance() method} to
|
|
18
|
-
* share state across different parts of an application.
|
|
35
|
+
* This class implements the legacy {@link Storage} contract. Use
|
|
36
|
+
* {@link MemoryStorageV2} for the structured StorageV2 contract.
|
|
19
37
|
*/
|
|
20
|
-
export declare class MemoryStorage implements Storage {
|
|
21
|
-
private memory;
|
|
38
|
+
export declare class MemoryStorage extends MemoryStorageInternals implements Storage {
|
|
22
39
|
private static instance;
|
|
40
|
+
constructor(memory?: {
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
});
|
|
23
43
|
/**
|
|
24
|
-
*
|
|
44
|
+
* Reads legacy items from process-local memory.
|
|
45
|
+
*
|
|
46
|
+
* @param keys The keys to read; must not be empty.
|
|
47
|
+
* @returns Existing items keyed by storage key. Missing keys are omitted and returned items
|
|
48
|
+
* include their legacy `eTag`.
|
|
25
49
|
*/
|
|
26
|
-
|
|
50
|
+
read(keys: string[]): Promise<StoreItem>;
|
|
27
51
|
/**
|
|
28
|
-
*
|
|
52
|
+
* Writes legacy items to process-local memory.
|
|
29
53
|
*
|
|
30
|
-
* @param
|
|
54
|
+
* @param changes The items to write, keyed by storage key.
|
|
55
|
+
* @throws If `changes` is invalid or an item supplies a stale legacy `eTag`.
|
|
31
56
|
*/
|
|
32
|
-
|
|
33
|
-
[k: string]: string;
|
|
34
|
-
});
|
|
57
|
+
write(changes: StoreItem): Promise<void>;
|
|
35
58
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @returns The singleton instance of MemoryStorage
|
|
39
|
-
*
|
|
40
|
-
* @remarks
|
|
41
|
-
* Using this method ensures that the same storage instance is used across
|
|
42
|
-
* the application, allowing for shared state without passing references.
|
|
59
|
+
* Deletes legacy items from process-local memory.
|
|
43
60
|
*
|
|
61
|
+
* @param keys The keys to delete. Missing keys are ignored.
|
|
44
62
|
*/
|
|
63
|
+
delete(keys: string[]): Promise<void>;
|
|
45
64
|
static getSingleInstance(): MemoryStorage;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* An in-memory provider for the structured {@link StorageV2} contract.
|
|
68
|
+
*
|
|
69
|
+
* Unlike {@link MemoryStorage}, every read returns an outcome for every requested key, and every
|
|
70
|
+
* write and delete returns an outcome for every supplied key. Storage versions are returned
|
|
71
|
+
* separately from application values, so an `eTag` property in a value is preserved. Use
|
|
72
|
+
* {@link StorageWriteMode.CreateOnly}, {@link StorageWriteMode.Replace}, or `expectedVersion` to
|
|
73
|
+
* guard concurrent writes.
|
|
74
|
+
*
|
|
75
|
+
* This provider is intended for development and testing only; state is process-local.
|
|
76
|
+
*/
|
|
77
|
+
export declare class MemoryStorageV2 extends StorageV2 {
|
|
78
|
+
private static instance;
|
|
79
|
+
private readonly internals;
|
|
46
80
|
/**
|
|
47
|
-
*
|
|
81
|
+
* Creates a V2 in-memory storage provider.
|
|
48
82
|
*
|
|
49
|
-
* @param
|
|
50
|
-
* @returns A promise that resolves to the read items
|
|
51
|
-
* @throws Will throw an error if keys are not provided or the array is empty
|
|
83
|
+
* @param memory Optional backing store to share with another in-memory storage instance.
|
|
52
84
|
*/
|
|
53
|
-
|
|
85
|
+
constructor(memory?: {
|
|
86
|
+
[key: string]: string;
|
|
87
|
+
});
|
|
54
88
|
/**
|
|
55
|
-
*
|
|
89
|
+
* Reads items from process-local memory.
|
|
56
90
|
*
|
|
57
|
-
* @param
|
|
58
|
-
* @returns A
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* @remarks
|
|
62
|
-
* This method supports optimistic concurrency control through eTags.
|
|
63
|
-
* If an item has an eTag, it will only be updated if the existing item
|
|
64
|
-
* has the same eTag. If an item has an eTag of '*' or no eTag, it will
|
|
65
|
-
* always be written regardless of the current state.
|
|
91
|
+
* @param keys The keys to read. Empty batches are valid.
|
|
92
|
+
* @returns A result for every key, with `notFound` for missing items and a separate storage
|
|
93
|
+
* version for successful reads.
|
|
66
94
|
*/
|
|
67
|
-
|
|
95
|
+
read<T extends object = Record<string, unknown>>(keys: string[]): Promise<StorageReadResults<T>>;
|
|
68
96
|
/**
|
|
69
|
-
*
|
|
97
|
+
* Writes items to process-local memory with optional concurrency conditions.
|
|
70
98
|
*
|
|
71
|
-
* @param
|
|
72
|
-
* @
|
|
99
|
+
* @param changes The values to write, keyed by storage key.
|
|
100
|
+
* @param options Create-only, replace, or expected-version conditions.
|
|
101
|
+
* @returns A result for every supplied key, including `conflict` or `conditionNotMet` when a
|
|
102
|
+
* condition cannot be satisfied.
|
|
73
103
|
*/
|
|
74
|
-
|
|
104
|
+
write<T extends object = Record<string, unknown>>(changes: Record<string, T>, options?: StorageWriteOptions): Promise<StorageWriteResults>;
|
|
75
105
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* @param key The key of the item to save
|
|
79
|
-
* @param item The item to save
|
|
80
|
-
*
|
|
81
|
-
* @remarks
|
|
82
|
-
* This private method handles the details of:
|
|
83
|
-
* - Creating a clone of the item to prevent modification of the original
|
|
84
|
-
* - Generating a new eTag for optimistic concurrency control
|
|
85
|
-
* - Converting the item to a JSON string for storage
|
|
106
|
+
* Deletes items from process-local memory with an optional version condition.
|
|
86
107
|
*
|
|
87
|
-
* @
|
|
108
|
+
* @param keys The keys to delete. Empty batches are valid.
|
|
109
|
+
* @param options An optional expected storage version.
|
|
110
|
+
* @returns A result for every supplied key.
|
|
88
111
|
*/
|
|
89
|
-
|
|
112
|
+
delete(keys: string[], options?: StorageDeleteOptions): Promise<StorageDeleteResults>;
|
|
113
|
+
static getSingleInstance(): MemoryStorageV2;
|
|
90
114
|
}
|
|
115
|
+
export {};
|
|
@@ -4,62 +4,67 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.MemoryStorage = void 0;
|
|
8
|
-
const agents_telemetry_1 = require("@microsoft/agents-telemetry");
|
|
7
|
+
exports.MemoryStorageV2 = exports.MemoryStorage = void 0;
|
|
9
8
|
const agents_activity_1 = require("@microsoft/agents-activity");
|
|
10
|
-
const
|
|
11
|
-
const agents_telemetry_2 = require("@microsoft/agents-telemetry");
|
|
9
|
+
const agents_telemetry_1 = require("@microsoft/agents-telemetry");
|
|
12
10
|
const errorHelper_1 = require("../errorHelper");
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* This class provides a volatile storage solution that keeps data in memory,
|
|
19
|
-
* which means data is lost when the process terminates. It's primarily useful for:
|
|
20
|
-
* - Development and testing scenarios
|
|
21
|
-
* - Simple applications that don't require data persistence across restarts
|
|
22
|
-
* - Stateless environments where external storage isn't available
|
|
23
|
-
*
|
|
24
|
-
* MemoryStorage supports optimistic concurrency control through eTags and
|
|
25
|
-
* can be used as a singleton through the {@link MemoryStorage.getSingleInstance | getSingleInstance() method} to
|
|
26
|
-
* share state across different parts of an application.
|
|
27
|
-
*/
|
|
28
|
-
class MemoryStorage {
|
|
11
|
+
const observability_1 = require("../observability");
|
|
12
|
+
const storageExpiry_1 = require("./storageExpiry");
|
|
13
|
+
const storage_1 = require("./storage");
|
|
14
|
+
const logger = (0, agents_telemetry_1.debug)('agents:memory-storage');
|
|
15
|
+
class MemoryStorageInternals {
|
|
29
16
|
/**
|
|
30
|
-
* Creates
|
|
31
|
-
*
|
|
32
|
-
* @param memory An optional initial memory store to seed the storage with data
|
|
17
|
+
* Creates an internal in-memory provider for the selected storage contract.
|
|
33
18
|
*/
|
|
34
19
|
constructor(memory = {}) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
this.etag = 1;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Gets a single shared instance of the MemoryStorage class.
|
|
43
|
-
*
|
|
44
|
-
* @returns The singleton instance of MemoryStorage
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* Using this method ensures that the same storage instance is used across
|
|
48
|
-
* the application, allowing for shared state without passing references.
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
static getSingleInstance() {
|
|
52
|
-
if (!MemoryStorage.instance) {
|
|
53
|
-
MemoryStorage.instance = new MemoryStorage();
|
|
20
|
+
let state = MemoryStorageInternals.states.get(memory);
|
|
21
|
+
if (!state) {
|
|
22
|
+
state = { memory, versions: {}, expirations: {}, etag: getNextETag(memory) };
|
|
23
|
+
MemoryStorageInternals.states.set(memory, state);
|
|
54
24
|
}
|
|
55
|
-
|
|
25
|
+
this.state = state;
|
|
26
|
+
}
|
|
27
|
+
save(key, item, expiresAt) {
|
|
28
|
+
const version = (this.state.etag++).toString();
|
|
29
|
+
this.state.memory[key] = JSON.stringify(item);
|
|
30
|
+
this.state.versions[key] = version;
|
|
31
|
+
if (expiresAt === undefined)
|
|
32
|
+
delete this.state.expirations[key];
|
|
33
|
+
else
|
|
34
|
+
this.state.expirations[key] = expiresAt;
|
|
35
|
+
return version;
|
|
36
|
+
}
|
|
37
|
+
getVersion(key, value) {
|
|
38
|
+
var _a;
|
|
39
|
+
return (_a = this.state.versions[key]) !== null && _a !== void 0 ? _a : value.eTag;
|
|
40
|
+
}
|
|
41
|
+
isExpired(key) {
|
|
42
|
+
const expiresAt = this.state.expirations[key];
|
|
43
|
+
return expiresAt !== undefined && expiresAt <= Date.now();
|
|
44
|
+
}
|
|
45
|
+
remove(key) {
|
|
46
|
+
delete this.state.memory[key];
|
|
47
|
+
delete this.state.versions[key];
|
|
48
|
+
delete this.state.expirations[key];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
MemoryStorageInternals.states = new WeakMap();
|
|
52
|
+
/**
|
|
53
|
+
* A simple in-memory storage provider for development and testing.
|
|
54
|
+
*
|
|
55
|
+
* This class implements the legacy {@link Storage} contract. Use
|
|
56
|
+
* {@link MemoryStorageV2} for the structured StorageV2 contract.
|
|
57
|
+
*/
|
|
58
|
+
class MemoryStorage extends MemoryStorageInternals {
|
|
59
|
+
constructor(memory = {}) {
|
|
60
|
+
super(memory);
|
|
56
61
|
}
|
|
57
62
|
/**
|
|
58
|
-
* Reads
|
|
63
|
+
* Reads legacy items from process-local memory.
|
|
59
64
|
*
|
|
60
|
-
* @param keys The keys
|
|
61
|
-
* @returns
|
|
62
|
-
*
|
|
65
|
+
* @param keys The keys to read; must not be empty.
|
|
66
|
+
* @returns Existing items keyed by storage key. Missing keys are omitted and returned items
|
|
67
|
+
* include their legacy `eTag`.
|
|
63
68
|
*/
|
|
64
69
|
async read(keys) {
|
|
65
70
|
return (0, agents_telemetry_1.trace)(observability_1.StorageTraceDefinitions.read, async ({ record }) => {
|
|
@@ -70,84 +75,236 @@ class MemoryStorage {
|
|
|
70
75
|
const data = {};
|
|
71
76
|
for (const key of keys) {
|
|
72
77
|
logger.debug(`Reading key: ${key}`);
|
|
73
|
-
const item = this.memory[key];
|
|
78
|
+
const item = this.state.memory[key];
|
|
74
79
|
if (item) {
|
|
75
|
-
|
|
80
|
+
const value = JSON.parse(item);
|
|
81
|
+
const version = this.getVersion(key, value);
|
|
82
|
+
data[key] = version === undefined ? value : { ...value, eTag: version };
|
|
76
83
|
}
|
|
77
84
|
}
|
|
78
85
|
return data;
|
|
79
86
|
});
|
|
80
87
|
}
|
|
81
88
|
/**
|
|
82
|
-
* Writes
|
|
89
|
+
* Writes legacy items to process-local memory.
|
|
83
90
|
*
|
|
84
|
-
* @param changes The items to write,
|
|
85
|
-
* @
|
|
86
|
-
* @throws Will throw an error if changes are not provided or if there's an eTag conflict
|
|
87
|
-
*
|
|
88
|
-
* @remarks
|
|
89
|
-
* This method supports optimistic concurrency control through eTags.
|
|
90
|
-
* If an item has an eTag, it will only be updated if the existing item
|
|
91
|
-
* has the same eTag. If an item has an eTag of '*' or no eTag, it will
|
|
92
|
-
* always be written regardless of the current state.
|
|
91
|
+
* @param changes The items to write, keyed by storage key.
|
|
92
|
+
* @throws If `changes` is invalid or an item supplies a stale legacy `eTag`.
|
|
93
93
|
*/
|
|
94
94
|
async write(changes) {
|
|
95
95
|
return (0, agents_telemetry_1.trace)(observability_1.StorageTraceDefinitions.write, async ({ record }) => {
|
|
96
|
-
|
|
96
|
+
record({ keyCount: changes ? Object.keys(changes).length : undefined });
|
|
97
|
+
if (!changes || typeof changes !== 'object' || Array.isArray(changes)) {
|
|
97
98
|
throw agents_activity_1.ExceptionHelper.generateException(ReferenceError, errorHelper_1.Errors.StorageWriteChangesRequired);
|
|
98
99
|
}
|
|
99
|
-
record({ keyCount: changes.length });
|
|
100
100
|
for (const [key, newItem] of Object.entries(changes)) {
|
|
101
101
|
logger.debug(`Writing key: ${key}`);
|
|
102
|
-
const oldItemStr = this.memory[key];
|
|
102
|
+
const oldItemStr = this.state.memory[key];
|
|
103
103
|
if (!oldItemStr || newItem.eTag === '*' || !newItem.eTag) {
|
|
104
|
-
|
|
104
|
+
const { eTag: _eTag, ...value } = newItem;
|
|
105
|
+
this.save(key, { ...value, eTag: (this.state.etag).toString() });
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const oldItem = JSON.parse(oldItemStr);
|
|
109
|
+
if (newItem.eTag === this.getVersion(key, oldItem)) {
|
|
110
|
+
const { eTag: _eTag, ...value } = newItem;
|
|
111
|
+
this.save(key, { ...value, eTag: (this.state.etag).toString() });
|
|
105
112
|
}
|
|
106
113
|
else {
|
|
107
|
-
|
|
108
|
-
if (newItem.eTag === oldItem.eTag) {
|
|
109
|
-
this.saveItem(key, newItem);
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
throw agents_activity_1.ExceptionHelper.generateException(Error, errorHelper_1.Errors.StorageETagConflict, undefined, { key });
|
|
113
|
-
}
|
|
114
|
+
throw agents_activity_1.ExceptionHelper.generateException(Error, errorHelper_1.Errors.StorageETagConflict, undefined, { key });
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
});
|
|
117
118
|
}
|
|
118
119
|
/**
|
|
119
|
-
* Deletes
|
|
120
|
+
* Deletes legacy items from process-local memory.
|
|
120
121
|
*
|
|
121
|
-
* @param keys The keys
|
|
122
|
-
* @returns A promise that resolves when the delete operation is complete
|
|
122
|
+
* @param keys The keys to delete. Missing keys are ignored.
|
|
123
123
|
*/
|
|
124
124
|
async delete(keys) {
|
|
125
125
|
return (0, agents_telemetry_1.trace)(observability_1.StorageTraceDefinitions.delete, async ({ record }) => {
|
|
126
126
|
record({ keyCount: keys === null || keys === void 0 ? void 0 : keys.length });
|
|
127
127
|
logger.debug(`Deleting keys: ${keys.join(', ')}`);
|
|
128
128
|
for (const key of keys) {
|
|
129
|
-
|
|
129
|
+
this.remove(key);
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
+
static getSingleInstance() {
|
|
134
|
+
if (!MemoryStorage.instance)
|
|
135
|
+
MemoryStorage.instance = new MemoryStorage();
|
|
136
|
+
return MemoryStorage.instance;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.MemoryStorage = MemoryStorage;
|
|
140
|
+
/**
|
|
141
|
+
* An in-memory provider for the structured {@link StorageV2} contract.
|
|
142
|
+
*
|
|
143
|
+
* Unlike {@link MemoryStorage}, every read returns an outcome for every requested key, and every
|
|
144
|
+
* write and delete returns an outcome for every supplied key. Storage versions are returned
|
|
145
|
+
* separately from application values, so an `eTag` property in a value is preserved. Use
|
|
146
|
+
* {@link StorageWriteMode.CreateOnly}, {@link StorageWriteMode.Replace}, or `expectedVersion` to
|
|
147
|
+
* guard concurrent writes.
|
|
148
|
+
*
|
|
149
|
+
* This provider is intended for development and testing only; state is process-local.
|
|
150
|
+
*/
|
|
151
|
+
class MemoryStorageV2 extends storage_1.StorageV2 {
|
|
133
152
|
/**
|
|
134
|
-
*
|
|
153
|
+
* Creates a V2 in-memory storage provider.
|
|
135
154
|
*
|
|
136
|
-
* @param
|
|
137
|
-
|
|
155
|
+
* @param memory Optional backing store to share with another in-memory storage instance.
|
|
156
|
+
*/
|
|
157
|
+
constructor(memory = {}) {
|
|
158
|
+
super();
|
|
159
|
+
this.internals = new MemoryStorageInternals(memory);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Reads items from process-local memory.
|
|
138
163
|
*
|
|
139
|
-
* @
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
|
|
143
|
-
|
|
164
|
+
* @param keys The keys to read. Empty batches are valid.
|
|
165
|
+
* @returns A result for every key, with `notFound` for missing items and a separate storage
|
|
166
|
+
* version for successful reads.
|
|
167
|
+
*/
|
|
168
|
+
async read(keys) {
|
|
169
|
+
return (0, agents_telemetry_1.trace)(observability_1.StorageTraceDefinitions.read, async ({ record }) => {
|
|
170
|
+
record({ keyCount: keys === null || keys === void 0 ? void 0 : keys.length });
|
|
171
|
+
if (!Array.isArray(keys)) {
|
|
172
|
+
throw agents_activity_1.ExceptionHelper.generateException(ReferenceError, errorHelper_1.Errors.StorageReadKeysRequired);
|
|
173
|
+
}
|
|
174
|
+
if (keys.some(key => typeof key !== 'string' || key.trim() === '')) {
|
|
175
|
+
throw agents_activity_1.ExceptionHelper.generateException(ReferenceError, errorHelper_1.Errors.StorageV2KeyRequired);
|
|
176
|
+
}
|
|
177
|
+
const results = {};
|
|
178
|
+
for (const key of keys) {
|
|
179
|
+
logger.debug(`Reading key: ${key}`);
|
|
180
|
+
if (this.internals.isExpired(key)) {
|
|
181
|
+
logger.info('Item expired, deleting from memory', { key: (0, agents_telemetry_1.redactString)(key, true) });
|
|
182
|
+
this.internals.remove(key);
|
|
183
|
+
}
|
|
184
|
+
const item = this.internals.state.memory[key];
|
|
185
|
+
if (!item) {
|
|
186
|
+
results[key] = { key, status: storage_1.StorageOperationStatus.NotFound };
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
const value = JSON.parse(item);
|
|
190
|
+
results[key] = { key, status: storage_1.StorageOperationStatus.Succeeded, value, version: this.internals.getVersion(key, value) };
|
|
191
|
+
}
|
|
192
|
+
return results;
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Writes items to process-local memory with optional concurrency conditions.
|
|
197
|
+
*
|
|
198
|
+
* @param changes The values to write, keyed by storage key.
|
|
199
|
+
* @param options Create-only, replace, or expected-version conditions.
|
|
200
|
+
* @returns A result for every supplied key, including `conflict` or `conditionNotMet` when a
|
|
201
|
+
* condition cannot be satisfied.
|
|
202
|
+
*/
|
|
203
|
+
async write(changes, options) {
|
|
204
|
+
return (0, agents_telemetry_1.trace)(observability_1.StorageTraceDefinitions.write, async ({ record }) => {
|
|
205
|
+
var _a;
|
|
206
|
+
record({ keyCount: changes ? Object.keys(changes).length : undefined });
|
|
207
|
+
if ((options === null || options === void 0 ? void 0 : options.expectedVersion) === '') {
|
|
208
|
+
throw agents_activity_1.ExceptionHelper.generateException(RangeError, errorHelper_1.Errors.StorageV2ExpectedVersionEmpty);
|
|
209
|
+
}
|
|
210
|
+
if (!changes || typeof changes !== 'object' || Array.isArray(changes)) {
|
|
211
|
+
throw agents_activity_1.ExceptionHelper.generateException(ReferenceError, errorHelper_1.Errors.StorageWriteChangesRequired);
|
|
212
|
+
}
|
|
213
|
+
if (Object.values(changes).some(value => value === null || typeof value !== 'object' || Array.isArray(value))) {
|
|
214
|
+
throw agents_activity_1.ExceptionHelper.generateException(TypeError, errorHelper_1.Errors.StorageV2ValueRequired);
|
|
215
|
+
}
|
|
216
|
+
if (Object.keys(changes).some(key => key.trim() === '')) {
|
|
217
|
+
throw agents_activity_1.ExceptionHelper.generateException(ReferenceError, errorHelper_1.Errors.StorageV2KeyRequired);
|
|
218
|
+
}
|
|
219
|
+
const results = {};
|
|
220
|
+
const expiresAt = (0, storageExpiry_1.getStorageWriteExpiry)(options);
|
|
221
|
+
const mode = (_a = options === null || options === void 0 ? void 0 : options.mode) !== null && _a !== void 0 ? _a : storage_1.StorageWriteMode.Upsert;
|
|
222
|
+
if (!Object.values(storage_1.StorageWriteMode).includes(mode)) {
|
|
223
|
+
throw agents_activity_1.ExceptionHelper.generateException(RangeError, errorHelper_1.Errors.StorageV2WriteModeUnsupported, undefined, { mode: String(mode) });
|
|
224
|
+
}
|
|
225
|
+
for (const [key, newItem] of Object.entries(changes)) {
|
|
226
|
+
if (this.internals.isExpired(key)) {
|
|
227
|
+
logger.info('Item expired, deleting from memory', { key: (0, agents_telemetry_1.redactString)(key, true) });
|
|
228
|
+
this.internals.remove(key);
|
|
229
|
+
}
|
|
230
|
+
const oldItemStr = this.internals.state.memory[key];
|
|
231
|
+
const oldItem = oldItemStr ? JSON.parse(oldItemStr) : undefined;
|
|
232
|
+
const currentVersion = oldItem ? this.internals.getVersion(key, oldItem) : undefined;
|
|
233
|
+
if (mode === storage_1.StorageWriteMode.CreateOnly && oldItemStr) {
|
|
234
|
+
results[key] = { key, status: storage_1.StorageOperationStatus.Conflict, version: currentVersion };
|
|
235
|
+
}
|
|
236
|
+
else if (mode === storage_1.StorageWriteMode.Replace && !oldItemStr) {
|
|
237
|
+
results[key] = { key, status: storage_1.StorageOperationStatus.NotFound };
|
|
238
|
+
}
|
|
239
|
+
else if ((options === null || options === void 0 ? void 0 : options.expectedVersion) !== undefined && options.expectedVersion !== currentVersion) {
|
|
240
|
+
results[key] = { key, status: storage_1.StorageOperationStatus.ConditionNotMet, version: currentVersion };
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
results[key] = { key, status: storage_1.StorageOperationStatus.Succeeded, version: this.internals.save(key, newItem, expiresAt) };
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return results;
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Deletes items from process-local memory with an optional version condition.
|
|
144
251
|
*
|
|
145
|
-
* @
|
|
252
|
+
* @param keys The keys to delete. Empty batches are valid.
|
|
253
|
+
* @param options An optional expected storage version.
|
|
254
|
+
* @returns A result for every supplied key.
|
|
146
255
|
*/
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
256
|
+
async delete(keys, options) {
|
|
257
|
+
return (0, agents_telemetry_1.trace)(observability_1.StorageTraceDefinitions.delete, async ({ record }) => {
|
|
258
|
+
record({ keyCount: keys === null || keys === void 0 ? void 0 : keys.length });
|
|
259
|
+
if ((options === null || options === void 0 ? void 0 : options.expectedVersion) === '') {
|
|
260
|
+
throw agents_activity_1.ExceptionHelper.generateException(RangeError, errorHelper_1.Errors.StorageV2ExpectedVersionEmpty);
|
|
261
|
+
}
|
|
262
|
+
if (!Array.isArray(keys)) {
|
|
263
|
+
throw agents_activity_1.ExceptionHelper.generateException(ReferenceError, errorHelper_1.Errors.StorageReadKeysRequired);
|
|
264
|
+
}
|
|
265
|
+
if (keys.some(key => typeof key !== 'string' || key.trim() === '')) {
|
|
266
|
+
throw agents_activity_1.ExceptionHelper.generateException(ReferenceError, errorHelper_1.Errors.StorageV2KeyRequired);
|
|
267
|
+
}
|
|
268
|
+
const results = {};
|
|
269
|
+
for (const key of keys) {
|
|
270
|
+
if (this.internals.isExpired(key)) {
|
|
271
|
+
logger.info('Item expired, deleting from memory', { key: (0, agents_telemetry_1.redactString)(key, true) });
|
|
272
|
+
this.internals.remove(key);
|
|
273
|
+
}
|
|
274
|
+
const item = this.internals.state.memory[key];
|
|
275
|
+
if (!item) {
|
|
276
|
+
results[key] = { key, status: storage_1.StorageOperationStatus.NotFound };
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
const value = JSON.parse(item);
|
|
280
|
+
const version = this.internals.getVersion(key, value);
|
|
281
|
+
if ((options === null || options === void 0 ? void 0 : options.expectedVersion) !== undefined && options.expectedVersion !== version) {
|
|
282
|
+
results[key] = { key, status: storage_1.StorageOperationStatus.ConditionNotMet, version };
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
this.internals.remove(key);
|
|
286
|
+
results[key] = { key, status: storage_1.StorageOperationStatus.Succeeded, version };
|
|
287
|
+
}
|
|
288
|
+
return results;
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
static getSingleInstance() {
|
|
292
|
+
if (!MemoryStorageV2.instance)
|
|
293
|
+
MemoryStorageV2.instance = new MemoryStorageV2();
|
|
294
|
+
return MemoryStorageV2.instance;
|
|
150
295
|
}
|
|
151
296
|
}
|
|
152
|
-
exports.
|
|
297
|
+
exports.MemoryStorageV2 = MemoryStorageV2;
|
|
298
|
+
function getNextETag(memory) {
|
|
299
|
+
return Object.values(memory).reduce((next, item) => {
|
|
300
|
+
var _a;
|
|
301
|
+
try {
|
|
302
|
+
const version = Number((_a = JSON.parse(item)) === null || _a === void 0 ? void 0 : _a.eTag);
|
|
303
|
+
return Number.isSafeInteger(version) && version >= next ? version + 1 : next;
|
|
304
|
+
}
|
|
305
|
+
catch {
|
|
306
|
+
return next;
|
|
307
|
+
}
|
|
308
|
+
}, 1);
|
|
309
|
+
}
|
|
153
310
|
//# sourceMappingURL=memoryStorage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memoryStorage.js","sourceRoot":"","sources":["../../../src/storage/memoryStorage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAmD;AACnD,gEAA4D;AAC5D,oDAA0D;AAE1D,kEAAmD;AACnD,gDAAuC;AAEvC,MAAM,MAAM,GAAG,IAAA,wBAAK,EAAC,uBAAuB,CAAC,CAAA;AAE7C;;;;;;;;;;;;;GAaG;AACH;IAOE;;;;OAIG;IACH,YAAqB,MAAM,GAA4B,EAAE;QAApC,WAAM,GAAN,MAAM,CAA8B;QAVzD;;WAEG;QACK,SAAI,GAAW,CAAC,CAAA;IAOqC,CAAC;IAE9D;;;;;;;;;OASG;IACH,MAAM,CAAC,iBAAiB;QACtB,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;YAC5B,aAAa,CAAC,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAA;QAC9C,CAAC;QACD,OAAO,aAAa,CAAC,QAAQ,CAAA;IAC/B,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,IAAI,CAAE,IAAc;QACxB,OAAO,IAAA,wBAAK,EAAC,uCAAuB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC9D,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,EAAE,CAAC,CAAA;YAClC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC/B,MAAM,iCAAe,CAAC,iBAAiB,CAAC,cAAc,EAAE,oBAAM,CAAC,uBAAuB,CAAC,CAAA;YACzF,CAAC;YAED,MAAM,IAAI,GAAc,EAAE,CAAA;YAC1B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;gBACvB,MAAM,CAAC,KAAK,CAAC,gBA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