@azure-tools/typespec-azure-resource-manager 0.70.0-dev.9 → 0.71.0-dev.0

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.
@@ -1,3 +1,4 @@
1
1
  import { TypeSpecTestLibrary } from "@typespec/compiler/testing";
2
+ /** @deprecated Use `createTester` from `@typespec/compiler/testing` instead */
2
3
  export declare const AzureResourceManagerTestLibrary: TypeSpecTestLibrary;
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGpB,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,+BAA+B,EAAE,mBAG5C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGpB,MAAM,4BAA4B,CAAC;AAEpC,+EAA+E;AAE/E,eAAO,MAAM,+BAA+B,EAAE,mBAG5C,CAAC"}
@@ -1,6 +1,9 @@
1
1
  import { createTestLibrary, findTestPackageRoot, } from "@typespec/compiler/testing";
2
+ /** @deprecated Use `createTester` from `@typespec/compiler/testing` instead */
3
+ /* eslint-disable @typescript-eslint/no-deprecated */
2
4
  export const AzureResourceManagerTestLibrary = createTestLibrary({
3
5
  name: "@azure-tools/typespec-azure-resource-manager",
4
6
  packageRoot: await findTestPackageRoot(import.meta.url),
5
7
  });
8
+ /* eslint-enable @typescript-eslint/no-deprecated */
6
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM,+BAA+B,GAAwB,iBAAiB,CAAC;IACpF,IAAI,EAAE,8CAA8C;IACpD,WAAW,EAAE,MAAM,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;CACxD,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAEpC,+EAA+E;AAC/E,qDAAqD;AACrD,MAAM,CAAC,MAAM,+BAA+B,GAAwB,iBAAiB,CAAC;IACpF,IAAI,EAAE,8CAA8C;IACpD,WAAW,EAAE,MAAM,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;CACxD,CAAC,CAAC;AACH,oDAAoD"}
@@ -183,36 +183,87 @@ model AgentPropertiesPlatform<AgentDefinitionType extends AgentDefinition> {
183
183
  * exchanged between a client and an agent.
184
184
  */
185
185
  model ConversationProperties {
186
- /** Unique conversation identifier. Read-only (set by the service on creation). */
187
- @visibility(Lifecycle.Read)
188
- conversationId?: string;
189
-
190
186
  /** Timestamp of when the conversation was created. Read-only. */
191
187
  @visibility(Lifecycle.Read)
192
188
  createdAt?: utcDateTime;
193
189
  }
194
190
 
195
191
  /**
196
- * A single input message provided to the model.
192
+ * The role of the author of a message item.
197
193
  */
198
- model InputMessage {
199
- /** The role of the message author (for example, user, system, or developer). */
200
- role: string;
194
+ enum MessageRole {
195
+ /** A developer-authored instruction message. */
196
+ Developer,
197
+
198
+ /** A message authored by the end user. */
199
+ User,
201
200
 
202
- /** The content of the input message. */
203
- content: string;
201
+ /** A message generated by the assistant (agent). */
202
+ Assistant,
203
+
204
+ /** A message representing the output of a tool. */
205
+ Tool,
204
206
  }
205
207
 
206
- /** Mix-in for input type discriminator. */
207
- model InputTypeProperty {
208
- /** The input type discriminator. */
209
- type?: string = "message";
208
+ /**
209
+ * The type of an item exchanged within a conversation or produced in a response.
210
+ */
211
+ enum ItemType {
212
+ /** A message authored by a developer, user, assistant, or tool. */
213
+ Message,
214
+
215
+ /** A function (tool) call requested by the model. */
216
+ FunctionCall,
217
+
218
+ /** The output produced by a function (tool) call. */
219
+ FunctionCallOutput,
220
+
221
+ /** A compaction item summarizing earlier conversation history. */
222
+ Compaction,
210
223
  }
211
224
 
212
- /** Output from a conversation. */
213
- model ConversationOutput {
214
- /** The output identifier. */
215
- id: string;
225
+ /**
226
+ * A single item exchanged within a conversation.
227
+ *
228
+ * The `type` discriminator selects the item variant. Only the fields relevant to
229
+ * that variant are populated, so all variant-specific fields are optional:
230
+ * - `Message`: `role`, `content`
231
+ * - `FunctionCall`: `callId`, `name`, `arguments`
232
+ * - `FunctionCallOutput`: `callId`, `output`
233
+ * - `Compaction`: `summary`
234
+ */
235
+ model ConversationItem {
236
+ /** Unique identifier of the item. Read-only (assigned by the service). */
237
+ @visibility(Lifecycle.Read)
238
+ id?: string;
239
+
240
+ /** The item type discriminator. Determines which variant this item represents. */
241
+ type: ItemType;
242
+
243
+ /** The role of the message author. Applies to `Message` items. */
244
+ role?: MessageRole;
245
+
246
+ /** The text content of the message. Applies to `Message` items. */
247
+ content?: string;
248
+
249
+ /** Identifier correlating a function call with its output. Applies to `FunctionCall` and `FunctionCallOutput` items. */
250
+ callId?: string;
251
+
252
+ /** The name of the function (tool) to invoke. Applies to `FunctionCall` items. */
253
+ name?: string;
254
+
255
+ /** Named arguments passed to the function (tool), keyed by parameter name. Applies to `FunctionCall` items. */
256
+ arguments?: Record<unknown>;
257
+
258
+ /** The output produced by the function (tool) call. Applies to `FunctionCallOutput` items. */
259
+ output?: string;
260
+
261
+ /** Summary of the compacted conversation history. Applies to `Compaction` items. */
262
+ summary?: string;
263
+
264
+ /** The status of the item. Read-only. */
265
+ @visibility(Lifecycle.Read)
266
+ status?: ResponseStatus;
216
267
  }
217
268
 
218
269
  // ============================================================================
@@ -253,10 +304,6 @@ union ResponseStatus {
253
304
  * including its output, status, and usage.
254
305
  */
255
306
  model ResponseProperties {
256
- /** Unique response identifier. Read-only (set by the service). */
257
- @visibility(Lifecycle.Read)
258
- responseId?: string;
259
-
260
307
  /** Timestamp of when the response was created. Read-only. */
261
308
  @visibility(Lifecycle.Read)
262
309
  createdAt?: utcDateTime;
@@ -269,39 +316,66 @@ model ResponseProperties {
269
316
  status?: ResponseStatus;
270
317
 
271
318
  /** Content input to the model. Required on create. */
272
- input: InputMessage;
319
+ input: ConversationItem;
273
320
  }
274
321
 
275
322
  /**
276
323
  * An item produced in the response output, such as a message or tool call.
324
+ *
325
+ * The `type` discriminator selects the item variant. Only the fields relevant to
326
+ * that variant are populated, so all variant-specific fields are optional:
327
+ * - `Message`: `role`, `content`
328
+ * - `FunctionCall`: `callId`, `name`, `arguments`
329
+ * - `FunctionCallOutput`: `callId`, `output`
330
+ * - `Compaction`: `summary`
277
331
  */
278
- model ResponseOutputItem {
279
- /** Unique identifier of the output item. */
332
+ model ResponseItem {
333
+ /** Unique identifier of the output item. Read-only. */
280
334
  @visibility(Lifecycle.Read)
281
335
  id?: string;
282
336
 
283
- /** The output item type (for example, message or tool call). */
337
+ /** The item type discriminator. Read-only. */
284
338
  @visibility(Lifecycle.Read)
285
- type?: string;
339
+ type?: ItemType;
286
340
 
287
- /** The role associated with the output item. */
341
+ /** The role of the message author. Applies to `Message` items. Read-only. */
288
342
  @visibility(Lifecycle.Read)
289
- role?: string;
343
+ role?: MessageRole;
290
344
 
291
- /** The status of the output item. */
345
+ /** The text content of the message. Applies to `Message` items. Read-only. */
292
346
  @visibility(Lifecycle.Read)
293
- status?: ResponseStatus;
347
+ content?: string;
294
348
 
295
- /** The content of the output item. */
349
+ /** Identifier correlating a function call with its output. Applies to `FunctionCall` and `FunctionCallOutput` items. Read-only. */
296
350
  @visibility(Lifecycle.Read)
297
- content?: string;
351
+ callId?: string;
352
+
353
+ /** The name of the function (tool) invoked. Applies to `FunctionCall` items. Read-only. */
354
+ @visibility(Lifecycle.Read)
355
+ name?: string;
356
+
357
+ /** Named arguments passed to the function (tool), keyed by parameter name. Applies to `FunctionCall` items. Read-only. */
358
+ @visibility(Lifecycle.Read)
359
+ arguments?: Record<unknown>;
360
+
361
+ /** The output produced by the function (tool) call. Applies to `FunctionCallOutput` items. Read-only. */
362
+ @visibility(Lifecycle.Read)
363
+ output?: string;
364
+
365
+ /** Summary of the compacted conversation history. Applies to `Compaction` items. Read-only. */
366
+ @visibility(Lifecycle.Read)
367
+ summary?: string;
368
+
369
+ /** The status of the output item. Read-only. */
370
+ @visibility(Lifecycle.Read)
371
+ status?: ResponseStatus;
298
372
  }
299
373
 
300
374
  /** Mix-in for the output property. */
301
375
  model ResponseOutputProperty {
302
376
  /** Output items (messages, tool calls, etc.). Read-only. */
303
377
  @visibility(Lifecycle.Read)
304
- output: ResponseOutputItem[];
378
+ output: ResponseItem[];
305
379
  }
306
380
 
307
381
  /** Mix-in for the previousResponseId property. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-resource-manager",
3
- "version": "0.70.0-dev.9",
3
+ "version": "0.71.0-dev.0",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Resource Manager library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -47,24 +47,24 @@
47
47
  "pluralize": "^8.0.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@azure-tools/typespec-azure-core": "^0.69.0 || >=0.70.0-dev <0.70.0",
51
- "@typespec/compiler": "^1.13.0",
52
- "@typespec/http": "^1.13.0",
53
- "@typespec/rest": "^0.83.0 || >=0.84.0-dev <0.84.0",
54
- "@typespec/openapi": "^1.13.0",
55
- "@typespec/versioning": "^0.83.0 || >=0.84.0-dev <0.84.0"
50
+ "@azure-tools/typespec-azure-core": "^0.70.0 || >=0.71.0-dev <0.71.0",
51
+ "@typespec/compiler": "^1.14.0",
52
+ "@typespec/http": "^1.14.0",
53
+ "@typespec/rest": "^0.84.0 || >=0.85.0-dev <0.85.0",
54
+ "@typespec/openapi": "^1.14.0",
55
+ "@typespec/versioning": "^0.84.0 || >=0.85.0-dev <0.85.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@azure-tools/typespec-azure-core": "^0.69.0 || >=0.70.0-dev <0.70.0",
58
+ "@azure-tools/typespec-azure-core": "^0.70.0 || >=0.71.0-dev <0.71.0",
59
59
  "@types/node": "^26.0.0",
60
60
  "@types/pluralize": "^0.0.33",
61
- "@typespec/compiler": "^1.13.0",
62
- "@typespec/http": "^1.13.0",
63
- "@typespec/library-linter": "^0.83.0 || >=0.84.0-dev <0.84.0",
64
- "@typespec/rest": "^0.83.0 || >=0.84.0-dev <0.84.0",
65
- "@typespec/tspd": "^0.75.0 || >=0.76.0-dev <0.76.0",
66
- "@typespec/versioning": "^0.83.0 || >=0.84.0-dev <0.84.0",
67
- "@typespec/openapi": "^1.13.0",
61
+ "@typespec/compiler": "^1.14.0",
62
+ "@typespec/http": "^1.14.0",
63
+ "@typespec/library-linter": "^0.84.0 || >=0.85.0-dev <0.85.0",
64
+ "@typespec/rest": "^0.84.0 || >=0.85.0-dev <0.85.0",
65
+ "@typespec/tspd": "^0.76.0 || >=0.77.0-dev <0.77.0",
66
+ "@typespec/versioning": "^0.84.0 || >=0.85.0-dev <0.85.0",
67
+ "@typespec/openapi": "^1.14.0",
68
68
  "@vitest/coverage-v8": "^4.1.3",
69
69
  "@vitest/ui": "^4.1.3",
70
70
  "rimraf": "^6.1.3",