@microsoft/agents-a365-tooling 0.1.0-preview.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +33 -0
  3. package/dist/cjs/McpToolServerConfigurationService.d.ts +143 -0
  4. package/dist/cjs/McpToolServerConfigurationService.d.ts.map +1 -0
  5. package/dist/cjs/McpToolServerConfigurationService.js +277 -0
  6. package/dist/cjs/McpToolServerConfigurationService.js.map +1 -0
  7. package/dist/cjs/Utility.d.ts +106 -0
  8. package/dist/cjs/Utility.d.ts.map +1 -0
  9. package/dist/cjs/Utility.js +192 -0
  10. package/dist/cjs/Utility.js.map +1 -0
  11. package/dist/cjs/configuration/ToolingConfiguration.d.ts +24 -0
  12. package/dist/cjs/configuration/ToolingConfiguration.d.ts.map +1 -0
  13. package/dist/cjs/configuration/ToolingConfiguration.js +66 -0
  14. package/dist/cjs/configuration/ToolingConfiguration.js.map +1 -0
  15. package/dist/cjs/configuration/ToolingConfigurationOptions.d.ts +23 -0
  16. package/dist/cjs/configuration/ToolingConfigurationOptions.d.ts.map +1 -0
  17. package/dist/cjs/configuration/ToolingConfigurationOptions.js +5 -0
  18. package/dist/cjs/configuration/ToolingConfigurationOptions.js.map +1 -0
  19. package/dist/cjs/configuration/index.d.ts +9 -0
  20. package/dist/cjs/configuration/index.d.ts.map +1 -0
  21. package/dist/cjs/configuration/index.js +28 -0
  22. package/dist/cjs/configuration/index.js.map +1 -0
  23. package/dist/cjs/contracts.d.ts +30 -0
  24. package/dist/cjs/contracts.d.ts.map +1 -0
  25. package/dist/cjs/contracts.js +5 -0
  26. package/dist/cjs/contracts.js.map +1 -0
  27. package/dist/cjs/index.d.ts +6 -0
  28. package/dist/cjs/index.d.ts.map +1 -0
  29. package/dist/cjs/index.js +24 -0
  30. package/dist/cjs/index.js.map +1 -0
  31. package/dist/cjs/models/ChatHistoryMessage.d.ts +22 -0
  32. package/dist/cjs/models/ChatHistoryMessage.d.ts.map +1 -0
  33. package/dist/cjs/models/ChatHistoryMessage.js +5 -0
  34. package/dist/cjs/models/ChatHistoryMessage.js.map +1 -0
  35. package/dist/cjs/models/ChatMessageRequest.d.ts +23 -0
  36. package/dist/cjs/models/ChatMessageRequest.d.ts.map +1 -0
  37. package/dist/cjs/models/ChatMessageRequest.js +5 -0
  38. package/dist/cjs/models/ChatMessageRequest.js.map +1 -0
  39. package/dist/cjs/models/index.d.ts +3 -0
  40. package/dist/cjs/models/index.d.ts.map +1 -0
  41. package/dist/cjs/models/index.js +21 -0
  42. package/dist/cjs/models/index.js.map +1 -0
  43. package/dist/esm/McpToolServerConfigurationService.d.ts +143 -0
  44. package/dist/esm/McpToolServerConfigurationService.d.ts.map +1 -0
  45. package/dist/esm/McpToolServerConfigurationService.js +270 -0
  46. package/dist/esm/McpToolServerConfigurationService.js.map +1 -0
  47. package/dist/esm/Utility.d.ts +106 -0
  48. package/dist/esm/Utility.d.ts.map +1 -0
  49. package/dist/esm/Utility.js +188 -0
  50. package/dist/esm/Utility.js.map +1 -0
  51. package/dist/esm/configuration/ToolingConfiguration.d.ts +24 -0
  52. package/dist/esm/configuration/ToolingConfiguration.d.ts.map +1 -0
  53. package/dist/esm/configuration/ToolingConfiguration.js +62 -0
  54. package/dist/esm/configuration/ToolingConfiguration.js.map +1 -0
  55. package/dist/esm/configuration/ToolingConfigurationOptions.d.ts +23 -0
  56. package/dist/esm/configuration/ToolingConfigurationOptions.d.ts.map +1 -0
  57. package/dist/esm/configuration/ToolingConfigurationOptions.js +4 -0
  58. package/dist/esm/configuration/ToolingConfigurationOptions.js.map +1 -0
  59. package/dist/esm/configuration/index.d.ts +9 -0
  60. package/dist/esm/configuration/index.d.ts.map +1 -0
  61. package/dist/esm/configuration/index.js +11 -0
  62. package/dist/esm/configuration/index.js.map +1 -0
  63. package/dist/esm/contracts.d.ts +30 -0
  64. package/dist/esm/contracts.d.ts.map +1 -0
  65. package/dist/esm/contracts.js +4 -0
  66. package/dist/esm/contracts.js.map +1 -0
  67. package/dist/esm/index.d.ts +6 -0
  68. package/dist/esm/index.d.ts.map +1 -0
  69. package/dist/esm/index.js +8 -0
  70. package/dist/esm/index.js.map +1 -0
  71. package/dist/esm/models/ChatHistoryMessage.d.ts +22 -0
  72. package/dist/esm/models/ChatHistoryMessage.d.ts.map +1 -0
  73. package/dist/esm/models/ChatHistoryMessage.js +4 -0
  74. package/dist/esm/models/ChatHistoryMessage.js.map +1 -0
  75. package/dist/esm/models/ChatMessageRequest.d.ts +23 -0
  76. package/dist/esm/models/ChatMessageRequest.d.ts.map +1 -0
  77. package/dist/esm/models/ChatMessageRequest.js +4 -0
  78. package/dist/esm/models/ChatMessageRequest.js.map +1 -0
  79. package/dist/esm/models/index.d.ts +3 -0
  80. package/dist/esm/models/index.d.ts.map +1 -0
  81. package/dist/esm/models/index.js +5 -0
  82. package/dist/esm/models/index.js.map +1 -0
  83. package/package.json +63 -0
@@ -0,0 +1,188 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { Utility as RuntimeUtility } from '@microsoft/agents-a365-runtime';
4
+ import { defaultToolingConfigurationProvider } from './configuration';
5
+ export class Utility {
6
+ /**
7
+ * Compose standard headers for MCP tooling requests.
8
+ * Includes Authorization bearer token when provided, and optionally includes channel and subchannel identifiers for routing.
9
+ *
10
+ * @param authToken Bearer token for Authorization header.
11
+ * @param turnContext Optional TurnContext object from which channel and subchannel IDs are extracted.
12
+ * @param options Optional ToolOptions object for additional request configuration.
13
+ * @returns A headers record suitable for HTTP requests.
14
+ */
15
+ static GetToolRequestHeaders(authToken, turnContext, options) {
16
+ const headers = {};
17
+ if (authToken) {
18
+ headers['Authorization'] = `Bearer ${authToken}`;
19
+ // Add x-ms-agentid header with priority fallback (only when authToken present)
20
+ const agentId = this.resolveAgentIdForHeader(authToken, turnContext);
21
+ if (agentId) {
22
+ headers[Utility.HEADER_AGENT_ID] = agentId;
23
+ }
24
+ }
25
+ const channelId = turnContext?.activity?.channelId;
26
+ const subChannelId = turnContext?.activity?.channelIdSubChannel;
27
+ if (channelId) {
28
+ headers[Utility.HEADER_CHANNEL_ID] = channelId;
29
+ }
30
+ if (subChannelId) {
31
+ headers[Utility.HEADER_SUBCHANNEL_ID] = subChannelId;
32
+ }
33
+ if (options?.orchestratorName) {
34
+ headers[Utility.HEADER_USER_AGENT] = RuntimeUtility.GetUserAgentHeader(options.orchestratorName);
35
+ }
36
+ return headers;
37
+ }
38
+ /**
39
+ * Resolves the best available agent identifier for the x-ms-agentid header.
40
+ * Priority: TurnContext.agenticAppBlueprintId > token claims (xms_par_app_azp > appid > azp) > application name
41
+ *
42
+ * Note: This differs from RuntimeUtility.ResolveAgentIdentity() which resolves the agenticAppId
43
+ * for URL construction. This method resolves the identifier specifically for the x-ms-agentid header.
44
+ *
45
+ * @param authToken The authentication token to extract claims from.
46
+ * @param turnContext Optional TurnContext to extract agent blueprint ID from.
47
+ * @returns Agent ID string or undefined if not available.
48
+ */
49
+ static resolveAgentIdForHeader(authToken, turnContext) {
50
+ // Priority 1: Agent Blueprint ID from TurnContext
51
+ // The 'from' property may include agenticAppBlueprintId when the request originates from an agentic app
52
+ const blueprintId = turnContext?.activity?.from?.agenticAppBlueprintId;
53
+ if (blueprintId) {
54
+ return blueprintId;
55
+ }
56
+ // Priority 2 & 3: Agent ID from token (xms_par_app_azp > appid > azp)
57
+ // Single decode, checks claims in priority order
58
+ const agentId = RuntimeUtility.getAgentIdFromToken(authToken);
59
+ if (agentId) {
60
+ return agentId;
61
+ }
62
+ // Priority 4: Application name from npm_package_name or package.json
63
+ return RuntimeUtility.getApplicationName();
64
+ }
65
+ /**
66
+ * Validates a JWT authentication token.
67
+ * Checks that the token is a valid JWT and is not expired.
68
+ *
69
+ * @param authToken - The JWT token to validate.
70
+ * @throws Error if the token is invalid or expired.
71
+ */
72
+ static ValidateAuthToken(authToken) {
73
+ return Utility.validateAuthToken(authToken);
74
+ }
75
+ /**
76
+ * Private helper to validate a JWT authentication token.
77
+ * Checks that the token is a valid JWT and is not expired.
78
+ *
79
+ * @param authToken - The JWT token to validate.
80
+ * @throws Error if the token is invalid or expired.
81
+ */
82
+ static validateAuthToken(authToken) {
83
+ if (!authToken) {
84
+ throw new Error('Authentication token is required');
85
+ }
86
+ // Parse JWT token (format: header.payload.signature)
87
+ const parts = authToken.split('.');
88
+ if (parts.length !== 3) {
89
+ throw new Error('Invalid JWT token format');
90
+ }
91
+ let payload;
92
+ try {
93
+ // Decode the payload (second part of the JWT)
94
+ const payloadBase64 = parts[1];
95
+ // Handle URL-safe base64
96
+ const paddedBase64 = payloadBase64.padEnd(payloadBase64.length + (4 - payloadBase64.length % 4) % 4, '=');
97
+ const payloadJson = Buffer.from(paddedBase64.replace(/-/g, '+').replace(/_/g, '/'), 'base64').toString('utf-8');
98
+ payload = JSON.parse(payloadJson);
99
+ }
100
+ catch (_error) {
101
+ throw new Error('Failed to decode JWT token payload');
102
+ }
103
+ // Check expiration
104
+ if (payload.exp) {
105
+ const currentTimestamp = Math.floor(Date.now() / 1000);
106
+ if (payload.exp < currentTimestamp) {
107
+ throw new Error('Authentication token has expired');
108
+ }
109
+ }
110
+ else {
111
+ throw new Error('Authentication token does not contain expiration claim');
112
+ }
113
+ }
114
+ /**
115
+ * Construct the tooling gateway URL for a given agent identity.
116
+ * This endpoint is used to discover MCP servers associated with the specified agent identity.
117
+ *
118
+ * Example:
119
+ * Utility.GetToolingGatewayForDigitalWorker(agenticAppId)
120
+ * // => "https://agent365.svc.cloud.microsoft/agents/{agenticAppId}/mcpServers"
121
+ *
122
+ * @param agenticAppId - The unique identifier for the agent identity.
123
+ * @param configProvider - Optional configuration provider. Defaults to defaultToolingConfigurationProvider.
124
+ * @returns A fully-qualified URL pointing at the tooling gateway for the agent.
125
+ * @deprecated This method is for internal use only. Use McpToolServerConfigurationService.listToolServers() instead.
126
+ */
127
+ static GetToolingGatewayForDigitalWorker(agenticAppId, configProvider) {
128
+ return `${this.getMcpPlatformBaseUrl(configProvider)}/agents/${agenticAppId}/mcpServers`;
129
+ }
130
+ /**
131
+ * Get the base URL used to query MCP environments.
132
+ *
133
+ * @param configProvider - Optional configuration provider. Defaults to defaultToolingConfigurationProvider.
134
+ * @returns The base MCP environments URL.
135
+ * @deprecated This method is for internal use only. Use McpToolServerConfigurationService instead.
136
+ */
137
+ static GetMcpBaseUrl(configProvider) {
138
+ return `${this.getMcpPlatformBaseUrl(configProvider)}/agents/servers`;
139
+ }
140
+ /**
141
+ * Build the full URL for accessing a specific MCP server.
142
+ *
143
+ * Example:
144
+ * Utility.BuildMcpServerUrl('MyServer')
145
+ * // => "https://agent365.svc.cloud.microsoft/agents/servers/MyServer/"
146
+ *
147
+ * @param serverName - The MCP server resource name.
148
+ * @param configProvider - Optional configuration provider. Defaults to defaultToolingConfigurationProvider.
149
+ * @returns The fully-qualified MCP server URL including trailing slash.
150
+ * @deprecated This method is for internal use only. Use McpToolServerConfigurationService instead.
151
+ */
152
+ static BuildMcpServerUrl(serverName, configProvider) {
153
+ const baseUrl = this.GetMcpBaseUrl(configProvider);
154
+ return `${baseUrl}/${serverName}/`;
155
+ }
156
+ /**
157
+ * Gets the base URL for MCP platform from configuration.
158
+ *
159
+ * @param configProvider - Optional configuration provider. Defaults to defaultToolingConfigurationProvider.
160
+ * @returns The base URL for MCP platform.
161
+ * @deprecated This method is for internal use only. Use ToolingConfiguration.mcpPlatformEndpoint instead.
162
+ */
163
+ static getMcpPlatformBaseUrl(configProvider) {
164
+ const provider = configProvider ?? defaultToolingConfigurationProvider;
165
+ return provider.getConfiguration().mcpPlatformEndpoint;
166
+ }
167
+ /**
168
+ * Constructs the endpoint URL for sending chat history to the MCP platform for real-time threat protection.
169
+ *
170
+ * @param configProvider - Optional configuration provider. Defaults to defaultToolingConfigurationProvider.
171
+ * @returns An absolute URL that tooling components can use to send or retrieve chat messages for
172
+ * real-time threat protection scenarios.
173
+ * @remarks
174
+ * Call this method when constructing HTTP requests that need to access the chat-message history
175
+ * for real-time threat protection. The returned URL already includes the MCP platform base address
176
+ * and the fixed path segment `/agents/real-time-threat-protection/chat-message`.
177
+ * @deprecated This method is for internal use only. Use McpToolServerConfigurationService.sendChatHistory() instead.
178
+ */
179
+ static GetChatHistoryEndpoint(configProvider) {
180
+ return `${this.getMcpPlatformBaseUrl(configProvider)}/agents/real-time-threat-protection/chat-message`;
181
+ }
182
+ }
183
+ Utility.HEADER_CHANNEL_ID = 'x-ms-channel-id';
184
+ Utility.HEADER_SUBCHANNEL_ID = 'x-ms-subchannel-id';
185
+ Utility.HEADER_USER_AGENT = 'User-Agent';
186
+ /** Header name for sending the agent identifier to MCP platform for logging/analytics. */
187
+ Utility.HEADER_AGENT_ID = 'x-ms-agentid';
188
+ //# sourceMappingURL=Utility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Utility.js","sourceRoot":"","sources":["../../src/Utility.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,OAAO,IAAI,cAAc,EAA0B,MAAM,gCAAgC,CAAC;AAGnG,OAAO,EAAwB,mCAAmC,EAAE,MAAM,iBAAiB,CAAC;AAE5F,MAAM,OAAO,OAAO;IAOlB;;;;;;;;OAQG;IACI,MAAM,CAAC,qBAAqB,CACjC,SAAkB,EAClB,WAAyB,EACzB,OAAqB;QAErB,MAAM,OAAO,GAA2B,EAAE,CAAC;QAE3C,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,SAAS,EAAE,CAAC;YAEjD,+EAA+E;YAC/E,MAAM,OAAO,GAAG,IAAI,CAAC,uBAAuB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;YACrE,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC;YAC7C,CAAC;QACH,CAAC;QAED,MAAM,SAAS,GAAG,WAAW,EAAE,QAAQ,EAAE,SAA+B,C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;;;;;;;;OAYG;IACI,MAAM,CAAC,iCAAiC,CAC7C,YAAoB,EACpB,cAA6D;QAE7D,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,WAAW,YAAY,aAAa,CAAC;IAC3F,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,aAAa,CAAC,cAA6D;QACvF,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,iBAAiB,CAAC;IACxE,CAAC;IAED;;;;;;;;;;;MAWE;IACK,MAAM,CAAC,iBAAiB,CAC7B,UAAkB,EAClB,cAA6D;QAE7D,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QACnD,OAAO,GAAG,OAAO,IAAI,UAAU,GAAG,CAAC;IACrC,CAAC;IAED;;;;;;OAMG;IACK,MAAM,CAAC,qBAAqB,CAAC,cAA6D;QAChG,MAAM,QAAQ,GAAG,cAAc,IAAI,mCAAmC,CAAC;QACvE,OAAO,QAAQ,CAAC,gBAAgB,EAAE,CAAC,mBAAmB,CAAC;IACzD,CAAC;IAED;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,sBAAsB,CAAC,cAA6D;QAChG,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,kDAAkD,CAAC;IACzG,CAAC;;AAvNsB,yBAAiB,GAAG,iBAAiB,CAAC;AACtC,4BAAoB,GAAG,oBAAoB,CAAC;AAC5C,yBAAiB,GAAG,YAAY,CAAC;AACxD,0FAA0F;AACnE,uBAAe,GAAG,cAAc,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { RuntimeConfiguration } from '@microsoft/agents-a365-runtime';
2
+ import { ToolingConfigurationOptions } from './ToolingConfigurationOptions';
3
+ /**
4
+ * Configuration for tooling package.
5
+ * Inherits runtime settings and adds tooling-specific settings.
6
+ */
7
+ export declare class ToolingConfiguration extends RuntimeConfiguration {
8
+ protected get toolingOverrides(): ToolingConfigurationOptions;
9
+ constructor(overrides?: ToolingConfigurationOptions);
10
+ get mcpPlatformEndpoint(): string;
11
+ /**
12
+ * Whether to use the ToolingManifest.json file instead of gateway discovery.
13
+ * Returns true when NODE_ENV is set to 'development' (case-insensitive), or
14
+ * when explicitly overridden via configuration.
15
+ */
16
+ get useToolingManifest(): boolean;
17
+ /**
18
+ * Gets the MCP platform authentication scope.
19
+ * Used by AgenticAuthenticationService for token exchange.
20
+ * Trims whitespace to prevent token exchange failures.
21
+ */
22
+ get mcpPlatformAuthenticationScope(): string;
23
+ }
24
+ //# sourceMappingURL=ToolingConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolingConfiguration.d.ts","sourceRoot":"","sources":["../../../src/configuration/ToolingConfiguration.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAc5E;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,oBAAoB;IAE5D,SAAS,KAAK,gBAAgB,IAAI,2BAA2B,CAE5D;gBAEW,SAAS,CAAC,EAAE,2BAA2B;IAMnD,IAAI,mBAAmB,IAAI,MAAM,CAQhC;IAED;;;;OAIG;IACH,IAAI,kBAAkB,IAAI,OAAO,CAKhC;IAED;;;;OAIG;IACH,IAAI,8BAA8B,IAAI,MAAM,CAQ3C;CACF"}
@@ -0,0 +1,62 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { RuntimeConfiguration } from '@microsoft/agents-a365-runtime';
4
+ // Constants for tooling-specific settings
5
+ const MCP_PLATFORM_PROD_BASE_URL = 'https://agent365.svc.cloud.microsoft';
6
+ const PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE = 'ea9ffc3e-8a23-4a7d-836d-234d7c7565c1/.default';
7
+ /**
8
+ * Normalize URL by trimming whitespace and removing trailing slashes.
9
+ * Prevents double-slash issues in URL construction (e.g., "https://example.com//api").
10
+ */
11
+ function normalizeUrl(url) {
12
+ return url.trim().replace(/\/+$/, '');
13
+ }
14
+ /**
15
+ * Configuration for tooling package.
16
+ * Inherits runtime settings and adds tooling-specific settings.
17
+ */
18
+ export class ToolingConfiguration extends RuntimeConfiguration {
19
+ // Type-safe access to tooling overrides
20
+ get toolingOverrides() {
21
+ return this.overrides;
22
+ }
23
+ constructor(overrides) {
24
+ super(overrides);
25
+ }
26
+ // Inherited: clusterCategory, isDevelopmentEnvironment, isNodeEnvDevelopment
27
+ get mcpPlatformEndpoint() {
28
+ const override = this.toolingOverrides.mcpPlatformEndpoint?.();
29
+ if (override)
30
+ return normalizeUrl(override);
31
+ const envValue = process.env.MCP_PLATFORM_ENDPOINT?.trim();
32
+ if (envValue)
33
+ return normalizeUrl(envValue);
34
+ return MCP_PLATFORM_PROD_BASE_URL;
35
+ }
36
+ /**
37
+ * Whether to use the ToolingManifest.json file instead of gateway discovery.
38
+ * Returns true when NODE_ENV is set to 'development' (case-insensitive), or
39
+ * when explicitly overridden via configuration.
40
+ */
41
+ get useToolingManifest() {
42
+ const override = this.toolingOverrides.useToolingManifest?.();
43
+ if (override !== undefined)
44
+ return override;
45
+ return this.isNodeEnvDevelopment;
46
+ }
47
+ /**
48
+ * Gets the MCP platform authentication scope.
49
+ * Used by AgenticAuthenticationService for token exchange.
50
+ * Trims whitespace to prevent token exchange failures.
51
+ */
52
+ get mcpPlatformAuthenticationScope() {
53
+ const override = this.toolingOverrides.mcpPlatformAuthenticationScope?.()?.trim();
54
+ if (override)
55
+ return override;
56
+ const envValue = process.env.MCP_PLATFORM_AUTHENTICATION_SCOPE?.trim();
57
+ if (envValue)
58
+ return envValue;
59
+ return PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE;
60
+ }
61
+ }
62
+ //# sourceMappingURL=ToolingConfiguration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolingConfiguration.js","sourceRoot":"","sources":["../../../src/configuration/ToolingConfiguration.ts"],"names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EAAE,IAAI,EAAE,CAAC;QAClF,IAAI,QAAQ;YAAE,OAAO,QAAQ,CAAC;QAE9B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iCAAiC,EAAE,IAAI,EAAE,CAAC;QACvE,IAAI,QAAQ;YAAE,OAAO,QAAQ,CAAC;QAE9B,OAAO,sCAAsC,CAAC;IAChD,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ import { RuntimeConfigurationOptions } from '@microsoft/agents-a365-runtime';
2
+ /**
3
+ * Tooling configuration options - extends runtime options.
4
+ * All overrides are functions called on each property access.
5
+ *
6
+ * Inherited from RuntimeConfigurationOptions:
7
+ * - clusterCategory
8
+ * - isNodeEnvDevelopment
9
+ */
10
+ export type ToolingConfigurationOptions = RuntimeConfigurationOptions & {
11
+ mcpPlatformEndpoint?: () => string;
12
+ /**
13
+ * Override for using ToolingManifest.json vs gateway discovery.
14
+ * Falls back to inherited isNodeEnvDevelopment.
15
+ */
16
+ useToolingManifest?: () => boolean;
17
+ /**
18
+ * Override for MCP platform authentication scope.
19
+ * Falls back to MCP_PLATFORM_AUTHENTICATION_SCOPE env var, then production default.
20
+ */
21
+ mcpPlatformAuthenticationScope?: () => string;
22
+ };
23
+ //# sourceMappingURL=ToolingConfigurationOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolingConfigurationOptions.d.ts","sourceRoot":"","sources":["../../../src/configuration/ToolingConfigurationOptions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAE7E;;;;;;;GAOG;AACH,MAAM,MAAM,2BAA2B,GAAG,2BAA2B,GAAG;IACtE,mBAAmB,CAAC,EAAE,MAAM,MAAM,CAAC;IACnC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC;IACnC;;;OAGG;IACH,8BAA8B,CAAC,EAAE,MAAM,MAAM,CAAC;CAC/C,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=ToolingConfigurationOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolingConfigurationOptions.js","sourceRoot":"","sources":["../../../src/configuration/ToolingConfigurationOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC"}
@@ -0,0 +1,9 @@
1
+ import { DefaultConfigurationProvider } from '@microsoft/agents-a365-runtime';
2
+ import { ToolingConfiguration } from './ToolingConfiguration';
3
+ export * from './ToolingConfigurationOptions';
4
+ export * from './ToolingConfiguration';
5
+ /**
6
+ * Shared default provider for ToolingConfiguration.
7
+ */
8
+ export declare const defaultToolingConfigurationProvider: DefaultConfigurationProvider<ToolingConfiguration>;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/configuration/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,mCAAmC,oDACoB,CAAC"}
@@ -0,0 +1,11 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { DefaultConfigurationProvider } from '@microsoft/agents-a365-runtime';
4
+ import { ToolingConfiguration } from './ToolingConfiguration';
5
+ export * from './ToolingConfigurationOptions';
6
+ export * from './ToolingConfiguration';
7
+ /**
8
+ * Shared default provider for ToolingConfiguration.
9
+ */
10
+ export const defaultToolingConfigurationProvider = new DefaultConfigurationProvider(() => new ToolingConfiguration());
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/configuration/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAC9C,IAAI,4BAA4B,CAAC,GAAG,EAAE,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ export interface MCPServerConfig {
2
+ mcpServerName: string;
3
+ url: string;
4
+ headers?: Record<string, string>;
5
+ }
6
+ export type MCPServerManifestEntry = {
7
+ url?: string;
8
+ headers?: Record<string, string>;
9
+ } & ({
10
+ mcpServerName: string;
11
+ mcpServerUniqueName?: string;
12
+ } | {
13
+ mcpServerUniqueName: string;
14
+ mcpServerName?: string;
15
+ });
16
+ export interface McpClientTool {
17
+ name: string;
18
+ description?: string;
19
+ inputSchema: InputSchema;
20
+ }
21
+ export interface InputSchema {
22
+ type: string;
23
+ properties?: Record<string, object>;
24
+ required?: string[];
25
+ additionalProperties?: boolean;
26
+ }
27
+ export interface ToolOptions {
28
+ orchestratorName?: string;
29
+ }
30
+ //# sourceMappingURL=contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/contracts.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,GAAG,CACA;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,mBAAmB,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAC1D,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,WAAW;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/contracts.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC"}
@@ -0,0 +1,6 @@
1
+ export * from './Utility';
2
+ export * from './McpToolServerConfigurationService';
3
+ export * from './contracts';
4
+ export * from './models';
5
+ export * from './configuration';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,WAAW,CAAC;AAC1B,cAAc,qCAAqC,CAAC;AACpD,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export * from './Utility';
4
+ export * from './McpToolServerConfigurationService';
5
+ export * from './contracts';
6
+ export * from './models';
7
+ export * from './configuration';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,WAAW,CAAC;AAC1B,cAAc,qCAAqC,CAAC;AACpD,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Represents a single message in the chat history.
3
+ */
4
+ export interface ChatHistoryMessage {
5
+ /**
6
+ * The unique identifier for the chat message.
7
+ */
8
+ id: string;
9
+ /**
10
+ * The role of the message sender (e.g., "user", "assistant", "system").
11
+ */
12
+ role: string;
13
+ /**
14
+ * The content of the chat message.
15
+ */
16
+ content: string;
17
+ /**
18
+ * The timestamp of when the message was sent.
19
+ */
20
+ timestamp: Date;
21
+ }
22
+ //# sourceMappingURL=ChatHistoryMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatHistoryMessage.d.ts","sourceRoot":"","sources":["../../../src/models/ChatHistoryMessage.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;CACjB"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=ChatHistoryMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatHistoryMessage.js","sourceRoot":"","sources":["../../../src/models/ChatHistoryMessage.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC"}
@@ -0,0 +1,23 @@
1
+ import { ChatHistoryMessage } from './ChatHistoryMessage';
2
+ /**
3
+ * Represents the request payload for a real-time threat protection check on a chat message.
4
+ */
5
+ export interface ChatMessageRequest {
6
+ /**
7
+ * The unique identifier for the conversation.
8
+ */
9
+ conversationId: string;
10
+ /**
11
+ * The unique identifier for the message within the conversation.
12
+ */
13
+ messageId: string;
14
+ /**
15
+ * The content of the user's message.
16
+ */
17
+ userMessage: string;
18
+ /**
19
+ * The chat history messages.
20
+ */
21
+ chatHistory: ChatHistoryMessage[];
22
+ }
23
+ //# sourceMappingURL=ChatMessageRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatMessageRequest.d.ts","sourceRoot":"","sources":["../../../src/models/ChatMessageRequest.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,kBAAkB,EAAE,CAAC;CACnC"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=ChatMessageRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatMessageRequest.js","sourceRoot":"","sources":["../../../src/models/ChatMessageRequest.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC"}
@@ -0,0 +1,3 @@
1
+ export * from './ChatHistoryMessage';
2
+ export * from './ChatMessageRequest';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAGA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export * from './ChatHistoryMessage';
4
+ export * from './ChatMessageRequest';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@microsoft/agents-a365-tooling",
3
+ "version": "0.1.0-preview.103",
4
+ "description": "Agent 365 Tooling SDK for AI agents built with TypeScript/Node.js",
5
+ "main": "dist/cjs/index.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/esm/index.d.ts",
8
+ "keywords": [
9
+ "ai",
10
+ "agents",
11
+ "azure",
12
+ "typescript"
13
+ ],
14
+ "author": "Microsoft Corporation",
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/microsoft/Agent365-nodejs.git",
19
+ "directory": "packages/agents-a365-tooling"
20
+ },
21
+ "dependencies": {
22
+ "@microsoft/agents-a365-runtime": "0.1.0-preview.103",
23
+ "@microsoft/agents-hosting": "^1.1.0-alpha.85",
24
+ "@modelcontextprotocol/sdk": "^1.25.2",
25
+ "express": "^5.2.0",
26
+ "hono": "^4.11.7"
27
+ },
28
+ "devDependencies": {
29
+ "@eslint/js": "^9.39.1",
30
+ "@types/jest": "^30.0.0",
31
+ "@types/node": "^20.17.0",
32
+ "@typescript-eslint/eslint-plugin": "^8.47.0",
33
+ "@typescript-eslint/parser": "^8.47.0",
34
+ "eslint": "^9.39.1",
35
+ "jest": "^30.2.0",
36
+ "rimraf": "^6.0.0",
37
+ "ts-jest": "^29.4.5",
38
+ "typescript": "^5.9.3",
39
+ "typescript-eslint": "^8.47.0"
40
+ },
41
+ "engines": {
42
+ "node": ">=18.0.0"
43
+ },
44
+ "files": [
45
+ "dist/**/*",
46
+ "README.md",
47
+ "CHANGELOG.md",
48
+ "LICENSE.md"
49
+ ],
50
+ "scripts": {
51
+ "build:cjs": "npx tsc --project tsconfig.cjs.json",
52
+ "build:esm": "npx tsc --project tsconfig.esm.json",
53
+ "build": "npm run build:cjs && npm run build:esm",
54
+ "build:watch": "npx tsc --watch",
55
+ "clean": "npx rimraf dist",
56
+ "test": "jest --passWithNoTests",
57
+ "test:watch": "jest --watch",
58
+ "lint": "eslint src",
59
+ "lint:fix": "eslint src --fix",
60
+ "ci": "npm ci",
61
+ "pack": "node ../../copyFiles.js . && pnpm pack --pack-destination=../"
62
+ }
63
+ }