Skip to content

Commit 1727b3a

Browse files
CopilotmarkcowlCopilotkazrael2119timotheeguerin
authored
Backmerge release/june-2026 into main [skip chg] (#4643)
This PR syncs `main` with the June 2026 release branch so release-only commits are carried forward. It backmerges the full `release/june-2026` history rather than replaying changes manually. - **Backmerge scope** - Merges `release/june-2026` into `main` as a single merge commit to preserve branch history and commit attribution. - **Included release deltas** - Brings in the June hotfix line for `typespec-autorest`. - Carries forward ARM base-types work (including Agent base-type support, linter rules, generated defs, tests, and docs). - Includes associated workflow and package metadata/changelog updates shipped on the release branch. - **Representative commit topology** ```bash * bdf3a1a Merge release/june-2026 into main |\ | * 7072788 Hotfix june-2026: typespec-autorest@0.69.1 [skip chg] | * a8e4711 Add base types feature with @azureBaseType decorator and Agent base type * | 757a981 main tip before backmerge ``` --------- Co-authored-by: Mark Cowlishaw <1054056+markcowl@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Co-authored-by: Timothee Guerin <tiguerin@microsoft.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
1 parent c72bf38 commit 1727b3a

44 files changed

Lines changed: 5179 additions & 19 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.chronus/changes/python-spector-coverage-graceful-stop-2026-6-9-11-30-0.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/consistency.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
!startsWith(github.head_ref, 'publish/') &&
4040
!startsWith(github.head_ref, 'dependabot/') &&
4141
!startsWith(github.head_ref, 'backmerge/') &&
42-
!startsWith(github.head_ref, 'revert-')
42+
!startsWith(github.head_ref, 'revert-') &&
43+
!contains(github.event.pull_request.title, '[skip chg]')
4344
4445
- run: node eng/scripts/validate-core-submodule.js
4546
name: Check that core submodule is merged to core repo

.github/workflows/external-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
4040
# Also pack TypeSpec core packages
4141
cd core
42-
pnpm chronus pack --pack-destination ../tgz-packages --exclude standalone
42+
pnpm chronus pack --pack-destination ../tgz-packages --exclude standalone --exclude typespec-vs
4343
cd ..
4444
4545
echo "Created tgz packages:"

eng/scripts/lint-resourcemanager.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ const suppressedErrors = [
5757
id: "R2026",
5858
code: "AvoidAnonymousTypes",
5959
},
60+
{
61+
id: "R3016",
62+
code: "DefinitionsPropertiesNamesCamelCase",
63+
},
64+
{
65+
id: "R2056",
66+
code: "RequiredReadOnlyProperties",
67+
},
6068
];
6169

6270
async function lintInternal(swagger) {
Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
import "@typespec/rest";
2+
import "@typespec/versioning";
3+
import "@azure-tools/typespec-azure-core";
4+
import "@azure-tools/typespec-azure-resource-manager";
5+
6+
using Http;
7+
using Rest;
8+
using Versioning;
9+
using Azure.Core;
10+
using Azure.ResourceManager;
11+
using Azure.ResourceManager.BaseTypes;
12+
using Azure.ResourceManager.BaseTypes.Agents;
13+
14+
/** Contoso Agent Resource Provider management API. */
15+
@armProviderNamespace
16+
@service(#{ title: "ContosoAgentProviderClient" })
17+
@versioned(Versions)
18+
namespace Microsoft.ContosoAgent;
19+
20+
/** Contoso Agent API versions */
21+
enum Versions {
22+
/** 2024-06-01 version */
23+
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5)
24+
`2024-06-01`,
25+
}
26+
27+
// ============================================================================
28+
// Agent Definition models
29+
// ============================================================================
30+
31+
// AgentDefinitionAppliance: Use for the Appliance deployment model where the service
32+
// owns and reports agent configuration. All definition fields are read-only.
33+
// AgentDefinitionPlatform: Use for the Platform deployment model where the client
34+
// owns and manages agent configuration. Definition fields are writable.
35+
// Template params control optional definition fields:
36+
// HasModelDeploymentRef: include a modelDeploymentRef property
37+
// HasInstructions: include an instructions property
38+
39+
// Appliance definition: read-only fields managed by the service
40+
model ContosoApplianceDefinition is AgentDefinitionAppliance<true, true>;
41+
42+
// Platform definition: writable fields managed by the client
43+
model ContosoPlatformDefinition is AgentDefinitionPlatform<true, true>;
44+
45+
// ============================================================================
46+
// Agent Properties models
47+
// ============================================================================
48+
49+
// AgentPropertiesAppliance: Use when the service owns and manages the agent lifecycle.
50+
// All properties are read-only. The RP reports state; clients cannot modify it directly.
51+
// AgentPropertiesPlatform: Use when the client owns and manages the agent configuration.
52+
// Properties are writable (except baseTypes, which is always ARM-managed and read-only).
53+
54+
// Appliance agent properties: service-managed, read-only
55+
model ContosoApplianceAgentProperties is AgentPropertiesAppliance<ContosoApplianceDefinition> {
56+
...DefaultProvisioningStateProperty;
57+
}
58+
59+
// Platform agent properties: client-managed, writable
60+
model ContosoPlatformAgentProperties is AgentPropertiesPlatform<ContosoPlatformDefinition> {
61+
...DefaultProvisioningStateProperty;
62+
}
63+
64+
// ============================================================================
65+
// Agent Resource models
66+
// ============================================================================
67+
68+
// The Agent template creates an ARM TrackedResource with the @azureBaseType decorator.
69+
// Each agent resource requires a ResourceNameParameter spread for the key/segment.
70+
71+
// Appliance-deployed agent (service manages configuration)
72+
#suppress "@azure-tools/typespec-azure-resource-manager/basetypes-experimental" "Experimental BaseTypes"
73+
model ContosoApplianceAgent is Agent<ContosoApplianceAgentProperties> {
74+
...ResourceNameParameter<ContosoApplianceAgent>;
75+
}
76+
77+
// Platform-deployed agent (client manages configuration)
78+
#suppress "@azure-tools/typespec-azure-resource-manager/basetypes-experimental" "Experimental BaseTypes"
79+
model ContosoPlatformAgent is Agent<ContosoPlatformAgentProperties> {
80+
...ResourceNameParameter<ContosoPlatformAgent>;
81+
}
82+
83+
// ============================================================================
84+
// Conversation and Response child resources
85+
// ============================================================================
86+
87+
// Conversation and Response are required proxy child resources of an Agent.
88+
// Each must have full CRUD lifecycle operations (create, read, update, delete).
89+
// ConversationProperties and ResponseProperties provide the base fields;
90+
// extend them with RP-specific properties as needed.
91+
92+
// RP-specific conversation properties (shared by both agents in this sample)
93+
model ContosoConversationProperties is ConversationProperties {
94+
...DefaultProvisioningStateProperty;
95+
96+
/** System prompt / behavioral instructions for this conversation. */
97+
instructions?: string;
98+
}
99+
100+
// RP-specific response properties (shared by both agents in this sample)
101+
model ContosoResponseProperties is ResponseProperties {
102+
...PreviousResponseProperty;
103+
...DefaultProvisioningStateProperty;
104+
}
105+
106+
@@visibility(ContosoResponseProperties.previousResponseId, Lifecycle.Read);
107+
108+
// Conversation proxy child resource of the Appliance agent
109+
model ApplianceConversation
110+
is AgentConversation<ContosoConversationProperties, ContosoApplianceAgent> {
111+
...ResourceNameParameter<ApplianceConversation>;
112+
}
113+
114+
// Response proxy child resource of the Appliance agent
115+
model ApplianceResponse is AgentResponse<ContosoResponseProperties, ContosoApplianceAgent> {
116+
...ResourceNameParameter<ApplianceResponse>;
117+
}
118+
119+
// Conversation proxy child resource of the Platform agent
120+
model PlatformConversation
121+
is AgentConversation<ContosoConversationProperties, ContosoPlatformAgent> {
122+
...ResourceNameParameter<PlatformConversation>;
123+
}
124+
125+
// Response proxy child resource of the Platform agent
126+
model PlatformResponse is AgentResponse<ContosoResponseProperties, ContosoPlatformAgent> {
127+
...ResourceNameParameter<PlatformResponse>;
128+
}
129+
130+
// ============================================================================
131+
// Operations interfaces
132+
// ============================================================================
133+
134+
interface Operations extends Azure.ResourceManager.Operations {}
135+
136+
// ARM resource operations use operation templates for standard CRUD patterns.
137+
// See: https://azure.github.io/typespec-azure/docs/howtos/arm/resource-operations/
138+
139+
// Appliance agent operations
140+
@armResourceOperations
141+
interface ApplianceAgents {
142+
get is ArmResourceRead<ContosoApplianceAgent>;
143+
createOrUpdate is ArmResourceCreateOrReplaceAsync<ContosoApplianceAgent>;
144+
update is ArmTagsPatchSync<ContosoApplianceAgent>;
145+
delete is ArmResourceDeleteWithoutOkAsync<ContosoApplianceAgent>;
146+
listBySubscription is ArmListBySubscription<ContosoApplianceAgent>;
147+
listByResourceGroup is ArmResourceListByParent<ContosoApplianceAgent>;
148+
}
149+
150+
// Platform agent operations
151+
@armResourceOperations
152+
interface PlatformAgents {
153+
get is ArmResourceRead<ContosoPlatformAgent>;
154+
createOrUpdate is ArmResourceCreateOrReplaceAsync<ContosoPlatformAgent>;
155+
update is ArmTagsPatchSync<ContosoPlatformAgent>;
156+
delete is ArmResourceDeleteWithoutOkAsync<ContosoPlatformAgent>;
157+
listBySubscription is ArmListBySubscription<ContosoPlatformAgent>;
158+
listByResourceGroup is ArmResourceListByParent<ContosoPlatformAgent>;
159+
}
160+
161+
// Conversation and Response proxy child resources require create, read, update, and
162+
// delete lifecycle operations. Omitting any of these will trigger the
163+
// arm-agent-base-type-lifecycle-operations linting rule.
164+
// See: https://azure.github.io/typespec-azure/docs/howtos/arm/resource-operations/
165+
166+
// Appliance conversation operations (CRUD required)
167+
@armResourceOperations
168+
interface ApplianceConversations {
169+
get is ArmResourceRead<ApplianceConversation>;
170+
createOrUpdate is ArmResourceCreateOrReplaceAsync<ApplianceConversation>;
171+
update is ArmCustomPatchSync<
172+
ApplianceConversation,
173+
Azure.ResourceManager.Foundations.ResourceUpdateModel<
174+
ApplianceConversation,
175+
ContosoConversationProperties
176+
>
177+
>;
178+
delete is ArmResourceDeleteWithoutOkAsync<ApplianceConversation>;
179+
listByAgent is ArmResourceListByParent<ApplianceConversation>;
180+
}
181+
182+
// Appliance response operations (CRUD required)
183+
@armResourceOperations
184+
interface ApplianceResponses {
185+
get is ArmResourceRead<ApplianceResponse>;
186+
createOrUpdate is ArmResourceCreateOrReplaceAsync<ApplianceResponse>;
187+
update is ArmCustomPatchSync<
188+
ApplianceResponse,
189+
Azure.ResourceManager.Foundations.ResourceUpdateModel<
190+
ApplianceResponse,
191+
ContosoResponseProperties
192+
>
193+
>;
194+
delete is ArmResourceDeleteWithoutOkAsync<ApplianceResponse>;
195+
listByAgent is ArmResourceListByParent<ApplianceResponse>;
196+
}
197+
198+
// Platform conversation operations (CRUD required)
199+
@armResourceOperations
200+
interface PlatformConversations {
201+
get is ArmResourceRead<PlatformConversation>;
202+
createOrUpdate is ArmResourceCreateOrReplaceAsync<PlatformConversation>;
203+
update is ArmCustomPatchSync<
204+
PlatformConversation,
205+
Azure.ResourceManager.Foundations.ResourceUpdateModel<
206+
PlatformConversation,
207+
ContosoConversationProperties
208+
>
209+
>;
210+
delete is ArmResourceDeleteWithoutOkAsync<PlatformConversation>;
211+
listByAgent is ArmResourceListByParent<PlatformConversation>;
212+
}
213+
214+
// Platform response operations (CRUD required)
215+
@armResourceOperations
216+
interface PlatformResponses {
217+
get is ArmResourceRead<PlatformResponse>;
218+
createOrUpdate is ArmResourceCreateOrReplaceAsync<PlatformResponse>;
219+
update is ArmCustomPatchSync<
220+
PlatformResponse,
221+
Azure.ResourceManager.Foundations.ResourceUpdateModel<
222+
PlatformResponse,
223+
ContosoResponseProperties
224+
>
225+
>;
226+
delete is ArmResourceDeleteWithoutOkAsync<PlatformResponse>;
227+
listByAgent is ArmResourceListByParent<PlatformResponse>;
228+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
title: Agent Base Type
2+
description: Sample specification for a resource implementing the Agent base type.
3+
4+
llmstxt: false
5+
playground: false
6+
7+
order: 8

0 commit comments

Comments
 (0)